diff options
author | Christian Linke <christian.linke@bmw.de> | 2013-07-01 19:06:58 +0200 |
---|---|---|
committer | Christian Linke <christian.linke@bmw.de> | 2013-07-01 19:06:58 +0200 |
commit | e18331e64352b881268ca6f8db1d127113dd1519 (patch) | |
tree | ac585243d780f24ccd8417cdc891eeaf88389dd9 /PluginRoutingInterfaceDbus | |
parent | 99d4dc063c4558223d58069b9b03a7eb89c96915 (diff) | |
download | audiomanager-e18331e64352b881268ca6f8db1d127113dd1519.tar.gz |
* added possibilty to ask for routing ready state
Signed-off-by: Christian Linke <christian.linke@bmw.de>
Diffstat (limited to 'PluginRoutingInterfaceDbus')
4 files changed, 23 insertions, 3 deletions
diff --git a/PluginRoutingInterfaceDbus/include/IAmRoutingReceiverShadow.h b/PluginRoutingInterfaceDbus/include/IAmRoutingReceiverShadow.h index bc0cb5e..4a1d781 100644 --- a/PluginRoutingInterfaceDbus/include/IAmRoutingReceiverShadow.h +++ b/PluginRoutingInterfaceDbus/include/IAmRoutingReceiverShadow.h @@ -82,6 +82,7 @@ public: void ackSourceNotificationConfiguration(DBusConnection *conn, DBusMessage *msg); void hookSinkNotificationDataChange(DBusConnection *conn, DBusMessage *msg); void hookSourceNotificationDataChange(DBusConnection *conn, DBusMessage *msg); + void getRoutingReadyStatus(DBusConnection* conn, DBusMessage* msg); /** * sets the pointer to the CommandReceiveInterface and registers Callback @@ -103,6 +104,7 @@ private: CAmRoutingDbusMessageHandler mDBUSMessageHandler; int16_t mNumberDomains; uint16_t mHandle; + bool mRoutingReady; /** * receives a callback whenever the path of the plugin is called diff --git a/PluginRoutingInterfaceDbus/include/RoutingReceiver.xml b/PluginRoutingInterfaceDbus/include/RoutingReceiver.xml index e9ac700..61073df 100644 --- a/PluginRoutingInterfaceDbus/include/RoutingReceiver.xml +++ b/PluginRoutingInterfaceDbus/include/RoutingReceiver.xml @@ -208,7 +208,10 @@ <method name="hookSourceNotificationDataChange"> <arg name="sourceID" type="q" direction="in" /> <arg name="payload" type="(nn)" direction="in" /> - </method> + </method> + <method name='getRoutingReadyState'> + <arg name='state' type='b' direction='out' /> + </method> <signal name="setRoutingReady"> </signal> diff --git a/PluginRoutingInterfaceDbus/include/RoutingSender.xml b/PluginRoutingInterfaceDbus/include/RoutingSender.xml index 40ec984..133a6fe 100644 --- a/PluginRoutingInterfaceDbus/include/RoutingSender.xml +++ b/PluginRoutingInterfaceDbus/include/RoutingSender.xml @@ -70,6 +70,7 @@ <arg name='domainID' type='q' direction='in' /> <arg name='domainState' type='q' direction='in' /> <arg name='error' type='i' direction='out' /> - </method> + </method> + </interface> </node> diff --git a/PluginRoutingInterfaceDbus/src/IAmRoutingReceiverShadow.cpp b/PluginRoutingInterfaceDbus/src/IAmRoutingReceiverShadow.cpp index 5f600be..435abf1 100644 --- a/PluginRoutingInterfaceDbus/src/IAmRoutingReceiverShadow.cpp +++ b/PluginRoutingInterfaceDbus/src/IAmRoutingReceiverShadow.cpp @@ -45,7 +45,8 @@ IAmRoutingReceiverShadowDbus::IAmRoutingReceiverShadowDbus(CAmRoutingSenderDbus* mFunctionMap(createMap()), // mDBUSMessageHandler(), // mNumberDomains(0), // - mHandle(0) + mHandle(0), // + mRoutingReady(false) { log(&routingDbus, DLT_LOG_INFO, "IAmRoutingReceiverShadow constructed"); } @@ -602,6 +603,16 @@ DBusHandlerResult IAmRoutingReceiverShadowDbus::receiveCallback(DBusConnection* return (reference->receiveCallbackDelegate(conn, msg)); } +void IAmRoutingReceiverShadowDbus::getRoutingReadyStatus(DBusConnection* conn, DBusMessage* msg) +{ + (void) ((conn)); + assert(mRoutingReceiveInterface != NULL); + mDBUSMessageHandler.initReply(msg); + mDBUSMessageHandler.append(mRoutingReady); + mDBUSMessageHandler.sendMessage(); +} + + void IAmRoutingReceiverShadowDbus::sendIntrospection(DBusConnection* conn, DBusMessage* msg) { assert(conn != NULL); @@ -714,11 +725,13 @@ void IAmRoutingReceiverShadowDbus::confirmRoutingRundown(DBusConnection* conn, D void IAmRoutingReceiverShadowDbus::gotReady(int16_t numberDomains, uint16_t handle) { + mRoutingReady=true; mNumberDomains=numberDomains; mHandle=handle; } void IAmRoutingReceiverShadowDbus::gotRundown(int16_t numberDomains, uint16_t handle) { + mRoutingReady=false; mNumberDomains=numberDomains; mHandle=handle; } @@ -903,6 +916,7 @@ IAmRoutingReceiverShadowDbus::functionMap_t IAmRoutingReceiverShadowDbus::create m["ackSourceNotificationConfiguration"] = &IAmRoutingReceiverShadowDbus::ackSourceNotificationConfiguration; m["hookSinkNotificationDataChange"] = &IAmRoutingReceiverShadowDbus::hookSinkNotificationDataChange; m["hookSourceNotificationDataChange"] = &IAmRoutingReceiverShadowDbus::hookSourceNotificationDataChange; + m["getRoutingReadyState"] = &IAmRoutingReceiverShadowDbus::getRoutingReadyStatus; return (m); } } |