summaryrefslogtreecommitdiff
path: root/PluginRoutingInterfaceDbus/src/IAmRoutingReceiverShadow.cpp
diff options
context:
space:
mode:
authorNrusingh Dash <ndash@jp.adit-jv.com>2013-02-26 23:56:44 +0900
committerChristian Linke <christian.linke@bmw.de>2013-02-28 18:14:36 +0100
commitdaef342a1840bb661826b9862603a49518d6d051 (patch)
treef1cd0462025b6b8c87c2aec5a76910a6626610aa /PluginRoutingInterfaceDbus/src/IAmRoutingReceiverShadow.cpp
parentc792169bbe6c5eb62175d053a2f6ce6eea1c8cab (diff)
downloadaudiomanager-daef342a1840bb661826b9862603a49518d6d051.tar.gz
- changed domainData, sourceData, sinkData, gatewayData, crossfaderData to D-Bus Struct - confirmRoutingReady, confirmRoutingRundown, hookDomainRegistrationComplete should reply even return type on D-Bus is void - to parse domainID "getUInt" is used instead of "getInt"
Signed-off-by: Nrusingh Dash <ndash@jp.adit-jv.com>
Diffstat (limited to 'PluginRoutingInterfaceDbus/src/IAmRoutingReceiverShadow.cpp')
-rw-r--r--PluginRoutingInterfaceDbus/src/IAmRoutingReceiverShadow.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/PluginRoutingInterfaceDbus/src/IAmRoutingReceiverShadow.cpp b/PluginRoutingInterfaceDbus/src/IAmRoutingReceiverShadow.cpp
index 4115a21..b07065e 100644
--- a/PluginRoutingInterfaceDbus/src/IAmRoutingReceiverShadow.cpp
+++ b/PluginRoutingInterfaceDbus/src/IAmRoutingReceiverShadow.cpp
@@ -146,9 +146,11 @@ void IAmRoutingReceiverShadowDbus::hookDomainRegistrationComplete(DBusConnection
(void) ((conn));
assert(mRoutingReceiveInterface != NULL);
mDBUSMessageHandler.initReceive(msg);
- am_domainID_t domainID(mDBUSMessageHandler.getInt());
+ am_domainID_t domainID(mDBUSMessageHandler.getUInt());
log(&routingDbus, DLT_LOG_INFO, "IAmRoutingReceiverShadow::hookDomainRegistrationComplete called, domainID", domainID);
mRoutingReceiveInterface->hookDomainRegistrationComplete((am_domainID_t)((domainID)));
+ mDBUSMessageHandler.initReply(msg);
+ mDBUSMessageHandler.sendMessage();
}
void IAmRoutingReceiverShadowDbus::ackConnect(DBusConnection* conn, DBusMessage* msg)
@@ -441,13 +443,7 @@ void IAmRoutingReceiverShadowDbus::registerCrossfader(DBusConnection* conn, DBus
(void) ((conn));
assert(mRoutingReceiveInterface != NULL);
mDBUSMessageHandler.initReceive(msg);
- am_Crossfader_s crossfader;
- crossfader.crossfaderID = mDBUSMessageHandler.getInt();
- crossfader.name = std::string(mDBUSMessageHandler.getString());
- crossfader.sinkID_A = mDBUSMessageHandler.getInt();
- crossfader.sinkID_B = mDBUSMessageHandler.getInt();
- crossfader.sourceID = mDBUSMessageHandler.getInt();
- crossfader.hotSink = (am_HotSink_e)((mDBUSMessageHandler.getInt()));
+ am_Crossfader_s crossfader (mDBUSMessageHandler.getCrossfaderData());
log(&routingDbus, DLT_LOG_INFO, "IAmRoutingReceiverShadow::registerCrossfader called, name", crossfader.name);
am_Error_e returnCode = mRoutingReceiveInterface->registerCrossfader(crossfader, crossfader.crossfaderID);
mDBUSMessageHandler.initReply(msg);
@@ -546,7 +542,7 @@ void IAmRoutingReceiverShadowDbus::hookDomainStateChange(DBusConnection* conn, D
(void) ((conn));
assert(mRoutingReceiveInterface != NULL);
mDBUSMessageHandler.initReceive(msg);
- am_domainID_t domainID = mDBUSMessageHandler.getInt();
+ am_domainID_t domainID = mDBUSMessageHandler.getUInt();
am_DomainState_e domainState = (am_DomainState_e)((mDBUSMessageHandler.getInt()));
log(&routingDbus, DLT_LOG_INFO, "IAmRoutingReceiverShadow::hookDomainStateChange called, hookDomainStateChange", domainID);
mRoutingReceiveInterface->hookDomainStateChange(domainID, domainState);
@@ -664,12 +660,14 @@ void IAmRoutingReceiverShadowDbus::confirmRoutingReady(DBusConnection* conn, DBu
(void) ((conn));
assert(mRoutingReceiveInterface != NULL);
mDBUSMessageHandler.initReceive(msg);
- am_domainID_t domainID(mDBUSMessageHandler.getInt());
+ am_domainID_t domainID(mDBUSMessageHandler.getUInt());
log(&routingDbus, DLT_LOG_INFO, "IAmRoutingReceiverShadowDbus::confirmRoutingReady called, domainID", domainID);
- mNumberDomains--;
- if(mNumberDomains==0)
- mRoutingReceiveInterface->confirmRoutingRundown(mHandle,E_OK);
+ mRoutingReceiveInterface->confirmRoutingReady(mHandle, E_OK);
+ mNumberDomains++;
+
+ mDBUSMessageHandler.initReply(msg);
+ mDBUSMessageHandler.sendMessage();
}
void IAmRoutingReceiverShadowDbus::confirmRoutingRundown(DBusConnection* conn, DBusMessage* msg)
@@ -677,7 +675,7 @@ void IAmRoutingReceiverShadowDbus::confirmRoutingRundown(DBusConnection* conn, D
(void) ((conn));
assert(mRoutingReceiveInterface != NULL);
mDBUSMessageHandler.initReceive(msg);
- am_domainID_t domainID(mDBUSMessageHandler.getInt());
+ am_domainID_t domainID(mDBUSMessageHandler.getUInt());
log(&routingDbus, DLT_LOG_INFO, "IAmRoutingReceiverShadowDbus::confirmRoutingRundown called, domainID", domainID);
mNumberDomains--;