diff options
Diffstat (limited to 'PluginRoutingInterfaceAsync')
4 files changed, 33 insertions, 0 deletions
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<am_SoundProperty_s>& 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<am_SoundProperty_s>& 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<am_SoundProperty_s> & listSoundProperties, const am_sinkID_t sinkID) +{ + //todo: implement +} + +am_Error_e am::AsyncRoutingSender::asyncSetSourceSoundProperties(const am_Handle_s handle, const std::vector<am_SoundProperty_s> & listSoundProperties, const am_sourceID_t sourceID) +{ + //todo: implement +} + std::vector<am_Gateway_s> AsyncRoutingSender::createGatewayTable() { std::vector<am_Gateway_s> 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 |