summaryrefslogtreecommitdiff
path: root/PluginControlInterface
diff options
context:
space:
mode:
authorchristian linke <christian.linke@bmw.de>2012-12-17 16:15:11 +0100
committerchristian linke <christian.linke@bmw.de>2012-12-17 16:15:11 +0100
commit54c5e965fe8f9a53a78834028fd65c792493da2b (patch)
tree560d7b1209e6a8d4798de9568e4b4a947c2ab42a /PluginControlInterface
parent215e8a72dc81e8a86dd5b3a8ca40fd2c7c6a0b9c (diff)
downloadaudiomanager-54c5e965fe8f9a53a78834028fd65c792493da2b.tar.gz
* added new interfaces & nsm support + nsm tests + fixed some unit tests + fixed rundown
Signed-off-by: christian linke <christian.linke@bmw.de>
Diffstat (limited to 'PluginControlInterface')
-rw-r--r--PluginControlInterface/include/CAmControlSenderBase.h25
-rw-r--r--PluginControlInterface/include/IAmControlReceiverShadow.h4
-rw-r--r--PluginControlInterface/src/CAmControlSenderBase.cpp152
-rw-r--r--PluginControlInterface/src/IAmControlReceiverShadow.cpp10
-rw-r--r--PluginControlInterface/test/MockIAmControlReceive.h329
5 files changed, 343 insertions, 177 deletions
diff --git a/PluginControlInterface/include/CAmControlSenderBase.h b/PluginControlInterface/include/CAmControlSenderBase.h
index 893cbaa..55758f0 100644
--- a/PluginControlInterface/include/CAmControlSenderBase.h
+++ b/PluginControlInterface/include/CAmControlSenderBase.h
@@ -30,7 +30,7 @@ public:
virtual ~CAmControlSenderBase();
am_Error_e startupController(IAmControlReceive* controlreceiveinterface);
void setControllerReady();
- void setControllerRundown();
+ void setControllerRundown(const int16_t signal);
am_Error_e hookUserConnectionRequest(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID);
am_Error_e hookUserDisconnectionRequest(const am_mainConnectionID_t connectionID);
am_Error_e hookUserSetMainSinkSoundProperty(const am_sinkID_t sinkID, const am_MainSoundProperty_s& soundProperty);
@@ -71,10 +71,25 @@ public:
void cbAckSetSinkSoundProperty(const am_Handle_s handle, const am_Error_e error);
am_Error_e getConnectionFormatChoice(const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_Route_s listRoute, const std::vector<am_ConnectionFormat_e> listPossibleConnectionFormats, std::vector<am_ConnectionFormat_e>& listPrioConnectionFormats);
void getInterfaceVersion(std::string& version) const;
- void confirmCommandReady();
- void confirmRoutingReady();
- void confirmCommandRundown();
- void confirmRoutingRundown();
+ void confirmCommandReady(const am_Error_e error) ;
+ void confirmRoutingReady(const am_Error_e error) ;
+ void confirmCommandRundown(const am_Error_e error) ;
+ void confirmRoutingRundown(const am_Error_e error) ;
+ 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_ConnectionFormat_e> listConnectionFormats, std::vector<am_MainSoundProperty_s> listMainSoundProperties) ;
+ 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_ConnectionFormat_e> listConnectionFormats, std::vector<am_MainSoundProperty_s> listMainSoundProperties) ;
+ am_Error_e hookSystemUpdateGateway(const am_gatewayID_t gatewayID, const std::vector<am_ConnectionFormat_e> listSourceConnectionFormats, const std::vector<am_ConnectionFormat_e> listSinkConnectionFormats, const std::vector<bool> convertionMatrix) ;
+ void cbAckSetVolume(const am_Handle_s handle, const std::vector<am_Volumes_s> listVolumes, const am_Error_e error) ;
+ void cbAckSetSinkNotificationConfiguration(const am_Handle_s handle, const am_Error_e error) ;
+ void cbAckSetSourceNotificationConfiguration(const am_Handle_s handle, const am_Error_e error) ;
+ void hookSinkNotificationDataChanged(const am_sinkID_t sinkID, const am_NotificationPayload_s payload) ;
+ void hookSourceNotificationDataChanged(const am_sourceID_t sourceID, const am_NotificationPayload_s payload) ;
+ am_Error_e hookUserSetMainSinkNotificationConfiguration(const am_sinkID_t sinkID, const am_NotificationConfiguration_s notificationConfiguration) ;
+ am_Error_e hookUserSetMainSourceNotificationConfiguration(const am_sourceID_t sourceID, const am_NotificationConfiguration_s notificationConfiguration) ;
+ void hookSystemNodeStateChanged(const NsmNodeState_e NodeStateId) ;
+ void hookSystemNodeApplicationModeChanged(const NsmApplicationMode_e ApplicationModeId) ;
+ void hookSystemSessionStateChanged(const std::string sessionName, const int32_t seatID, const NsmSessionState_e sessionStateID) ;
+ NsmErrorStatus_e hookSystemLifecycleRequest(const uint32_t Request, const uint32_t RequestId) ;
+
private:
IAmControlReceive * mControlReceiveInterface;
diff --git a/PluginControlInterface/include/IAmControlReceiverShadow.h b/PluginControlInterface/include/IAmControlReceiverShadow.h
index 830fc33..ed8c774 100644
--- a/PluginControlInterface/include/IAmControlReceiverShadow.h
+++ b/PluginControlInterface/include/IAmControlReceiverShadow.h
@@ -102,8 +102,8 @@ public:
void setCommandRundown();
void setRoutingReady();
void setRoutingRundown();
- void confirmControllerReady();
- void confirmControllerRundown();
+ void confirmControllerReady(am_Error_e error);
+ void confirmControllerRundown(am_Error_e error);
am_Error_e getSocketHandler(CAmSocketHandler*& socketHandler);
private:
IAmControlReceive *mpIAmControlReceiver;
diff --git a/PluginControlInterface/src/CAmControlSenderBase.cpp b/PluginControlInterface/src/CAmControlSenderBase.cpp
index 3e0c65b..8975c32 100644
--- a/PluginControlInterface/src/CAmControlSenderBase.cpp
+++ b/PluginControlInterface/src/CAmControlSenderBase.cpp
@@ -556,10 +556,13 @@ void CAmControlSenderBase::cbAckSetSinkSoundProperties(const am_Handle_s handle,
(void) handle;
}
-void CAmControlSenderBase::setControllerRundown()
+void CAmControlSenderBase::setControllerRundown(const int16_t signal)
{
- logInfo("CAmControlSenderBase::setControllerRundown() was called");
- mControlReceiveInterface->confirmControllerRundown();
+ logInfo("CAmControlSenderBase::setControllerRundown() was called signal=",signal);
+ if (signal==2)
+ mControlReceiveInterface->confirmControllerRundown(E_UNKNOWN);
+
+ mControlReceiveInterface->confirmControllerRundown(E_OK);
}
am_Error_e CAmControlSenderBase::getConnectionFormatChoice(const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_Route_s listRoute, const std::vector<am_ConnectionFormat_e> listPossibleConnectionFormats, std::vector<am_ConnectionFormat_e> & listPrioConnectionFormats)
@@ -577,20 +580,6 @@ void CAmControlSenderBase::getInterfaceVersion(std::string & version) const
version = ControlSendVersion;
}
-void CAmControlSenderBase::confirmCommandReady()
-{
- logInfo("ControlSenderPlugin got Routing Ready confirmed");
-}
-
-void CAmControlSenderBase::confirmRoutingReady()
-{
- logInfo("ControlSenderPlugin got Command Ready confirmed");
-}
-
-void CAmControlSenderBase::confirmRoutingRundown()
-{
- logInfo("ControlSenderPlugin got Command Rundown confirmed");
-}
void CAmControlSenderBase::disconnect(am_mainConnectionID_t connectionID)
{
@@ -621,11 +610,6 @@ void CAmControlSenderBase::disconnect(am_mainConnectionID_t connectionID)
mListOpenDisconnections.push_back(set);
}
-void CAmControlSenderBase::confirmCommandRundown()
-{
- logInfo("ControlSenderPlugin got Routing Rundown confirmed");
-}
-
void CAmControlSenderBase::connect(am_sourceID_t sourceID, am_sinkID_t sinkID, am_mainConnectionID_t mainConnectionID)
{
std::vector<am_Route_s> listRoutes;
@@ -771,6 +755,130 @@ void CAmControlSenderBase::callNaviHandler()
}
}
+void CAmControlSenderBase::confirmCommandReady(const am_Error_e error)
+{
+ (void) error;
+ logInfo("ControlSenderPlugin got Command Ready confirmed");
+}
+
+void CAmControlSenderBase::confirmRoutingReady(const am_Error_e error)
+{
+ (void)error;
+ logInfo("ControlSenderPlugin got Routing Ready confirmed");
+}
+
+void CAmControlSenderBase::confirmCommandRundown(const am_Error_e error)
+{
+ (void)error;
+ logInfo("ControlSenderPlugin got Command Rundown confirmed");
+}
+
+void CAmControlSenderBase::confirmRoutingRundown(const am_Error_e error)
+{
+ (void)error;
+ logInfo("ControlSenderPlugin got Routing Rundown confirmed");
+}
+
+void CAmControlSenderBase::hookSystemNodeStateChanged(const NsmNodeState_e NodeStateId)
+{
+ (void) NodeStateId;
+ //here you can process informations about the notestate
+}
+
+void CAmControlSenderBase::hookSystemNodeApplicationModeChanged(const NsmApplicationMode_e ApplicationModeId)
+{
+ (void) ApplicationModeId;
+}
+
+void CAmControlSenderBase::hookSystemSessionStateChanged(const std::string sessionName, const int32_t seatID, const NsmSessionState_e sessionStateID)
+{
+ (void) sessionName;
+ (void) seatID;
+ (void) sessionStateID;
+}
+
+am_Error_e CAmControlSenderBase::hookSystemUpdateSink(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector<am_SoundProperty_s> listSoundProperties, const std::vector<am_ConnectionFormat_e> listConnectionFormats, std::vector<am_MainSoundProperty_s> listMainSoundProperties)
+{
+ (void) sinkID;
+ (void) sinkClassID;
+ (void) listMainSoundProperties;
+ (void) listConnectionFormats;
+ (void) listSoundProperties;
+ return (E_NOT_USED);
+ }
+
+am_Error_e CAmControlSenderBase::hookSystemUpdateSource(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector<am_SoundProperty_s> listSoundProperties, const std::vector<am_ConnectionFormat_e> listConnectionFormats, std::vector<am_MainSoundProperty_s> listMainSoundProperties)
+{
+ (void) sourceID;
+ (void) sourceClassID;
+ (void) listSoundProperties;
+ (void) listMainSoundProperties;
+ (void) listConnectionFormats;
+ return (E_NOT_USED);
+ }
+
+am_Error_e CAmControlSenderBase::hookSystemUpdateGateway(const am_gatewayID_t gatewayID, const std::vector<am_ConnectionFormat_e> listSourceConnectionFormats, const std::vector<am_ConnectionFormat_e> listSinkConnectionFormats, const std::vector<bool> convertionMatrix)
+{
+ (void) gatewayID;
+ (void) listSourceConnectionFormats;
+ (void) listSinkConnectionFormats;
+ (void) convertionMatrix;
+ return (E_NOT_USED);
+}
+
+void CAmControlSenderBase::cbAckSetVolume(const am_Handle_s handle, const std::vector<am_Volumes_s> listVolumes, const am_Error_e error)
+{
+ (void) handle;
+ (void) listVolumes;
+ (void) error;
+}
+
+void CAmControlSenderBase::cbAckSetSinkNotificationConfiguration(const am_Handle_s handle, const am_Error_e error)
+{
+ (void) handle;
+ (void) error;
+}
+
+void CAmControlSenderBase::cbAckSetSourceNotificationConfiguration(const am_Handle_s handle, const am_Error_e error)
+{
+ (void) handle;
+ (void) error;
+}
+
+void CAmControlSenderBase::hookSinkNotificationDataChanged(const am_sinkID_t sinkID, const am_NotificationPayload_s payload)
+{
+ (void) sinkID;
+ (void) payload;
+}
+
+void CAmControlSenderBase::hookSourceNotificationDataChanged(const am_sourceID_t sourceID, const am_NotificationPayload_s payload)
+{
+ (void) sourceID;
+ (void) payload;
+}
+
+am_Error_e CAmControlSenderBase::hookUserSetMainSinkNotificationConfiguration(const am_sinkID_t sinkID, const am_NotificationConfiguration_s notificationConfiguration)
+{
+ (void) sinkID;
+ (void) notificationConfiguration;
+ return (E_NOT_USED);
+}
+
+am_Error_e CAmControlSenderBase::hookUserSetMainSourceNotificationConfiguration(const am_sourceID_t sourceID, const am_NotificationConfiguration_s notificationConfiguration)
+{
+ (void) sourceID;
+ (void) notificationConfiguration;
+ return (E_NOT_USED);
+}
+
+NsmErrorStatus_e CAmControlSenderBase::hookSystemLifecycleRequest(const uint32_t Request, const uint32_t RequestId)
+{
+ (void) Request;
+ (void) RequestId;
+ logInfo("CAmControlSenderBase::hookSystemLifecycleRequest request=",Request," requestID=",RequestId);
+ return (NsmErrorStatus_Error);
+}
+
void CAmControlSenderBase::callTAHandler()
{
logInfo("CAmControlSenderBase::callTAHandler() called, state ",mConnectSf);
diff --git a/PluginControlInterface/src/IAmControlReceiverShadow.cpp b/PluginControlInterface/src/IAmControlReceiverShadow.cpp
index 78083cc..6546deb 100644
--- a/PluginControlInterface/src/IAmControlReceiverShadow.cpp
+++ b/PluginControlInterface/src/IAmControlReceiverShadow.cpp
@@ -319,14 +319,14 @@ void IAmControlReceiverShadow::setRoutingRundown()
mCAmSerializer.asyncCall<IAmControlReceive>(mpIAmControlReceiver, &IAmControlReceive::setRoutingRundown);
}
-void IAmControlReceiverShadow::confirmControllerReady()
+void am::IAmControlReceiverShadow::confirmControllerReady(am_Error_e error)
{
- mCAmSerializer.asyncCall<IAmControlReceive>(mpIAmControlReceiver, &IAmControlReceive::confirmControllerReady);
+ mCAmSerializer.asyncCall<IAmControlReceive,am_Error_e>(mpIAmControlReceiver,&IAmControlReceive::confirmControllerReady,error);
}
-void IAmControlReceiverShadow::confirmControllerRundown()
+void am::IAmControlReceiverShadow::confirmControllerRundown(am_Error_e error)
{
- mCAmSerializer.asyncCall<IAmControlReceive>(mpIAmControlReceiver, &IAmControlReceive::confirmControllerRundown);
+ mCAmSerializer.asyncCall<IAmControlReceive,am_Error_e>(mpIAmControlReceiver, &IAmControlReceive::confirmControllerRundown,error);
}
am_Error_e IAmControlReceiverShadow::getSocketHandler(CAmSocketHandler *& socketHandler)
@@ -518,4 +518,6 @@ am_Error_e IAmControlReceiverShadow::getListGatewaysOfDomain(am_domainID_t domai
return (error);
}
+
+
} /* namespace am */
diff --git a/PluginControlInterface/test/MockIAmControlReceive.h b/PluginControlInterface/test/MockIAmControlReceive.h
index 09ef539..b90574f 100644
--- a/PluginControlInterface/test/MockIAmControlReceive.h
+++ b/PluginControlInterface/test/MockIAmControlReceive.h
@@ -25,150 +25,191 @@ namespace am {
class MockIAmControlReceive : public IAmControlReceive {
public:
- MOCK_METHOD4(getRoute,
- am_Error_e(const bool onlyfree, const am_sourceID_t sourceID, const am_sinkID_t sinkID, std::vector<am_Route_s>& returnList));
- MOCK_METHOD5(connect,
- am_Error_e(am_Handle_s& handle, am_connectionID_t& connectionID, const am_ConnectionFormat_e format, const am_sourceID_t sourceID, const am_sinkID_t sinkID));
- MOCK_METHOD2(disconnect,
- am_Error_e(am_Handle_s& handle, const am_connectionID_t connectionID));
- MOCK_METHOD5(crossfade,
- am_Error_e(am_Handle_s& handle, const am_HotSink_e hotSource, const am_crossfaderID_t crossfaderID, const am_RampType_e rampType, const am_time_t rampTime));
- MOCK_METHOD1(abortAction,
- am_Error_e(const am_Handle_s handle));
- MOCK_METHOD3(setSourceState,
- am_Error_e(am_Handle_s& handle, const am_sourceID_t sourceID, const am_SourceState_e state));
- MOCK_METHOD5(setSinkVolume,
- am_Error_e(am_Handle_s& handle, const am_sinkID_t sinkID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time));
- MOCK_METHOD5(setSourceVolume,
- am_Error_e(am_Handle_s& handle, const am_sourceID_t sourceID, const am_volume_t volume, const am_RampType_e rampType, const am_time_t time));
- MOCK_METHOD3(setSinkSoundProperties,
- am_Error_e(am_Handle_s& handle, const am_sinkID_t sinkID, const std::vector<am_SoundProperty_s>& soundProperty));
- MOCK_METHOD3(setSinkSoundProperty,
- am_Error_e(am_Handle_s& handle, const am_sinkID_t sinkID, const am_SoundProperty_s& soundProperty));
- MOCK_METHOD3(setSourceSoundProperties,
- am_Error_e(am_Handle_s& handle, const am_sourceID_t sourceID, const std::vector<am_SoundProperty_s>& soundProperty));
- MOCK_METHOD3(setSourceSoundProperty,
- am_Error_e(am_Handle_s& handle, const am_sourceID_t sourceID, const am_SoundProperty_s& soundProperty));
- MOCK_METHOD2(setDomainState,
- am_Error_e(const am_domainID_t domainID, const am_DomainState_e domainState));
- MOCK_METHOD2(enterDomainDB,
- am_Error_e(const am_Domain_s& domainData, am_domainID_t& domainID));
- MOCK_METHOD2(enterMainConnectionDB,
- am_Error_e(const am_MainConnection_s& mainConnectionData, am_mainConnectionID_t& connectionID));
- MOCK_METHOD2(enterSinkDB,
- am_Error_e(const am_Sink_s& sinkData, am_sinkID_t& sinkID));
- MOCK_METHOD2(enterCrossfaderDB,
- am_Error_e(const am_Crossfader_s& crossfaderData, am_crossfaderID_t& crossfaderID));
- MOCK_METHOD2(enterGatewayDB,
- am_Error_e(const am_Gateway_s& gatewayData, am_gatewayID_t& gatewayID));
- MOCK_METHOD2(enterSourceDB,
- am_Error_e(const am_Source_s& sourceData, am_sourceID_t& sourceID));
- MOCK_METHOD2(enterSinkClassDB,
- am_Error_e(const am_SinkClass_s& sinkClass, am_sinkClass_t& sinkClassID));
- MOCK_METHOD2(enterSourceClassDB,
- am_Error_e(am_sourceClass_t& sourceClassID, const am_SourceClass_s& sourceClass));
- MOCK_METHOD1(changeSinkClassInfoDB,
- am_Error_e(const am_SinkClass_s& sinkClass));
- MOCK_METHOD1(changeSourceClassInfoDB,
- am_Error_e(const am_SourceClass_s& sourceClass));
- MOCK_METHOD1(enterSystemPropertiesListDB,
- am_Error_e(const std::vector<am_SystemProperty_s>& listSystemProperties));
- MOCK_METHOD2(changeMainConnectionRouteDB,
- am_Error_e(const am_mainConnectionID_t mainconnectionID, const std::vector<am_connectionID_t>& listConnectionID));
- MOCK_METHOD2(changeMainConnectionStateDB,
- am_Error_e(const am_mainConnectionID_t mainconnectionID, const am_ConnectionState_e connectionState));
- MOCK_METHOD2(changeSinkMainVolumeDB,
- am_Error_e(const am_mainVolume_t mainVolume, const am_sinkID_t sinkID));
- MOCK_METHOD2(changeSinkAvailabilityDB,
- am_Error_e(const am_Availability_s& availability, const am_sinkID_t sinkID));
- MOCK_METHOD2(changDomainStateDB,
- am_Error_e(const am_DomainState_e domainState, const am_domainID_t domainID));
- MOCK_METHOD2(changeSinkMuteStateDB,
- am_Error_e(const am_MuteState_e muteState, const am_sinkID_t sinkID));
- MOCK_METHOD2(changeMainSinkSoundPropertyDB,
- am_Error_e(const am_MainSoundProperty_s& soundProperty, const am_sinkID_t sinkID));
- MOCK_METHOD2(changeMainSourceSoundPropertyDB,
- am_Error_e(const am_MainSoundProperty_s& soundProperty, const am_sourceID_t sourceID));
- MOCK_METHOD2(changeSourceAvailabilityDB,
- am_Error_e(const am_Availability_s& availability, const am_sourceID_t sourceID));
- MOCK_METHOD1(changeSystemPropertyDB,
- am_Error_e(const am_SystemProperty_s& property));
- MOCK_METHOD1(removeMainConnectionDB,
- am_Error_e(const am_mainConnectionID_t mainConnectionID));
- MOCK_METHOD1(removeSinkDB,
- am_Error_e(const am_sinkID_t sinkID));
- MOCK_METHOD1(removeSourceDB,
- am_Error_e(const am_sourceID_t sourceID));
- MOCK_METHOD1(removeGatewayDB,
- am_Error_e(const am_gatewayID_t gatewayID));
- MOCK_METHOD1(removeCrossfaderDB,
- am_Error_e(const am_crossfaderID_t crossfaderID));
- MOCK_METHOD1(removeDomainDB,
- am_Error_e(const am_domainID_t domainID));
- MOCK_METHOD1(removeSinkClassDB,
- am_Error_e(const am_sinkClass_t sinkClassID));
- MOCK_METHOD1(removeSourceClassDB,
- am_Error_e(const am_sourceClass_t sourceClassID));
- MOCK_CONST_METHOD2(getSourceClassInfoDB,
- am_Error_e(const am_sourceID_t sourceID, am_SourceClass_s& classInfo));
- MOCK_CONST_METHOD2(getSinkClassInfoDB,
- am_Error_e(const am_sinkID_t sinkID, am_SinkClass_s& sinkClass));
- MOCK_CONST_METHOD2(getSinkInfoDB,
- am_Error_e(const am_sinkID_t sinkID, am_Sink_s& sinkData));
- MOCK_CONST_METHOD2(getSourceInfoDB,
- am_Error_e(const am_sourceID_t sourceID, am_Source_s& sourceData));
- MOCK_CONST_METHOD2(getGatewayInfoDB,
- am_Error_e(const am_gatewayID_t gatewayID, am_Gateway_s& gatewayData));
- MOCK_CONST_METHOD2(getCrossfaderInfoDB,
- am_Error_e(const am_crossfaderID_t crossfaderID, am_Crossfader_s& crossfaderData));
- MOCK_CONST_METHOD2(getMainConnectionInfoDB,
- am_Error_e(const am_mainConnectionID_t mainConnectionID, am_MainConnection_s& mainConnectionData));
- MOCK_CONST_METHOD2(getListSinksOfDomain,
- am_Error_e(const am_domainID_t domainID, std::vector<am_sinkID_t>& listSinkID));
- MOCK_CONST_METHOD2(getListSourcesOfDomain,
- am_Error_e(const am_domainID_t domainID, std::vector<am_sourceID_t>& listSourceID));
- MOCK_CONST_METHOD2(getListCrossfadersOfDomain,
- am_Error_e(const am_domainID_t domainID, std::vector<am_crossfaderID_t>& listCrossfadersID));
- MOCK_CONST_METHOD2(getListGatewaysOfDomain,
- am_Error_e(const am_domainID_t domainID, std::vector<am_gatewayID_t>& listGatewaysID));
- MOCK_CONST_METHOD1(getListMainConnections,
- am_Error_e(std::vector<am_MainConnection_s>& listMainConnections));
- MOCK_CONST_METHOD1(getListDomains,
- am_Error_e(std::vector<am_Domain_s>& listDomains));
- MOCK_CONST_METHOD1(getListConnections,
- am_Error_e(std::vector<am_Connection_s>& listConnections));
- MOCK_CONST_METHOD1(getListSinks,
- am_Error_e(std::vector<am_Sink_s>& listSinks));
- MOCK_CONST_METHOD1(getListSources,
- am_Error_e(std::vector<am_Source_s>& listSources));
- MOCK_CONST_METHOD1(getListSourceClasses,
- am_Error_e(std::vector<am_SourceClass_s>& listSourceClasses));
- MOCK_CONST_METHOD1(getListHandles,
- am_Error_e(std::vector<am_Handle_s>& listHandles));
- MOCK_CONST_METHOD1(getListCrossfaders,
- am_Error_e(std::vector<am_Crossfader_s>& listCrossfaders));
- MOCK_CONST_METHOD1(getListGateways,
- am_Error_e(std::vector<am_Gateway_s>& listGateways));
- MOCK_CONST_METHOD1(getListSinkClasses,
- am_Error_e(std::vector<am_SinkClass_s>& listSinkClasses));
- MOCK_CONST_METHOD1(getListSystemProperties,
- am_Error_e(std::vector<am_SystemProperty_s>& listSystemProperties));
- MOCK_METHOD0(setCommandReady,
- void());
- MOCK_METHOD0(setCommandRundown,
- void());
- MOCK_METHOD0(setRoutingReady,
- void());
- MOCK_METHOD0(setRoutingRundown,
- void());
- MOCK_METHOD0(confirmControllerReady,
- void());
- MOCK_METHOD0(confirmControllerRundown,
- void());
- MOCK_METHOD1(getSocketHandler,
- am_Error_e(CAmSocketHandler*& socketHandler));
- MOCK_CONST_METHOD1(getInterfaceVersion,
- void(std::string& version));
+ MOCK_CONST_METHOD1(getInterfaceVersion,
+ void(std::string& version));
+ MOCK_METHOD4(getRoute,
+ am_Error_e(const bool onlyfree, const am_sourceID_t sourceID, const am_sinkID_t sinkID, std::vector<am_Route_s>& returnList));
+ MOCK_METHOD5(connect,
+ am_Error_e(am_Handle_s& handle, am_connectionID_t& connectionID, const am_ConnectionFormat_e format, const am_sourceID_t sourceID, const am_sinkID_t sinkID));
+ MOCK_METHOD2(disconnect,
+ am_Error_e(am_Handle_s& handle, const am_connectionID_t connectionID));
+ MOCK_METHOD5(crossfade,
+ am_Error_e(am_Handle_s& handle, const am_HotSink_e hotSource, const am_crossfaderID_t crossfaderID, const am_RampType_e rampType, const am_time_t rampTime));
+ MOCK_METHOD1(abortAction,
+ am_Error_e(const am_Handle_s handle));
+ MOCK_METHOD3(setSourceState,
+ am_Error_e(am_Handle_s& handle, const am_sourceID_t sourceID, const am_SourceState_e state));
+ MOCK_METHOD5(setSinkVolume,
+ am_Error_e(am_Handle_s& handle, const am_sinkID_t sinkID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time));
+ MOCK_METHOD5(setSourceVolume,
+ am_Error_e(am_Handle_s& handle, const am_sourceID_t sourceID, const am_volume_t volume, const am_RampType_e rampType, const am_time_t time));
+ MOCK_METHOD3(setSinkSoundProperties,
+ am_Error_e(am_Handle_s& handle, const am_sinkID_t sinkID, const std::vector<am_SoundProperty_s>& soundProperty));
+ MOCK_METHOD3(setSinkSoundProperty,
+ am_Error_e(am_Handle_s& handle, const am_sinkID_t sinkID, const am_SoundProperty_s& soundProperty));
+ MOCK_METHOD3(setSourceSoundProperties,
+ am_Error_e(am_Handle_s& handle, const am_sourceID_t sourceID, const std::vector<am_SoundProperty_s>& soundProperty));
+ MOCK_METHOD3(setSourceSoundProperty,
+ am_Error_e(am_Handle_s& handle, const am_sourceID_t sourceID, const am_SoundProperty_s& soundProperty));
+ MOCK_METHOD2(setDomainState,
+ am_Error_e(const am_domainID_t domainID, const am_DomainState_e domainState));
+ MOCK_METHOD2(enterDomainDB,
+ am_Error_e(const am_Domain_s& domainData, am_domainID_t& domainID));
+ MOCK_METHOD2(enterMainConnectionDB,
+ am_Error_e(const am_MainConnection_s& mainConnectionData, am_mainConnectionID_t& connectionID));
+ MOCK_METHOD2(enterSinkDB,
+ am_Error_e(const am_Sink_s& sinkData, am_sinkID_t& sinkID));
+ MOCK_METHOD2(enterCrossfaderDB,
+ am_Error_e(const am_Crossfader_s& crossfaderData, am_crossfaderID_t& crossfaderID));
+ MOCK_METHOD2(enterGatewayDB,
+ am_Error_e(const am_Gateway_s& gatewayData, am_gatewayID_t& gatewayID));
+ MOCK_METHOD2(enterSourceDB,
+ am_Error_e(const am_Source_s& sourceData, am_sourceID_t& sourceID));
+ MOCK_METHOD2(enterSinkClassDB,
+ am_Error_e(const am_SinkClass_s& sinkClass, am_sinkClass_t& sinkClassID));
+ MOCK_METHOD2(enterSourceClassDB,
+ am_Error_e(am_sourceClass_t& sourceClassID, const am_SourceClass_s& sourceClass));
+ MOCK_METHOD1(changeSinkClassInfoDB,
+ am_Error_e(const am_SinkClass_s& sinkClass));
+ MOCK_METHOD1(changeSourceClassInfoDB,
+ am_Error_e(const am_SourceClass_s& sourceClass));
+ MOCK_METHOD1(enterSystemPropertiesListDB,
+ am_Error_e(const std::vector<am_SystemProperty_s>& listSystemProperties));
+ MOCK_METHOD2(changeMainConnectionRouteDB,
+ am_Error_e(const am_mainConnectionID_t mainconnectionID, const std::vector<am_connectionID_t>& listConnectionID));
+ MOCK_METHOD2(changeMainConnectionStateDB,
+ am_Error_e(const am_mainConnectionID_t mainconnectionID, const am_ConnectionState_e connectionState));
+ MOCK_METHOD2(changeSinkMainVolumeDB,
+ am_Error_e(const am_mainVolume_t mainVolume, const am_sinkID_t sinkID));
+ MOCK_METHOD2(changeSinkAvailabilityDB,
+ am_Error_e(const am_Availability_s& availability, const am_sinkID_t sinkID));
+ MOCK_METHOD2(changDomainStateDB,
+ am_Error_e(const am_DomainState_e domainState, const am_domainID_t domainID));
+ MOCK_METHOD2(changeSinkMuteStateDB,
+ am_Error_e(const am_MuteState_e muteState, const am_sinkID_t sinkID));
+ MOCK_METHOD2(changeMainSinkSoundPropertyDB,
+ am_Error_e(const am_MainSoundProperty_s& soundProperty, const am_sinkID_t sinkID));
+ MOCK_METHOD2(changeMainSourceSoundPropertyDB,
+ am_Error_e(const am_MainSoundProperty_s& soundProperty, const am_sourceID_t sourceID));
+ MOCK_METHOD2(changeSourceAvailabilityDB,
+ am_Error_e(const am_Availability_s& availability, const am_sourceID_t sourceID));
+ MOCK_METHOD1(changeSystemPropertyDB,
+ am_Error_e(const am_SystemProperty_s& property));
+ MOCK_METHOD1(removeMainConnectionDB,
+ am_Error_e(const am_mainConnectionID_t mainConnectionID));
+ MOCK_METHOD1(removeSinkDB,
+ am_Error_e(const am_sinkID_t sinkID));
+ MOCK_METHOD1(removeSourceDB,
+ am_Error_e(const am_sourceID_t sourceID));
+ MOCK_METHOD1(removeGatewayDB,
+ am_Error_e(const am_gatewayID_t gatewayID));
+ MOCK_METHOD1(removeCrossfaderDB,
+ am_Error_e(const am_crossfaderID_t crossfaderID));
+ MOCK_METHOD1(removeDomainDB,
+ am_Error_e(const am_domainID_t domainID));
+ MOCK_METHOD1(removeSinkClassDB,
+ am_Error_e(const am_sinkClass_t sinkClassID));
+ MOCK_METHOD1(removeSourceClassDB,
+ am_Error_e(const am_sourceClass_t sourceClassID));
+ MOCK_CONST_METHOD2(getSourceClassInfoDB,
+ am_Error_e(const am_sourceID_t sourceID, am_SourceClass_s& classInfo));
+ MOCK_CONST_METHOD2(getSinkClassInfoDB,
+ am_Error_e(const am_sinkID_t sinkID, am_SinkClass_s& sinkClass));
+ MOCK_CONST_METHOD2(getSinkInfoDB,
+ am_Error_e(const am_sinkID_t sinkID, am_Sink_s& sinkData));
+ MOCK_CONST_METHOD2(getSourceInfoDB,
+ am_Error_e(const am_sourceID_t sourceID, am_Source_s& sourceData));
+ MOCK_CONST_METHOD2(getGatewayInfoDB,
+ am_Error_e(const am_gatewayID_t gatewayID, am_Gateway_s& gatewayData));
+ MOCK_CONST_METHOD2(getCrossfaderInfoDB,
+ am_Error_e(const am_crossfaderID_t crossfaderID, am_Crossfader_s& crossfaderData));
+ MOCK_CONST_METHOD2(getMainConnectionInfoDB,
+ am_Error_e(const am_mainConnectionID_t mainConnectionID, am_MainConnection_s& mainConnectionData));
+ MOCK_CONST_METHOD2(getListSinksOfDomain,
+ am_Error_e(const am_domainID_t domainID, std::vector<am_sinkID_t>& listSinkID));
+ MOCK_CONST_METHOD2(getListSourcesOfDomain,
+ am_Error_e(const am_domainID_t domainID, std::vector<am_sourceID_t>& listSourceID));
+ MOCK_CONST_METHOD2(getListCrossfadersOfDomain,
+ am_Error_e(const am_domainID_t domainID, std::vector<am_crossfaderID_t>& listCrossfadersID));
+ MOCK_CONST_METHOD2(getListGatewaysOfDomain,
+ am_Error_e(const am_domainID_t domainID, std::vector<am_gatewayID_t>& listGatewaysID));
+ MOCK_CONST_METHOD1(getListMainConnections,
+ am_Error_e(std::vector<am_MainConnection_s>& listMainConnections));
+ MOCK_CONST_METHOD1(getListDomains,
+ am_Error_e(std::vector<am_Domain_s>& listDomains));
+ MOCK_CONST_METHOD1(getListConnections,
+ am_Error_e(std::vector<am_Connection_s>& listConnections));
+ MOCK_CONST_METHOD1(getListSinks,
+ am_Error_e(std::vector<am_Sink_s>& listSinks));
+ MOCK_CONST_METHOD1(getListSources,
+ am_Error_e(std::vector<am_Source_s>& listSources));
+ MOCK_CONST_METHOD1(getListSourceClasses,
+ am_Error_e(std::vector<am_SourceClass_s>& listSourceClasses));
+ MOCK_CONST_METHOD1(getListHandles,
+ am_Error_e(std::vector<am_Handle_s>& listHandles));
+ MOCK_CONST_METHOD1(getListCrossfaders,
+ am_Error_e(std::vector<am_Crossfader_s>& listCrossfaders));
+ MOCK_CONST_METHOD1(getListGateways,
+ am_Error_e(std::vector<am_Gateway_s>& listGateways));
+ MOCK_CONST_METHOD1(getListSinkClasses,
+ am_Error_e(std::vector<am_SinkClass_s>& listSinkClasses));
+ MOCK_CONST_METHOD1(getListSystemProperties,
+ am_Error_e(std::vector<am_SystemProperty_s>& listSystemProperties));
+ MOCK_METHOD0(setCommandReady,
+ void());
+ MOCK_METHOD0(setCommandRundown,
+ void());
+ MOCK_METHOD0(setRoutingReady,
+ void());
+ MOCK_METHOD0(setRoutingRundown,
+ void());
+ MOCK_METHOD1(confirmControllerReady,
+ void(const am_Error_e error));
+ MOCK_METHOD1(confirmControllerRundown,
+ void(const am_Error_e error));
+ MOCK_METHOD1(getSocketHandler,
+ am_Error_e(CAmSocketHandler*& socketHandler));
+ MOCK_METHOD5(changeSourceDB,
+ am_Error_e(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector<am_SoundProperty_s> listSoundProperties, const std::vector<am_ConnectionFormat_e> listConnectionFormats, const std::vector<am_MainSoundProperty_s> listMainSoundProperties));
+ MOCK_METHOD5(changeSinkDB,
+ am_Error_e(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector<am_SoundProperty_s> listSoundProperties, const std::vector<am_ConnectionFormat_e> listConnectionFormats, const std::vector<am_MainSoundProperty_s> listMainSoundProperties));
+ MOCK_METHOD4(changeGatewayDB,
+ am_Error_e(const am_gatewayID_t gatewayID, const std::vector<am_ConnectionFormat_e> listSourceConnectionFormats, const std::vector<am_ConnectionFormat_e> listSinkConnectionFormats, const std::vector<bool> convertionMatrix));
+ MOCK_METHOD2(setVolumes,
+ am_Error_e(am_Handle_s& handle, const std::vector<am_Volumes_s> listVolumes));
+ MOCK_METHOD3(setSinkNotificationConfiguration,
+ am_Error_e(am_Handle_s& handle, const am_sinkID_t sinkID, const am_NotificationConfiguration_s notificationConfiguration));
+ MOCK_METHOD3(setSourceNotificationConfiguration,
+ am_Error_e(am_Handle_s& handle, const am_sourceID_t sourceID, const am_NotificationConfiguration_s norificationConfiguration));
+ MOCK_METHOD2(sendSinkMainNotificationPayload,
+ void(const am_sinkID_t sinkID, const am_NotificationPayload_s notificationPayload));
+ MOCK_METHOD2(sendSourceMainNotificationPayload,
+ void(const am_sourceID_t sourceID, const am_NotificationPayload_s notificationPayload));
+ MOCK_METHOD2(changeMainSinkNotificationConfigurationDB,
+ am_Error_e(const am_sinkID_t sinkID, const am_NotificationConfiguration_s mainNotificationConfiguration));
+ MOCK_METHOD2(changeMainSourceNotificationConfigurationDB,
+ am_Error_e(const am_sourceID_t sourceID, const am_NotificationConfiguration_s mainNotificationConfiguration));
+ MOCK_METHOD1(nsmGetRestartReasonProperty,
+ am_Error_e(NsmRestartReason_e& restartReason));
+ MOCK_METHOD1(nsmGetShutdownReasonProperty,
+ am_Error_e(NsmShutdownReason_e& ShutdownReason));
+ MOCK_METHOD1(nsmGetRunningReasonProperty,
+ am_Error_e(NsmRunningReason_e& nsmRunningReason));
+ MOCK_METHOD1(nsmGetNodeState,
+ NsmErrorStatus_e(NsmNodeState_e& nsmNodeState));
+ MOCK_METHOD3(nsmGetSessionState,
+ NsmErrorStatus_e(const std::string& sessionName, const NsmSeat_e& seatID, NsmSessionState_e& sessionState));
+ MOCK_METHOD1(nsmGetApplicationMode,
+ NsmErrorStatus_e(NsmApplicationMode_e& applicationMode));
+ MOCK_METHOD2(nsmRegisterShutdownClient,
+ NsmErrorStatus_e(const uint32_t shutdownMode, const uint32_t timeoutMs));
+ MOCK_METHOD1(nsmUnRegisterShutdownClient,
+ NsmErrorStatus_e(const uint32_t shutdownMode));
+ MOCK_METHOD1(nsmGetInterfaceVersion,
+ am_Error_e(uint32_t& version));
+ MOCK_METHOD2(nsmSendLifecycleRequestComplete,
+ NsmErrorStatus_e(const uint32_t RequestId, const NsmErrorStatus_e status));
+
};
} // namespace am