diff options
24 files changed, 818 insertions, 923 deletions
diff --git a/AudioManagerDaemon/include/CAmCommandReceiver.h b/AudioManagerDaemon/include/CAmCommandReceiver.h index fc27df7..ebb8eff 100644 --- a/AudioManagerDaemon/include/CAmCommandReceiver.h +++ b/AudioManagerDaemon/include/CAmCommandReceiver.h @@ -22,7 +22,7 @@ #ifndef COMMANDRECEIVER_H_ #define COMMANDRECEIVER_H_ -#include "command/IAmCommandReceive.h" +#include "IAmCommand.h" namespace am { diff --git a/AudioManagerDaemon/include/CAmCommandSender.h b/AudioManagerDaemon/include/CAmCommandSender.h index 78858f9..db9ca50 100644 --- a/AudioManagerDaemon/include/CAmCommandSender.h +++ b/AudioManagerDaemon/include/CAmCommandSender.h @@ -26,7 +26,7 @@ #include "../test/IAmCommandBackdoor.h" //we need this for the unit test #endif -#include "command/IAmCommandSend.h" +#include "IAmCommand.h" namespace am { diff --git a/AudioManagerDaemon/include/CAmControlReceiver.h b/AudioManagerDaemon/include/CAmControlReceiver.h index 2a30108..6d18533 100644 --- a/AudioManagerDaemon/include/CAmControlReceiver.h +++ b/AudioManagerDaemon/include/CAmControlReceiver.h @@ -22,7 +22,7 @@ #ifndef CONTRONLRECEIVER_H_ #define CONTRONLRECEIVER_H_ -#include "control/IAmControlReceive.h" +#include "IAmControl.h" namespace am { diff --git a/AudioManagerDaemon/include/CAmControlSender.h b/AudioManagerDaemon/include/CAmControlSender.h index fe43fe3..cedcfe0 100644 --- a/AudioManagerDaemon/include/CAmControlSender.h +++ b/AudioManagerDaemon/include/CAmControlSender.h @@ -26,7 +26,7 @@ #include "../test/IAmControlBackdoor.h" #endif -#include "control/IAmControlSend.h" +#include "IAmControl.h" #include "CAmSocketHandler.h" #include "unistd.h" @@ -106,6 +106,7 @@ public: void hookSystemNodeApplicationModeChanged(const NsmApplicationMode_e ApplicationModeId) ; void hookSystemSessionStateChanged(const std::string& sessionName, const NsmSeat_e seatID, const NsmSessionState_e sessionStateID) ; NsmErrorStatus_e hookSystemLifecycleRequest(const uint32_t Request, const uint32_t RequestId) ; + void hookSystemSingleTimingInformationChanged(const am_connectionID_t connectionID, const am_timeSync_t time); void receiverCallback(const pollfd pollfd, const sh_pollHandle_t handle, void* userData); bool checkerCallback(const sh_pollHandle_t handle, void* userData); diff --git a/AudioManagerDaemon/include/CAmRoutingReceiver.h b/AudioManagerDaemon/include/CAmRoutingReceiver.h index c81fd50..f69599f 100644 --- a/AudioManagerDaemon/include/CAmRoutingReceiver.h +++ b/AudioManagerDaemon/include/CAmRoutingReceiver.h @@ -22,7 +22,7 @@ #ifndef ROUTINGRECEIVER_H_ #define ROUTINGRECEIVER_H_ -#include "routing/IAmRoutingReceive.h" +#include "IAmRouting.h" namespace am { diff --git a/AudioManagerDaemon/include/CAmRoutingSender.h b/AudioManagerDaemon/include/CAmRoutingSender.h index d19141d..a3af312 100644 --- a/AudioManagerDaemon/include/CAmRoutingSender.h +++ b/AudioManagerDaemon/include/CAmRoutingSender.h @@ -22,7 +22,7 @@ #ifndef ROUTINGSENDER_H_ #define ROUTINGSENDER_H_ -#include "routing/IAmRoutingSend.h" +#include "IAmRouting.h" #include <map> #ifdef UNIT_TEST //this is needed to test RoutingSender diff --git a/AudioManagerDaemon/src/CAmCommandReceiver.cpp b/AudioManagerDaemon/src/CAmCommandReceiver.cpp index 43ccd20..0453e3d 100644 --- a/AudioManagerDaemon/src/CAmCommandReceiver.cpp +++ b/AudioManagerDaemon/src/CAmCommandReceiver.cpp @@ -185,7 +185,7 @@ am_Error_e CAmCommandReceiver::getSocketHandler(CAmSocketHandler *& socketHandle void CAmCommandReceiver::getInterfaceVersion(std::string & version) const { - version = CommandReceiveVersion; + version = CommandVersion; } void CAmCommandReceiver::confirmCommandReady(const uint16_t handle, const am_Error_e error) diff --git a/AudioManagerDaemon/src/CAmCommandSender.cpp b/AudioManagerDaemon/src/CAmCommandSender.cpp index 3882162..d864981 100644 --- a/AudioManagerDaemon/src/CAmCommandSender.cpp +++ b/AudioManagerDaemon/src/CAmCommandSender.cpp @@ -305,7 +305,7 @@ void CAmCommandSender::setCommandRundown() void CAmCommandSender::getInterfaceVersion(std::string & version) const { - version = CommandSendVersion; + version = CommandVersion; } am_Error_e am::CAmCommandSender::getListPlugins(std::vector<std::string> & interfaces) const diff --git a/AudioManagerDaemon/src/CAmControlReceiver.cpp b/AudioManagerDaemon/src/CAmControlReceiver.cpp index 19b05bd..de529fc 100644 --- a/AudioManagerDaemon/src/CAmControlReceiver.cpp +++ b/AudioManagerDaemon/src/CAmControlReceiver.cpp @@ -494,7 +494,7 @@ void CAmControlReceiver::setRoutingRundown() void CAmControlReceiver::getInterfaceVersion(std::string & version) const { - version = ControlReceiveVersion; + version = ControlVersion; } am_Error_e CAmControlReceiver::changeSourceDB(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) diff --git a/AudioManagerDaemon/src/CAmControlSender.cpp b/AudioManagerDaemon/src/CAmControlSender.cpp index bc51be0..66e710b 100644 --- a/AudioManagerDaemon/src/CAmControlSender.cpp +++ b/AudioManagerDaemon/src/CAmControlSender.cpp @@ -369,7 +369,7 @@ am_Error_e am::CAmControlSender::getConnectionFormatChoice(const am_sourceID_t s void CAmControlSender::getInterfaceVersion(std::string & version) const { - version = ControlSendVersion; + version = ControlVersion; } void CAmControlSender::confirmCommandReady(const am_Error_e error) @@ -501,6 +501,12 @@ NsmErrorStatus_e CAmControlSender::hookSystemLifecycleRequest(const uint32_t Req return (mController->hookSystemLifecycleRequest(Request,RequestId)); } +void CAmControlSender::hookSystemSingleTimingInformationChanged(const am_connectionID_t connectionID, const am_timeSync_t time) +{ + assert(mController); + mController->hookSystemSingleTimingInformationChanged(connectionID,time); +} + /**for testing only contructor - do not use ! * */ @@ -525,3 +531,5 @@ bool CAmControlSender::dispatcherCallback(const sh_pollHandle_t handle, void* us } } + + diff --git a/AudioManagerDaemon/src/CAmRoutingReceiver.cpp b/AudioManagerDaemon/src/CAmRoutingReceiver.cpp index c36cde7..91a1bc4 100644 --- a/AudioManagerDaemon/src/CAmRoutingReceiver.cpp +++ b/AudioManagerDaemon/src/CAmRoutingReceiver.cpp @@ -321,6 +321,7 @@ 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); } void CAmRoutingReceiver::sendChangedData(const std::vector<am_EarlyData_s> & earlyData) @@ -358,7 +359,7 @@ am_Error_e CAmRoutingReceiver::getSocketHandler(CAmSocketHandler *& socketHandle void CAmRoutingReceiver::getInterfaceVersion(std::string & version) const { - version = RoutingReceiveVersion; + version = RoutingVersion; } void CAmRoutingReceiver::confirmRoutingReady(const uint16_t handle, const am_Error_e error) @@ -489,7 +490,7 @@ am_Error_e CAmRoutingReceiver::getDomainOfSource(const am_sourceID_t sourceID, a return mpDatabaseHandler->getDomainOfSource(sourceID,domainID); } -void am::CAmRoutingReceiver::waitOnRundown(bool rundown) +void CAmRoutingReceiver::waitOnRundown(bool rundown) { mWaitRundown = rundown; mLastRundownError=E_OK; diff --git a/AudioManagerDaemon/src/CAmRoutingSender.cpp b/AudioManagerDaemon/src/CAmRoutingSender.cpp index 77f12d0..a064e53 100644 --- a/AudioManagerDaemon/src/CAmRoutingSender.cpp +++ b/AudioManagerDaemon/src/CAmRoutingSender.cpp @@ -729,6 +729,6 @@ am_Error_e CAmRoutingSender::getListPlugins(std::vector<std::string>& interfaces void CAmRoutingSender::getInterfaceVersion(std::string & version) const { - version = RoutingSendVersion; + version = RoutingVersion; } } diff --git a/AudioManagerDaemon/test/IAmCommandBackdoor.h b/AudioManagerDaemon/test/IAmCommandBackdoor.h index 33aef19..35a0c0a 100644 --- a/AudioManagerDaemon/test/IAmCommandBackdoor.h +++ b/AudioManagerDaemon/test/IAmCommandBackdoor.h @@ -21,7 +21,7 @@ #ifndef COMMANDINTERFACEBACKDOOR_H_ #define COMMANDINTERFACEBACKDOOR_H_ -#include <command/IAmCommandSend.h> +#include <IAmCommand.h> #include "CAmCommandSender.h" namespace am diff --git a/AudioManagerDaemon/test/IAmControlBackdoor.h b/AudioManagerDaemon/test/IAmControlBackdoor.h index 1c006f0..7e1845e 100644 --- a/AudioManagerDaemon/test/IAmControlBackdoor.h +++ b/AudioManagerDaemon/test/IAmControlBackdoor.h @@ -21,7 +21,7 @@ #ifndef CONTROLINTERFACEBACKDOOR_H_ #define CONTROLINTERFACEBACKDOOR_H_ -#include "control/IAmControlSend.h" +#include "IAmControl.h" #include "CAmControlSender.h" namespace am diff --git a/AudioManagerDaemon/test/MockIAmCommandSend.h b/AudioManagerDaemon/test/MockIAmCommandSend.h index 8d1c17f..0c8558e 100644 --- a/AudioManagerDaemon/test/MockIAmCommandSend.h +++ b/AudioManagerDaemon/test/MockIAmCommandSend.h @@ -21,7 +21,7 @@ #ifndef MOCKCOMMANDINTERFACE_H_ #define MOCKCOMMANDINTERFACE_H_ -#include "command/IAmCommandSend.h" +#include "IAmCommand.h" #include "gtest/gtest.h" #include "gmock/gmock.h" diff --git a/AudioManagerDaemon/test/MockIAmControlSend.h b/AudioManagerDaemon/test/MockIAmControlSend.h index 219a7f1..29a6bb7 100644 --- a/AudioManagerDaemon/test/MockIAmControlSend.h +++ b/AudioManagerDaemon/test/MockIAmControlSend.h @@ -21,7 +21,7 @@ #ifndef MOCKCONTROLINTERFACE_H_ #define MOCKCONTROLINTERFACE_H_ -#include "control/IAmControlSend.h" +#include "IAmControl.h" #include "gtest/gtest.h" #include "gmock/gmock.h" @@ -29,136 +29,138 @@ namespace am { class MockIAmControlSend : public IAmControlSend { public: - MOCK_CONST_METHOD1(getInterfaceVersion, - void(std::string& version)); - MOCK_METHOD1(startupController, - am_Error_e(IAmControlReceive* controlreceiveinterface)); - MOCK_METHOD0(setControllerReady, - void()); - MOCK_METHOD1(setControllerRundown, - void(const int16_t signal)); - MOCK_METHOD3(hookUserConnectionRequest, - am_Error_e(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID)); - MOCK_METHOD1(hookUserDisconnectionRequest, - am_Error_e(const am_mainConnectionID_t connectionID)); - MOCK_METHOD2(hookUserSetMainSinkSoundProperty, - am_Error_e(const am_sinkID_t sinkID, const am_MainSoundProperty_s& soundProperty)); - MOCK_METHOD2(hookUserSetMainSourceSoundProperty, - am_Error_e(const am_sourceID_t sourceID, const am_MainSoundProperty_s& soundProperty)); - MOCK_METHOD1(hookUserSetSystemProperty, - am_Error_e(const am_SystemProperty_s& property)); - MOCK_METHOD2(hookUserVolumeChange, - am_Error_e(const am_sinkID_t SinkID, const am_mainVolume_t newVolume)); - MOCK_METHOD2(hookUserVolumeStep, - am_Error_e(const am_sinkID_t SinkID, const int16_t increment)); - MOCK_METHOD2(hookUserSetSinkMuteState, - am_Error_e(const am_sinkID_t sinkID, const am_MuteState_e muteState)); - MOCK_METHOD2(hookSystemRegisterDomain, - am_Error_e(const am_Domain_s& domainData, am_domainID_t& domainID)); - MOCK_METHOD1(hookSystemDeregisterDomain, - am_Error_e(const am_domainID_t domainID)); - MOCK_METHOD1(hookSystemDomainRegistrationComplete, - void(const am_domainID_t domainID)); - MOCK_METHOD2(hookSystemRegisterSink, - am_Error_e(const am_Sink_s& sinkData, am_sinkID_t& sinkID)); - MOCK_METHOD1(hookSystemDeregisterSink, - am_Error_e(const am_sinkID_t sinkID)); - MOCK_METHOD2(hookSystemRegisterSource, - am_Error_e(const am_Source_s& sourceData, am_sourceID_t& sourceID)); - MOCK_METHOD1(hookSystemDeregisterSource, - am_Error_e(const am_sourceID_t sourceID)); - MOCK_METHOD2(hookSystemRegisterGateway, - am_Error_e(const am_Gateway_s& gatewayData, am_gatewayID_t& gatewayID)); - MOCK_METHOD1(hookSystemDeregisterGateway, - am_Error_e(const am_gatewayID_t gatewayID)); - MOCK_METHOD2(hookSystemRegisterConverter, - am_Error_e(const am_Converter_s& converterData, am_converterID_t& converterID)); - MOCK_METHOD1(hookSystemDeregisterConverter, - am_Error_e(const am_converterID_t converterID)); - MOCK_METHOD2(hookSystemRegisterCrossfader, - am_Error_e(const am_Crossfader_s& crossfaderData, am_crossfaderID_t& crossfaderID)); - MOCK_METHOD1(hookSystemDeregisterCrossfader, - am_Error_e(const am_crossfaderID_t crossfaderID)); - MOCK_METHOD3(hookSystemSinkVolumeTick, - void(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume)); - MOCK_METHOD3(hookSystemSourceVolumeTick, - void(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume)); - MOCK_METHOD2(hookSystemInterruptStateChange, - void(const am_sourceID_t sourceID, const am_InterruptState_e interruptState)); - MOCK_METHOD2(hookSystemSinkAvailablityStateChange, - void(const am_sinkID_t sinkID, const am_Availability_s& availability)); - MOCK_METHOD2(hookSystemSourceAvailablityStateChange, - void(const am_sourceID_t sourceID, const am_Availability_s& availability)); - MOCK_METHOD2(hookSystemDomainStateChange, - void(const am_domainID_t domainID, const am_DomainState_e state)); - MOCK_METHOD1(hookSystemReceiveEarlyData, - void(const std::vector<am_EarlyData_s>& data)); - MOCK_METHOD1(hookSystemSpeedChange, - void(const am_speed_t speed)); - MOCK_METHOD2(hookSystemTimingInformationChanged, - void(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time)); - MOCK_METHOD2(cbAckConnect, - void(const am_Handle_s handle, const am_Error_e errorID)); - MOCK_METHOD2(cbAckDisconnect, - void(const am_Handle_s handle, const am_Error_e errorID)); - MOCK_METHOD3(cbAckCrossFade, - void(const am_Handle_s handle, const am_HotSink_e hostsink, const am_Error_e error)); - MOCK_METHOD3(cbAckSetSinkVolumeChange, - void(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error)); - MOCK_METHOD3(cbAckSetSourceVolumeChange, - void(const am_Handle_s handle, const am_volume_t voulme, const am_Error_e error)); - MOCK_METHOD2(cbAckSetSourceState, - void(const am_Handle_s handle, const am_Error_e error)); - MOCK_METHOD2(cbAckSetSourceSoundProperties, - void(const am_Handle_s handle, const am_Error_e error)); - MOCK_METHOD2(cbAckSetSourceSoundProperty, - void(const am_Handle_s handle, const am_Error_e error)); - MOCK_METHOD2(cbAckSetSinkSoundProperties, - void(const am_Handle_s handle, const am_Error_e error)); - MOCK_METHOD2(cbAckSetSinkSoundProperty, - void(const am_Handle_s handle, const am_Error_e error)); - MOCK_METHOD5(getConnectionFormatChoice, - am_Error_e(const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_Route_s listRoute, const std::vector<am_CustomAvailabilityReason_t> listPossibleConnectionFormats, std::vector<am_CustomAvailabilityReason_t>& listPrioConnectionFormats)); - MOCK_METHOD1(confirmCommandReady, - void(const am_Error_e error)); - MOCK_METHOD1(confirmRoutingReady, - void(const am_Error_e error)); - MOCK_METHOD1(confirmCommandRundown, - void(const am_Error_e error)); - MOCK_METHOD1(confirmRoutingRundown, - void(const am_Error_e error)); - MOCK_METHOD5(hookSystemUpdateSink, - am_Error_e(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_CustomAvailabilityReason_t>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties)); - MOCK_METHOD5(hookSystemUpdateSource, - am_Error_e(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_CustomAvailabilityReason_t>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties)); - MOCK_METHOD4(hookSystemUpdateGateway, - am_Error_e(const am_gatewayID_t gatewayID, const std::vector<am_CustomAvailabilityReason_t>& listSourceConnectionFormats, const std::vector<am_CustomAvailabilityReason_t>& listSinkConnectionFormats, const std::vector<bool>& convertionMatrix)); - MOCK_METHOD4(hookSystemUpdateConverter, - am_Error_e(const am_converterID_t converterID, const std::vector<am_CustomAvailabilityReason_t>& listSourceConnectionFormats, const std::vector<am_CustomAvailabilityReason_t>& listSinkConnectionFormats, const std::vector<bool>& convertionMatrix)); - MOCK_METHOD3(cbAckSetVolumes, - void(const am_Handle_s handle, const std::vector<am_Volumes_s>& listVolumes, const am_Error_e error)); - MOCK_METHOD2(cbAckSetSinkNotificationConfiguration, - void(const am_Handle_s handle, const am_Error_e error)); - MOCK_METHOD2(cbAckSetSourceNotificationConfiguration, - void(const am_Handle_s handle, const am_Error_e error)); - MOCK_METHOD2(hookSinkNotificationDataChanged, - void(const am_sinkID_t sinkID, const am_NotificationPayload_s& payload)); - MOCK_METHOD2(hookSourceNotificationDataChanged, - void(const am_sourceID_t sourceID, const am_NotificationPayload_s& payload)); - MOCK_METHOD2(hookUserSetMainSinkNotificationConfiguration, - am_Error_e(const am_sinkID_t sinkID, const am_NotificationConfiguration_s& notificationConfiguration)); - MOCK_METHOD2(hookUserSetMainSourceNotificationConfiguration, - am_Error_e(const am_sourceID_t sourceID, const am_NotificationConfiguration_s& notificationConfiguration)); - MOCK_METHOD1(hookSystemNodeStateChanged, - void(const NsmNodeState_e NodeStateId)); - MOCK_METHOD1(hookSystemNodeApplicationModeChanged, - void(const NsmApplicationMode_e ApplicationModeId)); - MOCK_METHOD3(hookSystemSessionStateChanged, - void(const std::string& sessionName, const NsmSeat_e seatID, const NsmSessionState_e sessionStateID)); - MOCK_METHOD2(hookSystemLifecycleRequest, - NsmErrorStatus_e(const uint32_t Request, const uint32_t RequestId)); - + MOCK_CONST_METHOD1(getInterfaceVersion, + void(std::string& version)); + MOCK_METHOD1(startupController, + am_Error_e(IAmControlReceive* controlreceiveinterface)); + MOCK_METHOD0(setControllerReady, + void()); + MOCK_METHOD1(setControllerRundown, + void(const int16_t signal)); + MOCK_METHOD3(hookUserConnectionRequest, + am_Error_e(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID)); + MOCK_METHOD1(hookUserDisconnectionRequest, + am_Error_e(const am_mainConnectionID_t connectionID)); + MOCK_METHOD2(hookUserSetMainSinkSoundProperty, + am_Error_e(const am_sinkID_t sinkID, const am_MainSoundProperty_s& soundProperty)); + MOCK_METHOD2(hookUserSetMainSourceSoundProperty, + am_Error_e(const am_sourceID_t sourceID, const am_MainSoundProperty_s& soundProperty)); + MOCK_METHOD1(hookUserSetSystemProperty, + am_Error_e(const am_SystemProperty_s& property)); + MOCK_METHOD2(hookUserVolumeChange, + am_Error_e(const am_sinkID_t SinkID, const am_mainVolume_t newVolume)); + MOCK_METHOD2(hookUserVolumeStep, + am_Error_e(const am_sinkID_t SinkID, const int16_t increment)); + MOCK_METHOD2(hookUserSetSinkMuteState, + am_Error_e(const am_sinkID_t sinkID, const am_MuteState_e muteState)); + MOCK_METHOD2(hookSystemRegisterDomain, + am_Error_e(const am_Domain_s& domainData, am_domainID_t& domainID)); + MOCK_METHOD1(hookSystemDeregisterDomain, + am_Error_e(const am_domainID_t domainID)); + MOCK_METHOD1(hookSystemDomainRegistrationComplete, + void(const am_domainID_t domainID)); + MOCK_METHOD2(hookSystemRegisterSink, + am_Error_e(const am_Sink_s& sinkData, am_sinkID_t& sinkID)); + MOCK_METHOD1(hookSystemDeregisterSink, + am_Error_e(const am_sinkID_t sinkID)); + MOCK_METHOD2(hookSystemRegisterSource, + am_Error_e(const am_Source_s& sourceData, am_sourceID_t& sourceID)); + MOCK_METHOD1(hookSystemDeregisterSource, + am_Error_e(const am_sourceID_t sourceID)); + MOCK_METHOD2(hookSystemRegisterConverter, + am_Error_e(const am_Converter_s& converterData, am_converterID_t& converterID)); + MOCK_METHOD2(hookSystemRegisterGateway, + am_Error_e(const am_Gateway_s& gatewayData, am_gatewayID_t& gatewayID)); + MOCK_METHOD1(hookSystemDeregisterConverter, + am_Error_e(const am_converterID_t converterID)); + MOCK_METHOD1(hookSystemDeregisterGateway, + am_Error_e(const am_gatewayID_t gatewayID)); + MOCK_METHOD2(hookSystemRegisterCrossfader, + am_Error_e(const am_Crossfader_s& crossfaderData, am_crossfaderID_t& crossfaderID)); + MOCK_METHOD1(hookSystemDeregisterCrossfader, + am_Error_e(const am_crossfaderID_t crossfaderID)); + MOCK_METHOD3(hookSystemSinkVolumeTick, + void(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume)); + MOCK_METHOD3(hookSystemSourceVolumeTick, + void(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume)); + MOCK_METHOD2(hookSystemInterruptStateChange, + void(const am_sourceID_t sourceID, const am_InterruptState_e interruptState)); + MOCK_METHOD2(hookSystemSinkAvailablityStateChange, + void(const am_sinkID_t sinkID, const am_Availability_s& availability)); + MOCK_METHOD2(hookSystemSourceAvailablityStateChange, + void(const am_sourceID_t sourceID, const am_Availability_s& availability)); + MOCK_METHOD2(hookSystemDomainStateChange, + void(const am_domainID_t domainID, const am_DomainState_e state)); + MOCK_METHOD1(hookSystemReceiveEarlyData, + void(const std::vector<am_EarlyData_s>& data)); + MOCK_METHOD1(hookSystemSpeedChange, + void(const am_speed_t speed)); + MOCK_METHOD2(hookSystemTimingInformationChanged, + void(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time)); + MOCK_METHOD2(cbAckConnect, + void(const am_Handle_s handle, const am_Error_e errorID)); + MOCK_METHOD2(cbAckDisconnect, + void(const am_Handle_s handle, const am_Error_e errorID)); + MOCK_METHOD3(cbAckCrossFade, + void(const am_Handle_s handle, const am_HotSink_e hostsink, const am_Error_e error)); + MOCK_METHOD3(cbAckSetSinkVolumeChange, + void(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error)); + MOCK_METHOD3(cbAckSetSourceVolumeChange, + void(const am_Handle_s handle, const am_volume_t voulme, const am_Error_e error)); + MOCK_METHOD2(cbAckSetSourceState, + void(const am_Handle_s handle, const am_Error_e error)); + MOCK_METHOD2(cbAckSetSourceSoundProperties, + void(const am_Handle_s handle, const am_Error_e error)); + MOCK_METHOD2(cbAckSetSourceSoundProperty, + void(const am_Handle_s handle, const am_Error_e error)); + MOCK_METHOD2(cbAckSetSinkSoundProperties, + void(const am_Handle_s handle, const am_Error_e error)); + MOCK_METHOD2(cbAckSetSinkSoundProperty, + void(const am_Handle_s handle, const am_Error_e error)); + MOCK_METHOD5(getConnectionFormatChoice, + am_Error_e(const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_Route_s listRoute, const std::vector<am_CustomConnectionFormat_t> listPossibleConnectionFormats, std::vector<am_CustomConnectionFormat_t>& listPrioConnectionFormats)); + MOCK_METHOD1(confirmCommandReady, + void(const am_Error_e error)); + MOCK_METHOD1(confirmRoutingReady, + void(const am_Error_e error)); + MOCK_METHOD1(confirmCommandRundown, + void(const am_Error_e error)); + MOCK_METHOD1(confirmRoutingRundown, + void(const am_Error_e error)); + MOCK_METHOD5(hookSystemUpdateSink, + am_Error_e(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)); + MOCK_METHOD5(hookSystemUpdateSource, + am_Error_e(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)); + MOCK_METHOD4(hookSystemUpdateConverter, + am_Error_e(const am_converterID_t converterID, const std::vector<am_CustomConnectionFormat_t>& listSourceConnectionFormats, const std::vector<am_CustomConnectionFormat_t>& listSinkConnectionFormats, const std::vector<bool>& convertionMatrix)); + MOCK_METHOD4(hookSystemUpdateGateway, + am_Error_e(const am_gatewayID_t gatewayID, const std::vector<am_CustomConnectionFormat_t>& listSourceConnectionFormats, const std::vector<am_CustomConnectionFormat_t>& listSinkConnectionFormats, const std::vector<bool>& convertionMatrix)); + MOCK_METHOD3(cbAckSetVolumes, + void(const am_Handle_s handle, const std::vector<am_Volumes_s>& listVolumes, const am_Error_e error)); + MOCK_METHOD2(cbAckSetSinkNotificationConfiguration, + void(const am_Handle_s handle, const am_Error_e error)); + MOCK_METHOD2(cbAckSetSourceNotificationConfiguration, + void(const am_Handle_s handle, const am_Error_e error)); + MOCK_METHOD2(hookSinkNotificationDataChanged, + void(const am_sinkID_t sinkID, const am_NotificationPayload_s& payload)); + MOCK_METHOD2(hookSourceNotificationDataChanged, + void(const am_sourceID_t sourceID, const am_NotificationPayload_s& payload)); + MOCK_METHOD2(hookUserSetMainSinkNotificationConfiguration, + am_Error_e(const am_sinkID_t sinkID, const am_NotificationConfiguration_s& notificationConfiguration)); + MOCK_METHOD2(hookUserSetMainSourceNotificationConfiguration, + am_Error_e(const am_sourceID_t sourceID, const am_NotificationConfiguration_s& notificationConfiguration)); + MOCK_METHOD1(hookSystemNodeStateChanged, + void(const NsmNodeState_e NodeStateId)); + MOCK_METHOD1(hookSystemNodeApplicationModeChanged, + void(const NsmApplicationMode_e ApplicationModeId)); + MOCK_METHOD3(hookSystemSessionStateChanged, + void(const std::string& sessionName, const NsmSeat_e seatID, const NsmSessionState_e sessionStateID)); + MOCK_METHOD2(hookSystemLifecycleRequest, + NsmErrorStatus_e(const uint32_t Request, const uint32_t RequestId)); + MOCK_METHOD2(hookSystemSingleTimingInformationChanged, + void(const am_connectionID_t connectionID, const am_timeSync_t time)); }; + } // namespace am #endif /* MOCKCONTROLINTERFACE_H_ */ diff --git a/AudioManagerDaemon/test/MockIAmRoutingSend.h b/AudioManagerDaemon/test/MockIAmRoutingSend.h index f995828..a2ade6d 100644 --- a/AudioManagerDaemon/test/MockIAmRoutingSend.h +++ b/AudioManagerDaemon/test/MockIAmRoutingSend.h @@ -21,7 +21,7 @@ #ifndef MOCKROUTINGINTERFACE_H_ #define MOCKROUTINGINTERFACE_H_ -#include "routing/IAmRoutingSend.h" +#include "IAmRouting.h" #include "gtest/gtest.h" #include "gmock/gmock.h" diff --git a/cmake/MacroInterfaceVersions.cmake b/cmake/MacroInterfaceVersions.cmake index eb64c75..c5ac0bf 100644 --- a/cmake/MacroInterfaceVersions.cmake +++ b/cmake/MacroInterfaceVersions.cmake @@ -1,24 +1,24 @@ macro(GET_COMMAND_INTERFACE_VERSION INCLUDE_FOLDER) - FILE(READ "${INCLUDE_FOLDER}/command/IAmCommandSend.h" VERSION_BUFFER LIMIT 6000) - STRING(REGEX MATCH "CommandSendVersion*.[^0-9]*[0-9].[0-9]*[0-9]" LIB_COMMAND_INTERFACE_VERSION ${VERSION_BUFFER}) - STRING(REGEX REPLACE "CommandSendVersion*.." "" LIB_COMMAND_INTERFACE_VERSION ${LIB_COMMAND_INTERFACE_VERSION}) + FILE(READ "${INCLUDE_FOLDER}/IAmCommand.h" VERSION_BUFFER LIMIT 6000) + STRING(REGEX MATCH "CommandVersion*.[^0-9]*[0-9].[0-9]*[0-9]" LIB_COMMAND_INTERFACE_VERSION ${VERSION_BUFFER}) + STRING(REGEX REPLACE "CommandVersion*.." "" LIB_COMMAND_INTERFACE_VERSION ${LIB_COMMAND_INTERFACE_VERSION}) endmacro(GET_COMMAND_INTERFACE_VERSION INCLUDE_FOLDER) macro(GET_ROUTING_INTERFACE_VERSION INCLUDE_FOLDER) - FILE(READ "${INCLUDE_FOLDER}/routing/IAmRoutingSend.h" VERSION_BUFFER LIMIT 6000) - STRING(REGEX MATCH "RoutingSendVersion*.[^0-9]*[0-9].[0-9]*[0-9]" LIB_ROUTING_INTERFACE_VERSION ${VERSION_BUFFER}) - STRING(REGEX REPLACE "RoutingSendVersion*.." "" LIB_ROUTING_INTERFACE_VERSION ${LIB_ROUTING_INTERFACE_VERSION}) + FILE(READ "${INCLUDE_FOLDER}/IAmRouting.h" VERSION_BUFFER LIMIT 6000) + STRING(REGEX MATCH "RoutingVersion*.[^0-9]*[0-9].[0-9]*[0-9]" LIB_ROUTING_INTERFACE_VERSION ${VERSION_BUFFER}) + STRING(REGEX REPLACE "RoutingVersion*.." "" LIB_ROUTING_INTERFACE_VERSION ${LIB_ROUTING_INTERFACE_VERSION}) endmacro(GET_ROUTING_INTERFACE_VERSION INCLUDE_FOLDER) macro(GET_CONTROL_INTERFACE_VERSION INCLUDE_FOLDER) - FILE(READ "${INCLUDE_FOLDER}/control/IAmControlSend.h" VERSION_BUFFER LIMIT 6000) - STRING(REGEX MATCH "ControlSendVersion*.[^0-9]*[0-9].[0-9]*[0-9]" LIB_CONTROL_INTERFACE_VERSION ${VERSION_BUFFER}) - STRING(REGEX REPLACE "ControlSendVersion*.." "" LIB_CONTROL_INTERFACE_VERSION ${LIB_CONTROL_INTERFACE_VERSION}) + FILE(READ "${INCLUDE_FOLDER}/IAmControl.h" VERSION_BUFFER LIMIT 6000) + STRING(REGEX MATCH "ControlVersion*.[^0-9]*[0-9].[0-9]*[0-9]" LIB_CONTROL_INTERFACE_VERSION ${VERSION_BUFFER}) + STRING(REGEX REPLACE "ControlVersion*.." "" LIB_CONTROL_INTERFACE_VERSION ${LIB_CONTROL_INTERFACE_VERSION}) - endmacro(GET_CONTROL_INTERFACE_VERSION INCLUDE_FOLDER)
\ No newline at end of file + endmacro(GET_CONTROL_INTERFACE_VERSION INCLUDE_FOLDER) diff --git a/include/command/IAmCommandReceive.h b/include/IAmCommand.h index 83ab577..33f855a 100755..100644 --- a/include/command/IAmCommandReceive.h +++ b/include/IAmCommand.h @@ -20,8 +20,8 @@ * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL.
* PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN.
*/
-#if !defined(EA_F12AFDAB_E710_43e4_8DC1_1035427769BE__INCLUDED_)
-#define EA_F12AFDAB_E710_43e4_8DC1_1035427769BE__INCLUDED_
+#if !defined(EA_D9D48C0D_77EC_4fa7_B861_1827740C7ECA__INCLUDED_)
+#define EA_D9D48C0D_77EC_4fa7_B861_1827740C7ECA__INCLUDED_
#include <vector>
#include <string>
@@ -34,7 +34,7 @@ class CAmSocketHandler; #include "audiomanagertypes.h"
-#define CommandReceiveVersion "3.0"
+#define CommandVersion "3.0"
namespace am {
/**
@@ -216,5 +216,160 @@ public: virtual am_Error_e setMainSourceNotificationConfiguration(const am_sourceID_t sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration) =0;
};
+
+/**
+ * This interface handles all communication from the AudioManagerDaemon towards
+ * the system. It is designed in such a way that only callbacks with no return
+ * types are implemented. So when the CommandInterfacePlugins are designed in such
+ * a way that they broadcast signals to any node who is interested in the
+ * particular information (like signals on Dbus for example), more information can
+ * be retrieved via the CommandReceiveInterface.
+ * There are two rules that have to be kept in mind when implementing against this
+ * interface:\n
+ * \warning
+ * 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
+ * 2. YOU MAY NOT CALL THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS
+ * CALL THAT EXPECTS A RETURN VALUE.\n
+ * \details
+ * Violation these rules may lead to unexpected behavior! Nevertheless you can
+ * implement thread safe by using the deferred-call pattern described on the wiki
+ * which also helps to implement calls that are forbidden.\n
+ * For more information, please check CAmSerializer
+ */
+class IAmCommandSend
+{
+
+public:
+ IAmCommandSend() {
+
+ }
+
+ virtual ~IAmCommandSend() {
+
+ }
+
+ /**
+ * returns the interface version as string.
+ */
+ virtual void getInterfaceVersion(std::string& version) const =0;
+ /**
+ * This command starts the interface, the plugin itself. This is not meant to
+ * start communication with the HMI itself. It is a good idea to implement here
+ * everything that sets up the basic communication like DbusCommunication etc...
+ * Be aware of side effects with systemd and socketbased communication!
+ * @return E_OK on success, E_UNKNOWN on error
+ */
+ virtual am_Error_e startupInterface(IAmCommandReceive* commandreceiveinterface) =0;
+ /**
+ * This function will indirectly be called by the Controller and is used to start
+ * the Communication. Before this command, all communication will be ignored by
+ * the AudioManager.
+ * After the Plugin is ready, it will asynchronously answer with
+ * condfirmCommandReady, the handle that is handed over must be returned.
+ */
+ virtual void setCommandReady(const uint16_t handle) =0;
+ /**
+ * This function will indirectly be called by the Controller and is used to stop
+ * the Communication. After this command, all communication will be ignored by the
+ * AudioManager. The plugin has to be prepared that either the power will be
+ * switched off or the Interface is started again with setCommandReady
+ * After the Plugin is ready to rundown, it will asynchronously answer with
+ * condfirmCommandRundown, the handle that is handed over must be returned.
+ */
+ virtual void setCommandRundown(const uint16_t handle) =0;
+ /**
+ * Callback that is called when the number of connections change
+ */
+ virtual void cbNewMainConnection(const am_MainConnectionType_s& mainConnection) =0;
+ /**
+ * Callback that is called when the number of connections change
+ */
+ virtual void cbRemovedMainConnection(const am_mainConnectionID_t mainConnection) =0;
+ /**
+ * Callback that is called when the number of sinks change
+ */
+ virtual void cbNewSink(const am_SinkType_s& sink) =0;
+ /**
+ * Callback that is called when the number of sinks change
+ */
+ virtual void cbRemovedSink(const am_sinkID_t sinkID) =0;
+ /**
+ * Callback that is called when the number of sources change
+ */
+ virtual void cbNewSource(const am_SourceType_s& source) =0;
+ /**
+ * Callback that is called when the number of sources change
+ */
+ virtual void cbRemovedSource(const am_sourceID_t source) =0;
+ /**
+ * this callback is fired if the number of sink classes changed
+ */
+ virtual void cbNumberOfSinkClassesChanged() =0;
+ /**
+ * this callback is fired if the number of source classes changed
+ */
+ virtual void cbNumberOfSourceClassesChanged() =0;
+ /**
+ * This callback is called when the ConnectionState of a connection changed.
+ */
+ virtual void cbMainConnectionStateChanged(const am_mainConnectionID_t connectionID, const am_ConnectionState_e connectionState) =0;
+ /**
+ * this callback indicates that a sinkSoundProperty has changed.
+ */
+ virtual void cbMainSinkSoundPropertyChanged(const am_sinkID_t sinkID, const am_MainSoundProperty_s& soundProperty) =0;
+ /**
+ * this callback indicates that a sourceSoundProperty has changed.
+ */
+ virtual void cbMainSourceSoundPropertyChanged(const am_sourceID_t sourceID, const am_MainSoundProperty_s& soundProperty) =0;
+ /**
+ * this callback is called when the availability of a sink has changed
+ */
+ virtual void cbSinkAvailabilityChanged(const am_sinkID_t sinkID, const am_Availability_s& availability) =0;
+ /**
+ * this callback is called when the availability of source has changed.
+ */
+ virtual void cbSourceAvailabilityChanged(const am_sourceID_t sourceID, const am_Availability_s& availability) =0;
+ /**
+ * this callback indicates a volume change on the indicated sink
+ */
+ virtual void cbVolumeChanged(const am_sinkID_t sinkID, const am_mainVolume_t volume) =0;
+ /**
+ * this callback indicates a mute state change on a sink.
+ */
+ virtual void cbSinkMuteStateChanged(const am_sinkID_t sinkID, const am_MuteState_e muteState) =0;
+ /**
+ * is fired if a systemProperty changed
+ */
+ virtual void cbSystemPropertyChanged(const am_SystemProperty_s& systemProperty) =0;
+ /**
+ * This callback is fired if the timinginformation for a mainConnectionID changed
+ */
+ virtual void cbTimingInformationChanged(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time) =0;
+ /**
+ * This callback is called when a sink is updated.
+ */
+ virtual void cbSinkUpdated(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties) =0;
+ /**
+ * This callback is called when a source is updated.
+ */
+ virtual void cbSourceUpdated(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties) =0;
+ /**
+ * This callback is called when a notificated value of a sink changes.
+ */
+ virtual void cbSinkNotification(const am_sinkID_t sinkID, const am_NotificationPayload_s& notification) =0;
+ /**
+ * This callback is called when a notifcated value of a source changes.
+ */
+ virtual void cbSourceNotification(const am_sourceID_t sourceID, const am_NotificationPayload_s& notification) =0;
+ /**
+ * This callback is triggered when a mainNotificationConfiguration is changed.
+ */
+ virtual void cbMainSinkNotificationConfigurationChanged(const am_sinkID_t sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration) =0;
+ /**
+ * This callback is triggered when a mainNotificationConfiguration is changed.
+ */
+ virtual void cbMainSourceNotificationConfigurationChanged(const am_sourceID_t sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration) =0;
+
+};
}
-#endif // !defined(EA_F12AFDAB_E710_43e4_8DC1_1035427769BE__INCLUDED_)
+#endif // !defined(EA_D9D48C0D_77EC_4fa7_B861_1827740C7ECA__INCLUDED_)
diff --git a/include/control/IAmControlReceive.h b/include/IAmControl.h index 9f7bd4e..a95bb05 100755..100644 --- a/include/control/IAmControlReceive.h +++ b/include/IAmControl.h @@ -20,8 +20,8 @@ * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL.
* PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN.
*/
-#if !defined(EA_302355E7_3225_415d_AC7F_F0F7468FCCCF__INCLUDED_)
-#define EA_302355E7_3225_415d_AC7F_F0F7468FCCCF__INCLUDED_
+#if !defined(EA_69597D9E_B0A3_4c6d_BBB6_E7F436B8B799__INCLUDED_)
+#define EA_69597D9E_B0A3_4c6d_BBB6_E7F436B8B799__INCLUDED_
#include <vector>
#include <string>
@@ -34,7 +34,7 @@ class CAmSocketHandler; #include "audiomanagertypes.h"
-#define ControlReceiveVersion "3.1"
+#define ControlVersion "4.0"
namespace am {
/**
@@ -695,5 +695,342 @@ public: virtual am_Error_e getSourceSoundPropertyValue(const am_sourceID_t sourceID, const am_CustomSoundPropertyType_t propertyType, int16_t& value) const =0;
};
+
+/**
+ * This interface is presented by the AudioManager controller.
+ * All the hooks represent system events that need to be handled. The callback
+ * functions are used to handle for example answers to function calls on the
+ * AudioManagerCoreInterface.
+ * There are two rules that have to be kept in mind when implementing against this
+ * interface:\n
+ * \warning
+ * 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
+ * 2. YOU MAY NOT CALL THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS
+ * CALL THAT EXPECTS A RETURN VALUE.\n
+ * \details
+ * Violation these rules may lead to unexpected behavior! Nevertheless you can
+ * implement thread safe by using the deferred-call pattern described on the wiki
+ * which also helps to implement calls that are forbidden.\n
+ * For more information, please check CAmSerializer
+ */
+class IAmControlSend
+{
+
+public:
+ IAmControlSend() {
+
+ }
+
+ virtual ~IAmControlSend() {
+
+ }
+
+ /**
+ * This function returns the version of the interface
+ * returns E_OK, E_UNKOWN if version is unknown.
+ */
+ virtual void getInterfaceVersion(std::string& version) const =0;
+ /**
+ * Starts up the controller.
+ */
+ virtual am_Error_e startupController(IAmControlReceive* controlreceiveinterface) =0;
+ /**
+ * this message is used tell the controller that it should get ready. This message
+ * must be acknowledged via confirmControllerReady.
+ */
+ virtual void setControllerReady() =0;
+ /**
+ * This message tells the controller that he should prepare everything for the
+ * power to be switched off. This message must be acknowledged via
+ * confirmControllerRundown.
+ * The method will give the signal as integer that was responsible for calling the
+ * setControllerRundown.
+ * This function is called from the signal handler, either direct (when the
+ * program is killed) or from within the mainloop (if the program is terminated).
+ */
+ virtual void setControllerRundown(const int16_t signal) =0;
+ /**
+ * is called when a connection request comes in via the command interface
+ * @return E_OK on success, E_NOT_POSSIBLE on error, E_ALREADY_EXISTENT if already
+ * exists
+ */
+ virtual am_Error_e hookUserConnectionRequest(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID) =0;
+ /**
+ * is called when a disconnection request comes in via the command interface
+ * @return E_OK on success, E_NOT_POSSIBLE on error, E_NON_EXISTENT if connection
+ * does not exists
+ */
+ virtual am_Error_e hookUserDisconnectionRequest(const am_mainConnectionID_t connectionID) =0;
+ /**
+ * sets a user MainSinkSoundProperty
+ * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
+ */
+ virtual am_Error_e hookUserSetMainSinkSoundProperty(const am_sinkID_t sinkID, const am_MainSoundProperty_s& soundProperty) =0;
+ /**
+ * sets a user MainSourceSoundProperty
+ * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
+ */
+ virtual am_Error_e hookUserSetMainSourceSoundProperty(const am_sourceID_t sourceID, const am_MainSoundProperty_s& soundProperty) =0;
+ /**
+ * sets a user SystemProperty
+ * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
+ */
+ virtual am_Error_e hookUserSetSystemProperty(const am_SystemProperty_s& property) =0;
+ /**
+ * sets a user volume
+ * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
+ */
+ virtual am_Error_e hookUserVolumeChange(const am_sinkID_t SinkID, const am_mainVolume_t newVolume) =0;
+ /**
+ * sets a user volume as increment
+ * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
+ */
+ virtual am_Error_e hookUserVolumeStep(const am_sinkID_t SinkID, const int16_t increment) =0;
+ /**
+ * sets the mute state of a sink
+ * @return E_OK on success, E_UNKNOWN on error
+ */
+ virtual am_Error_e hookUserSetSinkMuteState(const am_sinkID_t sinkID, const am_MuteState_e muteState) =0;
+ /**
+ * is called when a routing adaptor registers its domain
+ * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already
+ * exists
+ */
+ virtual am_Error_e hookSystemRegisterDomain(const am_Domain_s& domainData, am_domainID_t& domainID) =0;
+ /**
+ * is called when a routing adaptor wants to derigister a domain
+ * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
+ */
+ virtual am_Error_e hookSystemDeregisterDomain(const am_domainID_t domainID) =0;
+ /**
+ * is called when a domain registered all the elements
+ */
+ virtual void hookSystemDomainRegistrationComplete(const am_domainID_t domainID) =0;
+ /**
+ * is called when a routing adaptor registers a sink
+ * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already
+ * exists
+ */
+ virtual am_Error_e hookSystemRegisterSink(const am_Sink_s& sinkData, am_sinkID_t& sinkID) =0;
+ /**
+ * is called when a routing adaptor deregisters a sink
+ * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
+ */
+ virtual am_Error_e hookSystemDeregisterSink(const am_sinkID_t sinkID) =0;
+ /**
+ * is called when a routing adaptor registers a source
+ * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already
+ * exists
+ */
+ virtual am_Error_e hookSystemRegisterSource(const am_Source_s& sourceData, am_sourceID_t& sourceID) =0;
+ /**
+ * is called when a routing adaptor deregisters a source
+ * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
+ */
+ virtual am_Error_e hookSystemDeregisterSource(const am_sourceID_t sourceID) =0;
+ /**
+ * is called when a routing adaptor registers a converter
+ * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already
+ * exists
+ */
+ virtual am_Error_e hookSystemRegisterConverter(const am_Converter_s& converterData, am_converterID_t& converterID) =0;
+ /**
+ * is called when a routing adaptor registers a gateway
+ * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already
+ * exists
+ */
+ virtual am_Error_e hookSystemRegisterGateway(const am_Gateway_s& gatewayData, am_gatewayID_t& gatewayID) =0;
+ /**
+ * is called when a routing adaptor deregisters a converter
+ * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
+ */
+ virtual am_Error_e hookSystemDeregisterConverter(const am_converterID_t converterID) =0;
+ /**
+ * is called when a routing adaptor deregisters a gateway
+ * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
+ */
+ virtual am_Error_e hookSystemDeregisterGateway(const am_gatewayID_t gatewayID) =0;
+ /**
+ * is called when a routing adaptor registers a crossfader
+ * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already
+ * exists
+ */
+ virtual am_Error_e hookSystemRegisterCrossfader(const am_Crossfader_s& crossfaderData, am_crossfaderID_t& crossfaderID) =0;
+ /**
+ * is called when a routing adaptor deregisters a crossfader
+ * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
+ */
+ virtual am_Error_e hookSystemDeregisterCrossfader(const am_crossfaderID_t crossfaderID) =0;
+ /**
+ * volumeticks. therse are used to indicate volumechanges during a ramp
+ */
+ virtual void hookSystemSinkVolumeTick(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume) =0;
+ /**
+ * volumeticks. therse are used to indicate volumechanges during a ramp
+ */
+ virtual void hookSystemSourceVolumeTick(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume) =0;
+ /**
+ * is called when an low level interrupt changed its state
+ */
+ virtual void hookSystemInterruptStateChange(const am_sourceID_t sourceID, const am_InterruptState_e interruptState) =0;
+ /**
+ * id called when a sink changed its availability
+ */
+ virtual void hookSystemSinkAvailablityStateChange(const am_sinkID_t sinkID, const am_Availability_s& availability) =0;
+ /**
+ * id called when a source changed its availability
+ */
+ virtual void hookSystemSourceAvailablityStateChange(const am_sourceID_t sourceID, const am_Availability_s& availability) =0;
+ /**
+ * id called when domainstate was changed
+ */
+ virtual void hookSystemDomainStateChange(const am_domainID_t domainID, const am_DomainState_e state) =0;
+ /**
+ * when early data was received
+ */
+ virtual void hookSystemReceiveEarlyData(const std::vector<am_EarlyData_s>& data) =0;
+ /**
+ * this hook provides information about speed changes.
+ * The quantization and sampling rate of the speed can be adjusted at compile time
+ * of the AudioManagerDaemon.
+ */
+ virtual void hookSystemSpeedChange(const am_speed_t speed) =0;
+ /**
+ * this hook is fired whenever the timing information of a mainconnection has
+ * changed.
+ */
+ virtual void hookSystemTimingInformationChanged(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time) =0;
+ /**
+ * ack for connect
+ */
+ virtual void cbAckConnect(const am_Handle_s handle, const am_Error_e errorID) =0;
+ /**
+ * ack for disconnect
+ */
+ virtual void cbAckDisconnect(const am_Handle_s handle, const am_Error_e errorID) =0;
+ /**
+ * ack for crossfading
+ */
+ virtual void cbAckCrossFade(const am_Handle_s handle, const am_HotSink_e hostsink, const am_Error_e error) =0;
+ /**
+ * ack for sink volume changes
+ */
+ virtual void cbAckSetSinkVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error) =0;
+ /**
+ * ack for source volume changes
+ */
+ virtual void cbAckSetSourceVolumeChange(const am_Handle_s handle, const am_volume_t voulme, const am_Error_e error) =0;
+ /**
+ * ack for setting of source states
+ */
+ virtual void cbAckSetSourceState(const am_Handle_s handle, const am_Error_e error) =0;
+ /**
+ * ack for setting of sourcesoundproperties
+ */
+ virtual void cbAckSetSourceSoundProperties(const am_Handle_s handle, const am_Error_e error) =0;
+ /**
+ * ack for setting of sourcesoundproperties
+ */
+ virtual void cbAckSetSourceSoundProperty(const am_Handle_s handle, const am_Error_e error) =0;
+ /**
+ * ack for setting of sinksoundproperties
+ */
+ virtual void cbAckSetSinkSoundProperties(const am_Handle_s handle, const am_Error_e error) =0;
+ /**
+ * ack for setting of sinksoundproperties
+ */
+ virtual void cbAckSetSinkSoundProperty(const am_Handle_s handle, const am_Error_e error) =0;
+ /**
+ * This function is used by the routing algorithm to retrieve a priorized list of
+ * connectionFormats from the Controller.
+ * @return E_OK in case of successfull priorisation.
+ */
+ virtual am_Error_e getConnectionFormatChoice(const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_Route_s listRoute, const std::vector<am_CustomConnectionFormat_t> listPossibleConnectionFormats, std::vector<am_CustomConnectionFormat_t>& listPrioConnectionFormats) =0;
+ /**
+ * confirms the setCommandReady call
+ */
+ virtual void confirmCommandReady(const am_Error_e error) =0;
+ /**
+ * confirms the setRoutingReady call
+ */
+ virtual void confirmRoutingReady(const am_Error_e error) =0;
+ /**
+ * confirms the setCommandRundown call
+ */
+ virtual void confirmCommandRundown(const am_Error_e error) =0;
+ /**
+ * confirms the setRoutingRundown command
+ */
+ virtual void confirmRoutingRundown(const am_Error_e error) =0;
+ /**
+ * update form the SinkData
+ */
+ virtual 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) =0;
+ /**
+ * update from the source Data
+ */
+ virtual 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) =0;
+ /**
+ * updates the Converter Data
+ */
+ virtual am_Error_e hookSystemUpdateConverter(const am_converterID_t converterID, const std::vector<am_CustomConnectionFormat_t>& listSourceConnectionFormats, const std::vector<am_CustomConnectionFormat_t>& listSinkConnectionFormats, const std::vector<bool>& convertionMatrix) =0;
+ /**
+ * updates the Gateway Data
+ */
+ virtual am_Error_e hookSystemUpdateGateway(const am_gatewayID_t gatewayID, const std::vector<am_CustomConnectionFormat_t>& listSourceConnectionFormats, const std::vector<am_CustomConnectionFormat_t>& listSinkConnectionFormats, const std::vector<bool>& convertionMatrix) =0;
+ /**
+ * ack for mulitple volume changes
+ */
+ virtual void cbAckSetVolumes(const am_Handle_s handle, const std::vector<am_Volumes_s>& listVolumes, const am_Error_e error) =0;
+ /**
+ * The acknowledge of the sink notification configuration
+ */
+ virtual void cbAckSetSinkNotificationConfiguration(const am_Handle_s handle, const am_Error_e error) =0;
+ /**
+ * The acknowledge of the source notification configuration
+ */
+ virtual void cbAckSetSourceNotificationConfiguration(const am_Handle_s handle, const am_Error_e error) =0;
+ /**
+ * new sinkNotification data is there!
+ */
+ virtual void hookSinkNotificationDataChanged(const am_sinkID_t sinkID, const am_NotificationPayload_s& payload) =0;
+ /**
+ * new sourceNotification data is there!
+ */
+ virtual void hookSourceNotificationDataChanged(const am_sourceID_t sourceID, const am_NotificationPayload_s& payload) =0;
+ /**
+ * sets a user MainSinkNotificationConfiguration
+ * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
+ */
+ virtual am_Error_e hookUserSetMainSinkNotificationConfiguration(const am_sinkID_t sinkID, const am_NotificationConfiguration_s& notificationConfiguration) =0;
+ /**
+ * sets a user MainSourceNotificationConfiguration
+ * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
+ */
+ virtual am_Error_e hookUserSetMainSourceNotificationConfiguration(const am_sourceID_t sourceID, const am_NotificationConfiguration_s& notificationConfiguration) =0;
+ /**
+ * This hook is connected to the NodeState signal of the NodeStateManager
+ */
+ virtual void hookSystemNodeStateChanged(const NsmNodeState_e NodeStateId) =0;
+ /**
+ * This hook is connected to the NodeApplicationMode signal of the NodeStateManager
+ */
+ virtual void hookSystemNodeApplicationModeChanged(const NsmApplicationMode_e ApplicationModeId) =0;
+ /**
+ * the sessionstate change was send by the NSM
+ */
+ virtual void hookSystemSessionStateChanged(const std::string& sessionName, const NsmSeat_e seatID, const NsmSessionState_e sessionStateID) =0;
+ /**
+ * A lifecycle request comes in from the NSM and must be processed.
+ * @return NsmErrorStatus_Ok if successful
+ * The controller has to respond to this message with LifecycleRequestComplete.
+ */
+ virtual NsmErrorStatus_e hookSystemLifecycleRequest(const uint32_t Request, const uint32_t RequestId) =0;
+ /**
+ * This hook is fired whenever the timing information of a connection has changed.
+ */
+ virtual void hookSystemSingleTimingInformationChanged(const am_connectionID_t connectionID, const am_timeSync_t time) =0;
+
+};
}
-#endif // !defined(EA_302355E7_3225_415d_AC7F_F0F7468FCCCF__INCLUDED_)
+#endif // !defined(EA_69597D9E_B0A3_4c6d_BBB6_E7F436B8B799__INCLUDED_)
diff --git a/include/routing/IAmRoutingReceive.h b/include/IAmRouting.h index 27a9d0e..90f7e8a 100755..100644 --- a/include/routing/IAmRoutingReceive.h +++ b/include/IAmRouting.h @@ -20,8 +20,8 @@ * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL.
* PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN.
*/
-#if !defined(EA_847BA111_2367_47e3_AEC9_9201E427921A__INCLUDED_)
-#define EA_847BA111_2367_47e3_AEC9_9201E427921A__INCLUDED_
+#if !defined(EA_6B9C54C0_2366_4139_97CF_28563364DACA__INCLUDED_)
+#define EA_6B9C54C0_2366_4139_97CF_28563364DACA__INCLUDED_
#include <vector>
#include <string>
@@ -35,7 +35,7 @@ class CAmSocketHandler; #include "audiomanagertypes.h"
-#define RoutingReceiveVersion "3.0"
+#define RoutingVersion "4.0"
namespace am {
/**
@@ -335,5 +335,150 @@ public: virtual am_Error_e getDomainOfSource(const am_sourceID_t sourceID, am_domainID_t& domainID) =0;
};
+
+/**
+ * This class implements everything from Audiomanager -> RoutingAdapter
+ * There are two rules that have to be kept in mind when implementing against this
+ * interface:\n
+ * \warning
+ * 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
+ * 2. YOU MAY NOT CALL THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS
+ * CALL THAT EXPECTS A RETURN VALUE.\n
+ * \details
+ * Violation these rules may lead to unexpected behavior! Nevertheless you can
+ * implement thread safe by using the deferred-call pattern described on the wiki
+ * which also helps to implement calls that are forbidden.\n
+ * For more information, please check CAmSerializer
+ */
+class IAmRoutingSend
+{
+
+public:
+ IAmRoutingSend() {
+
+ }
+
+ virtual ~IAmRoutingSend() {
+
+ }
+
+ /**
+ * This function returns the version of the interface
+ */
+ virtual void getInterfaceVersion(std::string& version) const =0;
+ /**
+ * starts up the interface. In the implementations, here is the best place for
+ * init routines.
+ */
+ virtual am_Error_e startupInterface(IAmRoutingReceive* routingreceiveinterface) =0;
+ /**
+ * indicates that the routing now ready to be used. Should be used as trigger to
+ * register all sinks, sources, etc...
+ */
+ virtual void setRoutingReady(const uint16_t handle) =0;
+ /**
+ * indicates that the routing plugins need to be prepared to switch the power off
+ * or be ready again.
+ */
+ virtual void setRoutingRundown(const uint16_t handle) =0;
+ /**
+ * aborts an asynchronous action.
+ * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if handle was not
+ * found
+ */
+ virtual am_Error_e asyncAbort(const am_Handle_s handle) =0;
+ /**
+ * connects a source to a sink
+ * @return E_OK on success, E_UNKNOWN on error, E_WRONG_FORMAT in case
+ * am_ConnectionFormat_e does not match
+ */
+ virtual am_Error_e asyncConnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_CustomConnectionFormat_t connectionFormat) =0;
+ /**
+ * disconnect a connection with given connectionID
+ * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if connection was
+ * not found
+ */
+ virtual am_Error_e asyncDisconnect(const am_Handle_s handle, const am_connectionID_t connectionID) =0;
+ /**
+ * this method is used to set the volume of a sink. This function is used to drive
+ * ramps, to mute or unmute or directly set the value. The difference is made
+ * through the ramptype.
+ * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if new volume is
+ * out of range
+ */
+ virtual am_Error_e asyncSetSinkVolume(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume, const am_CustomRampType_t ramp, const am_time_t time) =0;
+ /**
+ * sets the volume of a source. This method is used to set the volume of a sink.
+ * This function is used to drive ramps, to mute or unmute or directly set the
+ * value. The difference is made through the ramptype.
+ * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if volume is out of
+ * range.
+ * triggers the acknowledge ackSourceVolumeChange
+ */
+ virtual am_Error_e asyncSetSourceVolume(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume, const am_CustomRampType_t ramp, const am_time_t time) =0;
+ /**
+ * This function is used to set the source state of a particular source.
+ * @return E_OK on success, E_UNKNOWN on error
+ */
+ virtual am_Error_e asyncSetSourceState(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SourceState_e state) =0;
+ /**
+ * this function sets the sinksoundproperty.
+ * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery
+ * value is out of range
+ */
+ virtual am_Error_e asyncSetSinkSoundProperties(const am_Handle_s handle, const am_sinkID_t sinkID, const std::vector<am_SoundProperty_s>& listSoundProperties) =0;
+ /**
+ * this function sets the sinksoundproperty.
+ * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery
+ * value is out of range
+ */
+ virtual am_Error_e asyncSetSinkSoundProperty(const am_Handle_s handle, const am_sinkID_t sinkID, const am_SoundProperty_s& soundProperty) =0;
+ /**
+ * this function sets the sourcesoundproperty.
+ * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery
+ * value is out of range
+ */
+ virtual am_Error_e asyncSetSourceSoundProperties(const am_Handle_s handle, const am_sourceID_t sourceID, const std::vector<am_SoundProperty_s>& listSoundProperties) =0;
+ /**
+ * this function sets the sourcesoundproperty.
+ * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery
+ * value is out of range
+ */
+ virtual am_Error_e asyncSetSourceSoundProperty(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SoundProperty_s& soundProperty) =0;
+ /**
+ * this function triggers crossfading.
+ * @return E_OK on success, E_UNKNOWN on error
+ */
+ virtual am_Error_e asyncCrossFade(const am_Handle_s handle, const am_crossfaderID_t crossfaderID, const am_HotSink_e hotSink, const am_CustomRampType_t rampType, const am_time_t time) =0;
+ /**
+ * this function is used for early and late audio functions to set the domain
+ * state
+ * @return E_OK on success, E_UNKNOWN on error
+ */
+ virtual am_Error_e setDomainState(const am_domainID_t domainID, const am_DomainState_e domainState) =0;
+ /**
+ * this method is used to retrieve the busname during startup of the plugin. Needs
+ * to be implemented
+ * @return E_OK on success, E_UNKNOWN on error
+ */
+ virtual am_Error_e returnBusName(std::string& BusName) const =0;
+ /**
+ * This command sets multiple source or and sink volumes within a domain at a time.
+ * It can be used to synchronize volume setting events.
+ * @return E_OK on success, E_UNKNOWN on error.
+ */
+ virtual am_Error_e asyncSetVolumes(const am_Handle_s handle, const std::vector<am_Volumes_s>& listVolumes) =0;
+ /**
+ * sets the notification configuration of a sink.
+ * @return E_OK on success, E_UNKNOWN on error.
+ */
+ virtual am_Error_e asyncSetSinkNotificationConfiguration(const am_Handle_s handle, const am_sinkID_t sinkID, const am_NotificationConfiguration_s& notificationConfiguration) =0;
+ /**
+ * sets the notification configuration of a source.
+ * @return E_OK on success, E_UNKNOWN on error.
+ */
+ virtual am_Error_e asyncSetSourceNotificationConfiguration(const am_Handle_s handle, const am_sourceID_t sourceID, const am_NotificationConfiguration_s& notificationConfiguration) =0;
+
+};
}
-#endif // !defined(EA_847BA111_2367_47e3_AEC9_9201E427921A__INCLUDED_)
+#endif // !defined(EA_6B9C54C0_2366_4139_97CF_28563364DACA__INCLUDED_)
diff --git a/include/command/IAmCommandSend.h b/include/command/IAmCommandSend.h deleted file mode 100755 index 1751290..0000000 --- a/include/command/IAmCommandSend.h +++ /dev/null @@ -1,195 +0,0 @@ -/**
- * Copyright (C) 2012 - 2014, BMW AG
- *
- * This file is part of GENIVI Project AudioManager.
- *
- * Contributions are licensed to the GENIVI Alliance under one or more
- * Contribution License Agreements.
- *
- * \copyright
- * This Source Code Form is subject to the terms of the
- * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
- * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- *
- * \author Christian Linke, christian.linke@bmw.de BMW 2011 - 2014
- *
- * \file
- * For further information see http://projects.genivi.org/audio-manager
- *
- * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL.
- * PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN.
- */
-#if !defined(EA_42416EED_29C4_4b4c_A98B_010EF2513C35__INCLUDED_)
-#define EA_42416EED_29C4_4b4c_A98B_010EF2513C35__INCLUDED_
-
-#include <vector>
-#include <string>
-#include "audiomanagertypes.h"
-
-namespace am {
-class IAmCommandReceive;
-}
-
-#include "IAmCommandReceive.h"
-#include "audiomanagertypes.h"
-
-#define CommandSendVersion "3.0"
-namespace am {
-
-/**
- * This interface handles all communication from the AudioManagerDaemon towards
- * the system. It is designed in such a way that only callbacks with no return
- * types are implemented. So when the CommandInterfacePlugins are designed in such
- * a way that they broadcast signals to any node who is interested in the
- * particular information (like signals on Dbus for example), more information can
- * be retrieved via the CommandReceiveInterface.
- * There are two rules that have to be kept in mind when implementing against this
- * interface:\n
- * \warning
- * 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
- * 2. YOU MAY NOT CALL THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS
- * CALL THAT EXPECTS A RETURN VALUE.\n
- * \details
- * Violation these rules may lead to unexpected behavior! Nevertheless you can
- * implement thread safe by using the deferred-call pattern described on the wiki
- * which also helps to implement calls that are forbidden.\n
- * For more information, please check CAmSerializer
- */
-class IAmCommandSend
-{
-
-public:
- IAmCommandSend() {
-
- }
-
- virtual ~IAmCommandSend() {
-
- }
-
- /**
- * returns the interface version as string.
- */
- virtual void getInterfaceVersion(std::string& version) const =0;
- /**
- * This command starts the interface, the plugin itself. This is not meant to
- * start communication with the HMI itself. It is a good idea to implement here
- * everything that sets up the basic communication like DbusCommunication etc...
- * Be aware of side effects with systemd and socketbased communication!
- * @return E_OK on success, E_UNKNOWN on error
- */
- virtual am_Error_e startupInterface(IAmCommandReceive* commandreceiveinterface) =0;
- /**
- * This function will indirectly be called by the Controller and is used to start
- * the Communication. Before this command, all communication will be ignored by
- * the AudioManager.
- * After the Plugin is ready, it will asynchronously answer with
- * condfirmCommandReady, the handle that is handed over must be returned.
- */
- virtual void setCommandReady(const uint16_t handle) =0;
- /**
- * This function will indirectly be called by the Controller and is used to stop
- * the Communication. After this command, all communication will be ignored by the
- * AudioManager. The plugin has to be prepared that either the power will be
- * switched off or the Interface is started again with setCommandReady
- * After the Plugin is ready to rundown, it will asynchronously answer with
- * condfirmCommandRundown, the handle that is handed over must be returned.
- */
- virtual void setCommandRundown(const uint16_t handle) =0;
- /**
- * Callback that is called when the number of connections change
- */
- virtual void cbNewMainConnection(const am_MainConnectionType_s& mainConnection) =0;
- /**
- * Callback that is called when the number of connections change
- */
- virtual void cbRemovedMainConnection(const am_mainConnectionID_t mainConnection) =0;
- /**
- * Callback that is called when the number of sinks change
- */
- virtual void cbNewSink(const am_SinkType_s& sink) =0;
- /**
- * Callback that is called when the number of sinks change
- */
- virtual void cbRemovedSink(const am_sinkID_t sinkID) =0;
- /**
- * Callback that is called when the number of sources change
- */
- virtual void cbNewSource(const am_SourceType_s& source) =0;
- /**
- * Callback that is called when the number of sources change
- */
- virtual void cbRemovedSource(const am_sourceID_t source) =0;
- /**
- * this callback is fired if the number of sink classes changed
- */
- virtual void cbNumberOfSinkClassesChanged() =0;
- /**
- * this callback is fired if the number of source classes changed
- */
- virtual void cbNumberOfSourceClassesChanged() =0;
- /**
- * This callback is called when the ConnectionState of a connection changed.
- */
- virtual void cbMainConnectionStateChanged(const am_mainConnectionID_t connectionID, const am_ConnectionState_e connectionState) =0;
- /**
- * this callback indicates that a sinkSoundProperty has changed.
- */
- virtual void cbMainSinkSoundPropertyChanged(const am_sinkID_t sinkID, const am_MainSoundProperty_s& soundProperty) =0;
- /**
- * this callback indicates that a sourceSoundProperty has changed.
- */
- virtual void cbMainSourceSoundPropertyChanged(const am_sourceID_t sourceID, const am_MainSoundProperty_s& soundProperty) =0;
- /**
- * this callback is called when the availability of a sink has changed
- */
- virtual void cbSinkAvailabilityChanged(const am_sinkID_t sinkID, const am_Availability_s& availability) =0;
- /**
- * this callback is called when the availability of source has changed.
- */
- virtual void cbSourceAvailabilityChanged(const am_sourceID_t sourceID, const am_Availability_s& availability) =0;
- /**
- * this callback indicates a volume change on the indicated sink
- */
- virtual void cbVolumeChanged(const am_sinkID_t sinkID, const am_mainVolume_t volume) =0;
- /**
- * this callback indicates a mute state change on a sink.
- */
- virtual void cbSinkMuteStateChanged(const am_sinkID_t sinkID, const am_MuteState_e muteState) =0;
- /**
- * is fired if a systemProperty changed
- */
- virtual void cbSystemPropertyChanged(const am_SystemProperty_s& systemProperty) =0;
- /**
- * This callback is fired if the timinginformation for a mainConnectionID changed
- */
- virtual void cbTimingInformationChanged(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time) =0;
- /**
- * This callback is called when a sink is updated.
- */
- virtual void cbSinkUpdated(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties) =0;
- /**
- * This callback is called when a source is updated.
- */
- virtual void cbSourceUpdated(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties) =0;
- /**
- * This callback is called when a notificated value of a sink changes.
- */
- virtual void cbSinkNotification(const am_sinkID_t sinkID, const am_NotificationPayload_s& notification) =0;
- /**
- * This callback is called when a notifcated value of a source changes.
- */
- virtual void cbSourceNotification(const am_sourceID_t sourceID, const am_NotificationPayload_s& notification) =0;
- /**
- * This callback is triggered when a mainNotificationConfiguration is changed.
- */
- virtual void cbMainSinkNotificationConfigurationChanged(const am_sinkID_t sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration) =0;
- /**
- * This callback is triggered when a mainNotificationConfiguration is changed.
- */
- virtual void cbMainSourceNotificationConfigurationChanged(const am_sourceID_t sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration) =0;
-
-};
-}
-#endif // !defined(EA_42416EED_29C4_4b4c_A98B_010EF2513C35__INCLUDED_)
diff --git a/include/control/IAmControlSend.h b/include/control/IAmControlSend.h deleted file mode 100755 index f547a81..0000000 --- a/include/control/IAmControlSend.h +++ /dev/null @@ -1,374 +0,0 @@ -/**
- * Copyright (C) 2012 - 2014, BMW AG
- *
- * This file is part of GENIVI Project AudioManager.
- *
- * Contributions are licensed to the GENIVI Alliance under one or more
- * Contribution License Agreements.
- *
- * \copyright
- * This Source Code Form is subject to the terms of the
- * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
- * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- *
- * \author Christian Linke, christian.linke@bmw.de BMW 2011 - 2014
- *
- * \file
- * For further information see http://projects.genivi.org/audio-manager
- *
- * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL.
- * PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN.
- */
-#if !defined(EA_0ABDDE72_16AD_4b27_A4DA_434305082DD5__INCLUDED_)
-#define EA_0ABDDE72_16AD_4b27_A4DA_434305082DD5__INCLUDED_
-
-#include <vector>
-#include <string>
-#include "audiomanagertypes.h"
-
-namespace am {
-class IAmControlReceive;
-}
-
-#include "IAmControlReceive.h"
-#include "audiomanagertypes.h"
-#include "NodeStateManager.h"
-
-#define ControlSendVersion "3.0"
-namespace am {
-
-/**
- * This interface is presented by the AudioManager controller.
- * All the hooks represent system events that need to be handled. The callback
- * functions are used to handle for example answers to function calls on the
- * AudioManagerCoreInterface.
- * There are two rules that have to be kept in mind when implementing against this
- * interface:\n
- * \warning
- * 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
- * 2. YOU MAY NOT CALL THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS
- * CALL THAT EXPECTS A RETURN VALUE.\n
- * \details
- * Violation these rules may lead to unexpected behavior! Nevertheless you can
- * implement thread safe by using the deferred-call pattern described on the wiki
- * which also helps to implement calls that are forbidden.\n
- * For more information, please check CAmSerializer
- */
-class IAmControlSend
-{
-
-public:
- IAmControlSend() {
-
- }
-
- virtual ~IAmControlSend() {
-
- }
-
- /**
- * This function returns the version of the interface
- * returns E_OK, E_UNKOWN if version is unknown.
- */
- virtual void getInterfaceVersion(std::string& version) const =0;
- /**
- * Starts up the controller.
- */
- virtual am_Error_e startupController(IAmControlReceive* controlreceiveinterface) =0;
- /**
- * this message is used tell the controller that it should get ready. This message
- * must be acknowledged via confirmControllerReady.
- */
- virtual void setControllerReady() =0;
- /**
- * This message tells the controller that he should prepare everything for the
- * power to be switched off. This message must be acknowledged via
- * confirmControllerRundown.
- * The method will give the signal as integer that was responsible for calling the
- * setControllerRundown.
- * This function is called from the signal handler, either direct (when the
- * program is killed) or from within the mainloop (if the program is terminated).
- */
- virtual void setControllerRundown(const int16_t signal) =0;
- /**
- * is called when a connection request comes in via the command interface
- * @return E_OK on success, E_NOT_POSSIBLE on error, E_ALREADY_EXISTENT if already
- * exists
- */
- virtual am_Error_e hookUserConnectionRequest(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID) =0;
- /**
- * is called when a disconnection request comes in via the command interface
- * @return E_OK on success, E_NOT_POSSIBLE on error, E_NON_EXISTENT if connection
- * does not exists
- */
- virtual am_Error_e hookUserDisconnectionRequest(const am_mainConnectionID_t connectionID) =0;
- /**
- * sets a user MainSinkSoundProperty
- * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
- */
- virtual am_Error_e hookUserSetMainSinkSoundProperty(const am_sinkID_t sinkID, const am_MainSoundProperty_s& soundProperty) =0;
- /**
- * sets a user MainSourceSoundProperty
- * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
- */
- virtual am_Error_e hookUserSetMainSourceSoundProperty(const am_sourceID_t sourceID, const am_MainSoundProperty_s& soundProperty) =0;
- /**
- * sets a user SystemProperty
- * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
- */
- virtual am_Error_e hookUserSetSystemProperty(const am_SystemProperty_s& property) =0;
- /**
- * sets a user volume
- * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
- */
- virtual am_Error_e hookUserVolumeChange(const am_sinkID_t SinkID, const am_mainVolume_t newVolume) =0;
- /**
- * sets a user volume as increment
- * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
- */
- virtual am_Error_e hookUserVolumeStep(const am_sinkID_t SinkID, const int16_t increment) =0;
- /**
- * sets the mute state of a sink
- * @return E_OK on success, E_UNKNOWN on error
- */
- virtual am_Error_e hookUserSetSinkMuteState(const am_sinkID_t sinkID, const am_MuteState_e muteState) =0;
- /**
- * is called when a routing adaptor registers its domain
- * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already
- * exists
- */
- virtual am_Error_e hookSystemRegisterDomain(const am_Domain_s& domainData, am_domainID_t& domainID) =0;
- /**
- * is called when a routing adaptor wants to derigister a domain
- * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
- */
- virtual am_Error_e hookSystemDeregisterDomain(const am_domainID_t domainID) =0;
- /**
- * is called when a domain registered all the elements
- */
- virtual void hookSystemDomainRegistrationComplete(const am_domainID_t domainID) =0;
- /**
- * is called when a routing adaptor registers a sink
- * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already
- * exists
- */
- virtual am_Error_e hookSystemRegisterSink(const am_Sink_s& sinkData, am_sinkID_t& sinkID) =0;
- /**
- * is called when a routing adaptor deregisters a sink
- * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
- */
- virtual am_Error_e hookSystemDeregisterSink(const am_sinkID_t sinkID) =0;
- /**
- * is called when a routing adaptor registers a source
- * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already
- * exists
- */
- virtual am_Error_e hookSystemRegisterSource(const am_Source_s& sourceData, am_sourceID_t& sourceID) =0;
- /**
- * is called when a routing adaptor deregisters a source
- * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
- */
- virtual am_Error_e hookSystemDeregisterSource(const am_sourceID_t sourceID) =0;
- /**
- * is called when a routing adaptor registers a converter
- * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already
- * exists
- */
- virtual am_Error_e hookSystemRegisterConverter(const am_Converter_s& converterData, am_converterID_t& converterID) =0;
- /**
- * is called when a routing adaptor registers a gateway
- * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already
- * exists
- */
- virtual am_Error_e hookSystemRegisterGateway(const am_Gateway_s& gatewayData, am_gatewayID_t& gatewayID) =0;
- /**
- * is called when a routing adaptor deregisters a converter
- * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
- */
- virtual am_Error_e hookSystemDeregisterConverter(const am_converterID_t converterID) =0;
- /**
- * is called when a routing adaptor deregisters a gateway
- * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
- */
- virtual am_Error_e hookSystemDeregisterGateway(const am_gatewayID_t gatewayID) =0;
- /**
- * is called when a routing adaptor registers a crossfader
- * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already
- * exists
- */
- virtual am_Error_e hookSystemRegisterCrossfader(const am_Crossfader_s& crossfaderData, am_crossfaderID_t& crossfaderID) =0;
- /**
- * is called when a routing adaptor deregisters a crossfader
- * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
- */
- virtual am_Error_e hookSystemDeregisterCrossfader(const am_crossfaderID_t crossfaderID) =0;
- /**
- * volumeticks. therse are used to indicate volumechanges during a ramp
- */
- virtual void hookSystemSinkVolumeTick(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume) =0;
- /**
- * volumeticks. therse are used to indicate volumechanges during a ramp
- */
- virtual void hookSystemSourceVolumeTick(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume) =0;
- /**
- * is called when an low level interrupt changed its state
- */
- virtual void hookSystemInterruptStateChange(const am_sourceID_t sourceID, const am_InterruptState_e interruptState) =0;
- /**
- * id called when a sink changed its availability
- */
- virtual void hookSystemSinkAvailablityStateChange(const am_sinkID_t sinkID, const am_Availability_s& availability) =0;
- /**
- * id called when a source changed its availability
- */
- virtual void hookSystemSourceAvailablityStateChange(const am_sourceID_t sourceID, const am_Availability_s& availability) =0;
- /**
- * id called when domainstate was changed
- */
- virtual void hookSystemDomainStateChange(const am_domainID_t domainID, const am_DomainState_e state) =0;
- /**
- * when early data was received
- */
- virtual void hookSystemReceiveEarlyData(const std::vector<am_EarlyData_s>& data) =0;
- /**
- * this hook provides information about speed changes.
- * The quantization and sampling rate of the speed can be adjusted at compile time
- * of the AudioManagerDaemon.
- */
- virtual void hookSystemSpeedChange(const am_speed_t speed) =0;
- /**
- * this hook is fired whenever the timing information of a mainconnection has
- * changed.
- */
- virtual void hookSystemTimingInformationChanged(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time) =0;
- /**
- * ack for connect
- */
- virtual void cbAckConnect(const am_Handle_s handle, const am_Error_e errorID) =0;
- /**
- * ack for disconnect
- */
- virtual void cbAckDisconnect(const am_Handle_s handle, const am_Error_e errorID) =0;
- /**
- * ack for crossfading
- */
- virtual void cbAckCrossFade(const am_Handle_s handle, const am_HotSink_e hostsink, const am_Error_e error) =0;
- /**
- * ack for sink volume changes
- */
- virtual void cbAckSetSinkVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error) =0;
- /**
- * ack for source volume changes
- */
- virtual void cbAckSetSourceVolumeChange(const am_Handle_s handle, const am_volume_t voulme, const am_Error_e error) =0;
- /**
- * ack for setting of source states
- */
- virtual void cbAckSetSourceState(const am_Handle_s handle, const am_Error_e error) =0;
- /**
- * ack for setting of sourcesoundproperties
- */
- virtual void cbAckSetSourceSoundProperties(const am_Handle_s handle, const am_Error_e error) =0;
- /**
- * ack for setting of sourcesoundproperties
- */
- virtual void cbAckSetSourceSoundProperty(const am_Handle_s handle, const am_Error_e error) =0;
- /**
- * ack for setting of sinksoundproperties
- */
- virtual void cbAckSetSinkSoundProperties(const am_Handle_s handle, const am_Error_e error) =0;
- /**
- * ack for setting of sinksoundproperties
- */
- virtual void cbAckSetSinkSoundProperty(const am_Handle_s handle, const am_Error_e error) =0;
- /**
- * This function is used by the routing algorithm to retrieve a priorized list of
- * connectionFormats from the Controller.
- * @return E_OK in case of successfull priorisation.
- */
- virtual am_Error_e getConnectionFormatChoice(const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_Route_s listRoute, const std::vector<am_CustomConnectionFormat_t> listPossibleConnectionFormats, std::vector<am_CustomConnectionFormat_t>& listPrioConnectionFormats) =0;
- /**
- * confirms the setCommandReady call
- */
- virtual void confirmCommandReady(const am_Error_e error) =0;
- /**
- * confirms the setRoutingReady call
- */
- virtual void confirmRoutingReady(const am_Error_e error) =0;
- /**
- * confirms the setCommandRundown call
- */
- virtual void confirmCommandRundown(const am_Error_e error) =0;
- /**
- * confirms the setRoutingRundown command
- */
- virtual void confirmRoutingRundown(const am_Error_e error) =0;
- /**
- * update form the SinkData
- */
- virtual 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) =0;
- /**
- * update from the source Data
- */
- virtual 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) =0;
- /**
- * updates the Converter Data
- */
- virtual am_Error_e hookSystemUpdateConverter(const am_converterID_t converterID, const std::vector<am_CustomConnectionFormat_t>& listSourceConnectionFormats, const std::vector<am_CustomConnectionFormat_t>& listSinkConnectionFormats, const std::vector<bool>& convertionMatrix) =0;
- /**
- * updates the Gateway Data
- */
- virtual am_Error_e hookSystemUpdateGateway(const am_gatewayID_t gatewayID, const std::vector<am_CustomConnectionFormat_t>& listSourceConnectionFormats, const std::vector<am_CustomConnectionFormat_t>& listSinkConnectionFormats, const std::vector<bool>& convertionMatrix) =0;
- /**
- * ack for mulitple volume changes
- */
- virtual void cbAckSetVolumes(const am_Handle_s handle, const std::vector<am_Volumes_s>& listVolumes, const am_Error_e error) =0;
- /**
- * The acknowledge of the sink notification configuration
- */
- virtual void cbAckSetSinkNotificationConfiguration(const am_Handle_s handle, const am_Error_e error) =0;
- /**
- * The acknowledge of the source notification configuration
- */
- virtual void cbAckSetSourceNotificationConfiguration(const am_Handle_s handle, const am_Error_e error) =0;
- /**
- * new sinkNotification data is there!
- */
- virtual void hookSinkNotificationDataChanged(const am_sinkID_t sinkID, const am_NotificationPayload_s& payload) =0;
- /**
- * new sourceNotification data is there!
- */
- virtual void hookSourceNotificationDataChanged(const am_sourceID_t sourceID, const am_NotificationPayload_s& payload) =0;
- /**
- * sets a user MainSinkNotificationConfiguration
- * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
- */
- virtual am_Error_e hookUserSetMainSinkNotificationConfiguration(const am_sinkID_t sinkID, const am_NotificationConfiguration_s& notificationConfiguration) =0;
- /**
- * sets a user MainSourceNotificationConfiguration
- * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
- */
- virtual am_Error_e hookUserSetMainSourceNotificationConfiguration(const am_sourceID_t sourceID, const am_NotificationConfiguration_s& notificationConfiguration) =0;
- /**
- * This hook is connected to the NodeState signal of the NodeStateManager
- */
- virtual void hookSystemNodeStateChanged(const NsmNodeState_e NodeStateId) =0;
- /**
- * This hook is connected to the NodeApplicationMode signal of the NodeStateManager
- */
- virtual void hookSystemNodeApplicationModeChanged(const NsmApplicationMode_e ApplicationModeId) =0;
- /**
- * the sessionstate change was send by the NSM
- */
- virtual void hookSystemSessionStateChanged(const std::string& sessionName, const NsmSeat_e seatID, const NsmSessionState_e sessionStateID) =0;
- /**
- * A lifecycle request comes in from the NSM and must be processed.
- * @return NsmErrorStatus_Ok if successful
- * The controller has to respond to this message with LifecycleRequestComplete.
- */
- virtual NsmErrorStatus_e hookSystemLifecycleRequest(const uint32_t Request, const uint32_t RequestId) =0;
-
-};
-}
-#endif // !defined(EA_0ABDDE72_16AD_4b27_A4DA_434305082DD5__INCLUDED_)
diff --git a/include/routing/IAmRoutingSend.h b/include/routing/IAmRoutingSend.h deleted file mode 100755 index c9b3d01..0000000 --- a/include/routing/IAmRoutingSend.h +++ /dev/null @@ -1,185 +0,0 @@ -/**
- * Copyright (C) 2012 - 2014, BMW AG
- *
- * This file is part of GENIVI Project AudioManager.
- *
- * Contributions are licensed to the GENIVI Alliance under one or more
- * Contribution License Agreements.
- *
- * \copyright
- * This Source Code Form is subject to the terms of the
- * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
- * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- *
- * \author Christian Linke, christian.linke@bmw.de BMW 2011 - 2014
- *
- * \file
- * For further information see http://projects.genivi.org/audio-manager
- *
- * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL.
- * PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN.
- */
-#if !defined(EA_F78CD115_BEE9_4caa_9112_1C297F24E2EB__INCLUDED_)
-#define EA_F78CD115_BEE9_4caa_9112_1C297F24E2EB__INCLUDED_
-
-#include <vector>
-#include <string>
-#include "audiomanagertypes.h"
-
-namespace am {
-class IAmRoutingReceive;
-}
-
-#include "IAmRoutingReceive.h"
-#include "audiomanagertypes.h"
-
-#define RoutingSendVersion "3.0"
-namespace am {
-
-/**
- * This class implements everything from Audiomanager -> RoutingAdapter
- * There are two rules that have to be kept in mind when implementing against this
- * interface:\n
- * \warning
- * 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
- * 2. YOU MAY NOT CALL THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS
- * CALL THAT EXPECTS A RETURN VALUE.\n
- * \details
- * Violation these rules may lead to unexpected behavior! Nevertheless you can
- * implement thread safe by using the deferred-call pattern described on the wiki
- * which also helps to implement calls that are forbidden.\n
- * For more information, please check CAmSerializer
- */
-class IAmRoutingSend
-{
-
-public:
- IAmRoutingSend() {
-
- }
-
- virtual ~IAmRoutingSend() {
-
- }
-
- /**
- * This function returns the version of the interface
- */
- virtual void getInterfaceVersion(std::string& version) const =0;
- /**
- * starts up the interface. In the implementations, here is the best place for
- * init routines.
- */
- virtual am_Error_e startupInterface(IAmRoutingReceive* routingreceiveinterface) =0;
- /**
- * indicates that the routing now ready to be used. Should be used as trigger to
- * register all sinks, sources, etc...
- */
- virtual void setRoutingReady(const uint16_t handle) =0;
- /**
- * indicates that the routing plugins need to be prepared to switch the power off
- * or be ready again.
- */
- virtual void setRoutingRundown(const uint16_t handle) =0;
- /**
- * aborts an asynchronous action.
- * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if handle was not
- * found
- */
- virtual am_Error_e asyncAbort(const am_Handle_s handle) =0;
- /**
- * connects a source to a sink
- * @return E_OK on success, E_UNKNOWN on error, E_WRONG_FORMAT in case
- * am_ConnectionFormat_e does not match
- */
- virtual am_Error_e asyncConnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_CustomConnectionFormat_t connectionFormat) =0;
- /**
- * disconnect a connection with given connectionID
- * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if connection was
- * not found
- */
- virtual am_Error_e asyncDisconnect(const am_Handle_s handle, const am_connectionID_t connectionID) =0;
- /**
- * this method is used to set the volume of a sink. This function is used to drive
- * ramps, to mute or unmute or directly set the value. The difference is made
- * through the ramptype.
- * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if new volume is
- * out of range
- */
- virtual am_Error_e asyncSetSinkVolume(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume, const am_CustomRampType_t ramp, const am_time_t time) =0;
- /**
- * sets the volume of a source. This method is used to set the volume of a sink.
- * This function is used to drive ramps, to mute or unmute or directly set the
- * value. The difference is made through the ramptype.
- * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if volume is out of
- * range.
- * triggers the acknowledge ackSourceVolumeChange
- */
- virtual am_Error_e asyncSetSourceVolume(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume, const am_CustomRampType_t ramp, const am_time_t time) =0;
- /**
- * This function is used to set the source state of a particular source.
- * @return E_OK on success, E_UNKNOWN on error
- */
- virtual am_Error_e asyncSetSourceState(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SourceState_e state) =0;
- /**
- * this function sets the sinksoundproperty.
- * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery
- * value is out of range
- */
- virtual am_Error_e asyncSetSinkSoundProperties(const am_Handle_s handle, const am_sinkID_t sinkID, const std::vector<am_SoundProperty_s>& listSoundProperties) =0;
- /**
- * this function sets the sinksoundproperty.
- * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery
- * value is out of range
- */
- virtual am_Error_e asyncSetSinkSoundProperty(const am_Handle_s handle, const am_sinkID_t sinkID, const am_SoundProperty_s& soundProperty) =0;
- /**
- * this function sets the sourcesoundproperty.
- * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery
- * value is out of range
- */
- virtual am_Error_e asyncSetSourceSoundProperties(const am_Handle_s handle, const am_sourceID_t sourceID, const std::vector<am_SoundProperty_s>& listSoundProperties) =0;
- /**
- * this function sets the sourcesoundproperty.
- * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery
- * value is out of range
- */
- virtual am_Error_e asyncSetSourceSoundProperty(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SoundProperty_s& soundProperty) =0;
- /**
- * this function triggers crossfading.
- * @return E_OK on success, E_UNKNOWN on error
- */
- virtual am_Error_e asyncCrossFade(const am_Handle_s handle, const am_crossfaderID_t crossfaderID, const am_HotSink_e hotSink, const am_CustomRampType_t rampType, const am_time_t time) =0;
- /**
- * this function is used for early and late audio functions to set the domain
- * state
- * @return E_OK on success, E_UNKNOWN on error
- */
- virtual am_Error_e setDomainState(const am_domainID_t domainID, const am_DomainState_e domainState) =0;
- /**
- * this method is used to retrieve the busname during startup of the plugin. Needs
- * to be implemented
- * @return E_OK on success, E_UNKNOWN on error
- */
- virtual am_Error_e returnBusName(std::string& BusName) const =0;
- /**
- * This command sets multiple source or and sink volumes within a domain at a time.
- * It can be used to synchronize volume setting events.
- * @return E_OK on success, E_UNKNOWN on error.
- */
- virtual am_Error_e asyncSetVolumes(const am_Handle_s handle, const std::vector<am_Volumes_s>& listVolumes) =0;
- /**
- * sets the notification configuration of a sink.
- * @return E_OK on success, E_UNKNOWN on error.
- */
- virtual am_Error_e asyncSetSinkNotificationConfiguration(const am_Handle_s handle, const am_sinkID_t sinkID, const am_NotificationConfiguration_s& notificationConfiguration) =0;
- /**
- * sets the notification configuration of a source.
- * @return E_OK on success, E_UNKNOWN on error.
- */
- virtual am_Error_e asyncSetSourceNotificationConfiguration(const am_Handle_s handle, const am_sourceID_t sourceID, const am_NotificationConfiguration_s& notificationConfiguration) =0;
-
-};
-}
-#endif // !defined(EA_F78CD115_BEE9_4caa_9112_1C297F24E2EB__INCLUDED_)
|