summaryrefslogtreecommitdiff
path: root/PluginRoutingInterfaceDbus/include
diff options
context:
space:
mode:
authorchristian mueller <christian.ei.mueller@bmw.de>2012-04-04 15:27:10 +0200
committerchristian mueller <christian.ei.mueller@bmw.de>2012-04-04 15:49:13 +0200
commit06476e68a42077a0597628dca1c4a53cd20f5236 (patch)
treed8fbcaf89eb159ee76c7260bd6999558952dd9e8 /PluginRoutingInterfaceDbus/include
parent1f4b52faf447b12f1900c91db5090e04feb33578 (diff)
downloadaudiomanager-06476e68a42077a0597628dca1c4a53cd20f5236.tar.gz
* some enhancement to routingPluginDbus to make to get acces to all interfaces and handle multiple domains
Signed-off-by: christian mueller <christian.ei.mueller@bmw.de>
Diffstat (limited to 'PluginRoutingInterfaceDbus/include')
-rw-r--r--PluginRoutingInterfaceDbus/include/CAmDbusMessageHandler.h36
-rw-r--r--PluginRoutingInterfaceDbus/include/CAmDbusSend.h40
-rw-r--r--PluginRoutingInterfaceDbus/include/CAmRoutingSenderDbus.h78
-rw-r--r--PluginRoutingInterfaceDbus/include/IAmRoutingReceiverShadow.h143
-rw-r--r--PluginRoutingInterfaceDbus/include/RoutingReceiver.xml234
-rw-r--r--PluginRoutingInterfaceDbus/include/RoutingSender.xml85
6 files changed, 433 insertions, 183 deletions
diff --git a/PluginRoutingInterfaceDbus/include/CAmDbusMessageHandler.h b/PluginRoutingInterfaceDbus/include/CAmDbusMessageHandler.h
index 69f5d34..03d9eca 100644
--- a/PluginRoutingInterfaceDbus/include/CAmDbusMessageHandler.h
+++ b/PluginRoutingInterfaceDbus/include/CAmDbusMessageHandler.h
@@ -1,7 +1,9 @@
/**
* Copyright (c) copyright 2011-2012 Aricent® Group and its licensors
+ * Copyright (c) 2012 BMW
*
- * \author: Sampreeth Ramavana
+ * \author Sampreeth Ramavana
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
* \copyright
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
@@ -19,13 +21,12 @@
#define _CAMSDBUSMESSAGEHANDLER_H_
-#include <audiomanagertypes.h>
#include <dbus/dbus.h>
-#include <dlt/dlt.h>
#include <vector>
#include <sstream>
#include <string>
#include <list>
+#include "audiomanagertypes.h"
namespace am {
@@ -33,11 +34,11 @@ namespace am {
/**
* handles DBus Messages, is used to extract & append parameters and send messages
*/
-class CAmDbusMessageHandler
+class CAmRoutingDbusMessageHandler
{
public:
- CAmDbusMessageHandler();
- ~CAmDbusMessageHandler();
+ CAmRoutingDbusMessageHandler();
+ ~CAmRoutingDbusMessageHandler();
/**
* sets the DBus Connection
@@ -75,14 +76,24 @@ public:
* @return
*/
dbus_uint16_t getUInt();
+ dbus_uint16_t getUInt(DBusMessageIter& iter, bool next);
dbus_int16_t getInt();
- dbus_uint32_t getUInt32();
- dbus_int32_t getInt32();
+ dbus_int16_t getInt(DBusMessageIter& iter, bool next);
dbus_bool_t getBool();
+ dbus_bool_t getBool(DBusMessageIter& iter, bool next);
char getByte();
+ char getByte(DBusMessageIter& iter, bool next);
double getDouble();
+ double getDouble(DBusMessageIter& iter, bool next);
char* getString();
- void getProperty(dbus_int16_t& type, dbus_int16_t& value);
+ char* getString(DBusMessageIter& iter, bool next);
+ am::am_Availability_s getAvailability();
+ std::vector<am::am_EarlyData_s> getEarlyData();
+ am_Domain_s getDomainData();
+ am_Source_s getSourceData();
+ am_Sink_s getSinkData();
+ am_Gateway_s getGatewayData();
+ am_MainSoundProperty_s getMainSoundProperty();
/**
* the overloaded append function appends different datatypes to the dbusmessage
@@ -93,6 +104,7 @@ public:
void append(char toAppend);
void append(bool toAppend);
void append(double toAppend);
+ void append(const am::am_Error_e error);
void append(const am::am_SinkType_s& sinkType);
void append(const am::am_SourceType_s& sourceType);
void append(const am::am_MainSoundProperty_s mainSoundProperty);
@@ -113,9 +125,9 @@ private:
dbus_uint32_t mSerial;
std::string mErrorName;
std::string mErrorMsg;
- DBusMessage* mDbusMessage;
- DBusMessage* mReveiveMessage;
- DBusConnection* mDBusConnection;
+ DBusMessage* mpDBusMessage;
+ DBusMessage* mpReveiveMessage;
+ DBusConnection* mpDBusConnection;
};
}
diff --git a/PluginRoutingInterfaceDbus/include/CAmDbusSend.h b/PluginRoutingInterfaceDbus/include/CAmDbusSend.h
index 65fe0bd..3f8f0a5 100644
--- a/PluginRoutingInterfaceDbus/include/CAmDbusSend.h
+++ b/PluginRoutingInterfaceDbus/include/CAmDbusSend.h
@@ -1,7 +1,9 @@
/**
* Copyright (c) copyright 2011-2012 Aricent® Group and its licensors
+ * Copyright (c) 2012 BMW
*
- * \author: Sampreeth Ramavana
+ * \author Sampreeth Ramavana
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
* \copyright
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
@@ -20,25 +22,31 @@
//#include "headers.h"
#include <dbus/dbus.h>
+#include <string>
+#include <vector>
+#include "audiomanagertypes.h"
-class CAmDbusSend {
+namespace am
+{
+
+class CAmRoutingDbusSend
+{
public:
- CAmDbusSend(DBusConnection* conn, const char* bus_name,const char* path, const char* interface, const char* method);
- virtual ~CAmDbusSend();
- void appendString(char* string);
- void appendInteger(int integer);
- void sendReply(bool* reply);
- void sendReply(int* reply);
- void sendReply(void);
- void Replyint32(int *reply);
+ CAmRoutingDbusSend(DBusConnection* conn, std::string bus_name, std::string path, std::string interface, std::string method);
+ virtual ~CAmRoutingDbusSend();
+ void append(std::string string);
+ void append(uint16_t integer);
+ void append(int16_t integer);
+ void append(std::vector<am_SoundProperty_s> listSoundProperties);
+ void append(am_SoundProperty_s soundProperty);
+ am_Error_e send();
private:
- DBusMessage* m_msg;
- DBusMessageIter m_args;
- DBusConnection* m_conn;
- DBusMessage* replymsg;
- //DBusMessageIter args;
- DBusMessageIter mDBusMessageIter;
+ DBusMessage* mpDbusMessage;
+ DBusConnection* mpDbusConnection;
+ DBusMessageIter mDbusMessageIter;
+ DBusError mDBusError;
};
+}
#endif /* _CAMDBUSSEND_H_ */
diff --git a/PluginRoutingInterfaceDbus/include/CAmRoutingSenderDbus.h b/PluginRoutingInterfaceDbus/include/CAmRoutingSenderDbus.h
index fb727a3..751f5ae 100644
--- a/PluginRoutingInterfaceDbus/include/CAmRoutingSenderDbus.h
+++ b/PluginRoutingInterfaceDbus/include/CAmRoutingSenderDbus.h
@@ -19,48 +19,72 @@
#define ROUTINGSENDER_H_
#include "routing/IAmRoutingSend.h"
-#include <dbus/dbus.h>
-#include <map>
#include "CAmDbusMessageHandler.h"
#include "IAmRoutingReceiverShadow.h"
-#include "shared/CAmDbusWrapper.h"
-using namespace am;
+namespace am
+{
-const char ROUTING_NODE[]="RoutingReceiver";
+#define ROUTING_NODE "RoutingInterface"
class CAmRoutingSenderDbus: public IAmRoutingSend
{
public:
CAmRoutingSenderDbus();
virtual ~CAmRoutingSenderDbus();
- am_Error_e startupInterface(IAmRoutingReceive* routingreceiveinterface) ;
- void setRoutingReady(const uint16_t handle) ;
- void setRoutingRundown(const uint16_t handle) ;
- am_Error_e asyncAbort(const am_Handle_s handle) ;
- am_Error_e asyncConnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_ConnectionFormat_e connectionFormat) ;
- am_Error_e asyncDisconnect(const am_Handle_s handle, const am_connectionID_t connectionID) ;
- am_Error_e asyncSetSinkVolume(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time) ;
- am_Error_e asyncSetSourceVolume(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time) ;
- am_Error_e asyncSetSourceState(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SourceState_e state) ;
- am_Error_e asyncSetSinkSoundProperties(const am_Handle_s handle, const am_sinkID_t sinkID, const std::vector<am_SoundProperty_s>& listSoundProperties) ;
- am_Error_e asyncSetSinkSoundProperty(const am_Handle_s handle, const am_sinkID_t sinkID, const am_SoundProperty_s& soundProperty) ;
- am_Error_e asyncSetSourceSoundProperties(const am_Handle_s handle, const am_sourceID_t sourceID, const std::vector<am_SoundProperty_s>& listSoundProperties) ;
- am_Error_e asyncSetSourceSoundProperty(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SoundProperty_s& soundProperty) ;
- am_Error_e asyncCrossFade(const am_Handle_s handle, const am_crossfaderID_t crossfaderID, const am_HotSink_e hotSink, const am_RampType_e rampType, const am_time_t time) ;
- am_Error_e setDomainState(const am_domainID_t domainID, const am_DomainState_e domainState) ;
- am_Error_e returnBusName(std::string& BusName) const ;
- void getInterfaceVersion(std::string& version) const ;
+ am_Error_e startupInterface(IAmRoutingReceive* pIAmRoutingReceive);
+ void setRoutingReady(const uint16_t handle);
+ void setRoutingRundown(const uint16_t handle);
+ am_Error_e asyncAbort(const am_Handle_s handle);
+ am_Error_e asyncConnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_ConnectionFormat_e connectionFormat);
+ am_Error_e asyncDisconnect(const am_Handle_s handle, const am_connectionID_t connectionID);
+ am_Error_e asyncSetSinkVolume(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time);
+ am_Error_e asyncSetSourceVolume(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time);
+ am_Error_e asyncSetSourceState(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SourceState_e state);
+ am_Error_e asyncSetSinkSoundProperties(const am_Handle_s handle, const am_sinkID_t sinkID, const std::vector<am_SoundProperty_s>& listSoundProperties);
+ am_Error_e asyncSetSinkSoundProperty(const am_Handle_s handle, const am_sinkID_t sinkID, const am_SoundProperty_s& soundProperty);
+ am_Error_e asyncSetSourceSoundProperties(const am_Handle_s handle, const am_sourceID_t sourceID, const std::vector<am_SoundProperty_s>& listSoundProperties);
+ am_Error_e asyncSetSourceSoundProperty(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SoundProperty_s& soundProperty);
+ am_Error_e asyncCrossFade(const am_Handle_s handle, const am_crossfaderID_t crossfaderID, const am_HotSink_e hotSink, const am_RampType_e rampType, const am_time_t time);
+ am_Error_e setDomainState(const am_domainID_t domainID, const am_DomainState_e domainState);
+ am_Error_e returnBusName(std::string& BusName) const;
+ void getInterfaceVersion(std::string& version) const;
+
+ struct rs_lookupData_s
+ {
+ std::string busname;
+ std::string path;
+ std::string interface;
+ };
+
+ void removeHandle(uint16_t handle);
+ void addDomainLookup(am_domainID_t domainID, rs_lookupData_s lookupData);
+ void addSourceLookup(am_sourceID_t sourceID, am_domainID_t domainID);
+ void addSinkLookup(am_sinkID_t sinkID, am_domainID_t domainID);
+ void removeDomainLookup(am_domainID_t domainID);
+ void removeSourceLookup(am_sourceID_t sourceID);
+ void removeSinkLookup(am_sinkID_t sinkID);
private:
- CAmDbusMessageHandler mDBusMessageHandler;
- IAmRoutingReceiverShadow mRoutingReceiverShadow;
+ CAmDbusWrapper* mpCAmDBusWrapper;
+ IAmRoutingReceive *mpIAmRoutingReceive;
+ DBusConnection* mpDBusConnection;
+ CAmRoutingDbusMessageHandler mCAmRoutingDBusMessageHandler;
+ IAmRoutingReceiverShadowDbus mIAmRoutingReceiverShadowDbus;
- CAmDbusWrapper* mDBusWrapper;
- IAmRoutingReceive *mRoutingReceiveInterface;
+ typedef std::map<am_domainID_t,rs_lookupData_s> mapDomain_t;
+ typedef std::map<am_sinkID_t,rs_lookupData_s> mapSinks_t;
+ typedef std::map<am_sourceID_t,rs_lookupData_s> mapSources_t;
+ typedef std::map<am_connectionID_t,rs_lookupData_s> mapConnections_t;
+ typedef std::map<uint16_t,rs_lookupData_s> mapHandles_t;
+ mapDomain_t mMapDomains;
+ mapSinks_t mMapSinks;
+ mapSources_t mMapSources;
+ mapConnections_t mMapConnections;
+ mapHandles_t mMapHandles;
- DBusConnection* connection;
};
+}
#endif /* ROUTINGSENDER_H_ */
diff --git a/PluginRoutingInterfaceDbus/include/IAmRoutingReceiverShadow.h b/PluginRoutingInterfaceDbus/include/IAmRoutingReceiverShadow.h
index 4cd1b2d..642ab6f 100644
--- a/PluginRoutingInterfaceDbus/include/IAmRoutingReceiverShadow.h
+++ b/PluginRoutingInterfaceDbus/include/IAmRoutingReceiverShadow.h
@@ -1,7 +1,9 @@
/**
* Copyright (c) copyright 2011-2012 Aricent® Group and its licensors
+ * Copyright (c) 2012 BMW
*
- * \author: Sampreeth Ramavana
+ * \author Sampreeth Ramavana
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
* \copyright
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
@@ -18,79 +20,108 @@
#ifndef _IAMROUTINGRECEIVERSHADOW_H_
#define _IAMROUTINGRECEIVERSHADOW_H_
-#include "routing/IAmRoutingSend.h"
#include <dbus/dbus.h>
-#include <dlt/dlt.h>
#include <map>
-#include "shared/CAmDbusWrapper.h"
#include "CAmDbusMessageHandler.h"
namespace am {
-class IAmRoutingReceiverShadow;
-
-typedef void (IAmRoutingReceiverShadow::*CallBackMethod)(DBusConnection *connection, DBusMessage *message);
+class CAmRoutingSenderDbus;
+class IAmRoutingReceive;
+class CAmDbusWrapper;
/**
* receives the DBus Callbacks, marhsalls and demarshalls the parameters and calls CommandReceive
*/
-class IAmRoutingReceiverShadow {
+class IAmRoutingReceiverShadowDbus
+{
public:
- IAmRoutingReceiverShadow();
- virtual ~IAmRoutingReceiverShadow();
- void ackConnect(DBusConnection *conn, DBusMessage *msg) ;
- void ackDisconnect(DBusConnection *conn, DBusMessage *msg) ;
- void ackSetSinkVolume(DBusConnection *conn, DBusMessage *msg);
- void ackSetSourceVolume(DBusConnection *conn, DBusMessage *msg);
- void ackSinkVolumeTick(DBusConnection *conn, DBusMessage *msg);
- void ackSourceVolumeTick(DBusConnection *conn, DBusMessage *msg);
- void ackSetSinkSoundProperty(DBusConnection *conn, DBusMessage *msg);
- void ackSetSourceSoundProperty(DBusConnection *conn, DBusMessage *msg);
+ IAmRoutingReceiverShadowDbus(CAmRoutingSenderDbus* pRoutingSenderDbus);
+ virtual ~IAmRoutingReceiverShadowDbus();
+ void ackConnect(DBusConnection *conn, DBusMessage *msg);
+ void ackDisconnect(DBusConnection *conn, DBusMessage *msg);
+ void ackSetSinkVolume(DBusConnection *conn, DBusMessage *msg);
+ void ackSetSourceVolume(DBusConnection *conn, DBusMessage *msg);
+ void ackSetSourceState(DBusConnection *conn, DBusMessage *msg);
+ void ackSinkVolumeTick(DBusConnection *conn, DBusMessage *msg);
+ void ackSourceVolumeTick(DBusConnection *conn, DBusMessage *msg);
+ void ackSetSinkSoundProperty(DBusConnection *conn, DBusMessage *msg);
+ void ackSetSourceSoundProperty(DBusConnection *conn, DBusMessage *msg);
+ void ackSetSinkSoundProperties(DBusConnection *conn, DBusMessage *msg);
+ void ackSetSourceSoundProperties(DBusConnection *conn, DBusMessage *msg);
+ void ackCrossFading(DBusConnection *conn, DBusMessage *msg);
+ void registerDomain(DBusConnection *conn, DBusMessage *msg);
+ void registerSource(DBusConnection *conn, DBusMessage *msg);
+ void registerSink(DBusConnection *conn, DBusMessage *msg);
+ void registerGateway(DBusConnection *conn, DBusMessage *msg);
+ void peekDomain(DBusConnection *conn, DBusMessage *msg);
+ void deregisterDomain(DBusConnection *conn, DBusMessage *msg);
+ void deregisterGateway(DBusConnection *conn, DBusMessage *msg);
+ void peekSink(DBusConnection *conn, DBusMessage *msg);
+ void deregisterSink(DBusConnection *conn, DBusMessage *msg);
+ void peekSource(DBusConnection *conn, DBusMessage *msg);
+ void deregisterSource(DBusConnection *conn, DBusMessage *msg);
+ void registerCrossfader(DBusConnection *conn, DBusMessage *msg);
+ void deregisterCrossfader(DBusConnection *conn, DBusMessage *msg);
+ void peekSourceClassID(DBusConnection *conn, DBusMessage *msg);
+ void peekSinkClassID(DBusConnection *conn, DBusMessage *msg);
+ void hookInterruptStatusChange(DBusConnection *conn, DBusMessage *msg);
+ void hookDomainRegistrationComplete(DBusConnection *conn, DBusMessage *msg);
+ void hookSinkAvailablityStatusChange(DBusConnection *conn, DBusMessage *msg);
+ void hookSourceAvailablityStatusChange(DBusConnection *conn, DBusMessage *msg);
+ void hookDomainStateChange(DBusConnection *conn, DBusMessage *msg);
+ void hookTimingInformationChanged(DBusConnection *conn, DBusMessage *msg);
+ void sendChangedData(DBusConnection *conn, DBusMessage *msg);
+ void confirmRoutingReady(DBusConnection *conn, DBusMessage *msg);
+ void confirmRoutingRundown(DBusConnection *conn, DBusMessage *msg);
+
+ /**
+ * sets the pointer to the CommandReceiveInterface and registers Callback
+ * @param receiver
+ */
+ void setRoutingReceiver(IAmRoutingReceive*& receiver);
- void registerDomain(DBusConnection *conn, DBusMessage *msg) ;
- void registerSource(DBusConnection *conn, DBusMessage *msg) ;
- void registerSink(DBusConnection *conn, DBusMessage *msg) ;
- void registerGateway(DBusConnection *conn, DBusMessage *msg) ;
- void hookDomainRegistrationComplete(DBusConnection *conn, DBusMessage *msg);
+ void gotReady(int16_t numberDomains, uint16_t handle);
+ void gotRundown(int16_t numberDomains, uint16_t handle);
- /**
- * sets the pointer to the CommandReceiveInterface and registers Callback
- * @param receiver
- */
- void setRoutingReceiver(IAmRoutingReceive*& receiver);
private:
- IAmRoutingReceive* mRoutingReceiveInterface;
- CAmDbusWrapper* mDBusWrapper;
- typedef std::map<std::string,CallBackMethod> functionMap_t;
- functionMap_t mFunctionMap;
- CAmDbusMessageHandler mDBUSMessageHandler;
+ typedef void (IAmRoutingReceiverShadowDbus::*CallBackMethod)(DBusConnection *connection, DBusMessage *message);
+ IAmRoutingReceive* mRoutingReceiveInterface;
+ CAmDbusWrapper* mDBusWrapper;
+ CAmRoutingSenderDbus* mpRoutingSenderDbus;
+
+ typedef std::map<std::string, CallBackMethod> functionMap_t;
+ functionMap_t mFunctionMap;
+ CAmRoutingDbusMessageHandler mDBUSMessageHandler;
+ int16_t mNumberDomains;
+ uint16_t mHandle;
- /**
- * receives a callback whenever the path of the plugin is called
- */
- static DBusHandlerResult receiveCallback(DBusConnection *conn, DBusMessage *msg, void *user_data);
+ /**
+ * receives a callback whenever the path of the plugin is called
+ */
+ static DBusHandlerResult receiveCallback(DBusConnection *conn, DBusMessage *msg, void *user_data);
- /**
- * dynamic delegate that handles the Callback of the static receiveCallback
- * @param conn DBus connection
- * @param msg DBus message
- * @param user_data pointer to instance of IAmRoutingReceiverShadow
- * @return
- */
- DBusHandlerResult receiveCallbackDelegate(DBusConnection *conn, DBusMessage *msg);
+ /**
+ * dynamic delegate that handles the Callback of the static receiveCallback
+ * @param conn DBus connection
+ * @param msg DBus message
+ * @param user_data pointer to instance of IAmRoutingReceiverShadow
+ * @return
+ */
+ DBusHandlerResult receiveCallbackDelegate(DBusConnection *conn, DBusMessage *msg);
- /**
- * sends out introspectiondata read from an xml file.
- * @param conn
- * @param msg
- */
- void sendIntrospection(DBusConnection* conn, DBusMessage* msg) ;
+ /**
+ * sends out introspectiondata read from an xml file.
+ * @param conn
+ * @param msg
+ */
+ void sendIntrospection(DBusConnection* conn, DBusMessage* msg);
- /**
- * creates the function map needed to combine DBus messages and function adresses
- * @return the map
- */
- functionMap_t createMap();
+ /**
+ * creates the function map needed to combine DBus messages and function adresses
+ * @return the map
+ */
+ functionMap_t createMap();
};
}
diff --git a/PluginRoutingInterfaceDbus/include/RoutingReceiver.xml b/PluginRoutingInterfaceDbus/include/RoutingReceiver.xml
index 78e06e3..a263966 100644
--- a/PluginRoutingInterfaceDbus/include/RoutingReceiver.xml
+++ b/PluginRoutingInterfaceDbus/include/RoutingReceiver.xml
@@ -5,80 +5,170 @@
<node>
<interface name="org.genivi.audiomanager.RoutingReceiver">
-
<method name="ackConnect">
- <arg name="handle" type="i" direction="in" />
- <arg name="connectionID" type="i" direction="in" />
- <arg name="error" type="i" direction="in" />
- </method>
- <method name="ackDisconnect">
- <arg name="handle" type="i" direction="in" />
- <arg name="connectionID" type="i" direction="in" />
- <arg name="error" type="i" direction="in" />
- </method>
- <method name="ackSetSinkVolumeChange">
- <arg name="handle" type="i" direction="in" />
- <arg name="volume" type="i" direction="in" />
- <arg name="error" type="i" direction="in" />
- </method>
- <method name="ackSetSourceVolumeChange">
- <arg name="handle" type="i" direction="in" />
- <arg name="connectionID" type="i" direction="in" />
- <arg name="error" type="i" direction="in" />
- </method>
- <method name="ackSetSourceState">
- <arg name="handle" type="u" direction="in" />
- <arg name="error" type="n" direction="in" />
- </method>
- <method name="ackSetSinkSoundProperty">
- <arg name="handle" type="u" direction="in" />
- <arg name="error" type="n" direction="in" />
- </method>
- <method name="ackSetSourceSoundProperty">
- <arg name="handle" type="u" direction="in" />
- <arg name="error" type="n" direction="in" />
- </method>
- <method name="ackCrossFading">
- <arg name="handle" type="u" direction="in" />
- <arg name="hotsink" type="q" direction="in" />
- <arg name="error" type="n" direction="in" />
- </method>
- <method name="ackSourceVolumeTick">
- <arg name="handle" type="u" direction="in" />
- <arg name="source" type="q" direction="in" />
- <arg name="volume" type="n" direction="in" />
- </method>
- <method name="ackSinkVolumeTick">
- <arg name="handle" type="u" direction="in" />
- <arg name="sink" type="q" direction="in" />
- <arg name="volume" type="n" direction="in" />
- </method>
-
-
- <method name="peekDomain">
- <arg name="name" type="s" direction="in" />
- <arg name="domainid" type="q" direction="in" />
- </method>
- <method name="registerDomain">
- <arg name="domaindata" type="(qsssbbq)" direction="in" />
- <arg name="domainid" type="q" direction="in" />
- </method>
- <method name="deregisterDomain">
- <arg name="domainid" type="q" direction="in" />
- </method>
-
-
+ <arg name="handle" type="q" direction="in" />
+ <arg name="connectionID" type="q" direction="in" />
+ <arg name="error" type="q" direction="in" />
+ </method>
+ <method name="ackDisconnect">
+ <arg name="handle" type="q" direction="in" />
+ <arg name="connectionID" type="q" direction="in" />
+ <arg name="error" type="q" direction="in" />
+ </method>
+ <method name="ackSetSinkVolume">
+ <arg name="handle" type="q" direction="in" />
+ <arg name="volume" type="i" direction="in" />
+ <arg name="error" type="q" direction="in" />
+ </method>
+ <method name="ackSetSourceVolume">
+ <arg name="handle" type="q" direction="in" />
+ <arg name="volume" type="i" direction="in" />
+ <arg name="error" type="q" direction="in" />
+ </method>
+ <method name="ackSetSourceState">
+ <arg name="handle" type="q" direction="in" />
+ <arg name="error" type="q" direction="in" />
+ </method>
+ <method name="ackSetSinkSoundProperties">
+ <arg name="handle" type="q" direction="in" />
+ <arg name="error" type="q" direction="in" />
+ </method>
+ <method name="ackSetSinkSoundProperty">
+ <arg name="handle" type="q" direction="in" />
+ <arg name="error" type="q" direction="in" />
+ </method>
+ <method name="ackSetSourceSoundProperties">
+ <arg name="handle" type="q" direction="in" />
+ <arg name="error" type="q" direction="in" />
+ </method>
+ <method name="ackSetSourceSoundProperty">
+ <arg name="handle" type="q" direction="in" />
+ <arg name="error" type="q" direction="in" />
+ </method>
+ <method name="ackCrossFading">
+ <arg name="handle" type="q" direction="in" />
+ <arg name="hotsink" type="n" direction="in" />
+ <arg name="error" type="q" direction="in" />
+ </method>
+ <method name="ackSourceVolumeTick">
+ <arg name="handle" type="q" direction="in" />
+ <arg name="source" type="q" direction="in" />
+ <arg name="volume" type="n" direction="in" />
+ </method>
+ <method name="ackSinkVolumeTick">
+ <arg name="handle" type="q" direction="in" />
+ <arg name="sink" type="q" direction="in" />
+ <arg name="volume" type="n" direction="in" />
+ </method>
+ <method name="peekDomain">
+ <arg name="name" type="s" direction="in" />
+ <arg name="domainid" type="q" direction="out" />
+ <arg name="error" type="q" direction="out" />
+ </method>
+ <method name="registerDomain">
+ <arg name="domaindata" type="qsssbbq" direction="in" /> <!-- am_domainID_t domainID; std::string name; std::string busname; std::string nodename; bool early; bool complete; am_DomainState_e state; -->
+ <arg name="returnBusname" type="s" direction="in" /> <!-- the busname for all communication to this domain -->
+ <arg name="returnPath" type="s" direction="in" /> <!-- the path for all communication to this domain -->
+ <arg name="returnInterface" type="s" direction="in" /> <!-- the interface for all communication to this domain -->
+ <arg name="domainid" type="q" direction="out" />
+ <arg name="error" type="q" direction="out" />
+ </method>
+ <method name="deregisterDomain">
+ <arg name="domainid" type="q" direction="in" />
+ <arg name="error" type="q" direction="out" />
+ </method>
+ <method name="registerGateway">
+ <arg name="gatewayData" type="qsqqqqqa(q)a(q)a(b)" direction="in" /> <!-- am_gatewayID_t gatewayID; std::string name; am_sinkID_t sinkID; am_sourceID_t sourceID; am_domainID_t domainSinkID; am_domainID_t domainSourceID; am_domainID_t controlDomainID; std::vector<am_ConnectionFormat_e> listSourceFormats; std::vector<am_ConnectionFormat_e> listSinkFormats; std::vector<bool> convertionMatrix; -->
+ <arg name="gatewayID" type="q" direction="out" />
+ <arg name="error" type="q" direction="out" />
+ </method>
+ <method name="deregisterGateway">
+ <arg name="gatewayID" type="q" direction="in" />
+ <arg name="error" type="q" direction="out" />
+ </method>
+ <method name="peekSink">
+ <arg name="name" type="s" direction="in" />
+ <arg name="sinkID" type="q" direction="out" />
+ <arg name="error" type="q" direction="out" />
+ </method>
+ <method name="registerSink">
+ <arg name="sinkData" type="qsqqnb(nn)nna(nn)ana(nn)" direction="in" /> <!-- am_sinkID_t sinkID; std::string name; am_domainID_t domainID; am_sinkClass_t sinkClassID; am_volume_t volume; bool visible; am_Availability_s available; am_MuteState_e muteState;am_mainVolume_t mainVolume; std::vector<am_SoundProperty_s> listSoundProperties; std::vector<am_ConnectionFormat_e> listConnectionFormats; std::vector<am_MainSoundProperty_s> listMainSoundProperties; -->
+ <arg name="sinkID" type="q" direction="out" />
+ <arg name="error" type="q" direction="out" />
+ </method>
+ <method name="deregisterSink">
+ <arg name="sinkID" type="q" direction="in" />
+ <arg name="error" type="i" direction="out" />
+ </method>
+ <method name="peekSource">
+ <arg name="name" type="s" direction="in" />
+ <arg name="sourceID" type="q" direction="out" />
+ <arg name="error" type="i" direction="out" />
+ </method>
<method name="registerSource">
- <arg name="soucedata" type="(qqsqqnb(qq)q)" direction="in" />
- <arg name="sourceid" type="q" direction="in" />
+ <arg name="sourceData" type="qqsqqnb(nn)qa(nn)ana(nn)" direction="in" /> <!-- am_sourceID_t sourceID; am_domainID_t domainID; std::string name; am_sourceClass_t sourceClassID; am_SourceState_e sourceState; am_volume_t volume; bool visible; am_Availability_s available; am_InterruptState_e interruptState; std::vector<am_SoundProperty_s> listSoundProperties; std::vector<am_ConnectionFormat_e> listConnectionFormats; std::vector<am_MainSoundProperty_s> listMainSoundProperties; -->
+ <arg name="sourceID" type="q" direction="out" />
+ <arg name="error" type="i" direction="out" />
</method>
-
- <method name="deregisterSource">
- <arg name="sourceid" type="q" direction="in" />
- </method>
-
- <signal name="signal_systemReady">
- </signal>
-
+ <method name="deregisterSource">
+ <arg name="sourceid" type="q" direction="in" />
+ <arg name="error" type="i" direction="out" />
+ </method>
+ <method name="registerCrossfader">
+ <arg name="crossfaderData" type="qsqqqq" direction="in" /> <!-- am_crossfaderID_t crossfaderID; std::string name; am_sinkID_t sinkID_A; am_sinkID_t sinkID_B; am_sourceID_t sourceID; am_HotSink_e hotSink; -->
+ <arg name="crossfaderID" type="q" direction="out" />
+ <arg name="error" type="i" direction="out" />
+ </method>
+ <method name="deregisterCrossfader">
+ <arg name="crossfaderID" type="q" direction="in" />
+ <arg name="error" type="i" direction="out" />
+ </method>
+ <method name="peekSourceClassID">
+ <arg name="name" type="s" direction="in" />
+ <arg name="sourceClassID" type="q" direction="out" />
+ <arg name="error" type="i" direction="out" />
+ </method>
+ <method name="peekSinkClassID">
+ <arg name="name" type="s" direction="in" />
+ <arg name="sinkClassID" type="q" direction="out" />
+ <arg name="error" type="i" direction="out" />
+ </method>
+ <method name="hookInterruptStatusChange">
+ <arg name="sourceID" type="q" direction="in" />
+ <arg name="interruptState" type="q" direction="in" />
+ </method>
+ <method name="hookDomainRegistrationComplete">
+ <arg name="domainID" type="q" direction="in" />
+ </method>
+ <method name="hookSinkAvailablityStatusChange">
+ <arg name="sinkID" type="q" direction="in" />
+ <arg name="availability" type="(nn)" direction="out"/>
+ </method>
+ <method name="hookSourceAvailablityStatusChange">
+ <arg name="sourceID" type="q" direction="in" />
+ <arg name="availability" type="(nn)" direction="out"/>
+ </method>
+ <method name="hookDomainStateChange">
+ <arg name="domainID" type="q" direction="in" />
+ <arg name="domainState" type="q" direction="out"/>
+ </method>
+ <method name="hookTimingInformationChanged">
+ <arg name="connectionID" type="q" direction="in" />
+ <arg name="delay" type="n" direction="out"/>
+ </method>
+ <method name="sendChangedData"> <!--am_EarlyDataType_e type; am_DataType_u sinksource; am_EarlyData_u data; -->
+ <arg name="earlyData_volumes" type="a(qqn)" direction="in" /> <!-- only the volumes as array -->
+ <arg name="earlyData_soundproperties" type="a(qq(nn))" direction="in" /> <!--only the soundproperties as value -->
+ </method>
+ <method name="confirmRoutingReady">
+ <arg name="domainID" type="q" direction="in" />
+ </method>
+ <method name="confirmRoutingRundown">
+ <arg name="domainID" type="q" direction="in" />
+ </method>
+ <signal name="setRoutingReady">
+ </signal>
+ <signal name="setRoutingRundown">
+ </signal>
</interface>
</node>
diff --git a/PluginRoutingInterfaceDbus/include/RoutingSender.xml b/PluginRoutingInterfaceDbus/include/RoutingSender.xml
new file mode 100644
index 0000000..7841218
--- /dev/null
+++ b/PluginRoutingInterfaceDbus/include/RoutingSender.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE node PUBLIC
+ "-//freedesktop//DTD D-Bus Object Introspection 1.0//EN"
+ "http://standards.freedesktop.org/dbus/1.0/introspect.dtd">
+
+<node>
+ <interface name='org.pulseaudio.genivi.RoutingSender'>
+ <method name='asyncAbort'>
+ <arg name='handle' type='q' direction='in' />
+ <arg name='error' type='n' direction='out' />
+ </method>
+ <method name='asyncConnect'>
+ <arg name='handle' type='q' direction='in' />
+ <arg name='connectionID' type='q' direction='in' />
+ <arg name='sourceID' type='q' direction='in' />
+ <arg name='sinkID' type='q' direction='in' />
+ <arg name='connectionFormat' type='n' direction='in' />
+ <arg name='error' type='n' direction='out' />
+ </method>
+ <method name='asyncDisconnect'>
+ <arg name='handle' type='q' direction='in' />
+ <arg name='connectionID' type='q' direction='in' />
+ <arg name='error' type='n' direction='out' />
+ </method>
+ <method name='setSinkVolume'>
+ <arg name='handle' type='q' direction='in' />
+ <arg name='sinkID' type='q' direction='in' />
+ <arg name='volume' type='n' direction='in' />
+ <arg name='ramp' type='n' direction='in' />
+ <arg name='time' type='q' direction='in' />
+ <arg name='error' type='n' direction='out' />
+ </method>
+ <method name='setSourceVolume'>
+ <arg name='handle' type='q' direction='in' />
+ <arg name='sourceID' type='q' direction='in' />
+ <arg name='volume' type='n' direction='in' />
+ <arg name='ramp' type='n' direction='in' />
+ <arg name='time' type='q' direction='in' />
+ <arg name='error' type='n' direction='out' />
+ </method>
+ <method name='asyncSetSourceState'>
+ <arg name='handle' type='q' direction='in' />
+ <arg name='sourceID' type='q' direction='in' />
+ <arg name='sourceState' type='n' direction='in' />
+ <arg name='error' type='n' direction='out' />
+ </method>
+ <method name='asyncSetSinkSoundProperties'>
+ <arg name='handle' type='q' direction='in' />
+ <arg name='sinkID' type='q' direction='in' />
+ <arg name='listSoundProperties' type='a(nn)' direction='in' />
+ <arg name='error' type='n' direction='out' />
+ </method>
+ <method name='asyncSetSinkSoundProperty'>
+ <arg name='handle' type='q' direction='in' />
+ <arg name='sinkID' type='q' direction='in' />
+ <arg name='soundProperty' type='(nn)' direction='in' />
+ <arg name='error' type='n' direction='out' />
+ </method>
+ <method name='asyncSetSourceSoundProperty'>
+ <arg name='handle' type='q' direction='in' />
+ <arg name='sourceID' type='q' direction='in' />
+ <arg name='soundProperty' type='(nn)' direction='in' />
+ <arg name='error' type='n' direction='out' />
+ </method>
+ <method name='asyncSetSourceSoundProperties'>
+ <arg name='handle' type='q' direction='in' />
+ <arg name='sourceID' type='q' direction='in' />
+ <arg name='listSoundProperties' type='a(nn)' direction='in' />
+ <arg name='error' type='n' direction='out' />
+ </method>
+ <method name='asyncCrossFade'>
+ <arg name='handle' type='q' direction='in' />
+ <arg name='crossfaderID' type='q' direction='in' />
+ <arg name='hotSink' type='q' direction='in' />
+ <arg name='rampType' type='q' direction='in' />
+ <arg name='time' type='q' direction='in' />
+ <arg name='error' type='n' direction='out' />
+ </method>
+ <method name='setDomainState'>
+ <arg name='domainID' type='q' direction='in' />
+ <arg name='domainState' type='q' direction='in' />
+ <arg name='error' type='n' direction='out' />
+ </method>
+</interface>
+</node>