summaryrefslogtreecommitdiff
path: root/AudioManagerCore/src/CAmRoutingReceiver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'AudioManagerCore/src/CAmRoutingReceiver.cpp')
-rw-r--r--AudioManagerCore/src/CAmRoutingReceiver.cpp314
1 files changed, 164 insertions, 150 deletions
diff --git a/AudioManagerCore/src/CAmRoutingReceiver.cpp b/AudioManagerCore/src/CAmRoutingReceiver.cpp
index b3815cd..f372df9 100644
--- a/AudioManagerCore/src/CAmRoutingReceiver.cpp
+++ b/AudioManagerCore/src/CAmRoutingReceiver.cpp
@@ -30,50 +30,50 @@
#include "CAmDltWrapper.h"
#include "CAmSocketHandler.h"
-#define __METHOD_NAME__ std::string (std::string("CAmRoutingReceiver::") + __func__)
+#define __METHOD_NAME__ std::string(std::string("CAmRoutingReceiver::") + __func__)
namespace am
{
-CAmRoutingReceiver::CAmRoutingReceiver(IAmDatabaseHandler *iDatabaseHandler, CAmRoutingSender *iRoutingSender, CAmControlSender *iControlSender, CAmSocketHandler *iSocketHandler) :
- mpDatabaseHandler(iDatabaseHandler),
- mpRoutingSender(iRoutingSender),
- mpControlSender(iControlSender),
- mpSocketHandler(iSocketHandler),
- mpDBusWrapper(NULL),
- mListStartupHandles(),
- mListRundownHandles(),
- handleCount(0),
- mWaitStartup(false),
- mWaitRundown(false),
- mLastStartupError(E_OK),
- mLastRundownError(E_OK)
-{
- assert(mpDatabaseHandler!=NULL);
- assert(mpRoutingSender!=NULL);
- assert(mpControlSender!=NULL);
- assert(mpSocketHandler!=NULL);
-}
-
-CAmRoutingReceiver::CAmRoutingReceiver(IAmDatabaseHandler *iDatabaseHandler, CAmRoutingSender *iRoutingSender, CAmControlSender *iControlSender, CAmSocketHandler *iSocketHandler, CAmDbusWrapper *iDBusWrapper) :
- mpDatabaseHandler(iDatabaseHandler),
- mpRoutingSender(iRoutingSender),
- mpControlSender(iControlSender),
- mpSocketHandler(iSocketHandler),
- mpDBusWrapper(iDBusWrapper),
- mListStartupHandles(),
- mListRundownHandles(),
- handleCount(0),
- mWaitStartup(false),
- mWaitRundown(false),
- mLastStartupError(E_OK),
- mLastRundownError(E_OK)
-{
- assert(mpDatabaseHandler!=NULL);
- assert(mpRoutingSender!=NULL);
- assert(mpControlSender!=NULL);
- assert(mpSocketHandler!=NULL);
- assert(mpDBusWrapper!=NULL);
+CAmRoutingReceiver::CAmRoutingReceiver(IAmDatabaseHandler *iDatabaseHandler, CAmRoutingSender *iRoutingSender, CAmControlSender *iControlSender, CAmSocketHandler *iSocketHandler)
+ : mpDatabaseHandler(iDatabaseHandler)
+ , mpRoutingSender(iRoutingSender)
+ , mpControlSender(iControlSender)
+ , mpSocketHandler(iSocketHandler)
+ , mpDBusWrapper(NULL)
+ , mListStartupHandles()
+ , mListRundownHandles()
+ , handleCount(0)
+ , mWaitStartup(false)
+ , mWaitRundown(false)
+ , mLastStartupError(E_OK)
+ , mLastRundownError(E_OK)
+{
+ assert(mpDatabaseHandler != NULL);
+ assert(mpRoutingSender != NULL);
+ assert(mpControlSender != NULL);
+ assert(mpSocketHandler != NULL);
+}
+
+CAmRoutingReceiver::CAmRoutingReceiver(IAmDatabaseHandler *iDatabaseHandler, CAmRoutingSender *iRoutingSender, CAmControlSender *iControlSender, CAmSocketHandler *iSocketHandler, CAmDbusWrapper *iDBusWrapper)
+ : mpDatabaseHandler(iDatabaseHandler)
+ , mpRoutingSender(iRoutingSender)
+ , mpControlSender(iControlSender)
+ , mpSocketHandler(iSocketHandler)
+ , mpDBusWrapper(iDBusWrapper)
+ , mListStartupHandles()
+ , mListRundownHandles()
+ , handleCount(0)
+ , mWaitStartup(false)
+ , mWaitRundown(false)
+ , mLastStartupError(E_OK)
+ , mLastRundownError(E_OK)
+{
+ assert(mpDatabaseHandler != NULL);
+ assert(mpRoutingSender != NULL);
+ assert(mpControlSender != NULL);
+ assert(mpSocketHandler != NULL);
+ assert(mpDBusWrapper != NULL);
}
CAmRoutingReceiver::~CAmRoutingReceiver()
@@ -88,138 +88,142 @@ void CAmRoutingReceiver::handleCallback(const am_Handle_s handle, const am_Error
}
else
{
- mpRoutingSender->removeHandle(handle);
- }
+ mpRoutingSender->removeHandle(handle);
+ }
}
void CAmRoutingReceiver::ackConnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_Error_e error)
{
- logInfo(__METHOD_NAME__,"handle=",handle,"connectionID=",connectionID,"error=",error);
+ logInfo(__METHOD_NAME__, "handle=", handle, "connectionID=", connectionID, "error=", error);
if (error == am_Error_e::E_OK)
{
mpRoutingSender->writeToDatabaseAndRemove(handle);
}
else
{
- //only remove connection of handle was found
- if(mpRoutingSender->removeHandle(handle)==0)
- {
- mpDatabaseHandler->removeConnection(connectionID);
- mpRoutingSender->removeConnectionLookup(connectionID);
- }
+ // only remove connection of handle was found
+ if (mpRoutingSender->removeHandle(handle) == 0)
+ {
+ mpDatabaseHandler->removeConnection(connectionID);
+ mpRoutingSender->removeConnectionLookup(connectionID);
+ }
}
+
mpControlSender->cbAckConnect(handle, error);
}
void CAmRoutingReceiver::ackDisconnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_Error_e error)
{
- logInfo(__METHOD_NAME__,"handle=",handle,"connectionID=",connectionID,"error=",error);
- //only remove connection of handle was found
- if(mpRoutingSender->removeHandle(handle) == 0)
- {
- mpRoutingSender->removeConnectionLookup(connectionID);
- }
+ logInfo(__METHOD_NAME__, "handle=", handle, "connectionID=", connectionID, "error=", error);
+ // only remove connection of handle was found
+ if (mpRoutingSender->removeHandle(handle) == 0)
+ {
+ mpRoutingSender->removeConnectionLookup(connectionID);
+ }
+
mpControlSender->cbAckDisconnect(handle, error);
}
void CAmRoutingReceiver::ackSetSinkVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error)
{
- logInfo(__METHOD_NAME__,"handle=",handle,"volume=",volume,"error=",error);
- if(error == E_OK)
+ logInfo(__METHOD_NAME__, "handle=", handle, "volume=", volume, "error=", error);
+ if (error == E_OK)
{
- mpRoutingSender->checkVolume(handle,volume);
- }
-
- if (error== am_Error_e::E_OK || error== am_Error_e::E_ABORTED)
+ mpRoutingSender->checkVolume(handle, volume);
+ }
+
+ if (error == am_Error_e::E_OK || error == am_Error_e::E_ABORTED)
{
- mpRoutingSender->writeToDatabaseAndRemove(handle);
+ mpRoutingSender->writeToDatabaseAndRemove(handle);
}
else
{
- mpRoutingSender->removeHandle(handle);
- }
+ mpRoutingSender->removeHandle(handle);
+ }
+
mpControlSender->cbAckSetSinkVolumeChange(handle, volume, error);
}
void CAmRoutingReceiver::ackSetSourceVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error)
{
- logInfo(__METHOD_NAME__,"handle=",handle,"volume=",volume,"error=",error);
- if(error == E_OK)
+ logInfo(__METHOD_NAME__, "handle=", handle, "volume=", volume, "error=", error);
+ if (error == E_OK)
{
- mpRoutingSender->checkVolume(handle,volume);
+ mpRoutingSender->checkVolume(handle, volume);
}
- if (error== am_Error_e::E_OK || error== am_Error_e::E_ABORTED)
+ if (error == am_Error_e::E_OK || error == am_Error_e::E_ABORTED)
{
- mpRoutingSender->writeToDatabaseAndRemove(handle);
+ mpRoutingSender->writeToDatabaseAndRemove(handle);
}
else
{
- mpRoutingSender->removeHandle(handle);
- }
+ mpRoutingSender->removeHandle(handle);
+ }
+
mpControlSender->cbAckSetSourceVolumeChange(handle, volume, error);
}
void CAmRoutingReceiver::ackSetSourceState(const am_Handle_s handle, const am_Error_e error)
{
- logInfo(__METHOD_NAME__,"handle=",handle,"error=",error);
- handleCallback(handle,error);
+ logInfo(__METHOD_NAME__, "handle=", handle, "error=", error);
+ handleCallback(handle, error);
mpControlSender->cbAckSetSourceState(handle, error);
}
void CAmRoutingReceiver::ackSetSinkSoundProperty(const am_Handle_s handle, const am_Error_e error)
{
- logInfo(__METHOD_NAME__,"handle=",handle,"error=",error);
- handleCallback(handle,error);
+ logInfo(__METHOD_NAME__, "handle=", handle, "error=", error);
+ handleCallback(handle, error);
mpControlSender->cbAckSetSinkSoundProperty(handle, error);
}
void am::CAmRoutingReceiver::ackSetSinkSoundProperties(const am_Handle_s handle, const am_Error_e error)
{
- logInfo(__METHOD_NAME__,"handle=",handle,"error=",error);
- handleCallback(handle,error);
+ logInfo(__METHOD_NAME__, "handle=", handle, "error=", error);
+ handleCallback(handle, error);
mpControlSender->cbAckSetSinkSoundProperties(handle, error);
}
void CAmRoutingReceiver::ackSetSourceSoundProperty(const am_Handle_s handle, const am_Error_e error)
{
- logInfo(__METHOD_NAME__,"handle=",handle,"error=",error);
- handleCallback(handle,error);
+ logInfo(__METHOD_NAME__, "handle=", handle, "error=", error);
+ handleCallback(handle, error);
mpControlSender->cbAckSetSourceSoundProperty(handle, error);
}
void am::CAmRoutingReceiver::ackSetSourceSoundProperties(const am_Handle_s handle, const am_Error_e error)
{
- logInfo(__METHOD_NAME__,"handle=",handle,"error=",error);
- handleCallback(handle,error);
+ logInfo(__METHOD_NAME__, "handle=", handle, "error=", error);
+ handleCallback(handle, error);
mpControlSender->cbAckSetSourceSoundProperties(handle, error);
}
void CAmRoutingReceiver::ackCrossFading(const am_Handle_s handle, const am_HotSink_e hotSink, const am_Error_e error)
{
- logInfo(__METHOD_NAME__,"handle=",handle,"hotsink=",hotSink,"error=",error);
- handleCallback(handle,error);
+ logInfo(__METHOD_NAME__, "handle=", handle, "hotsink=", hotSink, "error=", error);
+ handleCallback(handle, error);
mpControlSender->cbAckCrossFade(handle, hotSink, error);
}
void CAmRoutingReceiver::ackSourceVolumeTick(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume)
{
- logInfo(__METHOD_NAME__,"handle=",handle,"sourceID=",sourceID,"volume=",volume);
+ logInfo(__METHOD_NAME__, "handle=", handle, "sourceID=", sourceID, "volume=", volume);
mpControlSender->hookSystemSourceVolumeTick(handle, sourceID, volume);
}
void CAmRoutingReceiver::ackSinkVolumeTick(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume)
{
- logInfo(__METHOD_NAME__,"handle=",handle,"sinkID=",sinkID,"volume=",volume);
+ logInfo(__METHOD_NAME__, "handle=", handle, "sinkID=", sinkID, "volume=", volume);
mpControlSender->hookSystemSinkVolumeTick(handle, sinkID, volume);
}
-am_Error_e CAmRoutingReceiver::peekDomain(const std::string & name, am_domainID_t & domainID)
-{
+am_Error_e CAmRoutingReceiver::peekDomain(const std::string &name, am_domainID_t &domainID)
+{
return (mpDatabaseHandler->peekDomain(name, domainID));
}
-am_Error_e CAmRoutingReceiver::registerDomain(const am_Domain_s & domainData, am_domainID_t & domainID)
+am_Error_e CAmRoutingReceiver::registerDomain(const am_Domain_s &domainData, am_domainID_t &domainID)
{
return (mpControlSender->hookSystemRegisterDomain(domainData, domainID));
}
@@ -229,14 +233,14 @@ am_Error_e CAmRoutingReceiver::deregisterDomain(const am_domainID_t domainID)
return (mpControlSender->hookSystemDeregisterDomain(domainID));
}
-am_Error_e CAmRoutingReceiver::registerGateway(const am_Gateway_s & gatewayData, am_gatewayID_t & gatewayID)
+am_Error_e CAmRoutingReceiver::registerGateway(const am_Gateway_s &gatewayData, am_gatewayID_t &gatewayID)
{
return (mpControlSender->hookSystemRegisterGateway(gatewayData, gatewayID));
}
-am_Error_e CAmRoutingReceiver::registerConverter(const am_Converter_s& converterData, am_converterID_t& converterID)
+am_Error_e CAmRoutingReceiver::registerConverter(const am_Converter_s &converterData, am_converterID_t &converterID)
{
- return (mpControlSender->hookSystemRegisterConverter(converterData, converterID));
+ return (mpControlSender->hookSystemRegisterConverter(converterData, converterID));
}
am_Error_e CAmRoutingReceiver::deregisterGateway(const am_gatewayID_t gatewayID)
@@ -244,17 +248,17 @@ am_Error_e CAmRoutingReceiver::deregisterGateway(const am_gatewayID_t gatewayID)
return (mpControlSender->hookSystemDeregisterGateway(gatewayID));
}
-am_Error_e CAmRoutingReceiver::deregisterConverter(const am_converterID_t converterID)
+am_Error_e CAmRoutingReceiver::deregisterConverter(const am_converterID_t converterID)
{
- return (mpControlSender->hookSystemDeregisterConverter(converterID));
+ return (mpControlSender->hookSystemDeregisterConverter(converterID));
}
-am_Error_e CAmRoutingReceiver::peekSink(const std::string& name, am_sinkID_t & sinkID)
+am_Error_e CAmRoutingReceiver::peekSink(const std::string &name, am_sinkID_t &sinkID)
{
return (mpDatabaseHandler->peekSink(name, sinkID));
}
-am_Error_e CAmRoutingReceiver::registerSink(const am_Sink_s & sinkData, am_sinkID_t & sinkID)
+am_Error_e CAmRoutingReceiver::registerSink(const am_Sink_s &sinkData, am_sinkID_t &sinkID)
{
return (mpControlSender->hookSystemRegisterSink(sinkData, sinkID));
}
@@ -264,12 +268,12 @@ am_Error_e CAmRoutingReceiver::deregisterSink(const am_sinkID_t sinkID)
return (mpControlSender->hookSystemDeregisterSink(sinkID));
}
-am_Error_e CAmRoutingReceiver::peekSource(const std::string & name, am_sourceID_t & sourceID)
+am_Error_e CAmRoutingReceiver::peekSource(const std::string &name, am_sourceID_t &sourceID)
{
return (mpDatabaseHandler->peekSource(name, sourceID));
}
-am_Error_e CAmRoutingReceiver::registerSource(const am_Source_s & sourceData, am_sourceID_t & sourceID)
+am_Error_e CAmRoutingReceiver::registerSource(const am_Source_s &sourceData, am_sourceID_t &sourceID)
{
return (mpControlSender->hookSystemRegisterSource(sourceData, sourceID));
}
@@ -279,7 +283,7 @@ am_Error_e CAmRoutingReceiver::deregisterSource(const am_sourceID_t sourceID)
return (mpControlSender->hookSystemDeregisterSource(sourceID));
}
-am_Error_e CAmRoutingReceiver::registerCrossfader(const am_Crossfader_s & crossfaderData, am_crossfaderID_t & crossfaderID)
+am_Error_e CAmRoutingReceiver::registerCrossfader(const am_Crossfader_s &crossfaderData, am_crossfaderID_t &crossfaderID)
{
return (mpControlSender->hookSystemRegisterCrossfader(crossfaderData, crossfaderID));
}
@@ -304,12 +308,12 @@ void CAmRoutingReceiver::hookDomainRegistrationComplete(const am_domainID_t doma
mpControlSender->hookSystemDomainRegistrationComplete(domainID);
}
-void CAmRoutingReceiver::hookSinkAvailablityStatusChange(const am_sinkID_t sinkID, const am_Availability_s & availability)
+void CAmRoutingReceiver::hookSinkAvailablityStatusChange(const am_sinkID_t sinkID, const am_Availability_s &availability)
{
mpControlSender->hookSystemSinkAvailablityStateChange(sinkID, availability);
}
-void CAmRoutingReceiver::hookSourceAvailablityStatusChange(const am_sourceID_t sourceID, const am_Availability_s & availability)
+void CAmRoutingReceiver::hookSourceAvailablityStatusChange(const am_sourceID_t sourceID, const am_Availability_s &availability)
{
mpControlSender->hookSystemSourceAvailablityStateChange(sourceID, availability);
}
@@ -322,157 +326,167 @@ void CAmRoutingReceiver::hookDomainStateChange(const am_domainID_t domainID, con
void CAmRoutingReceiver::hookTimingInformationChanged(const am_connectionID_t connectionID, const am_timeSync_t delay)
{
mpDatabaseHandler->changeConnectionTimingInformation(connectionID, delay);
- mpControlSender->hookSystemSingleTimingInformationChanged(connectionID,delay);
+ mpControlSender->hookSystemSingleTimingInformationChanged(connectionID, delay);
}
-void CAmRoutingReceiver::sendChangedData(const std::vector<am_EarlyData_s> & earlyData)
+void CAmRoutingReceiver::sendChangedData(const std::vector<am_EarlyData_s> &earlyData)
{
mpControlSender->hookSystemReceiveEarlyData(earlyData);
}
-am_Error_e CAmRoutingReceiver::peekSinkClassID(const std::string& name, am_sinkClass_t& sinkClassID)
+am_Error_e CAmRoutingReceiver::peekSinkClassID(const std::string &name, am_sinkClass_t &sinkClassID)
{
return (mpDatabaseHandler->peekSinkClassID(name, sinkClassID));
}
-am_Error_e CAmRoutingReceiver::peekSourceClassID(const std::string& name, am_sourceClass_t& sourceClassID)
+am_Error_e CAmRoutingReceiver::peekSourceClassID(const std::string &name, am_sourceClass_t &sourceClassID)
{
return (mpDatabaseHandler->peekSourceClassID(name, sourceClassID));
}
#ifdef WITH_DBUS_WRAPPER
-am_Error_e CAmRoutingReceiver::getDBusConnectionWrapper(CAmDbusWrapper *& dbusConnectionWrapper) const
+am_Error_e CAmRoutingReceiver::getDBusConnectionWrapper(CAmDbusWrapper * &dbusConnectionWrapper) const
{
dbusConnectionWrapper = mpDBusWrapper;
return (E_OK);
#else
-am_Error_e CAmRoutingReceiver::getDBusConnectionWrapper(CAmDbusWrapper *& ) const
+am_Error_e CAmRoutingReceiver::getDBusConnectionWrapper(CAmDbusWrapper * &) const
{
return (E_UNKNOWN);
-#endif
+#endif // ifdef WITH_DBUS_WRAPPER
}
-am_Error_e CAmRoutingReceiver::getSocketHandler(CAmSocketHandler *& socketHandler) const
+am_Error_e CAmRoutingReceiver::getSocketHandler(CAmSocketHandler * &socketHandler) const
{
socketHandler = mpSocketHandler;
return (E_OK);
}
-void CAmRoutingReceiver::getInterfaceVersion(std::string & version) const
+void CAmRoutingReceiver::getInterfaceVersion(std::string &version) const
{
version = RoutingVersion;
}
-void CAmRoutingReceiver::confirmRoutingReady(const uint16_t handle, const am_Error_e error)
+void CAmRoutingReceiver::confirmRoutingReady(const uint16_t handle, const am_Error_e error)
{
- if (error!=E_OK)
- mLastStartupError=error;
+ if (error != E_OK)
+ {
+ mLastStartupError = error;
+ }
+
mListStartupHandles.erase(std::remove(mListStartupHandles.begin(), mListStartupHandles.end(), handle), mListStartupHandles.end());
if (mWaitStartup && mListStartupHandles.empty())
+ {
mpControlSender->confirmRoutingReady(mLastStartupError);
+ }
}
void CAmRoutingReceiver::confirmRoutingRundown(const uint16_t handle, const am_Error_e error)
{
- if (error!=E_OK)
- mLastRundownError=error;
+ if (error != E_OK)
+ {
+ mLastRundownError = error;
+ }
+
mListRundownHandles.erase(std::remove(mListRundownHandles.begin(), mListRundownHandles.end(), handle), mListRundownHandles.end());
if (mWaitRundown && mListRundownHandles.empty())
+ {
mpControlSender->confirmRoutingRundown(mLastRundownError);
+ }
}
uint16_t am::CAmRoutingReceiver::getStartupHandle()
{
- uint16_t handle = ++handleCount; //todo: handle overflow
+ uint16_t handle = ++handleCount; // todo: handle overflow
mListStartupHandles.push_back(handle);
return (handle);
}
uint16_t am::CAmRoutingReceiver::getRundownHandle()
{
- uint16_t handle = ++handleCount; //todo: handle overflow
+ uint16_t handle = ++handleCount; // todo: handle overflow
mListRundownHandles.push_back(handle);
return (handle);
}
void am::CAmRoutingReceiver::waitOnStartup(bool startup)
{
- mWaitStartup = startup;
- mLastStartupError=E_OK;
+ mWaitStartup = startup;
+ mLastStartupError = E_OK;
}
void CAmRoutingReceiver::ackSinkNotificationConfiguration(const am_Handle_s handle, const am_Error_e error)
{
- logInfo(__METHOD_NAME__,"handle=",handle,"error=",error);
- handleCallback(handle,error);
- mpControlSender->cbAckSetSinkNotificationConfiguration(handle,error);
+ logInfo(__METHOD_NAME__, "handle=", handle, "error=", error);
+ handleCallback(handle, error);
+ mpControlSender->cbAckSetSinkNotificationConfiguration(handle, error);
}
void CAmRoutingReceiver::ackSourceNotificationConfiguration(const am_Handle_s handle, const am_Error_e error)
{
- logInfo(__METHOD_NAME__,"handle=",handle,"error=",error);
- handleCallback(handle,error);
- mpControlSender->cbAckSetSourceNotificationConfiguration(handle,error);
+ logInfo(__METHOD_NAME__, "handle=", handle, "error=", error);
+ handleCallback(handle, error);
+ mpControlSender->cbAckSetSourceNotificationConfiguration(handle, error);
}
-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)
+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)
{
- return (mpControlSender->hookSystemUpdateGateway(gatewayID,listSourceFormats,listSinkFormats,convertionMatrix));
+ return (mpControlSender->hookSystemUpdateGateway(gatewayID, listSourceFormats, listSinkFormats, convertionMatrix));
}
-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)
+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)
{
- return (mpControlSender->hookSystemUpdateConverter(converterID,listSourceFormats,listSinkFormats,convertionMatrix));
+ return (mpControlSender->hookSystemUpdateConverter(converterID, listSourceFormats, listSinkFormats, convertionMatrix));
}
-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)
+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)
{
- return (mpControlSender->hookSystemUpdateSink(sinkID,sinkClassID,listSoundProperties,listConnectionFormats,listMainSoundProperties));
+ return (mpControlSender->hookSystemUpdateSink(sinkID, sinkClassID, listSoundProperties, listConnectionFormats, listMainSoundProperties));
}
-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)
+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)
{
- return (mpControlSender->hookSystemUpdateSource(sourceID,sourceClassID,listSoundProperties,listConnectionFormats,listMainSoundProperties));
+ return (mpControlSender->hookSystemUpdateSource(sourceID, sourceClassID, listSoundProperties, listConnectionFormats, listMainSoundProperties));
}
-void CAmRoutingReceiver::ackSetVolumes(const am_Handle_s handle, const std::vector<am_Volumes_s>& listvolumes, const am_Error_e error)
+void CAmRoutingReceiver::ackSetVolumes(const am_Handle_s handle, const std::vector<am_Volumes_s> &listvolumes, const am_Error_e error)
{
- logInfo(__METHOD_NAME__,"handle=",handle,"error=",error);
- handleCallback(handle,error);
- mpControlSender->cbAckSetVolume(handle,listvolumes,error);
+ logInfo(__METHOD_NAME__, "handle=", handle, "error=", error);
+ handleCallback(handle, error);
+ mpControlSender->cbAckSetVolume(handle, listvolumes, error);
}
-void CAmRoutingReceiver::hookSinkNotificationDataChange(const am_sinkID_t sinkID, const am_NotificationPayload_s& payload)
+void CAmRoutingReceiver::hookSinkNotificationDataChange(const am_sinkID_t sinkID, const am_NotificationPayload_s &payload)
{
- logInfo(__METHOD_NAME__,"sinkID=",sinkID,"type=",payload.type,"notificationValue=",payload.value);
- mpControlSender->hookSinkNotificationDataChanged(sinkID,payload);
+ logInfo(__METHOD_NAME__, "sinkID=", sinkID, "type=", payload.type, "notificationValue=", payload.value);
+ mpControlSender->hookSinkNotificationDataChanged(sinkID, payload);
}
-void CAmRoutingReceiver::hookSourceNotificationDataChange(const am_sourceID_t sourceID, const am_NotificationPayload_s& payload)
+void CAmRoutingReceiver::hookSourceNotificationDataChange(const am_sourceID_t sourceID, const am_NotificationPayload_s &payload)
{
- logInfo(__METHOD_NAME__,"sinkID=",sourceID,"type=",payload.type,"notificationValue=",payload.value);
- mpControlSender->hookSourceNotificationDataChanged(sourceID,payload);
+ logInfo(__METHOD_NAME__, "sinkID=", sourceID, "type=", payload.type, "notificationValue=", payload.value);
+ mpControlSender->hookSourceNotificationDataChanged(sourceID, payload);
}
-am_Error_e CAmRoutingReceiver::getDomainOfSink(const am_sinkID_t sinkID, am_domainID_t& domainID) const
+am_Error_e CAmRoutingReceiver::getDomainOfSink(const am_sinkID_t sinkID, am_domainID_t &domainID) const
{
- return (mpDatabaseHandler->getDomainOfSink(sinkID,domainID));
+ return (mpDatabaseHandler->getDomainOfSink(sinkID, domainID));
}
-am_Error_e CAmRoutingReceiver::getDomainOfSource(const am_sourceID_t sourceID, am_domainID_t& domainID) const
+am_Error_e CAmRoutingReceiver::getDomainOfSource(const am_sourceID_t sourceID, am_domainID_t &domainID) const
{
- return (mpDatabaseHandler->getDomainOfSource(sourceID,domainID));
+ return (mpDatabaseHandler->getDomainOfSource(sourceID, domainID));
}
-am_Error_e CAmRoutingReceiver::getDomainOfCrossfader(const am_crossfaderID_t crossfader, am_domainID_t& domainID) const
+am_Error_e CAmRoutingReceiver::getDomainOfCrossfader(const am_crossfaderID_t crossfader, am_domainID_t &domainID) const
{
- return (mpDatabaseHandler->getDomainOfCrossfader(crossfader,domainID));
+ return (mpDatabaseHandler->getDomainOfCrossfader(crossfader, domainID));
}
void CAmRoutingReceiver::waitOnRundown(bool rundown)
{
- mWaitRundown = rundown;
- mLastRundownError=E_OK;
+ mWaitRundown = rundown;
+ mLastRundownError = E_OK;
}
}