summaryrefslogtreecommitdiff
path: root/PluginCommandInterfaceDbus
diff options
context:
space:
mode:
authorchristian mueller <christian.ei.mueller@bmw.de>2012-01-30 18:38:07 +0100
committerchristian mueller <christian.ei.mueller@bmw.de>2012-01-31 17:40:32 +0100
commitad0c452e9890a35a1b7a6c2e2421e092c5cf2c2d (patch)
tree48cc38fa0a4ada0ece0f8571260c5438b64a675c /PluginCommandInterfaceDbus
parent58d62c4af578c10375bf9baa946e33f340c42a1f (diff)
downloadaudiomanager-ad0c452e9890a35a1b7a6c2e2421e092c5cf2c2d.tar.gz
* wrapping DLT calls in a new Class because of performance, codesize and lazyness reasons
* the whole project now compiles without a warning with -pedantic
Diffstat (limited to 'PluginCommandInterfaceDbus')
-rw-r--r--PluginCommandInterfaceDbus/CMakeLists.txt3
-rw-r--r--PluginCommandInterfaceDbus/include/CommandReceiverShadow.h1
-rw-r--r--PluginCommandInterfaceDbus/include/DBusCommandSender.h1
-rw-r--r--PluginCommandInterfaceDbus/include/DBusMessageHandler.h1
-rw-r--r--PluginCommandInterfaceDbus/src/CommandReceiverShadow.cpp41
-rw-r--r--PluginCommandInterfaceDbus/src/DBusCommandSender.cpp58
-rw-r--r--PluginCommandInterfaceDbus/src/DBusMessageHandler.cpp66
-rw-r--r--PluginCommandInterfaceDbus/test/CMakeLists.txt2
-rw-r--r--PluginCommandInterfaceDbus/test/dbuscommandpluginInterfaceTest.cpp2
-rw-r--r--PluginCommandInterfaceDbus/test/dbuscommandpluginInterfaceTest.h2
-rw-r--r--PluginCommandInterfaceDbus/test/dbuscommaninterfacesignalsTest.cpp9
-rw-r--r--PluginCommandInterfaceDbus/test/dbuscommaninterfacesignalsTest.h1
12 files changed, 92 insertions, 95 deletions
diff --git a/PluginCommandInterfaceDbus/CMakeLists.txt b/PluginCommandInterfaceDbus/CMakeLists.txt
index 33e22fd..372def5 100644
--- a/PluginCommandInterfaceDbus/CMakeLists.txt
+++ b/PluginCommandInterfaceDbus/CMakeLists.txt
@@ -2,8 +2,6 @@ cmake_minimum_required(VERSION 2.6)
PROJECT(PluginCommandInterfaceDbus)
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -DDLT_CONTEXT=CommandPluginDbus")
-
set(LIBRARY_OUTPUT_PATH ${PLUGINS_OUTPUT_PATH}/command)
set(DOC_OUTPUT_PATH ${DOC_OUTPUT_PATH}/CommandDBusPlugin)
set(INCLUDES_FOLDER "include")
@@ -34,7 +32,6 @@ SET_TARGET_PROPERTIES(PluginCommandInterfaceDbus PROPERTIES
SOVERSION "${LIB_INTERFACE_VERSION}"
)
-
TARGET_LINK_LIBRARIES(PluginCommandInterfaceDbus
${DLT_LIBRARIES}
${DBUS_LIBRARY}
diff --git a/PluginCommandInterfaceDbus/include/CommandReceiverShadow.h b/PluginCommandInterfaceDbus/include/CommandReceiverShadow.h
index ab09bf1..d2c63cb 100644
--- a/PluginCommandInterfaceDbus/include/CommandReceiverShadow.h
+++ b/PluginCommandInterfaceDbus/include/CommandReceiverShadow.h
@@ -30,7 +30,6 @@
#include <command/CommandReceiveInterface.h>
#include <dbus/DBusWrapper.h>
#include <dbus/dbus.h>
-#include <dlt/dlt.h>
#include <map>
#include "DBusMessageHandler.h"
diff --git a/PluginCommandInterfaceDbus/include/DBusCommandSender.h b/PluginCommandInterfaceDbus/include/DBusCommandSender.h
index 215a9e9..05952f5 100644
--- a/PluginCommandInterfaceDbus/include/DBusCommandSender.h
+++ b/PluginCommandInterfaceDbus/include/DBusCommandSender.h
@@ -79,6 +79,7 @@ private:
DBusWrapper* mDBusWrapper;
CommandReceiveInterface* mCommandReceiveInterface;
+
/**
* list of sinks, needed to send out only deltas
*/
diff --git a/PluginCommandInterfaceDbus/include/DBusMessageHandler.h b/PluginCommandInterfaceDbus/include/DBusMessageHandler.h
index 73989bb..71a4078 100644
--- a/PluginCommandInterfaceDbus/include/DBusMessageHandler.h
+++ b/PluginCommandInterfaceDbus/include/DBusMessageHandler.h
@@ -28,7 +28,6 @@
#include <audiomanagertypes.h>
#include <dbus/dbus.h>
-#include <dlt/dlt.h>
#include <vector>
#include <sstream>
#include <string>
diff --git a/PluginCommandInterfaceDbus/src/CommandReceiverShadow.cpp b/PluginCommandInterfaceDbus/src/CommandReceiverShadow.cpp
index 5336626..b1da840 100644
--- a/PluginCommandInterfaceDbus/src/CommandReceiverShadow.cpp
+++ b/PluginCommandInterfaceDbus/src/CommandReceiverShadow.cpp
@@ -29,10 +29,11 @@
#include <assert.h>
#include "CommandReceiverShadow.h"
#include "DBusCommandSender.h"
+#include "DLTWrapper.h"
using namespace am;
-DLT_IMPORT_CONTEXT(DLT_CONTEXT)
+DLT_IMPORT_CONTEXT(commandDbus)
/**
* static ObjectPathTable is needed for DBus Callback handling
@@ -45,17 +46,17 @@ CommandReceiverShadow::CommandReceiverShadow() :
mFunctionMap(createMap()), //
mDBUSMessageHandler()
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow constructed"));
+ log(&commandDbus,DLT_LOG_INFO,"CommandReceiverShadow constructed");
}
CommandReceiverShadow::~CommandReceiverShadow()
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow destructed"));
+ log(&commandDbus,DLT_LOG_INFO,"CommandReceiverShadow destructed");
}
void CommandReceiverShadow::connect(DBusConnection *conn, DBusMessage *msg)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::connect called"));
+ log(&commandDbus,DLT_LOG_INFO,"CommandReceiverShadow::connect called");
(void) conn;
assert(mCommandReceiveInterface!=NULL);
@@ -73,7 +74,7 @@ void CommandReceiverShadow::connect(DBusConnection *conn, DBusMessage *msg)
void CommandReceiverShadow::disconnect(DBusConnection *conn, DBusMessage *msg)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::disconnect called"));
+ log(&commandDbus,DLT_LOG_INFO,"CommandReceiverShadow::disconnect called");
(void) conn;
assert(mCommandReceiveInterface!=NULL);
@@ -88,7 +89,7 @@ void CommandReceiverShadow::disconnect(DBusConnection *conn, DBusMessage *msg)
void CommandReceiverShadow::setVolume(DBusConnection *conn, DBusMessage *msg)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::setVolume called"));
+ log(&commandDbus,DLT_LOG_INFO,"CommandReceiverShadow::setVolume called");
(void) conn;
assert(mCommandReceiveInterface!=NULL);
@@ -104,7 +105,7 @@ void CommandReceiverShadow::setVolume(DBusConnection *conn, DBusMessage *msg)
void CommandReceiverShadow::volumeStep(DBusConnection *conn, DBusMessage *msg)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::volumeStep called"));
+ log(&commandDbus,DLT_LOG_INFO,"CommandReceiverShadow::volumeStep called");
(void) conn;
assert(mCommandReceiveInterface!=NULL);
@@ -120,7 +121,7 @@ void CommandReceiverShadow::volumeStep(DBusConnection *conn, DBusMessage *msg)
void CommandReceiverShadow::setSinkMuteState(DBusConnection *conn, DBusMessage *msg)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::setSinkMuteState called"));
+ log(&commandDbus,DLT_LOG_INFO,"CommandReceiverShadow::setSinkMuteState called");
(void) conn;
assert(mCommandReceiveInterface!=NULL);
@@ -136,7 +137,7 @@ void CommandReceiverShadow::setSinkMuteState(DBusConnection *conn, DBusMessage *
void CommandReceiverShadow::setMainSinkSoundProperty(DBusConnection *conn, DBusMessage *msg)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::setMainSinkSoundProperty called"));
+ log(&commandDbus,DLT_LOG_INFO,"CommandReceiverShadow::setMainSinkSoundProperty called");
(void) conn;
assert(mCommandReceiveInterface!=NULL);
@@ -157,7 +158,7 @@ void CommandReceiverShadow::setMainSinkSoundProperty(DBusConnection *conn, DBusM
void CommandReceiverShadow::setMainSourceSoundProperty(DBusConnection *conn, DBusMessage *msg)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::setMainSourceSoundProperty called"));
+ log(&commandDbus,DLT_LOG_INFO,"CommandReceiverShadow::setMainSourceSoundProperty called");
(void) conn;
assert(mCommandReceiveInterface!=NULL);
@@ -178,7 +179,7 @@ void CommandReceiverShadow::setMainSourceSoundProperty(DBusConnection *conn, DBu
void CommandReceiverShadow::setSystemProperty(DBusConnection *conn, DBusMessage *msg)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::setSystemProperty called"));
+ log(&commandDbus,DLT_LOG_INFO,"CommandReceiverShadow::setSystemProperty called");
(void) conn;
assert(mCommandReceiveInterface!=NULL);
@@ -198,7 +199,7 @@ void CommandReceiverShadow::setSystemProperty(DBusConnection *conn, DBusMessage
void CommandReceiverShadow::getListMainConnections(DBusConnection *conn, DBusMessage *msg)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::getListMainConnections called"));
+ log(&commandDbus,DLT_LOG_INFO,"CommandReceiverShadow::getListMainConnections called");
(void) conn;
assert(mCommandReceiveInterface!=NULL);
@@ -212,7 +213,7 @@ void CommandReceiverShadow::getListMainConnections(DBusConnection *conn, DBusMes
void CommandReceiverShadow::getListMainSinks(DBusConnection *conn, DBusMessage *msg)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::getListMainSinks called"));
+ log(&commandDbus,DLT_LOG_INFO,"CommandReceiverShadow::getListMainSinks called");
(void) conn;
assert(mCommandReceiveInterface!=NULL);
@@ -226,7 +227,7 @@ void CommandReceiverShadow::getListMainSinks(DBusConnection *conn, DBusMessage *
void CommandReceiverShadow::getListMainSources(DBusConnection *conn, DBusMessage *msg)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::getListMainSources called"));
+ log(&commandDbus,DLT_LOG_INFO,"CommandReceiverShadow::getListMainSources called");
(void) conn;
assert(mCommandReceiveInterface!=NULL);
@@ -240,7 +241,7 @@ void CommandReceiverShadow::getListMainSources(DBusConnection *conn, DBusMessage
void CommandReceiverShadow::getListMainSinkSoundProperties(DBusConnection *conn, DBusMessage *msg)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::getListMainSinkSoundProperties called"));
+ log(&commandDbus,DLT_LOG_INFO,"CommandReceiverShadow::getListMainSinkSoundProperties called");
(void) conn;
assert(mCommandReceiveInterface!=NULL);
@@ -257,7 +258,7 @@ void CommandReceiverShadow::getListMainSinkSoundProperties(DBusConnection *conn,
void CommandReceiverShadow::getListMainSourceSoundProperties(DBusConnection *conn, DBusMessage *msg)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::getListMainSourceSoundProperties called"));
+ log(&commandDbus,DLT_LOG_INFO,"CommandReceiverShadow::getListMainSourceSoundProperties called");
(void) conn;
assert(mCommandReceiveInterface!=NULL);
@@ -274,7 +275,7 @@ void CommandReceiverShadow::getListMainSourceSoundProperties(DBusConnection *con
void CommandReceiverShadow::getListSourceClasses(DBusConnection *conn, DBusMessage *msg)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::getListSourceClasses called"));
+ log(&commandDbus,DLT_LOG_INFO,"CommandReceiverShadow::getListSourceClasses called");
(void) conn;
assert(mCommandReceiveInterface!=NULL);
@@ -288,7 +289,7 @@ void CommandReceiverShadow::getListSourceClasses(DBusConnection *conn, DBusMessa
void CommandReceiverShadow::getListSinkClasses(DBusConnection *conn, DBusMessage *msg)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::getListSinkClasses called"));
+ log(&commandDbus,DLT_LOG_INFO,"CommandReceiverShadow::getListSinkClasses called");
(void) conn;
assert(mCommandReceiveInterface!=NULL);
@@ -302,7 +303,7 @@ void CommandReceiverShadow::getListSinkClasses(DBusConnection *conn, DBusMessage
void CommandReceiverShadow::getListSystemProperties(DBusConnection *conn, DBusMessage *msg)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::getListSystemProperties called"));
+ log(&commandDbus,DLT_LOG_INFO,"CommandReceiverShadow::getListSystemProperties called");
(void) conn;
assert(mCommandReceiveInterface!=NULL);
@@ -316,7 +317,7 @@ void CommandReceiverShadow::getListSystemProperties(DBusConnection *conn, DBusMe
void CommandReceiverShadow::getTimingInformation(DBusConnection *conn, DBusMessage *msg)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("CommandReceiverShadow::getTimingInformation called"));
+ log(&commandDbus,DLT_LOG_INFO,"CommandReceiverShadow::getTimingInformation called");
(void) conn;
assert(mCommandReceiveInterface!=NULL);
diff --git a/PluginCommandInterfaceDbus/src/DBusCommandSender.cpp b/PluginCommandInterfaceDbus/src/DBusCommandSender.cpp
index 3c1afd6..53022de 100644
--- a/PluginCommandInterfaceDbus/src/DBusCommandSender.cpp
+++ b/PluginCommandInterfaceDbus/src/DBusCommandSender.cpp
@@ -27,16 +27,16 @@
#include <dbus/DBusWrapper.h>
#include "DBusCommandSender.h"
#include "DBusMessageHandler.h"
-#include <dlt/dlt.h>
+#include "DLTWrapper.h"
#include <algorithm>
#include <string>
#include <vector>
#include <assert.h>
#include <set>
-using namespace am;
+DLT_DECLARE_CONTEXT(commandDbus)
-DLT_DECLARE_CONTEXT(DLT_CONTEXT)
+using namespace am;
/**
* factory for plugin loading
@@ -60,19 +60,19 @@ DbusCommandSender::DbusCommandSender() :
mDBusWrapper(NULL), //
mCommandReceiveInterface(NULL)
{
- DLT_REGISTER_CONTEXT(DLT_CONTEXT, "DBP", "DBus Plugin");
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DbusCommandSender constructed"));
+ DLTWrapper::instance()->registerContext(commandDbus, "DBP", "DBus Plugin");
+ log(&commandDbus, DLT_LOG_INFO, "DbusCommandSender constructor called");
}
DbusCommandSender::~DbusCommandSender()
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DbusCommandSender destructed"));
- DLT_UNREGISTER_CONTEXT(DLT_CONTEXT);
+ log(&commandDbus, DLT_LOG_INFO, "DbusCommandSender destructed");
+ DLTWrapper::instance()->unregisterContext(commandDbus);
}
am_Error_e DbusCommandSender::startupInterface(CommandReceiveInterface* commandreceiveinterface)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("startupInterface called"));
+ log(&commandDbus, DLT_LOG_INFO, "startupInterface called");
mCommandReceiveInterface = commandreceiveinterface;
mCommandReceiverShadow.setCommandReceiver(mCommandReceiveInterface);
@@ -83,7 +83,7 @@ am_Error_e DbusCommandSender::startupInterface(CommandReceiveInterface* commandr
am_Error_e DbusCommandSender::stopInterface()
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("stopInterface called"));
+ log(&commandDbus, DLT_LOG_INFO, "stopInterface called");
/**
* todo: finish DbusCommandSender::stopInterface(), what needs to be done?
*/
@@ -92,7 +92,7 @@ am_Error_e DbusCommandSender::stopInterface()
am_Error_e DbusCommandSender::cbCommunicationReady()
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("cbCommunicationReady called"));
+ log(&commandDbus, DLT_LOG_INFO, "cbCommunicationReady called");
/**
* todo: implement DbusCommandSender::cbCommunicationReady()
*/
@@ -101,7 +101,7 @@ am_Error_e DbusCommandSender::cbCommunicationReady()
am_Error_e DbusCommandSender::cbCommunicationRundown()
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("cbCommunicationRundown called"));
+ log(&commandDbus, DLT_LOG_INFO, "cbCommunicationRundown called");
/**
* todo: implement DbusCommandSender::cbCommunicationRundown()
*/
@@ -110,7 +110,7 @@ am_Error_e DbusCommandSender::cbCommunicationRundown()
void DbusCommandSender::cbNumberOfMainConnectionsChanged()
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("cbNumberOfMainConnectionsChanged called"));
+ log(&commandDbus, DLT_LOG_INFO, "cbNumberOfMainConnectionsChanged called");
mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("NumberOfMainConnectionsChanged"));
mDBUSMessageHandler.sendMessage();
@@ -118,7 +118,7 @@ void DbusCommandSender::cbNumberOfMainConnectionsChanged()
void DbusCommandSender::cbNumberOfSinksChanged()
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("cbNumberOfSinksChanged called"));
+ log(&commandDbus, DLT_LOG_INFO, "cbNumberOfSinksChanged called");
std::vector<am_SinkType_s> newListSinks;
std::vector<am_SinkType_s> diffList;
@@ -131,14 +131,14 @@ void DbusCommandSender::cbNumberOfSinksChanged()
mDBUSMessageHandler.initSignal(std::string(MY_NODE), "SinkAdded");
mDBUSMessageHandler.append(diffList[0]);
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("send signal SinkAdded"));
+ log(&commandDbus, DLT_LOG_INFO, "send signal SinkAdded");
}
else
{
mDBUSMessageHandler.initSignal(std::string(MY_NODE), "SinkRemoved");
mDBUSMessageHandler.append(diffList.begin()->sinkID);
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("send signal SinkRemoved"));
+ log(&commandDbus, DLT_LOG_INFO, "send signal SinkRemoved");
}
mDBUSMessageHandler.sendMessage();
@@ -147,7 +147,7 @@ void DbusCommandSender::cbNumberOfSinksChanged()
void DbusCommandSender::cbNumberOfSourcesChanged()
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("cbNumberOfSourcesChanged called"));
+ log(&commandDbus, DLT_LOG_INFO, "cbNumberOfSourcesChanged called");
std::vector<am_SourceType_s> newlistSources;
std::vector<am_SourceType_s> diffList;
@@ -160,14 +160,14 @@ void DbusCommandSender::cbNumberOfSourcesChanged()
mDBUSMessageHandler.initSignal(std::string(MY_NODE), "SourceAdded");
mDBUSMessageHandler.append(diffList[0]);
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("send signal SourceAdded"));
+ log(&commandDbus, DLT_LOG_INFO, "send signal SourceAdded");
}
else
{
mDBUSMessageHandler.initSignal(std::string(MY_NODE), "SourceRemoved");
mDBUSMessageHandler.append((dbus_uint16_t) diffList.begin()->sourceID);
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("send signal SourceRemoved"));
+ log(&commandDbus, DLT_LOG_INFO, "send signal SourceRemoved");
}
mDBUSMessageHandler.sendMessage();
@@ -176,7 +176,7 @@ void DbusCommandSender::cbNumberOfSourcesChanged()
void DbusCommandSender::cbNumberOfSinkClassesChanged()
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("cbNumberOfSinkClassesChanged called"));
+ log(&commandDbus, DLT_LOG_INFO, "cbNumberOfSinkClassesChanged called");
mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("NumberOfSinkClassesChanged"));
mDBUSMessageHandler.sendMessage();
@@ -184,7 +184,7 @@ void DbusCommandSender::cbNumberOfSinkClassesChanged()
void DbusCommandSender::cbNumberOfSourceClassesChanged()
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("cbNumberOfSourceClassesChanged called"));
+ log(&commandDbus, DLT_LOG_INFO, "cbNumberOfSourceClassesChanged called");
mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("NumberOfSourceClassesChanged"));
mDBUSMessageHandler.sendMessage();
@@ -192,7 +192,7 @@ void DbusCommandSender::cbNumberOfSourceClassesChanged()
void DbusCommandSender::cbMainConnectionStateChanged(const am_mainConnectionID_t connectionID, const am_ConnectionState_e connectionState)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("cbMainConnectionStateChanged called, connectionID"), DLT_INT16(connectionID), DLT_STRING("connectionState"), DLT_INT16(connectionState));
+ log(&commandDbus, DLT_LOG_INFO, "cbMainConnectionStateChanged called, connectionID=", connectionID, "connectionState=", connectionState);
mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("MainConnectionStateChanged"));
mDBUSMessageHandler.append((dbus_uint16_t) connectionID);
@@ -202,7 +202,7 @@ void DbusCommandSender::cbMainConnectionStateChanged(const am_mainConnectionID_t
void DbusCommandSender::cbMainSinkSoundPropertyChanged(const am_sinkID_t sinkID, const am_MainSoundProperty_s SoundProperty)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("cbMainSinkSoundPropertyChanged called, sinkID"), DLT_INT16(sinkID), DLT_STRING("SoundProperty.type"), DLT_INT16(SoundProperty.type), DLT_STRING("SoundProperty.value"), DLT_INT16(SoundProperty.value));
+ log(&commandDbus, DLT_LOG_INFO, "cbMainSinkSoundPropertyChanged called, sinkID", sinkID, "SoundProperty.type", SoundProperty.type, "SoundProperty.value", SoundProperty.value);
mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("MainSinkSoundPropertyChanged"));
mDBUSMessageHandler.append((dbus_uint16_t) sinkID);
@@ -212,7 +212,7 @@ void DbusCommandSender::cbMainSinkSoundPropertyChanged(const am_sinkID_t sinkID,
void DbusCommandSender::cbMainSourceSoundPropertyChanged(const am_sourceID_t sourceID, const am_MainSoundProperty_s & SoundProperty)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("cbMainSourceSoundPropertyChanged called, sourceID"), DLT_INT16(sourceID), DLT_STRING("SoundProperty.type"), DLT_INT16(SoundProperty.type), DLT_STRING("SoundProperty.value"), DLT_INT16(SoundProperty.value));
+ log(&commandDbus, DLT_LOG_INFO, "cbMainSourceSoundPropertyChanged called, sourceID", sourceID, "SoundProperty.type", SoundProperty.type, "SoundProperty.value", SoundProperty.value);
mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("MainSourceSoundPropertyChanged"));
mDBUSMessageHandler.append((dbus_uint16_t) sourceID);
@@ -222,7 +222,7 @@ void DbusCommandSender::cbMainSourceSoundPropertyChanged(const am_sourceID_t sou
void DbusCommandSender::cbSinkAvailabilityChanged(const am_sinkID_t sinkID, const am_Availability_s & availability)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("cbSinkAvailabilityChanged called, sinkID"), DLT_INT16(sinkID), DLT_STRING("availability.availability"), DLT_INT16(availability.availability), DLT_STRING("SoundProperty.reason"), DLT_INT16(availability.availabilityReason));
+ log(&commandDbus, DLT_LOG_INFO, "cbSinkAvailabilityChanged called, sinkID", sinkID, "availability.availability", availability.availability, "SoundProperty.reason", availability.availabilityReason);
mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("SinkAvailabilityChanged"));
mDBUSMessageHandler.append((dbus_uint16_t) sinkID);
@@ -232,7 +232,7 @@ void DbusCommandSender::cbSinkAvailabilityChanged(const am_sinkID_t sinkID, cons
void DbusCommandSender::cbSourceAvailabilityChanged(const am_sourceID_t sourceID, const am_Availability_s & availability)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("cbSourceAvailabilityChanged called, sourceID"), DLT_INT16(sourceID), DLT_STRING("availability.availability"), DLT_INT16(availability.availability), DLT_STRING("SoundProperty.reason"), DLT_INT16(availability.availabilityReason));
+ log(&commandDbus, DLT_LOG_INFO, "cbSourceAvailabilityChanged called, sourceID", sourceID, "availability.availability", availability.availability, "SoundProperty.reason", availability.availabilityReason);
mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("SourceAvailabilityChanged"));
mDBUSMessageHandler.append((dbus_uint16_t) sourceID);
@@ -242,7 +242,7 @@ void DbusCommandSender::cbSourceAvailabilityChanged(const am_sourceID_t sourceID
void DbusCommandSender::cbVolumeChanged(const am_sinkID_t sinkID, const am_mainVolume_t volume)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("cbVolumeChanged called, sinkID"), DLT_INT16(sinkID), DLT_STRING("volume"), DLT_INT16(volume));
+ log(&commandDbus, DLT_LOG_INFO, "cbVolumeChanged called, sinkID", sinkID, "volume", volume);
mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("VolumeChanged"));
mDBUSMessageHandler.append((dbus_uint16_t) sinkID);
@@ -252,7 +252,7 @@ void DbusCommandSender::cbVolumeChanged(const am_sinkID_t sinkID, const am_mainV
void DbusCommandSender::cbSinkMuteStateChanged(const am_sinkID_t sinkID, const am_MuteState_e muteState)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("cbSinkMuteStateChanged called, sinkID"), DLT_INT16(sinkID), DLT_STRING("muteState"), DLT_INT16(muteState));
+ log(&commandDbus, DLT_LOG_INFO, "cbSinkMuteStateChanged called, sinkID", sinkID, "muteState", muteState);
mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("SinkMuteStateChanged"));
mDBUSMessageHandler.append((dbus_uint16_t) sinkID);
@@ -262,7 +262,7 @@ void DbusCommandSender::cbSinkMuteStateChanged(const am_sinkID_t sinkID, const a
void DbusCommandSender::cbSystemPropertyChanged(const am_SystemProperty_s & SystemProperty)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("cbSystemPropertyChanged called, SystemProperty.type"), DLT_INT16(SystemProperty.type), DLT_STRING("SystemProperty.value"), DLT_INT16(SystemProperty.value));
+ log(&commandDbus, DLT_LOG_INFO, "cbSystemPropertyChanged called, SystemProperty.type", SystemProperty.type, "SystemProperty.value", SystemProperty.value);
mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("SystemPropertyChanged"));
mDBUSMessageHandler.append(SystemProperty);
@@ -271,7 +271,7 @@ void DbusCommandSender::cbSystemPropertyChanged(const am_SystemProperty_s & Syst
void am::DbusCommandSender::cbTimingInformationChanged(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("cbTimingInformationChanged called, mainConnectionID"), DLT_INT16(mainConnectionID), DLT_STRING("time"), DLT_INT16(time));
+ log(&commandDbus, DLT_LOG_INFO, "cbTimingInformationChanged called, mainConnectionID=", mainConnectionID, "time=", time);
mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("TimingInformationChanged"));
mDBUSMessageHandler.append((dbus_uint16_t) mainConnectionID);
diff --git a/PluginCommandInterfaceDbus/src/DBusMessageHandler.cpp b/PluginCommandInterfaceDbus/src/DBusMessageHandler.cpp
index d6f2ee1..66e216b 100644
--- a/PluginCommandInterfaceDbus/src/DBusMessageHandler.cpp
+++ b/PluginCommandInterfaceDbus/src/DBusMessageHandler.cpp
@@ -25,14 +25,14 @@
#include <config.h>
#include "DBusMessageHandler.h"
#include "DBusCommandSender.h"
-
+#include "DLTWrapper.h"
#include <stdlib.h>
#include <assert.h>
#include <vector>
-using namespace am;
+DLT_IMPORT_CONTEXT(commandDbus)
-DLT_IMPORT_CONTEXT(DLT_CONTEXT)
+using namespace am;
DBusMessageHandler::DBusMessageHandler() :
mDBusMessageIter(), //
@@ -44,12 +44,12 @@ DBusMessageHandler::DBusMessageHandler() :
mReveiveMessage(NULL), //
mDBusConnection(NULL)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DBUSMessageHandler constructed"));
+ log(&commandDbus, DLT_LOG_INFO, "DBusMessageHandler constructed");
}
DBusMessageHandler::~DBusMessageHandler()
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("DBUSMessageHandler destructed"));
+ log(&commandDbus, DLT_LOG_INFO, "DBUSMessageHandler destructed");
}
void DBusMessageHandler::initReceive(DBusMessage* msg)
@@ -58,7 +58,7 @@ void DBusMessageHandler::initReceive(DBusMessage* msg)
mReveiveMessage = msg;
if (!dbus_message_iter_init(msg, &mDBusMessageIter))
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::initReceive DBus Message has no arguments!"));
+ log(&commandDbus, DLT_LOG_INFO, "DBusMessageHandler::initReceive DBus Message has no arguments!");
mErrorName = std::string(DBUS_ERROR_INVALID_ARGS);
mErrorMsg = "DBUS Message has no arguments!";
}
@@ -70,7 +70,7 @@ void DBusMessageHandler::initReply(DBusMessage* msg)
mDbusMessage = dbus_message_new_method_return(msg);
if (mDbusMessage == NULL)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::initReply Cannot allocate DBus message!"));
+ log(&commandDbus, DLT_LOG_ERROR, "DBusMessageHandler::initReply Cannot allocate DBus message!");
mErrorName = std::string(DBUS_ERROR_NO_MEMORY);
mErrorMsg = "Cannot create reply!";
}
@@ -86,7 +86,7 @@ void DBusMessageHandler::initSignal(std::string path, std::string signalName)
if (mDbusMessage == NULL)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::initSignal Cannot allocate DBus message!"));
+ log(&commandDbus, DLT_LOG_ERROR, "DBusMessageHandler::initSignal Cannot allocate DBus message!");
}
dbus_message_iter_init_append(mDbusMessage, &mDBusMessageIter);
}
@@ -108,7 +108,7 @@ void DBusMessageHandler::sendMessage()
}
if (!dbus_connection_send(mDBusConnection, mDbusMessage, &mSerial))
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::sendMessage cannot send message!"));
+ log(&commandDbus, DLT_LOG_ERROR, "DBusMessageHandler::sendMessage cannot send message!");
}
dbus_connection_flush(mDBusConnection);
dbus_message_unref(mDbusMessage);
@@ -121,7 +121,7 @@ char* DBusMessageHandler::getString()
if (DBUS_TYPE_STRING != dbus_message_iter_get_arg_type(&mDBusMessageIter))
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::getString DBUS handler argument is no String!"));
+ log(&commandDbus, DLT_LOG_ERROR, "DBusMessageHandler::getString DBUS handler argument is no String!");
mErrorName = std::string(DBUS_ERROR_INVALID_ARGS);
mErrorMsg = "DBus argument is no string";
}
@@ -139,7 +139,7 @@ dbus_bool_t DBusMessageHandler::getBool()
if (DBUS_TYPE_BOOLEAN != dbus_message_iter_get_arg_type(&mDBusMessageIter))
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::getBool DBUS handler argument is no bool!"));
+ log(&commandDbus, DLT_LOG_ERROR, "DBusMessageHandler::getBool DBUS handler argument is no bool!");
mErrorName = std::string(DBUS_ERROR_INVALID_ARGS);
mErrorMsg = "DBus argument is no bool";
}
@@ -157,7 +157,7 @@ char DBusMessageHandler::getByte()
if (DBUS_TYPE_BYTE != dbus_message_iter_get_arg_type(&mDBusMessageIter))
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::getByte DBUS handler argument is no byte!"));
+ log(&commandDbus, DLT_LOG_ERROR, "DBusMessageHandler::getByte DBUS handler argument is no byte!");
mErrorName = std::string(DBUS_ERROR_INVALID_ARGS);
mErrorMsg = "DBus argument is no byte";
}
@@ -179,7 +179,7 @@ dbus_uint16_t DBusMessageHandler::getUInt()
if (DBUS_TYPE_UINT16 != dbus_message_iter_get_arg_type(&mDBusMessageIter))
#endif
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::getUInt DBUS handler argument is no uint16_t!"));
+ log(&commandDbus, DLT_LOG_ERROR, "DBusMessageHandler::getUInt DBUS handler argument is no uint16_t!");
mErrorName = std::string(DBUS_ERROR_INVALID_ARGS);
mErrorMsg = "DBus argument is no uint16_t";
}
@@ -201,7 +201,7 @@ dbus_int16_t DBusMessageHandler::getInt()
if (DBUS_TYPE_INT16 != dbus_message_iter_get_arg_type(&mDBusMessageIter))
#endif
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::getInt DBUS handler argument is no int16_t!"));
+ log(&commandDbus, DLT_LOG_ERROR, "DBusMessageHandler::getInt DBUS handler argument is no int16_t!");
mErrorName = std::string(DBUS_ERROR_INVALID_ARGS);
mErrorMsg = "DBus argument is no int16_t";
}
@@ -218,7 +218,7 @@ double DBusMessageHandler::getDouble()
double param;
if (DBUS_TYPE_DOUBLE != dbus_message_iter_get_arg_type(&mDBusMessageIter))
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::getDouble DBUS handler argument is no double!"));
+ log(&commandDbus, DLT_LOG_ERROR, "DBusMessageHandler::getDouble DBUS handler argument is no double!");
mErrorName = std::string(DBUS_ERROR_INVALID_ARGS);
mErrorMsg = "DBus argument is no double";
}
@@ -235,7 +235,7 @@ void DBusMessageHandler::getProperty(dbus_int16_t & type, dbus_int16_t & value)
DBusMessageIter arrayIter;
if (DBUS_TYPE_STRUCT != dbus_message_iter_get_arg_type(&mDBusMessageIter))
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::getProperty DBUS handler argument is no array!"));
+ log(&commandDbus, DLT_LOG_ERROR, "DBusMessageHandler::getProperty DBUS handler argument is no array!");
mErrorName = std::string(DBUS_ERROR_INVALID_ARGS);
mErrorMsg = "DBus argument is no array";
}
@@ -254,7 +254,7 @@ void DBusMessageHandler::append(bool toAppend)
dbus_bool_t mybool = toAppend;
if (!dbus_message_iter_append_basic(&mDBusMessageIter, DBUS_TYPE_BOOLEAN, &mybool))
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ log(&commandDbus, DLT_LOG_ERROR, "DBusMessageHandler::append Cannot allocate DBus message!");
mErrorName = std::string(DBUS_ERROR_NO_MEMORY);
mErrorMsg = "Cannot create reply!";
}
@@ -264,7 +264,7 @@ void DBusMessageHandler::append(double toAppend)
{
if (!dbus_message_iter_append_basic(&mDBusMessageIter, DBUS_TYPE_DOUBLE, &toAppend))
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ log(&commandDbus, DLT_LOG_ERROR, "DBusMessageHandler::append Cannot allocate DBus message!");
mErrorName = std::string(DBUS_ERROR_NO_MEMORY);
mErrorMsg = "Cannot create reply!";
}
@@ -274,7 +274,7 @@ void DBusMessageHandler::append(char toAppend)
{
if (!dbus_message_iter_append_basic(&mDBusMessageIter, DBUS_TYPE_BYTE, &toAppend))
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ log(&commandDbus, DLT_LOG_ERROR, "DBusMessageHandler::append Cannot allocate DBus message!");
mErrorName = std::string(DBUS_ERROR_NO_MEMORY);
mErrorMsg = "Cannot create reply!";
}
@@ -284,7 +284,7 @@ void DBusMessageHandler::append(dbus_int16_t toAppend)
{
if (!dbus_message_iter_append_basic(&mDBusMessageIter, DBUS_TYPE_INT16, &toAppend))
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ log(&commandDbus, DLT_LOG_ERROR, "DBusMessageHandler::append Cannot allocate DBus message!");
mErrorName = std::string(DBUS_ERROR_NO_MEMORY);
mErrorMsg = "Cannot create reply!";
}
@@ -294,7 +294,7 @@ void DBusMessageHandler::append(dbus_uint16_t toAppend)
{
if (!dbus_message_iter_append_basic(&mDBusMessageIter, DBUS_TYPE_UINT16, &toAppend))
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ log(&commandDbus, DLT_LOG_ERROR, "DBusMessageHandler::append Cannot allocate DBus message!");
mErrorName = std::string(DBUS_ERROR_NO_MEMORY);
mErrorMsg = "Cannot create reply!";
}
@@ -327,7 +327,7 @@ void DBusMessageHandler::append(const am::am_SinkType_s& sinkType)
if (!success)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ log(&commandDbus, DLT_LOG_ERROR, "DBusMessageHandler::append Cannot allocate DBus message!");
mErrorName = std::string(DBUS_ERROR_NO_MEMORY);
mErrorMsg = "Cannot create reply!";
}
@@ -352,7 +352,7 @@ void DBusMessageHandler::append(const am::am_SourceType_s & sourceType)
if (!success)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ log(&commandDbus, DLT_LOG_ERROR, "DBusMessageHandler::append Cannot allocate DBus message!");
mErrorName = std::string(DBUS_ERROR_NO_MEMORY);
mErrorMsg = "Cannot create reply!";
}
@@ -369,7 +369,7 @@ void DBusMessageHandler::append(const am::am_MainSoundProperty_s mainSoundProper
if (!success)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ log(&commandDbus, DLT_LOG_ERROR, "DBusMessageHandler::append Cannot allocate DBus message!");
mErrorName = std::string(DBUS_ERROR_NO_MEMORY);
mErrorMsg = "Cannot create reply!";
}
@@ -386,7 +386,7 @@ void DBusMessageHandler::append(const am::am_Availability_s & availability)
if (!success)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ log(&commandDbus, DLT_LOG_ERROR, "DBusMessageHandler::append Cannot allocate DBus message!");
mErrorName = std::string(DBUS_ERROR_NO_MEMORY);
mErrorMsg = "Cannot create reply!";
}
@@ -403,7 +403,7 @@ void DBusMessageHandler::append(const am::am_SystemProperty_s & SystemProperty)
if (!success)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ log(&commandDbus, DLT_LOG_ERROR, "DBusMessageHandler::append Cannot allocate DBus message!");
mErrorName = std::string(DBUS_ERROR_NO_MEMORY);
mErrorMsg = "Cannot create reply!";
}
@@ -431,7 +431,7 @@ void DBusMessageHandler::append(const std::vector<am::am_MainConnectionType_s>&
if (!success)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ log(&commandDbus, DLT_LOG_ERROR, "DBusMessageHandler::append Cannot allocate DBus message!");
mErrorName = std::string(DBUS_ERROR_NO_MEMORY);
mErrorMsg = "Cannot create reply!";
}
@@ -464,7 +464,7 @@ void DBusMessageHandler::append(const std::vector<am::am_SinkType_s> & listMainS
if (!success)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ log(&commandDbus, DLT_LOG_ERROR, "DBusMessageHandler::append Cannot allocate DBus message!");
mErrorName = std::string(DBUS_ERROR_NO_MEMORY);
mErrorMsg = "Cannot create reply!";
}
@@ -495,7 +495,7 @@ void DBusMessageHandler::append(const std::vector<am::am_SourceType_s> & listMai
if (!success)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ log(&commandDbus, DLT_LOG_ERROR, "DBusMessageHandler::append Cannot allocate DBus message!");
mErrorName = std::string(DBUS_ERROR_NO_MEMORY);
mErrorMsg = "Cannot create reply!";
}
@@ -520,7 +520,7 @@ void DBusMessageHandler::append(const std::vector<am::am_MainSoundProperty_s> &
if (!success)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ log(&commandDbus, DLT_LOG_ERROR, "DBusMessageHandler::append Cannot allocate DBus message!");
mErrorName = std::string(DBUS_ERROR_NO_MEMORY);
mErrorMsg = "Cannot create reply!";
}
@@ -558,7 +558,7 @@ void DBusMessageHandler::append(const std::vector<am::am_SourceClass_s> & listSo
if (!success)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ log(&commandDbus, DLT_LOG_ERROR, "DBusMessageHandler::append Cannot allocate DBus message!");
mErrorName = std::string(DBUS_ERROR_NO_MEMORY);
mErrorMsg = "Cannot create reply!";
}
@@ -596,7 +596,7 @@ void DBusMessageHandler::append(const std::vector<am::am_SinkClass_s> & listSink
if (!success)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ log(&commandDbus, DLT_LOG_ERROR, "DBusMessageHandler::append Cannot allocate DBus message!");
mErrorName = std::string(DBUS_ERROR_NO_MEMORY);
mErrorMsg = "Cannot create reply!";
}
@@ -621,7 +621,7 @@ void DBusMessageHandler::append(const std::vector<am::am_SystemProperty_s> & lis
if (!success)
{
- DLT_LOG(DLT_CONTEXT, DLT_LOG_ERROR, DLT_STRING("DBusMessageHandler::append Cannot allocate DBus message!"));
+ log(&commandDbus, DLT_LOG_ERROR, "DBusMessageHandler::append Cannot allocate DBus message!");
mErrorName = std::string(DBUS_ERROR_NO_MEMORY);
mErrorMsg = "Cannot create reply!";
}
diff --git a/PluginCommandInterfaceDbus/test/CMakeLists.txt b/PluginCommandInterfaceDbus/test/CMakeLists.txt
index c3e136b..0c33420 100644
--- a/PluginCommandInterfaceDbus/test/CMakeLists.txt
+++ b/PluginCommandInterfaceDbus/test/CMakeLists.txt
@@ -58,6 +58,7 @@ file(GLOB DBUS_PLUGIN_INTERFACE_SRCS_CXX
"../../AudioManagerDaemon/src/DBusWrapper.cpp"
"../../AudioManagerDaemon/src/CommandSender.cpp"
"../../AudioManagerDaemon/src/SocketHandler.cpp"
+ "../../AudioManagerDaemon/src/DLTWrapper.cpp"
"../src/*.cpp"
"dbuscommandpluginInterfaceTest.cpp"
"DbusCommanInterfaceBackdoor.cpp"
@@ -67,6 +68,7 @@ file(GLOB DBUS_SIGNAL_INTERFACE_SRCS_CXX
"../../AudioManagerDaemon/src/DBusWrapper.cpp"
"../../AudioManagerDaemon/src/CommandSender.cpp"
"../../AudioManagerDaemon/src/SocketHandler.cpp"
+ "../../AudioManagerDaemon/src/DLTWrapper.cpp"
"../src/*.cpp"
"dbuscommaninterfacesignalsTest.cpp"
"DbusCommandInterfaceBackdoor.cpp"
diff --git a/PluginCommandInterfaceDbus/test/dbuscommandpluginInterfaceTest.cpp b/PluginCommandInterfaceDbus/test/dbuscommandpluginInterfaceTest.cpp
index 1ba6a30..8f7c23f 100644
--- a/PluginCommandInterfaceDbus/test/dbuscommandpluginInterfaceTest.cpp
+++ b/PluginCommandInterfaceDbus/test/dbuscommandpluginInterfaceTest.cpp
@@ -32,6 +32,7 @@
#include "../include/DBusMessageHandler.h"
#include "DbusCommandInterfaceBackdoor.h"
#include "MockInterfaces.h"
+#include "DLTWrapper.h"
using namespace am;
using namespace testing;
@@ -49,6 +50,7 @@ void* run_the_loop(void* wrapper)
dbuscommandpluginInterfaceTest::dbuscommandpluginInterfaceTest()
{
+ DLTWrapper::instance()->registerApp("dbusTest","dbusTest");
}
dbuscommandpluginInterfaceTest::~dbuscommandpluginInterfaceTest()
diff --git a/PluginCommandInterfaceDbus/test/dbuscommandpluginInterfaceTest.h b/PluginCommandInterfaceDbus/test/dbuscommandpluginInterfaceTest.h
index d9f1fca..ae2d14b 100644
--- a/PluginCommandInterfaceDbus/test/dbuscommandpluginInterfaceTest.h
+++ b/PluginCommandInterfaceDbus/test/dbuscommandpluginInterfaceTest.h
@@ -29,7 +29,6 @@
#include <gtest/gtest.h>
#include <gmock/gmock.h>
-#include <dlt/dlt.h>
#include <algorithm>
#include <string>
#include <vector>
@@ -39,6 +38,7 @@
#include "MockInterfaces.h"
#include "DbusCommandInterfaceBackdoor.h"
+
#define UNIT_TEST 1
namespace am {
diff --git a/PluginCommandInterfaceDbus/test/dbuscommaninterfacesignalsTest.cpp b/PluginCommandInterfaceDbus/test/dbuscommaninterfacesignalsTest.cpp
index 1c90d55..9b5adb9 100644
--- a/PluginCommandInterfaceDbus/test/dbuscommaninterfacesignalsTest.cpp
+++ b/PluginCommandInterfaceDbus/test/dbuscommaninterfacesignalsTest.cpp
@@ -31,23 +31,20 @@
#include "../include/DBusMessageHandler.h"
#include "DbusCommandInterfaceBackdoor.h"
#include "MockInterfaces.h"
+#include "DLTWrapper.h"
using namespace am;
using namespace testing;
-DLT_IMPORT_CONTEXT(DLT_CONTEXT)
dbuscommaninterfacesignalsTest::dbuscommaninterfacesignalsTest()
{
- 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 "));
-
+ DLTWrapper::instance()->registerApp("dbusTest","dbusTest");
+ logInfo("dbusCommandInterfaceSignalTest started");
}
dbuscommaninterfacesignalsTest::~dbuscommaninterfacesignalsTest()
{
- DLT_UNREGISTER_CONTEXT(DLT_CONTEXT);
}
void* NumberOfMainConnectionsChanged(void*)
diff --git a/PluginCommandInterfaceDbus/test/dbuscommaninterfacesignalsTest.h b/PluginCommandInterfaceDbus/test/dbuscommaninterfacesignalsTest.h
index bd99d04..0f930d6 100644
--- a/PluginCommandInterfaceDbus/test/dbuscommaninterfacesignalsTest.h
+++ b/PluginCommandInterfaceDbus/test/dbuscommaninterfacesignalsTest.h
@@ -27,7 +27,6 @@
#define DBUSCOMMANINTERFACESIGNALSTEST_H_
#include <gtest/gtest.h>
#include <gmock/gmock.h>
-#include <dlt/dlt.h>
#include <algorithm>
#include <string>
#include <vector>