summaryrefslogtreecommitdiff
path: root/AudioManagerDaemon/src/CommandSender.cpp
diff options
context:
space:
mode:
authorchristian mueller <christian.ei.mueller@bmw.de>2012-01-10 15:58:38 +0100
committerchristian mueller <christian.ei.mueller@bmw.de>2012-01-12 00:09:34 +0100
commit472d0762b68ce0f2a755b4215515a3e031831495 (patch)
tree276e811f00dfe17cba15c56092b33d67ba2793f6 /AudioManagerDaemon/src/CommandSender.cpp
parent6ebae8c4d3a340c135ed2f5f611a0e1c31994164 (diff)
downloadaudiomanager-472d0762b68ce0f2a755b4215515a3e031831495.tar.gz
* recreated the header files out of the model. Added versioning support in the headerfiles generated
* ensured compatibility with 64 bit systems while compiling dbus [ changed FindDBUS.cmake] * updated the README to better support building * updated typo in introspectable string of DBusWrapper * reworked including strategie * added getInterfafeVersion method on all interfaces * added Interface Versioning support * added version as part of .so ending * it is no possible to set a vector of source and sink sound properties at a time * added interface to ask for all loaded plugins on RoutingSender * added first version of telnet server (not yet productive) - set to not active in CMakeLists.txt * added changelog (created out of git commit log) * added default values for all enum types to be save even on other if communication is on other domain
Diffstat (limited to 'AudioManagerDaemon/src/CommandSender.cpp')
-rw-r--r--AudioManagerDaemon/src/CommandSender.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/AudioManagerDaemon/src/CommandSender.cpp b/AudioManagerDaemon/src/CommandSender.cpp
index 7ea9ee8..92734c4 100644
--- a/AudioManagerDaemon/src/CommandSender.cpp
+++ b/AudioManagerDaemon/src/CommandSender.cpp
@@ -24,11 +24,14 @@
#include "CommandSender.h"
+#include "command/CommandReceiveInterface.h"
#include <dirent.h>
#include <dlt/dlt.h>
#include "PluginTemplate.h"
using namespace am;
+#define REQUIRED_INTERFACE_VERSION 1
+
DLT_IMPORT_CONTEXT(AudioManager)
//!< macro to call all interfaces
@@ -67,7 +70,7 @@ CommandSender::CommandSender(const std::vector<std::string>& listOfPluginDirecto
unsigned char entryType = itemInDirectory->d_type;
std::string entryName = itemInDirectory->d_name;
- bool regularFile = (entryType == DT_REG);
+ bool regularFile = (entryType == DT_REG || entryType== DT_LNK);
bool sharedLibExtension = ("so" == entryName.substr(entryName.find_last_of(".") + 1));
if (regularFile && sharedLibExtension)
@@ -104,6 +107,13 @@ CommandSender::CommandSender(const std::vector<std::string>& listOfPluginDirecto
continue;
}
+ //check libversion
+ if (commander->getInterfaceVersion()<REQUIRED_INTERFACE_VERSION)
+ {
+ DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("RoutingPlugin initialization failed. Version of Interface to old"));
+ continue;
+ }
+
mListInterfaces.push_back(commander);
mListLibraryHandles.push_back(tempLibHandle);
}
@@ -258,6 +268,13 @@ void CommandSender::unloadLibraries(void)
mListLibraryHandles.clear();
}
+uint16_t CommandSender::getInterfaceVersion() const
+{
+ return CommandSendVersion;
+}
+
+
+