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 | |
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')
34 files changed, 420 insertions, 396 deletions
diff --git a/AudioManagerDaemon/CMakeLists.txt b/AudioManagerDaemon/CMakeLists.txt index 8f3c416..472d23e 100644 --- a/AudioManagerDaemon/CMakeLists.txt +++ b/AudioManagerDaemon/CMakeLists.txt @@ -14,8 +14,8 @@ cmake_minimum_required(VERSION 2.6) PROJECT(AudioManagerDeamon) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -rdynamic") -set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic") -set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g") +#set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic") +set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -DDLT_CONTEXT=AudioManager") ##todo only when dbus needed! 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_ */ diff --git a/AudioManagerDaemon/src/CommandReceiver.cpp b/AudioManagerDaemon/src/CommandReceiver.cpp index b9e8eeb..80e3c8e 100644 --- a/AudioManagerDaemon/src/CommandReceiver.cpp +++ b/AudioManagerDaemon/src/CommandReceiver.cpp @@ -23,10 +23,13 @@ */ #include "CommandReceiver.h" -#include <dlt/dlt.h> + #include <assert.h> +#include <dlt/dlt.h> + +DLT_IMPORT_CONTEXT(DLT_CONTEXT) -DLT_IMPORT_CONTEXT(AudioManager) +using namespace am; CommandReceiver::CommandReceiver (DatabaseHandler* iDatabaseHandler, DBusWrapper* iDBusWrapper, ControlSender* iControlSender) : mDatabaseHandler(iDatabaseHandler), @@ -44,7 +47,7 @@ CommandReceiver::~CommandReceiver() am_Error_e CommandReceiver::connect(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t & mainConnectionID) { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("CommandReceiver::connect got called:"),DLT_STRING("sourceID"),DLT_INT(sourceID), DLT_STRING("sinkID"), DLT_INT(sinkID)); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandReceiver::connect got called:"),DLT_STRING("sourceID"),DLT_INT(sourceID), DLT_STRING("sinkID"), DLT_INT(sinkID)); return mControlSender->hookUserConnectionRequest(sourceID,sinkID,mainConnectionID); } @@ -52,7 +55,7 @@ am_Error_e CommandReceiver::connect(const am_sourceID_t sourceID, const am_sinkI am_Error_e CommandReceiver::disconnect(const am_mainConnectionID_t mainConnectionID) { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("CommandReceiver::disconnect got called, mainConnectionID="),DLT_INT(mainConnectionID)); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandReceiver::disconnect got called, mainConnectionID="),DLT_INT(mainConnectionID)); return mControlSender->hookUserDisconnectionRequest(mainConnectionID); } @@ -60,7 +63,7 @@ am_Error_e CommandReceiver::disconnect(const am_mainConnectionID_t mainConnectio am_Error_e CommandReceiver::setVolume(const am_sinkID_t sinkID, const am_mainVolume_t volume) { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("CommandReceiver::setVolume got called, sinkID="),DLT_INT(sinkID),DLT_STRING("volume="),DLT_INT(volume)); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandReceiver::setVolume got called, sinkID="),DLT_INT(sinkID),DLT_STRING("volume="),DLT_INT(volume)); return mControlSender->hookUserVolumeChange(sinkID,volume); } @@ -68,7 +71,7 @@ am_Error_e CommandReceiver::setVolume(const am_sinkID_t sinkID, const am_mainVol am_Error_e CommandReceiver::volumeStep(const am_sinkID_t sinkID, const int16_t volumeStep) { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("CommandReceiver::volumeStep got called, sinkID="),DLT_INT(sinkID),DLT_STRING("volumeStep="),DLT_INT(volumeStep)); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandReceiver::volumeStep got called, sinkID="),DLT_INT(sinkID),DLT_STRING("volumeStep="),DLT_INT(volumeStep)); return mControlSender->hookUserVolumeStep(sinkID,volumeStep); } @@ -76,7 +79,7 @@ am_Error_e CommandReceiver::volumeStep(const am_sinkID_t sinkID, const int16_t v am_Error_e CommandReceiver::setSinkMuteState(const am_sinkID_t sinkID, const am_MuteState_e muteState) { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("CommandReceiver::setSinkMuteState got called, sinkID="),DLT_INT(sinkID),DLT_STRING("muteState="),DLT_INT(muteState)); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandReceiver::setSinkMuteState got called, sinkID="),DLT_INT(sinkID),DLT_STRING("muteState="),DLT_INT(muteState)); return mControlSender->hookUserSetSinkMuteState(sinkID,muteState); } @@ -84,7 +87,7 @@ am_Error_e CommandReceiver::setSinkMuteState(const am_sinkID_t sinkID, const am_ am_Error_e CommandReceiver::setMainSinkSoundProperty(const am_MainSoundProperty_s & soundProperty, const am_sinkID_t sinkID) { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("CommandReceiver::setMainSinkSoundProperty got called, sinkID="),DLT_INT(sinkID),DLT_STRING("soundPropertyType="),DLT_INT(soundProperty.type),DLT_STRING("soundPropertyValue="),DLT_INT(soundProperty.value)); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandReceiver::setMainSinkSoundProperty got called, sinkID="),DLT_INT(sinkID),DLT_STRING("soundPropertyType="),DLT_INT(soundProperty.type),DLT_STRING("soundPropertyValue="),DLT_INT(soundProperty.value)); return mControlSender->hookUserSetMainSinkSoundProperty(sinkID,soundProperty); } @@ -92,7 +95,7 @@ am_Error_e CommandReceiver::setMainSinkSoundProperty(const am_MainSoundProperty_ am_Error_e CommandReceiver::setMainSourceSoundProperty(const am_MainSoundProperty_s & soundProperty, const am_sourceID_t sourceID) { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("CommandReceiver::setMainSourceSoundProperty got called, sourceID="),DLT_INT(sourceID),DLT_STRING("soundPropertyType="),DLT_INT(soundProperty.type),DLT_STRING("soundPropertyValue="),DLT_INT(soundProperty.value)); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandReceiver::setMainSourceSoundProperty got called, sourceID="),DLT_INT(sourceID),DLT_STRING("soundPropertyType="),DLT_INT(soundProperty.type),DLT_STRING("soundPropertyValue="),DLT_INT(soundProperty.value)); return mControlSender->hookUserSetMainSourceSoundProperty(sourceID,soundProperty); } @@ -100,7 +103,7 @@ am_Error_e CommandReceiver::setMainSourceSoundProperty(const am_MainSoundPropert am_Error_e CommandReceiver::setSystemProperty(const am_SystemProperty_s & property) { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("CommandReceiver::setSystemProperty got called"),DLT_STRING("type="),DLT_INT(property.type),DLT_STRING("soundPropertyValue="),DLT_INT(property.value)); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandReceiver::setSystemProperty got called"),DLT_STRING("type="),DLT_INT(property.type),DLT_STRING("soundPropertyValue="),DLT_INT(property.value)); return mControlSender->hookUserSetSystemProperty(property); } diff --git a/AudioManagerDaemon/src/CommandSender.cpp b/AudioManagerDaemon/src/CommandSender.cpp index 8c0afb4..658a497 100644 --- a/AudioManagerDaemon/src/CommandSender.cpp +++ b/AudioManagerDaemon/src/CommandSender.cpp @@ -24,11 +24,13 @@ #include "CommandSender.h" -#include "PluginTemplate.h" #include <dirent.h> - +#include <dlt/dlt.h> +#include "PluginTemplate.h" using namespace am; +DLT_IMPORT_CONTEXT(DLT_CONTEXT) + //!< macro to call all interfaces #define CALL_ALL_INTERFACES(...) \ std::vector<CommandSendInterface*>::iterator iter = mListInterfaces.begin(); \ @@ -50,12 +52,12 @@ CommandSender::CommandSender(const std::vector<std::string>& listOfPluginDirecto for (; dirIter < dirIterEnd; ++dirIter) { const char* directoryName = dirIter->c_str(); - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Searching for CommandPlugins in"),DLT_STRING(directoryName)); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("Searching for CommandPlugins in"),DLT_STRING(directoryName)); DIR *directory = opendir(directoryName); if (!directory) { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Error opening directory "),DLT_STRING(directoryName)); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("Error opening directory "),DLT_STRING(directoryName)); } // iterate content of directory @@ -83,14 +85,14 @@ CommandSender::CommandSender(const std::vector<std::string>& listOfPluginDirecto for (; iter < iterEnd; ++iter) { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Loading CommandSender plugin"),DLT_STRING(iter->c_str())); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("Loading CommandSender plugin"),DLT_STRING(iter->c_str())); CommandSendInterface* (*createFunc)(); void* tempLibHandle=NULL; createFunc = getCreateFunction<CommandSendInterface*()>(*iter,tempLibHandle); if (!createFunc) { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Entry point of CommandPlugin not found"),DLT_STRING(iter->c_str())); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("Entry point of CommandPlugin not found"),DLT_STRING(iter->c_str())); continue; } @@ -98,7 +100,7 @@ CommandSender::CommandSender(const std::vector<std::string>& listOfPluginDirecto if (!commander) { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("CommandPlugin initialization failed. Entry Function not callable")); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandPlugin initialization failed. Entry Function not callable")); continue; } diff --git a/AudioManagerDaemon/src/ControlReceiver.cpp b/AudioManagerDaemon/src/ControlReceiver.cpp index 18b85c7..4cce437 100644 --- a/AudioManagerDaemon/src/ControlReceiver.cpp +++ b/AudioManagerDaemon/src/ControlReceiver.cpp @@ -23,10 +23,12 @@ */ #include "ControlReceiver.h" -#include <dlt/dlt.h> #include <assert.h> +#include <dlt/dlt.h> + +DLT_IMPORT_CONTEXT(DLT_CONTEXT) -DLT_IMPORT_CONTEXT(AudioManager) +using namespace am; ControlReceiver::ControlReceiver(DatabaseHandler *iDatabaseHandler, RoutingSender *iRoutingSender, CommandSender *iCommandSender) : mDatabaseHandler(iDatabaseHandler), @@ -45,13 +47,14 @@ ControlReceiver::~ControlReceiver() am_Error_e ControlReceiver::getRoute(const bool onlyfree, const am_sourceID_t sourceID, const am_sinkID_t sinkID, std::vector<am_Route_s> & returnList) { //todo: implement routing algorithm + return E_NOT_USED; } am_Error_e ControlReceiver::connect(am_Handle_s & handle, am_connectionID_t & connectionID, const am_ConnectionFormat_e format, const am_sourceID_t sourceID, const am_sinkID_t sinkID) { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("ControlReceiver::connect got called, connectionFormat"),DLT_INT(format),DLT_STRING("sourceID"),DLT_INT(sourceID),DLT_STRING("sinkID"),DLT_INT(sinkID)); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("ControlReceiver::connect got called, connectionFormat"),DLT_INT(format),DLT_STRING("sourceID"),DLT_INT(sourceID),DLT_STRING("sinkID"),DLT_INT(sinkID)); am_Connection_s tempConnection; tempConnection.sinkID=sinkID; @@ -70,7 +73,7 @@ am_Error_e ControlReceiver::connect(am_Handle_s & handle, am_connectionID_t & co am_Error_e ControlReceiver::disconnect(am_Handle_s & handle, const am_connectionID_t connectionID) { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("ControlReceiver::disconnect got called, connectionID="),DLT_INT(connectionID)); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("ControlReceiver::disconnect got called, connectionID="),DLT_INT(connectionID)); if (!mDatabaseHandler->existConnectionID(connectionID)) return E_NON_EXISTENT; //todo: check with EA model and correct return mRoutingSender->asyncDisconnect(handle,connectionID); @@ -80,7 +83,7 @@ am_Error_e ControlReceiver::disconnect(am_Handle_s & handle, const am_connection am_Error_e ControlReceiver::crossfade(am_Handle_s & handle, const am_HotSink_e hotSource, const am_crossfaderID_t crossfaderID, const am_RampType_e rampType, const am_time_t rampTime) { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("ControlReceiver::crossfade got called, hotSource="),DLT_INT(hotSource),DLT_STRING("crossfaderID="),DLT_INT(crossfaderID),DLT_STRING("rampType="),DLT_INT(rampType),DLT_STRING("rampTime="),DLT_INT(rampTime)); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("ControlReceiver::crossfade got called, hotSource="),DLT_INT(hotSource),DLT_STRING("crossfaderID="),DLT_INT(crossfaderID),DLT_STRING("rampType="),DLT_INT(rampType),DLT_STRING("rampTime="),DLT_INT(rampTime)); if (!mDatabaseHandler->existcrossFader(crossfaderID)) return E_NON_EXISTENT; return mRoutingSender->asyncCrossFade(handle,crossfaderID,hotSource,rampType,rampTime); @@ -90,7 +93,7 @@ am_Error_e ControlReceiver::crossfade(am_Handle_s & handle, const am_HotSink_e h am_Error_e ControlReceiver::setSourceState(am_Handle_s & handle, const am_sourceID_t sourceID, const am_SourceState_e state) { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setSourceState got called, sourceID="),DLT_INT(sourceID),DLT_STRING("state="),DLT_INT(state)); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setSourceState got called, sourceID="),DLT_INT(sourceID),DLT_STRING("state="),DLT_INT(state)); am_SourceState_e sourceState; if(mDatabaseHandler->getSoureState(sourceID,sourceState)!=E_OK) return E_UNKNOWN; @@ -102,7 +105,7 @@ am_Error_e ControlReceiver::setSourceState(am_Handle_s & handle, const am_source am_Error_e ControlReceiver::setSinkVolume(am_Handle_s & handle, const am_sinkID_t sinkID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time) { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setSinkVolume got called, sinkID="),DLT_INT(sinkID),DLT_STRING("volume="),DLT_INT(volume),DLT_STRING("ramp="),DLT_INT(ramp),DLT_STRING("time="),DLT_INT(time)); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setSinkVolume got called, sinkID="),DLT_INT(sinkID),DLT_STRING("volume="),DLT_INT(volume),DLT_STRING("ramp="),DLT_INT(ramp),DLT_STRING("time="),DLT_INT(time)); am_volume_t tempVolume; if(mDatabaseHandler->getSinkVolume(sinkID,tempVolume)!=E_OK) return E_UNKNOWN; @@ -114,7 +117,7 @@ am_Error_e ControlReceiver::setSinkVolume(am_Handle_s & handle, const am_sinkID_ am_Error_e ControlReceiver::setSourceVolume(am_Handle_s & handle, const am_sourceID_t sourceID, const am_volume_t volume, const am_RampType_e rampType, const am_time_t time) { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setSourceVolume got called, sourceID="),DLT_INT(sourceID),DLT_STRING("volume="),DLT_INT(volume),DLT_STRING("ramp="),DLT_INT(rampType),DLT_STRING("time="),DLT_INT(time)); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setSourceVolume got called, sourceID="),DLT_INT(sourceID),DLT_STRING("volume="),DLT_INT(volume),DLT_STRING("ramp="),DLT_INT(rampType),DLT_STRING("time="),DLT_INT(time)); am_volume_t tempVolume; if(mDatabaseHandler->getSourceVolume(sourceID,tempVolume)!=E_OK) return E_UNKNOWN; @@ -126,7 +129,7 @@ am_Error_e ControlReceiver::setSourceVolume(am_Handle_s & handle, const am_sourc am_Error_e ControlReceiver::setSinkSoundProperty(am_Handle_s & handle, const am_sinkID_t sinkID, const am_SoundProperty_s & soundProperty) { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setSinkSoundProperty got called, sinkID="),DLT_INT(sinkID),DLT_STRING("soundProperty.Type="),DLT_INT(soundProperty.type),DLT_STRING("soundProperty.value="),DLT_INT(soundProperty.value)); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setSinkSoundProperty got called, sinkID="),DLT_INT(sinkID),DLT_STRING("soundProperty.Type="),DLT_INT(soundProperty.type),DLT_STRING("soundProperty.value="),DLT_INT(soundProperty.value)); uint16_t value; if(mDatabaseHandler->getSinkSoundPropertyValue(sinkID,soundProperty.type,value)!=E_OK) return E_UNKNOWN; @@ -138,7 +141,7 @@ am_Error_e ControlReceiver::setSinkSoundProperty(am_Handle_s & handle, const am_ am_Error_e ControlReceiver::setSourceSoundProperty(am_Handle_s & handle, const am_sourceID_t sourceID, const am_SoundProperty_s & soundProperty) { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setSourceSoundProperty got called, sourceID="),DLT_INT(sourceID),DLT_STRING("soundProperty.Type="),DLT_INT(soundProperty.type),DLT_STRING("soundProperty.value="),DLT_INT(soundProperty.value)); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setSourceSoundProperty got called, sourceID="),DLT_INT(sourceID),DLT_STRING("soundProperty.Type="),DLT_INT(soundProperty.type),DLT_STRING("soundProperty.value="),DLT_INT(soundProperty.value)); uint16_t value; if(mDatabaseHandler->getSourceSoundPropertyValue(sourceID,soundProperty.type,value)!=E_OK) return E_UNKNOWN; @@ -150,7 +153,7 @@ am_Error_e ControlReceiver::setSourceSoundProperty(am_Handle_s & handle, const a am_Error_e ControlReceiver::setDomainState(const am_domainID_t domainID, const am_DomainState_e domainState) { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setDomainState got called, domainID="),DLT_INT(domainID),DLT_STRING("domainState="),DLT_INT(domainState)); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setDomainState got called, domainID="),DLT_INT(domainID),DLT_STRING("domainState="),DLT_INT(domainState)); am_DomainState_e tempState=DS_MIN; if(mDatabaseHandler->getDomainState(domainID,tempState)!=E_OK) return E_UNKNOWN; @@ -162,7 +165,7 @@ am_Error_e ControlReceiver::setDomainState(const am_domainID_t domainID, const a am_Error_e ControlReceiver::abortAction(const am_Handle_s handle) { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("ControlReceiver::abortAction got called, handle.type="),DLT_INT(handle.handle),DLT_STRING("handle.handleType="),DLT_INT(handle.handleType)); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("ControlReceiver::abortAction got called, handle.type="),DLT_INT(handle.handle),DLT_STRING("handle.handleType="),DLT_INT(handle.handleType)); return mRoutingSender->asyncAbort(handle); } @@ -470,33 +473,33 @@ am_Error_e ControlReceiver::getListSystemProperties(std::vector<am_SystemPropert am_Error_e ControlReceiver::changeSinkClassInfoDB(const am_SinkClass_s & classInfo) { - mDatabaseHandler->changeSinkClassInfoDB(classInfo); + return mDatabaseHandler->changeSinkClassInfoDB(classInfo); } am_Error_e ControlReceiver::changeSourceClassInfoDB(const am_SourceClass_s & classInfo) { - mDatabaseHandler->changeSourceClassInfoDB(classInfo); + return mDatabaseHandler->changeSourceClassInfoDB(classInfo); } am_Error_e ControlReceiver::removeSinkClassDB(const am_sinkClass_t sinkClassID) { - mDatabaseHandler->removeSinkClassDB(sinkClassID); + return mDatabaseHandler->removeSinkClassDB(sinkClassID); } am_Error_e ControlReceiver::removeSourceClassDB(const am_sourceClass_t sourceClassID) { - mDatabaseHandler->removeSourceClassDB(sourceClassID); + return mDatabaseHandler->removeSourceClassDB(sourceClassID); } void ControlReceiver::setCommandReady() { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setCommandReady got called")); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setCommandReady got called")); mCommandSender->cbCommunicationReady(); } void ControlReceiver::setRoutingReady() { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setRoutingReady got called")); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setRoutingReady got called")); mRoutingSender->routingInterfacesReady(); } diff --git a/AudioManagerDaemon/src/ControlSender.cpp b/AudioManagerDaemon/src/ControlSender.cpp index 232c8e7..f5aaef7 100644 --- a/AudioManagerDaemon/src/ControlSender.cpp +++ b/AudioManagerDaemon/src/ControlSender.cpp @@ -6,10 +6,13 @@ */ #include "ControlSender.h" -#include "PluginTemplate.h" -#include <dlt/dlt.h> #include <assert.h> +#include <dlt/dlt.h> +#include "PluginTemplate.h" + +DLT_IMPORT_CONTEXT(DLT_CONTEXT) +using namespace am; ControlSender::ControlSender(std::string controlPluginFile) :mlibHandle(NULL), @@ -24,7 +27,7 @@ ControlSender::ControlSender(std::string controlPluginFile) } else { - DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("No controller loaded !")); + DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("No controller loaded !")); } } diff --git a/AudioManagerDaemon/src/DBusWrapper.cpp b/AudioManagerDaemon/src/DBusWrapper.cpp index 8876855..8b84942 100644 --- a/AudioManagerDaemon/src/DBusWrapper.cpp +++ b/AudioManagerDaemon/src/DBusWrapper.cpp @@ -23,18 +23,18 @@ */ #include "DBusWrapper.h" -#include <dlt/dlt.h> #include <fstream> #include <sstream> #include <string> +#include <dlt/dlt.h> -DLT_IMPORT_CONTEXT(AudioManager) +DLT_IMPORT_CONTEXT(DLT_CONTEXT) #define ROOT_INTROSPECT_XML \ DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE \ "<node>" \ -"<interface name='org.freedesktop.DBus.Introspectable'>" \ +"<interface name='orAudioManagerg.freedesktop.DBus.Introspectable'>" \ "<method name='Introspect'>" \ " <arg name='xml_data' type='s' direction='out'/>" \ "</method>" \ @@ -50,17 +50,17 @@ DBusWrapper::DBusWrapper() { dbus_error_init(&mDBusError); - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("DBusWrapper::DBusWrapper Opening DBus connection")); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("DBusWrapper::DBusWrapper Opening DBus connection")); mDbusConnection=dbus_bus_get(DBUS_BUS_SESSION, &mDBusError); if (dbus_error_is_set(&mDBusError)) { - DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::DBusWrapper Error while getting the DBus")); + DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::DBusWrapper Error while getting the DBus")); dbus_error_free(&mDBusError); } if (NULL == mDbusConnection) { - DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::DBusWrapper DBus Connection is null")); + DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::DBusWrapper DBus Connection is null")); } mObjectPathVTable.message_function=DBusWrapper::cbRootIntrospection; @@ -68,25 +68,25 @@ DBusWrapper::DBusWrapper() int ret = dbus_bus_request_name(mDbusConnection,DBUS_SERVICE_PREFIX,DBUS_NAME_FLAG_DO_NOT_QUEUE, &mDBusError); if (dbus_error_is_set(&mDBusError)) { - DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::DBusWrapper Name Error"),DLT_STRING(mDBusError.message)); + DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::DBusWrapper Name Error"),DLT_STRING(mDBusError.message)); dbus_error_free(&mDBusError); } if (DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER != ret) { - DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::DBusWrapper Wrapper is not the Primary Owner"), DLT_INT(ret)); + DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::DBusWrapper Wrapper is not the Primary Owner"), DLT_INT(ret)); } } DBusWrapper::~DBusWrapper() { //close the connection again - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("DBusWrapper::~DBusWrapper Closing DBus connection")); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("DBusWrapper::~DBusWrapper Closing DBus connection")); dbus_connection_unref(mDbusConnection); } void DBusWrapper::registerCallback(const DBusObjectPathVTable* vtable, const std::string& path, void* userdata) { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("DBusWrapper::~registerCallback register callback:"),DLT_STRING(path.c_str())); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("DBusWrapper::~registerCallback register callback:"),DLT_STRING(path.c_str())); std::string completePath=std::string(DBUS_SERVICE_OBJECT_PATH)+"/"+path; dbus_error_init(&mDBusError); @@ -94,7 +94,7 @@ void DBusWrapper::registerCallback(const DBusObjectPathVTable* vtable, const std dbus_connection_register_object_path(mDbusConnection,completePath.c_str(), vtable, userdata); if (dbus_error_is_set(&mDBusError)) { - DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::registerCallack error: "),DLT_STRING(mDBusError.message)); + DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::registerCallack error: "),DLT_STRING(mDBusError.message)); dbus_error_free(&mDBusError); } mNodesList.push_back(path); @@ -102,7 +102,7 @@ void DBusWrapper::registerCallback(const DBusObjectPathVTable* vtable, const std DBusHandlerResult DBusWrapper::cbRootIntrospection(DBusConnection *conn, DBusMessage *msg, void *reference) { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("DBusWrapper::~cbRootIntrospection called:")); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("DBusWrapper::~cbRootIntrospection called:")); mReference=(DBusWrapper*)reference; std::list<std::string>nodesList=mReference->mNodesList; @@ -129,13 +129,13 @@ DBusHandlerResult DBusWrapper::cbRootIntrospection(DBusConnection *conn, DBusMes dbus_message_iter_init_append(reply, &args); if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &string)) { - DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::~cbRootIntrospection DBUS Out Of Memory!")); + DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::~cbRootIntrospection DBUS Out Of Memory!")); } // send the reply && flush the connection if (!dbus_connection_send(conn, reply, &serial)) { - DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::~cbRootIntrospection DBUS Out Of Memory!")); + DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::~cbRootIntrospection DBUS Out Of Memory!")); } dbus_connection_flush(conn); // free the reply @@ -151,7 +151,7 @@ DBusHandlerResult DBusWrapper::cbRootIntrospection(DBusConnection *conn, DBusMes void DBusWrapper::dbusMainLoop() { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("DBusWrapper::~dbusMainLoop Entering MainLoop")); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("DBusWrapper::~dbusMainLoop Entering MainLoop")); while (dbus_connection_read_write_dispatch(mDbusConnection, -1)) { diff --git a/AudioManagerDaemon/src/DatabaseHandler.cpp b/AudioManagerDaemon/src/DatabaseHandler.cpp index 030c41e..259cbd2 100644 --- a/AudioManagerDaemon/src/DatabaseHandler.cpp +++ b/AudioManagerDaemon/src/DatabaseHandler.cpp @@ -23,12 +23,12 @@ */ #include "DatabaseHandler.h" -#include <dlt/dlt.h> #include <assert.h> #include <vector> #include <fstream> #include <sstream> #include <string> +#include <dlt/dlt.h> #define DOMAIN_TABLE "Domains" #define SOURCE_CLASS_TABLE "SourceClasses" @@ -43,7 +43,9 @@ #define MAIN_TABLE "MainTable" #define SYSTEM_TABLE "SystemProperties" -DLT_IMPORT_CONTEXT(AudioManager) +DLT_IMPORT_CONTEXT(DLT_CONTEXT) + +using namespace am; const std::string databaseTables[]={ " Domains (domainID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, name VARCHAR(50), busname VARCHAR(50), nodename VARCHAR(50), early BOOL, complete BOOL, state INTEGER, reserved BOOL);", @@ -91,13 +93,13 @@ DatabaseHandler::DatabaseHandler(std::string databasePath) if (infile) { remove(mPath.c_str()); - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::DatabaseHandler Knocked down database")); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::DatabaseHandler Knocked down database")); } bool dbOpen=openDatabase(); if (!dbOpen) { - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::DatabaseHandler problems opening the database!")); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::DatabaseHandler problems opening the database!")); assert(!dbOpen); } @@ -108,7 +110,7 @@ DatabaseHandler::DatabaseHandler(std::string databasePath) DatabaseHandler::~DatabaseHandler() { - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("Closed Database")); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("Closed Database")); sqlite3_close(mDatabase); } @@ -136,13 +138,13 @@ am_Error_e DatabaseHandler::enterDomainDB(const am_Domain_s & domainData, am_dom } else { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterDomainDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterDomainDB SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterDomainDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterDomainDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -157,18 +159,18 @@ am_Error_e DatabaseHandler::enterDomainDB(const am_Domain_s & domainData, am_dom if((eCode=sqlite3_step(queryFinal))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterDomainDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterDomainDB SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(queryFinal))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterDomainDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterDomainDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } domainID=sqlite3_last_insert_rowid(mDatabase); - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterDomainDB entered new domain with name"), DLT_STRING(domainData.name.c_str()), + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterDomainDB entered new domain with name"), DLT_STRING(domainData.name.c_str()), DLT_STRING("busname:"),DLT_STRING(domainData.busname.c_str()), DLT_STRING("nodename:"),DLT_STRING(domainData.nodename.c_str()), DLT_STRING("early:"), DLT_BOOL(domainData.early), @@ -202,14 +204,14 @@ am_Error_e DatabaseHandler::enterMainConnectionDB(const am_MainConnection_s & ma if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterMainConnectionDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterMainConnectionDB SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterMainConnectionDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterMainConnectionDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -236,7 +238,7 @@ am_Error_e DatabaseHandler::enterMainConnectionDB(const am_MainConnection_s & ma } else { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterMainConnectionDB did not find route for MainConnection:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterMainConnectionDB did not find route for MainConnection:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } sqlite3_reset(query); @@ -244,7 +246,7 @@ am_Error_e DatabaseHandler::enterMainConnectionDB(const am_MainConnection_s & ma if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterMainConnectionDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterMainConnectionDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -260,7 +262,7 @@ am_Error_e DatabaseHandler::enterMainConnectionDB(const am_MainConnection_s & ma sqlite3_bind_int(query,1, *listConnectionIterator); if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterMainConnectionDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterMainConnectionDB SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } sqlite3_reset(query); @@ -268,11 +270,11 @@ am_Error_e DatabaseHandler::enterMainConnectionDB(const am_MainConnection_s & ma if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterMainConnectionDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterMainConnectionDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterMainConnectionDB entered new mainConnection with sourceID"), DLT_INT(mainConnectionData.route.sourceID), + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterMainConnectionDB entered new mainConnection with sourceID"), DLT_INT(mainConnectionData.route.sourceID), DLT_STRING("sinkID:"),DLT_INT16(mainConnectionData.route.sinkID), DLT_STRING("delay:"),DLT_INT16(delay), DLT_STRING("assigned ID:"),DLT_INT16(connectionID)); @@ -330,14 +332,14 @@ am_Error_e DatabaseHandler::enterSinkDB(const am_Sink_s & sinkData, am_sinkID_t } else { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Step error code:"),DLT_INT(eCode)); sqlite3_finalize(query); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -368,14 +370,14 @@ am_Error_e DatabaseHandler::enterSinkDB(const am_Sink_s & sinkData, am_sinkID_t if((eCode=sqlite3_step(queryFinal))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Step error code:"),DLT_INT(eCode)); sqlite3_finalize(queryFinal); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(queryFinal))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -390,7 +392,7 @@ am_Error_e DatabaseHandler::enterSinkDB(const am_Sink_s & sinkData, am_sinkID_t else { sinkID=0; - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSink database error!:"), DLT_INT(eCode)) + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSink database error!:"), DLT_INT(eCode)) sqlite3_finalize(query); return E_DATABASE_ERROR; } @@ -413,7 +415,7 @@ am_Error_e DatabaseHandler::enterSinkDB(const am_Sink_s & sinkData, am_sinkID_t sqlite3_bind_int(query,1, *connectionFormatIterator); if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Step error code:"),DLT_INT(eCode)); sqlite3_finalize(query); return E_DATABASE_ERROR; } @@ -430,7 +432,7 @@ am_Error_e DatabaseHandler::enterSinkDB(const am_Sink_s & sinkData, am_sinkID_t sqlite3_bind_int(query,2, mainSoundPropertyIterator->value); if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Step error code:"),DLT_INT(eCode)); sqlite3_finalize(query); return E_DATABASE_ERROR; } @@ -447,14 +449,14 @@ am_Error_e DatabaseHandler::enterSinkDB(const am_Sink_s & sinkData, am_sinkID_t sqlite3_bind_int(query,2, SoundPropertyIterator->value); if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Step error code:"),DLT_INT(eCode)); sqlite3_finalize(query); return E_DATABASE_ERROR; } sqlite3_reset(query); } - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterSinkDB entered new sink with name"), DLT_STRING(sinkData.name.c_str()), + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterSinkDB entered new sink with name"), DLT_STRING(sinkData.name.c_str()), DLT_STRING("domainID:"),DLT_INT(sinkData.domainID), DLT_STRING("classID:"),DLT_INT(sinkData.sinkClassID), DLT_STRING("volume:"),DLT_INT(sinkData.volume), @@ -536,13 +538,13 @@ am_Error_e DatabaseHandler::enterGatewayDB(const am_Gateway_s & gatewayData, am_ if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterGatewayDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterGatewayDB SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterGatewayDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterGatewayDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -565,7 +567,7 @@ am_Error_e DatabaseHandler::enterGatewayDB(const am_Gateway_s & gatewayData, am_ sqlite3_bind_int(query,1, *connectionFormatIterator); if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterGatewayDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterGatewayDB SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } sqlite3_reset(query); @@ -579,14 +581,14 @@ am_Error_e DatabaseHandler::enterGatewayDB(const am_Gateway_s & gatewayData, am_ sqlite3_bind_int(query,1, *connectionFormatIterator); if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterGatewayDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterGatewayDB SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } sqlite3_reset(query); } - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterGatewayDB entered new gateway with name"), DLT_STRING(gatewayData.name.c_str()), + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterGatewayDB entered new gateway with name"), DLT_STRING(gatewayData.name.c_str()), DLT_STRING("sourceID:"),DLT_INT(gatewayData.sourceID), DLT_STRING("sinkID:"),DLT_INT(gatewayData.sinkID), DLT_STRING("domainSinkID:"),DLT_INT(gatewayData.domainSinkID), @@ -642,14 +644,14 @@ am_Error_e DatabaseHandler::enterSourceDB(const am_Source_s & sourceData, am_sou } else { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceDB SQLITE Step error code:"),DLT_INT(eCode)); sqlite3_finalize(query); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&queryFinal,NULL); @@ -679,14 +681,14 @@ am_Error_e DatabaseHandler::enterSourceDB(const am_Source_s & sourceData, am_sou if((eCode=sqlite3_step(queryFinal))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceDB SQLITE Step error code:"),DLT_INT(eCode)); sqlite3_finalize(queryFinal); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(queryFinal))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceDB SQLITE Finalize error code:"),DLT_INT(eCode)); sqlite3_finalize(queryFinal); return E_DATABASE_ERROR; } @@ -702,7 +704,7 @@ am_Error_e DatabaseHandler::enterSourceDB(const am_Source_s & sourceData, am_sou else { sourceID=0; - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSink database error!:"), DLT_INT(eCode)) + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSink database error!:"), DLT_INT(eCode)) sqlite3_finalize(query); return E_DATABASE_ERROR; } @@ -726,7 +728,7 @@ am_Error_e DatabaseHandler::enterSourceDB(const am_Source_s & sourceData, am_sou sqlite3_bind_int(query,1, *connectionFormatIterator); if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceDB SQLITE Step error code:"),DLT_INT(eCode)); sqlite3_finalize(query); return E_DATABASE_ERROR; } @@ -743,7 +745,7 @@ am_Error_e DatabaseHandler::enterSourceDB(const am_Source_s & sourceData, am_sou sqlite3_bind_int(query,2, mainSoundPropertyIterator->value); if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceDB SQLITE Step error code:"),DLT_INT(eCode)); sqlite3_finalize(query); return E_DATABASE_ERROR; } @@ -760,14 +762,14 @@ am_Error_e DatabaseHandler::enterSourceDB(const am_Source_s & sourceData, am_sou sqlite3_bind_int(query,2, SoundPropertyIterator->value); if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Step error code:"),DLT_INT(eCode)); sqlite3_finalize(query); return E_DATABASE_ERROR; } sqlite3_reset(query); } - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterSinkDB entered new source with name"), DLT_STRING(sourceData.name.c_str()), + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterSinkDB entered new source with name"), DLT_STRING(sourceData.name.c_str()), DLT_STRING("domainID:"),DLT_INT(sourceData.domainID), DLT_STRING("classID:"),DLT_INT(sourceData.sourceClassID), DLT_STRING("volume:"),DLT_INT(sourceData.volume), @@ -816,7 +818,7 @@ am_Error_e DatabaseHandler::changeMainConnectionRouteDB(const am_mainConnectionI } else { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainConnectionRouteDB did not find route for MainConnection:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainConnectionRouteDB did not find route for MainConnection:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } sqlite3_reset(query); @@ -824,7 +826,7 @@ am_Error_e DatabaseHandler::changeMainConnectionRouteDB(const am_mainConnectionI if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainConnectionRouteDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainConnectionRouteDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -840,7 +842,7 @@ am_Error_e DatabaseHandler::changeMainConnectionRouteDB(const am_mainConnectionI sqlite3_bind_int(query,1, *listConnectionIterator); if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainConnectionRouteDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainConnectionRouteDB SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } sqlite3_reset(query); @@ -848,10 +850,10 @@ am_Error_e DatabaseHandler::changeMainConnectionRouteDB(const am_mainConnectionI if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainConnectionRouteDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainConnectionRouteDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeMainConnectionRouteDB entered new route:"),DLT_INT(mainconnectionID)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeMainConnectionRouteDB entered new route:"),DLT_INT(mainconnectionID)); return E_OK; } @@ -872,15 +874,15 @@ am_Error_e DatabaseHandler::changeMainConnectionStateDB(const am_mainConnectionI sqlite3_bind_int(query,1, connectionState); if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainConnectionStateDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainConnectionStateDB SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainConnectionStateDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainConnectionStateDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeMainConnectionStateDB changed mainConnectionState of MainConnection:"),DLT_INT(mainconnectionID),DLT_STRING("to:"),DLT_INT(connectionState)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeMainConnectionStateDB changed mainConnectionState of MainConnection:"),DLT_INT(mainconnectionID),DLT_STRING("to:"),DLT_INT(connectionState)); if (mDatabaseObserver) mDatabaseObserver->mainConnectionStateChanged(mainconnectionID,connectionState); return E_OK; @@ -905,16 +907,16 @@ am_Error_e DatabaseHandler::changeSinkMainVolumeDB(const am_mainVolume_t mainVol sqlite3_bind_int(query,1, mainVolume); if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkMainVolumeDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkMainVolumeDB SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkMainVolumeDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkMainVolumeDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeSinkMainVolumeDB changed mainVolume of sink:"),DLT_INT(sinkID),DLT_STRING("to:"),DLT_INT(mainVolume)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeSinkMainVolumeDB changed mainVolume of sink:"),DLT_INT(sinkID),DLT_STRING("to:"),DLT_INT(mainVolume)); if(mDatabaseObserver) mDatabaseObserver->volumeChanged(sinkID,mainVolume); @@ -941,17 +943,17 @@ am_Error_e DatabaseHandler::changeSinkAvailabilityDB(const am_Availability_s & a sqlite3_bind_int(query,2, availability.availabilityReason); if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkAvailabilityDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkAvailabilityDB SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } assert(sinkID!=0); if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkAvailabilityDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkAvailabilityDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeSinkAvailabilityDB changed sinkAvailability of sink:"),DLT_INT(sinkID),DLT_STRING("to:"),DLT_INT(availability.availability), DLT_STRING("Reason:"),DLT_INT(availability.availabilityReason)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeSinkAvailabilityDB changed sinkAvailability of sink:"),DLT_INT(sinkID),DLT_STRING("to:"),DLT_INT(availability.availability), DLT_STRING("Reason:"),DLT_INT(availability.availabilityReason)); if (mDatabaseObserver && sourceVisible(sinkID)) mDatabaseObserver->sinkAvailabilityChanged(sinkID,availability); return E_OK; @@ -976,17 +978,17 @@ am_Error_e DatabaseHandler::changDomainStateDB(const am_DomainState_e domainStat sqlite3_bind_int(query,1, domainState); if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changDomainStateDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changDomainStateDB SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changDomainStateDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changDomainStateDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changDomainStateDB changed domainState of domain:"),DLT_INT(domainID),DLT_STRING("to:"),DLT_INT(domainState)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changDomainStateDB changed domainState of domain:"),DLT_INT(domainID),DLT_STRING("to:"),DLT_INT(domainState)); return E_OK; } @@ -1009,17 +1011,17 @@ am_Error_e DatabaseHandler::changeSinkMuteStateDB(const am_MuteState_e muteState sqlite3_bind_int(query,1, muteState); if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkMuteStateDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkMuteStateDB SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } assert(sinkID!=0); if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkMuteStateDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkMuteStateDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeSinkMuteStateDB changed sinkMuteState of sink:"),DLT_INT(sinkID),DLT_STRING("to:"),DLT_INT(muteState)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeSinkMuteStateDB changed sinkMuteState of sink:"),DLT_INT(sinkID),DLT_STRING("to:"),DLT_INT(muteState)); if(mDatabaseObserver) mDatabaseObserver->sinkMuteStateChanged(sinkID,muteState); @@ -1046,17 +1048,17 @@ am_Error_e DatabaseHandler::changeMainSinkSoundPropertyDB(const am_MainSoundProp sqlite3_bind_int(query,1, soundProperty.value); if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainSinkSoundPropertyDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainSinkSoundPropertyDB SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } assert(sinkID!=0); if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainSinkSoundPropertyDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainSinkSoundPropertyDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeMainSinkSoundPropertyDB changed MainSinkSoundProperty of sink:"),DLT_INT(sinkID),DLT_STRING("type:"),DLT_INT(soundProperty.type),DLT_STRING("to:"),DLT_INT(soundProperty.value)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeMainSinkSoundPropertyDB changed MainSinkSoundProperty of sink:"),DLT_INT(sinkID),DLT_STRING("type:"),DLT_INT(soundProperty.type),DLT_STRING("to:"),DLT_INT(soundProperty.value)); if (mDatabaseObserver) mDatabaseObserver->mainSinkSoundPropertyChanged(sinkID,soundProperty); return E_OK; } @@ -1081,17 +1083,17 @@ am_Error_e DatabaseHandler::changeMainSourceSoundPropertyDB(const am_MainSoundPr sqlite3_bind_int(query,1, soundProperty.value); if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainSourceSoundPropertyDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainSourceSoundPropertyDB SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainSourceSoundPropertyDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainSourceSoundPropertyDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeMainSourceSoundPropertyDB changed MainSinkSoundProperty of source:"),DLT_INT(sourceID),DLT_STRING("type:"),DLT_INT(soundProperty.type),DLT_STRING("to:"),DLT_INT(soundProperty.value)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeMainSourceSoundPropertyDB changed MainSinkSoundProperty of source:"),DLT_INT(sourceID),DLT_STRING("type:"),DLT_INT(soundProperty.type),DLT_STRING("to:"),DLT_INT(soundProperty.value)); if(mDatabaseObserver) mDatabaseObserver->mainSourceSoundPropertyChanged(sourceID,soundProperty); return E_OK; @@ -1117,17 +1119,17 @@ am_Error_e DatabaseHandler::changeSourceAvailabilityDB(const am_Availability_s & sqlite3_bind_int(query,2, availability.availabilityReason); if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSourceAvailabilityDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSourceAvailabilityDB SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSourceAvailabilityDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSourceAvailabilityDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeSourceAvailabilityDB changed changeSourceAvailabilityDB of source:"),DLT_INT(sourceID),DLT_STRING("to:"),DLT_INT(availability.availability), DLT_STRING("Reason:"),DLT_INT(availability.availabilityReason)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeSourceAvailabilityDB changed changeSourceAvailabilityDB of source:"),DLT_INT(sourceID),DLT_STRING("to:"),DLT_INT(availability.availability), DLT_STRING("Reason:"),DLT_INT(availability.availabilityReason)); if (mDatabaseObserver && sourceVisible(sourceID)) mDatabaseObserver->sourceAvailabilityChanged(sourceID,availability); return E_OK; @@ -1147,18 +1149,18 @@ am_Error_e DatabaseHandler::changeSystemPropertyDB(const am_SystemProperty_s & p if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSystemPropertyDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSystemPropertyDB SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSystemPropertyDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSystemPropertyDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeSystemPropertyDB changed system property")); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeSystemPropertyDB changed system property")); if(mDatabaseObserver) mDatabaseObserver->systemPropertyChanged(property); @@ -1179,7 +1181,7 @@ am_Error_e DatabaseHandler::removeMainConnectionDB(const am_mainConnectionID_t m std::string command1 = "DROP table MainConnectionRoute" + i2s(mainConnectionID); if(!sqQuery(command)) return E_DATABASE_ERROR; if(!sqQuery(command1)) return E_DATABASE_ERROR; - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeMainConnectionDB removed:"),DLT_INT(mainConnectionID)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeMainConnectionDB removed:"),DLT_INT(mainConnectionID)); if (mDatabaseObserver) { mDatabaseObserver->mainConnectionStateChanged(mainConnectionID,CS_DISCONNECTED); mDatabaseObserver->numberOfMainConnectionsChanged(); @@ -1205,7 +1207,7 @@ am_Error_e DatabaseHandler::removeSinkDB(const am_sinkID_t sinkID) if(!sqQuery(command1)) return E_DATABASE_ERROR; if(!sqQuery(command2)) return E_DATABASE_ERROR; if(!sqQuery(command3)) return E_DATABASE_ERROR; - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeSinkDB removed:"),DLT_INT(sinkID)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeSinkDB removed:"),DLT_INT(sinkID)); if (mDatabaseObserver!=NULL) mDatabaseObserver->removedSink(sinkID); @@ -1230,7 +1232,7 @@ am_Error_e DatabaseHandler::removeSourceDB(const am_sourceID_t sourceID) if(!sqQuery(command1)) return E_DATABASE_ERROR; if(!sqQuery(command2)) return E_DATABASE_ERROR; if(!sqQuery(command3)) return E_DATABASE_ERROR; - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeSourceDB removed:"),DLT_INT(sourceID)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeSourceDB removed:"),DLT_INT(sourceID)); if(mDatabaseObserver) mDatabaseObserver->removedSource(sourceID); return E_OK; } @@ -1247,7 +1249,7 @@ am_Error_e DatabaseHandler::removeGatewayDB(const am_gatewayID_t gatewayID) } std::string command = "DELETE from " + std::string(GATEWAY_TABLE) + " WHERE gatewayID=" + i2s(gatewayID); if(!sqQuery(command)) return E_DATABASE_ERROR; - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeGatewayDB removed:"),DLT_INT(gatewayID)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeGatewayDB removed:"),DLT_INT(gatewayID)); if(mDatabaseObserver) mDatabaseObserver->removeGateway(gatewayID); return E_OK; } @@ -1273,7 +1275,7 @@ am_Error_e DatabaseHandler::removeDomainDB(const am_domainID_t domainID) } std::string command = "DELETE from " + std::string(DOMAIN_TABLE) + " WHERE domainID=" + i2s(domainID); if(!sqQuery(command)) return E_DATABASE_ERROR; - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeDomainDB removed:"),DLT_INT(domainID)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeDomainDB removed:"),DLT_INT(domainID)); if(mDatabaseObserver) mDatabaseObserver->removeDomain(domainID); return E_OK; } @@ -1291,7 +1293,7 @@ am_Error_e DatabaseHandler::removeSinkClassDB(const am_sinkClass_t sinkClassID) if(!sqQuery(command)) return E_DATABASE_ERROR; if(!sqQuery(command1)) return E_DATABASE_ERROR; - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeSinkClassDB removed:"),DLT_INT(sinkClassID)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeSinkClassDB removed:"),DLT_INT(sinkClassID)); if (mDatabaseObserver) mDatabaseObserver->numberOfSinkClassesChanged(); return E_OK; @@ -1309,7 +1311,7 @@ am_Error_e DatabaseHandler::removeSourceClassDB(const am_sourceClass_t sourceCla std::string command1 = "DROP table SourceClassProperties" + i2s(sourceClassID); if(!sqQuery(command)) return E_DATABASE_ERROR; if(!sqQuery(command1)) return E_DATABASE_ERROR; - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeSourceClassDB removed:"),DLT_INT(sourceClassID)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeSourceClassDB removed:"),DLT_INT(sourceClassID)); if (mDatabaseObserver) mDatabaseObserver->numberOfSourceClassesChanged(); return E_OK; @@ -1323,7 +1325,7 @@ am_Error_e DatabaseHandler::removeConnection(const am_connectionID_t connectionI std::string command1 = "DROP table SourceClassProperties" + i2s(connectionID); if(!sqQuery(command)) return E_DATABASE_ERROR; if(!sqQuery(command1)) return E_DATABASE_ERROR; - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeConnection removed:"),DLT_INT(connectionID)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeConnection removed:"),DLT_INT(connectionID)); return E_OK; } @@ -1350,13 +1352,13 @@ am_Error_e DatabaseHandler::getSourceClassInfoDB(const am_sourceID_t sourceID, a if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSourceClassInfoDB SQLITE error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSourceClassInfoDB SQLITE error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSourceClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSourceClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -1370,13 +1372,13 @@ am_Error_e DatabaseHandler::getSourceClassInfoDB(const am_sourceID_t sourceID, a if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSourceClassInfoDB SQLITE error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSourceClassInfoDB SQLITE error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSourceClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSourceClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -1392,13 +1394,13 @@ am_Error_e DatabaseHandler::getSourceClassInfoDB(const am_sourceID_t sourceID, a if(eCode!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSourceClassInfoDB SQLITE error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSourceClassInfoDB SQLITE error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSourceClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSourceClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } return E_OK; @@ -1428,7 +1430,7 @@ am_Error_e DatabaseHandler::changeSinkClassInfoDB(const am_SinkClass_s& sinkClas sqlite3_bind_int(query,2, Iterator->classProperty); if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::setSinkClassInfoDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::setSinkClassInfoDB SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } sqlite3_reset(query); @@ -1436,11 +1438,11 @@ am_Error_e DatabaseHandler::changeSinkClassInfoDB(const am_SinkClass_s& sinkClas if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::setSinkClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::setSinkClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::setSinkClassInfoDB set setSinkClassInfo")); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::setSinkClassInfoDB set setSinkClassInfo")); return E_OK; } @@ -1468,7 +1470,7 @@ am_Error_e DatabaseHandler::changeSourceClassInfoDB(const am_SourceClass_s& sour sqlite3_bind_int(query,2, Iterator->classProperty); if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::setSinkClassInfoDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::setSinkClassInfoDB SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } sqlite3_reset(query); @@ -1476,11 +1478,11 @@ am_Error_e DatabaseHandler::changeSourceClassInfoDB(const am_SourceClass_s& sour if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::setSinkClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::setSinkClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::setSinkClassInfoDB set setSinkClassInfo")); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::setSinkClassInfoDB set setSinkClassInfo")); return E_OK; } @@ -1507,13 +1509,13 @@ am_Error_e DatabaseHandler::getSinkClassInfoDB(const am_sinkID_t sinkID, am_Sink if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkClassInfoDB SQLITE error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkClassInfoDB SQLITE error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -1527,13 +1529,13 @@ am_Error_e DatabaseHandler::getSinkClassInfoDB(const am_sinkID_t sinkID, am_Sink if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkClassInfoDB SQLITE error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkClassInfoDB SQLITE error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -1549,13 +1551,13 @@ am_Error_e DatabaseHandler::getSinkClassInfoDB(const am_sinkID_t sinkID, am_Sink if(eCode!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkClassInfoDB SQLITE error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkClassInfoDB SQLITE error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } return E_OK; @@ -1591,7 +1593,7 @@ am_Error_e DatabaseHandler::getGatewayInfoDB(const am_gatewayID_t gatewayID, am_ iter=mListConnectionFormat.find(gatewayData.gatewayID); if (iter == mListConnectionFormat.end()) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getGatewayInfoDB database error with convertionFormat")); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getGatewayInfoDB database error with convertionFormat")); return E_DATABASE_ERROR; } gatewayData.convertionMatrix=iter->second; @@ -1607,7 +1609,7 @@ am_Error_e DatabaseHandler::getGatewayInfoDB(const am_gatewayID_t gatewayID, am_ if((eCode=sqlite3_finalize(qSourceConnectionFormat))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getGatewayInfoDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getGatewayInfoDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -1622,7 +1624,7 @@ am_Error_e DatabaseHandler::getGatewayInfoDB(const am_gatewayID_t gatewayID, am_ if((eCode=sqlite3_finalize(qSinkConnectionFormat))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getGatewayInfoDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getGatewayInfoDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -1630,13 +1632,13 @@ am_Error_e DatabaseHandler::getGatewayInfoDB(const am_gatewayID_t gatewayID, am_ if(eCode!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getGatewayInfoDB SQLITE error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getGatewayInfoDB SQLITE error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getGatewayInfoDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getGatewayInfoDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -1678,13 +1680,13 @@ am_Error_e DatabaseHandler::getListSinksOfDomain(const am_domainID_t domainID, s if(eCode!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinksOfDomain SQLITE error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinksOfDomain SQLITE error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinksOfDomain SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinksOfDomain SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -1716,13 +1718,13 @@ am_Error_e DatabaseHandler::getListSourcesOfDomain(const am_domainID_t domainID, if(eCode!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourcesOfDomain SQLITE error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourcesOfDomain SQLITE error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourcesOfDomain SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourcesOfDomain SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -1765,13 +1767,13 @@ am_Error_e DatabaseHandler::getListGatewaysOfDomain(const am_domainID_t domainID if(eCode!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGatewaysOfDomain SQLITE error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGatewaysOfDomain SQLITE error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGatewaysOfDomain SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGatewaysOfDomain SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -1784,7 +1786,7 @@ am_Error_e DatabaseHandler::getListMainConnections(std::vector<am_MainConnection { listMainConnections.clear(); sqlite3_stmt *query=NULL, *query1=NULL, *query2=NULL; - int eCode=0, eCode1=0, eCode2=0; + int eCode=0; am_MainConnection_s temp; am_RoutingElement_s tempRoute; @@ -1803,11 +1805,11 @@ am_Error_e DatabaseHandler::getListMainConnections(std::vector<am_MainConnection temp.delay=sqlite3_column_int(query,4); std::string statement=command1 + i2s(temp.connectionID); sqlite3_prepare_v2(mDatabase,statement.c_str(),-1,&query1,NULL); - while((eCode1=sqlite3_step(query1))==SQLITE_ROW) //todo: check results of eCode1, eCode2 + while((eCode=sqlite3_step(query1))==SQLITE_ROW) //todo: check results of eCode1, eCode2 { int k=sqlite3_column_int(query1,0); sqlite3_bind_int(query2,1,k); - while((eCode2=sqlite3_step(query2))==SQLITE_ROW) + while((eCode=sqlite3_step(query2))==SQLITE_ROW) { tempRoute.sourceID=sqlite3_column_int(query2,0); tempRoute.sinkID=sqlite3_column_int(query2,1); @@ -1822,13 +1824,13 @@ am_Error_e DatabaseHandler::getListMainConnections(std::vector<am_MainConnection if(eCode!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListMainConnections SQLITE error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListMainConnections SQLITE error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListMainConnections SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListMainConnections SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -1860,13 +1862,13 @@ am_Error_e DatabaseHandler::getListDomains(std::vector<am_Domain_s> & listDomain if(eCode!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListDomains SQLITE error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListDomains SQLITE error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListDomains SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListDomains SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -1896,13 +1898,13 @@ am_Error_e DatabaseHandler::getListConnections(std::vector<am_Connection_s> & li if(eCode!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListConnections SQLITE error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListConnections SQLITE error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListConnections SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListConnections SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -1947,7 +1949,7 @@ am_Error_e DatabaseHandler::getListSinks(std::vector<am_Sink_s> & listSinks) con if((eCode=sqlite3_finalize(qConnectionFormat))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -1963,7 +1965,7 @@ am_Error_e DatabaseHandler::getListSinks(std::vector<am_Sink_s> & listSinks) con if((eCode=sqlite3_finalize(qSoundProperty))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -1979,7 +1981,7 @@ am_Error_e DatabaseHandler::getListSinks(std::vector<am_Sink_s> & listSinks) con if((eCode=sqlite3_finalize(qMAinSoundProperty))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } listSinks.push_back(temp); @@ -1990,13 +1992,13 @@ am_Error_e DatabaseHandler::getListSinks(std::vector<am_Sink_s> & listSinks) con if(eCode!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -2041,7 +2043,7 @@ am_Error_e DatabaseHandler::getListSources(std::vector<am_Source_s> & listSource if((eCode=sqlite3_finalize(qConnectionFormat))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -2057,7 +2059,7 @@ am_Error_e DatabaseHandler::getListSources(std::vector<am_Source_s> & listSource if((eCode=sqlite3_finalize(qSoundProperty))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -2073,7 +2075,7 @@ am_Error_e DatabaseHandler::getListSources(std::vector<am_Source_s> & listSource if((eCode=sqlite3_finalize(qMAinSoundProperty))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } listSources.push_back(temp); @@ -2084,13 +2086,13 @@ am_Error_e DatabaseHandler::getListSources(std::vector<am_Source_s> & listSource if(eCode!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -2130,13 +2132,13 @@ am_Error_e DatabaseHandler::getListSourceClasses(std::vector<am_SourceClass_s> & if(eCode1!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE error code:"),DLT_INT(eCode1)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE error code:"),DLT_INT(eCode1)); return E_DATABASE_ERROR; } if((eCode1=sqlite3_finalize(subQuery))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE Finalize error code:"),DLT_INT(eCode1)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE Finalize error code:"),DLT_INT(eCode1)); return E_DATABASE_ERROR; } listSourceClasses.push_back(classTemp); @@ -2144,13 +2146,13 @@ am_Error_e DatabaseHandler::getListSourceClasses(std::vector<am_SourceClass_s> & if(eCode!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -2194,7 +2196,7 @@ am_Error_e DatabaseHandler::getListGateways(std::vector<am_Gateway_s> & listGate iter=mListConnectionFormat.find(temp.gatewayID); if (iter == mListConnectionFormat.end()) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGateways database error with convertionFormat")); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGateways database error with convertionFormat")); return E_DATABASE_ERROR; } temp.convertionMatrix=iter->second; @@ -2210,7 +2212,7 @@ am_Error_e DatabaseHandler::getListGateways(std::vector<am_Gateway_s> & listGate if((eCode=sqlite3_finalize(qSourceConnectionFormat))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGateways SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGateways SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -2225,7 +2227,7 @@ am_Error_e DatabaseHandler::getListGateways(std::vector<am_Gateway_s> & listGate if((eCode=sqlite3_finalize(qSinkConnectionFormat))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGateways SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGateways SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -2236,13 +2238,13 @@ am_Error_e DatabaseHandler::getListGateways(std::vector<am_Gateway_s> & listGate if(eCode!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGateways SQLITE error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGateways SQLITE error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGateways SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGateways SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -2282,13 +2284,13 @@ am_Error_e DatabaseHandler::getListSinkClasses(std::vector<am_SinkClass_s> & lis if(eCode!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(subQuery))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } listSinkClasses.push_back(classTemp); @@ -2296,13 +2298,13 @@ am_Error_e DatabaseHandler::getListSinkClasses(std::vector<am_SinkClass_s> & lis if(eCode!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -2333,13 +2335,13 @@ am_Error_e DatabaseHandler::getListVisibleMainConnections(std::vector<am_MainCon if(eCode!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListVisibleMainConnections SQLITE error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListVisibleMainConnections SQLITE error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListVisibleMainConnections SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListVisibleMainConnections SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -2372,13 +2374,13 @@ am_Error_e DatabaseHandler::getListMainSinks(std::vector<am_SinkType_s> & listMa if(eCode!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -2409,13 +2411,13 @@ am_Error_e DatabaseHandler::getListMainSources(std::vector<am_SourceType_s> & li if(eCode!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -2445,13 +2447,13 @@ am_Error_e DatabaseHandler::getListMainSinkSoundProperties(const am_sinkID_t sin if(eCode!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListMainSinkSoundProperties SQLITE error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListMainSinkSoundProperties SQLITE error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListMainSinkSoundProperties SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListMainSinkSoundProperties SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -2481,13 +2483,13 @@ am_Error_e DatabaseHandler::getListMainSourceSoundProperties(const am_sourceID_t if(eCode!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListMainSinkSoundProperties SQLITE error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListMainSinkSoundProperties SQLITE error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListMainSinkSoundProperties SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListMainSinkSoundProperties SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -2515,13 +2517,13 @@ am_Error_e DatabaseHandler::getListSystemProperties(std::vector<am_SystemPropert if(eCode!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSystemProperties SQLITE error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSystemProperties SQLITE error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSystemProperties SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSystemProperties SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -2547,13 +2549,13 @@ am_Error_e DatabaseHandler::getTimingInformation(const am_mainConnectionID_t mai if(eCode!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getTimingInformation SQLITE error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getTimingInformation SQLITE error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getTimingInformation SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getTimingInformation SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -2568,7 +2570,7 @@ bool DatabaseHandler::sqQuery(const std::string& query) int eCode=0; if ((eCode=sqlite3_exec(mDatabase,query.c_str(),NULL,&statement,NULL))!= SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::sqQuery SQL Query failed:"), DLT_STRING(query.c_str()), DLT_STRING("error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::sqQuery SQL Query failed:"), DLT_STRING(query.c_str()), DLT_STRING("error code:"),DLT_INT(eCode)); return false; } return true; @@ -2578,10 +2580,10 @@ bool DatabaseHandler::openDatabase() { if (sqlite3_open_v2(mPath.c_str(),&mDatabase,SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_FULLMUTEX, NULL) == SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::openDatabase opened database")); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::openDatabase opened database")); return true; } - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::openDatabase failed to open database")); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::openDatabase failed to open database")); return false; } @@ -2607,13 +2609,13 @@ am_Error_e DatabaseHandler::changeDelayMainConnection(const am_timeSync_t & dela if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeDelayMainConnection SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeDelayMainConnection SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeDelayMainConnection SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeDelayMainConnection SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -2642,19 +2644,19 @@ am_Error_e DatabaseHandler::enterConnectionDB(const am_Connection_s& connection, if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterConnectionDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterConnectionDB SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterConnectionDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterConnectionDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } connectionID=sqlite3_last_insert_rowid(mDatabase); - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterConnectionDB entered new connection sourceID:"), DLT_INT16(connection.sourceID), + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterConnectionDB entered new connection sourceID:"), DLT_INT16(connection.sourceID), DLT_STRING("sinkID:"),DLT_INT16(connection.sinkID), DLT_STRING("sourceID:"),DLT_INT16(connection.sourceID), DLT_STRING("delay:"), DLT_INT16(connection.delay), @@ -2703,13 +2705,13 @@ am_Error_e DatabaseHandler::enterSinkClassDB(const am_SinkClass_s & sinkClass, a if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkClassDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkClassDB SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkClassDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkClassDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -2729,7 +2731,7 @@ am_Error_e DatabaseHandler::enterSinkClassDB(const am_SinkClass_s & sinkClass, a sqlite3_bind_int(query,2, Iterator->value); if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkClassDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkClassDB SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } sqlite3_reset(query); @@ -2737,11 +2739,11 @@ am_Error_e DatabaseHandler::enterSinkClassDB(const am_SinkClass_s & sinkClass, a if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkClassDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkClassDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterSinkClassDB entered new sinkClass")); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterSinkClassDB entered new sinkClass")); if (mDatabaseObserver) mDatabaseObserver->numberOfSinkClassesChanged(); return E_OK; } @@ -2786,13 +2788,13 @@ am_Error_e DatabaseHandler::enterSourceClassDB(am_sourceClass_t & sourceClassID, if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceClassDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceClassDB SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceClassDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceClassDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -2812,7 +2814,7 @@ am_Error_e DatabaseHandler::enterSourceClassDB(am_sourceClass_t & sourceClassID, sqlite3_bind_int(query,2, Iterator->value); if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceClassDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceClassDB SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } sqlite3_reset(query); @@ -2820,11 +2822,11 @@ am_Error_e DatabaseHandler::enterSourceClassDB(am_sourceClass_t & sourceClassID, if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceClassDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceClassDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterSourceClassDB entered new sourceClass")); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterSourceClassDB entered new sourceClass")); if (mDatabaseObserver) mDatabaseObserver->numberOfSourceClassesChanged(); return E_OK; @@ -2848,7 +2850,7 @@ am_Error_e DatabaseHandler::enterSystemProperties(const std::vector<am_SystemPro if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSystemProperties SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSystemProperties SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -2857,11 +2859,11 @@ am_Error_e DatabaseHandler::enterSystemProperties(const std::vector<am_SystemPro if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSystemProperties SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSystemProperties SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterSystemProperties entered system properties")); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterSystemProperties entered system properties")); return E_OK; } @@ -2876,7 +2878,7 @@ bool DatabaseHandler::existMainConnection(const am_mainConnectionID_t mainConnec else if (eCode!=SQLITE_ROW) { returnVal=false; - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existMainConnection database error!:"), DLT_INT(eCode)) + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existMainConnection database error!:"), DLT_INT(eCode)) } sqlite3_finalize(query); return returnVal; @@ -2893,7 +2895,7 @@ bool DatabaseHandler::existSource(const am_sourceID_t sourceID) const else if (eCode!=SQLITE_ROW) { returnVal=false; - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSource database error!:"), DLT_INT(eCode)) + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSource database error!:"), DLT_INT(eCode)) } sqlite3_finalize(query); return returnVal; @@ -2912,7 +2914,7 @@ bool DatabaseHandler::existSourceNameOrID(const am_sourceID_t sourceID, const st else if (eCode!=SQLITE_ROW) { returnVal=false; - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSource database error!:"), DLT_INT(eCode)) + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSource database error!:"), DLT_INT(eCode)) } sqlite3_finalize(query); return returnVal; @@ -2930,7 +2932,7 @@ bool DatabaseHandler::existSourceName(const std::string & name) const else if (eCode!=SQLITE_ROW) { returnVal=false; - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSource database error!:"), DLT_INT(eCode)) + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSource database error!:"), DLT_INT(eCode)) } sqlite3_finalize(query); return returnVal; @@ -2947,7 +2949,7 @@ bool DatabaseHandler::existSink(const am_sinkID_t sinkID) const else if (eCode!=SQLITE_ROW) { returnVal=false; - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSink database error!:"), DLT_INT(eCode)) + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSink database error!:"), DLT_INT(eCode)) } sqlite3_finalize(query); return returnVal; @@ -2966,7 +2968,7 @@ bool DatabaseHandler::existSinkNameOrID(const am_sinkID_t sinkID, const std::str else if (eCode!=SQLITE_ROW) { returnVal=false; - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSink database error!:"), DLT_INT(eCode)) + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSink database error!:"), DLT_INT(eCode)) } sqlite3_finalize(query); return returnVal; @@ -2984,7 +2986,7 @@ bool DatabaseHandler::existSinkName(const std::string & name) const else if (eCode!=SQLITE_ROW) { returnVal=false; - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSink database error!:"), DLT_INT(eCode)) + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSink database error!:"), DLT_INT(eCode)) } sqlite3_finalize(query); return returnVal; @@ -3001,7 +3003,7 @@ bool DatabaseHandler::existDomain(const am_domainID_t domainID) const else if (eCode!=SQLITE_ROW) { returnVal=false; - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existDomain database error!:"), DLT_INT(eCode)) + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existDomain database error!:"), DLT_INT(eCode)) } sqlite3_finalize(query); return returnVal; @@ -3018,7 +3020,7 @@ bool DatabaseHandler::existGateway(const am_gatewayID_t gatewayID) const else if (eCode!=SQLITE_ROW) { returnVal=false; - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existGateway database error!:"), DLT_INT(eCode)) + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existGateway database error!:"), DLT_INT(eCode)) } sqlite3_finalize(query); return returnVal; @@ -3040,7 +3042,7 @@ am_Error_e DatabaseHandler::getDomainOfSource(const am_sourceID_t sourceID, am_d } else { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getDomainOfSource database error!:"), DLT_INT(eCode)) + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getDomainOfSource database error!:"), DLT_INT(eCode)) } sqlite3_finalize(query); return returnVal; @@ -3058,7 +3060,7 @@ bool DatabaseHandler::existSinkClass(const am_sinkClass_t sinkClassID) const else if (eCode!=SQLITE_ROW) { returnVal=false; - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSinkClass database error!:"), DLT_INT(eCode)) + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSinkClass database error!:"), DLT_INT(eCode)) } sqlite3_finalize(query); return returnVal; @@ -3075,7 +3077,7 @@ bool DatabaseHandler::existSourceClass(const am_sourceClass_t sourceClassID) con else if (eCode!=SQLITE_ROW) { returnVal=false; - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSinkClass database error!:"), DLT_INT(eCode)) + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSinkClass database error!:"), DLT_INT(eCode)) } sqlite3_finalize(query); return returnVal; @@ -3095,13 +3097,13 @@ am_Error_e DatabaseHandler::changeConnectionTimingInformation(const am_connectio if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeConnectionTimingInformation SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeConnectionTimingInformation SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeConnectionTimingInformation SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeConnectionTimingInformation SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -3111,7 +3113,6 @@ am_Error_e DatabaseHandler::changeConnectionTimingInformation(const am_connectio std::string command2; int tempMainConnectionID; - bool firstrow=true; //first get all route tables for all mainconnections command= "SELECT name FROM sqlite_master WHERE type ='table' and name LIKE 'MainConnectionRoute%'"; sqlite3_prepare_v2(mDatabase,command.c_str(),-1,&queryMainConnections,NULL); @@ -3132,22 +3133,16 @@ am_Error_e DatabaseHandler::changeConnectionTimingInformation(const am_connectio if(eCode!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeConnectionTimingInformation SQLITE error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeConnectionTimingInformation SQLITE error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(queryMainConnections))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeConnectionTimingInformation SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeConnectionTimingInformation SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } - sqlite3_prepare_v2(mDatabase,command2.c_str(),-1,&queryMainConnectionSubIDs,NULL); - while((eCode=sqlite3_step(queryMainConnectionSubIDs))==SQLITE_ROW) - { - std::string temp=std::string((const char*)sqlite3_column_text(queryMainConnections,0)); - } - return E_OK; } @@ -3164,13 +3159,13 @@ am_Error_e DatabaseHandler::changeConnectionFinal(const am_connectionID_t connec if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeConnectionFinal SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeConnectionFinal SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeConnectionFinal SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeConnectionFinal SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } return E_OK; @@ -3192,13 +3187,13 @@ am_timeSync_t DatabaseHandler::calculateMainConnectionDelay(const am_mainConnect } if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::calculateMainConnectionDelay SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::calculateMainConnectionDelay SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::calculateMainConnectionDelay SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::calculateMainConnectionDelay SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if (min<0) delay=-1; @@ -3227,7 +3222,7 @@ bool DatabaseHandler::sourceVisible(const am_sourceID_t sourceID) const else if (eCode!=SQLITE_ROW) { returnVal=false; - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::sourceVisible database error!:"), DLT_INT(eCode)) + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::sourceVisible database error!:"), DLT_INT(eCode)) } sqlite3_finalize(query); return returnVal; @@ -3247,7 +3242,7 @@ bool DatabaseHandler::sinkVisible(const am_sinkID_t sinkID) const else if (eCode!=SQLITE_ROW) { returnVal=false; - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::sinkVisible database error!:"), DLT_INT(eCode)) + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::sinkVisible database error!:"), DLT_INT(eCode)) } sqlite3_finalize(query); return returnVal; @@ -3267,7 +3262,7 @@ bool DatabaseHandler::existConnection(const am_Connection_s connection) else if (eCode!=SQLITE_ROW) { returnVal=false; - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existMainConnection database error!:"), DLT_INT(eCode)) + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existMainConnection database error!:"), DLT_INT(eCode)) } sqlite3_finalize(query); return returnVal; @@ -3286,7 +3281,7 @@ bool DatabaseHandler::existConnectionID(const am_connectionID_t connectionID) else if (eCode!=SQLITE_ROW) { returnVal=false; - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existMainConnection database error!:"), DLT_INT(eCode)) + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existMainConnection database error!:"), DLT_INT(eCode)) } sqlite3_finalize(query); return returnVal; @@ -3304,7 +3299,7 @@ bool DatabaseHandler::existcrossFader(const am_crossfaderID_t crossfaderID) cons else if (eCode!=SQLITE_ROW) { returnVal=false; - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existMainConnection database error!:"), DLT_INT(eCode)) + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existMainConnection database error!:"), DLT_INT(eCode)) } sqlite3_finalize(query); return returnVal; @@ -3324,7 +3319,7 @@ am_Error_e DatabaseHandler::getSoureState(const am_sourceID_t sourceID, am_Sourc } else if ((eCode=sqlite3_step(query))==SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSoureState database error!:"), DLT_INT(eCode)) + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSoureState database error!:"), DLT_INT(eCode)) } sqlite3_finalize(query); @@ -3341,13 +3336,13 @@ am_Error_e DatabaseHandler::changeSourceState(const am_sourceID_t sourceID, cons sqlite3_bind_int(query,1,sourceState); if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSourceState SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSourceState SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSourceState SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSourceState SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } return E_OK; @@ -3367,7 +3362,7 @@ am_Error_e DatabaseHandler::getSinkVolume(const am_sinkID_t sinkID, am_volume_t } else if ((eCode=sqlite3_step(query))==SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkVolume database error!:"), DLT_INT(eCode)) + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkVolume database error!:"), DLT_INT(eCode)) } sqlite3_finalize(query); @@ -3388,7 +3383,7 @@ am_Error_e DatabaseHandler::getSourceVolume(const am_sourceID_t sourceID, am_vol } else if ((eCode=sqlite3_step(query))==SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSourceVolume database error!:"), DLT_INT(eCode)) + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSourceVolume database error!:"), DLT_INT(eCode)) } sqlite3_finalize(query); return E_OK; @@ -3412,13 +3407,13 @@ am_Error_e DatabaseHandler::getSinkSoundPropertyValue(const am_sinkID_t sinkID, if(eCode!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkSoundPropertyValue SQLITE error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkSoundPropertyValue SQLITE error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkSoundPropertyValue SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkSoundPropertyValue SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -3442,13 +3437,13 @@ am_Error_e DatabaseHandler::getSourceSoundPropertyValue(const am_sourceID_t sour if(eCode!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkSoundPropertyValue SQLITE error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkSoundPropertyValue SQLITE error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkSoundPropertyValue SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkSoundPropertyValue SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } @@ -3469,7 +3464,7 @@ am_Error_e DatabaseHandler::getDomainState(const am_domainID_t domainID, am_Doma } else if ((eCode=sqlite3_step(query))==SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getDomainState database error!:"), DLT_INT(eCode)) + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getDomainState database error!:"), DLT_INT(eCode)) } sqlite3_finalize(query); @@ -3490,7 +3485,7 @@ am_Error_e DatabaseHandler::peekDomain(const std::string & name, am_domainID_t & } else if (eCode!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekDomain database error!:"), DLT_INT(eCode)) + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekDomain database error!:"), DLT_INT(eCode)) return E_DATABASE_ERROR; } else @@ -3501,13 +3496,13 @@ am_Error_e DatabaseHandler::peekDomain(const std::string & name, am_domainID_t & sqlite3_bind_int(queryInsert,2,1); //reservation flag if((eCode1=sqlite3_step(queryInsert))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekDomain SQLITE Step error code:"),DLT_INT(eCode1)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekDomain SQLITE Step error code:"),DLT_INT(eCode1)); return E_DATABASE_ERROR; } if((eCode1=sqlite3_finalize(queryInsert))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekDomain SQLITE Finalize error code:"),DLT_INT(eCode1)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekDomain SQLITE Finalize error code:"),DLT_INT(eCode1)); return E_DATABASE_ERROR; } domainID=sqlite3_last_insert_rowid(mDatabase); @@ -3529,7 +3524,7 @@ am_Error_e DatabaseHandler::peekSink(const std::string & name, am_sinkID_t & sin } else if (eCode!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekSink database error!:"), DLT_INT(eCode)) + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekSink database error!:"), DLT_INT(eCode)) return E_DATABASE_ERROR; } else @@ -3548,13 +3543,13 @@ am_Error_e DatabaseHandler::peekSink(const std::string & name, am_sinkID_t & sin sqlite3_bind_int(queryInsert,2,1); //reservation flag if((eCode1=sqlite3_step(queryInsert))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekSink SQLITE Step error code:"),DLT_INT(eCode1)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekSink SQLITE Step error code:"),DLT_INT(eCode1)); return E_DATABASE_ERROR; } if((eCode1=sqlite3_finalize(queryInsert))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekDomain SQLITE Finalize error code:"),DLT_INT(eCode1)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekDomain SQLITE Finalize error code:"),DLT_INT(eCode1)); return E_DATABASE_ERROR; } sinkID=sqlite3_last_insert_rowid(mDatabase); @@ -3578,7 +3573,7 @@ am_Error_e DatabaseHandler::peekSource(const std::string & name, am_sourceID_t & } else if (eCode!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekSink database error!:"), DLT_INT(eCode)) + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekSink database error!:"), DLT_INT(eCode)) return E_DATABASE_ERROR; } else @@ -3597,13 +3592,13 @@ am_Error_e DatabaseHandler::peekSource(const std::string & name, am_sourceID_t & sqlite3_bind_int(queryInsert,2,1); //reservation flag if((eCode1=sqlite3_step(queryInsert))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekSink SQLITE Step error code:"),DLT_INT(eCode1)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekSink SQLITE Step error code:"),DLT_INT(eCode1)); return E_DATABASE_ERROR; } if((eCode1=sqlite3_finalize(queryInsert))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekDomain SQLITE Finalize error code:"),DLT_INT(eCode1)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekDomain SQLITE Finalize error code:"),DLT_INT(eCode1)); return E_DATABASE_ERROR; } sourceID=sqlite3_last_insert_rowid(mDatabase); @@ -3629,16 +3624,16 @@ am_Error_e DatabaseHandler::changeSinkVolume(const am_sinkID_t sinkID, const am_ sqlite3_bind_int(query,1, volume); if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkVolume SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkVolume SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkVolume SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkVolume SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeSinkVolume changed volume of sink:"),DLT_INT(sinkID),DLT_STRING("to:"),DLT_INT(volume)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeSinkVolume changed volume of sink:"),DLT_INT(sinkID),DLT_STRING("to:"),DLT_INT(volume)); return E_OK; } @@ -3660,16 +3655,16 @@ am_Error_e DatabaseHandler::changeSourceVolume(const am_sourceID_t sourceID, con sqlite3_bind_int(query,1, volume); if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSourceVolume SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSourceVolume SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSourceVolume SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSourceVolume SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeSourceVolume changed volume of source=:"),DLT_INT(sourceID),DLT_STRING("to:"),DLT_INT(volume)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeSourceVolume changed volume of source=:"),DLT_INT(sourceID),DLT_STRING("to:"),DLT_INT(volume)); return E_OK; } @@ -3692,17 +3687,17 @@ am_Error_e DatabaseHandler::changeSourceSoundPropertyDB(const am_SoundProperty_s sqlite3_bind_int(query,1, soundProperty.value); if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSourceSoundPropertyDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSourceSoundPropertyDB SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSourceSoundPropertyDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSourceSoundPropertyDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeSourceSoundPropertyDB changed SourceSoundProperty of source:"),DLT_INT(sourceID),DLT_STRING("type:"),DLT_INT(soundProperty.type),DLT_STRING("to:"),DLT_INT(soundProperty.value)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeSourceSoundPropertyDB changed SourceSoundProperty of source:"),DLT_INT(sourceID),DLT_STRING("type:"),DLT_INT(soundProperty.type),DLT_STRING("to:"),DLT_INT(soundProperty.value)); return E_OK; } @@ -3725,17 +3720,17 @@ am_Error_e DatabaseHandler::changeSinkSoundPropertyDB(const am_SoundProperty_s & sqlite3_bind_int(query,1, soundProperty.value); if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkSoundPropertyDB SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkSoundPropertyDB SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } assert(sinkID!=0); if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkSoundPropertyDB SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkSoundPropertyDB SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeSinkSoundPropertyDB changed MainSinkSoundProperty of sink:"),DLT_INT(sinkID),DLT_STRING("type:"),DLT_INT(soundProperty.type),DLT_STRING("to:"),DLT_INT(soundProperty.value)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeSinkSoundPropertyDB changed MainSinkSoundProperty of sink:"),DLT_INT(sinkID),DLT_STRING("type:"),DLT_INT(soundProperty.type),DLT_STRING("to:"),DLT_INT(soundProperty.value)); return E_OK; } @@ -3757,16 +3752,16 @@ am_Error_e DatabaseHandler::changeCrossFaderHotSink(const am_crossfaderID_t cros sqlite3_bind_int(query,1, hotsink); if((eCode=sqlite3_step(query))!=SQLITE_DONE) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeCrossFaderHotSink SQLITE Step error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeCrossFaderHotSink SQLITE Step error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } if((eCode=sqlite3_finalize(query))!=SQLITE_OK) { - DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeCrossFaderHotSink SQLITE Finalize error code:"),DLT_INT(eCode)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeCrossFaderHotSink SQLITE Finalize error code:"),DLT_INT(eCode)); return E_DATABASE_ERROR; } - DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeCrossFaderHotSink changed hotsink of crossfader="),DLT_INT(crossfaderID),DLT_STRING("to:"),DLT_INT(hotsink)); + DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeCrossFaderHotSink changed hotsink of crossfader="),DLT_INT(crossfaderID),DLT_STRING("to:"),DLT_INT(hotsink)); return E_OK; } diff --git a/AudioManagerDaemon/src/DatabaseObserver.cpp b/AudioManagerDaemon/src/DatabaseObserver.cpp index ba10a7e..f6b1930 100644 --- a/AudioManagerDaemon/src/DatabaseObserver.cpp +++ b/AudioManagerDaemon/src/DatabaseObserver.cpp @@ -23,8 +23,11 @@ */ #include "DatabaseObserver.h" -#include "CommandSender.h" #include <assert.h> +#include "CommandSender.h" +#include "RoutingSender.h" + +using namespace am; DatabaseObserver::DatabaseObserver(CommandSender *iCommandSender, RoutingSender *iRoutingSender) :mCommandSender(iCommandSender), diff --git a/AudioManagerDaemon/src/RoutingReceiver.cpp b/AudioManagerDaemon/src/RoutingReceiver.cpp index bbf4c78..b9dc3ac 100644 --- a/AudioManagerDaemon/src/RoutingReceiver.cpp +++ b/AudioManagerDaemon/src/RoutingReceiver.cpp @@ -24,8 +24,13 @@ */ #include "RoutingReceiver.h" +#include "RoutingSender.h" +#include "DatabaseHandler.h" +#include "ControlSender.h" #include <assert.h> +using namespace am; + RoutingReceiver::RoutingReceiver(DatabaseHandler *iDatabaseHandler, RoutingSender *iRoutingSender, ControlSender *iControlSender) :mDatabaseHandler(iDatabaseHandler), mRoutingSender(iRoutingSender), @@ -316,15 +321,18 @@ am_Error_e RoutingReceiver::sendChangedData(const std::vector<am_EarlyData_s> & am_Error_e RoutingReceiver::peekSinkClassID(const std::string & name, am_sourceClass_t & sourceClassID) { //todo: implement + return E_NOT_USED; } am_Error_e RoutingReceiver::peekSourceClassID(const std::string & name, am_sinkClass_t & sinkClassID) { //todo: implement + return E_NOT_USED; } am_Error_e RoutingReceiver::getDBusConnectionWrapper(DBusWrapper *dbusConnectionWrapper) const { //todo: return DbusWrapper + return E_NOT_USED; } diff --git a/AudioManagerDaemon/src/RoutingSender.cpp b/AudioManagerDaemon/src/RoutingSender.cpp index 246920f..a6de266 100644 --- a/AudioManagerDaemon/src/RoutingSender.cpp +++ b/AudioManagerDaemon/src/RoutingSender.cpp @@ -23,10 +23,11 @@ */ #include "RoutingSender.h" -#include "PluginTemplate.h" #include <utility> #include <dirent.h> #include <dlfcn.h> +#include <dlt/dlt.h> +#include "PluginTemplate.h" using namespace am; diff --git a/AudioManagerDaemon/src/main.cpp b/AudioManagerDaemon/src/main.cpp index dfb06ba..34a0fc1 100644 --- a/AudioManagerDaemon/src/main.cpp +++ b/AudioManagerDaemon/src/main.cpp @@ -35,8 +35,6 @@ //todo: there is a bug in the visible flags of sinks and sources. fix it. //todo: check namespace handling. no use.. in headers -#include <dbus/dbus.h> -#include <dlt/dlt.h> #include "DatabaseHandler.h" #include "DatabaseObserver.h" #include "RoutingReceiver.h" @@ -47,7 +45,10 @@ #include "RoutingSender.h" #include "DBusWrapper.h" -DLT_DECLARE_CONTEXT(AudioManager) +#include <dbus/dbus.h> +#include <dlt/dlt.h> + +DLT_DECLARE_CONTEXT(DLT_CONTEXT) using namespace am; @@ -58,8 +59,8 @@ using namespace am; int main(int argc, char *argv[]) { DLT_REGISTER_APP("AudioManagerDeamon","AudioManagerDeamon"); - DLT_REGISTER_CONTEXT(AudioManager,"Main","Main Context"); - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("The AudioManager is started ")); + DLT_REGISTER_CONTEXT(DLT_CONTEXT,"Main","Main Context"); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("The AudioManager is started ")); std::vector<std::string> listCommandPluginDirs; listCommandPluginDirs.push_back(std::string(DEFAULT_PLUGIN_COMMAND_DIR)); //change this to be modified by the commandline! @@ -81,6 +82,7 @@ int main(int argc, char *argv[]) //since the plugins have been loaded by the *Senders before, we can tell the Controller this: iControlSender.hookAllPluginsLoaded(); + //the controller should startup the interfaces - this is just for testing iCommandSender.startupInterface(&iCommandReceiver); iRoutingSender.startupRoutingInterface(&iRoutingReceiver); diff --git a/AudioManagerDaemon/test/CommandInterfaceBackdoor.h b/AudioManagerDaemon/test/CommandInterfaceBackdoor.h index 3c94337..ab57a62 100644 --- a/AudioManagerDaemon/test/CommandInterfaceBackdoor.h +++ b/AudioManagerDaemon/test/CommandInterfaceBackdoor.h @@ -29,7 +29,7 @@ #include <command/CommandSendInterface.h> #include "CommandSender.h" -using namespace am; +namespace am { class CommandSender; @@ -41,6 +41,8 @@ public: bool injectInterface(CommandSender* CommandSender, CommandSendInterface* CommandSendInterface); }; +} + //definitions are in CommonFunctions.cpp! #endif /* COMMANDINTERFACEBACKDOOR_H_ */ diff --git a/AudioManagerDaemon/test/CommonFunctions.cpp b/AudioManagerDaemon/test/CommonFunctions.cpp index 1504412..b62169e 100644 --- a/AudioManagerDaemon/test/CommonFunctions.cpp +++ b/AudioManagerDaemon/test/CommonFunctions.cpp @@ -27,6 +27,10 @@ #include "CommandInterfaceBackdoor.h" #include "RoutingInterfaceBackdoor.h" #include "ControlInterfaceBackdoor.h" +#include <assert.h> +#include <sstream> + +using namespace am; CommandInterfaceBackdoor::CommandInterfaceBackdoor() { } @@ -87,9 +91,9 @@ bool ControlInterfaceBackdoor::replaceController(ControlSender *controlSender, C } -int GetRandomNumber(int nLow, int nHigh) { - return (rand() % (nHigh - nLow + 1)) + nLow; -} +//int GetRandomNumber(int nLow, int nHigh) { +// return (rand() % (nHigh - nLow + 1)) + nLow; +//} bool equalSoundProperty(const am_SoundProperty_s a, const am_SoundProperty_s b) { diff --git a/AudioManagerDaemon/test/CommonFunctions.h b/AudioManagerDaemon/test/CommonFunctions.h index 871c131..af6d43b 100644 --- a/AudioManagerDaemon/test/CommonFunctions.h +++ b/AudioManagerDaemon/test/CommonFunctions.h @@ -26,10 +26,9 @@ #ifndef COMMONHEADERS_H_ #define COMMONHEADERS_H_ -#include <gtest/gtest.h> -#include "DatabaseHandler.h" +#include "audiomanagertypes.h" -using namespace am; +namespace am { class CommonFunctions { @@ -86,7 +85,7 @@ public: }; }; - +} #endif /* COMMONHEADERS_H_ */ diff --git a/AudioManagerDaemon/test/ControlInterfaceBackdoor.h b/AudioManagerDaemon/test/ControlInterfaceBackdoor.h index 37c63b2..b07f3ad 100644 --- a/AudioManagerDaemon/test/ControlInterfaceBackdoor.h +++ b/AudioManagerDaemon/test/ControlInterfaceBackdoor.h @@ -29,9 +29,9 @@ #include "control/ControlSendInterface.h" #include "ControlSender.h" -class ControlSender; +namespace am { -using namespace am; +class ControlSender; class ControlInterfaceBackdoor { public: @@ -40,4 +40,6 @@ public: bool replaceController(ControlSender *controlSender, ControlSendInterface *newController); }; +} + #endif /* CONTROLINTERFACEBACKDOOR_H_ */ diff --git a/AudioManagerDaemon/test/RoutingInterfaceBackdoor.h b/AudioManagerDaemon/test/RoutingInterfaceBackdoor.h index 4ade08f..b7e7624 100644 --- a/AudioManagerDaemon/test/RoutingInterfaceBackdoor.h +++ b/AudioManagerDaemon/test/RoutingInterfaceBackdoor.h @@ -28,7 +28,7 @@ #include "RoutingSender.h" -using namespace am; +namespace am { class RoutingSender; @@ -40,6 +40,8 @@ public: bool injectInterface(RoutingSender *RoutingSender, RoutingSendInterface *newInterface, const std::string& busname); }; +} + //definitions are in CommonFunctions.cpp! #endif /* ROUTINGINTERFACEBACKDOOR_H_ */ diff --git a/AudioManagerDaemon/test/controlInterface/CMakeLists.txt b/AudioManagerDaemon/test/controlInterface/CMakeLists.txt index a96cfe8..8ac7cd1 100644 --- a/AudioManagerDaemon/test/controlInterface/CMakeLists.txt +++ b/AudioManagerDaemon/test/controlInterface/CMakeLists.txt @@ -25,9 +25,8 @@ cmake_minimum_required(VERSION 2.6) PROJECT(controlInterfacetest) -set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -rdynamic") #set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic") -set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -DUNIT_TEST=1") +set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -DUNIT_TEST=1 -DDLT_CONTEXT=AudioManager") set(STD_INCLUDE_DIRS "/usr/include") set(DBUS_FOLDER ${CMAKE_SOURCE_DIR}/../../../dbusInterfaces) diff --git a/AudioManagerDaemon/test/controlInterface/controlInterfaceTest.cpp b/AudioManagerDaemon/test/controlInterface/controlInterfaceTest.cpp index dbddf47..c59ac06 100644 --- a/AudioManagerDaemon/test/controlInterface/controlInterfaceTest.cpp +++ b/AudioManagerDaemon/test/controlInterface/controlInterfaceTest.cpp @@ -23,8 +23,15 @@ */ #include "controlInterfaceTest.h" +#include <algorithm> +#include <string> +#include <vector> +#include <set> +using namespace am; +using namespace testing; +DLT_DECLARE_CONTEXT(DLT_CONTEXT) controlInterfaceTest::controlInterfaceTest() :plistCommandPluginDirs(), @@ -55,14 +62,14 @@ controlInterfaceTest::~controlInterfaceTest() void controlInterfaceTest::SetUp() { DLT_REGISTER_APP("Rtest","RoutingInterfacetest"); - DLT_REGISTER_CONTEXT(AudioManager,"Main","Main Context"); - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("RoutingSendInterface Test started ")); + DLT_REGISTER_CONTEXT(DLT_CONTEXT,"Main","Main Context"); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("RoutingSendInterface Test started ")); } void controlInterfaceTest::TearDown() { - DLT_UNREGISTER_CONTEXT(AudioManager); + DLT_UNREGISTER_CONTEXT(DLT_CONTEXT); } TEST_F(controlInterfaceTest,registerDomain) @@ -467,7 +474,6 @@ TEST_F(controlInterfaceTest,ackSetSourceSoundProperty) am_sourceID_t sourceID; am_Domain_s domain; am_domainID_t domainID; - am_volume_t volume; std::vector<am_Handle_s> handlesList; am_Handle_s handle; am_SoundProperty_s soundProperty; diff --git a/AudioManagerDaemon/test/controlInterface/controlInterfaceTest.h b/AudioManagerDaemon/test/controlInterface/controlInterfaceTest.h index 4d83b8f..a3a2a50 100644 --- a/AudioManagerDaemon/test/controlInterface/controlInterfaceTest.h +++ b/AudioManagerDaemon/test/controlInterface/controlInterfaceTest.h @@ -28,10 +28,6 @@ #include <gtest/gtest.h> #include <gmock/gmock.h> #include <dlt/dlt.h> -#include <algorithm> -#include <string> -#include <vector> -#include <set> #include "MockInterfaces.h" #include "DatabaseHandler.h" #include "ControlReceiver.h" @@ -44,41 +40,20 @@ #include "../ControlInterfaceBackdoor.h" #include "../CommonFunctions.h" -DLT_DECLARE_CONTEXT(AudioManager) -using namespace testing; -using namespace am; +namespace am { -using ::testing::Field; -using ::testing::Property; -using ::testing::Matcher; -using ::testing::Pointee; -using ::testing::AllOf; -using ::testing::SafeMatcherCast; -using ::testing::MatcherCast; -using ::testing::DefaultValue; -using ::testing::Eq; -using ::testing::An; -using ::testing::ElementsAreArray; -using ::testing::ElementsAre; -using ::testing::NotNull; -using ::testing::Assign; -using ::testing::SetArgReferee; -using ::testing::DoAll; -using ::testing::MatcherInterface; -using ::testing::MatchResultListener; - -class controlInterfaceTest : public Test{ +class controlInterfaceTest : public ::testing::Test{ public: controlInterfaceTest(); ~controlInterfaceTest(); - std::vector<std::string> plistRoutingPluginDirs; std::vector<std::string> plistCommandPluginDirs; + std::vector<std::string> plistRoutingPluginDirs; DatabaseHandler pDatabaseHandler; RoutingSender pRoutingSender; CommandSender pCommandSender; - MockRoutingSendInterface pMockRoutingInterface; MockControlSendInterface pMockControlInterface; + MockRoutingSendInterface pMockRoutingInterface; ControlSender pControlSender; RoutingInterfaceBackdoor pRoutingInterfaceBackdoor; CommandInterfaceBackdoor pCommandInterfaceBackdoor; @@ -91,4 +66,6 @@ public: void TearDown(); }; +} + #endif /* ROUTINGINTERFACETEST_H_ */ diff --git a/AudioManagerDaemon/test/database/CMakeLists.txt b/AudioManagerDaemon/test/database/CMakeLists.txt index 4d01d41..59c40e8 100644 --- a/AudioManagerDaemon/test/database/CMakeLists.txt +++ b/AudioManagerDaemon/test/database/CMakeLists.txt @@ -25,9 +25,8 @@ cmake_minimum_required(VERSION 2.6) PROJECT(datbaseTest) -set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -rdynamic") #set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic") -set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -DUNIT_TEST=1") +set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -DUNIT_TEST=1 -DDLT_CONTEXT=AudioManager") set(STD_INCLUDE_DIRS "/usr/include") set(DBUS_FOLDER ${CMAKE_SOURCE_DIR}/../../../dbusInterfaces) diff --git a/AudioManagerDaemon/test/database/databaseTest.cpp b/AudioManagerDaemon/test/database/databaseTest.cpp index f8d69fe..fc74f89 100644 --- a/AudioManagerDaemon/test/database/databaseTest.cpp +++ b/AudioManagerDaemon/test/database/databaseTest.cpp @@ -26,6 +26,9 @@ #include "databaseTest.h" using namespace am; +using namespace testing; + +DLT_DECLARE_CONTEXT(DLT_CONTEXT) //extern int GetRandomNumber(int nLow, int nHigh); //extern bool equalSoundProperty (const am_SoundProperty_s a, const am_SoundProperty_s b); @@ -134,13 +137,13 @@ void databaseTest::createMainConnectionSetup() void databaseTest::SetUp() { DLT_REGISTER_APP("Dtest","AudioManagerDeamon"); - DLT_REGISTER_CONTEXT(AudioManager,"Main","Main Context"); - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Database Test started ")); + DLT_REGISTER_CONTEXT(DLT_CONTEXT,"Main","Main Context"); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("Database Test started ")); } void databaseTest::TearDown() { - DLT_UNREGISTER_CONTEXT(AudioManager); + DLT_UNREGISTER_CONTEXT(DLT_CONTEXT); } TEST_F(databaseTest,crossfaders) diff --git a/AudioManagerDaemon/test/database/databaseTest.h b/AudioManagerDaemon/test/database/databaseTest.h index 67ac0a6..fd91487 100644 --- a/AudioManagerDaemon/test/database/databaseTest.h +++ b/AudioManagerDaemon/test/database/databaseTest.h @@ -44,11 +44,9 @@ #include "../CommandInterfaceBackdoor.h" #include "../CommonFunctions.h" -DLT_DECLARE_CONTEXT(AudioManager) +namespace am { -using namespace testing; - -class databaseTest : public Test { +class databaseTest : public ::testing::Test { public: databaseTest(); ~databaseTest(); @@ -69,4 +67,6 @@ public: void createMainConnectionSetup(); }; +} + #endif /* DATABASETEST_H_ */ diff --git a/AudioManagerDaemon/test/routingInterface/CMakeLists.txt b/AudioManagerDaemon/test/routingInterface/CMakeLists.txt index 0376683..654c726 100644 --- a/AudioManagerDaemon/test/routingInterface/CMakeLists.txt +++ b/AudioManagerDaemon/test/routingInterface/CMakeLists.txt @@ -25,9 +25,8 @@ cmake_minimum_required(VERSION 2.6) PROJECT(routingInterfaceTest) -set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -rdynamic") #set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic") -set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUNIT_TEST=1") +set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUNIT_TEST=1 -DDLT_CONTEXT=AudioManager") set(STD_INCLUDE_DIRS "/usr/include") set(DBUS_FOLDER ${CMAKE_SOURCE_DIR}/../../../dbusInterfaces) diff --git a/AudioManagerDaemon/test/routingInterface/routingInterfaceTest.cpp b/AudioManagerDaemon/test/routingInterface/routingInterfaceTest.cpp index 86f5959..ff67912 100644 --- a/AudioManagerDaemon/test/routingInterface/routingInterfaceTest.cpp +++ b/AudioManagerDaemon/test/routingInterface/routingInterfaceTest.cpp @@ -25,19 +25,10 @@ #include "routingInterfaceTest.h" -using ::testing::Field; -using ::testing::Property; -using ::testing::Matcher; -using ::testing::Pointee; -using ::testing::AllOf; -using ::testing::SafeMatcherCast; -using ::testing::MatcherCast; -using ::testing::DefaultValue; -using ::testing::Eq; -using ::testing::An; -using ::testing::ElementsAreArray; -using ::testing::ElementsAre; -using ::testing::NotNull; +using namespace am; +using namespace testing; + +DLT_DECLARE_CONTEXT(DLT_CONTEXT) routingInterfaceTest::routingInterfaceTest() :plistRoutingPluginDirs(), @@ -64,14 +55,14 @@ routingInterfaceTest::~routingInterfaceTest() void routingInterfaceTest::SetUp() { DLT_REGISTER_APP("Rtest","RoutingInterfacetest"); - DLT_REGISTER_CONTEXT(AudioManager,"Main","Main Context"); - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("RoutingSendInterface Test started ")); + DLT_REGISTER_CONTEXT(DLT_CONTEXT,"Main","Main Context"); + DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("RoutingSendInterface Test started ")); } void routingInterfaceTest::TearDown() { - DLT_UNREGISTER_CONTEXT(AudioManager); + DLT_UNREGISTER_CONTEXT(DLT_CONTEXT); } TEST_F(routingInterfaceTest,abort) diff --git a/AudioManagerDaemon/test/routingInterface/routingInterfaceTest.h b/AudioManagerDaemon/test/routingInterface/routingInterfaceTest.h index 1d5baaa..acd1264 100644 --- a/AudioManagerDaemon/test/routingInterface/routingInterfaceTest.h +++ b/AudioManagerDaemon/test/routingInterface/routingInterfaceTest.h @@ -42,12 +42,10 @@ #include "../CommandInterfaceBackdoor.h" #include "../CommonFunctions.h" -DLT_DECLARE_CONTEXT(AudioManager) -using namespace testing; -using namespace am; +namespace am { -class routingInterfaceTest : public Test{ +class routingInterfaceTest : public ::testing::Test{ public: routingInterfaceTest(); ~routingInterfaceTest(); @@ -66,4 +64,6 @@ public: void TearDown(); }; +} + #endif /* ROUTINGINTERFACETEST_H_ */ |