summaryrefslogtreecommitdiff
path: root/AudioManagerDaemon/include
diff options
context:
space:
mode:
authorchristian mueller <christian.ei.mueller@bmw.de>2012-03-01 19:12:55 +0100
committerchristian mueller <christian.ei.mueller@bmw.de>2012-03-01 19:12:55 +0100
commitdfcafbec34e0e454d9995551998af5d40a27c7ad (patch)
treed93d70fea7feb7004f6a2ce9bfce9b83d3469e42 /AudioManagerDaemon/include
parentffccf1e2003cea4230413ccfdfd4cd6515484e4f (diff)
downloadaudiomanager-dfcafbec34e0e454d9995551998af5d40a27c7ad.tar.gz
* fix [GAM-28] problems in routingsender.cpp
* [GAM-27] major refactoring: bringing everything to standardized names * Enhancement of CAmSerializer.h * improvement of documentation * adoption & regeneration of inerfaces
Diffstat (limited to 'AudioManagerDaemon/include')
-rw-r--r--AudioManagerDaemon/include/CAmCommandReceiver.h (renamed from AudioManagerDaemon/include/CommandReceiver.h)30
-rw-r--r--AudioManagerDaemon/include/CAmCommandSender.h (renamed from AudioManagerDaemon/include/CommandSender.h)20
-rw-r--r--AudioManagerDaemon/include/CAmControlReceiver.h (renamed from AudioManagerDaemon/include/ControlReceiver.h)32
-rw-r--r--AudioManagerDaemon/include/CAmControlSender.h (renamed from AudioManagerDaemon/include/ControlSender.h)18
-rw-r--r--AudioManagerDaemon/include/CAmDatabaseHandler.h (renamed from AudioManagerDaemon/include/DatabaseHandler.h)20
-rw-r--r--AudioManagerDaemon/include/CAmDatabaseObserver.h (renamed from AudioManagerDaemon/include/DatabaseObserver.h)26
-rw-r--r--AudioManagerDaemon/include/CAmRouter.h (renamed from AudioManagerDaemon/include/Router.h)48
-rw-r--r--AudioManagerDaemon/include/CAmRoutingReceiver.h (renamed from AudioManagerDaemon/include/RoutingReceiver.h)36
-rw-r--r--AudioManagerDaemon/include/CAmRoutingSender.h (renamed from AudioManagerDaemon/include/RoutingSender.h)34
-rw-r--r--AudioManagerDaemon/include/CAmTelnetMenuHelper.h44
-rw-r--r--AudioManagerDaemon/include/CAmTelnetServer.h (renamed from AudioManagerDaemon/include/TelnetServer.h)70
-rw-r--r--AudioManagerDaemon/include/DAmDoxygenMainPage.h (renamed from AudioManagerDaemon/include/mainpage.h)2
-rw-r--r--AudioManagerDaemon/include/TAmPluginTemplate.h (renamed from AudioManagerDaemon/include/PluginTemplate.h)4
13 files changed, 192 insertions, 192 deletions
diff --git a/AudioManagerDaemon/include/CommandReceiver.h b/AudioManagerDaemon/include/CAmCommandReceiver.h
index 5279a31..72f72f2 100644
--- a/AudioManagerDaemon/include/CommandReceiver.h
+++ b/AudioManagerDaemon/include/CAmCommandReceiver.h
@@ -25,26 +25,26 @@
#ifndef COMMANDRECEIVER_H_
#define COMMANDRECEIVER_H_
-#include <command/CommandReceiveInterface.h>
+#include <command/IAmCommandReceive.h>
#include <config.h>
namespace am
{
-class DatabaseHandler;
-class ControlSender;
-class DBusWrapper;
-class SocketHandler;
+class CAmDatabaseHandler;
+class CAmControlSender;
+class CAmDbusWrapper;
+class CAmSocketHandler;
/**
* This class realizes the command Interface
*/
-class CommandReceiver: public CommandReceiveInterface
+class CAmCommandReceiver: public IAmCommandReceive
{
public:
- CommandReceiver(DatabaseHandler* iDatabaseHandler, ControlSender* iControlSender, SocketHandler* iSocketHandler);
- CommandReceiver(DatabaseHandler* iDatabaseHandler, ControlSender* iControlSender, SocketHandler* iSocketHandler, DBusWrapper* iDBusWrapper);
- ~CommandReceiver();
+ CAmCommandReceiver(CAmDatabaseHandler* iDatabaseHandler, CAmControlSender* iControlSender, CAmSocketHandler* iSocketHandler);
+ CAmCommandReceiver(CAmDatabaseHandler* iDatabaseHandler, CAmControlSender* iControlSender, CAmSocketHandler* iSocketHandler, CAmDbusWrapper* iDBusWrapper);
+ ~CAmCommandReceiver();
am_Error_e connect(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID);
am_Error_e disconnect(const am_mainConnectionID_t mainConnectionID);
am_Error_e setVolume(const am_sinkID_t sinkID, const am_mainVolume_t volume);
@@ -62,8 +62,8 @@ public:
am_Error_e getListSinkClasses(std::vector<am_SinkClass_s>& listSinkClasses) const;
am_Error_e getListSystemProperties(std::vector<am_SystemProperty_s>& listSystemProperties) const;
am_Error_e getTimingInformation(const am_mainConnectionID_t mainConnectionID, am_timeSync_t& delay) const;
- am_Error_e getDBusConnectionWrapper(DBusWrapper*& dbusConnectionWrapper) const;
- am_Error_e getSocketHandler(SocketHandler*& socketHandler) const;
+ am_Error_e getDBusConnectionWrapper(CAmDbusWrapper*& dbusConnectionWrapper) const;
+ am_Error_e getSocketHandler(CAmSocketHandler*& socketHandler) const;
void getInterfaceVersion(std::string& version) const;
void confirmCommandReady(const uint16_t handle);
void confirmCommandRundown(const uint16_t handle);
@@ -75,10 +75,10 @@ public:
void waitOnRundown(bool rundown); //!< tells the ComandReceiver to start waiting for all handles to be confirmed
private:
- DatabaseHandler* mDatabaseHandler; //!< pointer to the databasehandler
- ControlSender* mControlSender; //!< pointer to the control sender
- DBusWrapper* mDBusWrapper; //!< pointer to the dbuswrapper
- SocketHandler* mSocketHandler; //!< pointer to the SocketHandler
+ CAmDatabaseHandler* mDatabaseHandler; //!< pointer to the databasehandler
+ CAmControlSender* mControlSender; //!< pointer to the control sender
+ CAmDbusWrapper* mDBusWrapper; //!< pointer to the dbuswrapper
+ CAmSocketHandler* mSocketHandler; //!< pointer to the SocketHandler
uint16_t handleCount; //!< counts all handles
std::vector<uint16_t> mListStartupHandles; //!< list of handles that wait for a confirm
diff --git a/AudioManagerDaemon/include/CommandSender.h b/AudioManagerDaemon/include/CAmCommandSender.h
index 0a8d2b2..d902e96 100644
--- a/AudioManagerDaemon/include/CommandSender.h
+++ b/AudioManagerDaemon/include/CAmCommandSender.h
@@ -26,27 +26,27 @@
#define COMMANDSENDER_H_
#ifdef UNIT_TEST
-#include "../test/CommandInterfaceBackdoor.h" //we need this for the unit test
+#include "../test/IAmCommandBackdoor.h" //we need this for the unit test
#endif
-#include "command/CommandSendInterface.h"
+#include "command/IAmCommandSend.h"
namespace am
{
-class CommandReceiver;
+class CAmCommandReceiver;
/**
* This class is used to send data to the CommandInterface.
* All loaded plugins will be called when a callback is invoked.
*/
-class CommandSender
+class CAmCommandSender
{
public:
- CommandSender(const std::vector<std::string>& listOfPluginDirectories);
- ~CommandSender();
- am_Error_e startupInterfaces(CommandReceiver* iCommandReceiver);
+ CAmCommandSender(const std::vector<std::string>& listOfPluginDirectories);
+ ~CAmCommandSender();
+ am_Error_e startupInterfaces(CAmCommandReceiver* iCommandReceiver);
void setCommandReady();
void setCommandRundown();
void cbNewMainConnection(const am_MainConnectionType_s mainConnection);
@@ -69,15 +69,15 @@ public:
void getInterfaceVersion(std::string& version) const;
am_Error_e getListPlugins(std::vector<std::string>& interfaces) const;
#ifdef UNIT_TEST
- friend class CommandInterfaceBackdoor; //this is to get access to the loaded plugins and be able to exchange the interfaces
+ friend class IAmCommandBackdoor; //this is to get access to the loaded plugins and be able to exchange the interfaces
#endif
private:
void unloadLibraries(void); //!< unload the shared libraries
- std::vector<CommandSendInterface*> mListInterfaces; //!< list of all interfaces
+ std::vector<IAmCommandSend*> mListInterfaces; //!< list of all interfaces
std::vector<void*> mListLibraryHandles; //!< list of all library handles. This information is used to unload the plugins correctly.
std::vector<std::string> mListLibraryNames; //!< list of all library names. This information is used for getListPlugins.
- CommandReceiver *mCommandReceiver;
+ CAmCommandReceiver *mCommandReceiver;
};
}
diff --git a/AudioManagerDaemon/include/ControlReceiver.h b/AudioManagerDaemon/include/CAmControlReceiver.h
index dfb0695..af5a0e4 100644
--- a/AudioManagerDaemon/include/ControlReceiver.h
+++ b/AudioManagerDaemon/include/CAmControlReceiver.h
@@ -3,7 +3,7 @@
*
* GeniviAudioMananger AudioManagerDaemon
*
- * \file ControlReceiver.h
+ * \file CAmControlReceiver.h
*
* \date 20-Oct-2011 3:42:04 PM
* \author Christian Mueller (christian.ei.mueller@bmw.de)
@@ -25,26 +25,26 @@
#ifndef CONTRONLRECEIVER_H_
#define CONTRONLRECEIVER_H_
-#include <control/ControlReceiveInterface.h>
+#include <control/IAmControlReceive.h>
#include <config.h>
namespace am
{
-class SocketHandler;
-class DatabaseHandler;
-class RoutingSender;
-class CommandSender;
-class Router;
+class CAmSocketHandler;
+class CAmDatabaseHandler;
+class CAmRoutingSender;
+class CAmCommandSender;
+class CAmRouter;
/**
* This class is used to receive all commands from the control interface
*/
-class ControlReceiver: public ControlReceiveInterface
+class CAmControlReceiver: public IAmControlReceive
{
public:
- ControlReceiver(DatabaseHandler *iDatabaseHandler, RoutingSender *iRoutingSender, CommandSender *iCommandSender, SocketHandler *iSocketHandler, Router* iRouter);
- ~ControlReceiver();
+ 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<am_Route_s>& returnList);
am_Error_e connect(am_Handle_s& handle, am_connectionID_t& connectionID, const am_ConnectionFormat_e format, const am_sourceID_t sourceID, const am_sinkID_t sinkID);
am_Error_e disconnect(am_Handle_s& handle, const am_connectionID_t connectionID);
@@ -115,15 +115,15 @@ public:
void setRoutingRundown();
void confirmControllerReady();
void confirmControllerRundown();
- am_Error_e getSocketHandler(SocketHandler*& socketHandler);
+ am_Error_e getSocketHandler(CAmSocketHandler*& socketHandler);
void getInterfaceVersion(std::string& version) const;
private:
- DatabaseHandler* mDatabaseHandler; //!< pointer tto the databasehandler
- RoutingSender* mRoutingSender; //!< pointer to the routing send interface.
- CommandSender* mCommandSender; //!< pointer to the command send interface
- SocketHandler* mSocketHandler; //!< pointer to the socketHandler
- Router* mRouter; //!< pointer to the Router
+ CAmDatabaseHandler* mDatabaseHandler; //!< pointer tto the databasehandler
+ CAmRoutingSender* mRoutingSender; //!< pointer to the routing send interface.
+ CAmCommandSender* mCommandSender; //!< pointer to the command send interface
+ CAmSocketHandler* mSocketHandler; //!< pointer to the socketHandler
+ CAmRouter* mRouter; //!< pointer to the Router
};
}
diff --git a/AudioManagerDaemon/include/ControlSender.h b/AudioManagerDaemon/include/CAmControlSender.h
index 6e04d48..ddc8cf3 100644
--- a/AudioManagerDaemon/include/ControlSender.h
+++ b/AudioManagerDaemon/include/CAmControlSender.h
@@ -3,7 +3,7 @@
*
* GeniviAudioMananger AudioManagerDaemon
*
- * \file ControlSender.h
+ * \file CAmControlSender.h
*
* \date 20-Oct-2011 3:42:04 PM
* \author Christian Mueller (christian.ei.mueller@bmw.de)
@@ -26,10 +26,10 @@
#define CONTROLSENDER_H_
#ifdef UNIT_TEST
-#include "../test/ControlInterfaceBackdoor.h"
+#include "../test/IAmControlBackdoor.h"
#endif
-#include "control/ControlSendInterface.h"
+#include "control/IAmControlSend.h"
namespace am
{
@@ -37,12 +37,12 @@ namespace am
/**
* sends data to the commandInterface, takes the file of the library that needs to be loaded
*/
-class ControlSender
+class CAmControlSender
{
public:
- ControlSender(std::string controlPluginFile);
- ~ControlSender();
- am_Error_e startupController(ControlReceiveInterface* controlreceiveinterface) ;
+ CAmControlSender(std::string controlPluginFile);
+ ~CAmControlSender();
+ am_Error_e startupController(IAmControlReceive* controlreceiveinterface) ;
void setControllerReady() ;
void setControllerRundown() ;
am_Error_e hookUserConnectionRequest(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID) ;
@@ -91,11 +91,11 @@ public:
void confirmRoutingRundown() ;
#ifdef UNIT_TEST
- friend class ControlInterfaceBackdoor;
+ friend class IAmControlBackdoor;
#endif
private:
void* mlibHandle; //!< pointer to the loaded control plugin interface
- ControlSendInterface* mController; //!< pointer to the ControlSend interface
+ IAmControlSend* mController; //!< pointer to the ControlSend interface
};
}
diff --git a/AudioManagerDaemon/include/DatabaseHandler.h b/AudioManagerDaemon/include/CAmDatabaseHandler.h
index 964bbbe..ceaff88 100644
--- a/AudioManagerDaemon/include/DatabaseHandler.h
+++ b/AudioManagerDaemon/include/CAmDatabaseHandler.h
@@ -3,7 +3,7 @@
*
* GeniviAudioMananger AudioManagerDaemon
*
- * \file Databasehandler.h
+ * \file CAmDatabaseHandler.h
*
* \date 20-Oct-2011 3:42:04 PM
* \author Christian Mueller (christian.ei.mueller@bmw.de)
@@ -33,9 +33,9 @@
namespace am
{
-class DatabaseObserver;
-class RoutingTree;
-class RoutingTreeItem;
+class CAmDatabaseObserver;
+class CAmRoutingTree;
+class CAmRoutingTreeItem;
#define DYNAMIC_ID_BOUNDARY 100 //!< the value below is reserved for staticIDs, the value above will be assigned to dynamically registered items
//todo: check the enum values before entering & changing in the database.
@@ -49,11 +49,11 @@ class RoutingTreeItem;
/**
* This class handles and abstracts the database
*/
-class DatabaseHandler
+class CAmDatabaseHandler
{
public:
- DatabaseHandler(std::string databasePath);
- ~DatabaseHandler();
+ CAmDatabaseHandler(std::string databasePath);
+ ~CAmDatabaseHandler();
am_Error_e enterDomainDB(const am_Domain_s& domainData, am_domainID_t& domainID);
am_Error_e enterMainConnectionDB(const am_MainConnection_s& mainConnectionData, am_mainConnectionID_t& connectionID);
am_Error_e enterSinkDB(const am_Sink_s& sinkData, am_sinkID_t& sinkID);
@@ -132,7 +132,7 @@ public:
am_Error_e getDomainOfSink(const am_sinkID_t sinkID, am_domainID_t& domainID) const;
am_Error_e getSoureState(const am_sourceID_t sourceID, am_SourceState_e& sourceState) const;
am_Error_e getDomainState(const am_domainID_t domainID, am_DomainState_e state) const;
- am_Error_e getRoutingTree(bool onlyfree, RoutingTree& tree, std::vector<RoutingTreeItem*>& flatTree);
+ am_Error_e getRoutingTree(bool onlyfree, CAmRoutingTree& tree, std::vector<CAmRoutingTreeItem*>& flatTree);
am_Error_e peekDomain(const std::string& name, am_domainID_t& domainID);
am_Error_e peekSink(const std::string& name, am_sinkID_t& sinkID);
am_Error_e peekSource(const std::string& name, am_sourceID_t& sourceID);
@@ -241,7 +241,7 @@ public:
* registers the Observer at the Database
* @param iObserver pointer to the observer
*/
- void registerObserver(DatabaseObserver *iObserver);
+ void registerObserver(CAmDatabaseObserver *iObserver);
/**
* gives information about the visibility of a source
@@ -264,7 +264,7 @@ private:
void createTables(); //!< creates all tables from the static table
sqlite3 *mDatabase; //!< pointer to the database
std::string mPath; //!< path to the database
- DatabaseObserver *mDatabaseObserver; //!< pointer to the Observer
+ CAmDatabaseObserver *mDatabaseObserver; //!< pointer to the Observer
bool mFirstStaticSink;
bool mFirstStaticSource;
bool mFirstStaticGateway;
diff --git a/AudioManagerDaemon/include/DatabaseObserver.h b/AudioManagerDaemon/include/CAmDatabaseObserver.h
index 3862a79..430f061 100644
--- a/AudioManagerDaemon/include/DatabaseObserver.h
+++ b/AudioManagerDaemon/include/CAmDatabaseObserver.h
@@ -3,7 +3,7 @@
*
* GeniviAudioMananger AudioManagerDaemon
*
- * \file DatabaseObserver.h
+ * \file CAmDatabaseObserver.h
*
* \date 20-Oct-2011 3:42:04 PM
* \author Christian Mueller (christian.ei.mueller@bmw.de)
@@ -27,26 +27,26 @@
#include <audiomanagertypes.h>
#include <queue>
-#include "CAmSerializer.h"
+#include "shared/CAmSerializer.h"
namespace am
{
-class TelnetServer;
-class CommandSender;
-class RoutingSender;
-class SocketHandler;
+class CAmTelnetServer;
+class CAmCommandSender;
+class CAmRoutingSender;
+class CAmSocketHandler;
/**
* This class observes the Database and notifies other classes about important events, mainly the CommandSender.
*/
-class DatabaseObserver
+class CAmDatabaseObserver
{
public:
- DatabaseObserver(CommandSender *iCommandSender, RoutingSender *iRoutingSender, SocketHandler *iSocketHandler);
- DatabaseObserver(CommandSender *iCommandSender, RoutingSender *iRoutingSender, SocketHandler *iSocketHandler, TelnetServer *iTelnetServer);
- ~DatabaseObserver();
+ CAmDatabaseObserver(CAmCommandSender *iCommandSender, CAmRoutingSender *iRoutingSender, CAmSocketHandler *iSocketHandler);
+ CAmDatabaseObserver(CAmCommandSender *iCommandSender, CAmRoutingSender *iRoutingSender, CAmSocketHandler *iSocketHandler, CAmTelnetServer *iTelnetServer);
+ ~CAmDatabaseObserver();
void numberOfSinkClassesChanged();
void numberOfSourceClassesChanged();
void newSink(const am_Sink_s& sink);
@@ -72,9 +72,9 @@ public:
void timingInformationChanged(const am_mainConnectionID_t mainConnection, const am_timeSync_t time);
private:
- CommandSender *mCommandSender; //!< pointer to the comandSender
- RoutingSender* mRoutingSender; //!< pointer to the routingSender
- TelnetServer* mTelnetServer; //!< pointer to the telnetserver
+ CAmCommandSender *mCommandSender; //!< pointer to the comandSender
+ CAmRoutingSender* mRoutingSender; //!< pointer to the routingSender
+ CAmTelnetServer* mTelnetServer; //!< pointer to the telnetserver
CAmSerializer mSerializer;
};
diff --git a/AudioManagerDaemon/include/Router.h b/AudioManagerDaemon/include/CAmRouter.h
index 11a5634..ba13bf1 100644
--- a/AudioManagerDaemon/include/Router.h
+++ b/AudioManagerDaemon/include/CAmRouter.h
@@ -3,7 +3,7 @@
*
* GeniviAudioMananger AudioManagerDaemon
*
- * \file Router.h
+ * \file CAmRouter.h
*
* \date 20-Oct-2011 3:42:04 PM
* \author Christian Mueller (christian.ei.mueller@bmw.de)
@@ -30,53 +30,53 @@
namespace am
{
-class DatabaseHandler;
-class ControlSender;
+class CAmDatabaseHandler;
+class CAmControlSender;
-class Router
+class CAmRouter
{
public:
- Router(DatabaseHandler* iDatabaseHandler, ControlSender* iSender);
+ CAmRouter(CAmDatabaseHandler* iDatabaseHandler, CAmControlSender* iSender);
am_Error_e getRoute(const bool onlyfree, const am_sourceID_t sourceID, const am_sinkID_t sinkID, std::vector<am_Route_s>& returnList);
- ~Router();
+ ~CAmRouter();
private:
am_Error_e findBestWay(am_sinkID_t sinkID, am_sourceID_t sourceID, std::vector<am_RoutingElement_s>& listRoute, std::vector<am_RoutingElement_s>::iterator routeIterator, std::vector<am_gatewayID_t>::iterator gatewayIterator);
void listPossibleConnectionFormats(const am_sourceID_t sourceID, const am_sinkID_t sinkID, std::vector<am_ConnectionFormat_e>& listFormats) const;
void listRestrictedOutputFormatsGateways(const am_gatewayID_t gatewayID, const am_ConnectionFormat_e sinkConnectionFormat, std::vector<am_ConnectionFormat_e>& listFormats) const;
- DatabaseHandler* mDatabaseHandler;
- ControlSender* mControlSender;
+ CAmDatabaseHandler* mDatabaseHandler;
+ CAmControlSender* mControlSender;
};
-class RoutingTreeItem
+class CAmRoutingTreeItem
{
public:
- RoutingTreeItem(const am_domainID_t domainID, const am_gatewayID_t gatewayID = 0, RoutingTreeItem *parent = 0);
- void appendChild(RoutingTreeItem *newChild);
- void returnChildItems(std::vector<RoutingTreeItem*> listChildItems);
+ CAmRoutingTreeItem(const am_domainID_t domainID, const am_gatewayID_t gatewayID = 0, CAmRoutingTreeItem *parent = 0);
+ void appendChild(CAmRoutingTreeItem *newChild);
+ void returnChildItems(std::vector<CAmRoutingTreeItem*> listChildItems);
am_domainID_t returnDomainID() const;
am_gatewayID_t returnGatewayID() const;
- virtual ~RoutingTreeItem();
- RoutingTreeItem* returnParent() const;
+ virtual ~CAmRoutingTreeItem();
+ CAmRoutingTreeItem* returnParent() const;
private:
- std::vector<RoutingTreeItem*> mListChildItems; //!< List of all child items
+ std::vector<CAmRoutingTreeItem*> mListChildItems; //!< List of all child items
am_domainID_t mDomainID; //!< the domain ID of the item
am_gatewayID_t mGatewayID; //!< the gateway Id
- RoutingTreeItem *mParentItem; //!< pointer to the parent item
+ CAmRoutingTreeItem *mParentItem; //!< pointer to the parent item
};
-class RoutingTree
+class CAmRoutingTree
{
public:
- RoutingTree(const am_domainID_t rootDomainID);
- RoutingTreeItem* insertItem(const am_domainID_t domainID, const am_gatewayID_t gatewayID, RoutingTreeItem *parent);
- void getRoute(RoutingTreeItem* targetItem, std::vector<am_gatewayID_t>& listGateways);
+ CAmRoutingTree(const am_domainID_t rootDomainID);
+ CAmRoutingTreeItem* insertItem(const am_domainID_t domainID, const am_gatewayID_t gatewayID, CAmRoutingTreeItem *parent);
+ void getRoute(CAmRoutingTreeItem* targetItem, std::vector<am_gatewayID_t>& listGateways);
am_domainID_t returnRootDomainID() const;
- RoutingTreeItem* returnRootItem();
- virtual ~RoutingTree();
+ CAmRoutingTreeItem* returnRootItem();
+ virtual ~CAmRoutingTree();
private:
- RoutingTreeItem mRootItem; //!< pointer to root item
- std::vector<RoutingTreeItem*> mListChild; //!< list of all childs
+ CAmRoutingTreeItem mRootItem; //!< pointer to root item
+ std::vector<CAmRoutingTreeItem*> mListChild; //!< list of all childs
};
} /* namespace am */
diff --git a/AudioManagerDaemon/include/RoutingReceiver.h b/AudioManagerDaemon/include/CAmRoutingReceiver.h
index ae964ff..dfacc3b 100644
--- a/AudioManagerDaemon/include/RoutingReceiver.h
+++ b/AudioManagerDaemon/include/CAmRoutingReceiver.h
@@ -3,7 +3,7 @@
*
* GeniviAudioMananger AudioManagerDaemon
*
- * \file RoutingReceiver.h
+ * \file CAmRoutingReceiver.h
*
* \date 20-Oct-2011 3:42:04 PM
* \author Christian Mueller (christian.ei.mueller@bmw.de)
@@ -25,27 +25,27 @@
#ifndef ROUTINGRECEIVER_H_
#define ROUTINGRECEIVER_H_
-#include <routing/RoutingReceiveInterface.h>
+#include <routing/IAmRoutingReceive.h>
#include <config.h>
namespace am
{
-class SocketHandler;
-class DBusWrapper;
-class DatabaseHandler;
-class RoutingSender;
-class ControlSender;
+class CAmSocketHandler;
+class CAmDbusWrapper;
+class CAmDatabaseHandler;
+class CAmRoutingSender;
+class CAmControlSender;
/**
* Implements the Receiving side of the RoutingPlugins.
*/
-class RoutingReceiver: public RoutingReceiveInterface
+class CAmRoutingReceiver: public IAmRoutingReceive
{
public:
- RoutingReceiver(DatabaseHandler *iDatabaseHandler, RoutingSender *iRoutingSender, ControlSender *iControlSender, SocketHandler *iSocketHandler);
- RoutingReceiver(DatabaseHandler *iDatabaseHandler, RoutingSender *iRoutingSender, ControlSender *iControlSender, SocketHandler *iSocketHandler, DBusWrapper *iDBusWrapper);
- ~RoutingReceiver();
+ CAmRoutingReceiver(CAmDatabaseHandler *iDatabaseHandler, CAmRoutingSender *iRoutingSender, CAmControlSender *iControlSender, CAmSocketHandler *iSocketHandler);
+ CAmRoutingReceiver(CAmDatabaseHandler *iDatabaseHandler, CAmRoutingSender *iRoutingSender, CAmControlSender *iControlSender, CAmSocketHandler *iSocketHandler, CAmDbusWrapper *iDBusWrapper);
+ ~CAmRoutingReceiver();
void ackConnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_Error_e error);
void ackDisconnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_Error_e error);
void ackSetSinkVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error);
@@ -80,8 +80,8 @@ public:
void hookDomainStateChange(const am_domainID_t domainID, const am_DomainState_e domainState);
void hookTimingInformationChanged(const am_connectionID_t connectionID, const am_timeSync_t delay);
void sendChangedData(const std::vector<am_EarlyData_s>& earlyData);
- am_Error_e getDBusConnectionWrapper(DBusWrapper*& dbusConnectionWrapper) const;
- am_Error_e getSocketHandler(SocketHandler*& socketHandler) const;
+ 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);
@@ -93,11 +93,11 @@ public:
void waitOnRundown(bool rundown); //!< tells the RoutingReceiver to start waiting for all handles to be confirmed
private:
- DatabaseHandler *mDatabaseHandler; //!< pointer to the databaseHandler
- RoutingSender *mRoutingSender; //!< pointer to the routingSender
- ControlSender *mControlSender; //!< pointer to the controlSender
- SocketHandler *mSocketHandler; //!< pointer to sockethandler
- DBusWrapper *mDBusWrapper; //!< pointer to dbuswrapper
+ CAmDatabaseHandler *mDatabaseHandler; //!< pointer to the databaseHandler
+ CAmRoutingSender *mRoutingSender; //!< pointer to the routingSender
+ CAmControlSender *mControlSender; //!< pointer to the controlSender
+ CAmSocketHandler *mSocketHandler; //!< pointer to sockethandler
+ CAmDbusWrapper *mDBusWrapper; //!< pointer to dbuswrapper
uint16_t handleCount; //!< counts all handles
std::vector<uint16_t> mListStartupHandles; //!< list of handles that wait for a confirm
diff --git a/AudioManagerDaemon/include/RoutingSender.h b/AudioManagerDaemon/include/CAmRoutingSender.h
index f445313..c6a7677 100644
--- a/AudioManagerDaemon/include/RoutingSender.h
+++ b/AudioManagerDaemon/include/CAmRoutingSender.h
@@ -3,7 +3,7 @@
*
* GeniviAudioMananger AudioManagerDaemon
*
- * \file RoutingSender.h
+ * \file CAmRoutingSender.h
*
* \date 20-Oct-2011 3:42:04 PM
* \author Christian Mueller (christian.ei.mueller@bmw.de)
@@ -25,26 +25,26 @@
#ifndef ROUTINGSENDER_H_
#define ROUTINGSENDER_H_
-#include "routing/RoutingSendInterface.h"
+#include "routing/IAmRoutingSend.h"
#include <map>
#ifdef UNIT_TEST //this is needed to test RoutingSender
-#include "../test/RoutingInterfaceBackdoor.h"
+#include "../test/IAmRoutingBackdoor.h"
#endif
namespace am
{
-class RoutingReceiver;
+class CAmRoutingReceiver;
/**
* Implements the RoutingSendInterface. Loads all plugins and dispatches calls to the plugins
*/
-class RoutingSender
+class CAmRoutingSender
{
public:
- RoutingSender(const std::vector<std::string>& listOfPluginDirectories);
- ~RoutingSender();
+ CAmRoutingSender(const std::vector<std::string>& listOfPluginDirectories);
+ ~CAmRoutingSender();
/**
* removes a handle from the list
@@ -97,7 +97,7 @@ public:
* this removes the Crossfader to the lookup table of the Router. This must be done everytime a crossfader is deregistered.
*/
am_Error_e removeCrossfaderLookup(const am_crossfaderID_t crossfaderID);
- am_Error_e startupInterfaces(RoutingReceiver* iRoutingReceiver);
+ am_Error_e startupInterfaces(CAmRoutingReceiver* iRoutingReceiver);
void setRoutingReady();
void setRoutingRundown();
am_Error_e asyncAbort(const am_Handle_s& handle);
@@ -119,7 +119,7 @@ public:
//!< is used to pair interfaces with busnames
struct InterfaceNamePairs
{
- RoutingSendInterface* routingInterface;
+ IAmRoutingSend* routingInterface;
std::string busName;
};
@@ -146,7 +146,7 @@ public:
};
#ifdef UNIT_TEST //this is needed to test RoutingSender
- friend class RoutingInterfaceBackdoor;
+ friend class IAmRoutingBackdoor;
#endif
/**
@@ -176,12 +176,12 @@ private:
am_Handle_s createHandle(const am_handleData_c& handleData, const am_Handle_e type);
void unloadLibraries(void); //!< unloads all loaded plugins
- typedef std::map<am_domainID_t, RoutingSendInterface*> DomainInterfaceMap; //!< maps domains to interfaces
- typedef std::map<am_sinkID_t, RoutingSendInterface*> SinkInterfaceMap; //!< maps sinks to interfaces
- typedef std::map<am_sourceID_t, RoutingSendInterface*> SourceInterfaceMap; //!< maps sources to interfaces
- typedef std::map<am_crossfaderID_t, RoutingSendInterface*> CrossfaderInterfaceMap; //!< maps crossfaders to interfaces
- typedef std::map<am_connectionID_t, RoutingSendInterface*> ConnectionInterfaceMap; //!< maps connections to interfaces
- typedef std::map<uint16_t, RoutingSendInterface*> HandleInterfaceMap; //!< maps handles to interfaces
+ typedef std::map<am_domainID_t, IAmRoutingSend*> DomainInterfaceMap; //!< maps domains to interfaces
+ typedef std::map<am_sinkID_t, IAmRoutingSend*> SinkInterfaceMap; //!< maps sinks to interfaces
+ typedef std::map<am_sourceID_t, IAmRoutingSend*> SourceInterfaceMap; //!< maps sources to interfaces
+ typedef std::map<am_crossfaderID_t, IAmRoutingSend*> CrossfaderInterfaceMap; //!< maps crossfaders to interfaces
+ typedef std::map<am_connectionID_t, IAmRoutingSend*> ConnectionInterfaceMap; //!< maps connections to interfaces
+ typedef std::map<uint16_t, IAmRoutingSend*> HandleInterfaceMap; //!< maps handles to interfaces
typedef std::map<am_Handle_s, am_handleData_c, comparator> HandlesMap; //!< maps handleData to handles
int16_t mHandleCount; //!< is used to create handles
@@ -194,7 +194,7 @@ private:
SinkInterfaceMap mMapSinkInterface; //!< map of sinks to interfaces
SourceInterfaceMap mMapSourceInterface; //!< map of sources to interfaces
HandleInterfaceMap mMapHandleInterface; //!< map of handles to interfaces
- RoutingReceiver *mRoutingReceiver;
+ CAmRoutingReceiver *mRoutingReceiver;
};
}
diff --git a/AudioManagerDaemon/include/CAmTelnetMenuHelper.h b/AudioManagerDaemon/include/CAmTelnetMenuHelper.h
index 5322526..54a0ee5 100644
--- a/AudioManagerDaemon/include/CAmTelnetMenuHelper.h
+++ b/AudioManagerDaemon/include/CAmTelnetMenuHelper.h
@@ -41,17 +41,17 @@
namespace am
{
-class TelnetServer;
-class DatabaseHandler;
-class CommandSender;
-class RoutingSender;
-class ControlSender;
-class CommandReceiver;
-class RoutingReceiver;
-class ControlReceiver;
-
-class Router;
-class SocketHandler;
+class CAmTelnetServer;
+class CAmDatabaseHandler;
+class CAmCommandSender;
+class CAmRoutingSender;
+class CAmControlSender;
+class CAmCommandReceiver;
+class CAmRoutingReceiver;
+class CAmControlReceiver;
+
+class CAmRouter;
+class CAmSocketHandler;
class CAmTelnetMenuHelper
{
@@ -62,7 +62,7 @@ public:
eRootState = 0, eListState, eInfoState, eGetState, eSetState
};
- CAmTelnetMenuHelper(SocketHandler *iSocketHandler, CommandSender *iCommandSender, CommandReceiver *iCommandReceiver, RoutingSender *iRoutingSender, RoutingReceiver *iRoutingReceiver, ControlSender *iControlSender, ControlReceiver *iControlReceiver, DatabaseHandler *iDatabasehandler, Router *iRouter, TelnetServer *iTelnetServer);
+ CAmTelnetMenuHelper(CAmSocketHandler *iSocketHandler, CAmCommandSender *iCommandSender, CAmCommandReceiver *iCommandReceiver, CAmRoutingSender *iRoutingSender, CAmRoutingReceiver *iRoutingReceiver, CAmControlSender *iControlSender, CAmControlReceiver *iControlReceiver, CAmDatabaseHandler *iDatabasehandler, CAmRouter *iRouter, CAmTelnetServer *iTelnetServer);
~CAmTelnetMenuHelper();
@@ -171,16 +171,16 @@ private:
std::map<int, EMainState> mCurrentMainStateMap;
static CAmTelnetMenuHelper* instance;
- TelnetServer *mpTelenetServer;
- SocketHandler *mpSocketHandler;
- CommandSender *mpCommandSender;
- CommandReceiver *mpCommandReceiver;
- RoutingSender *mpRoutingSender;
- RoutingReceiver *mpRoutingReceiver;
- ControlSender *mpControlSender;
- ControlReceiver *mpControlReceiver;
- DatabaseHandler *mpDatabasehandler;
- Router *mpRouter;
+ CAmTelnetServer *mpTelenetServer;
+ CAmSocketHandler *mpSocketHandler;
+ CAmCommandSender *mpCommandSender;
+ CAmCommandReceiver *mpCommandReceiver;
+ CAmRoutingSender *mpRoutingSender;
+ CAmRoutingReceiver *mpRoutingReceiver;
+ CAmControlSender *mpControlSender;
+ CAmControlReceiver *mpControlReceiver;
+ CAmDatabaseHandler *mpDatabasehandler;
+ CAmRouter *mpRouter;
tCommandMap mRootCommands;
tCommandMap mListCommands;
diff --git a/AudioManagerDaemon/include/TelnetServer.h b/AudioManagerDaemon/include/CAmTelnetServer.h
index f95bd84..f7bf274 100644
--- a/AudioManagerDaemon/include/TelnetServer.h
+++ b/AudioManagerDaemon/include/CAmTelnetServer.h
@@ -3,7 +3,7 @@
*
* GeniviAudioMananger AudioManagerDaemon
*
- * \file TelnetServer.h
+ * \file CAmTelnetServer.h
*
* \date 20-Oct-2011 3:42:04 PM
* \author Christian Mueller (christian.ei.mueller@bmw.de)
@@ -25,7 +25,7 @@
#ifndef TELNETSERVER_H_
#define TELNETSERVER_H_
-#include "SocketHandler.h"
+#include "shared/CAmSocketHandler.h"
#include "CAmTelnetMenuHelper.h"
#include <queue>
#include <map>
@@ -33,41 +33,41 @@
namespace am
{
-class DatabaseHandler;
-class CommandSender;
-class RoutingSender;
-class ControlSender;
-class CommandReceiver;
-class RoutingReceiver;
-class ControlReceiver;
-class Router;
+class CAmDatabaseHandler;
+class CAmCommandSender;
+class CAmRoutingSender;
+class CAmControlSender;
+class CAmCommandReceiver;
+class CAmRoutingReceiver;
+class CAmControlReceiver;
+class CAmRouter;
class CAmTelnetMenuHelper;
-class TelnetServer
+class CAmTelnetServer
{
public:
- TelnetServer(SocketHandler *iSocketHandler,
- CommandSender *iCommandSender,
- CommandReceiver *iCommandReceiver,
- RoutingSender *iRoutingSender,
- RoutingReceiver *iRoutingReceiver,
- ControlSender *iControlSender,
- ControlReceiver *iControlReceiver,
- DatabaseHandler *iDatabasehandler,
- Router *iRouter,
+ CAmTelnetServer(CAmSocketHandler *iSocketHandler,
+ CAmCommandSender *iCommandSender,
+ CAmCommandReceiver *iCommandReceiver,
+ CAmRoutingSender *iRoutingSender,
+ CAmRoutingReceiver *iRoutingReceiver,
+ CAmControlSender *iControlSender,
+ CAmControlReceiver *iControlReceiver,
+ CAmDatabaseHandler *iDatabasehandler,
+ CAmRouter *iRouter,
unsigned int servPort,
unsigned int maxConnections);
- ~TelnetServer();
+ ~CAmTelnetServer();
void connectSocket(const pollfd pfd, const sh_pollHandle_t handle, void* userData);
void disconnectClient(int filedescriptor);
void receiveData(const pollfd pfd, const sh_pollHandle_t handle, void* userData);
bool dispatchData(const sh_pollHandle_t handle, void* userData);
bool check(const sh_pollHandle_t handle, void* userData);
- shPollFired_T<TelnetServer> telnetConnectFiredCB;
- shPollFired_T<TelnetServer> telnetReceiveFiredCB;
- shPollDispatch_T<TelnetServer> telnetDispatchCB;
- shPollCheck_T<TelnetServer> telnetCheckCB;
+ TAmShPollFired<CAmTelnetServer> telnetConnectFiredCB;
+ TAmShPollFired<CAmTelnetServer> telnetReceiveFiredCB;
+ TAmShPollDispatch<CAmTelnetServer> telnetDispatchCB;
+ TAmShPollCheck<CAmTelnetServer> telnetCheckCB;
private:
typedef void (*CommandPrototype)(std::vector<std::string>& msg,int filedescriptor);
@@ -81,16 +81,16 @@ private:
sh_pollHandle_t handle;
};
- static TelnetServer* instance;
- SocketHandler *mSocketHandler;
- CommandSender *mCommandSender;
- CommandReceiver *mCommandReceiver;
- RoutingSender *mRoutingSender;
- RoutingReceiver *mRoutingReceiver;
- ControlSender *mControlSender;
- ControlReceiver *mControlReceiver;
- DatabaseHandler *mDatabasehandler;
- Router *mRouter;
+ static CAmTelnetServer* instance;
+ CAmSocketHandler *mSocketHandler;
+ CAmCommandSender *mCommandSender;
+ CAmCommandReceiver *mCommandReceiver;
+ CAmRoutingSender *mRoutingSender;
+ CAmRoutingReceiver *mRoutingReceiver;
+ CAmControlSender *mControlSender;
+ CAmControlReceiver *mControlReceiver;
+ CAmDatabaseHandler *mDatabasehandler;
+ CAmRouter *mRouter;
sh_pollHandle_t mConnecthandle;
std::queue<std::string> mMsgList;
std::vector<connection_s> mListConnections;
diff --git a/AudioManagerDaemon/include/mainpage.h b/AudioManagerDaemon/include/DAmDoxygenMainPage.h
index 8d8fdab..e27b233 100644
--- a/AudioManagerDaemon/include/mainpage.h
+++ b/AudioManagerDaemon/include/DAmDoxygenMainPage.h
@@ -46,7 +46,7 @@
* \section routing_adaptor Routing Adapter
*
* Via this adapter, the interconnection from the AudioManager to the AudioDomains is accomplished. An AudioDomain shall have exactly one RoutingAdapter. In the terms of GENIVI, a RoutingAdapter is an AbstractComponent, this means that we define an API and a certain behavior in UML models but do not maintain components itself. Existing implementations from Proof of Concepts are shipped as example Adapters "as is" but cannot be seen as maintained components.\n
- * The implementation of a routing adapter can and will vary from each project to another since the combination of sinks and sources, the used hardware etc has influence on the adapters. Besides interchanging and abstracting information between the AudioManager and the sinks and sources, the Adapters also need to implement some business logic in order to interact with the AudioManager. This includes for example the registering of components, managing the current state, error handling etc.\n
+ * The implementation of a routing adapter can and will vary from each project to another since the combination of sinks and sources, the used hardware etc has influence on the adapters. Besides interchanging and abstracting information between the AudioManager and the sinks and sources, the Adapters also need to implement some business logic in order to interact with the AudioManager. This include for example the registering of components, managing the current state, error handling etc.\n
* In the special case of an EarlyDomain, the routing adapter also has to manage start-up and rundown including persistence for his domain while the AudioManager is not started or already stopped. During this periods of time, these special adapters have to be able to fulfill basic tasks like changing volumes, for example (this implies that the Adapter is implemented on a different piece of hardware, e.g. vehicle processor).
*
* \section Gateway
diff --git a/AudioManagerDaemon/include/PluginTemplate.h b/AudioManagerDaemon/include/TAmPluginTemplate.h
index 2c4dc42..e525ce3 100644
--- a/AudioManagerDaemon/include/PluginTemplate.h
+++ b/AudioManagerDaemon/include/TAmPluginTemplate.h
@@ -3,7 +3,7 @@
*
* GeniviAudioMananger AudioManagerDaemon
*
- * \file pluginTemplate.h
+ * \file TAmPluginTemplate.h
*
* \date 20-Oct-2011 3:42:04 PM
* \author Christian Mueller (christian.ei.mueller@bmw.de)
@@ -27,7 +27,7 @@
#include <dlfcn.h>
#include <libgen.h>
-#include "DLTWrapper.h"
+#include "shared/CAmDltWrapper.h"
namespace am
{