summaryrefslogtreecommitdiff
path: root/include/control/IAmControlSend.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/control/IAmControlSend.h')
-rw-r--r--include/control/IAmControlSend.h229
1 files changed, 171 insertions, 58 deletions
diff --git a/include/control/IAmControlSend.h b/include/control/IAmControlSend.h
index bac33b2..9b2d0b9 100644
--- a/include/control/IAmControlSend.h
+++ b/include/control/IAmControlSend.h
@@ -12,15 +12,15 @@
* this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
- * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ * \author Christian Mueller, christian.linke@bmw.de BMW 2011,2012
*
* \file
* For further information see http://www.genivi.org/.
*
* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
-#if !defined(EA_B9BE9751_825D_44b9_86F1_C2F02E5FA3ED__INCLUDED_)
-#define EA_B9BE9751_825D_44b9_86F1_C2F02E5FA3ED__INCLUDED_
+#if !defined(EA_9CC33091_C4F5_4262_9C42_042DFB7606F2__INCLUDED_)
+#define EA_9CC33091_C4F5_4262_9C42_042DFB7606F2__INCLUDED_
#include <vector>
#include <string>
@@ -31,27 +31,25 @@ class IAmControlReceive;
}
#include "IAmControlReceive.h"
+#include "audiomanagertypes.h"
+#include "NodeStateManager.h"
-#define ControlSendVersion "1.0"
+#define ControlSendVersion "2.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
+ * 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
+ * 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
+ * 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
* @author Christian Mueller
- * @created 07-Mar-2012 6:06:18 PM
+ * @created 16-Dez-2012 15:58:15
*/
class IAmControlSend
{
@@ -75,25 +73,32 @@ namespace am {
/**
* Starts up the controller.
*
- * @param controlreceiveinterface This is a pointer to the
- * ControlReceiveInterface so that the controller knows to whom to communicate.
+ * @param controlreceiveinterface This is a pointer to the ControlReceiveInterface so that the controller knows to whom
+ * to communicate.
*/
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.
+ * 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.
+ * 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).
+ *
+ * @param signal The signal NO that was responsible for the rundown. Can be:
+ * SIGINT
+ * SIGQUIT
+ * SIGTERM
+ * SIGHUP
*/
- virtual void setControllerRundown() =0;
+ 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
+ * @return E_OK on success, E_NOT_POSSIBLE on error, E_ALREADY_EXISTENT if already exists
*
* @param sourceID
* @param sinkID
@@ -102,8 +107,7 @@ namespace am {
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
+ * @return E_OK on success, E_NOT_POSSIBLE on error, E_NON_EXISTENT if connection does not exists
*
* @param connectionID
*/
@@ -157,8 +161,7 @@ namespace am {
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
+ * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already exists
*
* @param domainData ID is omitted here since it has not been created yet
* @param domainID
@@ -179,8 +182,7 @@ namespace am {
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
+ * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already exists
*
* @param sinkData Id is omitted here, since it has not been created yet
* @param sinkID
@@ -195,8 +197,7 @@ namespace am {
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
+ * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already exists
*
* @param sourceData ID is omitted here since it is not yet created
* @param sourceID
@@ -211,11 +212,9 @@ namespace am {
virtual am_Error_e hookSystemDeregisterSource(const am_sourceID_t sourceID) =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
+ * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already exists
*
- * @param gatewayData gatewayID is not set here since it is not created at this
- * point of time
+ * @param gatewayData gatewayID is not set here since it is not created at this point of time
* @param gatewayID
*/
virtual am_Error_e hookSystemRegisterGateway(const am_Gateway_s& gatewayData, am_gatewayID_t& gatewayID) =0;
@@ -228,11 +227,9 @@ namespace am {
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
+ * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already exists
*
- * @param crossfaderData gatewayID is not set here since it is not created at
- * this point of time
+ * @param crossfaderData gatewayID is not set here since it is not created at this point of time
* @param crossfaderID
*/
virtual am_Error_e hookSystemRegisterCrossfader(const am_Crossfader_s& crossfaderData, am_crossfaderID_t& crossfaderID) =0;
@@ -295,15 +292,13 @@ namespace am {
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.
+ * The quantization and sampling rate of the speed can be adjusted at compile time of the AudioManagerDaemon.
*
* @param speed
*/
virtual void hookSystemSpeedChange(const am_speed_t speed) =0;
/**
- * this hook is fired whenever the timing information of a mainconnection has
- * changed.
+ * this hook is fired whenever the timing information of a mainconnection has changed.
*
* @param mainConnectionID
* @param time
@@ -343,8 +338,8 @@ namespace am {
* ack for source volume changes
*
* @param handle the handle that is connected to the volume change
- * @param voulme the volume after the action ended (the desired volume if
- * everything went right, the actual one in case of abortion)
+ * @param voulme the volume after the action ended (the desired volume if everything went right, the actual one in case
+ * of abortion)
* @param error
*/
virtual void cbAckSetSourceVolumeChange(const am_Handle_s handle, const am_volume_t voulme, const am_Error_e error) =0;
@@ -384,36 +379,154 @@ namespace am {
*/
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.
+ * 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.
*
* @param sourceID sourceID of source that shall be connected
* @param sinkID sinkID of sink that shall be connected
- * @param listRoute This route is the one the priorized connectionFormats is
- * for.
+ * @param listRoute This route is the one the priorized connectionFormats is for.
* @param listPossibleConnectionFormats list of possible connectionformats
- * @param listPrioConnectionFormats the list return with prioos from the
- * controller. Best choice on first position.
+ * @param listPrioConnectionFormats the list return with prioos from the controller. Best choice on first position.
*/
virtual 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) =0;
/**
* confirms the setCommandReady call
+ *
+ * @param error E_OK if everything went right. If a plugin returns an error, it will be forwared here
*/
- virtual void confirmCommandReady() =0;
+ virtual void confirmCommandReady(const am_Error_e error) =0;
/**
* confirms the setRoutingReady call
+ *
+ * @param error E_OK if everything went right. If a plugin returns an error, it will be forwared here
*/
- virtual void confirmRoutingReady() =0;
+ virtual void confirmRoutingReady(const am_Error_e error) =0;
/**
* confirms the setCommandRundown call
+ *
+ * @param error E_OK if everything went right. If a plugin returns an error, it will be forwared here
*/
- virtual void confirmCommandRundown() =0;
+ virtual void confirmCommandRundown(const am_Error_e error) =0;
/**
* confirms the setRoutingRundown command
+ *
+ * @param error E_OK if everything went right. If a plugin returns an error, it will be forwared here
+ */
+ virtual void confirmRoutingRundown(const am_Error_e error) =0;
+ /**
+ * update form the SinkData
+ *
+ * @param sinkID the sinkID
+ * @param sinkClassID
+ * @param listSoundProperties
+ * @param listConnectionFormats
+ * @param listMainSoundProperties
+ */
+ 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_ConnectionFormat_e> listConnectionFormats, std::vector<am_MainSoundProperty_s> listMainSoundProperties) =0;
+ /**
+ * update from the source Data
+ *
+ * @param sourceID the sourceID
+ * @param sourceClassID
+ * @param listSoundProperties
+ * @param listConnectionFormats
+ * @param listMainSoundProperties
+ */
+ 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_ConnectionFormat_e> listConnectionFormats, std::vector<am_MainSoundProperty_s> listMainSoundProperties) =0;
+ /**
+ * updates the Gateway Data
+ *
+ * @param gatewayID the gatewayID
+ * @param listSourceConnectionFormats
+ * @param listSinkConnectionFormats
+ * @param convertionMatrix
+ */
+ virtual 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) =0;
+ /**
+ * ack for mulitple volume changes
+ *
+ * @param handle
+ * @param listVolumes the list of volumes with the current status
+ * @param error
+ */
+ virtual void cbAckSetVolume(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
+ *
+ * @param handle the handle
+ * @param error the error
+ */
+ virtual void cbAckSetSinkNotificationConfiguration(const am_Handle_s handle, const am_Error_e error) =0;
+ /**
+ * The acknowledge of the sink notification configuration
+ *
+ * @param handle the handle
+ * @param error the error
+ */
+ virtual void cbAckSetSourceNotificationConfiguration(const am_Handle_s handle, const am_Error_e error) =0;
+ /**
+ *
+ * @param sinkID the sinkID of the changed notification
+ * @param payload the payload
+ */
+ virtual void hookSinkNotificationDataChanged(const am_sinkID_t sinkID, const am_NotificationPayload_s payload) =0;
+ /**
+ *
+ * @param sourceID the sinkID of the changed notification
+ * @param payload the payload
+ */
+ 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
+ *
+ * @param sinkID
+ * @param notificationConfiguration
+ */
+ 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
+ *
+ * @param sourceID
+ * @param notificationConfiguration
+ */
+ 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
+ *
+ * @param NodeStateId The new current state of the node
+ */
+ virtual void hookSystemNodeStateChanged(const NsmNodeState_e NodeStateId) =0;
+ /**
+ * This hook is connected to the NodeApplicationMode signal of the NodeStateManager
+ *
+ * @param ApplicationModeId The new ApplicationMode
+ */
+ virtual void hookSystemNodeApplicationModeChanged(const NsmApplicationMode_e ApplicationModeId) =0;
+ /**
+ * the sessionstate change was send by the NSM
+ *
+ * @param sessionName
+ * @param seatID
+ * @param sessionStateID
+ */
+ virtual void hookSystemSessionStateChanged(const std::string sessionName, const int32_t 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.
+ *
+ * @param Request the shutdown request from the NSM. One of the types
+ *
+ * NSM_SHUTDOWNTYPE_RUNUP, NSM_SHUTDOWNTYPE_NORMAL
+ * NSM_SHUTDOWNTYPE_FAST
+ *
+ * In order to receive this request, the controller needs to register for this request first via RegisterShutdownClient
+ * @param RequestId the requestID
*/
- virtual void confirmRoutingRundown() =0;
+ virtual NsmErrorStatus_e hookSystemLifecycleRequest(const uint32_t Request, const uint32_t RequestId) =0;
};
}
-#endif // !defined(EA_B9BE9751_825D_44b9_86F1_C2F02E5FA3ED__INCLUDED_)
+#endif // !defined(EA_9CC33091_C4F5_4262_9C42_042DFB7606F2__INCLUDED_)