AudioManager  7.6.6
Native Application Runtime Environment
CAmRoutingReceiver.cpp
Go to the documentation of this file.
1 
24 #include "CAmRoutingReceiver.h"
25 #include <cassert>
26 #include <algorithm>
27 #include "IAmDatabaseHandler.h"
28 #include "CAmRoutingSender.h"
29 #include "CAmControlSender.h"
30 #include "CAmDltWrapper.h"
31 #include "CAmSocketHandler.h"
32 
33 #define __METHOD_NAME__ std::string (std::string("CAmRoutingReceiver::") + __func__)
34 
35 namespace am
36 {
37 
38 CAmRoutingReceiver::CAmRoutingReceiver(IAmDatabaseHandler *iDatabaseHandler, CAmRoutingSender *iRoutingSender, CAmControlSender *iControlSender, CAmSocketHandler *iSocketHandler) :
39  mpDatabaseHandler(iDatabaseHandler), //
40  mpRoutingSender(iRoutingSender), //
41  mpControlSender(iControlSender), //
42  mpSocketHandler(iSocketHandler), //
43  mpDBusWrapper(NULL), //
44  mListStartupHandles(), //
45  mListRundownHandles(), //
46  handleCount(0), //
47  mWaitStartup(false), //
48  mWaitRundown(false), //
49  mLastStartupError(E_OK), //
50  mLastRundownError(E_OK) //
51 {
52  assert(mpDatabaseHandler!=NULL);
53  assert(mpRoutingSender!=NULL);
54  assert(mpControlSender!=NULL);
55  assert(mpSocketHandler!=NULL);
56 }
57 
58 CAmRoutingReceiver::CAmRoutingReceiver(IAmDatabaseHandler *iDatabaseHandler, CAmRoutingSender *iRoutingSender, CAmControlSender *iControlSender, CAmSocketHandler *iSocketHandler, CAmDbusWrapper *iDBusWrapper) :
59  mpDatabaseHandler(iDatabaseHandler), //
60  mpRoutingSender(iRoutingSender), //
61  mpControlSender(iControlSender), //
62  mpSocketHandler(iSocketHandler), //
63  mpDBusWrapper(iDBusWrapper), //
64  mListStartupHandles(), //
65  mListRundownHandles(), //
66  handleCount(0), //
67  mWaitStartup(false), //
68  mWaitRundown(false),
69  mLastStartupError(E_OK), //
70  mLastRundownError(E_OK) //
71 {
72  assert(mpDatabaseHandler!=NULL);
73  assert(mpRoutingSender!=NULL);
74  assert(mpControlSender!=NULL);
75  assert(mpSocketHandler!=NULL);
76  assert(mpDBusWrapper!=NULL);
77 }
78 
80 {
81 }
82 
83 void CAmRoutingReceiver::handleCallback(const am_Handle_s handle, const am_Error_e error)
84 {
85  if (error == am_Error_e::E_OK)
86  {
87  mpRoutingSender->writeToDatabaseAndRemove(handle);
88  }
89  else
90  {
91  mpRoutingSender->removeHandle(handle);
92  }
93 }
94 
95 void CAmRoutingReceiver::ackConnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_Error_e error)
96 {
97  logInfo(__METHOD_NAME__,"handle=",handle,"connectionID=",connectionID,"error=",error);
98  if (error == am_Error_e::E_OK)
99  {
100  mpRoutingSender->writeToDatabaseAndRemove(handle);
101  }
102  else
103  {
104  //only remove connection of handle was found
105  if(mpRoutingSender->removeHandle(handle)==0)
106  {
107  mpDatabaseHandler->removeConnection(connectionID);
108  mpRoutingSender->removeConnectionLookup(connectionID);
109  }
110  }
111  mpControlSender->cbAckConnect(handle, error);
112 }
113 
114 void CAmRoutingReceiver::ackDisconnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_Error_e error)
115 {
116  logInfo(__METHOD_NAME__,"handle=",handle,"connectionID=",connectionID,"error=",error);
117  //only remove connection of handle was found
118  if(mpRoutingSender->removeHandle(handle) == 0)
119  {
120  mpRoutingSender->removeConnectionLookup(connectionID);
121  }
122  mpControlSender->cbAckDisconnect(handle, error);
123 }
124 
126 {
127  logInfo(__METHOD_NAME__,"handle=",handle,"volume=",volume,"error=",error);
128  if(error == E_OK)
129  {
130  mpRoutingSender->checkVolume(handle,volume);
131  }
132 
133  if (error== am_Error_e::E_OK || error== am_Error_e::E_ABORTED)
134  {
135  mpRoutingSender->writeToDatabaseAndRemove(handle);
136  }
137  else
138  {
139  mpRoutingSender->removeHandle(handle);
140  }
141  mpControlSender->cbAckSetSinkVolumeChange(handle, volume, error);
142 }
143 
145 {
146  logInfo(__METHOD_NAME__,"handle=",handle,"volume=",volume,"error=",error);
147  if(error == E_OK)
148  {
149  mpRoutingSender->checkVolume(handle,volume);
150  }
151 
152  if (error== am_Error_e::E_OK || error== am_Error_e::E_ABORTED)
153  {
154  mpRoutingSender->writeToDatabaseAndRemove(handle);
155  }
156  else
157  {
158  mpRoutingSender->removeHandle(handle);
159  }
160  mpControlSender->cbAckSetSourceVolumeChange(handle, volume, error);
161 }
162 
164 {
165  logInfo(__METHOD_NAME__,"handle=",handle,"error=",error);
166  handleCallback(handle,error);
167  mpControlSender->cbAckSetSourceState(handle, error);
168 }
169 
171 {
172  logInfo(__METHOD_NAME__,"handle=",handle,"error=",error);
173  handleCallback(handle,error);
174  mpControlSender->cbAckSetSinkSoundProperty(handle, error);
175 }
176 
178 {
179  logInfo(__METHOD_NAME__,"handle=",handle,"error=",error);
180  handleCallback(handle,error);
181  mpControlSender->cbAckSetSinkSoundProperties(handle, error);
182 }
183 
185 {
186  logInfo(__METHOD_NAME__,"handle=",handle,"error=",error);
187  handleCallback(handle,error);
188  mpControlSender->cbAckSetSourceSoundProperty(handle, error);
189 }
190 
192 {
193  logInfo(__METHOD_NAME__,"handle=",handle,"error=",error);
194  handleCallback(handle,error);
195  mpControlSender->cbAckSetSourceSoundProperties(handle, error);
196 }
197 
198 void CAmRoutingReceiver::ackCrossFading(const am_Handle_s handle, const am_HotSink_e hotSink, const am_Error_e error)
199 {
200  logInfo(__METHOD_NAME__,"handle=",handle,"hotsink=",hotSink,"error=",error);
201  handleCallback(handle,error);
202  mpControlSender->cbAckCrossFade(handle, hotSink, error);
203 }
204 
205 void CAmRoutingReceiver::ackSourceVolumeTick(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume)
206 {
207  logInfo(__METHOD_NAME__,"handle=",handle,"sourceID=",sourceID,"volume=",volume);
208  mpControlSender->hookSystemSourceVolumeTick(handle, sourceID, volume);
209 }
210 
211 void CAmRoutingReceiver::ackSinkVolumeTick(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume)
212 {
213  logInfo(__METHOD_NAME__,"handle=",handle,"sinkID=",sinkID,"volume=",volume);
214  mpControlSender->hookSystemSinkVolumeTick(handle, sinkID, volume);
215 }
216 
217 am_Error_e CAmRoutingReceiver::peekDomain(const std::string & name, am_domainID_t & domainID)
218 {
219  return (mpDatabaseHandler->peekDomain(name, domainID));
220 }
221 
223 {
224  return (mpControlSender->hookSystemRegisterDomain(domainData, domainID));
225 }
226 
228 {
229  return (mpControlSender->hookSystemDeregisterDomain(domainID));
230 }
231 
233 {
234  return (mpControlSender->hookSystemRegisterGateway(gatewayData, gatewayID));
235 }
236 
238 {
239  return (mpControlSender->hookSystemRegisterConverter(converterData, converterID));
240 }
241 
243 {
244  return (mpControlSender->hookSystemDeregisterGateway(gatewayID));
245 }
246 
248 {
249  return (mpControlSender->hookSystemDeregisterConverter(converterID));
250 }
251 
252 am_Error_e CAmRoutingReceiver::peekSink(const std::string& name, am_sinkID_t & sinkID)
253 {
254  return (mpDatabaseHandler->peekSink(name, sinkID));
255 }
256 
258 {
259  return (mpControlSender->hookSystemRegisterSink(sinkData, sinkID));
260 }
261 
263 {
264  return (mpControlSender->hookSystemDeregisterSink(sinkID));
265 }
266 
267 am_Error_e CAmRoutingReceiver::peekSource(const std::string & name, am_sourceID_t & sourceID)
268 {
269  return (mpDatabaseHandler->peekSource(name, sourceID));
270 }
271 
273 {
274  return (mpControlSender->hookSystemRegisterSource(sourceData, sourceID));
275 }
276 
278 {
279  return (mpControlSender->hookSystemDeregisterSource(sourceID));
280 }
281 
283 {
284  return (mpControlSender->hookSystemRegisterCrossfader(crossfaderData, crossfaderID));
285 }
286 
288 {
289  return (mpControlSender->hookSystemDeregisterCrossfader(crossfaderID));
290 }
291 
293 {
294  am_Error_e error;
295  error = mpDatabaseHandler->changeSourceInterruptState(sourceID, interruptState);
296  if (error == E_OK)
297  {
298  mpControlSender->hookSystemInterruptStateChange(sourceID, interruptState);
299  }
300 }
301 
303 {
304  mpControlSender->hookSystemDomainRegistrationComplete(domainID);
305 }
306 
308 {
309  mpControlSender->hookSystemSinkAvailablityStateChange(sinkID, availability);
310 }
311 
313 {
314  mpControlSender->hookSystemSourceAvailablityStateChange(sourceID, availability);
315 }
316 
318 {
319  mpControlSender->hookSystemDomainStateChange(domainID, domainState);
320 }
321 
323 {
324  mpDatabaseHandler->changeConnectionTimingInformation(connectionID, delay);
325  mpControlSender->hookSystemSingleTimingInformationChanged(connectionID,delay);
326 }
327 
328 void CAmRoutingReceiver::sendChangedData(const std::vector<am_EarlyData_s> & earlyData)
329 {
330  mpControlSender->hookSystemReceiveEarlyData(earlyData);
331 }
332 
333 am_Error_e CAmRoutingReceiver::peekSinkClassID(const std::string& name, am_sinkClass_t& sinkClassID)
334 {
335  return (mpDatabaseHandler->peekSinkClassID(name, sinkClassID));
336 }
337 
338 am_Error_e CAmRoutingReceiver::peekSourceClassID(const std::string& name, am_sourceClass_t& sourceClassID)
339 {
340  return (mpDatabaseHandler->peekSourceClassID(name, sourceClassID));
341 }
342 
343 #ifdef WITH_DBUS_WRAPPER
345 {
346  dbusConnectionWrapper = mpDBusWrapper;
347  return (E_OK);
348 #else
350 {
351  return (E_UNKNOWN);
352 #endif
353 }
354 
356 {
357  socketHandler = mpSocketHandler;
358  return (E_OK);
359 }
360 
361 void CAmRoutingReceiver::getInterfaceVersion(std::string & version) const
362 {
363  version = RoutingVersion;
364 }
365 
366 void CAmRoutingReceiver::confirmRoutingReady(const uint16_t handle, const am_Error_e error)
367 {
368  if (error!=E_OK)
369  mLastStartupError=error;
370  mListStartupHandles.erase(std::remove(mListStartupHandles.begin(), mListStartupHandles.end(), handle), mListStartupHandles.end());
371  if (mWaitStartup && mListStartupHandles.empty())
372  mpControlSender->confirmRoutingReady(mLastStartupError);
373 }
374 
375 void CAmRoutingReceiver::confirmRoutingRundown(const uint16_t handle, const am_Error_e error)
376 {
377  if (error!=E_OK)
378  mLastRundownError=error;
379  mListRundownHandles.erase(std::remove(mListRundownHandles.begin(), mListRundownHandles.end(), handle), mListRundownHandles.end());
380  if (mWaitRundown && mListRundownHandles.empty())
381  mpControlSender->confirmRoutingRundown(mLastRundownError);
382 }
383 
385 {
386  uint16_t handle = ++handleCount; //todo: handle overflow
387  mListStartupHandles.push_back(handle);
388  return (handle);
389 }
390 
392 {
393  uint16_t handle = ++handleCount; //todo: handle overflow
394  mListRundownHandles.push_back(handle);
395  return (handle);
396 }
397 
399 {
400  mWaitStartup = startup;
401  mLastStartupError=E_OK;
402 }
403 
405 {
406  logInfo(__METHOD_NAME__,"handle=",handle,"error=",error);
407  handleCallback(handle,error);
408  mpControlSender->cbAckSetSinkNotificationConfiguration(handle,error);
409 }
410 
412 {
413  logInfo(__METHOD_NAME__,"handle=",handle,"error=",error);
414  handleCallback(handle,error);
415  mpControlSender->cbAckSetSourceNotificationConfiguration(handle,error);
416 }
417 
418 am_Error_e CAmRoutingReceiver::updateGateway(const am_gatewayID_t gatewayID, const std::vector<am_CustomConnectionFormat_t>& listSourceFormats, const std::vector<am_CustomConnectionFormat_t>& listSinkFormats, const std::vector<bool>& convertionMatrix)
419 {
420  return (mpControlSender->hookSystemUpdateGateway(gatewayID,listSourceFormats,listSinkFormats,convertionMatrix));
421 }
422 
423 am_Error_e CAmRoutingReceiver::updateConverter(const am_converterID_t converterID, const std::vector<am_CustomConnectionFormat_t>& listSourceFormats, const std::vector<am_CustomConnectionFormat_t>& listSinkFormats, const std::vector<bool>& convertionMatrix)
424 {
425  return (mpControlSender->hookSystemUpdateConverter(converterID,listSourceFormats,listSinkFormats,convertionMatrix));
426 }
427 
428 am_Error_e CAmRoutingReceiver::updateSink(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_CustomConnectionFormat_t>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties)
429 {
430  return (mpControlSender->hookSystemUpdateSink(sinkID,sinkClassID,listSoundProperties,listConnectionFormats,listMainSoundProperties));
431 }
432 
433 am_Error_e CAmRoutingReceiver::updateSource(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_CustomConnectionFormat_t>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties)
434 {
435  return (mpControlSender->hookSystemUpdateSource(sourceID,sourceClassID,listSoundProperties,listConnectionFormats,listMainSoundProperties));
436 }
437 
438 void CAmRoutingReceiver::ackSetVolumes(const am_Handle_s handle, const std::vector<am_Volumes_s>& listvolumes, const am_Error_e error)
439 {
440  logInfo(__METHOD_NAME__,"handle=",handle,"error=",error);
441  handleCallback(handle,error);
442  mpControlSender->cbAckSetVolume(handle,listvolumes,error);
443 }
444 
446 {
447  logInfo(__METHOD_NAME__,"sinkID=",sinkID,"type=",payload.type,"notificationValue=",payload.value);
448  mpControlSender->hookSinkNotificationDataChanged(sinkID,payload);
449 }
450 
452 {
453  logInfo(__METHOD_NAME__,"sinkID=",sourceID,"type=",payload.type,"notificationValue=",payload.value);
454  mpControlSender->hookSourceNotificationDataChanged(sourceID,payload);
455 }
456 
458 {
459  return (mpDatabaseHandler->getDomainOfSink(sinkID,domainID));
460 }
461 
463 {
464  return (mpDatabaseHandler->getDomainOfSource(sourceID,domainID));
465 }
466 
468 {
469  return (mpDatabaseHandler->getDomainOfCrossfader(crossfader,domainID));
470 }
471 
473 {
474  mWaitRundown = rundown;
475  mLastRundownError=E_OK;
476 }
477 
478 }
Implements the RoutingSendInterface.
virtual am_Error_e changeSourceInterruptState(const am_sourceID_t sourceID, const am_InterruptState_e interruptState)=0
am_Error_e getDBusConnectionWrapper(CAmDbusWrapper *&dbusConnectionWrapper) const
this function is used to retrieve a pointer to the dBusConnectionWrapper
uint16_t am_connectionID_t
a connection ID
void hookSystemSourceAvailablityStateChange(const am_sourceID_t sourceID, const am_Availability_s &availability)
am_Error_e hookSystemUpdateGateway(const am_gatewayID_t gatewayID, const std::vector< am_CustomConnectionFormat_t > &listSourceConnectionFormats, const std::vector< am_CustomConnectionFormat_t > &listSinkConnectionFromats, const std::vector< bool > &convertionMatrix)
A Common-API wrapper class, which loads the common-api runtime and instantiates all necessary objects...
void hookSourceNotificationDataChange(const am_sourceID_t sourceID, const am_NotificationPayload_s &payload)
is called whenever a notified value needs to be send
void cbAckSetSinkSoundProperties(const am_Handle_s handle, const am_Error_e error)
uint16_t am_sinkClass_t
am_Error_e
the errors of the audiomanager.
am_InterruptState_e
void ackSetVolumes(const am_Handle_s handle, const std::vector< am_Volumes_s > &listvolumes, const am_Error_e error)
acknowledges a asyncSetSinkVolumes
am_Error_e hookSystemRegisterSink(const am_Sink_s &sinkData, am_sinkID_t &sinkID)
am_Error_e hookSystemDeregisterCrossfader(const am_crossfaderID_t crossfaderID)
void logInfo(T value, TArgs...args)
logs given values with infolevel with the default context
void confirmRoutingReady(const uint16_t handle, const am_Error_e error)
confirms the setRoutingReady Command
virtual am_Error_e getDomainOfSink(const am_sinkID_t sinkID, am_domainID_t &domainID) const =0
void hookTimingInformationChanged(const am_connectionID_t connectionID, const am_timeSync_t delay)
is called when the timinginformation (delay) changed for a connection.
void hookSystemInterruptStateChange(const am_sourceID_t sourceID, const am_InterruptState_e interruptState)
void hookSystemDomainRegistrationComplete(const am_domainID_t domainID)
This struct describes the attribiutes of a sink.
This struct holds the payload of a notification.
void cbAckSetSinkNotificationConfiguration(const am_Handle_s handle, const am_Error_e error)
void confirmRoutingReady(const am_Error_e error)
am_Error_e registerSource(const am_Source_s &sourceData, am_sourceID_t &sourceID)
registers a source.
void ackCrossFading(const am_Handle_s handle, const am_HotSink_e hotSink, const am_Error_e error)
acknowledges asyncCrossFade
void hookSinkNotificationDataChanged(const am_sinkID_t sinkID, const am_NotificationPayload_s &payload)
am_Error_e registerConverter(const am_Converter_s &converterData, am_converterID_t &converterID)
registers a converter.
am_Error_e hookSystemDeregisterSink(const am_sinkID_t sinkID)
void checkVolume(const am_Handle_s handle, const am_volume_t volume)
This struct describes the attribiutes of a domain.
void waitOnRundown(bool rundown)
tells the RoutingReceiver to start waiting for all handles to be confirmed
am_Error_e hookSystemUpdateSink(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector< am_SoundProperty_s > &listSoundProperties, const std::vector< am_CustomConnectionFormat_t > &listConnectionFormats, const std::vector< am_MainSoundProperty_s > &listMainSoundProperties)
uint16_t am_crossfaderID_t
a crossfader ID
The am::CAmSocketHandler implements a mainloop for the AudioManager.
SPDX license identifier: MPL-2.0.
am_Error_e updateSink(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector< am_SoundProperty_s > &listSoundProperties, const std::vector< am_CustomConnectionFormat_t > &listConnectionFormats, const std::vector< am_MainSoundProperty_s > &listMainSoundProperties)
updates data of an gateway.
am_Error_e updateConverter(const am_converterID_t converterID, const std::vector< am_CustomConnectionFormat_t > &listSourceFormats, const std::vector< am_CustomConnectionFormat_t > &listSinkFormats, const std::vector< bool > &convertionMatrix)
updates data of an converter.
void hookSystemSinkAvailablityStateChange(const am_sinkID_t sinkID, const am_Availability_s &availability)
int16_t am_timeSync_t
offset time that is introduced in milli seconds.
void confirmRoutingRundown(const uint16_t handle, const am_Error_e error)
confirms the setRoutingRundown Command
void hookSourceNotificationDataChanged(const am_sourceID_t sourceID, const am_NotificationPayload_s &payload)
am_Error_e hookSystemRegisterSource(const am_Source_s &sourceData, am_sourceID_t &sourceID)
am_Error_e deregisterGateway(const am_gatewayID_t gatewayID)
deregisters a gateway.
SPDX license identifier: MPL-2.0.
am_Error_e updateSource(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector< am_SoundProperty_s > &listSoundProperties, const std::vector< am_CustomConnectionFormat_t > &listConnectionFormats, const std::vector< am_MainSoundProperty_s > &listMainSoundProperties)
updates data of an source.
void hookSystemDomainStateChange(const am_domainID_t domainID, const am_DomainState_e state)
am_Error_e hookSystemRegisterConverter(const am_Converter_s &converterData, am_converterID_t &converterID)
void ackSourceVolumeTick(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume)
acknowledges a volume tick.
void cbAckCrossFade(const am_Handle_s handle, const am_HotSink_e hostsink, const am_Error_e error)
void cbAckSetSinkVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error)
am_Error_e getDomainOfSource(const am_sourceID_t sourceID, am_domainID_t &domainID) const
E_OK in case of success.
am_Error_e peekSourceClassID(const std::string &name, am_sourceClass_t &sourceClassID)
this function peeks a sourceclassID.
#define __METHOD_NAME__
am_CustomNotificationType_t type
This defines the notification type.
am_Error_e peekSink(const std::string &name, am_sinkID_t &sinkID)
This function returns the ID to the given sinkName.
void cbAckDisconnect(const am_Handle_s handle, const am_Error_e errorID)
void cbAckSetSourceNotificationConfiguration(const am_Handle_s handle, const am_Error_e error)
virtual am_Error_e peekSinkClassID(const std::string &name, am_sinkClass_t &sinkClassID)=0
am_Error_e hookSystemUpdateConverter(const am_converterID_t converterID, const std::vector< am_CustomConnectionFormat_t > &listSourceConnectionFormats, const std::vector< am_CustomConnectionFormat_t > &listSinkConnectionFromats, const std::vector< bool > &convertionMatrix)
void hookSystemSinkVolumeTick(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume)
uint16_t am_converterID_t
a converter ID
int16_t value
This is finally the value of the notification.
void ackSetSourceState(const am_Handle_s handle, const am_Error_e error)
acknowlegde for asyncSetSourceState
am_Error_e registerGateway(const am_Gateway_s &gatewayData, am_gatewayID_t &gatewayID)
registers a gateway.
SPDX license identifier: MPL-2.0.
void getInterfaceVersion(std::string &version) const
This function returns the version of the interface.
void cbAckConnect(const am_Handle_s handle, const am_Error_e errorID)
am_Error_e peekSinkClassID(const std::string &name, am_sinkClass_t &sinkClassID)
this function peeks a sourceclassID.
void hookInterruptStatusChange(const am_sourceID_t sourceID, const am_InterruptState_e interruptState)
is called when a low level interrupt changes it status.
void cbAckSetSinkSoundProperty(const am_Handle_s handle, const am_Error_e error)
a handle is used for asynchronous operations and is uniquely assigned for each of this operations ...
am_Error_e hookSystemRegisterCrossfader(const am_Crossfader_s &crossfaderData, am_crossfaderID_t &crossfaderID)
void ackSetSinkSoundProperty(const am_Handle_s handle, const am_Error_e error)
acknowledges asyncSetSinkSoundProperty
uint16_t am_sourceID_t
a source ID
am_Error_e hookSystemRegisterGateway(const am_Gateway_s &gatewayData, am_gatewayID_t &gatewayID)
void hookSourceAvailablityStatusChange(const am_sourceID_t sourceID, const am_Availability_s &availability)
is called when a source changes its availability
void ackSourceNotificationConfiguration(const am_Handle_s handle, const am_Error_e error)
The acknowledge of the SourceNotificationConfiguration.
void ackSetSourceVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error)
acknowledges a asyncsetSourceVolume
void cbAckSetSourceState(const am_Handle_s handle, const am_Error_e error)
am_Error_e deregisterConverter(const am_converterID_t converterID)
deregisters a converter.
virtual am_Error_e removeConnection(const am_connectionID_t connectionID)=0
uint16_t getStartupHandle()
returns a startup handle
sends data to the commandInterface, takes the file of the library that needs to be loaded ...
CAmRoutingReceiver(IAmDatabaseHandler *iDatabaseHandler, CAmRoutingSender *iRoutingSender, CAmControlSender *iControlSender, CAmSocketHandler *iSocketHandler)
This class handles and abstracts the database.
SPDX license identifier: MPL-2.0.
void cbAckSetSourceSoundProperty(const am_Handle_s handle, const am_Error_e error)
virtual am_Error_e getDomainOfCrossfader(const am_crossfaderID_t crossfader, am_domainID_t &domainID) const =0
void ackSetSinkSoundProperties(const am_Handle_s handle, const am_Error_e error)
acknowledges asyncSetSinkSoundProperties
am_Error_e hookSystemDeregisterDomain(const am_domainID_t domainID)
void ackSetSinkVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error)
acknowledges a asyncsetSinkVolume
This struct describes the attributes of a converter.
void hookDomainRegistrationComplete(const am_domainID_t domainID)
This hook is called when all elements from a domain are registered.
am_Error_e peekSource(const std::string &name, am_sourceID_t &sourceID)
This function returns the ID to the given sourceName.
am_Error_e registerDomain(const am_Domain_s &domainData, am_domainID_t &domainID)
registers a domain
am_Error_e deregisterSink(const am_sinkID_t sinkID)
deregisters a sink.
am_Error_e registerSink(const am_Sink_s &sinkData, am_sinkID_t &sinkID)
Registers a sink.
am_HotSink_e
describes the active sink of a crossfader.
int16_t am_volume_t
The unit is 0.1 db steps,The smallest value -3000 (=AM_MUTE).
This struct describes the attribiutes of a crossfader.
am_Error_e hookSystemUpdateSource(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector< am_SoundProperty_s > &listSoundProperties, const std::vector< am_CustomConnectionFormat_t > &listConnectionFormats, const std::vector< am_MainSoundProperty_s > &listMainSoundProperties)
am_Error_e getSocketHandler(CAmSocketHandler *&socketHandler) const
This function returns the pointer to the socketHandler.
uint16_t getRundownHandle()
returns a rundown handle
am_Error_e writeToDatabaseAndRemove(const am_Handle_s handle)
write data to Database and remove handle
am_Error_e deregisterSource(const am_sourceID_t sourceID)
deregisters a source
uint16_t am_sourceClass_t
SPDX license identifier: MPL-2.0.
void ackSinkNotificationConfiguration(const am_Handle_s handle, const am_Error_e error)
The acknowledge of the SinkNotificationConfiguration.
void cbAckSetVolume(const am_Handle_s handle, const std::vector< am_Volumes_s > &listVolumes, const am_Error_e error)
void hookSinkAvailablityStatusChange(const am_sinkID_t sinkID, const am_Availability_s &availability)
is called when a sink changes its availability
void hookSystemSingleTimingInformationChanged(const am_connectionID_t connectionID, const am_timeSync_t time)
this describes the availability of a sink or a source together with the latest change ...
This struct describes the attributes of a gateway.
am_Error_e getDomainOfSink(const am_sinkID_t sinkID, am_domainID_t &domainID) const
E_OK in case of success.
the asynchronous action was aborted
am_Error_e removeHandle(const am_Handle_s &handle)
removes a handle from the list
void hookDomainStateChange(const am_domainID_t domainID, const am_DomainState_e domainState)
is called when a domain changes its status.
am_Error_e updateGateway(const am_gatewayID_t gatewayID, const std::vector< am_CustomConnectionFormat_t > &listSourceFormats, const std::vector< am_CustomConnectionFormat_t > &listSinkFormats, const std::vector< bool > &convertionMatrix)
updates data of an gateway.
#define RoutingVersion
Definition: IAmRouting.h:38
virtual am_Error_e getDomainOfSource(const am_sourceID_t sourceID, am_domainID_t &domainID) const =0
am_Error_e registerCrossfader(const am_Crossfader_s &crossfaderData, am_crossfaderID_t &crossfaderID)
this function registers a crossfader.
am_Error_e hookSystemDeregisterConverter(const am_converterID_t converterID)
virtual am_Error_e peekSource(const std::string &name, am_sourceID_t &sourceID)=0
am_Error_e deregisterCrossfader(const am_crossfaderID_t crossfaderID)
this function deregisters a crossfader.
This wraps dbus and provides everything needed to anyone who wants to use dbus (including plugins)...
virtual am_Error_e changeConnectionTimingInformation(const am_connectionID_t connectionID, const am_timeSync_t delay)=0
virtual am_Error_e peekSink(const std::string &name, am_sinkID_t &sinkID)=0
void sendChangedData(const std::vector< am_EarlyData_s > &earlyData)
this function is used to send out all data that has been changed in an early state.
am_Error_e hookSystemDeregisterGateway(const am_gatewayID_t gatewayID)
uint16_t am_domainID_t
a domain ID
void hookSystemSourceVolumeTick(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume)
void ackConnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_Error_e error)
acknowledges a asyncConnect
void cbAckSetSourceSoundProperties(const am_Handle_s handle, const am_Error_e error)
no error - positive reply
am_Error_e hookSystemDeregisterSource(const am_sourceID_t sourceID)
SPDX license identifier: MPL-2.0.
am_Error_e peekDomain(const std::string &name, am_domainID_t &domainID)
This function returns the ID to the given domainName.
void ackDisconnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_Error_e error)
acknowledges a asyncDisconnect
void confirmRoutingRundown(const am_Error_e error)
void waitOnStartup(bool startup)
tells the RoutingReceiver to start waiting for all handles to be confirmed
uint16_t am_gatewayID_t
a gateway ID
This struct describes the attribiutes of a source.
am_Error_e getDomainOfCrossfader(const am_crossfaderID_t crossfader, am_domainID_t &domainID) const
E_OK in case of success.
uint16_t am_sinkID_t
a sink ID
void cbAckSetSourceVolumeChange(const am_Handle_s handle, const am_volume_t voulme, const am_Error_e error)
void ackSetSourceSoundProperties(const am_Handle_s handle, const am_Error_e error)
acknowledges asyncSetSourceSoundProperties
am_Error_e deregisterDomain(const am_domainID_t domainID)
deregisters a domain.
am_Error_e hookSystemRegisterDomain(const am_Domain_s &domainData, am_domainID_t &domainID)
void ackSinkVolumeTick(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume)
acknowledges a volume tick.
am_Error_e removeConnectionLookup(const am_connectionID_t connectionID)
virtual am_Error_e peekDomain(const std::string &name, am_domainID_t &domainID)=0
void hookSinkNotificationDataChange(const am_sinkID_t sinkID, const am_NotificationPayload_s &payload)
is called whenever a notified value needs to be send
void ackSetSourceSoundProperty(const am_Handle_s handle, const am_Error_e error)
acknowledges asyncSetSourceSoundProperty
virtual am_Error_e peekSourceClassID(const std::string &name, am_sourceClass_t &sourceClassID)=0
void hookSystemReceiveEarlyData(const std::vector< am_EarlyData_s > &data)