From 472d0762b68ce0f2a755b4215515a3e031831495 Mon Sep 17 00:00:00 2001 From: christian mueller Date: Tue, 10 Jan 2012 15:58:38 +0100 Subject: * 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 --- PluginRoutingInterfaceAsync/CMakeLists.txt | 9 +++++++++ PluginRoutingInterfaceAsync/include/RoutingSenderAsyn.h | 3 +++ PluginRoutingInterfaceAsync/src/RoutingSenderAsync.cpp | 15 +++++++++++++++ PluginRoutingInterfaceAsync/test/mocklnterfaces.h | 6 ++++++ 4 files changed, 33 insertions(+) (limited to 'PluginRoutingInterfaceAsync') diff --git a/PluginRoutingInterfaceAsync/CMakeLists.txt b/PluginRoutingInterfaceAsync/CMakeLists.txt index 4aff03a..f2d6403 100644 --- a/PluginRoutingInterfaceAsync/CMakeLists.txt +++ b/PluginRoutingInterfaceAsync/CMakeLists.txt @@ -28,6 +28,11 @@ set(LIBRARY_OUTPUT_PATH ${PLUGINS_OUTPUT_PATH}/routing) set(DOC_OUTPUT_PATH ${DOC_OUTPUT_PATH}/RoutingAsync) set(INCLUDES_FOLDER "include") +FILE(READ "${AUDIO_INCLUDES_FOLDER}/routing/RoutingSendInterface.h" VERSION_BUFFER LIMIT 6000) +STRING(REGEX MATCH "RoutingSendVersion*.[^0-9]*[0-9]" LIB_INTERFACE_VERSION_STRING ${VERSION_BUFFER}) +STRING(REGEX REPLACE "[^0-9]" "" LIB_INTERFACE_VERSION ${LIB_INTERFACE_VERSION_STRING}) +MESSAGE(STATUS "Building against routing interface version ${LIB_INTERFACE_VERSION}") + find_package( Threads ) FIND_PACKAGE(DBUS REQUIRED) @@ -46,6 +51,10 @@ file(GLOB PLUGINDBUS_SRCS_CXX "src/*.cpp") add_library(PluginRoutingInterfaceAsync SHARED ${PLUGINDBUS_SRCS_CXX}) +SET_TARGET_PROPERTIES(PluginRoutingInterfaceAsync PROPERTIES + SOVERSION "${LIB_INTERFACE_VERSION}" +) + TARGET_LINK_LIBRARIES(PluginRoutingInterfaceAsync ${DLT_LIBRARIES} ${DBUS_LIBRARY} diff --git a/PluginRoutingInterfaceAsync/include/RoutingSenderAsyn.h b/PluginRoutingInterfaceAsync/include/RoutingSenderAsyn.h index 1c6e85e..ad76d52 100644 --- a/PluginRoutingInterfaceAsync/include/RoutingSenderAsyn.h +++ b/PluginRoutingInterfaceAsync/include/RoutingSenderAsyn.h @@ -136,10 +136,13 @@ public: am_Error_e asyncSetSourceVolume(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time) ; am_Error_e asyncSetSourceState(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SourceState_e state) ; am_Error_e asyncSetSinkSoundProperty(const am_Handle_s handle, const am_SoundProperty_s& soundProperty, const am_sinkID_t sinkID) ; + am_Error_e asyncSetSinkSoundProperties(const am_Handle_s handle, const std::vector& listSoundProperties, const am_sinkID_t sinkID) ; am_Error_e asyncSetSourceSoundProperty(const am_Handle_s handle, const am_SoundProperty_s& soundProperty, const am_sourceID_t sourceID) ; + am_Error_e asyncSetSourceSoundProperties(const am_Handle_s handle, const std::vector& listSoundProperties, const am_sourceID_t sourceID) ; am_Error_e asyncCrossFade(const am_Handle_s handle, const am_crossfaderID_t crossfaderID, const am_HotSink_e hotSink, const am_RampType_e rampType, const am_time_t time) ; am_Error_e setDomainState(const am_domainID_t domainID, const am_DomainState_e domainState) ; am_Error_e returnBusName(std::string& BusName) const ; + uint16_t getInterfaceVersion() const; /** * threadafe insert of route and connectionID diff --git a/PluginRoutingInterfaceAsync/src/RoutingSenderAsync.cpp b/PluginRoutingInterfaceAsync/src/RoutingSenderAsync.cpp index fcf017e..c8d648e 100644 --- a/PluginRoutingInterfaceAsync/src/RoutingSenderAsync.cpp +++ b/PluginRoutingInterfaceAsync/src/RoutingSenderAsync.cpp @@ -961,6 +961,21 @@ void am::AsyncRoutingSender::updateDomainstateSafe(am_domainID_t domainID, am_Do pthread_mutex_unlock(&mDomainsMutex); } +uint16_t AsyncRoutingSender::getInterfaceVersion() const +{ + return (RoutingSendVersion); +} + +am_Error_e am::AsyncRoutingSender::asyncSetSinkSoundProperties(const am_Handle_s handle, const std::vector & listSoundProperties, const am_sinkID_t sinkID) +{ + //todo: implement +} + +am_Error_e am::AsyncRoutingSender::asyncSetSourceSoundProperties(const am_Handle_s handle, const std::vector & listSoundProperties, const am_sourceID_t sourceID) +{ + //todo: implement +} + std::vector AsyncRoutingSender::createGatewayTable() { std::vector table; diff --git a/PluginRoutingInterfaceAsync/test/mocklnterfaces.h b/PluginRoutingInterfaceAsync/test/mocklnterfaces.h index 55f0603..9241dc0 100644 --- a/PluginRoutingInterfaceAsync/test/mocklnterfaces.h +++ b/PluginRoutingInterfaceAsync/test/mocklnterfaces.h @@ -41,8 +41,12 @@ class MockRoutingReceiveInterface : public RoutingReceiveInterface { void(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error)); MOCK_METHOD2(ackSetSourceState, void(const am_Handle_s handle, const am_Error_e error)); + MOCK_METHOD2(ackSetSinkSoundProperties, + void(const am_Handle_s handle, const am_Error_e error)); MOCK_METHOD2(ackSetSinkSoundProperty, void(const am_Handle_s handle, const am_Error_e error)); + MOCK_METHOD2(ackSetSourceSoundProperties, + void(const am_Handle_s handle, const am_Error_e error)); MOCK_METHOD2(ackSetSourceSoundProperty, void(const am_Handle_s handle, const am_Error_e error)); MOCK_METHOD3(ackCrossFading, @@ -99,6 +103,8 @@ class MockRoutingReceiveInterface : public RoutingReceiveInterface { am_Error_e(DBusWrapper*& dbusConnectionWrapper)); MOCK_CONST_METHOD1(getSocketHandler, am_Error_e(SocketHandler*& socketHandler)); + MOCK_CONST_METHOD0(getInterfaceVersion, + uint16_t()); }; } // namespace am -- cgit v1.2.1