changes to make controlSender compile & loadable
authorChristian Mueller <christian@lmuc329619u.(none)>
Fri, 16 Dec 2011 11:29:27 +0000 (12:29 +0100)
committerChristian Mueller <christian@lmuc329619u.(none)>
Fri, 16 Dec 2011 11:29:27 +0000 (12:29 +0100)
AudioManagerDaemon/src/DBusWrapper.cpp
AudioManagerDaemon/src/RoutingSender.cpp
AudioManagerDaemon/src/main.cpp
PluginCommandInterfaceDbus/CMakeLists.txt
PluginCommandInterfaceDbus/include/DBusCommandSender.h [moved from PluginCommandInterfaceDbus/include/CommandSender.h with 98% similarity]
PluginCommandInterfaceDbus/src/CommandReceiverShadow.cpp
PluginCommandInterfaceDbus/src/DBusCommandSender.cpp [moved from PluginCommandInterfaceDbus/src/CommandSender.cpp with 99% similarity]
PluginCommandInterfaceDbus/src/DBusMessageHandler.cpp
PluginControlInterface/src/ControlSender.cpp

index b15374d..8876855 100644 (file)
@@ -81,7 +81,7 @@ DBusWrapper::~DBusWrapper()
 {
        //close the connection again
        DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("DBusWrapper::~DBusWrapper Closing DBus connection"));
-       dbus_connection_close(mDbusConnection);
+       dbus_connection_unref(mDbusConnection);
 }
 
 void DBusWrapper::registerCallback(const DBusObjectPathVTable* vtable, const std::string& path, void* userdata)
index cdef1ad..246920f 100644 (file)
@@ -26,6 +26,7 @@
 #include "PluginTemplate.h"
 #include <utility>
 #include <dirent.h>
+#include <dlfcn.h>
 
 using namespace am;
 
index 2e79696..dfb06ba 100644 (file)
@@ -33,6 +33,7 @@
 //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
 
 #include <dbus/dbus.h>
 #include <dlt/dlt.h>
@@ -80,6 +81,8 @@ int main(int argc, char *argv[])
        //since the plugins have been loaded by the *Senders before, we can tell the Controller this:
        iControlSender.hookAllPluginsLoaded();
 
+       iCommandSender.startupInterface(&iCommandReceiver);
+       iRoutingSender.startupRoutingInterface(&iRoutingReceiver);
 
 
        iDBusWrapper.dbusMainLoop();
index 5a2877d..8926b33 100644 (file)
@@ -16,7 +16,6 @@ set(AUDIO_INCLUDES_FOLDER ${CMAKE_SOURCE_DIR}/../includes)
 set(DBUS_INCLUDES_FOLDER ${CMAKE_SOURCE_DIR}/../dbusIncludes)
 set(INCLUDES_FOLDER ${CMAKE_SOURCE_DIR}/include)
 
-find_package (Threads)
 FIND_PACKAGE(DBUS REQUIRED)
 FIND_PACKAGE(PkgConfig)
 pkg_check_modules(DLT REQUIRED automotive-dlt)
@@ -43,11 +42,11 @@ file(GLOB PLUGINDBUS_SRCS_CXX "src/*.cpp")
 add_library(PluginCommandInterfaceDbus SHARED ${PLUGINDBUS_SRCS_CXX})
 
 TARGET_LINK_LIBRARIES(PluginCommandInterfaceDbus 
-       ${DLT_LIBRARIES}
-       ${DBUS_LIBRARY}
-       ${CMAKE_THREAD_LIBS_INIT}
+    ${DLT_LIBRARIES}
+    ${DBUS_LIBRARY}
 )
 
+add_subdirectory (test)
 
 #add a target to generate API documentation with Doxygen
 find_package(Doxygen)
@@ -24,8 +24,8 @@
 */
 
 
-#ifndef COMMANDSENDER_H_
-#define COMMANDSENDER_H_
+#ifndef DBUSCOMMANDSENDER_H_
+#define DBUSCOMMANDSENDER_H_
 
 #include "DBusMessageHandler.h"
 #include "CommandReceiverShadow.h"
@@ -105,4 +105,4 @@ private:
 
 };
 
-#endif /* COMMANDSENDER_H_ */
+#endif /* DBUSCOMMANDSENDER_H_ */
index 2e359fb..b53fb52 100644 (file)
@@ -25,7 +25,7 @@
 
 
 #include "CommandReceiverShadow.h"
-#include "CommandSender.h"
+#include "DBusCommandSender.h"
 #include "DBusWrapper.h"
 #include <audiomanagertypes.h>
 
@@ -23,7 +23,7 @@
 * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
 */
 
-#include "CommandSender.h"
+#include "DBusCommandSender.h"
 #include "DBusMessageHandler.h"
 #include "DBusWrapper.h"
 
index e6ee3f6..315a51e 100644 (file)
@@ -23,7 +23,7 @@
 * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
 */
 #include "DBusMessageHandler.h"
-#include "CommandSender.h"
+#include "DBusCommandSender.h"
 #include "DBusConfiguration.h"
 
 #include <stdlib.h>
index 5043667..3ad886d 100644 (file)
@@ -33,18 +33,21 @@ extern "C" void destroyControlPluginInterface(ControlSendInterface* controlSendI
     delete controlSendInterface;
 }
 
-ControlSenderPlugin::ControlSenderPlugin() {
-       // TODO Auto-generated constructor stub
-
+ControlSenderPlugin::ControlSenderPlugin()
+{
 }
 
-ControlSenderPlugin::~ControlSenderPlugin() {
-       // TODO Auto-generated destructor stub
+
+
+ControlSenderPlugin::~ControlSenderPlugin()
+{
 }
 
-//am_Error_e ControlSendInterface::startupController(ControlReceiveInterface* controlreceiveinterface)
-//{
-//}
+
+
+am_Error_e ControlSenderPlugin::startupController(ControlReceiveInterface *controlreceiveinterface)
+{
+}