diff options
author | Christian Mueller <christian@lmuc329619u.(none)> | 2011-12-18 16:33:52 +0100 |
---|---|---|
committer | Christian Mueller <christian@lmuc329619u.(none)> | 2011-12-18 16:33:52 +0100 |
commit | 18b59afe6cda90607ad0b193088000d4f9749a97 (patch) | |
tree | cd25bd8fd2b3b9d1e71e1e7df7059f9c0afc2df0 /AudioManagerDaemon/include | |
parent | 392d090c63dcb03df8a044abbc6cc84807e341e5 (diff) | |
download | audiomanager-18b59afe6cda90607ad0b193088000d4f9749a97.tar.gz |
- added comments in XML description
- fixed bug in Dbus signal sending
- corrected namespace usage
Diffstat (limited to 'AudioManagerDaemon/include')
-rw-r--r-- | AudioManagerDaemon/include/CommandReceiver.h | 4 | ||||
-rw-r--r-- | AudioManagerDaemon/include/CommandSender.h | 4 | ||||
-rw-r--r-- | AudioManagerDaemon/include/ControlReceiver.h | 4 | ||||
-rw-r--r-- | AudioManagerDaemon/include/ControlSender.h | 6 | ||||
-rw-r--r-- | AudioManagerDaemon/include/DatabaseHandler.h | 4 | ||||
-rw-r--r-- | AudioManagerDaemon/include/DatabaseObserver.h | 4 | ||||
-rw-r--r-- | AudioManagerDaemon/include/PluginTemplate.h | 13 | ||||
-rw-r--r-- | AudioManagerDaemon/include/RoutingReceiver.h | 4 | ||||
-rw-r--r-- | AudioManagerDaemon/include/RoutingSender.h | 8 |
9 files changed, 36 insertions, 15 deletions
diff --git a/AudioManagerDaemon/include/CommandReceiver.h b/AudioManagerDaemon/include/CommandReceiver.h index 2e49c9a..7a4fdc8 100644 --- a/AudioManagerDaemon/include/CommandReceiver.h +++ b/AudioManagerDaemon/include/CommandReceiver.h @@ -30,7 +30,7 @@ #include "DBusWrapper.h" #include "ControlSender.h" -using namespace am; +namespace am { /** * This class realizes the command Interface @@ -64,4 +64,6 @@ private: ControlSender* mControlSender; //!< pointer to the control sender }; +} + #endif /* COMMANDRECEIVER_H_ */ diff --git a/AudioManagerDaemon/include/CommandSender.h b/AudioManagerDaemon/include/CommandSender.h index a871a77..df83e7c 100644 --- a/AudioManagerDaemon/include/CommandSender.h +++ b/AudioManagerDaemon/include/CommandSender.h @@ -31,7 +31,7 @@ #include "command/CommandSendInterface.h" -using namespace am; +namespace am { /** * This class is used to send data to the CommandInterface. @@ -68,4 +68,6 @@ private: std::vector<void*> mListLibraryHandles; //!< list of all library handles. This information is used to unload the plugins correctly. }; +} + #endif /* COMMANDSENDER_H_ */ diff --git a/AudioManagerDaemon/include/ControlReceiver.h b/AudioManagerDaemon/include/ControlReceiver.h index 5564fd0..7692a10 100644 --- a/AudioManagerDaemon/include/ControlReceiver.h +++ b/AudioManagerDaemon/include/ControlReceiver.h @@ -30,7 +30,7 @@ #include "RoutingSender.h" #include "CommandSender.h" -using namespace am; +namespace am { /** * This class is used to receive all commands from the control interface @@ -107,4 +107,6 @@ private: CommandSender* mCommandSender; //!< pointer to the command send interface }; +} + #endif /* CONTRONLRECEIVER_H_ */ diff --git a/AudioManagerDaemon/include/ControlSender.h b/AudioManagerDaemon/include/ControlSender.h index 133b7cd..9550595 100644 --- a/AudioManagerDaemon/include/ControlSender.h +++ b/AudioManagerDaemon/include/ControlSender.h @@ -31,7 +31,7 @@ #include "control/ControlSendInterface.h" -using namespace am; +namespace am { /** * sends data to the commandInterface, takes the file of the library that needs to be loaded @@ -84,8 +84,10 @@ public: friend class ControlInterfaceBackdoor; #endif private: - ControlSendInterface* mController; //!< pointer to the ControlSend interface void* mlibHandle; //!< pointer to the loaded control plugin interface + ControlSendInterface* mController; //!< pointer to the ControlSend interface }; +} + #endif /* CONTROLSENDER_H_ */ diff --git a/AudioManagerDaemon/include/DatabaseHandler.h b/AudioManagerDaemon/include/DatabaseHandler.h index ed17d91..c4b6dd4 100644 --- a/AudioManagerDaemon/include/DatabaseHandler.h +++ b/AudioManagerDaemon/include/DatabaseHandler.h @@ -29,7 +29,7 @@ #include "DatabaseObserver.h" #include <sqlite3.h> -using namespace am; +namespace am { #define DYNAMIC_ID_BOUNDARY 100 //!< the value below is reserved for staticIDs, the value above will be assigned to dynamically registered items @@ -259,4 +259,6 @@ private: ListConnectionFormat mListConnectionFormat; //!< list of connection formats }; +} + #endif /* DATABASEHANDLER_H_ */ diff --git a/AudioManagerDaemon/include/DatabaseObserver.h b/AudioManagerDaemon/include/DatabaseObserver.h index 42b38c2..21959a8 100644 --- a/AudioManagerDaemon/include/DatabaseObserver.h +++ b/AudioManagerDaemon/include/DatabaseObserver.h @@ -28,6 +28,8 @@ #include "CommandSender.h" #include "RoutingSender.h" +namespace am { + /** * This class observes the Database and notifies other classes about important events, mainly the CommandSender. */ @@ -62,4 +64,6 @@ private: RoutingSender* mRoutingSender; //!< pointer to the routingSender }; +} + #endif /* DATABASEOBSERVER_H_ */ diff --git a/AudioManagerDaemon/include/PluginTemplate.h b/AudioManagerDaemon/include/PluginTemplate.h index f995f0c..e8c031a 100644 --- a/AudioManagerDaemon/include/PluginTemplate.h +++ b/AudioManagerDaemon/include/PluginTemplate.h @@ -29,7 +29,9 @@ #include <dlfcn.h> #include <libgen.h> -DLT_IMPORT_CONTEXT(AudioManager) +DLT_IMPORT_CONTEXT(DLT_CONTEXT) + +namespace am { /** * This template tries to load a library and cast ot to a class @@ -38,7 +40,7 @@ DLT_IMPORT_CONTEXT(AudioManager) */ template<class T>T* getCreateFunction(const std::string& libname, void*& libraryHandle) { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Trying to load libray with name: "),DLT_STRING(libname.c_str())); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("Trying to load libray with name: "),DLT_STRING(libname.c_str())); // cut off directories char* fileWithPath = const_cast<char*>(libname.c_str()); @@ -53,7 +55,7 @@ template<class T>T* getCreateFunction(const std::string& libname, void*& library const char* dlopen_error = dlerror(); if (!libraryHandle || dlopen_error) { - DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("dlopen failed"),DLT_STRING(dlopen_error)); + DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("dlopen failed"),DLT_STRING(dlopen_error)); return 0; } @@ -76,14 +78,15 @@ template<class T>T* getCreateFunction(const std::string& libname, void*& library const char* dlsym_error = dlerror(); if (!createFunction || dlsym_error) { - DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("Failed to load shared lib entry point"),DLT_STRING(dlsym_error)); + DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("Failed to load shared lib entry point"),DLT_STRING(dlsym_error)); } else { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("loaded successfully plugin"),DLT_STRING(createFunctionName.c_str())); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("loaded successfully plugin"),DLT_STRING(createFunctionName.c_str())); } return createFunction; } +} #endif /* PLUGINTEMPLATE_H_ */ diff --git a/AudioManagerDaemon/include/RoutingReceiver.h b/AudioManagerDaemon/include/RoutingReceiver.h index 2c1cf0e..01933d5 100644 --- a/AudioManagerDaemon/include/RoutingReceiver.h +++ b/AudioManagerDaemon/include/RoutingReceiver.h @@ -30,7 +30,7 @@ #include "RoutingSender.h" #include "ControlSender.h" -using namespace am; +namespace am { /** * Implements the Receiving side of the RoutingPlugins. @@ -79,4 +79,6 @@ private: }; +} + #endif /* ROUTINGRECEIVER_H_ */ diff --git a/AudioManagerDaemon/include/RoutingSender.h b/AudioManagerDaemon/include/RoutingSender.h index 0a7a1eb..5f5967e 100644 --- a/AudioManagerDaemon/include/RoutingSender.h +++ b/AudioManagerDaemon/include/RoutingSender.h @@ -32,7 +32,7 @@ #include "../test/RoutingInterfaceBackdoor.h" #endif -using namespace am; +namespace am { /** * Implements the RoutingSendInterface. Loads all plugins and dispatches calls to the plugins @@ -177,15 +177,17 @@ private: typedef std::map<am_Handle_s,am_handleData_c,comparator> HandlesMap; //!< maps handleData to handles int16_t mHandleCount; //!< is used to create handles - std::vector<InterfaceNamePairs> mListInterfaces; //!< list of busname/interface relation + HandlesMap mlistActiveHandles; //!< list of all currently "running" handles. std::vector<void*> mListLibraryHandles; //!< list of all loaded pluginInterfaces + std::vector<InterfaceNamePairs> mListInterfaces; //!< list of busname/interface relation ConnectionInterfaceMap mMapConnectionInterface; //!< map of connection to interfaces CrossfaderInterfaceMap mMapCrossfaderInterface; //!< map of crossfaders to interface DomainInterfaceMap mMapDomainInterface; //!< map of domains to interfaces SinkInterfaceMap mMapSinkInterface; //!< map of sinks to interfaces SourceInterfaceMap mMapSourceInterface; //!< map of sources to interfaces HandleInterfaceMap mMapHandleInterface; //!< map of handles to interfaces - HandlesMap mlistActiveHandles; //!< list of all currently "running" handles. }; +} + #endif /* ROUTINGSENDER_H_ */ |