summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AudioManagerDaemon/test/telnetserver/CAmTelnetServerTest.cpp26
-rw-r--r--AudioManagerDaemon/test/telnetserver/CAmTelnetServerTest.h17
-rw-r--r--CHANGELOG6
-rw-r--r--CMakeLists.txt2
-rw-r--r--includes/config.h8
5 files changed, 48 insertions, 11 deletions
diff --git a/AudioManagerDaemon/test/telnetserver/CAmTelnetServerTest.cpp b/AudioManagerDaemon/test/telnetserver/CAmTelnetServerTest.cpp
index 259f7b3..46a0c40 100644
--- a/AudioManagerDaemon/test/telnetserver/CAmTelnetServerTest.cpp
+++ b/AudioManagerDaemon/test/telnetserver/CAmTelnetServerTest.cpp
@@ -10,6 +10,18 @@
namespace am {
CAmTelnetServerTest::CAmTelnetServerTest()
+: mlistRoutingPluginDirs()
+, mlistCommandPluginDirs()
+, mSocketHandler()
+, mDatabasehandler(std::string(":memory:"))
+, mRoutingSender(mlistRoutingPluginDirs)
+, mCommandSender(mlistRoutingPluginDirs)
+, mControlSender(std::string(""))
+, mRouter(&mDatabasehandler,&mControlSender)
+, mCommandReceiver(&mDatabasehandler,&mControlSender,&mSocketHandler)
+, mRoutingReceiver(&mDatabasehandler,&mRoutingSender,&mControlSender,&mSocketHandler)
+, mControlReceiver(&mDatabasehandler,&mRoutingSender,&mCommandSender,&mSocketHandler,&mRouter)
+, mTelnetServer(&mSocketHandler,&mCommandSender,&mCommandReceiver,&mRoutingSender,&mRoutingReceiver,&mControlSender,&mControlReceiver,&mDatabasehandler,&mRouter)
{
// TODO Auto-generated constructor stub
@@ -20,4 +32,18 @@ CAmTelnetServerTest::~CAmTelnetServerTest()
// TODO Auto-generated destructor stub
}
+CAmTelnetServerTest::SetUp()
+{
+ //startup all the Plugins and Interfaces
+ mControlSender.startupController(&iControlReceiver);
+ mCommandSender.startupInterface(&iCommandReceiver);
+ mRoutingSender.startupRoutingInterface(&iRoutingReceiver);
+
+ //when the routingInterface is done, all plugins are loaded:
+ mControlSender.hookAllPluginsLoaded();
+
+ mSocketHandler.start_listenting();
+
+}
+
}
diff --git a/AudioManagerDaemon/test/telnetserver/CAmTelnetServerTest.h b/AudioManagerDaemon/test/telnetserver/CAmTelnetServerTest.h
index 6fa5373..aa8e5ba 100644
--- a/AudioManagerDaemon/test/telnetserver/CAmTelnetServerTest.h
+++ b/AudioManagerDaemon/test/telnetserver/CAmTelnetServerTest.h
@@ -9,6 +9,7 @@
#define CAMTELNETSERVERTEST_H_
#include "gtest/gtest.h"
+#include "TelnetServer.h"
namespace am {
@@ -23,6 +24,22 @@ class CAmTelnetServerTest : public ::testing::Test{
virtual void TearDown() ;
+ std::vector<std::string> mlistRoutingPluginDirs;
+ std::vector<std::string> mlistCommandPluginDirs;
+
+ SocketHandler mSocketHandler;
+ DatabaseHandler mDatabasehandler;
+ RoutingSender mRoutingSender;
+ CommandSender mCommandSender;
+ ControlSender mControlSender;
+ Router mRouter;
+
+ CommandReceiver mCommandReceiver;
+ RoutingReceiver mRoutingReceiver;
+ ControlReceiver mControlReceiver;
+
+ TelnetServer mTelnetServer;
+
};
}
diff --git a/CHANGELOG b/CHANGELOG
index a342dc1..53be9ab 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -41,12 +41,6 @@ Author: christian mueller <christian.ei.mueller@bmw.de>
* renaming of databasetest - copy paste fault
-commit 3a11cd051607c19d91a0eb8118fac87e937de929
-Author: Grape R5 <demo@ubuntu.(none)>
-
- * TelnetServer Implementation.
- * TelnetServerTest Implementation
-
commit 8a2db276ede7516038eb5d2bf13b89cc3ff185a7
Author: christian mueller <christian.ei.mueller@bmw.de>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 89cc21c..fa32b52 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -57,7 +57,7 @@ OPTION( WITH_PPOLL
"libc supports ppoll" ON)
OPTION( WITH_TELNET
- "build with Telnetserver" OFF)
+ "build with Telnetserver" ON)
OPTION ( USE_BUILD_LIBS
"build with default library path = build path" ON)
diff --git a/includes/config.h b/includes/config.h
index 3622741..cf57fd6 100644
--- a/includes/config.h
+++ b/includes/config.h
@@ -10,9 +10,9 @@
#define WITH_TELNET
#define GLIB_DBUS_TYPES_TOLERANT
-#define DEFAULT_PLUGIN_COMMAND_DIR "/home/christian/workspace/AudioManager/bin/plugins/command"
-#define DEFAULT_PLUGIN_ROUTING_DIR "/home/christian/workspace/AudioManager/bin/plugins/routing"
-#define CONTROLLER_PLUGIN "/home/christian/workspace/AudioManager/bin/plugins/control/libPluginControlInterface.so"
+#define DEFAULT_PLUGIN_COMMAND_DIR "/home/demo/git/AudioManager/bin/plugins/command"
+#define DEFAULT_PLUGIN_ROUTING_DIR "/home/demo/git/AudioManager/bin/plugins/routing"
+#define CONTROLLER_PLUGIN "/home/demo/git/AudioManager/bin/plugins/control/libPluginControlInterface.so"
#define DEFAULT_TELNETPORT 6060
#define MAX_TELNETCONNECTIONS 3
@@ -20,6 +20,6 @@
#define DBUS_SERVICE_PREFIX "org.genivi.audiomanager"
#define DBUS_SERVICE_OBJECT_PATH "/org/genivi/audiomanager"
-#define INTROSPECTION_COMMAND_XML_FILE "/home/christian/workspace/AudioManager/includes/dbus/CommandInterface.xml"
+#define INTROSPECTION_COMMAND_XML_FILE "/home/demo/git/AudioManager/includes/dbus/CommandInterface.xml"
#endif /* _CONFIG_H */