summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchristian mueller <christian.ei.mueller@bmw.de>2011-12-29 17:07:38 +0100
committerchristian mueller <christian.ei.mueller@bmw.de>2011-12-30 03:08:00 +0100
commit93d7610b460c6212a3098a3eccb127fd45ada345 (patch)
tree0e00544ede90f06dd9933c003c4b7cc72f964af3
parentb7e748007bbe0b16fa8a8a089c6cc8fe43bc7aac (diff)
downloadaudiomanager-93d7610b460c6212a3098a3eccb127fd45ada345.tar.gz
*added versioning support automatically out of git
*added commandline parser *changed DLT_CONTEXT for AudioManager to AudioManager *added signalhandler *TODO: make signalhandler not only call but correctly rundown the daemon
-rw-r--r--AudioManagerDaemon/CMakeLists.txt2
-rw-r--r--AudioManagerDaemon/include/PluginTemplate.h10
-rw-r--r--AudioManagerDaemon/src/CommandReceiver.cpp18
-rw-r--r--AudioManagerDaemon/src/CommandSender.cpp12
-rw-r--r--AudioManagerDaemon/src/ControlReceiver.cpp26
-rw-r--r--AudioManagerDaemon/src/ControlSender.cpp4
-rw-r--r--AudioManagerDaemon/src/DBusWrapper.cpp62
-rw-r--r--AudioManagerDaemon/src/DatabaseHandler.cpp464
-rw-r--r--AudioManagerDaemon/src/SocketHandler.cpp84
-rw-r--r--AudioManagerDaemon/src/main.cpp172
-rw-r--r--AudioManagerDaemon/test/CMakeLists.txt2
-rw-r--r--AudioManagerDaemon/test/sockethandler/sockethandlerTest.cpp5
-rw-r--r--CMakeLists.txt11
-rw-r--r--PluginRoutingInterfaceAsync/src/RoutingSenderAsync.cpp9
-rw-r--r--PluginRoutingInterfaceAsync/test/CMakeLists.txt20
-rw-r--r--PluginRoutingInterfaceAsync/test/testRoutingInterfaceAsync.cpp37
-rw-r--r--PluginRoutingInterfaceAsync/test/testRoutingInterfaceAsyncInterrupt.cpp148
-rw-r--r--cmake/config.cmake3
-rw-r--r--includes/SocketHandler.h5
-rw-r--r--includes/config.h3
20 files changed, 720 insertions, 377 deletions
diff --git a/AudioManagerDaemon/CMakeLists.txt b/AudioManagerDaemon/CMakeLists.txt
index 39c576f..c1e09eb 100644
--- a/AudioManagerDaemon/CMakeLists.txt
+++ b/AudioManagerDaemon/CMakeLists.txt
@@ -14,7 +14,7 @@ cmake_minimum_required(VERSION 2.6)
PROJECT(AudioManagerDeamon)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -rdynamic")
-set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -DDLT_CONTEXT=AudioManager")
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
set(DOC_OUTPUT_PATH ${DOC_OUTPUT_PATH}/AudioManager)
set(INCLUDES_FOLDER "include")
diff --git a/AudioManagerDaemon/include/PluginTemplate.h b/AudioManagerDaemon/include/PluginTemplate.h
index e8c031a..cb5aa06 100644
--- a/AudioManagerDaemon/include/PluginTemplate.h
+++ b/AudioManagerDaemon/include/PluginTemplate.h
@@ -29,7 +29,7 @@
#include <dlfcn.h>
#include <libgen.h>
-DLT_IMPORT_CONTEXT(DLT_CONTEXT)
+DLT_IMPORT_CONTEXT(AudioManager)
namespace am {
@@ -40,7 +40,7 @@ namespace am {
*/
template<class T>T* getCreateFunction(const std::string& libname, void*& libraryHandle) {
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("Trying to load libray with name: "),DLT_STRING(libname.c_str()));
+ DLT_LOG(AudioManager,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());
@@ -55,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(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("dlopen failed"),DLT_STRING(dlopen_error));
+ DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("dlopen failed"),DLT_STRING(dlopen_error));
return 0;
}
@@ -78,11 +78,11 @@ template<class T>T* getCreateFunction(const std::string& libname, void*& library
const char* dlsym_error = dlerror();
if (!createFunction || dlsym_error)
{
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("Failed to load shared lib entry point"),DLT_STRING(dlsym_error));
+ DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("Failed to load shared lib entry point"),DLT_STRING(dlsym_error));
}
else
{
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("loaded successfully plugin"),DLT_STRING(createFunctionName.c_str()));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("loaded successfully plugin"),DLT_STRING(createFunctionName.c_str()));
}
return createFunction;
}
diff --git a/AudioManagerDaemon/src/CommandReceiver.cpp b/AudioManagerDaemon/src/CommandReceiver.cpp
index 1497176..6cee4ad 100644
--- a/AudioManagerDaemon/src/CommandReceiver.cpp
+++ b/AudioManagerDaemon/src/CommandReceiver.cpp
@@ -28,7 +28,7 @@
#include <assert.h>
#include <dlt/dlt.h>
-DLT_IMPORT_CONTEXT(DLT_CONTEXT)
+DLT_IMPORT_CONTEXT(AudioManager)
using namespace am;
@@ -70,7 +70,7 @@ CommandReceiver::~CommandReceiver()
am_Error_e CommandReceiver::connect(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t & mainConnectionID)
{
- 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));
+ DLT_LOG(AudioManager,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);
}
@@ -78,7 +78,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(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandReceiver::disconnect got called, mainConnectionID="),DLT_INT(mainConnectionID));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("CommandReceiver::disconnect got called, mainConnectionID="),DLT_INT(mainConnectionID));
return mControlSender->hookUserDisconnectionRequest(mainConnectionID);
}
@@ -86,7 +86,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(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandReceiver::setVolume got called, sinkID="),DLT_INT(sinkID),DLT_STRING("volume="),DLT_INT(volume));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("CommandReceiver::setVolume got called, sinkID="),DLT_INT(sinkID),DLT_STRING("volume="),DLT_INT(volume));
return mControlSender->hookUserVolumeChange(sinkID,volume);
}
@@ -94,7 +94,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(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandReceiver::volumeStep got called, sinkID="),DLT_INT(sinkID),DLT_STRING("volumeStep="),DLT_INT(volumeStep));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("CommandReceiver::volumeStep got called, sinkID="),DLT_INT(sinkID),DLT_STRING("volumeStep="),DLT_INT(volumeStep));
return mControlSender->hookUserVolumeStep(sinkID,volumeStep);
}
@@ -102,7 +102,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(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandReceiver::setSinkMuteState got called, sinkID="),DLT_INT(sinkID),DLT_STRING("muteState="),DLT_INT(muteState));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("CommandReceiver::setSinkMuteState got called, sinkID="),DLT_INT(sinkID),DLT_STRING("muteState="),DLT_INT(muteState));
return mControlSender->hookUserSetSinkMuteState(sinkID,muteState);
}
@@ -110,7 +110,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(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));
+ 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));
return mControlSender->hookUserSetMainSinkSoundProperty(sinkID,soundProperty);
}
@@ -118,7 +118,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(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));
+ 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));
return mControlSender->hookUserSetMainSourceSoundProperty(sourceID,soundProperty);
}
@@ -126,7 +126,7 @@ am_Error_e CommandReceiver::setMainSourceSoundProperty(const am_MainSoundPropert
am_Error_e CommandReceiver::setSystemProperty(const am_SystemProperty_s & property)
{
- 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));
+ 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));
return mControlSender->hookUserSetSystemProperty(property);
}
diff --git a/AudioManagerDaemon/src/CommandSender.cpp b/AudioManagerDaemon/src/CommandSender.cpp
index 658a497..7ea9ee8 100644
--- a/AudioManagerDaemon/src/CommandSender.cpp
+++ b/AudioManagerDaemon/src/CommandSender.cpp
@@ -29,7 +29,7 @@
#include "PluginTemplate.h"
using namespace am;
-DLT_IMPORT_CONTEXT(DLT_CONTEXT)
+DLT_IMPORT_CONTEXT(AudioManager)
//!< macro to call all interfaces
#define CALL_ALL_INTERFACES(...) \
@@ -52,12 +52,12 @@ CommandSender::CommandSender(const std::vector<std::string>& listOfPluginDirecto
for (; dirIter < dirIterEnd; ++dirIter)
{
const char* directoryName = dirIter->c_str();
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("Searching for CommandPlugins in"),DLT_STRING(directoryName));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Searching for CommandPlugins in"),DLT_STRING(directoryName));
DIR *directory = opendir(directoryName);
if (!directory)
{
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("Error opening directory "),DLT_STRING(directoryName));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Error opening directory "),DLT_STRING(directoryName));
}
// iterate content of directory
@@ -85,14 +85,14 @@ CommandSender::CommandSender(const std::vector<std::string>& listOfPluginDirecto
for (; iter < iterEnd; ++iter)
{
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("Loading CommandSender plugin"),DLT_STRING(iter->c_str()));
+ DLT_LOG(AudioManager,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(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("Entry point of CommandPlugin not found"),DLT_STRING(iter->c_str()));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Entry point of CommandPlugin not found"),DLT_STRING(iter->c_str()));
continue;
}
@@ -100,7 +100,7 @@ CommandSender::CommandSender(const std::vector<std::string>& listOfPluginDirecto
if (!commander)
{
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("CommandPlugin initialization failed. Entry Function not callable"));
+ DLT_LOG(AudioManager,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 d5f2deb..3a88c84 100644
--- a/AudioManagerDaemon/src/ControlReceiver.cpp
+++ b/AudioManagerDaemon/src/ControlReceiver.cpp
@@ -27,7 +27,7 @@
#include <assert.h>
#include <dlt/dlt.h>
-DLT_IMPORT_CONTEXT(DLT_CONTEXT)
+DLT_IMPORT_CONTEXT(AudioManager)
using namespace am;
@@ -68,7 +68,7 @@ am_Error_e ControlReceiver::getRoute(const bool onlyfree, const am_sourceID_t so
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(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));
+ 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));
am_Connection_s tempConnection;
tempConnection.sinkID=sinkID;
@@ -87,7 +87,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(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("ControlReceiver::disconnect got called, connectionID="),DLT_INT(connectionID));
+ DLT_LOG(AudioManager,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);
@@ -97,7 +97,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(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));
+ 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));
if (!mDatabaseHandler->existcrossFader(crossfaderID)) return E_NON_EXISTENT;
return mRoutingSender->asyncCrossFade(handle,crossfaderID,hotSource,rampType,rampTime);
@@ -107,7 +107,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(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setSourceState got called, sourceID="),DLT_INT(sourceID),DLT_STRING("state="),DLT_INT(state));
+ DLT_LOG(AudioManager,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;
@@ -119,7 +119,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(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));
+ 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));
am_volume_t tempVolume;
if(mDatabaseHandler->getSinkVolume(sinkID,tempVolume)!=E_OK) return E_UNKNOWN;
@@ -131,7 +131,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(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));
+ 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));
am_volume_t tempVolume;
if(mDatabaseHandler->getSourceVolume(sourceID,tempVolume)!=E_OK) return E_UNKNOWN;
@@ -143,7 +143,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(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));
+ 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));
uint16_t value;
if(mDatabaseHandler->getSinkSoundPropertyValue(sinkID,soundProperty.type,value)!=E_OK) return E_UNKNOWN;
@@ -155,7 +155,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(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));
+ 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));
uint16_t value;
if(mDatabaseHandler->getSourceSoundPropertyValue(sourceID,soundProperty.type,value)!=E_OK) return E_UNKNOWN;
@@ -167,7 +167,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(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setDomainState got called, domainID="),DLT_INT(domainID),DLT_STRING("domainState="),DLT_INT(domainState));
+ DLT_LOG(AudioManager,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;
@@ -179,7 +179,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(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));
+ 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));
return mRoutingSender->asyncAbort(handle);
}
@@ -507,13 +507,13 @@ am_Error_e ControlReceiver::removeSourceClassDB(const am_sourceClass_t sourceCla
void ControlReceiver::setCommandReady()
{
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setCommandReady got called"));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setCommandReady got called"));
mCommandSender->cbCommunicationReady();
}
void ControlReceiver::setRoutingReady()
{
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setRoutingReady got called"));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("ControlReceiver::setRoutingReady got called"));
mRoutingSender->routingInterfacesReady();
}
diff --git a/AudioManagerDaemon/src/ControlSender.cpp b/AudioManagerDaemon/src/ControlSender.cpp
index f5aaef7..cc0c6bb 100644
--- a/AudioManagerDaemon/src/ControlSender.cpp
+++ b/AudioManagerDaemon/src/ControlSender.cpp
@@ -10,7 +10,7 @@
#include <dlt/dlt.h>
#include "PluginTemplate.h"
-DLT_IMPORT_CONTEXT(DLT_CONTEXT)
+DLT_IMPORT_CONTEXT(AudioManager)
using namespace am;
@@ -27,7 +27,7 @@ ControlSender::ControlSender(std::string controlPluginFile)
}
else
{
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("No controller loaded !"));
+ DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("No controller loaded !"));
}
}
diff --git a/AudioManagerDaemon/src/DBusWrapper.cpp b/AudioManagerDaemon/src/DBusWrapper.cpp
index a34b6e8..66a135a 100644
--- a/AudioManagerDaemon/src/DBusWrapper.cpp
+++ b/AudioManagerDaemon/src/DBusWrapper.cpp
@@ -34,7 +34,7 @@
using namespace am;
-DLT_IMPORT_CONTEXT(DLT_CONTEXT)
+DLT_IMPORT_CONTEXT(AudioManager)
#define ROOT_INTROSPECT_XML \
DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE \
@@ -58,16 +58,16 @@ DBusWrapper::DBusWrapper()
mListTimerhandlePointer()
{
dbus_error_init(&mDBusError);
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("DBusWrapper::DBusWrapper Opening DBus connection"));
+ DLT_LOG(AudioManager,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(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::DBusWrapper Error while getting the DBus"));
+ DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::DBusWrapper Error while getting the DBus"));
dbus_error_free(&mDBusError);
}
if (NULL == mDbusConnection)
{
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::DBusWrapper DBus Connection is null"));
+ DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::DBusWrapper DBus Connection is null"));
}
//first, we are old enought to live longer then the connection:
@@ -78,12 +78,12 @@ 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(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::DBusWrapper Name Error"),DLT_STRING(mDBusError.message));
+ DLT_LOG(AudioManager,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(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::DBusWrapper Wrapper is not the Primary Owner"), DLT_INT(ret));
+ DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::DBusWrapper Wrapper is not the Primary Owner"), DLT_INT(ret));
exit(1);
}
}
@@ -102,16 +102,16 @@ DBusWrapper::DBusWrapper(SocketHandler* socketHandler)
assert(mSocketHandler!=0);
dbus_error_init(&mDBusError);
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("DBusWrapper::DBusWrapper Opening DBus connection"));
+ DLT_LOG(AudioManager,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(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::DBusWrapper Error while getting the DBus"));
+ DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::DBusWrapper Error while getting the DBus"));
dbus_error_free(&mDBusError);
}
if (NULL == mDbusConnection)
{
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::DBusWrapper DBus Connection is null"));
+ DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::DBusWrapper DBus Connection is null"));
}
//then we need to adopt the dbus to our mainloop:
@@ -125,14 +125,14 @@ DBusWrapper::DBusWrapper(SocketHandler* socketHandler)
dbus_bool_t watch=dbus_connection_set_watch_functions(mDbusConnection, addWatch, removeWatch, toogleWatch , this, NULL);
if (!watch)
{
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::DBusWrapper Registering of watch functions failed"));
+ DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::DBusWrapper Registering of watch functions failed"));
}
//add timer functions:
dbus_bool_t timer=dbus_connection_set_timeout_functions(mDbusConnection, addTimeout, removeTimeout, toggleTimeout, this, NULL);
if(!timer)
{
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::DBusWrapper Registering of timer functions failed"));
+ DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::DBusWrapper Registering of timer functions failed"));
}
//register callback for Introspectio
@@ -141,12 +141,12 @@ DBusWrapper::DBusWrapper(SocketHandler* socketHandler)
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(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::DBusWrapper Name Error"),DLT_STRING(mDBusError.message));
+ DLT_LOG(AudioManager,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(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::DBusWrapper Wrapper is not the Primary Owner"), DLT_INT(ret));
+ DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::DBusWrapper Wrapper is not the Primary Owner"), DLT_INT(ret));
exit(1);
}
}
@@ -154,7 +154,7 @@ DBusWrapper::DBusWrapper(SocketHandler* socketHandler)
DBusWrapper::~DBusWrapper()
{
//close the connection again
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("DBusWrapper::~DBusWrapper Closing DBus connection"));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("DBusWrapper::~DBusWrapper Closing DBus connection"));
dbus_connection_unref(mDbusConnection);
//clean up all timerhandles we created but did not delete before
@@ -167,7 +167,7 @@ DBusWrapper::~DBusWrapper()
void DBusWrapper::registerCallback(const DBusObjectPathVTable* vtable, const std::string& path, void* userdata)
{
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("DBusWrapper::~registerCallback register callback:"),DLT_STRING(path.c_str()));
+ DLT_LOG(AudioManager,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);
@@ -175,7 +175,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(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::registerCallack error: "),DLT_STRING(mDBusError.message));
+ DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::registerCallack error: "),DLT_STRING(mDBusError.message));
dbus_error_free(&mDBusError);
}
mNodesList.push_back(path);
@@ -183,7 +183,7 @@ void DBusWrapper::registerCallback(const DBusObjectPathVTable* vtable, const std
DBusHandlerResult DBusWrapper::cbRootIntrospection(DBusConnection *conn, DBusMessage *msg, void *reference)
{
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("DBusWrapper::~cbRootIntrospection called:"));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("DBusWrapper::~cbRootIntrospection called:"));
mReference=(DBusWrapper*)reference;
std::list<std::string>nodesList=mReference->mNodesList;
@@ -210,13 +210,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(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::~cbRootIntrospection DBUS Out Of Memory!"));
+ DLT_LOG(AudioManager,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(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::~cbRootIntrospection DBUS Out Of Memory!"));
+ DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::~cbRootIntrospection DBUS Out Of Memory!"));
}
dbus_connection_flush(conn);
// free the reply
@@ -232,7 +232,7 @@ DBusHandlerResult DBusWrapper::cbRootIntrospection(DBusConnection *conn, DBusMes
void DBusWrapper::dbusMainLoop()
{
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("DBusWrapper::dbusMainLoop Entering MainLoop"));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("DBusWrapper::dbusMainLoop Entering MainLoop"));
while (dbus_connection_read_write_dispatch(mDbusConnection, -1))
{
@@ -265,7 +265,7 @@ dbus_bool_t DBusWrapper::addWatchDelegate(DBusWatch * watch, void* userData)
if (flags & DBUS_WATCH_WRITABLE) event |= POLLOUT;
}
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("DBusWrapper::addWatchDelegate entered new watch, fd="),DLT_INT(dbus_watch_get_unix_fd(watch)),DLT_STRING("event flag="),DLT_INT(event));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("DBusWrapper::addWatchDelegate entered new watch, fd="),DLT_INT(dbus_watch_get_unix_fd(watch)),DLT_STRING("event flag="),DLT_INT(event));
am_Error_e error=mSocketHandler->addFDPoll(dbus_watch_get_unix_fd(watch),event,NULL,&pDbusFireCallback,&pDbusCheckCallback,&pDbusDispatchCallback,watch,handle);
//if everything is alright, add the watch and the handle to our map so we know this relationship
@@ -274,7 +274,7 @@ dbus_bool_t DBusWrapper::addWatchDelegate(DBusWatch * watch, void* userData)
mMapHandleWatch.insert(std::make_pair(watch,handle));
return true;
}
- DLT_LOG(DLT_CONTEXT,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::addWatchDelegate entering watch failed"));
+ DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("DBusWrapper::addWatchDelegate entering watch failed"));
}
void DBusWrapper::removeWatch(DBusWatch *watch, void *userData)
@@ -289,7 +289,7 @@ void DBusWrapper::removeWatchDelegate(DBusWatch *watch, void *userData)
std::map<DBusWatch*,sh_pollHandle_t>::iterator iterator=mMapHandleWatch.begin();
iterator=mMapHandleWatch.find(watch);
if (iterator!=mMapHandleWatch.end()) mSocketHandler->removeFDPoll(iterator->second);
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("DBusWrapper::removeWatch removed watch with handle"),DLT_INT(iterator->second));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("DBusWrapper::removeWatch removed watch with handle"),DLT_INT(iterator->second));
mMapHandleWatch.erase(iterator);
}
@@ -314,7 +314,7 @@ void DBusWrapper::toogleWatchDelegate(DBusWatch *watch, void *userData)
std::map<DBusWatch*,sh_pollHandle_t>::iterator iterator=mMapHandleWatch.begin();
iterator=mMapHandleWatch.find(watch);
if (iterator!=mMapHandleWatch.end()) mSocketHandler->updateEventFlags(iterator->second,event);
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("DBusWrapper::toogleWatchDelegate watch was toggeled"));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("DBusWrapper::toogleWatchDelegate watch was toggeled"));
}
dbus_bool_t DBusWrapper::addTimeout(DBusTimeout *timeout, void* userData)
@@ -347,7 +347,7 @@ dbus_bool_t DBusWrapper::addTimeoutDelegate(DBusTimeout *timeout,void* userData)
//save timeout in Socket context
userData=timeout;
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("DBusWrapper::addTimeoutDelegate a timeout was added"));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("DBusWrapper::addTimeoutDelegate a timeout was added"));
return true;
}
@@ -375,7 +375,7 @@ void DBusWrapper::removeTimeoutDelegate(DBusTimeout *timeout, void* userData)
}
}
delete handle;
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("DBusWrapper::removeTimeoutDelegate a timeout was removed"));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("DBusWrapper::removeTimeoutDelegate a timeout was removed"));
}
void DBusWrapper::toggleTimeout(DBusTimeout *timeout, void* userData)
@@ -391,7 +391,7 @@ bool am::DBusWrapper::dbusDispatchCallback(const sh_pollHandle_t handle, void *u
dbus_connection_ref(mDbusConnection);
if (dbus_connection_dispatch(mDbusConnection)==DBUS_DISPATCH_COMPLETE) returnVal=false;
dbus_connection_unref(mDbusConnection);
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("DBusWrapper::dbusDispatchCallback was called"));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("DBusWrapper::dbusDispatchCallback was called"));
return returnVal;
}
@@ -401,7 +401,7 @@ bool am::DBusWrapper::dbusCheckCallback(const sh_pollHandle_t handle, void *user
dbus_connection_ref(mDbusConnection);
if (dbus_connection_get_dispatch_status(mDbusConnection) == DBUS_DISPATCH_DATA_REMAINS) returnVal=true;
dbus_connection_unref(mDbusConnection);
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("DBusWrapper::dbusCheckCallback was called"));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("DBusWrapper::dbusCheckCallback was called"));
return returnVal;
}
@@ -420,7 +420,7 @@ void am::DBusWrapper::dbusFireCallback(const pollfd pollfd, const sh_pollHandle_
dbus_connection_ref(mDbusConnection);
bool ok=dbus_watch_handle(watch, flags);
dbus_connection_unref(mDbusConnection);
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("DBusWrapper::dbusFireCallback was called"));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("DBusWrapper::dbusFireCallback was called"));
}
void DBusWrapper::toggleTimeoutDelegate(DBusTimeout *timeout, void* userData)
@@ -442,7 +442,7 @@ void DBusWrapper::toggleTimeoutDelegate(DBusTimeout *timeout, void* userData)
{
mSocketHandler->stopTimer(*handle);
}
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("DBusWrapper::toggleTimeoutDelegate was called"));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("DBusWrapper::toggleTimeoutDelegate was called"));
}
void DBusWrapper::dbusTimerCallback(sh_timerHandle_t handle, void *userData)
@@ -456,7 +456,7 @@ void DBusWrapper::dbusTimerCallback(sh_timerHandle_t handle, void *userData)
mSocketHandler->restartTimer(handle,ts);
}
dbus_timeout_handle((DBusTimeout*)userData);
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("DBusWrapper::dbusTimerCallback was called"));
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("DBusWrapper::dbusTimerCallback was called"));
}
diff --git a/AudioManagerDaemon/src/DatabaseHandler.cpp b/AudioManagerDaemon/src/DatabaseHandler.cpp
index bb193d3..021868c 100644
--- a/AudioManagerDaemon/src/DatabaseHandler.cpp
+++ b/AudioManagerDaemon/src/DatabaseHandler.cpp
@@ -43,7 +43,7 @@
#define MAIN_TABLE "MainTable"
#define SYSTEM_TABLE "SystemProperties"
-DLT_IMPORT_CONTEXT(DLT_CONTEXT)
+DLT_IMPORT_CONTEXT(AudioManager)
using namespace am;
@@ -93,13 +93,13 @@ DatabaseHandler::DatabaseHandler(std::string databasePath)
if (infile)
{
remove(mPath.c_str());
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::DatabaseHandler Knocked down database"));
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::DatabaseHandler Knocked down database"));
}
bool dbOpen=openDatabase();
if (!dbOpen)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::DatabaseHandler problems opening the database!"));
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::DatabaseHandler problems opening the database!"));
assert(!dbOpen);
}
@@ -110,7 +110,7 @@ DatabaseHandler::DatabaseHandler(std::string databasePath)
DatabaseHandler::~DatabaseHandler()
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("Closed Database"));
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("Closed Database"));
sqlite3_close(mDatabase);
}
@@ -138,13 +138,13 @@ am_Error_e DatabaseHandler::enterDomainDB(const am_Domain_s & domainData, am_dom
}
else
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterDomainDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterDomainDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterDomainDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -159,18 +159,18 @@ am_Error_e DatabaseHandler::enterDomainDB(const am_Domain_s & domainData, am_dom
if((eCode=sqlite3_step(queryFinal))!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterDomainDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterDomainDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterDomainDB entered new domain with name"), DLT_STRING(domainData.name.c_str()),
+ DLT_LOG(AudioManager, 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),
@@ -204,14 +204,14 @@ am_Error_e DatabaseHandler::enterMainConnectionDB(const am_MainConnection_s & ma
if((eCode=sqlite3_step(query))!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterMainConnectionDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterMainConnectionDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterMainConnectionDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -238,7 +238,7 @@ am_Error_e DatabaseHandler::enterMainConnectionDB(const am_MainConnection_s & ma
}
else
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterMainConnectionDB did not find route for MainConnection:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterMainConnectionDB did not find route for MainConnection:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
sqlite3_reset(query);
@@ -246,7 +246,7 @@ am_Error_e DatabaseHandler::enterMainConnectionDB(const am_MainConnection_s & ma
if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterMainConnectionDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterMainConnectionDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -262,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterMainConnectionDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterMainConnectionDB SQLITE Step error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
sqlite3_reset(query);
@@ -270,11 +270,11 @@ am_Error_e DatabaseHandler::enterMainConnectionDB(const am_MainConnection_s & ma
if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterMainConnectionDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterMainConnectionDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterMainConnectionDB entered new mainConnection with sourceID"), DLT_INT(mainConnectionData.route.sourceID),
+ DLT_LOG(AudioManager, 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));
@@ -332,14 +332,14 @@ am_Error_e DatabaseHandler::enterSinkDB(const am_Sink_s & sinkData, am_sinkID_t
}
else
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -370,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -392,7 +392,7 @@ am_Error_e DatabaseHandler::enterSinkDB(const am_Sink_s & sinkData, am_sinkID_t
else
{
sinkID=0;
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSink database error!:"), DLT_INT(eCode))
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSink database error!:"), DLT_INT(eCode))
sqlite3_finalize(query);
return E_DATABASE_ERROR;
}
@@ -415,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Step error code:"),DLT_INT(eCode));
sqlite3_finalize(query);
return E_DATABASE_ERROR;
}
@@ -432,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Step error code:"),DLT_INT(eCode));
sqlite3_finalize(query);
return E_DATABASE_ERROR;
}
@@ -449,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterSinkDB entered new sink with name"), DLT_STRING(sinkData.name.c_str()),
+ DLT_LOG(AudioManager, 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),
@@ -538,13 +538,13 @@ am_Error_e DatabaseHandler::enterGatewayDB(const am_Gateway_s & gatewayData, am_
if((eCode=sqlite3_step(query))!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterGatewayDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterGatewayDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterGatewayDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -567,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterGatewayDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterGatewayDB SQLITE Step error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
sqlite3_reset(query);
@@ -581,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterGatewayDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterGatewayDB SQLITE Step error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
sqlite3_reset(query);
}
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterGatewayDB entered new gateway with name"), DLT_STRING(gatewayData.name.c_str()),
+ DLT_LOG(AudioManager, 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),
@@ -644,14 +644,14 @@ am_Error_e DatabaseHandler::enterSourceDB(const am_Source_s & sourceData, am_sou
}
else
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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);
@@ -681,14 +681,14 @@ am_Error_e DatabaseHandler::enterSourceDB(const am_Source_s & sourceData, am_sou
if((eCode=sqlite3_step(queryFinal))!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceDB SQLITE Finalize error code:"),DLT_INT(eCode));
sqlite3_finalize(queryFinal);
return E_DATABASE_ERROR;
}
@@ -704,7 +704,7 @@ am_Error_e DatabaseHandler::enterSourceDB(const am_Source_s & sourceData, am_sou
else
{
sourceID=0;
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSink database error!:"), DLT_INT(eCode))
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSink database error!:"), DLT_INT(eCode))
sqlite3_finalize(query);
return E_DATABASE_ERROR;
}
@@ -728,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceDB SQLITE Step error code:"),DLT_INT(eCode));
sqlite3_finalize(query);
return E_DATABASE_ERROR;
}
@@ -745,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceDB SQLITE Step error code:"),DLT_INT(eCode));
sqlite3_finalize(query);
return E_DATABASE_ERROR;
}
@@ -762,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterSinkDB entered new source with name"), DLT_STRING(sourceData.name.c_str()),
+ DLT_LOG(AudioManager, 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),
@@ -818,7 +818,7 @@ am_Error_e DatabaseHandler::changeMainConnectionRouteDB(const am_mainConnectionI
}
else
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainConnectionRouteDB did not find route for MainConnection:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainConnectionRouteDB did not find route for MainConnection:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
sqlite3_reset(query);
@@ -826,7 +826,7 @@ am_Error_e DatabaseHandler::changeMainConnectionRouteDB(const am_mainConnectionI
if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainConnectionRouteDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainConnectionRouteDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -842,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainConnectionRouteDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainConnectionRouteDB SQLITE Step error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
sqlite3_reset(query);
@@ -850,10 +850,10 @@ am_Error_e DatabaseHandler::changeMainConnectionRouteDB(const am_mainConnectionI
if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainConnectionRouteDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainConnectionRouteDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeMainConnectionRouteDB entered new route:"),DLT_INT(mainconnectionID));
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeMainConnectionRouteDB entered new route:"),DLT_INT(mainconnectionID));
return E_OK;
}
@@ -874,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainConnectionStateDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainConnectionStateDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainConnectionStateDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeMainConnectionStateDB changed mainConnectionState of MainConnection:"),DLT_INT(mainconnectionID),DLT_STRING("to:"),DLT_INT(connectionState));
+ DLT_LOG(AudioManager, 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;
@@ -907,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkMainVolumeDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkMainVolumeDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkMainVolumeDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeSinkMainVolumeDB changed mainVolume of sink:"),DLT_INT(sinkID),DLT_STRING("to:"),DLT_INT(mainVolume));
+ DLT_LOG(AudioManager, 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);
@@ -943,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkAvailabilityDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkAvailabilityDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkAvailabilityDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
- 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));
+ 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));
if (mDatabaseObserver && sourceVisible(sinkID)) mDatabaseObserver->sinkAvailabilityChanged(sinkID,availability);
return E_OK;
@@ -978,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changDomainStateDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changDomainStateDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changDomainStateDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changDomainStateDB changed domainState of domain:"),DLT_INT(domainID),DLT_STRING("to:"),DLT_INT(domainState));
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changDomainStateDB changed domainState of domain:"),DLT_INT(domainID),DLT_STRING("to:"),DLT_INT(domainState));
return E_OK;
}
@@ -1011,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkMuteStateDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkMuteStateDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkMuteStateDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeSinkMuteStateDB changed sinkMuteState of sink:"),DLT_INT(sinkID),DLT_STRING("to:"),DLT_INT(muteState));
+ DLT_LOG(AudioManager, 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);
@@ -1048,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainSinkSoundPropertyDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainSinkSoundPropertyDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainSinkSoundPropertyDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
- 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));
+ 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));
if (mDatabaseObserver) mDatabaseObserver->mainSinkSoundPropertyChanged(sinkID,soundProperty);
return E_OK;
}
@@ -1083,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainSourceSoundPropertyDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainSourceSoundPropertyDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeMainSourceSoundPropertyDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
- 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));
+ 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));
if(mDatabaseObserver) mDatabaseObserver->mainSourceSoundPropertyChanged(sourceID,soundProperty);
return E_OK;
@@ -1119,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSourceAvailabilityDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSourceAvailabilityDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSourceAvailabilityDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
- 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));
+ 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));
if (mDatabaseObserver && sourceVisible(sourceID)) mDatabaseObserver->sourceAvailabilityChanged(sourceID,availability);
return E_OK;
@@ -1149,18 +1149,18 @@ am_Error_e DatabaseHandler::changeSystemPropertyDB(const am_SystemProperty_s & p
if((eCode=sqlite3_step(query))!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSystemPropertyDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSystemPropertyDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSystemPropertyDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeSystemPropertyDB changed system property"));
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeSystemPropertyDB changed system property"));
if(mDatabaseObserver) mDatabaseObserver->systemPropertyChanged(property);
@@ -1181,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(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeMainConnectionDB removed:"),DLT_INT(mainConnectionID));
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeMainConnectionDB removed:"),DLT_INT(mainConnectionID));
if (mDatabaseObserver) {
mDatabaseObserver->mainConnectionStateChanged(mainConnectionID,CS_DISCONNECTED);
mDatabaseObserver->numberOfMainConnectionsChanged();
@@ -1207,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(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeSinkDB removed:"),DLT_INT(sinkID));
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeSinkDB removed:"),DLT_INT(sinkID));
if (mDatabaseObserver!=NULL) mDatabaseObserver->removedSink(sinkID);
@@ -1232,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(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeSourceDB removed:"),DLT_INT(sourceID));
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeSourceDB removed:"),DLT_INT(sourceID));
if(mDatabaseObserver) mDatabaseObserver->removedSource(sourceID);
return E_OK;
}
@@ -1249,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(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeGatewayDB removed:"),DLT_INT(gatewayID));
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeGatewayDB removed:"),DLT_INT(gatewayID));
if(mDatabaseObserver) mDatabaseObserver->removeGateway(gatewayID);
return E_OK;
}
@@ -1275,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(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeDomainDB removed:"),DLT_INT(domainID));
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeDomainDB removed:"),DLT_INT(domainID));
if(mDatabaseObserver) mDatabaseObserver->removeDomain(domainID);
return E_OK;
}
@@ -1293,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(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeSinkClassDB removed:"),DLT_INT(sinkClassID));
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeSinkClassDB removed:"),DLT_INT(sinkClassID));
if (mDatabaseObserver) mDatabaseObserver->numberOfSinkClassesChanged();
return E_OK;
@@ -1311,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(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeSourceClassDB removed:"),DLT_INT(sourceClassID));
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeSourceClassDB removed:"),DLT_INT(sourceClassID));
if (mDatabaseObserver) mDatabaseObserver->numberOfSourceClassesChanged();
return E_OK;
@@ -1325,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(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeConnection removed:"),DLT_INT(connectionID));
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::removeConnection removed:"),DLT_INT(connectionID));
return E_OK;
}
@@ -1352,13 +1352,13 @@ am_Error_e DatabaseHandler::getSourceClassInfoDB(const am_sourceID_t sourceID, a
if((eCode=sqlite3_step(query))!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSourceClassInfoDB SQLITE error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSourceClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSourceClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -1372,13 +1372,13 @@ am_Error_e DatabaseHandler::getSourceClassInfoDB(const am_sourceID_t sourceID, a
if((eCode=sqlite3_step(query))!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSourceClassInfoDB SQLITE error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSourceClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSourceClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -1394,13 +1394,13 @@ am_Error_e DatabaseHandler::getSourceClassInfoDB(const am_sourceID_t sourceID, a
if(eCode!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSourceClassInfoDB SQLITE error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSourceClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSourceClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
return E_OK;
@@ -1430,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::setSinkClassInfoDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::setSinkClassInfoDB SQLITE Step error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
sqlite3_reset(query);
@@ -1438,11 +1438,11 @@ am_Error_e DatabaseHandler::changeSinkClassInfoDB(const am_SinkClass_s& sinkClas
if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::setSinkClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::setSinkClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::setSinkClassInfoDB set setSinkClassInfo"));
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::setSinkClassInfoDB set setSinkClassInfo"));
return E_OK;
}
@@ -1470,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::setSinkClassInfoDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::setSinkClassInfoDB SQLITE Step error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
sqlite3_reset(query);
@@ -1478,11 +1478,11 @@ am_Error_e DatabaseHandler::changeSourceClassInfoDB(const am_SourceClass_s& sour
if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::setSinkClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::setSinkClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::setSinkClassInfoDB set setSinkClassInfo"));
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::setSinkClassInfoDB set setSinkClassInfo"));
return E_OK;
}
@@ -1509,13 +1509,13 @@ am_Error_e DatabaseHandler::getSinkClassInfoDB(const am_sinkID_t sinkID, am_Sink
if((eCode=sqlite3_step(query))!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkClassInfoDB SQLITE error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -1529,13 +1529,13 @@ am_Error_e DatabaseHandler::getSinkClassInfoDB(const am_sinkID_t sinkID, am_Sink
if((eCode=sqlite3_step(query))!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkClassInfoDB SQLITE error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -1551,13 +1551,13 @@ am_Error_e DatabaseHandler::getSinkClassInfoDB(const am_sinkID_t sinkID, am_Sink
if(eCode!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkClassInfoDB SQLITE error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkClassInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
return E_OK;
@@ -1593,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getGatewayInfoDB database error with convertionFormat"));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getGatewayInfoDB database error with convertionFormat"));
return E_DATABASE_ERROR;
}
gatewayData.convertionMatrix=iter->second;
@@ -1609,7 +1609,7 @@ am_Error_e DatabaseHandler::getGatewayInfoDB(const am_gatewayID_t gatewayID, am_
if((eCode=sqlite3_finalize(qSourceConnectionFormat))!=SQLITE_OK)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getGatewayInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getGatewayInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -1624,7 +1624,7 @@ am_Error_e DatabaseHandler::getGatewayInfoDB(const am_gatewayID_t gatewayID, am_
if((eCode=sqlite3_finalize(qSinkConnectionFormat))!=SQLITE_OK)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getGatewayInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getGatewayInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -1632,13 +1632,13 @@ am_Error_e DatabaseHandler::getGatewayInfoDB(const am_gatewayID_t gatewayID, am_
if(eCode!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getGatewayInfoDB SQLITE error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getGatewayInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getGatewayInfoDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -1680,13 +1680,13 @@ am_Error_e DatabaseHandler::getListSinksOfDomain(const am_domainID_t domainID, s
if(eCode!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinksOfDomain SQLITE error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinksOfDomain SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinksOfDomain SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -1718,13 +1718,13 @@ am_Error_e DatabaseHandler::getListSourcesOfDomain(const am_domainID_t domainID,
if(eCode!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourcesOfDomain SQLITE error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourcesOfDomain SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourcesOfDomain SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -1767,13 +1767,13 @@ am_Error_e DatabaseHandler::getListGatewaysOfDomain(const am_domainID_t domainID
if(eCode!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGatewaysOfDomain SQLITE error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGatewaysOfDomain SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGatewaysOfDomain SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -1824,13 +1824,13 @@ am_Error_e DatabaseHandler::getListMainConnections(std::vector<am_MainConnection
if(eCode!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListMainConnections SQLITE error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListMainConnections SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListMainConnections SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -1862,13 +1862,13 @@ am_Error_e DatabaseHandler::getListDomains(std::vector<am_Domain_s> & listDomain
if(eCode!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListDomains SQLITE error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListDomains SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListDomains SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -1898,13 +1898,13 @@ am_Error_e DatabaseHandler::getListConnections(std::vector<am_Connection_s> & li
if(eCode!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListConnections SQLITE error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListConnections SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListConnections SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -1949,7 +1949,7 @@ am_Error_e DatabaseHandler::getListSinks(std::vector<am_Sink_s> & listSinks) con
if((eCode=sqlite3_finalize(qConnectionFormat))!=SQLITE_OK)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -1965,7 +1965,7 @@ am_Error_e DatabaseHandler::getListSinks(std::vector<am_Sink_s> & listSinks) con
if((eCode=sqlite3_finalize(qSoundProperty))!=SQLITE_OK)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -1981,7 +1981,7 @@ am_Error_e DatabaseHandler::getListSinks(std::vector<am_Sink_s> & listSinks) con
if((eCode=sqlite3_finalize(qMAinSoundProperty))!=SQLITE_OK)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
listSinks.push_back(temp);
@@ -1992,13 +1992,13 @@ am_Error_e DatabaseHandler::getListSinks(std::vector<am_Sink_s> & listSinks) con
if(eCode!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -2043,7 +2043,7 @@ am_Error_e DatabaseHandler::getListSources(std::vector<am_Source_s> & listSource
if((eCode=sqlite3_finalize(qConnectionFormat))!=SQLITE_OK)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -2059,7 +2059,7 @@ am_Error_e DatabaseHandler::getListSources(std::vector<am_Source_s> & listSource
if((eCode=sqlite3_finalize(qSoundProperty))!=SQLITE_OK)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -2075,7 +2075,7 @@ am_Error_e DatabaseHandler::getListSources(std::vector<am_Source_s> & listSource
if((eCode=sqlite3_finalize(qMAinSoundProperty))!=SQLITE_OK)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
listSources.push_back(temp);
@@ -2086,13 +2086,13 @@ am_Error_e DatabaseHandler::getListSources(std::vector<am_Source_s> & listSource
if(eCode!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -2132,13 +2132,13 @@ am_Error_e DatabaseHandler::getListSourceClasses(std::vector<am_SourceClass_s> &
if(eCode1!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE error code:"),DLT_INT(eCode1));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE Finalize error code:"),DLT_INT(eCode1));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE Finalize error code:"),DLT_INT(eCode1));
return E_DATABASE_ERROR;
}
listSourceClasses.push_back(classTemp);
@@ -2146,13 +2146,13 @@ am_Error_e DatabaseHandler::getListSourceClasses(std::vector<am_SourceClass_s> &
if(eCode!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -2196,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGateways database error with convertionFormat"));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGateways database error with convertionFormat"));
return E_DATABASE_ERROR;
}
temp.convertionMatrix=iter->second;
@@ -2212,7 +2212,7 @@ am_Error_e DatabaseHandler::getListGateways(std::vector<am_Gateway_s> & listGate
if((eCode=sqlite3_finalize(qSourceConnectionFormat))!=SQLITE_OK)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGateways SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGateways SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -2227,7 +2227,7 @@ am_Error_e DatabaseHandler::getListGateways(std::vector<am_Gateway_s> & listGate
if((eCode=sqlite3_finalize(qSinkConnectionFormat))!=SQLITE_OK)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGateways SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGateways SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -2238,13 +2238,13 @@ am_Error_e DatabaseHandler::getListGateways(std::vector<am_Gateway_s> & listGate
if(eCode!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGateways SQLITE error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGateways SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListGateways SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -2284,13 +2284,13 @@ am_Error_e DatabaseHandler::getListSinkClasses(std::vector<am_SinkClass_s> & lis
if(eCode!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
listSinkClasses.push_back(classTemp);
@@ -2298,13 +2298,13 @@ am_Error_e DatabaseHandler::getListSinkClasses(std::vector<am_SinkClass_s> & lis
if(eCode!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSourceClasses SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -2335,13 +2335,13 @@ am_Error_e DatabaseHandler::getListVisibleMainConnections(std::vector<am_MainCon
if(eCode!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListVisibleMainConnections SQLITE error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListVisibleMainConnections SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListVisibleMainConnections SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -2374,13 +2374,13 @@ am_Error_e DatabaseHandler::getListMainSinks(std::vector<am_SinkType_s> & listMa
if(eCode!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSinks SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -2411,13 +2411,13 @@ am_Error_e DatabaseHandler::getListMainSources(std::vector<am_SourceType_s> & li
if(eCode!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSources SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -2447,13 +2447,13 @@ am_Error_e DatabaseHandler::getListMainSinkSoundProperties(const am_sinkID_t sin
if(eCode!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListMainSinkSoundProperties SQLITE error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListMainSinkSoundProperties SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListMainSinkSoundProperties SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -2483,13 +2483,13 @@ am_Error_e DatabaseHandler::getListMainSourceSoundProperties(const am_sourceID_t
if(eCode!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListMainSinkSoundProperties SQLITE error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListMainSinkSoundProperties SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListMainSinkSoundProperties SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -2517,13 +2517,13 @@ am_Error_e DatabaseHandler::getListSystemProperties(std::vector<am_SystemPropert
if(eCode!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSystemProperties SQLITE error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSystemProperties SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getListSystemProperties SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -2549,13 +2549,13 @@ am_Error_e DatabaseHandler::getTimingInformation(const am_mainConnectionID_t mai
if(eCode!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getTimingInformation SQLITE error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getTimingInformation SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getTimingInformation SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -2570,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::sqQuery SQL Query failed:"), DLT_STRING(query.c_str()), DLT_STRING("error code:"),DLT_INT(eCode));
+ 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));
return false;
}
return true;
@@ -2580,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(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::openDatabase opened database"));
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::openDatabase opened database"));
return true;
}
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::openDatabase failed to open database"));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::openDatabase failed to open database"));
return false;
}
@@ -2609,13 +2609,13 @@ am_Error_e DatabaseHandler::changeDelayMainConnection(const am_timeSync_t & dela
if((eCode=sqlite3_step(query))!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeDelayMainConnection SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeDelayMainConnection SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeDelayMainConnection SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -2644,19 +2644,19 @@ am_Error_e DatabaseHandler::enterConnectionDB(const am_Connection_s& connection,
if((eCode=sqlite3_step(query))!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterConnectionDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterConnectionDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterConnectionDB entered new connection sourceID:"), DLT_INT16(connection.sourceID),
+ DLT_LOG(AudioManager, 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),
@@ -2705,13 +2705,13 @@ am_Error_e DatabaseHandler::enterSinkClassDB(const am_SinkClass_s & sinkClass, a
if((eCode=sqlite3_step(query))!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkClassDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkClassDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkClassDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -2731,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkClassDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkClassDB SQLITE Step error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
sqlite3_reset(query);
@@ -2739,11 +2739,11 @@ am_Error_e DatabaseHandler::enterSinkClassDB(const am_SinkClass_s & sinkClass, a
if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkClassDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSinkClassDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterSinkClassDB entered new sinkClass"));
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterSinkClassDB entered new sinkClass"));
if (mDatabaseObserver) mDatabaseObserver->numberOfSinkClassesChanged();
return E_OK;
}
@@ -2788,13 +2788,13 @@ am_Error_e DatabaseHandler::enterSourceClassDB(am_sourceClass_t & sourceClassID,
if((eCode=sqlite3_step(query))!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceClassDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceClassDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceClassDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -2814,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceClassDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceClassDB SQLITE Step error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
sqlite3_reset(query);
@@ -2822,11 +2822,11 @@ am_Error_e DatabaseHandler::enterSourceClassDB(am_sourceClass_t & sourceClassID,
if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceClassDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSourceClassDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterSourceClassDB entered new sourceClass"));
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterSourceClassDB entered new sourceClass"));
if (mDatabaseObserver) mDatabaseObserver->numberOfSourceClassesChanged();
return E_OK;
@@ -2850,7 +2850,7 @@ am_Error_e DatabaseHandler::enterSystemProperties(const std::vector<am_SystemPro
if((eCode=sqlite3_step(query))!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSystemProperties SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSystemProperties SQLITE Step error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -2859,11 +2859,11 @@ am_Error_e DatabaseHandler::enterSystemProperties(const std::vector<am_SystemPro
if((eCode=sqlite3_finalize(query))!=SQLITE_OK)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSystemProperties SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::enterSystemProperties SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterSystemProperties entered system properties"));
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::enterSystemProperties entered system properties"));
return E_OK;
}
@@ -2878,7 +2878,7 @@ bool DatabaseHandler::existMainConnection(const am_mainConnectionID_t mainConnec
else if (eCode!=SQLITE_ROW)
{
returnVal=false;
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existMainConnection database error!:"), DLT_INT(eCode))
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existMainConnection database error!:"), DLT_INT(eCode))
}
sqlite3_finalize(query);
return returnVal;
@@ -2895,7 +2895,7 @@ bool DatabaseHandler::existSource(const am_sourceID_t sourceID) const
else if (eCode!=SQLITE_ROW)
{
returnVal=false;
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSource database error!:"), DLT_INT(eCode))
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSource database error!:"), DLT_INT(eCode))
}
sqlite3_finalize(query);
return returnVal;
@@ -2914,7 +2914,7 @@ bool DatabaseHandler::existSourceNameOrID(const am_sourceID_t sourceID, const st
else if (eCode!=SQLITE_ROW)
{
returnVal=false;
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSource database error!:"), DLT_INT(eCode))
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSource database error!:"), DLT_INT(eCode))
}
sqlite3_finalize(query);
return returnVal;
@@ -2932,7 +2932,7 @@ bool DatabaseHandler::existSourceName(const std::string & name) const
else if (eCode!=SQLITE_ROW)
{
returnVal=false;
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSource database error!:"), DLT_INT(eCode))
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSource database error!:"), DLT_INT(eCode))
}
sqlite3_finalize(query);
return returnVal;
@@ -2949,7 +2949,7 @@ bool DatabaseHandler::existSink(const am_sinkID_t sinkID) const
else if (eCode!=SQLITE_ROW)
{
returnVal=false;
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSink database error!:"), DLT_INT(eCode))
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSink database error!:"), DLT_INT(eCode))
}
sqlite3_finalize(query);
return returnVal;
@@ -2968,7 +2968,7 @@ bool DatabaseHandler::existSinkNameOrID(const am_sinkID_t sinkID, const std::str
else if (eCode!=SQLITE_ROW)
{
returnVal=false;
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSink database error!:"), DLT_INT(eCode))
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSink database error!:"), DLT_INT(eCode))
}
sqlite3_finalize(query);
return returnVal;
@@ -2986,7 +2986,7 @@ bool DatabaseHandler::existSinkName(const std::string & name) const
else if (eCode!=SQLITE_ROW)
{
returnVal=false;
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSink database error!:"), DLT_INT(eCode))
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSink database error!:"), DLT_INT(eCode))
}
sqlite3_finalize(query);
return returnVal;
@@ -3003,7 +3003,7 @@ bool DatabaseHandler::existDomain(const am_domainID_t domainID) const
else if (eCode!=SQLITE_ROW)
{
returnVal=false;
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existDomain database error!:"), DLT_INT(eCode))
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existDomain database error!:"), DLT_INT(eCode))
}
sqlite3_finalize(query);
return returnVal;
@@ -3020,7 +3020,7 @@ bool DatabaseHandler::existGateway(const am_gatewayID_t gatewayID) const
else if (eCode!=SQLITE_ROW)
{
returnVal=false;
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existGateway database error!:"), DLT_INT(eCode))
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existGateway database error!:"), DLT_INT(eCode))
}
sqlite3_finalize(query);
return returnVal;
@@ -3042,7 +3042,7 @@ am_Error_e DatabaseHandler::getDomainOfSource(const am_sourceID_t sourceID, am_d
}
else
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getDomainOfSource database error!:"), DLT_INT(eCode))
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getDomainOfSource database error!:"), DLT_INT(eCode))
}
sqlite3_finalize(query);
return returnVal;
@@ -3060,7 +3060,7 @@ bool DatabaseHandler::existSinkClass(const am_sinkClass_t sinkClassID) const
else if (eCode!=SQLITE_ROW)
{
returnVal=false;
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSinkClass database error!:"), DLT_INT(eCode))
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSinkClass database error!:"), DLT_INT(eCode))
}
sqlite3_finalize(query);
return returnVal;
@@ -3077,7 +3077,7 @@ bool DatabaseHandler::existSourceClass(const am_sourceClass_t sourceClassID) con
else if (eCode!=SQLITE_ROW)
{
returnVal=false;
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSinkClass database error!:"), DLT_INT(eCode))
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existSinkClass database error!:"), DLT_INT(eCode))
}
sqlite3_finalize(query);
return returnVal;
@@ -3097,13 +3097,13 @@ am_Error_e DatabaseHandler::changeConnectionTimingInformation(const am_connectio
if((eCode=sqlite3_step(query))!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeConnectionTimingInformation SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeConnectionTimingInformation SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeConnectionTimingInformation SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -3130,20 +3130,20 @@ am_Error_e DatabaseHandler::changeConnectionTimingInformation(const am_connectio
}
else if(eCode1!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeConnectionTimingInformation SQLITE error code:"),DLT_INT(eCode1));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeConnectionTimingInformation SQLITE error code:"),DLT_INT(eCode1));
return E_DATABASE_ERROR;
}
}
if(eCode!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeConnectionTimingInformation SQLITE error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeConnectionTimingInformation SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeConnectionTimingInformation SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -3163,13 +3163,13 @@ am_Error_e DatabaseHandler::changeConnectionFinal(const am_connectionID_t connec
if((eCode=sqlite3_step(query))!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeConnectionFinal SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeConnectionFinal SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeConnectionFinal SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
return E_OK;
@@ -3191,13 +3191,13 @@ am_timeSync_t DatabaseHandler::calculateMainConnectionDelay(const am_mainConnect
}
if((eCode=sqlite3_step(query))!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::calculateMainConnectionDelay SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::calculateMainConnectionDelay SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::calculateMainConnectionDelay SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
if (min<0) delay=-1;
@@ -3226,7 +3226,7 @@ bool DatabaseHandler::sourceVisible(const am_sourceID_t sourceID) const
else if (eCode!=SQLITE_ROW)
{
returnVal=false;
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::sourceVisible database error!:"), DLT_INT(eCode))
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::sourceVisible database error!:"), DLT_INT(eCode))
}
sqlite3_finalize(query);
return returnVal;
@@ -3246,7 +3246,7 @@ bool DatabaseHandler::sinkVisible(const am_sinkID_t sinkID) const
else if (eCode!=SQLITE_ROW)
{
returnVal=false;
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::sinkVisible database error!:"), DLT_INT(eCode))
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::sinkVisible database error!:"), DLT_INT(eCode))
}
sqlite3_finalize(query);
return returnVal;
@@ -3266,7 +3266,7 @@ bool DatabaseHandler::existConnection(const am_Connection_s connection)
else if (eCode!=SQLITE_ROW)
{
returnVal=false;
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existMainConnection database error!:"), DLT_INT(eCode))
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existMainConnection database error!:"), DLT_INT(eCode))
}
sqlite3_finalize(query);
return returnVal;
@@ -3285,7 +3285,7 @@ bool DatabaseHandler::existConnectionID(const am_connectionID_t connectionID)
else if (eCode!=SQLITE_ROW)
{
returnVal=false;
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existMainConnection database error!:"), DLT_INT(eCode))
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existMainConnection database error!:"), DLT_INT(eCode))
}
sqlite3_finalize(query);
return returnVal;
@@ -3303,7 +3303,7 @@ bool DatabaseHandler::existcrossFader(const am_crossfaderID_t crossfaderID) cons
else if (eCode!=SQLITE_ROW)
{
returnVal=false;
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existMainConnection database error!:"), DLT_INT(eCode))
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::existMainConnection database error!:"), DLT_INT(eCode))
}
sqlite3_finalize(query);
return returnVal;
@@ -3323,7 +3323,7 @@ am_Error_e DatabaseHandler::getSoureState(const am_sourceID_t sourceID, am_Sourc
}
else if ((eCode=sqlite3_step(query))==SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSoureState database error!:"), DLT_INT(eCode))
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSoureState database error!:"), DLT_INT(eCode))
}
sqlite3_finalize(query);
@@ -3340,13 +3340,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSourceState SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSourceState SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSourceState SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
return E_OK;
@@ -3366,7 +3366,7 @@ am_Error_e DatabaseHandler::getSinkVolume(const am_sinkID_t sinkID, am_volume_t
}
else if ((eCode=sqlite3_step(query))==SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkVolume database error!:"), DLT_INT(eCode))
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkVolume database error!:"), DLT_INT(eCode))
}
sqlite3_finalize(query);
@@ -3387,7 +3387,7 @@ am_Error_e DatabaseHandler::getSourceVolume(const am_sourceID_t sourceID, am_vol
}
else if ((eCode=sqlite3_step(query))==SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSourceVolume database error!:"), DLT_INT(eCode))
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSourceVolume database error!:"), DLT_INT(eCode))
}
sqlite3_finalize(query);
return E_OK;
@@ -3411,13 +3411,13 @@ am_Error_e DatabaseHandler::getSinkSoundPropertyValue(const am_sinkID_t sinkID,
if(eCode!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkSoundPropertyValue SQLITE error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkSoundPropertyValue SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkSoundPropertyValue SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -3441,13 +3441,13 @@ am_Error_e DatabaseHandler::getSourceSoundPropertyValue(const am_sourceID_t sour
if(eCode!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkSoundPropertyValue SQLITE error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkSoundPropertyValue SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getSinkSoundPropertyValue SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
@@ -3468,7 +3468,7 @@ am_Error_e DatabaseHandler::getDomainState(const am_domainID_t domainID, am_Doma
}
else if ((eCode=sqlite3_step(query))==SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getDomainState database error!:"), DLT_INT(eCode))
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::getDomainState database error!:"), DLT_INT(eCode))
}
sqlite3_finalize(query);
@@ -3489,7 +3489,7 @@ am_Error_e DatabaseHandler::peekDomain(const std::string & name, am_domainID_t &
}
else if (eCode!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekDomain database error!:"), DLT_INT(eCode))
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekDomain database error!:"), DLT_INT(eCode))
return E_DATABASE_ERROR;
}
else
@@ -3500,13 +3500,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekDomain SQLITE Step error code:"),DLT_INT(eCode1));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekDomain SQLITE Finalize error code:"),DLT_INT(eCode1));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekDomain SQLITE Finalize error code:"),DLT_INT(eCode1));
return E_DATABASE_ERROR;
}
domainID=sqlite3_last_insert_rowid(mDatabase);
@@ -3528,7 +3528,7 @@ am_Error_e DatabaseHandler::peekSink(const std::string & name, am_sinkID_t & sin
}
else if (eCode!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekSink database error!:"), DLT_INT(eCode))
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekSink database error!:"), DLT_INT(eCode))
return E_DATABASE_ERROR;
}
else
@@ -3547,13 +3547,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekSink SQLITE Step error code:"),DLT_INT(eCode1));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekDomain SQLITE Finalize error code:"),DLT_INT(eCode1));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekDomain SQLITE Finalize error code:"),DLT_INT(eCode1));
return E_DATABASE_ERROR;
}
sinkID=sqlite3_last_insert_rowid(mDatabase);
@@ -3577,7 +3577,7 @@ am_Error_e DatabaseHandler::peekSource(const std::string & name, am_sourceID_t &
}
else if (eCode!=SQLITE_DONE)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekSink database error!:"), DLT_INT(eCode))
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekSink database error!:"), DLT_INT(eCode))
return E_DATABASE_ERROR;
}
else
@@ -3596,13 +3596,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekSink SQLITE Step error code:"),DLT_INT(eCode1));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekDomain SQLITE Finalize error code:"),DLT_INT(eCode1));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::peekDomain SQLITE Finalize error code:"),DLT_INT(eCode1));
return E_DATABASE_ERROR;
}
sourceID=sqlite3_last_insert_rowid(mDatabase);
@@ -3628,16 +3628,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkVolume SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkVolume SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkVolume SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeSinkVolume changed volume of sink:"),DLT_INT(sinkID),DLT_STRING("to:"),DLT_INT(volume));
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeSinkVolume changed volume of sink:"),DLT_INT(sinkID),DLT_STRING("to:"),DLT_INT(volume));
return E_OK;
}
@@ -3659,16 +3659,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSourceVolume SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSourceVolume SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSourceVolume SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeSourceVolume changed volume of source=:"),DLT_INT(sourceID),DLT_STRING("to:"),DLT_INT(volume));
+ DLT_LOG(AudioManager, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeSourceVolume changed volume of source=:"),DLT_INT(sourceID),DLT_STRING("to:"),DLT_INT(volume));
return E_OK;
}
@@ -3691,17 +3691,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSourceSoundPropertyDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSourceSoundPropertyDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSourceSoundPropertyDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
- 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));
+ 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));
return E_OK;
}
@@ -3724,17 +3724,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkSoundPropertyDB SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkSoundPropertyDB SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeSinkSoundPropertyDB SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
- 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));
+ 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));
return E_OK;
}
@@ -3756,16 +3756,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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeCrossFaderHotSink SQLITE Step error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, 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(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeCrossFaderHotSink SQLITE Finalize error code:"),DLT_INT(eCode));
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("DatabaseHandler::changeCrossFaderHotSink SQLITE Finalize error code:"),DLT_INT(eCode));
return E_DATABASE_ERROR;
}
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DatabaseHandler::changeCrossFaderHotSink changed hotsink of crossfader="),DLT_INT(crossfaderID),DLT_STRING("to:"),DLT_INT(hotsink));
+ DLT_LOG(AudioManager, 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/SocketHandler.cpp b/AudioManagerDaemon/src/SocketHandler.cpp
index 10e0f98..9c10743 100644
--- a/AudioManagerDaemon/src/SocketHandler.cpp
+++ b/AudioManagerDaemon/src/SocketHandler.cpp
@@ -23,6 +23,7 @@
*/
#include "SocketHandler.h"
+#include <config.h>
#include <assert.h>
#include <sys/fcntl.h>
#include <sys/errno.h>
@@ -30,14 +31,14 @@
#include <algorithm>
#include <time.h>
#include <features.h>
+#include <dlt/dlt.h>
+#include <signal.h>
-//todo: implement ppoll
-//todo: signal handling here
//todo: implement time correction if timer was interrupted by call
-#include <iostream> //todo remove
+DLT_IMPORT_CONTEXT(AudioManager)
-namespace am {
+using namespace am;
SocketHandler::SocketHandler()
:mListPoll(),
@@ -46,11 +47,12 @@ SocketHandler::SocketHandler()
mNextTimer(),
mLastInsertedHandle(0),
mLastInsertedPollHandle(0),
- mDispatch(true),
- mRecreatePollfds(true)
+ mRecreatePollfds(true),
+ mTimeout(),
+ mTimeoutPointer(NULL)
{
- mTimeout.tv_nsec=-1;
- mTimeout.tv_sec=-1;
+ mTimeout.tv_nsec=0;
+ mTimeout.tv_sec=0;
}
SocketHandler::~SocketHandler()
@@ -70,7 +72,16 @@ void SocketHandler::start_listenting()
//init the timer
initTimer();
- while (mDispatch)
+ //prepare the signalmask
+ sigset_t sigmask;
+ sigemptyset(&sigmask);
+ sigaddset(&sigmask, SIGINT);
+ sigaddset(&sigmask, SIGQUIT);
+ sigaddset(&sigmask, SIGTERM);
+ sigaddset(&sigmask, SIGHUP);
+ sigaddset(&sigmask, SIGQUIT);
+
+ while (!gDispatchDone)
{
//first we go through the registered filedescriptors and check if someone needs preparation:
mListPoll_t::iterator prepIter=mListPoll.begin();
@@ -89,11 +100,38 @@ void SocketHandler::start_listenting()
}
//block until something is on a filedescriptor
- if((pollStatus=poll(&mfdPollingArray.front(),mfdPollingArray.size(),timespec2ms(mTimeout)))==-1)
+#ifdef WITH_PPOLL
+ if((pollStatus=ppoll(&mfdPollingArray.front(),mfdPollingArray.size(),mTimeoutPointer,&sigmask))<0)
{
- //todo enter DLT message here;
+ if(errno==EINTR)
+ {
+ //a signal was received, that means it's time to go...
+ pollStatus=0;
+ }
+ else
+ {
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("SocketHandler::start_listenting ppoll returned with error"),DLT_INT(errno));
+ exit(0);
+ }
}
+#else
+ sigprocmask (SIG_SETMASK, &mask, &oldmask);
+ if((pollStatus=poll(&mfdPollingArray.front(),mfdPollingArray.size(),timespec2ms(mTimeout)))<0)
+ {
+
+ if(errno==EINTR)
+ {
+ //a signal was received, that means it's time to go...
+ //todo: add things to do here before going to sleep
+ exit(0);
+ }
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("SocketHandler::start_listenting poll returned with error"),DLT_INT(errno));
+ exit(0);
+ }
+ sigprocmask (SIG_SETMASK, &oldmask, NULL);
+#endif
+
if (pollStatus!=0) //only check filedescriptors if there was a change
{
//todo: here could be a timer that makes sure naughty plugins return!
@@ -165,7 +203,7 @@ void SocketHandler::start_listenting()
*/
void SocketHandler::stop_listening()
{
- mDispatch=false;
+ gDispatchDone=1;
}
/**
@@ -323,11 +361,13 @@ am_Error_e SocketHandler::stopTimer(const sh_timerHandle_t handle)
if (!mListActiveTimer.empty())
{
mTimeout=mListActiveTimer.front().countdown;
+ mTimeoutPointer=&mTimeout;
}
else
{
- mTimeout.tv_nsec=-1;
- mTimeout.tv_sec=-1;
+ mTimeout.tv_nsec=0;
+ mTimeout.tv_sec=0;
+ mTimeoutPointer=NULL;
}
return E_OK;
}
@@ -383,11 +423,13 @@ void SocketHandler::timerUp()
//substract the old value from all timers in the list
std::for_each(mListActiveTimer.begin(),mListActiveTimer.end(),SubstractTime(mTimeout));
mTimeout=mListActiveTimer.front().countdown;
+ mTimeoutPointer=&mTimeout;
}
else
{
- mTimeout.tv_nsec=-1;
- mTimeout.tv_sec=-1;
+ mTimeout.tv_nsec=0;
+ mTimeout.tv_sec=0;
+ mTimeoutPointer=NULL;
}
}
@@ -399,11 +441,13 @@ void SocketHandler::initTimer()
if(!mListActiveTimer.empty())
{
mTimeout=mListActiveTimer.front().countdown;
+ mTimeoutPointer=&mTimeout;
}
else
{
- mTimeout.tv_nsec=-1;
- mTimeout.tv_sec=-1;
+ mTimeout.tv_nsec=0;
+ mTimeout.tv_sec=0;
+ mTimeoutPointer=NULL;
}
}
@@ -415,7 +459,7 @@ void SocketHandler::initTimer()
*/
inline int SocketHandler::timespec2ms(const timespec & time)
{
- return (time.tv_nsec == -1 && time.tv_sec == -1) ? -1 : time.tv_sec * 1000 + time.tv_nsec / 1000000;
+ return (time.tv_nsec == 0 && time.tv_sec == 0) ? -1 : time.tv_sec * 1000 + time.tv_nsec / 1000000;
}
/**
@@ -441,6 +485,4 @@ void SocketHandler::CopyPollfd::operator ()(const sh_poll_s & row)
mArray.push_back(temp);
}
-/* namespace am */
-}
diff --git a/AudioManagerDaemon/src/main.cpp b/AudioManagerDaemon/src/main.cpp
index 74a412c..3360dfd 100644
--- a/AudioManagerDaemon/src/main.cpp
+++ b/AudioManagerDaemon/src/main.cpp
@@ -26,19 +26,16 @@
* Please make sure to have read the documentation on genivi.org!
*/
-//todo: add debug commandline option to allow to use other than memory database
//todo: make real daemon out of it- systemd conform
//todo: versioning of PluginInterfaces on linux level (.symver stuff)
//todo: all communication like all plugins loaded etc...
//todo: seperate documentation of test from normal project
//todo: check the startup sequence. Dbus shall be activated last...
//todo: there is a bug in the visible flags of sinks and sources. fix it.
-//todo: check namespace handling. no use.. in headers
//todo: make sure that iterators have a fixed end to prevent crashed while adding vectors while iterating on critical vectors
//todo: make sure all configurations are tested
#include <config.h>
-#include <SocketHandler.h>
#ifdef WITH_DBUS_WRAPPER
#include <dbus/DBusWrapper.h>
#endif
@@ -50,24 +47,173 @@
#include "ControlSender.h"
#include "CommandSender.h"
#include "RoutingSender.h"
+#include <SocketHandler.h>
+#include <sys/resource.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <cstdlib>
+#include <assert.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <string.h>
+#include <stdio.h>
+
+
#include <dlt/dlt.h>
-DLT_DECLARE_CONTEXT(DLT_CONTEXT)
+DLT_DECLARE_CONTEXT(AudioManager)
using namespace am;
+const char* USAGE_DESCRIPTION = "Usage:\tAudioManagerDaemon [options]\n"
+ "options:\t\n"
+ "\t-h: print this message\t\n"
+ "\t-v: print version\t\n"
+ "\t-d: daemonize AudioManager \t\n"
+ "\t-p: path for sqlite database (default is in memory)\t\n"
+ "\t-c: <Name> use controllerPlugin <Name> (full path with .so ending)\t\n"
+ "\t-l: <Name> replace command plugin directory with <Name> (full path)\t\n"
+ "\t-r: <Name> replace routing plugin directory with <Name> (full path)\t\n"
+ "\t-L: <Name> add command plugin directory with <Name> (full path)\t\n"
+ "\t-R: <Name> add routing plugin directory with <Name> (full path)\t\n";
+
+std::string controllerPlugin=std::string(CONTROLLER_PLUGIN);
+std::vector<std::string> listCommandPluginDirs;
+std::vector<std::string> listRoutingPluginDirs;
+std::string databasePath=std::string(":memory:");
+
+void daemonize ()
+{
+ umask(0);
+ std::string dir="/";
+
+ rlimit rl;
+ if (getrlimit(RLIMIT_NOFILE, &rl) < 0)
+ {
+ DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("can't get file limit "));
+ }
+
+ pid_t pid;
+ if ((pid = fork()) < 0)
+ {
+ DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("cannot fork!"));
+ }
+ else if (pid != 0)
+ {
+ exit(0);
+ }
+
+ setsid();
+
+ if (!dir.empty() && chdir(dir.c_str()) < 0)
+ {
+ DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("couldn't chdir to the new directory"));
+ }
+
+ if (rl.rlim_max == RLIM_INFINITY)
+ {
+ rl.rlim_max = 1024;
+ }
+
+
+ for (unsigned int i = 0; i < rl.rlim_max; i++)
+ {
+ close(i);
+ }
+
+ int fd0 = open("/dev/null", O_RDONLY);
+ int fd1 = open("/dev/null",O_WRONLY|O_CREAT|O_APPEND, S_IRUSR|S_IWUSR);
+ int fd2 = open("/dev/null", O_WRONLY|O_CREAT|O_APPEND, S_IRUSR|S_IWUSR);
+
+ if (fd0 != STDIN_FILENO || fd1 != STDOUT_FILENO || fd2 != STDERR_FILENO)
+ {
+ DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("new standard file descriptors were not opened"));
+ }
+}
+
+void parseCommandLine(int argc, char **argv)
+{
+ while (optind < argc)
+ {
+ int option = getopt (argc, argv, "h::v::c::l::r::L::R::d");
+
+ switch (option)
+ {
+ case 'p':
+ assert(!controllerPlugin.empty());
+ databasePath=std::string(optarg);
+ break;
+ case 'd':
+ daemonize();
+ break;
+ case 'l':
+ listCommandPluginDirs.clear();
+ listCommandPluginDirs.push_back(std::string(optarg));
+ break;
+ case 'r':
+ listRoutingPluginDirs.clear();
+ listRoutingPluginDirs.push_back(std::string(optarg));
+ break;
+ case 'L':
+ listCommandPluginDirs.push_back(std::string(optarg));
+ break;
+ case 'R':
+ listRoutingPluginDirs.push_back(std::string(optarg));
+ break;
+ case 'c':
+ controllerPlugin=std::string(optarg);
+ assert(!controllerPlugin.empty());
+ assert(controllerPlugin.find(".so")!=std::string::npos);
+ break;
+ case 'v':
+ printf("AudioManagerDaemon Version: %s\n",DAEMONVERSION);
+ exit(-1);
+ break;
+ case 'h':
+ default:
+ printf("AudioManagerDaemon Version: %s\n",DAEMONVERSION);
+ puts(USAGE_DESCRIPTION);
+ exit(-1);
+ }
+ }
+}
+
+static void signalHandler (int sig, siginfo_t *siginfo, void *context)
+{
+ DLT_LOG(AudioManager, DLT_LOG_ERROR, DLT_STRING("signal handler was called, exit now..."));
+ gDispatchDone=1;
+}
+
+
int main(int argc, char *argv[])
{
DLT_REGISTER_APP("AudioManagerDeamon","AudioManagerDeamon");
- DLT_REGISTER_CONTEXT(DLT_CONTEXT,"Main","Main Context");
- DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("The AudioManager is started "));
+ DLT_REGISTER_CONTEXT(AudioManager,"Main","Main Context");
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("The AudioManager is started, "), DLT_STRING(DAEMONVERSION));
+
+ listCommandPluginDirs.push_back(std::string(DEFAULT_PLUGIN_COMMAND_DIR));
+ listRoutingPluginDirs.push_back(std::string(DEFAULT_PLUGIN_ROUTING_DIR));
- std::vector<std::string> listCommandPluginDirs;
- listCommandPluginDirs.push_back(std::string(DEFAULT_PLUGIN_COMMAND_DIR)); //change this to be modified by the commandline!
+ //parse the commandline options
+ parseCommandLine(argc, (char**) argv);
+
+ //now the signal handler:
+ struct sigaction signalAction;
+ memset (&signalAction, '\0', sizeof(signalAction));
+ signalAction.sa_sigaction = &signalHandler;
+ signalAction.sa_flags = SA_SIGINFO;
+ sigaction(SIGINT, &signalAction, NULL);
+ sigaction(SIGQUIT, &signalAction, NULL);
+ sigaction(SIGTERM, &signalAction, NULL);
+ sigaction(SIGHUP, &signalAction, NULL);
+ sigaction(SIGQUIT, &signalAction, NULL);
+
+ struct sigaction signalChildAction;
+ memset (&signalAction, '\0', sizeof(signalChildAction));
+ signalChildAction.sa_flags = SA_NOCLDWAIT;
+ sigaction (SIGCHLD, &signalChildAction, NULL);
- std::vector<std::string> listRoutingPluginDirs;
- listRoutingPluginDirs.push_back(std::string(DEFAULT_PLUGIN_ROUTING_DIR)); //change this to be modified by the commandline!
//Instantiate all classes. Keep in same order !
#ifdef WITH_SOCKETHANDLER_LOOP
@@ -82,10 +228,10 @@ int main(int argc, char *argv[])
#endif /*WITH_SOCKETHANDLER_LOOP*/
#endif /*WITH_DBUS_WRAPPER */
- DatabaseHandler iDatabaseHandler(std::string(":memory:"));
+ DatabaseHandler iDatabaseHandler(databasePath);
RoutingSender iRoutingSender(listRoutingPluginDirs);
CommandSender iCommandSender(listCommandPluginDirs);
- ControlSender iControlSender(std::string(CONTROLLER_PLUGIN));
+ ControlSender iControlSender(controllerPlugin);
DatabaseObserver iObserver(&iCommandSender, &iRoutingSender);
#ifdef WITH_DBUS_WRAPPER
@@ -122,6 +268,8 @@ int main(int argc, char *argv[])
#endif/*WITH_SIMPLEDBUS_LOOP*/
#endif /*WITH_DBUS_WRAPPER*/
+exit(0);
+
}
diff --git a/AudioManagerDaemon/test/CMakeLists.txt b/AudioManagerDaemon/test/CMakeLists.txt
index f00ec41..7f8c054 100644
--- a/AudioManagerDaemon/test/CMakeLists.txt
+++ b/AudioManagerDaemon/test/CMakeLists.txt
@@ -18,4 +18,4 @@ FIND_PACKAGE(GTest REQUIRED)
add_subdirectory (database)
add_subdirectory (routingInterface)
add_subdirectory (controlInterface)
-add_subdirectory (sockethandler)
+#add_subdirectory (sockethandler)
diff --git a/AudioManagerDaemon/test/sockethandler/sockethandlerTest.cpp b/AudioManagerDaemon/test/sockethandler/sockethandlerTest.cpp
index 87b2751..4d6619e 100644
--- a/AudioManagerDaemon/test/sockethandler/sockethandlerTest.cpp
+++ b/AudioManagerDaemon/test/sockethandler/sockethandlerTest.cpp
@@ -14,12 +14,17 @@
#include <netdb.h>
#include <fcntl.h>
#include <sys/un.h>
+#include <dlt/dlt.h>
#define SOCK_PATH "/tmp/mysock"
using namespace testing;
using namespace am;
+DLT_DECLARE_CONTEXT(AudioManager)
+
+static volatile sig_atomic_t gDispatch = 1; //this global is used to stop the mainloop
+
sockethandlerTest::sockethandlerTest()
{
}
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 91240ac..655a8bf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,6 +11,12 @@
cmake_minimum_required(VERSION 2.6)
+execute_process(COMMAND git describe --tags WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ OUTPUT_VARIABLE DAEMONVERSION
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+message(STATUS "Build Version ${DAEMONVERSION}")
+
PROJECT(AudioManagerDeamon)
OPTION( WITH_DBUS_WRAPPER
@@ -40,6 +46,9 @@ OPTION( WITH_PLUGIN_ROUTING
OPTION( WITH_MAIN
"Build with daemon" ON)
+OPTION( WITH_PPOLL
+ "libc supports ppoll" ON)
+
#Can be changed via passing -DDBUS_SERVICE_PREFIX="XXX" to cmake
IF(NOT DEFINED DBUS_SERVICE_PREFIX)
SET( DBUS_SERVICE_PREFIX "org.genivi.audiomanager\0" )
@@ -81,7 +90,7 @@ IF(WITH_DOCUMENTATION)
ENDIF(WITH_DOCUMENTATION)
##global build flags
-set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wextra -std=c++98")
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wextra -std=c++98 -D_GNU_SOURCE")
if(WITH_PLUGIN_COMMAND)
add_subdirectory (PluginCommandInterfaceDbus)
diff --git a/PluginRoutingInterfaceAsync/src/RoutingSenderAsync.cpp b/PluginRoutingInterfaceAsync/src/RoutingSenderAsync.cpp
index 8c1d50a..fcf017e 100644
--- a/PluginRoutingInterfaceAsync/src/RoutingSenderAsync.cpp
+++ b/PluginRoutingInterfaceAsync/src/RoutingSenderAsync.cpp
@@ -34,6 +34,8 @@
#include <string>
#include <dbus/dbus.h>
+
+
using namespace am;
DLT_DECLARE_CONTEXT(PluginRoutingAsync)
@@ -359,12 +361,11 @@ void AsyncRoutingSender::routingInterfacesReady()
// gatewayIter->gatewayID=gatewayID;
// }
- //create thread for interrupts:
- pthread_create(&mInterruptThread,NULL,&AsyncRoutingSender::InterruptEvents,&mShadow);
+ //create thread for interrupts, but only if we are testing - otherwise we get 100% cpu load:
+ //todo: find a solution for the 100% dbus load to uncomment this and make interrupt tests work
+ //pthread_create(&mInterruptThread,NULL,&AsyncRoutingSender::InterruptEvents,&mShadow);
}
-
-
void AsyncRoutingSender::routingInterfacesRundown()
{
assert(mReceiveInterface!=0);
diff --git a/PluginRoutingInterfaceAsync/test/CMakeLists.txt b/PluginRoutingInterfaceAsync/test/CMakeLists.txt
index 8743bd9..04cf18c 100644
--- a/PluginRoutingInterfaceAsync/test/CMakeLists.txt
+++ b/PluginRoutingInterfaceAsync/test/CMakeLists.txt
@@ -53,10 +53,19 @@ file(GLOB ASYNC_PLUGIN_INTERFACE_SRCS_CXX
"../../AudioManagerDaemon/src/SocketHandler.cpp"
"../../AudioManagerDaemon/src/RoutingSender.cpp"
"../src/*.cpp"
- "*.cpp"
+ "testRoutingInterfaceAsync.cpp"
+)
+
+file(GLOB ASYNC_PLUGIN_INTERFACE_INTERRUPT_SRCS_CXX
+ "../../AudioManagerDaemon/src/SocketHandler.cpp"
+ "../../AudioManagerDaemon/src/RoutingSender.cpp"
+ "../src/*.cpp"
+ "testRoutingInterfaceAsyncInterrupt.cpp"
+
)
ADD_EXECUTABLE(asyncRoutingInterfaceTest ${ASYNC_PLUGIN_INTERFACE_SRCS_CXX})
+ADD_EXECUTABLE(asyncRoutingInterfaceInterruptTest ${ASYNC_PLUGIN_INTERFACE_INTERRUPT_SRCS_CXX})
TARGET_LINK_LIBRARIES(asyncRoutingInterfaceTest
@@ -68,5 +77,14 @@ TARGET_LINK_LIBRARIES(asyncRoutingInterfaceTest
gmock
)
+TARGET_LINK_LIBRARIES(asyncRoutingInterfaceInterruptTest
+ ${DLT_LIBRARIES}
+ ${CMAKE_DL_LIBS}
+ ${CMAKE_THREAD_LIBS_INIT}
+ ${GTEST_LIBRARIES}
+ ${DBUS_LIBRARY}
+ gmock
+)
+
diff --git a/PluginRoutingInterfaceAsync/test/testRoutingInterfaceAsync.cpp b/PluginRoutingInterfaceAsync/test/testRoutingInterfaceAsync.cpp
index fc3ad3b..f571443 100644
--- a/PluginRoutingInterfaceAsync/test/testRoutingInterfaceAsync.cpp
+++ b/PluginRoutingInterfaceAsync/test/testRoutingInterfaceAsync.cpp
@@ -100,10 +100,6 @@ void testRoutingInterfaceAsync::TearDown()
DLT_UNREGISTER_CONTEXT(DLT_CONTEXT);
}
-std::string DBUSCOMMAND = "dbus-send --session --print-reply --dest=org.genivi.test /org/genivi/test org.genivi.test.";
-
-
-
TEST_F(testRoutingInterfaceAsync,setDomainState)
{
@@ -115,39 +111,6 @@ TEST_F(testRoutingInterfaceAsync,setDomainState)
ASSERT_EQ(E_OK,pRoutingSender.setDomainState(domainID,state));
pSocketHandler.start_listenting();
}
-TEST_F(testRoutingInterfaceAsync,hookInterruptStatusChange)
-{
- am_sourceID_t sourceID=2;
- EXPECT_CALL(pReceiveInterface,hookInterruptStatusChange(sourceID,_)).Times(1);
- system((DBUSCOMMAND + std::string("InterruptStatusChange int16:2")).c_str());
- pSocketHandler.start_listenting();
-}
-
-TEST_F(testRoutingInterfaceAsync,hookSourceAvailablityStatusChange)
-{
- am_sourceID_t sourceID=2;
- EXPECT_CALL(pReceiveInterface,hookSourceAvailablityStatusChange(sourceID,_)).Times(1);
- system((DBUSCOMMAND + std::string("SourceAvailablityStatusChange int16:2")).c_str());
- pSocketHandler.start_listenting();
-}
-
-TEST_F(testRoutingInterfaceAsync,hookSinkAvailablityStatusChange)
-{
- am_sinkID_t sinkID=2;
- EXPECT_CALL(pReceiveInterface,hookSinkAvailablityStatusChange(sinkID,_)).Times(1);
- system((DBUSCOMMAND + std::string("SinkAvailablityStatusChange int16:2")).c_str());
- pSocketHandler.start_listenting();
-}
-
-TEST_F(testRoutingInterfaceAsync,hookTimingInformationChanged)
-{
- am_connectionID_t connectionID=4;
- am_timeSync_t delay=35;
- EXPECT_CALL(pReceiveInterface,hookTimingInformationChanged(connectionID,delay)).Times(1);
- system((DBUSCOMMAND + std::string("timingChanged int16:4 int16:35")).c_str());
- pSocketHandler.start_listenting();
-}
-
TEST_F(testRoutingInterfaceAsync,setSourceSoundProperty)
{
diff --git a/PluginRoutingInterfaceAsync/test/testRoutingInterfaceAsyncInterrupt.cpp b/PluginRoutingInterfaceAsync/test/testRoutingInterfaceAsyncInterrupt.cpp
new file mode 100644
index 0000000..a04bc6d
--- /dev/null
+++ b/PluginRoutingInterfaceAsync/test/testRoutingInterfaceAsyncInterrupt.cpp
@@ -0,0 +1,148 @@
+/*
+ * testRoutingInterfaceAsync.cpp
+ *
+ * Created on: Dec 27, 2011
+ * Author: christian
+ */
+
+#define INTERRUPT_TEST 1
+
+#include "testRoutingInterfaceAsync.h"
+#include "config.h"
+
+
+using namespace am;
+using namespace testing;
+
+
+DLT_DECLARE_CONTEXT(DLT_CONTEXT)
+
+
+std::vector<std::string> testRoutingInterfaceAsync::pListRoutingPluginDirs=returnListPlugins();
+am_domainID_t testRoutingInterfaceAsync::mDomainIDCount=0;
+RoutingSender testRoutingInterfaceAsync::pRoutingSender=RoutingSender(pListRoutingPluginDirs);
+
+testRoutingInterfaceAsync::testRoutingInterfaceAsync()
+ :pSocketHandler(),
+ pReceiveInterface(),
+ ptimerCallback(this, &testRoutingInterfaceAsync::timerCallback)
+{
+}
+
+testRoutingInterfaceAsync::~testRoutingInterfaceAsync()
+{
+}
+
+void testRoutingInterfaceAsync::SetUp()
+{
+ DLT_REGISTER_APP("DPtest","RoutingInterfacetest");
+ DLT_REGISTER_CONTEXT(DLT_CONTEXT,"Main","Main Context");
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("RoutingSendInterface Test started "));
+
+ std::vector<int> domainIDs;
+ domainIDs.push_back(0);
+ domainIDs.push_back(1);
+
+ EXPECT_CALL(pReceiveInterface,getSocketHandler(_)).WillOnce(DoAll(SetArgReferee<0>(&pSocketHandler),Return(E_OK)));
+ EXPECT_CALL(pReceiveInterface,registerDomain(_,_)).WillRepeatedly(Invoke(testRoutingInterfaceAsync::handleDomainRegister));
+ EXPECT_CALL(pReceiveInterface,registerSource(_,_)).WillRepeatedly(Invoke(testRoutingInterfaceAsync::handleSourceRegister));
+ EXPECT_CALL(pReceiveInterface,registerSink(_,_)).WillRepeatedly(Invoke(testRoutingInterfaceAsync::handleSinkRegister));
+
+ pRoutingSender.startupRoutingInterface(&pReceiveInterface);
+ pRoutingSender.routingInterfacesReady();
+
+ timespec t;
+ t.tv_nsec=0;
+ t.tv_sec=4;
+
+ sh_timerHandle_t handle;
+
+ shTimerCallBack *buf=&ptimerCallback;
+ //lets use a timeout so the test will finish
+ pSocketHandler.addTimer(t,buf,handle,(void*)NULL);
+}
+
+std::vector<std::string> am::testRoutingInterfaceAsync::returnListPlugins()
+{
+ std::vector<std::string> list;
+ list.push_back(std::string(DEFAULT_PLUGIN_ROUTING_DIR));
+ return (list);
+}
+
+am_Error_e am::testRoutingInterfaceAsync::handleSourceRegister(const am_Source_s & sourceData, am_sourceID_t & sourceID)
+{
+ sourceID=sourceData.sourceID;
+ pRoutingSender.addSourceLookup(sourceData);
+ return (E_OK);
+}
+
+am_Error_e am::testRoutingInterfaceAsync::handleSinkRegister(const am_Sink_s & sinkData, am_sinkID_t & sinkID)
+{
+ sinkID=sinkData.sinkID;
+ pRoutingSender.addSinkLookup(sinkData);
+ return(E_OK);
+}
+
+am_Error_e am::testRoutingInterfaceAsync::handleDomainRegister(const am_Domain_s & domainData, am_domainID_t & domainID)
+{
+ am_Domain_s domain=domainData;
+ domainID=mDomainIDCount++;
+ domain.domainID=domainID;
+ pRoutingSender.addDomainLookup(domain);
+ return (E_OK);
+}
+
+void am::testRoutingInterfaceAsync::timerCallback(sh_timerHandle_t handle, void *userData)
+{
+ pSocketHandler.stop_listening();
+}
+
+void testRoutingInterfaceAsync::TearDown()
+{
+ DLT_UNREGISTER_CONTEXT(DLT_CONTEXT);
+}
+
+std::string DBUSCOMMAND = "dbus-send --session --print-reply --dest=org.genivi.test /org/genivi/test org.genivi.test.";
+
+
+
+TEST_F(testRoutingInterfaceAsync,hookInterruptStatusChange)
+{
+ am_sourceID_t sourceID=2;
+ EXPECT_CALL(pReceiveInterface,hookInterruptStatusChange(sourceID,_)).Times(1);
+ system((DBUSCOMMAND + std::string("InterruptStatusChange int16:2")).c_str());
+ pSocketHandler.start_listenting();
+}
+
+TEST_F(testRoutingInterfaceAsync,hookSourceAvailablityStatusChange)
+{
+ am_sourceID_t sourceID=2;
+ EXPECT_CALL(pReceiveInterface,hookSourceAvailablityStatusChange(sourceID,_)).Times(1);
+ system((DBUSCOMMAND + std::string("SourceAvailablityStatusChange int16:2")).c_str());
+ pSocketHandler.start_listenting();
+}
+
+TEST_F(testRoutingInterfaceAsync,hookSinkAvailablityStatusChange)
+{
+ am_sinkID_t sinkID=2;
+ EXPECT_CALL(pReceiveInterface,hookSinkAvailablityStatusChange(sinkID,_)).Times(1);
+ system((DBUSCOMMAND + std::string("SinkAvailablityStatusChange int16:2")).c_str());
+ pSocketHandler.start_listenting();
+}
+
+TEST_F(testRoutingInterfaceAsync,hookTimingInformationChanged)
+{
+ am_connectionID_t connectionID=4;
+ am_timeSync_t delay=35;
+ EXPECT_CALL(pReceiveInterface,hookTimingInformationChanged(connectionID,delay)).Times(1);
+ system((DBUSCOMMAND + std::string("timingChanged int16:4 int16:35")).c_str());
+ pSocketHandler.start_listenting();
+}
+
+int main(int argc, char **argv)
+{
+ ::testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
+}
+
+
diff --git a/cmake/config.cmake b/cmake/config.cmake
index c010c61..c5a9b1a 100644
--- a/cmake/config.cmake
+++ b/cmake/config.cmake
@@ -1,9 +1,12 @@
#ifndef _CONFIG_H
#define _CONFIG_H
+#cmakedefine DAEMONVERSION "@DAEMONVERSION@"
+
#cmakedefine WITH_DBUS_WRAPPER
#cmakedefine WITH_SOCKETHANDLER_LOOP
#cmakedefine WITH_SIMPLEDBUS_LOOP
+#cmakedefine WITH_PPOLL
#cmakedefine DEFAULT_PLUGIN_COMMAND_DIR "@DEFAULT_PLUGIN_COMMAND_DIR@"
#cmakedefine DEFAULT_PLUGIN_ROUTING_DIR "@DEFAULT_PLUGIN_ROUTING_DIR@"
diff --git a/includes/SocketHandler.h b/includes/SocketHandler.h
index 74f20ac..5d72f3e 100644
--- a/includes/SocketHandler.h
+++ b/includes/SocketHandler.h
@@ -32,9 +32,12 @@
#include <sys/poll.h>
#include <list>
#include <map>
+#include <signal.h>
namespace am {
+static volatile sig_atomic_t gDispatchDone = 0; //this global is used to stop the mainloop
+
typedef uint16_t sh_timerHandle_t; //!<this is a handle for a timer to be used with the SocketHandler
typedef uint16_t sh_pollHandle_t; //!<this is a handle for a filedescriptor to be used with the SocketHandler
@@ -124,7 +127,7 @@ private:
sh_timerHandle_t mLastInsertedHandle;
sh_pollHandle_t mLastInsertedPollHandle;
timespec mTimeout;
- bool mDispatch;
+ timespec *mTimeoutPointer; //we need this because for infinite loops we need to set this to NULL mTimeout -1 is not working with ppoll
bool mRecreatePollfds;
};
diff --git a/includes/config.h b/includes/config.h
index ea737e0..7999e0d 100644
--- a/includes/config.h
+++ b/includes/config.h
@@ -1,9 +1,12 @@
#ifndef _CONFIG_H
#define _CONFIG_H
+#define DAEMONVERSION "ver-0.0.1-1-g8e09101"
+
#define WITH_DBUS_WRAPPER
#define WITH_SOCKETHANDLER_LOOP
/* #undef WITH_SIMPLEDBUS_LOOP */
+#define WITH_PPOLL
#define DEFAULT_PLUGIN_COMMAND_DIR "/home/christian/workspace/gitserver/bin/plugins/command"
#define DEFAULT_PLUGIN_ROUTING_DIR "/home/christian/workspace/gitserver/bin/plugins/routing"