From 54c5e965fe8f9a53a78834028fd65c792493da2b Mon Sep 17 00:00:00 2001 From: christian linke Date: Mon, 17 Dec 2012 16:15:11 +0100 Subject: * added new interfaces & nsm support + nsm tests + fixed some unit tests + fixed rundown Signed-off-by: christian linke --- AudioManagerDaemon/include/CAmCommandReceiver.h | 10 ++- AudioManagerDaemon/include/CAmCommandSender.h | 7 +++ AudioManagerDaemon/include/CAmControlReceiver.h | 27 +++++++- AudioManagerDaemon/include/CAmControlSender.h | 62 ++++++++++++++++--- AudioManagerDaemon/include/CAmDatabaseHandler.h | 9 +++ AudioManagerDaemon/include/CAmDatabaseObserver.h | 4 ++ .../include/CAmNodeStateCommunicator.h | 72 ++++++++++++++++++++++ AudioManagerDaemon/include/CAmRoutingReceiver.h | 15 ++++- AudioManagerDaemon/include/CAmRoutingSender.h | 6 ++ 9 files changed, 198 insertions(+), 14 deletions(-) create mode 100644 AudioManagerDaemon/include/CAmNodeStateCommunicator.h (limited to 'AudioManagerDaemon/include') diff --git a/AudioManagerDaemon/include/CAmCommandReceiver.h b/AudioManagerDaemon/include/CAmCommandReceiver.h index 0459614..8d5b4a6 100644 --- a/AudioManagerDaemon/include/CAmCommandReceiver.h +++ b/AudioManagerDaemon/include/CAmCommandReceiver.h @@ -60,9 +60,13 @@ public: am_Error_e getTimingInformation(const am_mainConnectionID_t mainConnectionID, am_timeSync_t& delay) const; am_Error_e getDBusConnectionWrapper(CAmDbusWrapper*& dbusConnectionWrapper) const; am_Error_e getSocketHandler(CAmSocketHandler*& socketHandler) const; + void confirmCommandReady(const uint16_t handle, const am_Error_e error); + void confirmCommandRundown(const uint16_t handle, const am_Error_e error); void getInterfaceVersion(std::string& version) const; - void confirmCommandReady(const uint16_t handle); - void confirmCommandRundown(const uint16_t handle); + am_Error_e getListSinkMainNotificationConfigurations(const am_sinkID_t sinkID, std::vector& listMainNotificationConfigurations) const; + am_Error_e getListSourceMainNotificationConfigurations(const am_sourceID_t sourceID, std::vector& listMainNotificationConfigurations) const; + am_Error_e setSinkMainNotificationConfiguration(const am_sinkID_t sinkID, const am_NotificationConfiguration_s mainNotificationConfiguration); + am_Error_e setSourceMainNotificationConfiguration(const am_sourceID_t sourceID, const am_NotificationConfiguration_s mainNotificationConfiguration); uint16_t getStartupHandle(); //!< returns a startup handle uint16_t getRundownHandle(); //!< returns a rundown handle @@ -81,6 +85,8 @@ private: std::vector mListRundownHandles; //!< list of handles that wait for a confirm bool mWaitStartup; //!< if true confirmation will be sent if list of handles = 0 bool mWaitRundown; //!< if true confirmation will be sent if list of handles = 0 + am_Error_e mLastErrorStartup; + am_Error_e mLastErrorRundown; }; } diff --git a/AudioManagerDaemon/include/CAmCommandSender.h b/AudioManagerDaemon/include/CAmCommandSender.h index 4605da4..cf41b77 100644 --- a/AudioManagerDaemon/include/CAmCommandSender.h +++ b/AudioManagerDaemon/include/CAmCommandSender.h @@ -65,6 +65,13 @@ public: void cbTimingInformationChanged(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time); void getInterfaceVersion(std::string& version) const; am_Error_e getListPlugins(std::vector& interfaces) const; + void cbSinkUpdated(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector& listMainSoundProperties); + void cbSourceUpdated(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector& listMainSoundProperties); + void cbSinkNotification(const am_sinkID_t sinkID, const am_NotificationPayload_s notification); + void cbSourceNotification(const am_sourceID_t sourceID, const am_NotificationPayload_s notification); + void cbSinkMainNotificationConfigurationChanged(const am_sinkID_t sinkID, const am_NotificationConfiguration_s mainNotificationConfiguration); + void cbSourceMainNotificationConfigurationChanged(const am_sourceID_t sourceID, const am_NotificationConfiguration_s mainNotificationConfiguration); + #ifdef UNIT_TEST friend class IAmCommandBackdoor; //this is to get access to the loaded plugins and be able to exchange the interfaces #endif diff --git a/AudioManagerDaemon/include/CAmControlReceiver.h b/AudioManagerDaemon/include/CAmControlReceiver.h index a911706..a7b2554 100644 --- a/AudioManagerDaemon/include/CAmControlReceiver.h +++ b/AudioManagerDaemon/include/CAmControlReceiver.h @@ -32,6 +32,7 @@ class CAmDatabaseHandler; class CAmRoutingSender; class CAmCommandSender; class CAmRouter; +class CAmNodeStateCommunicator; /** * This class is used to receive all commands from the control interface @@ -39,6 +40,7 @@ class CAmRouter; class CAmControlReceiver: public IAmControlReceive { public: + CAmControlReceiver(CAmDatabaseHandler *iDatabaseHandler, CAmRoutingSender *iRoutingSender, CAmCommandSender *iCommandSender, CAmSocketHandler *iSocketHandler, CAmRouter* iRouter, CAmNodeStateCommunicator* iNodeStateCommunicator); CAmControlReceiver(CAmDatabaseHandler *iDatabaseHandler, CAmRoutingSender *iRoutingSender, CAmCommandSender *iCommandSender, CAmSocketHandler *iSocketHandler, CAmRouter* iRouter); ~CAmControlReceiver(); am_Error_e getRoute(const bool onlyfree, const am_sourceID_t sourceID, const am_sinkID_t sinkID, std::vector& returnList); @@ -109,10 +111,30 @@ public: void setCommandRundown(); void setRoutingReady(); void setRoutingRundown(); - void confirmControllerReady(); - void confirmControllerRundown(); + void confirmControllerReady(const am_Error_e error); + void confirmControllerRundown(const am_Error_e error); am_Error_e getSocketHandler(CAmSocketHandler*& socketHandler); void getInterfaceVersion(std::string& version) const; + am_Error_e changeSourceDB(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector listSoundProperties, const std::vector listConnectionFormats, const std::vector listMainSoundProperties); + am_Error_e changeSinkDB(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector listSoundProperties, const std::vector listConnectionFormats, const std::vector listMainSoundProperties); + am_Error_e changeGatewayDB(const am_gatewayID_t gatewayID, const std::vector listSourceConnectionFormats, const std::vector listSinkConnectionFormats, const std::vector convertionMatrix); + am_Error_e setVolumes(am_Handle_s& handle, const std::vector listVolumes); + am_Error_e setSinkNotificationConfiguration(am_Handle_s& handle, const am_sinkID_t sinkID, const am_NotificationConfiguration_s notificationConfiguration); + am_Error_e setSourceNotificationConfiguration(am_Handle_s& handle, const am_sourceID_t sourceID, const am_NotificationConfiguration_s norificationConfiguration); + void sendSinkMainNotificationPayload(const am_sinkID_t sinkID, const am_NotificationPayload_s notificationPayload); + void sendSourceMainNotificationPayload(const am_sourceID_t sourceID, const am_NotificationPayload_s notificationPayload); + am_Error_e changeMainSinkNotificationConfigurationDB(const am_sinkID_t sinkID, const am_NotificationConfiguration_s mainNotificationConfiguration); + am_Error_e changeMainSourceNotificationConfigurationDB(const am_sourceID_t sourceID, const am_NotificationConfiguration_s mainNotificationConfiguration); + am_Error_e nsmGetRestartReasonProperty(NsmRestartReason_e& restartReason) ; + am_Error_e nsmGetShutdownReasonProperty(NsmShutdownReason_e& ShutdownReason) ; + am_Error_e nsmGetRunningReasonProperty(NsmRunningReason_e& nsmRunningReason) ; + NsmErrorStatus_e nsmGetNodeState(NsmNodeState_e& nsmNodeState) ; + NsmErrorStatus_e nsmGetSessionState(const std::string& sessionName, const NsmSeat_e& seatID, NsmSessionState_e& sessionState) ; + NsmErrorStatus_e nsmGetApplicationMode(NsmApplicationMode_e& applicationMode) ; + NsmErrorStatus_e nsmRegisterShutdownClient(const uint32_t shutdownMode, const uint32_t timeoutMs) ; + NsmErrorStatus_e nsmUnRegisterShutdownClient(const uint32_t shutdownMode) ; + am_Error_e nsmGetInterfaceVersion(uint32_t& version) ; + NsmErrorStatus_e nsmSendLifecycleRequestComplete(const uint32_t RequestId, const NsmErrorStatus_e status) ; private: CAmDatabaseHandler* mDatabaseHandler; //!< pointer tto the databasehandler @@ -120,6 +142,7 @@ private: CAmCommandSender* mCommandSender; //!< pointer to the command send interface CAmSocketHandler* mSocketHandler; //!< pointer to the socketHandler CAmRouter* mRouter; //!< pointer to the Router + CAmNodeStateCommunicator* mNodeStateCommunicator; }; } diff --git a/AudioManagerDaemon/include/CAmControlSender.h b/AudioManagerDaemon/include/CAmControlSender.h index 65db2c8..c62c7e8 100644 --- a/AudioManagerDaemon/include/CAmControlSender.h +++ b/AudioManagerDaemon/include/CAmControlSender.h @@ -27,6 +27,7 @@ #endif #include "control/IAmControlSend.h" +#include "shared/CAmSocketHandler.h" namespace am { @@ -37,11 +38,12 @@ namespace am class CAmControlSender { public: - CAmControlSender(std::string controlPluginFile); + CAmControlSender(std::string controlPluginFile,CAmSocketHandler* sockethandler); + CAmControlSender(); ~CAmControlSender(); 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) ; @@ -81,24 +83,68 @@ public: void cbAckSetSinkSoundProperties(const am_Handle_s handle, const am_Error_e error) ; 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 listPossibleConnectionFormats, std::vector& listPrioConnectionFormats) ; + 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) ; void getInterfaceVersion(std::string& version) const ; - void confirmCommandReady() ; - void confirmRoutingReady() ; - void confirmCommandRundown() ; - void confirmRoutingRundown() ; - static void CallsetControllerRundown() + am_Error_e hookSystemUpdateSink(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector listSoundProperties, const std::vector listConnectionFormats, std::vector listMainSoundProperties) ; + am_Error_e hookSystemUpdateSource(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector listSoundProperties, const std::vector listConnectionFormats, std::vector listMainSoundProperties) ; + am_Error_e hookSystemUpdateGateway(const am_gatewayID_t gatewayID, const std::vector listSourceConnectionFormats, const std::vector listSinkConnectionFromats, const std::vector convertionMatrix) ; + void cbAckSetVolume(const am_Handle_s handle, const std::vector 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) ; + + void receiverCallback(const pollfd pollfd, const sh_pollHandle_t handle, void* userData); + bool checkerCallback(const sh_pollHandle_t handle, void* userData); + bool dispatcherCallback(const sh_pollHandle_t handle, void* userData); + + void setControllerRundownSafe(int16_t signal) + { + int16_t p(signal); + write(mPipe[1], &p, sizeof(p)); + } + + TAmShPollFired receiverCallbackT; + TAmShPollCheck checkerCallbackT; + TAmShPollDispatch dispatcherCallbackT; + + //todo: add getSessionstate, interface nachbilden von org.genivi.NodeStateManager.LifeCycleConsumer, antwort nach NSM + //chek interface version RegisterShutdownClient, UnRegisterShutdownClient, GetSessionState, GetApplicationMode, GetNodeState + + //we need this here to call the rundown from the signal handler. In case everything screwed up + static void CallsetControllerRundown(int16_t signal) + { + if (mInstance) + mInstance->setControllerRundown(signal); + } + + //this static callback is used from the signal handler. It is used when a normal rundown is assumed and the mainloop is used to call rundown. + static void CallsetControllerRundownSafe(int16_t signal) { if (mInstance) - mInstance->setControllerRundown(); + { + mInstance->setControllerRundownSafe(signal); + } } #ifdef UNIT_TEST friend class IAmControlBackdoor; #endif private: + int mPipe[2]; void* mlibHandle; //!< pointer to the loaded control plugin interface IAmControlSend* mController; //!< pointer to the ControlSend interface static CAmControlSender* mInstance; + int16_t mSignal; }; } diff --git a/AudioManagerDaemon/include/CAmDatabaseHandler.h b/AudioManagerDaemon/include/CAmDatabaseHandler.h index e8e44c2..50a5bc7 100644 --- a/AudioManagerDaemon/include/CAmDatabaseHandler.h +++ b/AudioManagerDaemon/include/CAmDatabaseHandler.h @@ -136,6 +136,15 @@ public: am_Error_e peekSource(const std::string& name, am_sourceID_t& sourceID); am_Error_e peekSinkClassID(const std::string& name, am_sinkClass_t& sinkClassID); am_Error_e peekSourceClassID(const std::string& name, am_sourceClass_t& sourceClassID); + am_Error_e changeSource(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector listSoundProperties, const std::vector listConnectionFormats, const std::vector listMainSoundProperties); + am_Error_e changeSink(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector listSoundProperties, const std::vector listConnectionFormats, const std::vector listMainSoundProperties); + am_Error_e getListSinkMainNotificationConfigurations(const am_sinkID_t sinkID, std::vector& listMainNotificationConfigurations); + am_Error_e getListSourceMainNotificationConfigurations(const am_sourceID_t sourceID, std::vector& listMainNotificationConfigurations); + am_Error_e changeMainSinkNotificationConfigurationDB(const am_sinkID_t sinkID, const am_NotificationConfiguration_s mainNotificationConfiguration); + am_Error_e changeMainSourceNotificationConfigurationDB(const am_sourceID_t sourceID, const am_NotificationConfiguration_s mainNotificationConfiguration); + am_Error_e changeGatewayDB(const am_gatewayID_t gatewayID, const std::vector listSourceConnectionFormats, const std::vector listSinkConnectionFormats, const std::vector convertionMatrix); + am_Error_e changeSinkNotificationConfigurationDB(const am_sinkID_t sinkID,const am_NotificationConfiguration_s notificationConfiguration); + am_Error_e changeSourceNotificationConfigurationDB(const am_sourceID_t sourceID,const am_NotificationConfiguration_s notificationConfiguration); bool existMainConnection(const am_mainConnectionID_t mainConnectionID) const; bool existcrossFader(const am_crossfaderID_t crossfaderID) const; diff --git a/AudioManagerDaemon/include/CAmDatabaseObserver.h b/AudioManagerDaemon/include/CAmDatabaseObserver.h index 9d89ef8..e3a016d 100644 --- a/AudioManagerDaemon/include/CAmDatabaseObserver.h +++ b/AudioManagerDaemon/include/CAmDatabaseObserver.h @@ -66,6 +66,10 @@ public: void sinkMuteStateChanged(const am_sinkID_t sinkID, const am_MuteState_e muteState); void systemPropertyChanged(const am_SystemProperty_s& SystemProperty); void timingInformationChanged(const am_mainConnectionID_t mainConnection, const am_timeSync_t time); + void sinkUpdated(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector& listMainSoundProperties, const bool visible); + void sourceUpdated(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector& listMainSoundProperties, const bool visible); + void sinkMainNotificationConfigurationChanged(const am_sinkID_t sinkID, const am_NotificationConfiguration_s mainNotificationConfiguration); + void sourceMainNotificationConfigurationChanged(const am_sourceID_t sourceID, const am_NotificationConfiguration_s mainNotificationConfiguration); private: CAmCommandSender *mCommandSender; //!< pointer to the comandSender diff --git a/AudioManagerDaemon/include/CAmNodeStateCommunicator.h b/AudioManagerDaemon/include/CAmNodeStateCommunicator.h new file mode 100644 index 0000000..dfc6689 --- /dev/null +++ b/AudioManagerDaemon/include/CAmNodeStateCommunicator.h @@ -0,0 +1,72 @@ +/** + * Copyright (C) 2012, 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 2012 + * + * \file CAmNodeStateCommunicator.h + * For further information see http://www.genivi.org/. + * + */ +#ifndef CAMNODESTATECOMMUNICATOR_H_ +#define CAMNODESTATECOMMUNICATOR_H_ + +#include "shared/CAmDbusWrapper.h" +#include "NodeStateManager.h" + +namespace am +{ + +class CAmControlSender; + +/** communicates with the NSM + * The CAmNodeStateCommunicator communicates with the NodeStateManager via Dbus. Only works, if CAmDBusWrapper is enabled. + * The CAmNodeStateCommunicator is triggered via CAmControlReceiver, so you can communicate from the ControllerPlugin with it. + * Most if the interfaces are passive, so you get the information you need via retrieving it. If you need to register the AudioManager + * as LifeCycleConsumer, you need to call CAmNodeStateCommunicator::nsmRegisterShutdownClient which can be undone with CAmNodeStateCommunicator::nsmUnRegisterShutdownClient. + * After you have registered, you will get hookSystemLifecycleRequest on the ControlSendInterface of the controller. + * You should answer this within your set timeout with CAmNodeStateCommunicator::nsmSendLifecycleRequestComplete. + */ +class CAmNodeStateCommunicator +{ +public: + CAmNodeStateCommunicator(CAmDbusWrapper* iDbusWrapper); + virtual ~CAmNodeStateCommunicator(); + am_Error_e nsmGetRestartReasonProperty(NsmRestartReason_e& restartReason) ; + am_Error_e nsmGetShutdownReasonProperty(NsmShutdownReason_e& ShutdownReason) ; + am_Error_e nsmGetRunningReasonProperty(NsmRunningReason_e& nsmRunningReason) ; + NsmErrorStatus_e nsmGetNodeState(NsmNodeState_e& nsmNodeState) ; + NsmErrorStatus_e nsmGetSessionState(const std::string& sessionName, const NsmSeat_e& seatID, NsmSessionState_e& sessionState) ; + NsmErrorStatus_e nsmGetApplicationMode(NsmApplicationMode_e& applicationMode) ; + NsmErrorStatus_e nsmRegisterShutdownClient(const uint32_t shutdownMode, const uint32_t timeoutMs) ; + NsmErrorStatus_e nsmUnRegisterShutdownClient(const uint32_t shutdownMode) ; + am_Error_e nsmGetInterfaceVersion(uint32_t& version) ; + NsmErrorStatus_e nsmSendLifecycleRequestComplete(const uint32_t RequestId, const NsmErrorStatus_e status) ; + + void registerControlSender(CAmControlSender* iControlSender); + static DBusHandlerResult receiveCallback(DBusConnection *conn, DBusMessage *msg, void *user_data); + static DBusHandlerResult signalCallback(DBusConnection *conn, DBusMessage *msg, void *user_data); + + +private: + void sendIntrospection(DBusConnection* conn, DBusMessage* msg); + void sendMessage(DBusMessage* message, DBusMessage* origMessage); + DBusHandlerResult receiveCallbackDelegate(DBusConnection *conn, DBusMessage *msg); + am_Error_e readIntegerProperty(const std::string property, int32_t &value); + CAmDbusWrapper* mpDbusWrapper; + CAmControlSender* mpControlSender; + DBusConnection* mpDBusConnection; +}; + +} /* namespace am */ +#endif /* CAMNODESTATECOMMUNICATOR_H_ */ diff --git a/AudioManagerDaemon/include/CAmRoutingReceiver.h b/AudioManagerDaemon/include/CAmRoutingReceiver.h index ca2a4b4..3cb1225 100644 --- a/AudioManagerDaemon/include/CAmRoutingReceiver.h +++ b/AudioManagerDaemon/include/CAmRoutingReceiver.h @@ -79,8 +79,16 @@ public: am_Error_e getDBusConnectionWrapper(CAmDbusWrapper*& dbusConnectionWrapper) const; am_Error_e getSocketHandler(CAmSocketHandler*& socketHandler) const; void getInterfaceVersion(std::string& version) const; - void confirmRoutingReady(const uint16_t handle); - void confirmRoutingRundown(const uint16_t handle); + void confirmRoutingReady(const uint16_t handle, const am_Error_e error); + void confirmRoutingRundown(const uint16_t handle, const am_Error_e error); + am_Error_e updateGateway(const am_gatewayID_t gatewayID, std::vector listSourceFormats, const std::vector listSinkFormats, std::vector convertionMatrix); + am_Error_e updateSink(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector listSoundProperties, const std::vector listConnectionFormats, std::vector listMainSoundProperties); + am_Error_e updateSource(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, std::vector listSoundProperties, std::vector listConnectionFormats, const std::vector listMainSoundProperties); + void ackSetVolumes(const am_Handle_s handle, const std::vector listvolumes, const am_Error_e error); + void ackSinkNotificationConfiguration(const am_Handle_s handle, const am_Error_e error); + void ackSourceNotificationConfiguration(const am_Handle_s handle, const am_Error_e error) ; + void hookSinkNotificationDataChange(const am_sinkID_t sinkID, const am_NotificationPayload_s payload) ; + void hookSourceNotificationDataChange(const am_sourceID_t sourceID, const am_NotificationPayload_s payload) ; uint16_t getStartupHandle(); //!< returns a startup handle uint16_t getRundownHandle(); //!< returns a rundown handle @@ -101,6 +109,9 @@ private: bool mWaitStartup; //!< if true confirmation will be sent if list of handles = 0 bool mWaitRundown; //!< if true confirmation will be sent if list of handles = 0 + am_Error_e mLastStartupError; + am_Error_e mLastRundownError; + }; } diff --git a/AudioManagerDaemon/include/CAmRoutingSender.h b/AudioManagerDaemon/include/CAmRoutingSender.h index 5f58689..ac3f9a2 100644 --- a/AudioManagerDaemon/include/CAmRoutingSender.h +++ b/AudioManagerDaemon/include/CAmRoutingSender.h @@ -72,6 +72,9 @@ public: am_Error_e getListHandles(std::vector & listHandles) const; am_Error_e getListPlugins(std::vector& interfaces) const; void getInterfaceVersion(std::string& version) const; + am_Error_e asyncSetVolumes(am_Handle_s& handle, const std::vector& listVolumes); + am_Error_e asyncSetSinkNotificationConfiguration(am_Handle_s& handle, const am_sinkID_t sinkID, const am_NotificationConfiguration_s& notificationConfiguration); + am_Error_e asyncSetSourceNotificationConfiguration(am_Handle_s& handle, const am_sourceID_t sourceID, const am_NotificationConfiguration_s& notificationConfiguration); struct InterfaceNamePairs //!< is used to pair interfaces with busnames { @@ -88,6 +91,7 @@ public: am_sourceID_t sourceID; am_crossfaderID_t crossfaderID; am_connectionID_t connectionID; + am_DataType_u volumeID; }; union @@ -97,6 +101,8 @@ public: am_volume_t volume; am_HotSink_e hotSink; std::vector* soundProperties; + std::vector* listVolumes; + am_NotificationConfiguration_s* notificationConfiguration; }; }; -- cgit v1.2.1