summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksandar Donchev <aleksander.donchev@partner.bmw.de>2013-09-02 11:57:28 +0200
committerChristian Linke <Christian.Linke@bmw.de>2013-09-03 17:26:04 +0200
commita2edae5cee4254b933f42399edc0e092abd4f5cf (patch)
treeead58f525b947deed4b8c76ab9c89c80b5056227
parent7aee1baeea1777318932cc49a8eac18f194233cd (diff)
downloadaudiomanager-a2edae5cee4254b933f42399edc0e092abd4f5cf.tar.gz
*PluginCommandInterfaceCAPI, PluginRoutingInterfaceCAPI, NodeStateCommunicatorCAPI with unit tests first version.
Choosing between DBUS and Common-API via cmake. CommonAPI - legacy support for DBus properties (Set 1) Signed-off-by: Christian Linke <christian.linke@bmw.de> (cherry picked from commit ea96ef59e29466667c90b506426e2a5a9cdb82d2)
-rw-r--r--AudioManagerDaemon/CMakeLists.txt84
-rw-r--r--AudioManagerDaemon/fidls/NodeStateAccessStub_model_org.genivi.NodeStateManager.Consumer.fdepl6
-rwxr-xr-xAudioManagerDaemon/fidls/NodeStateAccessStub_model_org.genivi.NodeStateManager.Consumer.fidl127
-rwxr-xr-xAudioManagerDaemon/fidls/NodeStateAccessStub_model_org.genivi.NodeStateManager.LifecycleConsumer.fidl16
-rwxr-xr-xAudioManagerDaemon/fidls/NodeStateManager_dbus.conf33
-rwxr-xr-xAudioManagerDaemon/fidls/amTypes.fidl330
-rw-r--r--AudioManagerDaemon/include/CAmNodeStateCommunicator.h66
-rw-r--r--AudioManagerDaemon/include/CAmNodeStateCommunicatorCAPI.h101
-rw-r--r--AudioManagerDaemon/include/CAmNodeStateCommunicatorDBus.h63
-rw-r--r--AudioManagerDaemon/include/TAmPluginTemplate.h3
-rw-r--r--AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/Consumer.h70
-rw-r--r--AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerDBusProxy.cpp292
-rw-r--r--AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerDBusProxy.h114
-rw-r--r--AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerDBusStubAdapter.cpp374
-rw-r--r--AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerDBusStubAdapter.h68
-rw-r--r--AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerProxy.h619
-rw-r--r--AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerProxyBase.h114
-rw-r--r--AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerStub.h170
-rw-r--r--AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerStubDefault.cpp240
-rw-r--r--AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerStubDefault.h141
-rw-r--r--AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumer.h70
-rw-r--r--AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerDBusProxy.cpp82
-rw-r--r--AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerDBusProxy.h68
-rw-r--r--AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerDBusStubAdapter.cpp82
-rw-r--r--AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerDBusStubAdapter.h61
-rw-r--r--AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerProxy.h166
-rw-r--r--AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerProxyBase.h58
-rw-r--r--AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerStub.h93
-rw-r--r--AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerStubDefault.cpp51
-rw-r--r--AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerStubDefault.h74
-rw-r--r--AudioManagerDaemon/src/CAmCommonAPIWrapper.cpp275
-rw-r--r--AudioManagerDaemon/src/CAmDatabaseHandlerMap.cpp2
-rw-r--r--AudioManagerDaemon/src/CAmDbusWrapper.cpp2
-rw-r--r--AudioManagerDaemon/src/CAmNodeStateCommunicatorCAPI.cpp361
-rw-r--r--AudioManagerDaemon/src/CAmNodeStateCommunicatorDBus.cpp (renamed from AudioManagerDaemon/src/CAmNodeStateCommunicator.cpp)163
-rw-r--r--AudioManagerDaemon/src/CAmRoutingReceiver.cpp4
-rwxr-xr-xAudioManagerDaemon/src/main.cpp45
-rw-r--r--AudioManagerDaemon/test/AmControlInterfaceTest/CMakeLists.txt2
-rw-r--r--AudioManagerDaemon/test/AmDatabaseHandlerTest/CMakeLists.txt2
-rw-r--r--AudioManagerDaemon/test/AmMapHandlerTest/CMakeLists.txt2
-rw-r--r--AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/CAmNodeStateCommunicatorTest.cpp262
-rw-r--r--AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/CAmNodeStateCommunicatorTest.h65
-rw-r--r--AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/CMakeLists.txt119
-rw-r--r--AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/nsm.py179
-rw-r--r--AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/org.genivi.NodeStateManager.Consumer.xml (renamed from AudioManagerDaemon/test/AmNodeStateCommunicatorTest/org.genivi.NodeStateManager.Consumer.xml)0
-rw-r--r--AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/send2nsm.py (renamed from AudioManagerDaemon/test/AmNodeStateCommunicatorTest/send2nsm.py)0
-rw-r--r--AudioManagerDaemon/test/AmNodeStateCommunicatorDBusTest/CAmNodeStateCommunicatorTest.cpp (renamed from AudioManagerDaemon/test/AmNodeStateCommunicatorTest/CAmNodeStateCommunicatorTest.cpp)7
-rw-r--r--AudioManagerDaemon/test/AmNodeStateCommunicatorDBusTest/CAmNodeStateCommunicatorTest.h (renamed from AudioManagerDaemon/test/AmNodeStateCommunicatorTest/CAmNodeStateCommunicatorTest.h)4
-rw-r--r--AudioManagerDaemon/test/AmNodeStateCommunicatorDBusTest/CMakeLists.txt (renamed from AudioManagerDaemon/test/AmNodeStateCommunicatorTest/CMakeLists.txt)12
-rw-r--r--AudioManagerDaemon/test/AmNodeStateCommunicatorDBusTest/nsm.py (renamed from AudioManagerDaemon/test/AmNodeStateCommunicatorTest/nsm.py)0
-rw-r--r--AudioManagerDaemon/test/AmNodeStateCommunicatorDBusTest/org.genivi.NodeStateManager.Consumer.xml259
-rw-r--r--AudioManagerDaemon/test/AmNodeStateCommunicatorDBusTest/send2nsm.py68
-rw-r--r--AudioManagerDaemon/test/AmRouterMapTest/CMakeLists.txt6
-rw-r--r--AudioManagerDaemon/test/AmRouterTest/CMakeLists.txt6
-rw-r--r--AudioManagerDaemon/test/AmRoutingInterfaceTest/CMakeLists.txt6
-rw-r--r--AudioManagerDaemon/test/AmTelnetServerTest/CMakeLists.txt6
-rw-r--r--AudioManagerDaemon/test/CAmCommonFunctions.cpp2
-rw-r--r--AudioManagerDaemon/test/CMakeLists.txt7
-rwxr-xr-xCMakeLists.txt65
-rw-r--r--PluginCommandInterfaceCAPI/CMakeLists.txt99
-rw-r--r--PluginCommandInterfaceCAPI/cmake/config.cmake4
-rw-r--r--PluginCommandInterfaceCAPI/fidl/CommandInterface.fdepl6
-rwxr-xr-xPluginCommandInterfaceCAPI/fidl/CommandInterface.fidl723
-rw-r--r--PluginCommandInterfaceCAPI/fidl/PluginCommandInterfaceCAPI_dbus.conf8
-rwxr-xr-xPluginCommandInterfaceCAPI/fidl/amTypes.fidl329
-rw-r--r--PluginCommandInterfaceCAPI/include/CAmCommandSenderCAPI.h120
-rw-r--r--PluginCommandInterfaceCAPI/include/CAmCommandSenderCommon.h61
-rw-r--r--PluginCommandInterfaceCAPI/include/CAmCommandSenderService.h74
-rw-r--r--PluginCommandInterfaceCAPI/include/configCommandCAPI.h4
-rw-r--r--PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterface.cpp332
-rw-r--r--PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterface.h820
-rw-r--r--PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceDBusProxy.cpp458
-rw-r--r--PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceDBusProxy.h157
-rw-r--r--PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceDBusStubAdapter.cpp521
-rw-r--r--PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceDBusStubAdapter.h79
-rw-r--r--PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceProxy.h794
-rw-r--r--PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceProxyBase.h170
-rw-r--r--PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceStub.h282
-rw-r--r--PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceStubDefault.cpp177
-rw-r--r--PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceStubDefault.h124
-rw-r--r--PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/am.cpp477
-rw-r--r--PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/am.h1515
-rw-r--r--PluginCommandInterfaceCAPI/src/CAmCommandSenderCAPI.cpp364
-rw-r--r--PluginCommandInterfaceCAPI/src/CAmCommandSenderCommon.cpp159
-rw-r--r--PluginCommandInterfaceCAPI/src/CAmCommandSenderService.cpp236
-rw-r--r--PluginCommandInterfaceCAPI/test/CAmCommandSenderCAPITest.cpp1101
-rw-r--r--PluginCommandInterfaceCAPI/test/CAmCommandSenderCAPITest.h77
-rw-r--r--PluginCommandInterfaceCAPI/test/CAmTestCAPIWrapper.cpp31
-rw-r--r--PluginCommandInterfaceCAPI/test/CAmTestCAPIWrapper.h32
-rw-r--r--PluginCommandInterfaceCAPI/test/CMakeLists.txt105
-rw-r--r--PluginCommandInterfaceCAPI/test/MockIAmCommandReceive.h86
-rw-r--r--PluginCommandInterfaceCAPI/test/MockNotificationsClient.h110
-rw-r--r--PluginCommandInterfaceDbus/CMakeLists.txt2
-rw-r--r--PluginCommandInterfaceDbus/include/CAmCommandSenderDbus.h2
-rw-r--r--PluginCommandInterfaceDbus/include/configCommandDbus.h4
-rw-r--r--PluginControlInterface/CMakeLists.txt2
-rw-r--r--PluginRoutingInterfaceAsync/CMakeLists.txt2
-rw-r--r--PluginRoutingInterfaceAsync/src/CAmRoutingSenderAsync.cpp17
-rw-r--r--PluginRoutingInterfaceCAPI/CMakeLists.txt97
-rw-r--r--PluginRoutingInterfaceCAPI/cmake/config.cmake6
-rwxr-xr-xPluginRoutingInterfaceCAPI/fidl/PluginRoutingInterfaceCAPI_dbus.conf8
-rw-r--r--PluginRoutingInterfaceCAPI/fidl/RoutingInterface.fidl462
-rwxr-xr-xPluginRoutingInterfaceCAPI/fidl/RoutingSender.fidl158
-rwxr-xr-xPluginRoutingInterfaceCAPI/fidl/amTypes.fidl399
-rw-r--r--PluginRoutingInterfaceCAPI/fidl/deployment.fdepl9
-rw-r--r--PluginRoutingInterfaceCAPI/include/CAmLookupData.h204
-rw-r--r--PluginRoutingInterfaceCAPI/include/CAmRoutingSenderCAPI.h103
-rw-r--r--PluginRoutingInterfaceCAPI/include/CAmRoutingSenderCommon.h59
-rw-r--r--PluginRoutingInterfaceCAPI/include/CAmRoutingService.h148
-rw-r--r--PluginRoutingInterfaceCAPI/include/configRoutingCAPI.h6
-rw-r--r--PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterface.h66
-rw-r--r--PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceDBusProxy.cpp920
-rw-r--r--PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceDBusProxy.h201
-rw-r--r--PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceDBusStubAdapter.cpp562
-rw-r--r--PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceDBusStubAdapter.h59
-rw-r--r--PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceProxy.h1594
-rw-r--r--PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceProxyBase.h242
-rw-r--r--PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceStub.h198
-rw-r--r--PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceStubDefault.cpp229
-rw-r--r--PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceStubDefault.h160
-rw-r--r--PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSender.h66
-rw-r--r--PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderDBusProxy.cpp344
-rw-r--r--PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderDBusProxy.h106
-rw-r--r--PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderDBusStubAdapter.cpp237
-rw-r--r--PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderDBusStubAdapter.h57
-rw-r--r--PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderProxy.h611
-rw-r--r--PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderProxyBase.h116
-rw-r--r--PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderStub.h123
-rw-r--r--PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderStubDefault.cpp103
-rw-r--r--PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderStubDefault.h98
-rw-r--r--PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/am_gen.cpp587
-rw-r--r--PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/am_gen.h1764
-rw-r--r--PluginRoutingInterfaceCAPI/src/CAmLookupData.cpp669
-rw-r--r--PluginRoutingInterfaceCAPI/src/CAmRoutingSenderCAPI.cpp266
-rw-r--r--PluginRoutingInterfaceCAPI/src/CAmRoutingSenderCommon.cpp282
-rw-r--r--PluginRoutingInterfaceCAPI/src/CAmRoutingService.cpp435
-rw-r--r--PluginRoutingInterfaceCAPI/test/CAmRoutingInterfaceCAPITests.cpp2269
-rw-r--r--PluginRoutingInterfaceCAPI/test/CAmRoutingInterfaceCAPITests.h104
-rw-r--r--PluginRoutingInterfaceCAPI/test/CAmRoutingSenderService.cpp225
-rw-r--r--PluginRoutingInterfaceCAPI/test/CAmRoutingSenderService.h112
-rw-r--r--PluginRoutingInterfaceCAPI/test/CAmTestCAPIWrapper.cpp31
-rw-r--r--PluginRoutingInterfaceCAPI/test/CAmTestCAPIWrapper.h32
-rw-r--r--PluginRoutingInterfaceCAPI/test/CMakeLists.txt135
-rw-r--r--PluginRoutingInterfaceCAPI/test/IAmRoutingSenderBackdoor.cpp87
-rw-r--r--PluginRoutingInterfaceCAPI/test/IAmRoutingSenderBackdoor.h53
-rw-r--r--PluginRoutingInterfaceCAPI/test/MockIAmRoutingReceive.h126
-rwxr-xr-xPluginRoutingInterfaceCAPI/test/RoutingSender_dbus.conf8
-rwxr-xr-xPluginRoutingInterfaceCAPI/test/cmake/AmRoutingInterfaceCAPITests_dbus.conf.in3
-rw-r--r--PluginRoutingInterfaceCAPI/test/cmake/CAmRoutingSenderService.h.in112
-rwxr-xr-xPluginRoutingInterfaceCAPI/test/cmake/RoutingSender_dbus.conf.in8
-rw-r--r--PluginRoutingInterfaceCAPI/test/cmake/config.cmake8
-rw-r--r--PluginRoutingInterfaceDbus/CMakeLists.txt4
-rw-r--r--PluginRoutingInterfaceDbus/include/CAmRoutingSenderDbus.h3
-rw-r--r--PluginRoutingInterfaceDbus/include/RoutingReceiver.xml9
-rw-r--r--PluginRoutingInterfaceDbus/include/configRoutingDbus.h2
-rw-r--r--PluginRoutingInterfaceDbus/src/CAmRoutingSenderDbus.cpp42
-rw-r--r--PluginRoutingInterfaceDbus/src/IAmRoutingReceiverShadow.cpp3
-rw-r--r--cmake/FindCommonAPI.cmake102
-rw-r--r--cmake/FindCommonAPI_DBus.cmake85
-rw-r--r--cmake/config.cmake2
-rw-r--r--[-rwxr-xr-x]include/projecttypes.h93
-rw-r--r--include/shared/CAmCommonAPIWrapper.h142
162 files changed, 30742 insertions, 243 deletions
diff --git a/AudioManagerDaemon/CMakeLists.txt b/AudioManagerDaemon/CMakeLists.txt
index 66931f7..c122841 100644
--- a/AudioManagerDaemon/CMakeLists.txt
+++ b/AudioManagerDaemon/CMakeLists.txt
@@ -44,6 +44,11 @@ ENDIF(WITH_DBUS_WRAPPER)
FIND_PACKAGE(NSM REQUIRED)
+IF(WITH_CAPI_WRAPPER)
+ FIND_PACKAGE(CommonAPI REQUIRED)
+ FIND_PACKAGE(CommonAPI_DBus REQUIRED)
+ENDIF(WITH_CAPI_WRAPPER)
+
SET(AUDIOMAN_SRCS_CXX
src/main.cpp
src/CAmCommandReceiver.cpp
@@ -56,6 +61,7 @@ SET(AUDIOMAN_SRCS_CXX
src/CAmRouter.cpp
src/CAmSocketHandler.cpp
src/CAmDltWrapper.cpp
+ src/CAmLog.cpp
)
# Preallocation variable for the map.
@@ -95,11 +101,25 @@ IF(WITH_DBUS_WRAPPER)
)
ENDIF(WITH_DBUS_WRAPPER)
-IF(WITH_NSM)
+IF(WITH_CAPI_WRAPPER)
SET (AUDIOMAN_SRCS_CXX
${AUDIOMAN_SRCS_CXX}
- src/CAmNodeStateCommunicator.cpp
+ src/CAmCommonAPIWrapper.cpp
)
+ENDIF(WITH_CAPI_WRAPPER)
+
+IF(WITH_NSM)
+ IF(WITH_DBUS_WRAPPER)
+ SET (AUDIOMAN_SRCS_CXX
+ ${AUDIOMAN_SRCS_CXX}
+ src/CAmNodeStateCommunicatorDBus.cpp
+ )
+ ELSE(WITH_DBUS_WRAPPER)
+ SET (AUDIOMAN_SRCS_CXX
+ ${AUDIOMAN_SRCS_CXX}
+ src/CAmNodeStateCommunicatorCAPI.cpp
+ )
+ ENDIF(WITH_DBUS_WRAPPER)
ENDIF(WITH_NSM)
IF(WITH_DATABASE_STORAGE)
@@ -123,6 +143,14 @@ INCLUDE_DIRECTORIES(
${NSM_INCLUDE_DIR}
)
+IF(WITH_CAPI_WRAPPER)
+INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES}
+ ${COMMON_API_INCLUDE_DIRS}
+ ${COMMON_API_DBUS_INCLUDE_DIRS}
+ ${COMMON_API_GEN_INCLUDE_DIR}
+)
+ENDIF(WITH_CAPI_WRAPPER)
+
IF(WITH_DLT)
INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES}
${DLT_INCLUDE_DIRS}
@@ -136,22 +164,27 @@ INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES}
)
ENDIF(WITH_DBUS_WRAPPER)
-ADD_EXECUTABLE(AudioManager ${AUDIOMAN_SRCS_CXX})
+file(GLOB ${AUDIOMAN_SRCS_CXX} ${COMMON_API_GEN_SOURCES})
-IF(WITH_DBUS_WRAPPER)
+ADD_EXECUTABLE(AudioManager ${AUDIOMAN_SRCS_CXX} ${COMMON_API_GEN_SOURCES})
+
+TARGET_LINK_LIBRARIES(AudioManager
+ ${SQLITE_LIBRARIES}
+ ${CMAKE_DL_LIBS}
+ )
+
+ IF(WITH_DBUS_WRAPPER)
TARGET_LINK_LIBRARIES(AudioManager
- ${SQLITE_LIBRARIES}
- ${CMAKE_DL_LIBS}
${DBUS_LIBRARY}
rt
)
-ELSE(WITH_DBUS_WRAPPER)
+ELSEIF(WITH_CAPI_WRAPPER)
TARGET_LINK_LIBRARIES(AudioManager
- ${SQLITE_LIBRARIES}
- ${CMAKE_DL_LIBS}
+ ${COMMON_API_LIBRARIES}
+ ${COMMON_API_DBUS_LIBRARIES}
rt
)
-ENDIF(WITH_DBUS_WRAPPER)
+ENDIF()
IF(WITH_DLT)
TARGET_LINK_LIBRARIES(AudioManager
@@ -165,14 +198,18 @@ IF (SYSTEMD_FOUND)
)
ENDIF (SYSTEMD_FOUND)
-#IF(WITH_DOCUMENTATION)
-# file(MAKE_DIRECTORY ${DOC_OUTPUT_PATH})
-# configure_file(${DOXY_FILE} ${DOC_OUTPUT_PATH}/Doxyfile @ONLY IMMEDIATE)
-# add_custom_target (Docs ALL
-# COMMAND ${DOXYGEN_EXECUTABLE} ${DOC_OUTPUT_PATH}/Doxyfile WORKING_DIRECTORY ${DOC_OUTPUT_PATH}
-# SOURCES ${PROJECT_BINARY_DIR} ${DOC_OUTPUT_PATH}/Doxyfile
-# )
-#ENDIF(WITH_DOCUMENTATION)
+IF(WITH_CAPI_WRAPPER)
+ IF(WITH_NSM)
+ INSERT_DBUS_CONF_IF_NEEDED("@NSM_DBUS_CONF@"
+ "${CMAKE_SOURCE_DIR}/AudioManagerDaemon/fidls/NodeStateManager_dbus.conf"
+ NSM_DBUS_CONF)
+ ENDIF(WITH_NSM)
+# Generates the dbus configuration file. Every component is responsible to append it dbus configuration part.
+CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/AudioManagerDaemon/fidls/AudioManager_dbus.conf.in ${CMAKE_SOURCE_DIR}/AudioManagerDaemon/fidls/AudioManager_dbus.conf)
+CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/AudioManagerDaemon/fidls/AudioManager_dbus.conf.in ${CMAKE_BINARY_DIR}/AudioManager_dbus.conf)
+
+ENDIF(WITH_CAPI_WRAPPER)
+
INSTALL(TARGETS AudioManager
RUNTIME
@@ -191,11 +228,12 @@ IF(WITH_NSM)
SET(NSM_INTROSPECTION_FILE ${EXECUTABLE_OUTPUT_PATH}/LifeCycleConsumer.xml)
execute_process(
COMMAND mkdir -p "${CMAKE_SOURCE_DIR}/bin"
- COMMAND cp "${CMAKE_SOURCE_DIR}/cmake/LifecycleConsumer.xml" ${NSM_INTROSPECTION_FILE})
+ COMMAND cp "${CMAKE_SOURCE_DIR}/cmake/LifecycleConsumer.xml" ${NSM_INTROSPECTION_FILE}
+ COMMAND cp "${CMAKE_BINARY_DIR}/AudioManager_dbus.conf" ${EXECUTABLE_OUTPUT_PATH})
ELSE(USE_BUILD_LIBS)
- SET(NSM_INTROSPECTION_FILE ${CMAKE_INSTALL_PREFIX}/share/audiomanager/LifeCycleConsumer.xml)
+ SET(NSM_INTROSPECTION_FILE ${CMAKE_INSTALL_PREFIX}/share/audiomanager/LifecycleConsumer.xml)
INSTALL(
- FILES ${CMAKE_SOURCE_DIR}/cmake/LifecycleConsumer.xml
+ FILES ${CMAKE_SOURCE_DIR}/cmake/LifecycleConsumer.xml #${CMAKE_BINARY_DIR}/AudioManager_dbus.conf
DESTINATION "${NSM_INTROSPECTION_FILE}"
COMPONENT bin)
ENDIF(USE_BUILD_LIBS)
@@ -219,11 +257,13 @@ ENDIF(WITH_DLT)
IF(WITH_DBUS_WRAPPER)
SET(ADD_DEPEND_BIN_PROP ${ADD_DEPEND_BIN_PROP} "libdbus-1-3(>=1.2.16)")
-ENDIF()
+ENDIF(WITH_DBUS_WRAPPER)
# Additional Dev packet dependency
SET(ADD_DEPEND_DEV_PROP "audiomanager-bin" ${ADD_DEPEND_BIN_PROP})
+set(CMAKE_CXX_FLAGS_RELEASE "-O2 -fno-common -fno-strict-aliasing -DNDEBUG")
+
MESSAGE(STATUS "bin packet dependency: ${ADD_DEPEND_BIN_PROP}")
MESSAGE(STATUS "dev dependency: ${ADD_DEPEND_DEV_PROP}")
diff --git a/AudioManagerDaemon/fidls/NodeStateAccessStub_model_org.genivi.NodeStateManager.Consumer.fdepl b/AudioManagerDaemon/fidls/NodeStateAccessStub_model_org.genivi.NodeStateManager.Consumer.fdepl
new file mode 100644
index 0000000..b92bb71
--- /dev/null
+++ b/AudioManagerDaemon/fidls/NodeStateAccessStub_model_org.genivi.NodeStateManager.Consumer.fdepl
@@ -0,0 +1,6 @@
+import "platform:/plugin/org.genivi.commonapi.dbus/deployment/deployment.fdepl"
+import "NodeStateAccessStub_model_org.genivi.NodeStateManager.Consumer.fidl"
+
+define org.genivi.commonapi.dbus.deployment.deployment for interface org.genivi.NodeStateManager.Consumer.Consumer {
+ PropertiesType=freedesktop
+}
diff --git a/AudioManagerDaemon/fidls/NodeStateAccessStub_model_org.genivi.NodeStateManager.Consumer.fidl b/AudioManagerDaemon/fidls/NodeStateAccessStub_model_org.genivi.NodeStateManager.Consumer.fidl
new file mode 100755
index 0000000..6e6f224
--- /dev/null
+++ b/AudioManagerDaemon/fidls/NodeStateAccessStub_model_org.genivi.NodeStateManager.Consumer.fidl
@@ -0,0 +1,127 @@
+package org.genivi.NodeStateManager.Consumer
+
+//interface org.genivi.NodeStateManager.Consumer {
+interface Consumer {
+
+ version { major 0 minor 1 }
+
+ attribute Int32 RestartReason
+
+ attribute Int32 ShutdownReason
+
+ attribute Int32 WakeUpReason
+
+ attribute Int32 BootMode
+
+ method GetNodeState {
+ out {
+ Int32 NodeStateId
+ Int32 ErrorCode
+ }
+ }
+ method SetSessionState {
+ in {
+ String SessionName
+ String SessionOwner
+ Int32 SeatID
+ Int32 SessionState
+ }
+ out {
+ Int32 ErrorCode
+ }
+ }
+ method GetSessionState {
+ in {
+ String SessionName
+ Int32 SeatID
+ }
+ out {
+ Int32 SessionState
+ Int32 ErrorCode
+ }
+ }
+ method GetApplicationMode {
+ out {
+ Int32 ApplicationModeId
+ Int32 ErrorCode
+ }
+ }
+ method RegisterShutdownClient {
+ in {
+ String BusName
+ String ObjName
+ UInt32 ShutdownMode
+ UInt32 TimeoutMs
+ }
+ out {
+ Int32 ErrorCode
+ }
+ }
+ method UnRegisterShutdownClient {
+ in {
+ String BusName
+ String ObjName
+ UInt32 ShutdownMode
+ }
+ out {
+ Int32 ErrorCode
+ }
+ }
+ method RegisterSession {
+ in {
+ String SessionName
+ String SessionOwner
+ Int32 SeatID
+ Int32 SessionState
+ }
+ out {
+ Int32 ErrorCode
+ }
+ }
+ method UnRegisterSession {
+ in {
+ String SessionName
+ String SessionOwner
+ Int32 SeatID
+ }
+ out {
+ Int32 ErrorCode
+ }
+ }
+ method GetAppHealthCount {
+ out {
+ UInt32 Count
+ }
+ }
+ method GetInterfaceVersion {
+ out {
+ UInt32 Version
+ }
+ }
+ method LifecycleRequestComplete {
+ in {
+ UInt32 RequestId
+ Int32 Status
+ }
+ out {
+ Int32 ErrorCode
+ }
+ }
+ broadcast NodeState {
+ out {
+ Int32 NodeState
+ }
+ }
+ broadcast NodeApplicationMode {
+ out {
+ Int32 ApplicationModeId
+ }
+ }
+ broadcast SessionStateChanged {
+ out {
+ String SessionStateName
+ Int32 SeatID
+ Int32 SessionState
+ }
+ }
+} \ No newline at end of file
diff --git a/AudioManagerDaemon/fidls/NodeStateAccessStub_model_org.genivi.NodeStateManager.LifecycleConsumer.fidl b/AudioManagerDaemon/fidls/NodeStateAccessStub_model_org.genivi.NodeStateManager.LifecycleConsumer.fidl
new file mode 100755
index 0000000..e32c1c6
--- /dev/null
+++ b/AudioManagerDaemon/fidls/NodeStateAccessStub_model_org.genivi.NodeStateManager.LifecycleConsumer.fidl
@@ -0,0 +1,16 @@
+package org.genivi.NodeStateManager.LifeCycleConsumer
+
+//interface org.genivi.NodeStateManager.LifeCycleConsumer {
+interface LifeCycleConsumer {
+
+ version { major 0 minor 1 }
+ method LifecycleRequest {
+ in {
+ UInt32 Request
+ UInt32 RequestId
+ }
+ out {
+ Int32 ErrorCode
+ }
+ }
+} \ No newline at end of file
diff --git a/AudioManagerDaemon/fidls/NodeStateManager_dbus.conf b/AudioManagerDaemon/fidls/NodeStateManager_dbus.conf
new file mode 100755
index 0000000..3f0b04e
--- /dev/null
+++ b/AudioManagerDaemon/fidls/NodeStateManager_dbus.conf
@@ -0,0 +1,33 @@
+######################################### Node state manager configuration #######################################
+# NodeStateManager_dbus.conf #
+# If you change something make sure you re-configure with 'ccmake..' which generates the *_dbus.conf file again. #
+##################################################################################################################
+#
+# Copyright (C) 2012, BMW AG
+#
+# This file is part of GENIVI Project AudioManager.
+#
+# Contributions are licensed to the GENIVI Alliance under one or more
+# Contribution License Agreements.
+#
+# \copyright
+# This Source Code Form is subject to the terms of the
+# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+# this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#
+# \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+#
+# For further information see http://www.genivi.org/.
+#
+
+[local:org.genivi.NodeStateManager.Consumer:org.genivi.NodeStateManager]
+dbus_connection=org.genivi.NodeStateManager
+dbus_object=/org/genivi/NodeStateManager
+dbus_interface=org.genivi.NodeStateManager.Consumer
+dbus_predefined=true
+[local:org.genivi.NodeStateManager.LifeCycleConsumer:org.genivi.audiomanger]
+dbus_connection=org.genivi.audiomanager
+dbus_object=/org/genivi/audiomanager/LifeCycleConsumer
+dbus_interface=org.genivi.NodeStateManager.LifeCycleConsumer
+dbus_predefined=true \ No newline at end of file
diff --git a/AudioManagerDaemon/fidls/amTypes.fidl b/AudioManagerDaemon/fidls/amTypes.fidl
new file mode 100755
index 0000000..9798dd7
--- /dev/null
+++ b/AudioManagerDaemon/fidls/amTypes.fidl
@@ -0,0 +1,330 @@
+package org.genivi
+
+typeCollection am
+{
+ typedef am_sourceID_t is UInt16
+ typedef am_sinkID_t is UInt16
+ typedef am_gatewayID_t is UInt16
+ typedef gongHandle is Int16
+ typedef am_sourceClass_t is UInt16
+ typedef am_sinkClass_t is UInt16
+ typedef am_volume_t is Int16
+ typedef am_mainVolume_t is Int16
+ typedef am_handle_t is UInt16
+ typedef am_time_t is UInt16
+ typedef am_connectionID_t is UInt16
+
+ enumeration gp_indicatorDirection_e
+ {
+ INDICATOR_RIGHT ="0x00"
+ INDICATOR_LEFT="0x01"
+ INDICATOR_WARNING="0x02"
+ }
+
+ enumeration am_RampType_e
+ {
+ RAMP_UNKNOWN = "0x00"
+ RAMP_GENIVI_DIRECT = "0x01"
+ RAMP_GENIVI_NO_PLOP = "0x02"
+ RAMP_GENIVI_EXP_INV = "0x03"
+ RAMP_GENIVI_LINEAR = "0x04"
+ RAMP_GENIVI_EXP = "0x05"
+ RAMP_MAX
+ }
+
+ enumeration am_MuteState_e
+ {
+ MS_UNKNOWN = "0x00"
+ MS_MUTED = "0x01"
+ MS_UNMUTED = "0x02"
+ MS_MAX
+ }
+
+ enumeration am_SourceState_e
+ {
+ SS_UNKNNOWN = "0x00"
+ SS_ON = "0x01"
+ SS_OFF = "0x02"
+ SS_PAUSED = "0x03"
+ SS_MAX
+ }
+ enumeration am_Error_e
+ {
+ E_OK = "0x00"
+ E_UNKNOWN = "0x01"
+ E_OUT_OF_RANGE = "0x02"
+ E_NOT_USED = "0x03"
+ E_DATABASE_ERROR = "0x04"
+ E_ALREADY_EXISTS = "0x05"
+ E_NO_CHANGE = "0x06"
+ E_NOT_POSSIBLE = "0x07"
+ E_NON_EXISTENT = "0x08"
+ E_ABORTED = "0x09"
+ E_WRONG_FORMAT = "0xA"
+ E_MAX
+ }
+
+ enumeration am_DomainState_e
+ {
+
+ DS_UNKNOWN = "0"
+ DS_CONTROLLED = "1"
+ DS_INDEPENDENT_STARTUP = "2"
+ DS_INDEPENDENT_RUNDOWN = "3"
+ DS_MAX
+ }
+
+ enumeration gongType_e
+ {
+ AT_NUN = "0x01"
+ AT_POC = "0x02"
+ AT_QUE = "0x03"
+ AT_IWA = "0x04"
+ AT_WA = "0x05"
+ AT_ETC_F = "0x06"
+ AT_ETC_F2 = "0x07"
+ AT_ETC_ST = "0x08"
+ AT_ETC_S = "0x09"
+ AT_REV = "0x0A"
+ AT_ESU = "0x0B"
+ AT_ESD = "0x0C"
+ AT_DG = "0x0D"
+ AT_SG = "0x0E"
+ AT_IDG = "0x0F"
+ AT_ION = "0x10"
+ AT_IOFF = "0x11"
+ AT_FBS = "0x12"
+ AT_VFS = "0x13"
+ AT_GES = "0x14"
+ AT_UEE = "0x15"
+ }
+
+ enumeration gp_indicatorStatus_e
+ {
+ IS_ON = "0x00"
+ IS_OFF = "0x01"
+ }
+
+ enumeration gongStatus_e
+ {
+ NOT_PLAYING = "0x00"
+ PLAYING = "0x01"
+ INTERRUPTED = "0x02"
+ }
+
+ enumeration gongError_e
+ {
+ SUCCESS = "0x00"
+ ERROR = "0x01"
+ LOW_PRIORITY = "0x02"
+ }
+
+ enumeration gongClass_e
+ {
+ GONGCLASS_1 = "0x01"
+ GONGCLASS_2 = "0x02"
+ GONGCLASS_PDC = "0x03"
+ GONGCLASS_TURN = "0x04"
+ GONGCLASS_OBSTACLE = "0x05"
+ }
+
+ enumeration sampleSet_e
+ {
+ setBMW = "0x00"
+ setMini = "0x01"
+ setRR = "0x02"
+ }
+
+ enumeration am_Availability_e
+ {
+ A_UNKNOWN = "0x00"
+ A_AVAILABLE = "0x01"
+ A_UNAVAILABLE = "0x02"
+ A_MAX
+ }
+ enumeration am_AvailabilityReason_e
+ {
+ AR_UNKNOWN = "0x00"
+ AR_GENIVI_NEWMEDIA = "0x01"
+ AR_GENIVI_SAMEMEDIA = "0x02"
+ AR_GENIVI_NOMEDIA = "0x03"
+ AR_GENIVI_TEMPERATURE = "0x04"
+ AR_GENIVI_VOLTAGE = "0x05"
+ AR_GENIVI_ERRORMEDIA = "0x06"
+ AR_MAX
+ }
+
+ enumeration am_InterruptState_e
+ {
+ IS_UNKNOWN = "0x00"
+ IS_OFF = "0x01"
+ IS_INTERRUPTED = "0x02"
+ IS_MAX
+ }
+
+ enumeration am_SoundPropertyType_e
+ {
+ SP_UNKNOWN = "0x00"
+ SP_EXAMPLE_TREBLE = "0x01"
+ SP_EXAMPLE_MID = "0x02"
+ SP_EXAMPLE_BASS = "0x03"
+ SP_ENTER_SINKID = "0x04"
+ SP_INTERR_SUPERSEEDINGID = "0x05"
+ SP_INTERR_OVERLAYID = "0x06"
+ SP_PRIORITY = "0x07"
+ SP_MAX
+ }
+
+ enumeration am_ConnectionFormat_e
+ {
+ CF_UNKNOWN = "0x00"
+ CF_GENIVI_MONO = "0x01"
+ CF_GENIVI_STEREO = "0x02"
+ CF_GENIVI_ANALOG = "0x03"
+ CF_GENIVI_AUTO = "0x04"
+ CF_MAX
+ }
+ array am_ConnectionFormat_L of am_ConnectionFormat_e
+
+ enumeration am_MainSoundPropertyType_e
+ {
+ MSP_UNKNOWN = "0x00"
+ MSP_EXAMPLE_TREBLE = "0x01"
+ MSP_EXAMPLE_MID = "0x02"
+ MSP_EXAMPLE_BASS = "0x03"
+ MSP_SOURCE_TYPE = "0x04"
+ MSP_MAX
+ }
+
+ enumeration am_NotificationType_e
+ {
+ NT_UNKNOWN = "0x00"
+ NT_LOUDNESS = "0x01"
+ NT_MAX
+ }
+
+ enumeration am_NotificationStatus_e
+ {
+ NS_UNKNOWN = "0x00"
+ NS_OFF = "0x01"
+ NS_PERIODIC = "0x02"
+ NS_MINIMUM = "0x03"
+ NS_MAXIMUM = "0x04"
+ NS_CHANGE = "0x05"
+ NS_MAX
+ }
+
+ struct distanceInformation_s
+ {
+ Int32 FrontLeft
+ Int32 FrontRight
+ Int32 RearLeft
+ Int32 RearRight
+ }
+
+ struct sampleNames_s
+ {
+ sampleSet_e sample
+ String sampleName
+ } array listSampleNamesL of sampleNames_s
+
+ typedef am_domainID_t is UInt16
+
+ struct am_Domain_s
+ {
+ am_domainID_t domainID
+ String name
+ String busname
+ String nodename
+ Boolean early
+ Boolean complete
+ am_DomainState_e ^state
+ }
+
+ struct notificationPayload_s
+ {
+ Int16 type
+ Int16 payload
+ }
+
+ struct am_Availability_s
+ {
+ am_Availability_e availability
+ am_AvailabilityReason_e availabilityReason
+ }
+
+ struct am_SoundProperty_s
+ {
+ am_SoundPropertyType_e type
+ Int16 value
+ }
+ array am_SoundProperty_L of am_SoundProperty_s
+
+ struct am_MainSoundProperty_s
+ {
+ am_MainSoundPropertyType_e type
+ Int16 value
+ }
+ array am_MainSoundProperty_L of am_MainSoundProperty_s
+
+ struct am_NotificationConfiguration_s
+ {
+ am_NotificationType_e type
+ am_NotificationStatus_e status
+ Int16 parameter
+ }
+ array am_NotificationConfiguration_L of am_NotificationConfiguration_s
+
+
+ array bool_L of Boolean
+
+ struct sourceData_s
+ {
+ am_sourceID_t sourceID
+ am_domainID_t domainID
+ String name
+ am_sourceClass_t sourceClassID
+ am_SourceState_e sourceState
+ am_volume_t volume
+ Boolean visible
+ am_Availability_s available
+ am_InterruptState_e interruptState
+ am_SoundProperty_L listSoundProperties
+ am_ConnectionFormat_L listConnectionFormats
+ am_MainSoundProperty_L listMainSoundProperties
+ am_NotificationConfiguration_L listMainNotificationConfigurations
+ am_NotificationConfiguration_L listNotificationConfigurations
+ }
+
+ struct sinkData_s
+ {
+ am_sinkID_t sinkID
+ String name
+ am_domainID_t domainID
+ am_sinkClass_t sinkClassID
+ am_volume_t volume
+ Boolean visible
+ am_Availability_s available
+ am_MuteState_e muteState
+ am_mainVolume_t mainVolume
+ am_SoundProperty_L listSoundProperties
+ am_ConnectionFormat_L listConnectionFormats
+ am_MainSoundProperty_L listMainSoundProperties
+ am_NotificationConfiguration_L listMainNotificationConfigurations
+ am_NotificationConfiguration_L listNotificationConfigurations
+ }
+
+ struct am_Gateway_s
+ {
+ am_gatewayID_t gatewayID
+ String name
+ am_sinkID_t sinkID
+ am_sourceID_t sourceID
+ am_domainID_t domainSinkID
+ am_domainID_t domainSourceID
+ am_domainID_t controlDomainID
+ am_ConnectionFormat_L listSourceFormats
+ am_ConnectionFormat_L listSinkFormats
+ bool_L convertionMatrix
+ }
+} \ No newline at end of file
diff --git a/AudioManagerDaemon/include/CAmNodeStateCommunicator.h b/AudioManagerDaemon/include/CAmNodeStateCommunicator.h
index dfc6689..8cf0dce 100644
--- a/AudioManagerDaemon/include/CAmNodeStateCommunicator.h
+++ b/AudioManagerDaemon/include/CAmNodeStateCommunicator.h
@@ -13,16 +13,22 @@
*
*
* \author Christian Linke, christian.linke@bmw.de BMW 2012
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
*
* \file CAmNodeStateCommunicator.h
* For further information see http://www.genivi.org/.
*
*/
-#ifndef CAMNODESTATECOMMUNICATOR_H_
-#define CAMNODESTATECOMMUNICATOR_H_
-#include "shared/CAmDbusWrapper.h"
+#ifndef CAMNODESTATECOMMUNICATORBASE_H_
+#define CAMNODESTATECOMMUNICATORBASE_H_
+
+#include <assert.h>
+#include "config.h"
#include "NodeStateManager.h"
+#include "audiomanagertypes.h"
+
+
namespace am
{
@@ -30,43 +36,37 @@ namespace am
class CAmControlSender;
/** communicates with the NSM
- * The CAmNodeStateCommunicator communicates with the NodeStateManager via Dbus. Only works, if CAmDBusWrapper is enabled.
+ * The CAmNodeStateCommunicator communicates with the NodeStateManager.
* The CAmNodeStateCommunicator is triggered via CAmControlReceiver, so you can communicate from the ControllerPlugin with it.
- * Most if the interfaces are passive, so you get the information you need via retrieving it. If you need to register the AudioManager
+ * Most of the interfaces are passive, so you get the information you need via retrieving it. If you need to register the AudioManager
* as LifeCycleConsumer, you need to call CAmNodeStateCommunicator::nsmRegisterShutdownClient which can be undone with CAmNodeStateCommunicator::nsmUnRegisterShutdownClient.
* After you have registered, you will get hookSystemLifecycleRequest on the ControlSendInterface of the controller.
* You should answer this within your set timeout with CAmNodeStateCommunicator::nsmSendLifecycleRequestComplete.
*/
+
class CAmNodeStateCommunicator
{
-public:
- CAmNodeStateCommunicator(CAmDbusWrapper* iDbusWrapper);
- virtual ~CAmNodeStateCommunicator();
- am_Error_e nsmGetRestartReasonProperty(NsmRestartReason_e& restartReason) ;
- am_Error_e nsmGetShutdownReasonProperty(NsmShutdownReason_e& ShutdownReason) ;
- am_Error_e nsmGetRunningReasonProperty(NsmRunningReason_e& nsmRunningReason) ;
- NsmErrorStatus_e nsmGetNodeState(NsmNodeState_e& nsmNodeState) ;
- NsmErrorStatus_e nsmGetSessionState(const std::string& sessionName, const NsmSeat_e& seatID, NsmSessionState_e& sessionState) ;
- NsmErrorStatus_e nsmGetApplicationMode(NsmApplicationMode_e& applicationMode) ;
- NsmErrorStatus_e nsmRegisterShutdownClient(const uint32_t shutdownMode, const uint32_t timeoutMs) ;
- NsmErrorStatus_e nsmUnRegisterShutdownClient(const uint32_t shutdownMode) ;
- am_Error_e nsmGetInterfaceVersion(uint32_t& version) ;
- NsmErrorStatus_e nsmSendLifecycleRequestComplete(const uint32_t RequestId, const NsmErrorStatus_e status) ;
-
- void registerControlSender(CAmControlSender* iControlSender);
- static DBusHandlerResult receiveCallback(DBusConnection *conn, DBusMessage *msg, void *user_data);
- static DBusHandlerResult signalCallback(DBusConnection *conn, DBusMessage *msg, void *user_data);
-
-
-private:
- void sendIntrospection(DBusConnection* conn, DBusMessage* msg);
- void sendMessage(DBusMessage* message, DBusMessage* origMessage);
- DBusHandlerResult receiveCallbackDelegate(DBusConnection *conn, DBusMessage *msg);
- am_Error_e readIntegerProperty(const std::string property, int32_t &value);
- CAmDbusWrapper* mpDbusWrapper;
+protected:
CAmControlSender* mpControlSender;
- DBusConnection* mpDBusConnection;
+public:
+ CAmNodeStateCommunicator():mpControlSender(NULL) {}
+ virtual ~CAmNodeStateCommunicator() {}
+ virtual am_Error_e nsmGetRestartReasonProperty(NsmRestartReason_e& restartReason) = 0;
+ virtual am_Error_e nsmGetShutdownReasonProperty(NsmShutdownReason_e& ShutdownReason) = 0;
+ virtual am_Error_e nsmGetRunningReasonProperty(NsmRunningReason_e& nsmRunningReason) = 0;
+ virtual NsmErrorStatus_e nsmGetNodeState(NsmNodeState_e& nsmNodeState) = 0;
+ virtual NsmErrorStatus_e nsmGetSessionState(const std::string& sessionName, const NsmSeat_e& seatID, NsmSessionState_e& sessionState) = 0;
+ virtual NsmErrorStatus_e nsmGetApplicationMode(NsmApplicationMode_e& applicationMode) = 0;
+ virtual NsmErrorStatus_e nsmRegisterShutdownClient(const uint32_t shutdownMode, const uint32_t timeoutMs) = 0;
+ virtual NsmErrorStatus_e nsmUnRegisterShutdownClient(const uint32_t shutdownMode) = 0;
+ virtual am_Error_e nsmGetInterfaceVersion(uint32_t& version) = 0;
+ virtual NsmErrorStatus_e nsmSendLifecycleRequestComplete(const uint32_t RequestId, const NsmErrorStatus_e status) = 0;
+ virtual void registerControlSender(CAmControlSender* iControlSender) {
+ assert(NULL!=iControlSender);
+ mpControlSender = iControlSender;
+ }
};
-} /* namespace am */
-#endif /* CAMNODESTATECOMMUNICATOR_H_ */
+}
+
+#endif /* CAMNODESTATECOMMUNICATORBASE_H_ */
diff --git a/AudioManagerDaemon/include/CAmNodeStateCommunicatorCAPI.h b/AudioManagerDaemon/include/CAmNodeStateCommunicatorCAPI.h
new file mode 100644
index 0000000..6c063e5
--- /dev/null
+++ b/AudioManagerDaemon/include/CAmNodeStateCommunicatorCAPI.h
@@ -0,0 +1,101 @@
+/**
+ * Copyright (C) 2012, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \file CAmNodeStateCommunicatorCAPI.h
+ * For further information see http://www.genivi.org/.
+ *
+ */
+#ifndef CAMNODESTATECOMMUNICATORCAPI_H_
+#define CAMNODESTATECOMMUNICATORCAPI_H_
+
+#include <org/genivi/NodeStateManager/Consumer/ConsumerProxy.h>
+#include "CAmNodeStateCommunicator.h"
+#include "LifeCycleConsumerStubDefault.h"
+
+namespace am
+{
+using namespace CommonAPI;
+using namespace org::genivi::NodeStateManager::Consumer;
+using namespace org::genivi::NodeStateManager::LifeCycleConsumer;
+
+
+class CAmCommonAPIWrapper;
+/** communicates with the NSM
+ * The CAmNodeStateCommunicator communicates with the NodeStateManager via Dbus Common-API's wrapping mechanism. Only works, if CAmCommonAPIWrapper is enabled.
+ */
+class CAmNodeStateCommunicatorCAPI : public CAmNodeStateCommunicator
+{
+ /* A concrete implementation of the life cycle stub.
+ * An object from this class is instantiated from the common-api factory.
+ * It forwards the invocations to its delegate CAmNodeStateCommunicatorCAPI.
+ */
+ class CAmNodeStateCommunicatorServiceImpl : public LifeCycleConsumerStubDefault
+ {
+ CAmNodeStateCommunicatorCAPI *mpDelegate;
+ public:
+ CAmNodeStateCommunicatorServiceImpl ():mpDelegate(NULL) {}
+ CAmNodeStateCommunicatorServiceImpl (CAmNodeStateCommunicatorCAPI *aNSCommunicator):mpDelegate(aNSCommunicator) {}
+ ~CAmNodeStateCommunicatorServiceImpl() { mpDelegate = NULL; }
+
+ CAmNodeStateCommunicatorCAPI *getDelegate() { return mpDelegate; };
+ void setDelegate(CAmNodeStateCommunicatorCAPI *aDelegate) { mpDelegate = aDelegate; };
+
+ void LifecycleRequest(uint32_t Request, uint32_t RequestId, int32_t& ErrorCode) {
+ if(mpDelegate)
+ mpDelegate->cbReceivedLifecycleRequest(Request, RequestId, ErrorCode);
+ }
+ };
+
+ CAmCommonAPIWrapper *mpCAPIWrapper;
+ std::shared_ptr<ConsumerProxy<> > mNSMProxy;
+ std::shared_ptr<CAmNodeStateCommunicatorCAPI::CAmNodeStateCommunicatorServiceImpl> mNSMStub;
+public:
+ CAmNodeStateCommunicatorCAPI(CAmCommonAPIWrapper* iCAPIWrapper);
+ virtual ~CAmNodeStateCommunicatorCAPI();
+
+ am_Error_e nsmGetRestartReasonProperty(NsmRestartReason_e& restartReason) ;
+ am_Error_e nsmGetShutdownReasonProperty(NsmShutdownReason_e& ShutdownReason) ;
+ am_Error_e nsmGetRunningReasonProperty(NsmRunningReason_e& nsmRunningReason) ;
+ NsmErrorStatus_e nsmGetNodeState(NsmNodeState_e& nsmNodeState) ;
+ NsmErrorStatus_e nsmGetSessionState(const std::string& sessionName, const NsmSeat_e& seatID, NsmSessionState_e& sessionState) ;
+ NsmErrorStatus_e nsmGetApplicationMode(NsmApplicationMode_e& applicationMode) ;
+ NsmErrorStatus_e nsmRegisterShutdownClient(const uint32_t shutdownMode, const uint32_t timeoutMs) ;
+ NsmErrorStatus_e nsmUnRegisterShutdownClient(const uint32_t shutdownMode) ;
+ am_Error_e nsmGetInterfaceVersion(uint32_t& version) ;
+ NsmErrorStatus_e nsmSendLifecycleRequestComplete(const uint32_t RequestId, const NsmErrorStatus_e status) ;
+
+ bool isServiceAvailable();
+
+ static const char * CLIENT_STRING;
+ static const char * SERVER_STRING;
+ static const char * OBJECT_NAME;
+ static const char * BUS_NAME;
+
+private:
+ /* Client events */
+ void onNodeStateEvent(const int32_t nodeState);
+ void onNodeApplicationModeEvent(const int32_t nodeApplicationMode);
+ void onSessionStateChangedEvent(const std::string & sessionName, const int32_t seatID, const int32_t sessionState);
+ void onServiceStatusEvent(const CommonAPI::AvailabilityStatus& serviceStatus);
+ /* Service callbacks */
+ void cbReceivedLifecycleRequest(uint32_t Request, uint32_t RequestId, int32_t& ErrorCode);
+protected:
+ bool mIsServiceAvailable;
+};
+
+}
+/* namespace am */
+#endif /* CAMNODESTATECOMMUNICATORCAPI_H_ */
diff --git a/AudioManagerDaemon/include/CAmNodeStateCommunicatorDBus.h b/AudioManagerDaemon/include/CAmNodeStateCommunicatorDBus.h
new file mode 100644
index 0000000..cb78f0f
--- /dev/null
+++ b/AudioManagerDaemon/include/CAmNodeStateCommunicatorDBus.h
@@ -0,0 +1,63 @@
+/**
+ * Copyright (C) 2012, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * \author Christian Linke, christian.linke@bmw.de BMW 2012
+ *
+ * \file CAmNodeStateCommunicatorDBus.h
+ * For further information see http://www.genivi.org/.
+ *
+ */
+#ifndef CAMNODESTATECOMMUNICATORDBUS_H_
+#define CAMNODESTATECOMMUNICATORDBUS_H_
+
+#include "shared/CAmDbusWrapper.h"
+#include "CAmNodeStateCommunicator.h"
+
+namespace am
+{
+/** communicates with the NSM
+ * The CAmNodeStateCommunicator communicates with the NodeStateManager via Dbus. Only works, if CAmDbusWrapper is enabled.
+ */
+
+class CAmNodeStateCommunicatorDBus : public CAmNodeStateCommunicator
+{
+public:
+ CAmNodeStateCommunicatorDBus(CAmDbusWrapper* iDbusWrapper);
+ virtual ~CAmNodeStateCommunicatorDBus();
+ am_Error_e nsmGetRestartReasonProperty(NsmRestartReason_e& restartReason) ;
+ am_Error_e nsmGetShutdownReasonProperty(NsmShutdownReason_e& ShutdownReason) ;
+ am_Error_e nsmGetRunningReasonProperty(NsmRunningReason_e& nsmRunningReason) ;
+ NsmErrorStatus_e nsmGetNodeState(NsmNodeState_e& nsmNodeState) ;
+ NsmErrorStatus_e nsmGetSessionState(const std::string& sessionName, const NsmSeat_e& seatID, NsmSessionState_e& sessionState) ;
+ NsmErrorStatus_e nsmGetApplicationMode(NsmApplicationMode_e& applicationMode) ;
+ NsmErrorStatus_e nsmRegisterShutdownClient(const uint32_t shutdownMode, const uint32_t timeoutMs) ;
+ NsmErrorStatus_e nsmUnRegisterShutdownClient(const uint32_t shutdownMode) ;
+ am_Error_e nsmGetInterfaceVersion(uint32_t& version) ;
+ NsmErrorStatus_e nsmSendLifecycleRequestComplete(const uint32_t RequestId, const NsmErrorStatus_e status) ;
+
+ static DBusHandlerResult receiveCallback(DBusConnection *conn, DBusMessage *msg, void *user_data);
+ static DBusHandlerResult signalCallback(DBusConnection *conn, DBusMessage *msg, void *user_data);
+
+
+private:
+ void sendIntrospection(DBusConnection* conn, DBusMessage* msg);
+ void sendMessage(DBusMessage* message, DBusMessage* origMessage);
+ DBusHandlerResult receiveCallbackDelegate(DBusConnection *conn, DBusMessage *msg);
+ am_Error_e readIntegerProperty(const std::string property, int32_t &value);
+ CAmDbusWrapper* mpDbusWrapper;
+ DBusConnection* mpDBusConnection;
+};
+
+} /* namespace am */
+#endif /* CAMNODESTATECOMMUNICATORDBUS_H_ */
diff --git a/AudioManagerDaemon/include/TAmPluginTemplate.h b/AudioManagerDaemon/include/TAmPluginTemplate.h
index 2959b04..a421cd1 100644
--- a/AudioManagerDaemon/include/TAmPluginTemplate.h
+++ b/AudioManagerDaemon/include/TAmPluginTemplate.h
@@ -46,10 +46,9 @@ template<class T> T* getCreateFunction(const std::string& libname, void*& librar
// cut off "lib" in front and cut off .so end"
std::string createFunctionName = libFileName.substr(3, libFileName.length() - 6) + "Factory";
-
// open library
dlerror(); // Clear any existing error
- libraryHandle = dlopen(libname.c_str(), RTLD_LAZY);
+ libraryHandle = dlopen(libname.c_str(), RTLD_LAZY );
const char* dlopen_error = dlerror();
if (!libraryHandle || dlopen_error)
{
diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/Consumer.h b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/Consumer.h
new file mode 100644
index 0000000..345bd3b
--- /dev/null
+++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/Consumer.h
@@ -0,0 +1,70 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (C) 2012, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_NODESTATEMANAGER_CONSUMER_Consumer_H_
+#define ORG_GENIVI_NODESTATEMANAGER_CONSUMER_Consumer_H_
+
+
+
+#define COMMONAPI_INTERNAL_COMPILATION
+
+#include <CommonAPI/types.h>
+
+#undef COMMONAPI_INTERNAL_COMPILATION
+
+namespace org {
+namespace genivi {
+namespace NodeStateManager {
+namespace Consumer {
+
+class Consumer {
+ public:
+ virtual ~Consumer() { }
+
+ static inline const char* getInterfaceId();
+ static inline CommonAPI::Version getInterfaceVersion();
+};
+
+const char* Consumer::getInterfaceId() {
+ return "org.genivi.NodeStateManager.Consumer.Consumer";
+}
+
+CommonAPI::Version Consumer::getInterfaceVersion() {
+ return CommonAPI::Version(0, 1);
+}
+
+
+} // namespace Consumer
+} // namespace NodeStateManager
+} // namespace genivi
+} // namespace org
+
+namespace CommonAPI {
+
+}
+
+
+namespace std {
+ //hashes for types
+
+ //hashes for error types
+}
+
+#endif // ORG_GENIVI_NODESTATEMANAGER_CONSUMER_Consumer_H_
diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerDBusProxy.cpp b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerDBusProxy.cpp
new file mode 100644
index 0000000..e920d51
--- /dev/null
+++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerDBusProxy.cpp
@@ -0,0 +1,292 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (C) 2012, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#include "ConsumerDBusProxy.h"
+
+namespace org {
+namespace genivi {
+namespace NodeStateManager {
+namespace Consumer {
+
+std::shared_ptr<CommonAPI::DBus::DBusProxy> createConsumerDBusProxy(
+ const std::string& commonApiAddress,
+ const std::string& interfaceName,
+ const std::string& busName,
+ const std::string& objectPath,
+ const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection) {
+ return std::make_shared<ConsumerDBusProxy>(commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection);
+}
+
+__attribute__((constructor)) void registerConsumerDBusProxy(void) {
+ CommonAPI::DBus::DBusFactory::registerProxyFactoryMethod(Consumer::getInterfaceId(),
+ &createConsumerDBusProxy);
+}
+
+ConsumerDBusProxy::ConsumerDBusProxy(
+ const std::string& commonApiAddress,
+ const std::string& interfaceName,
+ const std::string& busName,
+ const std::string& objectPath,
+ const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection):
+ CommonAPI::DBus::DBusProxy(commonApiAddress, interfaceName, busName, objectPath, dbusProxyconnection)
+, restartReason_(*this, interfaceName.c_str(), "RestartReason"),
+ shutdownReason_(*this, interfaceName.c_str(), "ShutdownReason"),
+ wakeUpReason_(*this, interfaceName.c_str(), "WakeUpReason"),
+ bootMode_(*this, interfaceName.c_str(), "BootMode")
+, nodeState_(*this, "NodeState", "i"),
+ nodeApplicationMode_(*this, "NodeApplicationMode", "i"),
+ sessionStateChanged_(*this, "SessionStateChanged", "sii")
+ {
+}
+
+ConsumerDBusProxy::RestartReasonAttribute& ConsumerDBusProxy::getRestartReasonAttribute() {
+ return restartReason_;
+}
+ConsumerDBusProxy::ShutdownReasonAttribute& ConsumerDBusProxy::getShutdownReasonAttribute() {
+ return shutdownReason_;
+}
+ConsumerDBusProxy::WakeUpReasonAttribute& ConsumerDBusProxy::getWakeUpReasonAttribute() {
+ return wakeUpReason_;
+}
+ConsumerDBusProxy::BootModeAttribute& ConsumerDBusProxy::getBootModeAttribute() {
+ return bootMode_;
+}
+
+ConsumerDBusProxy::NodeStateEvent& ConsumerDBusProxy::getNodeStateEvent() {
+ return nodeState_;
+}
+ConsumerDBusProxy::NodeApplicationModeEvent& ConsumerDBusProxy::getNodeApplicationModeEvent() {
+ return nodeApplicationMode_;
+}
+ConsumerDBusProxy::SessionStateChangedEvent& ConsumerDBusProxy::getSessionStateChangedEvent() {
+ return sessionStateChanged_;
+}
+
+void ConsumerDBusProxy::GetNodeState(CommonAPI::CallStatus& callStatus, int32_t& NodeStateId, int32_t& ErrorCode) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>,
+ CommonAPI::DBus::DBusSerializableArguments<int32_t, int32_t> >::callMethodWithReply(
+ *this,
+ "GetNodeState",
+ "",
+ callStatus
+ , NodeStateId, ErrorCode);
+}
+std::future<CommonAPI::CallStatus> ConsumerDBusProxy::GetNodeStateAsync(GetNodeStateAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>,
+ CommonAPI::DBus::DBusSerializableArguments<int32_t, int32_t> >::callMethodAsync(
+ *this,
+ "GetNodeState",
+ "",
+ std::move(callback));
+}
+void ConsumerDBusProxy::SetSessionState(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string, std::string, int32_t, int32_t>,
+ CommonAPI::DBus::DBusSerializableArguments<int32_t> >::callMethodWithReply(
+ *this,
+ "SetSessionState",
+ "ssii",
+ SessionName, SessionOwner, SeatID, SessionState,
+ callStatus
+ , ErrorCode);
+}
+std::future<CommonAPI::CallStatus> ConsumerDBusProxy::SetSessionStateAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, SetSessionStateAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string, std::string, int32_t, int32_t>,
+ CommonAPI::DBus::DBusSerializableArguments<int32_t> >::callMethodAsync(
+ *this,
+ "SetSessionState",
+ "ssii",
+ SessionName, SessionOwner, SeatID, SessionState,
+ std::move(callback));
+}
+void ConsumerDBusProxy::GetSessionState(const std::string& SessionName, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& SessionState, int32_t& ErrorCode) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string, int32_t>,
+ CommonAPI::DBus::DBusSerializableArguments<int32_t, int32_t> >::callMethodWithReply(
+ *this,
+ "GetSessionState",
+ "si",
+ SessionName, SeatID,
+ callStatus
+ , SessionState, ErrorCode);
+}
+std::future<CommonAPI::CallStatus> ConsumerDBusProxy::GetSessionStateAsync(const std::string& SessionName, const int32_t& SeatID, GetSessionStateAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string, int32_t>,
+ CommonAPI::DBus::DBusSerializableArguments<int32_t, int32_t> >::callMethodAsync(
+ *this,
+ "GetSessionState",
+ "si",
+ SessionName, SeatID,
+ std::move(callback));
+}
+void ConsumerDBusProxy::GetApplicationMode(CommonAPI::CallStatus& callStatus, int32_t& ApplicationModeId, int32_t& ErrorCode) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>,
+ CommonAPI::DBus::DBusSerializableArguments<int32_t, int32_t> >::callMethodWithReply(
+ *this,
+ "GetApplicationMode",
+ "",
+ callStatus
+ , ApplicationModeId, ErrorCode);
+}
+std::future<CommonAPI::CallStatus> ConsumerDBusProxy::GetApplicationModeAsync(GetApplicationModeAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>,
+ CommonAPI::DBus::DBusSerializableArguments<int32_t, int32_t> >::callMethodAsync(
+ *this,
+ "GetApplicationMode",
+ "",
+ std::move(callback));
+}
+void ConsumerDBusProxy::RegisterShutdownClient(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, const uint32_t& TimeoutMs, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string, std::string, uint32_t, uint32_t>,
+ CommonAPI::DBus::DBusSerializableArguments<int32_t> >::callMethodWithReply(
+ *this,
+ "RegisterShutdownClient",
+ "ssuu",
+ BusName, ObjName, ShutdownMode, TimeoutMs,
+ callStatus
+ , ErrorCode);
+}
+std::future<CommonAPI::CallStatus> ConsumerDBusProxy::RegisterShutdownClientAsync(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, const uint32_t& TimeoutMs, RegisterShutdownClientAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string, std::string, uint32_t, uint32_t>,
+ CommonAPI::DBus::DBusSerializableArguments<int32_t> >::callMethodAsync(
+ *this,
+ "RegisterShutdownClient",
+ "ssuu",
+ BusName, ObjName, ShutdownMode, TimeoutMs,
+ std::move(callback));
+}
+void ConsumerDBusProxy::UnRegisterShutdownClient(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string, std::string, uint32_t>,
+ CommonAPI::DBus::DBusSerializableArguments<int32_t> >::callMethodWithReply(
+ *this,
+ "UnRegisterShutdownClient",
+ "ssu",
+ BusName, ObjName, ShutdownMode,
+ callStatus
+ , ErrorCode);
+}
+std::future<CommonAPI::CallStatus> ConsumerDBusProxy::UnRegisterShutdownClientAsync(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, UnRegisterShutdownClientAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string, std::string, uint32_t>,
+ CommonAPI::DBus::DBusSerializableArguments<int32_t> >::callMethodAsync(
+ *this,
+ "UnRegisterShutdownClient",
+ "ssu",
+ BusName, ObjName, ShutdownMode,
+ std::move(callback));
+}
+void ConsumerDBusProxy::RegisterSession(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string, std::string, int32_t, int32_t>,
+ CommonAPI::DBus::DBusSerializableArguments<int32_t> >::callMethodWithReply(
+ *this,
+ "RegisterSession",
+ "ssii",
+ SessionName, SessionOwner, SeatID, SessionState,
+ callStatus
+ , ErrorCode);
+}
+std::future<CommonAPI::CallStatus> ConsumerDBusProxy::RegisterSessionAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, RegisterSessionAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string, std::string, int32_t, int32_t>,
+ CommonAPI::DBus::DBusSerializableArguments<int32_t> >::callMethodAsync(
+ *this,
+ "RegisterSession",
+ "ssii",
+ SessionName, SessionOwner, SeatID, SessionState,
+ std::move(callback));
+}
+void ConsumerDBusProxy::UnRegisterSession(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string, std::string, int32_t>,
+ CommonAPI::DBus::DBusSerializableArguments<int32_t> >::callMethodWithReply(
+ *this,
+ "UnRegisterSession",
+ "ssi",
+ SessionName, SessionOwner, SeatID,
+ callStatus
+ , ErrorCode);
+}
+std::future<CommonAPI::CallStatus> ConsumerDBusProxy::UnRegisterSessionAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, UnRegisterSessionAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string, std::string, int32_t>,
+ CommonAPI::DBus::DBusSerializableArguments<int32_t> >::callMethodAsync(
+ *this,
+ "UnRegisterSession",
+ "ssi",
+ SessionName, SessionOwner, SeatID,
+ std::move(callback));
+}
+void ConsumerDBusProxy::GetAppHealthCount(CommonAPI::CallStatus& callStatus, uint32_t& Count) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>,
+ CommonAPI::DBus::DBusSerializableArguments<uint32_t> >::callMethodWithReply(
+ *this,
+ "GetAppHealthCount",
+ "",
+ callStatus
+ , Count);
+}
+std::future<CommonAPI::CallStatus> ConsumerDBusProxy::GetAppHealthCountAsync(GetAppHealthCountAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>,
+ CommonAPI::DBus::DBusSerializableArguments<uint32_t> >::callMethodAsync(
+ *this,
+ "GetAppHealthCount",
+ "",
+ std::move(callback));
+}
+void ConsumerDBusProxy::GetInterfaceVersion(CommonAPI::CallStatus& callStatus, uint32_t& Version) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>,
+ CommonAPI::DBus::DBusSerializableArguments<uint32_t> >::callMethodWithReply(
+ *this,
+ "GetInterfaceVersion",
+ "",
+ callStatus
+ , Version);
+}
+std::future<CommonAPI::CallStatus> ConsumerDBusProxy::GetInterfaceVersionAsync(GetInterfaceVersionAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>,
+ CommonAPI::DBus::DBusSerializableArguments<uint32_t> >::callMethodAsync(
+ *this,
+ "GetInterfaceVersion",
+ "",
+ std::move(callback));
+}
+void ConsumerDBusProxy::LifecycleRequestComplete(const uint32_t& RequestId, const int32_t& Status, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint32_t, int32_t>,
+ CommonAPI::DBus::DBusSerializableArguments<int32_t> >::callMethodWithReply(
+ *this,
+ "LifecycleRequestComplete",
+ "ui",
+ RequestId, Status,
+ callStatus
+ , ErrorCode);
+}
+std::future<CommonAPI::CallStatus> ConsumerDBusProxy::LifecycleRequestCompleteAsync(const uint32_t& RequestId, const int32_t& Status, LifecycleRequestCompleteAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint32_t, int32_t>,
+ CommonAPI::DBus::DBusSerializableArguments<int32_t> >::callMethodAsync(
+ *this,
+ "LifecycleRequestComplete",
+ "ui",
+ RequestId, Status,
+ std::move(callback));
+}
+
+void ConsumerDBusProxy::getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const {
+ ownVersionMajor = 0;
+ ownVersionMinor = 1;
+}
+
+} // namespace Consumer
+} // namespace NodeStateManager
+} // namespace genivi
+} // namespace org
diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerDBusProxy.h b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerDBusProxy.h
new file mode 100644
index 0000000..c3db1df
--- /dev/null
+++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerDBusProxy.h
@@ -0,0 +1,114 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (C) 2012, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_NODESTATEMANAGER_CONSUMER_Consumer_DBUS_PROXY_H_
+#define ORG_GENIVI_NODESTATEMANAGER_CONSUMER_Consumer_DBUS_PROXY_H_
+
+#include <org/genivi/NodeStateManager/Consumer/ConsumerProxyBase.h>
+
+#define COMMONAPI_INTERNAL_COMPILATION
+
+#include <CommonAPI/DBus/DBusFactory.h>
+#include <CommonAPI/DBus/DBusProxy.h>
+#include <CommonAPI/DBus/DBusAttribute.h>
+#include <CommonAPI/DBus/DBusEvent.h>
+
+#undef COMMONAPI_INTERNAL_COMPILATION
+
+#include <string>
+
+namespace org {
+namespace genivi {
+namespace NodeStateManager {
+namespace Consumer {
+
+class ConsumerDBusProxy: virtual public ConsumerProxyBase, virtual public CommonAPI::DBus::DBusProxy {
+ public:
+ ConsumerDBusProxy(
+ const std::string& commonApiAddress,
+ const std::string& interfaceName,
+ const std::string& busName,
+ const std::string& objectPath,
+ const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection);
+
+ virtual ~ConsumerDBusProxy() { }
+
+ virtual RestartReasonAttribute& getRestartReasonAttribute();
+ virtual ShutdownReasonAttribute& getShutdownReasonAttribute();
+ virtual WakeUpReasonAttribute& getWakeUpReasonAttribute();
+ virtual BootModeAttribute& getBootModeAttribute();
+
+ virtual NodeStateEvent& getNodeStateEvent();
+ virtual NodeApplicationModeEvent& getNodeApplicationModeEvent();
+ virtual SessionStateChangedEvent& getSessionStateChangedEvent();
+
+
+ virtual void GetNodeState(CommonAPI::CallStatus& callStatus, int32_t& NodeStateId, int32_t& ErrorCode);
+ virtual std::future<CommonAPI::CallStatus> GetNodeStateAsync(GetNodeStateAsyncCallback callback);
+
+ virtual void SetSessionState(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode);
+ virtual std::future<CommonAPI::CallStatus> SetSessionStateAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, SetSessionStateAsyncCallback callback);
+
+ virtual void GetSessionState(const std::string& SessionName, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& SessionState, int32_t& ErrorCode);
+ virtual std::future<CommonAPI::CallStatus> GetSessionStateAsync(const std::string& SessionName, const int32_t& SeatID, GetSessionStateAsyncCallback callback);
+
+ virtual void GetApplicationMode(CommonAPI::CallStatus& callStatus, int32_t& ApplicationModeId, int32_t& ErrorCode);
+ virtual std::future<CommonAPI::CallStatus> GetApplicationModeAsync(GetApplicationModeAsyncCallback callback);
+
+ virtual void RegisterShutdownClient(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, const uint32_t& TimeoutMs, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode);
+ virtual std::future<CommonAPI::CallStatus> RegisterShutdownClientAsync(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, const uint32_t& TimeoutMs, RegisterShutdownClientAsyncCallback callback);
+
+ virtual void UnRegisterShutdownClient(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode);
+ virtual std::future<CommonAPI::CallStatus> UnRegisterShutdownClientAsync(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, UnRegisterShutdownClientAsyncCallback callback);
+
+ virtual void RegisterSession(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode);
+ virtual std::future<CommonAPI::CallStatus> RegisterSessionAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, RegisterSessionAsyncCallback callback);
+
+ virtual void UnRegisterSession(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode);
+ virtual std::future<CommonAPI::CallStatus> UnRegisterSessionAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, UnRegisterSessionAsyncCallback callback);
+
+ virtual void GetAppHealthCount(CommonAPI::CallStatus& callStatus, uint32_t& Count);
+ virtual std::future<CommonAPI::CallStatus> GetAppHealthCountAsync(GetAppHealthCountAsyncCallback callback);
+
+ virtual void GetInterfaceVersion(CommonAPI::CallStatus& callStatus, uint32_t& Version);
+ virtual std::future<CommonAPI::CallStatus> GetInterfaceVersionAsync(GetInterfaceVersionAsyncCallback callback);
+
+ virtual void LifecycleRequestComplete(const uint32_t& RequestId, const int32_t& Status, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode);
+ virtual std::future<CommonAPI::CallStatus> LifecycleRequestCompleteAsync(const uint32_t& RequestId, const int32_t& Status, LifecycleRequestCompleteAsyncCallback callback);
+
+ virtual void getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const;
+
+ private:
+ CommonAPI::DBus::DBusFreedesktopObservableAttribute<CommonAPI::DBus::DBusFreedesktopAttribute<RestartReasonAttribute>> restartReason_;
+ CommonAPI::DBus::DBusFreedesktopObservableAttribute<CommonAPI::DBus::DBusFreedesktopAttribute<ShutdownReasonAttribute>> shutdownReason_;
+ CommonAPI::DBus::DBusFreedesktopObservableAttribute<CommonAPI::DBus::DBusFreedesktopAttribute<WakeUpReasonAttribute>> wakeUpReason_;
+ CommonAPI::DBus::DBusFreedesktopObservableAttribute<CommonAPI::DBus::DBusFreedesktopAttribute<BootModeAttribute>> bootMode_;
+
+ CommonAPI::DBus::DBusEvent<NodeStateEvent> nodeState_;
+ CommonAPI::DBus::DBusEvent<NodeApplicationModeEvent> nodeApplicationMode_;
+ CommonAPI::DBus::DBusEvent<SessionStateChangedEvent> sessionStateChanged_;
+};
+
+} // namespace Consumer
+} // namespace NodeStateManager
+} // namespace genivi
+} // namespace org
+
+#endif // ORG_GENIVI_NODESTATEMANAGER_CONSUMER_Consumer_DBUS_PROXY_H_
diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerDBusStubAdapter.cpp b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerDBusStubAdapter.cpp
new file mode 100644
index 0000000..a72ba16
--- /dev/null
+++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerDBusStubAdapter.cpp
@@ -0,0 +1,374 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (C) 2012, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#include "ConsumerDBusStubAdapter.h"
+#include <org/genivi/NodeStateManager/Consumer/Consumer.h>
+
+namespace org {
+namespace genivi {
+namespace NodeStateManager {
+namespace Consumer {
+
+std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> createConsumerDBusStubAdapter(
+ const std::string& commonApiAddress,
+ const std::string& interfaceName,
+ const std::string& busName,
+ const std::string& objectPath,
+ const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection,
+ const std::shared_ptr<CommonAPI::StubBase>& stubBase) {
+ return std::make_shared<ConsumerDBusStubAdapter>(commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection, stubBase);
+}
+
+__attribute__((constructor)) void registerConsumerDBusStubAdapter(void) {
+ CommonAPI::DBus::DBusFactory::registerAdapterFactoryMethod(Consumer::getInterfaceId(),
+ &createConsumerDBusStubAdapter);
+}
+
+ConsumerDBusStubAdapter::ConsumerDBusStubAdapter(
+ const std::string& commonApiAddress,
+ const std::string& dbusInterfaceName,
+ const std::string& dbusBusName,
+ const std::string& dbusObjectPath,
+ const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
+ const std::shared_ptr<CommonAPI::StubBase>& stub):
+ ConsumerDBusStubAdapterHelper(commonApiAddress, dbusInterfaceName, dbusBusName, dbusObjectPath, dbusConnection, std::dynamic_pointer_cast<ConsumerStub>(stub)) {
+}
+
+const char* ConsumerDBusStubAdapter::getMethodsDBusIntrospectionXmlData() const {
+ return
+ "<method name=\"getRestartReasonAttribute\">\n"
+ "<arg name=\"value\" type=\"i\" direction=\"out\" />"
+ "</method>\n"
+ "<method name=\"setRestartReasonAttribute\">\n"
+ "<arg name=\"requestedValue\" type=\"i\" direction=\"in\" />\n"
+ "<arg name=\"setValue\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<signal name=\"onRestartReasonAttributeChanged\">\n"
+ "<arg name=\"changedValue\" type=\"i\" />\n"
+ "</signal>\n"
+ "<method name=\"getShutdownReasonAttribute\">\n"
+ "<arg name=\"value\" type=\"i\" direction=\"out\" />"
+ "</method>\n"
+ "<method name=\"setShutdownReasonAttribute\">\n"
+ "<arg name=\"requestedValue\" type=\"i\" direction=\"in\" />\n"
+ "<arg name=\"setValue\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<signal name=\"onShutdownReasonAttributeChanged\">\n"
+ "<arg name=\"changedValue\" type=\"i\" />\n"
+ "</signal>\n"
+ "<method name=\"getWakeUpReasonAttribute\">\n"
+ "<arg name=\"value\" type=\"i\" direction=\"out\" />"
+ "</method>\n"
+ "<method name=\"setWakeUpReasonAttribute\">\n"
+ "<arg name=\"requestedValue\" type=\"i\" direction=\"in\" />\n"
+ "<arg name=\"setValue\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<signal name=\"onWakeUpReasonAttributeChanged\">\n"
+ "<arg name=\"changedValue\" type=\"i\" />\n"
+ "</signal>\n"
+ "<method name=\"getBootModeAttribute\">\n"
+ "<arg name=\"value\" type=\"i\" direction=\"out\" />"
+ "</method>\n"
+ "<method name=\"setBootModeAttribute\">\n"
+ "<arg name=\"requestedValue\" type=\"i\" direction=\"in\" />\n"
+ "<arg name=\"setValue\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<signal name=\"onBootModeAttributeChanged\">\n"
+ "<arg name=\"changedValue\" type=\"i\" />\n"
+ "</signal>\n"
+ "<signal name=\"NodeState\">\n"
+ "<arg name=\"NodeState\" type=\"i\" />\n"
+ "</signal>\n"
+ "<signal name=\"NodeApplicationMode\">\n"
+ "<arg name=\"ApplicationModeId\" type=\"i\" />\n"
+ "</signal>\n"
+ "<signal name=\"SessionStateChanged\">\n"
+ "<arg name=\"SessionStateName\" type=\"s\" />\n"
+ "<arg name=\"SeatID\" type=\"i\" />\n"
+ "<arg name=\"SessionState\" type=\"i\" />\n"
+ "</signal>\n"
+ "<method name=\"GetNodeState\">\n"
+ "<arg name=\"NodeStateId\" type=\"i\" direction=\"out\" />\n"
+ "<arg name=\"ErrorCode\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"SetSessionState\">\n"
+ "<arg name=\"SessionName\" type=\"s\" direction=\"in\" />\n"
+ "<arg name=\"SessionOwner\" type=\"s\" direction=\"in\" />\n"
+ "<arg name=\"SeatID\" type=\"i\" direction=\"in\" />\n"
+ "<arg name=\"SessionState\" type=\"i\" direction=\"in\" />\n"
+ "<arg name=\"ErrorCode\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"GetSessionState\">\n"
+ "<arg name=\"SessionName\" type=\"s\" direction=\"in\" />\n"
+ "<arg name=\"SeatID\" type=\"i\" direction=\"in\" />\n"
+ "<arg name=\"SessionState\" type=\"i\" direction=\"out\" />\n"
+ "<arg name=\"ErrorCode\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"GetApplicationMode\">\n"
+ "<arg name=\"ApplicationModeId\" type=\"i\" direction=\"out\" />\n"
+ "<arg name=\"ErrorCode\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"RegisterShutdownClient\">\n"
+ "<arg name=\"BusName\" type=\"s\" direction=\"in\" />\n"
+ "<arg name=\"ObjName\" type=\"s\" direction=\"in\" />\n"
+ "<arg name=\"ShutdownMode\" type=\"u\" direction=\"in\" />\n"
+ "<arg name=\"TimeoutMs\" type=\"u\" direction=\"in\" />\n"
+ "<arg name=\"ErrorCode\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"UnRegisterShutdownClient\">\n"
+ "<arg name=\"BusName\" type=\"s\" direction=\"in\" />\n"
+ "<arg name=\"ObjName\" type=\"s\" direction=\"in\" />\n"
+ "<arg name=\"ShutdownMode\" type=\"u\" direction=\"in\" />\n"
+ "<arg name=\"ErrorCode\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"RegisterSession\">\n"
+ "<arg name=\"SessionName\" type=\"s\" direction=\"in\" />\n"
+ "<arg name=\"SessionOwner\" type=\"s\" direction=\"in\" />\n"
+ "<arg name=\"SeatID\" type=\"i\" direction=\"in\" />\n"
+ "<arg name=\"SessionState\" type=\"i\" direction=\"in\" />\n"
+ "<arg name=\"ErrorCode\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"UnRegisterSession\">\n"
+ "<arg name=\"SessionName\" type=\"s\" direction=\"in\" />\n"
+ "<arg name=\"SessionOwner\" type=\"s\" direction=\"in\" />\n"
+ "<arg name=\"SeatID\" type=\"i\" direction=\"in\" />\n"
+ "<arg name=\"ErrorCode\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"GetAppHealthCount\">\n"
+ "<arg name=\"Count\" type=\"u\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"GetInterfaceVersion\">\n"
+ "<arg name=\"Version\" type=\"u\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"LifecycleRequestComplete\">\n"
+ "<arg name=\"RequestId\" type=\"u\" direction=\"in\" />\n"
+ "<arg name=\"Status\" type=\"i\" direction=\"in\" />\n"
+ "<arg name=\"ErrorCode\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ ;
+}
+
+
+static CommonAPI::DBus::DBusGetAttributeStubDispatcher<
+ ConsumerStub,
+ int32_t
+ > getRestartReasonAttributeStubDispatcher(&ConsumerStub::getRestartReasonAttribute, "i");
+static CommonAPI::DBus::DBusSetObservableAttributeStubDispatcher<
+ ConsumerStub,
+ int32_t
+ > setRestartReasonAttributeStubDispatcher(
+ &ConsumerStub::getRestartReasonAttribute,
+ &ConsumerStubRemoteEvent::onRemoteSetRestartReasonAttribute,
+ &ConsumerStubRemoteEvent::onRemoteRestartReasonAttributeChanged,
+ &ConsumerStubAdapter::fireRestartReasonAttributeChanged,
+ "i");
+
+static CommonAPI::DBus::DBusGetAttributeStubDispatcher<
+ ConsumerStub,
+ int32_t
+ > getShutdownReasonAttributeStubDispatcher(&ConsumerStub::getShutdownReasonAttribute, "i");
+static CommonAPI::DBus::DBusSetObservableAttributeStubDispatcher<
+ ConsumerStub,
+ int32_t
+ > setShutdownReasonAttributeStubDispatcher(
+ &ConsumerStub::getShutdownReasonAttribute,
+ &ConsumerStubRemoteEvent::onRemoteSetShutdownReasonAttribute,
+ &ConsumerStubRemoteEvent::onRemoteShutdownReasonAttributeChanged,
+ &ConsumerStubAdapter::fireShutdownReasonAttributeChanged,
+ "i");
+
+static CommonAPI::DBus::DBusGetAttributeStubDispatcher<
+ ConsumerStub,
+ int32_t
+ > getWakeUpReasonAttributeStubDispatcher(&ConsumerStub::getWakeUpReasonAttribute, "i");
+static CommonAPI::DBus::DBusSetObservableAttributeStubDispatcher<
+ ConsumerStub,
+ int32_t
+ > setWakeUpReasonAttributeStubDispatcher(
+ &ConsumerStub::getWakeUpReasonAttribute,
+ &ConsumerStubRemoteEvent::onRemoteSetWakeUpReasonAttribute,
+ &ConsumerStubRemoteEvent::onRemoteWakeUpReasonAttributeChanged,
+ &ConsumerStubAdapter::fireWakeUpReasonAttributeChanged,
+ "i");
+
+static CommonAPI::DBus::DBusGetAttributeStubDispatcher<
+ ConsumerStub,
+ int32_t
+ > getBootModeAttributeStubDispatcher(&ConsumerStub::getBootModeAttribute, "i");
+static CommonAPI::DBus::DBusSetObservableAttributeStubDispatcher<
+ ConsumerStub,
+ int32_t
+ > setBootModeAttributeStubDispatcher(
+ &ConsumerStub::getBootModeAttribute,
+ &ConsumerStubRemoteEvent::onRemoteSetBootModeAttribute,
+ &ConsumerStubRemoteEvent::onRemoteBootModeAttributeChanged,
+ &ConsumerStubAdapter::fireBootModeAttributeChanged,
+ "i");
+
+
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ ConsumerStub,
+ std::tuple<>,
+ std::tuple<int32_t, int32_t>
+ > getNodeStateStubDispatcher(&ConsumerStub::GetNodeState, "ii");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ ConsumerStub,
+ std::tuple<std::string, std::string, int32_t, int32_t>,
+ std::tuple<int32_t>
+ > setSessionStateStubDispatcher(&ConsumerStub::SetSessionState, "i");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ ConsumerStub,
+ std::tuple<std::string, int32_t>,
+ std::tuple<int32_t, int32_t>
+ > getSessionStateStubDispatcher(&ConsumerStub::GetSessionState, "ii");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ ConsumerStub,
+ std::tuple<>,
+ std::tuple<int32_t, int32_t>
+ > getApplicationModeStubDispatcher(&ConsumerStub::GetApplicationMode, "ii");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ ConsumerStub,
+ std::tuple<std::string, std::string, uint32_t, uint32_t>,
+ std::tuple<int32_t>
+ > registerShutdownClientStubDispatcher(&ConsumerStub::RegisterShutdownClient, "i");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ ConsumerStub,
+ std::tuple<std::string, std::string, uint32_t>,
+ std::tuple<int32_t>
+ > unRegisterShutdownClientStubDispatcher(&ConsumerStub::UnRegisterShutdownClient, "i");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ ConsumerStub,
+ std::tuple<std::string, std::string, int32_t, int32_t>,
+ std::tuple<int32_t>
+ > registerSessionStubDispatcher(&ConsumerStub::RegisterSession, "i");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ ConsumerStub,
+ std::tuple<std::string, std::string, int32_t>,
+ std::tuple<int32_t>
+ > unRegisterSessionStubDispatcher(&ConsumerStub::UnRegisterSession, "i");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ ConsumerStub,
+ std::tuple<>,
+ std::tuple<uint32_t>
+ > getAppHealthCountStubDispatcher(&ConsumerStub::GetAppHealthCount, "u");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ ConsumerStub,
+ std::tuple<>,
+ std::tuple<uint32_t>
+ > getInterfaceVersionStubDispatcher(&ConsumerStub::GetInterfaceVersion, "u");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ ConsumerStub,
+ std::tuple<uint32_t, int32_t>,
+ std::tuple<int32_t>
+ > lifecycleRequestCompleteStubDispatcher(&ConsumerStub::LifecycleRequestComplete, "i");
+
+void ConsumerDBusStubAdapter::fireRestartReasonAttributeChanged(const int32_t& value) {
+ CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<int32_t>>
+ ::sendSignal(
+ *this,
+ "onRestartReasonAttributeChanged",
+ "i",
+ value
+ );
+}
+void ConsumerDBusStubAdapter::fireShutdownReasonAttributeChanged(const int32_t& value) {
+ CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<int32_t>>
+ ::sendSignal(
+ *this,
+ "onShutdownReasonAttributeChanged",
+ "i",
+ value
+ );
+}
+void ConsumerDBusStubAdapter::fireWakeUpReasonAttributeChanged(const int32_t& value) {
+ CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<int32_t>>
+ ::sendSignal(
+ *this,
+ "onWakeUpReasonAttributeChanged",
+ "i",
+ value
+ );
+}
+void ConsumerDBusStubAdapter::fireBootModeAttributeChanged(const int32_t& value) {
+ CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<int32_t>>
+ ::sendSignal(
+ *this,
+ "onBootModeAttributeChanged",
+ "i",
+ value
+ );
+}
+
+void ConsumerDBusStubAdapter::fireNodeStateEvent(const int32_t& NodeState) {
+ CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<int32_t>>
+ ::sendSignal(
+ *this,
+ "NodeState",
+ "i",
+ NodeState
+ );
+}
+void ConsumerDBusStubAdapter::fireNodeApplicationModeEvent(const int32_t& ApplicationModeId) {
+ CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<int32_t>>
+ ::sendSignal(
+ *this,
+ "NodeApplicationMode",
+ "i",
+ ApplicationModeId
+ );
+}
+void ConsumerDBusStubAdapter::fireSessionStateChangedEvent(const std::string& SessionStateName, const int32_t& SeatID, const int32_t& SessionState) {
+ CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<std::string, int32_t, int32_t>>
+ ::sendSignal(
+ *this,
+ "SessionStateChanged",
+ "sii",
+ SessionStateName, SeatID, SessionState
+ );
+}
+
+} // namespace Consumer
+} // namespace NodeStateManager
+} // namespace genivi
+} // namespace org
+
+template<>
+const org::genivi::NodeStateManager::Consumer::ConsumerDBusStubAdapterHelper::StubDispatcherTable org::genivi::NodeStateManager::Consumer::ConsumerDBusStubAdapterHelper::stubDispatcherTable_ = {
+ { { "getRestartReasonAttribute", "" }, &org::genivi::NodeStateManager::Consumer::getRestartReasonAttributeStubDispatcher }
+ , { { "setRestartReasonAttribute", "i" }, &org::genivi::NodeStateManager::Consumer::setRestartReasonAttributeStubDispatcher },
+ { { "getShutdownReasonAttribute", "" }, &org::genivi::NodeStateManager::Consumer::getShutdownReasonAttributeStubDispatcher }
+ , { { "setShutdownReasonAttribute", "i" }, &org::genivi::NodeStateManager::Consumer::setShutdownReasonAttributeStubDispatcher },
+ { { "getWakeUpReasonAttribute", "" }, &org::genivi::NodeStateManager::Consumer::getWakeUpReasonAttributeStubDispatcher }
+ , { { "setWakeUpReasonAttribute", "i" }, &org::genivi::NodeStateManager::Consumer::setWakeUpReasonAttributeStubDispatcher },
+ { { "getBootModeAttribute", "" }, &org::genivi::NodeStateManager::Consumer::getBootModeAttributeStubDispatcher }
+ , { { "setBootModeAttribute", "i" }, &org::genivi::NodeStateManager::Consumer::setBootModeAttributeStubDispatcher }
+ ,
+ { { "GetNodeState", "" }, &org::genivi::NodeStateManager::Consumer::getNodeStateStubDispatcher },
+ { { "SetSessionState", "ssii" }, &org::genivi::NodeStateManager::Consumer::setSessionStateStubDispatcher },
+ { { "GetSessionState", "si" }, &org::genivi::NodeStateManager::Consumer::getSessionStateStubDispatcher },
+ { { "GetApplicationMode", "" }, &org::genivi::NodeStateManager::Consumer::getApplicationModeStubDispatcher },
+ { { "RegisterShutdownClient", "ssuu" }, &org::genivi::NodeStateManager::Consumer::registerShutdownClientStubDispatcher },
+ { { "UnRegisterShutdownClient", "ssu" }, &org::genivi::NodeStateManager::Consumer::unRegisterShutdownClientStubDispatcher },
+ { { "RegisterSession", "ssii" }, &org::genivi::NodeStateManager::Consumer::registerSessionStubDispatcher },
+ { { "UnRegisterSession", "ssi" }, &org::genivi::NodeStateManager::Consumer::unRegisterSessionStubDispatcher },
+ { { "GetAppHealthCount", "" }, &org::genivi::NodeStateManager::Consumer::getAppHealthCountStubDispatcher },
+ { { "GetInterfaceVersion", "" }, &org::genivi::NodeStateManager::Consumer::getInterfaceVersionStubDispatcher },
+ { { "LifecycleRequestComplete", "ui" }, &org::genivi::NodeStateManager::Consumer::lifecycleRequestCompleteStubDispatcher }
+};
diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerDBusStubAdapter.h b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerDBusStubAdapter.h
new file mode 100644
index 0000000..8b43c21
--- /dev/null
+++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerDBusStubAdapter.h
@@ -0,0 +1,68 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (C) 2012, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_NODESTATEMANAGER_CONSUMER_Consumer_DBUS_STUB_ADAPTER_H_
+#define ORG_GENIVI_NODESTATEMANAGER_CONSUMER_Consumer_DBUS_STUB_ADAPTER_H_
+
+#include <org/genivi/NodeStateManager/Consumer/ConsumerStub.h>
+
+#define COMMONAPI_INTERNAL_COMPILATION
+
+#include <CommonAPI/DBus/DBusStubAdapterHelper.h>
+#include <CommonAPI/DBus/DBusFactory.h>
+
+#undef COMMONAPI_INTERNAL_COMPILATION
+
+namespace org {
+namespace genivi {
+namespace NodeStateManager {
+namespace Consumer {
+
+typedef CommonAPI::DBus::DBusStubAdapterHelper<ConsumerStub> ConsumerDBusStubAdapterHelper;
+
+class ConsumerDBusStubAdapter: public ConsumerStubAdapter, public ConsumerDBusStubAdapterHelper {
+ public:
+ ConsumerDBusStubAdapter(
+ const std::string& commonApiAddress,
+ const std::string& dbusInterfaceName,
+ const std::string& dbusBusName,
+ const std::string& dbusObjectPath,
+ const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
+ const std::shared_ptr<CommonAPI::StubBase>& stub);
+
+ void fireRestartReasonAttributeChanged(const int32_t& value);
+ void fireShutdownReasonAttributeChanged(const int32_t& value);
+ void fireWakeUpReasonAttributeChanged(const int32_t& value);
+ void fireBootModeAttributeChanged(const int32_t& value);
+
+ void fireNodeStateEvent(const int32_t& NodeState);
+ void fireNodeApplicationModeEvent(const int32_t& ApplicationModeId);
+ void fireSessionStateChangedEvent(const std::string& SessionStateName, const int32_t& SeatID, const int32_t& SessionState);
+
+ protected:
+ virtual const char* getMethodsDBusIntrospectionXmlData() const;
+};
+
+} // namespace Consumer
+} // namespace NodeStateManager
+} // namespace genivi
+} // namespace org
+
+#endif // ORG_GENIVI_NODESTATEMANAGER_CONSUMER_Consumer_DBUS_STUB_ADAPTER_H_
diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerProxy.h b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerProxy.h
new file mode 100644
index 0000000..273fa8b
--- /dev/null
+++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerProxy.h
@@ -0,0 +1,619 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (C) 2012, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_NODESTATEMANAGER_CONSUMER_Consumer_PROXY_H_
+#define ORG_GENIVI_NODESTATEMANAGER_CONSUMER_Consumer_PROXY_H_
+
+#include "ConsumerProxyBase.h"
+
+#define COMMONAPI_INTERNAL_COMPILATION
+
+#include <CommonAPI/AttributeExtension.h>
+#include <CommonAPI/Factory.h>
+
+#undef COMMONAPI_INTERNAL_COMPILATION
+
+namespace org {
+namespace genivi {
+namespace NodeStateManager {
+namespace Consumer {
+
+template <typename ... _AttributeExtensions>
+class ConsumerProxy: virtual public Consumer, virtual public ConsumerProxyBase, public _AttributeExtensions... {
+ public:
+ ConsumerProxy(std::shared_ptr<CommonAPI::Proxy> delegate);
+ ~ConsumerProxy();
+
+ /// Returns the wrapper class that provides access to the attribute RestartReason.
+ virtual RestartReasonAttribute& getRestartReasonAttribute() {
+ return delegate_->getRestartReasonAttribute();
+ }
+
+ /// Returns the wrapper class that provides access to the attribute ShutdownReason.
+ virtual ShutdownReasonAttribute& getShutdownReasonAttribute() {
+ return delegate_->getShutdownReasonAttribute();
+ }
+
+ /// Returns the wrapper class that provides access to the attribute WakeUpReason.
+ virtual WakeUpReasonAttribute& getWakeUpReasonAttribute() {
+ return delegate_->getWakeUpReasonAttribute();
+ }
+
+ /// Returns the wrapper class that provides access to the attribute BootMode.
+ virtual BootModeAttribute& getBootModeAttribute() {
+ return delegate_->getBootModeAttribute();
+ }
+
+
+ /// Returns the wrapper class that provides access to the broadcast NodeState.
+ virtual NodeStateEvent& getNodeStateEvent() {
+ return delegate_->getNodeStateEvent();
+ }
+
+ /// Returns the wrapper class that provides access to the broadcast NodeApplicationMode.
+ virtual NodeApplicationModeEvent& getNodeApplicationModeEvent() {
+ return delegate_->getNodeApplicationModeEvent();
+ }
+
+ /// Returns the wrapper class that provides access to the broadcast SessionStateChanged.
+ virtual SessionStateChangedEvent& getSessionStateChangedEvent() {
+ return delegate_->getSessionStateChangedEvent();
+ }
+
+
+
+ /**
+ * Calls GetNodeState with synchronous semantics.
+ *
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void GetNodeState(CommonAPI::CallStatus& callStatus, int32_t& NodeStateId, int32_t& ErrorCode);
+ /**
+ * Calls GetNodeState with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> GetNodeStateAsync(GetNodeStateAsyncCallback callback);
+
+ /**
+ * Calls SetSessionState with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void SetSessionState(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode);
+ /**
+ * Calls SetSessionState with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> SetSessionStateAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, SetSessionStateAsyncCallback callback);
+
+ /**
+ * Calls GetSessionState with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void GetSessionState(const std::string& SessionName, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& SessionState, int32_t& ErrorCode);
+ /**
+ * Calls GetSessionState with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> GetSessionStateAsync(const std::string& SessionName, const int32_t& SeatID, GetSessionStateAsyncCallback callback);
+
+ /**
+ * Calls GetApplicationMode with synchronous semantics.
+ *
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void GetApplicationMode(CommonAPI::CallStatus& callStatus, int32_t& ApplicationModeId, int32_t& ErrorCode);
+ /**
+ * Calls GetApplicationMode with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> GetApplicationModeAsync(GetApplicationModeAsyncCallback callback);
+
+ /**
+ * Calls RegisterShutdownClient with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void RegisterShutdownClient(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, const uint32_t& TimeoutMs, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode);
+ /**
+ * Calls RegisterShutdownClient with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> RegisterShutdownClientAsync(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, const uint32_t& TimeoutMs, RegisterShutdownClientAsyncCallback callback);
+
+ /**
+ * Calls UnRegisterShutdownClient with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void UnRegisterShutdownClient(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode);
+ /**
+ * Calls UnRegisterShutdownClient with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> UnRegisterShutdownClientAsync(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, UnRegisterShutdownClientAsyncCallback callback);
+
+ /**
+ * Calls RegisterSession with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void RegisterSession(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode);
+ /**
+ * Calls RegisterSession with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> RegisterSessionAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, RegisterSessionAsyncCallback callback);
+
+ /**
+ * Calls UnRegisterSession with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void UnRegisterSession(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode);
+ /**
+ * Calls UnRegisterSession with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> UnRegisterSessionAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, UnRegisterSessionAsyncCallback callback);
+
+ /**
+ * Calls GetAppHealthCount with synchronous semantics.
+ *
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void GetAppHealthCount(CommonAPI::CallStatus& callStatus, uint32_t& Count);
+ /**
+ * Calls GetAppHealthCount with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> GetAppHealthCountAsync(GetAppHealthCountAsyncCallback callback);
+
+ /**
+ * Calls GetInterfaceVersion with synchronous semantics.
+ *
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void GetInterfaceVersion(CommonAPI::CallStatus& callStatus, uint32_t& Version);
+ /**
+ * Calls GetInterfaceVersion with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> GetInterfaceVersionAsync(GetInterfaceVersionAsyncCallback callback);
+
+ /**
+ * Calls LifecycleRequestComplete with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void LifecycleRequestComplete(const uint32_t& RequestId, const int32_t& Status, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode);
+ /**
+ * Calls LifecycleRequestComplete with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> LifecycleRequestCompleteAsync(const uint32_t& RequestId, const int32_t& Status, LifecycleRequestCompleteAsyncCallback callback);
+
+ /// Returns the CommonAPI address of the remote partner this proxy communicates with.
+ virtual std::string getAddress() const;
+
+ /// Returns the domain of the remote partner this proxy communicates with.
+ virtual const std::string& getDomain() const;
+
+ /// Returns the service ID of the remote partner this proxy communicates with.
+ virtual const std::string& getServiceId() const;
+
+ /// Returns the instance ID of the remote partner this proxy communicates with.
+ virtual const std::string& getInstanceId() const;
+
+ /// Returns true if the remote partner for this proxy is available.
+ virtual bool isAvailable() const;
+
+ /**
+ * Returns the wrapper class that is used to (de-)register for notifications about
+ * the availability of the remote partner of this proxy.
+ */
+ virtual CommonAPI::ProxyStatusEvent& getProxyStatusEvent();
+
+ /**
+ * Returns the wrapper class that is used to access version information of the remote
+ * partner of this proxy.
+ */
+ virtual CommonAPI::InterfaceVersionAttribute& getInterfaceVersionAttribute();
+
+ private:
+ std::shared_ptr<ConsumerProxyBase> delegate_;
+};
+
+namespace ConsumerExtensions {
+ template <template <typename > class _ExtensionType>
+ class RestartReasonAttributeExtension {
+ public:
+ typedef _ExtensionType<ConsumerProxyBase::RestartReasonAttribute> extension_type;
+
+ static_assert(std::is_base_of<typename CommonAPI::AttributeExtension<ConsumerProxyBase::RestartReasonAttribute>, extension_type>::value,
+ "Not CommonAPI Attribute Extension!");
+
+ RestartReasonAttributeExtension(ConsumerProxyBase& proxy): attributeExtension_(proxy.getRestartReasonAttribute()) {
+ }
+
+ inline extension_type& getRestartReasonAttributeExtension() {
+ return attributeExtension_;
+ }
+
+ private:
+ extension_type attributeExtension_;
+ };
+
+ template <template <typename > class _ExtensionType>
+ class ShutdownReasonAttributeExtension {
+ public:
+ typedef _ExtensionType<ConsumerProxyBase::ShutdownReasonAttribute> extension_type;
+
+ static_assert(std::is_base_of<typename CommonAPI::AttributeExtension<ConsumerProxyBase::ShutdownReasonAttribute>, extension_type>::value,
+ "Not CommonAPI Attribute Extension!");
+
+ ShutdownReasonAttributeExtension(ConsumerProxyBase& proxy): attributeExtension_(proxy.getShutdownReasonAttribute()) {
+ }
+
+ inline extension_type& getShutdownReasonAttributeExtension() {
+ return attributeExtension_;
+ }
+
+ private:
+ extension_type attributeExtension_;
+ };
+
+ template <template <typename > class _ExtensionType>
+ class WakeUpReasonAttributeExtension {
+ public:
+ typedef _ExtensionType<ConsumerProxyBase::WakeUpReasonAttribute> extension_type;
+
+ static_assert(std::is_base_of<typename CommonAPI::AttributeExtension<ConsumerProxyBase::WakeUpReasonAttribute>, extension_type>::value,
+ "Not CommonAPI Attribute Extension!");
+
+ WakeUpReasonAttributeExtension(ConsumerProxyBase& proxy): attributeExtension_(proxy.getWakeUpReasonAttribute()) {
+ }
+
+ inline extension_type& getWakeUpReasonAttributeExtension() {
+ return attributeExtension_;
+ }
+
+ private:
+ extension_type attributeExtension_;
+ };
+
+ template <template <typename > class _ExtensionType>
+ class BootModeAttributeExtension {
+ public:
+ typedef _ExtensionType<ConsumerProxyBase::BootModeAttribute> extension_type;
+
+ static_assert(std::is_base_of<typename CommonAPI::AttributeExtension<ConsumerProxyBase::BootModeAttribute>, extension_type>::value,
+ "Not CommonAPI Attribute Extension!");
+
+ BootModeAttributeExtension(ConsumerProxyBase& proxy): attributeExtension_(proxy.getBootModeAttribute()) {
+ }
+
+ inline extension_type& getBootModeAttributeExtension() {
+ return attributeExtension_;
+ }
+
+ private:
+ extension_type attributeExtension_;
+ };
+
+} // namespace ConsumerExtensions
+
+//
+// ConsumerProxy Implementation
+//
+template <typename ... _AttributeExtensions>
+ConsumerProxy<_AttributeExtensions...>::ConsumerProxy(std::shared_ptr<CommonAPI::Proxy> delegate):
+ delegate_(std::dynamic_pointer_cast<ConsumerProxyBase>(delegate)),
+ _AttributeExtensions(*(std::dynamic_pointer_cast<ConsumerProxyBase>(delegate)))... {
+}
+
+template <typename ... _AttributeExtensions>
+ConsumerProxy<_AttributeExtensions...>::~ConsumerProxy() {
+}
+
+template <typename ... _AttributeExtensions>
+void ConsumerProxy<_AttributeExtensions...>::GetNodeState(CommonAPI::CallStatus& callStatus, int32_t& NodeStateId, int32_t& ErrorCode) {
+ delegate_->GetNodeState(callStatus, NodeStateId, ErrorCode);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> ConsumerProxy<_AttributeExtensions...>::GetNodeStateAsync(GetNodeStateAsyncCallback callback) {
+ return delegate_->GetNodeStateAsync(callback);
+}
+
+template <typename ... _AttributeExtensions>
+void ConsumerProxy<_AttributeExtensions...>::SetSessionState(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) {
+ delegate_->SetSessionState(SessionName, SessionOwner, SeatID, SessionState, callStatus, ErrorCode);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> ConsumerProxy<_AttributeExtensions...>::SetSessionStateAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, SetSessionStateAsyncCallback callback) {
+ return delegate_->SetSessionStateAsync(SessionName, SessionOwner, SeatID, SessionState, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void ConsumerProxy<_AttributeExtensions...>::GetSessionState(const std::string& SessionName, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& SessionState, int32_t& ErrorCode) {
+ delegate_->GetSessionState(SessionName, SeatID, callStatus, SessionState, ErrorCode);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> ConsumerProxy<_AttributeExtensions...>::GetSessionStateAsync(const std::string& SessionName, const int32_t& SeatID, GetSessionStateAsyncCallback callback) {
+ return delegate_->GetSessionStateAsync(SessionName, SeatID, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void ConsumerProxy<_AttributeExtensions...>::GetApplicationMode(CommonAPI::CallStatus& callStatus, int32_t& ApplicationModeId, int32_t& ErrorCode) {
+ delegate_->GetApplicationMode(callStatus, ApplicationModeId, ErrorCode);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> ConsumerProxy<_AttributeExtensions...>::GetApplicationModeAsync(GetApplicationModeAsyncCallback callback) {
+ return delegate_->GetApplicationModeAsync(callback);
+}
+
+template <typename ... _AttributeExtensions>
+void ConsumerProxy<_AttributeExtensions...>::RegisterShutdownClient(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, const uint32_t& TimeoutMs, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) {
+ delegate_->RegisterShutdownClient(BusName, ObjName, ShutdownMode, TimeoutMs, callStatus, ErrorCode);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> ConsumerProxy<_AttributeExtensions...>::RegisterShutdownClientAsync(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, const uint32_t& TimeoutMs, RegisterShutdownClientAsyncCallback callback) {
+ return delegate_->RegisterShutdownClientAsync(BusName, ObjName, ShutdownMode, TimeoutMs, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void ConsumerProxy<_AttributeExtensions...>::UnRegisterShutdownClient(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) {
+ delegate_->UnRegisterShutdownClient(BusName, ObjName, ShutdownMode, callStatus, ErrorCode);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> ConsumerProxy<_AttributeExtensions...>::UnRegisterShutdownClientAsync(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, UnRegisterShutdownClientAsyncCallback callback) {
+ return delegate_->UnRegisterShutdownClientAsync(BusName, ObjName, ShutdownMode, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void ConsumerProxy<_AttributeExtensions...>::RegisterSession(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) {
+ delegate_->RegisterSession(SessionName, SessionOwner, SeatID, SessionState, callStatus, ErrorCode);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> ConsumerProxy<_AttributeExtensions...>::RegisterSessionAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, RegisterSessionAsyncCallback callback) {
+ return delegate_->RegisterSessionAsync(SessionName, SessionOwner, SeatID, SessionState, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void ConsumerProxy<_AttributeExtensions...>::UnRegisterSession(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) {
+ delegate_->UnRegisterSession(SessionName, SessionOwner, SeatID, callStatus, ErrorCode);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> ConsumerProxy<_AttributeExtensions...>::UnRegisterSessionAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, UnRegisterSessionAsyncCallback callback) {
+ return delegate_->UnRegisterSessionAsync(SessionName, SessionOwner, SeatID, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void ConsumerProxy<_AttributeExtensions...>::GetAppHealthCount(CommonAPI::CallStatus& callStatus, uint32_t& Count) {
+ delegate_->GetAppHealthCount(callStatus, Count);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> ConsumerProxy<_AttributeExtensions...>::GetAppHealthCountAsync(GetAppHealthCountAsyncCallback callback) {
+ return delegate_->GetAppHealthCountAsync(callback);
+}
+
+template <typename ... _AttributeExtensions>
+void ConsumerProxy<_AttributeExtensions...>::GetInterfaceVersion(CommonAPI::CallStatus& callStatus, uint32_t& Version) {
+ delegate_->GetInterfaceVersion(callStatus, Version);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> ConsumerProxy<_AttributeExtensions...>::GetInterfaceVersionAsync(GetInterfaceVersionAsyncCallback callback) {
+ return delegate_->GetInterfaceVersionAsync(callback);
+}
+
+template <typename ... _AttributeExtensions>
+void ConsumerProxy<_AttributeExtensions...>::LifecycleRequestComplete(const uint32_t& RequestId, const int32_t& Status, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) {
+ delegate_->LifecycleRequestComplete(RequestId, Status, callStatus, ErrorCode);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> ConsumerProxy<_AttributeExtensions...>::LifecycleRequestCompleteAsync(const uint32_t& RequestId, const int32_t& Status, LifecycleRequestCompleteAsyncCallback callback) {
+ return delegate_->LifecycleRequestCompleteAsync(RequestId, Status, callback);
+}
+
+
+template <typename ... _AttributeExtensions>
+std::string ConsumerProxy<_AttributeExtensions...>::getAddress() const {
+ return delegate_->getAddress();
+}
+
+template <typename ... _AttributeExtensions>
+const std::string& ConsumerProxy<_AttributeExtensions...>::getDomain() const {
+ return delegate_->getDomain();
+}
+
+template <typename ... _AttributeExtensions>
+const std::string& ConsumerProxy<_AttributeExtensions...>::getServiceId() const {
+ return delegate_->getServiceId();
+}
+
+template <typename ... _AttributeExtensions>
+const std::string& ConsumerProxy<_AttributeExtensions...>::getInstanceId() const {
+ return delegate_->getInstanceId();
+}
+
+template <typename ... _AttributeExtensions>
+bool ConsumerProxy<_AttributeExtensions...>::isAvailable() const {
+ return delegate_->isAvailable();
+}
+
+template <typename ... _AttributeExtensions>
+CommonAPI::ProxyStatusEvent& ConsumerProxy<_AttributeExtensions...>::getProxyStatusEvent() {
+ return delegate_->getProxyStatusEvent();
+}
+
+template <typename ... _AttributeExtensions>
+CommonAPI::InterfaceVersionAttribute& ConsumerProxy<_AttributeExtensions...>::getInterfaceVersionAttribute() {
+ return delegate_->getInterfaceVersionAttribute();
+}
+
+} // namespace Consumer
+} // namespace NodeStateManager
+} // namespace genivi
+} // namespace org
+
+namespace CommonAPI {
+template<template<typename > class _AttributeExtension>
+struct DefaultAttributeProxyFactoryHelper<org::genivi::NodeStateManager::Consumer::ConsumerProxy,
+ _AttributeExtension> {
+ typedef typename org::genivi::NodeStateManager::Consumer::ConsumerProxy<
+ org::genivi::NodeStateManager::Consumer::ConsumerExtensions::RestartReasonAttributeExtension<_AttributeExtension>,
+ org::genivi::NodeStateManager::Consumer::ConsumerExtensions::ShutdownReasonAttributeExtension<_AttributeExtension>,
+ org::genivi::NodeStateManager::Consumer::ConsumerExtensions::WakeUpReasonAttributeExtension<_AttributeExtension>,
+ org::genivi::NodeStateManager::Consumer::ConsumerExtensions::BootModeAttributeExtension<_AttributeExtension>
+ > class_t;
+};
+}
+
+
+#endif // ORG_GENIVI_NODESTATEMANAGER_CONSUMER_Consumer_PROXY_H_
diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerProxyBase.h b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerProxyBase.h
new file mode 100644
index 0000000..076f5cc
--- /dev/null
+++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerProxyBase.h
@@ -0,0 +1,114 @@
+ /*
+ * This file was generated by the CommonAPI Generators.
+ *
+ * Copyright (C) 2012, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * For further information see http://www.genivi.org/.
+ */
+ #ifndef ORG_GENIVI_NODESTATEMANAGER_CONSUMER_Consumer_PROXY_BASE_H_
+ #define ORG_GENIVI_NODESTATEMANAGER_CONSUMER_Consumer_PROXY_BASE_H_
+
+ #include "Consumer.h"
+
+
+
+ #define COMMONAPI_INTERNAL_COMPILATION
+
+
+ #include <CommonAPI/Attribute.h>
+ #include <CommonAPI/Event.h>
+ #include <CommonAPI/Proxy.h>
+ #include <functional>
+ #include <future>
+
+ #undef COMMONAPI_INTERNAL_COMPILATION
+
+ namespace org {
+ namespace genivi {
+ namespace NodeStateManager {
+ namespace Consumer {
+
+ class ConsumerProxyBase: virtual public CommonAPI::Proxy {
+ public:
+ typedef CommonAPI::ObservableAttribute<int32_t> RestartReasonAttribute;
+ typedef CommonAPI::ObservableAttribute<int32_t> ShutdownReasonAttribute;
+ typedef CommonAPI::ObservableAttribute<int32_t> WakeUpReasonAttribute;
+ typedef CommonAPI::ObservableAttribute<int32_t> BootModeAttribute;
+ typedef CommonAPI::Event<int32_t> NodeStateEvent;
+ typedef CommonAPI::Event<int32_t> NodeApplicationModeEvent;
+ typedef CommonAPI::Event<std::string, int32_t, int32_t> SessionStateChangedEvent;
+ typedef std::function<void(const CommonAPI::CallStatus&, const int32_t&, const int32_t&)> GetNodeStateAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const int32_t&)> SetSessionStateAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const int32_t&, const int32_t&)> GetSessionStateAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const int32_t&, const int32_t&)> GetApplicationModeAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const int32_t&)> RegisterShutdownClientAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const int32_t&)> UnRegisterShutdownClientAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const int32_t&)> RegisterSessionAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const int32_t&)> UnRegisterSessionAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const uint32_t&)> GetAppHealthCountAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const uint32_t&)> GetInterfaceVersionAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const int32_t&)> LifecycleRequestCompleteAsyncCallback;
+
+ virtual RestartReasonAttribute& getRestartReasonAttribute() = 0;
+ virtual ShutdownReasonAttribute& getShutdownReasonAttribute() = 0;
+ virtual WakeUpReasonAttribute& getWakeUpReasonAttribute() = 0;
+ virtual BootModeAttribute& getBootModeAttribute() = 0;
+
+ virtual NodeStateEvent& getNodeStateEvent() = 0;
+ virtual NodeApplicationModeEvent& getNodeApplicationModeEvent() = 0;
+ virtual SessionStateChangedEvent& getSessionStateChangedEvent() = 0;
+
+
+ virtual void GetNodeState(CommonAPI::CallStatus& callStatus, int32_t& NodeStateId, int32_t& ErrorCode) = 0;
+ virtual std::future<CommonAPI::CallStatus> GetNodeStateAsync(GetNodeStateAsyncCallback callback) = 0;
+
+ virtual void SetSessionState(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) = 0;
+ virtual std::future<CommonAPI::CallStatus> SetSessionStateAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, SetSessionStateAsyncCallback callback) = 0;
+
+ virtual void GetSessionState(const std::string& SessionName, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& SessionState, int32_t& ErrorCode) = 0;
+ virtual std::future<CommonAPI::CallStatus> GetSessionStateAsync(const std::string& SessionName, const int32_t& SeatID, GetSessionStateAsyncCallback callback) = 0;
+
+ virtual void GetApplicationMode(CommonAPI::CallStatus& callStatus, int32_t& ApplicationModeId, int32_t& ErrorCode) = 0;
+ virtual std::future<CommonAPI::CallStatus> GetApplicationModeAsync(GetApplicationModeAsyncCallback callback) = 0;
+
+ virtual void RegisterShutdownClient(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, const uint32_t& TimeoutMs, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) = 0;
+ virtual std::future<CommonAPI::CallStatus> RegisterShutdownClientAsync(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, const uint32_t& TimeoutMs, RegisterShutdownClientAsyncCallback callback) = 0;
+
+ virtual void UnRegisterShutdownClient(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) = 0;
+ virtual std::future<CommonAPI::CallStatus> UnRegisterShutdownClientAsync(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, UnRegisterShutdownClientAsyncCallback callback) = 0;
+
+ virtual void RegisterSession(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) = 0;
+ virtual std::future<CommonAPI::CallStatus> RegisterSessionAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, RegisterSessionAsyncCallback callback) = 0;
+
+ virtual void UnRegisterSession(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) = 0;
+ virtual std::future<CommonAPI::CallStatus> UnRegisterSessionAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, UnRegisterSessionAsyncCallback callback) = 0;
+
+ virtual void GetAppHealthCount(CommonAPI::CallStatus& callStatus, uint32_t& Count) = 0;
+ virtual std::future<CommonAPI::CallStatus> GetAppHealthCountAsync(GetAppHealthCountAsyncCallback callback) = 0;
+
+ virtual void GetInterfaceVersion(CommonAPI::CallStatus& callStatus, uint32_t& Version) = 0;
+ virtual std::future<CommonAPI::CallStatus> GetInterfaceVersionAsync(GetInterfaceVersionAsyncCallback callback) = 0;
+
+ virtual void LifecycleRequestComplete(const uint32_t& RequestId, const int32_t& Status, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) = 0;
+ virtual std::future<CommonAPI::CallStatus> LifecycleRequestCompleteAsync(const uint32_t& RequestId, const int32_t& Status, LifecycleRequestCompleteAsyncCallback callback) = 0;
+ };
+
+ } // namespace Consumer
+ } // namespace NodeStateManager
+ } // namespace genivi
+ } // namespace org
+
+ #endif // ORG_GENIVI_NODESTATEMANAGER_CONSUMER_Consumer_PROXY_BASE_H_
diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerStub.h b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerStub.h
new file mode 100644
index 0000000..02fc7ae
--- /dev/null
+++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerStub.h
@@ -0,0 +1,170 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (C) 2012, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_NODESTATEMANAGER_CONSUMER_Consumer_STUB_H_
+#define ORG_GENIVI_NODESTATEMANAGER_CONSUMER_Consumer_STUB_H_
+
+
+
+
+#include "Consumer.h"
+
+#define COMMONAPI_INTERNAL_COMPILATION
+
+
+#include <CommonAPI/Stub.h>
+
+#undef COMMONAPI_INTERNAL_COMPILATION
+
+namespace org {
+namespace genivi {
+namespace NodeStateManager {
+namespace Consumer {
+
+/**
+ * Receives messages from remote and handles all dispatching of deserialized calls
+ * to a stub for the service Consumer. Also provides means to send broadcasts
+ * and attribute-changed-notifications of observable attributes as defined by this service.
+ * An application developer should not need to bother with this class.
+ */
+class ConsumerStubAdapter: virtual public CommonAPI::StubAdapter, public Consumer {
+ public:
+ ///Notifies all remote listeners about a change of value of the attribute RestartReason.
+ virtual void fireRestartReasonAttributeChanged(const int32_t& RestartReason) = 0;
+ ///Notifies all remote listeners about a change of value of the attribute ShutdownReason.
+ virtual void fireShutdownReasonAttributeChanged(const int32_t& ShutdownReason) = 0;
+ ///Notifies all remote listeners about a change of value of the attribute WakeUpReason.
+ virtual void fireWakeUpReasonAttributeChanged(const int32_t& WakeUpReason) = 0;
+ ///Notifies all remote listeners about a change of value of the attribute BootMode.
+ virtual void fireBootModeAttributeChanged(const int32_t& BootMode) = 0;
+
+ /**
+ * Sends a broadcast event for NodeState. Should not be called directly.
+ * Instead, the "fire<broadcastName>Event" methods of the stub should be used.
+ */
+ virtual void fireNodeStateEvent(const int32_t& NodeState) = 0;
+ /**
+ * Sends a broadcast event for NodeApplicationMode. Should not be called directly.
+ * Instead, the "fire<broadcastName>Event" methods of the stub should be used.
+ */
+ virtual void fireNodeApplicationModeEvent(const int32_t& ApplicationModeId) = 0;
+ /**
+ * Sends a broadcast event for SessionStateChanged. Should not be called directly.
+ * Instead, the "fire<broadcastName>Event" methods of the stub should be used.
+ */
+ virtual void fireSessionStateChangedEvent(const std::string& SessionStateName, const int32_t& SeatID, const int32_t& SessionState) = 0;
+};
+
+
+/**
+ * Defines the necessary callbacks to handle remote set events related to the attributes
+ * defined in the IDL description for Consumer.
+ * For each attribute two callbacks are defined:
+ * - a verification callback that allows to verify the requested value and to prevent setting
+ * e.g. an invalid value ("onRemoteSet<AttributeName>").
+ * - an action callback to do local work after the attribute value has been changed
+ * ("onRemote<AttributeName>Changed").
+ *
+ * This class and the one below are the ones an application developer needs to have
+ * a look at if he wants to implement a service.
+ */
+class ConsumerStubRemoteEvent {
+ public:
+ virtual ~ConsumerStubRemoteEvent() { }
+
+ /// Verification callback for remote set requests on the attribute RestartReason.
+ virtual bool onRemoteSetRestartReasonAttribute(int32_t RestartReason) = 0;
+ /// Action callback for remote set requests on the attribute RestartReason.
+ virtual void onRemoteRestartReasonAttributeChanged() = 0;
+
+ /// Verification callback for remote set requests on the attribute ShutdownReason.
+ virtual bool onRemoteSetShutdownReasonAttribute(int32_t ShutdownReason) = 0;
+ /// Action callback for remote set requests on the attribute ShutdownReason.
+ virtual void onRemoteShutdownReasonAttributeChanged() = 0;
+
+ /// Verification callback for remote set requests on the attribute WakeUpReason.
+ virtual bool onRemoteSetWakeUpReasonAttribute(int32_t WakeUpReason) = 0;
+ /// Action callback for remote set requests on the attribute WakeUpReason.
+ virtual void onRemoteWakeUpReasonAttributeChanged() = 0;
+
+ /// Verification callback for remote set requests on the attribute BootMode.
+ virtual bool onRemoteSetBootModeAttribute(int32_t BootMode) = 0;
+ /// Action callback for remote set requests on the attribute BootMode.
+ virtual void onRemoteBootModeAttributeChanged() = 0;
+
+};
+
+
+/**
+ * Defines the interface that must be implemented by any class that should provide
+ * the service Consumer to remote clients.
+ * This class and the one above are the ones an application developer needs to have
+ * a look at if he wants to implement a service.
+ */
+class ConsumerStub : public CommonAPI::Stub<ConsumerStubAdapter , ConsumerStubRemoteEvent> {
+ public:
+ virtual ~ConsumerStub() { }
+
+ /// Provides getter access to the attribute RestartReason.
+ virtual const int32_t& getRestartReasonAttribute() = 0;
+ /// Provides getter access to the attribute ShutdownReason.
+ virtual const int32_t& getShutdownReasonAttribute() = 0;
+ /// Provides getter access to the attribute WakeUpReason.
+ virtual const int32_t& getWakeUpReasonAttribute() = 0;
+ /// Provides getter access to the attribute BootMode.
+ virtual const int32_t& getBootModeAttribute() = 0;
+
+ /// This is the method that will be called on remote calls on the method GetNodeState.
+ virtual void GetNodeState(int32_t& NodeStateId, int32_t& ErrorCode) = 0;
+ /// This is the method that will be called on remote calls on the method SetSessionState.
+ virtual void SetSessionState(std::string SessionName, std::string SessionOwner, int32_t SeatID, int32_t SessionState, int32_t& ErrorCode) = 0;
+ /// This is the method that will be called on remote calls on the method GetSessionState.
+ virtual void GetSessionState(std::string SessionName, int32_t SeatID, int32_t& SessionState, int32_t& ErrorCode) = 0;
+ /// This is the method that will be called on remote calls on the method GetApplicationMode.
+ virtual void GetApplicationMode(int32_t& ApplicationModeId, int32_t& ErrorCode) = 0;
+ /// This is the method that will be called on remote calls on the method RegisterShutdownClient.
+ virtual void RegisterShutdownClient(std::string BusName, std::string ObjName, uint32_t ShutdownMode, uint32_t TimeoutMs, int32_t& ErrorCode) = 0;
+ /// This is the method that will be called on remote calls on the method UnRegisterShutdownClient.
+ virtual void UnRegisterShutdownClient(std::string BusName, std::string ObjName, uint32_t ShutdownMode, int32_t& ErrorCode) = 0;
+ /// This is the method that will be called on remote calls on the method RegisterSession.
+ virtual void RegisterSession(std::string SessionName, std::string SessionOwner, int32_t SeatID, int32_t SessionState, int32_t& ErrorCode) = 0;
+ /// This is the method that will be called on remote calls on the method UnRegisterSession.
+ virtual void UnRegisterSession(std::string SessionName, std::string SessionOwner, int32_t SeatID, int32_t& ErrorCode) = 0;
+ /// This is the method that will be called on remote calls on the method GetAppHealthCount.
+ virtual void GetAppHealthCount(uint32_t& Count) = 0;
+ /// This is the method that will be called on remote calls on the method GetInterfaceVersion.
+ virtual void GetInterfaceVersion(uint32_t& Version) = 0;
+ /// This is the method that will be called on remote calls on the method LifecycleRequestComplete.
+ virtual void LifecycleRequestComplete(uint32_t RequestId, int32_t Status, int32_t& ErrorCode) = 0;
+
+ /// Sends a broadcast event for NodeState.
+ virtual void fireNodeStateEvent(const int32_t& NodeState) = 0;
+ /// Sends a broadcast event for NodeApplicationMode.
+ virtual void fireNodeApplicationModeEvent(const int32_t& ApplicationModeId) = 0;
+ /// Sends a broadcast event for SessionStateChanged.
+ virtual void fireSessionStateChangedEvent(const std::string& SessionStateName, const int32_t& SeatID, const int32_t& SessionState) = 0;
+};
+
+} // namespace Consumer
+} // namespace NodeStateManager
+} // namespace genivi
+} // namespace org
+
+#endif // ORG_GENIVI_NODESTATEMANAGER_CONSUMER_Consumer_STUB_H_
diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerStubDefault.cpp b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerStubDefault.cpp
new file mode 100644
index 0000000..f923d1d
--- /dev/null
+++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerStubDefault.cpp
@@ -0,0 +1,240 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (C) 2012, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#include <org/genivi/NodeStateManager/Consumer/ConsumerStubDefault.h>
+
+namespace org {
+namespace genivi {
+namespace NodeStateManager {
+namespace Consumer {
+
+ConsumerStubDefault::ConsumerStubDefault():
+ remoteEventHandler_(this) {
+}
+
+ConsumerStubRemoteEvent* ConsumerStubDefault::initStubAdapter(const std::shared_ptr<ConsumerStubAdapter>& stubAdapter) {
+ stubAdapter_ = stubAdapter;
+ return &remoteEventHandler_;
+}
+
+const int32_t& ConsumerStubDefault::getRestartReasonAttribute() {
+ return restartReasonAttributeValue_;
+}
+
+void ConsumerStubDefault::setRestartReasonAttribute(int32_t value) {
+ const bool valueChanged = trySetRestartReasonAttribute(std::move(value));
+ if (valueChanged)
+ stubAdapter_->fireRestartReasonAttributeChanged(restartReasonAttributeValue_);
+}
+
+void ConsumerStubDefault::onRemoteRestartReasonAttributeChanged() {
+ // No operation in default
+}
+
+bool ConsumerStubDefault::trySetRestartReasonAttribute(int32_t value) {
+ if (!validateRestartReasonAttributeRequestedValue(value))
+ return false;
+
+ const bool valueChanged = (restartReasonAttributeValue_ != value);
+ restartReasonAttributeValue_ = std::move(value);
+ return valueChanged;
+}
+
+bool ConsumerStubDefault::validateRestartReasonAttributeRequestedValue(const int32_t& value) {
+ return true;
+}
+
+bool ConsumerStubDefault::RemoteEventHandler::onRemoteSetRestartReasonAttribute(int32_t value) {
+ return defaultStub_->trySetRestartReasonAttribute(std::move(value));
+}
+
+void ConsumerStubDefault::RemoteEventHandler::onRemoteRestartReasonAttributeChanged() {
+ defaultStub_->onRemoteRestartReasonAttributeChanged();
+}
+
+const int32_t& ConsumerStubDefault::getShutdownReasonAttribute() {
+ return shutdownReasonAttributeValue_;
+}
+
+void ConsumerStubDefault::setShutdownReasonAttribute(int32_t value) {
+ const bool valueChanged = trySetShutdownReasonAttribute(std::move(value));
+ if (valueChanged)
+ stubAdapter_->fireShutdownReasonAttributeChanged(shutdownReasonAttributeValue_);
+}
+
+void ConsumerStubDefault::onRemoteShutdownReasonAttributeChanged() {
+ // No operation in default
+}
+
+bool ConsumerStubDefault::trySetShutdownReasonAttribute(int32_t value) {
+ if (!validateShutdownReasonAttributeRequestedValue(value))
+ return false;
+
+ const bool valueChanged = (shutdownReasonAttributeValue_ != value);
+ shutdownReasonAttributeValue_ = std::move(value);
+ return valueChanged;
+}
+
+bool ConsumerStubDefault::validateShutdownReasonAttributeRequestedValue(const int32_t& value) {
+ return true;
+}
+
+bool ConsumerStubDefault::RemoteEventHandler::onRemoteSetShutdownReasonAttribute(int32_t value) {
+ return defaultStub_->trySetShutdownReasonAttribute(std::move(value));
+}
+
+void ConsumerStubDefault::RemoteEventHandler::onRemoteShutdownReasonAttributeChanged() {
+ defaultStub_->onRemoteShutdownReasonAttributeChanged();
+}
+
+const int32_t& ConsumerStubDefault::getWakeUpReasonAttribute() {
+ return wakeUpReasonAttributeValue_;
+}
+
+void ConsumerStubDefault::setWakeUpReasonAttribute(int32_t value) {
+ const bool valueChanged = trySetWakeUpReasonAttribute(std::move(value));
+ if (valueChanged)
+ stubAdapter_->fireWakeUpReasonAttributeChanged(wakeUpReasonAttributeValue_);
+}
+
+void ConsumerStubDefault::onRemoteWakeUpReasonAttributeChanged() {
+ // No operation in default
+}
+
+bool ConsumerStubDefault::trySetWakeUpReasonAttribute(int32_t value) {
+ if (!validateWakeUpReasonAttributeRequestedValue(value))
+ return false;
+
+ const bool valueChanged = (wakeUpReasonAttributeValue_ != value);
+ wakeUpReasonAttributeValue_ = std::move(value);
+ return valueChanged;
+}
+
+bool ConsumerStubDefault::validateWakeUpReasonAttributeRequestedValue(const int32_t& value) {
+ return true;
+}
+
+bool ConsumerStubDefault::RemoteEventHandler::onRemoteSetWakeUpReasonAttribute(int32_t value) {
+ return defaultStub_->trySetWakeUpReasonAttribute(std::move(value));
+}
+
+void ConsumerStubDefault::RemoteEventHandler::onRemoteWakeUpReasonAttributeChanged() {
+ defaultStub_->onRemoteWakeUpReasonAttributeChanged();
+}
+
+const int32_t& ConsumerStubDefault::getBootModeAttribute() {
+ return bootModeAttributeValue_;
+}
+
+void ConsumerStubDefault::setBootModeAttribute(int32_t value) {
+ const bool valueChanged = trySetBootModeAttribute(std::move(value));
+ if (valueChanged)
+ stubAdapter_->fireBootModeAttributeChanged(bootModeAttributeValue_);
+}
+
+void ConsumerStubDefault::onRemoteBootModeAttributeChanged() {
+ // No operation in default
+}
+
+bool ConsumerStubDefault::trySetBootModeAttribute(int32_t value) {
+ if (!validateBootModeAttributeRequestedValue(value))
+ return false;
+
+ const bool valueChanged = (bootModeAttributeValue_ != value);
+ bootModeAttributeValue_ = std::move(value);
+ return valueChanged;
+}
+
+bool ConsumerStubDefault::validateBootModeAttributeRequestedValue(const int32_t& value) {
+ return true;
+}
+
+bool ConsumerStubDefault::RemoteEventHandler::onRemoteSetBootModeAttribute(int32_t value) {
+ return defaultStub_->trySetBootModeAttribute(std::move(value));
+}
+
+void ConsumerStubDefault::RemoteEventHandler::onRemoteBootModeAttributeChanged() {
+ defaultStub_->onRemoteBootModeAttributeChanged();
+}
+
+
+void ConsumerStubDefault::GetNodeState(int32_t& NodeStateId, int32_t& ErrorCode) {
+ // No operation in default
+}
+
+void ConsumerStubDefault::SetSessionState(std::string SessionName, std::string SessionOwner, int32_t SeatID, int32_t SessionState, int32_t& ErrorCode) {
+ // No operation in default
+}
+
+void ConsumerStubDefault::GetSessionState(std::string SessionName, int32_t SeatID, int32_t& SessionState, int32_t& ErrorCode) {
+ // No operation in default
+}
+
+void ConsumerStubDefault::GetApplicationMode(int32_t& ApplicationModeId, int32_t& ErrorCode) {
+ // No operation in default
+}
+
+void ConsumerStubDefault::RegisterShutdownClient(std::string BusName, std::string ObjName, uint32_t ShutdownMode, uint32_t TimeoutMs, int32_t& ErrorCode) {
+ // No operation in default
+}
+
+void ConsumerStubDefault::UnRegisterShutdownClient(std::string BusName, std::string ObjName, uint32_t ShutdownMode, int32_t& ErrorCode) {
+ // No operation in default
+}
+
+void ConsumerStubDefault::RegisterSession(std::string SessionName, std::string SessionOwner, int32_t SeatID, int32_t SessionState, int32_t& ErrorCode) {
+ // No operation in default
+}
+
+void ConsumerStubDefault::UnRegisterSession(std::string SessionName, std::string SessionOwner, int32_t SeatID, int32_t& ErrorCode) {
+ // No operation in default
+}
+
+void ConsumerStubDefault::GetAppHealthCount(uint32_t& Count) {
+ // No operation in default
+}
+
+void ConsumerStubDefault::GetInterfaceVersion(uint32_t& Version) {
+ // No operation in default
+}
+
+void ConsumerStubDefault::LifecycleRequestComplete(uint32_t RequestId, int32_t Status, int32_t& ErrorCode) {
+ // No operation in default
+}
+
+
+void ConsumerStubDefault::fireNodeStateEvent(const int32_t& NodeState) {
+ stubAdapter_->fireNodeStateEvent(NodeState);
+}
+void ConsumerStubDefault::fireNodeApplicationModeEvent(const int32_t& ApplicationModeId) {
+ stubAdapter_->fireNodeApplicationModeEvent(ApplicationModeId);
+}
+void ConsumerStubDefault::fireSessionStateChangedEvent(const std::string& SessionStateName, const int32_t& SeatID, const int32_t& SessionState) {
+ stubAdapter_->fireSessionStateChangedEvent(SessionStateName, SeatID, SessionState);
+}
+
+ConsumerStubDefault::RemoteEventHandler::RemoteEventHandler(ConsumerStubDefault* defaultStub):
+ defaultStub_(defaultStub) {
+}
+
+} // namespace Consumer
+} // namespace NodeStateManager
+} // namespace genivi
+} // namespace org
diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerStubDefault.h b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerStubDefault.h
new file mode 100644
index 0000000..76b7f8c
--- /dev/null
+++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer/ConsumerStubDefault.h
@@ -0,0 +1,141 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (C) 2012, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_NODESTATEMANAGER_CONSUMER_Consumer_STUB_DEFAULT_H_
+#define ORG_GENIVI_NODESTATEMANAGER_CONSUMER_Consumer_STUB_DEFAULT_H_
+
+#include <org/genivi/NodeStateManager/Consumer/ConsumerStub.h>
+
+namespace org {
+namespace genivi {
+namespace NodeStateManager {
+namespace Consumer {
+
+/**
+ * Provides a default implementation for ConsumerStubRemoteEvent and
+ * ConsumerStub. Method callbacks have an empty implementation,
+ * remote set calls on attributes will always change the value of the attribute
+ * to the one received.
+ *
+ * Override this stub if you only want to provide a subset of the functionality
+ * that would be defined for this service, and/or if you do not need any non-default
+ * behaviour.
+ */
+class ConsumerStubDefault : public ConsumerStub {
+ public:
+ ConsumerStubDefault();
+
+ ConsumerStubRemoteEvent* initStubAdapter(const std::shared_ptr<ConsumerStubAdapter>& stubAdapter);
+
+ virtual const int32_t& getRestartReasonAttribute();
+ virtual void setRestartReasonAttribute(int32_t value);
+
+ virtual const int32_t& getShutdownReasonAttribute();
+ virtual void setShutdownReasonAttribute(int32_t value);
+
+ virtual const int32_t& getWakeUpReasonAttribute();
+ virtual void setWakeUpReasonAttribute(int32_t value);
+
+ virtual const int32_t& getBootModeAttribute();
+ virtual void setBootModeAttribute(int32_t value);
+
+
+ virtual void GetNodeState(int32_t& NodeStateId, int32_t& ErrorCode);
+
+ virtual void SetSessionState(std::string SessionName, std::string SessionOwner, int32_t SeatID, int32_t SessionState, int32_t& ErrorCode);
+
+ virtual void GetSessionState(std::string SessionName, int32_t SeatID, int32_t& SessionState, int32_t& ErrorCode);
+
+ virtual void GetApplicationMode(int32_t& ApplicationModeId, int32_t& ErrorCode);
+
+ virtual void RegisterShutdownClient(std::string BusName, std::string ObjName, uint32_t ShutdownMode, uint32_t TimeoutMs, int32_t& ErrorCode);
+
+ virtual void UnRegisterShutdownClient(std::string BusName, std::string ObjName, uint32_t ShutdownMode, int32_t& ErrorCode);
+
+ virtual void RegisterSession(std::string SessionName, std::string SessionOwner, int32_t SeatID, int32_t SessionState, int32_t& ErrorCode);
+
+ virtual void UnRegisterSession(std::string SessionName, std::string SessionOwner, int32_t SeatID, int32_t& ErrorCode);
+
+ virtual void GetAppHealthCount(uint32_t& Count);
+
+ virtual void GetInterfaceVersion(uint32_t& Version);
+
+ virtual void LifecycleRequestComplete(uint32_t RequestId, int32_t Status, int32_t& ErrorCode);
+
+
+ virtual void fireNodeStateEvent(const int32_t& NodeState);
+ virtual void fireNodeApplicationModeEvent(const int32_t& ApplicationModeId);
+ virtual void fireSessionStateChangedEvent(const std::string& SessionStateName, const int32_t& SeatID, const int32_t& SessionState);
+
+ protected:
+ virtual void onRemoteRestartReasonAttributeChanged();
+ virtual bool trySetRestartReasonAttribute(int32_t value);
+ virtual bool validateRestartReasonAttributeRequestedValue(const int32_t& value);
+
+ virtual void onRemoteShutdownReasonAttributeChanged();
+ virtual bool trySetShutdownReasonAttribute(int32_t value);
+ virtual bool validateShutdownReasonAttributeRequestedValue(const int32_t& value);
+
+ virtual void onRemoteWakeUpReasonAttributeChanged();
+ virtual bool trySetWakeUpReasonAttribute(int32_t value);
+ virtual bool validateWakeUpReasonAttributeRequestedValue(const int32_t& value);
+
+ virtual void onRemoteBootModeAttributeChanged();
+ virtual bool trySetBootModeAttribute(int32_t value);
+ virtual bool validateBootModeAttributeRequestedValue(const int32_t& value);
+
+
+ private:
+ class RemoteEventHandler: public ConsumerStubRemoteEvent {
+ public:
+ RemoteEventHandler(ConsumerStubDefault* defaultStub);
+
+ virtual bool onRemoteSetRestartReasonAttribute(int32_t value);
+ virtual void onRemoteRestartReasonAttributeChanged();
+
+ virtual bool onRemoteSetShutdownReasonAttribute(int32_t value);
+ virtual void onRemoteShutdownReasonAttributeChanged();
+
+ virtual bool onRemoteSetWakeUpReasonAttribute(int32_t value);
+ virtual void onRemoteWakeUpReasonAttributeChanged();
+
+ virtual bool onRemoteSetBootModeAttribute(int32_t value);
+ virtual void onRemoteBootModeAttributeChanged();
+
+
+ private:
+ ConsumerStubDefault* defaultStub_;
+ };
+
+ RemoteEventHandler remoteEventHandler_;
+ std::shared_ptr<ConsumerStubAdapter> stubAdapter_;
+
+ int32_t restartReasonAttributeValue_;
+ int32_t shutdownReasonAttributeValue_;
+ int32_t wakeUpReasonAttributeValue_;
+ int32_t bootModeAttributeValue_;
+};
+
+} // namespace Consumer
+} // namespace NodeStateManager
+} // namespace genivi
+} // namespace org
+
+#endif // ORG_GENIVI_NODESTATEMANAGER_CONSUMER_Consumer_STUB_DEFAULT_H_
diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumer.h b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumer.h
new file mode 100644
index 0000000..d4e071d
--- /dev/null
+++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumer.h
@@ -0,0 +1,70 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (C) 2012, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_NODESTATEMANAGER_LIFECYCLECONSUMER_Life_Cycle_Consumer_H_
+#define ORG_GENIVI_NODESTATEMANAGER_LIFECYCLECONSUMER_Life_Cycle_Consumer_H_
+
+
+
+#define COMMONAPI_INTERNAL_COMPILATION
+
+#include <CommonAPI/types.h>
+
+#undef COMMONAPI_INTERNAL_COMPILATION
+
+namespace org {
+namespace genivi {
+namespace NodeStateManager {
+namespace LifeCycleConsumer {
+
+class LifeCycleConsumer {
+ public:
+ virtual ~LifeCycleConsumer() { }
+
+ static inline const char* getInterfaceId();
+ static inline CommonAPI::Version getInterfaceVersion();
+};
+
+const char* LifeCycleConsumer::getInterfaceId() {
+ return "org.genivi.NodeStateManager.LifeCycleConsumer.LifeCycleConsumer";
+}
+
+CommonAPI::Version LifeCycleConsumer::getInterfaceVersion() {
+ return CommonAPI::Version(0, 1);
+}
+
+
+} // namespace LifeCycleConsumer
+} // namespace NodeStateManager
+} // namespace genivi
+} // namespace org
+
+namespace CommonAPI {
+
+}
+
+
+namespace std {
+ //hashes for types
+
+ //hashes for error types
+}
+
+#endif // ORG_GENIVI_NODESTATEMANAGER_LIFECYCLECONSUMER_Life_Cycle_Consumer_H_
diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerDBusProxy.cpp b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerDBusProxy.cpp
new file mode 100644
index 0000000..5df88da
--- /dev/null
+++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerDBusProxy.cpp
@@ -0,0 +1,82 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (C) 2012, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#include "LifeCycleConsumerDBusProxy.h"
+
+namespace org {
+namespace genivi {
+namespace NodeStateManager {
+namespace LifeCycleConsumer {
+
+std::shared_ptr<CommonAPI::DBus::DBusProxy> createLifeCycleConsumerDBusProxy(
+ const std::string& commonApiAddress,
+ const std::string& interfaceName,
+ const std::string& busName,
+ const std::string& objectPath,
+ const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection) {
+ return std::make_shared<LifeCycleConsumerDBusProxy>(commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection);
+}
+
+__attribute__((constructor)) void registerLifeCycleConsumerDBusProxy(void) {
+ CommonAPI::DBus::DBusFactory::registerProxyFactoryMethod(LifeCycleConsumer::getInterfaceId(),
+ &createLifeCycleConsumerDBusProxy);
+}
+
+LifeCycleConsumerDBusProxy::LifeCycleConsumerDBusProxy(
+ const std::string& commonApiAddress,
+ const std::string& interfaceName,
+ const std::string& busName,
+ const std::string& objectPath,
+ const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection):
+ CommonAPI::DBus::DBusProxy(commonApiAddress, interfaceName, busName, objectPath, dbusProxyconnection)
+ {
+}
+
+
+
+void LifeCycleConsumerDBusProxy::LifecycleRequest(const uint32_t& Request, const uint32_t& RequestId, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint32_t, uint32_t>,
+ CommonAPI::DBus::DBusSerializableArguments<int32_t> >::callMethodWithReply(
+ *this,
+ "LifecycleRequest",
+ "uu",
+ Request, RequestId,
+ callStatus
+ , ErrorCode);
+}
+std::future<CommonAPI::CallStatus> LifeCycleConsumerDBusProxy::LifecycleRequestAsync(const uint32_t& Request, const uint32_t& RequestId, LifecycleRequestAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint32_t, uint32_t>,
+ CommonAPI::DBus::DBusSerializableArguments<int32_t> >::callMethodAsync(
+ *this,
+ "LifecycleRequest",
+ "uu",
+ Request, RequestId,
+ std::move(callback));
+}
+
+void LifeCycleConsumerDBusProxy::getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const {
+ ownVersionMajor = 0;
+ ownVersionMinor = 1;
+}
+
+} // namespace LifeCycleConsumer
+} // namespace NodeStateManager
+} // namespace genivi
+} // namespace org
diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerDBusProxy.h b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerDBusProxy.h
new file mode 100644
index 0000000..7c4522d
--- /dev/null
+++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerDBusProxy.h
@@ -0,0 +1,68 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (C) 2012, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_NODESTATEMANAGER_LIFECYCLECONSUMER_Life_Cycle_Consumer_DBUS_PROXY_H_
+#define ORG_GENIVI_NODESTATEMANAGER_LIFECYCLECONSUMER_Life_Cycle_Consumer_DBUS_PROXY_H_
+
+#include <org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerProxyBase.h>
+
+#define COMMONAPI_INTERNAL_COMPILATION
+
+#include <CommonAPI/DBus/DBusFactory.h>
+#include <CommonAPI/DBus/DBusProxy.h>
+
+#undef COMMONAPI_INTERNAL_COMPILATION
+
+#include <string>
+
+namespace org {
+namespace genivi {
+namespace NodeStateManager {
+namespace LifeCycleConsumer {
+
+class LifeCycleConsumerDBusProxy: virtual public LifeCycleConsumerProxyBase, virtual public CommonAPI::DBus::DBusProxy {
+ public:
+ LifeCycleConsumerDBusProxy(
+ const std::string& commonApiAddress,
+ const std::string& interfaceName,
+ const std::string& busName,
+ const std::string& objectPath,
+ const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection);
+
+ virtual ~LifeCycleConsumerDBusProxy() { }
+
+
+
+
+ virtual void LifecycleRequest(const uint32_t& Request, const uint32_t& RequestId, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode);
+ virtual std::future<CommonAPI::CallStatus> LifecycleRequestAsync(const uint32_t& Request, const uint32_t& RequestId, LifecycleRequestAsyncCallback callback);
+
+ virtual void getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const;
+
+ private:
+
+};
+
+} // namespace LifeCycleConsumer
+} // namespace NodeStateManager
+} // namespace genivi
+} // namespace org
+
+#endif // ORG_GENIVI_NODESTATEMANAGER_LIFECYCLECONSUMER_Life_Cycle_Consumer_DBUS_PROXY_H_
diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerDBusStubAdapter.cpp b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerDBusStubAdapter.cpp
new file mode 100644
index 0000000..e408a47
--- /dev/null
+++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerDBusStubAdapter.cpp
@@ -0,0 +1,82 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (C) 2012, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#include "LifeCycleConsumerDBusStubAdapter.h"
+#include <org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumer.h>
+
+namespace org {
+namespace genivi {
+namespace NodeStateManager {
+namespace LifeCycleConsumer {
+
+std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> createLifeCycleConsumerDBusStubAdapter(
+ const std::string& commonApiAddress,
+ const std::string& interfaceName,
+ const std::string& busName,
+ const std::string& objectPath,
+ const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection,
+ const std::shared_ptr<CommonAPI::StubBase>& stubBase) {
+ return std::make_shared<LifeCycleConsumerDBusStubAdapter>(commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection, stubBase);
+}
+
+__attribute__((constructor)) void registerLifeCycleConsumerDBusStubAdapter(void) {
+ CommonAPI::DBus::DBusFactory::registerAdapterFactoryMethod(LifeCycleConsumer::getInterfaceId(),
+ &createLifeCycleConsumerDBusStubAdapter);
+}
+
+LifeCycleConsumerDBusStubAdapter::LifeCycleConsumerDBusStubAdapter(
+ const std::string& commonApiAddress,
+ const std::string& dbusInterfaceName,
+ const std::string& dbusBusName,
+ const std::string& dbusObjectPath,
+ const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
+ const std::shared_ptr<CommonAPI::StubBase>& stub):
+ LifeCycleConsumerDBusStubAdapterHelper(commonApiAddress, dbusInterfaceName, dbusBusName, dbusObjectPath, dbusConnection, std::dynamic_pointer_cast<LifeCycleConsumerStub>(stub)) {
+}
+
+const char* LifeCycleConsumerDBusStubAdapter::getMethodsDBusIntrospectionXmlData() const {
+ return
+ "<method name=\"LifecycleRequest\">\n"
+ "<arg name=\"Request\" type=\"u\" direction=\"in\" />\n"
+ "<arg name=\"RequestId\" type=\"u\" direction=\"in\" />\n"
+ "<arg name=\"ErrorCode\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ ;
+}
+
+
+
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ LifeCycleConsumerStub,
+ std::tuple<uint32_t, uint32_t>,
+ std::tuple<int32_t>
+ > lifecycleRequestStubDispatcher(&LifeCycleConsumerStub::LifecycleRequest, "i");
+
+
+
+} // namespace LifeCycleConsumer
+} // namespace NodeStateManager
+} // namespace genivi
+} // namespace org
+
+template<>
+const org::genivi::NodeStateManager::LifeCycleConsumer::LifeCycleConsumerDBusStubAdapterHelper::StubDispatcherTable org::genivi::NodeStateManager::LifeCycleConsumer::LifeCycleConsumerDBusStubAdapterHelper::stubDispatcherTable_ = {
+ { { "LifecycleRequest", "uu" }, &org::genivi::NodeStateManager::LifeCycleConsumer::lifecycleRequestStubDispatcher }
+};
diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerDBusStubAdapter.h b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerDBusStubAdapter.h
new file mode 100644
index 0000000..74e41a4
--- /dev/null
+++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerDBusStubAdapter.h
@@ -0,0 +1,61 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (C) 2012, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_NODESTATEMANAGER_LIFECYCLECONSUMER_Life_Cycle_Consumer_DBUS_STUB_ADAPTER_H_
+#define ORG_GENIVI_NODESTATEMANAGER_LIFECYCLECONSUMER_Life_Cycle_Consumer_DBUS_STUB_ADAPTER_H_
+
+#include <org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerStub.h>
+
+#define COMMONAPI_INTERNAL_COMPILATION
+
+#include <CommonAPI/DBus/DBusStubAdapterHelper.h>
+#include <CommonAPI/DBus/DBusFactory.h>
+
+#undef COMMONAPI_INTERNAL_COMPILATION
+
+namespace org {
+namespace genivi {
+namespace NodeStateManager {
+namespace LifeCycleConsumer {
+
+typedef CommonAPI::DBus::DBusStubAdapterHelper<LifeCycleConsumerStub> LifeCycleConsumerDBusStubAdapterHelper;
+
+class LifeCycleConsumerDBusStubAdapter: public LifeCycleConsumerStubAdapter, public LifeCycleConsumerDBusStubAdapterHelper {
+ public:
+ LifeCycleConsumerDBusStubAdapter(
+ const std::string& commonApiAddress,
+ const std::string& dbusInterfaceName,
+ const std::string& dbusBusName,
+ const std::string& dbusObjectPath,
+ const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
+ const std::shared_ptr<CommonAPI::StubBase>& stub);
+
+
+
+ protected:
+ virtual const char* getMethodsDBusIntrospectionXmlData() const;
+};
+
+} // namespace LifeCycleConsumer
+} // namespace NodeStateManager
+} // namespace genivi
+} // namespace org
+
+#endif // ORG_GENIVI_NODESTATEMANAGER_LIFECYCLECONSUMER_Life_Cycle_Consumer_DBUS_STUB_ADAPTER_H_
diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerProxy.h b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerProxy.h
new file mode 100644
index 0000000..f8e21ed
--- /dev/null
+++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerProxy.h
@@ -0,0 +1,166 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (C) 2012, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_NODESTATEMANAGER_LIFECYCLECONSUMER_Life_Cycle_Consumer_PROXY_H_
+#define ORG_GENIVI_NODESTATEMANAGER_LIFECYCLECONSUMER_Life_Cycle_Consumer_PROXY_H_
+
+#include "LifeCycleConsumerProxyBase.h"
+
+#define COMMONAPI_INTERNAL_COMPILATION
+
+
+#undef COMMONAPI_INTERNAL_COMPILATION
+
+namespace org {
+namespace genivi {
+namespace NodeStateManager {
+namespace LifeCycleConsumer {
+
+template <typename ... _AttributeExtensions>
+class LifeCycleConsumerProxy: virtual public LifeCycleConsumer, virtual public LifeCycleConsumerProxyBase, public _AttributeExtensions... {
+ public:
+ LifeCycleConsumerProxy(std::shared_ptr<CommonAPI::Proxy> delegate);
+ ~LifeCycleConsumerProxy();
+
+
+
+
+ /**
+ * Calls LifecycleRequest with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void LifecycleRequest(const uint32_t& Request, const uint32_t& RequestId, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode);
+ /**
+ * Calls LifecycleRequest with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> LifecycleRequestAsync(const uint32_t& Request, const uint32_t& RequestId, LifecycleRequestAsyncCallback callback);
+
+ /// Returns the CommonAPI address of the remote partner this proxy communicates with.
+ virtual std::string getAddress() const;
+
+ /// Returns the domain of the remote partner this proxy communicates with.
+ virtual const std::string& getDomain() const;
+
+ /// Returns the service ID of the remote partner this proxy communicates with.
+ virtual const std::string& getServiceId() const;
+
+ /// Returns the instance ID of the remote partner this proxy communicates with.
+ virtual const std::string& getInstanceId() const;
+
+ /// Returns true if the remote partner for this proxy is available.
+ virtual bool isAvailable() const;
+
+ /**
+ * Returns the wrapper class that is used to (de-)register for notifications about
+ * the availability of the remote partner of this proxy.
+ */
+ virtual CommonAPI::ProxyStatusEvent& getProxyStatusEvent();
+
+ /**
+ * Returns the wrapper class that is used to access version information of the remote
+ * partner of this proxy.
+ */
+ virtual CommonAPI::InterfaceVersionAttribute& getInterfaceVersionAttribute();
+
+ private:
+ std::shared_ptr<LifeCycleConsumerProxyBase> delegate_;
+};
+
+
+//
+// LifeCycleConsumerProxy Implementation
+//
+template <typename ... _AttributeExtensions>
+LifeCycleConsumerProxy<_AttributeExtensions...>::LifeCycleConsumerProxy(std::shared_ptr<CommonAPI::Proxy> delegate):
+ delegate_(std::dynamic_pointer_cast<LifeCycleConsumerProxyBase>(delegate)),
+ _AttributeExtensions(*(std::dynamic_pointer_cast<LifeCycleConsumerProxyBase>(delegate)))... {
+}
+
+template <typename ... _AttributeExtensions>
+LifeCycleConsumerProxy<_AttributeExtensions...>::~LifeCycleConsumerProxy() {
+}
+
+template <typename ... _AttributeExtensions>
+void LifeCycleConsumerProxy<_AttributeExtensions...>::LifecycleRequest(const uint32_t& Request, const uint32_t& RequestId, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) {
+ delegate_->LifecycleRequest(Request, RequestId, callStatus, ErrorCode);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> LifeCycleConsumerProxy<_AttributeExtensions...>::LifecycleRequestAsync(const uint32_t& Request, const uint32_t& RequestId, LifecycleRequestAsyncCallback callback) {
+ return delegate_->LifecycleRequestAsync(Request, RequestId, callback);
+}
+
+
+template <typename ... _AttributeExtensions>
+std::string LifeCycleConsumerProxy<_AttributeExtensions...>::getAddress() const {
+ return delegate_->getAddress();
+}
+
+template <typename ... _AttributeExtensions>
+const std::string& LifeCycleConsumerProxy<_AttributeExtensions...>::getDomain() const {
+ return delegate_->getDomain();
+}
+
+template <typename ... _AttributeExtensions>
+const std::string& LifeCycleConsumerProxy<_AttributeExtensions...>::getServiceId() const {
+ return delegate_->getServiceId();
+}
+
+template <typename ... _AttributeExtensions>
+const std::string& LifeCycleConsumerProxy<_AttributeExtensions...>::getInstanceId() const {
+ return delegate_->getInstanceId();
+}
+
+template <typename ... _AttributeExtensions>
+bool LifeCycleConsumerProxy<_AttributeExtensions...>::isAvailable() const {
+ return delegate_->isAvailable();
+}
+
+template <typename ... _AttributeExtensions>
+CommonAPI::ProxyStatusEvent& LifeCycleConsumerProxy<_AttributeExtensions...>::getProxyStatusEvent() {
+ return delegate_->getProxyStatusEvent();
+}
+
+template <typename ... _AttributeExtensions>
+CommonAPI::InterfaceVersionAttribute& LifeCycleConsumerProxy<_AttributeExtensions...>::getInterfaceVersionAttribute() {
+ return delegate_->getInterfaceVersionAttribute();
+}
+
+} // namespace LifeCycleConsumer
+} // namespace NodeStateManager
+} // namespace genivi
+} // namespace org
+
+
+
+#endif // ORG_GENIVI_NODESTATEMANAGER_LIFECYCLECONSUMER_Life_Cycle_Consumer_PROXY_H_
diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerProxyBase.h b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerProxyBase.h
new file mode 100644
index 0000000..3e780d0
--- /dev/null
+++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerProxyBase.h
@@ -0,0 +1,58 @@
+ /*
+ * This file was generated by the CommonAPI Generators.
+ *
+ * Copyright (C) 2012, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * For further information see http://www.genivi.org/.
+ */
+ #ifndef ORG_GENIVI_NODESTATEMANAGER_LIFECYCLECONSUMER_Life_Cycle_Consumer_PROXY_BASE_H_
+ #define ORG_GENIVI_NODESTATEMANAGER_LIFECYCLECONSUMER_Life_Cycle_Consumer_PROXY_BASE_H_
+
+ #include "LifeCycleConsumer.h"
+
+
+
+ #define COMMONAPI_INTERNAL_COMPILATION
+
+
+ #include <CommonAPI/Proxy.h>
+ #include <functional>
+ #include <future>
+
+ #undef COMMONAPI_INTERNAL_COMPILATION
+
+ namespace org {
+ namespace genivi {
+ namespace NodeStateManager {
+ namespace LifeCycleConsumer {
+
+ class LifeCycleConsumerProxyBase: virtual public CommonAPI::Proxy {
+ public:
+ typedef std::function<void(const CommonAPI::CallStatus&, const int32_t&)> LifecycleRequestAsyncCallback;
+
+
+
+
+ virtual void LifecycleRequest(const uint32_t& Request, const uint32_t& RequestId, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) = 0;
+ virtual std::future<CommonAPI::CallStatus> LifecycleRequestAsync(const uint32_t& Request, const uint32_t& RequestId, LifecycleRequestAsyncCallback callback) = 0;
+ };
+
+ } // namespace LifeCycleConsumer
+ } // namespace NodeStateManager
+ } // namespace genivi
+ } // namespace org
+
+ #endif // ORG_GENIVI_NODESTATEMANAGER_LIFECYCLECONSUMER_Life_Cycle_Consumer_PROXY_BASE_H_
diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerStub.h b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerStub.h
new file mode 100644
index 0000000..f4d9d80
--- /dev/null
+++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerStub.h
@@ -0,0 +1,93 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (C) 2012, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_NODESTATEMANAGER_LIFECYCLECONSUMER_Life_Cycle_Consumer_STUB_H_
+#define ORG_GENIVI_NODESTATEMANAGER_LIFECYCLECONSUMER_Life_Cycle_Consumer_STUB_H_
+
+
+
+
+#include "LifeCycleConsumer.h"
+
+#define COMMONAPI_INTERNAL_COMPILATION
+
+
+#include <CommonAPI/Stub.h>
+
+#undef COMMONAPI_INTERNAL_COMPILATION
+
+namespace org {
+namespace genivi {
+namespace NodeStateManager {
+namespace LifeCycleConsumer {
+
+/**
+ * Receives messages from remote and handles all dispatching of deserialized calls
+ * to a stub for the service LifeCycleConsumer. Also provides means to send broadcasts
+ * and attribute-changed-notifications of observable attributes as defined by this service.
+ * An application developer should not need to bother with this class.
+ */
+class LifeCycleConsumerStubAdapter: virtual public CommonAPI::StubAdapter, public LifeCycleConsumer {
+ public:
+
+};
+
+
+/**
+ * Defines the necessary callbacks to handle remote set events related to the attributes
+ * defined in the IDL description for LifeCycleConsumer.
+ * For each attribute two callbacks are defined:
+ * - a verification callback that allows to verify the requested value and to prevent setting
+ * e.g. an invalid value ("onRemoteSet<AttributeName>").
+ * - an action callback to do local work after the attribute value has been changed
+ * ("onRemote<AttributeName>Changed").
+ *
+ * This class and the one below are the ones an application developer needs to have
+ * a look at if he wants to implement a service.
+ */
+class LifeCycleConsumerStubRemoteEvent {
+ public:
+ virtual ~LifeCycleConsumerStubRemoteEvent() { }
+
+};
+
+
+/**
+ * Defines the interface that must be implemented by any class that should provide
+ * the service LifeCycleConsumer to remote clients.
+ * This class and the one above are the ones an application developer needs to have
+ * a look at if he wants to implement a service.
+ */
+class LifeCycleConsumerStub : public CommonAPI::Stub<LifeCycleConsumerStubAdapter , LifeCycleConsumerStubRemoteEvent> {
+ public:
+ virtual ~LifeCycleConsumerStub() { }
+
+
+ /// This is the method that will be called on remote calls on the method LifecycleRequest.
+ virtual void LifecycleRequest(uint32_t Request, uint32_t RequestId, int32_t& ErrorCode) = 0;
+
+};
+
+} // namespace LifeCycleConsumer
+} // namespace NodeStateManager
+} // namespace genivi
+} // namespace org
+
+#endif // ORG_GENIVI_NODESTATEMANAGER_LIFECYCLECONSUMER_Life_Cycle_Consumer_STUB_H_
diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerStubDefault.cpp b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerStubDefault.cpp
new file mode 100644
index 0000000..92df0f0
--- /dev/null
+++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerStubDefault.cpp
@@ -0,0 +1,51 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (C) 2012, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#include <org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerStubDefault.h>
+
+namespace org {
+namespace genivi {
+namespace NodeStateManager {
+namespace LifeCycleConsumer {
+
+LifeCycleConsumerStubDefault::LifeCycleConsumerStubDefault():
+ remoteEventHandler_(this) {
+}
+
+LifeCycleConsumerStubRemoteEvent* LifeCycleConsumerStubDefault::initStubAdapter(const std::shared_ptr<LifeCycleConsumerStubAdapter>& stubAdapter) {
+ stubAdapter_ = stubAdapter;
+ return &remoteEventHandler_;
+}
+
+
+void LifeCycleConsumerStubDefault::LifecycleRequest(uint32_t Request, uint32_t RequestId, int32_t& ErrorCode) {
+ // No operation in default
+}
+
+
+
+LifeCycleConsumerStubDefault::RemoteEventHandler::RemoteEventHandler(LifeCycleConsumerStubDefault* defaultStub):
+ defaultStub_(defaultStub) {
+}
+
+} // namespace LifeCycleConsumer
+} // namespace NodeStateManager
+} // namespace genivi
+} // namespace org
diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerStubDefault.h b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerStubDefault.h
new file mode 100644
index 0000000..6c5f402
--- /dev/null
+++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerStubDefault.h
@@ -0,0 +1,74 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (C) 2012, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_NODESTATEMANAGER_LIFECYCLECONSUMER_Life_Cycle_Consumer_STUB_DEFAULT_H_
+#define ORG_GENIVI_NODESTATEMANAGER_LIFECYCLECONSUMER_Life_Cycle_Consumer_STUB_DEFAULT_H_
+
+#include <org/genivi/NodeStateManager/LifeCycleConsumer/LifeCycleConsumerStub.h>
+
+namespace org {
+namespace genivi {
+namespace NodeStateManager {
+namespace LifeCycleConsumer {
+
+/**
+ * Provides a default implementation for LifeCycleConsumerStubRemoteEvent and
+ * LifeCycleConsumerStub. Method callbacks have an empty implementation,
+ * remote set calls on attributes will always change the value of the attribute
+ * to the one received.
+ *
+ * Override this stub if you only want to provide a subset of the functionality
+ * that would be defined for this service, and/or if you do not need any non-default
+ * behaviour.
+ */
+class LifeCycleConsumerStubDefault : public LifeCycleConsumerStub {
+ public:
+ LifeCycleConsumerStubDefault();
+
+ LifeCycleConsumerStubRemoteEvent* initStubAdapter(const std::shared_ptr<LifeCycleConsumerStubAdapter>& stubAdapter);
+
+
+ virtual void LifecycleRequest(uint32_t Request, uint32_t RequestId, int32_t& ErrorCode);
+
+
+
+ protected:
+
+ private:
+ class RemoteEventHandler: public LifeCycleConsumerStubRemoteEvent {
+ public:
+ RemoteEventHandler(LifeCycleConsumerStubDefault* defaultStub);
+
+
+ private:
+ LifeCycleConsumerStubDefault* defaultStub_;
+ };
+
+ RemoteEventHandler remoteEventHandler_;
+ std::shared_ptr<LifeCycleConsumerStubAdapter> stubAdapter_;
+
+};
+
+} // namespace LifeCycleConsumer
+} // namespace NodeStateManager
+} // namespace genivi
+} // namespace org
+
+#endif // ORG_GENIVI_NODESTATEMANAGER_LIFECYCLECONSUMER_Life_Cycle_Consumer_STUB_DEFAULT_H_
diff --git a/AudioManagerDaemon/src/CAmCommonAPIWrapper.cpp b/AudioManagerDaemon/src/CAmCommonAPIWrapper.cpp
new file mode 100644
index 0000000..28103de
--- /dev/null
+++ b/AudioManagerDaemon/src/CAmCommonAPIWrapper.cpp
@@ -0,0 +1,275 @@
+/**
+ * Copyright (C) 2012, BMW AG
+ *
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * \file CAmCommonAPIWrapper.cpp
+ * For further information see http://www.genivi.org/.
+ */
+
+
+#include <config.h>
+#include <fstream>
+#include <sstream>
+#include <string>
+#include <algorithm>
+#include <cassert>
+#include <cstdlib>
+#include <stdexcept>
+#include <poll.h>
+#include <tuple>
+#include "audiomanagertypes.h"
+#include "shared/CAmSocketHandler.h"
+#include "shared/CAmDltWrapper.h"
+#include "shared/CAmCommonAPIWrapper.h"
+
+
+namespace am
+{
+static CAmCommonAPIWrapper* pSingleCommonAPIInstance = NULL;
+
+
+using namespace CommonAPI;
+
+CAmCommonAPIWrapper::CAmCommonAPIWrapper(CAmSocketHandler* socketHandler):
+ pCommonPrepareCallback(this,&CAmCommonAPIWrapper::commonPrepareCallback), //
+ pCommonDispatchCallback(this, &CAmCommonAPIWrapper::commonDispatchCallback), //
+ pCommonFireCallback(this, &CAmCommonAPIWrapper::commonFireCallback), //
+ pCommonCheckCallback(this, &CAmCommonAPIWrapper::commonCheckCallback), //
+ pCommonTimerCallback(this, &CAmCommonAPIWrapper::commonTimerCallback), //
+ mpSocketHandler(socketHandler), //
+ mWatchToCheck(NULL)
+{
+ assert(NULL!=socketHandler);
+//1. Load the runtime
+ std::shared_ptr<CommonAPI::Runtime> runtime = CommonAPI::Runtime::load();
+//2. Get the context and store a pointer to it
+ mContext = runtime->getNewMainLoopContext();
+//3. Make subscriptions
+ mDispatchSourceListenerSubscription = mContext->subscribeForDispatchSources(
+ std::bind(&CAmCommonAPIWrapper::registerDispatchSource, this, std::placeholders::_1, std::placeholders::_2),
+ std::bind(&CAmCommonAPIWrapper::deregisterDispatchSource, this, std::placeholders::_1));
+ mWatchListenerSubscription = mContext->subscribeForWatches(
+ std::bind(&CAmCommonAPIWrapper::registerWatch, this, std::placeholders::_1, std::placeholders::_2),
+ std::bind(&CAmCommonAPIWrapper::deregisterWatch, this, std::placeholders::_1));
+ mTimeoutSourceListenerSubscription = mContext->subscribeForTimeouts(
+ std::bind(&CAmCommonAPIWrapper::registerTimeout, this, std::placeholders::_1, std::placeholders::_2),
+ std::bind(&CAmCommonAPIWrapper::deregisterTimeout, this, std::placeholders::_1));
+//4. Create the factory
+ std::shared_ptr<CommonAPI::Factory> factory = runtime->createFactory(mContext);
+ assert(factory);
+ logInfo(__PRETTY_FUNCTION__,"CommonAPI -> Factory created");
+ mFactory = factory;
+//5. Get the publisher V.2.1
+// std::shared_ptr<CommonAPI::ServicePublisher> servicePublisher = runtime->getServicePublisher();
+// assert(servicePublisher);
+// logInfo(__PRETTY_FUNCTION__,"CommonAPI -> Publisher available");
+//6. Instantiate your concrete stub implementations
+// std::shared_ptr<StubImpl> theStub = std::make_shared<StubImpl>(1);
+//7. Register the services
+// std::string capiAddress("local:org.genivi.audiomanager.sourcestate:de.bmw.infotainment.broadcast.ta");
+// registerStub(theStub, capiAddress);
+}
+
+CAmCommonAPIWrapper::~CAmCommonAPIWrapper()
+{
+ mContext->unsubscribeForDispatchSources(mDispatchSourceListenerSubscription);
+ mContext->unsubscribeForWatches(mWatchListenerSubscription);
+ mContext->unsubscribeForTimeouts(mTimeoutSourceListenerSubscription);
+//The following objects must be released in the given order.
+ mFactory.reset();
+ mContext.reset();
+
+ mpSocketHandler = NULL;
+ mWatchToCheck = NULL;
+}
+
+CAmCommonAPIWrapper* CAmCommonAPIWrapper::instantiateOnce(CAmSocketHandler* socketHandler)
+{
+ if(NULL==pSingleCommonAPIInstance)
+ {
+ if(NULL==socketHandler)
+ throw std::runtime_error(std::string("Expected a valid socket handler. The socket handler pointer must not be NULL."));
+ else
+ pSingleCommonAPIInstance = new CAmCommonAPIWrapper(socketHandler);
+ }
+ else
+ throw std::logic_error(std::string("The singleton instance has been already instantiated. This method should be called only once."));
+ return pSingleCommonAPIInstance;
+}
+
+CAmCommonAPIWrapper* CAmCommonAPIWrapper::getInstance()
+{
+ assert(NULL!=pSingleCommonAPIInstance);
+ return pSingleCommonAPIInstance;
+}
+
+std::shared_ptr<CommonAPI::Factory> CAmCommonAPIWrapper::factory() const
+{
+ return mFactory;
+}
+
+
+std::shared_ptr<CommonAPI::Runtime> CAmCommonAPIWrapper::runtime() const
+{
+ return mFactory->getRuntime();
+}
+
+bool CAmCommonAPIWrapper::commonDispatchCallback(const sh_pollHandle_t handle, void *userData)
+{
+ (void) handle;
+ (void) userData;
+
+ std::list<DispatchSource*>::iterator iterator(mSourcesToDispatch.begin());
+ for(;iterator!=mSourcesToDispatch.end();)
+ {
+ DispatchSource* source = *iterator;
+ if (!source->dispatch()) {
+ iterator=mSourcesToDispatch.erase(iterator);
+ }
+ else
+ iterator++;
+ }
+ if (!mSourcesToDispatch.empty())
+ return (true);
+
+ return false;
+}
+
+bool CAmCommonAPIWrapper::commonCheckCallback(const sh_pollHandle_t, void *)
+{
+ std::vector<DispatchSource*> vecDispatch=mWatchToCheck->getDependentDispatchSources();
+ mSourcesToDispatch.insert(mSourcesToDispatch.end(), vecDispatch.begin(), vecDispatch.end());
+
+ return (mWatchToCheck || !mSourcesToDispatch.empty());
+}
+
+void CAmCommonAPIWrapper::commonFireCallback(const pollfd pollfd, const sh_pollHandle_t, void *)
+{
+ mWatchToCheck=NULL;
+ try
+ {
+ mWatchToCheck=mMapWatches.at(pollfd.fd);
+ }
+ catch (const std::out_of_range& error) {
+ logInfo(__PRETTY_FUNCTION__,error.what());
+ return;
+ }
+
+ mWatchToCheck->dispatch(pollfd.events);
+}
+
+void CAmCommonAPIWrapper::commonPrepareCallback(const sh_pollHandle_t, void*)
+{
+ for (auto dispatchSourceIterator = mRegisteredDispatchSources.begin();
+ dispatchSourceIterator != mRegisteredDispatchSources.end();
+ dispatchSourceIterator++)
+ {
+ int64_t dispatchTimeout(TIMEOUT_INFINITE);
+ if(dispatchSourceIterator->second->prepare(dispatchTimeout))
+ {
+ while (dispatchSourceIterator->second->dispatch());
+ }
+ }
+}
+
+void CAmCommonAPIWrapper::registerDispatchSource(DispatchSource* dispatchSource, const DispatchPriority dispatchPriority)
+{
+ mRegisteredDispatchSources.insert({dispatchPriority, dispatchSource});
+}
+
+void CAmCommonAPIWrapper::deregisterDispatchSource(DispatchSource* dispatchSource)
+{
+ for(auto dispatchSourceIterator = mRegisteredDispatchSources.begin();
+ dispatchSourceIterator != mRegisteredDispatchSources.end();
+ dispatchSourceIterator++) {
+
+ if(dispatchSourceIterator->second == dispatchSource) {
+ mRegisteredDispatchSources.erase(dispatchSourceIterator);
+ break;
+ }
+ }
+}
+
+void CAmCommonAPIWrapper::deregisterWatch(Watch* watch)
+{
+ logInfo(__PRETTY_FUNCTION__);
+ for(std::map<int,Watch*>::iterator iter(mMapWatches.begin());iter!=mMapWatches.end();iter++)
+ {
+ if (iter->second == watch)
+ {
+ mMapWatches.erase(iter);
+ break;
+ }
+ }
+}
+
+void CAmCommonAPIWrapper::registerTimeout(Timeout* timeout, const DispatchPriority)
+{
+ logInfo(__PRETTY_FUNCTION__);
+ timespec pollTimeout;
+ int64_t localTimeout = timeout->getTimeoutInterval();
+
+ pollTimeout.tv_sec = localTimeout / 1000;
+ pollTimeout.tv_nsec = (localTimeout % 1000) * 1000000;
+
+ //prepare handle and callback. new is eval, but there is no other choice because we need the pointer!
+ sh_timerHandle_t handle;
+ timerHandles myHandle({handle,timeout});
+ mpListTimerhandles.push_back(myHandle);
+
+ //add the timer to the pollLoop
+ mpSocketHandler->addTimer(pollTimeout, &pCommonTimerCallback, handle, timeout);
+
+ return;
+}
+
+void CAmCommonAPIWrapper::deregisterTimeout(Timeout* timeout)
+{
+ logInfo(__PRETTY_FUNCTION__);
+ for( std::vector<timerHandles>::iterator iter(mpListTimerhandles.begin());iter!=mpListTimerhandles.end();iter++)
+ {
+ if(iter->timeout==timeout)
+ {
+ mpSocketHandler->removeTimer(iter->handle);
+ }
+ }
+}
+
+void CAmCommonAPIWrapper::registerWatch(Watch* watch, const DispatchPriority)
+{
+ logInfo(__PRETTY_FUNCTION__);
+ pollfd pollfd_ (watch->getAssociatedFileDescriptor());
+ sh_pollHandle_t handle (0);
+
+ am_Error_e error = mpSocketHandler->addFDPoll(pollfd_.fd, pollfd_.events, &pCommonPrepareCallback, &pCommonFireCallback, &pCommonCheckCallback, &pCommonDispatchCallback, watch, handle);
+
+ //if everything is alright, add the watch and the handle to our map so we know this relationship
+ if (error == !am_Error_e::E_OK || handle == 0)
+ logError(__PRETTY_FUNCTION__,"entering watch failed");
+
+ mMapWatches.insert(std::make_pair(pollfd_.fd,watch));
+}
+
+void CAmCommonAPIWrapper::commonTimerCallback(sh_timerHandle_t handle, void *)
+{
+ for( std::vector<timerHandles>::iterator iter(mpListTimerhandles.begin());iter!=mpListTimerhandles.end();iter++)
+ {
+ if(iter->handle==handle)
+ {
+ iter->timeout->dispatch();
+ }
+ }
+}
+
+}
diff --git a/AudioManagerDaemon/src/CAmDatabaseHandlerMap.cpp b/AudioManagerDaemon/src/CAmDatabaseHandlerMap.cpp
index ba19641..3e83cc5 100644
--- a/AudioManagerDaemon/src/CAmDatabaseHandlerMap.cpp
+++ b/AudioManagerDaemon/src/CAmDatabaseHandlerMap.cpp
@@ -2418,7 +2418,7 @@ am_Error_e CAmDatabaseHandlerMap::getRoutingTree(bool onlyfree, CAmRoutingTree&
{
if(!onlyfree || std::find_if(mMappedData.mConnectionMap.begin(),
mMappedData.mConnectionMap.end(),
- [refGateway](const std::pair<am_connectionID_t, am_Connection_Database_s>& refConnection)
+ [&](const std::pair<am_connectionID_t, am_Connection_Database_s>& refConnection)
{
return (refConnection.second.sinkID == refGateway.second.sinkID ||
refConnection.second.sourceID ==refGateway.second.sourceID);
diff --git a/AudioManagerDaemon/src/CAmDbusWrapper.cpp b/AudioManagerDaemon/src/CAmDbusWrapper.cpp
index 18cf70b..c9c26a4 100644
--- a/AudioManagerDaemon/src/CAmDbusWrapper.cpp
+++ b/AudioManagerDaemon/src/CAmDbusWrapper.cpp
@@ -48,10 +48,10 @@ DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE \
CAmDbusWrapper* CAmDbusWrapper::mpReference = NULL;
CAmDbusWrapper::CAmDbusWrapper(CAmSocketHandler* socketHandler, DBusBusType type) :
+ pDbusPrepareCallback(this,&CAmDbusWrapper::dbusPrepareCallback), //
pDbusDispatchCallback(this, &CAmDbusWrapper::dbusDispatchCallback), //
pDbusFireCallback(this, &CAmDbusWrapper::dbusFireCallback), //
pDbusCheckCallback(this, &CAmDbusWrapper::dbusCheckCallback), //
- pDbusPrepareCallback(this,&CAmDbusWrapper::dbusPrepareCallback), //
pDbusTimerCallback(this, &CAmDbusWrapper::dbusTimerCallback), //
mpDbusConnection(0), //
mDBusError(), //
diff --git a/AudioManagerDaemon/src/CAmNodeStateCommunicatorCAPI.cpp b/AudioManagerDaemon/src/CAmNodeStateCommunicatorCAPI.cpp
new file mode 100644
index 0000000..3761fca
--- /dev/null
+++ b/AudioManagerDaemon/src/CAmNodeStateCommunicatorCAPI.cpp
@@ -0,0 +1,361 @@
+/**
+ * Copyright (C) 2012, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \file CAmNodeStateCommunicatorCAPI.cpp
+ * For further information see http://www.genivi.org/.
+ *
+ */
+
+#include <assert.h>
+#include <string>
+#include <fstream>
+#include <sstream>
+#include <stdexcept>
+#include <functional>
+#include <memory>
+#include <CommonAPI/CommonAPI.h>
+#include "config.h"
+#include "shared/CAmCommonAPIWrapper.h"
+#include "shared/CAmDltWrapper.h"
+#include "CAmNodeStateCommunicatorCAPI.h"
+#include "CAmControlSender.h"
+#include "LifeCycleConsumer.h"
+
+
+
+
+namespace am
+{
+
+const char * CAmNodeStateCommunicatorCAPI::CLIENT_STRING = "local:org.genivi.NodeStateManager.Consumer:org.genivi.NodeStateManager";
+const char * CAmNodeStateCommunicatorCAPI::SERVER_STRING = "local:org.genivi.NodeStateManager.LifeCycleConsumer:org.genivi.audiomanger";
+
+const char * CAmNodeStateCommunicatorCAPI::OBJECT_NAME = "/org/genivi/audiomanager/LifeCycleConsumer";
+const char * CAmNodeStateCommunicatorCAPI::BUS_NAME = "org.genivi.audiomanager";
+
+
+#define IF_NOT_AVAILABLE_RETURN(error) \
+if(!mIsServiceAvailable) { logError(__PRETTY_FUNCTION__, "Node State Manager not available yet"); return error; }
+
+/**
+ * Retrieves the value from given attribute wrapper.
+ */
+template <typename TValueReturnType, class TValueClass> am_Error_e getAttributeValue(Attribute<TValueClass>* attribute, TValueReturnType & resultValue)
+{
+ CallStatus status;
+ typename Attribute<TValueClass>::ValueType value;
+ attribute->getValue(status, value);
+ std::cout << std::endl << "CallStatus : " << static_cast<int>(status) << std::endl;
+ if( CallStatus::SUCCESS == status)
+ {
+ resultValue = static_cast<TValueReturnType>(value);
+ return E_OK;
+ }
+ return E_UNKNOWN;
+}
+
+
+CAmNodeStateCommunicatorCAPI::CAmNodeStateCommunicatorCAPI(CAmCommonAPIWrapper* iCAPIWrapper) :
+ CAmNodeStateCommunicator(),
+ mpCAPIWrapper(iCAPIWrapper),
+ mIsServiceAvailable(false)
+{
+ assert(mpCAPIWrapper);
+ logInfo("CAmNodeStateCommunicatorCAPI::CAmNodeStateCommunicatorCAPI started");
+
+ //Gets the factory pointer and build a proxy object
+ std::shared_ptr<CommonAPI::Factory> factory = iCAPIWrapper->factory();
+ mNSMProxy = factory->buildProxy<ConsumerProxy>(CAmNodeStateCommunicatorCAPI::CLIENT_STRING);
+
+ //Makes subscriptions to the following 3 events
+ mNSMProxy->getNodeStateEvent().subscribe(
+ std::bind(&CAmNodeStateCommunicatorCAPI::onNodeStateEvent, this, std::placeholders::_1)
+ );
+ mNSMProxy->getNodeApplicationModeEvent().subscribe(
+ std::bind(&CAmNodeStateCommunicatorCAPI::onNodeApplicationModeEvent, this, std::placeholders::_1)
+ );
+ mNSMProxy->getSessionStateChangedEvent().subscribe(
+ std::bind(&CAmNodeStateCommunicatorCAPI::onSessionStateChangedEvent, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)
+ );
+ mNSMProxy->getProxyStatusEvent().subscribe(std::bind(&CAmNodeStateCommunicatorCAPI::onServiceStatusEvent,this,std::placeholders::_1));
+ //Instantiates the concrete stub implementation
+ mNSMStub = std::make_shared<CAmNodeStateCommunicatorCAPI::CAmNodeStateCommunicatorServiceImpl>(this);
+
+ //Registers the service
+ iCAPIWrapper->registerStub(mNSMStub, CAmNodeStateCommunicatorCAPI::SERVER_STRING);
+}
+
+CAmNodeStateCommunicatorCAPI::~CAmNodeStateCommunicatorCAPI()
+{
+ mNSMProxy.reset();
+ mpCAPIWrapper->unregisterStub(CAmNodeStateCommunicatorCAPI::SERVER_STRING);
+ mNSMStub->setDelegate(NULL);
+ mNSMStub.reset();
+ mpCAPIWrapper = NULL;
+}
+
+bool CAmNodeStateCommunicatorCAPI::isServiceAvailable()
+{
+ return mIsServiceAvailable;
+}
+
+/** retrieves the actual restart reason
+ *
+ * @param restartReason
+ * @return E_OK on success
+ */
+am_Error_e CAmNodeStateCommunicatorCAPI::nsmGetRestartReasonProperty(NsmRestartReason_e& restartReason)
+{
+ //Check the service via the proxy object is available
+ IF_NOT_AVAILABLE_RETURN(E_NOT_POSSIBLE)
+ //Get the attribute
+ return getAttributeValue(&mNSMProxy->getRestartReasonAttribute(), restartReason);
+}
+
+/** retrieves the actual shutdown reason
+ *
+ * @param ShutdownReason
+ * @return E_OK on success
+ */
+am_Error_e CAmNodeStateCommunicatorCAPI::nsmGetShutdownReasonProperty(NsmShutdownReason_e& ShutdownReason)
+{
+ //Check the service via the proxy object is available
+ IF_NOT_AVAILABLE_RETURN(E_NOT_POSSIBLE)
+ //Get the attribute
+ return getAttributeValue(&mNSMProxy->getShutdownReasonAttribute(), ShutdownReason);
+}
+
+/** retrieves the actual running reason
+ *
+ * @param nsmRunningReason
+ * @return E_OK on success
+ */
+am_Error_e CAmNodeStateCommunicatorCAPI::nsmGetRunningReasonProperty(NsmRunningReason_e& nsmRunningReason)
+{
+ //Check the service via the proxy object is available
+ IF_NOT_AVAILABLE_RETURN(E_NOT_POSSIBLE)
+ //Get the attribute
+ return getAttributeValue(&mNSMProxy->getWakeUpReasonAttribute(), nsmRunningReason);
+}
+
+/** gets the node state
+ *
+ * @param nsmNodeState
+ * @return NsmErrorStatus_Ok on success
+ */
+NsmErrorStatus_e CAmNodeStateCommunicatorCAPI::nsmGetNodeState(NsmNodeState_e& nsmNodeState)
+{
+ //Check the service via the proxy object is available
+ IF_NOT_AVAILABLE_RETURN(NsmErrorStatus_Error)
+
+ CallStatus callStatus;
+ int32_t tmpNodeState = 0, errorCode = 0;
+ mNSMProxy->GetNodeState(callStatus, tmpNodeState, errorCode);
+ if( CallStatus::SUCCESS == callStatus )
+ {
+ nsmNodeState = static_cast<NsmNodeState_e>(tmpNodeState);
+ return (static_cast<NsmErrorStatus_e>(errorCode));
+ }
+ return NsmErrorStatus_Error;
+}
+
+/** gets the session state for a session and seatID
+ *
+ * @param sessionName the name of the session
+ * @param seatID the seatID
+ * @param sessionState
+ * @return NsmErrorStatus_Ok on success
+ */
+NsmErrorStatus_e CAmNodeStateCommunicatorCAPI::nsmGetSessionState(const std::string& sessionName, const NsmSeat_e& seatID, NsmSessionState_e& sessionState)
+{
+ //Check the service via the proxy object is available
+ IF_NOT_AVAILABLE_RETURN(NsmErrorStatus_Error)
+
+ CallStatus callStatus;
+ int32_t tmpSessionState = 0 , errorCode = 0;
+ mNSMProxy->GetSessionState(sessionName, seatID, callStatus, tmpSessionState, errorCode);
+
+ if( CallStatus::SUCCESS == callStatus)
+ {
+ sessionState = static_cast<NsmSessionState_e>(tmpSessionState);
+ return (static_cast<NsmErrorStatus_e>(errorCode));
+ }
+ return NsmErrorStatus_Error;
+}
+
+/** gets the application mode
+ *
+ * @param applicationMode
+ * @return NsmErrorStatus_Ok on success
+ */
+NsmErrorStatus_e CAmNodeStateCommunicatorCAPI::nsmGetApplicationMode(NsmApplicationMode_e& applicationMode)
+{
+ //Check the service via the proxy object is available
+ IF_NOT_AVAILABLE_RETURN(NsmErrorStatus_Error)
+
+ CallStatus callStatus;
+ int32_t tmpAppMode = 0 , errorCode = 0;
+ mNSMProxy->GetApplicationMode(callStatus, tmpAppMode, errorCode);
+ if( CallStatus::SUCCESS == callStatus)
+ {
+ applicationMode = static_cast<NsmApplicationMode_e>(tmpAppMode);
+ return (static_cast<NsmErrorStatus_e>(errorCode));
+ }
+ return NsmErrorStatus_Dbus;
+}
+
+/** this function registers the AudioManager as shutdown client at the NSM
+ * for more information check the Nodestatemanager
+ * @param shutdownMode the shutdownmode you wish to set
+ * @param timeoutMs the timeout you need to have
+ * @return NsmErrorStatus_Ok on success
+ */
+NsmErrorStatus_e CAmNodeStateCommunicatorCAPI::nsmRegisterShutdownClient(const uint32_t shutdownMode, const uint32_t timeoutMs)
+{
+ //Check the service via the proxy object is available
+ IF_NOT_AVAILABLE_RETURN(NsmErrorStatus_Error)
+
+ CallStatus callStatus;
+ int32_t errorCode = 0;
+ std::string objName = std::string(CAmNodeStateCommunicatorCAPI::OBJECT_NAME);
+ std::string busName = std::string(CAmNodeStateCommunicatorCAPI::BUS_NAME);
+ mNSMProxy->RegisterShutdownClient(busName, objName, shutdownMode, timeoutMs, callStatus, errorCode);
+ if( CallStatus::SUCCESS == callStatus)
+ return (static_cast<NsmErrorStatus_e>(errorCode));
+ return NsmErrorStatus_Dbus;
+
+}
+
+/** this function unregisters the AudioManager as shutdown client at the NSM
+ *
+ * @param shutdownMode
+ * @return NsmErrorStatus_Ok on success
+ */
+NsmErrorStatus_e CAmNodeStateCommunicatorCAPI::nsmUnRegisterShutdownClient(const uint32_t shutdownMode)
+{
+ //Check the service via the proxy object is available
+ IF_NOT_AVAILABLE_RETURN(NsmErrorStatus_Error)
+
+ CallStatus callStatus;
+ int32_t errorCode = 0;
+ std::string objName = std::string(CAmNodeStateCommunicatorCAPI::OBJECT_NAME);
+ std::string busName = std::string(CAmNodeStateCommunicatorCAPI::BUS_NAME);
+ mNSMProxy->UnRegisterShutdownClient(busName, objName, shutdownMode, callStatus, errorCode);
+ if( CallStatus::SUCCESS == callStatus)
+ return (static_cast<NsmErrorStatus_e>(errorCode));
+ return NsmErrorStatus_Dbus;
+}
+
+/** returns the interface version
+ *
+ * @param version
+ * @return E_OK on success
+ */
+am_Error_e CAmNodeStateCommunicatorCAPI::nsmGetInterfaceVersion(uint32_t& version)
+{
+ //Check the service via the proxy object is available
+ IF_NOT_AVAILABLE_RETURN(E_NOT_POSSIBLE)
+
+ CallStatus callStatus;
+ mNSMProxy->GetInterfaceVersion(callStatus, version);
+ if( CallStatus::SUCCESS == callStatus)
+ return E_OK;
+ return E_UNKNOWN;
+}
+
+/** sends out the Lifecycle request complete message
+ *
+ * @param RequestId
+ * @param status
+ * @return NsmErrorStatus_Ok on success
+ */
+NsmErrorStatus_e CAmNodeStateCommunicatorCAPI::nsmSendLifecycleRequestComplete(const uint32_t RequestId, const NsmErrorStatus_e status)
+{
+ //Check the service via the proxy object is available
+ IF_NOT_AVAILABLE_RETURN(NsmErrorStatus_Error)
+
+ CallStatus callStatus;
+ int32_t errorCode = 0;
+ mNSMProxy->LifecycleRequestComplete(RequestId, status, callStatus, errorCode);
+ if( CallStatus::SUCCESS == callStatus)
+ {
+ return (static_cast<NsmErrorStatus_e>(errorCode));
+ }
+ return NsmErrorStatus_Dbus;
+}
+
+/** notification handler for changed node state
+ *
+ * @param nodeState
+ * @return none
+ */
+void CAmNodeStateCommunicatorCAPI::onNodeStateEvent(const int32_t nodeState)
+{
+ logInfo(__PRETTY_FUNCTION__, " got signal NodeState, with nodeState",nodeState);
+ assert(mpControlSender);
+ mpControlSender->hookSystemNodeStateChanged(static_cast<NsmNodeState_e>(nodeState));
+}
+
+/** notification handler for changed node application mode
+ *
+ * @param nodeApplicationMode
+ * @return none
+ */
+void CAmNodeStateCommunicatorCAPI::onNodeApplicationModeEvent(const int32_t nodeApplicationMode)
+{
+ logInfo(__PRETTY_FUNCTION__, " got signal nodeApplicationMode, with applicationMode",nodeApplicationMode);
+ assert(mpControlSender);
+ mpControlSender->hookSystemNodeApplicationModeChanged(static_cast<NsmApplicationMode_e>(nodeApplicationMode));
+}
+
+/** notification handler for changed session state
+ *
+ * @param sessionName
+ * @param seatID
+ * @param sessionState
+ * @return none
+ */
+void CAmNodeStateCommunicatorCAPI::onSessionStateChangedEvent(const std::string & sessionName, const int32_t seatID, const int32_t sessionState)
+{
+ logInfo(__PRETTY_FUNCTION__, " got signal sessionStateChanged, with session",sessionName,"seatID=",seatID,"sessionState",sessionState);
+ assert(mpControlSender);
+ mpControlSender->hookSystemSessionStateChanged(sessionName, static_cast<NsmSeat_e>(seatID), static_cast<NsmSessionState_e>(sessionState));
+}
+
+void CAmNodeStateCommunicatorCAPI::onServiceStatusEvent(const CommonAPI::AvailabilityStatus& serviceStatus)
+{
+ std::stringstream avail;
+ avail << "(" << static_cast<int>(serviceStatus) << ")";
+
+ logInfo("Service Status of the NSM changed to ", avail.str());
+ std::cout << std::endl << "Service Status of the NSM changed to " << avail.str();
+ mIsServiceAvailable = (serviceStatus==CommonAPI::AvailabilityStatus::AVAILABLE);
+}
+
+/** implements the service part, which is invoked from the node state manager
+ *
+ * @param sessionName
+ * @param seatID
+ * @param sessionState
+ * @return none
+ */
+void CAmNodeStateCommunicatorCAPI::cbReceivedLifecycleRequest(uint32_t Request, uint32_t RequestId, int32_t& ErrorCode)
+{
+ assert(mpControlSender);
+ ErrorCode = mpControlSender->hookSystemLifecycleRequest(Request, RequestId);
+}
+
+} /* namespace am */
diff --git a/AudioManagerDaemon/src/CAmNodeStateCommunicator.cpp b/AudioManagerDaemon/src/CAmNodeStateCommunicatorDBus.cpp
index 689b975..4173890 100644
--- a/AudioManagerDaemon/src/CAmNodeStateCommunicator.cpp
+++ b/AudioManagerDaemon/src/CAmNodeStateCommunicatorDBus.cpp
@@ -14,29 +14,28 @@
*
* \author Christian Linke, christian.linke@bmw.de BMW 2012
*
- * \file CAmNodeStateCommunicator.cpp
+ * \file CAmNodeStateCommunicatorDBus.cpp
* For further information see http://www.genivi.org/.
*
*/
-#include "CAmNodeStateCommunicator.h"
+#include "CAmNodeStateCommunicatorDBus.h"
#include <assert.h>
#include <string>
#include <fstream>
+#include <sstream>
#include <stdexcept>
#include "CAmControlSender.h"
#include "shared/CAmDltWrapper.h"
#include "config.h"
-#include <sstream>
namespace am
{
static DBusObjectPathVTable gObjectPathVTable;
-CAmNodeStateCommunicator::CAmNodeStateCommunicator(CAmDbusWrapper* iDbusWrapper) :
+CAmNodeStateCommunicatorDBus::CAmNodeStateCommunicatorDBus(CAmDbusWrapper* iDbusWrapper) : CAmNodeStateCommunicator(),
mpDbusWrapper(iDbusWrapper), //
- mpControlSender(NULL), //
mpDBusConnection(NULL)
{
assert(mpDbusWrapper);
@@ -48,12 +47,12 @@ CAmNodeStateCommunicator::CAmNodeStateCommunicator(CAmDbusWrapper* iDbusWrapper)
//register the path and the callback for receiving messages
std::string path("LifeCycleConsumer");
- gObjectPathVTable.message_function=CAmNodeStateCommunicator::receiveCallback;
+ gObjectPathVTable.message_function=CAmNodeStateCommunicatorDBus::receiveCallback;
mpDbusWrapper->registerCallback(&gObjectPathVTable, path, this);
//now we need to make sure we catch the signals from the NSM:
dbus_bus_add_match(mpDBusConnection, "type=\'signal\',path=\'/org/genivi/NodeStateManager\'", NULL);
- if (!dbus_connection_add_filter(mpDBusConnection, CAmNodeStateCommunicator::signalCallback, this, NULL))
+ if (!dbus_connection_add_filter(mpDBusConnection, CAmNodeStateCommunicatorDBus::signalCallback, this, NULL))
{
logError("CAmNodeStateCommunicator::CAmNodeStateCommunicator not enought memory!");
throw std::runtime_error("CAmNodeStateCommunicator::CAmNodeStateCommunicator not enought memory!");
@@ -61,7 +60,7 @@ CAmNodeStateCommunicator::CAmNodeStateCommunicator(CAmDbusWrapper* iDbusWrapper)
dbus_connection_flush(mpDBusConnection);
}
-CAmNodeStateCommunicator::~CAmNodeStateCommunicator()
+CAmNodeStateCommunicatorDBus::~CAmNodeStateCommunicatorDBus()
{}
/** retrieves the actual restartReason
@@ -69,7 +68,7 @@ CAmNodeStateCommunicator::~CAmNodeStateCommunicator()
* @param restartReason
* @return E_OK on success
*/
-am_Error_e CAmNodeStateCommunicator::nsmGetRestartReasonProperty(NsmRestartReason_e& restartReason)
+am_Error_e CAmNodeStateCommunicatorDBus::nsmGetRestartReasonProperty(NsmRestartReason_e& restartReason)
{
int32_t answer(0);
am_Error_e error=readIntegerProperty("RestartReason",answer);
@@ -82,7 +81,7 @@ am_Error_e CAmNodeStateCommunicator::nsmGetRestartReasonProperty(NsmRestartReaso
* @param ShutdownReason
* @return E_OK on success
*/
-am_Error_e CAmNodeStateCommunicator::nsmGetShutdownReasonProperty(NsmShutdownReason_e& ShutdownReason)
+am_Error_e CAmNodeStateCommunicatorDBus::nsmGetShutdownReasonProperty(NsmShutdownReason_e& ShutdownReason)
{
int32_t answer(0);
am_Error_e error=readIntegerProperty("ShutdownReason",answer);
@@ -95,7 +94,7 @@ am_Error_e CAmNodeStateCommunicator::nsmGetShutdownReasonProperty(NsmShutdownRea
* @param nsmRunningReason
* @return E_OK on success
*/
-am_Error_e CAmNodeStateCommunicator::nsmGetRunningReasonProperty(NsmRunningReason_e& nsmRunningReason)
+am_Error_e CAmNodeStateCommunicatorDBus::nsmGetRunningReasonProperty(NsmRunningReason_e& nsmRunningReason)
{
int32_t answer(0);
am_Error_e error=readIntegerProperty("WakeUpReason",answer);
@@ -108,7 +107,7 @@ am_Error_e CAmNodeStateCommunicator::nsmGetRunningReasonProperty(NsmRunningReaso
* @param nsmNodeState
* @return NsmErrorStatus_Ok on success
*/
-NsmErrorStatus_e CAmNodeStateCommunicator::nsmGetNodeState(NsmNodeState_e& nsmNodeState)
+NsmErrorStatus_e CAmNodeStateCommunicatorDBus::nsmGetNodeState(NsmNodeState_e& nsmNodeState)
{
DBusError error;
dbus_error_init(&error);
@@ -120,14 +119,14 @@ NsmErrorStatus_e CAmNodeStateCommunicator::nsmGetNodeState(NsmNodeState_e& nsmNo
if (!message)
{
- logError("CAmNodeStateCommunicator::nsmGetNodeState dbus error:", error.message);
+ logError("CAmNodeStateCommunicatorDBus::nsmGetNodeState dbus error:", error.message);
return (NsmErrorStatus_Dbus);
}
DBusMessage* reply(dbus_connection_send_with_reply_and_block(mpDBusConnection, message, -1, &error));
if (!reply)
{
- logError("CAmNodeStateCommunicator::nsmGetNodeState failed, dbus error", error.message);
+ logError("CAmNodeStateCommunicatorDBus::nsmGetNodeState failed, dbus error", error.message);
return (NsmErrorStatus_Dbus);
}
@@ -147,7 +146,7 @@ NsmErrorStatus_e CAmNodeStateCommunicator::nsmGetNodeState(NsmNodeState_e& nsmNo
* @param sessionState
* @return NsmErrorStatus_Ok on success
*/
-NsmErrorStatus_e CAmNodeStateCommunicator::nsmGetSessionState(const std::string& sessionName, const NsmSeat_e& seatID, NsmSessionState_e& sessionState)
+NsmErrorStatus_e CAmNodeStateCommunicatorDBus::nsmGetSessionState(const std::string& sessionName, const NsmSeat_e& seatID, NsmSessionState_e& sessionState)
{
DBusError error;
dbus_error_init(&error);
@@ -160,7 +159,7 @@ NsmErrorStatus_e CAmNodeStateCommunicator::nsmGetSessionState(const std::string&
if (!message)
{
- logError("CAmNodeStateCommunicator::nsmGetSessionState dbus error:", error.message);
+ logError("CAmNodeStateCommunicatorDBus::nsmGetSessionState dbus error:", error.message);
return (NsmErrorStatus_Dbus);
}
@@ -168,20 +167,20 @@ NsmErrorStatus_e CAmNodeStateCommunicator::nsmGetSessionState(const std::string&
if (!dbus_message_iter_append_basic(&iter, DBUS_TYPE_STRING, &sessionName))
{
- logError( "CAmNodeStateCommunicator::nsmGetSessionState no more memory");
+ logError( "CAmNodeStateCommunicatorDBus::nsmGetSessionState no more memory");
return (NsmErrorStatus_Dbus);
}
if (!dbus_message_iter_append_basic(&iter, DBUS_TYPE_INT32, &seatID))
{
- logError( "CAmNodeStateCommunicator::nsmGetSessionState no more memory");
+ logError( "CAmNodeStateCommunicatorDBus::nsmGetSessionState no more memory");
return (NsmErrorStatus_Dbus);
}
DBusMessage* reply(dbus_connection_send_with_reply_and_block(mpDBusConnection, message, -1, &error));
if (!reply)
{
- logError("CAmNodeStateCommunicator::nsmGetSessionState failed, dbus error", error.message);
+ logError("CAmNodeStateCommunicatorDBus::nsmGetSessionState failed, dbus error", error.message);
return (NsmErrorStatus_Dbus);
}
@@ -201,7 +200,7 @@ NsmErrorStatus_e CAmNodeStateCommunicator::nsmGetSessionState(const std::string&
* @param applicationMode
* @return NsmErrorStatus_Ok on success
*/
-NsmErrorStatus_e CAmNodeStateCommunicator::nsmGetApplicationMode(NsmApplicationMode_e& applicationMode)
+NsmErrorStatus_e CAmNodeStateCommunicatorDBus::nsmGetApplicationMode(NsmApplicationMode_e& applicationMode)
{
DBusError error;
dbus_error_init(&error);
@@ -212,14 +211,14 @@ NsmErrorStatus_e CAmNodeStateCommunicator::nsmGetApplicationMode(NsmApplicationM
if (!message)
{
- logError("CAmNodeStateCommunicator::nsmGetApplicationMode dbus error:", error.message);
+ logError("CAmNodeStateCommunicatorDBus::nsmGetApplicationMode dbus error:", error.message);
return (NsmErrorStatus_Dbus);
}
DBusMessage* reply(dbus_connection_send_with_reply_and_block(mpDBusConnection, message, -1, &error));
if (!reply)
{
- logError("CAmNodeStateCommunicator::nsmGetApplicationMode failed, dbus error", error.message);
+ logError("CAmNodeStateCommunicatorDBus::nsmGetApplicationMode failed, dbus error", error.message);
return (NsmErrorStatus_Dbus);
}
@@ -238,7 +237,7 @@ NsmErrorStatus_e CAmNodeStateCommunicator::nsmGetApplicationMode(NsmApplicationM
* @param timeoutMs the timeout you need to have
* @return NsmErrorStatus_Ok on success
*/
-NsmErrorStatus_e CAmNodeStateCommunicator::nsmRegisterShutdownClient(const uint32_t shutdownMode, const uint32_t timeoutMs)
+NsmErrorStatus_e CAmNodeStateCommunicatorDBus::nsmRegisterShutdownClient(const uint32_t shutdownMode, const uint32_t timeoutMs)
{
DBusError error;
DBusMessageIter iter;
@@ -251,32 +250,32 @@ NsmErrorStatus_e CAmNodeStateCommunicator::nsmRegisterShutdownClient(const uint3
if (!message)
{
- logError( "CAmNodeStateCommunicator::nsmRegisterShutdownClient dbus error:", error.message);
+ logError( "CAmNodeStateCommunicatorDBus::nsmRegisterShutdownClient dbus error:", error.message);
return (NsmErrorStatus_Dbus);
}
dbus_message_iter_init_append(message, &iter);
if (!dbus_message_iter_append_basic(&iter, DBUS_TYPE_STRING, &service))
{
- logError( "CAmNodeStateCommunicator::nsmRegisterShutdownClient no more memory");
+ logError( "CAmNodeStateCommunicatorDBus::nsmRegisterShutdownClient no more memory");
return (NsmErrorStatus_Dbus);
}
if (!dbus_message_iter_append_basic(&iter, DBUS_TYPE_STRING, &charPath))
{
- logError( "CAmNodeStateCommunicator::nsmRegisterShutdownClient no more memory");
+ logError( "CAmNodeStateCommunicatorDBus::nsmRegisterShutdownClient no more memory");
return (NsmErrorStatus_Dbus);
}
if (!dbus_message_iter_append_basic(&iter, DBUS_TYPE_UINT32, &shutdownMode))
{
- logError( "CAmNodeStateCommunicator::nsmRegisterShutdownClient no more memory");
+ logError( "CAmNodeStateCommunicatorDBus::nsmRegisterShutdownClient no more memory");
return (NsmErrorStatus_Dbus);
}
if (!dbus_message_iter_append_basic(&iter, DBUS_TYPE_UINT32, &timeoutMs))
{
- logError( "CAmNodeStateCommunicator::nsmRegisterShutdownClient no more memory");
+ logError( "CAmNodeStateCommunicatorDBus::nsmRegisterShutdownClient no more memory");
return (NsmErrorStatus_Dbus);
}
@@ -305,7 +304,7 @@ NsmErrorStatus_e CAmNodeStateCommunicator::nsmRegisterShutdownClient(const uint3
* @param shutdownMode
* @return NsmErrorStatus_Ok on success
*/
-NsmErrorStatus_e CAmNodeStateCommunicator::nsmUnRegisterShutdownClient(const uint32_t shutdownMode)
+NsmErrorStatus_e CAmNodeStateCommunicatorDBus::nsmUnRegisterShutdownClient(const uint32_t shutdownMode)
{
DBusError error;
DBusMessageIter iter;
@@ -318,26 +317,26 @@ NsmErrorStatus_e CAmNodeStateCommunicator::nsmUnRegisterShutdownClient(const uin
if (!message)
{
- logError( "CAmNodeStateCommunicator::nsmUnRegisterShutdownClient dbus error:", error.message);
+ logError( "CAmNodeStateCommunicatorDBus::nsmUnRegisterShutdownClient dbus error:", error.message);
return (NsmErrorStatus_Dbus);
}
dbus_message_iter_init_append(message, &iter);
if (!dbus_message_iter_append_basic(&iter, DBUS_TYPE_STRING, &service))
{
- logError( "CAmNodeStateCommunicator::nsmUnRegisterShutdownClient no more memory");
+ logError( "CAmNodeStateCommunicatorDBus::nsmUnRegisterShutdownClient no more memory");
return (NsmErrorStatus_Dbus);
}
if (!dbus_message_iter_append_basic(&iter, DBUS_TYPE_STRING, &charPath))
{
- logError( "CAmNodeStateCommunicator::nsmUnRegisterShutdownClient no more memory");
+ logError( "CAmNodeStateCommunicatorDBus::nsmUnRegisterShutdownClient no more memory");
return (NsmErrorStatus_Dbus);
}
if (!dbus_message_iter_append_basic(&iter, DBUS_TYPE_UINT32, &shutdownMode))
{
- logError( "CAmNodeStateCommunicator::nsmUnRegisterShutdownClient no more memory");
+ logError( "CAmNodeStateCommunicatorDBus::nsmUnRegisterShutdownClient no more memory");
return (NsmErrorStatus_Dbus);
}
@@ -346,13 +345,13 @@ NsmErrorStatus_e CAmNodeStateCommunicator::nsmUnRegisterShutdownClient(const uin
if (!reply)
{
- logError( "CAmNodeStateCommunicator::nsmUnRegisterShutdownClient failed, dbus error", error.message);
+ logError( "CAmNodeStateCommunicatorDBus::nsmUnRegisterShutdownClient failed, dbus error", error.message);
return (NsmErrorStatus_Dbus);
}
if(!dbus_message_get_args(reply, &error, DBUS_TYPE_INT32, &returnError, DBUS_TYPE_INVALID))
{
- logError( "CAmNodeStateCommunicator::nsmUnRegisterShutdownClient failed, dbus error", error.message);
+ logError( "CAmNodeStateCommunicatorDBus::nsmUnRegisterShutdownClient failed, dbus error", error.message);
return (NsmErrorStatus_Dbus);
}
dbus_message_unref(reply);
@@ -365,7 +364,7 @@ NsmErrorStatus_e CAmNodeStateCommunicator::nsmUnRegisterShutdownClient(const uin
* @param version
* @return E_OK on success
*/
-am_Error_e CAmNodeStateCommunicator::nsmGetInterfaceVersion(uint32_t& version)
+am_Error_e CAmNodeStateCommunicatorDBus::nsmGetInterfaceVersion(uint32_t& version)
{
DBusError error;
dbus_error_init(&error);
@@ -374,7 +373,7 @@ am_Error_e CAmNodeStateCommunicator::nsmGetInterfaceVersion(uint32_t& version)
if (!message)
{
- logError("CAmNodeStateCommunicator::nsmGetInterfaceVersion dbus error:", error.message);
+ logError("CAmNodeStateCommunicatorDBus::nsmGetInterfaceVersion dbus error:", error.message);
return (E_UNKNOWN);
}
@@ -384,13 +383,13 @@ am_Error_e CAmNodeStateCommunicator::nsmGetInterfaceVersion(uint32_t& version)
if (!reply)
{
- logError("CAmNodeStateCommunicator::nsmGetInterfaceVersion failed, dbus error", error.message);
+ logError("CAmNodeStateCommunicatorDBus::nsmGetInterfaceVersion failed, dbus error", error.message);
return (E_UNKNOWN);
}
if(!dbus_message_get_args(reply, &error, DBUS_TYPE_UINT32, &version, DBUS_TYPE_INVALID))
{
- logError("CAmNodeStateCommunicator::nsmGetInterfaceVersion failed, dbus error", error.message);
+ logError("CAmNodeStateCommunicatorDBus::nsmGetInterfaceVersion failed, dbus error", error.message);
return (E_UNKNOWN);
}
@@ -405,7 +404,7 @@ am_Error_e CAmNodeStateCommunicator::nsmGetInterfaceVersion(uint32_t& version)
* @param status
* @return NsmErrorStatus_Ok on success
*/
-NsmErrorStatus_e CAmNodeStateCommunicator::nsmSendLifecycleRequestComplete(const uint32_t RequestId, const NsmErrorStatus_e status)
+NsmErrorStatus_e CAmNodeStateCommunicatorDBus::nsmSendLifecycleRequestComplete(const uint32_t RequestId, const NsmErrorStatus_e status)
{
DBusError error;
DBusMessageIter iter;
@@ -415,20 +414,20 @@ NsmErrorStatus_e CAmNodeStateCommunicator::nsmSendLifecycleRequestComplete(const
if (!message)
{
- logError( "CAmNodeStateCommunicator::nsmSendLifecycleRequestComplete dbus error:", error.message);
+ logError( "CAmNodeStateCommunicatorDBus::nsmSendLifecycleRequestComplete dbus error:", error.message);
return (NsmErrorStatus_Dbus);
}
dbus_message_iter_init_append(message, &iter);
if (!dbus_message_iter_append_basic(&iter, DBUS_TYPE_UINT32, &RequestId))
{
- logError( "CAmNodeStateCommunicator::nsmSendLifecycleRequestComplete no more memory");
+ logError( "CAmNodeStateCommunicatorDBus::nsmSendLifecycleRequestComplete no more memory");
return (NsmErrorStatus_Dbus);
}
if (!dbus_message_iter_append_basic(&iter, DBUS_TYPE_INT32,&status))
{
- logError( "CAmNodeStateCommunicator::nsmSendLifecycleRequestComplete no more memory");
+ logError( "CAmNodeStateCommunicatorDBus::nsmSendLifecycleRequestComplete no more memory");
return (NsmErrorStatus_Dbus);
}
@@ -437,13 +436,13 @@ NsmErrorStatus_e CAmNodeStateCommunicator::nsmSendLifecycleRequestComplete(const
if (!reply)
{
- logError( "CAmNodeStateCommunicator::nsmSendLifecycleRequestComplete failed, dbus error", error.message);
+ logError( "CAmNodeStateCommunicatorDBus::nsmSendLifecycleRequestComplete failed, dbus error", error.message);
return (NsmErrorStatus_Dbus);
}
if(!dbus_message_get_args(reply, &error,DBUS_TYPE_INT32, &returnError, DBUS_TYPE_INVALID))
{
- logError( "CAmNodeStateCommunicator::nsmSendLifecycleRequestComplete failed, dbus error", error.message);
+ logError( "CAmNodeStateCommunicatorDBus::nsmSendLifecycleRequestComplete failed, dbus error", error.message);
return (NsmErrorStatus_Dbus);
}
dbus_message_unref(reply);
@@ -451,20 +450,14 @@ NsmErrorStatus_e CAmNodeStateCommunicator::nsmSendLifecycleRequestComplete(const
return (static_cast<NsmErrorStatus_e>(returnError));
}
-void CAmNodeStateCommunicator::registerControlSender(CAmControlSender* iControlSender)
-{
- assert(iControlSender);
- mpControlSender=iControlSender;
-}
-
-DBusHandlerResult CAmNodeStateCommunicator::receiveCallback(DBusConnection* conn, DBusMessage* msg, void* user_data)
+DBusHandlerResult CAmNodeStateCommunicatorDBus::receiveCallback(DBusConnection* conn, DBusMessage* msg, void* user_data)
{
- CAmNodeStateCommunicator* instance = static_cast<CAmNodeStateCommunicator*>(user_data);
+ CAmNodeStateCommunicatorDBus* instance = static_cast<CAmNodeStateCommunicatorDBus*>(user_data);
assert(instance);
return (instance->receiveCallbackDelegate(conn,msg));
}
-DBusHandlerResult CAmNodeStateCommunicator::receiveCallbackDelegate(DBusConnection* conn, DBusMessage* msg)
+DBusHandlerResult CAmNodeStateCommunicatorDBus::receiveCallbackDelegate(DBusConnection* conn, DBusMessage* msg)
{
if (dbus_message_is_method_call(msg, DBUS_INTERFACE_INTROSPECTABLE, "Introspect"))
{
@@ -482,7 +475,7 @@ DBusHandlerResult CAmNodeStateCommunicator::receiveCallbackDelegate(DBusConnecti
DBusMessageIter iter,replyIter;
if (!dbus_message_iter_init(msg, &iter))
{
- logError("CAmNodeStateCommunicator::receiveCallbackDelegate DBus Message has no arguments!");
+ logError("CAmNodeStateCommunicatorDBus::receiveCallbackDelegate DBus Message has no arguments!");
returnMessage = dbus_message_new_error(msg,DBUS_ERROR_INVALID_ARGS, "DBUS Message has no arguments!");
sendMessage(returnMessage,msg);
return (DBUS_HANDLER_RESULT_HANDLED);
@@ -490,7 +483,7 @@ DBusHandlerResult CAmNodeStateCommunicator::receiveCallbackDelegate(DBusConnecti
if (dbus_message_iter_get_arg_type(&iter)!=DBUS_TYPE_UINT32)
{
- logError("CAmNodeStateCommunicator::receiveCallbackDelegate DBus Message has invalid arguments!");
+ logError("CAmNodeStateCommunicatorDBus::receiveCallbackDelegate DBus Message has invalid arguments!");
returnMessage = dbus_message_new_error(msg,DBUS_ERROR_INVALID_ARGS,"DBus argument is not uint32_t!");
sendMessage(returnMessage,msg);
return (DBUS_HANDLER_RESULT_HANDLED);
@@ -501,7 +494,7 @@ DBusHandlerResult CAmNodeStateCommunicator::receiveCallbackDelegate(DBusConnecti
if (dbus_message_iter_get_arg_type(&iter)!=DBUS_TYPE_UINT32)
{
- logError("CAmNodeStateCommunicator::receiveCallbackDelegate DBus Message has invalid arguments!");
+ logError("CAmNodeStateCommunicatorDBus::receiveCallbackDelegate DBus Message has invalid arguments!");
returnMessage = dbus_message_new_error(msg,DBUS_ERROR_INVALID_ARGS,"DBus argument is not uint32_t!");
sendMessage(returnMessage,msg);
return (DBUS_HANDLER_RESULT_HANDLED);
@@ -516,7 +509,7 @@ DBusHandlerResult CAmNodeStateCommunicator::receiveCallbackDelegate(DBusConnecti
if (returnMessage == NULL)
{
- logError("CAmNodeStateCommunicator::receiveCallbackDelegate Cannot allocate DBus message!");
+ logError("CAmNodeStateCommunicatorDBus::receiveCallbackDelegate Cannot allocate DBus message!");
returnMessage = dbus_message_new_error(msg,DBUS_ERROR_NO_MEMORY,"Cannot create reply!");
sendMessage(returnMessage,msg);
return (DBUS_HANDLER_RESULT_HANDLED);
@@ -526,7 +519,7 @@ DBusHandlerResult CAmNodeStateCommunicator::receiveCallbackDelegate(DBusConnecti
if (!dbus_message_iter_append_basic(&replyIter, DBUS_TYPE_INT32, &returnError))
{
- logError("CAmNodeStateCommunicator::receiveCallbackDelegate Cannot allocate DBus message!");
+ logError("CAmNodeStateCommunicatorDBus::receiveCallbackDelegate Cannot allocate DBus message!");
returnMessage = dbus_message_new_error(msg,DBUS_ERROR_NO_MEMORY,"Cannot create reply!");
}
sendMessage(returnMessage,msg);
@@ -536,7 +529,7 @@ DBusHandlerResult CAmNodeStateCommunicator::receiveCallbackDelegate(DBusConnecti
return (DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
}
-void CAmNodeStateCommunicator::sendIntrospection(DBusConnection* conn, DBusMessage* msg)
+void CAmNodeStateCommunicatorDBus::sendIntrospection(DBusConnection* conn, DBusMessage* msg)
{
assert(conn != NULL);
assert(msg != NULL);
@@ -562,13 +555,13 @@ void CAmNodeStateCommunicator::sendIntrospection(DBusConnection* conn, DBusMessa
dbus_message_iter_init_append(reply, &args);
if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &string))
{
- logError( "CAmNodeStateCommunicator::sendIntrospection DBUS handler Out Of Memory!");
+ logError( "CAmNodeStateCommunicatorDBus::sendIntrospection DBUS handler Out Of Memory!");
}
// send the reply && flush the connection
if (!dbus_connection_send(conn, reply, &serial))
{
- logError( "CAmNodeStateCommunicator::sendIntrospection DBUS handler Out Of Memory!");
+ logError( "CAmNodeStateCommunicatorDBus::sendIntrospection DBUS handler Out Of Memory!");
}
dbus_connection_flush(conn);
@@ -576,22 +569,22 @@ void CAmNodeStateCommunicator::sendIntrospection(DBusConnection* conn, DBusMessa
dbus_message_unref(reply);
}
-void CAmNodeStateCommunicator::sendMessage(DBusMessage* message, DBusMessage* origMessage)
+void CAmNodeStateCommunicatorDBus::sendMessage(DBusMessage* message, DBusMessage* origMessage)
{
dbus_uint32_t serial = dbus_message_get_serial(origMessage);
if(!dbus_connection_send(mpDBusConnection, message, &serial))
{
- logError( "CAmNodeStateCommunicator::sendMessage DBUS handler Out Of Memory!");
+ logError( "CAmNodeStateCommunicatorDBus::sendMessage DBUS handler Out Of Memory!");
}
dbus_connection_flush(mpDBusConnection);
dbus_message_unref(message);
}
-DBusHandlerResult CAmNodeStateCommunicator::signalCallback(DBusConnection* conn, DBusMessage* msg, void* user_data)
+DBusHandlerResult CAmNodeStateCommunicatorDBus::signalCallback(DBusConnection* conn, DBusMessage* msg, void* user_data)
{
(void) conn;
- CAmNodeStateCommunicator* instance(static_cast<CAmNodeStateCommunicator*>(user_data));
+ CAmNodeStateCommunicatorDBus* instance(static_cast<CAmNodeStateCommunicatorDBus*>(user_data));
const char* iface = dbus_message_get_interface(msg);
if (iface==NULL)
@@ -607,19 +600,19 @@ DBusHandlerResult CAmNodeStateCommunicator::signalCallback(DBusConnection* conn,
DBusMessageIter iter;
if (!dbus_message_iter_init(msg, &iter))
{
- logError("CAmNodeStateCommunicator::signalCallback NodeState DBus Message has no arguments!");
+ logError("CAmNodeStateCommunicatorDBus::signalCallback NodeState DBus Message has no arguments!");
return (DBUS_HANDLER_RESULT_HANDLED);
}
if (dbus_message_iter_get_arg_type(&iter)!=DBUS_TYPE_INT32)
{
- logError("CAmNodeStateCommunicator::signalCallback NodeState DBus Message has invalid arguments!");
+ logError("CAmNodeStateCommunicatorDBus::signalCallback NodeState DBus Message has invalid arguments!");
return (DBUS_HANDLER_RESULT_HANDLED);
}
dbus_message_iter_get_basic(&iter, &nodeState);
- logInfo("CAmNodeStateCommunicator::signalCallback got signal NodeState, with nodeState",nodeState);
+ logInfo("CAmNodeStateCommunicatorDBus::signalCallback got signal NodeState, with nodeState",nodeState);
assert(instance->mpControlSender);
instance->mpControlSender->hookSystemNodeStateChanged(static_cast<NsmNodeState_e>(nodeState));
@@ -632,19 +625,19 @@ DBusHandlerResult CAmNodeStateCommunicator::signalCallback(DBusConnection* conn,
DBusMessageIter iter;
if (!dbus_message_iter_init(msg, &iter))
{
- logError("CAmNodeStateCommunicator::signalCallback nodeApplicationMode DBus Message has no arguments!");
+ logError("CAmNodeStateCommunicatorDBus::signalCallback nodeApplicationMode DBus Message has no arguments!");
return (DBUS_HANDLER_RESULT_HANDLED);
}
if (dbus_message_iter_get_arg_type(&iter)!=DBUS_TYPE_INT32)
{
- logError("CAmNodeStateCommunicator::signalCallback nodeApplicationMode DBus Message has invalid arguments!");
+ logError("CAmNodeStateCommunicatorDBus::signalCallback nodeApplicationMode DBus Message has invalid arguments!");
return (DBUS_HANDLER_RESULT_HANDLED);
}
dbus_message_iter_get_basic(&iter, &nodeApplicationMode);
- logInfo("CAmNodeStateCommunicator::signalCallback got signal nodeApplicationMode, with applicationMode",nodeApplicationMode);
+ logInfo("CAmNodeStateCommunicatorDBus::signalCallback got signal nodeApplicationMode, with applicationMode",nodeApplicationMode);
assert(instance->mpControlSender);
instance->mpControlSender->hookSystemNodeApplicationModeChanged(static_cast<NsmApplicationMode_e>(nodeApplicationMode));
@@ -659,13 +652,13 @@ DBusHandlerResult CAmNodeStateCommunicator::signalCallback(DBusConnection* conn,
DBusMessageIter iter;
if (!dbus_message_iter_init(msg, &iter))
{
- logError("CAmNodeStateCommunicator::signalCallback nodeApplicationMode DBus Message has no arguments!");
+ logError("CAmNodeStateCommunicatorDBus::signalCallback nodeApplicationMode DBus Message has no arguments!");
return (DBUS_HANDLER_RESULT_HANDLED);
}
if (dbus_message_iter_get_arg_type(&iter)!=DBUS_TYPE_STRING)
{
- logError("CAmNodeStateCommunicator::signalCallback nodeApplicationMode DBus Message has invalid arguments!");
+ logError("CAmNodeStateCommunicatorDBus::signalCallback nodeApplicationMode DBus Message has invalid arguments!");
return (DBUS_HANDLER_RESULT_HANDLED);
}
@@ -676,7 +669,7 @@ DBusHandlerResult CAmNodeStateCommunicator::signalCallback(DBusConnection* conn,
if (dbus_message_iter_get_arg_type(&iter)!=DBUS_TYPE_INT32)
{
- logError("CAmNodeStateCommunicator::signalCallback nodeApplicationMode DBus Message has invalid arguments!");
+ logError("CAmNodeStateCommunicatorDBus::signalCallback nodeApplicationMode DBus Message has invalid arguments!");
return (DBUS_HANDLER_RESULT_HANDLED);
}
@@ -685,14 +678,14 @@ DBusHandlerResult CAmNodeStateCommunicator::signalCallback(DBusConnection* conn,
if (dbus_message_iter_get_arg_type(&iter)!=DBUS_TYPE_INT32)
{
- logError("CAmNodeStateCommunicator::signalCallback nodeApplicationMode DBus Message has invalid arguments!");
+ logError("CAmNodeStateCommunicatorDBus::signalCallback nodeApplicationMode DBus Message has invalid arguments!");
return (DBUS_HANDLER_RESULT_HANDLED);
}
dbus_message_iter_get_basic(&iter, &sessionState);
- logInfo("CAmNodeStateCommunicator::signalCallback got signal sessionStateChanged, with session",sessionName,"seatID=",seatID,"sessionState",sessionState);
+ logInfo("CAmNodeStateCommunicatorDBus::signalCallback got signal sessionStateChanged, with session",sessionName,"seatID=",seatID,"sessionState",sessionState);
assert(instance->mpControlSender);
instance->mpControlSender->hookSystemSessionStateChanged(sessionName,seatID,sessionState);
@@ -708,7 +701,7 @@ DBusHandlerResult CAmNodeStateCommunicator::signalCallback(DBusConnection* conn,
return (DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
}
-am_Error_e CAmNodeStateCommunicator::readIntegerProperty(const std::string property, int32_t& value)
+am_Error_e CAmNodeStateCommunicatorDBus::readIntegerProperty(const std::string property, int32_t& value)
{
DBusError error;
dbus_error_init(&error);
@@ -718,7 +711,7 @@ am_Error_e CAmNodeStateCommunicator::readIntegerProperty(const std::string prope
if (!message)
{
- logError("CAmNodeStateCommunicator::readIntegerProperty dbus error:", error.message);
+ logError("CAmNodeStateCommunicatorDBus::readIntegerProperty dbus error:", error.message);
dbus_message_unref(message);
return (E_UNKNOWN);
}
@@ -729,14 +722,14 @@ am_Error_e CAmNodeStateCommunicator::readIntegerProperty(const std::string prope
const char *propertyChar=property.c_str();
if (!dbus_message_iter_append_basic(&iter, DBUS_TYPE_STRING, &interface))
{
- logError("CAmNodeStateCommunicator::readIntegerProperty append error");
+ logError("CAmNodeStateCommunicatorDBus::readIntegerProperty append error");
dbus_message_unref(message);
return (E_UNKNOWN);
}
if (!dbus_message_iter_append_basic(&iter, DBUS_TYPE_STRING, &propertyChar))
{
- logError("CAmNodeStateCommunicator::readIntegerProperty append error");
+ logError("CAmNodeStateCommunicatorDBus::readIntegerProperty append error");
dbus_message_unref(message);
return (E_UNKNOWN);
}
@@ -744,21 +737,21 @@ am_Error_e CAmNodeStateCommunicator::readIntegerProperty(const std::string prope
DBusMessage* reply(dbus_connection_send_with_reply_and_block(mpDBusConnection, message, -1, &error));
if (!reply)
{
- logError("CAmNodeStateCommunicator::readIntegerProperty failed, dbus error", error.message);
+ logError("CAmNodeStateCommunicatorDBus::readIntegerProperty failed, dbus error", error.message);
dbus_message_unref(message);
return (E_UNKNOWN);
}
if(!dbus_message_iter_init(reply,&iterVariant))
{
- logError("CAmNodeStateCommunicator::readIntegerProperty failed, dbus error", error.message);
+ logError("CAmNodeStateCommunicatorDBus::readIntegerProperty failed, dbus error", error.message);
dbus_message_unref(message);
dbus_message_unref(reply);
return (E_UNKNOWN);
}
if (dbus_message_iter_get_arg_type (&iterVariant)!= DBUS_TYPE_VARIANT)
{
- logError("CAmNodeStateCommunicator::readIntegerProperty failed, dbus return type wrong");
+ logError("CAmNodeStateCommunicatorDBus::readIntegerProperty failed, dbus return type wrong");
dbus_message_unref(reply);
dbus_message_unref(message);
return (E_UNKNOWN);
@@ -767,7 +760,7 @@ am_Error_e CAmNodeStateCommunicator::readIntegerProperty(const std::string prope
dbus_message_iter_recurse (&iterVariant, &subiter);
if (dbus_message_iter_get_arg_type (&subiter)!= DBUS_TYPE_INT32)
{
- logError("CAmNodeStateCommunicator::readIntegerProperty failed, dbus return type wrong");
+ logError("CAmNodeStateCommunicatorDBus::readIntegerProperty failed, dbus return type wrong");
dbus_message_unref(reply);
dbus_message_unref(message);
return (E_UNKNOWN);
diff --git a/AudioManagerDaemon/src/CAmRoutingReceiver.cpp b/AudioManagerDaemon/src/CAmRoutingReceiver.cpp
index 116ee1a..a6c769f 100644
--- a/AudioManagerDaemon/src/CAmRoutingReceiver.cpp
+++ b/AudioManagerDaemon/src/CAmRoutingReceiver.cpp
@@ -328,12 +328,14 @@ am_Error_e CAmRoutingReceiver::peekSourceClassID(const std::string& name, am_sou
return (mpDatabaseHandler->peekSourceClassID(name, sourceClassID));
}
+#ifdef WITH_DBUS_WRAPPER
am_Error_e CAmRoutingReceiver::getDBusConnectionWrapper(CAmDbusWrapper *& dbusConnectionWrapper) const
{
-#ifdef WITH_DBUS_WRAPPER
dbusConnectionWrapper = mpDBusWrapper;
return (E_OK);
#else
+am_Error_e CAmRoutingReceiver::getDBusConnectionWrapper(CAmDbusWrapper *& ) const
+{
return (E_UNKNOWN);
#endif
}
diff --git a/AudioManagerDaemon/src/main.cpp b/AudioManagerDaemon/src/main.cpp
index 9bcc57c..c6d212e 100755
--- a/AudioManagerDaemon/src/main.cpp
+++ b/AudioManagerDaemon/src/main.cpp
@@ -32,11 +32,21 @@
#ifdef WITH_TELNET
#include "CAmTelnetServer.h"
#endif
-#ifdef WITH_DBUS_WRAPPER
- #include "shared/CAmDbusWrapper.h"
+
+#ifdef WITH_CAPI_WRAPPER
+ #include "shared/CAmCommonAPIWrapper.h"
+#else
+ #ifdef WITH_DBUS_WRAPPER
+ #include "shared/CAmDbusWrapper.h"
+ #endif
#endif
+
#ifdef WITH_NSM
- #include "CAmNodeStateCommunicator.h"
+ #ifdef WITH_DBUS_WRAPPER
+ #include "CAmNodeStateCommunicatorDBus.h"
+ #else
+ #include "CAmNodeStateCommunicatorCAPI.h"
+ #endif
#endif
#ifdef WITH_DATABASE_STORAGE
@@ -72,6 +82,7 @@
#include "shared/CAmDltWrapper.h"
#include "shared/CAmSocketHandler.h"
+
using namespace am;
DLT_DECLARE_CONTEXT(AudioManager)
@@ -309,10 +320,19 @@ void mainProgram()
//Instantiate all classes. Keep in same order !
CAmSocketHandler iSocketHandler;
+#ifdef WITH_CAPI_WRAPPER
+ //We instantiate a singleton with the current socket handler, which loads the common-api runtime.
+ CAmCommonAPIWrapper *pCAPIWrapper = CAmCommonAPIWrapper::instantiateOnce(&iSocketHandler);
+ CAmCommonAPIWrapper iDBusWrapper = *pCAPIWrapper;
+#ifdef WITH_NSM
+ CAmNodeStateCommunicatorCAPI iNodeStateCommunicator(&iDBusWrapper);
+#endif /*WITH_NSM*/
+#endif /*WITH_CAPI_WRAPPER */
+
#ifdef WITH_DBUS_WRAPPER
CAmDbusWrapper iDBusWrapper(&iSocketHandler,dbusWrapperType);
#ifdef WITH_NSM
- CAmNodeStateCommunicator iNodeStateCommunicator(&iDBusWrapper);
+ CAmNodeStateCommunicatorDBus iNodeStateCommunicator(&iDBusWrapper);
#endif /*WITH_NSM*/
#endif /*WITH_DBUS_WRAPPER */
@@ -335,18 +355,17 @@ void mainProgram()
#ifdef WITH_DBUS_WRAPPER
CAmCommandReceiver iCommandReceiver(pDatabaseHandler, &iControlSender, &iSocketHandler, &iDBusWrapper);
CAmRoutingReceiver iRoutingReceiver(pDatabaseHandler, &iRoutingSender, &iControlSender, &iSocketHandler, &iDBusWrapper);
-#ifdef WITH_NSM
- CAmControlReceiver iControlReceiver(pDatabaseHandler,&iRoutingSender,&iCommandSender,&iSocketHandler, &iRouter, &iNodeStateCommunicator);
- iNodeStateCommunicator.registerControlSender(&iControlSender);
-#else /*WITH_NSM*/
- CAmControlReceiver iControlReceiver(pDatabaseHandler,&iRoutingSender,&iCommandSender,&iSocketHandler, &iRouter);
-#endif /*WITH_NSM*/
#else /*WITH_DBUS_WRAPPER*/
- CAmCommandReceiver iCommandReceiver(pDatabaseHandler,&iControlSender,&iSocketHandler);
- CAmRoutingReceiver iRoutingReceiver(pDatabaseHandler,&iRoutingSender,&iControlSender,&iSocketHandler);
- CAmControlReceiver iControlReceiver(pDatabaseHandler,&iRoutingSender,&iCommandSender,&iSocketHandler, &iRouter);
+ CAmCommandReceiver iCommandReceiver(pDatabaseHandler,&iControlSender,&iSocketHandler);
+ CAmRoutingReceiver iRoutingReceiver(pDatabaseHandler,&iRoutingSender,&iControlSender,&iSocketHandler);
#endif /*WITH_DBUS_WRAPPER*/
+#ifdef WITH_NSM
+ CAmControlReceiver iControlReceiver(pDatabaseHandler,&iRoutingSender,&iCommandSender,&iSocketHandler, &iRouter, &iNodeStateCommunicator);
+ iNodeStateCommunicator.registerControlSender(&iControlSender);
+#else /*WITH_NSM*/
+ CAmControlReceiver iControlReceiver(pDatabaseHandler,&iRoutingSender,&iCommandSender,&iSocketHandler, &iRouter);
+#endif /*WITH_NSM*/
#ifdef WITH_TELNET
CAmTelnetServer iTelnetServer(&iSocketHandler, &iCommandSender, &iCommandReceiver, &iRoutingSender, &iRoutingReceiver, &iControlSender, &iControlReceiver, pDatabaseHandler, &iRouter, telnetport, maxConnections);
diff --git a/AudioManagerDaemon/test/AmControlInterfaceTest/CMakeLists.txt b/AudioManagerDaemon/test/AmControlInterfaceTest/CMakeLists.txt
index 86f0da2..80bfa90 100644
--- a/AudioManagerDaemon/test/AmControlInterfaceTest/CMakeLists.txt
+++ b/AudioManagerDaemon/test/AmControlInterfaceTest/CMakeLists.txt
@@ -62,7 +62,7 @@ file(GLOB CONTROL_INTERFACE_SRCS_CXX
IF(WITH_NSM)
SET (CONTROL_INTERFACE_SRCS_CXX
${CONTROL_INTERFACE_SRCS_CXX}
- "../../src/CAmNodeStateCommunicator.cpp")
+ "../../src/CAmNodeStateCommunicatorDBus.cpp")
ENDIF(WITH_NSM)
ADD_EXECUTABLE(AmControlInterfaceTest ${CONTROL_INTERFACE_SRCS_CXX})
diff --git a/AudioManagerDaemon/test/AmDatabaseHandlerTest/CMakeLists.txt b/AudioManagerDaemon/test/AmDatabaseHandlerTest/CMakeLists.txt
index 7899588..032cdbb 100644
--- a/AudioManagerDaemon/test/AmDatabaseHandlerTest/CMakeLists.txt
+++ b/AudioManagerDaemon/test/AmDatabaseHandlerTest/CMakeLists.txt
@@ -63,7 +63,7 @@ file(GLOB DATABASE_SRCS_CXX
IF(WITH_NSM)
SET (DATABASE_SRCS_CXX
${DATABASE_SRCS_CXX}
- "../../src/CAmNodeStateCommunicator.cpp")
+ "../../src/CAmNodeStateCommunicatorDBus.cpp")
ENDIF(WITH_NSM)
ADD_EXECUTABLE( AmDatabaseHandlerTest ${DATABASE_SRCS_CXX})
diff --git a/AudioManagerDaemon/test/AmMapHandlerTest/CMakeLists.txt b/AudioManagerDaemon/test/AmMapHandlerTest/CMakeLists.txt
index 0e081ae..493de6a 100644
--- a/AudioManagerDaemon/test/AmMapHandlerTest/CMakeLists.txt
+++ b/AudioManagerDaemon/test/AmMapHandlerTest/CMakeLists.txt
@@ -63,7 +63,7 @@ file(GLOB DATABASE_SRCS_CXX
IF(WITH_NSM)
SET (DATABASE_SRCS_CXX
${DATABASE_SRCS_CXX}
- "../../src/CAmNodeStateCommunicator.cpp")
+ "../../src/CAmNodeStateCommunicatorDBus.cpp")
ENDIF(WITH_NSM)
ADD_EXECUTABLE( AmMapHandlerTest ${DATABASE_SRCS_CXX})
diff --git a/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/CAmNodeStateCommunicatorTest.cpp b/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/CAmNodeStateCommunicatorTest.cpp
new file mode 100644
index 0000000..0833dde
--- /dev/null
+++ b/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/CAmNodeStateCommunicatorTest.cpp
@@ -0,0 +1,262 @@
+/**
+ * Copyright (C) 2012, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+* \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \file CAmNodeStateCommunicatorTest.cpp
+ * For further information see http://www.genivi.org/.
+ *
+ */
+
+#include "CAmNodeStateCommunicatorTest.h"
+#include "shared/CAmDltWrapper.h"
+#include "shared/CAmSocketHandler.h"
+
+#include <unistd.h>
+
+using namespace testing;
+using namespace am;
+
+static CAmEnvironment* env;
+
+
+CAmNodeStateCommunicatorTest::CAmNodeStateCommunicatorTest()
+{
+ std::cout<<"Exec path : " << EXECUTABLE_OUTPUT_PATH <<std::endl;
+}
+
+CAmNodeStateCommunicatorTest::~CAmNodeStateCommunicatorTest()
+{
+ // TODO Auto-generated destructor stub
+}
+
+/**This is the thread for the nsm python fake
+ *
+ * @param
+ */
+void* nsmThread (void*)
+{
+ system("python nsm.py");
+ return (NULL);
+}
+
+/**this is the thread the mainloop runs in
+ *
+ * @param importHandler
+ */
+void* mainLoop(void* importHandler)
+{
+ CAmSocketHandler* handler=static_cast<CAmSocketHandler*>(importHandler);
+ handler->start_listenting();
+ return (NULL);
+}
+
+
+TEST_F(CAmNodeStateCommunicatorTest, nsmChangeNodeState)
+{
+ assert(true == env->pControlInterfaceBackdoor.replaceController(&env->pControlSender,&pMockControlInterface));
+ NsmNodeState_e newstate(NsmNodeState_BaseRunning) ;
+ EXPECT_CALL(pMockControlInterface,hookSystemNodeStateChanged(newstate));
+ std::ostringstream send;
+ send<<"python send2nsm.py nodeState "<<static_cast<std::int32_t>(newstate);
+ system(send.str().c_str());
+}
+
+TEST_F(CAmNodeStateCommunicatorTest, nsmChangeApplicationMode)
+{
+ env->pControlInterfaceBackdoor.replaceController(&env->pControlSender,&pMockControlInterface);
+ NsmApplicationMode_e appmode(NsmApplicationMode_Swl) ;
+ EXPECT_CALL(pMockControlInterface,hookSystemNodeApplicationModeChanged(appmode));
+ std::ostringstream send;
+ send<<"python send2nsm.py appMode "<<static_cast<std::int32_t>(appmode);
+ system(send.str().c_str());
+}
+
+TEST_F(CAmNodeStateCommunicatorTest, nsmChangeSessionState)
+{
+ env->pControlInterfaceBackdoor.replaceController(&env->pControlSender,&pMockControlInterface);
+ std::string sessionName("mySession");
+ NsmSeat_e seatID(NsmSeat_CoDriver);
+ NsmSessionState_e sessionState(NsmSessionState_Inactive) ;
+ EXPECT_CALL(pMockControlInterface,hookSystemSessionStateChanged(sessionName,seatID,sessionState));
+ std::ostringstream send;
+ send<<"python send2nsm.py sessionState "<<sessionName<<" "<<static_cast<std::int32_t>(seatID)<<" "<<static_cast<int32_t>(sessionState);
+ system(send.str().c_str());
+}
+
+TEST_F(CAmNodeStateCommunicatorTest, getRestartReason)
+{
+ env->pControlInterfaceBackdoor.replaceController(&env->pControlSender,&pMockControlInterface);
+ NsmRestartReason_e restartReason;
+ ASSERT_EQ(E_OK,env->nsmController.nsmGetRestartReasonProperty(restartReason));
+ ASSERT_EQ(restartReason,1);
+}
+
+TEST_F(CAmNodeStateCommunicatorTest, getShutdownReason)
+{
+ env->pControlInterfaceBackdoor.replaceController(&env->pControlSender,&pMockControlInterface);
+ NsmShutdownReason_e ShutdownReason;
+ ASSERT_EQ(E_OK,env->nsmController.nsmGetShutdownReasonProperty(ShutdownReason));
+ ASSERT_EQ(ShutdownReason,2);
+}
+
+TEST_F(CAmNodeStateCommunicatorTest, getWakeUpReason)
+{
+ env->pControlInterfaceBackdoor.replaceController(&env->pControlSender,&pMockControlInterface);
+ NsmRunningReason_e WakeUpReason;
+ ASSERT_EQ(E_OK,env->nsmController.nsmGetRunningReasonProperty(WakeUpReason));
+ ASSERT_EQ(WakeUpReason,3);
+}
+
+TEST_F(CAmNodeStateCommunicatorTest, getNodeState)
+{
+ env->pControlInterfaceBackdoor.replaceController(&env->pControlSender,&pMockControlInterface);
+ NsmNodeState_e nodeState;
+ ASSERT_EQ(NsmErrorStatus_e::NsmErrorStatus_Ok,env->nsmController.nsmGetNodeState(nodeState));
+ ASSERT_EQ(nodeState,1);
+}
+
+TEST_F(CAmNodeStateCommunicatorTest, getApplicationMode)
+{
+ env->pControlInterfaceBackdoor.replaceController(&env->pControlSender,&pMockControlInterface);
+ NsmApplicationMode_e applicationMode;
+ ASSERT_EQ(NsmErrorStatus_e::NsmErrorStatus_Error,env->nsmController.nsmGetApplicationMode(applicationMode));
+ ASSERT_EQ(applicationMode,5);
+}
+
+TEST_F(CAmNodeStateCommunicatorTest, getSessionState)
+{
+ env->pControlInterfaceBackdoor.replaceController(&env->pControlSender,&pMockControlInterface);
+ std::string sessionName("mySession");
+ NsmSeat_e seatID(NsmSeat_Driver);
+ NsmSessionState_e sessionState;
+ ASSERT_EQ(NsmErrorStatus_e::NsmErrorStatus_Ok,env->nsmController.nsmGetSessionState(sessionName,seatID,sessionState));
+ ASSERT_EQ(sessionState,5);
+}
+
+TEST_F(CAmNodeStateCommunicatorTest, RegisterShutdownClient)
+{
+ env->pControlInterfaceBackdoor.replaceController(&env->pControlSender,&pMockControlInterface);
+ uint32_t shutdownmode(1), timeoutMs(100);
+ ASSERT_EQ(NsmErrorStatus_e::NsmErrorStatus_Ok,env->nsmController.nsmRegisterShutdownClient(shutdownmode,timeoutMs));
+}
+
+TEST_F(CAmNodeStateCommunicatorTest, receiveLifecycleRequest)
+{
+ env->pControlInterfaceBackdoor.replaceController(&env->pControlSender,&pMockControlInterface);
+ uint32_t shutdownmode(1);
+ uint32_t timeoutMs(100);
+ int32_t Request(1);
+ int32_t RequestID(4);
+ EXPECT_CALL(pMockControlInterface,hookSystemLifecycleRequest(_,RequestID)).WillOnce(Return(NsmErrorStatus_e::NsmErrorStatus_Ok));
+ ASSERT_EQ(NsmErrorStatus_e::NsmErrorStatus_Ok,env->nsmController.nsmRegisterShutdownClient(shutdownmode,timeoutMs));
+ std::ostringstream send;
+ send << "python send2nsm.py LifecycleRequest "<<Request<<" "<<RequestID;
+ system(send.str().c_str());
+}
+
+TEST_F(CAmNodeStateCommunicatorTest, UnRegisterShutdownClient)
+{
+ env->pControlInterfaceBackdoor.replaceController(&env->pControlSender,&pMockControlInterface);
+ uint32_t shutdownmode(1),timeoutMs(100);
+ ASSERT_EQ(NsmErrorStatus_e::NsmErrorStatus_Ok,env->nsmController.nsmRegisterShutdownClient(shutdownmode,timeoutMs));
+ ASSERT_EQ(NsmErrorStatus_e::NsmErrorStatus_Ok,env->nsmController.nsmUnRegisterShutdownClient(shutdownmode));
+
+}
+
+TEST_F(CAmNodeStateCommunicatorTest, sendLifecycleRequestComplete)
+{
+ env->pControlInterfaceBackdoor.replaceController(&env->pControlSender,&pMockControlInterface);
+ uint32_t RequestID(22);
+ NsmErrorStatus_e errorStatus(NsmErrorStatus_Internal);
+ ASSERT_EQ(NsmErrorStatus_e::NsmErrorStatus_Ok,env->nsmController.nsmSendLifecycleRequestComplete(RequestID,errorStatus));
+}
+
+TEST_F(CAmNodeStateCommunicatorTest, getInterfaceVersion)
+{
+ env->pControlInterfaceBackdoor.replaceController(&env->pControlSender,&pMockControlInterface);
+ uint32_t version(0);
+ ASSERT_EQ(E_OK,env->nsmController.nsmGetInterfaceVersion(version));
+ ASSERT_EQ(version,static_cast<uint32_t>(23));
+}
+
+void CAmNodeStateCommunicatorTest::SetUp()
+{
+}
+
+void CAmNodeStateCommunicatorTest::TearDown()
+{
+}
+
+int main(int argc, char **argv)
+{
+ CAmDltWrapper::instance()->registerApp("nsm", "nsmtest");
+ logInfo("nsmtest Test started ");
+ ::testing::InitGoogleTest(&argc, argv);
+ ::testing::Environment* const env = ::testing::AddGlobalTestEnvironment(new CAmEnvironment);
+ (void) env;
+ return RUN_ALL_TESTS();
+}
+
+CAmEnvironment::CAmEnvironment() :
+ pControlInterfaceBackdoor(),
+ pControlSender(),
+ iSocketHandler(),
+ wrapper(CAmCommonAPIWrapper::instantiateOnce(&iSocketHandler)),
+ nsmController(wrapper),
+ pNsmThread(0),
+ pMainLoopThread(0)
+{
+ env=this;
+}
+
+CAmEnvironment::~CAmEnvironment()
+{
+}
+
+void CAmEnvironment::waitUntilAvailable(unsigned short seconds = 10)
+{
+ int countTries = 0;
+ printf("\nWaiting for service");
+ while( countTries++<seconds )
+ {
+ printf(".");
+ if(nsmController.isServiceAvailable())
+ break;
+ else
+ sleep(1);
+ }
+ printf("\n");
+}
+
+void CAmEnvironment::SetUp()
+{
+ //create the nsm thread
+ pthread_create(&pNsmThread, NULL, nsmThread, NULL);
+ nsmController.registerControlSender(&pControlSender);
+ //create the mainloop thread
+ pthread_create(&pMainLoopThread, NULL, mainLoop, (void*)&iSocketHandler);
+ printf("[----------] Waiting for interface to be ready....\r\n");
+ waitUntilAvailable(10);
+}
+
+void CAmEnvironment::TearDown()
+{
+ //end the nsm per dbus
+ system("python send2nsm.py finish");
+ pthread_join(pNsmThread, NULL);
+ //end the mainloop
+ iSocketHandler.exit_mainloop();
+ pthread_join(pMainLoopThread, NULL);
+}
diff --git a/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/CAmNodeStateCommunicatorTest.h b/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/CAmNodeStateCommunicatorTest.h
new file mode 100644
index 0000000..c6a9a5a
--- /dev/null
+++ b/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/CAmNodeStateCommunicatorTest.h
@@ -0,0 +1,65 @@
+/**
+ * Copyright (C) 2012, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+* \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \file CAmNodeStateCommunicatorTest.h
+ * For further information see http://www.genivi.org/.
+ *
+ */
+
+
+#ifndef CAMNODESTATECOMMUNICATORTEST_H_
+#define CAMNODESTATECOMMUNICATORTEST_H_
+
+#include "CAmNodeStateCommunicatorCAPI.h"
+#include "CAmControlSender.h"
+#include "gtest/gtest.h"
+#include "gmock/gmock.h"
+#include "../IAmControlBackdoor.h"
+#include "../MockIAmControlSend.h"
+#include "shared/CAmCommonAPIWrapper.h"
+
+using namespace testing;
+using namespace am;
+
+class CAmEnvironment : public ::testing::Environment
+{
+public:
+ IAmControlBackdoor pControlInterfaceBackdoor;
+ CAmControlSender pControlSender;
+ CAmSocketHandler iSocketHandler;
+ CAmCommonAPIWrapper *wrapper;
+ CAmNodeStateCommunicatorCAPI nsmController;
+ pthread_t pNsmThread, pMainLoopThread;
+ CAmEnvironment();
+ ~CAmEnvironment();
+ void SetUp();
+ // Override this to define how to tear down the environment.
+ void TearDown();
+ void waitUntilAvailable(unsigned short seconds);
+};
+
+class CAmNodeStateCommunicatorTest:public ::testing::Test
+{
+public:
+ MockIAmControlSend pMockControlInterface;
+ CAmNodeStateCommunicatorTest();
+ virtual ~CAmNodeStateCommunicatorTest();
+ void SetUp();
+ void TearDown();
+};
+
+
+#endif /* CAMNODESTATECOMMUNICATORTEST_H_ */
diff --git a/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/CMakeLists.txt b/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/CMakeLists.txt
new file mode 100644
index 0000000..4817c24
--- /dev/null
+++ b/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/CMakeLists.txt
@@ -0,0 +1,119 @@
+# Copyright (c) 2012 GENIVI Alliance
+# Copyright (c) 2012 BMW
+#
+# author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+#
+# copyright
+# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+# including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+# subject to the following conditions:
+# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+# THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# For further information see http://www.genivi.org/.
+#
+
+cmake_minimum_required(VERSION 2.6)
+
+PROJECT(AmNodeStateCommunicatorCAPITest)
+
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -DUNIT_TEST=1")
+
+set(STD_INCLUDE_DIRS "/usr/include")
+SET(COMMON_API_SRC_GEN "../../src-gen/")
+set(EXECUTABLE_OUTPUT_PATH ${TEST_EXECUTABLE_OUTPUT_PATH})
+
+FIND_PACKAGE(Threads)
+FIND_PACKAGE(PkgConfig)
+pkg_check_modules(SQLITE REQUIRED sqlite3)
+
+FIND_PACKAGE(CommonAPI REQUIRED)
+FIND_PACKAGE(CommonAPI_DBus REQUIRED)
+
+IF(WITH_DLT)
+ pkg_check_modules(DLT REQUIRED automotive-dlt>=2.2.0)
+ENDIF(WITH_DLT)
+
+INCLUDE_DIRECTORIES(
+ ${STD_INCLUDE_DIRS}
+ ${CMAKE_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${AUDIO_INCLUDE_FOLDER}
+ ${CMAKE_SOURCE_DIR}
+ ${DLT_INCLUDE_DIRS}
+ ${INCLUDE_FOLDER}
+ ${PYTHON_INCLUDE_DIRS}
+ ${GOOGLE_TEST_INCLUDE_DIR}
+ ${GMOCK_INCLUDE_DIR}
+ "../../include"
+ ${COMMON_API_INCLUDE_DIRS}
+ ${COMMON_API_DBUS_INCLUDE_DIRS}
+ ${COMMON_API_GEN_INCLUDE_DIR}
+)
+
+
+file(GLOB NODESTATECOMMUNICATORCAPI
+ "../../src/CAmDatabaseHandler.cpp"
+ "../../src/CAmDatabaseObserver.cpp"
+ "../../src/CAmRoutingSender.cpp"
+ "../../src/CAmRoutingReceiver.cpp"
+ "../../src/CAmCommonAPIWrapper.cpp"
+ "../../src/CAmDltWrapper.cpp"
+ "../../src/CAmSocketHandler.cpp"
+ "../../src/CAmNodeStateCommunicatorCAPI.cpp"
+ "../../src/CAmControlSender.cpp"
+ "../../src/CAmCommandSender.cpp"
+ "../../src/CAmCommandReceiver.cpp"
+ "../CAmCommonFunctions.cpp"
+ "../../src/CAmRouter.cpp"
+ "*.cpp"
+ ${COMMON_API_GEN_SOURCES}
+ )
+
+CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/AudioManagerDaemon/fidls/AudioManager_dbus.conf.in ${CMAKE_BINARY_DIR}/AmNodeStateCommunicatorCAPITest_dbus.conf)
+
+ADD_EXECUTABLE(AmNodeStateCommunicatorCAPITest ${NODESTATECOMMUNICATORCAPI} ${COMMON_API_GEN_SOURCES})
+
+TARGET_LINK_LIBRARIES(AmNodeStateCommunicatorCAPITest
+ ${SQLITE_LIBRARIES}
+ ${DLT_LIBRARIES}
+ ${CMAKE_DL_LIBS}
+ ${CMAKE_THREAD_LIBS_INIT}
+ ${PYTHON_LIBRARY}
+ ${COMMON_API_LIBRARIES}
+ ${COMMON_API_DBUS_LIBRARIES}
+ gtest
+ gmock
+)
+
+ADD_DEPENDENCIES(AmNodeStateCommunicatorCAPITest gtest gmock)
+
+INSTALL(TARGETS AmNodeStateCommunicatorCAPITest
+ DESTINATION "~/AudioManagerTest/"
+ PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ
+ COMPONENT tests
+)
+
+INSTALL(FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/org.genivi.NodeStateManager.Consumer.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/nsm.py
+ ${CMAKE_CURRENT_SOURCE_DIR}/send2nsm.py
+ DESTINATION "~/AudioManagerTest/"
+ PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ
+ COMPONENT tests
+)
+
+IF(USE_BUILD_LIBS)
+ execute_process(
+ COMMAND mkdir -p ${EXECUTABLE_OUTPUT_PATH}
+ COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/org.genivi.NodeStateManager.Consumer.xml" ${EXECUTABLE_OUTPUT_PATH}/org.genivi.NodeStateManager.Consumer.xml
+ COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/nsm.py" ${EXECUTABLE_OUTPUT_PATH}/nsm.py
+ COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/send2nsm.py" ${EXECUTABLE_OUTPUT_PATH}/send2nsm.py
+ COMMAND cp "${CMAKE_BINARY_DIR}/AmNodeStateCommunicatorCAPITest_dbus.conf" ${EXECUTABLE_OUTPUT_PATH})
+ENDIF(USE_BUILD_LIBS)
+
+SET(ADD_DEPEND "audiomanager-bin" "sqlite3(>=3.6.22)" "dlt" "gtest" "libpthread-stubs0")
+set_property(GLOBAL APPEND PROPERTY tests_prop "${ADD_DEPEND}")
+
diff --git a/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/nsm.py b/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/nsm.py
new file mode 100644
index 0000000..74dae54
--- /dev/null
+++ b/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/nsm.py
@@ -0,0 +1,179 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2012, BMW AG
+#
+# This file is part of GENIVI Project AudioManager.
+#
+# Contributions are licensed to the GENIVI Alliance under one or more
+# Contribution License Agreements.
+#
+# \copyright
+# This Source Code Form is subject to the terms of the
+# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+# this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#
+# \author Christian Linke, christian.linke@bmw.de BMW 2012
+#
+# For further information see http://www.genivi.org/.
+#
+
+import sys
+import traceback
+import gobject
+import math
+import dbus
+import dbus.service
+import dbus.mainloop.glib
+
+loop = gobject.MainLoop()
+dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
+
+class NodeStateManager(dbus.service.Object):
+ def __init__(self, loop):
+ busName = dbus.service.BusName('org.genivi.NodeStateManager', bus = dbus.SessionBus())
+ dbus.service.Object.__init__(self, busName, '/org/genivi/NodeStateManager')
+ self.properties = {'RestartReason': 1, 'ShutdownReason': 2, 'WakeUpReason' :3, 'BootMode' :4}
+ self.ABus=""
+ self.APath=""
+ self.loop=loop
+
+ @dbus.service.method(dbus_interface='org.freedesktop.DBus.Introspectable', out_signature = 's')
+ def Introspect(self):
+ f = open('org.genivi.NodeStateManager.Consumer.xml', "r")
+ text = f.read()
+ return text
+
+ @dbus.service.method(dbus_interface='org.genivi.NodeStateManager.Consumer', out_signature = 'ii')
+ def GetNodeState(self):
+ NodeStateId=1
+ ErrorCode=1
+ print('[-----nsm-----] send out nodeState' + str(NodeStateId) + ' ErrorCode '+ str(1))
+ return NodeStateId, ErrorCode
+
+ @dbus.service.method('org.genivi.NodeStateManager.Consumer', out_signature = 'ii')
+ def GetApplicationMode(self):
+ ApplicationModeId=5
+ ErrorCode=2
+ print('[-----nsm-----] send out ApplicationMode' + str(ApplicationModeId) + ' ErrorCode '+ str(2))
+ return ApplicationModeId, ErrorCode
+
+ @dbus.service.method('org.genivi.NodeStateManager.Consumer', in_signature='si', out_signature = 'ii')
+ def GetSessionState(self,SessionName,seatID):
+ SessionState=0
+ ErrorCode=2
+
+ if SessionName=="mySession" and seatID==1:
+ SessionState=5
+ ErrorCode=1
+
+ print('[-----nsm-----] GetSessionState for session ' + SessionName + ' seatID '+ str(seatID) + ' returnState ' + str (SessionState))
+ return SessionState, ErrorCode
+
+ @dbus.service.method('org.genivi.NodeStateManager.Consumer', in_signature='ssuu', out_signature = 'i')
+ def RegisterShutdownClient(self,BName,ObjName,ShutdownMode,TimeoutMs):
+ print('[-----nsm-----] Busname: ' + BName)
+ print('[-----nsm-----] ObjName: ' + ObjName)
+ print('[-----nsm-----] ShutdownMode: ' + str(ShutdownMode))
+ print('[-----nsm-----] TimeoutMs: ' + str(TimeoutMs))
+ ErrorCode=1
+ if TimeoutMs!=100:
+ ErrorCode=3
+ if BName!="org.genivi.audiomanager":
+ ErrorCode=4
+ if ShutdownMode!=1:
+ ErrorCode=5
+ if ObjName!="/org/genivi/audiomanager/LifeCycleConsumer":
+ ErrorCode=6
+ self.ABus=BName
+ self.APath=ObjName
+ return ErrorCode
+
+ @dbus.service.method('org.genivi.NodeStateManager.Consumer', in_signature='ssu', out_signature = 'i')
+ def UnRegisterShutdownClient(self,BusName,ObjName,ShutdownMode):
+ print('[-----nsm-----] Busname: ' + str(BusName))
+ print('[-----nsm-----] ObjName: ' + str(ObjName))
+ print('[-----nsm-----] ShutdownMode: ' + str(ShutdownMode))
+ ErrorCode=1
+ if BusName!=self.ABus:
+ ErrorCode=2
+ if ObjName!=self.APath:
+ ErrorCode=2
+ if ShutdownMode!=1:
+ ErrorCode=2
+ return ErrorCode
+
+ @dbus.service.method(dbus_interface='org.genivi.NodeStateManager.Consumer', out_signature = 'u')
+ def GetInterfaceVersion(self):
+ version=23
+ return version
+
+ @dbus.service.method('org.genivi.NodeStateManager.Consumer', in_signature='ui', out_signature='i')
+ def LifecycleRequestComplete(self,RequestID,Status):
+ print('[-----nsm-----] RequestId: ' + str(RequestID))
+ print('[-----nsm-----] Status: ' + str(Status))
+ ErrorCode=1
+ if RequestID!=22:
+ ErrorCode=2
+ if Status!=4:
+ ErrorCode=2
+ return ErrorCode
+
+ @dbus.service.method(dbus.PROPERTIES_IFACE, in_signature='ss', out_signature='v')
+ def Get(self, interface, prop):
+ if prop in self.properties:
+ print('[-----nsm-----] send out ' + str(self.properties[prop]) + ' for property '+ prop)
+ return self.properties[prop]
+ return 0
+
+ @dbus.service.method(dbus.PROPERTIES_IFACE, in_signature='ssv')
+ def Set(self, interface, prop, value):
+ return 3
+
+ @dbus.service.method(dbus.PROPERTIES_IFACE, in_signature='s', out_signature='a{sv}')
+ def GetAll(self, interface):
+ return self.properties
+
+ @dbus.service.signal(dbus_interface='org.genivi.NodeStateManager.Consumer', signature='i')
+ def NodeApplicationMode(self, ApplicationModeId):
+ print "[-----nsm-----] Send out application mode ID %d" % (ApplicationModeId)
+
+ @dbus.service.signal(dbus_interface='org.genivi.NodeStateManager.Consumer', signature='i')
+ def NodeState(self, NodeState):
+ print "[-----nsm-----] Send out NodeState %d" % (NodeState)
+
+ @dbus.service.signal(dbus_interface='org.genivi.NodeStateManager.Consumer', signature='sii')
+ def SessionStateChanged(self, SessionStateName,SeatID,SessionState):
+ print "[-----nsm-----] Send out SessionStateChanged " + SessionStateName
+
+ @dbus.service.method('org.genivi.NodeStateManager.Control', in_signature='i')
+ def sendNodeApplicationMode(self, input):
+ self.NodeApplicationMode(input)
+ return input
+
+ @dbus.service.method('org.genivi.NodeStateManager.Control', in_signature='i')
+ def sendNodeState(self, input):
+ self.NodeState(input)
+ return input
+
+ @dbus.service.method('org.genivi.NodeStateManager.Control', in_signature='sii')
+ def sendSessionState(self, SessionStateName,SeatID,SessionState):
+ self.SessionStateChanged (SessionStateName,SeatID,SessionState)
+ return SeatID
+
+ @dbus.service.method('org.genivi.NodeStateManager.Control', in_signature='uu', out_signature='i')
+ def sendLifeCycleRequest(self, request, requestID):
+ bus = dbus.SessionBus()
+ remote_object = bus.get_object(self.ABus,self.APath)
+ iface = dbus.Interface(remote_object, 'org.genivi.NodeStateManager.LifeCycleConsumer')
+ iface.LifecycleRequest(request,requestID)
+ return 42
+
+ @dbus.service.method('org.genivi.NodeStateManager.Control')
+ def finish(self):
+ print '[-----nsm-----] Going to exit now!'
+ self.loop.quit()
+ return 0
+
+nsm = NodeStateManager(loop)
+loop.run()
diff --git a/AudioManagerDaemon/test/AmNodeStateCommunicatorTest/org.genivi.NodeStateManager.Consumer.xml b/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/org.genivi.NodeStateManager.Consumer.xml
index bb40a96..bb40a96 100644
--- a/AudioManagerDaemon/test/AmNodeStateCommunicatorTest/org.genivi.NodeStateManager.Consumer.xml
+++ b/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/org.genivi.NodeStateManager.Consumer.xml
diff --git a/AudioManagerDaemon/test/AmNodeStateCommunicatorTest/send2nsm.py b/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/send2nsm.py
index c7e8bf5..c7e8bf5 100644
--- a/AudioManagerDaemon/test/AmNodeStateCommunicatorTest/send2nsm.py
+++ b/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/send2nsm.py
diff --git a/AudioManagerDaemon/test/AmNodeStateCommunicatorTest/CAmNodeStateCommunicatorTest.cpp b/AudioManagerDaemon/test/AmNodeStateCommunicatorDBusTest/CAmNodeStateCommunicatorTest.cpp
index 11debf9..09e5f2b 100644
--- a/AudioManagerDaemon/test/AmNodeStateCommunicatorTest/CAmNodeStateCommunicatorTest.cpp
+++ b/AudioManagerDaemon/test/AmNodeStateCommunicatorDBusTest/CAmNodeStateCommunicatorTest.cpp
@@ -24,13 +24,18 @@
#include "shared/CAmSocketHandler.h"
#include "shared/CAmDbusWrapper.h"
+#include <unistd.h>
+
using namespace testing;
using namespace am;
static CAmEnvironment* env;
+
+
CAmNodeStateCommunicatorTest::CAmNodeStateCommunicatorTest()
{
+
}
CAmNodeStateCommunicatorTest::~CAmNodeStateCommunicatorTest()
@@ -63,7 +68,7 @@ void* mainLoop(void* importHandler)
TEST_F(CAmNodeStateCommunicatorTest, nsmChangeNodeState)
{
- env->pControlInterfaceBackdoor.replaceController(&env->pControlSender,&pMockControlInterface);
+ assert(true == env->pControlInterfaceBackdoor.replaceController(&env->pControlSender,&pMockControlInterface));
NsmNodeState_e newstate(NsmNodeState_BaseRunning) ;
EXPECT_CALL(pMockControlInterface,hookSystemNodeStateChanged(newstate));
std::ostringstream send;
diff --git a/AudioManagerDaemon/test/AmNodeStateCommunicatorTest/CAmNodeStateCommunicatorTest.h b/AudioManagerDaemon/test/AmNodeStateCommunicatorDBusTest/CAmNodeStateCommunicatorTest.h
index bd83e97..d75920b 100644
--- a/AudioManagerDaemon/test/AmNodeStateCommunicatorTest/CAmNodeStateCommunicatorTest.h
+++ b/AudioManagerDaemon/test/AmNodeStateCommunicatorDBusTest/CAmNodeStateCommunicatorTest.h
@@ -21,7 +21,7 @@
#ifndef CAMNODESTATECOMMUNICATORTEST_H_
#define CAMNODESTATECOMMUNICATORTEST_H_
-#include "CAmNodeStateCommunicator.h"
+#include "CAmNodeStateCommunicatorDBus.h"
#include "CAmControlSender.h"
#include "gtest/gtest.h"
#include "gmock/gmock.h"
@@ -38,7 +38,7 @@ public:
CAmControlSender pControlSender;
CAmSocketHandler iSocketHandler;
CAmDbusWrapper wrapper;
- CAmNodeStateCommunicator nsmController;
+ CAmNodeStateCommunicatorDBus nsmController;
pthread_t pNsmThread, pMainLoopThread;
CAmEnvironment();
~CAmEnvironment();
diff --git a/AudioManagerDaemon/test/AmNodeStateCommunicatorTest/CMakeLists.txt b/AudioManagerDaemon/test/AmNodeStateCommunicatorDBusTest/CMakeLists.txt
index 99b2963..4ecd421 100644
--- a/AudioManagerDaemon/test/AmNodeStateCommunicatorTest/CMakeLists.txt
+++ b/AudioManagerDaemon/test/AmNodeStateCommunicatorDBusTest/CMakeLists.txt
@@ -17,7 +17,7 @@
cmake_minimum_required(VERSION 2.6)
-PROJECT(AmNodeStateCommunicatorTest)
+PROJECT(AmNodeStateCommunicatorDBusTest)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -DUNIT_TEST=1")
@@ -59,7 +59,7 @@ file(GLOB NODESTATECOMMUNICATOR
"../../src/CAmDbusWrapper.cpp"
"../../src/CAmDltWrapper.cpp"
"../../src/CAmSocketHandler.cpp"
- "../../src/CAmNodeStateCommunicator.cpp"
+ "../../src/CAmNodeStateCommunicatorDBus.cpp"
"../../src/CAmControlSender.cpp"
"../../src/CAmCommandSender.cpp"
"../../src/CAmCommandReceiver.cpp"
@@ -68,9 +68,9 @@ file(GLOB NODESTATECOMMUNICATOR
"*.cpp"
)
-ADD_EXECUTABLE(AmNodeStateCommunicatorTest ${NODESTATECOMMUNICATOR})
+ADD_EXECUTABLE(AmNodeStateCommunicatorDBusTest ${NODESTATECOMMUNICATOR})
-TARGET_LINK_LIBRARIES(AmNodeStateCommunicatorTest
+TARGET_LINK_LIBRARIES(AmNodeStateCommunicatorDBusTest
${SQLITE_LIBRARIES}
${DLT_LIBRARIES}
${DBUS_LIBRARY}
@@ -81,9 +81,9 @@ TARGET_LINK_LIBRARIES(AmNodeStateCommunicatorTest
gmock
)
-ADD_DEPENDENCIES(AmNodeStateCommunicatorTest gtest gmock)
+ADD_DEPENDENCIES(AmNodeStateCommunicatorDBusTest gtest gmock)
-INSTALL(TARGETS AmNodeStateCommunicatorTest
+INSTALL(TARGETS AmNodeStateCommunicatorDBusTest
DESTINATION "~/AudioManagerTest/"
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ
COMPONENT tests
diff --git a/AudioManagerDaemon/test/AmNodeStateCommunicatorTest/nsm.py b/AudioManagerDaemon/test/AmNodeStateCommunicatorDBusTest/nsm.py
index 7a02d05..7a02d05 100644
--- a/AudioManagerDaemon/test/AmNodeStateCommunicatorTest/nsm.py
+++ b/AudioManagerDaemon/test/AmNodeStateCommunicatorDBusTest/nsm.py
diff --git a/AudioManagerDaemon/test/AmNodeStateCommunicatorDBusTest/org.genivi.NodeStateManager.Consumer.xml b/AudioManagerDaemon/test/AmNodeStateCommunicatorDBusTest/org.genivi.NodeStateManager.Consumer.xml
new file mode 100644
index 0000000..bb40a96
--- /dev/null
+++ b/AudioManagerDaemon/test/AmNodeStateCommunicatorDBusTest/org.genivi.NodeStateManager.Consumer.xml
@@ -0,0 +1,259 @@
+<!-- Auto-Generated interface from Rhapsody: 'Repository::ssw_LifecycleSupport::NodeStateManagement::Concept::Interface::INSM_Consumer' -->
+<!-- Created at 2012-06-01 09:36:05 by uid65904 -->
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+<node>
+<interface name="org.freedesktop.DBus.Introspectable">
+ <method name="Introspect">
+ <arg name="data" direction="out" type="s"/>
+ </method>
+</interface>
+<interface name="org.freedesktop.DBus.Properties">
+ <method name="Get">
+ <arg name="interface" direction="in" type="s"/>
+ <arg name="propname" direction="in" type="s"/>
+ <arg name="value" direction="out" type="v"/>
+ </method>
+
+ <method name="Set">
+ <arg name="interface" direction="in" type="s"/>
+ <arg name="propname" direction="in" type="s"/>
+ <arg name="value" direction="in" type="v"/>
+ </method>
+
+ <method name="GetAll">
+ <arg name="interface" direction="in" type="s"/>
+ <arg name="props" direction="out" type="a{sv}"/>
+ </method>
+</interface>
+ <!--
+ org.genivi.NodeStateManager.Consumer:
+ @short_description: "Consumer" interface of the NodeStateManager.
+
+ This interface contains functions which are not safety critical and can be accessed by "every" client without further restrictions.
+ -->
+ <interface name="org.genivi.NodeStateManager.Consumer">
+ <!--
+ RestartReason: This property informs clients about the reason for the last restart. The values are based upon the enummeration NsmRestartReason_e. Note: The value is only set once at start-up.
+ -->
+ <property name="RestartReason" type="i" access="read"/>
+
+ <!--
+ ShutdownReason: This property informs clients about the reason for the last shutdown. The values are based upon the enummeration NsmShutdownReason_e. Note: The value is only set once at start-up.
+ -->
+ <property name="ShutdownReason" type="i" access="read"/>
+
+ <!--
+ WakeUpReason: This property informs clients about the recent reason for waking up the target. The values are based upon the enummeration NsmWakeUpReason_e. Note: The value is only set once at start-up.
+ -->
+ <property name="WakeUpReason" type="i" access="read"/>
+
+ <!--
+ BootMode: This property informs clients about the recent BootMode of the target. The values will be defined by a third party header, which has not been delivered yet. The description needs to be updated as soon as the header is available.
+ -->
+ <property name="BootMode" type="i" access="read"/>
+
+ <!--
+ NodeState:
+ @NodeState: Numeric value for the current NodeState, defined in NsmNodeState_e.
+
+ Clients can register for notifications when the NodeState is updated inside the NodeStateManager. This signal is sent to registered clients and will include the current NodeState as a parameter.
+ -->
+ <signal name="NodeState">
+ <arg name="NodeState" type="i"/>
+ </signal>
+
+ <!--
+ NodeApplicationMode:
+ @ApplicationModeId: Numeric value for the current ApplicationMode, defined in NsmAplicationMode_e.
+
+ Clients can register for notifications when the NodeApplicationMode is updated inside the NodeStateManager. This signal is sent to registered clients and will include the current NodeApplicationMode as a parameter.
+ -->
+ <signal name="NodeApplicationMode">
+ <arg name="ApplicationModeId" type="i"/>
+ </signal>
+
+ <!--
+ SessionStateChanged:
+ @SessionStateName: The SessionName will be based upon either the pre-defined platform SessionNames or using a newly added product defined session name.
+ @SeatID: This parameter will be based upon the enum NsmSeat_e.
+ @SessionState: This parameter will be based upon the NsmSessionState_e but it will not be bounded by the values in that enumeration. The listed values are the default values that are mandatory for platform sessions, but product sessions may have additional session states.
+
+ This signal is sent to registered clients when a particular session is state is changed. The client can register for notification about a specific session through the use of the SessionName, as a "match rule".
+ -->
+ <signal name="SessionStateChanged">
+ <arg name="SessionStateName" type="s"/>
+ <arg name="SeatID" type="i"/>
+ <arg name="SessionState" type="i"/>
+ </signal>
+
+ <!--
+ GetNodeState:
+ @NodeStateId: Will be based on the NsmNodeState_e.
+ @ErrorCode: Return value passed to the caller, based upon NsmErrorStatus_e.
+
+ The method is used by other applications to get the NodeState without the need of registration to the signal.
+ -->
+ <method name="GetNodeState">
+ <arg name="NodeStateId" direction="out" type="i"/>
+ <arg name="ErrorCode" direction="out" type="i"/>
+ </method>
+
+ <!--
+ SetSessionState:
+ @SessionName: The SessionName will be based upon either the pre-defined platform SessionNames (see NSM content page) or using a newly added product defined session name.
+ @SessionOwner: This parameter defines the name of the application that is setting the state of the session. This must be the applications systemd unit filename.
+ @SeatID: This parameter will be based upon the enum NsmSeat_e
+ @SessionState: This parameter will be based upon the NsmSessionState_e but it will not be bounded by the values in that enumeration. The listed values are the default values that are mandatory for platform sessions, but product sessions may have additional SessionStates.
+ @ErrorCode: Return value passed to the caller, based upon NsmErrorStatus_e.
+
+ The method is used by applications to set the state of a session.
+ -->
+ <method name="SetSessionState">
+ <arg name="SessionName" direction="in" type="s"/>
+ <arg name="SessionOwner" direction="in" type="s"/>
+ <arg name="SeatID" direction="in" type="i"/>
+ <arg name="SessionState" direction="in" type="i"/>
+ <arg name="ErrorCode" direction="out" type="i"/>
+ </method>
+
+ <!--
+ GetSessionState:
+ @SessionName: The SessionName will be based upon either the pre-defined platform session names (see NSM content page) or using a newly added product defined SessionName.
+ @SeatID: This parameter will be based upon the enum NsmSeat_e.
+ @SessionState: This parameter will be based upon the NsmSessionState_e but it will not be bounded by the values in that enumeration. The listed values are the default values that are mandatory for platform sessions, but product sessions may have additional SessionStates.
+ @ErrorCode: Return value passed to the caller, based upon NsmErrorStatus_e.
+
+ The method is used by applications to get the state of a session.
+ -->
+ <method name="GetSessionState">
+ <arg name="SessionName" direction="in" type="s"/>
+ <arg name="SeatID" direction="in" type="i"/>
+ <arg name="SessionState" direction="out" type="i"/>
+ <arg name="ErrorCode" direction="out" type="i"/>
+ </method>
+
+ <!--
+ GetApplicationMode:
+ @ApplicationModeId: This parameter will be based upon the NsmNodeApplicationMode_e.
+ @ErrorCode: Return value passed to the caller, based upon NsmErrorStatus_e.
+
+ The method is used by other applications to get the application mode.
+ -->
+ <method name="GetApplicationMode">
+ <arg name="ApplicationModeId" direction="out" type="i"/>
+ <arg name="ErrorCode" direction="out" type="i"/>
+ </method>
+
+ <!--
+ RegisterShutdownClient:
+ @BusName: Bus name of remote application.
+ @ObjName: Object name of remote object that provides the shutdown interface.
+ @ShutdownMode: Shutdown mode for which client wants to be informed (i.e normal, fast etc).
+ @TimeoutMs: Max. Timeout to wait for response from shutdown client in ms.
+ @ErrorCode: Return value passed to the caller, based upon NsmErrorStatus_e.
+
+ The method is used by other applications to register themselves as shutdown client. Any client that registers must provide a method in their D-Bus object called "LifecycleRequest". This method will take one parameter which is the RequestType (NSM_SHUTDOWNTYPE_NORMAL, NSM_SHUTDOWNTYPE_FAST). For an example of the required client interface please see the BootManager component who will be a client of the NSM.
+ -->
+ <method name="RegisterShutdownClient">
+ <arg name="BusName" direction="in" type="s"/>
+ <arg name="ObjName" direction="in" type="s"/>
+ <arg name="ShutdownMode" direction="in" type="u"/>
+ <arg name="TimeoutMs" direction="in" type="u"/>
+ <arg name="ErrorCode" direction="out" type="i"/>
+ </method>
+
+ <!--
+ UnRegisterShutdownClient:
+ @BusName: Bus name of remote application.
+ @ObjName: Object name of remote object that provides the shutdown interface.
+ @ShutdownMode: Shutdown mode for which client wants to unregister (NSM_SHUTDOWNTYPE_NORMAL, NSM_SHUTDOWNTYPE_FAST).
+ @ErrorCode: Return value passed to the caller, based upon NsmErrorStatus_e.
+
+ The method is used by other applications to unregister themselves as shutdown client.
+ -->
+ <method name="UnRegisterShutdownClient">
+ <arg name="BusName" direction="in" type="s"/>
+ <arg name="ObjName" direction="in" type="s"/>
+ <arg name="ShutdownMode" direction="in" type="u"/>
+ <arg name="ErrorCode" direction="out" type="i"/>
+ </method>
+
+ <!--
+ RegisterSession:
+ @SessionName: The SessionName will be based upon either the pre-defined platform session names (see NSM content page) or using a newly added product defined SessionName.
+ @SessionOwner: This is the name of the application that is registering the new session (this must be the applications systemd unit filename).
+ @SeatID: This parameter will be based upon the enum NsmSeatId_e
+ @SessionState: This parameter will be based upon the NsmSessionState_e but it will not be bounded by the values in that enumeration. The listed values are the default values that are mandatory for platform sessions, but product sessions may have additional session states.
+ @ErrorCode: Return value passed to the caller, based upon NsmErrorStatus_e.
+
+ The method is used by other applications to register a new session whose state should be observed and distributed by the NSM.
+ -->
+ <method name="RegisterSession">
+ <arg name="SessionName" direction="in" type="s"/>
+ <arg name="SessionOwner" direction="in" type="s"/>
+ <arg name="SeatID" direction="in" type="i"/>
+ <arg name="SessionState" direction="in" type="i"/>
+ <arg name="ErrorCode" direction="out" type="i"/>
+ </method>
+
+ <!--
+ UnRegisterSession:
+ @SessionName: The SessionName will be based upon either the pre-defined platform session names (see NSM content page) or using a newly added product defined SessionName.
+ @SessionOwner: This is the name of the application that originally registered the session. It will be validated that this value matches the stored value from the registration.
+ @SeatID: This parameter will be based upon the enum NsmSeat_e.
+ @ErrorCode: Return value passed to the caller, based upon NsmErrorStatus_e.
+
+ The method is used by other applications to remove a new session from the session list hosted by NSM.
+ -->
+ <method name="UnRegisterSession">
+ <arg name="SessionName" direction="in" type="s"/>
+ <arg name="SessionOwner" direction="in" type="s"/>
+ <arg name="SeatID" direction="in" type="i"/>
+ <arg name="ErrorCode" direction="out" type="i"/>
+ </method>
+
+ <!--
+ GetAppHealthCount:
+ @Count: Return value passed to the caller. Number of applications that crashed or terminated accidentally.
+
+ The method returns the number of applications that crashed or terminated accidentally, within the current life cycle. It can be used to observe the system state.
+ -->
+ <method name="GetAppHealthCount">
+ <arg name="Count" direction="out" type="u"/>
+ </method>
+
+ <!--
+ GetInterfaceVersion:
+ @Version: Unsigned integer that represents the version number of the Node State Manager.
+
+ The method returns the version number of the Node State Manager. The number is organized in four bytes:
+
+ Version: VVV.RRR.PPP.BBB
+
+ <literallayout>
+ VVV => Version [1..255]
+ RRR => Release [0..255]
+ PPP => Patch [0..255]
+ BBB => Build [0..255]
+ </literallayout>
+ -->
+ <method name="GetInterfaceVersion">
+ <arg name="Version" direction="out" type="u"/>
+ </method>
+
+ <!--
+ LifecycleRequestComplete:
+ @RequestId: The request Id of the called life cycle client. The value has been passed when "LifecycleRequest" was called.
+ @Status: The result of the call to "LifecycleRequest". NsmErrorStatus_Ok: Request successfully processed. NsmErrorStatus_Error: An error occured while processing the "LifecycleRequest".
+ @ErrorCode: Return value passed to the caller, based upon NsmErrorStatus_e.
+
+ The function has to be called by a "asynchrounous" lifecycle client, when he processed the "LifecycleRequest".
+ -->
+ <method name="LifecycleRequestComplete">
+ <arg name="RequestId" direction="in" type="u"/>
+ <arg name="Status" direction="in" type="i"/>
+ <arg name="ErrorCode" direction="out" type="i"/>
+ </method>
+ </interface>
+</node>
diff --git a/AudioManagerDaemon/test/AmNodeStateCommunicatorDBusTest/send2nsm.py b/AudioManagerDaemon/test/AmNodeStateCommunicatorDBusTest/send2nsm.py
new file mode 100644
index 0000000..c7e8bf5
--- /dev/null
+++ b/AudioManagerDaemon/test/AmNodeStateCommunicatorDBusTest/send2nsm.py
@@ -0,0 +1,68 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2012, BMW AG
+#
+# This file is part of GENIVI Project AudioManager.
+#
+# Contributions are licensed to the GENIVI Alliance under one or more
+# Contribution License Agreements.
+#
+# \copyright
+# This Source Code Form is subject to the terms of the
+# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+# this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#
+# \author Christian Linke, christian.linke@bmw.de BMW 2012
+#
+# For further information see http://www.genivi.org/.
+#
+
+import sys
+import traceback
+import gobject
+import math
+import dbus
+import dbus.service
+
+def nodeState (nodeState):
+ bus = dbus.SessionBus()
+ remote_object = bus.get_object('org.genivi.NodeStateManager','/org/genivi/NodeStateManager')
+ iface = dbus.Interface(remote_object, 'org.genivi.NodeStateManager.Control')
+ iface.sendNodeState(int(nodeState))
+
+def appMode (appMode):
+ bus = dbus.SessionBus()
+ remote_object = bus.get_object('org.genivi.NodeStateManager','/org/genivi/NodeStateManager')
+ iface = dbus.Interface(remote_object, 'org.genivi.NodeStateManager.Control')
+ iface.sendNodeApplicationMode(int(appMode))
+
+def sessionState (SessionStateName,SeatID,SessionState):
+ bus = dbus.SessionBus()
+ remote_object = bus.get_object('org.genivi.NodeStateManager','/org/genivi/NodeStateManager')
+ iface = dbus.Interface(remote_object, 'org.genivi.NodeStateManager.Control')
+ iface.sendSessionState(SessionStateName,int(SeatID),int(SessionState))
+
+def finish():
+ bus = dbus.SessionBus()
+ remote_object = bus.get_object('org.genivi.NodeStateManager','/org/genivi/NodeStateManager')
+ iface = dbus.Interface(remote_object, 'org.genivi.NodeStateManager.Control')
+ iface.finish()
+
+def LifecycleRequest(Request,RequestID):
+ bus = dbus.SessionBus()
+ remote_object = bus.get_object('org.genivi.NodeStateManager','/org/genivi/NodeStateManager')
+ iface = dbus.Interface(remote_object, 'org.genivi.NodeStateManager.Control')
+ iface.sendLifeCycleRequest(dbus.UInt32(Request),dbus.UInt32(RequestID))
+
+command=sys.argv[1]
+if command=="nodeState":
+ nodeState(sys.argv[2])
+if command=="finish":
+ finish()
+if command=="appMode":
+ appMode(sys.argv[2])
+if command=="sessionState":
+ sessionState(sys.argv[2],sys.argv[3],sys.argv[4])
+if command=="LifecycleRequest":
+ LifecycleRequest(sys.argv[2],sys.argv[3])
diff --git a/AudioManagerDaemon/test/AmRouterMapTest/CMakeLists.txt b/AudioManagerDaemon/test/AmRouterMapTest/CMakeLists.txt
index d587f0c..2b16eda 100644
--- a/AudioManagerDaemon/test/AmRouterMapTest/CMakeLists.txt
+++ b/AudioManagerDaemon/test/AmRouterMapTest/CMakeLists.txt
@@ -60,9 +60,9 @@ file(GLOB ROUTINGMAP_SRCS_CXX
)
IF(WITH_NSM)
- SET (ROUTINGMAP_SRCS_CXX
- ${ROUTINGMAP_SRCS_CXX}
- "../../src/CAmNodeStateCommunicator.cpp")
+ SET (DATABASE_SRCS_CXX
+ ${DATABASE_SRCS_CXX}
+ "../../src/CAmNodeStateCommunicatorDBus.cpp")
ENDIF(WITH_NSM)
ADD_EXECUTABLE( AmRouterMapTest ${ROUTINGMAP_SRCS_CXX})
diff --git a/AudioManagerDaemon/test/AmRouterTest/CMakeLists.txt b/AudioManagerDaemon/test/AmRouterTest/CMakeLists.txt
index 6f556ff..602767b 100644
--- a/AudioManagerDaemon/test/AmRouterTest/CMakeLists.txt
+++ b/AudioManagerDaemon/test/AmRouterTest/CMakeLists.txt
@@ -61,9 +61,9 @@ file(GLOB ROUTING_SRCS_CXX
)
IF(WITH_NSM)
- SET (ROUTING_SRCS_CXX
- ${ROUTING_SRCS_CXX}
- "../../src/CAmNodeStateCommunicator.cpp")
+ SET (DATABASE_SRCS_CXX
+ ${DATABASE_SRCS_CXX}
+ "../../src/CAmNodeStateCommunicatorDBus.cpp")
ENDIF(WITH_NSM)
ADD_EXECUTABLE( AmRouterTest ${ROUTING_SRCS_CXX})
diff --git a/AudioManagerDaemon/test/AmRoutingInterfaceTest/CMakeLists.txt b/AudioManagerDaemon/test/AmRoutingInterfaceTest/CMakeLists.txt
index a73cec0..122ea69 100644
--- a/AudioManagerDaemon/test/AmRoutingInterfaceTest/CMakeLists.txt
+++ b/AudioManagerDaemon/test/AmRoutingInterfaceTest/CMakeLists.txt
@@ -62,9 +62,9 @@ file(GLOB ROUTING_INTERFACE_SRCS_CXX
)
IF(WITH_NSM)
- SET (ROUTING_INTERFACE_SRCS_CXX
- ${ROUTING_INTERFACE_SRCS_CXX}
- "../../src/CAmNodeStateCommunicator.cpp")
+ SET (DATABASE_SRCS_CXX
+ ${DATABASE_SRCS_CXX}
+ "../../src/CAmNodeStateCommunicatorDBus.cpp")
ENDIF(WITH_NSM)
ADD_EXECUTABLE(AmRoutingInterfaceTest ${ROUTING_INTERFACE_SRCS_CXX})
diff --git a/AudioManagerDaemon/test/AmTelnetServerTest/CMakeLists.txt b/AudioManagerDaemon/test/AmTelnetServerTest/CMakeLists.txt
index 6c20e4e..26c83d9 100644
--- a/AudioManagerDaemon/test/AmTelnetServerTest/CMakeLists.txt
+++ b/AudioManagerDaemon/test/AmTelnetServerTest/CMakeLists.txt
@@ -69,9 +69,9 @@ file(GLOB TELNET_SRCS_CXX
)
IF(WITH_NSM)
- SET (TELNET_SRCS_CXX
- ${TELNET_SRCS_CXX}
- "../../src/CAmNodeStateCommunicator.cpp")
+ SET (DATABASE_SRCS_CXX
+ ${DATABASE_SRCS_CXX}
+ "../../src/CAmNodeStateCommunicatorDBus.cpp")
ENDIF(WITH_NSM)
ADD_EXECUTABLE(AmTelnetServerTest ${TELNET_SRCS_CXX})
diff --git a/AudioManagerDaemon/test/CAmCommonFunctions.cpp b/AudioManagerDaemon/test/CAmCommonFunctions.cpp
index 7ee9090..d8c2e03 100644
--- a/AudioManagerDaemon/test/CAmCommonFunctions.cpp
+++ b/AudioManagerDaemon/test/CAmCommonFunctions.cpp
@@ -92,7 +92,7 @@ IAmControlBackdoor::~IAmControlBackdoor()
bool IAmControlBackdoor::replaceController(CAmControlSender *controlSender, IAmControlSend *newController)
{
controlSender->mController = newController;
- return true;
+ return controlSender->mController == newController;
}
//int GetRandomNumber(int nLow, int nHigh) {
diff --git a/AudioManagerDaemon/test/CMakeLists.txt b/AudioManagerDaemon/test/CMakeLists.txt
index 5eda5cb..e0ae651 100644
--- a/AudioManagerDaemon/test/CMakeLists.txt
+++ b/AudioManagerDaemon/test/CMakeLists.txt
@@ -27,8 +27,13 @@ add_subdirectory (AmRouterTest)
add_subdirectory (AmRouterMapTest)
add_subdirectory (AmRoutingInterfaceTest)
add_subdirectory (AmSocketHandlerTest)
+
IF(WITH_NSM)
- add_subdirectory (AmNodeStateCommunicatorTest)
+ IF(WITH_DBUS_WRAPPER)
+ add_subdirectory (AmNodeStateCommunicatorDBusTest)
+ ELSEIF(WITH_CAPI_WRAPPER)
+ add_subdirectory (AmNodeStateCommunicatorCAPITest)
+ ENDIF()
ENDIF(WITH_NSM)
IF(WITH_TELNET)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ec2782d..7b2911d 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,6 +17,7 @@
cmake_minimum_required(VERSION 2.6)
+include(CMakeDependentOption)
execute_process(COMMAND git describe --tags WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE DAEMONVERSION
@@ -43,9 +44,10 @@ PROJECT(AudioManagerDeamon)
FIND_PACKAGE(PkgConfig)
-OPTION( WITH_DBUS_WRAPPER
- "Enable Dbus Wrapper Support" ON )
-
+SET(WITH_ENABLED_IPC "CAPI" CACHE STRING "Disable 'NONE' / Enable Common-API 'CAPI' or Dbus 'DBUS' Support")
+
+SET_PROPERTY(CACHE WITH_ENABLED_IPC PROPERTY STRINGS "NONE" "CAPI" "DBUS")
+
OPTION( WITH_DLT
"Enable automotive-DLT Support" ON )
@@ -76,15 +78,54 @@ OPTION ( USE_BUILD_LIBS
OPTION ( GLIB_DBUS_TYPES_TOLERANT
"build dbus with tolerance towards glib 16bit/32bit handling" ON)
+IF (WITH_ENABLED_IPC STREQUAL "NONE")
+ SET (ENABLE_NSM OFF)
+ELSE ()
+ SET (ENABLE_NSM ON)
+ENDIF ()
+
+CMAKE_DEPENDENT_OPTION(WITH_NSM "build with NSM support" ON
+ "ENABLE_NSM" OFF)
+
OPTION ( WITH_NSM
"build with NSM support" ON)
-
+
OPTION ( WITH_DATABASE_STORAGE
"build with sqlite as in memory storage" OFF)
+
+IF (WITH_ENABLED_IPC STREQUAL "DBUS")
+ SET (WITH_DBUS_WRAPPER ON CACHE INTERNAL "hide this!" FORCE)
+ SET (WITH_CAPI_WRAPPER OFF CACHE INTERNAL "hide this!" FORCE)
+ELSEIF(WITH_ENABLED_IPC STREQUAL "CAPI")
+ SET (WITH_CAPI_WRAPPER ON CACHE INTERNAL "hide this!" FORCE)
+ SET (WITH_DBUS_WRAPPER OFF CACHE INTERNAL "hide this!" FORCE)
+
+ MACRO(INSERT_DBUS_CONF_IF_NEEDED IN_PLACEHOLDER IN_SRC_DBUS_CONF OUT_DST_DBUS_CONF)
+ # Checks the variable in the template
+ if(NOT EXISTS ${CMAKE_SOURCE_DIR}/AudioManagerDaemon/fidls/AudioManager_dbus.conf.in )
+ FILE(WRITE ${CMAKE_SOURCE_DIR}/AudioManagerDaemon/fidls/AudioManager_dbus.conf.in
+ "################################################ CMAKE GENERATED #################################################")
+ endif( )
+
+ FILE(READ ${CMAKE_SOURCE_DIR}/AudioManagerDaemon/fidls/AudioManager_dbus.conf.in DBUS_CONF_IN)
+ if( NOT DBUS_CONF_IN MATCHES ${IN_PLACEHOLDER} )
+ if( NOT DBUS_CONF_IN STREQUAL "" )
+ FILE(APPEND ${CMAKE_SOURCE_DIR}/AudioManagerDaemon/fidls/AudioManager_dbus.conf.in "\r\n\r\n")
+ endif( )
+ FILE(APPEND ${CMAKE_SOURCE_DIR}/AudioManagerDaemon/fidls/AudioManager_dbus.conf.in ${IN_PLACEHOLDER})
+ endif( )
+ # Reads out the common-api dbus configuration for the node state manager.
+ FILE(READ ${IN_SRC_DBUS_CONF} ${OUT_DST_DBUS_CONF})
+ ENDMACRO(INSERT_DBUS_CONF_IF_NEEDED)
+
+ ELSEIF(WITH_ENABLED_IPC STREQUAL "NONE")
+ SET (WITH_CAPI_WRAPPER OFF CACHE INTERNAL "hide this!" FORCE)
+ SET (WITH_DBUS_WRAPPER OFF CACHE INTERNAL "hide this!" FORCE)
+ENDIF ()
-IF (NOT WITH_DBUS_WRAPPER)
+IF (NOT WITH_DBUS_WRAPPER AND NOT WITH_CAPI_WRAPPER)
SET (WITH_NSM OFF)
-ENDIF (NOT WITH_DBUS_WRAPPER)
+ENDIF (NOT WITH_DBUS_WRAPPER AND NOT WITH_CAPI_WRAPPER)
#Can be changed via passing -DDBUS_SERVICE_PREFIX="XXX" to cmake
IF(NOT DEFINED DBUS_SERVICE_PREFIX)
@@ -184,12 +225,20 @@ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wextra -std=gnu++0x -D_GNU_SO
#set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wextra -std=c++98 -D_GNU_SOURCE")
if(WITH_PLUGIN_COMMAND)
- add_subdirectory (PluginCommandInterfaceDbus)
+ if(WITH_DBUS_WRAPPER)
+ add_subdirectory (PluginCommandInterfaceDbus)
+ elseif(WITH_CAPI_WRAPPER)
+ add_subdirectory (PluginCommandInterfaceCAPI)
+ endif()
endif(WITH_PLUGIN_COMMAND)
if(WITH_PLUGIN_ROUTING)
- add_subdirectory (PluginRoutingInterfaceDbus)
add_subdirectory (PluginRoutingInterfaceAsync)
+ if(WITH_DBUS_WRAPPER)
+ add_subdirectory (PluginRoutingInterfaceDbus)
+ elseif(WITH_CAPI_WRAPPER)
+ add_subdirectory (PluginRoutingInterfaceCAPI)
+ endif()
endif(WITH_PLUGIN_ROUTING)
if(WITH_PLUGIN_CONTROL)
diff --git a/PluginCommandInterfaceCAPI/CMakeLists.txt b/PluginCommandInterfaceCAPI/CMakeLists.txt
new file mode 100644
index 0000000..d66d849
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/CMakeLists.txt
@@ -0,0 +1,99 @@
+# Copyright (c) 2012 GENIVI Alliance
+# Copyright (c) 2012 BMW
+#
+# author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+#
+# copyright
+# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+# including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+# subject to the following conditions:
+# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+# THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# For further information see http://www.genivi.org/.
+#
+
+cmake_minimum_required(VERSION 2.6)
+include(CMakeDependentOption)
+
+PROJECT(PluginCommandInterfaceCAPI)
+
+OPTION (WITH_COMMAND_INTERFACE_COMMON_CAPI
+ "build with commandinterface common-api plugin" ON )
+
+IF (WITH_COMMAND_INTERFACE_COMMON_CAPI AND WITH_CAPI_WRAPPER)
+
+set(LIBRARY_OUTPUT_PATH ${PLUGINS_OUTPUT_PATH}/command)
+
+set(DOC_OUTPUT_PATH ${DOC_OUTPUT_PATH}/CommandCAPIPlugin)
+set(INCLUDE_FOLDER "include")
+message(STATUS "prefix ${CMAKE_INSTALL_PREFIX}")
+SET(SHARED_FOLDER "${CMAKE_INSTALL_PREFIX}/share")
+
+FILE(READ "${AUDIO_INCLUDE_FOLDER}/command/IAmCommandSend.h" VERSION_BUFFER LIMIT 6000)
+STRING(REGEX MATCH "CommandSendVersion*.[^0-9]*[0-9].[0-9]*[0-9]" LIB_INTERFACE_VERSION_STRING ${VERSION_BUFFER})
+STRING(REGEX REPLACE "CommandSendVersion*.." "" LIB_INTERFACE_VERSION ${LIB_INTERFACE_VERSION_STRING})
+MESSAGE(STATUS "Building against command interface version ${LIB_INTERFACE_VERSION}")
+
+INSERT_DBUS_CONF_IF_NEEDED("@COMMAND_INTERFACE_DBUS_CONF@"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fidl/PluginCommandInterfaceCAPI_dbus.conf"
+ COMMAND_INTERFACE_DBUS_CONF)
+set(COMMAND_INTERFACE_DBUS_CONF ${COMMAND_INTERFACE_DBUS_CONF} PARENT_SCOPE)
+
+CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/config.cmake ${CMAKE_CURRENT_SOURCE_DIR}/include/configCommandCAPI.h )
+
+FIND_PACKAGE(CommonAPI REQUIRED)
+FIND_PACKAGE(CommonAPI_DBus REQUIRED)
+
+INCLUDE_DIRECTORIES(
+ ${CMAKE_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${AUDIO_INCLUDE_FOLDER}
+ ${PROJECT_INCLUDE_FOLDER}
+ ${DLT_INCLUDE_DIRS}
+ ${COMMON_API_INCLUDE_DIRS}
+ ${COMMON_API_DBUS_INCLUDE_DIRS}
+ ${COMMON_API_GEN_INCLUDE_DIR}
+ ${INCLUDE_FOLDER}
+)
+
+# all source files go here
+file(GLOB PLUGINCAPI_SRCS_CXX "src/*.cpp" ${COMMON_API_GEN_SOURCES})
+
+add_library(PluginCommandInterfaceCAPI MODULE ${PLUGINCAPI_SRCS_CXX})
+
+SET_TARGET_PROPERTIES(PluginCommandInterfaceCAPI PROPERTIES
+ SOVERSION "${LIB_INTERFACE_VERSION}"
+)
+
+TARGET_LINK_LIBRARIES(PluginCommandInterfaceCAPI
+ ${DLT_LIBRARIES}
+ ${COMMON_API_LIBRARIES}
+ ${COMMON_API_DBUS_LIBRARIES}
+)
+
+IF(WITH_TESTS)
+ add_subdirectory (test)
+ENDIF(WITH_TESTS)
+
+#IF(WITH_DOCUMENTATION)
+# file(MAKE_DIRECTORY ${DOC_OUTPUT_PATH})
+# configure_file(${DOXY_FILE} ${DOC_OUTPUT_PATH}/Doxyfile @ONLY IMMEDIATE)
+# add_custom_target (PluginInterfaceDBusDocs ALL
+# COMMAND ${DOXYGEN_EXECUTABLE} ${DOC_OUTPUT_PATH}/Doxyfile WORKING_DIRECTORY ${DOC_OUTPUT_PATH}
+# SOURCES ${PROJECT_BINARY_DIR} ${DOC_OUTPUT_PATH}/Doxyfile
+# )
+#ENDIF(WITH_DOCUMENTATION)
+
+INSTALL(TARGETS PluginCommandInterfaceCAPI
+ DESTINATION "lib/${LIB_INSTALL_SUFFIX}/command"
+ PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ
+ COMPONENT sampleplugins
+)
+
+SET(ADD_DEPEND "audiomanager-bin" "dlt")
+set_property(GLOBAL APPEND PROPERTY sampleplugins_prop "${ADD_DEPEND}")
+
+ENDIF (WITH_COMMAND_INTERFACE_COMMON_CAPI AND WITH_CAPI_WRAPPER)
diff --git a/PluginCommandInterfaceCAPI/cmake/config.cmake b/PluginCommandInterfaceCAPI/cmake/config.cmake
new file mode 100644
index 0000000..8bd2faa
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/cmake/config.cmake
@@ -0,0 +1,4 @@
+#ifndef _COMMANDCAPI_CONFIG_H
+#define _COMMANDCAPI_CONFIG_H
+
+#endif /* _COMMANDCAPI_CONFIG_H */
diff --git a/PluginCommandInterfaceCAPI/fidl/CommandInterface.fdepl b/PluginCommandInterfaceCAPI/fidl/CommandInterface.fdepl
new file mode 100644
index 0000000..b500f07
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/fidl/CommandInterface.fdepl
@@ -0,0 +1,6 @@
+import "CommandInterface.fidl"
+import "platform:/plugin/org.genivi.commonapi.dbus/deployment/deployment.fdepl"
+
+define org.genivi.commonapi.dbus.deployment.deployment for interface org.genivi.am.CommandInterface {
+ DefaultEnumBackingType=Int16
+} \ No newline at end of file
diff --git a/PluginCommandInterfaceCAPI/fidl/CommandInterface.fidl b/PluginCommandInterfaceCAPI/fidl/CommandInterface.fidl
new file mode 100755
index 0000000..8f1a220
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/fidl/CommandInterface.fidl
@@ -0,0 +1,723 @@
+package org.genivi.audiomanager
+
+import org.genivi.audiomanager.am.* from "amTypes.fidl"
+
+<**
+ @author : J�rgen Gehring
+
+ @description : CommandInterface AudioManager.
+
+ @details : Source D-Bus specification org.genivi.audiomanager.CommandInterface
+
+**>
+
+interface CommandInterface {
+ version {
+ major 0
+ minor 1
+ }
+ method Connect {
+ in {
+ am_sourceID_t sourceID
+ am_sinkID_t sinkID
+ }
+ out {
+ am_Error_e result
+ am_mainConnectionID_t mainConnectionID
+ }
+ }
+ method Disconnect {
+ in {
+ am_mainConnectionID_t mainConnectionID
+ }
+ out {
+ am_Error_e result
+ }
+ }
+ method SetVolume {
+ in {
+ am_sinkID_t sinkID
+ am_mainVolume_t volume
+ }
+ out {
+ am_Error_e result
+ }
+ }
+ method VolumeStep {
+ in {
+ am_sinkID_t sinkID
+ am_mainVolume_t volumeStep
+ }
+ out {
+ am_Error_e result
+ }
+ }
+ method SetSinkMuteState {
+ in {
+ am_sinkID_t sinkID
+ am_MuteState_e muteState
+ }
+ out {
+ am_Error_e result
+ }
+ }
+ method SetMainSinkSoundProperty {
+ in {
+ am_sinkID_t sinkID
+ am_MainSoundProperty_s soundProperty
+ }
+ out {
+ am_Error_e result
+ }
+ }
+ method SetMainSourceSoundProperty {
+ in {
+ am_sourceID_t sourceID
+ am_MainSoundProperty_s soundProperty
+ }
+ out {
+ am_Error_e result
+ }
+ }
+ method SetSystemProperty {
+ in {
+ am_SystemProperty_s soundProperty
+ }
+ out {
+ am_Error_e result
+ }
+ }
+ method GetListMainConnections {
+ out {
+ am_Error_e result
+ am_MainConnectionType_l listConnections
+ }
+ }
+ method GetListMainSinks {
+ out {
+ am_Error_e result
+ am_SinkType_l listMainSinks
+ }
+ }
+ method GetListMainSources {
+ out {
+ am_Error_e result
+ am_SourceType_l listMainSources
+ }
+ }
+ method GetListMainSinkSoundProperties {
+ in {
+ am_sinkID_t sinkID
+ }
+ out {
+ am_Error_e result
+ am_MainSoundProperty_l listSoundProperties
+ }
+ }
+ method GetListMainSourceSoundProperties {
+ in {
+ am_sourceID_t sourceID
+ }
+ out {
+ am_Error_e result
+ am_MainSoundProperty_l listSourceProperties
+ }
+ }
+ method GetListSourceClasses {
+ out {
+ am_Error_e result
+ am_SourceClass_l listSourceClasses
+ }
+ }
+ method GetListSinkClasses {
+ out {
+ am_Error_e result
+ am_SinkClass_l listSinkClasses
+ }
+ }
+ method GetListSystemProperties {
+ out {
+ am_Error_e result
+ am_SystemProperty_l listSystemProperties
+ }
+ }
+ method GetTimingInformation {
+ in {
+ am_mainConnectionID_t mainConnectionID
+ }
+ out {
+ am_Error_e result
+ am_timeSync_t delay
+ }
+ }
+ broadcast NumberOfMainConnectionsChanged {
+ }
+ broadcast MainConnectionStateChanged {
+ out {
+ am_mainConnectionID_t connectionID
+ am_ConnectionState_e connectionState
+ }
+ }
+ broadcast NumberOfSourceClassesChanged {
+ }
+ broadcast SourceAdded {
+ out {
+ am_SourceType_s newSource
+ }
+ }
+ broadcast SourceRemoved {
+ out {
+ am_sourceID_t removedSourceID
+ }
+ }
+ broadcast MainSourceSoundPropertyChanged {
+ out {
+ am_sourceID_t sourceID
+ am_MainSoundProperty_s SoundProperty
+ }
+ }
+ broadcast SourceAvailabilityChanged {
+ out {
+ am_sourceID_t sourceID
+ am_Availability_s availability
+ }
+ }
+ broadcast NumberOfSinkClassesChanged {
+ }
+ broadcast SinkAdded {
+ out {
+ am_SinkType_s newSink
+ }
+ }
+ broadcast SinkRemoved {
+ out {
+ am_sinkID_t removedSinkID
+ }
+ }
+ broadcast MainSinkSoundPropertyChanged {
+ out {
+ am_sinkID_t sinkID
+ am_MainSoundProperty_s SoundProperty
+ }
+ }
+ broadcast SinkAvailabilityChanged {
+ out {
+ am_sinkID_t sinkID
+ am_Availability_s availability
+ }
+ }
+ broadcast VolumeChanged {
+ out {
+ am_sinkID_t sinkID
+ am_mainVolume_t volume
+ }
+ }
+ broadcast SinkMuteStateChanged {
+ out {
+ am_sinkID_t sinkID
+ am_MuteState_e muteState
+ }
+ }
+ broadcast SystemPropertyChanged {
+ out {
+ am_SystemProperty_s SystemProperty
+ }
+ }
+ broadcast TimingInformationChanged {
+ out {
+ am_mainConnectionID_t mainConnection
+ am_timeSync_t time
+ }
+ }
+
+ broadcast SinkUpdated{
+ out{
+ am_sinkID_t sinkID
+ am_sinkClass_t sinkClassID
+ am_MainSoundProperty_l listMainSoundProperties
+ }
+ }
+
+ broadcast SourceUpdated{
+ out{
+ am_sourceID_t sourceID
+ am_sourceClass_t sourceClassID
+ am_MainSoundProperty_l listMainSoundProperties
+ }
+ }
+
+ broadcast SinkNotification{
+ out{
+ am_sinkID_t sinkID
+ am_NotificationPayload_s notification
+ }
+ }
+
+ broadcast SourceNotification{
+ out{
+ am_sourceID_t sourceID
+ am_NotificationPayload_s notification
+ }
+ }
+
+ broadcast MainSinkNotificationConfigurationChanged{
+ out{
+ am_sinkID_t sinkID
+ am_NotificationConfiguration_s mainNotificationConfiguration
+ }
+ }
+
+ broadcast MainSourceNotificationConfigurationChanged{
+ out{
+ am_sourceID_t sourceID
+ am_NotificationConfiguration_s mainNotificationConfiguration
+ }
+ }
+
+ typedef am_sourceID_t is UInt16
+
+ typedef am_sinkID_t is UInt16
+
+ typedef am_mainConnectionID_t is UInt16
+
+ typedef am_timeSync_t is Int16
+
+ typedef am_mainVolume_t is Int16
+
+ typedef am_sourceClass_t is UInt16
+
+ typedef am_sinkClass_t is UInt16
+
+ <**
+ @description : The errors of the audiomanager. All possible errors are in here. This enum is used widely as return parameter.
+ **>
+ enumeration am_Error_e {
+
+ //E_UNKNOWN = "0x00"
+
+ <**
+ @description : no error - positive reply
+ **>
+ E_OK = "0x00"
+
+ <**
+ @description : value out of range
+ **>
+ E_OUT_OF_RANGE = "0x01"
+
+ <**
+ @description : not used
+ **>
+ E_NOT_USED = "0x02"
+
+ <**
+ @description : a database error occurred
+ **>
+ E_DATABASE_ERROR = "0x03"
+
+ <**
+ @description : the desired object already exists
+ **>
+ E_ALREADY_EXISTS = "0x04"
+
+ <**
+ @description : there is no change
+ **>
+ E_NO_CHANGE = "0x05"
+
+ <**
+ @description : the desired action is not possible
+ **>
+ E_NOT_POSSIBLE = "0x06"
+
+ <**
+ @description : the desired object is non existent
+ **>
+ E_NON_EXISTENT = "0x07"
+
+ <**
+ @description : the asynchronous action was aborted
+ **>
+ E_ABORTED = "0x08"
+
+ <**
+ @description : This error is returned in case a connect is issued with a connectionFormat
+ that cannot be selected for the connection. This could be either due to the capabilities of
+ a source or a sink or gateway compatibilities for example
+ **>
+ E_WRONG_FORMAT = "0x09"
+ E_MAX = "0xA"
+ }
+
+ enumeration am_MuteState_e {
+
+ <**
+ @description : default
+ **>
+ MS_UNKNOWN = "0x00"
+
+ <**
+ @description : the source / sink is muted
+ **>
+ MS_MUTED = "0x01"
+
+ <**
+ @description : the source / sink is unmuted
+ **>
+ MS_UNMUTED = "0x02"
+ MS_MAX = "0x03"
+ }
+
+ enumeration am_MainSoundPropertyType_e {
+
+ <**
+ @description : default
+ **>
+ MSP_UNKNOWN = "0x00"
+
+ <**
+ @description : example value between -10 and +10
+ **>
+ MSP_EXAMPLE_TREBLE = "0x01"
+
+ <**
+ @description : example value between -10 and +10
+ **>
+ MSP_EXAMPLE_MID = "0x02"
+
+ <**
+ @description : example value between -10 and +10
+ **>
+ MSP_EXAMPLE_BASS = "0x03"
+ MSP_SOURCE_TYPE = "0x04"
+ MSP_MAX = "0x05"
+ }
+
+ enumeration am_SystemPropertyType_e {
+
+ <**
+ @description : default
+ **>
+ SYP_UNKNOWN = "0x00"
+ SYP_MAX = "0x01"
+ }
+
+ enumeration am_ConnectionState_e {
+ CS_UNKNOWN = "0x00"
+
+ <**
+ @description : This means the connection is just building up
+ **>
+ CS_CONNECTING = "0x01"
+
+ <**
+ @description : the connection is ready to be used
+ **>
+ CS_CONNECTED = "0x02"
+
+ <**
+ @description : the connection is in the course to be knocked down
+ **>
+ CS_DISCONNECTING = "0x03"
+
+ <**
+ @description : only relevant for connectionStatechanged. Is send after the connection was removed
+ **>
+ CS_DISCONNECTED = "0x04"
+
+ <**
+ @description : this means the connection is still build up but unused at the moment
+ **>
+ CS_SUSPENDED = "0x05"
+ CS_MAX = "0x06"
+ }
+
+ enumeration am_Availablility_e {
+
+ <**
+ @description : default
+ **>
+ A_UNKNOWN = "0x00"
+
+ <**
+ @description : The source / sink is available
+ **>
+ A_AVAILABLE = "0x01"
+
+ <**
+ @description : the source / sink is not available
+ **>
+ A_UNAVAILABLE = "0x02"
+ A_MAX = "0x03"
+ }
+
+ enumeration am_AvailabilityReason_e {
+
+ <**
+ @description : default
+ **>
+ AR_UNKNOWN = "0x00"
+
+ <**
+ @description : the availability changed because an new media was entered.
+ **>
+ AR_GENIVI_NEWMEDIA = "0x01"
+
+ <**
+ @description : the availability changed because the same media was entered.
+ **>
+ AR_GENIVI_SAMEMEDIA = "0x02"
+
+ <**
+ @description : the availability changed because there is no media.
+ **>
+ AR_GENIVI_NOMEDIA = "0x03"
+
+ <**
+ @description : the availability changed because of a temperature event.
+ **>
+ AR_GENIVI_TEMPERATURE = "0x04"
+
+ <**
+ @description : the availability changed because of a voltage event.
+ **>
+ AR_GENIVI_VOLTAGE = "0x05"
+
+ <**
+ @description : the availability changed because of fatal errors reading or accessing media.
+ **>
+ AR_GENIVI_ERRORMEDIA = "0x06"
+ AR_MAX = "0x07"
+ }
+
+ enumeration am_ClassProperty_e {
+
+ <**
+ @description : default
+ **>
+ CP_UNKNOWN = "0x00"
+
+ <**
+ @description : defines the source type of a source. Project specific, could be for example differentiation between interrupt source and main source.
+ **>
+ CP_GENIVI_SOURCE_TYPE = "0x01"
+ /**
+ * defines the SINK_TYPE. Project specific
+ */
+ <**
+ @description : defines the SINK_TYPE. Project specific.
+ **>
+ CP_GENIVI_SINK_TYPE = "0x02"
+ CP_MAX = "0x03"
+ }
+
+ enumeration am_InterruptState_e
+ {
+ /**
+ * default
+ */
+ IS_UNKNOWN = "0x00"
+ /**
+ * the interrupt state is off - no interrupt
+ */
+ IS_OFF = "0x01"
+ /**
+ * the interrupt state is interrupted - the interrupt is active
+ */
+ IS_INTERRUPTED = "0x02"
+ IS_MAX = "0x03"
+ }
+
+ struct am_MainSoundProperty_s {
+
+ <**
+ @description : the type of the property
+ **>
+ am_MainSoundPropertyType_e type
+
+ <**
+ @description : the actual value
+ **>
+ Int16 value
+ } array am_MainSoundProperty_l of am_MainSoundProperty_s
+
+ struct am_SystemProperty_s {
+
+ <**
+ @description : the type that is set
+ **>
+ am_SystemPropertyType_e type
+
+ <**
+ @description : the actual value
+ **>
+ Int16 value
+ }
+
+ array am_SystemProperty_l of am_SystemProperty_s
+
+ struct am_MainConnectionType_s {
+
+ <**
+ @description : the ID of the mainconnection
+ **>
+ am_mainConnectionID_t mainConnectionID
+
+ <**
+ @description : the sourceID where the connection starts
+ **>
+ am_sourceID_t sourceID
+
+ <**
+ @description : the sinkID where the connection ends
+ **>
+ am_sinkID_t sinkID
+
+ <**
+ @description : the delay of the mainconnection
+ **>
+ am_timeSync_t delay
+
+ <**
+ @description : the current connection state
+ **>
+ am_ConnectionState_e connectionState
+ }
+
+ array am_MainConnectionType_l of am_MainConnectionType_s
+
+ struct am_Availability_s {
+
+ <**
+ @description : the current availability state.
+ **>
+ am_Availablility_e availability
+
+ <**
+ @description : the reason for the last change. This can be used to trigger events that deal with state changes.
+ **>
+ am_AvailabilityReason_e availabilityReason
+ }
+
+ struct am_SourceType_s {
+
+ <**
+ @description : his is the ID of the source, it is unique in the system. There are 2 ways, ID can be created: either it is assigned during the registration process (in a dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it is a fixed (the project has to ensure the uniqueness of the ID).
+ **>
+ am_sourceID_t sourceID
+
+ <**
+ @description : The name of the source. Must be unique in the whole system.
+ **>
+ String name
+
+ <**
+ @description : the availability of the source
+ **>
+ am_Availability_s availability
+
+ <**
+ @description : the sourceClassID, indicates the class the source is in. This information can be used by the Controller to implement different behaviour for different classes.
+ **>
+ am_sourceClass_t sourceClassID
+ }
+
+ array am_SourceType_l of am_SourceType_s
+
+ struct am_SinkType_s {
+
+ <**
+ @description : This is the ID of the sink, it is unique in the system. There are 2 ways, ID can be created: either it is assigned during the registration process (in a dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it is a fixed (the project has to ensure the uniqueness of the ID).
+ **>
+ am_sinkID_t sinkID
+
+ <**
+ @description : The name of the sink. Must be unique in the whole system.
+ **>
+ String name
+
+ <**
+ @description :
+ This attribute reflects the availability of the sink. There are several reasons why a sink could be not available for the moment: for example the shutdown of a sink because of overtemperature or over- & undervoltage. The availability consists of two pieces of information:
+ Availablility: the status itself, can be A_AVAILABLE, A_UNAVAILABLE or A_UNKNOWN
+ AvailabilityReason: this informs about the last reason for a change in availability. The reasons itself are product specific.
+
+ **>
+ am_Availability_s availability
+
+ <**
+ @description : This is the representation of the Volume for the commandInterface. It is used by the HMI to set the volume of a sink, the AudioManagerController has to transform this into real source and sink volumes.
+ **>
+ am_mainVolume_t volume
+ am_MuteState_e muteState
+
+ <**
+ @description : the sinkClassID references to a sinkClass. With the help of classification, rules can be setup to define the system behaviour.
+ **>
+ am_sinkClass_t sinkClassID
+ }
+
+ array am_SinkType_l of am_SinkType_s
+
+ struct am_ClassProperty_s {
+
+ <**
+ @description : he property as enum.
+ **>
+ am_ClassProperty_e classProperty
+ Int16 value
+ }
+
+ array am_ClassProperty_l of am_ClassProperty_s
+
+ struct am_SourceClass_s {
+
+ <**
+ @description : the source ID.
+ **>
+ am_sourceClass_t sourceClassID
+
+ <**
+ @description : the name of the sourceClass - must be unique in the system.
+ **>
+ String name
+
+ <**
+ @description : the list of the class properties. These are pairs of a project specific enum describing the type of the value and an integer holding the real value.
+ **>
+ am_ClassProperty_l listClassProperties
+ }
+
+ array am_SourceClass_l of am_SourceClass_s
+
+ struct am_SinkClass_s {
+
+ <**
+ @description : the ID of the sinkClass.
+ **>
+ am_sinkClass_t sinkClassID
+
+ <**
+ @description : the name of the sinkClass - must be unique in the system.
+ **>
+ String name
+
+ <**
+ @description : the list of the class properties. These are pairs of a project specific enum describing the type of the value and an integer holding the real value.
+ **>
+ am_ClassProperty_l listClassProperties
+ }
+
+ array am_SinkClass_l of am_SinkClass_s
+
+ struct am_NotificationPayload_s
+ {
+ am_NotificationType_e type
+ <**
+ @description : This is finally the value of the notification. It's meaning depends on the notificationType
+ **>
+ Int16 value
+
+ }
+
+}
diff --git a/PluginCommandInterfaceCAPI/fidl/PluginCommandInterfaceCAPI_dbus.conf b/PluginCommandInterfaceCAPI/fidl/PluginCommandInterfaceCAPI_dbus.conf
new file mode 100644
index 0000000..b3ae199
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/fidl/PluginCommandInterfaceCAPI_dbus.conf
@@ -0,0 +1,8 @@
+######################################## Command interface configuration #########################################
+# PluginCommandInterfaceCAPI_dbus.conf #
+# If you change something make sure you re-configure with 'ccmake..' which generates the *_dbus.conf file again. #
+##################################################################################################################
+[local:org.genivi.audiomanger.commandinterface:org.genivi.audiomanger]
+dbus_connection=org.genivi.audiomanager
+dbus_object=/org/genivi/audiomanager/commandinterface
+dbus_interface=org.genivi.audiomanager.commandinterface \ No newline at end of file
diff --git a/PluginCommandInterfaceCAPI/fidl/amTypes.fidl b/PluginCommandInterfaceCAPI/fidl/amTypes.fidl
new file mode 100755
index 0000000..6f11698
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/fidl/amTypes.fidl
@@ -0,0 +1,329 @@
+package org.genivi.audiomanager
+
+typeCollection am
+{
+ typedef am_sourceID_t is UInt16
+ typedef am_sinkID_t is UInt16
+ typedef am_gatewayID_t is UInt16
+ typedef gongHandle is Int16
+ typedef am_sourceClass_t is UInt16
+ typedef am_sinkClass_t is UInt16
+ typedef am_volume_t is Int16
+ typedef am_mainVolume_t is Int16
+ typedef am_handle_t is UInt16
+ typedef am_time_t is UInt16
+
+ enumeration gp_indicatorDirection_e
+ {
+ INDICATOR_RIGHT ="0x00"
+ INDICATOR_LEFT="0x01"
+ INDICATOR_WARNING="0x02"
+ }
+
+ enumeration am_RampType_e
+ {
+ RAMP_UNKNOWN = "0x00"
+ RAMP_GENIVI_DIRECT = "0x01"
+ RAMP_GENIVI_NO_PLOP = "0x02"
+ RAMP_GENIVI_EXP_INV = "0x03"
+ RAMP_GENIVI_LINEAR = "0x04"
+ RAMP_GENIVI_EXP = "0x05"
+ RAMP_MAX = "0x06"
+ }
+
+ enumeration am_MuteState_e
+ {
+ MS_UNKNOWN = "0x00"
+ MS_MUTED = "0x01"
+ MS_UNMUTED = "0x02"
+ MS_MAX = "0x03"
+ }
+
+ enumeration am_SourceState_e
+ {
+ SS_UNKNNOWN = "0x00"
+ SS_ON = "0x01"
+ SS_OFF = "0x02"
+ SS_PAUSED = "0x03"
+ SS_MAX = "0x04"
+ }
+ enumeration am_Error_e
+ {
+ E_OK = "0x00"
+ E_UNKNOWN = "0x01"
+ E_OUT_OF_RANGE = "0x02"
+ E_NOT_USED = "0x03"
+ E_DATABASE_ERROR = "0x04"
+ E_ALREADY_EXISTS = "0x05"
+ E_NO_CHANGE = "0x06"
+ E_NOT_POSSIBLE = "0x07"
+ E_NON_EXISTENT = "0x08"
+ E_ABORTED = "0x09"
+ E_WRONG_FORMAT = "0xA"
+ E_MAX = "0xB"
+ }
+
+ enumeration am_DomainState_e
+ {
+
+ DS_UNKNOWN = "0"
+ DS_CONTROLLED = "1"
+ DS_INDEPENDENT_STARTUP = "2"
+ DS_INDEPENDENT_RUNDOWN = "3"
+ DS_MAX = "4"
+ }
+
+ enumeration gongType_e
+ {
+ AT_NUN = "0x01"
+ AT_POC = "0x02"
+ AT_QUE = "0x03"
+ AT_IWA = "0x04"
+ AT_WA = "0x05"
+ AT_ETC_F = "0x06"
+ AT_ETC_F2 = "0x07"
+ AT_ETC_ST = "0x08"
+ AT_ETC_S = "0x09"
+ AT_REV = "0x0A"
+ AT_ESU = "0x0B"
+ AT_ESD = "0x0C"
+ AT_DG = "0x0D"
+ AT_SG = "0x0E"
+ AT_IDG = "0x0F"
+ AT_ION = "0x10"
+ AT_IOFF = "0x11"
+ AT_FBS = "0x12"
+ AT_VFS = "0x13"
+ AT_GES = "0x14"
+ AT_UEE = "0x15"
+ }
+
+ enumeration gp_indicatorStatus_e
+ {
+ IS_ON = "0x00"
+ IS_OFF = "0x01"
+ }
+
+ enumeration gongStatus_e
+ {
+ NOT_PLAYING = "0x00"
+ PLAYING = "0x01"
+ INTERRUPTED = "0x02"
+ }
+
+ enumeration gongError_e
+ {
+ SUCCESS = "0x00"
+ ERROR = "0x01"
+ LOW_PRIORITY = "0x02"
+ }
+
+ enumeration gongClass_e
+ {
+ GONGCLASS_1 = "0x01"
+ GONGCLASS_2 = "0x02"
+ GONGCLASS_PDC = "0x03"
+ GONGCLASS_TURN = "0x04"
+ GONGCLASS_OBSTACLE = "0x05"
+ }
+
+ enumeration sampleSet_e
+ {
+ setBMW = "0x00"
+ setMini = "0x01"
+ setRR = "0x02"
+ }
+
+ enumeration am_Availability_e
+ {
+ A_UNKNOWN = "0x00"
+ A_AVAILABLE = "0x01"
+ A_UNAVAILABLE = "0x02"
+ A_MAX = "0x03"
+ }
+ enumeration am_AvailabilityReason_e
+ {
+ AR_UNKNOWN = "0x00"
+ AR_GENIVI_NEWMEDIA = "0x01"
+ AR_GENIVI_SAMEMEDIA = "0x02"
+ AR_GENIVI_NOMEDIA = "0x03"
+ AR_GENIVI_TEMPERATURE = "0x04"
+ AR_GENIVI_VOLTAGE = "0x05"
+ AR_GENIVI_ERRORMEDIA = "0x06"
+ AR_MAX = "0x07"
+ }
+
+ enumeration am_InterruptState_e
+ {
+ IS_UNKNOWN = "0x00"
+ IS_OFF = "0x01"
+ IS_INTERRUPTED = "0x02"
+ IS_MAX = "0x03"
+ }
+
+ enumeration am_SoundPropertyType_e
+ {
+ SP_UNKNOWN = "0x00"
+ SP_EXAMPLE_TREBLE = "0x01"
+ SP_EXAMPLE_MID = "0x02"
+ SP_EXAMPLE_BASS = "0x03"
+ SP_ENTER_SINKID = "0x04"
+ SP_INTERR_SUPERSEEDINGID = "0x05"
+ SP_INTERR_OVERLAYID = "0x06"
+ SP_PRIORITY = "0x07"
+ SP_MAX = "0x08"
+ }
+
+ enumeration am_ConnectionFormat_e
+ {
+ CF_UNKNOWN = "0x00"
+ CF_GENIVI_MONO = "0x01"
+ CF_GENIVI_STEREO = "0x02"
+ CF_GENIVI_ANALOG = "0x03"
+ CF_GENIVI_AUTO = "0x04"
+ CF_MAX = "0x05"
+ }
+ array am_ConnectionFormat_L of am_ConnectionFormat_e
+
+ enumeration am_MainSoundPropertyType_e
+ {
+ MSP_UNKNOWN = "0x00"
+ MSP_EXAMPLE_TREBLE = "0x01"
+ MSP_EXAMPLE_MID = "0x02"
+ MSP_EXAMPLE_BASS = "0x03"
+ MSP_SOURCE_TYPE = "0x04"
+ MSP_MAX = "0x05"
+ }
+
+ enumeration am_NotificationType_e
+ {
+ NT_UNKNOWN = "0x00"
+ NT_LOUDNESS = "0x01"
+ NT_MAX = "0x02"
+ }
+
+ enumeration am_NotificationStatus_e
+ {
+ NS_UNKNOWN = "0x00"
+ NS_OFF = "0x01"
+ NS_PERIODIC = "0x02"
+ NS_MINIMUM = "0x03"
+ NS_MAXIMUM = "0x04"
+ NS_CHANGE = "0x05"
+ NS_MAX = "0x06"
+ }
+
+ struct distanceInformation_s
+ {
+ Int32 FrontLeft
+ Int32 FrontRight
+ Int32 RearLeft
+ Int32 RearRight
+ }
+
+ struct sampleNames_s
+ {
+ sampleSet_e sample
+ String sampleName
+ } array listSampleNamesL of sampleNames_s
+
+ typedef am_domainID_t is UInt16
+
+ struct am_Domain_s
+ {
+ am_domainID_t domainID
+ String name
+ String busname
+ String nodename
+ Boolean early
+ Boolean complete
+ am_DomainState_e ^state
+ }
+
+ struct notificationPayload_s
+ {
+ Int16 type
+ Int16 payload
+ }
+
+ struct am_Availability_s
+ {
+ am_Availability_e availability
+ am_AvailabilityReason_e availabilityReason
+ }
+
+ struct am_SoundProperty_s
+ {
+ am_SoundPropertyType_e type
+ Int16 value
+ }
+ array am_SoundProperty_L of am_SoundProperty_s
+
+ struct am_MainSoundProperty_s
+ {
+ am_MainSoundPropertyType_e type
+ Int16 value
+ }
+ array am_MainSoundProperty_L of am_MainSoundProperty_s
+
+ struct am_NotificationConfiguration_s
+ {
+ am_NotificationType_e type
+ am_NotificationStatus_e status
+ Int16 parameter
+ }
+ array am_NotificationConfiguration_L of am_NotificationConfiguration_s
+
+
+ array bool_L of Boolean
+
+ struct sourceData_s
+ {
+ am_sourceID_t sourceID
+ am_domainID_t domainID
+ String name
+ am_sourceClass_t sourceClassID
+ am_SourceState_e sourceState
+ am_volume_t volume
+ Boolean visible
+ am_Availability_s available
+ am_InterruptState_e interruptState
+ am_SoundProperty_L listSoundProperties
+ am_ConnectionFormat_L listConnectionFormats
+ am_MainSoundProperty_L listMainSoundProperties
+ am_NotificationConfiguration_L listMainNotificationConfigurations
+ am_NotificationConfiguration_L listNotificationConfigurations
+ }
+
+ struct sinkData_s
+ {
+ am_sinkID_t sinkID
+ String name
+ am_domainID_t domainID
+ am_sinkClass_t sinkClassID
+ am_volume_t volume
+ Boolean visible
+ am_Availability_s available
+ am_MuteState_e muteState
+ am_mainVolume_t mainVolume
+ am_SoundProperty_L listSoundProperties
+ am_ConnectionFormat_L listConnectionFormats
+ am_MainSoundProperty_L listMainSoundProperties
+ am_NotificationConfiguration_L listMainNotificationConfigurations
+ am_NotificationConfiguration_L listNotificationConfigurations
+ }
+
+ struct am_Gateway_s
+ {
+ am_gatewayID_t gatewayID
+ String name
+ am_sinkID_t sinkID
+ am_sourceID_t sourceID
+ am_domainID_t domainSinkID
+ am_domainID_t domainSourceID
+ am_domainID_t controlDomainID
+ am_ConnectionFormat_L listSourceFormats
+ am_ConnectionFormat_L listSinkFormats
+ bool_L convertionMatrix
+ }
+} \ No newline at end of file
diff --git a/PluginCommandInterfaceCAPI/include/CAmCommandSenderCAPI.h b/PluginCommandInterfaceCAPI/include/CAmCommandSenderCAPI.h
new file mode 100644
index 0000000..9427823
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/include/CAmCommandSenderCAPI.h
@@ -0,0 +1,120 @@
+/**
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
+#ifndef CAPICOMMANDSENDER_H_
+#define CAPICOMMANDSENDER_H_
+
+#include <map>
+#include "shared/CAmCommonAPIWrapper.h"
+#include "command/IAmCommandSend.h"
+#include "command/IAmCommandReceive.h"
+#include "CAmCommandSenderService.h"
+
+
+
+namespace am
+{
+using namespace CommonAPI;
+using namespace org::genivi::audiomanager;
+
+
+/**
+ * Common-api implementation of CommandSendInterface.
+ * This class publish a service
+ */
+class CAmCommandSenderCAPI: public IAmCommandSend
+{
+ CAmCommandSenderCAPI();
+public:
+ CAmCommandSenderCAPI(CAmCommonAPIWrapper *aWrapper);
+ virtual ~CAmCommandSenderCAPI();
+ am_Error_e startService(IAmCommandReceive* commandreceiveinterface);
+ am_Error_e startupInterface(IAmCommandReceive* commandreceiveinterface);
+ am_Error_e tearDownInterface(IAmCommandReceive* commandreceiveinterface = NULL);
+ void setCommandReady(const uint16_t handle);
+ void setCommandRundown(const uint16_t handle);
+ void cbNewMainConnection(const am_MainConnectionType_s& mainConnection);
+ void cbRemovedMainConnection(const am_mainConnectionID_t mainConnection);
+ void cbNewSink(const am_SinkType_s& sink);
+ void cbRemovedSink(const am_sinkID_t sinkID);
+ void cbNewSource(const am_SourceType_s& source);
+ void cbRemovedSource(const am_sourceID_t source);
+ void cbNumberOfSinkClassesChanged();
+ void cbNumberOfSourceClassesChanged();
+ void cbMainConnectionStateChanged(const am_mainConnectionID_t connectionID, const am_ConnectionState_e connectionState);
+ void cbMainSinkSoundPropertyChanged(const am_sinkID_t sinkID, const am_MainSoundProperty_s& soundProperty);
+ void cbMainSourceSoundPropertyChanged(const am_sourceID_t sourceID, const am_MainSoundProperty_s& soundProperty);
+ void cbSinkAvailabilityChanged(const am_sinkID_t sinkID, const am_Availability_s& availability);
+ void cbSourceAvailabilityChanged(const am_sourceID_t sourceID, const am_Availability_s& availability);
+ void cbVolumeChanged(const am_sinkID_t sinkID, const am_mainVolume_t volume);
+ void cbSinkMuteStateChanged(const am_sinkID_t sinkID, const am_MuteState_e muteState);
+ void cbSystemPropertyChanged(const am_SystemProperty_s& systemProperty);
+ void cbTimingInformationChanged(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time);
+ void getInterfaceVersion(std::string& version) const;
+ void cbSinkUpdated(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties);
+ void cbSourceUpdated(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties);
+ void cbSinkNotification(const am_sinkID_t sinkID, const am_NotificationPayload_s& notification) ;
+ void cbSourceNotification(const am_sourceID_t sourceID, const am_NotificationPayload_s& notification) ;
+ void cbMainSinkNotificationConfigurationChanged(const am_sinkID_t sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration) ;
+ void cbMainSourceNotificationConfigurationChanged(const am_sourceID_t sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration) ;
+
+ static const char * COMMAND_SENDER_SERVICE;
+
+private:
+ std::shared_ptr<CAmCommandSenderService> mService;
+ CAmCommonAPIWrapper* mpCAmCAPIWrapper; ///< ! pointer to dbus wrapper
+ IAmCommandReceive* mpIAmCommandReceive; ///< ! pointer to commandReceive Interface
+ bool mReady; ///< ! if false, calls shall be ignored.
+ bool mIsServiceStarted;
+
+ /**
+ * list of sinks, needed to send out only deltas
+ */
+ std::vector<am_SinkType_s> mlistSinks;
+
+ /**
+ * list of sources, needed to send out only deltas
+ */
+ std::vector<am_SourceType_s> mlistSources;
+
+ /**
+ * used as comparison function for am_SinkType_s
+ */
+ struct sortBySinkID
+ {
+ bool operator()(const am_SinkType_s & a, const am_SinkType_s & b)
+ {
+ return (a.sinkID < b.sinkID);
+ }
+ };
+
+ /**
+ * used as comparison function for am_SourceType_s
+ */
+ struct sortBySourceID
+ {
+ bool operator()(const am_SourceType_s & a, const am_SourceType_s & b)
+ {
+ return (a.sourceID < b.sourceID);
+ }
+ };
+
+};
+
+}
+
+#endif /* CAPICOMMANDSENDER_H_ */
diff --git a/PluginCommandInterfaceCAPI/include/CAmCommandSenderCommon.h b/PluginCommandInterfaceCAPI/include/CAmCommandSenderCommon.h
new file mode 100644
index 0000000..4301dd7
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/include/CAmCommandSenderCommon.h
@@ -0,0 +1,61 @@
+/**
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
+#ifndef CAMCOMMANDSENDERCOMMON_H_
+#define CAMCOMMANDSENDERCOMMON_H_
+
+#include <memory>
+#include "audiomanagertypes.h"
+#include <org/genivi/audiomanager/CommandInterface.h>
+
+using namespace am;
+using namespace org::genivi::audiomanager;
+
+/**
+ * The following functions convert the basics AudiomManager types from/to CommonAPI types.
+ */
+
+extern void CAmConvertAvailablility(const am_Availability_s & , CommandInterface::am_Availability_s & );
+extern void CAmConvertMainSoundProperty(const am_MainSoundProperty_s & , CommandInterface::am_MainSoundProperty_s & );
+extern void CAmConvertSystemProperty(const am_SystemProperty_s &, CommandInterface::am_SystemProperty_s &);
+
+extern CommandInterface::am_ClassProperty_e CAmConvert2CAPIType(const am_ClassProperty_e & property);
+extern CommandInterface::am_SystemPropertyType_e CAmConvert2CAPIType(const am_SystemPropertyType_e &);
+extern CommandInterface::am_Availablility_e CAmConvert2CAPIType(const am_Availability_e & );
+extern CommandInterface::am_AvailabilityReason_e CAmConvert2CAPIType(const am_AvailabilityReason_e & );
+
+extern CommandInterface::am_MuteState_e CAmConvert2CAPIType(const am_MuteState_e &);
+extern am_MuteState_e CAmConvertFromCAPIType(const CommandInterface::am_MuteState_e &);
+
+extern CommandInterface::am_MainSoundPropertyType_e CAmConvert2CAPIType(const am_MainSoundPropertyType_e &);
+extern am_MainSoundPropertyType_e CAmConvertFromCAPIType(const CommandInterface::am_MainSoundPropertyType_e &);
+
+extern CommandInterface::am_ConnectionState_e CAmConvert2CAPIType(const am_ConnectionState_e &);
+extern am_ConnectionState_e CAmConvertFromCAPIType(const CommandInterface::am_ConnectionState_e &);
+
+extern org::genivi::audiomanager::am::am_NotificationType_e CAmConvert2CAPIType(const am_NotificationType_e &);
+extern am_NotificationType_e CAmConvertFromCAPIType(const org::genivi::audiomanager::am::am_NotificationType_e &);
+
+extern org::genivi::audiomanager::am::am_NotificationStatus_e CAmConvert2CAPIType(const am_NotificationStatus_e &);
+extern am_NotificationStatus_e CAmConvertFromCAPIType(const org::genivi::audiomanager::am::am_NotificationStatus_e &);
+
+extern CommandInterface::am_Error_e CAmConvert2CAPIType(const am_Error_e &);
+extern am_Error_e CAmConvertFromCAPIType(const CommandInterface::am_Error_e & error);
+
+extern am_SystemPropertyType_e CAmConvertFromCAPIType(const CommandInterface::am_SystemPropertyType_e &);
+
+#endif /* CAMCOMMANDSENDERCOMMON_H_ */
diff --git a/PluginCommandInterfaceCAPI/include/CAmCommandSenderService.h b/PluginCommandInterfaceCAPI/include/CAmCommandSenderService.h
new file mode 100644
index 0000000..cac6162
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/include/CAmCommandSenderService.h
@@ -0,0 +1,74 @@
+/**
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
+#ifndef CAMCOMMANDSENDERSERVICE_H_
+#define CAMCOMMANDSENDERSERVICE_H_
+
+#include <org/genivi/audiomanager/CommandInterfaceStubDefault.h>
+#include "../../include/command/IAmCommandReceive.h"
+
+namespace am {
+
+using namespace org::genivi::audiomanager;
+
+/**
+ * A concrete stub implementation used by the command sender plug-in.
+ */
+class CAmCommandSenderService: public CommandInterfaceStubDefault {
+ IAmCommandReceive* mpIAmCommandReceive;
+public:
+ CAmCommandSenderService();
+ CAmCommandSenderService(IAmCommandReceive *aReceiver);
+ virtual ~CAmCommandSenderService();
+
+ virtual void Connect(CommandInterface::am_sourceID_t sourceID, CommandInterface::am_sinkID_t sinkID, CommandInterface::am_Error_e& result, CommandInterface::am_mainConnectionID_t& mainConnectionID);
+
+ virtual void Disconnect(CommandInterface::am_mainConnectionID_t mainConnectionID, CommandInterface::am_Error_e& result);
+
+ virtual void SetVolume(CommandInterface::am_sinkID_t sinkID, CommandInterface::am_mainVolume_t volume, CommandInterface::am_Error_e& result);
+
+ virtual void VolumeStep(CommandInterface::am_sinkID_t sinkID, CommandInterface::am_mainVolume_t volumeStep, CommandInterface::am_Error_e& result);
+
+ virtual void SetSinkMuteState(CommandInterface::am_sinkID_t sinkID, CommandInterface::am_MuteState_e muteState, CommandInterface::am_Error_e& result);
+
+ virtual void SetMainSinkSoundProperty(CommandInterface::am_sinkID_t sinkID, CommandInterface::am_MainSoundProperty_s soundProperty, CommandInterface::am_Error_e& result);
+
+ virtual void SetMainSourceSoundProperty(CommandInterface::am_sourceID_t sourceID, CommandInterface::am_MainSoundProperty_s soundProperty, CommandInterface::am_Error_e& result);
+
+ virtual void SetSystemProperty(CommandInterface::am_SystemProperty_s soundProperty, CommandInterface::am_Error_e& result);
+
+ virtual void GetListMainConnections(CommandInterface::am_Error_e& result, CommandInterface::am_MainConnectionType_l& listConnections);
+
+ virtual void GetListMainSinks(CommandInterface::am_Error_e& result, CommandInterface::am_SinkType_l& listMainSinks);
+
+ virtual void GetListMainSources(CommandInterface::am_Error_e& result, CommandInterface::am_SourceType_l& listMainSources);
+
+ virtual void GetListMainSinkSoundProperties(CommandInterface::am_sinkID_t sinkID, CommandInterface::am_Error_e& result, CommandInterface::am_MainSoundProperty_l& listSoundProperties);
+
+ virtual void GetListMainSourceSoundProperties(CommandInterface::am_sourceID_t sourceID, CommandInterface::am_Error_e& result, CommandInterface::am_MainSoundProperty_l& listSourceProperties);
+
+ virtual void GetListSourceClasses(CommandInterface::am_Error_e& result, CommandInterface::am_SourceClass_l& listSourceClasses);
+
+ virtual void GetListSinkClasses(CommandInterface::am_Error_e& result, CommandInterface::am_SinkClass_l& listSinkClasses);
+
+ virtual void GetListSystemProperties(CommandInterface::am_Error_e& result, CommandInterface::am_SystemProperty_l& listSystemProperties);
+
+ virtual void GetTimingInformation(CommandInterface::am_mainConnectionID_t mainConnectionID, CommandInterface::am_Error_e& result, CommandInterface::am_timeSync_t& delay);
+};
+
+} /* namespace am */
+#endif /* CAMCOMMANDSENDERSERVICE_H_ */
diff --git a/PluginCommandInterfaceCAPI/include/configCommandCAPI.h b/PluginCommandInterfaceCAPI/include/configCommandCAPI.h
new file mode 100644
index 0000000..8bd2faa
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/include/configCommandCAPI.h
@@ -0,0 +1,4 @@
+#ifndef _COMMANDCAPI_CONFIG_H
+#define _COMMANDCAPI_CONFIG_H
+
+#endif /* _COMMANDCAPI_CONFIG_H */
diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterface.cpp b/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterface.cpp
new file mode 100644
index 0000000..d0e10bd
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterface.cpp
@@ -0,0 +1,332 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#include "CommandInterface.h"
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+
+CommandInterface::am_MainSoundProperty_s::am_MainSoundProperty_s(const am_MainSoundPropertyType_e& typeValue, const int16_t& valueValue):
+ type(typeValue),
+ value(valueValue)
+{
+}
+
+
+bool operator==(const CommandInterface::am_MainSoundProperty_s& lhs, const CommandInterface::am_MainSoundProperty_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.type == rhs.type &&
+ lhs.value == rhs.value
+ ;
+}
+
+void CommandInterface::am_MainSoundProperty_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> type;
+ inputStream >> value;
+}
+
+void CommandInterface::am_MainSoundProperty_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << type;
+ outputStream << value;
+}
+CommandInterface::am_SystemProperty_s::am_SystemProperty_s(const am_SystemPropertyType_e& typeValue, const int16_t& valueValue):
+ type(typeValue),
+ value(valueValue)
+{
+}
+
+
+bool operator==(const CommandInterface::am_SystemProperty_s& lhs, const CommandInterface::am_SystemProperty_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.type == rhs.type &&
+ lhs.value == rhs.value
+ ;
+}
+
+void CommandInterface::am_SystemProperty_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> type;
+ inputStream >> value;
+}
+
+void CommandInterface::am_SystemProperty_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << type;
+ outputStream << value;
+}
+CommandInterface::am_MainConnectionType_s::am_MainConnectionType_s(const am_mainConnectionID_t& mainConnectionIDValue, const am_sourceID_t& sourceIDValue, const am_sinkID_t& sinkIDValue, const am_timeSync_t& delayValue, const am_ConnectionState_e& connectionStateValue):
+ mainConnectionID(mainConnectionIDValue),
+ sourceID(sourceIDValue),
+ sinkID(sinkIDValue),
+ delay(delayValue),
+ connectionState(connectionStateValue)
+{
+}
+
+
+bool operator==(const CommandInterface::am_MainConnectionType_s& lhs, const CommandInterface::am_MainConnectionType_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.mainConnectionID == rhs.mainConnectionID &&
+ lhs.sourceID == rhs.sourceID &&
+ lhs.sinkID == rhs.sinkID &&
+ lhs.delay == rhs.delay &&
+ lhs.connectionState == rhs.connectionState
+ ;
+}
+
+void CommandInterface::am_MainConnectionType_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> mainConnectionID;
+ inputStream >> sourceID;
+ inputStream >> sinkID;
+ inputStream >> delay;
+ inputStream >> connectionState;
+}
+
+void CommandInterface::am_MainConnectionType_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << mainConnectionID;
+ outputStream << sourceID;
+ outputStream << sinkID;
+ outputStream << delay;
+ outputStream << connectionState;
+}
+CommandInterface::am_Availability_s::am_Availability_s(const am_Availablility_e& availabilityValue, const am_AvailabilityReason_e& availabilityReasonValue):
+ availability(availabilityValue),
+ availabilityReason(availabilityReasonValue)
+{
+}
+
+
+bool operator==(const CommandInterface::am_Availability_s& lhs, const CommandInterface::am_Availability_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.availability == rhs.availability &&
+ lhs.availabilityReason == rhs.availabilityReason
+ ;
+}
+
+void CommandInterface::am_Availability_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> availability;
+ inputStream >> availabilityReason;
+}
+
+void CommandInterface::am_Availability_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << availability;
+ outputStream << availabilityReason;
+}
+CommandInterface::am_SourceType_s::am_SourceType_s(const am_sourceID_t& sourceIDValue, const std::string& nameValue, const am_Availability_s& availabilityValue, const am_sourceClass_t& sourceClassIDValue):
+ sourceID(sourceIDValue),
+ name(nameValue),
+ availability(availabilityValue),
+ sourceClassID(sourceClassIDValue)
+{
+}
+
+
+bool operator==(const CommandInterface::am_SourceType_s& lhs, const CommandInterface::am_SourceType_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.sourceID == rhs.sourceID &&
+ lhs.name == rhs.name &&
+ lhs.availability == rhs.availability &&
+ lhs.sourceClassID == rhs.sourceClassID
+ ;
+}
+
+void CommandInterface::am_SourceType_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> sourceID;
+ inputStream >> name;
+ inputStream >> availability;
+ inputStream >> sourceClassID;
+}
+
+void CommandInterface::am_SourceType_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << sourceID;
+ outputStream << name;
+ outputStream << availability;
+ outputStream << sourceClassID;
+}
+CommandInterface::am_SinkType_s::am_SinkType_s(const am_sinkID_t& sinkIDValue, const std::string& nameValue, const am_Availability_s& availabilityValue, const am_mainVolume_t& volumeValue, const am_MuteState_e& muteStateValue, const am_sinkClass_t& sinkClassIDValue):
+ sinkID(sinkIDValue),
+ name(nameValue),
+ availability(availabilityValue),
+ volume(volumeValue),
+ muteState(muteStateValue),
+ sinkClassID(sinkClassIDValue)
+{
+}
+
+
+bool operator==(const CommandInterface::am_SinkType_s& lhs, const CommandInterface::am_SinkType_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.sinkID == rhs.sinkID &&
+ lhs.name == rhs.name &&
+ lhs.availability == rhs.availability &&
+ lhs.volume == rhs.volume &&
+ lhs.muteState == rhs.muteState &&
+ lhs.sinkClassID == rhs.sinkClassID
+ ;
+}
+
+void CommandInterface::am_SinkType_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> sinkID;
+ inputStream >> name;
+ inputStream >> availability;
+ inputStream >> volume;
+ inputStream >> muteState;
+ inputStream >> sinkClassID;
+}
+
+void CommandInterface::am_SinkType_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << sinkID;
+ outputStream << name;
+ outputStream << availability;
+ outputStream << volume;
+ outputStream << muteState;
+ outputStream << sinkClassID;
+}
+CommandInterface::am_ClassProperty_s::am_ClassProperty_s(const am_ClassProperty_e& classPropertyValue, const int16_t& valueValue):
+ classProperty(classPropertyValue),
+ value(valueValue)
+{
+}
+
+
+bool operator==(const CommandInterface::am_ClassProperty_s& lhs, const CommandInterface::am_ClassProperty_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.classProperty == rhs.classProperty &&
+ lhs.value == rhs.value
+ ;
+}
+
+void CommandInterface::am_ClassProperty_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> classProperty;
+ inputStream >> value;
+}
+
+void CommandInterface::am_ClassProperty_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << classProperty;
+ outputStream << value;
+}
+CommandInterface::am_SourceClass_s::am_SourceClass_s(const am_sourceClass_t& sourceClassIDValue, const std::string& nameValue, const am_ClassProperty_l& listClassPropertiesValue):
+ sourceClassID(sourceClassIDValue),
+ name(nameValue),
+ listClassProperties(listClassPropertiesValue)
+{
+}
+
+
+bool operator==(const CommandInterface::am_SourceClass_s& lhs, const CommandInterface::am_SourceClass_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.sourceClassID == rhs.sourceClassID &&
+ lhs.name == rhs.name &&
+ lhs.listClassProperties == rhs.listClassProperties
+ ;
+}
+
+void CommandInterface::am_SourceClass_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> sourceClassID;
+ inputStream >> name;
+ inputStream >> listClassProperties;
+}
+
+void CommandInterface::am_SourceClass_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << sourceClassID;
+ outputStream << name;
+ outputStream << listClassProperties;
+}
+CommandInterface::am_SinkClass_s::am_SinkClass_s(const am_sinkClass_t& sinkClassIDValue, const std::string& nameValue, const am_ClassProperty_l& listClassPropertiesValue):
+ sinkClassID(sinkClassIDValue),
+ name(nameValue),
+ listClassProperties(listClassPropertiesValue)
+{
+}
+
+
+bool operator==(const CommandInterface::am_SinkClass_s& lhs, const CommandInterface::am_SinkClass_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.sinkClassID == rhs.sinkClassID &&
+ lhs.name == rhs.name &&
+ lhs.listClassProperties == rhs.listClassProperties
+ ;
+}
+
+void CommandInterface::am_SinkClass_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> sinkClassID;
+ inputStream >> name;
+ inputStream >> listClassProperties;
+}
+
+void CommandInterface::am_SinkClass_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << sinkClassID;
+ outputStream << name;
+ outputStream << listClassProperties;
+}
+CommandInterface::am_NotificationPayload_s::am_NotificationPayload_s(const am::am_NotificationType_e& typeValue, const int16_t& valueValue):
+ type(typeValue),
+ value(valueValue)
+{
+}
+
+
+bool operator==(const CommandInterface::am_NotificationPayload_s& lhs, const CommandInterface::am_NotificationPayload_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.type == rhs.type &&
+ lhs.value == rhs.value
+ ;
+}
+
+void CommandInterface::am_NotificationPayload_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> type;
+ inputStream >> value;
+}
+
+void CommandInterface::am_NotificationPayload_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << type;
+ outputStream << value;
+}
+
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterface.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterface.h
new file mode 100644
index 0000000..252c0ef
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterface.h
@@ -0,0 +1,820 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_AUDIOMANAGER_Command_Interface_H_
+#define ORG_GENIVI_AUDIOMANAGER_Command_Interface_H_
+
+
+#include <org/genivi/audiomanager/am.h>
+
+#define COMMONAPI_INTERNAL_COMPILATION
+
+#include <CommonAPI/InputStream.h>
+#include <CommonAPI/OutputStream.h>
+#include <CommonAPI/SerializableStruct.h>
+#include <CommonAPI/types.h>
+#include <cstdint>
+#include <string>
+#include <vector>
+
+#undef COMMONAPI_INTERNAL_COMPILATION
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+
+class CommandInterface {
+ public:
+ virtual ~CommandInterface() { }
+
+ static inline const char* getInterfaceId();
+ static inline CommonAPI::Version getInterfaceVersion();
+ typedef uint16_t am_sourceID_t;
+
+ typedef uint16_t am_sinkID_t;
+
+ typedef uint16_t am_mainConnectionID_t;
+
+ typedef int16_t am_timeSync_t;
+
+ typedef int16_t am_mainVolume_t;
+
+ typedef uint16_t am_sourceClass_t;
+
+ typedef uint16_t am_sinkClass_t;
+
+ enum class am_Error_e: int32_t {
+ E_OK = 0x0,
+ E_OUT_OF_RANGE = 0x1,
+ E_NOT_USED = 0x2,
+ E_DATABASE_ERROR = 0x3,
+ E_ALREADY_EXISTS = 0x4,
+ E_NO_CHANGE = 0x5,
+ E_NOT_POSSIBLE = 0x6,
+ E_NON_EXISTENT = 0x7,
+ E_ABORTED = 0x8,
+ E_WRONG_FORMAT = 0x9,
+ E_MAX = 0xa
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_Error_eComparator;
+
+ enum class am_MuteState_e: int32_t {
+ MS_UNKNOWN = 0x0,
+ MS_MUTED = 0x1,
+ MS_UNMUTED = 0x2,
+ MS_MAX = 0x3
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_MuteState_eComparator;
+
+ enum class am_MainSoundPropertyType_e: int32_t {
+ MSP_UNKNOWN = 0x0,
+ MSP_EXAMPLE_TREBLE = 0x1,
+ MSP_EXAMPLE_MID = 0x2,
+ MSP_EXAMPLE_BASS = 0x3,
+ MSP_SOURCE_TYPE = 0x4,
+ MSP_MAX = 0x5
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_MainSoundPropertyType_eComparator;
+
+ enum class am_SystemPropertyType_e: int32_t {
+ SYP_UNKNOWN = 0x0,
+ SYP_MAX = 0x1
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_SystemPropertyType_eComparator;
+
+ enum class am_ConnectionState_e: int32_t {
+ CS_UNKNOWN = 0x0,
+ CS_CONNECTING = 0x1,
+ CS_CONNECTED = 0x2,
+ CS_DISCONNECTING = 0x3,
+ CS_DISCONNECTED = 0x4,
+ CS_SUSPENDED = 0x5,
+ CS_MAX = 0x6
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_ConnectionState_eComparator;
+
+ enum class am_Availablility_e: int32_t {
+ A_UNKNOWN = 0x0,
+ A_AVAILABLE = 0x1,
+ A_UNAVAILABLE = 0x2,
+ A_MAX = 0x3
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_Availablility_eComparator;
+
+ enum class am_AvailabilityReason_e: int32_t {
+ AR_UNKNOWN = 0x0,
+ AR_GENIVI_NEWMEDIA = 0x1,
+ AR_GENIVI_SAMEMEDIA = 0x2,
+ AR_GENIVI_NOMEDIA = 0x3,
+ AR_GENIVI_TEMPERATURE = 0x4,
+ AR_GENIVI_VOLTAGE = 0x5,
+ AR_GENIVI_ERRORMEDIA = 0x6,
+ AR_MAX = 0x7
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_AvailabilityReason_eComparator;
+
+ enum class am_ClassProperty_e: int32_t {
+ CP_UNKNOWN = 0x0,
+ CP_GENIVI_SOURCE_TYPE = 0x1,
+ CP_GENIVI_SINK_TYPE = 0x2,
+ CP_MAX = 0x3
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_ClassProperty_eComparator;
+
+ enum class am_InterruptState_e: int32_t {
+ IS_UNKNOWN = 0x0,
+ IS_OFF = 0x1,
+ IS_INTERRUPTED = 0x2,
+ IS_MAX = 0x3
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_InterruptState_eComparator;
+
+ struct am_MainSoundProperty_s: CommonAPI::SerializableStruct {
+ am_MainSoundPropertyType_e type;
+ int16_t value;
+
+ am_MainSoundProperty_s() = default;
+ am_MainSoundProperty_s(const am_MainSoundPropertyType_e& type, const int16_t& value);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.writeInt16Type();
+ }
+ };
+
+ typedef std::vector<am_MainSoundProperty_s> am_MainSoundProperty_l;
+
+ struct am_SystemProperty_s: CommonAPI::SerializableStruct {
+ am_SystemPropertyType_e type;
+ int16_t value;
+
+ am_SystemProperty_s() = default;
+ am_SystemProperty_s(const am_SystemPropertyType_e& type, const int16_t& value);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.writeInt16Type();
+ }
+ };
+
+ typedef std::vector<am_SystemProperty_s> am_SystemProperty_l;
+
+ struct am_MainConnectionType_s: CommonAPI::SerializableStruct {
+ am_mainConnectionID_t mainConnectionID;
+ am_sourceID_t sourceID;
+ am_sinkID_t sinkID;
+ am_timeSync_t delay;
+ am_ConnectionState_e connectionState;
+
+ am_MainConnectionType_s() = default;
+ am_MainConnectionType_s(const am_mainConnectionID_t& mainConnectionID, const am_sourceID_t& sourceID, const am_sinkID_t& sinkID, const am_timeSync_t& delay, const am_ConnectionState_e& connectionState);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeInt16Type();
+ typeOutputStream.writeInt32Type();
+ }
+ };
+
+ typedef std::vector<am_MainConnectionType_s> am_MainConnectionType_l;
+
+ struct am_Availability_s: CommonAPI::SerializableStruct {
+ am_Availablility_e availability;
+ am_AvailabilityReason_e availabilityReason;
+
+ am_Availability_s() = default;
+ am_Availability_s(const am_Availablility_e& availability, const am_AvailabilityReason_e& availabilityReason);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.writeInt32Type();
+ }
+ };
+
+ struct am_SourceType_s: CommonAPI::SerializableStruct {
+ am_sourceID_t sourceID;
+ std::string name;
+ am_Availability_s availability;
+ am_sourceClass_t sourceClassID;
+
+ am_SourceType_s() = default;
+ am_SourceType_s(const am_sourceID_t& sourceID, const std::string& name, const am_Availability_s& availability, const am_sourceClass_t& sourceClassID);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeStringType();
+ typeOutputStream.beginWriteStructType();
+ typeOutputStream.writeInt32Type();typeOutputStream.writeInt32Type();
+ typeOutputStream.endWriteStructType();
+ typeOutputStream.writeUInt16Type();
+ }
+ };
+
+ typedef std::vector<am_SourceType_s> am_SourceType_l;
+
+ struct am_SinkType_s: CommonAPI::SerializableStruct {
+ am_sinkID_t sinkID;
+ std::string name;
+ am_Availability_s availability;
+ am_mainVolume_t volume;
+ am_MuteState_e muteState;
+ am_sinkClass_t sinkClassID;
+
+ am_SinkType_s() = default;
+ am_SinkType_s(const am_sinkID_t& sinkID, const std::string& name, const am_Availability_s& availability, const am_mainVolume_t& volume, const am_MuteState_e& muteState, const am_sinkClass_t& sinkClassID);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeStringType();
+ typeOutputStream.beginWriteStructType();
+ typeOutputStream.writeInt32Type();typeOutputStream.writeInt32Type();
+ typeOutputStream.endWriteStructType();
+ typeOutputStream.writeInt16Type();
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.writeUInt16Type();
+ }
+ };
+
+ typedef std::vector<am_SinkType_s> am_SinkType_l;
+
+ struct am_ClassProperty_s: CommonAPI::SerializableStruct {
+ am_ClassProperty_e classProperty;
+ int16_t value;
+
+ am_ClassProperty_s() = default;
+ am_ClassProperty_s(const am_ClassProperty_e& classProperty, const int16_t& value);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.writeInt16Type();
+ }
+ };
+
+ typedef std::vector<am_ClassProperty_s> am_ClassProperty_l;
+
+ struct am_SourceClass_s: CommonAPI::SerializableStruct {
+ am_sourceClass_t sourceClassID;
+ std::string name;
+ am_ClassProperty_l listClassProperties;
+
+ am_SourceClass_s() = default;
+ am_SourceClass_s(const am_sourceClass_t& sourceClassID, const std::string& name, const am_ClassProperty_l& listClassProperties);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeStringType();
+ typeOutputStream.beginWriteVectorType();
+ typeOutputStream.beginWriteStructType();
+ typeOutputStream.writeInt32Type();typeOutputStream.writeInt16Type();
+ typeOutputStream.endWriteStructType();
+ typeOutputStream.endWriteVectorType();
+ }
+ };
+
+ typedef std::vector<am_SourceClass_s> am_SourceClass_l;
+
+ struct am_SinkClass_s: CommonAPI::SerializableStruct {
+ am_sinkClass_t sinkClassID;
+ std::string name;
+ am_ClassProperty_l listClassProperties;
+
+ am_SinkClass_s() = default;
+ am_SinkClass_s(const am_sinkClass_t& sinkClassID, const std::string& name, const am_ClassProperty_l& listClassProperties);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeStringType();
+ typeOutputStream.beginWriteVectorType();
+ typeOutputStream.beginWriteStructType();
+ typeOutputStream.writeInt32Type();typeOutputStream.writeInt16Type();
+ typeOutputStream.endWriteStructType();
+ typeOutputStream.endWriteVectorType();
+ }
+ };
+
+ typedef std::vector<am_SinkClass_s> am_SinkClass_l;
+
+ struct am_NotificationPayload_s: CommonAPI::SerializableStruct {
+ am::am_NotificationType_e type;
+ int16_t value;
+
+ am_NotificationPayload_s() = default;
+ am_NotificationPayload_s(const am::am_NotificationType_e& type, const int16_t& value);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.writeInt16Type();
+ }
+ };
+
+};
+
+const char* CommandInterface::getInterfaceId() {
+ return "org.genivi.audiomanager.CommandInterface";
+}
+
+CommonAPI::Version CommandInterface::getInterfaceVersion() {
+ return CommonAPI::Version(0, 1);
+}
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, CommandInterface::am_Error_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const CommandInterface::am_Error_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct CommandInterface::am_Error_eComparator {
+ inline bool operator()(const am_Error_e& lhs, const am_Error_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, CommandInterface::am_MuteState_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const CommandInterface::am_MuteState_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct CommandInterface::am_MuteState_eComparator {
+ inline bool operator()(const am_MuteState_e& lhs, const am_MuteState_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, CommandInterface::am_MainSoundPropertyType_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const CommandInterface::am_MainSoundPropertyType_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct CommandInterface::am_MainSoundPropertyType_eComparator {
+ inline bool operator()(const am_MainSoundPropertyType_e& lhs, const am_MainSoundPropertyType_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, CommandInterface::am_SystemPropertyType_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const CommandInterface::am_SystemPropertyType_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct CommandInterface::am_SystemPropertyType_eComparator {
+ inline bool operator()(const am_SystemPropertyType_e& lhs, const am_SystemPropertyType_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, CommandInterface::am_ConnectionState_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const CommandInterface::am_ConnectionState_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct CommandInterface::am_ConnectionState_eComparator {
+ inline bool operator()(const am_ConnectionState_e& lhs, const am_ConnectionState_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, CommandInterface::am_Availablility_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const CommandInterface::am_Availablility_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct CommandInterface::am_Availablility_eComparator {
+ inline bool operator()(const am_Availablility_e& lhs, const am_Availablility_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, CommandInterface::am_AvailabilityReason_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const CommandInterface::am_AvailabilityReason_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct CommandInterface::am_AvailabilityReason_eComparator {
+ inline bool operator()(const am_AvailabilityReason_e& lhs, const am_AvailabilityReason_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, CommandInterface::am_ClassProperty_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const CommandInterface::am_ClassProperty_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct CommandInterface::am_ClassProperty_eComparator {
+ inline bool operator()(const am_ClassProperty_e& lhs, const am_ClassProperty_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, CommandInterface::am_InterruptState_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const CommandInterface::am_InterruptState_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct CommandInterface::am_InterruptState_eComparator {
+ inline bool operator()(const am_InterruptState_e& lhs, const am_InterruptState_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+bool operator==(const CommandInterface::am_MainSoundProperty_s& lhs, const CommandInterface::am_MainSoundProperty_s& rhs);
+inline bool operator!=(const CommandInterface::am_MainSoundProperty_s& lhs, const CommandInterface::am_MainSoundProperty_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const CommandInterface::am_SystemProperty_s& lhs, const CommandInterface::am_SystemProperty_s& rhs);
+inline bool operator!=(const CommandInterface::am_SystemProperty_s& lhs, const CommandInterface::am_SystemProperty_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const CommandInterface::am_MainConnectionType_s& lhs, const CommandInterface::am_MainConnectionType_s& rhs);
+inline bool operator!=(const CommandInterface::am_MainConnectionType_s& lhs, const CommandInterface::am_MainConnectionType_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const CommandInterface::am_Availability_s& lhs, const CommandInterface::am_Availability_s& rhs);
+inline bool operator!=(const CommandInterface::am_Availability_s& lhs, const CommandInterface::am_Availability_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const CommandInterface::am_SourceType_s& lhs, const CommandInterface::am_SourceType_s& rhs);
+inline bool operator!=(const CommandInterface::am_SourceType_s& lhs, const CommandInterface::am_SourceType_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const CommandInterface::am_SinkType_s& lhs, const CommandInterface::am_SinkType_s& rhs);
+inline bool operator!=(const CommandInterface::am_SinkType_s& lhs, const CommandInterface::am_SinkType_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const CommandInterface::am_ClassProperty_s& lhs, const CommandInterface::am_ClassProperty_s& rhs);
+inline bool operator!=(const CommandInterface::am_ClassProperty_s& lhs, const CommandInterface::am_ClassProperty_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const CommandInterface::am_SourceClass_s& lhs, const CommandInterface::am_SourceClass_s& rhs);
+inline bool operator!=(const CommandInterface::am_SourceClass_s& lhs, const CommandInterface::am_SourceClass_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const CommandInterface::am_SinkClass_s& lhs, const CommandInterface::am_SinkClass_s& rhs);
+inline bool operator!=(const CommandInterface::am_SinkClass_s& lhs, const CommandInterface::am_SinkClass_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const CommandInterface::am_NotificationPayload_s& lhs, const CommandInterface::am_NotificationPayload_s& rhs);
+inline bool operator!=(const CommandInterface::am_NotificationPayload_s& lhs, const CommandInterface::am_NotificationPayload_s& rhs) {
+ return !(lhs == rhs);
+}
+
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
+
+namespace CommonAPI {
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::CommandInterface::am_Error_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::CommandInterface::am_Error_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::CommandInterface::am_Error_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::CommandInterface::am_Error_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::CommandInterface::am_Error_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::CommandInterface::am_MuteState_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::CommandInterface::am_MuteState_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::CommandInterface::am_MuteState_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::CommandInterface::am_MuteState_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::CommandInterface::am_MuteState_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::CommandInterface::am_MainSoundPropertyType_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::CommandInterface::am_MainSoundPropertyType_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::CommandInterface::am_MainSoundPropertyType_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::CommandInterface::am_MainSoundPropertyType_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::CommandInterface::am_MainSoundPropertyType_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::CommandInterface::am_SystemPropertyType_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::CommandInterface::am_SystemPropertyType_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::CommandInterface::am_SystemPropertyType_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::CommandInterface::am_SystemPropertyType_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::CommandInterface::am_SystemPropertyType_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::CommandInterface::am_ConnectionState_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::CommandInterface::am_ConnectionState_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::CommandInterface::am_ConnectionState_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::CommandInterface::am_ConnectionState_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::CommandInterface::am_ConnectionState_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::CommandInterface::am_Availablility_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::CommandInterface::am_Availablility_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::CommandInterface::am_Availablility_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::CommandInterface::am_Availablility_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::CommandInterface::am_Availablility_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::CommandInterface::am_AvailabilityReason_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::CommandInterface::am_AvailabilityReason_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::CommandInterface::am_AvailabilityReason_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::CommandInterface::am_AvailabilityReason_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::CommandInterface::am_AvailabilityReason_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::CommandInterface::am_ClassProperty_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::CommandInterface::am_ClassProperty_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::CommandInterface::am_ClassProperty_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::CommandInterface::am_ClassProperty_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::CommandInterface::am_ClassProperty_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::CommandInterface::am_InterruptState_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::CommandInterface::am_InterruptState_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::CommandInterface::am_InterruptState_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::CommandInterface::am_InterruptState_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::CommandInterface::am_InterruptState_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+
+}
+
+
+namespace std {
+ //hashes for types
+ //Hash for am_Error_e
+ template<>
+ struct hash<org::genivi::audiomanager::CommandInterface::am_Error_e> {
+ inline size_t operator()(const org::genivi::audiomanager::CommandInterface::am_Error_e& am_Error_e) const {
+ return static_cast<int32_t>(am_Error_e);
+ }
+ };
+ //Hash for am_MuteState_e
+ template<>
+ struct hash<org::genivi::audiomanager::CommandInterface::am_MuteState_e> {
+ inline size_t operator()(const org::genivi::audiomanager::CommandInterface::am_MuteState_e& am_MuteState_e) const {
+ return static_cast<int32_t>(am_MuteState_e);
+ }
+ };
+ //Hash for am_MainSoundPropertyType_e
+ template<>
+ struct hash<org::genivi::audiomanager::CommandInterface::am_MainSoundPropertyType_e> {
+ inline size_t operator()(const org::genivi::audiomanager::CommandInterface::am_MainSoundPropertyType_e& am_MainSoundPropertyType_e) const {
+ return static_cast<int32_t>(am_MainSoundPropertyType_e);
+ }
+ };
+ //Hash for am_SystemPropertyType_e
+ template<>
+ struct hash<org::genivi::audiomanager::CommandInterface::am_SystemPropertyType_e> {
+ inline size_t operator()(const org::genivi::audiomanager::CommandInterface::am_SystemPropertyType_e& am_SystemPropertyType_e) const {
+ return static_cast<int32_t>(am_SystemPropertyType_e);
+ }
+ };
+ //Hash for am_ConnectionState_e
+ template<>
+ struct hash<org::genivi::audiomanager::CommandInterface::am_ConnectionState_e> {
+ inline size_t operator()(const org::genivi::audiomanager::CommandInterface::am_ConnectionState_e& am_ConnectionState_e) const {
+ return static_cast<int32_t>(am_ConnectionState_e);
+ }
+ };
+ //Hash for am_Availablility_e
+ template<>
+ struct hash<org::genivi::audiomanager::CommandInterface::am_Availablility_e> {
+ inline size_t operator()(const org::genivi::audiomanager::CommandInterface::am_Availablility_e& am_Availablility_e) const {
+ return static_cast<int32_t>(am_Availablility_e);
+ }
+ };
+ //Hash for am_AvailabilityReason_e
+ template<>
+ struct hash<org::genivi::audiomanager::CommandInterface::am_AvailabilityReason_e> {
+ inline size_t operator()(const org::genivi::audiomanager::CommandInterface::am_AvailabilityReason_e& am_AvailabilityReason_e) const {
+ return static_cast<int32_t>(am_AvailabilityReason_e);
+ }
+ };
+ //Hash for am_ClassProperty_e
+ template<>
+ struct hash<org::genivi::audiomanager::CommandInterface::am_ClassProperty_e> {
+ inline size_t operator()(const org::genivi::audiomanager::CommandInterface::am_ClassProperty_e& am_ClassProperty_e) const {
+ return static_cast<int32_t>(am_ClassProperty_e);
+ }
+ };
+ //Hash for am_InterruptState_e
+ template<>
+ struct hash<org::genivi::audiomanager::CommandInterface::am_InterruptState_e> {
+ inline size_t operator()(const org::genivi::audiomanager::CommandInterface::am_InterruptState_e& am_InterruptState_e) const {
+ return static_cast<int32_t>(am_InterruptState_e);
+ }
+ };
+
+ //hashes for error types
+}
+
+#endif // ORG_GENIVI_AUDIOMANAGER_Command_Interface_H_
diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceDBusProxy.cpp b/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceDBusProxy.cpp
new file mode 100644
index 0000000..b178ee7
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceDBusProxy.cpp
@@ -0,0 +1,458 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#include "CommandInterfaceDBusProxy.h"
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+
+std::shared_ptr<CommonAPI::DBus::DBusProxy> createCommandInterfaceDBusProxy(
+ const std::string& commonApiAddress,
+ const std::string& interfaceName,
+ const std::string& busName,
+ const std::string& objectPath,
+ const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection) {
+ return std::make_shared<CommandInterfaceDBusProxy>(commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection);
+}
+
+__attribute__((constructor)) void registerCommandInterfaceDBusProxy(void) {
+ CommonAPI::DBus::DBusFactory::registerProxyFactoryMethod(CommandInterface::getInterfaceId(),
+ &createCommandInterfaceDBusProxy);
+}
+
+CommandInterfaceDBusProxy::CommandInterfaceDBusProxy(
+ const std::string& commonApiAddress,
+ const std::string& interfaceName,
+ const std::string& busName,
+ const std::string& objectPath,
+ const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection):
+ CommonAPI::DBus::DBusProxy(commonApiAddress, interfaceName, busName, objectPath, dbusProxyconnection)
+, numberOfMainConnectionsChanged_(*this, "NumberOfMainConnectionsChanged", ""),
+ mainConnectionStateChanged_(*this, "MainConnectionStateChanged", "qi"),
+ numberOfSourceClassesChanged_(*this, "NumberOfSourceClassesChanged", ""),
+ sourceAdded_(*this, "SourceAdded", "(qs(ii)q)"),
+ sourceRemoved_(*this, "SourceRemoved", "q"),
+ mainSourceSoundPropertyChanged_(*this, "MainSourceSoundPropertyChanged", "q(in)"),
+ sourceAvailabilityChanged_(*this, "SourceAvailabilityChanged", "q(ii)"),
+ numberOfSinkClassesChanged_(*this, "NumberOfSinkClassesChanged", ""),
+ sinkAdded_(*this, "SinkAdded", "(qs(ii)niq)"),
+ sinkRemoved_(*this, "SinkRemoved", "q"),
+ mainSinkSoundPropertyChanged_(*this, "MainSinkSoundPropertyChanged", "q(in)"),
+ sinkAvailabilityChanged_(*this, "SinkAvailabilityChanged", "q(ii)"),
+ volumeChanged_(*this, "VolumeChanged", "qn"),
+ sinkMuteStateChanged_(*this, "SinkMuteStateChanged", "qi"),
+ systemPropertyChanged_(*this, "SystemPropertyChanged", "(in)"),
+ timingInformationChanged_(*this, "TimingInformationChanged", "qn"),
+ sinkUpdated_(*this, "SinkUpdated", "qqa(in)"),
+ sourceUpdated_(*this, "SourceUpdated", "qqa(in)"),
+ sinkNotification_(*this, "SinkNotification", "q(in)"),
+ sourceNotification_(*this, "SourceNotification", "q(in)"),
+ mainSinkNotificationConfigurationChanged_(*this, "MainSinkNotificationConfigurationChanged", "q(iin)"),
+ mainSourceNotificationConfigurationChanged_(*this, "MainSourceNotificationConfigurationChanged", "q(iin)")
+ {
+}
+
+
+CommandInterfaceDBusProxy::NumberOfMainConnectionsChangedEvent& CommandInterfaceDBusProxy::getNumberOfMainConnectionsChangedEvent() {
+ return numberOfMainConnectionsChanged_;
+}
+CommandInterfaceDBusProxy::MainConnectionStateChangedEvent& CommandInterfaceDBusProxy::getMainConnectionStateChangedEvent() {
+ return mainConnectionStateChanged_;
+}
+CommandInterfaceDBusProxy::NumberOfSourceClassesChangedEvent& CommandInterfaceDBusProxy::getNumberOfSourceClassesChangedEvent() {
+ return numberOfSourceClassesChanged_;
+}
+CommandInterfaceDBusProxy::SourceAddedEvent& CommandInterfaceDBusProxy::getSourceAddedEvent() {
+ return sourceAdded_;
+}
+CommandInterfaceDBusProxy::SourceRemovedEvent& CommandInterfaceDBusProxy::getSourceRemovedEvent() {
+ return sourceRemoved_;
+}
+CommandInterfaceDBusProxy::MainSourceSoundPropertyChangedEvent& CommandInterfaceDBusProxy::getMainSourceSoundPropertyChangedEvent() {
+ return mainSourceSoundPropertyChanged_;
+}
+CommandInterfaceDBusProxy::SourceAvailabilityChangedEvent& CommandInterfaceDBusProxy::getSourceAvailabilityChangedEvent() {
+ return sourceAvailabilityChanged_;
+}
+CommandInterfaceDBusProxy::NumberOfSinkClassesChangedEvent& CommandInterfaceDBusProxy::getNumberOfSinkClassesChangedEvent() {
+ return numberOfSinkClassesChanged_;
+}
+CommandInterfaceDBusProxy::SinkAddedEvent& CommandInterfaceDBusProxy::getSinkAddedEvent() {
+ return sinkAdded_;
+}
+CommandInterfaceDBusProxy::SinkRemovedEvent& CommandInterfaceDBusProxy::getSinkRemovedEvent() {
+ return sinkRemoved_;
+}
+CommandInterfaceDBusProxy::MainSinkSoundPropertyChangedEvent& CommandInterfaceDBusProxy::getMainSinkSoundPropertyChangedEvent() {
+ return mainSinkSoundPropertyChanged_;
+}
+CommandInterfaceDBusProxy::SinkAvailabilityChangedEvent& CommandInterfaceDBusProxy::getSinkAvailabilityChangedEvent() {
+ return sinkAvailabilityChanged_;
+}
+CommandInterfaceDBusProxy::VolumeChangedEvent& CommandInterfaceDBusProxy::getVolumeChangedEvent() {
+ return volumeChanged_;
+}
+CommandInterfaceDBusProxy::SinkMuteStateChangedEvent& CommandInterfaceDBusProxy::getSinkMuteStateChangedEvent() {
+ return sinkMuteStateChanged_;
+}
+CommandInterfaceDBusProxy::SystemPropertyChangedEvent& CommandInterfaceDBusProxy::getSystemPropertyChangedEvent() {
+ return systemPropertyChanged_;
+}
+CommandInterfaceDBusProxy::TimingInformationChangedEvent& CommandInterfaceDBusProxy::getTimingInformationChangedEvent() {
+ return timingInformationChanged_;
+}
+CommandInterfaceDBusProxy::SinkUpdatedEvent& CommandInterfaceDBusProxy::getSinkUpdatedEvent() {
+ return sinkUpdated_;
+}
+CommandInterfaceDBusProxy::SourceUpdatedEvent& CommandInterfaceDBusProxy::getSourceUpdatedEvent() {
+ return sourceUpdated_;
+}
+CommandInterfaceDBusProxy::SinkNotificationEvent& CommandInterfaceDBusProxy::getSinkNotificationEvent() {
+ return sinkNotification_;
+}
+CommandInterfaceDBusProxy::SourceNotificationEvent& CommandInterfaceDBusProxy::getSourceNotificationEvent() {
+ return sourceNotification_;
+}
+CommandInterfaceDBusProxy::MainSinkNotificationConfigurationChangedEvent& CommandInterfaceDBusProxy::getMainSinkNotificationConfigurationChangedEvent() {
+ return mainSinkNotificationConfigurationChanged_;
+}
+CommandInterfaceDBusProxy::MainSourceNotificationConfigurationChangedEvent& CommandInterfaceDBusProxy::getMainSourceNotificationConfigurationChangedEvent() {
+ return mainSourceNotificationConfigurationChanged_;
+}
+
+void CommandInterfaceDBusProxy::Connect(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_sinkID_t& sinkID, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_mainConnectionID_t& mainConnectionID) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_sourceID_t, CommandInterface::am_sinkID_t>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e, CommandInterface::am_mainConnectionID_t> >::callMethodWithReply(
+ *this,
+ "Connect",
+ "qq",
+ sourceID, sinkID,
+ callStatus
+ , result, mainConnectionID);
+}
+std::future<CommonAPI::CallStatus> CommandInterfaceDBusProxy::ConnectAsync(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_sinkID_t& sinkID, ConnectAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_sourceID_t, CommandInterface::am_sinkID_t>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e, CommandInterface::am_mainConnectionID_t> >::callMethodAsync(
+ *this,
+ "Connect",
+ "qq",
+ sourceID, sinkID,
+ std::move(callback));
+}
+void CommandInterfaceDBusProxy::Disconnect(const CommandInterface::am_mainConnectionID_t& mainConnectionID, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_mainConnectionID_t>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e> >::callMethodWithReply(
+ *this,
+ "Disconnect",
+ "q",
+ mainConnectionID,
+ callStatus
+ , result);
+}
+std::future<CommonAPI::CallStatus> CommandInterfaceDBusProxy::DisconnectAsync(const CommandInterface::am_mainConnectionID_t& mainConnectionID, DisconnectAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_mainConnectionID_t>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e> >::callMethodAsync(
+ *this,
+ "Disconnect",
+ "q",
+ mainConnectionID,
+ std::move(callback));
+}
+void CommandInterfaceDBusProxy::SetVolume(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_mainVolume_t& volume, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_sinkID_t, CommandInterface::am_mainVolume_t>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e> >::callMethodWithReply(
+ *this,
+ "SetVolume",
+ "qn",
+ sinkID, volume,
+ callStatus
+ , result);
+}
+std::future<CommonAPI::CallStatus> CommandInterfaceDBusProxy::SetVolumeAsync(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_mainVolume_t& volume, SetVolumeAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_sinkID_t, CommandInterface::am_mainVolume_t>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e> >::callMethodAsync(
+ *this,
+ "SetVolume",
+ "qn",
+ sinkID, volume,
+ std::move(callback));
+}
+void CommandInterfaceDBusProxy::VolumeStep(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_mainVolume_t& volumeStep, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_sinkID_t, CommandInterface::am_mainVolume_t>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e> >::callMethodWithReply(
+ *this,
+ "VolumeStep",
+ "qn",
+ sinkID, volumeStep,
+ callStatus
+ , result);
+}
+std::future<CommonAPI::CallStatus> CommandInterfaceDBusProxy::VolumeStepAsync(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_mainVolume_t& volumeStep, VolumeStepAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_sinkID_t, CommandInterface::am_mainVolume_t>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e> >::callMethodAsync(
+ *this,
+ "VolumeStep",
+ "qn",
+ sinkID, volumeStep,
+ std::move(callback));
+}
+void CommandInterfaceDBusProxy::SetSinkMuteState(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MuteState_e& muteState, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_sinkID_t, CommandInterface::am_MuteState_e>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e> >::callMethodWithReply(
+ *this,
+ "SetSinkMuteState",
+ "qi",
+ sinkID, muteState,
+ callStatus
+ , result);
+}
+std::future<CommonAPI::CallStatus> CommandInterfaceDBusProxy::SetSinkMuteStateAsync(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MuteState_e& muteState, SetSinkMuteStateAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_sinkID_t, CommandInterface::am_MuteState_e>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e> >::callMethodAsync(
+ *this,
+ "SetSinkMuteState",
+ "qi",
+ sinkID, muteState,
+ std::move(callback));
+}
+void CommandInterfaceDBusProxy::SetMainSinkSoundProperty(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MainSoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_sinkID_t, CommandInterface::am_MainSoundProperty_s>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e> >::callMethodWithReply(
+ *this,
+ "SetMainSinkSoundProperty",
+ "q(in)",
+ sinkID, soundProperty,
+ callStatus
+ , result);
+}
+std::future<CommonAPI::CallStatus> CommandInterfaceDBusProxy::SetMainSinkSoundPropertyAsync(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MainSoundProperty_s& soundProperty, SetMainSinkSoundPropertyAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_sinkID_t, CommandInterface::am_MainSoundProperty_s>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e> >::callMethodAsync(
+ *this,
+ "SetMainSinkSoundProperty",
+ "q(in)",
+ sinkID, soundProperty,
+ std::move(callback));
+}
+void CommandInterfaceDBusProxy::SetMainSourceSoundProperty(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_MainSoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_sourceID_t, CommandInterface::am_MainSoundProperty_s>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e> >::callMethodWithReply(
+ *this,
+ "SetMainSourceSoundProperty",
+ "q(in)",
+ sourceID, soundProperty,
+ callStatus
+ , result);
+}
+std::future<CommonAPI::CallStatus> CommandInterfaceDBusProxy::SetMainSourceSoundPropertyAsync(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_MainSoundProperty_s& soundProperty, SetMainSourceSoundPropertyAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_sourceID_t, CommandInterface::am_MainSoundProperty_s>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e> >::callMethodAsync(
+ *this,
+ "SetMainSourceSoundProperty",
+ "q(in)",
+ sourceID, soundProperty,
+ std::move(callback));
+}
+void CommandInterfaceDBusProxy::SetSystemProperty(const CommandInterface::am_SystemProperty_s& soundProperty, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_SystemProperty_s>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e> >::callMethodWithReply(
+ *this,
+ "SetSystemProperty",
+ "(in)",
+ soundProperty,
+ callStatus
+ , result);
+}
+std::future<CommonAPI::CallStatus> CommandInterfaceDBusProxy::SetSystemPropertyAsync(const CommandInterface::am_SystemProperty_s& soundProperty, SetSystemPropertyAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_SystemProperty_s>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e> >::callMethodAsync(
+ *this,
+ "SetSystemProperty",
+ "(in)",
+ soundProperty,
+ std::move(callback));
+}
+void CommandInterfaceDBusProxy::GetListMainConnections(CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_MainConnectionType_l& listConnections) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e, CommandInterface::am_MainConnectionType_l> >::callMethodWithReply(
+ *this,
+ "GetListMainConnections",
+ "",
+ callStatus
+ , result, listConnections);
+}
+std::future<CommonAPI::CallStatus> CommandInterfaceDBusProxy::GetListMainConnectionsAsync(GetListMainConnectionsAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e, CommandInterface::am_MainConnectionType_l> >::callMethodAsync(
+ *this,
+ "GetListMainConnections",
+ "",
+ std::move(callback));
+}
+void CommandInterfaceDBusProxy::GetListMainSinks(CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_SinkType_l& listMainSinks) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e, CommandInterface::am_SinkType_l> >::callMethodWithReply(
+ *this,
+ "GetListMainSinks",
+ "",
+ callStatus
+ , result, listMainSinks);
+}
+std::future<CommonAPI::CallStatus> CommandInterfaceDBusProxy::GetListMainSinksAsync(GetListMainSinksAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e, CommandInterface::am_SinkType_l> >::callMethodAsync(
+ *this,
+ "GetListMainSinks",
+ "",
+ std::move(callback));
+}
+void CommandInterfaceDBusProxy::GetListMainSources(CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_SourceType_l& listMainSources) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e, CommandInterface::am_SourceType_l> >::callMethodWithReply(
+ *this,
+ "GetListMainSources",
+ "",
+ callStatus
+ , result, listMainSources);
+}
+std::future<CommonAPI::CallStatus> CommandInterfaceDBusProxy::GetListMainSourcesAsync(GetListMainSourcesAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e, CommandInterface::am_SourceType_l> >::callMethodAsync(
+ *this,
+ "GetListMainSources",
+ "",
+ std::move(callback));
+}
+void CommandInterfaceDBusProxy::GetListMainSinkSoundProperties(const CommandInterface::am_sinkID_t& sinkID, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_MainSoundProperty_l& listSoundProperties) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_sinkID_t>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e, CommandInterface::am_MainSoundProperty_l> >::callMethodWithReply(
+ *this,
+ "GetListMainSinkSoundProperties",
+ "q",
+ sinkID,
+ callStatus
+ , result, listSoundProperties);
+}
+std::future<CommonAPI::CallStatus> CommandInterfaceDBusProxy::GetListMainSinkSoundPropertiesAsync(const CommandInterface::am_sinkID_t& sinkID, GetListMainSinkSoundPropertiesAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_sinkID_t>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e, CommandInterface::am_MainSoundProperty_l> >::callMethodAsync(
+ *this,
+ "GetListMainSinkSoundProperties",
+ "q",
+ sinkID,
+ std::move(callback));
+}
+void CommandInterfaceDBusProxy::GetListMainSourceSoundProperties(const CommandInterface::am_sourceID_t& sourceID, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_MainSoundProperty_l& listSourceProperties) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_sourceID_t>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e, CommandInterface::am_MainSoundProperty_l> >::callMethodWithReply(
+ *this,
+ "GetListMainSourceSoundProperties",
+ "q",
+ sourceID,
+ callStatus
+ , result, listSourceProperties);
+}
+std::future<CommonAPI::CallStatus> CommandInterfaceDBusProxy::GetListMainSourceSoundPropertiesAsync(const CommandInterface::am_sourceID_t& sourceID, GetListMainSourceSoundPropertiesAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_sourceID_t>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e, CommandInterface::am_MainSoundProperty_l> >::callMethodAsync(
+ *this,
+ "GetListMainSourceSoundProperties",
+ "q",
+ sourceID,
+ std::move(callback));
+}
+void CommandInterfaceDBusProxy::GetListSourceClasses(CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_SourceClass_l& listSourceClasses) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e, CommandInterface::am_SourceClass_l> >::callMethodWithReply(
+ *this,
+ "GetListSourceClasses",
+ "",
+ callStatus
+ , result, listSourceClasses);
+}
+std::future<CommonAPI::CallStatus> CommandInterfaceDBusProxy::GetListSourceClassesAsync(GetListSourceClassesAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e, CommandInterface::am_SourceClass_l> >::callMethodAsync(
+ *this,
+ "GetListSourceClasses",
+ "",
+ std::move(callback));
+}
+void CommandInterfaceDBusProxy::GetListSinkClasses(CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_SinkClass_l& listSinkClasses) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e, CommandInterface::am_SinkClass_l> >::callMethodWithReply(
+ *this,
+ "GetListSinkClasses",
+ "",
+ callStatus
+ , result, listSinkClasses);
+}
+std::future<CommonAPI::CallStatus> CommandInterfaceDBusProxy::GetListSinkClassesAsync(GetListSinkClassesAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e, CommandInterface::am_SinkClass_l> >::callMethodAsync(
+ *this,
+ "GetListSinkClasses",
+ "",
+ std::move(callback));
+}
+void CommandInterfaceDBusProxy::GetListSystemProperties(CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_SystemProperty_l& listSystemProperties) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e, CommandInterface::am_SystemProperty_l> >::callMethodWithReply(
+ *this,
+ "GetListSystemProperties",
+ "",
+ callStatus
+ , result, listSystemProperties);
+}
+std::future<CommonAPI::CallStatus> CommandInterfaceDBusProxy::GetListSystemPropertiesAsync(GetListSystemPropertiesAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e, CommandInterface::am_SystemProperty_l> >::callMethodAsync(
+ *this,
+ "GetListSystemProperties",
+ "",
+ std::move(callback));
+}
+void CommandInterfaceDBusProxy::GetTimingInformation(const CommandInterface::am_mainConnectionID_t& mainConnectionID, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_timeSync_t& delay) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_mainConnectionID_t>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e, CommandInterface::am_timeSync_t> >::callMethodWithReply(
+ *this,
+ "GetTimingInformation",
+ "q",
+ mainConnectionID,
+ callStatus
+ , result, delay);
+}
+std::future<CommonAPI::CallStatus> CommandInterfaceDBusProxy::GetTimingInformationAsync(const CommandInterface::am_mainConnectionID_t& mainConnectionID, GetTimingInformationAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_mainConnectionID_t>,
+ CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_Error_e, CommandInterface::am_timeSync_t> >::callMethodAsync(
+ *this,
+ "GetTimingInformation",
+ "q",
+ mainConnectionID,
+ std::move(callback));
+}
+
+void CommandInterfaceDBusProxy::getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const {
+ ownVersionMajor = 0;
+ ownVersionMinor = 1;
+}
+
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceDBusProxy.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceDBusProxy.h
new file mode 100644
index 0000000..719692b
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceDBusProxy.h
@@ -0,0 +1,157 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_AUDIOMANAGER_Command_Interface_DBUS_PROXY_H_
+#define ORG_GENIVI_AUDIOMANAGER_Command_Interface_DBUS_PROXY_H_
+
+#include <org/genivi/audiomanager/CommandInterfaceProxyBase.h>
+
+#define COMMONAPI_INTERNAL_COMPILATION
+
+#include <CommonAPI/DBus/DBusFactory.h>
+#include <CommonAPI/DBus/DBusProxy.h>
+#include <CommonAPI/DBus/DBusEvent.h>
+
+#undef COMMONAPI_INTERNAL_COMPILATION
+
+#include <string>
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+
+class CommandInterfaceDBusProxy: virtual public CommandInterfaceProxyBase, virtual public CommonAPI::DBus::DBusProxy {
+ public:
+ CommandInterfaceDBusProxy(
+ const std::string& commonApiAddress,
+ const std::string& interfaceName,
+ const std::string& busName,
+ const std::string& objectPath,
+ const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection);
+
+ virtual ~CommandInterfaceDBusProxy() { }
+
+
+ virtual NumberOfMainConnectionsChangedEvent& getNumberOfMainConnectionsChangedEvent();
+ virtual MainConnectionStateChangedEvent& getMainConnectionStateChangedEvent();
+ virtual NumberOfSourceClassesChangedEvent& getNumberOfSourceClassesChangedEvent();
+ virtual SourceAddedEvent& getSourceAddedEvent();
+ virtual SourceRemovedEvent& getSourceRemovedEvent();
+ virtual MainSourceSoundPropertyChangedEvent& getMainSourceSoundPropertyChangedEvent();
+ virtual SourceAvailabilityChangedEvent& getSourceAvailabilityChangedEvent();
+ virtual NumberOfSinkClassesChangedEvent& getNumberOfSinkClassesChangedEvent();
+ virtual SinkAddedEvent& getSinkAddedEvent();
+ virtual SinkRemovedEvent& getSinkRemovedEvent();
+ virtual MainSinkSoundPropertyChangedEvent& getMainSinkSoundPropertyChangedEvent();
+ virtual SinkAvailabilityChangedEvent& getSinkAvailabilityChangedEvent();
+ virtual VolumeChangedEvent& getVolumeChangedEvent();
+ virtual SinkMuteStateChangedEvent& getSinkMuteStateChangedEvent();
+ virtual SystemPropertyChangedEvent& getSystemPropertyChangedEvent();
+ virtual TimingInformationChangedEvent& getTimingInformationChangedEvent();
+ virtual SinkUpdatedEvent& getSinkUpdatedEvent();
+ virtual SourceUpdatedEvent& getSourceUpdatedEvent();
+ virtual SinkNotificationEvent& getSinkNotificationEvent();
+ virtual SourceNotificationEvent& getSourceNotificationEvent();
+ virtual MainSinkNotificationConfigurationChangedEvent& getMainSinkNotificationConfigurationChangedEvent();
+ virtual MainSourceNotificationConfigurationChangedEvent& getMainSourceNotificationConfigurationChangedEvent();
+
+
+ virtual void Connect(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_sinkID_t& sinkID, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_mainConnectionID_t& mainConnectionID);
+ virtual std::future<CommonAPI::CallStatus> ConnectAsync(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_sinkID_t& sinkID, ConnectAsyncCallback callback);
+
+ virtual void Disconnect(const CommandInterface::am_mainConnectionID_t& mainConnectionID, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result);
+ virtual std::future<CommonAPI::CallStatus> DisconnectAsync(const CommandInterface::am_mainConnectionID_t& mainConnectionID, DisconnectAsyncCallback callback);
+
+ virtual void SetVolume(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_mainVolume_t& volume, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result);
+ virtual std::future<CommonAPI::CallStatus> SetVolumeAsync(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_mainVolume_t& volume, SetVolumeAsyncCallback callback);
+
+ virtual void VolumeStep(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_mainVolume_t& volumeStep, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result);
+ virtual std::future<CommonAPI::CallStatus> VolumeStepAsync(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_mainVolume_t& volumeStep, VolumeStepAsyncCallback callback);
+
+ virtual void SetSinkMuteState(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MuteState_e& muteState, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result);
+ virtual std::future<CommonAPI::CallStatus> SetSinkMuteStateAsync(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MuteState_e& muteState, SetSinkMuteStateAsyncCallback callback);
+
+ virtual void SetMainSinkSoundProperty(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MainSoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result);
+ virtual std::future<CommonAPI::CallStatus> SetMainSinkSoundPropertyAsync(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MainSoundProperty_s& soundProperty, SetMainSinkSoundPropertyAsyncCallback callback);
+
+ virtual void SetMainSourceSoundProperty(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_MainSoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result);
+ virtual std::future<CommonAPI::CallStatus> SetMainSourceSoundPropertyAsync(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_MainSoundProperty_s& soundProperty, SetMainSourceSoundPropertyAsyncCallback callback);
+
+ virtual void SetSystemProperty(const CommandInterface::am_SystemProperty_s& soundProperty, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result);
+ virtual std::future<CommonAPI::CallStatus> SetSystemPropertyAsync(const CommandInterface::am_SystemProperty_s& soundProperty, SetSystemPropertyAsyncCallback callback);
+
+ virtual void GetListMainConnections(CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_MainConnectionType_l& listConnections);
+ virtual std::future<CommonAPI::CallStatus> GetListMainConnectionsAsync(GetListMainConnectionsAsyncCallback callback);
+
+ virtual void GetListMainSinks(CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_SinkType_l& listMainSinks);
+ virtual std::future<CommonAPI::CallStatus> GetListMainSinksAsync(GetListMainSinksAsyncCallback callback);
+
+ virtual void GetListMainSources(CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_SourceType_l& listMainSources);
+ virtual std::future<CommonAPI::CallStatus> GetListMainSourcesAsync(GetListMainSourcesAsyncCallback callback);
+
+ virtual void GetListMainSinkSoundProperties(const CommandInterface::am_sinkID_t& sinkID, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_MainSoundProperty_l& listSoundProperties);
+ virtual std::future<CommonAPI::CallStatus> GetListMainSinkSoundPropertiesAsync(const CommandInterface::am_sinkID_t& sinkID, GetListMainSinkSoundPropertiesAsyncCallback callback);
+
+ virtual void GetListMainSourceSoundProperties(const CommandInterface::am_sourceID_t& sourceID, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_MainSoundProperty_l& listSourceProperties);
+ virtual std::future<CommonAPI::CallStatus> GetListMainSourceSoundPropertiesAsync(const CommandInterface::am_sourceID_t& sourceID, GetListMainSourceSoundPropertiesAsyncCallback callback);
+
+ virtual void GetListSourceClasses(CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_SourceClass_l& listSourceClasses);
+ virtual std::future<CommonAPI::CallStatus> GetListSourceClassesAsync(GetListSourceClassesAsyncCallback callback);
+
+ virtual void GetListSinkClasses(CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_SinkClass_l& listSinkClasses);
+ virtual std::future<CommonAPI::CallStatus> GetListSinkClassesAsync(GetListSinkClassesAsyncCallback callback);
+
+ virtual void GetListSystemProperties(CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_SystemProperty_l& listSystemProperties);
+ virtual std::future<CommonAPI::CallStatus> GetListSystemPropertiesAsync(GetListSystemPropertiesAsyncCallback callback);
+
+ virtual void GetTimingInformation(const CommandInterface::am_mainConnectionID_t& mainConnectionID, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_timeSync_t& delay);
+ virtual std::future<CommonAPI::CallStatus> GetTimingInformationAsync(const CommandInterface::am_mainConnectionID_t& mainConnectionID, GetTimingInformationAsyncCallback callback);
+
+ virtual void getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const;
+
+ private:
+
+ CommonAPI::DBus::DBusEvent<NumberOfMainConnectionsChangedEvent> numberOfMainConnectionsChanged_;
+ CommonAPI::DBus::DBusEvent<MainConnectionStateChangedEvent> mainConnectionStateChanged_;
+ CommonAPI::DBus::DBusEvent<NumberOfSourceClassesChangedEvent> numberOfSourceClassesChanged_;
+ CommonAPI::DBus::DBusEvent<SourceAddedEvent> sourceAdded_;
+ CommonAPI::DBus::DBusEvent<SourceRemovedEvent> sourceRemoved_;
+ CommonAPI::DBus::DBusEvent<MainSourceSoundPropertyChangedEvent> mainSourceSoundPropertyChanged_;
+ CommonAPI::DBus::DBusEvent<SourceAvailabilityChangedEvent> sourceAvailabilityChanged_;
+ CommonAPI::DBus::DBusEvent<NumberOfSinkClassesChangedEvent> numberOfSinkClassesChanged_;
+ CommonAPI::DBus::DBusEvent<SinkAddedEvent> sinkAdded_;
+ CommonAPI::DBus::DBusEvent<SinkRemovedEvent> sinkRemoved_;
+ CommonAPI::DBus::DBusEvent<MainSinkSoundPropertyChangedEvent> mainSinkSoundPropertyChanged_;
+ CommonAPI::DBus::DBusEvent<SinkAvailabilityChangedEvent> sinkAvailabilityChanged_;
+ CommonAPI::DBus::DBusEvent<VolumeChangedEvent> volumeChanged_;
+ CommonAPI::DBus::DBusEvent<SinkMuteStateChangedEvent> sinkMuteStateChanged_;
+ CommonAPI::DBus::DBusEvent<SystemPropertyChangedEvent> systemPropertyChanged_;
+ CommonAPI::DBus::DBusEvent<TimingInformationChangedEvent> timingInformationChanged_;
+ CommonAPI::DBus::DBusEvent<SinkUpdatedEvent> sinkUpdated_;
+ CommonAPI::DBus::DBusEvent<SourceUpdatedEvent> sourceUpdated_;
+ CommonAPI::DBus::DBusEvent<SinkNotificationEvent> sinkNotification_;
+ CommonAPI::DBus::DBusEvent<SourceNotificationEvent> sourceNotification_;
+ CommonAPI::DBus::DBusEvent<MainSinkNotificationConfigurationChangedEvent> mainSinkNotificationConfigurationChanged_;
+ CommonAPI::DBus::DBusEvent<MainSourceNotificationConfigurationChangedEvent> mainSourceNotificationConfigurationChanged_;
+};
+
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
+
+#endif // ORG_GENIVI_AUDIOMANAGER_Command_Interface_DBUS_PROXY_H_
diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceDBusStubAdapter.cpp b/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceDBusStubAdapter.cpp
new file mode 100644
index 0000000..d796464
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceDBusStubAdapter.cpp
@@ -0,0 +1,521 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#include "CommandInterfaceDBusStubAdapter.h"
+#include <org/genivi/audiomanager/CommandInterface.h>
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+
+std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> createCommandInterfaceDBusStubAdapter(
+ const std::string& commonApiAddress,
+ const std::string& interfaceName,
+ const std::string& busName,
+ const std::string& objectPath,
+ const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection,
+ const std::shared_ptr<CommonAPI::StubBase>& stubBase) {
+ return std::make_shared<CommandInterfaceDBusStubAdapter>(commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection, stubBase);
+}
+
+__attribute__((constructor)) void registerCommandInterfaceDBusStubAdapter(void) {
+ CommonAPI::DBus::DBusFactory::registerAdapterFactoryMethod(CommandInterface::getInterfaceId(),
+ &createCommandInterfaceDBusStubAdapter);
+}
+
+CommandInterfaceDBusStubAdapter::CommandInterfaceDBusStubAdapter(
+ const std::string& commonApiAddress,
+ const std::string& dbusInterfaceName,
+ const std::string& dbusBusName,
+ const std::string& dbusObjectPath,
+ const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
+ const std::shared_ptr<CommonAPI::StubBase>& stub):
+ CommandInterfaceDBusStubAdapterHelper(commonApiAddress, dbusInterfaceName, dbusBusName, dbusObjectPath, dbusConnection, std::dynamic_pointer_cast<CommandInterfaceStub>(stub)) {
+}
+
+const char* CommandInterfaceDBusStubAdapter::getMethodsDBusIntrospectionXmlData() const {
+ return
+ "<signal name=\"NumberOfMainConnectionsChanged\">\n"
+ "</signal>\n"
+ "<signal name=\"MainConnectionStateChanged\">\n"
+ "<arg name=\"connectionID\" type=\"q\" />\n"
+ "<arg name=\"connectionState\" type=\"i\" />\n"
+ "</signal>\n"
+ "<signal name=\"NumberOfSourceClassesChanged\">\n"
+ "</signal>\n"
+ "<signal name=\"SourceAdded\">\n"
+ "<arg name=\"newSource\" type=\"(qs(ii)q)\" />\n"
+ "</signal>\n"
+ "<signal name=\"SourceRemoved\">\n"
+ "<arg name=\"removedSourceID\" type=\"q\" />\n"
+ "</signal>\n"
+ "<signal name=\"MainSourceSoundPropertyChanged\">\n"
+ "<arg name=\"sourceID\" type=\"q\" />\n"
+ "<arg name=\"SoundProperty\" type=\"(in)\" />\n"
+ "</signal>\n"
+ "<signal name=\"SourceAvailabilityChanged\">\n"
+ "<arg name=\"sourceID\" type=\"q\" />\n"
+ "<arg name=\"availability\" type=\"(ii)\" />\n"
+ "</signal>\n"
+ "<signal name=\"NumberOfSinkClassesChanged\">\n"
+ "</signal>\n"
+ "<signal name=\"SinkAdded\">\n"
+ "<arg name=\"newSink\" type=\"(qs(ii)niq)\" />\n"
+ "</signal>\n"
+ "<signal name=\"SinkRemoved\">\n"
+ "<arg name=\"removedSinkID\" type=\"q\" />\n"
+ "</signal>\n"
+ "<signal name=\"MainSinkSoundPropertyChanged\">\n"
+ "<arg name=\"sinkID\" type=\"q\" />\n"
+ "<arg name=\"SoundProperty\" type=\"(in)\" />\n"
+ "</signal>\n"
+ "<signal name=\"SinkAvailabilityChanged\">\n"
+ "<arg name=\"sinkID\" type=\"q\" />\n"
+ "<arg name=\"availability\" type=\"(ii)\" />\n"
+ "</signal>\n"
+ "<signal name=\"VolumeChanged\">\n"
+ "<arg name=\"sinkID\" type=\"q\" />\n"
+ "<arg name=\"volume\" type=\"n\" />\n"
+ "</signal>\n"
+ "<signal name=\"SinkMuteStateChanged\">\n"
+ "<arg name=\"sinkID\" type=\"q\" />\n"
+ "<arg name=\"muteState\" type=\"i\" />\n"
+ "</signal>\n"
+ "<signal name=\"SystemPropertyChanged\">\n"
+ "<arg name=\"SystemProperty\" type=\"(in)\" />\n"
+ "</signal>\n"
+ "<signal name=\"TimingInformationChanged\">\n"
+ "<arg name=\"mainConnection\" type=\"q\" />\n"
+ "<arg name=\"time\" type=\"n\" />\n"
+ "</signal>\n"
+ "<signal name=\"SinkUpdated\">\n"
+ "<arg name=\"sinkID\" type=\"q\" />\n"
+ "<arg name=\"sinkClassID\" type=\"q\" />\n"
+ "<arg name=\"listMainSoundProperties\" type=\"a(in)\" />\n"
+ "</signal>\n"
+ "<signal name=\"SourceUpdated\">\n"
+ "<arg name=\"sourceID\" type=\"q\" />\n"
+ "<arg name=\"sourceClassID\" type=\"q\" />\n"
+ "<arg name=\"listMainSoundProperties\" type=\"a(in)\" />\n"
+ "</signal>\n"
+ "<signal name=\"SinkNotification\">\n"
+ "<arg name=\"sinkID\" type=\"q\" />\n"
+ "<arg name=\"notification\" type=\"(in)\" />\n"
+ "</signal>\n"
+ "<signal name=\"SourceNotification\">\n"
+ "<arg name=\"sourceID\" type=\"q\" />\n"
+ "<arg name=\"notification\" type=\"(in)\" />\n"
+ "</signal>\n"
+ "<signal name=\"MainSinkNotificationConfigurationChanged\">\n"
+ "<arg name=\"sinkID\" type=\"q\" />\n"
+ "<arg name=\"mainNotificationConfiguration\" type=\"(iin)\" />\n"
+ "</signal>\n"
+ "<signal name=\"MainSourceNotificationConfigurationChanged\">\n"
+ "<arg name=\"sourceID\" type=\"q\" />\n"
+ "<arg name=\"mainNotificationConfiguration\" type=\"(iin)\" />\n"
+ "</signal>\n"
+ "<method name=\"Connect\">\n"
+ "<arg name=\"sourceID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"sinkID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"result\" type=\"i\" direction=\"out\" />\n"
+ "<arg name=\"mainConnectionID\" type=\"q\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"Disconnect\">\n"
+ "<arg name=\"mainConnectionID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"result\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"SetVolume\">\n"
+ "<arg name=\"sinkID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"volume\" type=\"n\" direction=\"in\" />\n"
+ "<arg name=\"result\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"VolumeStep\">\n"
+ "<arg name=\"sinkID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"volumeStep\" type=\"n\" direction=\"in\" />\n"
+ "<arg name=\"result\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"SetSinkMuteState\">\n"
+ "<arg name=\"sinkID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"muteState\" type=\"i\" direction=\"in\" />\n"
+ "<arg name=\"result\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"SetMainSinkSoundProperty\">\n"
+ "<arg name=\"sinkID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"soundProperty\" type=\"(in)\" direction=\"in\" />\n"
+ "<arg name=\"result\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"SetMainSourceSoundProperty\">\n"
+ "<arg name=\"sourceID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"soundProperty\" type=\"(in)\" direction=\"in\" />\n"
+ "<arg name=\"result\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"SetSystemProperty\">\n"
+ "<arg name=\"soundProperty\" type=\"(in)\" direction=\"in\" />\n"
+ "<arg name=\"result\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"GetListMainConnections\">\n"
+ "<arg name=\"result\" type=\"i\" direction=\"out\" />\n"
+ "<arg name=\"listConnections\" type=\"a(qqqni)\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"GetListMainSinks\">\n"
+ "<arg name=\"result\" type=\"i\" direction=\"out\" />\n"
+ "<arg name=\"listMainSinks\" type=\"a(qs(ii)niq)\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"GetListMainSources\">\n"
+ "<arg name=\"result\" type=\"i\" direction=\"out\" />\n"
+ "<arg name=\"listMainSources\" type=\"a(qs(ii)q)\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"GetListMainSinkSoundProperties\">\n"
+ "<arg name=\"sinkID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"result\" type=\"i\" direction=\"out\" />\n"
+ "<arg name=\"listSoundProperties\" type=\"a(in)\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"GetListMainSourceSoundProperties\">\n"
+ "<arg name=\"sourceID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"result\" type=\"i\" direction=\"out\" />\n"
+ "<arg name=\"listSourceProperties\" type=\"a(in)\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"GetListSourceClasses\">\n"
+ "<arg name=\"result\" type=\"i\" direction=\"out\" />\n"
+ "<arg name=\"listSourceClasses\" type=\"a(qsa(in))\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"GetListSinkClasses\">\n"
+ "<arg name=\"result\" type=\"i\" direction=\"out\" />\n"
+ "<arg name=\"listSinkClasses\" type=\"a(qsa(in))\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"GetListSystemProperties\">\n"
+ "<arg name=\"result\" type=\"i\" direction=\"out\" />\n"
+ "<arg name=\"listSystemProperties\" type=\"a(in)\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"GetTimingInformation\">\n"
+ "<arg name=\"mainConnectionID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"result\" type=\"i\" direction=\"out\" />\n"
+ "<arg name=\"delay\" type=\"n\" direction=\"out\" />\n"
+ "</method>\n"
+ ;
+}
+
+
+
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ CommandInterfaceStub,
+ std::tuple<CommandInterface::am_sourceID_t, CommandInterface::am_sinkID_t>,
+ std::tuple<CommandInterface::am_Error_e, CommandInterface::am_mainConnectionID_t>
+ > connectStubDispatcher(&CommandInterfaceStub::Connect, "iq");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ CommandInterfaceStub,
+ std::tuple<CommandInterface::am_mainConnectionID_t>,
+ std::tuple<CommandInterface::am_Error_e>
+ > disconnectStubDispatcher(&CommandInterfaceStub::Disconnect, "i");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ CommandInterfaceStub,
+ std::tuple<CommandInterface::am_sinkID_t, CommandInterface::am_mainVolume_t>,
+ std::tuple<CommandInterface::am_Error_e>
+ > setVolumeStubDispatcher(&CommandInterfaceStub::SetVolume, "i");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ CommandInterfaceStub,
+ std::tuple<CommandInterface::am_sinkID_t, CommandInterface::am_mainVolume_t>,
+ std::tuple<CommandInterface::am_Error_e>
+ > volumeStepStubDispatcher(&CommandInterfaceStub::VolumeStep, "i");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ CommandInterfaceStub,
+ std::tuple<CommandInterface::am_sinkID_t, CommandInterface::am_MuteState_e>,
+ std::tuple<CommandInterface::am_Error_e>
+ > setSinkMuteStateStubDispatcher(&CommandInterfaceStub::SetSinkMuteState, "i");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ CommandInterfaceStub,
+ std::tuple<CommandInterface::am_sinkID_t, CommandInterface::am_MainSoundProperty_s>,
+ std::tuple<CommandInterface::am_Error_e>
+ > setMainSinkSoundPropertyStubDispatcher(&CommandInterfaceStub::SetMainSinkSoundProperty, "i");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ CommandInterfaceStub,
+ std::tuple<CommandInterface::am_sourceID_t, CommandInterface::am_MainSoundProperty_s>,
+ std::tuple<CommandInterface::am_Error_e>
+ > setMainSourceSoundPropertyStubDispatcher(&CommandInterfaceStub::SetMainSourceSoundProperty, "i");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ CommandInterfaceStub,
+ std::tuple<CommandInterface::am_SystemProperty_s>,
+ std::tuple<CommandInterface::am_Error_e>
+ > setSystemPropertyStubDispatcher(&CommandInterfaceStub::SetSystemProperty, "i");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ CommandInterfaceStub,
+ std::tuple<>,
+ std::tuple<CommandInterface::am_Error_e, CommandInterface::am_MainConnectionType_l>
+ > getListMainConnectionsStubDispatcher(&CommandInterfaceStub::GetListMainConnections, "ia(qqqni)");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ CommandInterfaceStub,
+ std::tuple<>,
+ std::tuple<CommandInterface::am_Error_e, CommandInterface::am_SinkType_l>
+ > getListMainSinksStubDispatcher(&CommandInterfaceStub::GetListMainSinks, "ia(qs(ii)niq)");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ CommandInterfaceStub,
+ std::tuple<>,
+ std::tuple<CommandInterface::am_Error_e, CommandInterface::am_SourceType_l>
+ > getListMainSourcesStubDispatcher(&CommandInterfaceStub::GetListMainSources, "ia(qs(ii)q)");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ CommandInterfaceStub,
+ std::tuple<CommandInterface::am_sinkID_t>,
+ std::tuple<CommandInterface::am_Error_e, CommandInterface::am_MainSoundProperty_l>
+ > getListMainSinkSoundPropertiesStubDispatcher(&CommandInterfaceStub::GetListMainSinkSoundProperties, "ia(in)");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ CommandInterfaceStub,
+ std::tuple<CommandInterface::am_sourceID_t>,
+ std::tuple<CommandInterface::am_Error_e, CommandInterface::am_MainSoundProperty_l>
+ > getListMainSourceSoundPropertiesStubDispatcher(&CommandInterfaceStub::GetListMainSourceSoundProperties, "ia(in)");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ CommandInterfaceStub,
+ std::tuple<>,
+ std::tuple<CommandInterface::am_Error_e, CommandInterface::am_SourceClass_l>
+ > getListSourceClassesStubDispatcher(&CommandInterfaceStub::GetListSourceClasses, "ia(qsa(in))");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ CommandInterfaceStub,
+ std::tuple<>,
+ std::tuple<CommandInterface::am_Error_e, CommandInterface::am_SinkClass_l>
+ > getListSinkClassesStubDispatcher(&CommandInterfaceStub::GetListSinkClasses, "ia(qsa(in))");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ CommandInterfaceStub,
+ std::tuple<>,
+ std::tuple<CommandInterface::am_Error_e, CommandInterface::am_SystemProperty_l>
+ > getListSystemPropertiesStubDispatcher(&CommandInterfaceStub::GetListSystemProperties, "ia(in)");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ CommandInterfaceStub,
+ std::tuple<CommandInterface::am_mainConnectionID_t>,
+ std::tuple<CommandInterface::am_Error_e, CommandInterface::am_timeSync_t>
+ > getTimingInformationStubDispatcher(&CommandInterfaceStub::GetTimingInformation, "in");
+
+
+void CommandInterfaceDBusStubAdapter::fireNumberOfMainConnectionsChangedEvent() {
+ CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<>>
+ ::sendSignal(
+ *this,
+ "NumberOfMainConnectionsChanged",
+ ""
+ );
+}
+void CommandInterfaceDBusStubAdapter::fireMainConnectionStateChangedEvent(const CommandInterface::am_mainConnectionID_t& connectionID, const CommandInterface::am_ConnectionState_e& connectionState) {
+ CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_mainConnectionID_t, CommandInterface::am_ConnectionState_e>>
+ ::sendSignal(
+ *this,
+ "MainConnectionStateChanged",
+ "qi",
+ connectionID, connectionState
+ );
+}
+void CommandInterfaceDBusStubAdapter::fireNumberOfSourceClassesChangedEvent() {
+ CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<>>
+ ::sendSignal(
+ *this,
+ "NumberOfSourceClassesChanged",
+ ""
+ );
+}
+void CommandInterfaceDBusStubAdapter::fireSourceAddedEvent(const CommandInterface::am_SourceType_s& newSource) {
+ CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_SourceType_s>>
+ ::sendSignal(
+ *this,
+ "SourceAdded",
+ "(qs(ii)q)",
+ newSource
+ );
+}
+void CommandInterfaceDBusStubAdapter::fireSourceRemovedEvent(const CommandInterface::am_sourceID_t& removedSourceID) {
+ CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_sourceID_t>>
+ ::sendSignal(
+ *this,
+ "SourceRemoved",
+ "q",
+ removedSourceID
+ );
+}
+void CommandInterfaceDBusStubAdapter::fireMainSourceSoundPropertyChangedEvent(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_MainSoundProperty_s& SoundProperty) {
+ CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_sourceID_t, CommandInterface::am_MainSoundProperty_s>>
+ ::sendSignal(
+ *this,
+ "MainSourceSoundPropertyChanged",
+ "q(in)",
+ sourceID, SoundProperty
+ );
+}
+void CommandInterfaceDBusStubAdapter::fireSourceAvailabilityChangedEvent(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_Availability_s& availability) {
+ CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_sourceID_t, CommandInterface::am_Availability_s>>
+ ::sendSignal(
+ *this,
+ "SourceAvailabilityChanged",
+ "q(ii)",
+ sourceID, availability
+ );
+}
+void CommandInterfaceDBusStubAdapter::fireNumberOfSinkClassesChangedEvent() {
+ CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<>>
+ ::sendSignal(
+ *this,
+ "NumberOfSinkClassesChanged",
+ ""
+ );
+}
+void CommandInterfaceDBusStubAdapter::fireSinkAddedEvent(const CommandInterface::am_SinkType_s& newSink) {
+ CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_SinkType_s>>
+ ::sendSignal(
+ *this,
+ "SinkAdded",
+ "(qs(ii)niq)",
+ newSink
+ );
+}
+void CommandInterfaceDBusStubAdapter::fireSinkRemovedEvent(const CommandInterface::am_sinkID_t& removedSinkID) {
+ CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_sinkID_t>>
+ ::sendSignal(
+ *this,
+ "SinkRemoved",
+ "q",
+ removedSinkID
+ );
+}
+void CommandInterfaceDBusStubAdapter::fireMainSinkSoundPropertyChangedEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MainSoundProperty_s& SoundProperty) {
+ CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_sinkID_t, CommandInterface::am_MainSoundProperty_s>>
+ ::sendSignal(
+ *this,
+ "MainSinkSoundPropertyChanged",
+ "q(in)",
+ sinkID, SoundProperty
+ );
+}
+void CommandInterfaceDBusStubAdapter::fireSinkAvailabilityChangedEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_Availability_s& availability) {
+ CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_sinkID_t, CommandInterface::am_Availability_s>>
+ ::sendSignal(
+ *this,
+ "SinkAvailabilityChanged",
+ "q(ii)",
+ sinkID, availability
+ );
+}
+void CommandInterfaceDBusStubAdapter::fireVolumeChangedEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_mainVolume_t& volume) {
+ CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_sinkID_t, CommandInterface::am_mainVolume_t>>
+ ::sendSignal(
+ *this,
+ "VolumeChanged",
+ "qn",
+ sinkID, volume
+ );
+}
+void CommandInterfaceDBusStubAdapter::fireSinkMuteStateChangedEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MuteState_e& muteState) {
+ CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_sinkID_t, CommandInterface::am_MuteState_e>>
+ ::sendSignal(
+ *this,
+ "SinkMuteStateChanged",
+ "qi",
+ sinkID, muteState
+ );
+}
+void CommandInterfaceDBusStubAdapter::fireSystemPropertyChangedEvent(const CommandInterface::am_SystemProperty_s& SystemProperty) {
+ CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_SystemProperty_s>>
+ ::sendSignal(
+ *this,
+ "SystemPropertyChanged",
+ "(in)",
+ SystemProperty
+ );
+}
+void CommandInterfaceDBusStubAdapter::fireTimingInformationChangedEvent(const CommandInterface::am_mainConnectionID_t& mainConnection, const CommandInterface::am_timeSync_t& time) {
+ CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_mainConnectionID_t, CommandInterface::am_timeSync_t>>
+ ::sendSignal(
+ *this,
+ "TimingInformationChanged",
+ "qn",
+ mainConnection, time
+ );
+}
+void CommandInterfaceDBusStubAdapter::fireSinkUpdatedEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_sinkClass_t& sinkClassID, const CommandInterface::am_MainSoundProperty_l& listMainSoundProperties) {
+ CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_sinkID_t, CommandInterface::am_sinkClass_t, CommandInterface::am_MainSoundProperty_l>>
+ ::sendSignal(
+ *this,
+ "SinkUpdated",
+ "qqa(in)",
+ sinkID, sinkClassID, listMainSoundProperties
+ );
+}
+void CommandInterfaceDBusStubAdapter::fireSourceUpdatedEvent(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_sourceClass_t& sourceClassID, const CommandInterface::am_MainSoundProperty_l& listMainSoundProperties) {
+ CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_sourceID_t, CommandInterface::am_sourceClass_t, CommandInterface::am_MainSoundProperty_l>>
+ ::sendSignal(
+ *this,
+ "SourceUpdated",
+ "qqa(in)",
+ sourceID, sourceClassID, listMainSoundProperties
+ );
+}
+void CommandInterfaceDBusStubAdapter::fireSinkNotificationEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_NotificationPayload_s& notification) {
+ CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_sinkID_t, CommandInterface::am_NotificationPayload_s>>
+ ::sendSignal(
+ *this,
+ "SinkNotification",
+ "q(in)",
+ sinkID, notification
+ );
+}
+void CommandInterfaceDBusStubAdapter::fireSourceNotificationEvent(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_NotificationPayload_s& notification) {
+ CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_sourceID_t, CommandInterface::am_NotificationPayload_s>>
+ ::sendSignal(
+ *this,
+ "SourceNotification",
+ "q(in)",
+ sourceID, notification
+ );
+}
+void CommandInterfaceDBusStubAdapter::fireMainSinkNotificationConfigurationChangedEvent(const CommandInterface::am_sinkID_t& sinkID, const am::am_NotificationConfiguration_s& mainNotificationConfiguration) {
+ CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_sinkID_t, am::am_NotificationConfiguration_s>>
+ ::sendSignal(
+ *this,
+ "MainSinkNotificationConfigurationChanged",
+ "q(iin)",
+ sinkID, mainNotificationConfiguration
+ );
+}
+void CommandInterfaceDBusStubAdapter::fireMainSourceNotificationConfigurationChangedEvent(const CommandInterface::am_sourceID_t& sourceID, const am::am_NotificationConfiguration_s& mainNotificationConfiguration) {
+ CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<CommandInterface::am_sourceID_t, am::am_NotificationConfiguration_s>>
+ ::sendSignal(
+ *this,
+ "MainSourceNotificationConfigurationChanged",
+ "q(iin)",
+ sourceID, mainNotificationConfiguration
+ );
+}
+
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
+
+template<>
+const org::genivi::audiomanager::CommandInterfaceDBusStubAdapterHelper::StubDispatcherTable org::genivi::audiomanager::CommandInterfaceDBusStubAdapterHelper::stubDispatcherTable_ = {
+ { { "Connect", "qq" }, &org::genivi::audiomanager::connectStubDispatcher },
+ { { "Disconnect", "q" }, &org::genivi::audiomanager::disconnectStubDispatcher },
+ { { "SetVolume", "qn" }, &org::genivi::audiomanager::setVolumeStubDispatcher },
+ { { "VolumeStep", "qn" }, &org::genivi::audiomanager::volumeStepStubDispatcher },
+ { { "SetSinkMuteState", "qi" }, &org::genivi::audiomanager::setSinkMuteStateStubDispatcher },
+ { { "SetMainSinkSoundProperty", "q(in)" }, &org::genivi::audiomanager::setMainSinkSoundPropertyStubDispatcher },
+ { { "SetMainSourceSoundProperty", "q(in)" }, &org::genivi::audiomanager::setMainSourceSoundPropertyStubDispatcher },
+ { { "SetSystemProperty", "(in)" }, &org::genivi::audiomanager::setSystemPropertyStubDispatcher },
+ { { "GetListMainConnections", "" }, &org::genivi::audiomanager::getListMainConnectionsStubDispatcher },
+ { { "GetListMainSinks", "" }, &org::genivi::audiomanager::getListMainSinksStubDispatcher },
+ { { "GetListMainSources", "" }, &org::genivi::audiomanager::getListMainSourcesStubDispatcher },
+ { { "GetListMainSinkSoundProperties", "q" }, &org::genivi::audiomanager::getListMainSinkSoundPropertiesStubDispatcher },
+ { { "GetListMainSourceSoundProperties", "q" }, &org::genivi::audiomanager::getListMainSourceSoundPropertiesStubDispatcher },
+ { { "GetListSourceClasses", "" }, &org::genivi::audiomanager::getListSourceClassesStubDispatcher },
+ { { "GetListSinkClasses", "" }, &org::genivi::audiomanager::getListSinkClassesStubDispatcher },
+ { { "GetListSystemProperties", "" }, &org::genivi::audiomanager::getListSystemPropertiesStubDispatcher },
+ { { "GetTimingInformation", "q" }, &org::genivi::audiomanager::getTimingInformationStubDispatcher }
+};
diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceDBusStubAdapter.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceDBusStubAdapter.h
new file mode 100644
index 0000000..06dd676
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceDBusStubAdapter.h
@@ -0,0 +1,79 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_AUDIOMANAGER_Command_Interface_DBUS_STUB_ADAPTER_H_
+#define ORG_GENIVI_AUDIOMANAGER_Command_Interface_DBUS_STUB_ADAPTER_H_
+
+#include <org/genivi/audiomanager/CommandInterfaceStub.h>
+
+#define COMMONAPI_INTERNAL_COMPILATION
+
+#include <CommonAPI/DBus/DBusStubAdapterHelper.h>
+#include <CommonAPI/DBus/DBusFactory.h>
+
+#undef COMMONAPI_INTERNAL_COMPILATION
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+
+typedef CommonAPI::DBus::DBusStubAdapterHelper<CommandInterfaceStub> CommandInterfaceDBusStubAdapterHelper;
+
+class CommandInterfaceDBusStubAdapter: public CommandInterfaceStubAdapter, public CommandInterfaceDBusStubAdapterHelper {
+ public:
+ CommandInterfaceDBusStubAdapter(
+ const std::string& commonApiAddress,
+ const std::string& dbusInterfaceName,
+ const std::string& dbusBusName,
+ const std::string& dbusObjectPath,
+ const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
+ const std::shared_ptr<CommonAPI::StubBase>& stub);
+
+
+ void fireNumberOfMainConnectionsChangedEvent();
+ void fireMainConnectionStateChangedEvent(const CommandInterface::am_mainConnectionID_t& connectionID, const CommandInterface::am_ConnectionState_e& connectionState);
+ void fireNumberOfSourceClassesChangedEvent();
+ void fireSourceAddedEvent(const CommandInterface::am_SourceType_s& newSource);
+ void fireSourceRemovedEvent(const CommandInterface::am_sourceID_t& removedSourceID);
+ void fireMainSourceSoundPropertyChangedEvent(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_MainSoundProperty_s& SoundProperty);
+ void fireSourceAvailabilityChangedEvent(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_Availability_s& availability);
+ void fireNumberOfSinkClassesChangedEvent();
+ void fireSinkAddedEvent(const CommandInterface::am_SinkType_s& newSink);
+ void fireSinkRemovedEvent(const CommandInterface::am_sinkID_t& removedSinkID);
+ void fireMainSinkSoundPropertyChangedEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MainSoundProperty_s& SoundProperty);
+ void fireSinkAvailabilityChangedEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_Availability_s& availability);
+ void fireVolumeChangedEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_mainVolume_t& volume);
+ void fireSinkMuteStateChangedEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MuteState_e& muteState);
+ void fireSystemPropertyChangedEvent(const CommandInterface::am_SystemProperty_s& SystemProperty);
+ void fireTimingInformationChangedEvent(const CommandInterface::am_mainConnectionID_t& mainConnection, const CommandInterface::am_timeSync_t& time);
+ void fireSinkUpdatedEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_sinkClass_t& sinkClassID, const CommandInterface::am_MainSoundProperty_l& listMainSoundProperties);
+ void fireSourceUpdatedEvent(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_sourceClass_t& sourceClassID, const CommandInterface::am_MainSoundProperty_l& listMainSoundProperties);
+ void fireSinkNotificationEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_NotificationPayload_s& notification);
+ void fireSourceNotificationEvent(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_NotificationPayload_s& notification);
+ void fireMainSinkNotificationConfigurationChangedEvent(const CommandInterface::am_sinkID_t& sinkID, const am::am_NotificationConfiguration_s& mainNotificationConfiguration);
+ void fireMainSourceNotificationConfigurationChangedEvent(const CommandInterface::am_sourceID_t& sourceID, const am::am_NotificationConfiguration_s& mainNotificationConfiguration);
+
+ protected:
+ virtual const char* getMethodsDBusIntrospectionXmlData() const;
+};
+
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
+
+#endif // ORG_GENIVI_AUDIOMANAGER_Command_Interface_DBUS_STUB_ADAPTER_H_
diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceProxy.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceProxy.h
new file mode 100644
index 0000000..437fefd
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceProxy.h
@@ -0,0 +1,794 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_AUDIOMANAGER_Command_Interface_PROXY_H_
+#define ORG_GENIVI_AUDIOMANAGER_Command_Interface_PROXY_H_
+
+#include "CommandInterfaceProxyBase.h"
+
+#define COMMONAPI_INTERNAL_COMPILATION
+
+
+#undef COMMONAPI_INTERNAL_COMPILATION
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+
+template <typename ... _AttributeExtensions>
+class CommandInterfaceProxy: virtual public CommandInterface, virtual public CommandInterfaceProxyBase, public _AttributeExtensions... {
+ public:
+ CommandInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate);
+ ~CommandInterfaceProxy();
+
+
+ /// Returns the wrapper class that provides access to the broadcast NumberOfMainConnectionsChanged.
+ virtual NumberOfMainConnectionsChangedEvent& getNumberOfMainConnectionsChangedEvent() {
+ return delegate_->getNumberOfMainConnectionsChangedEvent();
+ }
+
+ /// Returns the wrapper class that provides access to the broadcast MainConnectionStateChanged.
+ virtual MainConnectionStateChangedEvent& getMainConnectionStateChangedEvent() {
+ return delegate_->getMainConnectionStateChangedEvent();
+ }
+
+ /// Returns the wrapper class that provides access to the broadcast NumberOfSourceClassesChanged.
+ virtual NumberOfSourceClassesChangedEvent& getNumberOfSourceClassesChangedEvent() {
+ return delegate_->getNumberOfSourceClassesChangedEvent();
+ }
+
+ /// Returns the wrapper class that provides access to the broadcast SourceAdded.
+ virtual SourceAddedEvent& getSourceAddedEvent() {
+ return delegate_->getSourceAddedEvent();
+ }
+
+ /// Returns the wrapper class that provides access to the broadcast SourceRemoved.
+ virtual SourceRemovedEvent& getSourceRemovedEvent() {
+ return delegate_->getSourceRemovedEvent();
+ }
+
+ /// Returns the wrapper class that provides access to the broadcast MainSourceSoundPropertyChanged.
+ virtual MainSourceSoundPropertyChangedEvent& getMainSourceSoundPropertyChangedEvent() {
+ return delegate_->getMainSourceSoundPropertyChangedEvent();
+ }
+
+ /// Returns the wrapper class that provides access to the broadcast SourceAvailabilityChanged.
+ virtual SourceAvailabilityChangedEvent& getSourceAvailabilityChangedEvent() {
+ return delegate_->getSourceAvailabilityChangedEvent();
+ }
+
+ /// Returns the wrapper class that provides access to the broadcast NumberOfSinkClassesChanged.
+ virtual NumberOfSinkClassesChangedEvent& getNumberOfSinkClassesChangedEvent() {
+ return delegate_->getNumberOfSinkClassesChangedEvent();
+ }
+
+ /// Returns the wrapper class that provides access to the broadcast SinkAdded.
+ virtual SinkAddedEvent& getSinkAddedEvent() {
+ return delegate_->getSinkAddedEvent();
+ }
+
+ /// Returns the wrapper class that provides access to the broadcast SinkRemoved.
+ virtual SinkRemovedEvent& getSinkRemovedEvent() {
+ return delegate_->getSinkRemovedEvent();
+ }
+
+ /// Returns the wrapper class that provides access to the broadcast MainSinkSoundPropertyChanged.
+ virtual MainSinkSoundPropertyChangedEvent& getMainSinkSoundPropertyChangedEvent() {
+ return delegate_->getMainSinkSoundPropertyChangedEvent();
+ }
+
+ /// Returns the wrapper class that provides access to the broadcast SinkAvailabilityChanged.
+ virtual SinkAvailabilityChangedEvent& getSinkAvailabilityChangedEvent() {
+ return delegate_->getSinkAvailabilityChangedEvent();
+ }
+
+ /// Returns the wrapper class that provides access to the broadcast VolumeChanged.
+ virtual VolumeChangedEvent& getVolumeChangedEvent() {
+ return delegate_->getVolumeChangedEvent();
+ }
+
+ /// Returns the wrapper class that provides access to the broadcast SinkMuteStateChanged.
+ virtual SinkMuteStateChangedEvent& getSinkMuteStateChangedEvent() {
+ return delegate_->getSinkMuteStateChangedEvent();
+ }
+
+ /// Returns the wrapper class that provides access to the broadcast SystemPropertyChanged.
+ virtual SystemPropertyChangedEvent& getSystemPropertyChangedEvent() {
+ return delegate_->getSystemPropertyChangedEvent();
+ }
+
+ /// Returns the wrapper class that provides access to the broadcast TimingInformationChanged.
+ virtual TimingInformationChangedEvent& getTimingInformationChangedEvent() {
+ return delegate_->getTimingInformationChangedEvent();
+ }
+
+ /// Returns the wrapper class that provides access to the broadcast SinkUpdated.
+ virtual SinkUpdatedEvent& getSinkUpdatedEvent() {
+ return delegate_->getSinkUpdatedEvent();
+ }
+
+ /// Returns the wrapper class that provides access to the broadcast SourceUpdated.
+ virtual SourceUpdatedEvent& getSourceUpdatedEvent() {
+ return delegate_->getSourceUpdatedEvent();
+ }
+
+ /// Returns the wrapper class that provides access to the broadcast SinkNotification.
+ virtual SinkNotificationEvent& getSinkNotificationEvent() {
+ return delegate_->getSinkNotificationEvent();
+ }
+
+ /// Returns the wrapper class that provides access to the broadcast SourceNotification.
+ virtual SourceNotificationEvent& getSourceNotificationEvent() {
+ return delegate_->getSourceNotificationEvent();
+ }
+
+ /// Returns the wrapper class that provides access to the broadcast MainSinkNotificationConfigurationChanged.
+ virtual MainSinkNotificationConfigurationChangedEvent& getMainSinkNotificationConfigurationChangedEvent() {
+ return delegate_->getMainSinkNotificationConfigurationChangedEvent();
+ }
+
+ /// Returns the wrapper class that provides access to the broadcast MainSourceNotificationConfigurationChanged.
+ virtual MainSourceNotificationConfigurationChangedEvent& getMainSourceNotificationConfigurationChangedEvent() {
+ return delegate_->getMainSourceNotificationConfigurationChangedEvent();
+ }
+
+
+
+ /**
+ * Calls Connect with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void Connect(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_sinkID_t& sinkID, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_mainConnectionID_t& mainConnectionID);
+ /**
+ * Calls Connect with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> ConnectAsync(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_sinkID_t& sinkID, ConnectAsyncCallback callback);
+
+ /**
+ * Calls Disconnect with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void Disconnect(const CommandInterface::am_mainConnectionID_t& mainConnectionID, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result);
+ /**
+ * Calls Disconnect with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> DisconnectAsync(const CommandInterface::am_mainConnectionID_t& mainConnectionID, DisconnectAsyncCallback callback);
+
+ /**
+ * Calls SetVolume with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void SetVolume(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_mainVolume_t& volume, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result);
+ /**
+ * Calls SetVolume with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> SetVolumeAsync(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_mainVolume_t& volume, SetVolumeAsyncCallback callback);
+
+ /**
+ * Calls VolumeStep with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void VolumeStep(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_mainVolume_t& volumeStep, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result);
+ /**
+ * Calls VolumeStep with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> VolumeStepAsync(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_mainVolume_t& volumeStep, VolumeStepAsyncCallback callback);
+
+ /**
+ * Calls SetSinkMuteState with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void SetSinkMuteState(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MuteState_e& muteState, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result);
+ /**
+ * Calls SetSinkMuteState with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> SetSinkMuteStateAsync(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MuteState_e& muteState, SetSinkMuteStateAsyncCallback callback);
+
+ /**
+ * Calls SetMainSinkSoundProperty with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void SetMainSinkSoundProperty(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MainSoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result);
+ /**
+ * Calls SetMainSinkSoundProperty with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> SetMainSinkSoundPropertyAsync(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MainSoundProperty_s& soundProperty, SetMainSinkSoundPropertyAsyncCallback callback);
+
+ /**
+ * Calls SetMainSourceSoundProperty with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void SetMainSourceSoundProperty(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_MainSoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result);
+ /**
+ * Calls SetMainSourceSoundProperty with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> SetMainSourceSoundPropertyAsync(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_MainSoundProperty_s& soundProperty, SetMainSourceSoundPropertyAsyncCallback callback);
+
+ /**
+ * Calls SetSystemProperty with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void SetSystemProperty(const CommandInterface::am_SystemProperty_s& soundProperty, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result);
+ /**
+ * Calls SetSystemProperty with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> SetSystemPropertyAsync(const CommandInterface::am_SystemProperty_s& soundProperty, SetSystemPropertyAsyncCallback callback);
+
+ /**
+ * Calls GetListMainConnections with synchronous semantics.
+ *
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void GetListMainConnections(CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_MainConnectionType_l& listConnections);
+ /**
+ * Calls GetListMainConnections with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> GetListMainConnectionsAsync(GetListMainConnectionsAsyncCallback callback);
+
+ /**
+ * Calls GetListMainSinks with synchronous semantics.
+ *
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void GetListMainSinks(CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_SinkType_l& listMainSinks);
+ /**
+ * Calls GetListMainSinks with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> GetListMainSinksAsync(GetListMainSinksAsyncCallback callback);
+
+ /**
+ * Calls GetListMainSources with synchronous semantics.
+ *
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void GetListMainSources(CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_SourceType_l& listMainSources);
+ /**
+ * Calls GetListMainSources with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> GetListMainSourcesAsync(GetListMainSourcesAsyncCallback callback);
+
+ /**
+ * Calls GetListMainSinkSoundProperties with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void GetListMainSinkSoundProperties(const CommandInterface::am_sinkID_t& sinkID, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_MainSoundProperty_l& listSoundProperties);
+ /**
+ * Calls GetListMainSinkSoundProperties with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> GetListMainSinkSoundPropertiesAsync(const CommandInterface::am_sinkID_t& sinkID, GetListMainSinkSoundPropertiesAsyncCallback callback);
+
+ /**
+ * Calls GetListMainSourceSoundProperties with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void GetListMainSourceSoundProperties(const CommandInterface::am_sourceID_t& sourceID, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_MainSoundProperty_l& listSourceProperties);
+ /**
+ * Calls GetListMainSourceSoundProperties with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> GetListMainSourceSoundPropertiesAsync(const CommandInterface::am_sourceID_t& sourceID, GetListMainSourceSoundPropertiesAsyncCallback callback);
+
+ /**
+ * Calls GetListSourceClasses with synchronous semantics.
+ *
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void GetListSourceClasses(CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_SourceClass_l& listSourceClasses);
+ /**
+ * Calls GetListSourceClasses with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> GetListSourceClassesAsync(GetListSourceClassesAsyncCallback callback);
+
+ /**
+ * Calls GetListSinkClasses with synchronous semantics.
+ *
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void GetListSinkClasses(CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_SinkClass_l& listSinkClasses);
+ /**
+ * Calls GetListSinkClasses with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> GetListSinkClassesAsync(GetListSinkClassesAsyncCallback callback);
+
+ /**
+ * Calls GetListSystemProperties with synchronous semantics.
+ *
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void GetListSystemProperties(CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_SystemProperty_l& listSystemProperties);
+ /**
+ * Calls GetListSystemProperties with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> GetListSystemPropertiesAsync(GetListSystemPropertiesAsyncCallback callback);
+
+ /**
+ * Calls GetTimingInformation with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void GetTimingInformation(const CommandInterface::am_mainConnectionID_t& mainConnectionID, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_timeSync_t& delay);
+ /**
+ * Calls GetTimingInformation with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> GetTimingInformationAsync(const CommandInterface::am_mainConnectionID_t& mainConnectionID, GetTimingInformationAsyncCallback callback);
+
+ /// Returns the CommonAPI address of the remote partner this proxy communicates with.
+ virtual std::string getAddress() const;
+
+ /// Returns the domain of the remote partner this proxy communicates with.
+ virtual const std::string& getDomain() const;
+
+ /// Returns the service ID of the remote partner this proxy communicates with.
+ virtual const std::string& getServiceId() const;
+
+ /// Returns the instance ID of the remote partner this proxy communicates with.
+ virtual const std::string& getInstanceId() const;
+
+ /// Returns true if the remote partner for this proxy is available.
+ virtual bool isAvailable() const;
+
+ /**
+ * Returns the wrapper class that is used to (de-)register for notifications about
+ * the availability of the remote partner of this proxy.
+ */
+ virtual CommonAPI::ProxyStatusEvent& getProxyStatusEvent();
+
+ /**
+ * Returns the wrapper class that is used to access version information of the remote
+ * partner of this proxy.
+ */
+ virtual CommonAPI::InterfaceVersionAttribute& getInterfaceVersionAttribute();
+
+ private:
+ std::shared_ptr<CommandInterfaceProxyBase> delegate_;
+};
+
+
+//
+// CommandInterfaceProxy Implementation
+//
+template <typename ... _AttributeExtensions>
+CommandInterfaceProxy<_AttributeExtensions...>::CommandInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate):
+ delegate_(std::dynamic_pointer_cast<CommandInterfaceProxyBase>(delegate)),
+ _AttributeExtensions(*(std::dynamic_pointer_cast<CommandInterfaceProxyBase>(delegate)))... {
+}
+
+template <typename ... _AttributeExtensions>
+CommandInterfaceProxy<_AttributeExtensions...>::~CommandInterfaceProxy() {
+}
+
+template <typename ... _AttributeExtensions>
+void CommandInterfaceProxy<_AttributeExtensions...>::Connect(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_sinkID_t& sinkID, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_mainConnectionID_t& mainConnectionID) {
+ delegate_->Connect(sourceID, sinkID, callStatus, result, mainConnectionID);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> CommandInterfaceProxy<_AttributeExtensions...>::ConnectAsync(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_sinkID_t& sinkID, ConnectAsyncCallback callback) {
+ return delegate_->ConnectAsync(sourceID, sinkID, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void CommandInterfaceProxy<_AttributeExtensions...>::Disconnect(const CommandInterface::am_mainConnectionID_t& mainConnectionID, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result) {
+ delegate_->Disconnect(mainConnectionID, callStatus, result);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> CommandInterfaceProxy<_AttributeExtensions...>::DisconnectAsync(const CommandInterface::am_mainConnectionID_t& mainConnectionID, DisconnectAsyncCallback callback) {
+ return delegate_->DisconnectAsync(mainConnectionID, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void CommandInterfaceProxy<_AttributeExtensions...>::SetVolume(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_mainVolume_t& volume, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result) {
+ delegate_->SetVolume(sinkID, volume, callStatus, result);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> CommandInterfaceProxy<_AttributeExtensions...>::SetVolumeAsync(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_mainVolume_t& volume, SetVolumeAsyncCallback callback) {
+ return delegate_->SetVolumeAsync(sinkID, volume, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void CommandInterfaceProxy<_AttributeExtensions...>::VolumeStep(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_mainVolume_t& volumeStep, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result) {
+ delegate_->VolumeStep(sinkID, volumeStep, callStatus, result);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> CommandInterfaceProxy<_AttributeExtensions...>::VolumeStepAsync(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_mainVolume_t& volumeStep, VolumeStepAsyncCallback callback) {
+ return delegate_->VolumeStepAsync(sinkID, volumeStep, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void CommandInterfaceProxy<_AttributeExtensions...>::SetSinkMuteState(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MuteState_e& muteState, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result) {
+ delegate_->SetSinkMuteState(sinkID, muteState, callStatus, result);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> CommandInterfaceProxy<_AttributeExtensions...>::SetSinkMuteStateAsync(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MuteState_e& muteState, SetSinkMuteStateAsyncCallback callback) {
+ return delegate_->SetSinkMuteStateAsync(sinkID, muteState, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void CommandInterfaceProxy<_AttributeExtensions...>::SetMainSinkSoundProperty(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MainSoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result) {
+ delegate_->SetMainSinkSoundProperty(sinkID, soundProperty, callStatus, result);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> CommandInterfaceProxy<_AttributeExtensions...>::SetMainSinkSoundPropertyAsync(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MainSoundProperty_s& soundProperty, SetMainSinkSoundPropertyAsyncCallback callback) {
+ return delegate_->SetMainSinkSoundPropertyAsync(sinkID, soundProperty, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void CommandInterfaceProxy<_AttributeExtensions...>::SetMainSourceSoundProperty(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_MainSoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result) {
+ delegate_->SetMainSourceSoundProperty(sourceID, soundProperty, callStatus, result);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> CommandInterfaceProxy<_AttributeExtensions...>::SetMainSourceSoundPropertyAsync(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_MainSoundProperty_s& soundProperty, SetMainSourceSoundPropertyAsyncCallback callback) {
+ return delegate_->SetMainSourceSoundPropertyAsync(sourceID, soundProperty, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void CommandInterfaceProxy<_AttributeExtensions...>::SetSystemProperty(const CommandInterface::am_SystemProperty_s& soundProperty, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result) {
+ delegate_->SetSystemProperty(soundProperty, callStatus, result);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> CommandInterfaceProxy<_AttributeExtensions...>::SetSystemPropertyAsync(const CommandInterface::am_SystemProperty_s& soundProperty, SetSystemPropertyAsyncCallback callback) {
+ return delegate_->SetSystemPropertyAsync(soundProperty, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void CommandInterfaceProxy<_AttributeExtensions...>::GetListMainConnections(CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_MainConnectionType_l& listConnections) {
+ delegate_->GetListMainConnections(callStatus, result, listConnections);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> CommandInterfaceProxy<_AttributeExtensions...>::GetListMainConnectionsAsync(GetListMainConnectionsAsyncCallback callback) {
+ return delegate_->GetListMainConnectionsAsync(callback);
+}
+
+template <typename ... _AttributeExtensions>
+void CommandInterfaceProxy<_AttributeExtensions...>::GetListMainSinks(CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_SinkType_l& listMainSinks) {
+ delegate_->GetListMainSinks(callStatus, result, listMainSinks);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> CommandInterfaceProxy<_AttributeExtensions...>::GetListMainSinksAsync(GetListMainSinksAsyncCallback callback) {
+ return delegate_->GetListMainSinksAsync(callback);
+}
+
+template <typename ... _AttributeExtensions>
+void CommandInterfaceProxy<_AttributeExtensions...>::GetListMainSources(CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_SourceType_l& listMainSources) {
+ delegate_->GetListMainSources(callStatus, result, listMainSources);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> CommandInterfaceProxy<_AttributeExtensions...>::GetListMainSourcesAsync(GetListMainSourcesAsyncCallback callback) {
+ return delegate_->GetListMainSourcesAsync(callback);
+}
+
+template <typename ... _AttributeExtensions>
+void CommandInterfaceProxy<_AttributeExtensions...>::GetListMainSinkSoundProperties(const CommandInterface::am_sinkID_t& sinkID, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_MainSoundProperty_l& listSoundProperties) {
+ delegate_->GetListMainSinkSoundProperties(sinkID, callStatus, result, listSoundProperties);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> CommandInterfaceProxy<_AttributeExtensions...>::GetListMainSinkSoundPropertiesAsync(const CommandInterface::am_sinkID_t& sinkID, GetListMainSinkSoundPropertiesAsyncCallback callback) {
+ return delegate_->GetListMainSinkSoundPropertiesAsync(sinkID, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void CommandInterfaceProxy<_AttributeExtensions...>::GetListMainSourceSoundProperties(const CommandInterface::am_sourceID_t& sourceID, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_MainSoundProperty_l& listSourceProperties) {
+ delegate_->GetListMainSourceSoundProperties(sourceID, callStatus, result, listSourceProperties);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> CommandInterfaceProxy<_AttributeExtensions...>::GetListMainSourceSoundPropertiesAsync(const CommandInterface::am_sourceID_t& sourceID, GetListMainSourceSoundPropertiesAsyncCallback callback) {
+ return delegate_->GetListMainSourceSoundPropertiesAsync(sourceID, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void CommandInterfaceProxy<_AttributeExtensions...>::GetListSourceClasses(CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_SourceClass_l& listSourceClasses) {
+ delegate_->GetListSourceClasses(callStatus, result, listSourceClasses);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> CommandInterfaceProxy<_AttributeExtensions...>::GetListSourceClassesAsync(GetListSourceClassesAsyncCallback callback) {
+ return delegate_->GetListSourceClassesAsync(callback);
+}
+
+template <typename ... _AttributeExtensions>
+void CommandInterfaceProxy<_AttributeExtensions...>::GetListSinkClasses(CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_SinkClass_l& listSinkClasses) {
+ delegate_->GetListSinkClasses(callStatus, result, listSinkClasses);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> CommandInterfaceProxy<_AttributeExtensions...>::GetListSinkClassesAsync(GetListSinkClassesAsyncCallback callback) {
+ return delegate_->GetListSinkClassesAsync(callback);
+}
+
+template <typename ... _AttributeExtensions>
+void CommandInterfaceProxy<_AttributeExtensions...>::GetListSystemProperties(CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_SystemProperty_l& listSystemProperties) {
+ delegate_->GetListSystemProperties(callStatus, result, listSystemProperties);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> CommandInterfaceProxy<_AttributeExtensions...>::GetListSystemPropertiesAsync(GetListSystemPropertiesAsyncCallback callback) {
+ return delegate_->GetListSystemPropertiesAsync(callback);
+}
+
+template <typename ... _AttributeExtensions>
+void CommandInterfaceProxy<_AttributeExtensions...>::GetTimingInformation(const CommandInterface::am_mainConnectionID_t& mainConnectionID, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_timeSync_t& delay) {
+ delegate_->GetTimingInformation(mainConnectionID, callStatus, result, delay);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> CommandInterfaceProxy<_AttributeExtensions...>::GetTimingInformationAsync(const CommandInterface::am_mainConnectionID_t& mainConnectionID, GetTimingInformationAsyncCallback callback) {
+ return delegate_->GetTimingInformationAsync(mainConnectionID, callback);
+}
+
+
+template <typename ... _AttributeExtensions>
+std::string CommandInterfaceProxy<_AttributeExtensions...>::getAddress() const {
+ return delegate_->getAddress();
+}
+
+template <typename ... _AttributeExtensions>
+const std::string& CommandInterfaceProxy<_AttributeExtensions...>::getDomain() const {
+ return delegate_->getDomain();
+}
+
+template <typename ... _AttributeExtensions>
+const std::string& CommandInterfaceProxy<_AttributeExtensions...>::getServiceId() const {
+ return delegate_->getServiceId();
+}
+
+template <typename ... _AttributeExtensions>
+const std::string& CommandInterfaceProxy<_AttributeExtensions...>::getInstanceId() const {
+ return delegate_->getInstanceId();
+}
+
+template <typename ... _AttributeExtensions>
+bool CommandInterfaceProxy<_AttributeExtensions...>::isAvailable() const {
+ return delegate_->isAvailable();
+}
+
+template <typename ... _AttributeExtensions>
+CommonAPI::ProxyStatusEvent& CommandInterfaceProxy<_AttributeExtensions...>::getProxyStatusEvent() {
+ return delegate_->getProxyStatusEvent();
+}
+
+template <typename ... _AttributeExtensions>
+CommonAPI::InterfaceVersionAttribute& CommandInterfaceProxy<_AttributeExtensions...>::getInterfaceVersionAttribute() {
+ return delegate_->getInterfaceVersionAttribute();
+}
+
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
+
+
+
+#endif // ORG_GENIVI_AUDIOMANAGER_Command_Interface_PROXY_H_
diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceProxyBase.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceProxyBase.h
new file mode 100644
index 0000000..f7615a0
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceProxyBase.h
@@ -0,0 +1,170 @@
+ /*
+ * This file was generated by the CommonAPI Generators.
+ *
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+ #ifndef ORG_GENIVI_AUDIOMANAGER_Command_Interface_PROXY_BASE_H_
+ #define ORG_GENIVI_AUDIOMANAGER_Command_Interface_PROXY_BASE_H_
+
+ #include "CommandInterface.h"
+
+
+ #include <org/genivi/audiomanager/am.h>
+
+ #define COMMONAPI_INTERNAL_COMPILATION
+
+ #include <CommonAPI/InputStream.h>
+ #include <CommonAPI/OutputStream.h>
+ #include <CommonAPI/SerializableStruct.h>
+ #include <cstdint>
+ #include <string>
+ #include <vector>
+
+ #include <CommonAPI/Event.h>
+ #include <CommonAPI/Proxy.h>
+ #include <functional>
+ #include <future>
+
+ #undef COMMONAPI_INTERNAL_COMPILATION
+
+ namespace org {
+ namespace genivi {
+ namespace audiomanager {
+
+ class CommandInterfaceProxyBase: virtual public CommonAPI::Proxy {
+ public:
+ typedef CommonAPI::Event<> NumberOfMainConnectionsChangedEvent;
+ typedef CommonAPI::Event<CommandInterface::am_mainConnectionID_t, CommandInterface::am_ConnectionState_e> MainConnectionStateChangedEvent;
+ typedef CommonAPI::Event<> NumberOfSourceClassesChangedEvent;
+ typedef CommonAPI::Event<CommandInterface::am_SourceType_s> SourceAddedEvent;
+ typedef CommonAPI::Event<CommandInterface::am_sourceID_t> SourceRemovedEvent;
+ typedef CommonAPI::Event<CommandInterface::am_sourceID_t, CommandInterface::am_MainSoundProperty_s> MainSourceSoundPropertyChangedEvent;
+ typedef CommonAPI::Event<CommandInterface::am_sourceID_t, CommandInterface::am_Availability_s> SourceAvailabilityChangedEvent;
+ typedef CommonAPI::Event<> NumberOfSinkClassesChangedEvent;
+ typedef CommonAPI::Event<CommandInterface::am_SinkType_s> SinkAddedEvent;
+ typedef CommonAPI::Event<CommandInterface::am_sinkID_t> SinkRemovedEvent;
+ typedef CommonAPI::Event<CommandInterface::am_sinkID_t, CommandInterface::am_MainSoundProperty_s> MainSinkSoundPropertyChangedEvent;
+ typedef CommonAPI::Event<CommandInterface::am_sinkID_t, CommandInterface::am_Availability_s> SinkAvailabilityChangedEvent;
+ typedef CommonAPI::Event<CommandInterface::am_sinkID_t, CommandInterface::am_mainVolume_t> VolumeChangedEvent;
+ typedef CommonAPI::Event<CommandInterface::am_sinkID_t, CommandInterface::am_MuteState_e> SinkMuteStateChangedEvent;
+ typedef CommonAPI::Event<CommandInterface::am_SystemProperty_s> SystemPropertyChangedEvent;
+ typedef CommonAPI::Event<CommandInterface::am_mainConnectionID_t, CommandInterface::am_timeSync_t> TimingInformationChangedEvent;
+ typedef CommonAPI::Event<CommandInterface::am_sinkID_t, CommandInterface::am_sinkClass_t, CommandInterface::am_MainSoundProperty_l> SinkUpdatedEvent;
+ typedef CommonAPI::Event<CommandInterface::am_sourceID_t, CommandInterface::am_sourceClass_t, CommandInterface::am_MainSoundProperty_l> SourceUpdatedEvent;
+ typedef CommonAPI::Event<CommandInterface::am_sinkID_t, CommandInterface::am_NotificationPayload_s> SinkNotificationEvent;
+ typedef CommonAPI::Event<CommandInterface::am_sourceID_t, CommandInterface::am_NotificationPayload_s> SourceNotificationEvent;
+ typedef CommonAPI::Event<CommandInterface::am_sinkID_t, am::am_NotificationConfiguration_s> MainSinkNotificationConfigurationChangedEvent;
+ typedef CommonAPI::Event<CommandInterface::am_sourceID_t, am::am_NotificationConfiguration_s> MainSourceNotificationConfigurationChangedEvent;
+ typedef std::function<void(const CommonAPI::CallStatus&, const CommandInterface::am_Error_e&, const CommandInterface::am_mainConnectionID_t&)> ConnectAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const CommandInterface::am_Error_e&)> DisconnectAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const CommandInterface::am_Error_e&)> SetVolumeAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const CommandInterface::am_Error_e&)> VolumeStepAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const CommandInterface::am_Error_e&)> SetSinkMuteStateAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const CommandInterface::am_Error_e&)> SetMainSinkSoundPropertyAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const CommandInterface::am_Error_e&)> SetMainSourceSoundPropertyAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const CommandInterface::am_Error_e&)> SetSystemPropertyAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const CommandInterface::am_Error_e&, const CommandInterface::am_MainConnectionType_l&)> GetListMainConnectionsAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const CommandInterface::am_Error_e&, const CommandInterface::am_SinkType_l&)> GetListMainSinksAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const CommandInterface::am_Error_e&, const CommandInterface::am_SourceType_l&)> GetListMainSourcesAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const CommandInterface::am_Error_e&, const CommandInterface::am_MainSoundProperty_l&)> GetListMainSinkSoundPropertiesAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const CommandInterface::am_Error_e&, const CommandInterface::am_MainSoundProperty_l&)> GetListMainSourceSoundPropertiesAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const CommandInterface::am_Error_e&, const CommandInterface::am_SourceClass_l&)> GetListSourceClassesAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const CommandInterface::am_Error_e&, const CommandInterface::am_SinkClass_l&)> GetListSinkClassesAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const CommandInterface::am_Error_e&, const CommandInterface::am_SystemProperty_l&)> GetListSystemPropertiesAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const CommandInterface::am_Error_e&, const CommandInterface::am_timeSync_t&)> GetTimingInformationAsyncCallback;
+
+
+ virtual NumberOfMainConnectionsChangedEvent& getNumberOfMainConnectionsChangedEvent() = 0;
+ virtual MainConnectionStateChangedEvent& getMainConnectionStateChangedEvent() = 0;
+ virtual NumberOfSourceClassesChangedEvent& getNumberOfSourceClassesChangedEvent() = 0;
+ virtual SourceAddedEvent& getSourceAddedEvent() = 0;
+ virtual SourceRemovedEvent& getSourceRemovedEvent() = 0;
+ virtual MainSourceSoundPropertyChangedEvent& getMainSourceSoundPropertyChangedEvent() = 0;
+ virtual SourceAvailabilityChangedEvent& getSourceAvailabilityChangedEvent() = 0;
+ virtual NumberOfSinkClassesChangedEvent& getNumberOfSinkClassesChangedEvent() = 0;
+ virtual SinkAddedEvent& getSinkAddedEvent() = 0;
+ virtual SinkRemovedEvent& getSinkRemovedEvent() = 0;
+ virtual MainSinkSoundPropertyChangedEvent& getMainSinkSoundPropertyChangedEvent() = 0;
+ virtual SinkAvailabilityChangedEvent& getSinkAvailabilityChangedEvent() = 0;
+ virtual VolumeChangedEvent& getVolumeChangedEvent() = 0;
+ virtual SinkMuteStateChangedEvent& getSinkMuteStateChangedEvent() = 0;
+ virtual SystemPropertyChangedEvent& getSystemPropertyChangedEvent() = 0;
+ virtual TimingInformationChangedEvent& getTimingInformationChangedEvent() = 0;
+ virtual SinkUpdatedEvent& getSinkUpdatedEvent() = 0;
+ virtual SourceUpdatedEvent& getSourceUpdatedEvent() = 0;
+ virtual SinkNotificationEvent& getSinkNotificationEvent() = 0;
+ virtual SourceNotificationEvent& getSourceNotificationEvent() = 0;
+ virtual MainSinkNotificationConfigurationChangedEvent& getMainSinkNotificationConfigurationChangedEvent() = 0;
+ virtual MainSourceNotificationConfigurationChangedEvent& getMainSourceNotificationConfigurationChangedEvent() = 0;
+
+
+ virtual void Connect(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_sinkID_t& sinkID, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_mainConnectionID_t& mainConnectionID) = 0;
+ virtual std::future<CommonAPI::CallStatus> ConnectAsync(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_sinkID_t& sinkID, ConnectAsyncCallback callback) = 0;
+
+ virtual void Disconnect(const CommandInterface::am_mainConnectionID_t& mainConnectionID, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result) = 0;
+ virtual std::future<CommonAPI::CallStatus> DisconnectAsync(const CommandInterface::am_mainConnectionID_t& mainConnectionID, DisconnectAsyncCallback callback) = 0;
+
+ virtual void SetVolume(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_mainVolume_t& volume, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result) = 0;
+ virtual std::future<CommonAPI::CallStatus> SetVolumeAsync(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_mainVolume_t& volume, SetVolumeAsyncCallback callback) = 0;
+
+ virtual void VolumeStep(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_mainVolume_t& volumeStep, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result) = 0;
+ virtual std::future<CommonAPI::CallStatus> VolumeStepAsync(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_mainVolume_t& volumeStep, VolumeStepAsyncCallback callback) = 0;
+
+ virtual void SetSinkMuteState(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MuteState_e& muteState, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result) = 0;
+ virtual std::future<CommonAPI::CallStatus> SetSinkMuteStateAsync(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MuteState_e& muteState, SetSinkMuteStateAsyncCallback callback) = 0;
+
+ virtual void SetMainSinkSoundProperty(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MainSoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result) = 0;
+ virtual std::future<CommonAPI::CallStatus> SetMainSinkSoundPropertyAsync(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MainSoundProperty_s& soundProperty, SetMainSinkSoundPropertyAsyncCallback callback) = 0;
+
+ virtual void SetMainSourceSoundProperty(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_MainSoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result) = 0;
+ virtual std::future<CommonAPI::CallStatus> SetMainSourceSoundPropertyAsync(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_MainSoundProperty_s& soundProperty, SetMainSourceSoundPropertyAsyncCallback callback) = 0;
+
+ virtual void SetSystemProperty(const CommandInterface::am_SystemProperty_s& soundProperty, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result) = 0;
+ virtual std::future<CommonAPI::CallStatus> SetSystemPropertyAsync(const CommandInterface::am_SystemProperty_s& soundProperty, SetSystemPropertyAsyncCallback callback) = 0;
+
+ virtual void GetListMainConnections(CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_MainConnectionType_l& listConnections) = 0;
+ virtual std::future<CommonAPI::CallStatus> GetListMainConnectionsAsync(GetListMainConnectionsAsyncCallback callback) = 0;
+
+ virtual void GetListMainSinks(CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_SinkType_l& listMainSinks) = 0;
+ virtual std::future<CommonAPI::CallStatus> GetListMainSinksAsync(GetListMainSinksAsyncCallback callback) = 0;
+
+ virtual void GetListMainSources(CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_SourceType_l& listMainSources) = 0;
+ virtual std::future<CommonAPI::CallStatus> GetListMainSourcesAsync(GetListMainSourcesAsyncCallback callback) = 0;
+
+ virtual void GetListMainSinkSoundProperties(const CommandInterface::am_sinkID_t& sinkID, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_MainSoundProperty_l& listSoundProperties) = 0;
+ virtual std::future<CommonAPI::CallStatus> GetListMainSinkSoundPropertiesAsync(const CommandInterface::am_sinkID_t& sinkID, GetListMainSinkSoundPropertiesAsyncCallback callback) = 0;
+
+ virtual void GetListMainSourceSoundProperties(const CommandInterface::am_sourceID_t& sourceID, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_MainSoundProperty_l& listSourceProperties) = 0;
+ virtual std::future<CommonAPI::CallStatus> GetListMainSourceSoundPropertiesAsync(const CommandInterface::am_sourceID_t& sourceID, GetListMainSourceSoundPropertiesAsyncCallback callback) = 0;
+
+ virtual void GetListSourceClasses(CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_SourceClass_l& listSourceClasses) = 0;
+ virtual std::future<CommonAPI::CallStatus> GetListSourceClassesAsync(GetListSourceClassesAsyncCallback callback) = 0;
+
+ virtual void GetListSinkClasses(CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_SinkClass_l& listSinkClasses) = 0;
+ virtual std::future<CommonAPI::CallStatus> GetListSinkClassesAsync(GetListSinkClassesAsyncCallback callback) = 0;
+
+ virtual void GetListSystemProperties(CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_SystemProperty_l& listSystemProperties) = 0;
+ virtual std::future<CommonAPI::CallStatus> GetListSystemPropertiesAsync(GetListSystemPropertiesAsyncCallback callback) = 0;
+
+ virtual void GetTimingInformation(const CommandInterface::am_mainConnectionID_t& mainConnectionID, CommonAPI::CallStatus& callStatus, CommandInterface::am_Error_e& result, CommandInterface::am_timeSync_t& delay) = 0;
+ virtual std::future<CommonAPI::CallStatus> GetTimingInformationAsync(const CommandInterface::am_mainConnectionID_t& mainConnectionID, GetTimingInformationAsyncCallback callback) = 0;
+ };
+
+ } // namespace audiomanager
+ } // namespace genivi
+ } // namespace org
+
+ #endif // ORG_GENIVI_AUDIOMANAGER_Command_Interface_PROXY_BASE_H_
diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceStub.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceStub.h
new file mode 100644
index 0000000..2e26869
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceStub.h
@@ -0,0 +1,282 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_AUDIOMANAGER_Command_Interface_STUB_H_
+#define ORG_GENIVI_AUDIOMANAGER_Command_Interface_STUB_H_
+
+
+
+#include <org/genivi/audiomanager/am.h>
+
+#include "CommandInterface.h"
+
+#define COMMONAPI_INTERNAL_COMPILATION
+
+#include <CommonAPI/InputStream.h>
+#include <CommonAPI/OutputStream.h>
+#include <CommonAPI/SerializableStruct.h>
+#include <cstdint>
+#include <string>
+#include <vector>
+
+#include <CommonAPI/Stub.h>
+
+#undef COMMONAPI_INTERNAL_COMPILATION
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+
+/**
+ * Receives messages from remote and handles all dispatching of deserialized calls
+ * to a stub for the service CommandInterface. Also provides means to send broadcasts
+ * and attribute-changed-notifications of observable attributes as defined by this service.
+ * An application developer should not need to bother with this class.
+ */
+class CommandInterfaceStubAdapter: virtual public CommonAPI::StubAdapter, public CommandInterface {
+ public:
+
+ /**
+ * Sends a broadcast event for NumberOfMainConnectionsChanged. Should not be called directly.
+ * Instead, the "fire<broadcastName>Event" methods of the stub should be used.
+ */
+ virtual void fireNumberOfMainConnectionsChangedEvent() = 0;
+ /**
+ * Sends a broadcast event for MainConnectionStateChanged. Should not be called directly.
+ * Instead, the "fire<broadcastName>Event" methods of the stub should be used.
+ */
+ virtual void fireMainConnectionStateChangedEvent(const CommandInterface::am_mainConnectionID_t& connectionID, const CommandInterface::am_ConnectionState_e& connectionState) = 0;
+ /**
+ * Sends a broadcast event for NumberOfSourceClassesChanged. Should not be called directly.
+ * Instead, the "fire<broadcastName>Event" methods of the stub should be used.
+ */
+ virtual void fireNumberOfSourceClassesChangedEvent() = 0;
+ /**
+ * Sends a broadcast event for SourceAdded. Should not be called directly.
+ * Instead, the "fire<broadcastName>Event" methods of the stub should be used.
+ */
+ virtual void fireSourceAddedEvent(const CommandInterface::am_SourceType_s& newSource) = 0;
+ /**
+ * Sends a broadcast event for SourceRemoved. Should not be called directly.
+ * Instead, the "fire<broadcastName>Event" methods of the stub should be used.
+ */
+ virtual void fireSourceRemovedEvent(const CommandInterface::am_sourceID_t& removedSourceID) = 0;
+ /**
+ * Sends a broadcast event for MainSourceSoundPropertyChanged. Should not be called directly.
+ * Instead, the "fire<broadcastName>Event" methods of the stub should be used.
+ */
+ virtual void fireMainSourceSoundPropertyChangedEvent(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_MainSoundProperty_s& SoundProperty) = 0;
+ /**
+ * Sends a broadcast event for SourceAvailabilityChanged. Should not be called directly.
+ * Instead, the "fire<broadcastName>Event" methods of the stub should be used.
+ */
+ virtual void fireSourceAvailabilityChangedEvent(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_Availability_s& availability) = 0;
+ /**
+ * Sends a broadcast event for NumberOfSinkClassesChanged. Should not be called directly.
+ * Instead, the "fire<broadcastName>Event" methods of the stub should be used.
+ */
+ virtual void fireNumberOfSinkClassesChangedEvent() = 0;
+ /**
+ * Sends a broadcast event for SinkAdded. Should not be called directly.
+ * Instead, the "fire<broadcastName>Event" methods of the stub should be used.
+ */
+ virtual void fireSinkAddedEvent(const CommandInterface::am_SinkType_s& newSink) = 0;
+ /**
+ * Sends a broadcast event for SinkRemoved. Should not be called directly.
+ * Instead, the "fire<broadcastName>Event" methods of the stub should be used.
+ */
+ virtual void fireSinkRemovedEvent(const CommandInterface::am_sinkID_t& removedSinkID) = 0;
+ /**
+ * Sends a broadcast event for MainSinkSoundPropertyChanged. Should not be called directly.
+ * Instead, the "fire<broadcastName>Event" methods of the stub should be used.
+ */
+ virtual void fireMainSinkSoundPropertyChangedEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MainSoundProperty_s& SoundProperty) = 0;
+ /**
+ * Sends a broadcast event for SinkAvailabilityChanged. Should not be called directly.
+ * Instead, the "fire<broadcastName>Event" methods of the stub should be used.
+ */
+ virtual void fireSinkAvailabilityChangedEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_Availability_s& availability) = 0;
+ /**
+ * Sends a broadcast event for VolumeChanged. Should not be called directly.
+ * Instead, the "fire<broadcastName>Event" methods of the stub should be used.
+ */
+ virtual void fireVolumeChangedEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_mainVolume_t& volume) = 0;
+ /**
+ * Sends a broadcast event for SinkMuteStateChanged. Should not be called directly.
+ * Instead, the "fire<broadcastName>Event" methods of the stub should be used.
+ */
+ virtual void fireSinkMuteStateChangedEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MuteState_e& muteState) = 0;
+ /**
+ * Sends a broadcast event for SystemPropertyChanged. Should not be called directly.
+ * Instead, the "fire<broadcastName>Event" methods of the stub should be used.
+ */
+ virtual void fireSystemPropertyChangedEvent(const CommandInterface::am_SystemProperty_s& SystemProperty) = 0;
+ /**
+ * Sends a broadcast event for TimingInformationChanged. Should not be called directly.
+ * Instead, the "fire<broadcastName>Event" methods of the stub should be used.
+ */
+ virtual void fireTimingInformationChangedEvent(const CommandInterface::am_mainConnectionID_t& mainConnection, const CommandInterface::am_timeSync_t& time) = 0;
+ /**
+ * Sends a broadcast event for SinkUpdated. Should not be called directly.
+ * Instead, the "fire<broadcastName>Event" methods of the stub should be used.
+ */
+ virtual void fireSinkUpdatedEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_sinkClass_t& sinkClassID, const CommandInterface::am_MainSoundProperty_l& listMainSoundProperties) = 0;
+ /**
+ * Sends a broadcast event for SourceUpdated. Should not be called directly.
+ * Instead, the "fire<broadcastName>Event" methods of the stub should be used.
+ */
+ virtual void fireSourceUpdatedEvent(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_sourceClass_t& sourceClassID, const CommandInterface::am_MainSoundProperty_l& listMainSoundProperties) = 0;
+ /**
+ * Sends a broadcast event for SinkNotification. Should not be called directly.
+ * Instead, the "fire<broadcastName>Event" methods of the stub should be used.
+ */
+ virtual void fireSinkNotificationEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_NotificationPayload_s& notification) = 0;
+ /**
+ * Sends a broadcast event for SourceNotification. Should not be called directly.
+ * Instead, the "fire<broadcastName>Event" methods of the stub should be used.
+ */
+ virtual void fireSourceNotificationEvent(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_NotificationPayload_s& notification) = 0;
+ /**
+ * Sends a broadcast event for MainSinkNotificationConfigurationChanged. Should not be called directly.
+ * Instead, the "fire<broadcastName>Event" methods of the stub should be used.
+ */
+ virtual void fireMainSinkNotificationConfigurationChangedEvent(const CommandInterface::am_sinkID_t& sinkID, const am::am_NotificationConfiguration_s& mainNotificationConfiguration) = 0;
+ /**
+ * Sends a broadcast event for MainSourceNotificationConfigurationChanged. Should not be called directly.
+ * Instead, the "fire<broadcastName>Event" methods of the stub should be used.
+ */
+ virtual void fireMainSourceNotificationConfigurationChangedEvent(const CommandInterface::am_sourceID_t& sourceID, const am::am_NotificationConfiguration_s& mainNotificationConfiguration) = 0;
+};
+
+
+/**
+ * Defines the necessary callbacks to handle remote set events related to the attributes
+ * defined in the IDL description for CommandInterface.
+ * For each attribute two callbacks are defined:
+ * - a verification callback that allows to verify the requested value and to prevent setting
+ * e.g. an invalid value ("onRemoteSet<AttributeName>").
+ * - an action callback to do local work after the attribute value has been changed
+ * ("onRemote<AttributeName>Changed").
+ *
+ * This class and the one below are the ones an application developer needs to have
+ * a look at if he wants to implement a service.
+ */
+class CommandInterfaceStubRemoteEvent {
+ public:
+ virtual ~CommandInterfaceStubRemoteEvent() { }
+
+};
+
+
+/**
+ * Defines the interface that must be implemented by any class that should provide
+ * the service CommandInterface to remote clients.
+ * This class and the one above are the ones an application developer needs to have
+ * a look at if he wants to implement a service.
+ */
+class CommandInterfaceStub : public CommonAPI::Stub<CommandInterfaceStubAdapter , CommandInterfaceStubRemoteEvent> {
+ public:
+ virtual ~CommandInterfaceStub() { }
+
+
+ /// This is the method that will be called on remote calls on the method Connect.
+ virtual void Connect(CommandInterface::am_sourceID_t sourceID, CommandInterface::am_sinkID_t sinkID, CommandInterface::am_Error_e& result, CommandInterface::am_mainConnectionID_t& mainConnectionID) = 0;
+ /// This is the method that will be called on remote calls on the method Disconnect.
+ virtual void Disconnect(CommandInterface::am_mainConnectionID_t mainConnectionID, CommandInterface::am_Error_e& result) = 0;
+ /// This is the method that will be called on remote calls on the method SetVolume.
+ virtual void SetVolume(CommandInterface::am_sinkID_t sinkID, CommandInterface::am_mainVolume_t volume, CommandInterface::am_Error_e& result) = 0;
+ /// This is the method that will be called on remote calls on the method VolumeStep.
+ virtual void VolumeStep(CommandInterface::am_sinkID_t sinkID, CommandInterface::am_mainVolume_t volumeStep, CommandInterface::am_Error_e& result) = 0;
+ /// This is the method that will be called on remote calls on the method SetSinkMuteState.
+ virtual void SetSinkMuteState(CommandInterface::am_sinkID_t sinkID, CommandInterface::am_MuteState_e muteState, CommandInterface::am_Error_e& result) = 0;
+ /// This is the method that will be called on remote calls on the method SetMainSinkSoundProperty.
+ virtual void SetMainSinkSoundProperty(CommandInterface::am_sinkID_t sinkID, CommandInterface::am_MainSoundProperty_s soundProperty, CommandInterface::am_Error_e& result) = 0;
+ /// This is the method that will be called on remote calls on the method SetMainSourceSoundProperty.
+ virtual void SetMainSourceSoundProperty(CommandInterface::am_sourceID_t sourceID, CommandInterface::am_MainSoundProperty_s soundProperty, CommandInterface::am_Error_e& result) = 0;
+ /// This is the method that will be called on remote calls on the method SetSystemProperty.
+ virtual void SetSystemProperty(CommandInterface::am_SystemProperty_s soundProperty, CommandInterface::am_Error_e& result) = 0;
+ /// This is the method that will be called on remote calls on the method GetListMainConnections.
+ virtual void GetListMainConnections(CommandInterface::am_Error_e& result, CommandInterface::am_MainConnectionType_l& listConnections) = 0;
+ /// This is the method that will be called on remote calls on the method GetListMainSinks.
+ virtual void GetListMainSinks(CommandInterface::am_Error_e& result, CommandInterface::am_SinkType_l& listMainSinks) = 0;
+ /// This is the method that will be called on remote calls on the method GetListMainSources.
+ virtual void GetListMainSources(CommandInterface::am_Error_e& result, CommandInterface::am_SourceType_l& listMainSources) = 0;
+ /// This is the method that will be called on remote calls on the method GetListMainSinkSoundProperties.
+ virtual void GetListMainSinkSoundProperties(CommandInterface::am_sinkID_t sinkID, CommandInterface::am_Error_e& result, CommandInterface::am_MainSoundProperty_l& listSoundProperties) = 0;
+ /// This is the method that will be called on remote calls on the method GetListMainSourceSoundProperties.
+ virtual void GetListMainSourceSoundProperties(CommandInterface::am_sourceID_t sourceID, CommandInterface::am_Error_e& result, CommandInterface::am_MainSoundProperty_l& listSourceProperties) = 0;
+ /// This is the method that will be called on remote calls on the method GetListSourceClasses.
+ virtual void GetListSourceClasses(CommandInterface::am_Error_e& result, CommandInterface::am_SourceClass_l& listSourceClasses) = 0;
+ /// This is the method that will be called on remote calls on the method GetListSinkClasses.
+ virtual void GetListSinkClasses(CommandInterface::am_Error_e& result, CommandInterface::am_SinkClass_l& listSinkClasses) = 0;
+ /// This is the method that will be called on remote calls on the method GetListSystemProperties.
+ virtual void GetListSystemProperties(CommandInterface::am_Error_e& result, CommandInterface::am_SystemProperty_l& listSystemProperties) = 0;
+ /// This is the method that will be called on remote calls on the method GetTimingInformation.
+ virtual void GetTimingInformation(CommandInterface::am_mainConnectionID_t mainConnectionID, CommandInterface::am_Error_e& result, CommandInterface::am_timeSync_t& delay) = 0;
+
+ /// Sends a broadcast event for NumberOfMainConnectionsChanged.
+ virtual void fireNumberOfMainConnectionsChangedEvent() = 0;
+ /// Sends a broadcast event for MainConnectionStateChanged.
+ virtual void fireMainConnectionStateChangedEvent(const CommandInterface::am_mainConnectionID_t& connectionID, const CommandInterface::am_ConnectionState_e& connectionState) = 0;
+ /// Sends a broadcast event for NumberOfSourceClassesChanged.
+ virtual void fireNumberOfSourceClassesChangedEvent() = 0;
+ /// Sends a broadcast event for SourceAdded.
+ virtual void fireSourceAddedEvent(const CommandInterface::am_SourceType_s& newSource) = 0;
+ /// Sends a broadcast event for SourceRemoved.
+ virtual void fireSourceRemovedEvent(const CommandInterface::am_sourceID_t& removedSourceID) = 0;
+ /// Sends a broadcast event for MainSourceSoundPropertyChanged.
+ virtual void fireMainSourceSoundPropertyChangedEvent(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_MainSoundProperty_s& SoundProperty) = 0;
+ /// Sends a broadcast event for SourceAvailabilityChanged.
+ virtual void fireSourceAvailabilityChangedEvent(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_Availability_s& availability) = 0;
+ /// Sends a broadcast event for NumberOfSinkClassesChanged.
+ virtual void fireNumberOfSinkClassesChangedEvent() = 0;
+ /// Sends a broadcast event for SinkAdded.
+ virtual void fireSinkAddedEvent(const CommandInterface::am_SinkType_s& newSink) = 0;
+ /// Sends a broadcast event for SinkRemoved.
+ virtual void fireSinkRemovedEvent(const CommandInterface::am_sinkID_t& removedSinkID) = 0;
+ /// Sends a broadcast event for MainSinkSoundPropertyChanged.
+ virtual void fireMainSinkSoundPropertyChangedEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MainSoundProperty_s& SoundProperty) = 0;
+ /// Sends a broadcast event for SinkAvailabilityChanged.
+ virtual void fireSinkAvailabilityChangedEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_Availability_s& availability) = 0;
+ /// Sends a broadcast event for VolumeChanged.
+ virtual void fireVolumeChangedEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_mainVolume_t& volume) = 0;
+ /// Sends a broadcast event for SinkMuteStateChanged.
+ virtual void fireSinkMuteStateChangedEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MuteState_e& muteState) = 0;
+ /// Sends a broadcast event for SystemPropertyChanged.
+ virtual void fireSystemPropertyChangedEvent(const CommandInterface::am_SystemProperty_s& SystemProperty) = 0;
+ /// Sends a broadcast event for TimingInformationChanged.
+ virtual void fireTimingInformationChangedEvent(const CommandInterface::am_mainConnectionID_t& mainConnection, const CommandInterface::am_timeSync_t& time) = 0;
+ /// Sends a broadcast event for SinkUpdated.
+ virtual void fireSinkUpdatedEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_sinkClass_t& sinkClassID, const CommandInterface::am_MainSoundProperty_l& listMainSoundProperties) = 0;
+ /// Sends a broadcast event for SourceUpdated.
+ virtual void fireSourceUpdatedEvent(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_sourceClass_t& sourceClassID, const CommandInterface::am_MainSoundProperty_l& listMainSoundProperties) = 0;
+ /// Sends a broadcast event for SinkNotification.
+ virtual void fireSinkNotificationEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_NotificationPayload_s& notification) = 0;
+ /// Sends a broadcast event for SourceNotification.
+ virtual void fireSourceNotificationEvent(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_NotificationPayload_s& notification) = 0;
+ /// Sends a broadcast event for MainSinkNotificationConfigurationChanged.
+ virtual void fireMainSinkNotificationConfigurationChangedEvent(const CommandInterface::am_sinkID_t& sinkID, const am::am_NotificationConfiguration_s& mainNotificationConfiguration) = 0;
+ /// Sends a broadcast event for MainSourceNotificationConfigurationChanged.
+ virtual void fireMainSourceNotificationConfigurationChangedEvent(const CommandInterface::am_sourceID_t& sourceID, const am::am_NotificationConfiguration_s& mainNotificationConfiguration) = 0;
+};
+
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
+
+#endif // ORG_GENIVI_AUDIOMANAGER_Command_Interface_STUB_H_
diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceStubDefault.cpp b/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceStubDefault.cpp
new file mode 100644
index 0000000..0f44b08
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceStubDefault.cpp
@@ -0,0 +1,177 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#include <org/genivi/audiomanager/CommandInterfaceStubDefault.h>
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+
+CommandInterfaceStubDefault::CommandInterfaceStubDefault():
+ remoteEventHandler_(this) {
+}
+
+CommandInterfaceStubRemoteEvent* CommandInterfaceStubDefault::initStubAdapter(const std::shared_ptr<CommandInterfaceStubAdapter>& stubAdapter) {
+ stubAdapter_ = stubAdapter;
+ return &remoteEventHandler_;
+}
+
+
+void CommandInterfaceStubDefault::Connect(CommandInterface::am_sourceID_t sourceID, CommandInterface::am_sinkID_t sinkID, CommandInterface::am_Error_e& result, CommandInterface::am_mainConnectionID_t& mainConnectionID) {
+ // No operation in default
+}
+
+void CommandInterfaceStubDefault::Disconnect(CommandInterface::am_mainConnectionID_t mainConnectionID, CommandInterface::am_Error_e& result) {
+ // No operation in default
+}
+
+void CommandInterfaceStubDefault::SetVolume(CommandInterface::am_sinkID_t sinkID, CommandInterface::am_mainVolume_t volume, CommandInterface::am_Error_e& result) {
+ // No operation in default
+}
+
+void CommandInterfaceStubDefault::VolumeStep(CommandInterface::am_sinkID_t sinkID, CommandInterface::am_mainVolume_t volumeStep, CommandInterface::am_Error_e& result) {
+ // No operation in default
+}
+
+void CommandInterfaceStubDefault::SetSinkMuteState(CommandInterface::am_sinkID_t sinkID, CommandInterface::am_MuteState_e muteState, CommandInterface::am_Error_e& result) {
+ // No operation in default
+}
+
+void CommandInterfaceStubDefault::SetMainSinkSoundProperty(CommandInterface::am_sinkID_t sinkID, CommandInterface::am_MainSoundProperty_s soundProperty, CommandInterface::am_Error_e& result) {
+ // No operation in default
+}
+
+void CommandInterfaceStubDefault::SetMainSourceSoundProperty(CommandInterface::am_sourceID_t sourceID, CommandInterface::am_MainSoundProperty_s soundProperty, CommandInterface::am_Error_e& result) {
+ // No operation in default
+}
+
+void CommandInterfaceStubDefault::SetSystemProperty(CommandInterface::am_SystemProperty_s soundProperty, CommandInterface::am_Error_e& result) {
+ // No operation in default
+}
+
+void CommandInterfaceStubDefault::GetListMainConnections(CommandInterface::am_Error_e& result, CommandInterface::am_MainConnectionType_l& listConnections) {
+ // No operation in default
+}
+
+void CommandInterfaceStubDefault::GetListMainSinks(CommandInterface::am_Error_e& result, CommandInterface::am_SinkType_l& listMainSinks) {
+ // No operation in default
+}
+
+void CommandInterfaceStubDefault::GetListMainSources(CommandInterface::am_Error_e& result, CommandInterface::am_SourceType_l& listMainSources) {
+ // No operation in default
+}
+
+void CommandInterfaceStubDefault::GetListMainSinkSoundProperties(CommandInterface::am_sinkID_t sinkID, CommandInterface::am_Error_e& result, CommandInterface::am_MainSoundProperty_l& listSoundProperties) {
+ // No operation in default
+}
+
+void CommandInterfaceStubDefault::GetListMainSourceSoundProperties(CommandInterface::am_sourceID_t sourceID, CommandInterface::am_Error_e& result, CommandInterface::am_MainSoundProperty_l& listSourceProperties) {
+ // No operation in default
+}
+
+void CommandInterfaceStubDefault::GetListSourceClasses(CommandInterface::am_Error_e& result, CommandInterface::am_SourceClass_l& listSourceClasses) {
+ // No operation in default
+}
+
+void CommandInterfaceStubDefault::GetListSinkClasses(CommandInterface::am_Error_e& result, CommandInterface::am_SinkClass_l& listSinkClasses) {
+ // No operation in default
+}
+
+void CommandInterfaceStubDefault::GetListSystemProperties(CommandInterface::am_Error_e& result, CommandInterface::am_SystemProperty_l& listSystemProperties) {
+ // No operation in default
+}
+
+void CommandInterfaceStubDefault::GetTimingInformation(CommandInterface::am_mainConnectionID_t mainConnectionID, CommandInterface::am_Error_e& result, CommandInterface::am_timeSync_t& delay) {
+ // No operation in default
+}
+
+
+void CommandInterfaceStubDefault::fireNumberOfMainConnectionsChangedEvent() {
+ stubAdapter_->fireNumberOfMainConnectionsChangedEvent();
+}
+void CommandInterfaceStubDefault::fireMainConnectionStateChangedEvent(const CommandInterface::am_mainConnectionID_t& connectionID, const CommandInterface::am_ConnectionState_e& connectionState) {
+ stubAdapter_->fireMainConnectionStateChangedEvent(connectionID, connectionState);
+}
+void CommandInterfaceStubDefault::fireNumberOfSourceClassesChangedEvent() {
+ stubAdapter_->fireNumberOfSourceClassesChangedEvent();
+}
+void CommandInterfaceStubDefault::fireSourceAddedEvent(const CommandInterface::am_SourceType_s& newSource) {
+ stubAdapter_->fireSourceAddedEvent(newSource);
+}
+void CommandInterfaceStubDefault::fireSourceRemovedEvent(const CommandInterface::am_sourceID_t& removedSourceID) {
+ stubAdapter_->fireSourceRemovedEvent(removedSourceID);
+}
+void CommandInterfaceStubDefault::fireMainSourceSoundPropertyChangedEvent(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_MainSoundProperty_s& SoundProperty) {
+ stubAdapter_->fireMainSourceSoundPropertyChangedEvent(sourceID, SoundProperty);
+}
+void CommandInterfaceStubDefault::fireSourceAvailabilityChangedEvent(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_Availability_s& availability) {
+ stubAdapter_->fireSourceAvailabilityChangedEvent(sourceID, availability);
+}
+void CommandInterfaceStubDefault::fireNumberOfSinkClassesChangedEvent() {
+ stubAdapter_->fireNumberOfSinkClassesChangedEvent();
+}
+void CommandInterfaceStubDefault::fireSinkAddedEvent(const CommandInterface::am_SinkType_s& newSink) {
+ stubAdapter_->fireSinkAddedEvent(newSink);
+}
+void CommandInterfaceStubDefault::fireSinkRemovedEvent(const CommandInterface::am_sinkID_t& removedSinkID) {
+ stubAdapter_->fireSinkRemovedEvent(removedSinkID);
+}
+void CommandInterfaceStubDefault::fireMainSinkSoundPropertyChangedEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MainSoundProperty_s& SoundProperty) {
+ stubAdapter_->fireMainSinkSoundPropertyChangedEvent(sinkID, SoundProperty);
+}
+void CommandInterfaceStubDefault::fireSinkAvailabilityChangedEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_Availability_s& availability) {
+ stubAdapter_->fireSinkAvailabilityChangedEvent(sinkID, availability);
+}
+void CommandInterfaceStubDefault::fireVolumeChangedEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_mainVolume_t& volume) {
+ stubAdapter_->fireVolumeChangedEvent(sinkID, volume);
+}
+void CommandInterfaceStubDefault::fireSinkMuteStateChangedEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MuteState_e& muteState) {
+ stubAdapter_->fireSinkMuteStateChangedEvent(sinkID, muteState);
+}
+void CommandInterfaceStubDefault::fireSystemPropertyChangedEvent(const CommandInterface::am_SystemProperty_s& SystemProperty) {
+ stubAdapter_->fireSystemPropertyChangedEvent(SystemProperty);
+}
+void CommandInterfaceStubDefault::fireTimingInformationChangedEvent(const CommandInterface::am_mainConnectionID_t& mainConnection, const CommandInterface::am_timeSync_t& time) {
+ stubAdapter_->fireTimingInformationChangedEvent(mainConnection, time);
+}
+void CommandInterfaceStubDefault::fireSinkUpdatedEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_sinkClass_t& sinkClassID, const CommandInterface::am_MainSoundProperty_l& listMainSoundProperties) {
+ stubAdapter_->fireSinkUpdatedEvent(sinkID, sinkClassID, listMainSoundProperties);
+}
+void CommandInterfaceStubDefault::fireSourceUpdatedEvent(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_sourceClass_t& sourceClassID, const CommandInterface::am_MainSoundProperty_l& listMainSoundProperties) {
+ stubAdapter_->fireSourceUpdatedEvent(sourceID, sourceClassID, listMainSoundProperties);
+}
+void CommandInterfaceStubDefault::fireSinkNotificationEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_NotificationPayload_s& notification) {
+ stubAdapter_->fireSinkNotificationEvent(sinkID, notification);
+}
+void CommandInterfaceStubDefault::fireSourceNotificationEvent(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_NotificationPayload_s& notification) {
+ stubAdapter_->fireSourceNotificationEvent(sourceID, notification);
+}
+void CommandInterfaceStubDefault::fireMainSinkNotificationConfigurationChangedEvent(const CommandInterface::am_sinkID_t& sinkID, const am::am_NotificationConfiguration_s& mainNotificationConfiguration) {
+ stubAdapter_->fireMainSinkNotificationConfigurationChangedEvent(sinkID, mainNotificationConfiguration);
+}
+void CommandInterfaceStubDefault::fireMainSourceNotificationConfigurationChangedEvent(const CommandInterface::am_sourceID_t& sourceID, const am::am_NotificationConfiguration_s& mainNotificationConfiguration) {
+ stubAdapter_->fireMainSourceNotificationConfigurationChangedEvent(sourceID, mainNotificationConfiguration);
+}
+
+CommandInterfaceStubDefault::RemoteEventHandler::RemoteEventHandler(CommandInterfaceStubDefault* defaultStub):
+ defaultStub_(defaultStub) {
+}
+
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceStubDefault.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceStubDefault.h
new file mode 100644
index 0000000..a2610c2
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/CommandInterfaceStubDefault.h
@@ -0,0 +1,124 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_AUDIOMANAGER_Command_Interface_STUB_DEFAULT_H_
+#define ORG_GENIVI_AUDIOMANAGER_Command_Interface_STUB_DEFAULT_H_
+
+#include <org/genivi/audiomanager/CommandInterfaceStub.h>
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+
+/**
+ * Provides a default implementation for CommandInterfaceStubRemoteEvent and
+ * CommandInterfaceStub. Method callbacks have an empty implementation,
+ * remote set calls on attributes will always change the value of the attribute
+ * to the one received.
+ *
+ * Override this stub if you only want to provide a subset of the functionality
+ * that would be defined for this service, and/or if you do not need any non-default
+ * behaviour.
+ */
+class CommandInterfaceStubDefault : public CommandInterfaceStub {
+ public:
+ CommandInterfaceStubDefault();
+
+ CommandInterfaceStubRemoteEvent* initStubAdapter(const std::shared_ptr<CommandInterfaceStubAdapter>& stubAdapter);
+
+
+ virtual void Connect(CommandInterface::am_sourceID_t sourceID, CommandInterface::am_sinkID_t sinkID, CommandInterface::am_Error_e& result, CommandInterface::am_mainConnectionID_t& mainConnectionID);
+
+ virtual void Disconnect(CommandInterface::am_mainConnectionID_t mainConnectionID, CommandInterface::am_Error_e& result);
+
+ virtual void SetVolume(CommandInterface::am_sinkID_t sinkID, CommandInterface::am_mainVolume_t volume, CommandInterface::am_Error_e& result);
+
+ virtual void VolumeStep(CommandInterface::am_sinkID_t sinkID, CommandInterface::am_mainVolume_t volumeStep, CommandInterface::am_Error_e& result);
+
+ virtual void SetSinkMuteState(CommandInterface::am_sinkID_t sinkID, CommandInterface::am_MuteState_e muteState, CommandInterface::am_Error_e& result);
+
+ virtual void SetMainSinkSoundProperty(CommandInterface::am_sinkID_t sinkID, CommandInterface::am_MainSoundProperty_s soundProperty, CommandInterface::am_Error_e& result);
+
+ virtual void SetMainSourceSoundProperty(CommandInterface::am_sourceID_t sourceID, CommandInterface::am_MainSoundProperty_s soundProperty, CommandInterface::am_Error_e& result);
+
+ virtual void SetSystemProperty(CommandInterface::am_SystemProperty_s soundProperty, CommandInterface::am_Error_e& result);
+
+ virtual void GetListMainConnections(CommandInterface::am_Error_e& result, CommandInterface::am_MainConnectionType_l& listConnections);
+
+ virtual void GetListMainSinks(CommandInterface::am_Error_e& result, CommandInterface::am_SinkType_l& listMainSinks);
+
+ virtual void GetListMainSources(CommandInterface::am_Error_e& result, CommandInterface::am_SourceType_l& listMainSources);
+
+ virtual void GetListMainSinkSoundProperties(CommandInterface::am_sinkID_t sinkID, CommandInterface::am_Error_e& result, CommandInterface::am_MainSoundProperty_l& listSoundProperties);
+
+ virtual void GetListMainSourceSoundProperties(CommandInterface::am_sourceID_t sourceID, CommandInterface::am_Error_e& result, CommandInterface::am_MainSoundProperty_l& listSourceProperties);
+
+ virtual void GetListSourceClasses(CommandInterface::am_Error_e& result, CommandInterface::am_SourceClass_l& listSourceClasses);
+
+ virtual void GetListSinkClasses(CommandInterface::am_Error_e& result, CommandInterface::am_SinkClass_l& listSinkClasses);
+
+ virtual void GetListSystemProperties(CommandInterface::am_Error_e& result, CommandInterface::am_SystemProperty_l& listSystemProperties);
+
+ virtual void GetTimingInformation(CommandInterface::am_mainConnectionID_t mainConnectionID, CommandInterface::am_Error_e& result, CommandInterface::am_timeSync_t& delay);
+
+
+ virtual void fireNumberOfMainConnectionsChangedEvent();
+ virtual void fireMainConnectionStateChangedEvent(const CommandInterface::am_mainConnectionID_t& connectionID, const CommandInterface::am_ConnectionState_e& connectionState);
+ virtual void fireNumberOfSourceClassesChangedEvent();
+ virtual void fireSourceAddedEvent(const CommandInterface::am_SourceType_s& newSource);
+ virtual void fireSourceRemovedEvent(const CommandInterface::am_sourceID_t& removedSourceID);
+ virtual void fireMainSourceSoundPropertyChangedEvent(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_MainSoundProperty_s& SoundProperty);
+ virtual void fireSourceAvailabilityChangedEvent(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_Availability_s& availability);
+ virtual void fireNumberOfSinkClassesChangedEvent();
+ virtual void fireSinkAddedEvent(const CommandInterface::am_SinkType_s& newSink);
+ virtual void fireSinkRemovedEvent(const CommandInterface::am_sinkID_t& removedSinkID);
+ virtual void fireMainSinkSoundPropertyChangedEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MainSoundProperty_s& SoundProperty);
+ virtual void fireSinkAvailabilityChangedEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_Availability_s& availability);
+ virtual void fireVolumeChangedEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_mainVolume_t& volume);
+ virtual void fireSinkMuteStateChangedEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_MuteState_e& muteState);
+ virtual void fireSystemPropertyChangedEvent(const CommandInterface::am_SystemProperty_s& SystemProperty);
+ virtual void fireTimingInformationChangedEvent(const CommandInterface::am_mainConnectionID_t& mainConnection, const CommandInterface::am_timeSync_t& time);
+ virtual void fireSinkUpdatedEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_sinkClass_t& sinkClassID, const CommandInterface::am_MainSoundProperty_l& listMainSoundProperties);
+ virtual void fireSourceUpdatedEvent(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_sourceClass_t& sourceClassID, const CommandInterface::am_MainSoundProperty_l& listMainSoundProperties);
+ virtual void fireSinkNotificationEvent(const CommandInterface::am_sinkID_t& sinkID, const CommandInterface::am_NotificationPayload_s& notification);
+ virtual void fireSourceNotificationEvent(const CommandInterface::am_sourceID_t& sourceID, const CommandInterface::am_NotificationPayload_s& notification);
+ virtual void fireMainSinkNotificationConfigurationChangedEvent(const CommandInterface::am_sinkID_t& sinkID, const am::am_NotificationConfiguration_s& mainNotificationConfiguration);
+ virtual void fireMainSourceNotificationConfigurationChangedEvent(const CommandInterface::am_sourceID_t& sourceID, const am::am_NotificationConfiguration_s& mainNotificationConfiguration);
+
+ protected:
+
+ private:
+ class RemoteEventHandler: public CommandInterfaceStubRemoteEvent {
+ public:
+ RemoteEventHandler(CommandInterfaceStubDefault* defaultStub);
+
+
+ private:
+ CommandInterfaceStubDefault* defaultStub_;
+ };
+
+ RemoteEventHandler remoteEventHandler_;
+ std::shared_ptr<CommandInterfaceStubAdapter> stubAdapter_;
+
+};
+
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
+
+#endif // ORG_GENIVI_AUDIOMANAGER_Command_Interface_STUB_DEFAULT_H_
diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/am.cpp b/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/am.cpp
new file mode 100644
index 0000000..94e18a9
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/am.cpp
@@ -0,0 +1,477 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#include "am.h"
+
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+namespace am {
+
+distanceInformation_s::distanceInformation_s(const int32_t& FrontLeftValue, const int32_t& FrontRightValue, const int32_t& RearLeftValue, const int32_t& RearRightValue):
+ FrontLeft(FrontLeftValue),
+ FrontRight(FrontRightValue),
+ RearLeft(RearLeftValue),
+ RearRight(RearRightValue)
+{
+}
+
+
+bool operator==(const distanceInformation_s& lhs, const distanceInformation_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.FrontLeft == rhs.FrontLeft &&
+ lhs.FrontRight == rhs.FrontRight &&
+ lhs.RearLeft == rhs.RearLeft &&
+ lhs.RearRight == rhs.RearRight
+ ;
+}
+
+void distanceInformation_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> FrontLeft;
+ inputStream >> FrontRight;
+ inputStream >> RearLeft;
+ inputStream >> RearRight;
+}
+
+void distanceInformation_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << FrontLeft;
+ outputStream << FrontRight;
+ outputStream << RearLeft;
+ outputStream << RearRight;
+}
+sampleNames_s::sampleNames_s(const sampleSet_e& sampleValue, const std::string& sampleNameValue):
+ sample(sampleValue),
+ sampleName(sampleNameValue)
+{
+}
+
+
+bool operator==(const sampleNames_s& lhs, const sampleNames_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.sample == rhs.sample &&
+ lhs.sampleName == rhs.sampleName
+ ;
+}
+
+void sampleNames_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> sample;
+ inputStream >> sampleName;
+}
+
+void sampleNames_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << sample;
+ outputStream << sampleName;
+}
+am_Domain_s::am_Domain_s(const am_domainID_t& domainIDValue, const std::string& nameValue, const std::string& busnameValue, const std::string& nodenameValue, const bool& earlyValue, const bool& completeValue, const am_DomainState_e& stateValue):
+ domainID(domainIDValue),
+ name(nameValue),
+ busname(busnameValue),
+ nodename(nodenameValue),
+ early(earlyValue),
+ complete(completeValue),
+ state(stateValue)
+{
+}
+
+
+bool operator==(const am_Domain_s& lhs, const am_Domain_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.domainID == rhs.domainID &&
+ lhs.name == rhs.name &&
+ lhs.busname == rhs.busname &&
+ lhs.nodename == rhs.nodename &&
+ lhs.early == rhs.early &&
+ lhs.complete == rhs.complete &&
+ lhs.state == rhs.state
+ ;
+}
+
+void am_Domain_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> domainID;
+ inputStream >> name;
+ inputStream >> busname;
+ inputStream >> nodename;
+ inputStream >> early;
+ inputStream >> complete;
+ inputStream >> state;
+}
+
+void am_Domain_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << domainID;
+ outputStream << name;
+ outputStream << busname;
+ outputStream << nodename;
+ outputStream << early;
+ outputStream << complete;
+ outputStream << state;
+}
+notificationPayload_s::notificationPayload_s(const int16_t& typeValue, const int16_t& payloadValue):
+ type(typeValue),
+ payload(payloadValue)
+{
+}
+
+
+bool operator==(const notificationPayload_s& lhs, const notificationPayload_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.type == rhs.type &&
+ lhs.payload == rhs.payload
+ ;
+}
+
+void notificationPayload_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> type;
+ inputStream >> payload;
+}
+
+void notificationPayload_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << type;
+ outputStream << payload;
+}
+am_Availability_s::am_Availability_s(const am_Availability_e& availabilityValue, const am_AvailabilityReason_e& availabilityReasonValue):
+ availability(availabilityValue),
+ availabilityReason(availabilityReasonValue)
+{
+}
+
+
+bool operator==(const am_Availability_s& lhs, const am_Availability_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.availability == rhs.availability &&
+ lhs.availabilityReason == rhs.availabilityReason
+ ;
+}
+
+void am_Availability_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> availability;
+ inputStream >> availabilityReason;
+}
+
+void am_Availability_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << availability;
+ outputStream << availabilityReason;
+}
+am_SoundProperty_s::am_SoundProperty_s(const am_SoundPropertyType_e& typeValue, const int16_t& valueValue):
+ type(typeValue),
+ value(valueValue)
+{
+}
+
+
+bool operator==(const am_SoundProperty_s& lhs, const am_SoundProperty_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.type == rhs.type &&
+ lhs.value == rhs.value
+ ;
+}
+
+void am_SoundProperty_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> type;
+ inputStream >> value;
+}
+
+void am_SoundProperty_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << type;
+ outputStream << value;
+}
+am_MainSoundProperty_s::am_MainSoundProperty_s(const am_MainSoundPropertyType_e& typeValue, const int16_t& valueValue):
+ type(typeValue),
+ value(valueValue)
+{
+}
+
+
+bool operator==(const am_MainSoundProperty_s& lhs, const am_MainSoundProperty_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.type == rhs.type &&
+ lhs.value == rhs.value
+ ;
+}
+
+void am_MainSoundProperty_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> type;
+ inputStream >> value;
+}
+
+void am_MainSoundProperty_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << type;
+ outputStream << value;
+}
+am_NotificationConfiguration_s::am_NotificationConfiguration_s(const am_NotificationType_e& typeValue, const am_NotificationStatus_e& statusValue, const int16_t& parameterValue):
+ type(typeValue),
+ status(statusValue),
+ parameter(parameterValue)
+{
+}
+
+
+bool operator==(const am_NotificationConfiguration_s& lhs, const am_NotificationConfiguration_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.type == rhs.type &&
+ lhs.status == rhs.status &&
+ lhs.parameter == rhs.parameter
+ ;
+}
+
+void am_NotificationConfiguration_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> type;
+ inputStream >> status;
+ inputStream >> parameter;
+}
+
+void am_NotificationConfiguration_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << type;
+ outputStream << status;
+ outputStream << parameter;
+}
+sourceData_s::sourceData_s(const am_sourceID_t& sourceIDValue, const am_domainID_t& domainIDValue, const std::string& nameValue, const am_sourceClass_t& sourceClassIDValue, const am_SourceState_e& sourceStateValue, const am_volume_t& volumeValue, const bool& visibleValue, const am_Availability_s& availableValue, const am_InterruptState_e& interruptStateValue, const am_SoundProperty_L& listSoundPropertiesValue, const am_ConnectionFormat_L& listConnectionFormatsValue, const am_MainSoundProperty_L& listMainSoundPropertiesValue, const am_NotificationConfiguration_L& listMainNotificationConfigurationsValue, const am_NotificationConfiguration_L& listNotificationConfigurationsValue):
+ sourceID(sourceIDValue),
+ domainID(domainIDValue),
+ name(nameValue),
+ sourceClassID(sourceClassIDValue),
+ sourceState(sourceStateValue),
+ volume(volumeValue),
+ visible(visibleValue),
+ available(availableValue),
+ interruptState(interruptStateValue),
+ listSoundProperties(listSoundPropertiesValue),
+ listConnectionFormats(listConnectionFormatsValue),
+ listMainSoundProperties(listMainSoundPropertiesValue),
+ listMainNotificationConfigurations(listMainNotificationConfigurationsValue),
+ listNotificationConfigurations(listNotificationConfigurationsValue)
+{
+}
+
+
+bool operator==(const sourceData_s& lhs, const sourceData_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.sourceID == rhs.sourceID &&
+ lhs.domainID == rhs.domainID &&
+ lhs.name == rhs.name &&
+ lhs.sourceClassID == rhs.sourceClassID &&
+ lhs.sourceState == rhs.sourceState &&
+ lhs.volume == rhs.volume &&
+ lhs.visible == rhs.visible &&
+ lhs.available == rhs.available &&
+ lhs.interruptState == rhs.interruptState &&
+ lhs.listSoundProperties == rhs.listSoundProperties &&
+ lhs.listConnectionFormats == rhs.listConnectionFormats &&
+ lhs.listMainSoundProperties == rhs.listMainSoundProperties &&
+ lhs.listMainNotificationConfigurations == rhs.listMainNotificationConfigurations &&
+ lhs.listNotificationConfigurations == rhs.listNotificationConfigurations
+ ;
+}
+
+void sourceData_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> sourceID;
+ inputStream >> domainID;
+ inputStream >> name;
+ inputStream >> sourceClassID;
+ inputStream >> sourceState;
+ inputStream >> volume;
+ inputStream >> visible;
+ inputStream >> available;
+ inputStream >> interruptState;
+ inputStream >> listSoundProperties;
+ inputStream >> listConnectionFormats;
+ inputStream >> listMainSoundProperties;
+ inputStream >> listMainNotificationConfigurations;
+ inputStream >> listNotificationConfigurations;
+}
+
+void sourceData_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << sourceID;
+ outputStream << domainID;
+ outputStream << name;
+ outputStream << sourceClassID;
+ outputStream << sourceState;
+ outputStream << volume;
+ outputStream << visible;
+ outputStream << available;
+ outputStream << interruptState;
+ outputStream << listSoundProperties;
+ outputStream << listConnectionFormats;
+ outputStream << listMainSoundProperties;
+ outputStream << listMainNotificationConfigurations;
+ outputStream << listNotificationConfigurations;
+}
+sinkData_s::sinkData_s(const am_sinkID_t& sinkIDValue, const std::string& nameValue, const am_domainID_t& domainIDValue, const am_sinkClass_t& sinkClassIDValue, const am_volume_t& volumeValue, const bool& visibleValue, const am_Availability_s& availableValue, const am_MuteState_e& muteStateValue, const am_mainVolume_t& mainVolumeValue, const am_SoundProperty_L& listSoundPropertiesValue, const am_ConnectionFormat_L& listConnectionFormatsValue, const am_MainSoundProperty_L& listMainSoundPropertiesValue, const am_NotificationConfiguration_L& listMainNotificationConfigurationsValue, const am_NotificationConfiguration_L& listNotificationConfigurationsValue):
+ sinkID(sinkIDValue),
+ name(nameValue),
+ domainID(domainIDValue),
+ sinkClassID(sinkClassIDValue),
+ volume(volumeValue),
+ visible(visibleValue),
+ available(availableValue),
+ muteState(muteStateValue),
+ mainVolume(mainVolumeValue),
+ listSoundProperties(listSoundPropertiesValue),
+ listConnectionFormats(listConnectionFormatsValue),
+ listMainSoundProperties(listMainSoundPropertiesValue),
+ listMainNotificationConfigurations(listMainNotificationConfigurationsValue),
+ listNotificationConfigurations(listNotificationConfigurationsValue)
+{
+}
+
+
+bool operator==(const sinkData_s& lhs, const sinkData_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.sinkID == rhs.sinkID &&
+ lhs.name == rhs.name &&
+ lhs.domainID == rhs.domainID &&
+ lhs.sinkClassID == rhs.sinkClassID &&
+ lhs.volume == rhs.volume &&
+ lhs.visible == rhs.visible &&
+ lhs.available == rhs.available &&
+ lhs.muteState == rhs.muteState &&
+ lhs.mainVolume == rhs.mainVolume &&
+ lhs.listSoundProperties == rhs.listSoundProperties &&
+ lhs.listConnectionFormats == rhs.listConnectionFormats &&
+ lhs.listMainSoundProperties == rhs.listMainSoundProperties &&
+ lhs.listMainNotificationConfigurations == rhs.listMainNotificationConfigurations &&
+ lhs.listNotificationConfigurations == rhs.listNotificationConfigurations
+ ;
+}
+
+void sinkData_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> sinkID;
+ inputStream >> name;
+ inputStream >> domainID;
+ inputStream >> sinkClassID;
+ inputStream >> volume;
+ inputStream >> visible;
+ inputStream >> available;
+ inputStream >> muteState;
+ inputStream >> mainVolume;
+ inputStream >> listSoundProperties;
+ inputStream >> listConnectionFormats;
+ inputStream >> listMainSoundProperties;
+ inputStream >> listMainNotificationConfigurations;
+ inputStream >> listNotificationConfigurations;
+}
+
+void sinkData_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << sinkID;
+ outputStream << name;
+ outputStream << domainID;
+ outputStream << sinkClassID;
+ outputStream << volume;
+ outputStream << visible;
+ outputStream << available;
+ outputStream << muteState;
+ outputStream << mainVolume;
+ outputStream << listSoundProperties;
+ outputStream << listConnectionFormats;
+ outputStream << listMainSoundProperties;
+ outputStream << listMainNotificationConfigurations;
+ outputStream << listNotificationConfigurations;
+}
+am_Gateway_s::am_Gateway_s(const am_gatewayID_t& gatewayIDValue, const std::string& nameValue, const am_sinkID_t& sinkIDValue, const am_sourceID_t& sourceIDValue, const am_domainID_t& domainSinkIDValue, const am_domainID_t& domainSourceIDValue, const am_domainID_t& controlDomainIDValue, const am_ConnectionFormat_L& listSourceFormatsValue, const am_ConnectionFormat_L& listSinkFormatsValue, const bool_L& convertionMatrixValue):
+ gatewayID(gatewayIDValue),
+ name(nameValue),
+ sinkID(sinkIDValue),
+ sourceID(sourceIDValue),
+ domainSinkID(domainSinkIDValue),
+ domainSourceID(domainSourceIDValue),
+ controlDomainID(controlDomainIDValue),
+ listSourceFormats(listSourceFormatsValue),
+ listSinkFormats(listSinkFormatsValue),
+ convertionMatrix(convertionMatrixValue)
+{
+}
+
+
+bool operator==(const am_Gateway_s& lhs, const am_Gateway_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.gatewayID == rhs.gatewayID &&
+ lhs.name == rhs.name &&
+ lhs.sinkID == rhs.sinkID &&
+ lhs.sourceID == rhs.sourceID &&
+ lhs.domainSinkID == rhs.domainSinkID &&
+ lhs.domainSourceID == rhs.domainSourceID &&
+ lhs.controlDomainID == rhs.controlDomainID &&
+ lhs.listSourceFormats == rhs.listSourceFormats &&
+ lhs.listSinkFormats == rhs.listSinkFormats &&
+ lhs.convertionMatrix == rhs.convertionMatrix
+ ;
+}
+
+void am_Gateway_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> gatewayID;
+ inputStream >> name;
+ inputStream >> sinkID;
+ inputStream >> sourceID;
+ inputStream >> domainSinkID;
+ inputStream >> domainSourceID;
+ inputStream >> controlDomainID;
+ inputStream >> listSourceFormats;
+ inputStream >> listSinkFormats;
+ inputStream >> convertionMatrix;
+}
+
+void am_Gateway_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << gatewayID;
+ outputStream << name;
+ outputStream << sinkID;
+ outputStream << sourceID;
+ outputStream << domainSinkID;
+ outputStream << domainSourceID;
+ outputStream << controlDomainID;
+ outputStream << listSourceFormats;
+ outputStream << listSinkFormats;
+ outputStream << convertionMatrix;
+}
+
+} // namespace am
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/am.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/am.h
new file mode 100644
index 0000000..21a5a64
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/audiomanager/am.h
@@ -0,0 +1,1515 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_AUDIOMANAGER_am_H_
+#define ORG_GENIVI_AUDIOMANAGER_am_H_
+
+
+
+#define COMMONAPI_INTERNAL_COMPILATION
+
+#include <CommonAPI/InputStream.h>
+#include <CommonAPI/OutputStream.h>
+#include <CommonAPI/SerializableStruct.h>
+#include <CommonAPI/types.h>
+#include <cstdint>
+#include <string>
+#include <vector>
+
+#undef COMMONAPI_INTERNAL_COMPILATION
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+
+namespace am {
+ typedef uint16_t am_sourceID_t;
+
+ typedef uint16_t am_sinkID_t;
+
+ typedef uint16_t am_gatewayID_t;
+
+ typedef int16_t gongHandle;
+
+ typedef uint16_t am_sourceClass_t;
+
+ typedef uint16_t am_sinkClass_t;
+
+ typedef int16_t am_volume_t;
+
+ typedef int16_t am_mainVolume_t;
+
+ typedef uint16_t am_handle_t;
+
+ typedef uint16_t am_time_t;
+
+ enum class gp_indicatorDirection_e: int32_t {
+ INDICATOR_RIGHT = 0x0,
+ INDICATOR_LEFT = 0x1,
+ INDICATOR_WARNING = 0x2
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct gp_indicatorDirection_eComparator;
+
+ enum class am_RampType_e: int32_t {
+ RAMP_UNKNOWN = 0x0,
+ RAMP_GENIVI_DIRECT = 0x1,
+ RAMP_GENIVI_NO_PLOP = 0x2,
+ RAMP_GENIVI_EXP_INV = 0x3,
+ RAMP_GENIVI_LINEAR = 0x4,
+ RAMP_GENIVI_EXP = 0x5,
+ RAMP_MAX = 0x6
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_RampType_eComparator;
+
+ enum class am_MuteState_e: int32_t {
+ MS_UNKNOWN = 0x0,
+ MS_MUTED = 0x1,
+ MS_UNMUTED = 0x2,
+ MS_MAX = 0x3
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_MuteState_eComparator;
+
+ enum class am_SourceState_e: int32_t {
+ SS_UNKNNOWN = 0x0,
+ SS_ON = 0x1,
+ SS_OFF = 0x2,
+ SS_PAUSED = 0x3,
+ SS_MAX = 0x4
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_SourceState_eComparator;
+
+ enum class am_Error_e: int32_t {
+ E_OK = 0x0,
+ E_UNKNOWN = 0x1,
+ E_OUT_OF_RANGE = 0x2,
+ E_NOT_USED = 0x3,
+ E_DATABASE_ERROR = 0x4,
+ E_ALREADY_EXISTS = 0x5,
+ E_NO_CHANGE = 0x6,
+ E_NOT_POSSIBLE = 0x7,
+ E_NON_EXISTENT = 0x8,
+ E_ABORTED = 0x9,
+ E_WRONG_FORMAT = 0xa,
+ E_MAX = 0xb
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_Error_eComparator;
+
+ enum class am_DomainState_e: int32_t {
+ DS_UNKNOWN = 0,
+ DS_CONTROLLED = 1,
+ DS_INDEPENDENT_STARTUP = 2,
+ DS_INDEPENDENT_RUNDOWN = 3,
+ DS_MAX = 4
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_DomainState_eComparator;
+
+ enum class gongType_e: int32_t {
+ AT_NUN = 0x1,
+ AT_POC = 0x2,
+ AT_QUE = 0x3,
+ AT_IWA = 0x4,
+ AT_WA = 0x5,
+ AT_ETC_F = 0x6,
+ AT_ETC_F2 = 0x7,
+ AT_ETC_ST = 0x8,
+ AT_ETC_S = 0x9,
+ AT_REV = 0xa,
+ AT_ESU = 0xb,
+ AT_ESD = 0xc,
+ AT_DG = 0xd,
+ AT_SG = 0xe,
+ AT_IDG = 0xf,
+ AT_ION = 0x10,
+ AT_IOFF = 0x11,
+ AT_FBS = 0x12,
+ AT_VFS = 0x13,
+ AT_GES = 0x14,
+ AT_UEE = 0x15
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct gongType_eComparator;
+
+ enum class gp_indicatorStatus_e: int32_t {
+ IS_ON = 0x0,
+ IS_OFF = 0x1
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct gp_indicatorStatus_eComparator;
+
+ enum class gongStatus_e: int32_t {
+ NOT_PLAYING = 0x0,
+ PLAYING = 0x1,
+ INTERRUPTED = 0x2
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct gongStatus_eComparator;
+
+ enum class gongError_e: int32_t {
+ SUCCESS = 0x0,
+ ERROR = 0x1,
+ LOW_PRIORITY = 0x2
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct gongError_eComparator;
+
+ enum class gongClass_e: int32_t {
+ GONGCLASS_1 = 0x1,
+ GONGCLASS_2 = 0x2,
+ GONGCLASS_PDC = 0x3,
+ GONGCLASS_TURN = 0x4,
+ GONGCLASS_OBSTACLE = 0x5
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct gongClass_eComparator;
+
+ enum class sampleSet_e: int32_t {
+ setBMW = 0x0,
+ setMini = 0x1,
+ setRR = 0x2
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct sampleSet_eComparator;
+
+ enum class am_Availability_e: int32_t {
+ A_UNKNOWN = 0x0,
+ A_AVAILABLE = 0x1,
+ A_UNAVAILABLE = 0x2,
+ A_MAX = 0x3
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_Availability_eComparator;
+
+ enum class am_AvailabilityReason_e: int32_t {
+ AR_UNKNOWN = 0x0,
+ AR_GENIVI_NEWMEDIA = 0x1,
+ AR_GENIVI_SAMEMEDIA = 0x2,
+ AR_GENIVI_NOMEDIA = 0x3,
+ AR_GENIVI_TEMPERATURE = 0x4,
+ AR_GENIVI_VOLTAGE = 0x5,
+ AR_GENIVI_ERRORMEDIA = 0x6,
+ AR_MAX = 0x7
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_AvailabilityReason_eComparator;
+
+ enum class am_InterruptState_e: int32_t {
+ IS_UNKNOWN = 0x0,
+ IS_OFF = 0x1,
+ IS_INTERRUPTED = 0x2,
+ IS_MAX = 0x3
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_InterruptState_eComparator;
+
+ enum class am_SoundPropertyType_e: int32_t {
+ SP_UNKNOWN = 0x0,
+ SP_EXAMPLE_TREBLE = 0x1,
+ SP_EXAMPLE_MID = 0x2,
+ SP_EXAMPLE_BASS = 0x3,
+ SP_ENTER_SINKID = 0x4,
+ SP_INTERR_SUPERSEEDINGID = 0x5,
+ SP_INTERR_OVERLAYID = 0x6,
+ SP_PRIORITY = 0x7,
+ SP_MAX = 0x8
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_SoundPropertyType_eComparator;
+
+ enum class am_ConnectionFormat_e: int32_t {
+ CF_UNKNOWN = 0x0,
+ CF_GENIVI_MONO = 0x1,
+ CF_GENIVI_STEREO = 0x2,
+ CF_GENIVI_ANALOG = 0x3,
+ CF_GENIVI_AUTO = 0x4,
+ CF_MAX = 0x5
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_ConnectionFormat_eComparator;
+
+ typedef std::vector<am_ConnectionFormat_e> am_ConnectionFormat_L;
+
+ enum class am_MainSoundPropertyType_e: int32_t {
+ MSP_UNKNOWN = 0x0,
+ MSP_EXAMPLE_TREBLE = 0x1,
+ MSP_EXAMPLE_MID = 0x2,
+ MSP_EXAMPLE_BASS = 0x3,
+ MSP_SOURCE_TYPE = 0x4,
+ MSP_MAX = 0x5
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_MainSoundPropertyType_eComparator;
+
+ enum class am_NotificationType_e: int32_t {
+ NT_UNKNOWN = 0x0,
+ NT_LOUDNESS = 0x1,
+ NT_MAX = 0x2
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_NotificationType_eComparator;
+
+ enum class am_NotificationStatus_e: int32_t {
+ NS_UNKNOWN = 0x0,
+ NS_OFF = 0x1,
+ NS_PERIODIC = 0x2,
+ NS_MINIMUM = 0x3,
+ NS_MAXIMUM = 0x4,
+ NS_CHANGE = 0x5,
+ NS_MAX = 0x6
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_NotificationStatus_eComparator;
+
+ struct distanceInformation_s: CommonAPI::SerializableStruct {
+ int32_t FrontLeft;
+ int32_t FrontRight;
+ int32_t RearLeft;
+ int32_t RearRight;
+
+ distanceInformation_s() = default;
+ distanceInformation_s(const int32_t& FrontLeft, const int32_t& FrontRight, const int32_t& RearLeft, const int32_t& RearRight);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.writeInt32Type();
+ }
+ };
+
+ struct sampleNames_s: CommonAPI::SerializableStruct {
+ sampleSet_e sample;
+ std::string sampleName;
+
+ sampleNames_s() = default;
+ sampleNames_s(const sampleSet_e& sample, const std::string& sampleName);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.writeStringType();
+ }
+ };
+
+ typedef std::vector<sampleNames_s> listSampleNamesL;
+
+ typedef uint16_t am_domainID_t;
+
+ struct am_Domain_s: CommonAPI::SerializableStruct {
+ am_domainID_t domainID;
+ std::string name;
+ std::string busname;
+ std::string nodename;
+ bool early;
+ bool complete;
+ am_DomainState_e state;
+
+ am_Domain_s() = default;
+ am_Domain_s(const am_domainID_t& domainID, const std::string& name, const std::string& busname, const std::string& nodename, const bool& early, const bool& complete, const am_DomainState_e& state);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeStringType();
+ typeOutputStream.writeStringType();
+ typeOutputStream.writeStringType();
+ typeOutputStream.writeBoolType();
+ typeOutputStream.writeBoolType();
+ typeOutputStream.writeInt32Type();
+ }
+ };
+
+ struct notificationPayload_s: CommonAPI::SerializableStruct {
+ int16_t type;
+ int16_t payload;
+
+ notificationPayload_s() = default;
+ notificationPayload_s(const int16_t& type, const int16_t& payload);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeInt16Type();
+ typeOutputStream.writeInt16Type();
+ }
+ };
+
+ struct am_Availability_s: CommonAPI::SerializableStruct {
+ am_Availability_e availability;
+ am_AvailabilityReason_e availabilityReason;
+
+ am_Availability_s() = default;
+ am_Availability_s(const am_Availability_e& availability, const am_AvailabilityReason_e& availabilityReason);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.writeInt32Type();
+ }
+ };
+
+ struct am_SoundProperty_s: CommonAPI::SerializableStruct {
+ am_SoundPropertyType_e type;
+ int16_t value;
+
+ am_SoundProperty_s() = default;
+ am_SoundProperty_s(const am_SoundPropertyType_e& type, const int16_t& value);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.writeInt16Type();
+ }
+ };
+
+ typedef std::vector<am_SoundProperty_s> am_SoundProperty_L;
+
+ struct am_MainSoundProperty_s: CommonAPI::SerializableStruct {
+ am_MainSoundPropertyType_e type;
+ int16_t value;
+
+ am_MainSoundProperty_s() = default;
+ am_MainSoundProperty_s(const am_MainSoundPropertyType_e& type, const int16_t& value);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.writeInt16Type();
+ }
+ };
+
+ typedef std::vector<am_MainSoundProperty_s> am_MainSoundProperty_L;
+
+ struct am_NotificationConfiguration_s: CommonAPI::SerializableStruct {
+ am_NotificationType_e type;
+ am_NotificationStatus_e status;
+ int16_t parameter;
+
+ am_NotificationConfiguration_s() = default;
+ am_NotificationConfiguration_s(const am_NotificationType_e& type, const am_NotificationStatus_e& status, const int16_t& parameter);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.writeInt16Type();
+ }
+ };
+
+ typedef std::vector<am_NotificationConfiguration_s> am_NotificationConfiguration_L;
+
+ typedef std::vector<bool> bool_L;
+
+ struct sourceData_s: CommonAPI::SerializableStruct {
+ am_sourceID_t sourceID;
+ am_domainID_t domainID;
+ std::string name;
+ am_sourceClass_t sourceClassID;
+ am_SourceState_e sourceState;
+ am_volume_t volume;
+ bool visible;
+ am_Availability_s available;
+ am_InterruptState_e interruptState;
+ am_SoundProperty_L listSoundProperties;
+ am_ConnectionFormat_L listConnectionFormats;
+ am_MainSoundProperty_L listMainSoundProperties;
+ am_NotificationConfiguration_L listMainNotificationConfigurations;
+ am_NotificationConfiguration_L listNotificationConfigurations;
+
+ sourceData_s() = default;
+ sourceData_s(const am_sourceID_t& sourceID, const am_domainID_t& domainID, const std::string& name, const am_sourceClass_t& sourceClassID, const am_SourceState_e& sourceState, const am_volume_t& volume, const bool& visible, const am_Availability_s& available, const am_InterruptState_e& interruptState, const am_SoundProperty_L& listSoundProperties, const am_ConnectionFormat_L& listConnectionFormats, const am_MainSoundProperty_L& listMainSoundProperties, const am_NotificationConfiguration_L& listMainNotificationConfigurations, const am_NotificationConfiguration_L& listNotificationConfigurations);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeStringType();
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.writeInt16Type();
+ typeOutputStream.writeBoolType();
+ typeOutputStream.beginWriteStructType();
+ typeOutputStream.writeInt32Type();typeOutputStream.writeInt32Type();
+ typeOutputStream.endWriteStructType();
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.beginWriteVectorType();
+ typeOutputStream.beginWriteStructType();
+ typeOutputStream.writeInt32Type();typeOutputStream.writeInt16Type();
+ typeOutputStream.endWriteStructType();
+ typeOutputStream.endWriteVectorType();
+ typeOutputStream.beginWriteVectorType();
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.endWriteVectorType();
+ typeOutputStream.beginWriteVectorType();
+ typeOutputStream.beginWriteStructType();
+ typeOutputStream.writeInt32Type();typeOutputStream.writeInt16Type();
+ typeOutputStream.endWriteStructType();
+ typeOutputStream.endWriteVectorType();
+ typeOutputStream.beginWriteVectorType();
+ typeOutputStream.beginWriteStructType();
+ typeOutputStream.writeInt32Type();typeOutputStream.writeInt32Type();typeOutputStream.writeInt16Type();
+ typeOutputStream.endWriteStructType();
+ typeOutputStream.endWriteVectorType();
+ typeOutputStream.beginWriteVectorType();
+ typeOutputStream.beginWriteStructType();
+ typeOutputStream.writeInt32Type();typeOutputStream.writeInt32Type();typeOutputStream.writeInt16Type();
+ typeOutputStream.endWriteStructType();
+ typeOutputStream.endWriteVectorType();
+ }
+ };
+
+ struct sinkData_s: CommonAPI::SerializableStruct {
+ am_sinkID_t sinkID;
+ std::string name;
+ am_domainID_t domainID;
+ am_sinkClass_t sinkClassID;
+ am_volume_t volume;
+ bool visible;
+ am_Availability_s available;
+ am_MuteState_e muteState;
+ am_mainVolume_t mainVolume;
+ am_SoundProperty_L listSoundProperties;
+ am_ConnectionFormat_L listConnectionFormats;
+ am_MainSoundProperty_L listMainSoundProperties;
+ am_NotificationConfiguration_L listMainNotificationConfigurations;
+ am_NotificationConfiguration_L listNotificationConfigurations;
+
+ sinkData_s() = default;
+ sinkData_s(const am_sinkID_t& sinkID, const std::string& name, const am_domainID_t& domainID, const am_sinkClass_t& sinkClassID, const am_volume_t& volume, const bool& visible, const am_Availability_s& available, const am_MuteState_e& muteState, const am_mainVolume_t& mainVolume, const am_SoundProperty_L& listSoundProperties, const am_ConnectionFormat_L& listConnectionFormats, const am_MainSoundProperty_L& listMainSoundProperties, const am_NotificationConfiguration_L& listMainNotificationConfigurations, const am_NotificationConfiguration_L& listNotificationConfigurations);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeStringType();
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeInt16Type();
+ typeOutputStream.writeBoolType();
+ typeOutputStream.beginWriteStructType();
+ typeOutputStream.writeInt32Type();typeOutputStream.writeInt32Type();
+ typeOutputStream.endWriteStructType();
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.writeInt16Type();
+ typeOutputStream.beginWriteVectorType();
+ typeOutputStream.beginWriteStructType();
+ typeOutputStream.writeInt32Type();typeOutputStream.writeInt16Type();
+ typeOutputStream.endWriteStructType();
+ typeOutputStream.endWriteVectorType();
+ typeOutputStream.beginWriteVectorType();
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.endWriteVectorType();
+ typeOutputStream.beginWriteVectorType();
+ typeOutputStream.beginWriteStructType();
+ typeOutputStream.writeInt32Type();typeOutputStream.writeInt16Type();
+ typeOutputStream.endWriteStructType();
+ typeOutputStream.endWriteVectorType();
+ typeOutputStream.beginWriteVectorType();
+ typeOutputStream.beginWriteStructType();
+ typeOutputStream.writeInt32Type();typeOutputStream.writeInt32Type();typeOutputStream.writeInt16Type();
+ typeOutputStream.endWriteStructType();
+ typeOutputStream.endWriteVectorType();
+ typeOutputStream.beginWriteVectorType();
+ typeOutputStream.beginWriteStructType();
+ typeOutputStream.writeInt32Type();typeOutputStream.writeInt32Type();typeOutputStream.writeInt16Type();
+ typeOutputStream.endWriteStructType();
+ typeOutputStream.endWriteVectorType();
+ }
+ };
+
+ struct am_Gateway_s: CommonAPI::SerializableStruct {
+ am_gatewayID_t gatewayID;
+ std::string name;
+ am_sinkID_t sinkID;
+ am_sourceID_t sourceID;
+ am_domainID_t domainSinkID;
+ am_domainID_t domainSourceID;
+ am_domainID_t controlDomainID;
+ am_ConnectionFormat_L listSourceFormats;
+ am_ConnectionFormat_L listSinkFormats;
+ bool_L convertionMatrix;
+
+ am_Gateway_s() = default;
+ am_Gateway_s(const am_gatewayID_t& gatewayID, const std::string& name, const am_sinkID_t& sinkID, const am_sourceID_t& sourceID, const am_domainID_t& domainSinkID, const am_domainID_t& domainSourceID, const am_domainID_t& controlDomainID, const am_ConnectionFormat_L& listSourceFormats, const am_ConnectionFormat_L& listSinkFormats, const bool_L& convertionMatrix);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeStringType();
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.beginWriteVectorType();
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.endWriteVectorType();
+ typeOutputStream.beginWriteVectorType();
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.endWriteVectorType();
+ typeOutputStream.beginWriteVectorType();
+ typeOutputStream.writeBoolType();
+ typeOutputStream.endWriteVectorType();
+ }
+ };
+
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, gp_indicatorDirection_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const gp_indicatorDirection_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct gp_indicatorDirection_eComparator {
+ inline bool operator()(const gp_indicatorDirection_e& lhs, const gp_indicatorDirection_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_RampType_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_RampType_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct am_RampType_eComparator {
+ inline bool operator()(const am_RampType_e& lhs, const am_RampType_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_MuteState_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_MuteState_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct am_MuteState_eComparator {
+ inline bool operator()(const am_MuteState_e& lhs, const am_MuteState_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_SourceState_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_SourceState_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct am_SourceState_eComparator {
+ inline bool operator()(const am_SourceState_e& lhs, const am_SourceState_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_Error_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_Error_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct am_Error_eComparator {
+ inline bool operator()(const am_Error_e& lhs, const am_Error_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_DomainState_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_DomainState_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct am_DomainState_eComparator {
+ inline bool operator()(const am_DomainState_e& lhs, const am_DomainState_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, gongType_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const gongType_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct gongType_eComparator {
+ inline bool operator()(const gongType_e& lhs, const gongType_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, gp_indicatorStatus_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const gp_indicatorStatus_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct gp_indicatorStatus_eComparator {
+ inline bool operator()(const gp_indicatorStatus_e& lhs, const gp_indicatorStatus_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, gongStatus_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const gongStatus_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct gongStatus_eComparator {
+ inline bool operator()(const gongStatus_e& lhs, const gongStatus_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, gongError_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const gongError_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct gongError_eComparator {
+ inline bool operator()(const gongError_e& lhs, const gongError_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, gongClass_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const gongClass_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct gongClass_eComparator {
+ inline bool operator()(const gongClass_e& lhs, const gongClass_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, sampleSet_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const sampleSet_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct sampleSet_eComparator {
+ inline bool operator()(const sampleSet_e& lhs, const sampleSet_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_Availability_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_Availability_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct am_Availability_eComparator {
+ inline bool operator()(const am_Availability_e& lhs, const am_Availability_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_AvailabilityReason_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_AvailabilityReason_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct am_AvailabilityReason_eComparator {
+ inline bool operator()(const am_AvailabilityReason_e& lhs, const am_AvailabilityReason_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_InterruptState_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_InterruptState_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct am_InterruptState_eComparator {
+ inline bool operator()(const am_InterruptState_e& lhs, const am_InterruptState_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_SoundPropertyType_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_SoundPropertyType_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct am_SoundPropertyType_eComparator {
+ inline bool operator()(const am_SoundPropertyType_e& lhs, const am_SoundPropertyType_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_ConnectionFormat_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_ConnectionFormat_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct am_ConnectionFormat_eComparator {
+ inline bool operator()(const am_ConnectionFormat_e& lhs, const am_ConnectionFormat_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_MainSoundPropertyType_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_MainSoundPropertyType_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct am_MainSoundPropertyType_eComparator {
+ inline bool operator()(const am_MainSoundPropertyType_e& lhs, const am_MainSoundPropertyType_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_NotificationType_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_NotificationType_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct am_NotificationType_eComparator {
+ inline bool operator()(const am_NotificationType_e& lhs, const am_NotificationType_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_NotificationStatus_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_NotificationStatus_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct am_NotificationStatus_eComparator {
+ inline bool operator()(const am_NotificationStatus_e& lhs, const am_NotificationStatus_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+bool operator==(const distanceInformation_s& lhs, const distanceInformation_s& rhs);
+inline bool operator!=(const distanceInformation_s& lhs, const distanceInformation_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const sampleNames_s& lhs, const sampleNames_s& rhs);
+inline bool operator!=(const sampleNames_s& lhs, const sampleNames_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const am_Domain_s& lhs, const am_Domain_s& rhs);
+inline bool operator!=(const am_Domain_s& lhs, const am_Domain_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const notificationPayload_s& lhs, const notificationPayload_s& rhs);
+inline bool operator!=(const notificationPayload_s& lhs, const notificationPayload_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const am_Availability_s& lhs, const am_Availability_s& rhs);
+inline bool operator!=(const am_Availability_s& lhs, const am_Availability_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const am_SoundProperty_s& lhs, const am_SoundProperty_s& rhs);
+inline bool operator!=(const am_SoundProperty_s& lhs, const am_SoundProperty_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const am_MainSoundProperty_s& lhs, const am_MainSoundProperty_s& rhs);
+inline bool operator!=(const am_MainSoundProperty_s& lhs, const am_MainSoundProperty_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const am_NotificationConfiguration_s& lhs, const am_NotificationConfiguration_s& rhs);
+inline bool operator!=(const am_NotificationConfiguration_s& lhs, const am_NotificationConfiguration_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const sourceData_s& lhs, const sourceData_s& rhs);
+inline bool operator!=(const sourceData_s& lhs, const sourceData_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const sinkData_s& lhs, const sinkData_s& rhs);
+inline bool operator!=(const sinkData_s& lhs, const sinkData_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const am_Gateway_s& lhs, const am_Gateway_s& rhs);
+inline bool operator!=(const am_Gateway_s& lhs, const am_Gateway_s& rhs) {
+ return !(lhs == rhs);
+}
+
+
+static inline const char* getTypeCollectionName() {
+ return "org.genivi.audiomanager.am";
+}
+
+
+} // namespace am
+
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
+
+namespace CommonAPI {
+
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am::gp_indicatorDirection_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am::gp_indicatorDirection_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am::gp_indicatorDirection_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am::gp_indicatorDirection_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am::gp_indicatorDirection_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am::am_RampType_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am::am_RampType_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am::am_RampType_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am::am_RampType_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am::am_RampType_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am::am_MuteState_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am::am_MuteState_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am::am_MuteState_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am::am_MuteState_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am::am_MuteState_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am::am_SourceState_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am::am_SourceState_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am::am_SourceState_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am::am_SourceState_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am::am_SourceState_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am::am_Error_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am::am_Error_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am::am_Error_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am::am_Error_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am::am_Error_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am::am_DomainState_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am::am_DomainState_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am::am_DomainState_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am::am_DomainState_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am::am_DomainState_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am::gongType_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am::gongType_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am::gongType_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am::gongType_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am::gongType_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am::gp_indicatorStatus_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am::gp_indicatorStatus_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am::gp_indicatorStatus_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am::gp_indicatorStatus_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am::gp_indicatorStatus_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am::gongStatus_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am::gongStatus_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am::gongStatus_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am::gongStatus_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am::gongStatus_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am::gongError_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am::gongError_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am::gongError_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am::gongError_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am::gongError_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am::gongClass_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am::gongClass_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am::gongClass_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am::gongClass_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am::gongClass_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am::sampleSet_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am::sampleSet_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am::sampleSet_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am::sampleSet_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am::sampleSet_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am::am_Availability_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am::am_Availability_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am::am_Availability_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am::am_Availability_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am::am_Availability_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am::am_AvailabilityReason_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am::am_AvailabilityReason_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am::am_AvailabilityReason_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am::am_AvailabilityReason_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am::am_AvailabilityReason_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am::am_InterruptState_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am::am_InterruptState_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am::am_InterruptState_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am::am_InterruptState_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am::am_InterruptState_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am::am_SoundPropertyType_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am::am_SoundPropertyType_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am::am_SoundPropertyType_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am::am_SoundPropertyType_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am::am_SoundPropertyType_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am::am_ConnectionFormat_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am::am_ConnectionFormat_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am::am_ConnectionFormat_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am::am_ConnectionFormat_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am::am_ConnectionFormat_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am::am_MainSoundPropertyType_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am::am_MainSoundPropertyType_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am::am_MainSoundPropertyType_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am::am_MainSoundPropertyType_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am::am_MainSoundPropertyType_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am::am_NotificationType_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am::am_NotificationType_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am::am_NotificationType_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am::am_NotificationType_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am::am_NotificationType_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am::am_NotificationStatus_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am::am_NotificationStatus_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am::am_NotificationStatus_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am::am_NotificationStatus_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am::am_NotificationStatus_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+
+}
+
+
+namespace std {
+ //Hash for gp_indicatorDirection_e
+ template<>
+ struct hash<org::genivi::audiomanager::am::gp_indicatorDirection_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am::gp_indicatorDirection_e& gp_indicatorDirection_e) const {
+ return static_cast<int32_t>(gp_indicatorDirection_e);
+ }
+ };
+ //Hash for am_RampType_e
+ template<>
+ struct hash<org::genivi::audiomanager::am::am_RampType_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am::am_RampType_e& am_RampType_e) const {
+ return static_cast<int32_t>(am_RampType_e);
+ }
+ };
+ //Hash for am_MuteState_e
+ template<>
+ struct hash<org::genivi::audiomanager::am::am_MuteState_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am::am_MuteState_e& am_MuteState_e) const {
+ return static_cast<int32_t>(am_MuteState_e);
+ }
+ };
+ //Hash for am_SourceState_e
+ template<>
+ struct hash<org::genivi::audiomanager::am::am_SourceState_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am::am_SourceState_e& am_SourceState_e) const {
+ return static_cast<int32_t>(am_SourceState_e);
+ }
+ };
+ //Hash for am_Error_e
+ template<>
+ struct hash<org::genivi::audiomanager::am::am_Error_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am::am_Error_e& am_Error_e) const {
+ return static_cast<int32_t>(am_Error_e);
+ }
+ };
+ //Hash for am_DomainState_e
+ template<>
+ struct hash<org::genivi::audiomanager::am::am_DomainState_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am::am_DomainState_e& am_DomainState_e) const {
+ return static_cast<int32_t>(am_DomainState_e);
+ }
+ };
+ //Hash for gongType_e
+ template<>
+ struct hash<org::genivi::audiomanager::am::gongType_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am::gongType_e& gongType_e) const {
+ return static_cast<int32_t>(gongType_e);
+ }
+ };
+ //Hash for gp_indicatorStatus_e
+ template<>
+ struct hash<org::genivi::audiomanager::am::gp_indicatorStatus_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am::gp_indicatorStatus_e& gp_indicatorStatus_e) const {
+ return static_cast<int32_t>(gp_indicatorStatus_e);
+ }
+ };
+ //Hash for gongStatus_e
+ template<>
+ struct hash<org::genivi::audiomanager::am::gongStatus_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am::gongStatus_e& gongStatus_e) const {
+ return static_cast<int32_t>(gongStatus_e);
+ }
+ };
+ //Hash for gongError_e
+ template<>
+ struct hash<org::genivi::audiomanager::am::gongError_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am::gongError_e& gongError_e) const {
+ return static_cast<int32_t>(gongError_e);
+ }
+ };
+ //Hash for gongClass_e
+ template<>
+ struct hash<org::genivi::audiomanager::am::gongClass_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am::gongClass_e& gongClass_e) const {
+ return static_cast<int32_t>(gongClass_e);
+ }
+ };
+ //Hash for sampleSet_e
+ template<>
+ struct hash<org::genivi::audiomanager::am::sampleSet_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am::sampleSet_e& sampleSet_e) const {
+ return static_cast<int32_t>(sampleSet_e);
+ }
+ };
+ //Hash for am_Availability_e
+ template<>
+ struct hash<org::genivi::audiomanager::am::am_Availability_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am::am_Availability_e& am_Availability_e) const {
+ return static_cast<int32_t>(am_Availability_e);
+ }
+ };
+ //Hash for am_AvailabilityReason_e
+ template<>
+ struct hash<org::genivi::audiomanager::am::am_AvailabilityReason_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am::am_AvailabilityReason_e& am_AvailabilityReason_e) const {
+ return static_cast<int32_t>(am_AvailabilityReason_e);
+ }
+ };
+ //Hash for am_InterruptState_e
+ template<>
+ struct hash<org::genivi::audiomanager::am::am_InterruptState_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am::am_InterruptState_e& am_InterruptState_e) const {
+ return static_cast<int32_t>(am_InterruptState_e);
+ }
+ };
+ //Hash for am_SoundPropertyType_e
+ template<>
+ struct hash<org::genivi::audiomanager::am::am_SoundPropertyType_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am::am_SoundPropertyType_e& am_SoundPropertyType_e) const {
+ return static_cast<int32_t>(am_SoundPropertyType_e);
+ }
+ };
+ //Hash for am_ConnectionFormat_e
+ template<>
+ struct hash<org::genivi::audiomanager::am::am_ConnectionFormat_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am::am_ConnectionFormat_e& am_ConnectionFormat_e) const {
+ return static_cast<int32_t>(am_ConnectionFormat_e);
+ }
+ };
+ //Hash for am_MainSoundPropertyType_e
+ template<>
+ struct hash<org::genivi::audiomanager::am::am_MainSoundPropertyType_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am::am_MainSoundPropertyType_e& am_MainSoundPropertyType_e) const {
+ return static_cast<int32_t>(am_MainSoundPropertyType_e);
+ }
+ };
+ //Hash for am_NotificationType_e
+ template<>
+ struct hash<org::genivi::audiomanager::am::am_NotificationType_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am::am_NotificationType_e& am_NotificationType_e) const {
+ return static_cast<int32_t>(am_NotificationType_e);
+ }
+ };
+ //Hash for am_NotificationStatus_e
+ template<>
+ struct hash<org::genivi::audiomanager::am::am_NotificationStatus_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am::am_NotificationStatus_e& am_NotificationStatus_e) const {
+ return static_cast<int32_t>(am_NotificationStatus_e);
+ }
+ };
+}
+
+#endif // ORG_GENIVI_AUDIOMANAGER_am_H_
diff --git a/PluginCommandInterfaceCAPI/src/CAmCommandSenderCAPI.cpp b/PluginCommandInterfaceCAPI/src/CAmCommandSenderCAPI.cpp
new file mode 100644
index 0000000..75414c2
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/src/CAmCommandSenderCAPI.cpp
@@ -0,0 +1,364 @@
+/**
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
+#include "CAmCommandSenderCAPI.h"
+#include <algorithm>
+#include <string>
+#include <vector>
+#include <cassert>
+#include <set>
+#include "shared/CAmDltWrapper.h"
+#include "CAmCommandSenderCommon.h"
+
+
+DLT_DECLARE_CONTEXT(ctxCommandCAPI)
+
+/**
+ * factory for plugin loading
+ */
+extern "C" IAmCommandSend* PluginCommandInterfaceCAPIFactory()
+{
+ CAmDltWrapper::instance()->registerContext(ctxCommandCAPI, "CAPIP", "Common-API Plugin");
+ return (new CAmCommandSenderCAPI(Am_CAPI));
+}
+
+/**
+ * destroy instance of commandSendInterface
+ */
+extern "C" void destroyPluginCommandInterfaceCAPIFactory(IAmCommandSend* commandSendInterface)
+{
+ delete commandSendInterface;
+}
+
+
+const char * CAmCommandSenderCAPI::COMMAND_SENDER_SERVICE = "local:org.genivi.audiomanger.commandinterface:org.genivi.audiomanger";
+
+#define RETURN_IF_NOT_READY() if(!mReady) return;
+
+CAmCommandSenderCAPI::CAmCommandSenderCAPI() :
+ mService(), //
+ mpCAmCAPIWrapper(NULL), //
+ mpIAmCommandReceive(NULL), //
+ mReady(false),
+ mIsServiceStarted(false)
+{
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "CommandSenderCAPI constructor called");
+}
+
+CAmCommandSenderCAPI::CAmCommandSenderCAPI(CAmCommonAPIWrapper *aWrapper) :
+ mService(), //
+ mpCAmCAPIWrapper(aWrapper), //
+ mpIAmCommandReceive(NULL), //
+ mReady(false),
+ mIsServiceStarted(false)
+{
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "CommandSenderCAPI constructor called");
+ assert(mpCAmCAPIWrapper!=NULL);
+}
+
+CAmCommandSenderCAPI::~CAmCommandSenderCAPI()
+{
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "CAPICommandSender destructed");
+ CAmDltWrapper::instance()->unregisterContext(ctxCommandCAPI);
+ tearDownInterface(mpIAmCommandReceive);
+}
+
+/**
+ * registers a service
+ */
+am_Error_e CAmCommandSenderCAPI::startService(IAmCommandReceive* commandreceiveinterface)
+{
+ if(!mIsServiceStarted)
+ {
+ assert(commandreceiveinterface);
+ mService = std::make_shared<CAmCommandSenderService>(commandreceiveinterface);
+ //Registers the service
+ if( false == mpCAmCAPIWrapper->registerStub(mService, CAmCommandSenderCAPI::COMMAND_SENDER_SERVICE) )
+ {
+ return (E_NOT_POSSIBLE);
+ }
+ mIsServiceStarted = true;
+ }
+ return (E_OK);
+}
+
+/**
+ * sets a command receiver object and registers a service
+ */
+am_Error_e CAmCommandSenderCAPI::startupInterface(IAmCommandReceive* commandreceiveinterface)
+{
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "startupInterface called");
+ mpIAmCommandReceive = commandreceiveinterface;
+ return startService(commandreceiveinterface);
+}
+
+/**
+ * stops the service
+ */
+am_Error_e CAmCommandSenderCAPI::tearDownInterface(IAmCommandReceive*)
+{
+ if(mpCAmCAPIWrapper)
+ {
+ if(mIsServiceStarted)
+ {
+ mIsServiceStarted = false;
+ mpCAmCAPIWrapper->unregisterStub(CAmCommandSenderCAPI::COMMAND_SENDER_SERVICE);
+ mService.reset();
+ }
+ return (E_OK);
+ }
+ return (E_NOT_POSSIBLE);
+}
+
+void CAmCommandSenderCAPI::setCommandReady(const uint16_t handle)
+{
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "cbCommunicationReady called");
+ mReady = true;
+ mpIAmCommandReceive->confirmCommandReady(handle,E_OK);
+}
+
+void CAmCommandSenderCAPI::setCommandRundown(const uint16_t handle)
+{
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "cbCommunicationRundown called");
+ mReady = false;
+ mpIAmCommandReceive->confirmCommandRundown(handle,E_OK);
+}
+
+void CAmCommandSenderCAPI::cbNewMainConnection(const am_MainConnectionType_s& )
+{
+ RETURN_IF_NOT_READY()
+ assert((bool)mService);
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "cbNumberOfMainConnectionsChanged called");
+ mService->fireNumberOfMainConnectionsChangedEvent();
+}
+
+void CAmCommandSenderCAPI::cbRemovedMainConnection(const am_mainConnectionID_t mainConnection)
+{
+ RETURN_IF_NOT_READY()
+ assert((bool)mService);
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "cbNumberOfMainConnectionsChanged called");
+ mService->fireNumberOfMainConnectionsChangedEvent();
+}
+
+void CAmCommandSenderCAPI::cbNewSink(const am_SinkType_s& sink)
+{
+ RETURN_IF_NOT_READY()
+ assert((bool)mService);
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "cbNewSink called");
+ CommandInterface::am_Availability_s convAvailability;
+ CAmConvertAvailablility(sink.availability, convAvailability);
+ CommandInterface::am_SinkType_s ciSink(sink.sinkID, sink.name, convAvailability, sink.volume, CAmConvert2CAPIType(sink.muteState), sink.sinkClassID);
+ mService->fireSinkAddedEvent(ciSink);
+}
+
+void CAmCommandSenderCAPI::cbRemovedSink(const am_sinkID_t sinkID)
+{
+ RETURN_IF_NOT_READY()
+ assert((bool)mService);
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "cbRemovedSink called");
+ mService->fireSinkRemovedEvent(sinkID);
+}
+
+void CAmCommandSenderCAPI::cbNewSource(const am_SourceType_s& source)
+{
+ RETURN_IF_NOT_READY()
+ assert((bool)mService);
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "cbNewSource called");
+ CommandInterface::am_Availability_s convAvailability;
+ CAmConvertAvailablility(source.availability, convAvailability);
+ CommandInterface::am_SourceType_s ciSource(source.sourceID, source.name, convAvailability, source.sourceClassID);
+ mService->fireSourceAddedEvent(ciSource);
+}
+
+void CAmCommandSenderCAPI::cbRemovedSource(const am_sourceID_t source)
+{
+ RETURN_IF_NOT_READY()
+ assert((bool)mService);
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "cbRemovedSource called");
+ mService->fireSourceRemovedEvent(source);
+}
+
+void CAmCommandSenderCAPI::cbNumberOfSinkClassesChanged()
+{
+ RETURN_IF_NOT_READY()
+ assert((bool)mService);
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "cbNumberOfSinkClassesChanged called");
+ mService->fireNumberOfSinkClassesChangedEvent();
+}
+
+void CAmCommandSenderCAPI::cbNumberOfSourceClassesChanged()
+{
+ RETURN_IF_NOT_READY()
+ assert((bool)mService);
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "cbNumberOfSourceClassesChanged called");
+ mService->fireNumberOfSourceClassesChangedEvent();
+}
+
+void CAmCommandSenderCAPI::cbMainConnectionStateChanged(const am_mainConnectionID_t connectionID, const am_ConnectionState_e connectionState)
+{
+ RETURN_IF_NOT_READY()
+ assert((bool)mService);
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "cbMainConnectionStateChanged called, connectionID=", connectionID, "connectionState=", connectionState);
+ CommandInterface::am_mainConnectionID_t cID = connectionID;
+ mService->fireMainConnectionStateChangedEvent(cID, CAmConvert2CAPIType(connectionState));
+}
+
+void CAmCommandSenderCAPI::cbMainSinkSoundPropertyChanged(const am_sinkID_t sinkID, const am_MainSoundProperty_s & soundProperty)
+{
+ RETURN_IF_NOT_READY()
+ assert((bool)mService);
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "cbMainSinkSoundPropertyChanged called, sinkID", sinkID, "SoundProperty.type", soundProperty.type, "SoundProperty.value", soundProperty.value);
+ CommandInterface::am_MainSoundProperty_s mainSoundProp(CAmConvert2CAPIType(soundProperty.type), soundProperty.value);
+ mService->fireMainSinkSoundPropertyChangedEvent(sinkID, mainSoundProp);
+}
+
+void CAmCommandSenderCAPI::cbMainSourceSoundPropertyChanged(const am_sourceID_t sourceID, const am_MainSoundProperty_s & SoundProperty)
+{
+ RETURN_IF_NOT_READY()
+ assert((bool)mService);
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "cbMainSourceSoundPropertyChanged called, sourceID", sourceID, "SoundProperty.type", SoundProperty.type, "SoundProperty.value", SoundProperty.value);
+ CommandInterface::am_MainSoundProperty_s convValue;
+ CAmConvertMainSoundProperty(SoundProperty, convValue);
+ mService->fireMainSourceSoundPropertyChangedEvent(sourceID, convValue);
+}
+
+void CAmCommandSenderCAPI::cbSinkAvailabilityChanged(const am_sinkID_t sinkID, const am_Availability_s & availability)
+{
+ RETURN_IF_NOT_READY()
+ assert((bool)mService);
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "cbSinkAvailabilityChanged called, sinkID", sinkID, "availability.availability", availability.availability, "SoundProperty.reason", availability.availabilityReason);
+ CommandInterface::am_Availability_s convAvailability;
+ CAmConvertAvailablility(availability, convAvailability);
+ mService->fireSinkAvailabilityChangedEvent(sinkID, convAvailability);
+}
+
+void CAmCommandSenderCAPI::cbSourceAvailabilityChanged(const am_sourceID_t sourceID, const am_Availability_s & availability)
+{
+ RETURN_IF_NOT_READY()
+ assert((bool)mService);
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "cbSourceAvailabilityChanged called, sourceID", sourceID, "availability.availability", availability.availability, "SoundProperty.reason", availability.availabilityReason);
+ CommandInterface::am_Availability_s convAvailability;
+ CAmConvertAvailablility(availability, convAvailability);
+ mService->fireSourceAvailabilityChangedEvent(sourceID, convAvailability);
+}
+
+void CAmCommandSenderCAPI::cbVolumeChanged(const am_sinkID_t sinkID, const am_mainVolume_t volume)
+{
+ RETURN_IF_NOT_READY()
+ assert((bool)mService);
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "cbVolumeChanged called, sinkID", sinkID, "volume", volume);
+ mService->fireVolumeChangedEvent(sinkID, volume);
+}
+
+void CAmCommandSenderCAPI::cbSinkMuteStateChanged(const am_sinkID_t sinkID, const am_MuteState_e muteState)
+{
+ RETURN_IF_NOT_READY()
+ assert((bool)mService);
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "cbSinkMuteStateChanged called, sinkID", sinkID, "muteState", muteState);
+ CommandInterface::am_MuteState_e ciMuteState = CAmConvert2CAPIType(muteState);
+ mService->fireSinkMuteStateChangedEvent(sinkID, ciMuteState);
+}
+
+void CAmCommandSenderCAPI::cbSystemPropertyChanged(const am_SystemProperty_s & SystemProperty)
+{
+ RETURN_IF_NOT_READY()
+ assert((bool)mService);
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "cbSystemPropertyChanged called, SystemProperty.type", SystemProperty.type, "SystemProperty.value", SystemProperty.value);
+ CommandInterface::am_SystemProperty_s convValue;
+ CAmConvertSystemProperty(SystemProperty, convValue);
+ mService->fireSystemPropertyChangedEvent(convValue);
+}
+
+void CAmCommandSenderCAPI::cbTimingInformationChanged(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time)
+{
+ RETURN_IF_NOT_READY()
+ assert((bool)mService);
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "cbTimingInformationChanged called, mainConnectionID=", mainConnectionID, "time=", time);
+ CommandInterface::am_mainConnectionID_t ciMainConnection = mainConnectionID;
+ mService->fireTimingInformationChangedEvent(ciMainConnection, time);
+}
+
+void CAmCommandSenderCAPI::getInterfaceVersion(std::string & version) const
+{
+ version = CommandSendVersion;
+}
+
+void CAmCommandSenderCAPI::cbSinkUpdated(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties)
+{
+ RETURN_IF_NOT_READY()
+ assert((bool)mService);
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "cbSinkUpdated called, sinkID", sinkID);
+ CommandInterface::am_MainSoundProperty_l list;
+ std::for_each(listMainSoundProperties.begin(), listMainSoundProperties.end(), [&](const am_MainSoundProperty_s & ref) {
+ CommandInterface::am_MainSoundProperty_s prop(CAmConvert2CAPIType(ref.type), ref.value);
+ list.push_back(prop);
+ });
+ mService->fireSinkUpdatedEvent(sinkID, sinkClassID, list);
+}
+
+void CAmCommandSenderCAPI::cbSourceUpdated(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties)
+{
+ RETURN_IF_NOT_READY()
+ assert((bool)mService);
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "cbSourceUpdated called, sourceID", sourceID);
+ CommandInterface::am_MainSoundProperty_l list;
+ std::for_each(listMainSoundProperties.begin(), listMainSoundProperties.end(), [&](const am_MainSoundProperty_s & ref) {
+ CommandInterface::am_MainSoundProperty_s prop(CAmConvert2CAPIType(ref.type), ref.value);
+ list.push_back(prop);
+ });
+ mService->fireSourceUpdatedEvent(sourceID, sourceClassID, list);
+}
+
+void CAmCommandSenderCAPI::cbSinkNotification(const am_sinkID_t sinkID, const am_NotificationPayload_s& notification)
+{
+ RETURN_IF_NOT_READY()
+ assert((bool)mService);
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "cbSinkNotification called, sinkID", sinkID);
+ CommandInterface::am_NotificationPayload_s ciNnotif(CAmConvert2CAPIType(notification.type), notification.value);
+ mService->fireSinkNotificationEvent(sinkID, ciNnotif);
+}
+
+void CAmCommandSenderCAPI::cbSourceNotification(const am_sourceID_t sourceID, const am_NotificationPayload_s& notification)
+{
+ RETURN_IF_NOT_READY()
+ assert((bool)mService);
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "cbSourceNotification called, sourceID", sourceID);
+ CommandInterface::am_NotificationPayload_s ciNnotif(CAmConvert2CAPIType(notification.type), notification.value);
+ mService->fireSourceNotificationEvent(sourceID, ciNnotif);
+}
+
+void CAmCommandSenderCAPI::cbMainSinkNotificationConfigurationChanged(const am_sinkID_t sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration)
+{
+ RETURN_IF_NOT_READY()
+ assert((bool)mService);
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "cbSinkMainNotificationConfigurationChanged called, sinkID", sinkID);
+ org::genivi::audiomanager::am::am_NotificationConfiguration_s ciNotifConfig(CAmConvert2CAPIType(mainNotificationConfiguration.type),
+ CAmConvert2CAPIType(mainNotificationConfiguration.status),
+ mainNotificationConfiguration.parameter);
+ mService->fireMainSinkNotificationConfigurationChangedEvent(sinkID, ciNotifConfig);
+}
+
+void CAmCommandSenderCAPI::cbMainSourceNotificationConfigurationChanged(const am_sourceID_t sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration)
+{
+ RETURN_IF_NOT_READY()
+ assert((bool)mService);
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "cbSourceMainNotificationConfigurationChanged called, sourceID", sourceID);
+ org::genivi::audiomanager::am::am_NotificationConfiguration_s ciNotifConfig(CAmConvert2CAPIType(mainNotificationConfiguration.type),
+ CAmConvert2CAPIType(mainNotificationConfiguration.status),
+ mainNotificationConfiguration.parameter);
+ mService->fireMainSourceNotificationConfigurationChangedEvent(sourceID, ciNotifConfig);
+}
diff --git a/PluginCommandInterfaceCAPI/src/CAmCommandSenderCommon.cpp b/PluginCommandInterfaceCAPI/src/CAmCommandSenderCommon.cpp
new file mode 100644
index 0000000..dca4f50
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/src/CAmCommandSenderCommon.cpp
@@ -0,0 +1,159 @@
+/**
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
+
+#include "CAmCommandSenderCommon.h"
+
+/**
+ * Utility functions
+ */
+void CAmConvertAvailablility(const am_Availability_s & amAavailability, CommandInterface::am_Availability_s & result)
+{
+ result.availability = CAmConvert2CAPIType(amAavailability.availability);
+ result.availabilityReason = CAmConvert2CAPIType(amAavailability.availabilityReason);
+}
+
+void CAmConvertMainSoundProperty(const am_MainSoundProperty_s & amMainSoundProperty, CommandInterface::am_MainSoundProperty_s & result)
+{
+ result.type = CAmConvert2CAPIType(amMainSoundProperty.type);
+ result.value = amMainSoundProperty.value;
+}
+
+void CAmConvertSystemProperty(const am_SystemProperty_s & amSystemProperty, CommandInterface::am_SystemProperty_s & result)
+{
+ result.type = CAmConvert2CAPIType(amSystemProperty.type);
+ result.value = amSystemProperty.value;
+}
+
+CommandInterface::am_ClassProperty_e CAmConvert2CAPIType(const am_ClassProperty_e & property)
+{
+ return CP_MAX==property?
+ CommandInterface::am_ClassProperty_e::CP_MAX
+ :
+ static_cast<CommandInterface::am_ClassProperty_e>(property);
+}
+
+CommandInterface::am_SystemPropertyType_e CAmConvert2CAPIType(const am_SystemPropertyType_e & property)
+{
+ return SYP_MAX==property?
+ CommandInterface::am_SystemPropertyType_e::SYP_MAX
+ :
+ static_cast<CommandInterface::am_SystemPropertyType_e>(property);
+}
+
+CommandInterface::am_Availablility_e CAmConvert2CAPIType(const am_Availability_e & availability)
+{
+ return (A_MAX==availability)?CommandInterface::am_Availablility_e::A_MAX
+ :
+ static_cast<CommandInterface::am_Availablility_e>(availability);
+}
+
+CommandInterface::am_AvailabilityReason_e CAmConvert2CAPIType(const am_AvailabilityReason_e & availabilityReason)
+{
+ return (AR_MAX==availabilityReason)?CommandInterface::am_AvailabilityReason_e::AR_MAX
+ :
+ static_cast<CommandInterface::am_AvailabilityReason_e>(availabilityReason);
+}
+
+CommandInterface::am_MuteState_e CAmConvert2CAPIType(const am_MuteState_e & muteState)
+{
+ return MS_MAX==muteState?
+ CommandInterface::am_MuteState_e::MS_MAX
+ :
+ static_cast<CommandInterface::am_MuteState_e>(muteState);
+}
+
+am_MuteState_e CAmConvertFromCAPIType(const CommandInterface::am_MuteState_e & muteState)
+{
+ return CommandInterface::am_MuteState_e::MS_MAX==muteState?
+ MS_MAX:static_cast<am_MuteState_e>(muteState);
+}
+
+CommandInterface::am_MainSoundPropertyType_e CAmConvert2CAPIType(const am_MainSoundPropertyType_e & type)
+{
+ return MSP_MAX==type?
+ CommandInterface::am_MainSoundPropertyType_e::MSP_MAX
+ :
+ static_cast<CommandInterface::am_MainSoundPropertyType_e>(type);
+}
+am_MainSoundPropertyType_e CAmConvertFromCAPIType(const CommandInterface::am_MainSoundPropertyType_e & type)
+{
+ return CommandInterface::am_MainSoundPropertyType_e::MSP_MAX==type?
+ MSP_MAX:static_cast<am_MainSoundPropertyType_e>(type);
+}
+
+
+
+CommandInterface::am_ConnectionState_e CAmConvert2CAPIType(const am_ConnectionState_e & connectionState)
+{
+ return CS_MAX==connectionState?
+ CommandInterface::am_ConnectionState_e::CS_MAX
+ :
+ static_cast<CommandInterface::am_ConnectionState_e>(connectionState);
+}
+am_ConnectionState_e CAmConvertFromCAPIType(const CommandInterface::am_ConnectionState_e & connectionState)
+{
+ return CommandInterface::am_ConnectionState_e::CS_MAX==connectionState?
+ CS_MAX:static_cast<am_ConnectionState_e>(connectionState);
+}
+
+org::genivi::audiomanager::am::am_NotificationType_e CAmConvert2CAPIType(const am_NotificationType_e & notificationType)
+{
+ return NT_MAX==notificationType?
+ org::genivi::audiomanager::am::am_NotificationType_e::NT_MAX
+ :
+ static_cast<org::genivi::audiomanager::am::am_NotificationType_e>(notificationType);
+}
+am_NotificationType_e CAmConvertFromCAPIType(const org::genivi::audiomanager::am::am_NotificationType_e & notificationType)
+{
+ return org::genivi::audiomanager::am::am_NotificationType_e::NT_MAX==notificationType?
+ NT_MAX:static_cast<am_NotificationType_e>(notificationType);
+}
+
+org::genivi::audiomanager::am::am_NotificationStatus_e CAmConvert2CAPIType(const am_NotificationStatus_e & notificationStatus)
+{
+ return NS_MAX==notificationStatus?
+ org::genivi::audiomanager::am::am_NotificationStatus_e::NS_MAX
+ :
+ static_cast<org::genivi::audiomanager::am::am_NotificationStatus_e>(notificationStatus);
+}
+am_NotificationStatus_e CAmConvertFromCAPIType(const org::genivi::audiomanager::am::am_NotificationStatus_e & notificationStatus)
+{
+ return org::genivi::audiomanager::am::am_NotificationStatus_e::NS_MAX==notificationStatus?
+ NS_MAX:static_cast<am_NotificationStatus_e>(notificationStatus);
+}
+
+CommandInterface::am_Error_e CAmConvert2CAPIType(const am_Error_e & error)
+{
+ return E_MAX==error?
+ CommandInterface::am_Error_e::E_MAX
+ :
+ static_cast<CommandInterface::am_Error_e>(error);
+}
+am_Error_e CAmConvertFromCAPIType(const CommandInterface::am_Error_e & error)
+{
+ return CommandInterface::am_Error_e::E_MAX==error?
+ E_MAX:static_cast<am_Error_e>(error);
+}
+
+
+am_SystemPropertyType_e CAmConvertFromCAPIType(const CommandInterface::am_SystemPropertyType_e & propType)
+{
+ return CommandInterface::am_SystemPropertyType_e::SYP_MAX==propType?
+ SYP_MAX:static_cast<am_SystemPropertyType_e>(propType);
+}
+
diff --git a/PluginCommandInterfaceCAPI/src/CAmCommandSenderService.cpp b/PluginCommandInterfaceCAPI/src/CAmCommandSenderService.cpp
new file mode 100644
index 0000000..4d463d2
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/src/CAmCommandSenderService.cpp
@@ -0,0 +1,236 @@
+/**
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
+#include "CAmCommandSenderService.h"
+#include <assert.h>
+#include <algorithm>
+#include "CAmCommandSenderCommon.h"
+
+
+namespace am {
+
+CAmCommandSenderService::CAmCommandSenderService():mpIAmCommandReceive(NULL) {
+ // TODO Auto-generated constructor stub
+
+}
+
+CAmCommandSenderService::CAmCommandSenderService(IAmCommandReceive *aReceiver):mpIAmCommandReceive(aReceiver) {
+ // TODO Auto-generated constructor stub
+
+}
+
+CAmCommandSenderService::~CAmCommandSenderService() {
+ // TODO Auto-generated destructor stub
+}
+
+void CAmCommandSenderService::Connect(CommandInterface::am_sourceID_t sourceID, CommandInterface::am_sinkID_t sinkID, CommandInterface::am_Error_e& result, CommandInterface::am_mainConnectionID_t& mainConnectionID) {
+ assert(mpIAmCommandReceive);
+ result = CAmConvert2CAPIType(mpIAmCommandReceive->connect(sourceID, sinkID, mainConnectionID));
+}
+
+void CAmCommandSenderService::Disconnect(CommandInterface::am_mainConnectionID_t mainConnectionID, CommandInterface::am_Error_e& result) {
+ assert(mpIAmCommandReceive);
+ result = CAmConvert2CAPIType(mpIAmCommandReceive->disconnect(mainConnectionID));
+}
+
+void CAmCommandSenderService::SetVolume(CommandInterface::am_sinkID_t sinkID, CommandInterface::am_mainVolume_t volume, CommandInterface::am_Error_e& result) {
+
+ assert(mpIAmCommandReceive);
+ result = CAmConvert2CAPIType(mpIAmCommandReceive->setVolume(sinkID, volume));
+}
+
+void CAmCommandSenderService::VolumeStep(CommandInterface::am_sinkID_t sinkID, CommandInterface::am_mainVolume_t volumeStep, CommandInterface::am_Error_e& result) {
+ assert(mpIAmCommandReceive);
+ result = CAmConvert2CAPIType(mpIAmCommandReceive->volumeStep(sinkID, volumeStep));
+}
+
+void CAmCommandSenderService::SetSinkMuteState(CommandInterface::am_sinkID_t sinkID, CommandInterface::am_MuteState_e muteState, CommandInterface::am_Error_e& result) {
+ assert(mpIAmCommandReceive);
+ result = CAmConvert2CAPIType(mpIAmCommandReceive->setSinkMuteState(sinkID, CAmConvertFromCAPIType(muteState)));
+}
+
+void CAmCommandSenderService::SetMainSinkSoundProperty(CommandInterface::am_sinkID_t sinkID, CommandInterface::am_MainSoundProperty_s soundProperty, CommandInterface::am_Error_e& result) {
+ assert(mpIAmCommandReceive);
+ am_MainSoundProperty_s property = {CAmConvertFromCAPIType(soundProperty.type), soundProperty.value};
+ result = CAmConvert2CAPIType(mpIAmCommandReceive->setMainSinkSoundProperty(property, sinkID));
+}
+
+void CAmCommandSenderService::SetMainSourceSoundProperty(CommandInterface::am_sourceID_t sourceID, CommandInterface::am_MainSoundProperty_s soundProperty, CommandInterface::am_Error_e& result) {
+ assert(mpIAmCommandReceive);
+ am_MainSoundProperty_s property = {CAmConvertFromCAPIType(soundProperty.type), soundProperty.value};
+ result = CAmConvert2CAPIType(mpIAmCommandReceive->setMainSourceSoundProperty(property, sourceID));
+}
+
+void CAmCommandSenderService::SetSystemProperty(CommandInterface::am_SystemProperty_s soundProperty, CommandInterface::am_Error_e& result) {
+ assert(mpIAmCommandReceive);
+ am_SystemProperty_s property = {CAmConvertFromCAPIType(soundProperty.type), soundProperty.value};
+ result = CAmConvert2CAPIType(mpIAmCommandReceive->setSystemProperty(property));
+}
+
+void CAmCommandSenderService::GetListMainConnections(CommandInterface::am_Error_e& result, CommandInterface::am_MainConnectionType_l& listConnections) {
+ assert(mpIAmCommandReceive);
+ std::vector<am_MainConnectionType_s> list;
+ result = CAmConvert2CAPIType(mpIAmCommandReceive->getListMainConnections(list));
+ if(result==CommandInterface::am_Error_e::E_OK)
+ {
+ CommandInterface::am_MainConnectionType_s item;
+ for(std::vector<am_MainConnectionType_s>::const_iterator iter = list.begin(); iter!=list.end(); iter++)
+ {
+ item.mainConnectionID = iter->mainConnectionID;
+ item.sourceID = iter->sourceID;
+ item.sinkID = iter->sinkID;
+ item.delay = iter->delay;
+ item.connectionState = CAmConvert2CAPIType(iter->connectionState);
+ listConnections.push_back (item);
+ }
+ }
+}
+
+void CAmCommandSenderService::GetListMainSinks(CommandInterface::am_Error_e& result, CommandInterface::am_SinkType_l& listMainSinks) {
+ assert(mpIAmCommandReceive);
+ std::vector<am_SinkType_s> list;
+ result = CAmConvert2CAPIType(mpIAmCommandReceive->getListMainSinks(list));
+ if(result==CommandInterface::am_Error_e::E_OK)
+ {
+ CommandInterface::am_SinkType_s item;
+ for(std::vector<am_SinkType_s>::const_iterator iter = list.begin(); iter!=list.end(); iter++)
+ {
+ item.sinkID = iter->sinkID;
+ item.name = iter->name;
+ item.sinkClassID = iter->sinkClassID;
+ item.volume = iter->volume;
+ item.muteState = CAmConvert2CAPIType(iter->muteState);
+ CAmConvertAvailablility(iter->availability, item.availability);
+ listMainSinks.push_back (item);
+ }
+ }
+}
+
+void CAmCommandSenderService::GetListMainSources(CommandInterface::am_Error_e& result, CommandInterface::am_SourceType_l& listMainSources) {
+ assert(mpIAmCommandReceive);
+ std::vector<am_SourceType_s> list;
+ result = CAmConvert2CAPIType(mpIAmCommandReceive->getListMainSources(list));
+ if(result==CommandInterface::am_Error_e::E_OK)
+ {
+ CommandInterface::am_SourceType_s item;
+ for(std::vector<am_SourceType_s>::const_iterator iter = list.begin(); iter!=list.end(); iter++)
+ {
+ item.sourceID = iter->sourceID;
+ item.name = iter->name;
+ item.sourceClassID = iter->sourceClassID;
+ CAmConvertAvailablility(iter->availability, item.availability);
+ listMainSources.push_back (item);
+ }
+ }
+}
+
+void CAmCommandSenderService::GetListMainSinkSoundProperties(CommandInterface::am_sinkID_t sinkID, CommandInterface::am_Error_e& result, CommandInterface::am_MainSoundProperty_l& listSoundProperties) {
+ assert(mpIAmCommandReceive);
+ std::vector<am_MainSoundProperty_s> list;
+ result = CAmConvert2CAPIType(mpIAmCommandReceive->getListMainSinkSoundProperties(sinkID, list));
+ if(result==CommandInterface::am_Error_e::E_OK)
+ {
+ CommandInterface::am_MainSoundProperty_s item;
+ for(std::vector<am_MainSoundProperty_s>::const_iterator iter = list.begin(); iter!=list.end(); iter++)
+ {
+ item.type = CAmConvert2CAPIType(iter->type);
+ item.value = iter->value;
+ listSoundProperties.push_back (item);
+ }
+ }
+}
+
+void CAmCommandSenderService::GetListMainSourceSoundProperties(CommandInterface::am_sourceID_t sourceID, CommandInterface::am_Error_e& result, CommandInterface::am_MainSoundProperty_l& listSourceProperties) {
+ assert(mpIAmCommandReceive);
+ std::vector<am_MainSoundProperty_s> list;
+ result = CAmConvert2CAPIType(mpIAmCommandReceive->getListMainSourceSoundProperties(sourceID, list));
+ if(result==CommandInterface::am_Error_e::E_OK)
+ {
+ CommandInterface::am_MainSoundProperty_s item;
+ for(std::vector<am_MainSoundProperty_s>::const_iterator iter = list.begin(); iter!=list.end(); iter++)
+ {
+ item.type = CAmConvert2CAPIType(iter->type);
+ item.value = iter->value;
+ listSourceProperties.push_back (item);
+ }
+ }
+}
+
+void CAmCommandSenderService::GetListSourceClasses(CommandInterface::am_Error_e& result, CommandInterface::am_SourceClass_l& listSourceClasses) {
+ assert(mpIAmCommandReceive);
+ std::vector<am_SourceClass_s> list;
+ result = CAmConvert2CAPIType(mpIAmCommandReceive->getListSourceClasses(list));
+ if(result==CommandInterface::am_Error_e::E_OK)
+ {
+ CommandInterface::am_SourceClass_s item;
+ for(std::vector<am_SourceClass_s>::const_iterator iter = list.begin(); iter!=list.end(); iter++)
+ {
+ item.sourceClassID = iter->sourceClassID;
+ item.name = iter->name;
+ item.listClassProperties.clear();
+ std::for_each(iter->listClassProperties.begin(), iter->listClassProperties.end(), [&](const am_ClassProperty_s & ref) {
+ CommandInterface::am_ClassProperty_s classProp(CAmConvert2CAPIType(ref.classProperty), ref.value);
+ item.listClassProperties.push_back(classProp);
+ });
+ listSourceClasses.push_back (item);
+ }
+ }
+}
+
+void CAmCommandSenderService::GetListSinkClasses(CommandInterface::am_Error_e& result, CommandInterface::am_SinkClass_l& listSinkClasses) {
+ assert(mpIAmCommandReceive);
+ std::vector<am_SinkClass_s> list;
+ result = CAmConvert2CAPIType(mpIAmCommandReceive->getListSinkClasses(list));
+ if(result==CommandInterface::am_Error_e::E_OK)
+ {
+ CommandInterface::am_SinkClass_s item;
+ for(std::vector<am_SinkClass_s>::const_iterator iter = list.begin(); iter!=list.end(); iter++)
+ {
+ item.sinkClassID = iter->sinkClassID;
+ item.name = iter->name;
+ item.listClassProperties.clear();
+ std::for_each(iter->listClassProperties.begin(), iter->listClassProperties.end(), [&](const am_ClassProperty_s & ref) {
+ CommandInterface::am_ClassProperty_s classProp(CAmConvert2CAPIType(ref.classProperty), ref.value);
+ item.listClassProperties.push_back(classProp);
+ });
+ listSinkClasses.push_back (item);
+ }
+ }
+}
+
+void CAmCommandSenderService::GetListSystemProperties(CommandInterface::am_Error_e& result, CommandInterface::am_SystemProperty_l& listSystemProperties) {
+ assert(mpIAmCommandReceive);
+ std::vector<am_SystemProperty_s> list;
+ result = CAmConvert2CAPIType(mpIAmCommandReceive->getListSystemProperties(list));
+ if(result==CommandInterface::am_Error_e::E_OK)
+ {
+ CommandInterface::am_SystemProperty_s item;
+ for(std::vector<am_SystemProperty_s>::const_iterator iter = list.begin(); iter!=list.end(); iter++)
+ {
+ item.type = CAmConvert2CAPIType(iter->type);
+ item.value = iter->value;
+ listSystemProperties.push_back (item);
+ }
+ }
+}
+
+void CAmCommandSenderService::GetTimingInformation(CommandInterface::am_mainConnectionID_t mainConnectionID, CommandInterface::am_Error_e& result, CommandInterface::am_timeSync_t& delay) {
+ assert(mpIAmCommandReceive);
+ result = CAmConvert2CAPIType(mpIAmCommandReceive->getTimingInformation(mainConnectionID, delay));
+}
+
+} /* namespace am */
diff --git a/PluginCommandInterfaceCAPI/test/CAmCommandSenderCAPITest.cpp b/PluginCommandInterfaceCAPI/test/CAmCommandSenderCAPITest.cpp
new file mode 100644
index 0000000..6f64150
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/test/CAmCommandSenderCAPITest.cpp
@@ -0,0 +1,1101 @@
+/**
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
+#include "CAmCommandSenderCAPITest.h"
+#include <iostream>
+#include <fstream>
+#include <sstream>
+#include <algorithm>
+#include <string>
+#include <vector>
+#include <set>
+#include "TAmPluginTemplate.h"
+#include "MockIAmCommandReceive.h"
+#include "shared/CAmDltWrapper.h"
+#include "../include/CAmCommandSenderCAPI.h"
+#include "MockNotificationsClient.h"
+#include <CommonAPI/CommonAPI.h>
+#include <sys/time.h>
+
+
+
+using namespace am;
+using namespace testing;
+using namespace org::genivi::audiomanager;
+using namespace CommonAPI;
+
+static CAmTestsEnvironment* env;
+
+pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
+pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_cond_t condPxy = PTHREAD_COND_INITIALIZER;
+pthread_mutex_t mutexPxy = PTHREAD_MUTEX_INITIALIZER;
+pthread_cond_t condSer = PTHREAD_COND_INITIALIZER;
+pthread_mutex_t mutexSer = PTHREAD_MUTEX_INITIALIZER;
+
+void* run_client(void*)
+{
+ CAmSocketHandler socketHandler;
+ CAmTestCAPIWrapper wrapper(&socketHandler);
+ env->mSocketHandlerClient = &socketHandler;
+ std::shared_ptr<CommonAPI::Factory> factory = wrapper.factory();
+ env->mProxy = factory->buildProxy<CommandInterfaceProxy>(CAmCommandSenderCAPI::COMMAND_SENDER_SERVICE);
+ env->mProxy->getProxyStatusEvent().subscribe(std::bind(&CAmTestsEnvironment::onServiceStatusEvent,env,std::placeholders::_1));
+
+ pthread_mutex_lock(&mutexSer);
+ env->mIsProxyInitilized = true;
+ pthread_mutex_unlock(&mutexSer);
+ pthread_cond_signal(&condSer);
+
+ socketHandler.start_listenting();
+
+//Cleanup
+ env->mProxy.reset();
+ env->mSocketHandlerClient = NULL;
+
+ return (NULL);
+}
+
+void* run_service(void*)
+{
+ CAmSocketHandler socketHandler;
+ CAmTestCAPIWrapper wrapper(&socketHandler);
+ CAmCommandSenderCAPI plugin(&wrapper);
+ env->mpPlugin = &plugin;
+ env->mSocketHandlerService = &socketHandler;
+ MockIAmCommandReceive mock;
+ env->mpCommandReceive = &mock;
+ if(plugin.startupInterface(env->mpCommandReceive)!=E_OK)
+ {
+ logError("CommandSendInterface can't start!");
+ }
+ else
+ {
+ plugin.setCommandReady(10);
+ socketHandler.start_listenting();
+
+ plugin.setCommandRundown(10);
+ plugin.tearDownInterface(env->mpCommandReceive);
+ }
+
+//Cleanup
+ env->mpPlugin = NULL;
+ env->mpCommandReceive = NULL;
+ env->mSocketHandlerClient = NULL;
+
+ return (NULL);
+}
+
+void* run_listener(void*)
+{
+ pthread_mutex_lock(&mutexSer);
+ while (env->mIsProxyInitilized==false)
+ {
+ std::cout << "\n\r Intialize proxy..\n\r" ;
+ pthread_cond_wait(&condSer, &mutexSer);
+ }
+ pthread_mutex_unlock(&mutexSer);
+
+ time_t start = time(0);
+ time_t now = start;
+ pthread_mutex_lock(&mutexPxy);
+ while ( env->mIsServiceAvailable==false && now-start <= 15 )
+ {
+ std::cout << " Waiting for proxy..\n\r" ;
+ struct timespec ts = { 0, 0 };
+ clock_gettime(CLOCK_REALTIME, &ts);
+ ts.tv_sec += 5;
+ pthread_cond_timedwait(&condPxy, &mutexPxy, &ts);
+ now = time(0);
+ }
+ pthread_mutex_unlock(&mutexPxy);
+ pthread_cond_signal(&cond);
+
+ return NULL;
+}
+
+CAmTestsEnvironment::CAmTestsEnvironment() :
+ mListenerThread(0),
+ mServicePThread(0),
+ mClientPThread(0),
+ mSocketHandlerService(NULL),
+ mSocketHandlerClient(NULL),
+ mIsProxyInitilized(false),
+ mIsServiceAvailable(false),
+ mpCommandReceive(NULL),
+ mpPlugin(NULL)
+{
+ env=this;
+
+ CAmDltWrapper::instance()->registerApp("capiTest", "capiTest");
+ pthread_create(&mListenerThread, NULL, run_listener, NULL);
+ pthread_create(&mServicePThread, NULL, run_service, NULL);
+ pthread_create(&mClientPThread, NULL, run_client, NULL);
+}
+
+CAmTestsEnvironment::~CAmTestsEnvironment()
+{
+
+}
+
+void CAmTestsEnvironment::SetUp()
+{
+ pthread_cond_wait(&cond, &mutex);
+}
+
+void CAmTestsEnvironment::TearDown()
+{
+// mWrapperClient.factory().reset();
+
+ mSocketHandlerClient->exit_mainloop();
+ pthread_join(mClientPThread, NULL);
+ mSocketHandlerService->exit_mainloop();
+ pthread_join(mServicePThread, NULL);
+ sleep(1);
+}
+
+void CAmTestsEnvironment::onServiceStatusEvent(const CommonAPI::AvailabilityStatus& serviceStatus)
+{
+ std::stringstream avail;
+ avail << "(" << static_cast<int>(serviceStatus) << ")";
+
+ logInfo("Service Status changed to ", avail.str());
+ std::cout << std::endl << "Service Status changed to " << avail.str() << std::endl;
+ pthread_mutex_lock(&mutexPxy);
+ mIsServiceAvailable = (serviceStatus==CommonAPI::AvailabilityStatus::AVAILABLE);
+ pthread_mutex_unlock(&mutexPxy);
+ pthread_cond_signal(&condPxy);
+}
+
+int main(int argc, char **argv)
+{
+ ::testing::InitGoogleTest(&argc, argv);
+ ::testing::AddGlobalTestEnvironment(new CAmTestsEnvironment);
+ return RUN_ALL_TESTS();
+}
+
+CAmCommandSenderCAPITest::CAmCommandSenderCAPITest()
+{
+
+}
+
+CAmCommandSenderCAPITest::~CAmCommandSenderCAPITest()
+{
+
+}
+
+void CAmCommandSenderCAPITest::SetUp()
+{
+ ::testing::GTEST_FLAG(throw_on_failure) = false;
+}
+
+void CAmCommandSenderCAPITest::TearDown()
+{
+ ::testing::GTEST_FLAG(throw_on_failure) = true;
+}
+
+TEST_F(CAmCommandSenderCAPITest, ClientStartupTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+ACTION(returnClientConnect){
+arg2=101;
+}
+
+TEST_F(CAmCommandSenderCAPITest, ConnectTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CommandInterface::am_sourceID_t sourceID = 500;
+ CommandInterface::am_sinkID_t sinkID = 400;
+ CommonAPI::CallStatus callStatus = CommonAPI::CallStatus::NOT_AVAILABLE;
+ CommandInterface::am_Error_e result = CommandInterface::am_Error_e::E_OK;
+ CommandInterface::am_mainConnectionID_t mainConnectionID = 0;
+
+ EXPECT_CALL(*env->mpCommandReceive, connect(_, _, _)).WillOnce(DoAll(returnClientConnect(), Return(E_OK)));
+ env->mProxy->Connect(sourceID, sinkID, callStatus,result, mainConnectionID);
+ ASSERT_EQ(mainConnectionID, 101);
+ ASSERT_EQ(result, CommandInterface::am_Error_e::E_OK);
+ EXPECT_CALL(*env->mpCommandReceive, disconnect(mainConnectionID)).WillOnce(Return(am_Error_e::E_OK));
+ env->mProxy->Disconnect(mainConnectionID, callStatus, result);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+TEST_F(CAmCommandSenderCAPITest, SetVolumeTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CommandInterface::am_mainVolume_t volume = 100;
+ CommandInterface::am_sinkID_t sinkID = 400;
+ CommonAPI::CallStatus callStatus = CommonAPI::CallStatus::NOT_AVAILABLE;
+ CommandInterface::am_Error_e result = CommandInterface::am_Error_e::E_OK;
+
+ EXPECT_CALL(*env->mpCommandReceive, setVolume(sinkID,volume)).WillOnce(Return(E_OK));
+ env->mProxy->SetVolume(sinkID, volume, callStatus, result);
+ ASSERT_EQ(result, CommandInterface::am_Error_e::E_OK);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+TEST_F(CAmCommandSenderCAPITest, VolumeStepTest)
+{
+
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CommandInterface::am_mainVolume_t volume = 100;
+ CommandInterface::am_sinkID_t sinkID = 400;
+ CommonAPI::CallStatus callStatus = CommonAPI::CallStatus::NOT_AVAILABLE;
+ CommandInterface::am_Error_e result = CommandInterface::am_Error_e::E_OK;
+
+ EXPECT_CALL(*env->mpCommandReceive, volumeStep(sinkID,volume)).WillOnce(Return(E_OK));
+ env->mProxy->VolumeStep(sinkID, volume, callStatus, result);
+ ASSERT_EQ(result, CommandInterface::am_Error_e::E_OK);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+TEST_F(CAmCommandSenderCAPITest, SetSinkMuteStateTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CommandInterface::am_MuteState_e value = CommandInterface::am_MuteState_e::MS_UNKNOWN;
+ CommandInterface::am_sinkID_t sinkID = 400;
+ CommonAPI::CallStatus callStatus = CommonAPI::CallStatus::NOT_AVAILABLE;
+ CommandInterface::am_Error_e result = CommandInterface::am_Error_e::E_OK;
+
+ EXPECT_CALL(*env->mpCommandReceive, setSinkMuteState(sinkID, am_MuteState_e::MS_UNKNOWN)).WillOnce(Return(E_OK));
+ env->mProxy->SetSinkMuteState(sinkID, value, callStatus, result);
+ ASSERT_EQ(result, CommandInterface::am_Error_e::E_OK);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+TEST_F(CAmCommandSenderCAPITest, SetMainSinkSoundPropertyTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CommandInterface::am_sinkID_t sinkID = 400;
+ CommonAPI::CallStatus callStatus = CommonAPI::CallStatus::NOT_AVAILABLE;
+ CommandInterface::am_Error_e result = CommandInterface::am_Error_e::E_OK;
+
+ EXPECT_CALL(*env->mpCommandReceive, setMainSinkSoundProperty(AllOf(
+ Field(&am_MainSoundProperty_s::value, 3),
+ Field(&am_MainSoundProperty_s::type, MSP_UNKNOWN)), sinkID)).WillOnce(Return(E_OK));
+ CommandInterface::am_MainSoundProperty_s value(CommandInterface::am_MainSoundPropertyType_e::MSP_UNKNOWN, (const int16_t)3);
+ env->mProxy->SetMainSinkSoundProperty(sinkID, value, callStatus, result);
+ ASSERT_EQ(result, CommandInterface::am_Error_e::E_OK);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+TEST_F(CAmCommandSenderCAPITest, SetMainSourceSoundPropertyTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CommandInterface::am_sourceID_t sID = 400;
+ CommonAPI::CallStatus callStatus = CommonAPI::CallStatus::NOT_AVAILABLE;
+ CommandInterface::am_Error_e result = CommandInterface::am_Error_e::E_OK;
+
+ EXPECT_CALL(*env->mpCommandReceive, setMainSourceSoundProperty(AllOf(
+ Field(&am_MainSoundProperty_s::value, 3),
+ Field(&am_MainSoundProperty_s::type, MSP_UNKNOWN)), sID)).WillOnce(Return(E_OK));
+ CommandInterface::am_MainSoundProperty_s value(CommandInterface::am_MainSoundPropertyType_e::MSP_UNKNOWN, (const int16_t)3);
+ env->mProxy->SetMainSourceSoundProperty(sID, value, callStatus, result);
+ ASSERT_EQ(result, CommandInterface::am_Error_e::E_OK);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+TEST_F(CAmCommandSenderCAPITest, SetSystemPropertyTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CommonAPI::CallStatus callStatus = CommonAPI::CallStatus::NOT_AVAILABLE;
+ CommandInterface::am_Error_e result = CommandInterface::am_Error_e::E_OK;
+
+ EXPECT_CALL(*env->mpCommandReceive, setSystemProperty(Field(&am_SystemProperty_s::value, 2))).WillOnce(Return(E_OK));
+
+ CommandInterface::am_SystemProperty_s value(CommandInterface::am_SystemPropertyType_e::SYP_UNKNOWN, (const int16_t)2);
+ env->mProxy->SetSystemProperty(value, callStatus, result);
+ ASSERT_EQ(result, CommandInterface::am_Error_e::E_OK);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+ACTION(returnListConnections){
+ std::vector<am_MainConnectionType_s> list;
+ am_MainConnectionType_s listItem;
+ listItem.mainConnectionID=15;
+ listItem.sinkID=4;
+ listItem.sourceID=3;
+ listItem.connectionState=CS_UNKNOWN;
+ listItem.delay=34;
+ list.push_back(listItem);
+ arg0=list;
+}
+
+TEST_F(CAmCommandSenderCAPITest, GetListMainConnectionsTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CommonAPI::CallStatus callStatus = CommonAPI::CallStatus::NOT_AVAILABLE;
+ CommandInterface::am_Error_e result = CommandInterface::am_Error_e::E_OK;
+
+ EXPECT_CALL(*env->mpCommandReceive, getListMainConnections(_)).WillOnce(DoAll(returnListConnections(), Return(E_OK)));
+ CommandInterface::am_MainConnectionType_l listConnections;
+ env->mProxy->GetListMainConnections(callStatus, result, listConnections);
+ ASSERT_EQ(result, CommandInterface::am_Error_e::E_OK);
+ ASSERT_EQ(1, listConnections.size());
+ ASSERT_EQ(15, listConnections.at(0).mainConnectionID);
+ ASSERT_EQ(4, listConnections.at(0).sinkID);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+ACTION(returnListSinks){
+ std::vector<am_SinkType_s> list;
+ am_SinkType_s listItem;
+ listItem.availability.availability=A_UNAVAILABLE;
+ listItem.availability.availabilityReason=AR_GENIVI_NOMEDIA;
+ listItem.muteState=MS_UNMUTED;
+ listItem.name="mySink";
+ listItem.sinkClassID=34;
+ listItem.sinkID=24;
+ listItem.volume=124;
+ list.push_back(listItem);
+ arg0=list;
+}
+
+TEST_F(CAmCommandSenderCAPITest, GetListMainSinksTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CommonAPI::CallStatus callStatus = CommonAPI::CallStatus::NOT_AVAILABLE;
+ CommandInterface::am_Error_e result = CommandInterface::am_Error_e::E_OK;
+
+ EXPECT_CALL(*env->mpCommandReceive, getListMainSinks(_)).WillOnce(DoAll(returnListSinks(), Return(E_OK)));
+ CommandInterface::am_SinkType_l listMainSinks;
+ env->mProxy->GetListMainSinks(callStatus, result, listMainSinks);
+ ASSERT_EQ(result, CommandInterface::am_Error_e::E_OK);
+ ASSERT_EQ(1, listMainSinks.size());
+ ASSERT_EQ(34, listMainSinks.at(0).sinkClassID);
+ ASSERT_EQ(24, listMainSinks.at(0).sinkID);
+ ASSERT_EQ(CommandInterface::am_Availablility_e::A_UNAVAILABLE, listMainSinks.at(0).availability.availability);
+ ASSERT_EQ(CommandInterface::am_AvailabilityReason_e::AR_GENIVI_NOMEDIA, listMainSinks.at(0).availability.availabilityReason);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+ACTION(returnListSources){
+ std::vector<am_SourceType_s> list;
+ am_SourceType_s listItem;
+ listItem.availability.availability=A_MAX;
+ listItem.availability.availabilityReason=AR_GENIVI_SAMEMEDIA;
+ listItem.name="MySource";
+ listItem.sourceClassID=12;
+ listItem.sourceID=224;
+ list.push_back(listItem);
+ listItem.name="NextSource";
+ listItem.sourceID=22;
+ list.push_back(listItem);
+ arg0=list;
+}
+TEST_F(CAmCommandSenderCAPITest, GetListMainSourcesTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CommonAPI::CallStatus callStatus = CommonAPI::CallStatus::NOT_AVAILABLE;
+ CommandInterface::am_Error_e result = CommandInterface::am_Error_e::E_OK;
+
+ EXPECT_CALL(*env->mpCommandReceive, getListMainSources(_)).WillOnce(DoAll(returnListSources(), Return(E_OK)));
+ CommandInterface::am_SourceType_l list;
+ env->mProxy->GetListMainSources(callStatus, result, list);
+ ASSERT_EQ(result, CommandInterface::am_Error_e::E_OK);
+ ASSERT_EQ(2, list.size());
+ ASSERT_EQ(12, list.at(0).sourceClassID);
+ ASSERT_EQ(224, list.at(0).sourceID);
+ ASSERT_EQ(CommandInterface::am_Availablility_e::A_MAX, list.at(0).availability.availability);
+ ASSERT_EQ(CommandInterface::am_AvailabilityReason_e::AR_GENIVI_SAMEMEDIA, list.at(0).availability.availabilityReason);
+ ASSERT_EQ(22, list.at(1).sourceID);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+ACTION(returnListMainSinkSoundProperties){
+ std::vector<am_MainSoundProperty_s> list;
+ am_MainSoundProperty_s listItem;
+ listItem.type=MSP_MAX;
+ listItem.value=223;
+ list.push_back(listItem);
+ listItem.type=MSP_MAX;
+ listItem.value=2;
+ list.push_back(listItem);
+ arg1=list;
+}
+
+TEST_F(CAmCommandSenderCAPITest, GetListMainSinkSoundPropertiesTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CommandInterface::am_sinkID_t sID = 400;
+ CommonAPI::CallStatus callStatus = CommonAPI::CallStatus::NOT_AVAILABLE;
+ CommandInterface::am_Error_e result = CommandInterface::am_Error_e::E_OK;
+
+ EXPECT_CALL(*env->mpCommandReceive, getListMainSinkSoundProperties(sID,_)).WillOnce(DoAll(returnListMainSinkSoundProperties(), Return(E_OK)));
+ CommandInterface::am_MainSoundProperty_l list;
+ env->mProxy->GetListMainSinkSoundProperties(sID, callStatus, result, list);
+ ASSERT_EQ(result, CommandInterface::am_Error_e::E_OK);
+ ASSERT_EQ(2, list.size());
+ ASSERT_EQ(223, list.at(0).value);
+ ASSERT_EQ(CommandInterface::am_MainSoundPropertyType_e::MSP_MAX, list.at(0).type);
+ ASSERT_EQ(2, list.at(1).value);
+ ASSERT_EQ(CommandInterface::am_MainSoundPropertyType_e::MSP_MAX, list.at(1).type);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+ACTION(returnListMainSourceSoundProperties){
+ std::vector<am_MainSoundProperty_s> list;
+ am_MainSoundProperty_s listItem;
+ listItem.type=MSP_EXAMPLE_MID;
+ listItem.value=223;
+ list.push_back(listItem);
+ listItem.type=MSP_MAX;
+ listItem.value=2;
+ list.push_back(listItem);
+ arg1=list;
+}
+
+TEST_F(CAmCommandSenderCAPITest, GetListMainSourceSoundPropertiesTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CommandInterface::am_sourceID_t sID = 400;
+ CommonAPI::CallStatus callStatus = CommonAPI::CallStatus::NOT_AVAILABLE;
+ CommandInterface::am_Error_e result = CommandInterface::am_Error_e::E_OK;
+
+ EXPECT_CALL(*env->mpCommandReceive, getListMainSourceSoundProperties(sID,_)).WillOnce(DoAll(returnListMainSourceSoundProperties(), Return(E_OK)));
+ CommandInterface::am_MainSoundProperty_l list;
+ env->mProxy->GetListMainSourceSoundProperties(sID, callStatus, result, list);
+ ASSERT_EQ(result, CommandInterface::am_Error_e::E_OK);
+ ASSERT_EQ(2, list.size());
+ ASSERT_EQ(223, list.at(0).value);
+ ASSERT_EQ(CommandInterface::am_MainSoundPropertyType_e::MSP_EXAMPLE_MID, list.at(0).type);
+ ASSERT_EQ(2, list.at(1).value);
+ ASSERT_EQ(CommandInterface::am_MainSoundPropertyType_e::MSP_MAX, list.at(1).type);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+ACTION(returnListSourceClasses){
+ std::vector<am_SourceClass_s> list;
+ am_SourceClass_s listItem;
+ am_ClassProperty_s property;
+ property.classProperty=CP_MAX;
+ property.value=12;
+ listItem.name="FirstCLass";
+ listItem.sourceClassID=23;
+ listItem.listClassProperties.push_back(property);
+ list.push_back(listItem);
+ listItem.name="SecondCLass";
+ listItem.sourceClassID=2;
+ listItem.listClassProperties.push_back(property);
+ list.push_back(listItem);
+ arg0=list;
+}
+
+TEST_F(CAmCommandSenderCAPITest, GetListSourceClassesTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CommonAPI::CallStatus callStatus = CommonAPI::CallStatus::NOT_AVAILABLE;
+ CommandInterface::am_Error_e result = CommandInterface::am_Error_e::E_OK;
+
+ EXPECT_CALL(*env->mpCommandReceive, getListSourceClasses(_)).WillOnce(DoAll(returnListSourceClasses(), Return(E_OK)));
+ CommandInterface::am_SourceClass_l list;
+ env->mProxy->GetListSourceClasses(callStatus, result, list);
+ ASSERT_EQ(result, CommandInterface::am_Error_e::E_OK);
+ ASSERT_EQ(2, list.size());
+
+ ASSERT_EQ(23, list.at(0).sourceClassID);
+ ASSERT_EQ(1, list.at(0).listClassProperties.size());
+ ASSERT_EQ(CommandInterface::am_ClassProperty_e::CP_MAX, list.at(0).listClassProperties.at(0).classProperty);
+
+ ASSERT_EQ(2, list.at(1).sourceClassID);
+ ASSERT_EQ(2, list.at(1).listClassProperties.size());
+ ASSERT_EQ(CommandInterface::am_ClassProperty_e::CP_MAX, list.at(1).listClassProperties.at(0).classProperty);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+ACTION(returnListSinkClasses){
+ std::vector<am_SinkClass_s> list;
+ am_SinkClass_s listItem;
+ am_ClassProperty_s property;
+ property.classProperty=CP_MAX;
+ property.value=122;
+ listItem.name="FirstCLass";
+ listItem.sinkClassID=23;
+ listItem.listClassProperties.push_back(property);
+ list.push_back(listItem);
+ listItem.name="SecondCLass";
+ listItem.sinkClassID=2;
+ listItem.listClassProperties.push_back(property);
+ list.push_back(listItem);
+ arg0=list;
+}
+
+TEST_F(CAmCommandSenderCAPITest, GetListSinkClassesTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CommonAPI::CallStatus callStatus = CommonAPI::CallStatus::NOT_AVAILABLE;
+ CommandInterface::am_Error_e result = CommandInterface::am_Error_e::E_OK;
+
+ EXPECT_CALL(*env->mpCommandReceive, getListSinkClasses(_)).WillOnce(DoAll(returnListSinkClasses(), Return(E_OK)));
+ CommandInterface::am_SinkClass_l list;
+ env->mProxy->GetListSinkClasses(callStatus, result, list);
+ ASSERT_EQ(result, CommandInterface::am_Error_e::E_OK);
+ ASSERT_EQ(2, list.size());
+
+ ASSERT_EQ(0, list.at(0).name.compare("FirstCLass"));
+ ASSERT_EQ(23, list.at(0).sinkClassID);
+ ASSERT_EQ(1, list.at(0).listClassProperties.size());
+ ASSERT_EQ(CommandInterface::am_ClassProperty_e::CP_MAX, list.at(0).listClassProperties.at(0).classProperty);
+
+ ASSERT_EQ(0, list.at(1).name.compare("SecondCLass"));
+ ASSERT_EQ(2, list.at(1).sinkClassID);
+ ASSERT_EQ(2, list.at(1).listClassProperties.size());
+ ASSERT_EQ(CommandInterface::am_ClassProperty_e::CP_MAX, list.at(1).listClassProperties.at(0).classProperty);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+ACTION(returnListSystemProperties){
+ std::vector<am_SystemProperty_s> list;
+ am_SystemProperty_s listItem;
+ listItem.type=SYP_MAX;
+ listItem.value=-2245;
+ list.push_back(listItem);
+ arg0=list;
+}
+
+TEST_F(CAmCommandSenderCAPITest, GetListSystemPropertiesTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CommonAPI::CallStatus callStatus = CommonAPI::CallStatus::NOT_AVAILABLE;
+ CommandInterface::am_Error_e result = CommandInterface::am_Error_e::E_OK;
+
+ EXPECT_CALL(*env->mpCommandReceive, getListSystemProperties(_)).WillOnce(DoAll(returnListSystemProperties(), Return(E_OK)));
+ CommandInterface::am_SystemProperty_l list;
+ env->mProxy->GetListSystemProperties(callStatus, result, list);
+ ASSERT_EQ(result, CommandInterface::am_Error_e::E_OK);
+ ASSERT_EQ(1, list.size());
+
+ ASSERT_EQ(-2245, list.at(0).value);
+ ASSERT_EQ(CommandInterface::am_SystemPropertyType_e::SYP_MAX, list.at(0).type);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+
+/**
+ * Signal tests
+ */
+
+#define SIMPLE_THREADS_SYNC_MICROSEC() usleep(50000)
+
+TEST_F(CAmCommandSenderCAPITest, onNumberOfMainConnectionsChangedEventTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ MockNotificationsClient mock;
+ auto subscription = env->mProxy->getNumberOfMainConnectionsChangedEvent().subscribe(std::bind(&MockNotificationsClient::onNumberOfMainConnectionsChangedEvent, std::ref(mock)));
+ EXPECT_CALL(mock, onNumberOfMainConnectionsChangedEvent());
+ am_MainConnectionType_s mainConnection;
+ env->mpPlugin->cbNewMainConnection(mainConnection);
+ SIMPLE_THREADS_SYNC_MICROSEC();
+ env->mProxy->getNumberOfMainConnectionsChangedEvent().unsubscribe(subscription);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+TEST_F(CAmCommandSenderCAPITest, onNumberOfSourceClassesChangedEventTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ MockNotificationsClient mock;
+ auto subscription = env->mProxy->getNumberOfSourceClassesChangedEvent().subscribe(
+ std::bind(&MockNotificationsClient::onNumberOfSourceClassesChangedEvent, std::ref(mock)));
+ EXPECT_CALL(mock, onNumberOfSourceClassesChangedEvent());
+ env->mpPlugin->cbNumberOfSourceClassesChanged();
+ SIMPLE_THREADS_SYNC_MICROSEC();
+ env->mProxy->getNumberOfMainConnectionsChangedEvent().unsubscribe(subscription);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+TEST_F(CAmCommandSenderCAPITest, onMainConnectionStateChangedEventTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ MockNotificationsClient mock;
+ auto subscription = env->mProxy->getMainConnectionStateChangedEvent().subscribe(std::bind(&MockNotificationsClient::onMainConnectionStateChangedEvent, std::ref(mock),
+ std::placeholders::_1, std::placeholders::_2));
+ EXPECT_CALL(mock, onMainConnectionStateChangedEvent(101, CommandInterface::am_ConnectionState_e::CS_SUSPENDED));
+ env->mpPlugin->cbMainConnectionStateChanged(101, CS_SUSPENDED);
+ SIMPLE_THREADS_SYNC_MICROSEC();
+ env->mProxy->getMainConnectionStateChangedEvent().unsubscribe(subscription);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+TEST_F(CAmCommandSenderCAPITest, onSourceAddedEventTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ MockNotificationsClient mock;
+ auto subscription = env->mProxy->getSourceAddedEvent().subscribe(std::bind(&MockNotificationsClient::onSourceAddedEvent, std::ref(mock),
+ std::placeholders::_1));
+ CommandInterface::am_SourceType_s destination;
+ destination.sourceID = 100;
+ destination.name = "Name";
+ destination.availability.availability = CommandInterface::am_Availablility_e::A_MAX;
+ destination.availability.availabilityReason = CommandInterface::am_AvailabilityReason_e::AR_MAX;
+ destination.sourceClassID = 200;
+
+ am_SourceType_s origin;
+ origin.sourceID = 100;
+ origin.name = "Name";
+ origin.availability.availability = A_MAX;
+ origin.availability.availabilityReason = AR_MAX;
+ origin.sourceClassID = 200;
+ EXPECT_CALL(mock, onSourceAddedEvent(destination));
+ env->mpPlugin->cbNewSource(origin);
+ SIMPLE_THREADS_SYNC_MICROSEC();
+ env->mProxy->getSourceAddedEvent().unsubscribe(subscription);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+TEST_F(CAmCommandSenderCAPITest, onSourceRemovedEventTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ MockNotificationsClient mock;
+ auto subscription = env->mProxy->getSourceRemovedEvent().subscribe(std::bind(&MockNotificationsClient::onSourceRemovedEvent, std::ref(mock),
+ std::placeholders::_1));
+ am_sourceID_t source = 101;
+ EXPECT_CALL(mock, onSourceRemovedEvent(source));
+ env->mpPlugin->cbRemovedSource(source);
+ SIMPLE_THREADS_SYNC_MICROSEC();
+ env->mProxy->getSourceRemovedEvent().unsubscribe(subscription);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+TEST_F(CAmCommandSenderCAPITest, onMainSourceSoundPropertyChangedEventTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ MockNotificationsClient mock;
+ auto subscription = env->mProxy->getMainSourceSoundPropertyChangedEvent().subscribe(std::bind(&MockNotificationsClient::onMainSourceSoundPropertyChangedEvent, std::ref(mock),
+ std::placeholders::_1, std::placeholders::_2));
+
+ am_MainSoundProperty_s soundProperty;
+ soundProperty.value = 10;
+ soundProperty.type = am_MainSoundPropertyType_e::MSP_MAX;
+
+ CommandInterface::am_MainSoundProperty_s destination(CommandInterface::am_MainSoundPropertyType_e::MSP_MAX, 10);
+
+ EXPECT_CALL(mock, onMainSourceSoundPropertyChangedEvent(101, destination));
+ env->mpPlugin->cbMainSourceSoundPropertyChanged(101, soundProperty);
+ SIMPLE_THREADS_SYNC_MICROSEC();
+ env->mProxy->getMainSourceSoundPropertyChangedEvent().unsubscribe(subscription);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+TEST_F(CAmCommandSenderCAPITest, onSourceAvailabilityChangedEventTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ MockNotificationsClient mock;
+ auto subscription = env->mProxy->getSourceAvailabilityChangedEvent().subscribe(std::bind(&MockNotificationsClient::onSourceAvailabilityChangedEvent, std::ref(mock),
+ std::placeholders::_1, std::placeholders::_2));
+
+ am_Availability_s availability;
+ availability.availability = A_MAX;
+ availability.availabilityReason = AR_MAX;
+
+ CommandInterface::am_Availability_s destination(CommandInterface::am_Availablility_e::A_MAX, CommandInterface::am_AvailabilityReason_e::AR_MAX);
+
+ EXPECT_CALL(mock, onSourceAvailabilityChangedEvent(101, destination));
+ env->mpPlugin->cbSourceAvailabilityChanged(101, availability);
+ SIMPLE_THREADS_SYNC_MICROSEC();
+ env->mProxy->getSourceAvailabilityChangedEvent().unsubscribe(subscription);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+TEST_F(CAmCommandSenderCAPITest, onNumberOfSinkClassesChangedEventTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ MockNotificationsClient mock;
+ auto subscription = env->mProxy->getNumberOfSinkClassesChangedEvent().subscribe(std::bind(&MockNotificationsClient::onNumberOfSinkClassesChangedEvent, std::ref(mock)));
+ EXPECT_CALL(mock, onNumberOfSinkClassesChangedEvent());
+ env->mpPlugin->cbNumberOfSinkClassesChanged();
+ SIMPLE_THREADS_SYNC_MICROSEC();
+ env->mProxy->getNumberOfSinkClassesChangedEvent().unsubscribe(subscription);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+TEST_F(CAmCommandSenderCAPITest, onSinkAddedEventTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ MockNotificationsClient mock;
+ auto subscription = env->mProxy->getSinkAddedEvent().subscribe(std::bind(&MockNotificationsClient::onSinkAddedEvent, std::ref(mock),
+ std::placeholders::_1));
+ CommandInterface::am_SinkType_s destination;
+ destination.sinkID = 100;
+ destination.name = "Name";
+ destination.availability.availability = CommandInterface::am_Availablility_e::A_MAX;
+ destination.availability.availabilityReason = CommandInterface::am_AvailabilityReason_e::AR_MAX;
+ destination.muteState = CommandInterface::am_MuteState_e::MS_MAX;
+ destination.volume = 1;
+ destination.sinkClassID = 100;
+
+ am_SinkType_s origin;
+ origin.sinkID = 100;
+ origin.name = "Name";
+ origin.availability.availability = A_MAX;
+ origin.availability.availabilityReason = AR_MAX;
+ origin.muteState = am_MuteState_e::MS_MAX;
+ origin.volume = 1;
+ origin.sinkClassID = 100;
+
+ EXPECT_CALL(mock, onSinkAddedEvent(destination));
+ env->mpPlugin->cbNewSink(origin);
+ SIMPLE_THREADS_SYNC_MICROSEC();
+ env->mProxy->getSinkAddedEvent().unsubscribe(subscription);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+TEST_F(CAmCommandSenderCAPITest, onSinkRemovedEventTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ MockNotificationsClient mock;
+ auto subscription = env->mProxy->getSinkRemovedEvent().subscribe(std::bind(&MockNotificationsClient::onSinkRemovedEvent, std::ref(mock),
+ std::placeholders::_1));
+ EXPECT_CALL(mock, onSinkRemovedEvent(101));
+ env->mpPlugin->cbRemovedSink(101);
+ SIMPLE_THREADS_SYNC_MICROSEC();
+ env->mProxy->getSinkRemovedEvent().unsubscribe(subscription);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+TEST_F(CAmCommandSenderCAPITest, onMainSinkSoundPropertyChangedEventTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ MockNotificationsClient mock;
+ auto subscription = env->mProxy->getMainSinkSoundPropertyChangedEvent().subscribe(std::bind(&MockNotificationsClient::onMainSinkSoundPropertyChangedEvent, std::ref(mock),
+ std::placeholders::_1, std::placeholders::_2));
+
+ am_MainSoundProperty_s soundProperty;
+ soundProperty.value = 10;
+ soundProperty.type = am_MainSoundPropertyType_e::MSP_MAX;
+
+ CommandInterface::am_MainSoundProperty_s destination(CommandInterface::am_MainSoundPropertyType_e::MSP_MAX, 10);
+
+ EXPECT_CALL(mock, onMainSinkSoundPropertyChangedEvent(101, destination));
+ env->mpPlugin->cbMainSinkSoundPropertyChanged(101, soundProperty);
+ SIMPLE_THREADS_SYNC_MICROSEC();
+ env->mProxy->getMainSinkSoundPropertyChangedEvent().unsubscribe(subscription);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+TEST_F(CAmCommandSenderCAPITest, onSinkAvailabilityChangedEventTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ MockNotificationsClient mock;
+ auto subscription = env->mProxy->getSinkAvailabilityChangedEvent().subscribe(std::bind(&MockNotificationsClient::onSinkAvailabilityChangedEvent, std::ref(mock),
+ std::placeholders::_1, std::placeholders::_2));
+
+ am_Availability_s availability;
+ availability.availability = A_MAX;
+ availability.availabilityReason = AR_MAX;
+
+ CommandInterface::am_Availability_s destination(CommandInterface::am_Availablility_e::A_MAX, CommandInterface::am_AvailabilityReason_e::AR_MAX);
+
+ EXPECT_CALL(mock, onSinkAvailabilityChangedEvent(101, destination));
+ env->mpPlugin->cbSinkAvailabilityChanged(101, availability);
+ SIMPLE_THREADS_SYNC_MICROSEC();
+ env->mProxy->getSinkAvailabilityChangedEvent().unsubscribe(subscription);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+TEST_F(CAmCommandSenderCAPITest, onVolumeChangedEventTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ MockNotificationsClient mock;
+ auto subscription = env->mProxy->getVolumeChangedEvent().subscribe(std::bind(&MockNotificationsClient::onVolumeChangedEvent, std::ref(mock),
+ std::placeholders::_1, std::placeholders::_2));
+ EXPECT_CALL(mock, onVolumeChangedEvent(101, 4));
+ env->mpPlugin->cbVolumeChanged(101, 4);
+ SIMPLE_THREADS_SYNC_MICROSEC();
+ env->mProxy->getVolumeChangedEvent().unsubscribe(subscription);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+TEST_F(CAmCommandSenderCAPITest, onSinkMuteStateChangedEventTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ MockNotificationsClient mock;
+ auto subscription = env->mProxy->getSinkMuteStateChangedEvent().subscribe(std::bind(&MockNotificationsClient::onSinkMuteStateChangedEvent, std::ref(mock),
+ std::placeholders::_1, std::placeholders::_2));
+ EXPECT_CALL(mock, onSinkMuteStateChangedEvent(101, CommandInterface::am_MuteState_e::MS_MAX));
+ env->mpPlugin->cbSinkMuteStateChanged(101, am_MuteState_e::MS_MAX);
+ SIMPLE_THREADS_SYNC_MICROSEC();
+ env->mProxy->getSinkMuteStateChangedEvent().unsubscribe(subscription);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+TEST_F(CAmCommandSenderCAPITest, onSystemPropertyChangedEventTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ MockNotificationsClient mock;
+ auto subscription = env->mProxy->getSystemPropertyChangedEvent().subscribe(std::bind(&MockNotificationsClient::onSystemPropertyChangedEvent, std::ref(mock),
+ std::placeholders::_1));
+
+ CommandInterface::am_SystemProperty_s value(CommandInterface::am_SystemPropertyType_e::SYP_UNKNOWN, (const int16_t)2);
+ am_SystemProperty_s systemProperty;
+ systemProperty.value = 2;
+ systemProperty.type = am_SystemPropertyType_e::SYP_UNKNOWN;
+
+ EXPECT_CALL(mock, onSystemPropertyChangedEvent(value));
+ env->mpPlugin->cbSystemPropertyChanged(systemProperty);
+ SIMPLE_THREADS_SYNC_MICROSEC();
+ env->mProxy->getSystemPropertyChangedEvent().unsubscribe(subscription);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+TEST_F(CAmCommandSenderCAPITest, onTimingInformationChangedEventTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ MockNotificationsClient mock;
+ auto subscription = env->mProxy->getTimingInformationChangedEvent().subscribe(std::bind(&MockNotificationsClient::onTimingInformationChangedEvent, std::ref(mock),
+ std::placeholders::_1, std::placeholders::_2));
+
+ EXPECT_CALL(mock, onTimingInformationChangedEvent(1, 2));
+ env->mpPlugin->cbTimingInformationChanged(1, 2);
+ SIMPLE_THREADS_SYNC_MICROSEC();
+ env->mProxy->getTimingInformationChangedEvent().unsubscribe(subscription);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+TEST_F(CAmCommandSenderCAPITest, onSinkUpdatedEventTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ MockNotificationsClient mock;
+ auto subscription = env->mProxy->getSinkUpdatedEvent().subscribe(std::bind(&MockNotificationsClient::onSinkUpdatedEvent, std::ref(mock),
+ std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
+ std::vector<am_MainSoundProperty_s> listMainSoundProperties;
+ am_MainSoundProperty_s prop;
+ prop.value = 1;
+ prop.type = am_MainSoundPropertyType_e::MSP_MAX;
+ listMainSoundProperties.push_back(prop);
+ EXPECT_CALL(mock, onSinkUpdatedEvent(1, 2, _));
+ env->mpPlugin->cbSinkUpdated(1, 2, listMainSoundProperties);
+ SIMPLE_THREADS_SYNC_MICROSEC();
+ env->mProxy->getSinkUpdatedEvent().unsubscribe(subscription);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+TEST_F(CAmCommandSenderCAPITest, onSourceUpdatedTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ MockNotificationsClient mock;
+ auto subscription = env->mProxy->getSourceUpdatedEvent().subscribe(std::bind(&MockNotificationsClient::onSourceUpdatedEvent, std::ref(mock),
+ std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
+ std::vector<am_MainSoundProperty_s> listMainSoundProperties;
+ am_MainSoundProperty_s prop;
+ prop.value = 1;
+ prop.type = am_MainSoundPropertyType_e::MSP_MAX;
+ listMainSoundProperties.push_back(prop);
+ EXPECT_CALL(mock, onSourceUpdatedEvent(1, 2, _));
+ env->mpPlugin->cbSourceUpdated(1, 2, listMainSoundProperties);
+ SIMPLE_THREADS_SYNC_MICROSEC();
+ env->mProxy->getSourceUpdatedEvent().unsubscribe(subscription);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+TEST_F(CAmCommandSenderCAPITest, onSinkNotificationEventTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ MockNotificationsClient mock;
+ auto subscription = env->mProxy->getSinkNotificationEvent().subscribe(std::bind(&MockNotificationsClient::onSinkNotificationEvent, std::ref(mock),
+ std::placeholders::_1, std::placeholders::_2));
+ am_NotificationPayload_s orig;
+ orig.type = am_NotificationType_e::NT_MAX;
+ orig.value = 1;
+ CommandInterface::am_NotificationPayload_s dest;
+ dest.type = org::genivi::audiomanager::am::am_NotificationType_e::NT_MAX;
+ dest.value = 1;
+
+ EXPECT_CALL(mock, onSinkNotificationEvent(1, dest));
+ env->mpPlugin->cbSinkNotification(1, orig);
+ SIMPLE_THREADS_SYNC_MICROSEC();
+ env->mProxy->getSinkNotificationEvent().unsubscribe(subscription);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+
+TEST_F(CAmCommandSenderCAPITest, onSourceNotificationEventTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ MockNotificationsClient mock;
+ auto subscription = env->mProxy->getSourceNotificationEvent().subscribe(std::bind(&MockNotificationsClient::onSourceNotificationEvent, std::ref(mock),
+ std::placeholders::_1, std::placeholders::_2));
+ am_NotificationPayload_s orig;
+ orig.type = am_NotificationType_e::NT_MAX;
+ orig.value = 1;
+ CommandInterface::am_NotificationPayload_s dest;
+ dest.type = org::genivi::audiomanager::am::am_NotificationType_e::NT_MAX;
+ dest.value = 1;
+
+ EXPECT_CALL(mock, onSourceNotificationEvent(1, dest));
+ env->mpPlugin->cbSourceNotification(1, orig);
+ SIMPLE_THREADS_SYNC_MICROSEC();
+ env->mProxy->getSourceNotificationEvent().unsubscribe(subscription);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+TEST_F(CAmCommandSenderCAPITest, onMainSinkNotificationConfigurationChangedEventTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ MockNotificationsClient mock;
+ auto subscription = env->mProxy->getMainSinkNotificationConfigurationChangedEvent().subscribe(std::bind(&MockNotificationsClient::onMainSinkNotificationConfigurationChangedEvent, std::ref(mock),
+ std::placeholders::_1, std::placeholders::_2));
+ am_NotificationConfiguration_s orig;
+ orig.type = am_NotificationType_e::NT_MAX;
+ orig.parameter = 1;
+ orig.status = am_NotificationStatus_e::NS_MAX;
+ org::genivi::audiomanager::am::am_NotificationConfiguration_s dest;
+ dest.type = org::genivi::audiomanager::am::am_NotificationType_e::NT_MAX;
+ dest.parameter = 1;
+ dest.status = org::genivi::audiomanager::am::am_NotificationStatus_e::NS_MAX;
+
+ EXPECT_CALL(mock, onMainSinkNotificationConfigurationChangedEvent(1, dest));
+ env->mpPlugin->cbMainSinkNotificationConfigurationChanged(1, orig);
+ SIMPLE_THREADS_SYNC_MICROSEC();
+ env->mProxy->getMainSinkNotificationConfigurationChangedEvent().unsubscribe(subscription);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
+TEST_F(CAmCommandSenderCAPITest, onMainSourceNotificationConfigurationChangedEventTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ MockNotificationsClient mock;
+ auto subscription = env->mProxy->getMainSourceNotificationConfigurationChangedEvent().subscribe(std::bind(&MockNotificationsClient::onMainSourceNotificationConfigurationChangedEvent, std::ref(mock),
+ std::placeholders::_1, std::placeholders::_2));
+ am_NotificationConfiguration_s orig;
+ orig.type = am_NotificationType_e::NT_MAX;
+ orig.parameter = 1;
+ orig.status = am_NotificationStatus_e::NS_MAX;
+ org::genivi::audiomanager::am::am_NotificationConfiguration_s dest;
+ dest.type = org::genivi::audiomanager::am::am_NotificationType_e::NT_MAX;
+ dest.parameter = 1;
+ dest.status = org::genivi::audiomanager::am::am_NotificationStatus_e::NS_MAX;
+
+ EXPECT_CALL(mock, onMainSourceNotificationConfigurationChangedEvent(1, dest));
+ env->mpPlugin->cbMainSourceNotificationConfigurationChanged(1, orig);
+ SIMPLE_THREADS_SYNC_MICROSEC();
+ env->mProxy->getMainSourceNotificationConfigurationChangedEvent().unsubscribe(subscription);
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive));
+}
+
diff --git a/PluginCommandInterfaceCAPI/test/CAmCommandSenderCAPITest.h b/PluginCommandInterfaceCAPI/test/CAmCommandSenderCAPITest.h
new file mode 100644
index 0000000..21aafe8
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/test/CAmCommandSenderCAPITest.h
@@ -0,0 +1,77 @@
+/**
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
+#ifndef COMMANDPLUGININTERFACETEST_H_
+#define COMMANDPLUGININTERFACETEST_H_
+
+#include "gtest/gtest.h"
+#include "gmock/gmock.h"
+#include "shared/CAmSocketHandler.h"
+#include "CAmTestCAPIWrapper.h"
+#include "../include/CAmCommandSenderCAPI.h"
+#include "MockIAmCommandReceive.h"
+#include <../src-gen/org/genivi/audiomanager/CommandInterfaceProxy.h>
+
+#define UNIT_TEST 1
+
+using namespace testing;
+using namespace CommonAPI;
+namespace am {
+
+class CAmCommandSenderDbusBackdoor;
+class IAmCommandSend;
+
+class CAmTestsEnvironment : public ::testing::Environment
+{
+ pthread_t mListenerThread;
+ pthread_t mServicePThread;
+ pthread_t mClientPThread;
+
+public:
+ CAmSocketHandler *mSocketHandlerService;
+ CAmSocketHandler *mSocketHandlerClient;
+ bool mIsProxyInitilized;
+ bool mIsServiceAvailable;
+ MockIAmCommandReceive *mpCommandReceive;
+ CAmCommandSenderCAPI *mpPlugin;
+
+ std::shared_ptr<CommandInterfaceProxy<> > mProxy;
+
+ CAmTestsEnvironment();
+ ~CAmTestsEnvironment();
+ void SetUp();
+ // Override this to define how to tear down the environment.
+ void TearDown();
+ void onServiceStatusEvent(const CommonAPI::AvailabilityStatus& serviceStatus);
+};
+
+
+class CAmCommandSenderCAPITest :public ::testing::Test
+{
+
+public:
+ CAmCommandSenderCAPITest();
+ ~CAmCommandSenderCAPITest();
+
+ void SetUp();
+ void TearDown();
+
+};
+
+}
+
+#endif /* COMMANDPLUGININTERFACETEST_H_ */
diff --git a/PluginCommandInterfaceCAPI/test/CAmTestCAPIWrapper.cpp b/PluginCommandInterfaceCAPI/test/CAmTestCAPIWrapper.cpp
new file mode 100644
index 0000000..6134d62
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/test/CAmTestCAPIWrapper.cpp
@@ -0,0 +1,31 @@
+/**
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
+#include "CAmTestCAPIWrapper.h"
+
+namespace am {
+
+CAmTestCAPIWrapper::CAmTestCAPIWrapper(CAmSocketHandler* socketHandler):CAmCommonAPIWrapper(socketHandler)
+{
+
+}
+
+CAmTestCAPIWrapper::~CAmTestCAPIWrapper() {
+ // TODO Auto-generated destructor stub
+}
+
+} /* namespace am */
diff --git a/PluginCommandInterfaceCAPI/test/CAmTestCAPIWrapper.h b/PluginCommandInterfaceCAPI/test/CAmTestCAPIWrapper.h
new file mode 100644
index 0000000..90499f9
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/test/CAmTestCAPIWrapper.h
@@ -0,0 +1,32 @@
+/**
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
+#ifndef CAMTESTCAPIWRAPPER_H_
+#define CAMTESTCAPIWRAPPER_H_
+
+#include "shared/CAmCommonAPIWrapper.h"
+
+namespace am {
+
+class CAmTestCAPIWrapper: public am::CAmCommonAPIWrapper {
+public:
+ CAmTestCAPIWrapper(CAmSocketHandler* socketHandler);
+ virtual ~CAmTestCAPIWrapper();
+};
+
+} /* namespace am */
+#endif /* CAMTESTCAPIWRAPPER_H_ */
diff --git a/PluginCommandInterfaceCAPI/test/CMakeLists.txt b/PluginCommandInterfaceCAPI/test/CMakeLists.txt
new file mode 100644
index 0000000..acfc1cf
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/test/CMakeLists.txt
@@ -0,0 +1,105 @@
+# Copyright (c) 2012 GENIVI Alliance
+# Copyright (c) 2012 BMW
+#
+# author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+#
+# copyright
+# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+# including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+# subject to the following conditions:
+# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+# THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# For further information see http://www.genivi.org/.
+#
+
+cmake_minimum_required(VERSION 2.6)
+
+PROJECT(CAmCommandSenderCAPITests)
+
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w -g -DUNIT_TEST=1 -DDLT_CONTEXT=AudioManager")
+
+string (REPLACE "-g -Wall -Wextra" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+string (REPLACE "-pedantic" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+
+set(STD_INCLUDE_DIRS "/usr/include")
+set(EXECUTABLE_OUTPUT_PATH ${TEST_EXECUTABLE_OUTPUT_PATH})
+
+FIND_PACKAGE(Threads)
+FIND_PACKAGE(PkgConfig)
+FIND_PACKAGE(PythonLibs REQUIRED)
+pkg_check_modules(PC_COMMON REQUIRED CommonAPI)
+pkg_check_modules(PC_COMMON_DBUS REQUIRED CommonAPI-DBus)
+
+IF(WITH_DLT)
+ pkg_check_modules(DLT REQUIRED automotive-dlt>=2.2.0)
+ENDIF(WITH_DLT)
+
+INCLUDE_DIRECTORIES(
+ ${STD_INCLUDE_DIRS}
+ ${CMAKE_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${AUDIO_INCLUDE_FOLDER}
+ ${CMAKE_SOURCE_DIR}
+ ${DLT_INCLUDE_DIRS}
+ ${PC_COMMON_INCLUDE_DIRS}
+ ${PC_COMMON_DBUS_INCLUDE_DIRS}
+ ${INCLUDE_FOLDER}
+ ${PYTHON_INCLUDE_DIRS}
+ ${GOOGLE_TEST_INCLUDE_DIR}
+ ${GMOCK_INCLUDE_DIR}
+ "../../AudioManagerDaemon/include"
+ "../include"
+)
+
+link_directories(
+ ${LINK_DIRECTORIES}
+ ${PC_COMMON_LIBRARY_DIRS}
+ ${PC_COMMON_DBUS_LIBRARY_DIRS}
+)
+
+file(GLOB CAPI_PLUGIN_INTERFACE_SRCS_CXX
+ "../../AudioManagerDaemon/src/CAmCommonAPIWrapper.cpp"
+ "../../AudioManagerDaemon/src/CAmSocketHandler.cpp"
+ "../../AudioManagerDaemon/src/CAmDltWrapper.cpp"
+ "../src/*.cpp"
+ "CAmCommandSenderCAPITest.cpp"
+ "CAmTestCAPIWrapper.cpp"
+ "CAmCommandSenderCommon.cpp"
+)
+
+file(GLOB_RECURSE CAPI_PLUGIN_INTERFACE_GEN_SRCS_CXX
+ "../src-gen/*.cpp"
+)
+
+ADD_EXECUTABLE(AmCommandSenderCAPITest ${CAPI_PLUGIN_INTERFACE_SRCS_CXX} ${CAPI_PLUGIN_INTERFACE_GEN_SRCS_CXX})
+
+TARGET_LINK_LIBRARIES(AmCommandSenderCAPITest
+ ${DLT_LIBRARIES}
+ ${DBUS_LIBRARY}
+ ${CMAKE_DL_LIBS}
+ ${CMAKE_THREAD_LIBS_INIT}
+ ${PYTHON_LIBRARY}
+ ${PC_GSTREAMER_LIBRARIES}
+ ${PC_COMMON_LIBRARIES}
+ ${PC_COMMON_DBUS_LIBRARIES}
+ gtest
+ gmock
+)
+
+CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/PluginCommandInterfaceCAPI/fidl/PluginCommandInterfaceCAPI_dbus.conf ${EXECUTABLE_OUTPUT_PATH}/AmCommandSenderCAPITest_dbus.conf)
+
+INSTALL(TARGETS AmCommandSenderCAPITest
+ DESTINATION "~/AudioManagerTest/"
+ PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ
+ COMPONENT tests
+)
+
+#execute_process(
+# COMMAND cp "${CMAKE_SOURCE_DIR}/PluginCommandInterfaceCAPI/fidls/PluginCommandInterfaceCAPI_dbus.conf" ${EXECUTABLE_OUTPUT_PATH})
+
+SET(ADD_DEPEND "audiomanager-bin" "sqlite3(>=3.6.22)" "dlt" "gtest" "libpthread-stubs0")
+set_property(GLOBAL APPEND PROPERTY tests_prop "${ADD_DEPEND}")
+
diff --git a/PluginCommandInterfaceCAPI/test/MockIAmCommandReceive.h b/PluginCommandInterfaceCAPI/test/MockIAmCommandReceive.h
new file mode 100644
index 0000000..23524e1
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/test/MockIAmCommandReceive.h
@@ -0,0 +1,86 @@
+/**
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
+#ifndef MOCKCOMMANDRECEIVENTERFACE_H_
+#define MOCKCOMMANDRECEIVENTERFACE_H_
+
+#include "command/IAmCommandReceive.h"
+#include "gtest/gtest.h"
+#include "gmock/gmock.h"
+
+namespace am {
+
+class MockIAmCommandReceive : public IAmCommandReceive {
+ public:
+ MOCK_CONST_METHOD1(getInterfaceVersion,
+ void(std::string& version));
+ MOCK_METHOD3(connect,
+ am_Error_e(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID));
+ MOCK_METHOD1(disconnect,
+ am_Error_e(const am_mainConnectionID_t mainConnectionID));
+ MOCK_METHOD2(setVolume,
+ am_Error_e(const am_sinkID_t sinkID, const am_mainVolume_t volume));
+ MOCK_METHOD2(volumeStep,
+ am_Error_e(const am_sinkID_t sinkID, const int16_t volumeStep));
+ MOCK_METHOD2(setSinkMuteState,
+ am_Error_e(const am_sinkID_t sinkID, const am_MuteState_e muteState));
+ MOCK_METHOD2(setMainSinkSoundProperty,
+ am_Error_e(const am_MainSoundProperty_s& soundProperty, const am_sinkID_t sinkID));
+ MOCK_METHOD2(setMainSourceSoundProperty,
+ am_Error_e(const am_MainSoundProperty_s& soundProperty, const am_sourceID_t sourceID));
+ MOCK_METHOD1(setSystemProperty,
+ am_Error_e(const am_SystemProperty_s& property));
+ MOCK_CONST_METHOD1(getListMainConnections,
+ am_Error_e(std::vector<am_MainConnectionType_s>& listConnections));
+ MOCK_CONST_METHOD1(getListMainSinks,
+ am_Error_e(std::vector<am_SinkType_s>& listMainSinks));
+ MOCK_CONST_METHOD1(getListMainSources,
+ am_Error_e(std::vector<am_SourceType_s>& listMainSources));
+ MOCK_CONST_METHOD2(getListMainSinkSoundProperties,
+ am_Error_e(const am_sinkID_t sinkID, std::vector<am_MainSoundProperty_s>& listSoundProperties));
+ MOCK_CONST_METHOD2(getListMainSourceSoundProperties,
+ am_Error_e(const am_sourceID_t sourceID, std::vector<am_MainSoundProperty_s>& listSourceProperties));
+ MOCK_CONST_METHOD1(getListSourceClasses,
+ am_Error_e(std::vector<am_SourceClass_s>& listSourceClasses));
+ MOCK_CONST_METHOD1(getListSinkClasses,
+ am_Error_e(std::vector<am_SinkClass_s>& listSinkClasses));
+ MOCK_CONST_METHOD1(getListSystemProperties,
+ am_Error_e(std::vector<am_SystemProperty_s>& listSystemProperties));
+ MOCK_CONST_METHOD2(getTimingInformation,
+ am_Error_e(const am_mainConnectionID_t mainConnectionID, am_timeSync_t& delay));
+ MOCK_CONST_METHOD1(getDBusConnectionWrapper,
+ am_Error_e(CAmDbusWrapper*& dbusConnectionWrapper));
+ MOCK_CONST_METHOD1(getSocketHandler,
+ am_Error_e(CAmSocketHandler*& socketHandler));
+ MOCK_METHOD2(confirmCommandReady,
+ void(const uint16_t handle, const am_Error_e error));
+ MOCK_METHOD2(confirmCommandRundown,
+ void(const uint16_t handle, const am_Error_e error));
+ MOCK_CONST_METHOD2(getListMainSinkNotificationConfigurations,
+ am_Error_e(const am_sinkID_t sinkID, std::vector<am_NotificationConfiguration_s>& listMainNotificationConfigurations));
+ MOCK_CONST_METHOD2(getListMainSourceNotificationConfigurations,
+ am_Error_e(const am_sourceID_t sourceID, std::vector<am_NotificationConfiguration_s>& listMainNotificationConfigurations));
+ MOCK_METHOD2(setMainSinkNotificationConfiguration,
+ am_Error_e(const am_sinkID_t sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration));
+ MOCK_METHOD2(setMainSourceNotificationConfiguration,
+ am_Error_e(const am_sourceID_t sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration));
+
+
+};
+
+} // namespace am
+#endif /* MOCKCOMMANDRECEIVENTERFACE_H_ */
diff --git a/PluginCommandInterfaceCAPI/test/MockNotificationsClient.h b/PluginCommandInterfaceCAPI/test/MockNotificationsClient.h
new file mode 100644
index 0000000..8ab2e5e
--- /dev/null
+++ b/PluginCommandInterfaceCAPI/test/MockNotificationsClient.h
@@ -0,0 +1,110 @@
+/**
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
+
+#ifndef MOCKNOTIFICATIONSCLIENT_H_
+#define MOCKNOTIFICATIONSCLIENT_H_
+
+#include "gtest/gtest.h"
+#include "gmock/gmock.h"
+#include <org/genivi/audiomanager/CommandInterfaceStubDefault.h>
+
+
+namespace am {
+using namespace testing;
+using namespace CommonAPI;
+using namespace org::genivi::audiomanager;
+
+class IAmNotificationsClient
+{
+public:
+ IAmNotificationsClient()
+ {}
+
+ virtual ~IAmNotificationsClient()
+ {}
+ virtual void onNumberOfMainConnectionsChangedEvent() = 0;
+ virtual void onNumberOfSourceClassesChangedEvent() = 0;
+ virtual void onMainConnectionStateChangedEvent(CommandInterface::am_mainConnectionID_t, CommandInterface::am_ConnectionState_e) = 0;
+ virtual void onSourceAddedEvent(const CommandInterface::am_SourceType_s &) = 0;
+ virtual void onSourceRemovedEvent(CommandInterface::am_sourceID_t) = 0;
+ virtual void onMainSourceSoundPropertyChangedEvent(CommandInterface::am_sourceID_t, const CommandInterface::am_MainSoundProperty_s & ) = 0;
+ virtual void onSourceAvailabilityChangedEvent(CommandInterface::am_sourceID_t, const CommandInterface::am_Availability_s &) = 0;
+ virtual void onNumberOfSinkClassesChangedEvent() = 0;
+ virtual void onSinkAddedEvent(const CommandInterface::am_SinkType_s &) = 0;
+ virtual void onSinkRemovedEvent(CommandInterface::am_sinkID_t) = 0;
+ virtual void onMainSinkSoundPropertyChangedEvent(CommandInterface::am_sinkID_t, const CommandInterface::am_MainSoundProperty_s &) = 0;
+ virtual void onSinkAvailabilityChangedEvent(CommandInterface::am_sinkID_t, const CommandInterface::am_Availability_s &) = 0;
+ virtual void onVolumeChangedEvent(CommandInterface::am_sinkID_t, CommandInterface::am_mainVolume_t) = 0;
+ virtual void onSinkMuteStateChangedEvent(CommandInterface::am_sinkID_t, CommandInterface::am_MuteState_e) = 0;
+ virtual void onSystemPropertyChangedEvent(const CommandInterface::am_SystemProperty_s &) = 0;
+ virtual void onTimingInformationChangedEvent(CommandInterface::am_mainConnectionID_t, CommandInterface::am_timeSync_t) = 0;
+ virtual void onSinkUpdatedEvent(CommandInterface::am_sinkID_t, CommandInterface::am_sinkClass_t, const CommandInterface::am_MainSoundProperty_l &) = 0;
+ virtual void onSourceUpdatedEvent(CommandInterface::am_sourceID_t, CommandInterface::am_sourceClass_t, const CommandInterface::am_MainSoundProperty_l &) = 0;
+ virtual void onSinkNotificationEvent(CommandInterface::am_sinkID_t, const CommandInterface::am_NotificationPayload_s & ) = 0;
+ virtual void onSourceNotificationEvent(CommandInterface::am_sourceID_t, const CommandInterface::am_NotificationPayload_s &) = 0;
+ virtual void onMainSinkNotificationConfigurationChangedEvent(CommandInterface::am_sinkID_t, const org::genivi::audiomanager::am::am_NotificationConfiguration_s &) = 0;
+ virtual void onMainSourceNotificationConfigurationChangedEvent(CommandInterface::am_sourceID_t, const org::genivi::audiomanager::am::am_NotificationConfiguration_s &) = 0;
+};
+
+class MockNotificationsClient : public IAmNotificationsClient {
+ public:
+ MOCK_METHOD0(onNumberOfMainConnectionsChangedEvent,
+ void());
+ MOCK_METHOD0(onNumberOfSourceClassesChangedEvent, void());
+ MOCK_METHOD2(onMainConnectionStateChangedEvent,
+ void(CommandInterface::am_mainConnectionID_t mcID, CommandInterface::am_ConnectionState_e cs));
+ MOCK_METHOD1(onSourceAddedEvent, void(const CommandInterface::am_SourceType_s & st));
+ MOCK_METHOD1(onSourceRemovedEvent, void(CommandInterface::am_sourceID_t sid));
+ MOCK_METHOD2(onMainSourceSoundPropertyChangedEvent,
+ void(CommandInterface::am_sourceID_t sid, const CommandInterface::am_MainSoundProperty_s & msp) );
+ MOCK_METHOD2(onSourceAvailabilityChangedEvent,
+ void(CommandInterface::am_sourceID_t st, const CommandInterface::am_Availability_s & a) );
+ MOCK_METHOD0(onNumberOfSinkClassesChangedEvent,
+ void());
+ MOCK_METHOD1(onSinkAddedEvent,
+ void(const CommandInterface::am_SinkType_s & st));
+ MOCK_METHOD1(onSinkRemovedEvent,
+ void(CommandInterface::am_sinkID_t sid));
+ MOCK_METHOD2(onMainSinkSoundPropertyChangedEvent,
+ void(CommandInterface::am_sinkID_t sid, const CommandInterface::am_MainSoundProperty_s & msp) );
+ MOCK_METHOD2(onSinkAvailabilityChangedEvent,
+ void(CommandInterface::am_sinkID_t sid, const CommandInterface::am_Availability_s & a) );
+ MOCK_METHOD2(onVolumeChangedEvent,
+ void(CommandInterface::am_sinkID_t sid, CommandInterface::am_mainVolume_t mv) );
+ MOCK_METHOD2(onSinkMuteStateChangedEvent,
+ void(CommandInterface::am_sinkID_t sid, CommandInterface::am_MuteState_e ms) );
+ MOCK_METHOD1(onSystemPropertyChangedEvent,
+ void(const CommandInterface::am_SystemProperty_s & sp));
+ MOCK_METHOD2(onTimingInformationChangedEvent,
+ void(CommandInterface::am_mainConnectionID_t cid, CommandInterface::am_timeSync_t ts) );
+ MOCK_METHOD3(onSinkUpdatedEvent,
+ void(CommandInterface::am_sinkID_t sid, CommandInterface::am_sinkClass_t sc, const CommandInterface::am_MainSoundProperty_l & msp) );
+ MOCK_METHOD3(onSourceUpdatedEvent,
+ void(CommandInterface::am_sourceID_t sid, CommandInterface::am_sourceClass_t sc, const CommandInterface::am_MainSoundProperty_l & msp) );
+ MOCK_METHOD2(onSinkNotificationEvent,
+ void(CommandInterface::am_sinkID_t sid, const CommandInterface::am_NotificationPayload_s & np));
+ MOCK_METHOD2(onSourceNotificationEvent,
+ void(CommandInterface::am_sourceID_t sid, const CommandInterface::am_NotificationPayload_s & np) );
+ MOCK_METHOD2(onMainSinkNotificationConfigurationChangedEvent,
+ void(CommandInterface::am_sinkID_t sid, const org::genivi::audiomanager::am::am_NotificationConfiguration_s & nc) );
+ MOCK_METHOD2(onMainSourceNotificationConfigurationChangedEvent,
+ void(CommandInterface::am_sourceID_t sid, const org::genivi::audiomanager::am::am_NotificationConfiguration_s & nc));
+};
+
+} // namespace am
+#endif /* MOCKCOMMANDRECEIVENTERFACE_H_ */
diff --git a/PluginCommandInterfaceDbus/CMakeLists.txt b/PluginCommandInterfaceDbus/CMakeLists.txt
index a27e02f..5a0015d 100644
--- a/PluginCommandInterfaceDbus/CMakeLists.txt
+++ b/PluginCommandInterfaceDbus/CMakeLists.txt
@@ -60,7 +60,7 @@ INCLUDE_DIRECTORIES(
# all source files go here
file(GLOB PLUGINDBUS_SRCS_CXX "src/*.cpp")
-add_library(PluginCommandInterfaceDbus SHARED ${PLUGINDBUS_SRCS_CXX})
+add_library(PluginCommandInterfaceDbus MODULE ${PLUGINDBUS_SRCS_CXX})
SET_TARGET_PROPERTIES(PluginCommandInterfaceDbus PROPERTIES
SOVERSION "${LIB_INTERFACE_VERSION}"
diff --git a/PluginCommandInterfaceDbus/include/CAmCommandSenderDbus.h b/PluginCommandInterfaceDbus/include/CAmCommandSenderDbus.h
index 4fcce88..dbcee7c 100644
--- a/PluginCommandInterfaceDbus/include/CAmCommandSenderDbus.h
+++ b/PluginCommandInterfaceDbus/include/CAmCommandSenderDbus.h
@@ -42,7 +42,7 @@ const char MY_NODE[] = "commandinterface";
class CAmCommandSenderDbus: public IAmCommandSend
{
public:
- CAmCommandSenderDbus();
+ CAmCommandSenderDbus();
virtual ~CAmCommandSenderDbus();
am_Error_e startupInterface(IAmCommandReceive* commandreceiveinterface);
void setCommandReady(const uint16_t handle);
diff --git a/PluginCommandInterfaceDbus/include/configCommandDbus.h b/PluginCommandInterfaceDbus/include/configCommandDbus.h
index 0c1989d..cfb8443 100644
--- a/PluginCommandInterfaceDbus/include/configCommandDbus.h
+++ b/PluginCommandInterfaceDbus/include/configCommandDbus.h
@@ -1,7 +1,7 @@
#ifndef _COMMANDDBUS_CONFIG_H
#define _COMMANDDBUS_CONFIG_H
-#define COMMAND_DBUS_INTROSPECTION_FILE "/home/genius/workspace/workspace/AudioManager/bin/CommandInterface.xml"
-#define LIBRARY_OUTPUT_PATH "/home/genius/workspace/workspace/AudioManager/bin/plugins/command"
+#define COMMAND_DBUS_INTROSPECTION_FILE "/home/genius/workspace/AudioManager2/bin/CommandInterface.xml"
+#define LIBRARY_OUTPUT_PATH "/home/genius/workspace/AudioManager2/bin/plugins/command"
#endif /* _COMMANDDBUS_CONFIG_H */
diff --git a/PluginControlInterface/CMakeLists.txt b/PluginControlInterface/CMakeLists.txt
index 16b49be..795b778 100644
--- a/PluginControlInterface/CMakeLists.txt
+++ b/PluginControlInterface/CMakeLists.txt
@@ -47,7 +47,7 @@ INCLUDE_DIRECTORIES(
# all source files go here
file(GLOB PLUGIN_CONTROL_SRCS_CXX "src/*.cpp")
-add_library(PluginControlInterface SHARED ${PLUGIN_CONTROL_SRCS_CXX})
+add_library(PluginControlInterface MODULE ${PLUGIN_CONTROL_SRCS_CXX})
SET_TARGET_PROPERTIES(PluginControlInterface PROPERTIES
SOVERSION "${LIB_INTERFACE_VERSION}"
diff --git a/PluginRoutingInterfaceAsync/CMakeLists.txt b/PluginRoutingInterfaceAsync/CMakeLists.txt
index b4cd576..773abe5 100644
--- a/PluginRoutingInterfaceAsync/CMakeLists.txt
+++ b/PluginRoutingInterfaceAsync/CMakeLists.txt
@@ -48,7 +48,7 @@ INCLUDE_DIRECTORIES(
file(GLOB PLUGINDBUS_SRCS_CXX "src/*.cpp")
-add_library(PluginRoutingInterfaceAsync SHARED ${PLUGINDBUS_SRCS_CXX})
+add_library(PluginRoutingInterfaceAsync MODULE ${PLUGINDBUS_SRCS_CXX})
SET_TARGET_PROPERTIES(PluginRoutingInterfaceAsync PROPERTIES
SOVERSION "${LIB_INTERFACE_VERSION}"
diff --git a/PluginRoutingInterfaceAsync/src/CAmRoutingSenderAsync.cpp b/PluginRoutingInterfaceAsync/src/CAmRoutingSenderAsync.cpp
index fed21aa..d6680d5 100644
--- a/PluginRoutingInterfaceAsync/src/CAmRoutingSenderAsync.cpp
+++ b/PluginRoutingInterfaceAsync/src/CAmRoutingSenderAsync.cpp
@@ -694,20 +694,21 @@ std::vector<am_Source_s> CAmRoutingSenderAsync::createSourceTable()
//create a bunch full of sources
std::vector<am_Source_s> table;
am_Source_s item;
+ item.listConnectionFormats.push_back(CF_GENIVI_ANALOG);
+ item.sourceClassID = 1;
+ item.volume = 0;
+ item.visible = true;
+ item.available.availability = A_AVAILABLE;
+ item.available.availabilityReason = AR_UNKNOWN;
+ item.sourceState = SS_OFF;
+ item.interruptState = am_InterruptState_e::IS_OFF;
+ item.domainID = 0; //we cannot know this when the table is created !
for (int16_t i = 0; i <= 10; i++)
{
std::stringstream temp;
temp << i;
- item.domainID = 0; //we cannot know this when the table is created !
item.name = "mySource" + temp.str();
- item.sourceState = SS_OFF;
item.sourceID = i; //take fixed ids to make thins easy
- item.sourceClassID = 1;
- item.volume = 0;
- item.visible = true;
- item.available.availability = A_AVAILABLE;
- item.available.availabilityReason = AR_UNKNOWN;
- item.listConnectionFormats.push_back(CF_GENIVI_ANALOG);
table.push_back(item);
}
return (table);
diff --git a/PluginRoutingInterfaceCAPI/CMakeLists.txt b/PluginRoutingInterfaceCAPI/CMakeLists.txt
new file mode 100644
index 0000000..cceb786
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/CMakeLists.txt
@@ -0,0 +1,97 @@
+# Copyright (c) 2012 GENIVI Alliance
+# Copyright (c) 2012 BMW
+#
+# author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+#
+# copyright
+# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+# including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+# subject to the following conditions:
+# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+# THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# For further information see http://www.genivi.org/.
+#
+cmake_minimum_required(VERSION 2.6)
+
+PROJECT(PluginRoutingInterfaceCAPI)
+
+OPTION(WITH_ROUTING_INTERFACE_CAPI
+ "build with routing iterface common-api plugin" ON)
+
+IF(WITH_ROUTING_INTERFACE_CAPI AND WITH_CAPI_WRAPPER)
+
+set(LIBRARY_OUTPUT_PATH ${PLUGINS_OUTPUT_PATH}/routing)
+set(DOC_OUTPUT_PATH ${DOC_OUTPUT_PATH}/RoutingPlugin)
+set(INCLUDE_FOLDER "include")
+
+SET(SHARED_FOLDER "${CMAKE_INSTALL_PREFIX}/share")
+FILE(READ "${AUDIO_INCLUDE_FOLDER}/routing/IAmRoutingSend.h" VERSION_BUFFER LIMIT 6000)
+STRING(REGEX MATCH "RoutingSendVersion*.[^0-9]*[0-9].[0-9]*[0-9]" LIB_INTERFACE_VERSION_STRING ${VERSION_BUFFER})
+STRING(REGEX REPLACE "RoutingSendVersion*.." "" LIB_INTERFACE_VERSION ${LIB_INTERFACE_VERSION_STRING})
+MESSAGE(STATUS "Building against routing interface version ${LIB_INTERFACE_VERSION}")
+
+INSERT_DBUS_CONF_IF_NEEDED("@ROUTING_INTERFACE_DBUS_CONF@"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fidl/PluginRoutingInterfaceCAPI_dbus.conf"
+ ROUTING_INTERFACE_DBUS_CONF)
+
+set(ROUTING_INTERFACE_DBUS_CONF ${ROUTING_INTERFACE_DBUS_CONF} PARENT_SCOPE)
+
+
+CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/config.cmake ${CMAKE_CURRENT_SOURCE_DIR}/include/configRoutingCAPI.h )
+
+FIND_PACKAGE(CommonAPI REQUIRED)
+FIND_PACKAGE(CommonAPI_DBus REQUIRED)
+
+INCLUDE_DIRECTORIES(
+ ${CMAKE_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${AUDIO_INCLUDE_FOLDER}
+ ${PROJECT_INCLUDE_FOLDER}
+ ${COMMON_API_INCLUDE_DIRS}
+ ${COMMON_API_DBUS_INCLUDE_DIRS}
+ ${COMMON_API_GEN_INCLUDE_DIR}
+ ${INCLUDE_FOLDER}
+)
+
+# all source files go here
+file(GLOB PLUGINCAPI_SRCS_CXX "src/*.cpp" ${COMMON_API_GEN_SOURCES})
+
+
+add_library(PluginRoutingInterfaceCAPI MODULE ${PLUGINCAPI_SRCS_CXX})
+
+SET_TARGET_PROPERTIES(PluginRoutingInterfaceCAPI PROPERTIES
+ SOVERSION "${LIB_INTERFACE_VERSION}"
+)
+
+TARGET_LINK_LIBRARIES(PluginRoutingInterfaceCAPI
+ ${DLT_LIBRARIES}
+ ${COMMON_API_LIBRARIES}
+ ${COMMON_API_DBUS_LIBRARIES}
+)
+
+IF(WITH_TESTS)
+ add_subdirectory (test)
+ENDIF(WITH_TESTS)
+
+#IF(WITH_DOCUMENTATION)
+# file(MAKE_DIRECTORY ${DOC_OUTPUT_PATH})
+# configure_file(${DOXY_FILE} ${DOC_OUTPUT_PATH}/Doxyfile @ONLY IMMEDIATE)
+# add_custom_target (PluginRoutingInterfaceCAPIDocs ALL
+# COMMAND ${DOXYGEN_EXECUTABLE} ${DOC_OUTPUT_PATH}/Doxyfile WORKING_DIRECTORY ${DOC_OUTPUT_PATH}
+# SOURCES ${PROJECT_BINARY_DIR} ${DOC_OUTPUT_PATH}/Doxyfile
+# )
+#ENDIF(WITH_DOCUMENTATION)
+
+INSTALL(TARGETS PluginRoutingInterfaceCAPI
+ DESTINATION "lib/${LIB_INSTALL_SUFFIX}/routing"
+ PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ
+ COMPONENT sampleplugins
+)
+
+SET(ADD_DEPEND "audiomanager-bin" "dlt")
+set_property(GLOBAL APPEND PROPERTY sampleplugins_prop "${ADD_DEPEND}")
+
+ENDIF(WITH_ROUTING_INTERFACE_CAPI AND WITH_CAPI_WRAPPER)
diff --git a/PluginRoutingInterfaceCAPI/cmake/config.cmake b/PluginRoutingInterfaceCAPI/cmake/config.cmake
new file mode 100644
index 0000000..20ce881
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/cmake/config.cmake
@@ -0,0 +1,6 @@
+#ifndef _ROUTINGDBUS_CONFIG_H
+#define _ROUTINGDBUS_CONFIG_H
+
+#cmakedefine ROUTING_DBUS_INTROSPECTION_FILE "@ROUTING_DBUS_INTROSPECTION_FILE@"
+
+#endif /* _ROUTINGDBUS_CONFIG_H */
diff --git a/PluginRoutingInterfaceCAPI/fidl/PluginRoutingInterfaceCAPI_dbus.conf b/PluginRoutingInterfaceCAPI/fidl/PluginRoutingInterfaceCAPI_dbus.conf
new file mode 100755
index 0000000..799a9a3
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/fidl/PluginRoutingInterfaceCAPI_dbus.conf
@@ -0,0 +1,8 @@
+######################################### Routing interface configuration ########################################
+# PluginRoutingInterfaceCAPI_dbus.conf #
+# If you change something make sure you re-configure with 'ccmake..' which generates the *_dbus.conf file again. #
+##################################################################################################################
+[local:org.genivi.audiomanger.routinginterface:org.genivi.audiomanger]
+dbus_connection=org.genivi.audiomanager
+dbus_object=/org/genivi/audiomanager/routinginterface
+dbus_interface=org.genivi.audiomanager.routinginterface \ No newline at end of file
diff --git a/PluginRoutingInterfaceCAPI/fidl/RoutingInterface.fidl b/PluginRoutingInterfaceCAPI/fidl/RoutingInterface.fidl
new file mode 100644
index 0000000..6e1346b
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/fidl/RoutingInterface.fidl
@@ -0,0 +1,462 @@
+package org.genivi.audiomanager
+
+import org.genivi.audiomanager.am_gen.* from "amTypes.fidl"
+
+
+interface RoutingInterface
+{
+ version { major 0 minor 1 }
+
+ method ackConnect
+ {
+ in
+ {
+ UInt16 handle
+ am_connectionID_t connectionID
+ UInt16 ^error
+ }
+ }
+ method ackDisconnect
+ {
+ in
+ {
+ UInt16 handle
+ am_connectionID_t connectionID
+ UInt16 ^error
+ }
+ }
+ method ackSetSinkVolume
+ {
+ in
+ {
+ UInt16 handle
+ am_volume_t volume
+ UInt16 ^error
+ }
+ }
+ method ackSetSourceVolume
+ {
+ in
+ {
+ UInt16 handle
+ am_volume_t volume
+ UInt16 ^error
+ }
+ }
+ method ackSetSourceState
+ {
+ in
+ {
+ UInt16 handle
+ UInt16 ^error
+ }
+ }
+ method ackSetSinkSoundProperties
+ {
+ in
+ {
+ UInt16 handle
+ UInt16 ^error
+ }
+ }
+ method ackSetSinkSoundProperty
+ {
+ in
+ {
+ UInt16 handle
+ UInt16 ^error
+ }
+ }
+ method ackSetSourceSoundProperties
+ {
+ in
+ {
+ UInt16 handle
+ UInt16 ^error
+ }
+ }
+ method ackSetSourceSoundProperty
+ {
+ in
+ {
+ UInt16 handle
+ UInt16 ^error
+ }
+ }
+ method ackSourceVolumeTick
+ {
+ in
+ {
+ UInt16 handle
+ am_sourceID_t source
+ am_volume_t volume
+ }
+ }
+ method ackSinkVolumeTick
+ {
+ in
+ {
+ UInt16 handle
+ am_sinkID_t sink
+ am_volume_t volume
+ }
+ }
+ method ackCrossFading
+ {
+ in
+ {
+ UInt16 handle
+ am_HotSink_e hotSink
+ am_Error_e returnError
+ }
+ }
+ method peekDomain
+ {
+ in
+ {
+ String name
+ }
+
+ out
+ {
+ am_domainID_t domainID
+ am_Error_e ^error
+ }
+ }
+ method registerDomain
+ {
+ in
+ {
+ am_Domain_s domainData
+ String returnBusname
+ String returnPath
+ String returnInterface
+ }
+ out
+ {
+ am_domainID_t domainID
+ am_Error_e ^error
+ }
+ }
+ method deregisterDomain
+ {
+ in
+ {
+ am_domainID_t domainID
+ }
+ out
+ {
+ am_Error_e ^returnError
+ }
+ }
+ method registerGateway
+ {
+ in
+ {
+ am_Gateway_s gatewayData
+ }
+ out
+ {
+ am_gatewayID_t gatewayID
+ am_Error_e ^error
+ }
+ }
+ method deregisterGateway
+ {
+ in
+ {
+ am_gatewayID_t gatewayID
+ }
+ out
+ {
+ am_Error_e ^returnError
+ }
+ }
+ method peekSink
+ {
+ in
+ {
+ String name
+ }
+
+ out
+ {
+ am_sinkID_t sinkID
+ am_Error_e ^error
+ }
+ }
+ method registerSink
+ {
+ in
+ {
+ sinkData_s sinkData
+ }
+ out
+ {
+ am_sinkID_t sinkID
+ am_Error_e ^error
+ }
+ }
+ method deregisterSink
+ {
+ in
+ {
+ am_sinkID_t sinkID
+ }
+ out
+ {
+ am_Error_e ^returnError
+ }
+ }
+ method peekSource
+ {
+ in
+ {
+ String name
+ }
+
+ out
+ {
+ am_sourceID_t sourceID
+ am_Error_e ^error
+ }
+ }
+ method registerSource
+ {
+ in
+ {
+ sourceData_s sourceData
+ }
+ out
+ {
+ am_sourceID_t sourceID
+ am_Error_e ^error
+ }
+ }
+ method deregisterSource
+ {
+ in
+ {
+ am_sourceID_t sourceID
+ }
+ out
+ {
+ am_Error_e ^returnError
+ }
+ }
+ method registerCrossfader
+ {
+ in
+ {
+ crossfaderData_s crossfaderData
+ }
+ out
+ {
+ am_crossfaderID_t crossfaderID
+ am_Error_e ^error
+ }
+ }
+ method deregisterCrossfader
+ {
+ in
+ {
+ am_crossfaderID_t crossfaderID
+ }
+ out
+ {
+ am_Error_e ^returnError
+ }
+ }
+ method peekSourceClassID
+ {
+ in
+ {
+ String name
+ }
+
+ out
+ {
+ am_sourceClass_t sourceClassID
+ am_Error_e ^error
+ }
+ }
+ method peekSinkClassID
+ {
+ in
+ {
+ String name
+ }
+
+ out
+ {
+ am_sinkClass_t sinkClassID
+ am_Error_e ^error
+ }
+ }
+
+ method hookInterruptStatusChange
+ {
+ in
+ {
+ am_sourceID_t sourceID
+ UInt16 interruptState
+ }
+ }
+ method hookDomainRegistrationComplete
+ {
+ in
+ {
+ am_domainID_t domainID
+ }
+ }
+ method hookSinkAvailablityStatusChange
+ {
+ in
+ {
+ am_sinkID_t sinkID
+ am_Availability_s availability
+ }
+ }
+ method hookSourceAvailablityStatusChange
+ {
+ in
+ {
+ am_sourceID_t sourceID
+ am_Availability_s availability
+ }
+ }
+ method hookDomainStateChange
+ {
+ in
+ {
+ am_domainID_t domainID
+ am_DomainState_e domainState
+ }
+ }
+ method hookTimingInformationChanged
+ {
+ in
+ {
+ am_connectionID_t connectionID
+ Int16 delay
+ }
+ }
+ method sendChangedData
+ {
+ in
+ {
+ am_EarlyData_l earlyData_volumes
+ am_EarlyData_l earlyData_soundproperties
+ }
+ }
+ method confirmRoutingReady
+ {
+ in
+ {
+ am_domainID_t domainID
+ }
+ }
+
+ method confirmRoutingRundown
+ {
+ in
+ {
+ am_domainID_t domainID
+ }
+ }
+
+ method updateGateway
+ {
+ in
+ {
+ am_gatewayID_t gatewayID
+ am_ConnectionFormat_L listSourceFormats
+ am_ConnectionFormat_L listSinkFormats
+ bool_L convertionMatrix
+ }
+ }
+
+ method updateSink
+ {
+ in
+ {
+ am_sinkID_t sinkID
+ am_sinkClass_t sinkClassID
+ am_SoundProperty_L listSoundProperties
+ am_ConnectionFormat_L listConnectionFormats
+ am_MainSoundProperty_L listMainSoundProperties
+ }
+ }
+ method updateSource
+ {
+ in
+ {
+ am_sourceID_t sourceID
+ am_sourceClass_t sourceClassID
+ am_SoundProperty_L listSoundProperties
+ am_ConnectionFormat_L listConnectionFormats
+ am_MainSoundProperty_L listMainSoundProperties
+ }
+ }
+ method ackSetVolumes
+ {
+ in
+ {
+ UInt16 handle
+ am_Volumes_l listVolumes
+ UInt16 ^error
+ }
+ }
+ method ackSinkNotificationConfiguration
+ {
+ in
+ {
+ UInt16 handle
+ UInt16 ^error
+ }
+ }
+ method ackSourceNotificationConfiguration
+ {
+ in
+ {
+ UInt16 handle
+ UInt16 ^error
+ }
+ }
+ method hookSinkNotificationDataChange
+ {
+ in
+ {
+ am_sinkID_t sinkID
+ notificationPayload_s payload
+ }
+ }
+
+ method hookSourceNotificationDataChange
+ {
+ in
+ {
+ am_sourceID_t sourceID
+ notificationPayload_s payload
+ }
+ }
+
+ method getRoutingReadyState
+ {
+ out
+ {
+ Boolean readyState
+ }
+ }
+
+ broadcast setRoutingReady
+ {
+
+ }
+
+ broadcast setRoutingRundown
+ {
+
+ }
+
+} \ No newline at end of file
diff --git a/PluginRoutingInterfaceCAPI/fidl/RoutingSender.fidl b/PluginRoutingInterfaceCAPI/fidl/RoutingSender.fidl
new file mode 100755
index 0000000..035d96b
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/fidl/RoutingSender.fidl
@@ -0,0 +1,158 @@
+package org.genivi.audiomanager
+
+import org.genivi.audiomanager.am_gen.* from "amTypes.fidl"
+
+interface RoutingSender
+{
+ version { major 0 minor 1 }
+
+ method asyncSetSourceState
+ {
+ in
+ {
+ UInt16 handle
+ am_sourceID_t sourceID
+ am_SourceState_e sourceState
+ }
+ }
+
+ method setDomainState
+ {
+ in
+ {
+ am_domainID_t domainID
+ am_DomainState_e domainState
+ }
+ out
+ {
+ am_Error_e ^error
+ }
+ }
+ method asyncSetSourceVolume
+ {
+ in
+ {
+ am_handle_t handle
+ am_sourceID_t sourceID
+ am_volume_t volume
+ am_RampType_e ramp
+ am_time_t time
+ }
+ }
+ method asyncSetSinkVolume
+ {
+ in
+ {
+ am_handle_t handle
+ am_sinkID_t sinkID
+ am_volume_t volume
+ am_RampType_e ramp
+ am_time_t time
+ }
+ }
+ method asyncConnect
+ {
+ in
+ {
+ am_handle_t handle
+ am_connectionID_t connectionID
+ am_sourceID_t sourceID
+ am_sinkID_t sinkID
+ am_ConnectionFormat_e connectionFormat
+ }
+ }
+ method asyncDisconnect
+ {
+ in
+ {
+ am_handle_t handle
+ am_connectionID_t connectionID
+ }
+ }
+ method asyncAbort
+ {
+ in
+ {
+ am_handle_t handle
+ }
+ out
+ {
+ am_Error_e ^error
+ }
+ }
+ method asyncSetSinkSoundProperties
+ {
+ in
+ {
+ am_handle_t handle
+ am_sinkID_t sinkID
+ am_SoundProperty_L listSoundProperties
+ }
+ }
+ method asyncSetSinkSoundProperty
+ {
+ in
+ {
+ am_handle_t handle
+ am_sinkID_t sinkID
+ am_SoundProperty_s soundProperty
+ }
+ }
+ method asyncSetSourceSoundProperties
+ {
+ in
+ {
+ am_handle_t handle
+ am_sourceID_t sourceID
+ am_SoundProperty_L listSoundProperties
+ }
+ }
+ method asyncSetSourceSoundProperty
+ {
+ in
+ {
+ am_handle_t handle
+ am_sourceID_t sourceID
+ am_SoundProperty_s soundProperty
+ }
+
+ }
+ method asyncCrossFade
+ {
+ in
+ {
+ am_handle_t handle
+ am_crossfaderID_t crossfaderID
+ am_HotSink_e hotSink
+ am_RampType_e rampType
+ am_time_t time
+ }
+ }
+ method asyncSetVolumes
+ {
+ in
+ {
+ am_handle_t handle
+ am_Volumes_l volumes
+ }
+ }
+ method asyncSetSinkNotificationConfiguration
+ {
+ in
+ {
+ am_handle_t handle
+ am_sinkID_t sinkID
+ am_NotificationConfiguration_s notificationConfiguration
+ }
+ }
+ method asyncSetSourceNotificationConfiguration
+ {
+ in
+ {
+ am_handle_t handle
+ am_sourceID_t sourceID
+ am_NotificationConfiguration_s notificationConfiguration
+ }
+ }
+}
+
diff --git a/PluginRoutingInterfaceCAPI/fidl/amTypes.fidl b/PluginRoutingInterfaceCAPI/fidl/amTypes.fidl
new file mode 100755
index 0000000..60791c7
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/fidl/amTypes.fidl
@@ -0,0 +1,399 @@
+package org.genivi.audiomanager
+
+typeCollection am_gen
+{
+ typedef am_sourceID_t is UInt16
+ typedef am_sinkID_t is UInt16
+ typedef am_gatewayID_t is UInt16
+ typedef gongHandle is Int16
+ typedef am_sourceClass_t is UInt16
+ typedef am_sinkClass_t is UInt16
+ typedef am_volume_t is Int16
+ typedef am_mainVolume_t is Int16
+ typedef am_handle_t is UInt16
+ typedef am_time_t is UInt16
+ typedef am_connectionID_t is UInt16
+ typedef am_crossfaderID_t is UInt16
+
+
+ enumeration gp_indicatorDirection_e
+ {
+ INDICATOR_RIGHT ="0x00"
+ INDICATOR_LEFT="0x01"
+ INDICATOR_WARNING="0x02"
+ }
+
+ enumeration am_RampType_e
+ {
+ RAMP_UNKNOWN = "0x00"
+ RAMP_GENIVI_DIRECT = "0x01"
+ RAMP_GENIVI_NO_PLOP = "0x02"
+ RAMP_GENIVI_EXP_INV = "0x03"
+ RAMP_GENIVI_LINEAR = "0x04"
+ RAMP_GENIVI_EXP = "0x05"
+ RAMP_MAX = "0x06"
+ }
+
+ enumeration am_MuteState_e
+ {
+ MS_UNKNOWN = "0x00"
+ MS_MUTED = "0x01"
+ MS_UNMUTED = "0x02"
+ MS_MAX = "0x03"
+ }
+
+ enumeration am_SourceState_e
+ {
+ SS_UNKNNOWN = "0x00"
+ SS_ON = "0x01"
+ SS_OFF = "0x02"
+ SS_PAUSED = "0x03"
+ SS_MAX = "0x04"
+ }
+ enumeration am_Error_e
+ {
+ E_OK = "0x00"
+ E_UNKNOWN = "0x01"
+ E_OUT_OF_RANGE = "0x02"
+ E_NOT_USED = "0x03"
+ E_DATABASE_ERROR = "0x04"
+ E_ALREADY_EXISTS = "0x05"
+ E_NO_CHANGE = "0x06"
+ E_NOT_POSSIBLE = "0x07"
+ E_NON_EXISTENT = "0x08"
+ E_ABORTED = "0x09"
+ E_WRONG_FORMAT = "0xA"
+ E_MAX = "0xB"
+ }
+
+ enumeration am_DomainState_e
+ {
+
+ DS_UNKNOWN = "0"
+ DS_CONTROLLED = "1"
+ DS_INDEPENDENT_STARTUP = "2"
+ DS_INDEPENDENT_RUNDOWN = "3"
+ DS_MAX = "4"
+ }
+
+ enumeration gongType_e
+ {
+ AT_NUN = "0x01"
+ AT_POC = "0x02"
+ AT_QUE = "0x03"
+ AT_IWA = "0x04"
+ AT_WA = "0x05"
+ AT_ETC_F = "0x06"
+ AT_ETC_F2 = "0x07"
+ AT_ETC_ST = "0x08"
+ AT_ETC_S = "0x09"
+ AT_REV = "0x0A"
+ AT_ESU = "0x0B"
+ AT_ESD = "0x0C"
+ AT_DG = "0x0D"
+ AT_SG = "0x0E"
+ AT_IDG = "0x0F"
+ AT_ION = "0x10"
+ AT_IOFF = "0x11"
+ AT_FBS = "0x12"
+ AT_VFS = "0x13"
+ AT_GES = "0x14"
+ AT_UEE = "0x15"
+ }
+
+ enumeration am_EarlyDataType_e
+ {
+ ED_UNKNOWN = "0x00"
+ ED_SOURCE_VOLUME = "0x01"
+ ED_SINK_VOLUME = "0x02"
+ ED_SOURCE_PROPERTY = "0x03"
+ ED_SINK_PROPERTY = "0x04"
+ ED_MAX = "0x05"
+ }
+
+ enumeration gp_indicatorStatus_e
+ {
+ IS_ON = "0x00"
+ IS_OFF = "0x01"
+ }
+
+ enumeration gongStatus_e
+ {
+ NOT_PLAYING = "0x00"
+ PLAYING = "0x01"
+ INTERRUPTED = "0x02"
+ }
+
+ enumeration gongError_e
+ {
+ SUCCESS = "0x00"
+ ERROR = "0x01"
+ LOW_PRIORITY = "0x02"
+ }
+
+ enumeration gongClass_e
+ {
+ GONGCLASS_1 = "0x01"
+ GONGCLASS_2 = "0x02"
+ GONGCLASS_PDC = "0x03"
+ GONGCLASS_TURN = "0x04"
+ GONGCLASS_OBSTACLE = "0x05"
+ }
+
+ enumeration sampleSet_e
+ {
+ setBMW = "0x00"
+ setMini = "0x01"
+ setRR = "0x02"
+ }
+
+ enumeration am_Availability_e
+ {
+ A_UNKNOWN = "0x00"
+ A_AVAILABLE = "0x01"
+ A_UNAVAILABLE = "0x02"
+ A_MAX = "0x03"
+ }
+ enumeration am_AvailabilityReason_e
+ {
+ AR_UNKNOWN = "0x00"
+ AR_GENIVI_NEWMEDIA = "0x01"
+ AR_GENIVI_SAMEMEDIA = "0x02"
+ AR_GENIVI_NOMEDIA = "0x03"
+ AR_GENIVI_TEMPERATURE = "0x04"
+ AR_GENIVI_VOLTAGE = "0x05"
+ AR_GENIVI_ERRORMEDIA = "0x06"
+ AR_MAX = "0x07"
+ }
+
+ enumeration am_InterruptState_e
+ {
+ IS_UNKNOWN = "0x00"
+ IS_OFF = "0x01"
+ IS_INTERRUPTED = "0x02"
+ IS_MAX = "0x03"
+ }
+
+ enumeration am_SoundPropertyType_e
+ {
+ SP_UNKNOWN = "0x00"
+ SP_EXAMPLE_TREBLE = "0x01"
+ SP_EXAMPLE_MID = "0x02"
+ SP_EXAMPLE_BASS = "0x03"
+ SP_ENTER_SINKID = "0x04"
+ SP_INTERR_SUPERSEEDINGID = "0x05"
+ SP_INTERR_OVERLAYID = "0x06"
+ SP_PRIORITY = "0x07"
+ SP_MAX = "0x08"
+ }
+
+ enumeration am_ConnectionFormat_e
+ {
+ CF_UNKNOWN = "0x00"
+ CF_GENIVI_MONO = "0x01"
+ CF_GENIVI_STEREO = "0x02"
+ CF_GENIVI_ANALOG = "0x03"
+ CF_GENIVI_AUTO = "0x04"
+ CF_MAX = "0x05"
+ }
+ array am_ConnectionFormat_L of am_ConnectionFormat_e
+
+ enumeration am_MainSoundPropertyType_e
+ {
+ MSP_UNKNOWN = "0x00"
+ MSP_EXAMPLE_TREBLE = "0x01"
+ MSP_EXAMPLE_MID = "0x02"
+ MSP_EXAMPLE_BASS = "0x03"
+ MSP_SOURCE_TYPE = "0x04"
+ MSP_MAX = "0x05"
+ }
+
+ enumeration am_NotificationType_e
+ {
+ NT_UNKNOWN = "0x00"
+ NT_LOUDNESS = "0x01"
+ NT_MAX = "0x02"
+ }
+
+ enumeration am_NotificationStatus_e
+ {
+ NS_UNKNOWN = "0x00"
+ NS_OFF = "0x01"
+ NS_PERIODIC = "0x02"
+ NS_MINIMUM = "0x03"
+ NS_MAXIMUM = "0x04"
+ NS_CHANGE = "0x05"
+ NS_MAX = "0x06"
+ }
+
+ enumeration am_HotSink_e
+ {
+ HS_UNKNOWN = "0x00"
+ HS_SINKA = "0x01"
+ HS_SINKB = "0x02"
+ HS_INTERMEDIATE = "0x03"
+ HS_MAX = "0x04"
+ }
+
+ enumeration am_VolumeType_e
+ {
+ VT_UNKNOWN = "0x00"
+ VT_SINK = "0x01"
+ VT_SOURCE = "0x02"
+ VT_MAX = "0x03"
+ }
+
+ struct distanceInformation_s
+ {
+ Int32 FrontLeft
+ Int32 FrontRight
+ Int32 RearLeft
+ Int32 RearRight
+ }
+
+ struct sampleNames_s
+ {
+ sampleSet_e sample
+ String sampleName
+ } array listSampleNamesL of sampleNames_s
+
+ typedef am_domainID_t is UInt16
+
+ struct am_Domain_s
+ {
+ am_domainID_t domainID
+ String name
+ String busname
+ String nodename
+ Boolean early
+ Boolean complete
+ am_DomainState_e ^state
+ }
+
+ struct am_Volumes_s
+ {
+ am_VolumeType_e volumeType
+ am_DataType_u volumeID
+ am_volume_t volume
+ am_RampType_e ramp
+ am_time_t time
+ }
+ array am_Volumes_l of am_Volumes_s
+
+ struct notificationPayload_s
+ {
+ Int16 type
+ Int16 payload
+ }
+
+ struct am_Availability_s
+ {
+ am_Availability_e availability
+ am_AvailabilityReason_e availabilityReason
+ }
+
+ struct am_SoundProperty_s
+ {
+ am_SoundPropertyType_e type
+ Int16 value
+ }
+ array am_SoundProperty_L of am_SoundProperty_s
+
+ struct am_MainSoundProperty_s
+ {
+ am_MainSoundPropertyType_e type
+ Int16 value
+ }
+ array am_MainSoundProperty_L of am_MainSoundProperty_s
+
+ struct am_NotificationConfiguration_s
+ {
+ am_NotificationType_e type
+ am_NotificationStatus_e status
+ Int16 parameter
+ }
+ array am_NotificationConfiguration_L of am_NotificationConfiguration_s
+
+
+ array bool_L of Boolean
+
+ struct sourceData_s
+ {
+ am_sourceID_t sourceID
+ am_domainID_t domainID
+ String name
+ am_sourceClass_t sourceClassID
+ am_SourceState_e sourceState
+ am_volume_t volume
+ Boolean visible
+ am_Availability_s available
+ am_InterruptState_e interruptState
+ am_SoundProperty_L listSoundProperties
+ am_ConnectionFormat_L listConnectionFormats
+ am_MainSoundProperty_L listMainSoundProperties
+ am_NotificationConfiguration_L listMainNotificationConfigurations
+ am_NotificationConfiguration_L listNotificationConfigurations
+ }
+
+ struct sinkData_s
+ {
+ am_sinkID_t sinkID
+ String name
+ am_domainID_t domainID
+ am_sinkClass_t sinkClassID
+ am_volume_t volume
+ Boolean visible
+ am_Availability_s available
+ am_MuteState_e muteState
+ am_mainVolume_t mainVolume
+ am_SoundProperty_L listSoundProperties
+ am_ConnectionFormat_L listConnectionFormats
+ am_MainSoundProperty_L listMainSoundProperties
+ am_NotificationConfiguration_L listMainNotificationConfigurations
+ am_NotificationConfiguration_L listNotificationConfigurations
+ }
+
+ struct crossfaderData_s
+ {
+ am_crossfaderID_t crossfaderID
+ String name
+ am_sinkID_t sinkID_A
+ am_sinkID_t sinkID_B
+ am_sourceID_t sourceID
+ am_HotSink_e hotSink
+ }
+
+ struct am_Gateway_s
+ {
+ am_gatewayID_t gatewayID
+ String name
+ am_sinkID_t sinkID
+ am_sourceID_t sourceID
+ am_domainID_t domainSinkID
+ am_domainID_t domainSourceID
+ am_domainID_t controlDomainID
+ am_ConnectionFormat_L listSourceFormats
+ am_ConnectionFormat_L listSinkFormats
+ bool_L convertionMatrix
+ }
+
+ struct am_EarlyData_s
+ {
+ am_EarlyDataType_e type
+ am_DataType_u sinksource
+ am_EarlyData_u data
+
+ }
+ array am_EarlyData_l of am_EarlyData_s
+ union am_EarlyData_u
+ {
+ am_volume_t volume
+ am_SoundProperty_s soundProperty
+
+ }
+ union am_DataType_u
+ {
+ am_sinkID_t sink
+ am_sourceID_t source
+ }
+} \ No newline at end of file
diff --git a/PluginRoutingInterfaceCAPI/fidl/deployment.fdepl b/PluginRoutingInterfaceCAPI/fidl/deployment.fdepl
new file mode 100644
index 0000000..3846ed4
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/fidl/deployment.fdepl
@@ -0,0 +1,9 @@
+specification org.genivi.commonapi.core.deployment.deployment {
+ for interfaces {
+ DefaultEnumBackingType: {UInt8, UInt16, UInt32, UInt64, Int8, Int16, Int32, Int64} (default: UInt32);
+ }
+
+ for enumerations {
+ EnumBackingType: {UseDefault, UInt8, UInt16, UInt32, UInt64, Int8, Int16, Int32, Int64} (default: UseDefault);
+ }
+}
diff --git a/PluginRoutingInterfaceCAPI/include/CAmLookupData.h b/PluginRoutingInterfaceCAPI/include/CAmLookupData.h
new file mode 100644
index 0000000..c3bf93c
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/include/CAmLookupData.h
@@ -0,0 +1,204 @@
+/**
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
+#ifndef CAMLOOKUPDATA_H_
+#define CAMLOOKUPDATA_H_
+
+#include <map>
+#include <iostream>
+#include <cassert>
+#include <memory>
+#include <CommonAPI/CommonAPI.h>
+#include "audiomanagertypes.h"
+#include <org/genivi/audiomanager/RoutingSenderProxy.h>
+
+#ifdef UNIT_TEST
+#include "../test/IAmRoutingSenderBackdoor.h" //we need this for the unit test
+#endif
+
+namespace am {
+
+using namespace CommonAPI;
+using namespace org::genivi::audiomanager;
+
+/** A structure holding info for given domain.
+ * For every domain a single instance is created which is used by the lookup methods.
+ */
+
+struct rs_lookupData_s
+{
+private:
+ bool mIsConnected; //!< bool indicating whether the domain is reachable or not
+ std::shared_ptr<RoutingSenderProxy<>> mSenderProxy; //!< a pointer to the proxy object, which implements the connection out from AudioManager
+ CommonAPI::ProxyStatusEvent::Subscription mSubscription; //!< subscription for the proxy system events
+ void onServiceStatusEvent(const CommonAPI::AvailabilityStatus& serviceStatus); //!< proxy status event callback
+public:
+ rs_lookupData_s(const std::shared_ptr<RoutingSenderProxy<> > & aProxy);
+ ~rs_lookupData_s();
+
+ /**
+ * returns the proxy object.
+ */
+ std::shared_ptr<RoutingSenderProxy<>> & getProxy();
+ /**
+ * returns whether the proxy object is connected or not.
+ */
+ bool isConnected();
+ /**
+ * proxy wrapping methods.
+ */
+ am_Error_e asyncAbort(const uint16_t handle, RoutingSenderProxyBase::AsyncAbortAsyncCallback);
+ am_Error_e asyncConnect(const uint16_t handle, const am_connectionID_t, const am_sourceID_t, const am_sinkID_t, const am_ConnectionFormat_e, RoutingSenderProxyBase::AsyncConnectAsyncCallback);
+ am_Error_e asyncDisconnect(const uint16_t handle, const am_connectionID_t, RoutingSenderProxyBase::AsyncDisconnectAsyncCallback);
+ am_Error_e asyncSetSinkVolume(const uint16_t handle, const am_sinkID_t, const am_volume_t, const am_RampType_e, const am_time_t, RoutingSenderProxyBase::AsyncSetSinkVolumeAsyncCallback);
+ am_Error_e asyncSetSourceVolume(const uint16_t handle, const am_sourceID_t , const am_volume_t, const am_RampType_e, const am_time_t, RoutingSenderProxyBase::AsyncSetSourceVolumeAsyncCallback);
+ am_Error_e asyncSetSourceState(const uint16_t handle, const am_sourceID_t, const am_SourceState_e, RoutingSenderProxyBase::AsyncSetSourceStateAsyncCallback);
+ am_Error_e asyncSetSinkSoundProperties(const uint16_t handle, const am_sinkID_t, const std::vector<am_SoundProperty_s>&, RoutingSenderProxyBase::AsyncSetSinkSoundPropertiesAsyncCallback);
+ am_Error_e asyncSetSinkSoundProperty(const uint16_t handle, const am_sinkID_t, const am_SoundProperty_s&, RoutingSenderProxyBase::AsyncSetSinkSoundPropertyAsyncCallback);
+ am_Error_e asyncSetSourceSoundProperties(const uint16_t handle, const am_sourceID_t, const std::vector<am_SoundProperty_s>&, RoutingSenderProxyBase::AsyncSetSourceSoundPropertiesAsyncCallback);
+ am_Error_e asyncSetSourceSoundProperty(const uint16_t handle, const am_sourceID_t, const am_SoundProperty_s&, RoutingSenderProxyBase::AsyncSetSourceSoundPropertyAsyncCallback);
+ am_Error_e asyncCrossFade(const uint16_t handle, const am_crossfaderID_t, const am_HotSink_e, const am_RampType_e, const am_time_t, RoutingSenderProxyBase::AsyncCrossFadeAsyncCallback);
+ am_Error_e setDomainState(const am_domainID_t, const am_DomainState_e, RoutingSenderProxyBase::SetDomainStateAsyncCallback);
+ am_Error_e asyncSetVolumes(const uint16_t handle, const std::vector<am_Volumes_s>&, RoutingSenderProxyBase::AsyncSetVolumesAsyncCallback);
+ am_Error_e asyncSetSinkNotificationConfiguration(const uint16_t handle, const am_sinkID_t, const am_NotificationConfiguration_s&, RoutingSenderProxyBase::AsyncSetSinkNotificationConfigurationAsyncCallback);
+ am_Error_e asyncSetSourceNotificationConfiguration(const uint16_t handle, const am_sourceID_t, const am_NotificationConfiguration_s&, RoutingSenderProxyBase::AsyncSetSourceNotificationConfigurationAsyncCallback);
+};
+
+
+/**
+ * The class encapsulate the lookup mechanism and forwards the invocations to the appropriate lookup objects ( proxies ).
+ */
+class CAmLookupData {
+
+ typedef std::shared_ptr<rs_lookupData_s> RSLookupDataPtr;
+ /**
+ * Lookup maps.
+ */
+ typedef std::map<am_domainID_t,RSLookupDataPtr> mapDomain_t;
+ typedef std::map<am_sinkID_t,RSLookupDataPtr> mapSinks_t;
+ typedef std::map<am_sourceID_t,RSLookupDataPtr> mapSources_t;
+ typedef std::map<am_connectionID_t,RSLookupDataPtr> mapConnections_t;
+ typedef std::map<uint16_t,RSLookupDataPtr> mapHandles_t;
+ typedef std::map<am_crossfaderID_t,RSLookupDataPtr> mapCrossfaders_t;
+
+ mapDomain_t mMapDomains;
+ mapSinks_t mMapSinks;
+ mapSources_t mMapSources;
+ mapConnections_t mMapConnections;
+ mapHandles_t mMapHandles;
+ mapCrossfaders_t mMapCrossfaders;
+
+ /** \brief returns the value for given key if exists.
+ *
+ * @param key is a search key.
+ * @param map is a either domain, sink, source, connection, crossfader or handle map.
+ */
+ template <typename TKey> static const RSLookupDataPtr getValueForKey(const TKey & key, const std::map<TKey,RSLookupDataPtr> & map);
+
+ /** \brief removes all entries which contains given value.
+ *
+ * @param value is a search value.
+ * @param map is a either domain, sink, source, connection, crossfader or handle map.
+ */
+ template <typename TKey> static void removeEntriesForValue(const RSLookupDataPtr & value, std::map<TKey,RSLookupDataPtr> & map);
+
+public:
+ CAmLookupData();
+ virtual ~CAmLookupData();
+ /** \brief adds a lookup for given domain.
+ *
+ * @param domainID is a valid domain id.
+ * @param aProxy is a proxy object constructed by registerDomain
+ */
+ void addDomainLookup(am_domainID_t & domainID,
+ std::shared_ptr<RoutingSenderProxy<>> & aProxy);
+
+ /** \brief removes given handle from the list.
+ *
+ */
+ void removeHandle(uint16_t handle);
+
+ /** \brief adds a lookup for given source in a given domain.
+ *
+ * @param sourceID is a valid source id.
+ * @param domainID is a valid domain id
+ */
+ void addSourceLookup(am_sourceID_t sourceID, am_domainID_t domainID);
+
+ /** \brief adds a lookup for given sink in a given domain.
+ *
+ * @param sinkID is a valid sink id.
+ * @param domainID is a valid domain id
+ */
+ void addSinkLookup(am_sinkID_t sinkID, am_domainID_t domainID);
+
+ /** \brief adds a lookup for given crossfader in the domain wherein the given source belongs to.
+ *
+ * @param crossfaderID is a valid crossfader id.
+ * @param soucreID is a valid source id
+ */
+ void addCrossfaderLookup(am_crossfaderID_t crossfaderID, am_sourceID_t soucreID);
+
+ /** \brief removes a given domain lookup.
+ */
+ void removeDomainLookup(am_domainID_t domainID);
+
+ /** \brief removes a given source lookup.
+ */
+ void removeSourceLookup(am_sourceID_t sourceID);
+
+ /** \brief removes a given sink lookup.
+ */
+ void removeSinkLookup(am_sinkID_t sinkID);
+
+ /** \brief removes a given crossfader lookup.
+ */
+ void removeCrossfaderLookup(am_crossfaderID_t crossfaderID);
+
+ /** \brief removes a given connection lookup.
+ */
+ void removeConnectionLookup(am_connectionID_t connectionID);
+
+ size_t numberOfDomains() { return mMapDomains.size(); }
+
+ static const char * BUS_NAME;
+
+ /**
+ * Wrapping methods.
+ */
+ am_Error_e asyncAbort(const uint16_t, RoutingSenderProxyBase::AsyncAbortAsyncCallback);
+ am_Error_e asyncConnect(const uint16_t , const am_connectionID_t, const am_sourceID_t, const am_sinkID_t, const am_ConnectionFormat_e, RoutingSenderProxyBase::AsyncConnectAsyncCallback);
+ am_Error_e asyncDisconnect(const uint16_t , const am_connectionID_t, RoutingSenderProxyBase::AsyncDisconnectAsyncCallback);
+ am_Error_e asyncSetSinkVolume(const uint16_t , const am_sinkID_t, const am_volume_t, const am_RampType_e, const am_time_t, RoutingSenderProxyBase::AsyncSetSinkVolumeAsyncCallback);
+ am_Error_e asyncSetSourceVolume(const uint16_t , const am_sourceID_t , const am_volume_t, const am_RampType_e, const am_time_t, RoutingSenderProxyBase::AsyncSetSourceVolumeAsyncCallback);
+ am_Error_e asyncSetSourceState(const uint16_t , const am_sourceID_t, const am_SourceState_e, RoutingSenderProxyBase::AsyncSetSourceStateAsyncCallback);
+ am_Error_e asyncSetSinkSoundProperties(const uint16_t , const am_sinkID_t, const std::vector<am_SoundProperty_s>&, RoutingSenderProxyBase::AsyncSetSinkSoundPropertiesAsyncCallback);
+ am_Error_e asyncSetSinkSoundProperty(const uint16_t , const am_sinkID_t, const am_SoundProperty_s&, RoutingSenderProxyBase::AsyncSetSinkSoundPropertyAsyncCallback);
+ am_Error_e asyncSetSourceSoundProperties(const uint16_t , const am_sourceID_t, const std::vector<am_SoundProperty_s>&, RoutingSenderProxyBase::AsyncSetSourceSoundPropertiesAsyncCallback);
+ am_Error_e asyncSetSourceSoundProperty(const uint16_t , const am_sourceID_t, const am_SoundProperty_s&, RoutingSenderProxyBase::AsyncSetSourceSoundPropertyAsyncCallback);
+ am_Error_e asyncCrossFade(const uint16_t , const am_crossfaderID_t, const am_HotSink_e, const am_RampType_e, const am_time_t, RoutingSenderProxyBase::AsyncCrossFadeAsyncCallback);
+ am_Error_e setDomainState(const am_domainID_t, const am_DomainState_e, RoutingSenderProxyBase::SetDomainStateAsyncCallback);
+ am_Error_e asyncSetVolumes(const uint16_t , const std::vector<am_Volumes_s>&, RoutingSenderProxyBase::AsyncSetVolumesAsyncCallback);
+ am_Error_e asyncSetSinkNotificationConfiguration(const uint16_t , const am_sinkID_t, const am_NotificationConfiguration_s&, RoutingSenderProxyBase::AsyncSetSinkNotificationConfigurationAsyncCallback);
+ am_Error_e asyncSetSourceNotificationConfiguration(const uint16_t , const am_sourceID_t, const am_NotificationConfiguration_s&, RoutingSenderProxyBase::AsyncSetSourceNotificationConfigurationAsyncCallback);
+#ifdef UNIT_TEST
+ friend class IAmRoutingSenderBackdoor;
+#endif
+};
+
+} /* namespace am */
+#endif /* CAMLOOKUPDATA_H_ */
diff --git a/PluginRoutingInterfaceCAPI/include/CAmRoutingSenderCAPI.h b/PluginRoutingInterfaceCAPI/include/CAmRoutingSenderCAPI.h
new file mode 100644
index 0000000..dc7f081
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/include/CAmRoutingSenderCAPI.h
@@ -0,0 +1,103 @@
+/**
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
+#ifndef CAPIROUTINGSENDER_H_
+#define CAPIROUTINGSENDER_H_
+
+#include "routing/IAmRoutingSend.h"
+#include "shared/CAmCommonAPIWrapper.h"
+#include "CAmRoutingService.h"
+#include "CAmLookupData.h"
+
+#ifdef UNIT_TEST
+#include "../test/IAmRoutingSenderBackdoor.h" //we need this for the unit test
+#endif
+
+namespace am
+{
+using namespace CommonAPI;
+using namespace org::genivi::audiomanager;
+
+#define ROUTING_NODE "routinginterface"
+
+class CAmRoutingSenderCAPI: public IAmRoutingSend
+{
+ bool mIsServiceStarted;
+ bool mReady; ///< bool indicating whether the plugin have got
+ CAmLookupData mLookupData; ///< an object which implements the lookup mechanism
+ CAmCommonAPIWrapper *mpCAmCAPIWrapper; ///< pointer to the common-api wrapper
+ IAmRoutingReceive *mpIAmRoutingReceive; ///< pointer to the routing receive interface
+ std::shared_ptr<CAmRoutingService> mService; ///< shared pointer to the routing service implementation
+ CAmRoutingSenderCAPI();
+public:
+ CAmRoutingSenderCAPI(CAmCommonAPIWrapper *aWrapper) ;
+ virtual ~CAmRoutingSenderCAPI();
+
+ /** \brief starts the plugin - registers the routing interface service.
+ *
+ * @param pIAmRoutingReceive pointer to the routing receive interface.
+ */
+ am_Error_e startService(IAmRoutingReceive* pIAmRoutingReceive);
+
+ /** \brief interface method which calls startService.
+ *
+ * @param pIAmRoutingReceive pointer to the routing receive interface.
+ */
+ am_Error_e startupInterface(IAmRoutingReceive* pIAmRoutingReceive);
+
+ /** \brief stops the service - deregister the routing interface service.
+ *
+ * @param pIAmRoutingReceive pointer to the routing receive interface.
+ */
+ am_Error_e tearDownInterface(IAmRoutingReceive*);
+
+ /** \brief sets and annotates the service ready state.
+ *
+ */
+ void setRoutingReady(const uint16_t handle);
+
+ /** \brief sets and annotates the service rundown state.
+ *
+ */
+ void setRoutingRundown(const uint16_t handle);
+ am_Error_e asyncAbort(const am_Handle_s handle);
+ am_Error_e asyncConnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_ConnectionFormat_e connectionFormat);
+ am_Error_e asyncDisconnect(const am_Handle_s handle, const am_connectionID_t connectionID);
+ am_Error_e asyncSetSinkVolume(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time);
+ 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 asyncSetSinkSoundProperties(const am_Handle_s handle, const am_sinkID_t sinkID, const std::vector<am_SoundProperty_s>& listSoundProperties);
+ am_Error_e asyncSetSinkSoundProperty(const am_Handle_s handle, const am_sinkID_t sinkID, const am_SoundProperty_s& soundProperty);
+ am_Error_e asyncSetSourceSoundProperties(const am_Handle_s handle, const am_sourceID_t sourceID, const std::vector<am_SoundProperty_s>& listSoundProperties);
+ am_Error_e asyncSetSourceSoundProperty(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SoundProperty_s& soundProperty);
+ 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;
+ void getInterfaceVersion(std::string& version) const;
+ am_Error_e asyncSetVolumes(const am_Handle_s handle, const std::vector<am_Volumes_s>& listVolumes) ;
+ am_Error_e asyncSetSinkNotificationConfiguration(const am_Handle_s handle, const am_sinkID_t sinkID, const am_NotificationConfiguration_s& notificationConfiguration) ;
+ am_Error_e asyncSetSourceNotificationConfiguration(const am_Handle_s handle, const am_sourceID_t sourceID, const am_NotificationConfiguration_s& notificationConfiguration) ;
+
+ static const char * ROUTING_INTERFACE_SERVICE;
+#ifdef UNIT_TEST
+ friend class IAmRoutingSenderBackdoor;
+#endif
+
+};
+}
+
+#endif /* CAPIROUTINGSENDER_H_ */
diff --git a/PluginRoutingInterfaceCAPI/include/CAmRoutingSenderCommon.h b/PluginRoutingInterfaceCAPI/include/CAmRoutingSenderCommon.h
new file mode 100644
index 0000000..63c9ea8
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/include/CAmRoutingSenderCommon.h
@@ -0,0 +1,59 @@
+/**
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
+#ifndef CAMROUTINGSENDERCOMMON_H_
+#define CAMROUTINGSENDERCOMMON_H_
+
+#include <memory>
+#include "audiomanagertypes.h"
+#include <org/genivi/audiomanager/am_gen.h>
+
+using namespace am;
+using namespace org::genivi::audiomanager;
+using namespace CommonAPI;
+
+/**
+ * Utility functions
+ */
+extern void CAmConvertCAPI2AM(const am_gen::am_Domain_s &, am_Domain_s &);
+extern void CAmConvertCAPI2AM(const am_gen::sourceData_s & , am::am_Source_s & );
+extern void CAmConvertCAPI2AM(const am_gen::sinkData_s & , am::am_Sink_s & );
+extern void CAmConvertCAPI2AM(const am_gen::am_Availability_s & , am_Availability_s & );
+extern void CAmConvertCAPI2AM(const am_gen::am_SoundProperty_s &, am::am_SoundProperty_s &);
+extern void CAmConvertCAPI2AM(const am_gen::am_MainSoundProperty_s &, am::am_MainSoundProperty_s & );
+extern void CAmConvertCAPI2AM(const am_gen::am_NotificationConfiguration_s & , am::am_NotificationConfiguration_s & );
+extern void CAmConvertCAPI2AM(const am_gen::am_Gateway_s & , am::am_Gateway_s & );
+extern void CAmConvertCAPI2AM(const am_gen::crossfaderData_s & , am::am_Crossfader_s & );
+extern void CAmConvertCAPI2AM(const am_gen::am_EarlyData_s & , am::am_EarlyData_s & );
+extern void CAmConvertCAPI2AM(const am_gen::am_EarlyData_u &, am::am_EarlyData_u & );
+extern void CAmConvertCAPI2AM(const am_gen::am_DataType_u & , am::am_DataType_u & );
+extern void CAmConvertCAPI2AM(const am_gen::am_Volumes_s &, am::am_Volumes_s &);
+extern void CAmConvertCAPI2AM(const am_gen::notificationPayload_s & , am::am_NotificationPayload_s & );
+extern void CAmConvertCAPIVector2AM(const std::vector<am_gen::am_NotificationConfiguration_s> & , std::vector<am::am_NotificationConfiguration_s> & );
+extern void CAmConvertCAPIVector2AM(const std::vector<am_gen::am_SoundProperty_s> &, std::vector<am::am_SoundProperty_s> &);
+extern void CAmConvertCAPIVector2AM(const std::vector<am_gen::am_ConnectionFormat_e> &, std::vector<am::am_ConnectionFormat_e> & );
+extern void CAmConvertCAPIVector2AM(const std::vector<am_gen::am_MainSoundProperty_s> &, std::vector<am::am_MainSoundProperty_s> & );
+extern void CAmConvertCAPIVector2AM(const std::vector<am_gen::am_Volumes_s> &, std::vector<am::am_Volumes_s> & );
+
+extern void CAmConvertAM2CAPI(const am_Availability_s & , am_gen::am_Availability_s & );
+extern void CAmConvertAM2CAPI(const am::am_SoundProperty_s &, am_gen::am_SoundProperty_s &);
+extern void CAmConvertAM2CAPI(const am::am_NotificationConfiguration_s &, am_gen::am_NotificationConfiguration_s &);
+extern void CAmConvertAM2CAPI(const am::am_Volumes_s &, am_gen::am_Volumes_s &);
+extern void CAmConvertAMVector2CAPI(const std::vector<am::am_SoundProperty_s> &, std::vector<am_gen::am_SoundProperty_s> &);
+extern void CAmConvertAMVector2CAPI(const std::vector<am::am_Volumes_s> & , std::vector<am_gen::am_Volumes_s> & );
+
+#endif /* CAMROUTINGSENDERCOMMON_H_ */
diff --git a/PluginRoutingInterfaceCAPI/include/CAmRoutingService.h b/PluginRoutingInterfaceCAPI/include/CAmRoutingService.h
new file mode 100644
index 0000000..d4d1382
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/include/CAmRoutingService.h
@@ -0,0 +1,148 @@
+/**
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
+#ifndef CAMROUTINGSERVICE_H_
+#define CAMROUTINGSERVICE_H_
+
+#include <org/genivi/audiomanager/RoutingInterfaceStubDefault.h>
+#include "../../include/routing/IAmRoutingReceive.h"
+#include "CAmLookupData.h"
+
+namespace am {
+
+class CAmCommonAPIWrapper;
+
+using namespace CommonAPI;
+using namespace org::genivi::audiomanager;
+
+/** Routing interface stub implementation.
+ * This class is the routing interface service for the Audio Manager.
+ */
+class CAmRoutingService: public RoutingInterfaceStubDefault {
+ CAmCommonAPIWrapper *mpCAmCAPIWrapper; ///< pointer to common-api wrapper
+ IAmRoutingReceive* mpIAmRoutingReceive; ///< pointer to the routing receive interface
+ CAmLookupData* mpLookpData; ///< pointer to the plugin's lookup mechanism implementation
+ int16_t mNumberDomains; ///< int number of registred domains
+ uint16_t mHandle; ///< unsigned current handle
+ bool mReady; ///< bool whether the service is in ready state or not
+ CAmRoutingService();
+public:
+
+ CAmRoutingService(IAmRoutingReceive *aReceiver, CAmLookupData* aLookpData, CAmCommonAPIWrapper *aCAPIWrapper);
+ virtual ~CAmRoutingService();
+
+
+ /** Stub overwritten methods.
+ *
+ */
+
+ virtual void ackConnect(uint16_t handle, am_gen::am_connectionID_t connectionID, uint16_t error);
+
+ virtual void ackDisconnect(uint16_t handle, am_gen::am_connectionID_t connectionID, uint16_t error);
+
+ virtual void ackSetSinkVolume(uint16_t handle, am_gen::am_volume_t volume, uint16_t error);
+
+ virtual void ackSetSourceVolume(uint16_t handle, am_gen::am_volume_t volume, uint16_t error);
+
+ virtual void ackSetSourceState(uint16_t handle, uint16_t error);
+
+ virtual void ackSetSinkSoundProperties(uint16_t handle, uint16_t error);
+
+ virtual void ackSetSinkSoundProperty(uint16_t handle, uint16_t error);
+
+ virtual void ackSetSourceSoundProperties(uint16_t handle, uint16_t error);
+
+ virtual void ackSetSourceSoundProperty(uint16_t handle, uint16_t error);
+
+ virtual void ackCrossFading(uint16_t handle, am_gen::am_HotSink_e hotSink, am_gen::am_Error_e returnError);
+
+ virtual void ackSourceVolumeTick(uint16_t handle, am_gen::am_sourceID_t source, am_gen::am_volume_t volume);
+
+ virtual void ackSinkVolumeTick(uint16_t handle, am_gen::am_sinkID_t sink, am_gen::am_volume_t volume);
+
+ virtual void peekDomain(std::string name, am_gen::am_domainID_t& domainID, am_gen::am_Error_e& error);
+
+ virtual void registerDomain(am_gen::am_Domain_s domainData, std::string returnBusname, std::string returnPath, std::string returnInterface, am_gen::am_domainID_t& domainID, am_gen::am_Error_e& error);
+
+ virtual void deregisterDomain(am_gen::am_domainID_t domainID, am_gen::am_Error_e& returnError);
+
+ virtual void registerGateway(am_gen::am_Gateway_s gatewayData, am_gen::am_gatewayID_t& gatewayID, am_gen::am_Error_e& error);
+
+ virtual void deregisterGateway(am_gen::am_gatewayID_t gatewayID, am_gen::am_Error_e& returnError);
+
+ virtual void peekSink(std::string name, am_gen::am_sinkID_t& sinkID, am_gen::am_Error_e& error);
+
+ virtual void registerSink(am_gen::sinkData_s sinkData, am_gen::am_sinkID_t& sinkID, am_gen::am_Error_e& error);
+
+ virtual void deregisterSink(am_gen::am_sinkID_t sinkID, am_gen::am_Error_e& returnError);
+
+ virtual void peekSource(std::string name, am_gen::am_sourceID_t& sourceID, am_gen::am_Error_e& error);
+
+ virtual void registerSource(am_gen::sourceData_s sourceData, am_gen::am_sourceID_t& sourceID, am_gen::am_Error_e& error);
+
+ virtual void deregisterSource(am_gen::am_sourceID_t sourceID, am_gen::am_Error_e& returnError);
+
+ virtual void registerCrossfader(am_gen::crossfaderData_s crossfaderData, am_gen::am_crossfaderID_t& crossfaderID, am_gen::am_Error_e& error);
+
+ virtual void deregisterCrossfader(am_gen::am_crossfaderID_t crossfaderID, am_gen::am_Error_e& returnError);
+
+ virtual void peekSourceClassID(std::string name, am_gen::am_sourceClass_t& sourceClassID, am_gen::am_Error_e& error);
+
+ virtual void peekSinkClassID(std::string name, am_gen::am_sinkClass_t& sinkClassID, am_gen::am_Error_e& error);
+
+ virtual void hookInterruptStatusChange(am_gen::am_sourceID_t sourceID, uint16_t interruptState);
+
+ virtual void hookDomainRegistrationComplete(am_gen::am_domainID_t domainID);
+
+ virtual void hookSinkAvailablityStatusChange(am_gen::am_sinkID_t sinkID, am_gen::am_Availability_s availability);
+
+ virtual void hookSourceAvailablityStatusChange(am_gen::am_sourceID_t sourceID, am_gen::am_Availability_s availability);
+
+ virtual void hookDomainStateChange(am_gen::am_domainID_t domainID, am_gen::am_DomainState_e domainState);
+
+ virtual void hookTimingInformationChanged(am_gen::am_connectionID_t connectionID, int16_t delay);
+
+ virtual void sendChangedData(am_gen::am_EarlyData_l earlyData_volumes, am_gen::am_EarlyData_l earlyData_soundproperties);
+
+ virtual void confirmRoutingReady(am_gen::am_domainID_t domainID);
+
+ virtual void confirmRoutingRundown(am_gen::am_domainID_t domainID);
+
+ virtual void updateGateway(am_gen::am_gatewayID_t gatewayID, am_gen::am_ConnectionFormat_L listSourceFormats, am_gen::am_ConnectionFormat_L listSinkFormats, am_gen::bool_L convertionMatrix);
+
+ virtual void updateSink(am_gen::am_sinkID_t sinkID, am_gen::am_sinkClass_t sinkClassID, am_gen::am_SoundProperty_L listSoundProperties, am_gen::am_ConnectionFormat_L listConnectionFormats, am_gen::am_MainSoundProperty_L listMainSoundProperties);
+
+ virtual void updateSource(am_gen::am_sourceID_t sourceID, am_gen::am_sourceClass_t sourceClassID, am_gen::am_SoundProperty_L listSoundProperties, am_gen::am_ConnectionFormat_L listConnectionFormats, am_gen::am_MainSoundProperty_L listMainSoundProperties);
+
+ virtual void ackSetVolumes(uint16_t handle, am_gen::am_Volumes_l listVolumes, uint16_t error);
+
+ virtual void ackSinkNotificationConfiguration(uint16_t handle, uint16_t error);
+
+ virtual void ackSourceNotificationConfiguration(uint16_t handle, uint16_t error);
+
+ virtual void hookSinkNotificationDataChange(am_gen::am_sinkID_t sinkID, am_gen::notificationPayload_s payload);
+
+ virtual void hookSourceNotificationDataChange(am_gen::am_sourceID_t sourceID, am_gen::notificationPayload_s payload);
+
+ virtual void getRoutingReadyState(bool& readyState);
+
+ void gotReady(int16_t numberDomains, uint16_t handle);
+ void gotRundown(int16_t numberDomains, uint16_t handle);
+};
+
+} /* namespace am */
+#endif /* CAMROUTINGSERVICE_H_ */
diff --git a/PluginRoutingInterfaceCAPI/include/configRoutingCAPI.h b/PluginRoutingInterfaceCAPI/include/configRoutingCAPI.h
new file mode 100644
index 0000000..214e75e
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/include/configRoutingCAPI.h
@@ -0,0 +1,6 @@
+#ifndef _ROUTINGDBUS_CONFIG_H
+#define _ROUTINGDBUS_CONFIG_H
+
+/* #undef ROUTING_DBUS_INTROSPECTION_FILE */
+
+#endif /* _ROUTINGDBUS_CONFIG_H */
diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterface.h b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterface.h
new file mode 100644
index 0000000..50ececf
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterface.h
@@ -0,0 +1,66 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_AUDIOMANAGER_Routing_Interface_H_
+#define ORG_GENIVI_AUDIOMANAGER_Routing_Interface_H_
+
+
+
+#define COMMONAPI_INTERNAL_COMPILATION
+
+#include <CommonAPI/types.h>
+
+#undef COMMONAPI_INTERNAL_COMPILATION
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+
+class RoutingInterface {
+ public:
+ virtual ~RoutingInterface() { }
+
+ static inline const char* getInterfaceId();
+ static inline CommonAPI::Version getInterfaceVersion();
+};
+
+const char* RoutingInterface::getInterfaceId() {
+ return "org.genivi.audiomanager.RoutingInterface";
+}
+
+CommonAPI::Version RoutingInterface::getInterfaceVersion() {
+ return CommonAPI::Version(0, 1);
+}
+
+
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
+
+namespace CommonAPI {
+
+}
+
+
+namespace std {
+ //hashes for types
+
+ //hashes for error types
+}
+
+#endif // ORG_GENIVI_AUDIOMANAGER_Routing_Interface_H_
diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceDBusProxy.cpp b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceDBusProxy.cpp
new file mode 100644
index 0000000..2a19ff4
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceDBusProxy.cpp
@@ -0,0 +1,920 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#include "RoutingInterfaceDBusProxy.h"
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+
+std::shared_ptr<CommonAPI::DBus::DBusProxy> createRoutingInterfaceDBusProxy(
+ const std::string& commonApiAddress,
+ const std::string& interfaceName,
+ const std::string& busName,
+ const std::string& objectPath,
+ const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection) {
+ return std::make_shared<RoutingInterfaceDBusProxy>(commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection);
+}
+
+__attribute__((constructor)) void registerRoutingInterfaceDBusProxy(void) {
+ CommonAPI::DBus::DBusFactory::registerProxyFactoryMethod(RoutingInterface::getInterfaceId(),
+ &createRoutingInterfaceDBusProxy);
+}
+
+RoutingInterfaceDBusProxy::RoutingInterfaceDBusProxy(
+ const std::string& commonApiAddress,
+ const std::string& interfaceName,
+ const std::string& busName,
+ const std::string& objectPath,
+ const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection):
+ CommonAPI::DBus::DBusProxy(commonApiAddress, interfaceName, busName, objectPath, dbusProxyconnection)
+, setRoutingReady_(*this, "setRoutingReady", ""),
+ setRoutingRundown_(*this, "setRoutingRundown", "")
+ {
+}
+
+
+RoutingInterfaceDBusProxy::SetRoutingReadyEvent& RoutingInterfaceDBusProxy::getSetRoutingReadyEvent() {
+ return setRoutingReady_;
+}
+RoutingInterfaceDBusProxy::SetRoutingRundownEvent& RoutingInterfaceDBusProxy::getSetRoutingRundownEvent() {
+ return setRoutingRundown_;
+}
+
+void RoutingInterfaceDBusProxy::ackConnect(const uint16_t& handle, const am_gen::am_connectionID_t& connectionID, const uint16_t& error, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, am_gen::am_connectionID_t, uint16_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "ackConnect",
+ "qqq",
+ handle, connectionID, error,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::ackConnectAsync(const uint16_t& handle, const am_gen::am_connectionID_t& connectionID, const uint16_t& error, AckConnectAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, am_gen::am_connectionID_t, uint16_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "ackConnect",
+ "qqq",
+ handle, connectionID, error,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::ackDisconnect(const uint16_t& handle, const am_gen::am_connectionID_t& connectionID, const uint16_t& error, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, am_gen::am_connectionID_t, uint16_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "ackDisconnect",
+ "qqq",
+ handle, connectionID, error,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::ackDisconnectAsync(const uint16_t& handle, const am_gen::am_connectionID_t& connectionID, const uint16_t& error, AckDisconnectAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, am_gen::am_connectionID_t, uint16_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "ackDisconnect",
+ "qqq",
+ handle, connectionID, error,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::ackSetSinkVolume(const uint16_t& handle, const am_gen::am_volume_t& volume, const uint16_t& error, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, am_gen::am_volume_t, uint16_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "ackSetSinkVolume",
+ "qnq",
+ handle, volume, error,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::ackSetSinkVolumeAsync(const uint16_t& handle, const am_gen::am_volume_t& volume, const uint16_t& error, AckSetSinkVolumeAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, am_gen::am_volume_t, uint16_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "ackSetSinkVolume",
+ "qnq",
+ handle, volume, error,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::ackSetSourceVolume(const uint16_t& handle, const am_gen::am_volume_t& volume, const uint16_t& error, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, am_gen::am_volume_t, uint16_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "ackSetSourceVolume",
+ "qnq",
+ handle, volume, error,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::ackSetSourceVolumeAsync(const uint16_t& handle, const am_gen::am_volume_t& volume, const uint16_t& error, AckSetSourceVolumeAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, am_gen::am_volume_t, uint16_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "ackSetSourceVolume",
+ "qnq",
+ handle, volume, error,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::ackSetSourceState(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, uint16_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "ackSetSourceState",
+ "qq",
+ handle, error,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::ackSetSourceStateAsync(const uint16_t& handle, const uint16_t& error, AckSetSourceStateAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, uint16_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "ackSetSourceState",
+ "qq",
+ handle, error,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::ackSetSinkSoundProperties(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, uint16_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "ackSetSinkSoundProperties",
+ "qq",
+ handle, error,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::ackSetSinkSoundPropertiesAsync(const uint16_t& handle, const uint16_t& error, AckSetSinkSoundPropertiesAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, uint16_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "ackSetSinkSoundProperties",
+ "qq",
+ handle, error,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::ackSetSinkSoundProperty(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, uint16_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "ackSetSinkSoundProperty",
+ "qq",
+ handle, error,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::ackSetSinkSoundPropertyAsync(const uint16_t& handle, const uint16_t& error, AckSetSinkSoundPropertyAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, uint16_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "ackSetSinkSoundProperty",
+ "qq",
+ handle, error,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::ackSetSourceSoundProperties(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, uint16_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "ackSetSourceSoundProperties",
+ "qq",
+ handle, error,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::ackSetSourceSoundPropertiesAsync(const uint16_t& handle, const uint16_t& error, AckSetSourceSoundPropertiesAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, uint16_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "ackSetSourceSoundProperties",
+ "qq",
+ handle, error,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::ackSetSourceSoundProperty(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, uint16_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "ackSetSourceSoundProperty",
+ "qq",
+ handle, error,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::ackSetSourceSoundPropertyAsync(const uint16_t& handle, const uint16_t& error, AckSetSourceSoundPropertyAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, uint16_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "ackSetSourceSoundProperty",
+ "qq",
+ handle, error,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::ackSourceVolumeTick(const uint16_t& handle, const am_gen::am_sourceID_t& source, const am_gen::am_volume_t& volume, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, am_gen::am_sourceID_t, am_gen::am_volume_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "ackSourceVolumeTick",
+ "qqn",
+ handle, source, volume,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::ackSourceVolumeTickAsync(const uint16_t& handle, const am_gen::am_sourceID_t& source, const am_gen::am_volume_t& volume, AckSourceVolumeTickAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, am_gen::am_sourceID_t, am_gen::am_volume_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "ackSourceVolumeTick",
+ "qqn",
+ handle, source, volume,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::ackSinkVolumeTick(const uint16_t& handle, const am_gen::am_sinkID_t& sink, const am_gen::am_volume_t& volume, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, am_gen::am_sinkID_t, am_gen::am_volume_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "ackSinkVolumeTick",
+ "qqn",
+ handle, sink, volume,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::ackSinkVolumeTickAsync(const uint16_t& handle, const am_gen::am_sinkID_t& sink, const am_gen::am_volume_t& volume, AckSinkVolumeTickAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, am_gen::am_sinkID_t, am_gen::am_volume_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "ackSinkVolumeTick",
+ "qqn",
+ handle, sink, volume,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::ackCrossFading(const uint16_t& handle, const am_gen::am_HotSink_e& hotSink, const am_gen::am_Error_e& returnError, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, am_gen::am_HotSink_e, am_gen::am_Error_e>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "ackCrossFading",
+ "qii",
+ handle, hotSink, returnError,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::ackCrossFadingAsync(const uint16_t& handle, const am_gen::am_HotSink_e& hotSink, const am_gen::am_Error_e& returnError, AckCrossFadingAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, am_gen::am_HotSink_e, am_gen::am_Error_e>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "ackCrossFading",
+ "qii",
+ handle, hotSink, returnError,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::peekDomain(const std::string& name, CommonAPI::CallStatus& callStatus, am_gen::am_domainID_t& domainID, am_gen::am_Error_e& error) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_domainID_t, am_gen::am_Error_e> >::callMethodWithReply(
+ *this,
+ "peekDomain",
+ "s",
+ name,
+ callStatus
+ , domainID, error);
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::peekDomainAsync(const std::string& name, PeekDomainAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_domainID_t, am_gen::am_Error_e> >::callMethodAsync(
+ *this,
+ "peekDomain",
+ "s",
+ name,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::registerDomain(const am_gen::am_Domain_s& domainData, const std::string& returnBusname, const std::string& returnPath, const std::string& returnInterface, CommonAPI::CallStatus& callStatus, am_gen::am_domainID_t& domainID, am_gen::am_Error_e& error) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_Domain_s, std::string, std::string, std::string>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_domainID_t, am_gen::am_Error_e> >::callMethodWithReply(
+ *this,
+ "registerDomain",
+ "(qsssbbi)sss",
+ domainData, returnBusname, returnPath, returnInterface,
+ callStatus
+ , domainID, error);
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::registerDomainAsync(const am_gen::am_Domain_s& domainData, const std::string& returnBusname, const std::string& returnPath, const std::string& returnInterface, RegisterDomainAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_Domain_s, std::string, std::string, std::string>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_domainID_t, am_gen::am_Error_e> >::callMethodAsync(
+ *this,
+ "registerDomain",
+ "(qsssbbi)sss",
+ domainData, returnBusname, returnPath, returnInterface,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::deregisterDomain(const am_gen::am_domainID_t& domainID, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& returnError) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_domainID_t>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_Error_e> >::callMethodWithReply(
+ *this,
+ "deregisterDomain",
+ "q",
+ domainID,
+ callStatus
+ , returnError);
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::deregisterDomainAsync(const am_gen::am_domainID_t& domainID, DeregisterDomainAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_domainID_t>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_Error_e> >::callMethodAsync(
+ *this,
+ "deregisterDomain",
+ "q",
+ domainID,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::registerGateway(const am_gen::am_Gateway_s& gatewayData, CommonAPI::CallStatus& callStatus, am_gen::am_gatewayID_t& gatewayID, am_gen::am_Error_e& error) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_Gateway_s>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_gatewayID_t, am_gen::am_Error_e> >::callMethodWithReply(
+ *this,
+ "registerGateway",
+ "(qsqqqqqaiaiab)",
+ gatewayData,
+ callStatus
+ , gatewayID, error);
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::registerGatewayAsync(const am_gen::am_Gateway_s& gatewayData, RegisterGatewayAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_Gateway_s>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_gatewayID_t, am_gen::am_Error_e> >::callMethodAsync(
+ *this,
+ "registerGateway",
+ "(qsqqqqqaiaiab)",
+ gatewayData,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::deregisterGateway(const am_gen::am_gatewayID_t& gatewayID, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& returnError) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_gatewayID_t>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_Error_e> >::callMethodWithReply(
+ *this,
+ "deregisterGateway",
+ "q",
+ gatewayID,
+ callStatus
+ , returnError);
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::deregisterGatewayAsync(const am_gen::am_gatewayID_t& gatewayID, DeregisterGatewayAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_gatewayID_t>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_Error_e> >::callMethodAsync(
+ *this,
+ "deregisterGateway",
+ "q",
+ gatewayID,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::peekSink(const std::string& name, CommonAPI::CallStatus& callStatus, am_gen::am_sinkID_t& sinkID, am_gen::am_Error_e& error) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_sinkID_t, am_gen::am_Error_e> >::callMethodWithReply(
+ *this,
+ "peekSink",
+ "s",
+ name,
+ callStatus
+ , sinkID, error);
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::peekSinkAsync(const std::string& name, PeekSinkAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_sinkID_t, am_gen::am_Error_e> >::callMethodAsync(
+ *this,
+ "peekSink",
+ "s",
+ name,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::registerSink(const am_gen::sinkData_s& sinkData, CommonAPI::CallStatus& callStatus, am_gen::am_sinkID_t& sinkID, am_gen::am_Error_e& error) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::sinkData_s>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_sinkID_t, am_gen::am_Error_e> >::callMethodWithReply(
+ *this,
+ "registerSink",
+ "(qsqqnb(ii)ina(in)aia(in)a(iin)a(iin))",
+ sinkData,
+ callStatus
+ , sinkID, error);
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::registerSinkAsync(const am_gen::sinkData_s& sinkData, RegisterSinkAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::sinkData_s>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_sinkID_t, am_gen::am_Error_e> >::callMethodAsync(
+ *this,
+ "registerSink",
+ "(qsqqnb(ii)ina(in)aia(in)a(iin)a(iin))",
+ sinkData,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::deregisterSink(const am_gen::am_sinkID_t& sinkID, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& returnError) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_sinkID_t>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_Error_e> >::callMethodWithReply(
+ *this,
+ "deregisterSink",
+ "q",
+ sinkID,
+ callStatus
+ , returnError);
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::deregisterSinkAsync(const am_gen::am_sinkID_t& sinkID, DeregisterSinkAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_sinkID_t>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_Error_e> >::callMethodAsync(
+ *this,
+ "deregisterSink",
+ "q",
+ sinkID,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::peekSource(const std::string& name, CommonAPI::CallStatus& callStatus, am_gen::am_sourceID_t& sourceID, am_gen::am_Error_e& error) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_sourceID_t, am_gen::am_Error_e> >::callMethodWithReply(
+ *this,
+ "peekSource",
+ "s",
+ name,
+ callStatus
+ , sourceID, error);
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::peekSourceAsync(const std::string& name, PeekSourceAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_sourceID_t, am_gen::am_Error_e> >::callMethodAsync(
+ *this,
+ "peekSource",
+ "s",
+ name,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::registerSource(const am_gen::sourceData_s& sourceData, CommonAPI::CallStatus& callStatus, am_gen::am_sourceID_t& sourceID, am_gen::am_Error_e& error) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::sourceData_s>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_sourceID_t, am_gen::am_Error_e> >::callMethodWithReply(
+ *this,
+ "registerSource",
+ "(qqsqinb(ii)ia(in)aia(in)a(iin)a(iin))",
+ sourceData,
+ callStatus
+ , sourceID, error);
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::registerSourceAsync(const am_gen::sourceData_s& sourceData, RegisterSourceAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::sourceData_s>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_sourceID_t, am_gen::am_Error_e> >::callMethodAsync(
+ *this,
+ "registerSource",
+ "(qqsqinb(ii)ia(in)aia(in)a(iin)a(iin))",
+ sourceData,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::deregisterSource(const am_gen::am_sourceID_t& sourceID, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& returnError) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_sourceID_t>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_Error_e> >::callMethodWithReply(
+ *this,
+ "deregisterSource",
+ "q",
+ sourceID,
+ callStatus
+ , returnError);
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::deregisterSourceAsync(const am_gen::am_sourceID_t& sourceID, DeregisterSourceAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_sourceID_t>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_Error_e> >::callMethodAsync(
+ *this,
+ "deregisterSource",
+ "q",
+ sourceID,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::registerCrossfader(const am_gen::crossfaderData_s& crossfaderData, CommonAPI::CallStatus& callStatus, am_gen::am_crossfaderID_t& crossfaderID, am_gen::am_Error_e& error) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::crossfaderData_s>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_crossfaderID_t, am_gen::am_Error_e> >::callMethodWithReply(
+ *this,
+ "registerCrossfader",
+ "(qsqqqi)",
+ crossfaderData,
+ callStatus
+ , crossfaderID, error);
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::registerCrossfaderAsync(const am_gen::crossfaderData_s& crossfaderData, RegisterCrossfaderAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::crossfaderData_s>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_crossfaderID_t, am_gen::am_Error_e> >::callMethodAsync(
+ *this,
+ "registerCrossfader",
+ "(qsqqqi)",
+ crossfaderData,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::deregisterCrossfader(const am_gen::am_crossfaderID_t& crossfaderID, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& returnError) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_crossfaderID_t>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_Error_e> >::callMethodWithReply(
+ *this,
+ "deregisterCrossfader",
+ "q",
+ crossfaderID,
+ callStatus
+ , returnError);
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::deregisterCrossfaderAsync(const am_gen::am_crossfaderID_t& crossfaderID, DeregisterCrossfaderAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_crossfaderID_t>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_Error_e> >::callMethodAsync(
+ *this,
+ "deregisterCrossfader",
+ "q",
+ crossfaderID,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::peekSourceClassID(const std::string& name, CommonAPI::CallStatus& callStatus, am_gen::am_sourceClass_t& sourceClassID, am_gen::am_Error_e& error) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_sourceClass_t, am_gen::am_Error_e> >::callMethodWithReply(
+ *this,
+ "peekSourceClassID",
+ "s",
+ name,
+ callStatus
+ , sourceClassID, error);
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::peekSourceClassIDAsync(const std::string& name, PeekSourceClassIDAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_sourceClass_t, am_gen::am_Error_e> >::callMethodAsync(
+ *this,
+ "peekSourceClassID",
+ "s",
+ name,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::peekSinkClassID(const std::string& name, CommonAPI::CallStatus& callStatus, am_gen::am_sinkClass_t& sinkClassID, am_gen::am_Error_e& error) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_sinkClass_t, am_gen::am_Error_e> >::callMethodWithReply(
+ *this,
+ "peekSinkClassID",
+ "s",
+ name,
+ callStatus
+ , sinkClassID, error);
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::peekSinkClassIDAsync(const std::string& name, PeekSinkClassIDAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_sinkClass_t, am_gen::am_Error_e> >::callMethodAsync(
+ *this,
+ "peekSinkClassID",
+ "s",
+ name,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::hookInterruptStatusChange(const am_gen::am_sourceID_t& sourceID, const uint16_t& interruptState, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_sourceID_t, uint16_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "hookInterruptStatusChange",
+ "qq",
+ sourceID, interruptState,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::hookInterruptStatusChangeAsync(const am_gen::am_sourceID_t& sourceID, const uint16_t& interruptState, HookInterruptStatusChangeAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_sourceID_t, uint16_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "hookInterruptStatusChange",
+ "qq",
+ sourceID, interruptState,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::hookDomainRegistrationComplete(const am_gen::am_domainID_t& domainID, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_domainID_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "hookDomainRegistrationComplete",
+ "q",
+ domainID,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::hookDomainRegistrationCompleteAsync(const am_gen::am_domainID_t& domainID, HookDomainRegistrationCompleteAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_domainID_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "hookDomainRegistrationComplete",
+ "q",
+ domainID,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::hookSinkAvailablityStatusChange(const am_gen::am_sinkID_t& sinkID, const am_gen::am_Availability_s& availability, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_sinkID_t, am_gen::am_Availability_s>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "hookSinkAvailablityStatusChange",
+ "q(ii)",
+ sinkID, availability,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::hookSinkAvailablityStatusChangeAsync(const am_gen::am_sinkID_t& sinkID, const am_gen::am_Availability_s& availability, HookSinkAvailablityStatusChangeAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_sinkID_t, am_gen::am_Availability_s>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "hookSinkAvailablityStatusChange",
+ "q(ii)",
+ sinkID, availability,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::hookSourceAvailablityStatusChange(const am_gen::am_sourceID_t& sourceID, const am_gen::am_Availability_s& availability, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_sourceID_t, am_gen::am_Availability_s>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "hookSourceAvailablityStatusChange",
+ "q(ii)",
+ sourceID, availability,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::hookSourceAvailablityStatusChangeAsync(const am_gen::am_sourceID_t& sourceID, const am_gen::am_Availability_s& availability, HookSourceAvailablityStatusChangeAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_sourceID_t, am_gen::am_Availability_s>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "hookSourceAvailablityStatusChange",
+ "q(ii)",
+ sourceID, availability,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::hookDomainStateChange(const am_gen::am_domainID_t& domainID, const am_gen::am_DomainState_e& domainState, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_domainID_t, am_gen::am_DomainState_e>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "hookDomainStateChange",
+ "qi",
+ domainID, domainState,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::hookDomainStateChangeAsync(const am_gen::am_domainID_t& domainID, const am_gen::am_DomainState_e& domainState, HookDomainStateChangeAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_domainID_t, am_gen::am_DomainState_e>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "hookDomainStateChange",
+ "qi",
+ domainID, domainState,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::hookTimingInformationChanged(const am_gen::am_connectionID_t& connectionID, const int16_t& delay, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_connectionID_t, int16_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "hookTimingInformationChanged",
+ "qn",
+ connectionID, delay,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::hookTimingInformationChangedAsync(const am_gen::am_connectionID_t& connectionID, const int16_t& delay, HookTimingInformationChangedAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_connectionID_t, int16_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "hookTimingInformationChanged",
+ "qn",
+ connectionID, delay,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::sendChangedData(const am_gen::am_EarlyData_l& earlyData_volumes, const am_gen::am_EarlyData_l& earlyData_soundproperties, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_EarlyData_l, am_gen::am_EarlyData_l>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "sendChangedData",
+ "a(i(yv)(yv))a(i(yv)(yv))",
+ earlyData_volumes, earlyData_soundproperties,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::sendChangedDataAsync(const am_gen::am_EarlyData_l& earlyData_volumes, const am_gen::am_EarlyData_l& earlyData_soundproperties, SendChangedDataAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_EarlyData_l, am_gen::am_EarlyData_l>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "sendChangedData",
+ "a(i(yv)(yv))a(i(yv)(yv))",
+ earlyData_volumes, earlyData_soundproperties,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::confirmRoutingReady(const am_gen::am_domainID_t& domainID, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_domainID_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "confirmRoutingReady",
+ "q",
+ domainID,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::confirmRoutingReadyAsync(const am_gen::am_domainID_t& domainID, ConfirmRoutingReadyAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_domainID_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "confirmRoutingReady",
+ "q",
+ domainID,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::confirmRoutingRundown(const am_gen::am_domainID_t& domainID, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_domainID_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "confirmRoutingRundown",
+ "q",
+ domainID,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::confirmRoutingRundownAsync(const am_gen::am_domainID_t& domainID, ConfirmRoutingRundownAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_domainID_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "confirmRoutingRundown",
+ "q",
+ domainID,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::updateGateway(const am_gen::am_gatewayID_t& gatewayID, const am_gen::am_ConnectionFormat_L& listSourceFormats, const am_gen::am_ConnectionFormat_L& listSinkFormats, const am_gen::bool_L& convertionMatrix, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_gatewayID_t, am_gen::am_ConnectionFormat_L, am_gen::am_ConnectionFormat_L, am_gen::bool_L>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "updateGateway",
+ "qaiaiab",
+ gatewayID, listSourceFormats, listSinkFormats, convertionMatrix,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::updateGatewayAsync(const am_gen::am_gatewayID_t& gatewayID, const am_gen::am_ConnectionFormat_L& listSourceFormats, const am_gen::am_ConnectionFormat_L& listSinkFormats, const am_gen::bool_L& convertionMatrix, UpdateGatewayAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_gatewayID_t, am_gen::am_ConnectionFormat_L, am_gen::am_ConnectionFormat_L, am_gen::bool_L>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "updateGateway",
+ "qaiaiab",
+ gatewayID, listSourceFormats, listSinkFormats, convertionMatrix,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::updateSink(const am_gen::am_sinkID_t& sinkID, const am_gen::am_sinkClass_t& sinkClassID, const am_gen::am_SoundProperty_L& listSoundProperties, const am_gen::am_ConnectionFormat_L& listConnectionFormats, const am_gen::am_MainSoundProperty_L& listMainSoundProperties, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_sinkID_t, am_gen::am_sinkClass_t, am_gen::am_SoundProperty_L, am_gen::am_ConnectionFormat_L, am_gen::am_MainSoundProperty_L>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "updateSink",
+ "qqa(in)aia(in)",
+ sinkID, sinkClassID, listSoundProperties, listConnectionFormats, listMainSoundProperties,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::updateSinkAsync(const am_gen::am_sinkID_t& sinkID, const am_gen::am_sinkClass_t& sinkClassID, const am_gen::am_SoundProperty_L& listSoundProperties, const am_gen::am_ConnectionFormat_L& listConnectionFormats, const am_gen::am_MainSoundProperty_L& listMainSoundProperties, UpdateSinkAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_sinkID_t, am_gen::am_sinkClass_t, am_gen::am_SoundProperty_L, am_gen::am_ConnectionFormat_L, am_gen::am_MainSoundProperty_L>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "updateSink",
+ "qqa(in)aia(in)",
+ sinkID, sinkClassID, listSoundProperties, listConnectionFormats, listMainSoundProperties,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::updateSource(const am_gen::am_sourceID_t& sourceID, const am_gen::am_sourceClass_t& sourceClassID, const am_gen::am_SoundProperty_L& listSoundProperties, const am_gen::am_ConnectionFormat_L& listConnectionFormats, const am_gen::am_MainSoundProperty_L& listMainSoundProperties, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_sourceID_t, am_gen::am_sourceClass_t, am_gen::am_SoundProperty_L, am_gen::am_ConnectionFormat_L, am_gen::am_MainSoundProperty_L>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "updateSource",
+ "qqa(in)aia(in)",
+ sourceID, sourceClassID, listSoundProperties, listConnectionFormats, listMainSoundProperties,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::updateSourceAsync(const am_gen::am_sourceID_t& sourceID, const am_gen::am_sourceClass_t& sourceClassID, const am_gen::am_SoundProperty_L& listSoundProperties, const am_gen::am_ConnectionFormat_L& listConnectionFormats, const am_gen::am_MainSoundProperty_L& listMainSoundProperties, UpdateSourceAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_sourceID_t, am_gen::am_sourceClass_t, am_gen::am_SoundProperty_L, am_gen::am_ConnectionFormat_L, am_gen::am_MainSoundProperty_L>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "updateSource",
+ "qqa(in)aia(in)",
+ sourceID, sourceClassID, listSoundProperties, listConnectionFormats, listMainSoundProperties,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::ackSetVolumes(const uint16_t& handle, const am_gen::am_Volumes_l& listVolumes, const uint16_t& error, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, am_gen::am_Volumes_l, uint16_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "ackSetVolumes",
+ "qa(i(yv)niq)q",
+ handle, listVolumes, error,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::ackSetVolumesAsync(const uint16_t& handle, const am_gen::am_Volumes_l& listVolumes, const uint16_t& error, AckSetVolumesAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, am_gen::am_Volumes_l, uint16_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "ackSetVolumes",
+ "qa(i(yv)niq)q",
+ handle, listVolumes, error,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::ackSinkNotificationConfiguration(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, uint16_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "ackSinkNotificationConfiguration",
+ "qq",
+ handle, error,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::ackSinkNotificationConfigurationAsync(const uint16_t& handle, const uint16_t& error, AckSinkNotificationConfigurationAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, uint16_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "ackSinkNotificationConfiguration",
+ "qq",
+ handle, error,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::ackSourceNotificationConfiguration(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, uint16_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "ackSourceNotificationConfiguration",
+ "qq",
+ handle, error,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::ackSourceNotificationConfigurationAsync(const uint16_t& handle, const uint16_t& error, AckSourceNotificationConfigurationAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, uint16_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "ackSourceNotificationConfiguration",
+ "qq",
+ handle, error,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::hookSinkNotificationDataChange(const am_gen::am_sinkID_t& sinkID, const am_gen::notificationPayload_s& payload, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_sinkID_t, am_gen::notificationPayload_s>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "hookSinkNotificationDataChange",
+ "q(nn)",
+ sinkID, payload,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::hookSinkNotificationDataChangeAsync(const am_gen::am_sinkID_t& sinkID, const am_gen::notificationPayload_s& payload, HookSinkNotificationDataChangeAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_sinkID_t, am_gen::notificationPayload_s>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "hookSinkNotificationDataChange",
+ "q(nn)",
+ sinkID, payload,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::hookSourceNotificationDataChange(const am_gen::am_sourceID_t& sourceID, const am_gen::notificationPayload_s& payload, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_sourceID_t, am_gen::notificationPayload_s>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "hookSourceNotificationDataChange",
+ "q(nn)",
+ sourceID, payload,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::hookSourceNotificationDataChangeAsync(const am_gen::am_sourceID_t& sourceID, const am_gen::notificationPayload_s& payload, HookSourceNotificationDataChangeAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_sourceID_t, am_gen::notificationPayload_s>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "hookSourceNotificationDataChange",
+ "q(nn)",
+ sourceID, payload,
+ std::move(callback));
+}
+void RoutingInterfaceDBusProxy::getRoutingReadyState(CommonAPI::CallStatus& callStatus, bool& readyState) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>,
+ CommonAPI::DBus::DBusSerializableArguments<bool> >::callMethodWithReply(
+ *this,
+ "getRoutingReadyState",
+ "",
+ callStatus
+ , readyState);
+}
+std::future<CommonAPI::CallStatus> RoutingInterfaceDBusProxy::getRoutingReadyStateAsync(GetRoutingReadyStateAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>,
+ CommonAPI::DBus::DBusSerializableArguments<bool> >::callMethodAsync(
+ *this,
+ "getRoutingReadyState",
+ "",
+ std::move(callback));
+}
+
+void RoutingInterfaceDBusProxy::getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const {
+ ownVersionMajor = 0;
+ ownVersionMinor = 1;
+}
+
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceDBusProxy.h b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceDBusProxy.h
new file mode 100644
index 0000000..893d736
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceDBusProxy.h
@@ -0,0 +1,201 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_AUDIOMANAGER_Routing_Interface_DBUS_PROXY_H_
+#define ORG_GENIVI_AUDIOMANAGER_Routing_Interface_DBUS_PROXY_H_
+
+#include <org/genivi/audiomanager/RoutingInterfaceProxyBase.h>
+
+#define COMMONAPI_INTERNAL_COMPILATION
+
+#include <CommonAPI/DBus/DBusFactory.h>
+#include <CommonAPI/DBus/DBusProxy.h>
+#include <CommonAPI/DBus/DBusEvent.h>
+
+#undef COMMONAPI_INTERNAL_COMPILATION
+
+#include <string>
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+
+class RoutingInterfaceDBusProxy: virtual public RoutingInterfaceProxyBase, virtual public CommonAPI::DBus::DBusProxy {
+ public:
+ RoutingInterfaceDBusProxy(
+ const std::string& commonApiAddress,
+ const std::string& interfaceName,
+ const std::string& busName,
+ const std::string& objectPath,
+ const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection);
+
+ virtual ~RoutingInterfaceDBusProxy() { }
+
+
+ virtual SetRoutingReadyEvent& getSetRoutingReadyEvent();
+ virtual SetRoutingRundownEvent& getSetRoutingRundownEvent();
+
+
+ virtual void ackConnect(const uint16_t& handle, const am_gen::am_connectionID_t& connectionID, const uint16_t& error, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> ackConnectAsync(const uint16_t& handle, const am_gen::am_connectionID_t& connectionID, const uint16_t& error, AckConnectAsyncCallback callback);
+
+ virtual void ackDisconnect(const uint16_t& handle, const am_gen::am_connectionID_t& connectionID, const uint16_t& error, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> ackDisconnectAsync(const uint16_t& handle, const am_gen::am_connectionID_t& connectionID, const uint16_t& error, AckDisconnectAsyncCallback callback);
+
+ virtual void ackSetSinkVolume(const uint16_t& handle, const am_gen::am_volume_t& volume, const uint16_t& error, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> ackSetSinkVolumeAsync(const uint16_t& handle, const am_gen::am_volume_t& volume, const uint16_t& error, AckSetSinkVolumeAsyncCallback callback);
+
+ virtual void ackSetSourceVolume(const uint16_t& handle, const am_gen::am_volume_t& volume, const uint16_t& error, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> ackSetSourceVolumeAsync(const uint16_t& handle, const am_gen::am_volume_t& volume, const uint16_t& error, AckSetSourceVolumeAsyncCallback callback);
+
+ virtual void ackSetSourceState(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> ackSetSourceStateAsync(const uint16_t& handle, const uint16_t& error, AckSetSourceStateAsyncCallback callback);
+
+ virtual void ackSetSinkSoundProperties(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> ackSetSinkSoundPropertiesAsync(const uint16_t& handle, const uint16_t& error, AckSetSinkSoundPropertiesAsyncCallback callback);
+
+ virtual void ackSetSinkSoundProperty(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> ackSetSinkSoundPropertyAsync(const uint16_t& handle, const uint16_t& error, AckSetSinkSoundPropertyAsyncCallback callback);
+
+ virtual void ackSetSourceSoundProperties(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> ackSetSourceSoundPropertiesAsync(const uint16_t& handle, const uint16_t& error, AckSetSourceSoundPropertiesAsyncCallback callback);
+
+ virtual void ackSetSourceSoundProperty(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> ackSetSourceSoundPropertyAsync(const uint16_t& handle, const uint16_t& error, AckSetSourceSoundPropertyAsyncCallback callback);
+
+ virtual void ackSourceVolumeTick(const uint16_t& handle, const am_gen::am_sourceID_t& source, const am_gen::am_volume_t& volume, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> ackSourceVolumeTickAsync(const uint16_t& handle, const am_gen::am_sourceID_t& source, const am_gen::am_volume_t& volume, AckSourceVolumeTickAsyncCallback callback);
+
+ virtual void ackSinkVolumeTick(const uint16_t& handle, const am_gen::am_sinkID_t& sink, const am_gen::am_volume_t& volume, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> ackSinkVolumeTickAsync(const uint16_t& handle, const am_gen::am_sinkID_t& sink, const am_gen::am_volume_t& volume, AckSinkVolumeTickAsyncCallback callback);
+
+ virtual void ackCrossFading(const uint16_t& handle, const am_gen::am_HotSink_e& hotSink, const am_gen::am_Error_e& returnError, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> ackCrossFadingAsync(const uint16_t& handle, const am_gen::am_HotSink_e& hotSink, const am_gen::am_Error_e& returnError, AckCrossFadingAsyncCallback callback);
+
+ virtual void peekDomain(const std::string& name, CommonAPI::CallStatus& callStatus, am_gen::am_domainID_t& domainID, am_gen::am_Error_e& error);
+ virtual std::future<CommonAPI::CallStatus> peekDomainAsync(const std::string& name, PeekDomainAsyncCallback callback);
+
+ virtual void registerDomain(const am_gen::am_Domain_s& domainData, const std::string& returnBusname, const std::string& returnPath, const std::string& returnInterface, CommonAPI::CallStatus& callStatus, am_gen::am_domainID_t& domainID, am_gen::am_Error_e& error);
+ virtual std::future<CommonAPI::CallStatus> registerDomainAsync(const am_gen::am_Domain_s& domainData, const std::string& returnBusname, const std::string& returnPath, const std::string& returnInterface, RegisterDomainAsyncCallback callback);
+
+ virtual void deregisterDomain(const am_gen::am_domainID_t& domainID, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& returnError);
+ virtual std::future<CommonAPI::CallStatus> deregisterDomainAsync(const am_gen::am_domainID_t& domainID, DeregisterDomainAsyncCallback callback);
+
+ virtual void registerGateway(const am_gen::am_Gateway_s& gatewayData, CommonAPI::CallStatus& callStatus, am_gen::am_gatewayID_t& gatewayID, am_gen::am_Error_e& error);
+ virtual std::future<CommonAPI::CallStatus> registerGatewayAsync(const am_gen::am_Gateway_s& gatewayData, RegisterGatewayAsyncCallback callback);
+
+ virtual void deregisterGateway(const am_gen::am_gatewayID_t& gatewayID, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& returnError);
+ virtual std::future<CommonAPI::CallStatus> deregisterGatewayAsync(const am_gen::am_gatewayID_t& gatewayID, DeregisterGatewayAsyncCallback callback);
+
+ virtual void peekSink(const std::string& name, CommonAPI::CallStatus& callStatus, am_gen::am_sinkID_t& sinkID, am_gen::am_Error_e& error);
+ virtual std::future<CommonAPI::CallStatus> peekSinkAsync(const std::string& name, PeekSinkAsyncCallback callback);
+
+ virtual void registerSink(const am_gen::sinkData_s& sinkData, CommonAPI::CallStatus& callStatus, am_gen::am_sinkID_t& sinkID, am_gen::am_Error_e& error);
+ virtual std::future<CommonAPI::CallStatus> registerSinkAsync(const am_gen::sinkData_s& sinkData, RegisterSinkAsyncCallback callback);
+
+ virtual void deregisterSink(const am_gen::am_sinkID_t& sinkID, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& returnError);
+ virtual std::future<CommonAPI::CallStatus> deregisterSinkAsync(const am_gen::am_sinkID_t& sinkID, DeregisterSinkAsyncCallback callback);
+
+ virtual void peekSource(const std::string& name, CommonAPI::CallStatus& callStatus, am_gen::am_sourceID_t& sourceID, am_gen::am_Error_e& error);
+ virtual std::future<CommonAPI::CallStatus> peekSourceAsync(const std::string& name, PeekSourceAsyncCallback callback);
+
+ virtual void registerSource(const am_gen::sourceData_s& sourceData, CommonAPI::CallStatus& callStatus, am_gen::am_sourceID_t& sourceID, am_gen::am_Error_e& error);
+ virtual std::future<CommonAPI::CallStatus> registerSourceAsync(const am_gen::sourceData_s& sourceData, RegisterSourceAsyncCallback callback);
+
+ virtual void deregisterSource(const am_gen::am_sourceID_t& sourceID, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& returnError);
+ virtual std::future<CommonAPI::CallStatus> deregisterSourceAsync(const am_gen::am_sourceID_t& sourceID, DeregisterSourceAsyncCallback callback);
+
+ virtual void registerCrossfader(const am_gen::crossfaderData_s& crossfaderData, CommonAPI::CallStatus& callStatus, am_gen::am_crossfaderID_t& crossfaderID, am_gen::am_Error_e& error);
+ virtual std::future<CommonAPI::CallStatus> registerCrossfaderAsync(const am_gen::crossfaderData_s& crossfaderData, RegisterCrossfaderAsyncCallback callback);
+
+ virtual void deregisterCrossfader(const am_gen::am_crossfaderID_t& crossfaderID, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& returnError);
+ virtual std::future<CommonAPI::CallStatus> deregisterCrossfaderAsync(const am_gen::am_crossfaderID_t& crossfaderID, DeregisterCrossfaderAsyncCallback callback);
+
+ virtual void peekSourceClassID(const std::string& name, CommonAPI::CallStatus& callStatus, am_gen::am_sourceClass_t& sourceClassID, am_gen::am_Error_e& error);
+ virtual std::future<CommonAPI::CallStatus> peekSourceClassIDAsync(const std::string& name, PeekSourceClassIDAsyncCallback callback);
+
+ virtual void peekSinkClassID(const std::string& name, CommonAPI::CallStatus& callStatus, am_gen::am_sinkClass_t& sinkClassID, am_gen::am_Error_e& error);
+ virtual std::future<CommonAPI::CallStatus> peekSinkClassIDAsync(const std::string& name, PeekSinkClassIDAsyncCallback callback);
+
+ virtual void hookInterruptStatusChange(const am_gen::am_sourceID_t& sourceID, const uint16_t& interruptState, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> hookInterruptStatusChangeAsync(const am_gen::am_sourceID_t& sourceID, const uint16_t& interruptState, HookInterruptStatusChangeAsyncCallback callback);
+
+ virtual void hookDomainRegistrationComplete(const am_gen::am_domainID_t& domainID, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> hookDomainRegistrationCompleteAsync(const am_gen::am_domainID_t& domainID, HookDomainRegistrationCompleteAsyncCallback callback);
+
+ virtual void hookSinkAvailablityStatusChange(const am_gen::am_sinkID_t& sinkID, const am_gen::am_Availability_s& availability, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> hookSinkAvailablityStatusChangeAsync(const am_gen::am_sinkID_t& sinkID, const am_gen::am_Availability_s& availability, HookSinkAvailablityStatusChangeAsyncCallback callback);
+
+ virtual void hookSourceAvailablityStatusChange(const am_gen::am_sourceID_t& sourceID, const am_gen::am_Availability_s& availability, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> hookSourceAvailablityStatusChangeAsync(const am_gen::am_sourceID_t& sourceID, const am_gen::am_Availability_s& availability, HookSourceAvailablityStatusChangeAsyncCallback callback);
+
+ virtual void hookDomainStateChange(const am_gen::am_domainID_t& domainID, const am_gen::am_DomainState_e& domainState, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> hookDomainStateChangeAsync(const am_gen::am_domainID_t& domainID, const am_gen::am_DomainState_e& domainState, HookDomainStateChangeAsyncCallback callback);
+
+ virtual void hookTimingInformationChanged(const am_gen::am_connectionID_t& connectionID, const int16_t& delay, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> hookTimingInformationChangedAsync(const am_gen::am_connectionID_t& connectionID, const int16_t& delay, HookTimingInformationChangedAsyncCallback callback);
+
+ virtual void sendChangedData(const am_gen::am_EarlyData_l& earlyData_volumes, const am_gen::am_EarlyData_l& earlyData_soundproperties, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> sendChangedDataAsync(const am_gen::am_EarlyData_l& earlyData_volumes, const am_gen::am_EarlyData_l& earlyData_soundproperties, SendChangedDataAsyncCallback callback);
+
+ virtual void confirmRoutingReady(const am_gen::am_domainID_t& domainID, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> confirmRoutingReadyAsync(const am_gen::am_domainID_t& domainID, ConfirmRoutingReadyAsyncCallback callback);
+
+ virtual void confirmRoutingRundown(const am_gen::am_domainID_t& domainID, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> confirmRoutingRundownAsync(const am_gen::am_domainID_t& domainID, ConfirmRoutingRundownAsyncCallback callback);
+
+ virtual void updateGateway(const am_gen::am_gatewayID_t& gatewayID, const am_gen::am_ConnectionFormat_L& listSourceFormats, const am_gen::am_ConnectionFormat_L& listSinkFormats, const am_gen::bool_L& convertionMatrix, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> updateGatewayAsync(const am_gen::am_gatewayID_t& gatewayID, const am_gen::am_ConnectionFormat_L& listSourceFormats, const am_gen::am_ConnectionFormat_L& listSinkFormats, const am_gen::bool_L& convertionMatrix, UpdateGatewayAsyncCallback callback);
+
+ virtual void updateSink(const am_gen::am_sinkID_t& sinkID, const am_gen::am_sinkClass_t& sinkClassID, const am_gen::am_SoundProperty_L& listSoundProperties, const am_gen::am_ConnectionFormat_L& listConnectionFormats, const am_gen::am_MainSoundProperty_L& listMainSoundProperties, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> updateSinkAsync(const am_gen::am_sinkID_t& sinkID, const am_gen::am_sinkClass_t& sinkClassID, const am_gen::am_SoundProperty_L& listSoundProperties, const am_gen::am_ConnectionFormat_L& listConnectionFormats, const am_gen::am_MainSoundProperty_L& listMainSoundProperties, UpdateSinkAsyncCallback callback);
+
+ virtual void updateSource(const am_gen::am_sourceID_t& sourceID, const am_gen::am_sourceClass_t& sourceClassID, const am_gen::am_SoundProperty_L& listSoundProperties, const am_gen::am_ConnectionFormat_L& listConnectionFormats, const am_gen::am_MainSoundProperty_L& listMainSoundProperties, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> updateSourceAsync(const am_gen::am_sourceID_t& sourceID, const am_gen::am_sourceClass_t& sourceClassID, const am_gen::am_SoundProperty_L& listSoundProperties, const am_gen::am_ConnectionFormat_L& listConnectionFormats, const am_gen::am_MainSoundProperty_L& listMainSoundProperties, UpdateSourceAsyncCallback callback);
+
+ virtual void ackSetVolumes(const uint16_t& handle, const am_gen::am_Volumes_l& listVolumes, const uint16_t& error, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> ackSetVolumesAsync(const uint16_t& handle, const am_gen::am_Volumes_l& listVolumes, const uint16_t& error, AckSetVolumesAsyncCallback callback);
+
+ virtual void ackSinkNotificationConfiguration(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> ackSinkNotificationConfigurationAsync(const uint16_t& handle, const uint16_t& error, AckSinkNotificationConfigurationAsyncCallback callback);
+
+ virtual void ackSourceNotificationConfiguration(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> ackSourceNotificationConfigurationAsync(const uint16_t& handle, const uint16_t& error, AckSourceNotificationConfigurationAsyncCallback callback);
+
+ virtual void hookSinkNotificationDataChange(const am_gen::am_sinkID_t& sinkID, const am_gen::notificationPayload_s& payload, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> hookSinkNotificationDataChangeAsync(const am_gen::am_sinkID_t& sinkID, const am_gen::notificationPayload_s& payload, HookSinkNotificationDataChangeAsyncCallback callback);
+
+ virtual void hookSourceNotificationDataChange(const am_gen::am_sourceID_t& sourceID, const am_gen::notificationPayload_s& payload, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> hookSourceNotificationDataChangeAsync(const am_gen::am_sourceID_t& sourceID, const am_gen::notificationPayload_s& payload, HookSourceNotificationDataChangeAsyncCallback callback);
+
+ virtual void getRoutingReadyState(CommonAPI::CallStatus& callStatus, bool& readyState);
+ virtual std::future<CommonAPI::CallStatus> getRoutingReadyStateAsync(GetRoutingReadyStateAsyncCallback callback);
+
+ virtual void getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const;
+
+ private:
+
+ CommonAPI::DBus::DBusEvent<SetRoutingReadyEvent> setRoutingReady_;
+ CommonAPI::DBus::DBusEvent<SetRoutingRundownEvent> setRoutingRundown_;
+};
+
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
+
+#endif // ORG_GENIVI_AUDIOMANAGER_Routing_Interface_DBUS_PROXY_H_
diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceDBusStubAdapter.cpp b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceDBusStubAdapter.cpp
new file mode 100644
index 0000000..19ef262
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceDBusStubAdapter.cpp
@@ -0,0 +1,562 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#include "RoutingInterfaceDBusStubAdapter.h"
+#include <org/genivi/audiomanager/RoutingInterface.h>
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+
+std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> createRoutingInterfaceDBusStubAdapter(
+ const std::string& commonApiAddress,
+ const std::string& interfaceName,
+ const std::string& busName,
+ const std::string& objectPath,
+ const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection,
+ const std::shared_ptr<CommonAPI::StubBase>& stubBase) {
+ return std::make_shared<RoutingInterfaceDBusStubAdapter>(commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection, stubBase);
+}
+
+__attribute__((constructor)) void registerRoutingInterfaceDBusStubAdapter(void) {
+ CommonAPI::DBus::DBusFactory::registerAdapterFactoryMethod(RoutingInterface::getInterfaceId(),
+ &createRoutingInterfaceDBusStubAdapter);
+}
+
+RoutingInterfaceDBusStubAdapter::RoutingInterfaceDBusStubAdapter(
+ const std::string& commonApiAddress,
+ const std::string& dbusInterfaceName,
+ const std::string& dbusBusName,
+ const std::string& dbusObjectPath,
+ const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
+ const std::shared_ptr<CommonAPI::StubBase>& stub):
+ RoutingInterfaceDBusStubAdapterHelper(commonApiAddress, dbusInterfaceName, dbusBusName, dbusObjectPath, dbusConnection, std::dynamic_pointer_cast<RoutingInterfaceStub>(stub)) {
+}
+
+const char* RoutingInterfaceDBusStubAdapter::getMethodsDBusIntrospectionXmlData() const {
+ return
+ "<signal name=\"setRoutingReady\">\n"
+ "</signal>\n"
+ "<signal name=\"setRoutingRundown\">\n"
+ "</signal>\n"
+ "<method name=\"ackConnect\">\n"
+ "<arg name=\"handle\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"connectionID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"error\" type=\"q\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"ackDisconnect\">\n"
+ "<arg name=\"handle\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"connectionID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"error\" type=\"q\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"ackSetSinkVolume\">\n"
+ "<arg name=\"handle\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"volume\" type=\"n\" direction=\"in\" />\n"
+ "<arg name=\"error\" type=\"q\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"ackSetSourceVolume\">\n"
+ "<arg name=\"handle\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"volume\" type=\"n\" direction=\"in\" />\n"
+ "<arg name=\"error\" type=\"q\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"ackSetSourceState\">\n"
+ "<arg name=\"handle\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"error\" type=\"q\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"ackSetSinkSoundProperties\">\n"
+ "<arg name=\"handle\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"error\" type=\"q\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"ackSetSinkSoundProperty\">\n"
+ "<arg name=\"handle\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"error\" type=\"q\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"ackSetSourceSoundProperties\">\n"
+ "<arg name=\"handle\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"error\" type=\"q\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"ackSetSourceSoundProperty\">\n"
+ "<arg name=\"handle\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"error\" type=\"q\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"ackSourceVolumeTick\">\n"
+ "<arg name=\"handle\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"source\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"volume\" type=\"n\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"ackSinkVolumeTick\">\n"
+ "<arg name=\"handle\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"sink\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"volume\" type=\"n\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"ackCrossFading\">\n"
+ "<arg name=\"handle\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"hotSink\" type=\"i\" direction=\"in\" />\n"
+ "<arg name=\"returnError\" type=\"i\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"peekDomain\">\n"
+ "<arg name=\"name\" type=\"s\" direction=\"in\" />\n"
+ "<arg name=\"domainID\" type=\"q\" direction=\"out\" />\n"
+ "<arg name=\"error\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"registerDomain\">\n"
+ "<arg name=\"domainData\" type=\"(qsssbbi)\" direction=\"in\" />\n"
+ "<arg name=\"returnBusname\" type=\"s\" direction=\"in\" />\n"
+ "<arg name=\"returnPath\" type=\"s\" direction=\"in\" />\n"
+ "<arg name=\"returnInterface\" type=\"s\" direction=\"in\" />\n"
+ "<arg name=\"domainID\" type=\"q\" direction=\"out\" />\n"
+ "<arg name=\"error\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"deregisterDomain\">\n"
+ "<arg name=\"domainID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"returnError\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"registerGateway\">\n"
+ "<arg name=\"gatewayData\" type=\"(qsqqqqqaiaiab)\" direction=\"in\" />\n"
+ "<arg name=\"gatewayID\" type=\"q\" direction=\"out\" />\n"
+ "<arg name=\"error\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"deregisterGateway\">\n"
+ "<arg name=\"gatewayID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"returnError\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"peekSink\">\n"
+ "<arg name=\"name\" type=\"s\" direction=\"in\" />\n"
+ "<arg name=\"sinkID\" type=\"q\" direction=\"out\" />\n"
+ "<arg name=\"error\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"registerSink\">\n"
+ "<arg name=\"sinkData\" type=\"(qsqqnb(ii)ina(in)aia(in)a(iin)a(iin))\" direction=\"in\" />\n"
+ "<arg name=\"sinkID\" type=\"q\" direction=\"out\" />\n"
+ "<arg name=\"error\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"deregisterSink\">\n"
+ "<arg name=\"sinkID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"returnError\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"peekSource\">\n"
+ "<arg name=\"name\" type=\"s\" direction=\"in\" />\n"
+ "<arg name=\"sourceID\" type=\"q\" direction=\"out\" />\n"
+ "<arg name=\"error\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"registerSource\">\n"
+ "<arg name=\"sourceData\" type=\"(qqsqinb(ii)ia(in)aia(in)a(iin)a(iin))\" direction=\"in\" />\n"
+ "<arg name=\"sourceID\" type=\"q\" direction=\"out\" />\n"
+ "<arg name=\"error\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"deregisterSource\">\n"
+ "<arg name=\"sourceID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"returnError\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"registerCrossfader\">\n"
+ "<arg name=\"crossfaderData\" type=\"(qsqqqi)\" direction=\"in\" />\n"
+ "<arg name=\"crossfaderID\" type=\"q\" direction=\"out\" />\n"
+ "<arg name=\"error\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"deregisterCrossfader\">\n"
+ "<arg name=\"crossfaderID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"returnError\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"peekSourceClassID\">\n"
+ "<arg name=\"name\" type=\"s\" direction=\"in\" />\n"
+ "<arg name=\"sourceClassID\" type=\"q\" direction=\"out\" />\n"
+ "<arg name=\"error\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"peekSinkClassID\">\n"
+ "<arg name=\"name\" type=\"s\" direction=\"in\" />\n"
+ "<arg name=\"sinkClassID\" type=\"q\" direction=\"out\" />\n"
+ "<arg name=\"error\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"hookInterruptStatusChange\">\n"
+ "<arg name=\"sourceID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"interruptState\" type=\"q\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"hookDomainRegistrationComplete\">\n"
+ "<arg name=\"domainID\" type=\"q\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"hookSinkAvailablityStatusChange\">\n"
+ "<arg name=\"sinkID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"availability\" type=\"(ii)\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"hookSourceAvailablityStatusChange\">\n"
+ "<arg name=\"sourceID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"availability\" type=\"(ii)\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"hookDomainStateChange\">\n"
+ "<arg name=\"domainID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"domainState\" type=\"i\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"hookTimingInformationChanged\">\n"
+ "<arg name=\"connectionID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"delay\" type=\"n\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"sendChangedData\">\n"
+ "<arg name=\"earlyData_volumes\" type=\"a(i(yv)(yv))\" direction=\"in\" />\n"
+ "<arg name=\"earlyData_soundproperties\" type=\"a(i(yv)(yv))\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"confirmRoutingReady\">\n"
+ "<arg name=\"domainID\" type=\"q\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"confirmRoutingRundown\">\n"
+ "<arg name=\"domainID\" type=\"q\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"updateGateway\">\n"
+ "<arg name=\"gatewayID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"listSourceFormats\" type=\"ai\" direction=\"in\" />\n"
+ "<arg name=\"listSinkFormats\" type=\"ai\" direction=\"in\" />\n"
+ "<arg name=\"convertionMatrix\" type=\"ab\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"updateSink\">\n"
+ "<arg name=\"sinkID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"sinkClassID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"listSoundProperties\" type=\"a(in)\" direction=\"in\" />\n"
+ "<arg name=\"listConnectionFormats\" type=\"ai\" direction=\"in\" />\n"
+ "<arg name=\"listMainSoundProperties\" type=\"a(in)\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"updateSource\">\n"
+ "<arg name=\"sourceID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"sourceClassID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"listSoundProperties\" type=\"a(in)\" direction=\"in\" />\n"
+ "<arg name=\"listConnectionFormats\" type=\"ai\" direction=\"in\" />\n"
+ "<arg name=\"listMainSoundProperties\" type=\"a(in)\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"ackSetVolumes\">\n"
+ "<arg name=\"handle\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"listVolumes\" type=\"a(i(yv)niq)\" direction=\"in\" />\n"
+ "<arg name=\"error\" type=\"q\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"ackSinkNotificationConfiguration\">\n"
+ "<arg name=\"handle\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"error\" type=\"q\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"ackSourceNotificationConfiguration\">\n"
+ "<arg name=\"handle\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"error\" type=\"q\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"hookSinkNotificationDataChange\">\n"
+ "<arg name=\"sinkID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"payload\" type=\"(nn)\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"hookSourceNotificationDataChange\">\n"
+ "<arg name=\"sourceID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"payload\" type=\"(nn)\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"getRoutingReadyState\">\n"
+ "<arg name=\"readyState\" type=\"b\" direction=\"out\" />\n"
+ "</method>\n"
+ ;
+}
+
+
+
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<uint16_t, am_gen::am_connectionID_t, uint16_t>,
+ std::tuple<>
+ > ackConnectStubDispatcher(&RoutingInterfaceStub::ackConnect, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<uint16_t, am_gen::am_connectionID_t, uint16_t>,
+ std::tuple<>
+ > ackDisconnectStubDispatcher(&RoutingInterfaceStub::ackDisconnect, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<uint16_t, am_gen::am_volume_t, uint16_t>,
+ std::tuple<>
+ > ackSetSinkVolumeStubDispatcher(&RoutingInterfaceStub::ackSetSinkVolume, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<uint16_t, am_gen::am_volume_t, uint16_t>,
+ std::tuple<>
+ > ackSetSourceVolumeStubDispatcher(&RoutingInterfaceStub::ackSetSourceVolume, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<uint16_t, uint16_t>,
+ std::tuple<>
+ > ackSetSourceStateStubDispatcher(&RoutingInterfaceStub::ackSetSourceState, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<uint16_t, uint16_t>,
+ std::tuple<>
+ > ackSetSinkSoundPropertiesStubDispatcher(&RoutingInterfaceStub::ackSetSinkSoundProperties, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<uint16_t, uint16_t>,
+ std::tuple<>
+ > ackSetSinkSoundPropertyStubDispatcher(&RoutingInterfaceStub::ackSetSinkSoundProperty, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<uint16_t, uint16_t>,
+ std::tuple<>
+ > ackSetSourceSoundPropertiesStubDispatcher(&RoutingInterfaceStub::ackSetSourceSoundProperties, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<uint16_t, uint16_t>,
+ std::tuple<>
+ > ackSetSourceSoundPropertyStubDispatcher(&RoutingInterfaceStub::ackSetSourceSoundProperty, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<uint16_t, am_gen::am_sourceID_t, am_gen::am_volume_t>,
+ std::tuple<>
+ > ackSourceVolumeTickStubDispatcher(&RoutingInterfaceStub::ackSourceVolumeTick, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<uint16_t, am_gen::am_sinkID_t, am_gen::am_volume_t>,
+ std::tuple<>
+ > ackSinkVolumeTickStubDispatcher(&RoutingInterfaceStub::ackSinkVolumeTick, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<uint16_t, am_gen::am_HotSink_e, am_gen::am_Error_e>,
+ std::tuple<>
+ > ackCrossFadingStubDispatcher(&RoutingInterfaceStub::ackCrossFading, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<std::string>,
+ std::tuple<am_gen::am_domainID_t, am_gen::am_Error_e>
+ > peekDomainStubDispatcher(&RoutingInterfaceStub::peekDomain, "qi");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<am_gen::am_Domain_s, std::string, std::string, std::string>,
+ std::tuple<am_gen::am_domainID_t, am_gen::am_Error_e>
+ > registerDomainStubDispatcher(&RoutingInterfaceStub::registerDomain, "qi");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<am_gen::am_domainID_t>,
+ std::tuple<am_gen::am_Error_e>
+ > deregisterDomainStubDispatcher(&RoutingInterfaceStub::deregisterDomain, "i");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<am_gen::am_Gateway_s>,
+ std::tuple<am_gen::am_gatewayID_t, am_gen::am_Error_e>
+ > registerGatewayStubDispatcher(&RoutingInterfaceStub::registerGateway, "qi");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<am_gen::am_gatewayID_t>,
+ std::tuple<am_gen::am_Error_e>
+ > deregisterGatewayStubDispatcher(&RoutingInterfaceStub::deregisterGateway, "i");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<std::string>,
+ std::tuple<am_gen::am_sinkID_t, am_gen::am_Error_e>
+ > peekSinkStubDispatcher(&RoutingInterfaceStub::peekSink, "qi");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<am_gen::sinkData_s>,
+ std::tuple<am_gen::am_sinkID_t, am_gen::am_Error_e>
+ > registerSinkStubDispatcher(&RoutingInterfaceStub::registerSink, "qi");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<am_gen::am_sinkID_t>,
+ std::tuple<am_gen::am_Error_e>
+ > deregisterSinkStubDispatcher(&RoutingInterfaceStub::deregisterSink, "i");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<std::string>,
+ std::tuple<am_gen::am_sourceID_t, am_gen::am_Error_e>
+ > peekSourceStubDispatcher(&RoutingInterfaceStub::peekSource, "qi");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<am_gen::sourceData_s>,
+ std::tuple<am_gen::am_sourceID_t, am_gen::am_Error_e>
+ > registerSourceStubDispatcher(&RoutingInterfaceStub::registerSource, "qi");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<am_gen::am_sourceID_t>,
+ std::tuple<am_gen::am_Error_e>
+ > deregisterSourceStubDispatcher(&RoutingInterfaceStub::deregisterSource, "i");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<am_gen::crossfaderData_s>,
+ std::tuple<am_gen::am_crossfaderID_t, am_gen::am_Error_e>
+ > registerCrossfaderStubDispatcher(&RoutingInterfaceStub::registerCrossfader, "qi");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<am_gen::am_crossfaderID_t>,
+ std::tuple<am_gen::am_Error_e>
+ > deregisterCrossfaderStubDispatcher(&RoutingInterfaceStub::deregisterCrossfader, "i");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<std::string>,
+ std::tuple<am_gen::am_sourceClass_t, am_gen::am_Error_e>
+ > peekSourceClassIDStubDispatcher(&RoutingInterfaceStub::peekSourceClassID, "qi");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<std::string>,
+ std::tuple<am_gen::am_sinkClass_t, am_gen::am_Error_e>
+ > peekSinkClassIDStubDispatcher(&RoutingInterfaceStub::peekSinkClassID, "qi");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<am_gen::am_sourceID_t, uint16_t>,
+ std::tuple<>
+ > hookInterruptStatusChangeStubDispatcher(&RoutingInterfaceStub::hookInterruptStatusChange, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<am_gen::am_domainID_t>,
+ std::tuple<>
+ > hookDomainRegistrationCompleteStubDispatcher(&RoutingInterfaceStub::hookDomainRegistrationComplete, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<am_gen::am_sinkID_t, am_gen::am_Availability_s>,
+ std::tuple<>
+ > hookSinkAvailablityStatusChangeStubDispatcher(&RoutingInterfaceStub::hookSinkAvailablityStatusChange, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<am_gen::am_sourceID_t, am_gen::am_Availability_s>,
+ std::tuple<>
+ > hookSourceAvailablityStatusChangeStubDispatcher(&RoutingInterfaceStub::hookSourceAvailablityStatusChange, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<am_gen::am_domainID_t, am_gen::am_DomainState_e>,
+ std::tuple<>
+ > hookDomainStateChangeStubDispatcher(&RoutingInterfaceStub::hookDomainStateChange, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<am_gen::am_connectionID_t, int16_t>,
+ std::tuple<>
+ > hookTimingInformationChangedStubDispatcher(&RoutingInterfaceStub::hookTimingInformationChanged, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<am_gen::am_EarlyData_l, am_gen::am_EarlyData_l>,
+ std::tuple<>
+ > sendChangedDataStubDispatcher(&RoutingInterfaceStub::sendChangedData, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<am_gen::am_domainID_t>,
+ std::tuple<>
+ > confirmRoutingReadyStubDispatcher(&RoutingInterfaceStub::confirmRoutingReady, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<am_gen::am_domainID_t>,
+ std::tuple<>
+ > confirmRoutingRundownStubDispatcher(&RoutingInterfaceStub::confirmRoutingRundown, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<am_gen::am_gatewayID_t, am_gen::am_ConnectionFormat_L, am_gen::am_ConnectionFormat_L, am_gen::bool_L>,
+ std::tuple<>
+ > updateGatewayStubDispatcher(&RoutingInterfaceStub::updateGateway, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<am_gen::am_sinkID_t, am_gen::am_sinkClass_t, am_gen::am_SoundProperty_L, am_gen::am_ConnectionFormat_L, am_gen::am_MainSoundProperty_L>,
+ std::tuple<>
+ > updateSinkStubDispatcher(&RoutingInterfaceStub::updateSink, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<am_gen::am_sourceID_t, am_gen::am_sourceClass_t, am_gen::am_SoundProperty_L, am_gen::am_ConnectionFormat_L, am_gen::am_MainSoundProperty_L>,
+ std::tuple<>
+ > updateSourceStubDispatcher(&RoutingInterfaceStub::updateSource, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<uint16_t, am_gen::am_Volumes_l, uint16_t>,
+ std::tuple<>
+ > ackSetVolumesStubDispatcher(&RoutingInterfaceStub::ackSetVolumes, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<uint16_t, uint16_t>,
+ std::tuple<>
+ > ackSinkNotificationConfigurationStubDispatcher(&RoutingInterfaceStub::ackSinkNotificationConfiguration, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<uint16_t, uint16_t>,
+ std::tuple<>
+ > ackSourceNotificationConfigurationStubDispatcher(&RoutingInterfaceStub::ackSourceNotificationConfiguration, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<am_gen::am_sinkID_t, am_gen::notificationPayload_s>,
+ std::tuple<>
+ > hookSinkNotificationDataChangeStubDispatcher(&RoutingInterfaceStub::hookSinkNotificationDataChange, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<am_gen::am_sourceID_t, am_gen::notificationPayload_s>,
+ std::tuple<>
+ > hookSourceNotificationDataChangeStubDispatcher(&RoutingInterfaceStub::hookSourceNotificationDataChange, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingInterfaceStub,
+ std::tuple<>,
+ std::tuple<bool>
+ > getRoutingReadyStateStubDispatcher(&RoutingInterfaceStub::getRoutingReadyState, "b");
+
+
+void RoutingInterfaceDBusStubAdapter::fireSetRoutingReadyEvent() {
+ CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<>>
+ ::sendSignal(
+ *this,
+ "setRoutingReady",
+ ""
+ );
+}
+void RoutingInterfaceDBusStubAdapter::fireSetRoutingRundownEvent() {
+ CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<>>
+ ::sendSignal(
+ *this,
+ "setRoutingRundown",
+ ""
+ );
+}
+
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
+
+template<>
+const org::genivi::audiomanager::RoutingInterfaceDBusStubAdapterHelper::StubDispatcherTable org::genivi::audiomanager::RoutingInterfaceDBusStubAdapterHelper::stubDispatcherTable_ = {
+ { { "ackConnect", "qqq" }, &org::genivi::audiomanager::ackConnectStubDispatcher },
+ { { "ackDisconnect", "qqq" }, &org::genivi::audiomanager::ackDisconnectStubDispatcher },
+ { { "ackSetSinkVolume", "qnq" }, &org::genivi::audiomanager::ackSetSinkVolumeStubDispatcher },
+ { { "ackSetSourceVolume", "qnq" }, &org::genivi::audiomanager::ackSetSourceVolumeStubDispatcher },
+ { { "ackSetSourceState", "qq" }, &org::genivi::audiomanager::ackSetSourceStateStubDispatcher },
+ { { "ackSetSinkSoundProperties", "qq" }, &org::genivi::audiomanager::ackSetSinkSoundPropertiesStubDispatcher },
+ { { "ackSetSinkSoundProperty", "qq" }, &org::genivi::audiomanager::ackSetSinkSoundPropertyStubDispatcher },
+ { { "ackSetSourceSoundProperties", "qq" }, &org::genivi::audiomanager::ackSetSourceSoundPropertiesStubDispatcher },
+ { { "ackSetSourceSoundProperty", "qq" }, &org::genivi::audiomanager::ackSetSourceSoundPropertyStubDispatcher },
+ { { "ackSourceVolumeTick", "qqn" }, &org::genivi::audiomanager::ackSourceVolumeTickStubDispatcher },
+ { { "ackSinkVolumeTick", "qqn" }, &org::genivi::audiomanager::ackSinkVolumeTickStubDispatcher },
+ { { "ackCrossFading", "qii" }, &org::genivi::audiomanager::ackCrossFadingStubDispatcher },
+ { { "peekDomain", "s" }, &org::genivi::audiomanager::peekDomainStubDispatcher },
+ { { "registerDomain", "(qsssbbi)sss" }, &org::genivi::audiomanager::registerDomainStubDispatcher },
+ { { "deregisterDomain", "q" }, &org::genivi::audiomanager::deregisterDomainStubDispatcher },
+ { { "registerGateway", "(qsqqqqqaiaiab)" }, &org::genivi::audiomanager::registerGatewayStubDispatcher },
+ { { "deregisterGateway", "q" }, &org::genivi::audiomanager::deregisterGatewayStubDispatcher },
+ { { "peekSink", "s" }, &org::genivi::audiomanager::peekSinkStubDispatcher },
+ { { "registerSink", "(qsqqnb(ii)ina(in)aia(in)a(iin)a(iin))" }, &org::genivi::audiomanager::registerSinkStubDispatcher },
+ { { "deregisterSink", "q" }, &org::genivi::audiomanager::deregisterSinkStubDispatcher },
+ { { "peekSource", "s" }, &org::genivi::audiomanager::peekSourceStubDispatcher },
+ { { "registerSource", "(qqsqinb(ii)ia(in)aia(in)a(iin)a(iin))" }, &org::genivi::audiomanager::registerSourceStubDispatcher },
+ { { "deregisterSource", "q" }, &org::genivi::audiomanager::deregisterSourceStubDispatcher },
+ { { "registerCrossfader", "(qsqqqi)" }, &org::genivi::audiomanager::registerCrossfaderStubDispatcher },
+ { { "deregisterCrossfader", "q" }, &org::genivi::audiomanager::deregisterCrossfaderStubDispatcher },
+ { { "peekSourceClassID", "s" }, &org::genivi::audiomanager::peekSourceClassIDStubDispatcher },
+ { { "peekSinkClassID", "s" }, &org::genivi::audiomanager::peekSinkClassIDStubDispatcher },
+ { { "hookInterruptStatusChange", "qq" }, &org::genivi::audiomanager::hookInterruptStatusChangeStubDispatcher },
+ { { "hookDomainRegistrationComplete", "q" }, &org::genivi::audiomanager::hookDomainRegistrationCompleteStubDispatcher },
+ { { "hookSinkAvailablityStatusChange", "q(ii)" }, &org::genivi::audiomanager::hookSinkAvailablityStatusChangeStubDispatcher },
+ { { "hookSourceAvailablityStatusChange", "q(ii)" }, &org::genivi::audiomanager::hookSourceAvailablityStatusChangeStubDispatcher },
+ { { "hookDomainStateChange", "qi" }, &org::genivi::audiomanager::hookDomainStateChangeStubDispatcher },
+ { { "hookTimingInformationChanged", "qn" }, &org::genivi::audiomanager::hookTimingInformationChangedStubDispatcher },
+ { { "sendChangedData", "a(i(yv)(yv))a(i(yv)(yv))" }, &org::genivi::audiomanager::sendChangedDataStubDispatcher },
+ { { "confirmRoutingReady", "q" }, &org::genivi::audiomanager::confirmRoutingReadyStubDispatcher },
+ { { "confirmRoutingRundown", "q" }, &org::genivi::audiomanager::confirmRoutingRundownStubDispatcher },
+ { { "updateGateway", "qaiaiab" }, &org::genivi::audiomanager::updateGatewayStubDispatcher },
+ { { "updateSink", "qqa(in)aia(in)" }, &org::genivi::audiomanager::updateSinkStubDispatcher },
+ { { "updateSource", "qqa(in)aia(in)" }, &org::genivi::audiomanager::updateSourceStubDispatcher },
+ { { "ackSetVolumes", "qa(i(yv)niq)q" }, &org::genivi::audiomanager::ackSetVolumesStubDispatcher },
+ { { "ackSinkNotificationConfiguration", "qq" }, &org::genivi::audiomanager::ackSinkNotificationConfigurationStubDispatcher },
+ { { "ackSourceNotificationConfiguration", "qq" }, &org::genivi::audiomanager::ackSourceNotificationConfigurationStubDispatcher },
+ { { "hookSinkNotificationDataChange", "q(nn)" }, &org::genivi::audiomanager::hookSinkNotificationDataChangeStubDispatcher },
+ { { "hookSourceNotificationDataChange", "q(nn)" }, &org::genivi::audiomanager::hookSourceNotificationDataChangeStubDispatcher },
+ { { "getRoutingReadyState", "" }, &org::genivi::audiomanager::getRoutingReadyStateStubDispatcher }
+};
diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceDBusStubAdapter.h b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceDBusStubAdapter.h
new file mode 100644
index 0000000..7718954
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceDBusStubAdapter.h
@@ -0,0 +1,59 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_AUDIOMANAGER_Routing_Interface_DBUS_STUB_ADAPTER_H_
+#define ORG_GENIVI_AUDIOMANAGER_Routing_Interface_DBUS_STUB_ADAPTER_H_
+
+#include <org/genivi/audiomanager/RoutingInterfaceStub.h>
+
+#define COMMONAPI_INTERNAL_COMPILATION
+
+#include <CommonAPI/DBus/DBusStubAdapterHelper.h>
+#include <CommonAPI/DBus/DBusFactory.h>
+
+#undef COMMONAPI_INTERNAL_COMPILATION
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+
+typedef CommonAPI::DBus::DBusStubAdapterHelper<RoutingInterfaceStub> RoutingInterfaceDBusStubAdapterHelper;
+
+class RoutingInterfaceDBusStubAdapter: public RoutingInterfaceStubAdapter, public RoutingInterfaceDBusStubAdapterHelper {
+ public:
+ RoutingInterfaceDBusStubAdapter(
+ const std::string& commonApiAddress,
+ const std::string& dbusInterfaceName,
+ const std::string& dbusBusName,
+ const std::string& dbusObjectPath,
+ const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
+ const std::shared_ptr<CommonAPI::StubBase>& stub);
+
+
+ void fireSetRoutingReadyEvent();
+ void fireSetRoutingRundownEvent();
+
+ protected:
+ virtual const char* getMethodsDBusIntrospectionXmlData() const;
+};
+
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
+
+#endif // ORG_GENIVI_AUDIOMANAGER_Routing_Interface_DBUS_STUB_ADAPTER_H_
diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceProxy.h b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceProxy.h
new file mode 100644
index 0000000..7633ea6
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceProxy.h
@@ -0,0 +1,1594 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_AUDIOMANAGER_Routing_Interface_PROXY_H_
+#define ORG_GENIVI_AUDIOMANAGER_Routing_Interface_PROXY_H_
+
+#include "RoutingInterfaceProxyBase.h"
+
+#define COMMONAPI_INTERNAL_COMPILATION
+
+
+#undef COMMONAPI_INTERNAL_COMPILATION
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+
+template <typename ... _AttributeExtensions>
+class RoutingInterfaceProxy: virtual public RoutingInterface, virtual public RoutingInterfaceProxyBase, public _AttributeExtensions... {
+ public:
+ RoutingInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate);
+ ~RoutingInterfaceProxy();
+
+
+ /// Returns the wrapper class that provides access to the broadcast setRoutingReady.
+ virtual SetRoutingReadyEvent& getSetRoutingReadyEvent() {
+ return delegate_->getSetRoutingReadyEvent();
+ }
+
+ /// Returns the wrapper class that provides access to the broadcast setRoutingRundown.
+ virtual SetRoutingRundownEvent& getSetRoutingRundownEvent() {
+ return delegate_->getSetRoutingRundownEvent();
+ }
+
+
+
+ /**
+ * Calls ackConnect with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void ackConnect(const uint16_t& handle, const am_gen::am_connectionID_t& connectionID, const uint16_t& error, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls ackConnect with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> ackConnectAsync(const uint16_t& handle, const am_gen::am_connectionID_t& connectionID, const uint16_t& error, AckConnectAsyncCallback callback);
+
+ /**
+ * Calls ackDisconnect with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void ackDisconnect(const uint16_t& handle, const am_gen::am_connectionID_t& connectionID, const uint16_t& error, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls ackDisconnect with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> ackDisconnectAsync(const uint16_t& handle, const am_gen::am_connectionID_t& connectionID, const uint16_t& error, AckDisconnectAsyncCallback callback);
+
+ /**
+ * Calls ackSetSinkVolume with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void ackSetSinkVolume(const uint16_t& handle, const am_gen::am_volume_t& volume, const uint16_t& error, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls ackSetSinkVolume with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> ackSetSinkVolumeAsync(const uint16_t& handle, const am_gen::am_volume_t& volume, const uint16_t& error, AckSetSinkVolumeAsyncCallback callback);
+
+ /**
+ * Calls ackSetSourceVolume with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void ackSetSourceVolume(const uint16_t& handle, const am_gen::am_volume_t& volume, const uint16_t& error, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls ackSetSourceVolume with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> ackSetSourceVolumeAsync(const uint16_t& handle, const am_gen::am_volume_t& volume, const uint16_t& error, AckSetSourceVolumeAsyncCallback callback);
+
+ /**
+ * Calls ackSetSourceState with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void ackSetSourceState(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls ackSetSourceState with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> ackSetSourceStateAsync(const uint16_t& handle, const uint16_t& error, AckSetSourceStateAsyncCallback callback);
+
+ /**
+ * Calls ackSetSinkSoundProperties with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void ackSetSinkSoundProperties(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls ackSetSinkSoundProperties with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> ackSetSinkSoundPropertiesAsync(const uint16_t& handle, const uint16_t& error, AckSetSinkSoundPropertiesAsyncCallback callback);
+
+ /**
+ * Calls ackSetSinkSoundProperty with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void ackSetSinkSoundProperty(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls ackSetSinkSoundProperty with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> ackSetSinkSoundPropertyAsync(const uint16_t& handle, const uint16_t& error, AckSetSinkSoundPropertyAsyncCallback callback);
+
+ /**
+ * Calls ackSetSourceSoundProperties with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void ackSetSourceSoundProperties(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls ackSetSourceSoundProperties with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> ackSetSourceSoundPropertiesAsync(const uint16_t& handle, const uint16_t& error, AckSetSourceSoundPropertiesAsyncCallback callback);
+
+ /**
+ * Calls ackSetSourceSoundProperty with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void ackSetSourceSoundProperty(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls ackSetSourceSoundProperty with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> ackSetSourceSoundPropertyAsync(const uint16_t& handle, const uint16_t& error, AckSetSourceSoundPropertyAsyncCallback callback);
+
+ /**
+ * Calls ackSourceVolumeTick with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void ackSourceVolumeTick(const uint16_t& handle, const am_gen::am_sourceID_t& source, const am_gen::am_volume_t& volume, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls ackSourceVolumeTick with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> ackSourceVolumeTickAsync(const uint16_t& handle, const am_gen::am_sourceID_t& source, const am_gen::am_volume_t& volume, AckSourceVolumeTickAsyncCallback callback);
+
+ /**
+ * Calls ackSinkVolumeTick with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void ackSinkVolumeTick(const uint16_t& handle, const am_gen::am_sinkID_t& sink, const am_gen::am_volume_t& volume, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls ackSinkVolumeTick with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> ackSinkVolumeTickAsync(const uint16_t& handle, const am_gen::am_sinkID_t& sink, const am_gen::am_volume_t& volume, AckSinkVolumeTickAsyncCallback callback);
+
+ /**
+ * Calls ackCrossFading with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void ackCrossFading(const uint16_t& handle, const am_gen::am_HotSink_e& hotSink, const am_gen::am_Error_e& returnError, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls ackCrossFading with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> ackCrossFadingAsync(const uint16_t& handle, const am_gen::am_HotSink_e& hotSink, const am_gen::am_Error_e& returnError, AckCrossFadingAsyncCallback callback);
+
+ /**
+ * Calls peekDomain with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void peekDomain(const std::string& name, CommonAPI::CallStatus& callStatus, am_gen::am_domainID_t& domainID, am_gen::am_Error_e& error);
+ /**
+ * Calls peekDomain with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> peekDomainAsync(const std::string& name, PeekDomainAsyncCallback callback);
+
+ /**
+ * Calls registerDomain with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void registerDomain(const am_gen::am_Domain_s& domainData, const std::string& returnBusname, const std::string& returnPath, const std::string& returnInterface, CommonAPI::CallStatus& callStatus, am_gen::am_domainID_t& domainID, am_gen::am_Error_e& error);
+ /**
+ * Calls registerDomain with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> registerDomainAsync(const am_gen::am_Domain_s& domainData, const std::string& returnBusname, const std::string& returnPath, const std::string& returnInterface, RegisterDomainAsyncCallback callback);
+
+ /**
+ * Calls deregisterDomain with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void deregisterDomain(const am_gen::am_domainID_t& domainID, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& returnError);
+ /**
+ * Calls deregisterDomain with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> deregisterDomainAsync(const am_gen::am_domainID_t& domainID, DeregisterDomainAsyncCallback callback);
+
+ /**
+ * Calls registerGateway with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void registerGateway(const am_gen::am_Gateway_s& gatewayData, CommonAPI::CallStatus& callStatus, am_gen::am_gatewayID_t& gatewayID, am_gen::am_Error_e& error);
+ /**
+ * Calls registerGateway with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> registerGatewayAsync(const am_gen::am_Gateway_s& gatewayData, RegisterGatewayAsyncCallback callback);
+
+ /**
+ * Calls deregisterGateway with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void deregisterGateway(const am_gen::am_gatewayID_t& gatewayID, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& returnError);
+ /**
+ * Calls deregisterGateway with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> deregisterGatewayAsync(const am_gen::am_gatewayID_t& gatewayID, DeregisterGatewayAsyncCallback callback);
+
+ /**
+ * Calls peekSink with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void peekSink(const std::string& name, CommonAPI::CallStatus& callStatus, am_gen::am_sinkID_t& sinkID, am_gen::am_Error_e& error);
+ /**
+ * Calls peekSink with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> peekSinkAsync(const std::string& name, PeekSinkAsyncCallback callback);
+
+ /**
+ * Calls registerSink with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void registerSink(const am_gen::sinkData_s& sinkData, CommonAPI::CallStatus& callStatus, am_gen::am_sinkID_t& sinkID, am_gen::am_Error_e& error);
+ /**
+ * Calls registerSink with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> registerSinkAsync(const am_gen::sinkData_s& sinkData, RegisterSinkAsyncCallback callback);
+
+ /**
+ * Calls deregisterSink with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void deregisterSink(const am_gen::am_sinkID_t& sinkID, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& returnError);
+ /**
+ * Calls deregisterSink with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> deregisterSinkAsync(const am_gen::am_sinkID_t& sinkID, DeregisterSinkAsyncCallback callback);
+
+ /**
+ * Calls peekSource with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void peekSource(const std::string& name, CommonAPI::CallStatus& callStatus, am_gen::am_sourceID_t& sourceID, am_gen::am_Error_e& error);
+ /**
+ * Calls peekSource with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> peekSourceAsync(const std::string& name, PeekSourceAsyncCallback callback);
+
+ /**
+ * Calls registerSource with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void registerSource(const am_gen::sourceData_s& sourceData, CommonAPI::CallStatus& callStatus, am_gen::am_sourceID_t& sourceID, am_gen::am_Error_e& error);
+ /**
+ * Calls registerSource with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> registerSourceAsync(const am_gen::sourceData_s& sourceData, RegisterSourceAsyncCallback callback);
+
+ /**
+ * Calls deregisterSource with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void deregisterSource(const am_gen::am_sourceID_t& sourceID, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& returnError);
+ /**
+ * Calls deregisterSource with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> deregisterSourceAsync(const am_gen::am_sourceID_t& sourceID, DeregisterSourceAsyncCallback callback);
+
+ /**
+ * Calls registerCrossfader with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void registerCrossfader(const am_gen::crossfaderData_s& crossfaderData, CommonAPI::CallStatus& callStatus, am_gen::am_crossfaderID_t& crossfaderID, am_gen::am_Error_e& error);
+ /**
+ * Calls registerCrossfader with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> registerCrossfaderAsync(const am_gen::crossfaderData_s& crossfaderData, RegisterCrossfaderAsyncCallback callback);
+
+ /**
+ * Calls deregisterCrossfader with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void deregisterCrossfader(const am_gen::am_crossfaderID_t& crossfaderID, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& returnError);
+ /**
+ * Calls deregisterCrossfader with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> deregisterCrossfaderAsync(const am_gen::am_crossfaderID_t& crossfaderID, DeregisterCrossfaderAsyncCallback callback);
+
+ /**
+ * Calls peekSourceClassID with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void peekSourceClassID(const std::string& name, CommonAPI::CallStatus& callStatus, am_gen::am_sourceClass_t& sourceClassID, am_gen::am_Error_e& error);
+ /**
+ * Calls peekSourceClassID with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> peekSourceClassIDAsync(const std::string& name, PeekSourceClassIDAsyncCallback callback);
+
+ /**
+ * Calls peekSinkClassID with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void peekSinkClassID(const std::string& name, CommonAPI::CallStatus& callStatus, am_gen::am_sinkClass_t& sinkClassID, am_gen::am_Error_e& error);
+ /**
+ * Calls peekSinkClassID with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> peekSinkClassIDAsync(const std::string& name, PeekSinkClassIDAsyncCallback callback);
+
+ /**
+ * Calls hookInterruptStatusChange with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void hookInterruptStatusChange(const am_gen::am_sourceID_t& sourceID, const uint16_t& interruptState, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls hookInterruptStatusChange with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> hookInterruptStatusChangeAsync(const am_gen::am_sourceID_t& sourceID, const uint16_t& interruptState, HookInterruptStatusChangeAsyncCallback callback);
+
+ /**
+ * Calls hookDomainRegistrationComplete with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void hookDomainRegistrationComplete(const am_gen::am_domainID_t& domainID, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls hookDomainRegistrationComplete with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> hookDomainRegistrationCompleteAsync(const am_gen::am_domainID_t& domainID, HookDomainRegistrationCompleteAsyncCallback callback);
+
+ /**
+ * Calls hookSinkAvailablityStatusChange with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void hookSinkAvailablityStatusChange(const am_gen::am_sinkID_t& sinkID, const am_gen::am_Availability_s& availability, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls hookSinkAvailablityStatusChange with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> hookSinkAvailablityStatusChangeAsync(const am_gen::am_sinkID_t& sinkID, const am_gen::am_Availability_s& availability, HookSinkAvailablityStatusChangeAsyncCallback callback);
+
+ /**
+ * Calls hookSourceAvailablityStatusChange with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void hookSourceAvailablityStatusChange(const am_gen::am_sourceID_t& sourceID, const am_gen::am_Availability_s& availability, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls hookSourceAvailablityStatusChange with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> hookSourceAvailablityStatusChangeAsync(const am_gen::am_sourceID_t& sourceID, const am_gen::am_Availability_s& availability, HookSourceAvailablityStatusChangeAsyncCallback callback);
+
+ /**
+ * Calls hookDomainStateChange with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void hookDomainStateChange(const am_gen::am_domainID_t& domainID, const am_gen::am_DomainState_e& domainState, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls hookDomainStateChange with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> hookDomainStateChangeAsync(const am_gen::am_domainID_t& domainID, const am_gen::am_DomainState_e& domainState, HookDomainStateChangeAsyncCallback callback);
+
+ /**
+ * Calls hookTimingInformationChanged with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void hookTimingInformationChanged(const am_gen::am_connectionID_t& connectionID, const int16_t& delay, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls hookTimingInformationChanged with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> hookTimingInformationChangedAsync(const am_gen::am_connectionID_t& connectionID, const int16_t& delay, HookTimingInformationChangedAsyncCallback callback);
+
+ /**
+ * Calls sendChangedData with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void sendChangedData(const am_gen::am_EarlyData_l& earlyData_volumes, const am_gen::am_EarlyData_l& earlyData_soundproperties, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls sendChangedData with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> sendChangedDataAsync(const am_gen::am_EarlyData_l& earlyData_volumes, const am_gen::am_EarlyData_l& earlyData_soundproperties, SendChangedDataAsyncCallback callback);
+
+ /**
+ * Calls confirmRoutingReady with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void confirmRoutingReady(const am_gen::am_domainID_t& domainID, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls confirmRoutingReady with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> confirmRoutingReadyAsync(const am_gen::am_domainID_t& domainID, ConfirmRoutingReadyAsyncCallback callback);
+
+ /**
+ * Calls confirmRoutingRundown with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void confirmRoutingRundown(const am_gen::am_domainID_t& domainID, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls confirmRoutingRundown with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> confirmRoutingRundownAsync(const am_gen::am_domainID_t& domainID, ConfirmRoutingRundownAsyncCallback callback);
+
+ /**
+ * Calls updateGateway with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void updateGateway(const am_gen::am_gatewayID_t& gatewayID, const am_gen::am_ConnectionFormat_L& listSourceFormats, const am_gen::am_ConnectionFormat_L& listSinkFormats, const am_gen::bool_L& convertionMatrix, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls updateGateway with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> updateGatewayAsync(const am_gen::am_gatewayID_t& gatewayID, const am_gen::am_ConnectionFormat_L& listSourceFormats, const am_gen::am_ConnectionFormat_L& listSinkFormats, const am_gen::bool_L& convertionMatrix, UpdateGatewayAsyncCallback callback);
+
+ /**
+ * Calls updateSink with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void updateSink(const am_gen::am_sinkID_t& sinkID, const am_gen::am_sinkClass_t& sinkClassID, const am_gen::am_SoundProperty_L& listSoundProperties, const am_gen::am_ConnectionFormat_L& listConnectionFormats, const am_gen::am_MainSoundProperty_L& listMainSoundProperties, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls updateSink with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> updateSinkAsync(const am_gen::am_sinkID_t& sinkID, const am_gen::am_sinkClass_t& sinkClassID, const am_gen::am_SoundProperty_L& listSoundProperties, const am_gen::am_ConnectionFormat_L& listConnectionFormats, const am_gen::am_MainSoundProperty_L& listMainSoundProperties, UpdateSinkAsyncCallback callback);
+
+ /**
+ * Calls updateSource with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void updateSource(const am_gen::am_sourceID_t& sourceID, const am_gen::am_sourceClass_t& sourceClassID, const am_gen::am_SoundProperty_L& listSoundProperties, const am_gen::am_ConnectionFormat_L& listConnectionFormats, const am_gen::am_MainSoundProperty_L& listMainSoundProperties, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls updateSource with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> updateSourceAsync(const am_gen::am_sourceID_t& sourceID, const am_gen::am_sourceClass_t& sourceClassID, const am_gen::am_SoundProperty_L& listSoundProperties, const am_gen::am_ConnectionFormat_L& listConnectionFormats, const am_gen::am_MainSoundProperty_L& listMainSoundProperties, UpdateSourceAsyncCallback callback);
+
+ /**
+ * Calls ackSetVolumes with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void ackSetVolumes(const uint16_t& handle, const am_gen::am_Volumes_l& listVolumes, const uint16_t& error, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls ackSetVolumes with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> ackSetVolumesAsync(const uint16_t& handle, const am_gen::am_Volumes_l& listVolumes, const uint16_t& error, AckSetVolumesAsyncCallback callback);
+
+ /**
+ * Calls ackSinkNotificationConfiguration with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void ackSinkNotificationConfiguration(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls ackSinkNotificationConfiguration with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> ackSinkNotificationConfigurationAsync(const uint16_t& handle, const uint16_t& error, AckSinkNotificationConfigurationAsyncCallback callback);
+
+ /**
+ * Calls ackSourceNotificationConfiguration with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void ackSourceNotificationConfiguration(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls ackSourceNotificationConfiguration with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> ackSourceNotificationConfigurationAsync(const uint16_t& handle, const uint16_t& error, AckSourceNotificationConfigurationAsyncCallback callback);
+
+ /**
+ * Calls hookSinkNotificationDataChange with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void hookSinkNotificationDataChange(const am_gen::am_sinkID_t& sinkID, const am_gen::notificationPayload_s& payload, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls hookSinkNotificationDataChange with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> hookSinkNotificationDataChangeAsync(const am_gen::am_sinkID_t& sinkID, const am_gen::notificationPayload_s& payload, HookSinkNotificationDataChangeAsyncCallback callback);
+
+ /**
+ * Calls hookSourceNotificationDataChange with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void hookSourceNotificationDataChange(const am_gen::am_sourceID_t& sourceID, const am_gen::notificationPayload_s& payload, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls hookSourceNotificationDataChange with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> hookSourceNotificationDataChangeAsync(const am_gen::am_sourceID_t& sourceID, const am_gen::notificationPayload_s& payload, HookSourceNotificationDataChangeAsyncCallback callback);
+
+ /**
+ * Calls getRoutingReadyState with synchronous semantics.
+ *
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void getRoutingReadyState(CommonAPI::CallStatus& callStatus, bool& readyState);
+ /**
+ * Calls getRoutingReadyState with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> getRoutingReadyStateAsync(GetRoutingReadyStateAsyncCallback callback);
+
+ /// Returns the CommonAPI address of the remote partner this proxy communicates with.
+ virtual std::string getAddress() const;
+
+ /// Returns the domain of the remote partner this proxy communicates with.
+ virtual const std::string& getDomain() const;
+
+ /// Returns the service ID of the remote partner this proxy communicates with.
+ virtual const std::string& getServiceId() const;
+
+ /// Returns the instance ID of the remote partner this proxy communicates with.
+ virtual const std::string& getInstanceId() const;
+
+ /// Returns true if the remote partner for this proxy is available.
+ virtual bool isAvailable() const;
+
+ /**
+ * Returns the wrapper class that is used to (de-)register for notifications about
+ * the availability of the remote partner of this proxy.
+ */
+ virtual CommonAPI::ProxyStatusEvent& getProxyStatusEvent();
+
+ /**
+ * Returns the wrapper class that is used to access version information of the remote
+ * partner of this proxy.
+ */
+ virtual CommonAPI::InterfaceVersionAttribute& getInterfaceVersionAttribute();
+
+ private:
+ std::shared_ptr<RoutingInterfaceProxyBase> delegate_;
+};
+
+
+//
+// RoutingInterfaceProxy Implementation
+//
+template <typename ... _AttributeExtensions>
+RoutingInterfaceProxy<_AttributeExtensions...>::RoutingInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate):
+ delegate_(std::dynamic_pointer_cast<RoutingInterfaceProxyBase>(delegate)),
+ _AttributeExtensions(*(std::dynamic_pointer_cast<RoutingInterfaceProxyBase>(delegate)))... {
+}
+
+template <typename ... _AttributeExtensions>
+RoutingInterfaceProxy<_AttributeExtensions...>::~RoutingInterfaceProxy() {
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::ackConnect(const uint16_t& handle, const am_gen::am_connectionID_t& connectionID, const uint16_t& error, CommonAPI::CallStatus& callStatus) {
+ delegate_->ackConnect(handle, connectionID, error, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::ackConnectAsync(const uint16_t& handle, const am_gen::am_connectionID_t& connectionID, const uint16_t& error, AckConnectAsyncCallback callback) {
+ return delegate_->ackConnectAsync(handle, connectionID, error, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::ackDisconnect(const uint16_t& handle, const am_gen::am_connectionID_t& connectionID, const uint16_t& error, CommonAPI::CallStatus& callStatus) {
+ delegate_->ackDisconnect(handle, connectionID, error, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::ackDisconnectAsync(const uint16_t& handle, const am_gen::am_connectionID_t& connectionID, const uint16_t& error, AckDisconnectAsyncCallback callback) {
+ return delegate_->ackDisconnectAsync(handle, connectionID, error, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::ackSetSinkVolume(const uint16_t& handle, const am_gen::am_volume_t& volume, const uint16_t& error, CommonAPI::CallStatus& callStatus) {
+ delegate_->ackSetSinkVolume(handle, volume, error, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::ackSetSinkVolumeAsync(const uint16_t& handle, const am_gen::am_volume_t& volume, const uint16_t& error, AckSetSinkVolumeAsyncCallback callback) {
+ return delegate_->ackSetSinkVolumeAsync(handle, volume, error, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::ackSetSourceVolume(const uint16_t& handle, const am_gen::am_volume_t& volume, const uint16_t& error, CommonAPI::CallStatus& callStatus) {
+ delegate_->ackSetSourceVolume(handle, volume, error, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::ackSetSourceVolumeAsync(const uint16_t& handle, const am_gen::am_volume_t& volume, const uint16_t& error, AckSetSourceVolumeAsyncCallback callback) {
+ return delegate_->ackSetSourceVolumeAsync(handle, volume, error, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::ackSetSourceState(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus) {
+ delegate_->ackSetSourceState(handle, error, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::ackSetSourceStateAsync(const uint16_t& handle, const uint16_t& error, AckSetSourceStateAsyncCallback callback) {
+ return delegate_->ackSetSourceStateAsync(handle, error, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::ackSetSinkSoundProperties(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus) {
+ delegate_->ackSetSinkSoundProperties(handle, error, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::ackSetSinkSoundPropertiesAsync(const uint16_t& handle, const uint16_t& error, AckSetSinkSoundPropertiesAsyncCallback callback) {
+ return delegate_->ackSetSinkSoundPropertiesAsync(handle, error, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::ackSetSinkSoundProperty(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus) {
+ delegate_->ackSetSinkSoundProperty(handle, error, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::ackSetSinkSoundPropertyAsync(const uint16_t& handle, const uint16_t& error, AckSetSinkSoundPropertyAsyncCallback callback) {
+ return delegate_->ackSetSinkSoundPropertyAsync(handle, error, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::ackSetSourceSoundProperties(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus) {
+ delegate_->ackSetSourceSoundProperties(handle, error, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::ackSetSourceSoundPropertiesAsync(const uint16_t& handle, const uint16_t& error, AckSetSourceSoundPropertiesAsyncCallback callback) {
+ return delegate_->ackSetSourceSoundPropertiesAsync(handle, error, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::ackSetSourceSoundProperty(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus) {
+ delegate_->ackSetSourceSoundProperty(handle, error, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::ackSetSourceSoundPropertyAsync(const uint16_t& handle, const uint16_t& error, AckSetSourceSoundPropertyAsyncCallback callback) {
+ return delegate_->ackSetSourceSoundPropertyAsync(handle, error, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::ackSourceVolumeTick(const uint16_t& handle, const am_gen::am_sourceID_t& source, const am_gen::am_volume_t& volume, CommonAPI::CallStatus& callStatus) {
+ delegate_->ackSourceVolumeTick(handle, source, volume, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::ackSourceVolumeTickAsync(const uint16_t& handle, const am_gen::am_sourceID_t& source, const am_gen::am_volume_t& volume, AckSourceVolumeTickAsyncCallback callback) {
+ return delegate_->ackSourceVolumeTickAsync(handle, source, volume, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::ackSinkVolumeTick(const uint16_t& handle, const am_gen::am_sinkID_t& sink, const am_gen::am_volume_t& volume, CommonAPI::CallStatus& callStatus) {
+ delegate_->ackSinkVolumeTick(handle, sink, volume, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::ackSinkVolumeTickAsync(const uint16_t& handle, const am_gen::am_sinkID_t& sink, const am_gen::am_volume_t& volume, AckSinkVolumeTickAsyncCallback callback) {
+ return delegate_->ackSinkVolumeTickAsync(handle, sink, volume, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::ackCrossFading(const uint16_t& handle, const am_gen::am_HotSink_e& hotSink, const am_gen::am_Error_e& returnError, CommonAPI::CallStatus& callStatus) {
+ delegate_->ackCrossFading(handle, hotSink, returnError, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::ackCrossFadingAsync(const uint16_t& handle, const am_gen::am_HotSink_e& hotSink, const am_gen::am_Error_e& returnError, AckCrossFadingAsyncCallback callback) {
+ return delegate_->ackCrossFadingAsync(handle, hotSink, returnError, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::peekDomain(const std::string& name, CommonAPI::CallStatus& callStatus, am_gen::am_domainID_t& domainID, am_gen::am_Error_e& error) {
+ delegate_->peekDomain(name, callStatus, domainID, error);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::peekDomainAsync(const std::string& name, PeekDomainAsyncCallback callback) {
+ return delegate_->peekDomainAsync(name, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::registerDomain(const am_gen::am_Domain_s& domainData, const std::string& returnBusname, const std::string& returnPath, const std::string& returnInterface, CommonAPI::CallStatus& callStatus, am_gen::am_domainID_t& domainID, am_gen::am_Error_e& error) {
+ delegate_->registerDomain(domainData, returnBusname, returnPath, returnInterface, callStatus, domainID, error);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::registerDomainAsync(const am_gen::am_Domain_s& domainData, const std::string& returnBusname, const std::string& returnPath, const std::string& returnInterface, RegisterDomainAsyncCallback callback) {
+ return delegate_->registerDomainAsync(domainData, returnBusname, returnPath, returnInterface, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::deregisterDomain(const am_gen::am_domainID_t& domainID, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& returnError) {
+ delegate_->deregisterDomain(domainID, callStatus, returnError);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::deregisterDomainAsync(const am_gen::am_domainID_t& domainID, DeregisterDomainAsyncCallback callback) {
+ return delegate_->deregisterDomainAsync(domainID, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::registerGateway(const am_gen::am_Gateway_s& gatewayData, CommonAPI::CallStatus& callStatus, am_gen::am_gatewayID_t& gatewayID, am_gen::am_Error_e& error) {
+ delegate_->registerGateway(gatewayData, callStatus, gatewayID, error);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::registerGatewayAsync(const am_gen::am_Gateway_s& gatewayData, RegisterGatewayAsyncCallback callback) {
+ return delegate_->registerGatewayAsync(gatewayData, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::deregisterGateway(const am_gen::am_gatewayID_t& gatewayID, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& returnError) {
+ delegate_->deregisterGateway(gatewayID, callStatus, returnError);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::deregisterGatewayAsync(const am_gen::am_gatewayID_t& gatewayID, DeregisterGatewayAsyncCallback callback) {
+ return delegate_->deregisterGatewayAsync(gatewayID, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::peekSink(const std::string& name, CommonAPI::CallStatus& callStatus, am_gen::am_sinkID_t& sinkID, am_gen::am_Error_e& error) {
+ delegate_->peekSink(name, callStatus, sinkID, error);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::peekSinkAsync(const std::string& name, PeekSinkAsyncCallback callback) {
+ return delegate_->peekSinkAsync(name, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::registerSink(const am_gen::sinkData_s& sinkData, CommonAPI::CallStatus& callStatus, am_gen::am_sinkID_t& sinkID, am_gen::am_Error_e& error) {
+ delegate_->registerSink(sinkData, callStatus, sinkID, error);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::registerSinkAsync(const am_gen::sinkData_s& sinkData, RegisterSinkAsyncCallback callback) {
+ return delegate_->registerSinkAsync(sinkData, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::deregisterSink(const am_gen::am_sinkID_t& sinkID, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& returnError) {
+ delegate_->deregisterSink(sinkID, callStatus, returnError);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::deregisterSinkAsync(const am_gen::am_sinkID_t& sinkID, DeregisterSinkAsyncCallback callback) {
+ return delegate_->deregisterSinkAsync(sinkID, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::peekSource(const std::string& name, CommonAPI::CallStatus& callStatus, am_gen::am_sourceID_t& sourceID, am_gen::am_Error_e& error) {
+ delegate_->peekSource(name, callStatus, sourceID, error);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::peekSourceAsync(const std::string& name, PeekSourceAsyncCallback callback) {
+ return delegate_->peekSourceAsync(name, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::registerSource(const am_gen::sourceData_s& sourceData, CommonAPI::CallStatus& callStatus, am_gen::am_sourceID_t& sourceID, am_gen::am_Error_e& error) {
+ delegate_->registerSource(sourceData, callStatus, sourceID, error);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::registerSourceAsync(const am_gen::sourceData_s& sourceData, RegisterSourceAsyncCallback callback) {
+ return delegate_->registerSourceAsync(sourceData, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::deregisterSource(const am_gen::am_sourceID_t& sourceID, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& returnError) {
+ delegate_->deregisterSource(sourceID, callStatus, returnError);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::deregisterSourceAsync(const am_gen::am_sourceID_t& sourceID, DeregisterSourceAsyncCallback callback) {
+ return delegate_->deregisterSourceAsync(sourceID, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::registerCrossfader(const am_gen::crossfaderData_s& crossfaderData, CommonAPI::CallStatus& callStatus, am_gen::am_crossfaderID_t& crossfaderID, am_gen::am_Error_e& error) {
+ delegate_->registerCrossfader(crossfaderData, callStatus, crossfaderID, error);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::registerCrossfaderAsync(const am_gen::crossfaderData_s& crossfaderData, RegisterCrossfaderAsyncCallback callback) {
+ return delegate_->registerCrossfaderAsync(crossfaderData, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::deregisterCrossfader(const am_gen::am_crossfaderID_t& crossfaderID, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& returnError) {
+ delegate_->deregisterCrossfader(crossfaderID, callStatus, returnError);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::deregisterCrossfaderAsync(const am_gen::am_crossfaderID_t& crossfaderID, DeregisterCrossfaderAsyncCallback callback) {
+ return delegate_->deregisterCrossfaderAsync(crossfaderID, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::peekSourceClassID(const std::string& name, CommonAPI::CallStatus& callStatus, am_gen::am_sourceClass_t& sourceClassID, am_gen::am_Error_e& error) {
+ delegate_->peekSourceClassID(name, callStatus, sourceClassID, error);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::peekSourceClassIDAsync(const std::string& name, PeekSourceClassIDAsyncCallback callback) {
+ return delegate_->peekSourceClassIDAsync(name, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::peekSinkClassID(const std::string& name, CommonAPI::CallStatus& callStatus, am_gen::am_sinkClass_t& sinkClassID, am_gen::am_Error_e& error) {
+ delegate_->peekSinkClassID(name, callStatus, sinkClassID, error);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::peekSinkClassIDAsync(const std::string& name, PeekSinkClassIDAsyncCallback callback) {
+ return delegate_->peekSinkClassIDAsync(name, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::hookInterruptStatusChange(const am_gen::am_sourceID_t& sourceID, const uint16_t& interruptState, CommonAPI::CallStatus& callStatus) {
+ delegate_->hookInterruptStatusChange(sourceID, interruptState, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::hookInterruptStatusChangeAsync(const am_gen::am_sourceID_t& sourceID, const uint16_t& interruptState, HookInterruptStatusChangeAsyncCallback callback) {
+ return delegate_->hookInterruptStatusChangeAsync(sourceID, interruptState, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::hookDomainRegistrationComplete(const am_gen::am_domainID_t& domainID, CommonAPI::CallStatus& callStatus) {
+ delegate_->hookDomainRegistrationComplete(domainID, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::hookDomainRegistrationCompleteAsync(const am_gen::am_domainID_t& domainID, HookDomainRegistrationCompleteAsyncCallback callback) {
+ return delegate_->hookDomainRegistrationCompleteAsync(domainID, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::hookSinkAvailablityStatusChange(const am_gen::am_sinkID_t& sinkID, const am_gen::am_Availability_s& availability, CommonAPI::CallStatus& callStatus) {
+ delegate_->hookSinkAvailablityStatusChange(sinkID, availability, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::hookSinkAvailablityStatusChangeAsync(const am_gen::am_sinkID_t& sinkID, const am_gen::am_Availability_s& availability, HookSinkAvailablityStatusChangeAsyncCallback callback) {
+ return delegate_->hookSinkAvailablityStatusChangeAsync(sinkID, availability, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::hookSourceAvailablityStatusChange(const am_gen::am_sourceID_t& sourceID, const am_gen::am_Availability_s& availability, CommonAPI::CallStatus& callStatus) {
+ delegate_->hookSourceAvailablityStatusChange(sourceID, availability, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::hookSourceAvailablityStatusChangeAsync(const am_gen::am_sourceID_t& sourceID, const am_gen::am_Availability_s& availability, HookSourceAvailablityStatusChangeAsyncCallback callback) {
+ return delegate_->hookSourceAvailablityStatusChangeAsync(sourceID, availability, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::hookDomainStateChange(const am_gen::am_domainID_t& domainID, const am_gen::am_DomainState_e& domainState, CommonAPI::CallStatus& callStatus) {
+ delegate_->hookDomainStateChange(domainID, domainState, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::hookDomainStateChangeAsync(const am_gen::am_domainID_t& domainID, const am_gen::am_DomainState_e& domainState, HookDomainStateChangeAsyncCallback callback) {
+ return delegate_->hookDomainStateChangeAsync(domainID, domainState, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::hookTimingInformationChanged(const am_gen::am_connectionID_t& connectionID, const int16_t& delay, CommonAPI::CallStatus& callStatus) {
+ delegate_->hookTimingInformationChanged(connectionID, delay, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::hookTimingInformationChangedAsync(const am_gen::am_connectionID_t& connectionID, const int16_t& delay, HookTimingInformationChangedAsyncCallback callback) {
+ return delegate_->hookTimingInformationChangedAsync(connectionID, delay, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::sendChangedData(const am_gen::am_EarlyData_l& earlyData_volumes, const am_gen::am_EarlyData_l& earlyData_soundproperties, CommonAPI::CallStatus& callStatus) {
+ delegate_->sendChangedData(earlyData_volumes, earlyData_soundproperties, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::sendChangedDataAsync(const am_gen::am_EarlyData_l& earlyData_volumes, const am_gen::am_EarlyData_l& earlyData_soundproperties, SendChangedDataAsyncCallback callback) {
+ return delegate_->sendChangedDataAsync(earlyData_volumes, earlyData_soundproperties, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::confirmRoutingReady(const am_gen::am_domainID_t& domainID, CommonAPI::CallStatus& callStatus) {
+ delegate_->confirmRoutingReady(domainID, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::confirmRoutingReadyAsync(const am_gen::am_domainID_t& domainID, ConfirmRoutingReadyAsyncCallback callback) {
+ return delegate_->confirmRoutingReadyAsync(domainID, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::confirmRoutingRundown(const am_gen::am_domainID_t& domainID, CommonAPI::CallStatus& callStatus) {
+ delegate_->confirmRoutingRundown(domainID, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::confirmRoutingRundownAsync(const am_gen::am_domainID_t& domainID, ConfirmRoutingRundownAsyncCallback callback) {
+ return delegate_->confirmRoutingRundownAsync(domainID, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::updateGateway(const am_gen::am_gatewayID_t& gatewayID, const am_gen::am_ConnectionFormat_L& listSourceFormats, const am_gen::am_ConnectionFormat_L& listSinkFormats, const am_gen::bool_L& convertionMatrix, CommonAPI::CallStatus& callStatus) {
+ delegate_->updateGateway(gatewayID, listSourceFormats, listSinkFormats, convertionMatrix, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::updateGatewayAsync(const am_gen::am_gatewayID_t& gatewayID, const am_gen::am_ConnectionFormat_L& listSourceFormats, const am_gen::am_ConnectionFormat_L& listSinkFormats, const am_gen::bool_L& convertionMatrix, UpdateGatewayAsyncCallback callback) {
+ return delegate_->updateGatewayAsync(gatewayID, listSourceFormats, listSinkFormats, convertionMatrix, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::updateSink(const am_gen::am_sinkID_t& sinkID, const am_gen::am_sinkClass_t& sinkClassID, const am_gen::am_SoundProperty_L& listSoundProperties, const am_gen::am_ConnectionFormat_L& listConnectionFormats, const am_gen::am_MainSoundProperty_L& listMainSoundProperties, CommonAPI::CallStatus& callStatus) {
+ delegate_->updateSink(sinkID, sinkClassID, listSoundProperties, listConnectionFormats, listMainSoundProperties, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::updateSinkAsync(const am_gen::am_sinkID_t& sinkID, const am_gen::am_sinkClass_t& sinkClassID, const am_gen::am_SoundProperty_L& listSoundProperties, const am_gen::am_ConnectionFormat_L& listConnectionFormats, const am_gen::am_MainSoundProperty_L& listMainSoundProperties, UpdateSinkAsyncCallback callback) {
+ return delegate_->updateSinkAsync(sinkID, sinkClassID, listSoundProperties, listConnectionFormats, listMainSoundProperties, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::updateSource(const am_gen::am_sourceID_t& sourceID, const am_gen::am_sourceClass_t& sourceClassID, const am_gen::am_SoundProperty_L& listSoundProperties, const am_gen::am_ConnectionFormat_L& listConnectionFormats, const am_gen::am_MainSoundProperty_L& listMainSoundProperties, CommonAPI::CallStatus& callStatus) {
+ delegate_->updateSource(sourceID, sourceClassID, listSoundProperties, listConnectionFormats, listMainSoundProperties, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::updateSourceAsync(const am_gen::am_sourceID_t& sourceID, const am_gen::am_sourceClass_t& sourceClassID, const am_gen::am_SoundProperty_L& listSoundProperties, const am_gen::am_ConnectionFormat_L& listConnectionFormats, const am_gen::am_MainSoundProperty_L& listMainSoundProperties, UpdateSourceAsyncCallback callback) {
+ return delegate_->updateSourceAsync(sourceID, sourceClassID, listSoundProperties, listConnectionFormats, listMainSoundProperties, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::ackSetVolumes(const uint16_t& handle, const am_gen::am_Volumes_l& listVolumes, const uint16_t& error, CommonAPI::CallStatus& callStatus) {
+ delegate_->ackSetVolumes(handle, listVolumes, error, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::ackSetVolumesAsync(const uint16_t& handle, const am_gen::am_Volumes_l& listVolumes, const uint16_t& error, AckSetVolumesAsyncCallback callback) {
+ return delegate_->ackSetVolumesAsync(handle, listVolumes, error, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::ackSinkNotificationConfiguration(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus) {
+ delegate_->ackSinkNotificationConfiguration(handle, error, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::ackSinkNotificationConfigurationAsync(const uint16_t& handle, const uint16_t& error, AckSinkNotificationConfigurationAsyncCallback callback) {
+ return delegate_->ackSinkNotificationConfigurationAsync(handle, error, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::ackSourceNotificationConfiguration(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus) {
+ delegate_->ackSourceNotificationConfiguration(handle, error, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::ackSourceNotificationConfigurationAsync(const uint16_t& handle, const uint16_t& error, AckSourceNotificationConfigurationAsyncCallback callback) {
+ return delegate_->ackSourceNotificationConfigurationAsync(handle, error, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::hookSinkNotificationDataChange(const am_gen::am_sinkID_t& sinkID, const am_gen::notificationPayload_s& payload, CommonAPI::CallStatus& callStatus) {
+ delegate_->hookSinkNotificationDataChange(sinkID, payload, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::hookSinkNotificationDataChangeAsync(const am_gen::am_sinkID_t& sinkID, const am_gen::notificationPayload_s& payload, HookSinkNotificationDataChangeAsyncCallback callback) {
+ return delegate_->hookSinkNotificationDataChangeAsync(sinkID, payload, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::hookSourceNotificationDataChange(const am_gen::am_sourceID_t& sourceID, const am_gen::notificationPayload_s& payload, CommonAPI::CallStatus& callStatus) {
+ delegate_->hookSourceNotificationDataChange(sourceID, payload, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::hookSourceNotificationDataChangeAsync(const am_gen::am_sourceID_t& sourceID, const am_gen::notificationPayload_s& payload, HookSourceNotificationDataChangeAsyncCallback callback) {
+ return delegate_->hookSourceNotificationDataChangeAsync(sourceID, payload, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingInterfaceProxy<_AttributeExtensions...>::getRoutingReadyState(CommonAPI::CallStatus& callStatus, bool& readyState) {
+ delegate_->getRoutingReadyState(callStatus, readyState);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingInterfaceProxy<_AttributeExtensions...>::getRoutingReadyStateAsync(GetRoutingReadyStateAsyncCallback callback) {
+ return delegate_->getRoutingReadyStateAsync(callback);
+}
+
+
+template <typename ... _AttributeExtensions>
+std::string RoutingInterfaceProxy<_AttributeExtensions...>::getAddress() const {
+ return delegate_->getAddress();
+}
+
+template <typename ... _AttributeExtensions>
+const std::string& RoutingInterfaceProxy<_AttributeExtensions...>::getDomain() const {
+ return delegate_->getDomain();
+}
+
+template <typename ... _AttributeExtensions>
+const std::string& RoutingInterfaceProxy<_AttributeExtensions...>::getServiceId() const {
+ return delegate_->getServiceId();
+}
+
+template <typename ... _AttributeExtensions>
+const std::string& RoutingInterfaceProxy<_AttributeExtensions...>::getInstanceId() const {
+ return delegate_->getInstanceId();
+}
+
+template <typename ... _AttributeExtensions>
+bool RoutingInterfaceProxy<_AttributeExtensions...>::isAvailable() const {
+ return delegate_->isAvailable();
+}
+
+template <typename ... _AttributeExtensions>
+CommonAPI::ProxyStatusEvent& RoutingInterfaceProxy<_AttributeExtensions...>::getProxyStatusEvent() {
+ return delegate_->getProxyStatusEvent();
+}
+
+template <typename ... _AttributeExtensions>
+CommonAPI::InterfaceVersionAttribute& RoutingInterfaceProxy<_AttributeExtensions...>::getInterfaceVersionAttribute() {
+ return delegate_->getInterfaceVersionAttribute();
+}
+
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
+
+
+
+#endif // ORG_GENIVI_AUDIOMANAGER_Routing_Interface_PROXY_H_
diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceProxyBase.h b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceProxyBase.h
new file mode 100644
index 0000000..f0726f5
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceProxyBase.h
@@ -0,0 +1,242 @@
+ /*
+ * This file was generated by the CommonAPI Generators.
+ *
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+ #ifndef ORG_GENIVI_AUDIOMANAGER_Routing_Interface_PROXY_BASE_H_
+ #define ORG_GENIVI_AUDIOMANAGER_Routing_Interface_PROXY_BASE_H_
+
+ #include "RoutingInterface.h"
+
+
+ #include <org/genivi/audiomanager/am_gen.h>
+
+ #define COMMONAPI_INTERNAL_COMPILATION
+
+ #include <CommonAPI/InputStream.h>
+ #include <CommonAPI/OutputStream.h>
+ #include <CommonAPI/SerializableStruct.h>
+ #include <cstdint>
+ #include <string>
+ #include <vector>
+
+ #include <CommonAPI/Event.h>
+ #include <CommonAPI/Proxy.h>
+ #include <functional>
+ #include <future>
+
+ #undef COMMONAPI_INTERNAL_COMPILATION
+
+ namespace org {
+ namespace genivi {
+ namespace audiomanager {
+
+ class RoutingInterfaceProxyBase: virtual public CommonAPI::Proxy {
+ public:
+ typedef CommonAPI::Event<> SetRoutingReadyEvent;
+ typedef CommonAPI::Event<> SetRoutingRundownEvent;
+ typedef std::function<void(const CommonAPI::CallStatus&)> AckConnectAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> AckDisconnectAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> AckSetSinkVolumeAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> AckSetSourceVolumeAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> AckSetSourceStateAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> AckSetSinkSoundPropertiesAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> AckSetSinkSoundPropertyAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> AckSetSourceSoundPropertiesAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> AckSetSourceSoundPropertyAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> AckSourceVolumeTickAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> AckSinkVolumeTickAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> AckCrossFadingAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const am_gen::am_domainID_t&, const am_gen::am_Error_e&)> PeekDomainAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const am_gen::am_domainID_t&, const am_gen::am_Error_e&)> RegisterDomainAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const am_gen::am_Error_e&)> DeregisterDomainAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const am_gen::am_gatewayID_t&, const am_gen::am_Error_e&)> RegisterGatewayAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const am_gen::am_Error_e&)> DeregisterGatewayAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const am_gen::am_sinkID_t&, const am_gen::am_Error_e&)> PeekSinkAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const am_gen::am_sinkID_t&, const am_gen::am_Error_e&)> RegisterSinkAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const am_gen::am_Error_e&)> DeregisterSinkAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const am_gen::am_sourceID_t&, const am_gen::am_Error_e&)> PeekSourceAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const am_gen::am_sourceID_t&, const am_gen::am_Error_e&)> RegisterSourceAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const am_gen::am_Error_e&)> DeregisterSourceAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const am_gen::am_crossfaderID_t&, const am_gen::am_Error_e&)> RegisterCrossfaderAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const am_gen::am_Error_e&)> DeregisterCrossfaderAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const am_gen::am_sourceClass_t&, const am_gen::am_Error_e&)> PeekSourceClassIDAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const am_gen::am_sinkClass_t&, const am_gen::am_Error_e&)> PeekSinkClassIDAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> HookInterruptStatusChangeAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> HookDomainRegistrationCompleteAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> HookSinkAvailablityStatusChangeAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> HookSourceAvailablityStatusChangeAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> HookDomainStateChangeAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> HookTimingInformationChangedAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> SendChangedDataAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> ConfirmRoutingReadyAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> ConfirmRoutingRundownAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> UpdateGatewayAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> UpdateSinkAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> UpdateSourceAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> AckSetVolumesAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> AckSinkNotificationConfigurationAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> AckSourceNotificationConfigurationAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> HookSinkNotificationDataChangeAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> HookSourceNotificationDataChangeAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const bool&)> GetRoutingReadyStateAsyncCallback;
+
+
+ virtual SetRoutingReadyEvent& getSetRoutingReadyEvent() = 0;
+ virtual SetRoutingRundownEvent& getSetRoutingRundownEvent() = 0;
+
+
+ virtual void ackConnect(const uint16_t& handle, const am_gen::am_connectionID_t& connectionID, const uint16_t& error, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> ackConnectAsync(const uint16_t& handle, const am_gen::am_connectionID_t& connectionID, const uint16_t& error, AckConnectAsyncCallback callback) = 0;
+
+ virtual void ackDisconnect(const uint16_t& handle, const am_gen::am_connectionID_t& connectionID, const uint16_t& error, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> ackDisconnectAsync(const uint16_t& handle, const am_gen::am_connectionID_t& connectionID, const uint16_t& error, AckDisconnectAsyncCallback callback) = 0;
+
+ virtual void ackSetSinkVolume(const uint16_t& handle, const am_gen::am_volume_t& volume, const uint16_t& error, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> ackSetSinkVolumeAsync(const uint16_t& handle, const am_gen::am_volume_t& volume, const uint16_t& error, AckSetSinkVolumeAsyncCallback callback) = 0;
+
+ virtual void ackSetSourceVolume(const uint16_t& handle, const am_gen::am_volume_t& volume, const uint16_t& error, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> ackSetSourceVolumeAsync(const uint16_t& handle, const am_gen::am_volume_t& volume, const uint16_t& error, AckSetSourceVolumeAsyncCallback callback) = 0;
+
+ virtual void ackSetSourceState(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> ackSetSourceStateAsync(const uint16_t& handle, const uint16_t& error, AckSetSourceStateAsyncCallback callback) = 0;
+
+ virtual void ackSetSinkSoundProperties(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> ackSetSinkSoundPropertiesAsync(const uint16_t& handle, const uint16_t& error, AckSetSinkSoundPropertiesAsyncCallback callback) = 0;
+
+ virtual void ackSetSinkSoundProperty(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> ackSetSinkSoundPropertyAsync(const uint16_t& handle, const uint16_t& error, AckSetSinkSoundPropertyAsyncCallback callback) = 0;
+
+ virtual void ackSetSourceSoundProperties(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> ackSetSourceSoundPropertiesAsync(const uint16_t& handle, const uint16_t& error, AckSetSourceSoundPropertiesAsyncCallback callback) = 0;
+
+ virtual void ackSetSourceSoundProperty(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> ackSetSourceSoundPropertyAsync(const uint16_t& handle, const uint16_t& error, AckSetSourceSoundPropertyAsyncCallback callback) = 0;
+
+ virtual void ackSourceVolumeTick(const uint16_t& handle, const am_gen::am_sourceID_t& source, const am_gen::am_volume_t& volume, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> ackSourceVolumeTickAsync(const uint16_t& handle, const am_gen::am_sourceID_t& source, const am_gen::am_volume_t& volume, AckSourceVolumeTickAsyncCallback callback) = 0;
+
+ virtual void ackSinkVolumeTick(const uint16_t& handle, const am_gen::am_sinkID_t& sink, const am_gen::am_volume_t& volume, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> ackSinkVolumeTickAsync(const uint16_t& handle, const am_gen::am_sinkID_t& sink, const am_gen::am_volume_t& volume, AckSinkVolumeTickAsyncCallback callback) = 0;
+
+ virtual void ackCrossFading(const uint16_t& handle, const am_gen::am_HotSink_e& hotSink, const am_gen::am_Error_e& returnError, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> ackCrossFadingAsync(const uint16_t& handle, const am_gen::am_HotSink_e& hotSink, const am_gen::am_Error_e& returnError, AckCrossFadingAsyncCallback callback) = 0;
+
+ virtual void peekDomain(const std::string& name, CommonAPI::CallStatus& callStatus, am_gen::am_domainID_t& domainID, am_gen::am_Error_e& error) = 0;
+ virtual std::future<CommonAPI::CallStatus> peekDomainAsync(const std::string& name, PeekDomainAsyncCallback callback) = 0;
+
+ virtual void registerDomain(const am_gen::am_Domain_s& domainData, const std::string& returnBusname, const std::string& returnPath, const std::string& returnInterface, CommonAPI::CallStatus& callStatus, am_gen::am_domainID_t& domainID, am_gen::am_Error_e& error) = 0;
+ virtual std::future<CommonAPI::CallStatus> registerDomainAsync(const am_gen::am_Domain_s& domainData, const std::string& returnBusname, const std::string& returnPath, const std::string& returnInterface, RegisterDomainAsyncCallback callback) = 0;
+
+ virtual void deregisterDomain(const am_gen::am_domainID_t& domainID, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& returnError) = 0;
+ virtual std::future<CommonAPI::CallStatus> deregisterDomainAsync(const am_gen::am_domainID_t& domainID, DeregisterDomainAsyncCallback callback) = 0;
+
+ virtual void registerGateway(const am_gen::am_Gateway_s& gatewayData, CommonAPI::CallStatus& callStatus, am_gen::am_gatewayID_t& gatewayID, am_gen::am_Error_e& error) = 0;
+ virtual std::future<CommonAPI::CallStatus> registerGatewayAsync(const am_gen::am_Gateway_s& gatewayData, RegisterGatewayAsyncCallback callback) = 0;
+
+ virtual void deregisterGateway(const am_gen::am_gatewayID_t& gatewayID, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& returnError) = 0;
+ virtual std::future<CommonAPI::CallStatus> deregisterGatewayAsync(const am_gen::am_gatewayID_t& gatewayID, DeregisterGatewayAsyncCallback callback) = 0;
+
+ virtual void peekSink(const std::string& name, CommonAPI::CallStatus& callStatus, am_gen::am_sinkID_t& sinkID, am_gen::am_Error_e& error) = 0;
+ virtual std::future<CommonAPI::CallStatus> peekSinkAsync(const std::string& name, PeekSinkAsyncCallback callback) = 0;
+
+ virtual void registerSink(const am_gen::sinkData_s& sinkData, CommonAPI::CallStatus& callStatus, am_gen::am_sinkID_t& sinkID, am_gen::am_Error_e& error) = 0;
+ virtual std::future<CommonAPI::CallStatus> registerSinkAsync(const am_gen::sinkData_s& sinkData, RegisterSinkAsyncCallback callback) = 0;
+
+ virtual void deregisterSink(const am_gen::am_sinkID_t& sinkID, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& returnError) = 0;
+ virtual std::future<CommonAPI::CallStatus> deregisterSinkAsync(const am_gen::am_sinkID_t& sinkID, DeregisterSinkAsyncCallback callback) = 0;
+
+ virtual void peekSource(const std::string& name, CommonAPI::CallStatus& callStatus, am_gen::am_sourceID_t& sourceID, am_gen::am_Error_e& error) = 0;
+ virtual std::future<CommonAPI::CallStatus> peekSourceAsync(const std::string& name, PeekSourceAsyncCallback callback) = 0;
+
+ virtual void registerSource(const am_gen::sourceData_s& sourceData, CommonAPI::CallStatus& callStatus, am_gen::am_sourceID_t& sourceID, am_gen::am_Error_e& error) = 0;
+ virtual std::future<CommonAPI::CallStatus> registerSourceAsync(const am_gen::sourceData_s& sourceData, RegisterSourceAsyncCallback callback) = 0;
+
+ virtual void deregisterSource(const am_gen::am_sourceID_t& sourceID, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& returnError) = 0;
+ virtual std::future<CommonAPI::CallStatus> deregisterSourceAsync(const am_gen::am_sourceID_t& sourceID, DeregisterSourceAsyncCallback callback) = 0;
+
+ virtual void registerCrossfader(const am_gen::crossfaderData_s& crossfaderData, CommonAPI::CallStatus& callStatus, am_gen::am_crossfaderID_t& crossfaderID, am_gen::am_Error_e& error) = 0;
+ virtual std::future<CommonAPI::CallStatus> registerCrossfaderAsync(const am_gen::crossfaderData_s& crossfaderData, RegisterCrossfaderAsyncCallback callback) = 0;
+
+ virtual void deregisterCrossfader(const am_gen::am_crossfaderID_t& crossfaderID, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& returnError) = 0;
+ virtual std::future<CommonAPI::CallStatus> deregisterCrossfaderAsync(const am_gen::am_crossfaderID_t& crossfaderID, DeregisterCrossfaderAsyncCallback callback) = 0;
+
+ virtual void peekSourceClassID(const std::string& name, CommonAPI::CallStatus& callStatus, am_gen::am_sourceClass_t& sourceClassID, am_gen::am_Error_e& error) = 0;
+ virtual std::future<CommonAPI::CallStatus> peekSourceClassIDAsync(const std::string& name, PeekSourceClassIDAsyncCallback callback) = 0;
+
+ virtual void peekSinkClassID(const std::string& name, CommonAPI::CallStatus& callStatus, am_gen::am_sinkClass_t& sinkClassID, am_gen::am_Error_e& error) = 0;
+ virtual std::future<CommonAPI::CallStatus> peekSinkClassIDAsync(const std::string& name, PeekSinkClassIDAsyncCallback callback) = 0;
+
+ virtual void hookInterruptStatusChange(const am_gen::am_sourceID_t& sourceID, const uint16_t& interruptState, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> hookInterruptStatusChangeAsync(const am_gen::am_sourceID_t& sourceID, const uint16_t& interruptState, HookInterruptStatusChangeAsyncCallback callback) = 0;
+
+ virtual void hookDomainRegistrationComplete(const am_gen::am_domainID_t& domainID, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> hookDomainRegistrationCompleteAsync(const am_gen::am_domainID_t& domainID, HookDomainRegistrationCompleteAsyncCallback callback) = 0;
+
+ virtual void hookSinkAvailablityStatusChange(const am_gen::am_sinkID_t& sinkID, const am_gen::am_Availability_s& availability, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> hookSinkAvailablityStatusChangeAsync(const am_gen::am_sinkID_t& sinkID, const am_gen::am_Availability_s& availability, HookSinkAvailablityStatusChangeAsyncCallback callback) = 0;
+
+ virtual void hookSourceAvailablityStatusChange(const am_gen::am_sourceID_t& sourceID, const am_gen::am_Availability_s& availability, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> hookSourceAvailablityStatusChangeAsync(const am_gen::am_sourceID_t& sourceID, const am_gen::am_Availability_s& availability, HookSourceAvailablityStatusChangeAsyncCallback callback) = 0;
+
+ virtual void hookDomainStateChange(const am_gen::am_domainID_t& domainID, const am_gen::am_DomainState_e& domainState, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> hookDomainStateChangeAsync(const am_gen::am_domainID_t& domainID, const am_gen::am_DomainState_e& domainState, HookDomainStateChangeAsyncCallback callback) = 0;
+
+ virtual void hookTimingInformationChanged(const am_gen::am_connectionID_t& connectionID, const int16_t& delay, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> hookTimingInformationChangedAsync(const am_gen::am_connectionID_t& connectionID, const int16_t& delay, HookTimingInformationChangedAsyncCallback callback) = 0;
+
+ virtual void sendChangedData(const am_gen::am_EarlyData_l& earlyData_volumes, const am_gen::am_EarlyData_l& earlyData_soundproperties, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> sendChangedDataAsync(const am_gen::am_EarlyData_l& earlyData_volumes, const am_gen::am_EarlyData_l& earlyData_soundproperties, SendChangedDataAsyncCallback callback) = 0;
+
+ virtual void confirmRoutingReady(const am_gen::am_domainID_t& domainID, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> confirmRoutingReadyAsync(const am_gen::am_domainID_t& domainID, ConfirmRoutingReadyAsyncCallback callback) = 0;
+
+ virtual void confirmRoutingRundown(const am_gen::am_domainID_t& domainID, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> confirmRoutingRundownAsync(const am_gen::am_domainID_t& domainID, ConfirmRoutingRundownAsyncCallback callback) = 0;
+
+ virtual void updateGateway(const am_gen::am_gatewayID_t& gatewayID, const am_gen::am_ConnectionFormat_L& listSourceFormats, const am_gen::am_ConnectionFormat_L& listSinkFormats, const am_gen::bool_L& convertionMatrix, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> updateGatewayAsync(const am_gen::am_gatewayID_t& gatewayID, const am_gen::am_ConnectionFormat_L& listSourceFormats, const am_gen::am_ConnectionFormat_L& listSinkFormats, const am_gen::bool_L& convertionMatrix, UpdateGatewayAsyncCallback callback) = 0;
+
+ virtual void updateSink(const am_gen::am_sinkID_t& sinkID, const am_gen::am_sinkClass_t& sinkClassID, const am_gen::am_SoundProperty_L& listSoundProperties, const am_gen::am_ConnectionFormat_L& listConnectionFormats, const am_gen::am_MainSoundProperty_L& listMainSoundProperties, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> updateSinkAsync(const am_gen::am_sinkID_t& sinkID, const am_gen::am_sinkClass_t& sinkClassID, const am_gen::am_SoundProperty_L& listSoundProperties, const am_gen::am_ConnectionFormat_L& listConnectionFormats, const am_gen::am_MainSoundProperty_L& listMainSoundProperties, UpdateSinkAsyncCallback callback) = 0;
+
+ virtual void updateSource(const am_gen::am_sourceID_t& sourceID, const am_gen::am_sourceClass_t& sourceClassID, const am_gen::am_SoundProperty_L& listSoundProperties, const am_gen::am_ConnectionFormat_L& listConnectionFormats, const am_gen::am_MainSoundProperty_L& listMainSoundProperties, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> updateSourceAsync(const am_gen::am_sourceID_t& sourceID, const am_gen::am_sourceClass_t& sourceClassID, const am_gen::am_SoundProperty_L& listSoundProperties, const am_gen::am_ConnectionFormat_L& listConnectionFormats, const am_gen::am_MainSoundProperty_L& listMainSoundProperties, UpdateSourceAsyncCallback callback) = 0;
+
+ virtual void ackSetVolumes(const uint16_t& handle, const am_gen::am_Volumes_l& listVolumes, const uint16_t& error, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> ackSetVolumesAsync(const uint16_t& handle, const am_gen::am_Volumes_l& listVolumes, const uint16_t& error, AckSetVolumesAsyncCallback callback) = 0;
+
+ virtual void ackSinkNotificationConfiguration(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> ackSinkNotificationConfigurationAsync(const uint16_t& handle, const uint16_t& error, AckSinkNotificationConfigurationAsyncCallback callback) = 0;
+
+ virtual void ackSourceNotificationConfiguration(const uint16_t& handle, const uint16_t& error, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> ackSourceNotificationConfigurationAsync(const uint16_t& handle, const uint16_t& error, AckSourceNotificationConfigurationAsyncCallback callback) = 0;
+
+ virtual void hookSinkNotificationDataChange(const am_gen::am_sinkID_t& sinkID, const am_gen::notificationPayload_s& payload, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> hookSinkNotificationDataChangeAsync(const am_gen::am_sinkID_t& sinkID, const am_gen::notificationPayload_s& payload, HookSinkNotificationDataChangeAsyncCallback callback) = 0;
+
+ virtual void hookSourceNotificationDataChange(const am_gen::am_sourceID_t& sourceID, const am_gen::notificationPayload_s& payload, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> hookSourceNotificationDataChangeAsync(const am_gen::am_sourceID_t& sourceID, const am_gen::notificationPayload_s& payload, HookSourceNotificationDataChangeAsyncCallback callback) = 0;
+
+ virtual void getRoutingReadyState(CommonAPI::CallStatus& callStatus, bool& readyState) = 0;
+ virtual std::future<CommonAPI::CallStatus> getRoutingReadyStateAsync(GetRoutingReadyStateAsyncCallback callback) = 0;
+ };
+
+ } // namespace audiomanager
+ } // namespace genivi
+ } // namespace org
+
+ #endif // ORG_GENIVI_AUDIOMANAGER_Routing_Interface_PROXY_BASE_H_
diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceStub.h b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceStub.h
new file mode 100644
index 0000000..a6fc8f3
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceStub.h
@@ -0,0 +1,198 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_AUDIOMANAGER_Routing_Interface_STUB_H_
+#define ORG_GENIVI_AUDIOMANAGER_Routing_Interface_STUB_H_
+
+
+
+#include <org/genivi/audiomanager/am_gen.h>
+
+#include "RoutingInterface.h"
+
+#define COMMONAPI_INTERNAL_COMPILATION
+
+#include <CommonAPI/InputStream.h>
+#include <CommonAPI/OutputStream.h>
+#include <CommonAPI/SerializableStruct.h>
+#include <cstdint>
+#include <string>
+#include <vector>
+
+#include <CommonAPI/Stub.h>
+
+#undef COMMONAPI_INTERNAL_COMPILATION
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+
+/**
+ * Receives messages from remote and handles all dispatching of deserialized calls
+ * to a stub for the service RoutingInterface. Also provides means to send broadcasts
+ * and attribute-changed-notifications of observable attributes as defined by this service.
+ * An application developer should not need to bother with this class.
+ */
+class RoutingInterfaceStubAdapter: virtual public CommonAPI::StubAdapter, public RoutingInterface {
+ public:
+
+ /**
+ * Sends a broadcast event for setRoutingReady. Should not be called directly.
+ * Instead, the "fire<broadcastName>Event" methods of the stub should be used.
+ */
+ virtual void fireSetRoutingReadyEvent() = 0;
+ /**
+ * Sends a broadcast event for setRoutingRundown. Should not be called directly.
+ * Instead, the "fire<broadcastName>Event" methods of the stub should be used.
+ */
+ virtual void fireSetRoutingRundownEvent() = 0;
+};
+
+
+/**
+ * Defines the necessary callbacks to handle remote set events related to the attributes
+ * defined in the IDL description for RoutingInterface.
+ * For each attribute two callbacks are defined:
+ * - a verification callback that allows to verify the requested value and to prevent setting
+ * e.g. an invalid value ("onRemoteSet<AttributeName>").
+ * - an action callback to do local work after the attribute value has been changed
+ * ("onRemote<AttributeName>Changed").
+ *
+ * This class and the one below are the ones an application developer needs to have
+ * a look at if he wants to implement a service.
+ */
+class RoutingInterfaceStubRemoteEvent {
+ public:
+ virtual ~RoutingInterfaceStubRemoteEvent() { }
+
+};
+
+
+/**
+ * Defines the interface that must be implemented by any class that should provide
+ * the service RoutingInterface to remote clients.
+ * This class and the one above are the ones an application developer needs to have
+ * a look at if he wants to implement a service.
+ */
+class RoutingInterfaceStub : public CommonAPI::Stub<RoutingInterfaceStubAdapter , RoutingInterfaceStubRemoteEvent> {
+ public:
+ virtual ~RoutingInterfaceStub() { }
+
+
+ /// This is the method that will be called on remote calls on the method ackConnect.
+ virtual void ackConnect(uint16_t handle, am_gen::am_connectionID_t connectionID, uint16_t error) = 0;
+ /// This is the method that will be called on remote calls on the method ackDisconnect.
+ virtual void ackDisconnect(uint16_t handle, am_gen::am_connectionID_t connectionID, uint16_t error) = 0;
+ /// This is the method that will be called on remote calls on the method ackSetSinkVolume.
+ virtual void ackSetSinkVolume(uint16_t handle, am_gen::am_volume_t volume, uint16_t error) = 0;
+ /// This is the method that will be called on remote calls on the method ackSetSourceVolume.
+ virtual void ackSetSourceVolume(uint16_t handle, am_gen::am_volume_t volume, uint16_t error) = 0;
+ /// This is the method that will be called on remote calls on the method ackSetSourceState.
+ virtual void ackSetSourceState(uint16_t handle, uint16_t error) = 0;
+ /// This is the method that will be called on remote calls on the method ackSetSinkSoundProperties.
+ virtual void ackSetSinkSoundProperties(uint16_t handle, uint16_t error) = 0;
+ /// This is the method that will be called on remote calls on the method ackSetSinkSoundProperty.
+ virtual void ackSetSinkSoundProperty(uint16_t handle, uint16_t error) = 0;
+ /// This is the method that will be called on remote calls on the method ackSetSourceSoundProperties.
+ virtual void ackSetSourceSoundProperties(uint16_t handle, uint16_t error) = 0;
+ /// This is the method that will be called on remote calls on the method ackSetSourceSoundProperty.
+ virtual void ackSetSourceSoundProperty(uint16_t handle, uint16_t error) = 0;
+ /// This is the method that will be called on remote calls on the method ackSourceVolumeTick.
+ virtual void ackSourceVolumeTick(uint16_t handle, am_gen::am_sourceID_t source, am_gen::am_volume_t volume) = 0;
+ /// This is the method that will be called on remote calls on the method ackSinkVolumeTick.
+ virtual void ackSinkVolumeTick(uint16_t handle, am_gen::am_sinkID_t sink, am_gen::am_volume_t volume) = 0;
+ /// This is the method that will be called on remote calls on the method ackCrossFading.
+ virtual void ackCrossFading(uint16_t handle, am_gen::am_HotSink_e hotSink, am_gen::am_Error_e returnError) = 0;
+ /// This is the method that will be called on remote calls on the method peekDomain.
+ virtual void peekDomain(std::string name, am_gen::am_domainID_t& domainID, am_gen::am_Error_e& error) = 0;
+ /// This is the method that will be called on remote calls on the method registerDomain.
+ virtual void registerDomain(am_gen::am_Domain_s domainData, std::string returnBusname, std::string returnPath, std::string returnInterface, am_gen::am_domainID_t& domainID, am_gen::am_Error_e& error) = 0;
+ /// This is the method that will be called on remote calls on the method deregisterDomain.
+ virtual void deregisterDomain(am_gen::am_domainID_t domainID, am_gen::am_Error_e& returnError) = 0;
+ /// This is the method that will be called on remote calls on the method registerGateway.
+ virtual void registerGateway(am_gen::am_Gateway_s gatewayData, am_gen::am_gatewayID_t& gatewayID, am_gen::am_Error_e& error) = 0;
+ /// This is the method that will be called on remote calls on the method deregisterGateway.
+ virtual void deregisterGateway(am_gen::am_gatewayID_t gatewayID, am_gen::am_Error_e& returnError) = 0;
+ /// This is the method that will be called on remote calls on the method peekSink.
+ virtual void peekSink(std::string name, am_gen::am_sinkID_t& sinkID, am_gen::am_Error_e& error) = 0;
+ /// This is the method that will be called on remote calls on the method registerSink.
+ virtual void registerSink(am_gen::sinkData_s sinkData, am_gen::am_sinkID_t& sinkID, am_gen::am_Error_e& error) = 0;
+ /// This is the method that will be called on remote calls on the method deregisterSink.
+ virtual void deregisterSink(am_gen::am_sinkID_t sinkID, am_gen::am_Error_e& returnError) = 0;
+ /// This is the method that will be called on remote calls on the method peekSource.
+ virtual void peekSource(std::string name, am_gen::am_sourceID_t& sourceID, am_gen::am_Error_e& error) = 0;
+ /// This is the method that will be called on remote calls on the method registerSource.
+ virtual void registerSource(am_gen::sourceData_s sourceData, am_gen::am_sourceID_t& sourceID, am_gen::am_Error_e& error) = 0;
+ /// This is the method that will be called on remote calls on the method deregisterSource.
+ virtual void deregisterSource(am_gen::am_sourceID_t sourceID, am_gen::am_Error_e& returnError) = 0;
+ /// This is the method that will be called on remote calls on the method registerCrossfader.
+ virtual void registerCrossfader(am_gen::crossfaderData_s crossfaderData, am_gen::am_crossfaderID_t& crossfaderID, am_gen::am_Error_e& error) = 0;
+ /// This is the method that will be called on remote calls on the method deregisterCrossfader.
+ virtual void deregisterCrossfader(am_gen::am_crossfaderID_t crossfaderID, am_gen::am_Error_e& returnError) = 0;
+ /// This is the method that will be called on remote calls on the method peekSourceClassID.
+ virtual void peekSourceClassID(std::string name, am_gen::am_sourceClass_t& sourceClassID, am_gen::am_Error_e& error) = 0;
+ /// This is the method that will be called on remote calls on the method peekSinkClassID.
+ virtual void peekSinkClassID(std::string name, am_gen::am_sinkClass_t& sinkClassID, am_gen::am_Error_e& error) = 0;
+ /// This is the method that will be called on remote calls on the method hookInterruptStatusChange.
+ virtual void hookInterruptStatusChange(am_gen::am_sourceID_t sourceID, uint16_t interruptState) = 0;
+ /// This is the method that will be called on remote calls on the method hookDomainRegistrationComplete.
+ virtual void hookDomainRegistrationComplete(am_gen::am_domainID_t domainID) = 0;
+ /// This is the method that will be called on remote calls on the method hookSinkAvailablityStatusChange.
+ virtual void hookSinkAvailablityStatusChange(am_gen::am_sinkID_t sinkID, am_gen::am_Availability_s availability) = 0;
+ /// This is the method that will be called on remote calls on the method hookSourceAvailablityStatusChange.
+ virtual void hookSourceAvailablityStatusChange(am_gen::am_sourceID_t sourceID, am_gen::am_Availability_s availability) = 0;
+ /// This is the method that will be called on remote calls on the method hookDomainStateChange.
+ virtual void hookDomainStateChange(am_gen::am_domainID_t domainID, am_gen::am_DomainState_e domainState) = 0;
+ /// This is the method that will be called on remote calls on the method hookTimingInformationChanged.
+ virtual void hookTimingInformationChanged(am_gen::am_connectionID_t connectionID, int16_t delay) = 0;
+ /// This is the method that will be called on remote calls on the method sendChangedData.
+ virtual void sendChangedData(am_gen::am_EarlyData_l earlyData_volumes, am_gen::am_EarlyData_l earlyData_soundproperties) = 0;
+ /// This is the method that will be called on remote calls on the method confirmRoutingReady.
+ virtual void confirmRoutingReady(am_gen::am_domainID_t domainID) = 0;
+ /// This is the method that will be called on remote calls on the method confirmRoutingRundown.
+ virtual void confirmRoutingRundown(am_gen::am_domainID_t domainID) = 0;
+ /// This is the method that will be called on remote calls on the method updateGateway.
+ virtual void updateGateway(am_gen::am_gatewayID_t gatewayID, am_gen::am_ConnectionFormat_L listSourceFormats, am_gen::am_ConnectionFormat_L listSinkFormats, am_gen::bool_L convertionMatrix) = 0;
+ /// This is the method that will be called on remote calls on the method updateSink.
+ virtual void updateSink(am_gen::am_sinkID_t sinkID, am_gen::am_sinkClass_t sinkClassID, am_gen::am_SoundProperty_L listSoundProperties, am_gen::am_ConnectionFormat_L listConnectionFormats, am_gen::am_MainSoundProperty_L listMainSoundProperties) = 0;
+ /// This is the method that will be called on remote calls on the method updateSource.
+ virtual void updateSource(am_gen::am_sourceID_t sourceID, am_gen::am_sourceClass_t sourceClassID, am_gen::am_SoundProperty_L listSoundProperties, am_gen::am_ConnectionFormat_L listConnectionFormats, am_gen::am_MainSoundProperty_L listMainSoundProperties) = 0;
+ /// This is the method that will be called on remote calls on the method ackSetVolumes.
+ virtual void ackSetVolumes(uint16_t handle, am_gen::am_Volumes_l listVolumes, uint16_t error) = 0;
+ /// This is the method that will be called on remote calls on the method ackSinkNotificationConfiguration.
+ virtual void ackSinkNotificationConfiguration(uint16_t handle, uint16_t error) = 0;
+ /// This is the method that will be called on remote calls on the method ackSourceNotificationConfiguration.
+ virtual void ackSourceNotificationConfiguration(uint16_t handle, uint16_t error) = 0;
+ /// This is the method that will be called on remote calls on the method hookSinkNotificationDataChange.
+ virtual void hookSinkNotificationDataChange(am_gen::am_sinkID_t sinkID, am_gen::notificationPayload_s payload) = 0;
+ /// This is the method that will be called on remote calls on the method hookSourceNotificationDataChange.
+ virtual void hookSourceNotificationDataChange(am_gen::am_sourceID_t sourceID, am_gen::notificationPayload_s payload) = 0;
+ /// This is the method that will be called on remote calls on the method getRoutingReadyState.
+ virtual void getRoutingReadyState(bool& readyState) = 0;
+
+ /// Sends a broadcast event for setRoutingReady.
+ virtual void fireSetRoutingReadyEvent() = 0;
+ /// Sends a broadcast event for setRoutingRundown.
+ virtual void fireSetRoutingRundownEvent() = 0;
+};
+
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
+
+#endif // ORG_GENIVI_AUDIOMANAGER_Routing_Interface_STUB_H_
diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceStubDefault.cpp b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceStubDefault.cpp
new file mode 100644
index 0000000..ca0b6c2
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceStubDefault.cpp
@@ -0,0 +1,229 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#include <org/genivi/audiomanager/RoutingInterfaceStubDefault.h>
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+
+RoutingInterfaceStubDefault::RoutingInterfaceStubDefault():
+ remoteEventHandler_(this) {
+}
+
+RoutingInterfaceStubRemoteEvent* RoutingInterfaceStubDefault::initStubAdapter(const std::shared_ptr<RoutingInterfaceStubAdapter>& stubAdapter) {
+ stubAdapter_ = stubAdapter;
+ return &remoteEventHandler_;
+}
+
+
+void RoutingInterfaceStubDefault::ackConnect(uint16_t handle, am_gen::am_connectionID_t connectionID, uint16_t error) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::ackDisconnect(uint16_t handle, am_gen::am_connectionID_t connectionID, uint16_t error) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::ackSetSinkVolume(uint16_t handle, am_gen::am_volume_t volume, uint16_t error) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::ackSetSourceVolume(uint16_t handle, am_gen::am_volume_t volume, uint16_t error) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::ackSetSourceState(uint16_t handle, uint16_t error) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::ackSetSinkSoundProperties(uint16_t handle, uint16_t error) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::ackSetSinkSoundProperty(uint16_t handle, uint16_t error) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::ackSetSourceSoundProperties(uint16_t handle, uint16_t error) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::ackSetSourceSoundProperty(uint16_t handle, uint16_t error) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::ackSourceVolumeTick(uint16_t handle, am_gen::am_sourceID_t source, am_gen::am_volume_t volume) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::ackSinkVolumeTick(uint16_t handle, am_gen::am_sinkID_t sink, am_gen::am_volume_t volume) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::ackCrossFading(uint16_t handle, am_gen::am_HotSink_e hotSink, am_gen::am_Error_e returnError) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::peekDomain(std::string name, am_gen::am_domainID_t& domainID, am_gen::am_Error_e& error) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::registerDomain(am_gen::am_Domain_s domainData, std::string returnBusname, std::string returnPath, std::string returnInterface, am_gen::am_domainID_t& domainID, am_gen::am_Error_e& error) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::deregisterDomain(am_gen::am_domainID_t domainID, am_gen::am_Error_e& returnError) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::registerGateway(am_gen::am_Gateway_s gatewayData, am_gen::am_gatewayID_t& gatewayID, am_gen::am_Error_e& error) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::deregisterGateway(am_gen::am_gatewayID_t gatewayID, am_gen::am_Error_e& returnError) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::peekSink(std::string name, am_gen::am_sinkID_t& sinkID, am_gen::am_Error_e& error) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::registerSink(am_gen::sinkData_s sinkData, am_gen::am_sinkID_t& sinkID, am_gen::am_Error_e& error) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::deregisterSink(am_gen::am_sinkID_t sinkID, am_gen::am_Error_e& returnError) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::peekSource(std::string name, am_gen::am_sourceID_t& sourceID, am_gen::am_Error_e& error) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::registerSource(am_gen::sourceData_s sourceData, am_gen::am_sourceID_t& sourceID, am_gen::am_Error_e& error) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::deregisterSource(am_gen::am_sourceID_t sourceID, am_gen::am_Error_e& returnError) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::registerCrossfader(am_gen::crossfaderData_s crossfaderData, am_gen::am_crossfaderID_t& crossfaderID, am_gen::am_Error_e& error) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::deregisterCrossfader(am_gen::am_crossfaderID_t crossfaderID, am_gen::am_Error_e& returnError) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::peekSourceClassID(std::string name, am_gen::am_sourceClass_t& sourceClassID, am_gen::am_Error_e& error) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::peekSinkClassID(std::string name, am_gen::am_sinkClass_t& sinkClassID, am_gen::am_Error_e& error) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::hookInterruptStatusChange(am_gen::am_sourceID_t sourceID, uint16_t interruptState) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::hookDomainRegistrationComplete(am_gen::am_domainID_t domainID) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::hookSinkAvailablityStatusChange(am_gen::am_sinkID_t sinkID, am_gen::am_Availability_s availability) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::hookSourceAvailablityStatusChange(am_gen::am_sourceID_t sourceID, am_gen::am_Availability_s availability) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::hookDomainStateChange(am_gen::am_domainID_t domainID, am_gen::am_DomainState_e domainState) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::hookTimingInformationChanged(am_gen::am_connectionID_t connectionID, int16_t delay) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::sendChangedData(am_gen::am_EarlyData_l earlyData_volumes, am_gen::am_EarlyData_l earlyData_soundproperties) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::confirmRoutingReady(am_gen::am_domainID_t domainID) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::confirmRoutingRundown(am_gen::am_domainID_t domainID) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::updateGateway(am_gen::am_gatewayID_t gatewayID, am_gen::am_ConnectionFormat_L listSourceFormats, am_gen::am_ConnectionFormat_L listSinkFormats, am_gen::bool_L convertionMatrix) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::updateSink(am_gen::am_sinkID_t sinkID, am_gen::am_sinkClass_t sinkClassID, am_gen::am_SoundProperty_L listSoundProperties, am_gen::am_ConnectionFormat_L listConnectionFormats, am_gen::am_MainSoundProperty_L listMainSoundProperties) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::updateSource(am_gen::am_sourceID_t sourceID, am_gen::am_sourceClass_t sourceClassID, am_gen::am_SoundProperty_L listSoundProperties, am_gen::am_ConnectionFormat_L listConnectionFormats, am_gen::am_MainSoundProperty_L listMainSoundProperties) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::ackSetVolumes(uint16_t handle, am_gen::am_Volumes_l listVolumes, uint16_t error) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::ackSinkNotificationConfiguration(uint16_t handle, uint16_t error) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::ackSourceNotificationConfiguration(uint16_t handle, uint16_t error) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::hookSinkNotificationDataChange(am_gen::am_sinkID_t sinkID, am_gen::notificationPayload_s payload) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::hookSourceNotificationDataChange(am_gen::am_sourceID_t sourceID, am_gen::notificationPayload_s payload) {
+ // No operation in default
+}
+
+void RoutingInterfaceStubDefault::getRoutingReadyState(bool& readyState) {
+ // No operation in default
+}
+
+
+void RoutingInterfaceStubDefault::fireSetRoutingReadyEvent() {
+ stubAdapter_->fireSetRoutingReadyEvent();
+}
+void RoutingInterfaceStubDefault::fireSetRoutingRundownEvent() {
+ stubAdapter_->fireSetRoutingRundownEvent();
+}
+
+RoutingInterfaceStubDefault::RemoteEventHandler::RemoteEventHandler(RoutingInterfaceStubDefault* defaultStub):
+ defaultStub_(defaultStub) {
+}
+
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceStubDefault.h b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceStubDefault.h
new file mode 100644
index 0000000..b5ecd98
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingInterfaceStubDefault.h
@@ -0,0 +1,160 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_AUDIOMANAGER_Routing_Interface_STUB_DEFAULT_H_
+#define ORG_GENIVI_AUDIOMANAGER_Routing_Interface_STUB_DEFAULT_H_
+
+#include <org/genivi/audiomanager/RoutingInterfaceStub.h>
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+
+/**
+ * Provides a default implementation for RoutingInterfaceStubRemoteEvent and
+ * RoutingInterfaceStub. Method callbacks have an empty implementation,
+ * remote set calls on attributes will always change the value of the attribute
+ * to the one received.
+ *
+ * Override this stub if you only want to provide a subset of the functionality
+ * that would be defined for this service, and/or if you do not need any non-default
+ * behaviour.
+ */
+class RoutingInterfaceStubDefault : public RoutingInterfaceStub {
+ public:
+ RoutingInterfaceStubDefault();
+
+ RoutingInterfaceStubRemoteEvent* initStubAdapter(const std::shared_ptr<RoutingInterfaceStubAdapter>& stubAdapter);
+
+
+ virtual void ackConnect(uint16_t handle, am_gen::am_connectionID_t connectionID, uint16_t error);
+
+ virtual void ackDisconnect(uint16_t handle, am_gen::am_connectionID_t connectionID, uint16_t error);
+
+ virtual void ackSetSinkVolume(uint16_t handle, am_gen::am_volume_t volume, uint16_t error);
+
+ virtual void ackSetSourceVolume(uint16_t handle, am_gen::am_volume_t volume, uint16_t error);
+
+ virtual void ackSetSourceState(uint16_t handle, uint16_t error);
+
+ virtual void ackSetSinkSoundProperties(uint16_t handle, uint16_t error);
+
+ virtual void ackSetSinkSoundProperty(uint16_t handle, uint16_t error);
+
+ virtual void ackSetSourceSoundProperties(uint16_t handle, uint16_t error);
+
+ virtual void ackSetSourceSoundProperty(uint16_t handle, uint16_t error);
+
+ virtual void ackSourceVolumeTick(uint16_t handle, am_gen::am_sourceID_t source, am_gen::am_volume_t volume);
+
+ virtual void ackSinkVolumeTick(uint16_t handle, am_gen::am_sinkID_t sink, am_gen::am_volume_t volume);
+
+ virtual void ackCrossFading(uint16_t handle, am_gen::am_HotSink_e hotSink, am_gen::am_Error_e returnError);
+
+ virtual void peekDomain(std::string name, am_gen::am_domainID_t& domainID, am_gen::am_Error_e& error);
+
+ virtual void registerDomain(am_gen::am_Domain_s domainData, std::string returnBusname, std::string returnPath, std::string returnInterface, am_gen::am_domainID_t& domainID, am_gen::am_Error_e& error);
+
+ virtual void deregisterDomain(am_gen::am_domainID_t domainID, am_gen::am_Error_e& returnError);
+
+ virtual void registerGateway(am_gen::am_Gateway_s gatewayData, am_gen::am_gatewayID_t& gatewayID, am_gen::am_Error_e& error);
+
+ virtual void deregisterGateway(am_gen::am_gatewayID_t gatewayID, am_gen::am_Error_e& returnError);
+
+ virtual void peekSink(std::string name, am_gen::am_sinkID_t& sinkID, am_gen::am_Error_e& error);
+
+ virtual void registerSink(am_gen::sinkData_s sinkData, am_gen::am_sinkID_t& sinkID, am_gen::am_Error_e& error);
+
+ virtual void deregisterSink(am_gen::am_sinkID_t sinkID, am_gen::am_Error_e& returnError);
+
+ virtual void peekSource(std::string name, am_gen::am_sourceID_t& sourceID, am_gen::am_Error_e& error);
+
+ virtual void registerSource(am_gen::sourceData_s sourceData, am_gen::am_sourceID_t& sourceID, am_gen::am_Error_e& error);
+
+ virtual void deregisterSource(am_gen::am_sourceID_t sourceID, am_gen::am_Error_e& returnError);
+
+ virtual void registerCrossfader(am_gen::crossfaderData_s crossfaderData, am_gen::am_crossfaderID_t& crossfaderID, am_gen::am_Error_e& error);
+
+ virtual void deregisterCrossfader(am_gen::am_crossfaderID_t crossfaderID, am_gen::am_Error_e& returnError);
+
+ virtual void peekSourceClassID(std::string name, am_gen::am_sourceClass_t& sourceClassID, am_gen::am_Error_e& error);
+
+ virtual void peekSinkClassID(std::string name, am_gen::am_sinkClass_t& sinkClassID, am_gen::am_Error_e& error);
+
+ virtual void hookInterruptStatusChange(am_gen::am_sourceID_t sourceID, uint16_t interruptState);
+
+ virtual void hookDomainRegistrationComplete(am_gen::am_domainID_t domainID);
+
+ virtual void hookSinkAvailablityStatusChange(am_gen::am_sinkID_t sinkID, am_gen::am_Availability_s availability);
+
+ virtual void hookSourceAvailablityStatusChange(am_gen::am_sourceID_t sourceID, am_gen::am_Availability_s availability);
+
+ virtual void hookDomainStateChange(am_gen::am_domainID_t domainID, am_gen::am_DomainState_e domainState);
+
+ virtual void hookTimingInformationChanged(am_gen::am_connectionID_t connectionID, int16_t delay);
+
+ virtual void sendChangedData(am_gen::am_EarlyData_l earlyData_volumes, am_gen::am_EarlyData_l earlyData_soundproperties);
+
+ virtual void confirmRoutingReady(am_gen::am_domainID_t domainID);
+
+ virtual void confirmRoutingRundown(am_gen::am_domainID_t domainID);
+
+ virtual void updateGateway(am_gen::am_gatewayID_t gatewayID, am_gen::am_ConnectionFormat_L listSourceFormats, am_gen::am_ConnectionFormat_L listSinkFormats, am_gen::bool_L convertionMatrix);
+
+ virtual void updateSink(am_gen::am_sinkID_t sinkID, am_gen::am_sinkClass_t sinkClassID, am_gen::am_SoundProperty_L listSoundProperties, am_gen::am_ConnectionFormat_L listConnectionFormats, am_gen::am_MainSoundProperty_L listMainSoundProperties);
+
+ virtual void updateSource(am_gen::am_sourceID_t sourceID, am_gen::am_sourceClass_t sourceClassID, am_gen::am_SoundProperty_L listSoundProperties, am_gen::am_ConnectionFormat_L listConnectionFormats, am_gen::am_MainSoundProperty_L listMainSoundProperties);
+
+ virtual void ackSetVolumes(uint16_t handle, am_gen::am_Volumes_l listVolumes, uint16_t error);
+
+ virtual void ackSinkNotificationConfiguration(uint16_t handle, uint16_t error);
+
+ virtual void ackSourceNotificationConfiguration(uint16_t handle, uint16_t error);
+
+ virtual void hookSinkNotificationDataChange(am_gen::am_sinkID_t sinkID, am_gen::notificationPayload_s payload);
+
+ virtual void hookSourceNotificationDataChange(am_gen::am_sourceID_t sourceID, am_gen::notificationPayload_s payload);
+
+ virtual void getRoutingReadyState(bool& readyState);
+
+
+ virtual void fireSetRoutingReadyEvent();
+ virtual void fireSetRoutingRundownEvent();
+
+ protected:
+
+ private:
+ class RemoteEventHandler: public RoutingInterfaceStubRemoteEvent {
+ public:
+ RemoteEventHandler(RoutingInterfaceStubDefault* defaultStub);
+
+
+ private:
+ RoutingInterfaceStubDefault* defaultStub_;
+ };
+
+ RemoteEventHandler remoteEventHandler_;
+ std::shared_ptr<RoutingInterfaceStubAdapter> stubAdapter_;
+
+};
+
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
+
+#endif // ORG_GENIVI_AUDIOMANAGER_Routing_Interface_STUB_DEFAULT_H_
diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSender.h b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSender.h
new file mode 100644
index 0000000..077f1f0
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSender.h
@@ -0,0 +1,66 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_AUDIOMANAGER_Routing_Sender_H_
+#define ORG_GENIVI_AUDIOMANAGER_Routing_Sender_H_
+
+
+
+#define COMMONAPI_INTERNAL_COMPILATION
+
+#include <CommonAPI/types.h>
+
+#undef COMMONAPI_INTERNAL_COMPILATION
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+
+class RoutingSender {
+ public:
+ virtual ~RoutingSender() { }
+
+ static inline const char* getInterfaceId();
+ static inline CommonAPI::Version getInterfaceVersion();
+};
+
+const char* RoutingSender::getInterfaceId() {
+ return "org.genivi.audiomanager.RoutingSender";
+}
+
+CommonAPI::Version RoutingSender::getInterfaceVersion() {
+ return CommonAPI::Version(0, 1);
+}
+
+
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
+
+namespace CommonAPI {
+
+}
+
+
+namespace std {
+ //hashes for types
+
+ //hashes for error types
+}
+
+#endif // ORG_GENIVI_AUDIOMANAGER_Routing_Sender_H_
diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderDBusProxy.cpp b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderDBusProxy.cpp
new file mode 100644
index 0000000..00071a1
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderDBusProxy.cpp
@@ -0,0 +1,344 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#include "RoutingSenderDBusProxy.h"
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+
+std::shared_ptr<CommonAPI::DBus::DBusProxy> createRoutingSenderDBusProxy(
+ const std::string& commonApiAddress,
+ const std::string& interfaceName,
+ const std::string& busName,
+ const std::string& objectPath,
+ const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection) {
+ return std::make_shared<RoutingSenderDBusProxy>(commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection);
+}
+
+__attribute__((constructor)) void registerRoutingSenderDBusProxy(void) {
+ CommonAPI::DBus::DBusFactory::registerProxyFactoryMethod(RoutingSender::getInterfaceId(),
+ &createRoutingSenderDBusProxy);
+}
+
+RoutingSenderDBusProxy::RoutingSenderDBusProxy(
+ const std::string& commonApiAddress,
+ const std::string& interfaceName,
+ const std::string& busName,
+ const std::string& objectPath,
+ const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection):
+ CommonAPI::DBus::DBusProxy(commonApiAddress, interfaceName, busName, objectPath, dbusProxyconnection)
+ {
+}
+
+
+
+void RoutingSenderDBusProxy::asyncSetSourceState(const uint16_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_SourceState_e& sourceState, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, am_gen::am_sourceID_t, am_gen::am_SourceState_e>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "asyncSetSourceState",
+ "qqi",
+ handle, sourceID, sourceState,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingSenderDBusProxy::asyncSetSourceStateAsync(const uint16_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_SourceState_e& sourceState, AsyncSetSourceStateAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint16_t, am_gen::am_sourceID_t, am_gen::am_SourceState_e>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "asyncSetSourceState",
+ "qqi",
+ handle, sourceID, sourceState,
+ std::move(callback));
+}
+void RoutingSenderDBusProxy::setDomainState(const am_gen::am_domainID_t& domainID, const am_gen::am_DomainState_e& domainState, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& error) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_domainID_t, am_gen::am_DomainState_e>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_Error_e> >::callMethodWithReply(
+ *this,
+ "setDomainState",
+ "qi",
+ domainID, domainState,
+ callStatus
+ , error);
+}
+std::future<CommonAPI::CallStatus> RoutingSenderDBusProxy::setDomainStateAsync(const am_gen::am_domainID_t& domainID, const am_gen::am_DomainState_e& domainState, SetDomainStateAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_domainID_t, am_gen::am_DomainState_e>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_Error_e> >::callMethodAsync(
+ *this,
+ "setDomainState",
+ "qi",
+ domainID, domainState,
+ std::move(callback));
+}
+void RoutingSenderDBusProxy::asyncSetSourceVolume(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_volume_t& volume, const am_gen::am_RampType_e& ramp, const am_gen::am_time_t& time, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_handle_t, am_gen::am_sourceID_t, am_gen::am_volume_t, am_gen::am_RampType_e, am_gen::am_time_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "asyncSetSourceVolume",
+ "qqniq",
+ handle, sourceID, volume, ramp, time,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingSenderDBusProxy::asyncSetSourceVolumeAsync(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_volume_t& volume, const am_gen::am_RampType_e& ramp, const am_gen::am_time_t& time, AsyncSetSourceVolumeAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_handle_t, am_gen::am_sourceID_t, am_gen::am_volume_t, am_gen::am_RampType_e, am_gen::am_time_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "asyncSetSourceVolume",
+ "qqniq",
+ handle, sourceID, volume, ramp, time,
+ std::move(callback));
+}
+void RoutingSenderDBusProxy::asyncSetSinkVolume(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_volume_t& volume, const am_gen::am_RampType_e& ramp, const am_gen::am_time_t& time, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_handle_t, am_gen::am_sinkID_t, am_gen::am_volume_t, am_gen::am_RampType_e, am_gen::am_time_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "asyncSetSinkVolume",
+ "qqniq",
+ handle, sinkID, volume, ramp, time,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingSenderDBusProxy::asyncSetSinkVolumeAsync(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_volume_t& volume, const am_gen::am_RampType_e& ramp, const am_gen::am_time_t& time, AsyncSetSinkVolumeAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_handle_t, am_gen::am_sinkID_t, am_gen::am_volume_t, am_gen::am_RampType_e, am_gen::am_time_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "asyncSetSinkVolume",
+ "qqniq",
+ handle, sinkID, volume, ramp, time,
+ std::move(callback));
+}
+void RoutingSenderDBusProxy::asyncConnect(const am_gen::am_handle_t& handle, const am_gen::am_connectionID_t& connectionID, const am_gen::am_sourceID_t& sourceID, const am_gen::am_sinkID_t& sinkID, const am_gen::am_ConnectionFormat_e& connectionFormat, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_handle_t, am_gen::am_connectionID_t, am_gen::am_sourceID_t, am_gen::am_sinkID_t, am_gen::am_ConnectionFormat_e>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "asyncConnect",
+ "qqqqi",
+ handle, connectionID, sourceID, sinkID, connectionFormat,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingSenderDBusProxy::asyncConnectAsync(const am_gen::am_handle_t& handle, const am_gen::am_connectionID_t& connectionID, const am_gen::am_sourceID_t& sourceID, const am_gen::am_sinkID_t& sinkID, const am_gen::am_ConnectionFormat_e& connectionFormat, AsyncConnectAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_handle_t, am_gen::am_connectionID_t, am_gen::am_sourceID_t, am_gen::am_sinkID_t, am_gen::am_ConnectionFormat_e>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "asyncConnect",
+ "qqqqi",
+ handle, connectionID, sourceID, sinkID, connectionFormat,
+ std::move(callback));
+}
+void RoutingSenderDBusProxy::asyncDisconnect(const am_gen::am_handle_t& handle, const am_gen::am_connectionID_t& connectionID, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_handle_t, am_gen::am_connectionID_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "asyncDisconnect",
+ "qq",
+ handle, connectionID,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingSenderDBusProxy::asyncDisconnectAsync(const am_gen::am_handle_t& handle, const am_gen::am_connectionID_t& connectionID, AsyncDisconnectAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_handle_t, am_gen::am_connectionID_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "asyncDisconnect",
+ "qq",
+ handle, connectionID,
+ std::move(callback));
+}
+void RoutingSenderDBusProxy::asyncAbort(const am_gen::am_handle_t& handle, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& error) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_handle_t>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_Error_e> >::callMethodWithReply(
+ *this,
+ "asyncAbort",
+ "q",
+ handle,
+ callStatus
+ , error);
+}
+std::future<CommonAPI::CallStatus> RoutingSenderDBusProxy::asyncAbortAsync(const am_gen::am_handle_t& handle, AsyncAbortAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_handle_t>,
+ CommonAPI::DBus::DBusSerializableArguments<am_gen::am_Error_e> >::callMethodAsync(
+ *this,
+ "asyncAbort",
+ "q",
+ handle,
+ std::move(callback));
+}
+void RoutingSenderDBusProxy::asyncSetSinkSoundProperties(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_SoundProperty_L& listSoundProperties, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_handle_t, am_gen::am_sinkID_t, am_gen::am_SoundProperty_L>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "asyncSetSinkSoundProperties",
+ "qqa(in)",
+ handle, sinkID, listSoundProperties,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingSenderDBusProxy::asyncSetSinkSoundPropertiesAsync(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_SoundProperty_L& listSoundProperties, AsyncSetSinkSoundPropertiesAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_handle_t, am_gen::am_sinkID_t, am_gen::am_SoundProperty_L>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "asyncSetSinkSoundProperties",
+ "qqa(in)",
+ handle, sinkID, listSoundProperties,
+ std::move(callback));
+}
+void RoutingSenderDBusProxy::asyncSetSinkSoundProperty(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_SoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_handle_t, am_gen::am_sinkID_t, am_gen::am_SoundProperty_s>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "asyncSetSinkSoundProperty",
+ "qq(in)",
+ handle, sinkID, soundProperty,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingSenderDBusProxy::asyncSetSinkSoundPropertyAsync(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_SoundProperty_s& soundProperty, AsyncSetSinkSoundPropertyAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_handle_t, am_gen::am_sinkID_t, am_gen::am_SoundProperty_s>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "asyncSetSinkSoundProperty",
+ "qq(in)",
+ handle, sinkID, soundProperty,
+ std::move(callback));
+}
+void RoutingSenderDBusProxy::asyncSetSourceSoundProperties(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_SoundProperty_L& listSoundProperties, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_handle_t, am_gen::am_sourceID_t, am_gen::am_SoundProperty_L>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "asyncSetSourceSoundProperties",
+ "qqa(in)",
+ handle, sourceID, listSoundProperties,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingSenderDBusProxy::asyncSetSourceSoundPropertiesAsync(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_SoundProperty_L& listSoundProperties, AsyncSetSourceSoundPropertiesAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_handle_t, am_gen::am_sourceID_t, am_gen::am_SoundProperty_L>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "asyncSetSourceSoundProperties",
+ "qqa(in)",
+ handle, sourceID, listSoundProperties,
+ std::move(callback));
+}
+void RoutingSenderDBusProxy::asyncSetSourceSoundProperty(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_SoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_handle_t, am_gen::am_sourceID_t, am_gen::am_SoundProperty_s>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "asyncSetSourceSoundProperty",
+ "qq(in)",
+ handle, sourceID, soundProperty,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingSenderDBusProxy::asyncSetSourceSoundPropertyAsync(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_SoundProperty_s& soundProperty, AsyncSetSourceSoundPropertyAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_handle_t, am_gen::am_sourceID_t, am_gen::am_SoundProperty_s>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "asyncSetSourceSoundProperty",
+ "qq(in)",
+ handle, sourceID, soundProperty,
+ std::move(callback));
+}
+void RoutingSenderDBusProxy::asyncCrossFade(const am_gen::am_handle_t& handle, const am_gen::am_crossfaderID_t& crossfaderID, const am_gen::am_HotSink_e& hotSink, const am_gen::am_RampType_e& rampType, const am_gen::am_time_t& time, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_handle_t, am_gen::am_crossfaderID_t, am_gen::am_HotSink_e, am_gen::am_RampType_e, am_gen::am_time_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "asyncCrossFade",
+ "qqiiq",
+ handle, crossfaderID, hotSink, rampType, time,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingSenderDBusProxy::asyncCrossFadeAsync(const am_gen::am_handle_t& handle, const am_gen::am_crossfaderID_t& crossfaderID, const am_gen::am_HotSink_e& hotSink, const am_gen::am_RampType_e& rampType, const am_gen::am_time_t& time, AsyncCrossFadeAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_handle_t, am_gen::am_crossfaderID_t, am_gen::am_HotSink_e, am_gen::am_RampType_e, am_gen::am_time_t>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "asyncCrossFade",
+ "qqiiq",
+ handle, crossfaderID, hotSink, rampType, time,
+ std::move(callback));
+}
+void RoutingSenderDBusProxy::asyncSetVolumes(const am_gen::am_handle_t& handle, const am_gen::am_Volumes_l& volumes, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_handle_t, am_gen::am_Volumes_l>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "asyncSetVolumes",
+ "qa(i(yv)niq)",
+ handle, volumes,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingSenderDBusProxy::asyncSetVolumesAsync(const am_gen::am_handle_t& handle, const am_gen::am_Volumes_l& volumes, AsyncSetVolumesAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_handle_t, am_gen::am_Volumes_l>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "asyncSetVolumes",
+ "qa(i(yv)niq)",
+ handle, volumes,
+ std::move(callback));
+}
+void RoutingSenderDBusProxy::asyncSetSinkNotificationConfiguration(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_NotificationConfiguration_s& notificationConfiguration, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_handle_t, am_gen::am_sinkID_t, am_gen::am_NotificationConfiguration_s>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "asyncSetSinkNotificationConfiguration",
+ "qq(iin)",
+ handle, sinkID, notificationConfiguration,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingSenderDBusProxy::asyncSetSinkNotificationConfigurationAsync(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_NotificationConfiguration_s& notificationConfiguration, AsyncSetSinkNotificationConfigurationAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_handle_t, am_gen::am_sinkID_t, am_gen::am_NotificationConfiguration_s>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "asyncSetSinkNotificationConfiguration",
+ "qq(iin)",
+ handle, sinkID, notificationConfiguration,
+ std::move(callback));
+}
+void RoutingSenderDBusProxy::asyncSetSourceNotificationConfiguration(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_NotificationConfiguration_s& notificationConfiguration, CommonAPI::CallStatus& callStatus) {
+ CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_handle_t, am_gen::am_sourceID_t, am_gen::am_NotificationConfiguration_s>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
+ *this,
+ "asyncSetSourceNotificationConfiguration",
+ "qq(iin)",
+ handle, sourceID, notificationConfiguration,
+ callStatus
+ );
+}
+std::future<CommonAPI::CallStatus> RoutingSenderDBusProxy::asyncSetSourceNotificationConfigurationAsync(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_NotificationConfiguration_s& notificationConfiguration, AsyncSetSourceNotificationConfigurationAsyncCallback callback) {
+ return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_gen::am_handle_t, am_gen::am_sourceID_t, am_gen::am_NotificationConfiguration_s>,
+ CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
+ *this,
+ "asyncSetSourceNotificationConfiguration",
+ "qq(iin)",
+ handle, sourceID, notificationConfiguration,
+ std::move(callback));
+}
+
+void RoutingSenderDBusProxy::getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const {
+ ownVersionMajor = 0;
+ ownVersionMinor = 1;
+}
+
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderDBusProxy.h b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderDBusProxy.h
new file mode 100644
index 0000000..af46069
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderDBusProxy.h
@@ -0,0 +1,106 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_AUDIOMANAGER_Routing_Sender_DBUS_PROXY_H_
+#define ORG_GENIVI_AUDIOMANAGER_Routing_Sender_DBUS_PROXY_H_
+
+#include <org/genivi/audiomanager/RoutingSenderProxyBase.h>
+
+#define COMMONAPI_INTERNAL_COMPILATION
+
+#include <CommonAPI/DBus/DBusFactory.h>
+#include <CommonAPI/DBus/DBusProxy.h>
+
+#undef COMMONAPI_INTERNAL_COMPILATION
+
+#include <string>
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+
+class RoutingSenderDBusProxy: virtual public RoutingSenderProxyBase, virtual public CommonAPI::DBus::DBusProxy {
+ public:
+ RoutingSenderDBusProxy(
+ const std::string& commonApiAddress,
+ const std::string& interfaceName,
+ const std::string& busName,
+ const std::string& objectPath,
+ const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection);
+
+ virtual ~RoutingSenderDBusProxy() { }
+
+
+
+
+ virtual void asyncSetSourceState(const uint16_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_SourceState_e& sourceState, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> asyncSetSourceStateAsync(const uint16_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_SourceState_e& sourceState, AsyncSetSourceStateAsyncCallback callback);
+
+ virtual void setDomainState(const am_gen::am_domainID_t& domainID, const am_gen::am_DomainState_e& domainState, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& error);
+ virtual std::future<CommonAPI::CallStatus> setDomainStateAsync(const am_gen::am_domainID_t& domainID, const am_gen::am_DomainState_e& domainState, SetDomainStateAsyncCallback callback);
+
+ virtual void asyncSetSourceVolume(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_volume_t& volume, const am_gen::am_RampType_e& ramp, const am_gen::am_time_t& time, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> asyncSetSourceVolumeAsync(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_volume_t& volume, const am_gen::am_RampType_e& ramp, const am_gen::am_time_t& time, AsyncSetSourceVolumeAsyncCallback callback);
+
+ virtual void asyncSetSinkVolume(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_volume_t& volume, const am_gen::am_RampType_e& ramp, const am_gen::am_time_t& time, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> asyncSetSinkVolumeAsync(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_volume_t& volume, const am_gen::am_RampType_e& ramp, const am_gen::am_time_t& time, AsyncSetSinkVolumeAsyncCallback callback);
+
+ virtual void asyncConnect(const am_gen::am_handle_t& handle, const am_gen::am_connectionID_t& connectionID, const am_gen::am_sourceID_t& sourceID, const am_gen::am_sinkID_t& sinkID, const am_gen::am_ConnectionFormat_e& connectionFormat, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> asyncConnectAsync(const am_gen::am_handle_t& handle, const am_gen::am_connectionID_t& connectionID, const am_gen::am_sourceID_t& sourceID, const am_gen::am_sinkID_t& sinkID, const am_gen::am_ConnectionFormat_e& connectionFormat, AsyncConnectAsyncCallback callback);
+
+ virtual void asyncDisconnect(const am_gen::am_handle_t& handle, const am_gen::am_connectionID_t& connectionID, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> asyncDisconnectAsync(const am_gen::am_handle_t& handle, const am_gen::am_connectionID_t& connectionID, AsyncDisconnectAsyncCallback callback);
+
+ virtual void asyncAbort(const am_gen::am_handle_t& handle, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& error);
+ virtual std::future<CommonAPI::CallStatus> asyncAbortAsync(const am_gen::am_handle_t& handle, AsyncAbortAsyncCallback callback);
+
+ virtual void asyncSetSinkSoundProperties(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_SoundProperty_L& listSoundProperties, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> asyncSetSinkSoundPropertiesAsync(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_SoundProperty_L& listSoundProperties, AsyncSetSinkSoundPropertiesAsyncCallback callback);
+
+ virtual void asyncSetSinkSoundProperty(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_SoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> asyncSetSinkSoundPropertyAsync(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_SoundProperty_s& soundProperty, AsyncSetSinkSoundPropertyAsyncCallback callback);
+
+ virtual void asyncSetSourceSoundProperties(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_SoundProperty_L& listSoundProperties, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> asyncSetSourceSoundPropertiesAsync(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_SoundProperty_L& listSoundProperties, AsyncSetSourceSoundPropertiesAsyncCallback callback);
+
+ virtual void asyncSetSourceSoundProperty(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_SoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> asyncSetSourceSoundPropertyAsync(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_SoundProperty_s& soundProperty, AsyncSetSourceSoundPropertyAsyncCallback callback);
+
+ virtual void asyncCrossFade(const am_gen::am_handle_t& handle, const am_gen::am_crossfaderID_t& crossfaderID, const am_gen::am_HotSink_e& hotSink, const am_gen::am_RampType_e& rampType, const am_gen::am_time_t& time, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> asyncCrossFadeAsync(const am_gen::am_handle_t& handle, const am_gen::am_crossfaderID_t& crossfaderID, const am_gen::am_HotSink_e& hotSink, const am_gen::am_RampType_e& rampType, const am_gen::am_time_t& time, AsyncCrossFadeAsyncCallback callback);
+
+ virtual void asyncSetVolumes(const am_gen::am_handle_t& handle, const am_gen::am_Volumes_l& volumes, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> asyncSetVolumesAsync(const am_gen::am_handle_t& handle, const am_gen::am_Volumes_l& volumes, AsyncSetVolumesAsyncCallback callback);
+
+ virtual void asyncSetSinkNotificationConfiguration(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_NotificationConfiguration_s& notificationConfiguration, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> asyncSetSinkNotificationConfigurationAsync(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_NotificationConfiguration_s& notificationConfiguration, AsyncSetSinkNotificationConfigurationAsyncCallback callback);
+
+ virtual void asyncSetSourceNotificationConfiguration(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_NotificationConfiguration_s& notificationConfiguration, CommonAPI::CallStatus& callStatus);
+ virtual std::future<CommonAPI::CallStatus> asyncSetSourceNotificationConfigurationAsync(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_NotificationConfiguration_s& notificationConfiguration, AsyncSetSourceNotificationConfigurationAsyncCallback callback);
+
+ virtual void getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const;
+
+ private:
+
+};
+
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
+
+#endif // ORG_GENIVI_AUDIOMANAGER_Routing_Sender_DBUS_PROXY_H_
diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderDBusStubAdapter.cpp b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderDBusStubAdapter.cpp
new file mode 100644
index 0000000..1c43bc6
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderDBusStubAdapter.cpp
@@ -0,0 +1,237 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#include "RoutingSenderDBusStubAdapter.h"
+#include <org/genivi/audiomanager/RoutingSender.h>
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+
+std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> createRoutingSenderDBusStubAdapter(
+ const std::string& commonApiAddress,
+ const std::string& interfaceName,
+ const std::string& busName,
+ const std::string& objectPath,
+ const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection,
+ const std::shared_ptr<CommonAPI::StubBase>& stubBase) {
+ return std::make_shared<RoutingSenderDBusStubAdapter>(commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection, stubBase);
+}
+
+__attribute__((constructor)) void registerRoutingSenderDBusStubAdapter(void) {
+ CommonAPI::DBus::DBusFactory::registerAdapterFactoryMethod(RoutingSender::getInterfaceId(),
+ &createRoutingSenderDBusStubAdapter);
+}
+
+RoutingSenderDBusStubAdapter::RoutingSenderDBusStubAdapter(
+ const std::string& commonApiAddress,
+ const std::string& dbusInterfaceName,
+ const std::string& dbusBusName,
+ const std::string& dbusObjectPath,
+ const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
+ const std::shared_ptr<CommonAPI::StubBase>& stub):
+ RoutingSenderDBusStubAdapterHelper(commonApiAddress, dbusInterfaceName, dbusBusName, dbusObjectPath, dbusConnection, std::dynamic_pointer_cast<RoutingSenderStub>(stub)) {
+}
+
+const char* RoutingSenderDBusStubAdapter::getMethodsDBusIntrospectionXmlData() const {
+ return
+ "<method name=\"asyncSetSourceState\">\n"
+ "<arg name=\"handle\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"sourceID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"sourceState\" type=\"i\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"setDomainState\">\n"
+ "<arg name=\"domainID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"domainState\" type=\"i\" direction=\"in\" />\n"
+ "<arg name=\"error\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"asyncSetSourceVolume\">\n"
+ "<arg name=\"handle\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"sourceID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"volume\" type=\"n\" direction=\"in\" />\n"
+ "<arg name=\"ramp\" type=\"i\" direction=\"in\" />\n"
+ "<arg name=\"time\" type=\"q\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"asyncSetSinkVolume\">\n"
+ "<arg name=\"handle\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"sinkID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"volume\" type=\"n\" direction=\"in\" />\n"
+ "<arg name=\"ramp\" type=\"i\" direction=\"in\" />\n"
+ "<arg name=\"time\" type=\"q\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"asyncConnect\">\n"
+ "<arg name=\"handle\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"connectionID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"sourceID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"sinkID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"connectionFormat\" type=\"i\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"asyncDisconnect\">\n"
+ "<arg name=\"handle\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"connectionID\" type=\"q\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"asyncAbort\">\n"
+ "<arg name=\"handle\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"error\" type=\"i\" direction=\"out\" />\n"
+ "</method>\n"
+ "<method name=\"asyncSetSinkSoundProperties\">\n"
+ "<arg name=\"handle\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"sinkID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"listSoundProperties\" type=\"a(in)\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"asyncSetSinkSoundProperty\">\n"
+ "<arg name=\"handle\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"sinkID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"soundProperty\" type=\"(in)\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"asyncSetSourceSoundProperties\">\n"
+ "<arg name=\"handle\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"sourceID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"listSoundProperties\" type=\"a(in)\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"asyncSetSourceSoundProperty\">\n"
+ "<arg name=\"handle\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"sourceID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"soundProperty\" type=\"(in)\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"asyncCrossFade\">\n"
+ "<arg name=\"handle\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"crossfaderID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"hotSink\" type=\"i\" direction=\"in\" />\n"
+ "<arg name=\"rampType\" type=\"i\" direction=\"in\" />\n"
+ "<arg name=\"time\" type=\"q\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"asyncSetVolumes\">\n"
+ "<arg name=\"handle\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"volumes\" type=\"a(i(yv)niq)\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"asyncSetSinkNotificationConfiguration\">\n"
+ "<arg name=\"handle\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"sinkID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"notificationConfiguration\" type=\"(iin)\" direction=\"in\" />\n"
+ "</method>\n"
+ "<method name=\"asyncSetSourceNotificationConfiguration\">\n"
+ "<arg name=\"handle\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"sourceID\" type=\"q\" direction=\"in\" />\n"
+ "<arg name=\"notificationConfiguration\" type=\"(iin)\" direction=\"in\" />\n"
+ "</method>\n"
+ ;
+}
+
+
+
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingSenderStub,
+ std::tuple<uint16_t, am_gen::am_sourceID_t, am_gen::am_SourceState_e>,
+ std::tuple<>
+ > asyncSetSourceStateStubDispatcher(&RoutingSenderStub::asyncSetSourceState, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingSenderStub,
+ std::tuple<am_gen::am_domainID_t, am_gen::am_DomainState_e>,
+ std::tuple<am_gen::am_Error_e>
+ > setDomainStateStubDispatcher(&RoutingSenderStub::setDomainState, "i");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingSenderStub,
+ std::tuple<am_gen::am_handle_t, am_gen::am_sourceID_t, am_gen::am_volume_t, am_gen::am_RampType_e, am_gen::am_time_t>,
+ std::tuple<>
+ > asyncSetSourceVolumeStubDispatcher(&RoutingSenderStub::asyncSetSourceVolume, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingSenderStub,
+ std::tuple<am_gen::am_handle_t, am_gen::am_sinkID_t, am_gen::am_volume_t, am_gen::am_RampType_e, am_gen::am_time_t>,
+ std::tuple<>
+ > asyncSetSinkVolumeStubDispatcher(&RoutingSenderStub::asyncSetSinkVolume, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingSenderStub,
+ std::tuple<am_gen::am_handle_t, am_gen::am_connectionID_t, am_gen::am_sourceID_t, am_gen::am_sinkID_t, am_gen::am_ConnectionFormat_e>,
+ std::tuple<>
+ > asyncConnectStubDispatcher(&RoutingSenderStub::asyncConnect, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingSenderStub,
+ std::tuple<am_gen::am_handle_t, am_gen::am_connectionID_t>,
+ std::tuple<>
+ > asyncDisconnectStubDispatcher(&RoutingSenderStub::asyncDisconnect, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingSenderStub,
+ std::tuple<am_gen::am_handle_t>,
+ std::tuple<am_gen::am_Error_e>
+ > asyncAbortStubDispatcher(&RoutingSenderStub::asyncAbort, "i");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingSenderStub,
+ std::tuple<am_gen::am_handle_t, am_gen::am_sinkID_t, am_gen::am_SoundProperty_L>,
+ std::tuple<>
+ > asyncSetSinkSoundPropertiesStubDispatcher(&RoutingSenderStub::asyncSetSinkSoundProperties, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingSenderStub,
+ std::tuple<am_gen::am_handle_t, am_gen::am_sinkID_t, am_gen::am_SoundProperty_s>,
+ std::tuple<>
+ > asyncSetSinkSoundPropertyStubDispatcher(&RoutingSenderStub::asyncSetSinkSoundProperty, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingSenderStub,
+ std::tuple<am_gen::am_handle_t, am_gen::am_sourceID_t, am_gen::am_SoundProperty_L>,
+ std::tuple<>
+ > asyncSetSourceSoundPropertiesStubDispatcher(&RoutingSenderStub::asyncSetSourceSoundProperties, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingSenderStub,
+ std::tuple<am_gen::am_handle_t, am_gen::am_sourceID_t, am_gen::am_SoundProperty_s>,
+ std::tuple<>
+ > asyncSetSourceSoundPropertyStubDispatcher(&RoutingSenderStub::asyncSetSourceSoundProperty, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingSenderStub,
+ std::tuple<am_gen::am_handle_t, am_gen::am_crossfaderID_t, am_gen::am_HotSink_e, am_gen::am_RampType_e, am_gen::am_time_t>,
+ std::tuple<>
+ > asyncCrossFadeStubDispatcher(&RoutingSenderStub::asyncCrossFade, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingSenderStub,
+ std::tuple<am_gen::am_handle_t, am_gen::am_Volumes_l>,
+ std::tuple<>
+ > asyncSetVolumesStubDispatcher(&RoutingSenderStub::asyncSetVolumes, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingSenderStub,
+ std::tuple<am_gen::am_handle_t, am_gen::am_sinkID_t, am_gen::am_NotificationConfiguration_s>,
+ std::tuple<>
+ > asyncSetSinkNotificationConfigurationStubDispatcher(&RoutingSenderStub::asyncSetSinkNotificationConfiguration, "");
+static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
+ RoutingSenderStub,
+ std::tuple<am_gen::am_handle_t, am_gen::am_sourceID_t, am_gen::am_NotificationConfiguration_s>,
+ std::tuple<>
+ > asyncSetSourceNotificationConfigurationStubDispatcher(&RoutingSenderStub::asyncSetSourceNotificationConfiguration, "");
+
+
+
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
+
+template<>
+const org::genivi::audiomanager::RoutingSenderDBusStubAdapterHelper::StubDispatcherTable org::genivi::audiomanager::RoutingSenderDBusStubAdapterHelper::stubDispatcherTable_ = {
+ { { "asyncSetSourceState", "qqi" }, &org::genivi::audiomanager::asyncSetSourceStateStubDispatcher },
+ { { "setDomainState", "qi" }, &org::genivi::audiomanager::setDomainStateStubDispatcher },
+ { { "asyncSetSourceVolume", "qqniq" }, &org::genivi::audiomanager::asyncSetSourceVolumeStubDispatcher },
+ { { "asyncSetSinkVolume", "qqniq" }, &org::genivi::audiomanager::asyncSetSinkVolumeStubDispatcher },
+ { { "asyncConnect", "qqqqi" }, &org::genivi::audiomanager::asyncConnectStubDispatcher },
+ { { "asyncDisconnect", "qq" }, &org::genivi::audiomanager::asyncDisconnectStubDispatcher },
+ { { "asyncAbort", "q" }, &org::genivi::audiomanager::asyncAbortStubDispatcher },
+ { { "asyncSetSinkSoundProperties", "qqa(in)" }, &org::genivi::audiomanager::asyncSetSinkSoundPropertiesStubDispatcher },
+ { { "asyncSetSinkSoundProperty", "qq(in)" }, &org::genivi::audiomanager::asyncSetSinkSoundPropertyStubDispatcher },
+ { { "asyncSetSourceSoundProperties", "qqa(in)" }, &org::genivi::audiomanager::asyncSetSourceSoundPropertiesStubDispatcher },
+ { { "asyncSetSourceSoundProperty", "qq(in)" }, &org::genivi::audiomanager::asyncSetSourceSoundPropertyStubDispatcher },
+ { { "asyncCrossFade", "qqiiq" }, &org::genivi::audiomanager::asyncCrossFadeStubDispatcher },
+ { { "asyncSetVolumes", "qa(i(yv)niq)" }, &org::genivi::audiomanager::asyncSetVolumesStubDispatcher },
+ { { "asyncSetSinkNotificationConfiguration", "qq(iin)" }, &org::genivi::audiomanager::asyncSetSinkNotificationConfigurationStubDispatcher },
+ { { "asyncSetSourceNotificationConfiguration", "qq(iin)" }, &org::genivi::audiomanager::asyncSetSourceNotificationConfigurationStubDispatcher }
+};
diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderDBusStubAdapter.h b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderDBusStubAdapter.h
new file mode 100644
index 0000000..cedcf9f
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderDBusStubAdapter.h
@@ -0,0 +1,57 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_AUDIOMANAGER_Routing_Sender_DBUS_STUB_ADAPTER_H_
+#define ORG_GENIVI_AUDIOMANAGER_Routing_Sender_DBUS_STUB_ADAPTER_H_
+
+#include <org/genivi/audiomanager/RoutingSenderStub.h>
+
+#define COMMONAPI_INTERNAL_COMPILATION
+
+#include <CommonAPI/DBus/DBusStubAdapterHelper.h>
+#include <CommonAPI/DBus/DBusFactory.h>
+
+#undef COMMONAPI_INTERNAL_COMPILATION
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+
+typedef CommonAPI::DBus::DBusStubAdapterHelper<RoutingSenderStub> RoutingSenderDBusStubAdapterHelper;
+
+class RoutingSenderDBusStubAdapter: public RoutingSenderStubAdapter, public RoutingSenderDBusStubAdapterHelper {
+ public:
+ RoutingSenderDBusStubAdapter(
+ const std::string& commonApiAddress,
+ const std::string& dbusInterfaceName,
+ const std::string& dbusBusName,
+ const std::string& dbusObjectPath,
+ const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
+ const std::shared_ptr<CommonAPI::StubBase>& stub);
+
+
+
+ protected:
+ virtual const char* getMethodsDBusIntrospectionXmlData() const;
+};
+
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
+
+#endif // ORG_GENIVI_AUDIOMANAGER_Routing_Sender_DBUS_STUB_ADAPTER_H_
diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderProxy.h b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderProxy.h
new file mode 100644
index 0000000..b58f31a
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderProxy.h
@@ -0,0 +1,611 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_AUDIOMANAGER_Routing_Sender_PROXY_H_
+#define ORG_GENIVI_AUDIOMANAGER_Routing_Sender_PROXY_H_
+
+#include "RoutingSenderProxyBase.h"
+
+#define COMMONAPI_INTERNAL_COMPILATION
+
+
+#undef COMMONAPI_INTERNAL_COMPILATION
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+
+template <typename ... _AttributeExtensions>
+class RoutingSenderProxy: virtual public RoutingSender, virtual public RoutingSenderProxyBase, public _AttributeExtensions... {
+ public:
+ RoutingSenderProxy(std::shared_ptr<CommonAPI::Proxy> delegate);
+ ~RoutingSenderProxy();
+
+
+
+
+ /**
+ * Calls asyncSetSourceState with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void asyncSetSourceState(const uint16_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_SourceState_e& sourceState, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls asyncSetSourceState with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> asyncSetSourceStateAsync(const uint16_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_SourceState_e& sourceState, AsyncSetSourceStateAsyncCallback callback);
+
+ /**
+ * Calls setDomainState with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void setDomainState(const am_gen::am_domainID_t& domainID, const am_gen::am_DomainState_e& domainState, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& error);
+ /**
+ * Calls setDomainState with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> setDomainStateAsync(const am_gen::am_domainID_t& domainID, const am_gen::am_DomainState_e& domainState, SetDomainStateAsyncCallback callback);
+
+ /**
+ * Calls asyncSetSourceVolume with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void asyncSetSourceVolume(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_volume_t& volume, const am_gen::am_RampType_e& ramp, const am_gen::am_time_t& time, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls asyncSetSourceVolume with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> asyncSetSourceVolumeAsync(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_volume_t& volume, const am_gen::am_RampType_e& ramp, const am_gen::am_time_t& time, AsyncSetSourceVolumeAsyncCallback callback);
+
+ /**
+ * Calls asyncSetSinkVolume with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void asyncSetSinkVolume(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_volume_t& volume, const am_gen::am_RampType_e& ramp, const am_gen::am_time_t& time, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls asyncSetSinkVolume with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> asyncSetSinkVolumeAsync(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_volume_t& volume, const am_gen::am_RampType_e& ramp, const am_gen::am_time_t& time, AsyncSetSinkVolumeAsyncCallback callback);
+
+ /**
+ * Calls asyncConnect with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void asyncConnect(const am_gen::am_handle_t& handle, const am_gen::am_connectionID_t& connectionID, const am_gen::am_sourceID_t& sourceID, const am_gen::am_sinkID_t& sinkID, const am_gen::am_ConnectionFormat_e& connectionFormat, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls asyncConnect with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> asyncConnectAsync(const am_gen::am_handle_t& handle, const am_gen::am_connectionID_t& connectionID, const am_gen::am_sourceID_t& sourceID, const am_gen::am_sinkID_t& sinkID, const am_gen::am_ConnectionFormat_e& connectionFormat, AsyncConnectAsyncCallback callback);
+
+ /**
+ * Calls asyncDisconnect with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void asyncDisconnect(const am_gen::am_handle_t& handle, const am_gen::am_connectionID_t& connectionID, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls asyncDisconnect with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> asyncDisconnectAsync(const am_gen::am_handle_t& handle, const am_gen::am_connectionID_t& connectionID, AsyncDisconnectAsyncCallback callback);
+
+ /**
+ * Calls asyncAbort with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * All non-const parameters will be filled with the returned values.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void asyncAbort(const am_gen::am_handle_t& handle, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& error);
+ /**
+ * Calls asyncAbort with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> asyncAbortAsync(const am_gen::am_handle_t& handle, AsyncAbortAsyncCallback callback);
+
+ /**
+ * Calls asyncSetSinkSoundProperties with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void asyncSetSinkSoundProperties(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_SoundProperty_L& listSoundProperties, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls asyncSetSinkSoundProperties with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> asyncSetSinkSoundPropertiesAsync(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_SoundProperty_L& listSoundProperties, AsyncSetSinkSoundPropertiesAsyncCallback callback);
+
+ /**
+ * Calls asyncSetSinkSoundProperty with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void asyncSetSinkSoundProperty(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_SoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls asyncSetSinkSoundProperty with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> asyncSetSinkSoundPropertyAsync(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_SoundProperty_s& soundProperty, AsyncSetSinkSoundPropertyAsyncCallback callback);
+
+ /**
+ * Calls asyncSetSourceSoundProperties with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void asyncSetSourceSoundProperties(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_SoundProperty_L& listSoundProperties, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls asyncSetSourceSoundProperties with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> asyncSetSourceSoundPropertiesAsync(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_SoundProperty_L& listSoundProperties, AsyncSetSourceSoundPropertiesAsyncCallback callback);
+
+ /**
+ * Calls asyncSetSourceSoundProperty with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void asyncSetSourceSoundProperty(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_SoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls asyncSetSourceSoundProperty with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> asyncSetSourceSoundPropertyAsync(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_SoundProperty_s& soundProperty, AsyncSetSourceSoundPropertyAsyncCallback callback);
+
+ /**
+ * Calls asyncCrossFade with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void asyncCrossFade(const am_gen::am_handle_t& handle, const am_gen::am_crossfaderID_t& crossfaderID, const am_gen::am_HotSink_e& hotSink, const am_gen::am_RampType_e& rampType, const am_gen::am_time_t& time, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls asyncCrossFade with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> asyncCrossFadeAsync(const am_gen::am_handle_t& handle, const am_gen::am_crossfaderID_t& crossfaderID, const am_gen::am_HotSink_e& hotSink, const am_gen::am_RampType_e& rampType, const am_gen::am_time_t& time, AsyncCrossFadeAsyncCallback callback);
+
+ /**
+ * Calls asyncSetVolumes with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void asyncSetVolumes(const am_gen::am_handle_t& handle, const am_gen::am_Volumes_l& volumes, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls asyncSetVolumes with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> asyncSetVolumesAsync(const am_gen::am_handle_t& handle, const am_gen::am_Volumes_l& volumes, AsyncSetVolumesAsyncCallback callback);
+
+ /**
+ * Calls asyncSetSinkNotificationConfiguration with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void asyncSetSinkNotificationConfiguration(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_NotificationConfiguration_s& notificationConfiguration, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls asyncSetSinkNotificationConfiguration with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> asyncSetSinkNotificationConfigurationAsync(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_NotificationConfiguration_s& notificationConfiguration, AsyncSetSinkNotificationConfigurationAsyncCallback callback);
+
+ /**
+ * Calls asyncSetSourceNotificationConfiguration with synchronous semantics.
+ *
+ * All const parameters are input parameters to this method.
+ * The CallStatus will be filled when the method returns and indicate either
+ * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
+ * will be set.
+ * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used.
+ */
+ virtual void asyncSetSourceNotificationConfiguration(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_NotificationConfiguration_s& notificationConfiguration, CommonAPI::CallStatus& callStatus);
+ /**
+ * Calls asyncSetSourceNotificationConfiguration with asynchronous semantics.
+ *
+ * The provided callback will be called when the reply to this call arrives or
+ * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
+ * or which type of error has occurred. In case of any error, ONLY the CallStatus
+ * will have a defined value.
+ * The std::future returned by this method will be fulfilled at arrival of the reply.
+ * It will provide the same value for CallStatus as will be handed to the callback.
+ */
+ virtual std::future<CommonAPI::CallStatus> asyncSetSourceNotificationConfigurationAsync(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_NotificationConfiguration_s& notificationConfiguration, AsyncSetSourceNotificationConfigurationAsyncCallback callback);
+
+ /// Returns the CommonAPI address of the remote partner this proxy communicates with.
+ virtual std::string getAddress() const;
+
+ /// Returns the domain of the remote partner this proxy communicates with.
+ virtual const std::string& getDomain() const;
+
+ /// Returns the service ID of the remote partner this proxy communicates with.
+ virtual const std::string& getServiceId() const;
+
+ /// Returns the instance ID of the remote partner this proxy communicates with.
+ virtual const std::string& getInstanceId() const;
+
+ /// Returns true if the remote partner for this proxy is available.
+ virtual bool isAvailable() const;
+
+ /**
+ * Returns the wrapper class that is used to (de-)register for notifications about
+ * the availability of the remote partner of this proxy.
+ */
+ virtual CommonAPI::ProxyStatusEvent& getProxyStatusEvent();
+
+ /**
+ * Returns the wrapper class that is used to access version information of the remote
+ * partner of this proxy.
+ */
+ virtual CommonAPI::InterfaceVersionAttribute& getInterfaceVersionAttribute();
+
+ private:
+ std::shared_ptr<RoutingSenderProxyBase> delegate_;
+};
+
+
+//
+// RoutingSenderProxy Implementation
+//
+template <typename ... _AttributeExtensions>
+RoutingSenderProxy<_AttributeExtensions...>::RoutingSenderProxy(std::shared_ptr<CommonAPI::Proxy> delegate):
+ delegate_(std::dynamic_pointer_cast<RoutingSenderProxyBase>(delegate)),
+ _AttributeExtensions(*(std::dynamic_pointer_cast<RoutingSenderProxyBase>(delegate)))... {
+}
+
+template <typename ... _AttributeExtensions>
+RoutingSenderProxy<_AttributeExtensions...>::~RoutingSenderProxy() {
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingSenderProxy<_AttributeExtensions...>::asyncSetSourceState(const uint16_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_SourceState_e& sourceState, CommonAPI::CallStatus& callStatus) {
+ delegate_->asyncSetSourceState(handle, sourceID, sourceState, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingSenderProxy<_AttributeExtensions...>::asyncSetSourceStateAsync(const uint16_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_SourceState_e& sourceState, AsyncSetSourceStateAsyncCallback callback) {
+ return delegate_->asyncSetSourceStateAsync(handle, sourceID, sourceState, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingSenderProxy<_AttributeExtensions...>::setDomainState(const am_gen::am_domainID_t& domainID, const am_gen::am_DomainState_e& domainState, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& error) {
+ delegate_->setDomainState(domainID, domainState, callStatus, error);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingSenderProxy<_AttributeExtensions...>::setDomainStateAsync(const am_gen::am_domainID_t& domainID, const am_gen::am_DomainState_e& domainState, SetDomainStateAsyncCallback callback) {
+ return delegate_->setDomainStateAsync(domainID, domainState, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingSenderProxy<_AttributeExtensions...>::asyncSetSourceVolume(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_volume_t& volume, const am_gen::am_RampType_e& ramp, const am_gen::am_time_t& time, CommonAPI::CallStatus& callStatus) {
+ delegate_->asyncSetSourceVolume(handle, sourceID, volume, ramp, time, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingSenderProxy<_AttributeExtensions...>::asyncSetSourceVolumeAsync(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_volume_t& volume, const am_gen::am_RampType_e& ramp, const am_gen::am_time_t& time, AsyncSetSourceVolumeAsyncCallback callback) {
+ return delegate_->asyncSetSourceVolumeAsync(handle, sourceID, volume, ramp, time, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingSenderProxy<_AttributeExtensions...>::asyncSetSinkVolume(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_volume_t& volume, const am_gen::am_RampType_e& ramp, const am_gen::am_time_t& time, CommonAPI::CallStatus& callStatus) {
+ delegate_->asyncSetSinkVolume(handle, sinkID, volume, ramp, time, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingSenderProxy<_AttributeExtensions...>::asyncSetSinkVolumeAsync(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_volume_t& volume, const am_gen::am_RampType_e& ramp, const am_gen::am_time_t& time, AsyncSetSinkVolumeAsyncCallback callback) {
+ return delegate_->asyncSetSinkVolumeAsync(handle, sinkID, volume, ramp, time, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingSenderProxy<_AttributeExtensions...>::asyncConnect(const am_gen::am_handle_t& handle, const am_gen::am_connectionID_t& connectionID, const am_gen::am_sourceID_t& sourceID, const am_gen::am_sinkID_t& sinkID, const am_gen::am_ConnectionFormat_e& connectionFormat, CommonAPI::CallStatus& callStatus) {
+ delegate_->asyncConnect(handle, connectionID, sourceID, sinkID, connectionFormat, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingSenderProxy<_AttributeExtensions...>::asyncConnectAsync(const am_gen::am_handle_t& handle, const am_gen::am_connectionID_t& connectionID, const am_gen::am_sourceID_t& sourceID, const am_gen::am_sinkID_t& sinkID, const am_gen::am_ConnectionFormat_e& connectionFormat, AsyncConnectAsyncCallback callback) {
+ return delegate_->asyncConnectAsync(handle, connectionID, sourceID, sinkID, connectionFormat, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingSenderProxy<_AttributeExtensions...>::asyncDisconnect(const am_gen::am_handle_t& handle, const am_gen::am_connectionID_t& connectionID, CommonAPI::CallStatus& callStatus) {
+ delegate_->asyncDisconnect(handle, connectionID, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingSenderProxy<_AttributeExtensions...>::asyncDisconnectAsync(const am_gen::am_handle_t& handle, const am_gen::am_connectionID_t& connectionID, AsyncDisconnectAsyncCallback callback) {
+ return delegate_->asyncDisconnectAsync(handle, connectionID, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingSenderProxy<_AttributeExtensions...>::asyncAbort(const am_gen::am_handle_t& handle, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& error) {
+ delegate_->asyncAbort(handle, callStatus, error);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingSenderProxy<_AttributeExtensions...>::asyncAbortAsync(const am_gen::am_handle_t& handle, AsyncAbortAsyncCallback callback) {
+ return delegate_->asyncAbortAsync(handle, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingSenderProxy<_AttributeExtensions...>::asyncSetSinkSoundProperties(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_SoundProperty_L& listSoundProperties, CommonAPI::CallStatus& callStatus) {
+ delegate_->asyncSetSinkSoundProperties(handle, sinkID, listSoundProperties, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingSenderProxy<_AttributeExtensions...>::asyncSetSinkSoundPropertiesAsync(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_SoundProperty_L& listSoundProperties, AsyncSetSinkSoundPropertiesAsyncCallback callback) {
+ return delegate_->asyncSetSinkSoundPropertiesAsync(handle, sinkID, listSoundProperties, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingSenderProxy<_AttributeExtensions...>::asyncSetSinkSoundProperty(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_SoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus) {
+ delegate_->asyncSetSinkSoundProperty(handle, sinkID, soundProperty, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingSenderProxy<_AttributeExtensions...>::asyncSetSinkSoundPropertyAsync(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_SoundProperty_s& soundProperty, AsyncSetSinkSoundPropertyAsyncCallback callback) {
+ return delegate_->asyncSetSinkSoundPropertyAsync(handle, sinkID, soundProperty, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingSenderProxy<_AttributeExtensions...>::asyncSetSourceSoundProperties(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_SoundProperty_L& listSoundProperties, CommonAPI::CallStatus& callStatus) {
+ delegate_->asyncSetSourceSoundProperties(handle, sourceID, listSoundProperties, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingSenderProxy<_AttributeExtensions...>::asyncSetSourceSoundPropertiesAsync(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_SoundProperty_L& listSoundProperties, AsyncSetSourceSoundPropertiesAsyncCallback callback) {
+ return delegate_->asyncSetSourceSoundPropertiesAsync(handle, sourceID, listSoundProperties, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingSenderProxy<_AttributeExtensions...>::asyncSetSourceSoundProperty(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_SoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus) {
+ delegate_->asyncSetSourceSoundProperty(handle, sourceID, soundProperty, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingSenderProxy<_AttributeExtensions...>::asyncSetSourceSoundPropertyAsync(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_SoundProperty_s& soundProperty, AsyncSetSourceSoundPropertyAsyncCallback callback) {
+ return delegate_->asyncSetSourceSoundPropertyAsync(handle, sourceID, soundProperty, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingSenderProxy<_AttributeExtensions...>::asyncCrossFade(const am_gen::am_handle_t& handle, const am_gen::am_crossfaderID_t& crossfaderID, const am_gen::am_HotSink_e& hotSink, const am_gen::am_RampType_e& rampType, const am_gen::am_time_t& time, CommonAPI::CallStatus& callStatus) {
+ delegate_->asyncCrossFade(handle, crossfaderID, hotSink, rampType, time, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingSenderProxy<_AttributeExtensions...>::asyncCrossFadeAsync(const am_gen::am_handle_t& handle, const am_gen::am_crossfaderID_t& crossfaderID, const am_gen::am_HotSink_e& hotSink, const am_gen::am_RampType_e& rampType, const am_gen::am_time_t& time, AsyncCrossFadeAsyncCallback callback) {
+ return delegate_->asyncCrossFadeAsync(handle, crossfaderID, hotSink, rampType, time, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingSenderProxy<_AttributeExtensions...>::asyncSetVolumes(const am_gen::am_handle_t& handle, const am_gen::am_Volumes_l& volumes, CommonAPI::CallStatus& callStatus) {
+ delegate_->asyncSetVolumes(handle, volumes, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingSenderProxy<_AttributeExtensions...>::asyncSetVolumesAsync(const am_gen::am_handle_t& handle, const am_gen::am_Volumes_l& volumes, AsyncSetVolumesAsyncCallback callback) {
+ return delegate_->asyncSetVolumesAsync(handle, volumes, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingSenderProxy<_AttributeExtensions...>::asyncSetSinkNotificationConfiguration(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_NotificationConfiguration_s& notificationConfiguration, CommonAPI::CallStatus& callStatus) {
+ delegate_->asyncSetSinkNotificationConfiguration(handle, sinkID, notificationConfiguration, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingSenderProxy<_AttributeExtensions...>::asyncSetSinkNotificationConfigurationAsync(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_NotificationConfiguration_s& notificationConfiguration, AsyncSetSinkNotificationConfigurationAsyncCallback callback) {
+ return delegate_->asyncSetSinkNotificationConfigurationAsync(handle, sinkID, notificationConfiguration, callback);
+}
+
+template <typename ... _AttributeExtensions>
+void RoutingSenderProxy<_AttributeExtensions...>::asyncSetSourceNotificationConfiguration(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_NotificationConfiguration_s& notificationConfiguration, CommonAPI::CallStatus& callStatus) {
+ delegate_->asyncSetSourceNotificationConfiguration(handle, sourceID, notificationConfiguration, callStatus);
+}
+
+template <typename ... _AttributeExtensions>
+std::future<CommonAPI::CallStatus> RoutingSenderProxy<_AttributeExtensions...>::asyncSetSourceNotificationConfigurationAsync(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_NotificationConfiguration_s& notificationConfiguration, AsyncSetSourceNotificationConfigurationAsyncCallback callback) {
+ return delegate_->asyncSetSourceNotificationConfigurationAsync(handle, sourceID, notificationConfiguration, callback);
+}
+
+
+template <typename ... _AttributeExtensions>
+std::string RoutingSenderProxy<_AttributeExtensions...>::getAddress() const {
+ return delegate_->getAddress();
+}
+
+template <typename ... _AttributeExtensions>
+const std::string& RoutingSenderProxy<_AttributeExtensions...>::getDomain() const {
+ return delegate_->getDomain();
+}
+
+template <typename ... _AttributeExtensions>
+const std::string& RoutingSenderProxy<_AttributeExtensions...>::getServiceId() const {
+ return delegate_->getServiceId();
+}
+
+template <typename ... _AttributeExtensions>
+const std::string& RoutingSenderProxy<_AttributeExtensions...>::getInstanceId() const {
+ return delegate_->getInstanceId();
+}
+
+template <typename ... _AttributeExtensions>
+bool RoutingSenderProxy<_AttributeExtensions...>::isAvailable() const {
+ return delegate_->isAvailable();
+}
+
+template <typename ... _AttributeExtensions>
+CommonAPI::ProxyStatusEvent& RoutingSenderProxy<_AttributeExtensions...>::getProxyStatusEvent() {
+ return delegate_->getProxyStatusEvent();
+}
+
+template <typename ... _AttributeExtensions>
+CommonAPI::InterfaceVersionAttribute& RoutingSenderProxy<_AttributeExtensions...>::getInterfaceVersionAttribute() {
+ return delegate_->getInterfaceVersionAttribute();
+}
+
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
+
+
+
+#endif // ORG_GENIVI_AUDIOMANAGER_Routing_Sender_PROXY_H_
diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderProxyBase.h b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderProxyBase.h
new file mode 100644
index 0000000..457c8ae
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderProxyBase.h
@@ -0,0 +1,116 @@
+ /*
+ * This file was generated by the CommonAPI Generators.
+ *
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+ #ifndef ORG_GENIVI_AUDIOMANAGER_Routing_Sender_PROXY_BASE_H_
+ #define ORG_GENIVI_AUDIOMANAGER_Routing_Sender_PROXY_BASE_H_
+
+ #include "RoutingSender.h"
+
+
+ #include <org/genivi/audiomanager/am_gen.h>
+
+ #define COMMONAPI_INTERNAL_COMPILATION
+
+ #include <CommonAPI/InputStream.h>
+ #include <CommonAPI/OutputStream.h>
+ #include <CommonAPI/SerializableStruct.h>
+ #include <cstdint>
+ #include <vector>
+
+ #include <CommonAPI/Proxy.h>
+ #include <functional>
+ #include <future>
+
+ #undef COMMONAPI_INTERNAL_COMPILATION
+
+ namespace org {
+ namespace genivi {
+ namespace audiomanager {
+
+ class RoutingSenderProxyBase: virtual public CommonAPI::Proxy {
+ public:
+ typedef std::function<void(const CommonAPI::CallStatus&)> AsyncSetSourceStateAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const am_gen::am_Error_e&)> SetDomainStateAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> AsyncSetSourceVolumeAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> AsyncSetSinkVolumeAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> AsyncConnectAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> AsyncDisconnectAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&, const am_gen::am_Error_e&)> AsyncAbortAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> AsyncSetSinkSoundPropertiesAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> AsyncSetSinkSoundPropertyAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> AsyncSetSourceSoundPropertiesAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> AsyncSetSourceSoundPropertyAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> AsyncCrossFadeAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> AsyncSetVolumesAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> AsyncSetSinkNotificationConfigurationAsyncCallback;
+ typedef std::function<void(const CommonAPI::CallStatus&)> AsyncSetSourceNotificationConfigurationAsyncCallback;
+
+
+
+
+ virtual void asyncSetSourceState(const uint16_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_SourceState_e& sourceState, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> asyncSetSourceStateAsync(const uint16_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_SourceState_e& sourceState, AsyncSetSourceStateAsyncCallback callback) = 0;
+
+ virtual void setDomainState(const am_gen::am_domainID_t& domainID, const am_gen::am_DomainState_e& domainState, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& error) = 0;
+ virtual std::future<CommonAPI::CallStatus> setDomainStateAsync(const am_gen::am_domainID_t& domainID, const am_gen::am_DomainState_e& domainState, SetDomainStateAsyncCallback callback) = 0;
+
+ virtual void asyncSetSourceVolume(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_volume_t& volume, const am_gen::am_RampType_e& ramp, const am_gen::am_time_t& time, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> asyncSetSourceVolumeAsync(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_volume_t& volume, const am_gen::am_RampType_e& ramp, const am_gen::am_time_t& time, AsyncSetSourceVolumeAsyncCallback callback) = 0;
+
+ virtual void asyncSetSinkVolume(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_volume_t& volume, const am_gen::am_RampType_e& ramp, const am_gen::am_time_t& time, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> asyncSetSinkVolumeAsync(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_volume_t& volume, const am_gen::am_RampType_e& ramp, const am_gen::am_time_t& time, AsyncSetSinkVolumeAsyncCallback callback) = 0;
+
+ virtual void asyncConnect(const am_gen::am_handle_t& handle, const am_gen::am_connectionID_t& connectionID, const am_gen::am_sourceID_t& sourceID, const am_gen::am_sinkID_t& sinkID, const am_gen::am_ConnectionFormat_e& connectionFormat, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> asyncConnectAsync(const am_gen::am_handle_t& handle, const am_gen::am_connectionID_t& connectionID, const am_gen::am_sourceID_t& sourceID, const am_gen::am_sinkID_t& sinkID, const am_gen::am_ConnectionFormat_e& connectionFormat, AsyncConnectAsyncCallback callback) = 0;
+
+ virtual void asyncDisconnect(const am_gen::am_handle_t& handle, const am_gen::am_connectionID_t& connectionID, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> asyncDisconnectAsync(const am_gen::am_handle_t& handle, const am_gen::am_connectionID_t& connectionID, AsyncDisconnectAsyncCallback callback) = 0;
+
+ virtual void asyncAbort(const am_gen::am_handle_t& handle, CommonAPI::CallStatus& callStatus, am_gen::am_Error_e& error) = 0;
+ virtual std::future<CommonAPI::CallStatus> asyncAbortAsync(const am_gen::am_handle_t& handle, AsyncAbortAsyncCallback callback) = 0;
+
+ virtual void asyncSetSinkSoundProperties(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_SoundProperty_L& listSoundProperties, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> asyncSetSinkSoundPropertiesAsync(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_SoundProperty_L& listSoundProperties, AsyncSetSinkSoundPropertiesAsyncCallback callback) = 0;
+
+ virtual void asyncSetSinkSoundProperty(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_SoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> asyncSetSinkSoundPropertyAsync(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_SoundProperty_s& soundProperty, AsyncSetSinkSoundPropertyAsyncCallback callback) = 0;
+
+ virtual void asyncSetSourceSoundProperties(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_SoundProperty_L& listSoundProperties, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> asyncSetSourceSoundPropertiesAsync(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_SoundProperty_L& listSoundProperties, AsyncSetSourceSoundPropertiesAsyncCallback callback) = 0;
+
+ virtual void asyncSetSourceSoundProperty(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_SoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> asyncSetSourceSoundPropertyAsync(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_SoundProperty_s& soundProperty, AsyncSetSourceSoundPropertyAsyncCallback callback) = 0;
+
+ virtual void asyncCrossFade(const am_gen::am_handle_t& handle, const am_gen::am_crossfaderID_t& crossfaderID, const am_gen::am_HotSink_e& hotSink, const am_gen::am_RampType_e& rampType, const am_gen::am_time_t& time, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> asyncCrossFadeAsync(const am_gen::am_handle_t& handle, const am_gen::am_crossfaderID_t& crossfaderID, const am_gen::am_HotSink_e& hotSink, const am_gen::am_RampType_e& rampType, const am_gen::am_time_t& time, AsyncCrossFadeAsyncCallback callback) = 0;
+
+ virtual void asyncSetVolumes(const am_gen::am_handle_t& handle, const am_gen::am_Volumes_l& volumes, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> asyncSetVolumesAsync(const am_gen::am_handle_t& handle, const am_gen::am_Volumes_l& volumes, AsyncSetVolumesAsyncCallback callback) = 0;
+
+ virtual void asyncSetSinkNotificationConfiguration(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_NotificationConfiguration_s& notificationConfiguration, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> asyncSetSinkNotificationConfigurationAsync(const am_gen::am_handle_t& handle, const am_gen::am_sinkID_t& sinkID, const am_gen::am_NotificationConfiguration_s& notificationConfiguration, AsyncSetSinkNotificationConfigurationAsyncCallback callback) = 0;
+
+ virtual void asyncSetSourceNotificationConfiguration(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_NotificationConfiguration_s& notificationConfiguration, CommonAPI::CallStatus& callStatus) = 0;
+ virtual std::future<CommonAPI::CallStatus> asyncSetSourceNotificationConfigurationAsync(const am_gen::am_handle_t& handle, const am_gen::am_sourceID_t& sourceID, const am_gen::am_NotificationConfiguration_s& notificationConfiguration, AsyncSetSourceNotificationConfigurationAsyncCallback callback) = 0;
+ };
+
+ } // namespace audiomanager
+ } // namespace genivi
+ } // namespace org
+
+ #endif // ORG_GENIVI_AUDIOMANAGER_Routing_Sender_PROXY_BASE_H_
diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderStub.h b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderStub.h
new file mode 100644
index 0000000..bc61563
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderStub.h
@@ -0,0 +1,123 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_AUDIOMANAGER_Routing_Sender_STUB_H_
+#define ORG_GENIVI_AUDIOMANAGER_Routing_Sender_STUB_H_
+
+
+
+#include <org/genivi/audiomanager/am_gen.h>
+
+#include "RoutingSender.h"
+
+#define COMMONAPI_INTERNAL_COMPILATION
+
+#include <CommonAPI/InputStream.h>
+#include <CommonAPI/OutputStream.h>
+#include <CommonAPI/SerializableStruct.h>
+#include <cstdint>
+#include <vector>
+
+#include <CommonAPI/Stub.h>
+
+#undef COMMONAPI_INTERNAL_COMPILATION
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+
+/**
+ * Receives messages from remote and handles all dispatching of deserialized calls
+ * to a stub for the service RoutingSender. Also provides means to send broadcasts
+ * and attribute-changed-notifications of observable attributes as defined by this service.
+ * An application developer should not need to bother with this class.
+ */
+class RoutingSenderStubAdapter: virtual public CommonAPI::StubAdapter, public RoutingSender {
+ public:
+
+};
+
+
+/**
+ * Defines the necessary callbacks to handle remote set events related to the attributes
+ * defined in the IDL description for RoutingSender.
+ * For each attribute two callbacks are defined:
+ * - a verification callback that allows to verify the requested value and to prevent setting
+ * e.g. an invalid value ("onRemoteSet<AttributeName>").
+ * - an action callback to do local work after the attribute value has been changed
+ * ("onRemote<AttributeName>Changed").
+ *
+ * This class and the one below are the ones an application developer needs to have
+ * a look at if he wants to implement a service.
+ */
+class RoutingSenderStubRemoteEvent {
+ public:
+ virtual ~RoutingSenderStubRemoteEvent() { }
+
+};
+
+
+/**
+ * Defines the interface that must be implemented by any class that should provide
+ * the service RoutingSender to remote clients.
+ * This class and the one above are the ones an application developer needs to have
+ * a look at if he wants to implement a service.
+ */
+class RoutingSenderStub : public CommonAPI::Stub<RoutingSenderStubAdapter , RoutingSenderStubRemoteEvent> {
+ public:
+ virtual ~RoutingSenderStub() { }
+
+
+ /// This is the method that will be called on remote calls on the method asyncSetSourceState.
+ virtual void asyncSetSourceState(uint16_t handle, am_gen::am_sourceID_t sourceID, am_gen::am_SourceState_e sourceState) = 0;
+ /// This is the method that will be called on remote calls on the method setDomainState.
+ virtual void setDomainState(am_gen::am_domainID_t domainID, am_gen::am_DomainState_e domainState, am_gen::am_Error_e& error) = 0;
+ /// This is the method that will be called on remote calls on the method asyncSetSourceVolume.
+ virtual void asyncSetSourceVolume(am_gen::am_handle_t handle, am_gen::am_sourceID_t sourceID, am_gen::am_volume_t volume, am_gen::am_RampType_e ramp, am_gen::am_time_t time) = 0;
+ /// This is the method that will be called on remote calls on the method asyncSetSinkVolume.
+ virtual void asyncSetSinkVolume(am_gen::am_handle_t handle, am_gen::am_sinkID_t sinkID, am_gen::am_volume_t volume, am_gen::am_RampType_e ramp, am_gen::am_time_t time) = 0;
+ /// This is the method that will be called on remote calls on the method asyncConnect.
+ virtual void asyncConnect(am_gen::am_handle_t handle, am_gen::am_connectionID_t connectionID, am_gen::am_sourceID_t sourceID, am_gen::am_sinkID_t sinkID, am_gen::am_ConnectionFormat_e connectionFormat) = 0;
+ /// This is the method that will be called on remote calls on the method asyncDisconnect.
+ virtual void asyncDisconnect(am_gen::am_handle_t handle, am_gen::am_connectionID_t connectionID) = 0;
+ /// This is the method that will be called on remote calls on the method asyncAbort.
+ virtual void asyncAbort(am_gen::am_handle_t handle, am_gen::am_Error_e& error) = 0;
+ /// This is the method that will be called on remote calls on the method asyncSetSinkSoundProperties.
+ virtual void asyncSetSinkSoundProperties(am_gen::am_handle_t handle, am_gen::am_sinkID_t sinkID, am_gen::am_SoundProperty_L listSoundProperties) = 0;
+ /// This is the method that will be called on remote calls on the method asyncSetSinkSoundProperty.
+ virtual void asyncSetSinkSoundProperty(am_gen::am_handle_t handle, am_gen::am_sinkID_t sinkID, am_gen::am_SoundProperty_s soundProperty) = 0;
+ /// This is the method that will be called on remote calls on the method asyncSetSourceSoundProperties.
+ virtual void asyncSetSourceSoundProperties(am_gen::am_handle_t handle, am_gen::am_sourceID_t sourceID, am_gen::am_SoundProperty_L listSoundProperties) = 0;
+ /// This is the method that will be called on remote calls on the method asyncSetSourceSoundProperty.
+ virtual void asyncSetSourceSoundProperty(am_gen::am_handle_t handle, am_gen::am_sourceID_t sourceID, am_gen::am_SoundProperty_s soundProperty) = 0;
+ /// This is the method that will be called on remote calls on the method asyncCrossFade.
+ virtual void asyncCrossFade(am_gen::am_handle_t handle, am_gen::am_crossfaderID_t crossfaderID, am_gen::am_HotSink_e hotSink, am_gen::am_RampType_e rampType, am_gen::am_time_t time) = 0;
+ /// This is the method that will be called on remote calls on the method asyncSetVolumes.
+ virtual void asyncSetVolumes(am_gen::am_handle_t handle, am_gen::am_Volumes_l volumes) = 0;
+ /// This is the method that will be called on remote calls on the method asyncSetSinkNotificationConfiguration.
+ virtual void asyncSetSinkNotificationConfiguration(am_gen::am_handle_t handle, am_gen::am_sinkID_t sinkID, am_gen::am_NotificationConfiguration_s notificationConfiguration) = 0;
+ /// This is the method that will be called on remote calls on the method asyncSetSourceNotificationConfiguration.
+ virtual void asyncSetSourceNotificationConfiguration(am_gen::am_handle_t handle, am_gen::am_sourceID_t sourceID, am_gen::am_NotificationConfiguration_s notificationConfiguration) = 0;
+
+};
+
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
+
+#endif // ORG_GENIVI_AUDIOMANAGER_Routing_Sender_STUB_H_
diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderStubDefault.cpp b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderStubDefault.cpp
new file mode 100644
index 0000000..0f4f60a
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderStubDefault.cpp
@@ -0,0 +1,103 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#include <org/genivi/audiomanager/RoutingSenderStubDefault.h>
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+
+RoutingSenderStubDefault::RoutingSenderStubDefault():
+ remoteEventHandler_(this) {
+}
+
+RoutingSenderStubRemoteEvent* RoutingSenderStubDefault::initStubAdapter(const std::shared_ptr<RoutingSenderStubAdapter>& stubAdapter) {
+ stubAdapter_ = stubAdapter;
+ return &remoteEventHandler_;
+}
+
+
+void RoutingSenderStubDefault::asyncSetSourceState(uint16_t handle, am_gen::am_sourceID_t sourceID, am_gen::am_SourceState_e sourceState) {
+ // No operation in default
+}
+
+void RoutingSenderStubDefault::setDomainState(am_gen::am_domainID_t domainID, am_gen::am_DomainState_e domainState, am_gen::am_Error_e& error) {
+ // No operation in default
+}
+
+void RoutingSenderStubDefault::asyncSetSourceVolume(am_gen::am_handle_t handle, am_gen::am_sourceID_t sourceID, am_gen::am_volume_t volume, am_gen::am_RampType_e ramp, am_gen::am_time_t time) {
+ // No operation in default
+}
+
+void RoutingSenderStubDefault::asyncSetSinkVolume(am_gen::am_handle_t handle, am_gen::am_sinkID_t sinkID, am_gen::am_volume_t volume, am_gen::am_RampType_e ramp, am_gen::am_time_t time) {
+ // No operation in default
+}
+
+void RoutingSenderStubDefault::asyncConnect(am_gen::am_handle_t handle, am_gen::am_connectionID_t connectionID, am_gen::am_sourceID_t sourceID, am_gen::am_sinkID_t sinkID, am_gen::am_ConnectionFormat_e connectionFormat) {
+ // No operation in default
+}
+
+void RoutingSenderStubDefault::asyncDisconnect(am_gen::am_handle_t handle, am_gen::am_connectionID_t connectionID) {
+ // No operation in default
+}
+
+void RoutingSenderStubDefault::asyncAbort(am_gen::am_handle_t handle, am_gen::am_Error_e& error) {
+ // No operation in default
+}
+
+void RoutingSenderStubDefault::asyncSetSinkSoundProperties(am_gen::am_handle_t handle, am_gen::am_sinkID_t sinkID, am_gen::am_SoundProperty_L listSoundProperties) {
+ // No operation in default
+}
+
+void RoutingSenderStubDefault::asyncSetSinkSoundProperty(am_gen::am_handle_t handle, am_gen::am_sinkID_t sinkID, am_gen::am_SoundProperty_s soundProperty) {
+ // No operation in default
+}
+
+void RoutingSenderStubDefault::asyncSetSourceSoundProperties(am_gen::am_handle_t handle, am_gen::am_sourceID_t sourceID, am_gen::am_SoundProperty_L listSoundProperties) {
+ // No operation in default
+}
+
+void RoutingSenderStubDefault::asyncSetSourceSoundProperty(am_gen::am_handle_t handle, am_gen::am_sourceID_t sourceID, am_gen::am_SoundProperty_s soundProperty) {
+ // No operation in default
+}
+
+void RoutingSenderStubDefault::asyncCrossFade(am_gen::am_handle_t handle, am_gen::am_crossfaderID_t crossfaderID, am_gen::am_HotSink_e hotSink, am_gen::am_RampType_e rampType, am_gen::am_time_t time) {
+ // No operation in default
+}
+
+void RoutingSenderStubDefault::asyncSetVolumes(am_gen::am_handle_t handle, am_gen::am_Volumes_l volumes) {
+ // No operation in default
+}
+
+void RoutingSenderStubDefault::asyncSetSinkNotificationConfiguration(am_gen::am_handle_t handle, am_gen::am_sinkID_t sinkID, am_gen::am_NotificationConfiguration_s notificationConfiguration) {
+ // No operation in default
+}
+
+void RoutingSenderStubDefault::asyncSetSourceNotificationConfiguration(am_gen::am_handle_t handle, am_gen::am_sourceID_t sourceID, am_gen::am_NotificationConfiguration_s notificationConfiguration) {
+ // No operation in default
+}
+
+
+
+RoutingSenderStubDefault::RemoteEventHandler::RemoteEventHandler(RoutingSenderStubDefault* defaultStub):
+ defaultStub_(defaultStub) {
+}
+
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderStubDefault.h b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderStubDefault.h
new file mode 100644
index 0000000..d527ab0
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/RoutingSenderStubDefault.h
@@ -0,0 +1,98 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_AUDIOMANAGER_Routing_Sender_STUB_DEFAULT_H_
+#define ORG_GENIVI_AUDIOMANAGER_Routing_Sender_STUB_DEFAULT_H_
+
+#include <org/genivi/audiomanager/RoutingSenderStub.h>
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+
+/**
+ * Provides a default implementation for RoutingSenderStubRemoteEvent and
+ * RoutingSenderStub. Method callbacks have an empty implementation,
+ * remote set calls on attributes will always change the value of the attribute
+ * to the one received.
+ *
+ * Override this stub if you only want to provide a subset of the functionality
+ * that would be defined for this service, and/or if you do not need any non-default
+ * behaviour.
+ */
+class RoutingSenderStubDefault : public RoutingSenderStub {
+ public:
+ RoutingSenderStubDefault();
+
+ RoutingSenderStubRemoteEvent* initStubAdapter(const std::shared_ptr<RoutingSenderStubAdapter>& stubAdapter);
+
+
+ virtual void asyncSetSourceState(uint16_t handle, am_gen::am_sourceID_t sourceID, am_gen::am_SourceState_e sourceState);
+
+ virtual void setDomainState(am_gen::am_domainID_t domainID, am_gen::am_DomainState_e domainState, am_gen::am_Error_e& error);
+
+ virtual void asyncSetSourceVolume(am_gen::am_handle_t handle, am_gen::am_sourceID_t sourceID, am_gen::am_volume_t volume, am_gen::am_RampType_e ramp, am_gen::am_time_t time);
+
+ virtual void asyncSetSinkVolume(am_gen::am_handle_t handle, am_gen::am_sinkID_t sinkID, am_gen::am_volume_t volume, am_gen::am_RampType_e ramp, am_gen::am_time_t time);
+
+ virtual void asyncConnect(am_gen::am_handle_t handle, am_gen::am_connectionID_t connectionID, am_gen::am_sourceID_t sourceID, am_gen::am_sinkID_t sinkID, am_gen::am_ConnectionFormat_e connectionFormat);
+
+ virtual void asyncDisconnect(am_gen::am_handle_t handle, am_gen::am_connectionID_t connectionID);
+
+ virtual void asyncAbort(am_gen::am_handle_t handle, am_gen::am_Error_e& error);
+
+ virtual void asyncSetSinkSoundProperties(am_gen::am_handle_t handle, am_gen::am_sinkID_t sinkID, am_gen::am_SoundProperty_L listSoundProperties);
+
+ virtual void asyncSetSinkSoundProperty(am_gen::am_handle_t handle, am_gen::am_sinkID_t sinkID, am_gen::am_SoundProperty_s soundProperty);
+
+ virtual void asyncSetSourceSoundProperties(am_gen::am_handle_t handle, am_gen::am_sourceID_t sourceID, am_gen::am_SoundProperty_L listSoundProperties);
+
+ virtual void asyncSetSourceSoundProperty(am_gen::am_handle_t handle, am_gen::am_sourceID_t sourceID, am_gen::am_SoundProperty_s soundProperty);
+
+ virtual void asyncCrossFade(am_gen::am_handle_t handle, am_gen::am_crossfaderID_t crossfaderID, am_gen::am_HotSink_e hotSink, am_gen::am_RampType_e rampType, am_gen::am_time_t time);
+
+ virtual void asyncSetVolumes(am_gen::am_handle_t handle, am_gen::am_Volumes_l volumes);
+
+ virtual void asyncSetSinkNotificationConfiguration(am_gen::am_handle_t handle, am_gen::am_sinkID_t sinkID, am_gen::am_NotificationConfiguration_s notificationConfiguration);
+
+ virtual void asyncSetSourceNotificationConfiguration(am_gen::am_handle_t handle, am_gen::am_sourceID_t sourceID, am_gen::am_NotificationConfiguration_s notificationConfiguration);
+
+
+
+ protected:
+
+ private:
+ class RemoteEventHandler: public RoutingSenderStubRemoteEvent {
+ public:
+ RemoteEventHandler(RoutingSenderStubDefault* defaultStub);
+
+
+ private:
+ RoutingSenderStubDefault* defaultStub_;
+ };
+
+ RemoteEventHandler remoteEventHandler_;
+ std::shared_ptr<RoutingSenderStubAdapter> stubAdapter_;
+
+};
+
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
+
+#endif // ORG_GENIVI_AUDIOMANAGER_Routing_Sender_STUB_DEFAULT_H_
diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/am_gen.cpp b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/am_gen.cpp
new file mode 100644
index 0000000..20bb29b
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/am_gen.cpp
@@ -0,0 +1,587 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#include "am_gen.h"
+
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+namespace am_gen {
+
+distanceInformation_s::distanceInformation_s(const int32_t& FrontLeftValue, const int32_t& FrontRightValue, const int32_t& RearLeftValue, const int32_t& RearRightValue):
+ FrontLeft(FrontLeftValue),
+ FrontRight(FrontRightValue),
+ RearLeft(RearLeftValue),
+ RearRight(RearRightValue)
+{
+}
+
+
+bool operator==(const distanceInformation_s& lhs, const distanceInformation_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.FrontLeft == rhs.FrontLeft &&
+ lhs.FrontRight == rhs.FrontRight &&
+ lhs.RearLeft == rhs.RearLeft &&
+ lhs.RearRight == rhs.RearRight
+ ;
+}
+
+void distanceInformation_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> FrontLeft;
+ inputStream >> FrontRight;
+ inputStream >> RearLeft;
+ inputStream >> RearRight;
+}
+
+void distanceInformation_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << FrontLeft;
+ outputStream << FrontRight;
+ outputStream << RearLeft;
+ outputStream << RearRight;
+}
+sampleNames_s::sampleNames_s(const sampleSet_e& sampleValue, const std::string& sampleNameValue):
+ sample(sampleValue),
+ sampleName(sampleNameValue)
+{
+}
+
+
+bool operator==(const sampleNames_s& lhs, const sampleNames_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.sample == rhs.sample &&
+ lhs.sampleName == rhs.sampleName
+ ;
+}
+
+void sampleNames_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> sample;
+ inputStream >> sampleName;
+}
+
+void sampleNames_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << sample;
+ outputStream << sampleName;
+}
+am_Domain_s::am_Domain_s(const am_domainID_t& domainIDValue, const std::string& nameValue, const std::string& busnameValue, const std::string& nodenameValue, const bool& earlyValue, const bool& completeValue, const am_DomainState_e& stateValue):
+ domainID(domainIDValue),
+ name(nameValue),
+ busname(busnameValue),
+ nodename(nodenameValue),
+ early(earlyValue),
+ complete(completeValue),
+ state(stateValue)
+{
+}
+
+
+bool operator==(const am_Domain_s& lhs, const am_Domain_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.domainID == rhs.domainID &&
+ lhs.name == rhs.name &&
+ lhs.busname == rhs.busname &&
+ lhs.nodename == rhs.nodename &&
+ lhs.early == rhs.early &&
+ lhs.complete == rhs.complete &&
+ lhs.state == rhs.state
+ ;
+}
+
+void am_Domain_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> domainID;
+ inputStream >> name;
+ inputStream >> busname;
+ inputStream >> nodename;
+ inputStream >> early;
+ inputStream >> complete;
+ inputStream >> state;
+}
+
+void am_Domain_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << domainID;
+ outputStream << name;
+ outputStream << busname;
+ outputStream << nodename;
+ outputStream << early;
+ outputStream << complete;
+ outputStream << state;
+}
+am_Volumes_s::am_Volumes_s(const am_VolumeType_e& volumeTypeValue, const am_DataType_u& volumeIDValue, const am_volume_t& volumeValue, const am_RampType_e& rampValue, const am_time_t& timeValue):
+ volumeType(volumeTypeValue),
+ volumeID(volumeIDValue),
+ volume(volumeValue),
+ ramp(rampValue),
+ time(timeValue)
+{
+}
+
+
+bool operator==(const am_Volumes_s& lhs, const am_Volumes_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.volumeType == rhs.volumeType &&
+ lhs.volumeID == rhs.volumeID &&
+ lhs.volume == rhs.volume &&
+ lhs.ramp == rhs.ramp &&
+ lhs.time == rhs.time
+ ;
+}
+
+void am_Volumes_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> volumeType;
+ inputStream >> volumeID;
+ inputStream >> volume;
+ inputStream >> ramp;
+ inputStream >> time;
+}
+
+void am_Volumes_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << volumeType;
+ outputStream << volumeID;
+ outputStream << volume;
+ outputStream << ramp;
+ outputStream << time;
+}
+notificationPayload_s::notificationPayload_s(const int16_t& typeValue, const int16_t& payloadValue):
+ type(typeValue),
+ payload(payloadValue)
+{
+}
+
+
+bool operator==(const notificationPayload_s& lhs, const notificationPayload_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.type == rhs.type &&
+ lhs.payload == rhs.payload
+ ;
+}
+
+void notificationPayload_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> type;
+ inputStream >> payload;
+}
+
+void notificationPayload_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << type;
+ outputStream << payload;
+}
+am_Availability_s::am_Availability_s(const am_Availability_e& availabilityValue, const am_AvailabilityReason_e& availabilityReasonValue):
+ availability(availabilityValue),
+ availabilityReason(availabilityReasonValue)
+{
+}
+
+
+bool operator==(const am_Availability_s& lhs, const am_Availability_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.availability == rhs.availability &&
+ lhs.availabilityReason == rhs.availabilityReason
+ ;
+}
+
+void am_Availability_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> availability;
+ inputStream >> availabilityReason;
+}
+
+void am_Availability_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << availability;
+ outputStream << availabilityReason;
+}
+am_SoundProperty_s::am_SoundProperty_s(const am_SoundPropertyType_e& typeValue, const int16_t& valueValue):
+ type(typeValue),
+ value(valueValue)
+{
+}
+
+
+bool operator==(const am_SoundProperty_s& lhs, const am_SoundProperty_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.type == rhs.type &&
+ lhs.value == rhs.value
+ ;
+}
+
+void am_SoundProperty_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> type;
+ inputStream >> value;
+}
+
+void am_SoundProperty_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << type;
+ outputStream << value;
+}
+am_MainSoundProperty_s::am_MainSoundProperty_s(const am_MainSoundPropertyType_e& typeValue, const int16_t& valueValue):
+ type(typeValue),
+ value(valueValue)
+{
+}
+
+
+bool operator==(const am_MainSoundProperty_s& lhs, const am_MainSoundProperty_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.type == rhs.type &&
+ lhs.value == rhs.value
+ ;
+}
+
+void am_MainSoundProperty_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> type;
+ inputStream >> value;
+}
+
+void am_MainSoundProperty_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << type;
+ outputStream << value;
+}
+am_NotificationConfiguration_s::am_NotificationConfiguration_s(const am_NotificationType_e& typeValue, const am_NotificationStatus_e& statusValue, const int16_t& parameterValue):
+ type(typeValue),
+ status(statusValue),
+ parameter(parameterValue)
+{
+}
+
+
+bool operator==(const am_NotificationConfiguration_s& lhs, const am_NotificationConfiguration_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.type == rhs.type &&
+ lhs.status == rhs.status &&
+ lhs.parameter == rhs.parameter
+ ;
+}
+
+void am_NotificationConfiguration_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> type;
+ inputStream >> status;
+ inputStream >> parameter;
+}
+
+void am_NotificationConfiguration_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << type;
+ outputStream << status;
+ outputStream << parameter;
+}
+sourceData_s::sourceData_s(const am_sourceID_t& sourceIDValue, const am_domainID_t& domainIDValue, const std::string& nameValue, const am_sourceClass_t& sourceClassIDValue, const am_SourceState_e& sourceStateValue, const am_volume_t& volumeValue, const bool& visibleValue, const am_Availability_s& availableValue, const am_InterruptState_e& interruptStateValue, const am_SoundProperty_L& listSoundPropertiesValue, const am_ConnectionFormat_L& listConnectionFormatsValue, const am_MainSoundProperty_L& listMainSoundPropertiesValue, const am_NotificationConfiguration_L& listMainNotificationConfigurationsValue, const am_NotificationConfiguration_L& listNotificationConfigurationsValue):
+ sourceID(sourceIDValue),
+ domainID(domainIDValue),
+ name(nameValue),
+ sourceClassID(sourceClassIDValue),
+ sourceState(sourceStateValue),
+ volume(volumeValue),
+ visible(visibleValue),
+ available(availableValue),
+ interruptState(interruptStateValue),
+ listSoundProperties(listSoundPropertiesValue),
+ listConnectionFormats(listConnectionFormatsValue),
+ listMainSoundProperties(listMainSoundPropertiesValue),
+ listMainNotificationConfigurations(listMainNotificationConfigurationsValue),
+ listNotificationConfigurations(listNotificationConfigurationsValue)
+{
+}
+
+
+bool operator==(const sourceData_s& lhs, const sourceData_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.sourceID == rhs.sourceID &&
+ lhs.domainID == rhs.domainID &&
+ lhs.name == rhs.name &&
+ lhs.sourceClassID == rhs.sourceClassID &&
+ lhs.sourceState == rhs.sourceState &&
+ lhs.volume == rhs.volume &&
+ lhs.visible == rhs.visible &&
+ lhs.available == rhs.available &&
+ lhs.interruptState == rhs.interruptState &&
+ lhs.listSoundProperties == rhs.listSoundProperties &&
+ lhs.listConnectionFormats == rhs.listConnectionFormats &&
+ lhs.listMainSoundProperties == rhs.listMainSoundProperties &&
+ lhs.listMainNotificationConfigurations == rhs.listMainNotificationConfigurations &&
+ lhs.listNotificationConfigurations == rhs.listNotificationConfigurations
+ ;
+}
+
+void sourceData_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> sourceID;
+ inputStream >> domainID;
+ inputStream >> name;
+ inputStream >> sourceClassID;
+ inputStream >> sourceState;
+ inputStream >> volume;
+ inputStream >> visible;
+ inputStream >> available;
+ inputStream >> interruptState;
+ inputStream >> listSoundProperties;
+ inputStream >> listConnectionFormats;
+ inputStream >> listMainSoundProperties;
+ inputStream >> listMainNotificationConfigurations;
+ inputStream >> listNotificationConfigurations;
+}
+
+void sourceData_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << sourceID;
+ outputStream << domainID;
+ outputStream << name;
+ outputStream << sourceClassID;
+ outputStream << sourceState;
+ outputStream << volume;
+ outputStream << visible;
+ outputStream << available;
+ outputStream << interruptState;
+ outputStream << listSoundProperties;
+ outputStream << listConnectionFormats;
+ outputStream << listMainSoundProperties;
+ outputStream << listMainNotificationConfigurations;
+ outputStream << listNotificationConfigurations;
+}
+sinkData_s::sinkData_s(const am_sinkID_t& sinkIDValue, const std::string& nameValue, const am_domainID_t& domainIDValue, const am_sinkClass_t& sinkClassIDValue, const am_volume_t& volumeValue, const bool& visibleValue, const am_Availability_s& availableValue, const am_MuteState_e& muteStateValue, const am_mainVolume_t& mainVolumeValue, const am_SoundProperty_L& listSoundPropertiesValue, const am_ConnectionFormat_L& listConnectionFormatsValue, const am_MainSoundProperty_L& listMainSoundPropertiesValue, const am_NotificationConfiguration_L& listMainNotificationConfigurationsValue, const am_NotificationConfiguration_L& listNotificationConfigurationsValue):
+ sinkID(sinkIDValue),
+ name(nameValue),
+ domainID(domainIDValue),
+ sinkClassID(sinkClassIDValue),
+ volume(volumeValue),
+ visible(visibleValue),
+ available(availableValue),
+ muteState(muteStateValue),
+ mainVolume(mainVolumeValue),
+ listSoundProperties(listSoundPropertiesValue),
+ listConnectionFormats(listConnectionFormatsValue),
+ listMainSoundProperties(listMainSoundPropertiesValue),
+ listMainNotificationConfigurations(listMainNotificationConfigurationsValue),
+ listNotificationConfigurations(listNotificationConfigurationsValue)
+{
+}
+
+
+bool operator==(const sinkData_s& lhs, const sinkData_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.sinkID == rhs.sinkID &&
+ lhs.name == rhs.name &&
+ lhs.domainID == rhs.domainID &&
+ lhs.sinkClassID == rhs.sinkClassID &&
+ lhs.volume == rhs.volume &&
+ lhs.visible == rhs.visible &&
+ lhs.available == rhs.available &&
+ lhs.muteState == rhs.muteState &&
+ lhs.mainVolume == rhs.mainVolume &&
+ lhs.listSoundProperties == rhs.listSoundProperties &&
+ lhs.listConnectionFormats == rhs.listConnectionFormats &&
+ lhs.listMainSoundProperties == rhs.listMainSoundProperties &&
+ lhs.listMainNotificationConfigurations == rhs.listMainNotificationConfigurations &&
+ lhs.listNotificationConfigurations == rhs.listNotificationConfigurations
+ ;
+}
+
+void sinkData_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> sinkID;
+ inputStream >> name;
+ inputStream >> domainID;
+ inputStream >> sinkClassID;
+ inputStream >> volume;
+ inputStream >> visible;
+ inputStream >> available;
+ inputStream >> muteState;
+ inputStream >> mainVolume;
+ inputStream >> listSoundProperties;
+ inputStream >> listConnectionFormats;
+ inputStream >> listMainSoundProperties;
+ inputStream >> listMainNotificationConfigurations;
+ inputStream >> listNotificationConfigurations;
+}
+
+void sinkData_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << sinkID;
+ outputStream << name;
+ outputStream << domainID;
+ outputStream << sinkClassID;
+ outputStream << volume;
+ outputStream << visible;
+ outputStream << available;
+ outputStream << muteState;
+ outputStream << mainVolume;
+ outputStream << listSoundProperties;
+ outputStream << listConnectionFormats;
+ outputStream << listMainSoundProperties;
+ outputStream << listMainNotificationConfigurations;
+ outputStream << listNotificationConfigurations;
+}
+crossfaderData_s::crossfaderData_s(const am_crossfaderID_t& crossfaderIDValue, const std::string& nameValue, const am_sinkID_t& sinkID_AValue, const am_sinkID_t& sinkID_BValue, const am_sourceID_t& sourceIDValue, const am_HotSink_e& hotSinkValue):
+ crossfaderID(crossfaderIDValue),
+ name(nameValue),
+ sinkID_A(sinkID_AValue),
+ sinkID_B(sinkID_BValue),
+ sourceID(sourceIDValue),
+ hotSink(hotSinkValue)
+{
+}
+
+
+bool operator==(const crossfaderData_s& lhs, const crossfaderData_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.crossfaderID == rhs.crossfaderID &&
+ lhs.name == rhs.name &&
+ lhs.sinkID_A == rhs.sinkID_A &&
+ lhs.sinkID_B == rhs.sinkID_B &&
+ lhs.sourceID == rhs.sourceID &&
+ lhs.hotSink == rhs.hotSink
+ ;
+}
+
+void crossfaderData_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> crossfaderID;
+ inputStream >> name;
+ inputStream >> sinkID_A;
+ inputStream >> sinkID_B;
+ inputStream >> sourceID;
+ inputStream >> hotSink;
+}
+
+void crossfaderData_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << crossfaderID;
+ outputStream << name;
+ outputStream << sinkID_A;
+ outputStream << sinkID_B;
+ outputStream << sourceID;
+ outputStream << hotSink;
+}
+am_Gateway_s::am_Gateway_s(const am_gatewayID_t& gatewayIDValue, const std::string& nameValue, const am_sinkID_t& sinkIDValue, const am_sourceID_t& sourceIDValue, const am_domainID_t& domainSinkIDValue, const am_domainID_t& domainSourceIDValue, const am_domainID_t& controlDomainIDValue, const am_ConnectionFormat_L& listSourceFormatsValue, const am_ConnectionFormat_L& listSinkFormatsValue, const bool_L& convertionMatrixValue):
+ gatewayID(gatewayIDValue),
+ name(nameValue),
+ sinkID(sinkIDValue),
+ sourceID(sourceIDValue),
+ domainSinkID(domainSinkIDValue),
+ domainSourceID(domainSourceIDValue),
+ controlDomainID(controlDomainIDValue),
+ listSourceFormats(listSourceFormatsValue),
+ listSinkFormats(listSinkFormatsValue),
+ convertionMatrix(convertionMatrixValue)
+{
+}
+
+
+bool operator==(const am_Gateway_s& lhs, const am_Gateway_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.gatewayID == rhs.gatewayID &&
+ lhs.name == rhs.name &&
+ lhs.sinkID == rhs.sinkID &&
+ lhs.sourceID == rhs.sourceID &&
+ lhs.domainSinkID == rhs.domainSinkID &&
+ lhs.domainSourceID == rhs.domainSourceID &&
+ lhs.controlDomainID == rhs.controlDomainID &&
+ lhs.listSourceFormats == rhs.listSourceFormats &&
+ lhs.listSinkFormats == rhs.listSinkFormats &&
+ lhs.convertionMatrix == rhs.convertionMatrix
+ ;
+}
+
+void am_Gateway_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> gatewayID;
+ inputStream >> name;
+ inputStream >> sinkID;
+ inputStream >> sourceID;
+ inputStream >> domainSinkID;
+ inputStream >> domainSourceID;
+ inputStream >> controlDomainID;
+ inputStream >> listSourceFormats;
+ inputStream >> listSinkFormats;
+ inputStream >> convertionMatrix;
+}
+
+void am_Gateway_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << gatewayID;
+ outputStream << name;
+ outputStream << sinkID;
+ outputStream << sourceID;
+ outputStream << domainSinkID;
+ outputStream << domainSourceID;
+ outputStream << controlDomainID;
+ outputStream << listSourceFormats;
+ outputStream << listSinkFormats;
+ outputStream << convertionMatrix;
+}
+am_EarlyData_s::am_EarlyData_s(const am_EarlyDataType_e& typeValue, const am_DataType_u& sinksourceValue, const am_EarlyData_u& dataValue):
+ type(typeValue),
+ sinksource(sinksourceValue),
+ data(dataValue)
+{
+}
+
+
+bool operator==(const am_EarlyData_s& lhs, const am_EarlyData_s& rhs) {
+ if (&lhs == &rhs)
+ return true;
+
+ return
+ lhs.type == rhs.type &&
+ lhs.sinksource == rhs.sinksource &&
+ lhs.data == rhs.data
+ ;
+}
+
+void am_EarlyData_s::readFromInputStream(CommonAPI::InputStream& inputStream) {
+ inputStream >> type;
+ inputStream >> sinksource;
+ inputStream >> data;
+}
+
+void am_EarlyData_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
+ outputStream << type;
+ outputStream << sinksource;
+ outputStream << data;
+}
+
+} // namespace am_gen
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/am_gen.h b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/am_gen.h
new file mode 100644
index 0000000..be51398
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/audiomanager/am_gen.h
@@ -0,0 +1,1764 @@
+/*
+* This file was generated by the CommonAPI Generators.
+*
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+*/
+#ifndef ORG_GENIVI_AUDIOMANAGER_am_gen_H_
+#define ORG_GENIVI_AUDIOMANAGER_am_gen_H_
+
+
+
+#define COMMONAPI_INTERNAL_COMPILATION
+
+#include <CommonAPI/InputStream.h>
+#include <CommonAPI/OutputStream.h>
+#include <CommonAPI/SerializableStruct.h>
+#include <CommonAPI/SerializableVariant.h>
+#include <CommonAPI/types.h>
+#include <cstdint>
+#include <memory>
+#include <string>
+#include <vector>
+
+#undef COMMONAPI_INTERNAL_COMPILATION
+
+namespace org {
+namespace genivi {
+namespace audiomanager {
+
+namespace am_gen {
+ typedef uint16_t am_sourceID_t;
+
+ typedef uint16_t am_sinkID_t;
+
+ typedef uint16_t am_gatewayID_t;
+
+ typedef int16_t gongHandle;
+
+ typedef uint16_t am_sourceClass_t;
+
+ typedef uint16_t am_sinkClass_t;
+
+ typedef int16_t am_volume_t;
+
+ typedef int16_t am_mainVolume_t;
+
+ typedef uint16_t am_handle_t;
+
+ typedef uint16_t am_time_t;
+
+ typedef uint16_t am_connectionID_t;
+
+ typedef uint16_t am_crossfaderID_t;
+
+ enum class gp_indicatorDirection_e: int32_t {
+ INDICATOR_RIGHT = 0x0,
+ INDICATOR_LEFT = 0x1,
+ INDICATOR_WARNING = 0x2
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct gp_indicatorDirection_eComparator;
+
+ enum class am_RampType_e: int32_t {
+ RAMP_UNKNOWN = 0x0,
+ RAMP_GENIVI_DIRECT = 0x1,
+ RAMP_GENIVI_NO_PLOP = 0x2,
+ RAMP_GENIVI_EXP_INV = 0x3,
+ RAMP_GENIVI_LINEAR = 0x4,
+ RAMP_GENIVI_EXP = 0x5,
+ RAMP_MAX = 0x6
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_RampType_eComparator;
+
+ enum class am_MuteState_e: int32_t {
+ MS_UNKNOWN = 0x0,
+ MS_MUTED = 0x1,
+ MS_UNMUTED = 0x2,
+ MS_MAX = 0x3
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_MuteState_eComparator;
+
+ enum class am_SourceState_e: int32_t {
+ SS_UNKNNOWN = 0x0,
+ SS_ON = 0x1,
+ SS_OFF = 0x2,
+ SS_PAUSED = 0x3,
+ SS_MAX = 0x4
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_SourceState_eComparator;
+
+ enum class am_Error_e: int32_t {
+ E_OK = 0x0,
+ E_UNKNOWN = 0x1,
+ E_OUT_OF_RANGE = 0x2,
+ E_NOT_USED = 0x3,
+ E_DATABASE_ERROR = 0x4,
+ E_ALREADY_EXISTS = 0x5,
+ E_NO_CHANGE = 0x6,
+ E_NOT_POSSIBLE = 0x7,
+ E_NON_EXISTENT = 0x8,
+ E_ABORTED = 0x9,
+ E_WRONG_FORMAT = 0xa,
+ E_MAX = 0xb
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_Error_eComparator;
+
+ enum class am_DomainState_e: int32_t {
+ DS_UNKNOWN = 0,
+ DS_CONTROLLED = 1,
+ DS_INDEPENDENT_STARTUP = 2,
+ DS_INDEPENDENT_RUNDOWN = 3,
+ DS_MAX = 4
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_DomainState_eComparator;
+
+ enum class gongType_e: int32_t {
+ AT_NUN = 0x1,
+ AT_POC = 0x2,
+ AT_QUE = 0x3,
+ AT_IWA = 0x4,
+ AT_WA = 0x5,
+ AT_ETC_F = 0x6,
+ AT_ETC_F2 = 0x7,
+ AT_ETC_ST = 0x8,
+ AT_ETC_S = 0x9,
+ AT_REV = 0xa,
+ AT_ESU = 0xb,
+ AT_ESD = 0xc,
+ AT_DG = 0xd,
+ AT_SG = 0xe,
+ AT_IDG = 0xf,
+ AT_ION = 0x10,
+ AT_IOFF = 0x11,
+ AT_FBS = 0x12,
+ AT_VFS = 0x13,
+ AT_GES = 0x14,
+ AT_UEE = 0x15
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct gongType_eComparator;
+
+ enum class am_EarlyDataType_e: int32_t {
+ ED_UNKNOWN = 0x0,
+ ED_SOURCE_VOLUME = 0x1,
+ ED_SINK_VOLUME = 0x2,
+ ED_SOURCE_PROPERTY = 0x3,
+ ED_SINK_PROPERTY = 0x4,
+ ED_MAX = 0x5
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_EarlyDataType_eComparator;
+
+ enum class gp_indicatorStatus_e: int32_t {
+ IS_ON = 0x0,
+ IS_OFF = 0x1
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct gp_indicatorStatus_eComparator;
+
+ enum class gongStatus_e: int32_t {
+ NOT_PLAYING = 0x0,
+ PLAYING = 0x1,
+ INTERRUPTED = 0x2
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct gongStatus_eComparator;
+
+ enum class gongError_e: int32_t {
+ SUCCESS = 0x0,
+ ERROR = 0x1,
+ LOW_PRIORITY = 0x2
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct gongError_eComparator;
+
+ enum class gongClass_e: int32_t {
+ GONGCLASS_1 = 0x1,
+ GONGCLASS_2 = 0x2,
+ GONGCLASS_PDC = 0x3,
+ GONGCLASS_TURN = 0x4,
+ GONGCLASS_OBSTACLE = 0x5
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct gongClass_eComparator;
+
+ enum class sampleSet_e: int32_t {
+ setBMW = 0x0,
+ setMini = 0x1,
+ setRR = 0x2
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct sampleSet_eComparator;
+
+ enum class am_Availability_e: int32_t {
+ A_UNKNOWN = 0x0,
+ A_AVAILABLE = 0x1,
+ A_UNAVAILABLE = 0x2,
+ A_MAX = 0x3
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_Availability_eComparator;
+
+ enum class am_AvailabilityReason_e: int32_t {
+ AR_UNKNOWN = 0x0,
+ AR_GENIVI_NEWMEDIA = 0x1,
+ AR_GENIVI_SAMEMEDIA = 0x2,
+ AR_GENIVI_NOMEDIA = 0x3,
+ AR_GENIVI_TEMPERATURE = 0x4,
+ AR_GENIVI_VOLTAGE = 0x5,
+ AR_GENIVI_ERRORMEDIA = 0x6,
+ AR_MAX = 0x7
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_AvailabilityReason_eComparator;
+
+ enum class am_InterruptState_e: int32_t {
+ IS_UNKNOWN = 0x0,
+ IS_OFF = 0x1,
+ IS_INTERRUPTED = 0x2,
+ IS_MAX = 0x3
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_InterruptState_eComparator;
+
+ enum class am_SoundPropertyType_e: int32_t {
+ SP_UNKNOWN = 0x0,
+ SP_EXAMPLE_TREBLE = 0x1,
+ SP_EXAMPLE_MID = 0x2,
+ SP_EXAMPLE_BASS = 0x3,
+ SP_ENTER_SINKID = 0x4,
+ SP_INTERR_SUPERSEEDINGID = 0x5,
+ SP_INTERR_OVERLAYID = 0x6,
+ SP_PRIORITY = 0x7,
+ SP_MAX = 0x8
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_SoundPropertyType_eComparator;
+
+ enum class am_ConnectionFormat_e: int32_t {
+ CF_UNKNOWN = 0x0,
+ CF_GENIVI_MONO = 0x1,
+ CF_GENIVI_STEREO = 0x2,
+ CF_GENIVI_ANALOG = 0x3,
+ CF_GENIVI_AUTO = 0x4,
+ CF_MAX = 0x5
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_ConnectionFormat_eComparator;
+
+ typedef std::vector<am_ConnectionFormat_e> am_ConnectionFormat_L;
+
+ enum class am_MainSoundPropertyType_e: int32_t {
+ MSP_UNKNOWN = 0x0,
+ MSP_EXAMPLE_TREBLE = 0x1,
+ MSP_EXAMPLE_MID = 0x2,
+ MSP_EXAMPLE_BASS = 0x3,
+ MSP_SOURCE_TYPE = 0x4,
+ MSP_MAX = 0x5
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_MainSoundPropertyType_eComparator;
+
+ enum class am_NotificationType_e: int32_t {
+ NT_UNKNOWN = 0x0,
+ NT_LOUDNESS = 0x1,
+ NT_MAX = 0x2
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_NotificationType_eComparator;
+
+ enum class am_NotificationStatus_e: int32_t {
+ NS_UNKNOWN = 0x0,
+ NS_OFF = 0x1,
+ NS_PERIODIC = 0x2,
+ NS_MINIMUM = 0x3,
+ NS_MAXIMUM = 0x4,
+ NS_CHANGE = 0x5,
+ NS_MAX = 0x6
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_NotificationStatus_eComparator;
+
+ enum class am_HotSink_e: int32_t {
+ HS_UNKNOWN = 0x0,
+ HS_SINKA = 0x1,
+ HS_SINKB = 0x2,
+ HS_INTERMEDIATE = 0x3,
+ HS_MAX = 0x4
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_HotSink_eComparator;
+
+ enum class am_VolumeType_e: int32_t {
+ VT_UNKNOWN = 0x0,
+ VT_SINK = 0x1,
+ VT_SOURCE = 0x2,
+ VT_MAX = 0x3
+ };
+
+ // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
+ struct am_VolumeType_eComparator;
+
+ struct distanceInformation_s: CommonAPI::SerializableStruct {
+ int32_t FrontLeft;
+ int32_t FrontRight;
+ int32_t RearLeft;
+ int32_t RearRight;
+
+ distanceInformation_s() = default;
+ distanceInformation_s(const int32_t& FrontLeft, const int32_t& FrontRight, const int32_t& RearLeft, const int32_t& RearRight);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.writeInt32Type();
+ }
+ };
+
+ struct sampleNames_s: CommonAPI::SerializableStruct {
+ sampleSet_e sample;
+ std::string sampleName;
+
+ sampleNames_s() = default;
+ sampleNames_s(const sampleSet_e& sample, const std::string& sampleName);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.writeStringType();
+ }
+ };
+
+ typedef std::vector<sampleNames_s> listSampleNamesL;
+
+ typedef uint16_t am_domainID_t;
+
+ struct am_Domain_s: CommonAPI::SerializableStruct {
+ am_domainID_t domainID;
+ std::string name;
+ std::string busname;
+ std::string nodename;
+ bool early;
+ bool complete;
+ am_DomainState_e state;
+
+ am_Domain_s() = default;
+ am_Domain_s(const am_domainID_t& domainID, const std::string& name, const std::string& busname, const std::string& nodename, const bool& early, const bool& complete, const am_DomainState_e& state);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeStringType();
+ typeOutputStream.writeStringType();
+ typeOutputStream.writeStringType();
+ typeOutputStream.writeBoolType();
+ typeOutputStream.writeBoolType();
+ typeOutputStream.writeInt32Type();
+ }
+ };
+
+ typedef CommonAPI::Variant<am_sinkID_t, am_sourceID_t> am_DataType_u;
+
+ struct am_Volumes_s: CommonAPI::SerializableStruct {
+ am_VolumeType_e volumeType;
+ am_DataType_u volumeID;
+ am_volume_t volume;
+ am_RampType_e ramp;
+ am_time_t time;
+
+ am_Volumes_s() = default;
+ am_Volumes_s(const am_VolumeType_e& volumeType, const am_DataType_u& volumeID, const am_volume_t& volume, const am_RampType_e& ramp, const am_time_t& time);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.writeVariantType();
+ typeOutputStream.writeInt16Type();
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.writeUInt16Type();
+ }
+ };
+
+ typedef std::vector<am_Volumes_s> am_Volumes_l;
+
+ struct notificationPayload_s: CommonAPI::SerializableStruct {
+ int16_t type;
+ int16_t payload;
+
+ notificationPayload_s() = default;
+ notificationPayload_s(const int16_t& type, const int16_t& payload);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeInt16Type();
+ typeOutputStream.writeInt16Type();
+ }
+ };
+
+ struct am_Availability_s: CommonAPI::SerializableStruct {
+ am_Availability_e availability;
+ am_AvailabilityReason_e availabilityReason;
+
+ am_Availability_s() = default;
+ am_Availability_s(const am_Availability_e& availability, const am_AvailabilityReason_e& availabilityReason);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.writeInt32Type();
+ }
+ };
+
+ struct am_SoundProperty_s: CommonAPI::SerializableStruct {
+ am_SoundPropertyType_e type;
+ int16_t value;
+
+ am_SoundProperty_s() = default;
+ am_SoundProperty_s(const am_SoundPropertyType_e& type, const int16_t& value);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.writeInt16Type();
+ }
+ };
+
+ typedef std::vector<am_SoundProperty_s> am_SoundProperty_L;
+
+ struct am_MainSoundProperty_s: CommonAPI::SerializableStruct {
+ am_MainSoundPropertyType_e type;
+ int16_t value;
+
+ am_MainSoundProperty_s() = default;
+ am_MainSoundProperty_s(const am_MainSoundPropertyType_e& type, const int16_t& value);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.writeInt16Type();
+ }
+ };
+
+ typedef std::vector<am_MainSoundProperty_s> am_MainSoundProperty_L;
+
+ struct am_NotificationConfiguration_s: CommonAPI::SerializableStruct {
+ am_NotificationType_e type;
+ am_NotificationStatus_e status;
+ int16_t parameter;
+
+ am_NotificationConfiguration_s() = default;
+ am_NotificationConfiguration_s(const am_NotificationType_e& type, const am_NotificationStatus_e& status, const int16_t& parameter);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.writeInt16Type();
+ }
+ };
+
+ typedef std::vector<am_NotificationConfiguration_s> am_NotificationConfiguration_L;
+
+ typedef std::vector<bool> bool_L;
+
+ struct sourceData_s: CommonAPI::SerializableStruct {
+ am_sourceID_t sourceID;
+ am_domainID_t domainID;
+ std::string name;
+ am_sourceClass_t sourceClassID;
+ am_SourceState_e sourceState;
+ am_volume_t volume;
+ bool visible;
+ am_Availability_s available;
+ am_InterruptState_e interruptState;
+ am_SoundProperty_L listSoundProperties;
+ am_ConnectionFormat_L listConnectionFormats;
+ am_MainSoundProperty_L listMainSoundProperties;
+ am_NotificationConfiguration_L listMainNotificationConfigurations;
+ am_NotificationConfiguration_L listNotificationConfigurations;
+
+ sourceData_s() = default;
+ sourceData_s(const am_sourceID_t& sourceID, const am_domainID_t& domainID, const std::string& name, const am_sourceClass_t& sourceClassID, const am_SourceState_e& sourceState, const am_volume_t& volume, const bool& visible, const am_Availability_s& available, const am_InterruptState_e& interruptState, const am_SoundProperty_L& listSoundProperties, const am_ConnectionFormat_L& listConnectionFormats, const am_MainSoundProperty_L& listMainSoundProperties, const am_NotificationConfiguration_L& listMainNotificationConfigurations, const am_NotificationConfiguration_L& listNotificationConfigurations);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeStringType();
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.writeInt16Type();
+ typeOutputStream.writeBoolType();
+ typeOutputStream.beginWriteStructType();
+ typeOutputStream.writeInt32Type();typeOutputStream.writeInt32Type();
+ typeOutputStream.endWriteStructType();
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.beginWriteVectorType();
+ typeOutputStream.beginWriteStructType();
+ typeOutputStream.writeInt32Type();typeOutputStream.writeInt16Type();
+ typeOutputStream.endWriteStructType();
+ typeOutputStream.endWriteVectorType();
+ typeOutputStream.beginWriteVectorType();
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.endWriteVectorType();
+ typeOutputStream.beginWriteVectorType();
+ typeOutputStream.beginWriteStructType();
+ typeOutputStream.writeInt32Type();typeOutputStream.writeInt16Type();
+ typeOutputStream.endWriteStructType();
+ typeOutputStream.endWriteVectorType();
+ typeOutputStream.beginWriteVectorType();
+ typeOutputStream.beginWriteStructType();
+ typeOutputStream.writeInt32Type();typeOutputStream.writeInt32Type();typeOutputStream.writeInt16Type();
+ typeOutputStream.endWriteStructType();
+ typeOutputStream.endWriteVectorType();
+ typeOutputStream.beginWriteVectorType();
+ typeOutputStream.beginWriteStructType();
+ typeOutputStream.writeInt32Type();typeOutputStream.writeInt32Type();typeOutputStream.writeInt16Type();
+ typeOutputStream.endWriteStructType();
+ typeOutputStream.endWriteVectorType();
+ }
+ };
+
+ struct sinkData_s: CommonAPI::SerializableStruct {
+ am_sinkID_t sinkID;
+ std::string name;
+ am_domainID_t domainID;
+ am_sinkClass_t sinkClassID;
+ am_volume_t volume;
+ bool visible;
+ am_Availability_s available;
+ am_MuteState_e muteState;
+ am_mainVolume_t mainVolume;
+ am_SoundProperty_L listSoundProperties;
+ am_ConnectionFormat_L listConnectionFormats;
+ am_MainSoundProperty_L listMainSoundProperties;
+ am_NotificationConfiguration_L listMainNotificationConfigurations;
+ am_NotificationConfiguration_L listNotificationConfigurations;
+
+ sinkData_s() = default;
+ sinkData_s(const am_sinkID_t& sinkID, const std::string& name, const am_domainID_t& domainID, const am_sinkClass_t& sinkClassID, const am_volume_t& volume, const bool& visible, const am_Availability_s& available, const am_MuteState_e& muteState, const am_mainVolume_t& mainVolume, const am_SoundProperty_L& listSoundProperties, const am_ConnectionFormat_L& listConnectionFormats, const am_MainSoundProperty_L& listMainSoundProperties, const am_NotificationConfiguration_L& listMainNotificationConfigurations, const am_NotificationConfiguration_L& listNotificationConfigurations);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeStringType();
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeInt16Type();
+ typeOutputStream.writeBoolType();
+ typeOutputStream.beginWriteStructType();
+ typeOutputStream.writeInt32Type();typeOutputStream.writeInt32Type();
+ typeOutputStream.endWriteStructType();
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.writeInt16Type();
+ typeOutputStream.beginWriteVectorType();
+ typeOutputStream.beginWriteStructType();
+ typeOutputStream.writeInt32Type();typeOutputStream.writeInt16Type();
+ typeOutputStream.endWriteStructType();
+ typeOutputStream.endWriteVectorType();
+ typeOutputStream.beginWriteVectorType();
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.endWriteVectorType();
+ typeOutputStream.beginWriteVectorType();
+ typeOutputStream.beginWriteStructType();
+ typeOutputStream.writeInt32Type();typeOutputStream.writeInt16Type();
+ typeOutputStream.endWriteStructType();
+ typeOutputStream.endWriteVectorType();
+ typeOutputStream.beginWriteVectorType();
+ typeOutputStream.beginWriteStructType();
+ typeOutputStream.writeInt32Type();typeOutputStream.writeInt32Type();typeOutputStream.writeInt16Type();
+ typeOutputStream.endWriteStructType();
+ typeOutputStream.endWriteVectorType();
+ typeOutputStream.beginWriteVectorType();
+ typeOutputStream.beginWriteStructType();
+ typeOutputStream.writeInt32Type();typeOutputStream.writeInt32Type();typeOutputStream.writeInt16Type();
+ typeOutputStream.endWriteStructType();
+ typeOutputStream.endWriteVectorType();
+ }
+ };
+
+ struct crossfaderData_s: CommonAPI::SerializableStruct {
+ am_crossfaderID_t crossfaderID;
+ std::string name;
+ am_sinkID_t sinkID_A;
+ am_sinkID_t sinkID_B;
+ am_sourceID_t sourceID;
+ am_HotSink_e hotSink;
+
+ crossfaderData_s() = default;
+ crossfaderData_s(const am_crossfaderID_t& crossfaderID, const std::string& name, const am_sinkID_t& sinkID_A, const am_sinkID_t& sinkID_B, const am_sourceID_t& sourceID, const am_HotSink_e& hotSink);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeStringType();
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeInt32Type();
+ }
+ };
+
+ struct am_Gateway_s: CommonAPI::SerializableStruct {
+ am_gatewayID_t gatewayID;
+ std::string name;
+ am_sinkID_t sinkID;
+ am_sourceID_t sourceID;
+ am_domainID_t domainSinkID;
+ am_domainID_t domainSourceID;
+ am_domainID_t controlDomainID;
+ am_ConnectionFormat_L listSourceFormats;
+ am_ConnectionFormat_L listSinkFormats;
+ bool_L convertionMatrix;
+
+ am_Gateway_s() = default;
+ am_Gateway_s(const am_gatewayID_t& gatewayID, const std::string& name, const am_sinkID_t& sinkID, const am_sourceID_t& sourceID, const am_domainID_t& domainSinkID, const am_domainID_t& domainSourceID, const am_domainID_t& controlDomainID, const am_ConnectionFormat_L& listSourceFormats, const am_ConnectionFormat_L& listSinkFormats, const bool_L& convertionMatrix);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeStringType();
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.writeUInt16Type();
+ typeOutputStream.beginWriteVectorType();
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.endWriteVectorType();
+ typeOutputStream.beginWriteVectorType();
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.endWriteVectorType();
+ typeOutputStream.beginWriteVectorType();
+ typeOutputStream.writeBoolType();
+ typeOutputStream.endWriteVectorType();
+ }
+ };
+
+ typedef CommonAPI::Variant<am_volume_t, am_SoundProperty_s> am_EarlyData_u;
+
+ struct am_EarlyData_s: CommonAPI::SerializableStruct {
+ am_EarlyDataType_e type;
+ am_DataType_u sinksource;
+ am_EarlyData_u data;
+
+ am_EarlyData_s() = default;
+ am_EarlyData_s(const am_EarlyDataType_e& type, const am_DataType_u& sinksource, const am_EarlyData_u& data);
+
+
+ virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
+ virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
+
+ static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
+ typeOutputStream.writeInt32Type();
+ typeOutputStream.writeVariantType();
+ typeOutputStream.writeVariantType();
+ }
+ };
+
+ typedef std::vector<am_EarlyData_s> am_EarlyData_l;
+
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, gp_indicatorDirection_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const gp_indicatorDirection_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct gp_indicatorDirection_eComparator {
+ inline bool operator()(const gp_indicatorDirection_e& lhs, const gp_indicatorDirection_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_RampType_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_RampType_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct am_RampType_eComparator {
+ inline bool operator()(const am_RampType_e& lhs, const am_RampType_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_MuteState_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_MuteState_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct am_MuteState_eComparator {
+ inline bool operator()(const am_MuteState_e& lhs, const am_MuteState_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_SourceState_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_SourceState_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct am_SourceState_eComparator {
+ inline bool operator()(const am_SourceState_e& lhs, const am_SourceState_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_Error_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_Error_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct am_Error_eComparator {
+ inline bool operator()(const am_Error_e& lhs, const am_Error_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_DomainState_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_DomainState_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct am_DomainState_eComparator {
+ inline bool operator()(const am_DomainState_e& lhs, const am_DomainState_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, gongType_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const gongType_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct gongType_eComparator {
+ inline bool operator()(const gongType_e& lhs, const gongType_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_EarlyDataType_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_EarlyDataType_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct am_EarlyDataType_eComparator {
+ inline bool operator()(const am_EarlyDataType_e& lhs, const am_EarlyDataType_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, gp_indicatorStatus_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const gp_indicatorStatus_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct gp_indicatorStatus_eComparator {
+ inline bool operator()(const gp_indicatorStatus_e& lhs, const gp_indicatorStatus_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, gongStatus_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const gongStatus_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct gongStatus_eComparator {
+ inline bool operator()(const gongStatus_e& lhs, const gongStatus_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, gongError_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const gongError_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct gongError_eComparator {
+ inline bool operator()(const gongError_e& lhs, const gongError_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, gongClass_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const gongClass_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct gongClass_eComparator {
+ inline bool operator()(const gongClass_e& lhs, const gongClass_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, sampleSet_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const sampleSet_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct sampleSet_eComparator {
+ inline bool operator()(const sampleSet_e& lhs, const sampleSet_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_Availability_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_Availability_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct am_Availability_eComparator {
+ inline bool operator()(const am_Availability_e& lhs, const am_Availability_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_AvailabilityReason_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_AvailabilityReason_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct am_AvailabilityReason_eComparator {
+ inline bool operator()(const am_AvailabilityReason_e& lhs, const am_AvailabilityReason_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_InterruptState_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_InterruptState_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct am_InterruptState_eComparator {
+ inline bool operator()(const am_InterruptState_e& lhs, const am_InterruptState_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_SoundPropertyType_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_SoundPropertyType_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct am_SoundPropertyType_eComparator {
+ inline bool operator()(const am_SoundPropertyType_e& lhs, const am_SoundPropertyType_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_ConnectionFormat_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_ConnectionFormat_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct am_ConnectionFormat_eComparator {
+ inline bool operator()(const am_ConnectionFormat_e& lhs, const am_ConnectionFormat_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_MainSoundPropertyType_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_MainSoundPropertyType_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct am_MainSoundPropertyType_eComparator {
+ inline bool operator()(const am_MainSoundPropertyType_e& lhs, const am_MainSoundPropertyType_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_NotificationType_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_NotificationType_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct am_NotificationType_eComparator {
+ inline bool operator()(const am_NotificationType_e& lhs, const am_NotificationType_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_NotificationStatus_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_NotificationStatus_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct am_NotificationStatus_eComparator {
+ inline bool operator()(const am_NotificationStatus_e& lhs, const am_NotificationStatus_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_HotSink_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_HotSink_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct am_HotSink_eComparator {
+ inline bool operator()(const am_HotSink_e& lhs, const am_HotSink_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_VolumeType_e& enumValue) {
+ return inputStream.readEnumValue<int32_t>(enumValue);
+}
+
+inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_VolumeType_e& enumValue) {
+ return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
+}
+
+struct am_VolumeType_eComparator {
+ inline bool operator()(const am_VolumeType_e& lhs, const am_VolumeType_e& rhs) const {
+ return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
+ }
+};
+
+bool operator==(const distanceInformation_s& lhs, const distanceInformation_s& rhs);
+inline bool operator!=(const distanceInformation_s& lhs, const distanceInformation_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const sampleNames_s& lhs, const sampleNames_s& rhs);
+inline bool operator!=(const sampleNames_s& lhs, const sampleNames_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const am_Domain_s& lhs, const am_Domain_s& rhs);
+inline bool operator!=(const am_Domain_s& lhs, const am_Domain_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const am_Volumes_s& lhs, const am_Volumes_s& rhs);
+inline bool operator!=(const am_Volumes_s& lhs, const am_Volumes_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const notificationPayload_s& lhs, const notificationPayload_s& rhs);
+inline bool operator!=(const notificationPayload_s& lhs, const notificationPayload_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const am_Availability_s& lhs, const am_Availability_s& rhs);
+inline bool operator!=(const am_Availability_s& lhs, const am_Availability_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const am_SoundProperty_s& lhs, const am_SoundProperty_s& rhs);
+inline bool operator!=(const am_SoundProperty_s& lhs, const am_SoundProperty_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const am_MainSoundProperty_s& lhs, const am_MainSoundProperty_s& rhs);
+inline bool operator!=(const am_MainSoundProperty_s& lhs, const am_MainSoundProperty_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const am_NotificationConfiguration_s& lhs, const am_NotificationConfiguration_s& rhs);
+inline bool operator!=(const am_NotificationConfiguration_s& lhs, const am_NotificationConfiguration_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const sourceData_s& lhs, const sourceData_s& rhs);
+inline bool operator!=(const sourceData_s& lhs, const sourceData_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const sinkData_s& lhs, const sinkData_s& rhs);
+inline bool operator!=(const sinkData_s& lhs, const sinkData_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const crossfaderData_s& lhs, const crossfaderData_s& rhs);
+inline bool operator!=(const crossfaderData_s& lhs, const crossfaderData_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const am_Gateway_s& lhs, const am_Gateway_s& rhs);
+inline bool operator!=(const am_Gateway_s& lhs, const am_Gateway_s& rhs) {
+ return !(lhs == rhs);
+}
+bool operator==(const am_EarlyData_s& lhs, const am_EarlyData_s& rhs);
+inline bool operator!=(const am_EarlyData_s& lhs, const am_EarlyData_s& rhs) {
+ return !(lhs == rhs);
+}
+
+
+static inline const char* getTypeCollectionName() {
+ return "org.genivi.audiomanager.am_gen";
+}
+
+
+} // namespace am_gen
+
+} // namespace audiomanager
+} // namespace genivi
+} // namespace org
+
+namespace CommonAPI {
+
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am_gen::gp_indicatorDirection_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am_gen::gp_indicatorDirection_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am_gen::gp_indicatorDirection_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am_gen::gp_indicatorDirection_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am_gen::gp_indicatorDirection_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am_gen::am_RampType_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_RampType_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am_gen::am_RampType_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_RampType_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am_gen::am_RampType_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am_gen::am_MuteState_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_MuteState_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am_gen::am_MuteState_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_MuteState_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am_gen::am_MuteState_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am_gen::am_SourceState_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_SourceState_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am_gen::am_SourceState_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_SourceState_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am_gen::am_SourceState_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am_gen::am_Error_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_Error_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am_gen::am_Error_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_Error_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am_gen::am_Error_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am_gen::am_DomainState_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_DomainState_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am_gen::am_DomainState_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_DomainState_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am_gen::am_DomainState_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am_gen::gongType_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am_gen::gongType_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am_gen::gongType_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am_gen::gongType_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am_gen::gongType_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am_gen::am_EarlyDataType_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_EarlyDataType_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am_gen::am_EarlyDataType_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_EarlyDataType_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am_gen::am_EarlyDataType_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am_gen::gp_indicatorStatus_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am_gen::gp_indicatorStatus_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am_gen::gp_indicatorStatus_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am_gen::gp_indicatorStatus_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am_gen::gp_indicatorStatus_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am_gen::gongStatus_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am_gen::gongStatus_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am_gen::gongStatus_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am_gen::gongStatus_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am_gen::gongStatus_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am_gen::gongError_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am_gen::gongError_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am_gen::gongError_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am_gen::gongError_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am_gen::gongError_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am_gen::gongClass_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am_gen::gongClass_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am_gen::gongClass_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am_gen::gongClass_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am_gen::gongClass_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am_gen::sampleSet_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am_gen::sampleSet_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am_gen::sampleSet_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am_gen::sampleSet_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am_gen::sampleSet_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am_gen::am_Availability_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_Availability_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am_gen::am_Availability_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_Availability_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am_gen::am_Availability_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am_gen::am_AvailabilityReason_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_AvailabilityReason_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am_gen::am_AvailabilityReason_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_AvailabilityReason_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am_gen::am_AvailabilityReason_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am_gen::am_InterruptState_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_InterruptState_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am_gen::am_InterruptState_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_InterruptState_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am_gen::am_InterruptState_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am_gen::am_SoundPropertyType_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_SoundPropertyType_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am_gen::am_SoundPropertyType_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_SoundPropertyType_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am_gen::am_SoundPropertyType_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am_gen::am_ConnectionFormat_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_ConnectionFormat_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am_gen::am_ConnectionFormat_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_ConnectionFormat_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am_gen::am_ConnectionFormat_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am_gen::am_MainSoundPropertyType_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_MainSoundPropertyType_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am_gen::am_MainSoundPropertyType_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_MainSoundPropertyType_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am_gen::am_MainSoundPropertyType_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am_gen::am_NotificationType_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_NotificationType_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am_gen::am_NotificationType_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_NotificationType_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am_gen::am_NotificationType_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am_gen::am_NotificationStatus_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_NotificationStatus_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am_gen::am_NotificationStatus_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_NotificationStatus_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am_gen::am_NotificationStatus_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am_gen::am_HotSink_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_HotSink_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am_gen::am_HotSink_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_HotSink_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am_gen::am_HotSink_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+ template<>
+ struct BasicTypeWriter<org::genivi::audiomanager::am_gen::am_VolumeType_e> {
+ inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
+ typeStream.writeInt32EnumType();
+ }
+ };
+
+ template<>
+ struct InputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_VolumeType_e> {
+ static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::audiomanager::am_gen::am_VolumeType_e>& vectorValue) {
+ inputStream.beginReadInt32EnumVector();
+ }
+ };
+
+ template <>
+ struct OutputStreamVectorHelper<org::genivi::audiomanager::am_gen::am_VolumeType_e> {
+ static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::audiomanager::am_gen::am_VolumeType_e>& vectorValue) {
+ outputStream.beginWriteInt32EnumVector(vectorValue.size());
+ }
+ };
+
+}
+
+
+namespace std {
+ //Hash for gp_indicatorDirection_e
+ template<>
+ struct hash<org::genivi::audiomanager::am_gen::gp_indicatorDirection_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am_gen::gp_indicatorDirection_e& gp_indicatorDirection_e) const {
+ return static_cast<int32_t>(gp_indicatorDirection_e);
+ }
+ };
+ //Hash for am_RampType_e
+ template<>
+ struct hash<org::genivi::audiomanager::am_gen::am_RampType_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am_gen::am_RampType_e& am_RampType_e) const {
+ return static_cast<int32_t>(am_RampType_e);
+ }
+ };
+ //Hash for am_MuteState_e
+ template<>
+ struct hash<org::genivi::audiomanager::am_gen::am_MuteState_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am_gen::am_MuteState_e& am_MuteState_e) const {
+ return static_cast<int32_t>(am_MuteState_e);
+ }
+ };
+ //Hash for am_SourceState_e
+ template<>
+ struct hash<org::genivi::audiomanager::am_gen::am_SourceState_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am_gen::am_SourceState_e& am_SourceState_e) const {
+ return static_cast<int32_t>(am_SourceState_e);
+ }
+ };
+ //Hash for am_Error_e
+ template<>
+ struct hash<org::genivi::audiomanager::am_gen::am_Error_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am_gen::am_Error_e& am_Error_e) const {
+ return static_cast<int32_t>(am_Error_e);
+ }
+ };
+ //Hash for am_DomainState_e
+ template<>
+ struct hash<org::genivi::audiomanager::am_gen::am_DomainState_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am_gen::am_DomainState_e& am_DomainState_e) const {
+ return static_cast<int32_t>(am_DomainState_e);
+ }
+ };
+ //Hash for gongType_e
+ template<>
+ struct hash<org::genivi::audiomanager::am_gen::gongType_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am_gen::gongType_e& gongType_e) const {
+ return static_cast<int32_t>(gongType_e);
+ }
+ };
+ //Hash for am_EarlyDataType_e
+ template<>
+ struct hash<org::genivi::audiomanager::am_gen::am_EarlyDataType_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am_gen::am_EarlyDataType_e& am_EarlyDataType_e) const {
+ return static_cast<int32_t>(am_EarlyDataType_e);
+ }
+ };
+ //Hash for gp_indicatorStatus_e
+ template<>
+ struct hash<org::genivi::audiomanager::am_gen::gp_indicatorStatus_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am_gen::gp_indicatorStatus_e& gp_indicatorStatus_e) const {
+ return static_cast<int32_t>(gp_indicatorStatus_e);
+ }
+ };
+ //Hash for gongStatus_e
+ template<>
+ struct hash<org::genivi::audiomanager::am_gen::gongStatus_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am_gen::gongStatus_e& gongStatus_e) const {
+ return static_cast<int32_t>(gongStatus_e);
+ }
+ };
+ //Hash for gongError_e
+ template<>
+ struct hash<org::genivi::audiomanager::am_gen::gongError_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am_gen::gongError_e& gongError_e) const {
+ return static_cast<int32_t>(gongError_e);
+ }
+ };
+ //Hash for gongClass_e
+ template<>
+ struct hash<org::genivi::audiomanager::am_gen::gongClass_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am_gen::gongClass_e& gongClass_e) const {
+ return static_cast<int32_t>(gongClass_e);
+ }
+ };
+ //Hash for sampleSet_e
+ template<>
+ struct hash<org::genivi::audiomanager::am_gen::sampleSet_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am_gen::sampleSet_e& sampleSet_e) const {
+ return static_cast<int32_t>(sampleSet_e);
+ }
+ };
+ //Hash for am_Availability_e
+ template<>
+ struct hash<org::genivi::audiomanager::am_gen::am_Availability_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am_gen::am_Availability_e& am_Availability_e) const {
+ return static_cast<int32_t>(am_Availability_e);
+ }
+ };
+ //Hash for am_AvailabilityReason_e
+ template<>
+ struct hash<org::genivi::audiomanager::am_gen::am_AvailabilityReason_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am_gen::am_AvailabilityReason_e& am_AvailabilityReason_e) const {
+ return static_cast<int32_t>(am_AvailabilityReason_e);
+ }
+ };
+ //Hash for am_InterruptState_e
+ template<>
+ struct hash<org::genivi::audiomanager::am_gen::am_InterruptState_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am_gen::am_InterruptState_e& am_InterruptState_e) const {
+ return static_cast<int32_t>(am_InterruptState_e);
+ }
+ };
+ //Hash for am_SoundPropertyType_e
+ template<>
+ struct hash<org::genivi::audiomanager::am_gen::am_SoundPropertyType_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am_gen::am_SoundPropertyType_e& am_SoundPropertyType_e) const {
+ return static_cast<int32_t>(am_SoundPropertyType_e);
+ }
+ };
+ //Hash for am_ConnectionFormat_e
+ template<>
+ struct hash<org::genivi::audiomanager::am_gen::am_ConnectionFormat_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am_gen::am_ConnectionFormat_e& am_ConnectionFormat_e) const {
+ return static_cast<int32_t>(am_ConnectionFormat_e);
+ }
+ };
+ //Hash for am_MainSoundPropertyType_e
+ template<>
+ struct hash<org::genivi::audiomanager::am_gen::am_MainSoundPropertyType_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am_gen::am_MainSoundPropertyType_e& am_MainSoundPropertyType_e) const {
+ return static_cast<int32_t>(am_MainSoundPropertyType_e);
+ }
+ };
+ //Hash for am_NotificationType_e
+ template<>
+ struct hash<org::genivi::audiomanager::am_gen::am_NotificationType_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am_gen::am_NotificationType_e& am_NotificationType_e) const {
+ return static_cast<int32_t>(am_NotificationType_e);
+ }
+ };
+ //Hash for am_NotificationStatus_e
+ template<>
+ struct hash<org::genivi::audiomanager::am_gen::am_NotificationStatus_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am_gen::am_NotificationStatus_e& am_NotificationStatus_e) const {
+ return static_cast<int32_t>(am_NotificationStatus_e);
+ }
+ };
+ //Hash for am_HotSink_e
+ template<>
+ struct hash<org::genivi::audiomanager::am_gen::am_HotSink_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am_gen::am_HotSink_e& am_HotSink_e) const {
+ return static_cast<int32_t>(am_HotSink_e);
+ }
+ };
+ //Hash for am_VolumeType_e
+ template<>
+ struct hash<org::genivi::audiomanager::am_gen::am_VolumeType_e> {
+ inline size_t operator()(const org::genivi::audiomanager::am_gen::am_VolumeType_e& am_VolumeType_e) const {
+ return static_cast<int32_t>(am_VolumeType_e);
+ }
+ };
+}
+
+#endif // ORG_GENIVI_AUDIOMANAGER_am_gen_H_
diff --git a/PluginRoutingInterfaceCAPI/src/CAmLookupData.cpp b/PluginRoutingInterfaceCAPI/src/CAmLookupData.cpp
new file mode 100644
index 0000000..6788618
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/src/CAmLookupData.cpp
@@ -0,0 +1,669 @@
+/**
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
+#include <algorithm>
+#include "CAmLookupData.h"
+#include "CAmRoutingSenderCommon.h"
+#include "shared/CAmDltWrapper.h"
+
+
+namespace am {
+
+const char * CAmLookupData::BUS_NAME = "CAPIRoutingPlugin";
+
+/**
+ * rs_lookupData_s
+ */
+
+rs_lookupData_s::rs_lookupData_s(const std::shared_ptr<RoutingSenderProxy<> > & aProxy):mSenderProxy(aProxy)
+{
+ logInfo(__PRETTY_FUNCTION__);
+ mSubscription = mSenderProxy->getProxyStatusEvent().subscribe(std::bind(&rs_lookupData_s::onServiceStatusEvent,this,std::placeholders::_1));
+}
+
+rs_lookupData_s::~rs_lookupData_s()
+{
+ mSenderProxy->getProxyStatusEvent().unsubscribe(mSubscription);
+ mSenderProxy.reset();
+}
+
+std::shared_ptr<RoutingSenderProxy<>> & rs_lookupData_s::getProxy()
+{
+ return mSenderProxy;
+}
+
+bool rs_lookupData_s::isConnected()
+{
+ return mIsConnected;
+}
+
+am_Error_e rs_lookupData_s::asyncAbort(const uint16_t handle, RoutingSenderProxyBase::AsyncAbortAsyncCallback callback)
+{
+ logInfo(__PRETTY_FUNCTION__, " [ isConnected : ", isConnected(), " ]");
+ if(isConnected())
+ {
+ mSenderProxy->asyncAbortAsync(static_cast<am_gen::am_handle_t>(handle), callback);
+ return (E_OK);
+ }
+ return (E_UNKNOWN);
+}
+
+am_Error_e rs_lookupData_s::asyncConnect(const uint16_t handle,
+ const am_connectionID_t connectionID,
+ const am_sourceID_t sourceID,
+ const am_sinkID_t sinkID,
+ const am_ConnectionFormat_e connectionFormat,
+ RoutingSenderProxyBase::AsyncConnectAsyncCallback callback)
+{
+ logInfo(__PRETTY_FUNCTION__, " [ isConnected : ", isConnected(), " ]");
+ if(isConnected())
+ {
+ mSenderProxy->asyncConnectAsync(static_cast<am_gen::am_handle_t>(handle),
+ static_cast<am_gen::am_connectionID_t>(connectionID),
+ static_cast<am_gen::am_sourceID_t>(sourceID),
+ static_cast<am_gen::am_sinkID_t>(sinkID),
+ static_cast<am_gen::am_ConnectionFormat_e>(connectionFormat),
+ callback);
+ return (E_OK);
+ }
+ return (E_UNKNOWN);
+}
+
+am_Error_e rs_lookupData_s::asyncDisconnect(const uint16_t handle,
+ const am_connectionID_t connectionID,
+ RoutingSenderProxyBase::AsyncDisconnectAsyncCallback cb)
+{
+ logInfo(__PRETTY_FUNCTION__, " [ isConnected : ", isConnected(), " ]");
+ if(isConnected())
+ {
+ mSenderProxy->asyncDisconnectAsync(static_cast<am_gen::am_handle_t>(handle),
+ static_cast<am_gen::am_connectionID_t>(connectionID),
+ cb);
+ return (E_OK);
+ }
+ return (E_UNKNOWN);
+}
+
+am_Error_e rs_lookupData_s::asyncSetSinkVolume( const uint16_t handle,
+ const am_sinkID_t sinkID,
+ const am_volume_t volume,
+ const am_RampType_e ramp,
+ const am_time_t time,
+ RoutingSenderProxyBase::AsyncSetSinkVolumeAsyncCallback cb)
+{
+ logInfo(__PRETTY_FUNCTION__, " [ isConnected : ", isConnected(), " ]");
+ if(isConnected())
+ {
+ mSenderProxy->asyncSetSinkVolumeAsync(static_cast<am_gen::am_handle_t>(handle),
+ static_cast<am_gen::am_sinkID_t>(sinkID),
+ static_cast<am_gen::am_volume_t>(volume),
+ static_cast<am_gen::am_RampType_e>(ramp),
+ static_cast<am_gen::am_time_t>(time),
+ cb);
+ return (E_OK);
+ }
+ return (E_UNKNOWN);
+}
+
+am_Error_e rs_lookupData_s::asyncSetSourceVolume(const uint16_t handle,
+ const am_sourceID_t sourceID,
+ const am_volume_t volume,
+ const am_RampType_e ramp,
+ const am_time_t time,
+ RoutingSenderProxyBase::AsyncSetSourceVolumeAsyncCallback cb)
+{
+ logInfo(__PRETTY_FUNCTION__, " [ isConnected : ", isConnected(), " ]");
+ if(isConnected())
+ {
+ mSenderProxy->asyncSetSourceVolumeAsync(static_cast<am_gen::am_handle_t>(handle),
+ static_cast<am_gen::am_sourceID_t>(sourceID),
+ static_cast<am_gen::am_volume_t>(volume),
+ static_cast<am_gen::am_RampType_e>(ramp),
+ static_cast<am_gen::am_time_t>(time),
+ cb);
+ return (E_OK);
+ }
+ return (E_UNKNOWN);
+}
+
+am_Error_e rs_lookupData_s::asyncSetSourceState( const uint16_t handle,
+ const am_sourceID_t sourceID,
+ const am_SourceState_e state,
+ RoutingSenderProxyBase::AsyncSetSinkSoundPropertiesAsyncCallback cb)
+{
+ logInfo(__PRETTY_FUNCTION__, " [ isConnected : ", isConnected(), " ]");
+ if(isConnected())
+ {
+ mSenderProxy->asyncSetSourceStateAsync(static_cast<am_gen::am_handle_t>(handle),
+ static_cast<am_gen::am_sourceID_t>(sourceID),
+ static_cast<am_gen::am_SourceState_e>(state),
+ cb);
+ return (E_OK);
+ }
+ return (E_UNKNOWN);
+}
+
+am_Error_e rs_lookupData_s::asyncSetSinkSoundProperties( const uint16_t handle,
+ const am_sinkID_t sinkID,
+ const std::vector<am_SoundProperty_s>& listSoundProperties,
+ RoutingSenderProxyBase::AsyncSetSinkSoundPropertiesAsyncCallback cb)
+{
+ logInfo(__PRETTY_FUNCTION__, " [ isConnected : ", isConnected(), " ]");
+ if(isConnected())
+ {
+ am_gen::am_SoundProperty_L lsp;
+ CAmConvertAMVector2CAPI(listSoundProperties, lsp);
+ mSenderProxy->asyncSetSinkSoundPropertiesAsync(static_cast<am_gen::am_handle_t>(handle),
+ static_cast<am_gen::am_sinkID_t>(sinkID),
+ lsp,
+ cb);
+ return (E_OK);
+ }
+ return (E_UNKNOWN);
+}
+
+am_Error_e rs_lookupData_s::asyncSetSinkSoundProperty( const uint16_t handle,
+ const am_sinkID_t sinkID,
+ const am_SoundProperty_s& soundProperty,
+ RoutingSenderProxyBase::AsyncSetSinkSoundPropertyAsyncCallback cb)
+{
+ logInfo(__PRETTY_FUNCTION__, " [ isConnected : ", isConnected(), " ]");
+ if(isConnected())
+ {
+ am_gen::am_SoundProperty_s converted;
+ CAmConvertAM2CAPI(soundProperty, converted);
+ mSenderProxy->asyncSetSinkSoundPropertyAsync(static_cast<am_gen::am_handle_t>(handle),
+ static_cast<am_gen::am_sinkID_t>(sinkID),
+ converted,
+ cb);
+ return (E_OK);
+ }
+ return (E_UNKNOWN);
+}
+
+am_Error_e rs_lookupData_s::asyncSetSourceSoundProperties(const uint16_t handle,
+ const am_sourceID_t sourceID,
+ const std::vector<am_SoundProperty_s>& listSoundProperties,
+ RoutingSenderProxyBase::AsyncSetSourceSoundPropertiesAsyncCallback cb)
+{
+ logInfo(__PRETTY_FUNCTION__, " [ isConnected : ", isConnected(), " ]");
+ if(isConnected())
+ {
+ am_gen::am_SoundProperty_L lsp;
+ CAmConvertAMVector2CAPI(listSoundProperties, lsp);
+ mSenderProxy->asyncSetSourceSoundPropertiesAsync(static_cast<am_gen::am_handle_t>(handle),
+ static_cast<am_gen::am_sourceID_t>(sourceID),
+ lsp,
+ cb);
+ return (E_OK);
+ }
+ return (E_UNKNOWN);
+}
+
+am_Error_e rs_lookupData_s::asyncSetSourceSoundProperty(const uint16_t handle,
+ const am_sourceID_t sourceID,
+ const am_SoundProperty_s& soundProperty,
+ RoutingSenderProxyBase::AsyncSetSourceSoundPropertyAsyncCallback cb)
+{
+ logInfo(__PRETTY_FUNCTION__, " [ isConnected : ", isConnected(), " ]");
+ if(isConnected())
+ {
+ am_gen::am_SoundProperty_s converted;
+ CAmConvertAM2CAPI(soundProperty, converted);
+ mSenderProxy->asyncSetSourceSoundPropertyAsync( static_cast<am_gen::am_handle_t>(handle),
+ static_cast<am_gen::am_sourceID_t>(sourceID),
+ converted,
+ cb);
+ return (E_OK);
+ }
+ return (E_UNKNOWN);
+}
+
+
+am_Error_e rs_lookupData_s::asyncCrossFade(const uint16_t handle,
+ const am_crossfaderID_t crossfaderID,
+ const am_HotSink_e hotSink,
+ const am_RampType_e rampType,
+ const am_time_t time,
+ RoutingSenderProxyBase::AsyncCrossFadeAsyncCallback cb)
+{
+ logInfo(__PRETTY_FUNCTION__, " [ isConnected : ", isConnected(), " ]");
+ if(isConnected())
+ {
+ mSenderProxy->asyncCrossFadeAsync(static_cast<am_gen::am_handle_t>(handle),
+ static_cast<am_gen::am_crossfaderID_t>(crossfaderID),
+ static_cast<am_gen::am_HotSink_e>(hotSink),
+ static_cast<am_gen::am_RampType_e>(rampType),
+ static_cast<am_gen::am_time_t>(time),
+ cb);
+ return (E_OK);
+ }
+ return (E_UNKNOWN);
+}
+
+am_Error_e rs_lookupData_s::setDomainState(const am_domainID_t domainID, const am_DomainState_e domainState, RoutingSenderProxyBase::SetDomainStateAsyncCallback cb)
+{
+ logInfo(__PRETTY_FUNCTION__, " [ isConnected : ", isConnected(), " ]");
+ if(isConnected())
+ {
+ mSenderProxy->setDomainStateAsync(static_cast<am_gen::am_domainID_t>(domainID),
+ static_cast<am_gen::am_DomainState_e>(domainState),
+ cb);
+ return (E_OK);
+ }
+ return (E_UNKNOWN);
+}
+
+am_Error_e rs_lookupData_s::asyncSetVolumes(const uint16_t handle,
+ const std::vector<am_Volumes_s>& volumes ,
+ RoutingSenderProxyBase::AsyncSetVolumesAsyncCallback cb )
+{
+ logInfo(__PRETTY_FUNCTION__, " [ isConnected : ", isConnected(), " ]");
+ if(isConnected())
+ {
+ am_gen::am_Volumes_l list;
+ CAmConvertAMVector2CAPI(volumes, list);
+ mSenderProxy->asyncSetVolumesAsync(static_cast<am_gen::am_handle_t>(handle),
+ list,
+ cb);
+ return (E_OK);
+ }
+ return (E_UNKNOWN);
+}
+
+am_Error_e rs_lookupData_s::asyncSetSinkNotificationConfiguration(const uint16_t handle,
+ const am_sinkID_t sinkID,
+ const am_NotificationConfiguration_s& notificationConfiguration,
+ RoutingSenderProxyBase::AsyncSetSinkNotificationConfigurationAsyncCallback cb)
+{
+ logInfo(__PRETTY_FUNCTION__, " [ isConnected : ", isConnected(), " ]");
+ if(isConnected())
+ {
+ am_gen::am_NotificationConfiguration_s converted;
+ CAmConvertAM2CAPI(notificationConfiguration, converted);
+ mSenderProxy->asyncSetSinkNotificationConfigurationAsync(static_cast<am_gen::am_handle_t>(handle),
+ static_cast<am_gen::am_sinkID_t>(sinkID),
+ converted,
+ cb);
+ return (E_OK);
+ }
+ return (E_UNKNOWN);
+}
+
+am_Error_e rs_lookupData_s::asyncSetSourceNotificationConfiguration(const uint16_t handle,
+ const am_sourceID_t sourceID,
+ const am_NotificationConfiguration_s& notificationConfiguration,
+ RoutingSenderProxyBase::AsyncSetSourceNotificationConfigurationAsyncCallback cb)
+{
+ logInfo(__PRETTY_FUNCTION__, " [ isConnected : ", isConnected(), " ]");
+ if(isConnected())
+ {
+ am_gen::am_NotificationConfiguration_s converted;
+ CAmConvertAM2CAPI(notificationConfiguration, converted);
+ mSenderProxy->asyncSetSourceNotificationConfigurationAsync( static_cast<am_gen::am_handle_t>(handle),
+ static_cast<am_gen::am_sourceID_t>(sourceID),
+ converted,
+ cb);
+ return (E_OK);
+ }
+ return (E_UNKNOWN);
+}
+
+void rs_lookupData_s::onServiceStatusEvent(const CommonAPI::AvailabilityStatus& serviceStatus)
+{
+ std::string serviceID;
+ logInfo(__PRETTY_FUNCTION__, serviceID, " status : ", (int)serviceStatus );
+ mIsConnected = (serviceStatus==CommonAPI::AvailabilityStatus::AVAILABLE);
+}
+
+/**
+ * CAmLookupData
+ */
+
+CAmLookupData::CAmLookupData():mMapDomains(), mMapSinks(), mMapSources(),mMapConnections(),mMapHandles(), mMapCrossfaders() {
+ // TODO Auto-generated constructor stub
+
+}
+
+CAmLookupData::~CAmLookupData() {
+ // TODO Auto-generated destructor stub
+}
+
+void CAmLookupData::addDomainLookup(am_domainID_t & domainID,
+ std::shared_ptr<RoutingSenderProxy<>> & aProxy)
+{
+ logInfo(__PRETTY_FUNCTION__, " [ domainID : ", domainID, " ]");
+ RSLookupDataPtr lookupData = std::make_shared<rs_lookupData_s>(aProxy);
+ mMapDomains.insert(std::make_pair(domainID, lookupData));
+}
+
+void CAmLookupData::removeHandle(uint16_t handle)
+{
+ mMapHandles.erase(handle);
+}
+
+void CAmLookupData::addSourceLookup(am_sourceID_t sourceID, am_domainID_t domainID)
+{
+ logInfo(__PRETTY_FUNCTION__, " [ domainID : ", domainID, " ]", " [ sourceID : ", sourceID, " ]");
+ mapDomain_t::iterator iter(mMapDomains.begin());
+ iter = mMapDomains.find(domainID);
+ if (iter != mMapDomains.end())
+ {
+ mMapSources.insert(std::make_pair(sourceID, iter->second));
+ }
+}
+
+void CAmLookupData::addSinkLookup(am_sinkID_t sinkID, am_domainID_t domainID)
+{
+ logInfo(__PRETTY_FUNCTION__, " [ domainID : ", domainID, " ]", " [ sinkID : ", sinkID, " ]");
+ mapDomain_t::iterator iter(mMapDomains.begin());
+ iter = mMapDomains.find(domainID);
+ if (iter != mMapDomains.end())
+ {
+ mMapSinks.insert(std::make_pair(sinkID, iter->second));
+ }
+}
+
+void CAmLookupData::addCrossfaderLookup(am_crossfaderID_t crossfaderID, am_sourceID_t soucreID)
+{
+ logInfo(__PRETTY_FUNCTION__, " [ crossfaderID : ", crossfaderID, " ]", " [ soucreID : ", soucreID, " ]");
+ mapSources_t::iterator iter(mMapSources.begin());
+ iter = mMapSources.find(soucreID);
+ if (iter != mMapSources.end())
+ {
+ mMapCrossfaders.insert(std::make_pair(crossfaderID, iter->second));
+ }
+}
+
+void CAmLookupData::removeDomainLookup(am_domainID_t domainID)
+{
+ mapDomain_t::iterator iter(mMapDomains.begin());
+ iter = mMapDomains.find(domainID);
+ if (iter != mMapDomains.end())
+ {
+ CAmLookupData::removeEntriesForValue(iter->second, mMapSources);
+ CAmLookupData::removeEntriesForValue(iter->second, mMapSinks);
+ CAmLookupData::removeEntriesForValue(iter->second, mMapCrossfaders);
+ CAmLookupData::removeEntriesForValue(iter->second, mMapHandles);
+ CAmLookupData::removeEntriesForValue(iter->second, mMapConnections);
+ mMapDomains.erase(domainID);
+ }
+}
+
+void CAmLookupData::removeSourceLookup(am_sourceID_t sourceID)
+{
+ mMapSources.erase(sourceID);
+}
+
+void CAmLookupData::removeSinkLookup(am_sinkID_t sinkID)
+{
+ mMapSinks.erase(sinkID);
+}
+
+void CAmLookupData::removeCrossfaderLookup(am_crossfaderID_t crossfaderID)
+{
+ mMapCrossfaders.erase(crossfaderID);
+}
+
+void CAmLookupData::removeConnectionLookup(am_connectionID_t connectionID)
+{
+ mMapConnections.erase(connectionID);
+}
+
+template <typename TKey> void CAmLookupData::removeEntriesForValue(const RSLookupDataPtr & value, std::map<TKey,RSLookupDataPtr> & map)
+{
+ typename std::map<TKey,RSLookupDataPtr>::iterator it = map.begin();
+ while ( it != map.end() )
+ {
+ if (it->second == value)
+ {
+ typename std::map<TKey,RSLookupDataPtr>::iterator it_tmp = it;
+ it++;
+ map.erase(it_tmp);
+ }
+ else
+ ++it;
+ }
+}
+
+template <typename TKey> const CAmLookupData::RSLookupDataPtr CAmLookupData::getValueForKey(const TKey & key, const std::map<TKey,CAmLookupData::RSLookupDataPtr> & map)
+{
+ mapHandles_t::const_iterator iter = map.find(key);
+ if (iter != map.end() )
+ {
+ return iter->second;
+ }
+ return NULL;
+}
+
+am_Error_e CAmLookupData::asyncAbort(const uint16_t handle, RoutingSenderProxyBase::AsyncAbortAsyncCallback callback)
+{
+ RSLookupDataPtr result = getValueForKey(handle, mMapHandles);
+ if(result)
+ return result->asyncAbort(handle, callback);
+ return (E_UNKNOWN);
+}
+
+am_Error_e CAmLookupData::asyncConnect(const uint16_t handle,
+ const am_connectionID_t connectionID,
+ const am_sourceID_t sourceID,
+ const am_sinkID_t sinkID,
+ const am_ConnectionFormat_e connectionFormat,
+ RoutingSenderProxyBase::AsyncConnectAsyncCallback callback)
+{
+ RSLookupDataPtr result = CAmLookupData::getValueForKey(sourceID, mMapSources);
+ if(result)
+ {
+ mMapConnections.insert(std::make_pair(connectionID, result));
+ mMapHandles.insert(std::make_pair(+handle, result));
+ return result->asyncConnect(handle, connectionID, sourceID, sinkID, connectionFormat, callback);
+ }
+ return (E_UNKNOWN);
+}
+
+am_Error_e CAmLookupData::asyncDisconnect(const uint16_t handle,
+ const am_connectionID_t connectionID,
+ RoutingSenderProxyBase::AsyncDisconnectAsyncCallback cb)
+{
+ RSLookupDataPtr result = CAmLookupData::getValueForKey(connectionID, mMapConnections);
+ if(result)
+ {
+ mMapHandles.insert(std::make_pair(+handle, result));
+ return result->asyncDisconnect(handle, connectionID, cb);
+ }
+ return (E_UNKNOWN);
+}
+
+am_Error_e CAmLookupData::asyncSetSinkVolume( const uint16_t handle,
+ const am_sinkID_t sinkID,
+ const am_volume_t volume,
+ const am_RampType_e ramp,
+ const am_time_t time,
+ RoutingSenderProxyBase::AsyncSetSinkVolumeAsyncCallback cb)
+{
+ RSLookupDataPtr result = CAmLookupData::getValueForKey(sinkID, mMapSinks);
+ if(result)
+ {
+ mMapHandles.insert(std::make_pair(+handle, result));
+ return result->asyncSetSinkVolume(handle, sinkID, volume, ramp, time, cb);
+ }
+ return (E_UNKNOWN);
+}
+
+am_Error_e CAmLookupData::asyncSetSourceVolume(const uint16_t handle,
+ const am_sourceID_t sourceID,
+ const am_volume_t volume,
+ const am_RampType_e ramp,
+ const am_time_t time,
+ RoutingSenderProxyBase::AsyncSetSourceVolumeAsyncCallback cb)
+{
+ RSLookupDataPtr result = CAmLookupData::getValueForKey(sourceID, mMapSources);
+ if(result)
+ {
+ mMapHandles.insert(std::make_pair(+handle, result));
+ return result->asyncSetSourceVolume(handle, sourceID, volume, ramp, time, cb);
+ }
+ return (E_UNKNOWN);
+}
+
+am_Error_e CAmLookupData::asyncSetSourceState(const uint16_t handle,
+ const am_sourceID_t sourceID,
+ const am_SourceState_e state,
+ RoutingSenderProxyBase::AsyncSetSinkSoundPropertiesAsyncCallback cb)
+{
+ RSLookupDataPtr result = CAmLookupData::getValueForKey(sourceID, mMapSources);
+ if(result)
+ {
+ mMapHandles.insert(std::make_pair(+handle, result));
+ return result->asyncSetSourceState(handle, sourceID, state, cb);
+ }
+ return (E_UNKNOWN);
+}
+
+am_Error_e CAmLookupData::asyncSetSinkSoundProperties( const uint16_t handle,
+ const am_sinkID_t sinkID,
+ const std::vector<am_SoundProperty_s>& listSoundProperties,
+ RoutingSenderProxyBase::AsyncSetSinkSoundPropertiesAsyncCallback cb)
+{
+ RSLookupDataPtr result = CAmLookupData::getValueForKey(sinkID, mMapSinks);
+ if(result)
+ {
+ mMapHandles.insert(std::make_pair(+handle, result));
+ return result->asyncSetSinkSoundProperties(handle, sinkID, listSoundProperties, cb);
+ }
+ return (E_UNKNOWN);
+}
+
+am_Error_e CAmLookupData::asyncSetSinkSoundProperty( const uint16_t handle,
+ const am_sinkID_t sinkID,
+ const am_SoundProperty_s& soundProperty,
+ RoutingSenderProxyBase::AsyncSetSinkSoundPropertyAsyncCallback cb)
+{
+ RSLookupDataPtr result = CAmLookupData::getValueForKey(sinkID, mMapSinks);
+ if(result)
+ {
+ mMapHandles.insert(std::make_pair(+handle, result));
+ return result->asyncSetSinkSoundProperty(handle, sinkID, soundProperty, cb);
+ }
+ return (E_UNKNOWN);
+}
+
+am_Error_e CAmLookupData::asyncSetSourceSoundProperties(const uint16_t handle,
+ const am_sourceID_t sourceID,
+ const std::vector<am_SoundProperty_s>& listSoundProperties,
+ RoutingSenderProxyBase::AsyncSetSourceSoundPropertiesAsyncCallback cb)
+{
+ RSLookupDataPtr result = CAmLookupData::getValueForKey(sourceID, mMapSources);
+ if(result)
+ {
+ mMapHandles.insert(std::make_pair(+handle, result));
+ return result->asyncSetSourceSoundProperties(handle, sourceID, listSoundProperties, cb);
+ }
+ return (E_UNKNOWN);
+}
+
+am_Error_e CAmLookupData::asyncSetSourceSoundProperty(const uint16_t handle,
+ const am_sourceID_t sourceID,
+ const am_SoundProperty_s& soundProperty,
+ RoutingSenderProxyBase::AsyncSetSourceSoundPropertyAsyncCallback cb)
+{
+ RSLookupDataPtr result = CAmLookupData::getValueForKey(sourceID, mMapSources);
+ if(result)
+ {
+ mMapHandles.insert(std::make_pair(+handle, result));
+ return result->asyncSetSourceSoundProperty(handle, sourceID, soundProperty, cb);
+ }
+ return (E_UNKNOWN);
+}
+
+
+am_Error_e CAmLookupData::asyncCrossFade(const uint16_t handle,
+ const am_crossfaderID_t crossfaderID,
+ const am_HotSink_e hotSink,
+ const am_RampType_e rampType,
+ const am_time_t time,
+ RoutingSenderProxyBase::AsyncCrossFadeAsyncCallback cb)
+{
+ RSLookupDataPtr result = CAmLookupData::getValueForKey(crossfaderID, mMapCrossfaders);
+ if(result)
+ {
+ mMapHandles.insert(std::make_pair(+handle, result));
+ return result->asyncCrossFade(handle, crossfaderID, hotSink, rampType, time, cb);
+ }
+ return (E_UNKNOWN);
+}
+
+am_Error_e CAmLookupData::setDomainState(const am_domainID_t domainID, const am_DomainState_e domainState, RoutingSenderProxyBase::SetDomainStateAsyncCallback cb)
+{
+ RSLookupDataPtr result = CAmLookupData::getValueForKey(domainID, mMapDomains);
+ if(result)
+ return result->setDomainState(domainID, domainState, cb);
+ return (E_UNKNOWN);
+}
+
+
+am_Error_e CAmLookupData::asyncSetVolumes(const uint16_t handle,
+ const std::vector<am_Volumes_s>& volumes ,
+ RoutingSenderProxyBase::AsyncSetVolumesAsyncCallback cb )
+{
+
+ if(volumes.size())
+ {
+ am_Volumes_s volumeItem = volumes.at(0);
+ RSLookupDataPtr result = NULL;
+ if(volumeItem.volumeType == VT_SINK)
+ result = CAmLookupData::getValueForKey(volumeItem.volumeID.sink, mMapSinks);
+ else if(volumeItem.volumeType == VT_SOURCE)
+ result = CAmLookupData::getValueForKey(volumeItem.volumeID.source, mMapSources);
+ if(result)
+ {
+ mMapHandles.insert(std::make_pair(+handle, result));
+ return result->asyncSetVolumes(handle, volumes, cb);
+ }
+ }
+ return (E_UNKNOWN);
+}
+
+am_Error_e CAmLookupData::asyncSetSinkNotificationConfiguration(const uint16_t handle,
+ const am_sinkID_t sinkID,
+ const am_NotificationConfiguration_s& notificationConfiguration,
+ RoutingSenderProxyBase::AsyncSetSinkNotificationConfigurationAsyncCallback cb)
+{
+ RSLookupDataPtr result = CAmLookupData::getValueForKey(sinkID, mMapSinks);
+ if(result)
+ {
+ mMapHandles.insert(std::make_pair(+handle, result));
+ return result->asyncSetSinkNotificationConfiguration(handle, sinkID, notificationConfiguration, cb);
+ }
+ return (E_UNKNOWN);
+}
+
+am_Error_e CAmLookupData::asyncSetSourceNotificationConfiguration(const uint16_t handle,
+ const am_sourceID_t sourceID,
+ const am_NotificationConfiguration_s& notificationConfiguration,
+ RoutingSenderProxyBase::AsyncSetSourceNotificationConfigurationAsyncCallback cb)
+{
+ RSLookupDataPtr result = CAmLookupData::getValueForKey(sourceID, mMapSources);
+ if(result)
+ {
+ mMapHandles.insert(std::make_pair(+handle, result));
+ return result->asyncSetSourceNotificationConfiguration(handle, sourceID, notificationConfiguration, cb);
+ }
+ return (E_UNKNOWN);
+}
+
+} /* namespace am */
diff --git a/PluginRoutingInterfaceCAPI/src/CAmRoutingSenderCAPI.cpp b/PluginRoutingInterfaceCAPI/src/CAmRoutingSenderCAPI.cpp
new file mode 100644
index 0000000..55d2792
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/src/CAmRoutingSenderCAPI.cpp
@@ -0,0 +1,266 @@
+/**
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
+#include <cassert>
+#include <map>
+#include <algorithm>
+#include <string>
+#include <vector>
+#include <set>
+#include "shared/CAmDltWrapper.h"
+#include "CAmRoutingSenderCAPI.h"
+
+
+namespace am
+{
+DLT_DECLARE_CONTEXT(ctxCommandCAPI)
+
+extern "C" IAmRoutingSend* PluginRoutingInterfaceCAPIFactory()
+{
+ CAmDltWrapper::instance()->registerContext(ctxCommandCAPI, "DRS", "Common-API Plugin");
+ return (new CAmRoutingSenderCAPI(Am_CAPI));
+}
+
+extern "C" void destroyPluginRoutingInterfaceCAPI(IAmRoutingSend* routingSendInterface)
+{
+ delete routingSendInterface;
+}
+
+const char * CAmRoutingSenderCAPI::ROUTING_INTERFACE_SERVICE = "local:org.genivi.audiomanger.routinginterface:org.genivi.audiomanger";
+
+CAmRoutingSenderCAPI::CAmRoutingSenderCAPI() :
+ mIsServiceStarted(false),
+ mReady(false),
+ mLookupData(),
+ mpCAmCAPIWrapper(NULL), //
+ mpIAmRoutingReceive(NULL),
+ mService()
+{
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "RoutingSender constructed");
+}
+
+CAmRoutingSenderCAPI::CAmRoutingSenderCAPI(CAmCommonAPIWrapper *aWrapper) :
+ mIsServiceStarted(false),
+ mReady(false),
+ mLookupData(),
+ mpCAmCAPIWrapper(aWrapper), //
+ mpIAmRoutingReceive(NULL),
+ mService()
+{
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "CommandSenderCAPI constructor called");
+ assert(mpCAmCAPIWrapper!=NULL);
+}
+
+CAmRoutingSenderCAPI::~CAmRoutingSenderCAPI()
+{
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "RoutingSender deallocate");
+ CAmDltWrapper::instance()->unregisterContext(ctxCommandCAPI);
+ tearDownInterface(mpIAmRoutingReceive);
+}
+
+am_Error_e CAmRoutingSenderCAPI::startService(IAmRoutingReceive* pIAmRoutingReceive)
+{
+ log(&ctxCommandCAPI, DLT_LOG_INFO, __PRETTY_FUNCTION__);
+ if(!mIsServiceStarted)
+ {
+ assert(pIAmRoutingReceive);
+ mService = std::make_shared<CAmRoutingService>(pIAmRoutingReceive, &mLookupData, mpCAmCAPIWrapper);
+ //Registers the service
+ if( false == mpCAmCAPIWrapper->registerStub(mService, CAmRoutingSenderCAPI::ROUTING_INTERFACE_SERVICE) )
+ {
+ return (E_NOT_POSSIBLE);
+ }
+ mIsServiceStarted = true;
+ }
+ return (E_OK);
+}
+
+am_Error_e CAmRoutingSenderCAPI::startupInterface(IAmRoutingReceive* pIAmRoutingReceive)
+{
+ log(&ctxCommandCAPI, DLT_LOG_INFO, __PRETTY_FUNCTION__);
+ mpIAmRoutingReceive = pIAmRoutingReceive;
+ return startService(mpIAmRoutingReceive);
+}
+
+am_Error_e CAmRoutingSenderCAPI::tearDownInterface(IAmRoutingReceive*)
+{
+ log(&ctxCommandCAPI, DLT_LOG_INFO, __PRETTY_FUNCTION__);
+ if(mpCAmCAPIWrapper)
+ {
+ if(mIsServiceStarted)
+ {
+ mIsServiceStarted = false;
+ mpCAmCAPIWrapper->unregisterStub(CAmRoutingSenderCAPI::ROUTING_INTERFACE_SERVICE);
+ mService.reset();
+ }
+ return (E_OK);
+ }
+ return (E_NOT_POSSIBLE);
+}
+
+void CAmRoutingSenderCAPI::getInterfaceVersion(std::string & version) const
+{
+ version = RoutingSendVersion;
+}
+
+void CAmRoutingSenderCAPI::setRoutingReady(const uint16_t handle)
+{
+ assert(mpIAmRoutingReceive);
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "sending routingReady signal");
+ mReady = true;
+ mpIAmRoutingReceive->confirmRoutingReady(handle,E_OK);
+ mService->fireSetRoutingReadyEvent();
+ mService->gotReady(mLookupData.numberOfDomains(),handle);
+}
+
+void CAmRoutingSenderCAPI::setRoutingRundown(const uint16_t handle)
+{
+ log(&ctxCommandCAPI, DLT_LOG_INFO, __PRETTY_FUNCTION__);
+ assert(mpIAmRoutingReceive);
+ mReady = false;
+ mpIAmRoutingReceive->confirmRoutingRundown(handle,E_OK);
+ mService->fireSetRoutingRundownEvent();
+ mService->gotRundown(mLookupData.numberOfDomains(),handle);
+}
+
+am_Error_e CAmRoutingSenderCAPI::asyncAbort(const am_Handle_s handle)
+{
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "CAmRoutingSenderDbus::asyncAbort called");
+ return mLookupData.asyncAbort(handle.handle,[&](const CommonAPI::CallStatus& callStatus, const am_gen::am_Error_e& error){
+ log(&ctxCommandCAPI, DLT_LOG_INFO, __PRETTY_FUNCTION__, "Response with call status:", static_cast<int16_t>(callStatus));
+ });
+}
+
+am_Error_e CAmRoutingSenderCAPI::asyncConnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_ConnectionFormat_e connectionFormat)
+{
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "CAmRoutingSenderDbus::asyncConnect called");
+ return mLookupData.asyncConnect(handle.handle,connectionID, sourceID, sinkID, connectionFormat, [&](const CommonAPI::CallStatus& callStatus){
+ log(&ctxCommandCAPI, DLT_LOG_INFO, __PRETTY_FUNCTION__, "Response with call status:", static_cast<int16_t>(callStatus));
+ });
+}
+
+am_Error_e CAmRoutingSenderCAPI::asyncDisconnect(const am_Handle_s handle, const am_connectionID_t connectionID)
+{
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "CAmRoutingSenderDbus::asyncDisconnect called");
+ return mLookupData.asyncDisconnect(handle.handle,connectionID, [&](const CommonAPI::CallStatus& callStatus){
+ log(&ctxCommandCAPI, DLT_LOG_INFO, __PRETTY_FUNCTION__, "Response with call status:", static_cast<int16_t>(callStatus));
+ });
+}
+
+am_Error_e CAmRoutingSenderCAPI::asyncSetSinkVolume(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time)
+{
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "CAmRoutingSenderDbus::asyncSetSinkVolume called");
+ return mLookupData.asyncSetSinkVolume(handle.handle,sinkID, volume, ramp, time, [&](const CommonAPI::CallStatus& callStatus){
+ log(&ctxCommandCAPI, DLT_LOG_INFO, __PRETTY_FUNCTION__, "Response with call status:", static_cast<int16_t>(callStatus));
+ });
+}
+
+am_Error_e CAmRoutingSenderCAPI::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)
+{
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "CAmRoutingSenderDbus::asyncSetSourceVolume called");
+ return mLookupData.asyncSetSourceVolume(handle.handle,sourceID, volume, ramp, time, [&](const CommonAPI::CallStatus& callStatus){
+ log(&ctxCommandCAPI, DLT_LOG_INFO, __PRETTY_FUNCTION__, "Response with call status:", static_cast<int16_t>(callStatus));
+ });
+}
+
+am_Error_e CAmRoutingSenderCAPI::asyncSetSourceState(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SourceState_e state)
+{
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "CAmRoutingSenderDbus::asyncSetSourceState called");
+ return mLookupData.asyncSetSourceState(handle.handle,sourceID, state,[&](const CommonAPI::CallStatus& callStatus){
+ log(&ctxCommandCAPI, DLT_LOG_INFO, __PRETTY_FUNCTION__, "Response with call status:", static_cast<int16_t>(callStatus));
+ });
+}
+
+am_Error_e CAmRoutingSenderCAPI::asyncSetSinkSoundProperties(const am_Handle_s handle, const am_sinkID_t sinkID, const std::vector<am_SoundProperty_s>& listSoundProperties)
+{
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "CAmRoutingSenderDbus::asyncSetSinkSoundProperties called");
+ return mLookupData.asyncSetSinkSoundProperties(handle.handle,sinkID, listSoundProperties, [&](const CommonAPI::CallStatus& callStatus){
+ log(&ctxCommandCAPI, DLT_LOG_INFO, __PRETTY_FUNCTION__, "Response with call status:", static_cast<int16_t>(callStatus));
+ });
+}
+
+am_Error_e CAmRoutingSenderCAPI::asyncSetSinkSoundProperty(const am_Handle_s handle, const am_sinkID_t sinkID, const am_SoundProperty_s& soundProperty)
+{
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "CAmRoutingSenderDbus::asyncSetSinkSoundProperty called");
+ return mLookupData.asyncSetSinkSoundProperty(handle.handle, sinkID, soundProperty, [&](const CommonAPI::CallStatus& callStatus){
+ log(&ctxCommandCAPI, DLT_LOG_INFO, __PRETTY_FUNCTION__, "Response with call status:", static_cast<int16_t>(callStatus));
+ });
+}
+
+am_Error_e CAmRoutingSenderCAPI::asyncSetSourceSoundProperties(const am_Handle_s handle, const am_sourceID_t sourceID, const std::vector<am_SoundProperty_s>& listSoundProperties)
+{
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "CAmRoutingSenderDbus::asyncSetSourceSoundProperties called");
+ return mLookupData.asyncSetSourceSoundProperties(handle.handle, sourceID, listSoundProperties, [&](const CommonAPI::CallStatus& callStatus){
+ log(&ctxCommandCAPI, DLT_LOG_INFO, __PRETTY_FUNCTION__, "Response with call status:", static_cast<int16_t>(callStatus));
+ });
+}
+
+am_Error_e CAmRoutingSenderCAPI::asyncSetSourceSoundProperty(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SoundProperty_s& soundProperty)
+{
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "CAmRoutingSenderDbus::asyncSetSourceSoundProperty called");
+ return mLookupData.asyncSetSourceSoundProperty(handle.handle, sourceID, soundProperty, [&](const CommonAPI::CallStatus& callStatus){
+ log(&ctxCommandCAPI, DLT_LOG_INFO, __PRETTY_FUNCTION__, "Response with call status:", static_cast<int16_t>(callStatus));
+ });
+}
+
+am_Error_e CAmRoutingSenderCAPI::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)
+{
+ return mLookupData.asyncCrossFade(handle.handle, crossfaderID, hotSink, rampType, time, [&](const CommonAPI::CallStatus& callStatus){
+ log(&ctxCommandCAPI, DLT_LOG_INFO, __PRETTY_FUNCTION__, "Response with call status:", static_cast<int16_t>(callStatus));
+ });
+}
+
+am_Error_e CAmRoutingSenderCAPI::setDomainState(const am_domainID_t domainID, const am_DomainState_e domainState)
+{
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "CAmRoutingSenderDbus::setDomainState called");
+ return mLookupData.setDomainState(domainID, domainState, [&](const CommonAPI::CallStatus& callStatus, const am_gen::am_Error_e& error){
+ log(&ctxCommandCAPI, DLT_LOG_INFO, __PRETTY_FUNCTION__, "Response with call status:", static_cast<int16_t>(callStatus));
+ });
+}
+
+am_Error_e CAmRoutingSenderCAPI::returnBusName(std::string& BusName) const
+{
+ BusName = CAmLookupData::BUS_NAME;
+ return (E_OK);
+}
+
+am_Error_e CAmRoutingSenderCAPI::asyncSetVolumes(const am_Handle_s handle, const std::vector<am_Volumes_s>& volumes)
+{
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "CAmRoutingSenderDbus::asyncSetVolumes called");
+ return mLookupData.asyncSetVolumes(handle.handle, volumes, [&](const CommonAPI::CallStatus& callStatus){
+ log(&ctxCommandCAPI, DLT_LOG_INFO, __PRETTY_FUNCTION__, "Response with call status:", static_cast<int16_t>(callStatus));
+ });
+}
+
+am_Error_e CAmRoutingSenderCAPI::asyncSetSinkNotificationConfiguration(const am_Handle_s handle, const am_sinkID_t sinkID, const am_NotificationConfiguration_s& nc)
+{
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "CAmRoutingSenderDbus::asyncSetSinkNotificationConfiguration called");
+ return mLookupData.asyncSetSinkNotificationConfiguration(handle.handle, sinkID, nc, [&](const CommonAPI::CallStatus& callStatus){
+ log(&ctxCommandCAPI, DLT_LOG_INFO, __PRETTY_FUNCTION__, "Response with call status:", static_cast<int16_t>(callStatus));
+ });
+}
+
+am_Error_e CAmRoutingSenderCAPI::asyncSetSourceNotificationConfiguration(const am_Handle_s handle, const am_sourceID_t sourceID, const am_NotificationConfiguration_s& nc)
+{
+ log(&ctxCommandCAPI, DLT_LOG_INFO, "CAmRoutingSenderDbus::asyncSetSourceNotificationConfiguration called");
+ return mLookupData.asyncSetSourceNotificationConfiguration(handle.handle, sourceID, nc, [&](const CommonAPI::CallStatus& callStatus){
+ log(&ctxCommandCAPI, DLT_LOG_INFO, __PRETTY_FUNCTION__, "Response with call status:", static_cast<int16_t>(callStatus));
+ });
+}
+
+}
+
diff --git a/PluginRoutingInterfaceCAPI/src/CAmRoutingSenderCommon.cpp b/PluginRoutingInterfaceCAPI/src/CAmRoutingSenderCommon.cpp
new file mode 100644
index 0000000..c9f5876
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/src/CAmRoutingSenderCommon.cpp
@@ -0,0 +1,282 @@
+/**
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
+
+#include "CAmRoutingSenderCommon.h"
+
+/**
+ * Utility functions
+ */
+
+void CAmConvertCAPI2AM(const am_gen::am_Domain_s & source, am::am_Domain_s & destination)
+{
+ destination.domainID = source.domainID;
+ destination.name = source.name;
+ destination.busname = source.busname;
+ destination.nodename = source.nodename;
+ destination.early = source.early;
+ destination.complete = source.complete;
+ destination.state = static_cast<am::am_DomainState_e>(source.state);
+}
+
+void CAmConvertCAPI2AM(const am_gen::am_SoundProperty_s & source, am::am_SoundProperty_s & destination)
+{
+ destination.type = static_cast<am::am_SoundPropertyType_e>(source.type);
+ destination.value = source.value;
+}
+
+void CAmConvertCAPIVector2AM(const std::vector<am_gen::am_SoundProperty_s> & source, std::vector<am::am_SoundProperty_s> & destination)
+{
+ am::am_SoundProperty_s soundProp;
+ destination.clear();
+ for(std::vector<am_gen::am_SoundProperty_s>::const_iterator iter = source.begin(); iter!=source.end(); iter++)
+ {
+ CAmConvertCAPI2AM(*iter, soundProp);
+ destination.push_back(soundProp);
+ }
+}
+
+void CAmConvertCAPI2AM(const am_gen::am_MainSoundProperty_s & source, am::am_MainSoundProperty_s & destination)
+{
+ destination.type = static_cast<am::am_MainSoundPropertyType_e>(source.type);
+ destination.value = source.value;
+}
+
+
+void CAmConvertCAPI2AM(const am_gen::notificationPayload_s & source, am::am_NotificationPayload_s & destination)
+{
+ destination.type = static_cast<am::am_NotificationType_e>(source.type);
+ destination.value = source.payload;
+}
+
+void CAmConvertCAPIVector2AM(const std::vector<am_gen::am_Volumes_s> & source, std::vector<am::am_Volumes_s> & destination)
+{
+ destination.clear();
+ for(std::vector<am_gen::am_Volumes_s>::const_iterator iter = source.begin(); iter!=source.end(); iter++)
+ {
+ am::am_Volumes_s volume;
+ CAmConvertCAPI2AM(*iter, volume);
+ destination.push_back(volume);
+ }
+}
+
+void CAmConvertCAPIVector2AM(const std::vector<am_gen::am_MainSoundProperty_s> & source, std::vector<am::am_MainSoundProperty_s> & destination)
+{
+ am::am_MainSoundProperty_s soundProp;
+ destination.clear();
+ for(std::vector<am_gen::am_MainSoundProperty_s>::const_iterator iter = source.begin(); iter!=source.end(); iter++)
+ {
+ CAmConvertCAPI2AM(*iter, soundProp);
+ destination.push_back(soundProp);
+ }
+}
+
+void CAmConvertCAPI2AM(const am_gen::am_NotificationConfiguration_s & source, am::am_NotificationConfiguration_s & destination)
+{
+ destination.type = static_cast<am::am_NotificationType_e>(source.type);
+ destination.status = static_cast<am::am_NotificationStatus_e>(source.status);
+ destination.parameter = source.parameter;
+}
+
+void CAmConvertCAPIVector2AM(const std::vector<am_gen::am_NotificationConfiguration_s> & source, std::vector<am::am_NotificationConfiguration_s> & destination)
+{
+ am::am_NotificationConfiguration_s soundProp;
+ destination.clear();
+ for(std::vector<am_gen::am_NotificationConfiguration_s>::const_iterator iter = source.begin(); iter!=source.end(); iter++)
+ {
+ CAmConvertCAPI2AM(*iter, soundProp);
+ destination.push_back(soundProp);
+ }
+}
+
+void CAmConvertCAPIVector2AM(const std::vector<am_gen::am_ConnectionFormat_e> & source, std::vector<am::am_ConnectionFormat_e> & destination)
+{
+ destination.clear();
+ for(std::vector<am_gen::am_ConnectionFormat_e>::const_iterator iter = source.begin(); iter!=source.end(); iter++)
+ destination.push_back(static_cast<am::am_ConnectionFormat_e>(*iter));
+}
+
+
+
+void CAmConvertCAPI2AM(const am_gen::sourceData_s & source, am::am_Source_s & destination)
+{
+ destination.sourceID = source.sourceID;
+ destination.domainID = source.domainID;
+ destination.name = source.name;
+ destination.sourceClassID = source.sourceClassID;
+ destination.sourceState = static_cast<am::am_SourceState_e>(source.sourceState);
+ destination.volume = source.volume;
+ destination.visible = source.visible;
+ CAmConvertCAPI2AM(source.available, destination.available);
+ destination.interruptState = static_cast<am::am_InterruptState_e>(source.interruptState);
+ CAmConvertCAPIVector2AM(source.listSoundProperties, destination.listSoundProperties);
+ CAmConvertCAPIVector2AM(source.listConnectionFormats, destination.listConnectionFormats);
+ CAmConvertCAPIVector2AM(source.listMainSoundProperties, destination.listMainSoundProperties);
+ CAmConvertCAPIVector2AM(source.listNotificationConfigurations, destination.listNotificationConfigurations);
+ CAmConvertCAPIVector2AM(source.listMainNotificationConfigurations, destination.listMainNotificationConfigurations);
+}
+
+void CAmConvertCAPI2AM(const am_gen::sinkData_s & source, am::am_Sink_s & destination)
+{
+ destination.sinkID = source.sinkID;
+ destination.domainID = source.domainID;
+ destination.name = source.name;
+ destination.sinkClassID = source.sinkClassID;
+ destination.muteState = static_cast<am::am_MuteState_e>(source.muteState);
+ destination.volume = source.volume;
+ destination.visible = source.visible;
+ destination.mainVolume = source.mainVolume;
+ CAmConvertCAPI2AM(source.available, destination.available);
+ CAmConvertCAPIVector2AM(source.listSoundProperties, destination.listSoundProperties);
+ CAmConvertCAPIVector2AM(source.listConnectionFormats, destination.listConnectionFormats);
+ CAmConvertCAPIVector2AM(source.listMainSoundProperties, destination.listMainSoundProperties);
+ CAmConvertCAPIVector2AM(source.listNotificationConfigurations, destination.listNotificationConfigurations);
+ CAmConvertCAPIVector2AM(source.listMainNotificationConfigurations, destination.listMainNotificationConfigurations);
+}
+
+void CAmConvertCAPI2AM(const am_gen::am_Volumes_s & source, am::am_Volumes_s & destination)
+{
+ CAmConvertCAPI2AM(source.volumeID, destination.volumeID);
+ destination.volume = source.volume;
+ destination.time = source.time;
+ destination.volumeType = static_cast<am::am_VolumeType_e>(source.volumeType);
+ destination.ramp = static_cast<am::am_RampType_e>(source.ramp);
+}
+
+
+void CAmConvertCAPI2AM(const am_gen::crossfaderData_s & source, am::am_Crossfader_s & destination)
+{
+ destination.crossfaderID = source.crossfaderID;
+ destination.sinkID_A = source.sinkID_A;
+ destination.sinkID_B = source.sinkID_B;
+ destination.name = source.name;
+ destination.sourceID = source.sourceID;
+ destination.hotSink = static_cast<am::am_HotSink_e>(source.hotSink);
+}
+
+
+void CAmConvertCAPI2AM(const am_gen::am_Gateway_s & source, am::am_Gateway_s & destination)
+{
+ destination.sinkID = source.sinkID;
+ destination.gatewayID = source.gatewayID;
+ destination.name = source.name;
+ destination.sourceID = source.sourceID;
+ destination.domainSinkID = source.domainSinkID;
+ destination.domainSourceID = source.domainSourceID;
+ destination.controlDomainID = source.controlDomainID;
+ CAmConvertCAPIVector2AM(source.listSourceFormats, destination.listSourceFormats);
+ CAmConvertCAPIVector2AM(source.listSinkFormats, destination.listSinkFormats);
+ destination.convertionMatrix = source.convertionMatrix;
+}
+
+void CAmConvertCAPI2AM(const am_gen::am_EarlyData_u & source, am::am_EarlyData_u & destination)
+{
+ if(source.isType<am_gen::am_volume_t>())
+ {
+ am_volume_t value = static_cast<am_volume_t>(source.get<am_gen::am_volume_t>());
+ destination.volume = value;
+ }
+ else if(source.isType<am_gen::am_SoundProperty_s>())
+ {
+ am_gen::am_SoundProperty_s value = source.get<am_gen::am_SoundProperty_s>();
+ am_SoundProperty_s converted;
+ CAmConvertCAPI2AM(value, converted);
+ destination.soundProperty = converted;
+ }
+}
+
+void CAmConvertCAPI2AM(const am_gen::am_DataType_u & source, am::am_DataType_u & destination)
+{
+ if(source.isType<am_gen::am_sinkID_t>())
+ {
+ am_sinkID_t value = static_cast<am_sinkID_t>(source.get<am_gen::am_sinkID_t>());
+ destination.sink = value;
+ }
+ else if(source.isType<am_gen::am_sourceID_t>())
+ {
+ am_sourceID_t value = static_cast<am_sourceID_t>(source.get<am_gen::am_sourceID_t>());
+ destination.source = value;
+ }
+}
+
+void CAmConvertCAPI2AM(const am_gen::am_EarlyData_s & source, am::am_EarlyData_s & destination)
+{
+ CAmConvertCAPI2AM(source.data, destination.data);
+ CAmConvertCAPI2AM(source.sinksource, destination.sinksource);
+ destination.type = static_cast<am_EarlyDataType_e>(source.type);
+}
+
+
+void CAmConvertCAPI2AM(const am_gen::am_Availability_s & source, am_Availability_s & destination)
+{
+ destination.availability = static_cast<am_Availability_e>(source.availability);
+ destination.availabilityReason = static_cast<am_AvailabilityReason_e>(source.availabilityReason);
+}
+
+void CAmConvertAM2CAPI(const am_Availability_s & source, am_gen::am_Availability_s & destination)
+{
+ destination.availability = static_cast<am_gen::am_Availability_e>(source.availability);
+ destination.availabilityReason = static_cast<am_gen::am_AvailabilityReason_e>(source.availabilityReason);
+}
+
+void CAmConvertAM2CAPI(const am::am_SoundProperty_s & source, am_gen::am_SoundProperty_s & destination)
+{
+ destination.type = static_cast<am_gen::am_SoundPropertyType_e>(source.type);
+ destination.value = source.value;
+}
+
+void CAmConvertAM2CAPI(const am::am_NotificationConfiguration_s & source, am_gen::am_NotificationConfiguration_s & destination)
+{
+ destination.type = static_cast<am_gen::am_NotificationType_e>(source.type);
+ destination.status = static_cast<am_gen::am_NotificationStatus_e>(source.status);
+ destination.parameter = source.parameter;
+}
+
+void CAmConvertAM2CAPI(const am::am_Volumes_s & source, am_gen::am_Volumes_s & destination)
+{
+ if(source.volumeType == VT_SINK)
+ destination.volumeID = am_gen::am_DataType_u(static_cast<am_gen::am_sinkID_t>(source.volumeID.sink));
+ else if(source.volumeType == VT_SOURCE)
+ destination.volumeID = am_gen::am_DataType_u(static_cast<am_gen::am_sourceID_t>(source.volumeID.source));
+ destination.volumeType = static_cast<am_gen::am_VolumeType_e>(source.volumeType);
+ destination.volume = static_cast<am_gen::am_volume_t>(source.volume);
+ destination.ramp = static_cast<am_gen::am_RampType_e>(source.ramp);
+ destination.time = static_cast<am_gen::am_time_t>(source.time);
+}
+
+
+void CAmConvertAMVector2CAPI(const std::vector<am::am_Volumes_s> & source, std::vector<am_gen::am_Volumes_s> & destination)
+{
+ destination.clear();
+ for(std::vector<am::am_Volumes_s>::const_iterator iter = source.begin(); iter!=source.end(); iter++)
+ {
+ am_gen::am_Volumes_s volume;
+ CAmConvertAM2CAPI(*iter, volume);
+ destination.push_back(volume);
+ }
+}
+
+void CAmConvertAMVector2CAPI(const std::vector<am::am_SoundProperty_s> & source, std::vector<am_gen::am_SoundProperty_s> & destination)
+{
+ am_gen::am_SoundProperty_s soundProp;
+ destination.clear();
+ for(std::vector<am::am_SoundProperty_s>::const_iterator iter = source.begin(); iter!=source.end(); iter++)
+ {
+ CAmConvertAM2CAPI(*iter, soundProp);
+ destination.push_back(soundProp);
+ }
+}
diff --git a/PluginRoutingInterfaceCAPI/src/CAmRoutingService.cpp b/PluginRoutingInterfaceCAPI/src/CAmRoutingService.cpp
new file mode 100644
index 0000000..c50cfed
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/src/CAmRoutingService.cpp
@@ -0,0 +1,435 @@
+/**
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+#include <memory>
+#include <assert.h>
+#include <algorithm>
+#include "CAmRoutingSenderCommon.h"
+#include "shared/CAmCommonAPIWrapper.h"
+#include "CAmRoutingService.h"
+
+
+namespace am {
+
+CAmRoutingService::CAmRoutingService():mpCAmCAPIWrapper(NULL), mpIAmRoutingReceive(NULL), mpLookpData(NULL), mNumberDomains(0), mHandle(0), mReady(false) {
+ // TODO Auto-generated constructor stub
+
+}
+
+CAmRoutingService::CAmRoutingService(IAmRoutingReceive *aReceiver, CAmLookupData* aLookpData, CAmCommonAPIWrapper *aCAPIWrapper):
+ mpCAmCAPIWrapper(aCAPIWrapper), mpIAmRoutingReceive(aReceiver), mpLookpData(aLookpData), mNumberDomains(0), mHandle(0), mReady(false) {
+ // TODO Auto-generated constructor stub
+
+}
+
+CAmRoutingService::~CAmRoutingService() {
+ // TODO Auto-generated destructor stub
+}
+
+void CAmRoutingService::ackConnect(uint16_t handle, am_gen::am_connectionID_t connectionID, uint16_t error) {
+ assert(mpIAmRoutingReceive);
+ assert(mpLookpData);
+ am_Handle_s handle_s;
+ handle_s.handle = handle;
+ handle_s.handleType = H_CONNECT;
+ mpIAmRoutingReceive->ackConnect(handle_s, static_cast<am_connectionID_t>(connectionID), static_cast<am_Error_e>(error));
+ mpLookpData->removeHandle(handle);
+}
+
+void CAmRoutingService::ackDisconnect(uint16_t handle, am_gen::am_connectionID_t connectionID, uint16_t error) {
+ assert(mpIAmRoutingReceive);
+ assert(mpLookpData);
+ am_Handle_s handle_s;
+ handle_s.handle = handle;
+ handle_s.handleType = H_DISCONNECT;
+ mpIAmRoutingReceive->ackDisconnect(handle_s, static_cast<am_connectionID_t>(connectionID), static_cast<am_Error_e>(error));
+ mpLookpData->removeHandle(handle);
+ //todo: Check whether the connection should be removed here!
+ mpLookpData->removeConnectionLookup(connectionID);
+}
+
+void CAmRoutingService::ackSetSinkVolume(uint16_t handle, am_gen::am_volume_t volume, uint16_t error) {
+ assert(mpIAmRoutingReceive);
+ assert(mpLookpData);
+ am_Handle_s handle_s;
+ handle_s.handle = handle;
+ handle_s.handleType = H_SETSINKVOLUME;
+ mpIAmRoutingReceive->ackSetSinkVolumeChange(handle_s, volume, static_cast<am_Error_e>(error));
+ mpLookpData->removeHandle(handle);
+}
+
+void CAmRoutingService::ackSetSourceVolume(uint16_t handle, am_gen::am_volume_t volume, uint16_t error) {
+ assert(mpIAmRoutingReceive);
+ assert(mpLookpData);
+ am_Handle_s handle_s;
+ handle_s.handle = handle;
+ handle_s.handleType = H_SETSOURCEVOLUME;
+ mpIAmRoutingReceive->ackSetSourceVolumeChange(handle_s, volume, static_cast<am_Error_e>(error));
+ mpLookpData->removeHandle(handle);
+}
+
+void CAmRoutingService::ackSetSourceState(uint16_t handle, uint16_t error) {
+ assert(mpIAmRoutingReceive);
+ assert(mpLookpData);
+ am_Handle_s handle_s;
+ handle_s.handle = handle;
+ handle_s.handleType = H_SETSOURCESTATE;
+ mpIAmRoutingReceive->ackSetSourceState(handle_s,static_cast<am_Error_e>(error));
+ mpLookpData->removeHandle(handle);
+}
+
+void CAmRoutingService::ackSetSinkSoundProperties(uint16_t handle, uint16_t error) {
+ assert(mpIAmRoutingReceive);
+ assert(mpLookpData);
+ am_Handle_s handle_s;
+ handle_s.handle = handle;
+ handle_s.handleType = H_SETSINKSOUNDPROPERTIES;
+ mpIAmRoutingReceive->ackSetSinkSoundProperties(handle_s, static_cast<am_Error_e>(error));
+ mpLookpData->removeHandle(handle);
+}
+
+void CAmRoutingService::ackSetSinkSoundProperty(uint16_t handle, uint16_t error) {
+ assert(mpIAmRoutingReceive);
+ assert(mpLookpData);
+ am_Handle_s handle_s;
+ handle_s.handle = handle;
+ handle_s.handleType = H_SETSINKSOUNDPROPERTY;
+ mpIAmRoutingReceive->ackSetSinkSoundProperty(handle_s, static_cast<am_Error_e>(error));
+ mpLookpData->removeHandle(handle);
+}
+
+void CAmRoutingService::ackSetSourceSoundProperties(uint16_t handle, uint16_t error) {
+ assert(mpIAmRoutingReceive);
+ assert(mpLookpData);
+ am_Handle_s handle_s;
+ handle_s.handle = handle;
+ handle_s.handleType = H_SETSOURCESOUNDPROPERTIES;
+ mpIAmRoutingReceive->ackSetSourceSoundProperties(handle_s, static_cast<am_Error_e>(error));
+ mpLookpData->removeHandle(handle);
+}
+
+void CAmRoutingService::ackSetSourceSoundProperty(uint16_t handle, uint16_t error) {
+ assert(mpIAmRoutingReceive);
+ assert(mpLookpData);
+ am_Handle_s handle_s;
+ handle_s.handle = handle;
+ handle_s.handleType = H_SETSOURCESOUNDPROPERTY;
+ mpIAmRoutingReceive->ackSetSourceSoundProperty(handle_s, static_cast<am_Error_e>(error));
+ mpLookpData->removeHandle(handle);
+}
+
+void CAmRoutingService::ackCrossFading(uint16_t handle, am_gen::am_HotSink_e hotSink, am_gen::am_Error_e returnError) {
+ assert(mpIAmRoutingReceive);
+ assert(mpLookpData);
+ am_Handle_s handle_s;
+ handle_s.handle = handle;
+ handle_s.handleType = H_CROSSFADE;
+ mpIAmRoutingReceive->ackCrossFading(handle_s, static_cast<am_HotSink_e>(hotSink), static_cast<am_Error_e>(returnError));
+ mpLookpData->removeHandle(handle);
+}
+
+void CAmRoutingService::ackSourceVolumeTick(uint16_t handle, am_gen::am_sourceID_t source, am_gen::am_volume_t volume) {
+ assert(mpIAmRoutingReceive);
+ assert(mpLookpData);
+ am_Handle_s handle_s;
+ handle_s.handle = handle;
+ handle_s.handleType = H_SETSOURCEVOLUME;
+ mpIAmRoutingReceive->ackSourceVolumeTick(handle_s, source, volume);
+}
+
+void CAmRoutingService::ackSinkVolumeTick(uint16_t handle, am_gen::am_sinkID_t sink, am_gen::am_volume_t volume) {
+ assert(mpIAmRoutingReceive);
+ am_Handle_s handle_s;
+ handle_s.handle = handle;
+ handle_s.handleType = H_SETSINKVOLUME;
+ mpIAmRoutingReceive->ackSinkVolumeTick(handle_s, sink, volume);
+}
+
+void CAmRoutingService::peekDomain(std::string name, am_gen::am_domainID_t& domainID, am_gen::am_Error_e& error) {
+ assert(mpIAmRoutingReceive);
+ error = static_cast<am_gen::am_Error_e>(mpIAmRoutingReceive->peekDomain(name, domainID));
+}
+
+void CAmRoutingService::registerDomain(am_gen::am_Domain_s domainData, std::string returnBusname, std::string, std::string returnInterface, am_gen::am_domainID_t& domainID, am_gen::am_Error_e& error) {
+ assert(mpIAmRoutingReceive);
+ assert(mpLookpData);
+ assert(mpCAmCAPIWrapper);
+ am_Domain_s converted;
+ CAmConvertCAPI2AM(domainData, converted);
+ converted.busname = CAmLookupData::BUS_NAME;
+ am_Error_e resultCode = mpIAmRoutingReceive->registerDomain(converted, domainID);
+ error = static_cast<am_gen::am_Error_e>(resultCode);
+ if(E_OK==resultCode)
+ {
+ std::shared_ptr<CommonAPI::Factory> factory = mpCAmCAPIWrapper->factory();
+ std::shared_ptr<RoutingSenderProxy<>> shpSenderProxy = factory->buildProxy<RoutingSenderProxy>(returnBusname, returnInterface , "local");
+ mpLookpData->addDomainLookup(domainID, shpSenderProxy);
+ }
+}
+
+void CAmRoutingService::deregisterDomain(am_gen::am_domainID_t domainID, am_gen::am_Error_e& returnError) {
+ assert(mpIAmRoutingReceive);
+ assert(mpLookpData);
+ returnError = static_cast<am_gen::am_Error_e>(mpIAmRoutingReceive->deregisterDomain(domainID));
+ if(am_gen::am_Error_e::E_OK==returnError)
+ mpLookpData->removeDomainLookup(domainID);
+}
+
+void CAmRoutingService::registerGateway(am_gen::am_Gateway_s gatewayData, am_gen::am_gatewayID_t& gatewayID, am_gen::am_Error_e& error) {
+ assert(mpIAmRoutingReceive);
+ am_Gateway_s converted;
+ CAmConvertCAPI2AM(gatewayData, converted);
+ error = static_cast<am_gen::am_Error_e>(mpIAmRoutingReceive->registerGateway(converted, gatewayID));
+}
+
+void CAmRoutingService::deregisterGateway(am_gen::am_gatewayID_t gatewayID, am_gen::am_Error_e& returnError) {
+ returnError = static_cast<am_gen::am_Error_e>(mpIAmRoutingReceive->deregisterGateway(gatewayID));
+}
+
+void CAmRoutingService::peekSink(std::string name, am_gen::am_sinkID_t& sinkID, am_gen::am_Error_e& error) {
+ assert(mpIAmRoutingReceive);
+ error = static_cast<am_gen::am_Error_e>(mpIAmRoutingReceive->peekSink(name, sinkID));
+}
+
+void CAmRoutingService::registerSink(am_gen::sinkData_s sinkData, am_gen::am_sinkID_t& sinkID, am_gen::am_Error_e& error) {
+ assert(mpIAmRoutingReceive);
+ assert(mpLookpData);
+ am_Sink_s converted;
+ CAmConvertCAPI2AM(sinkData, converted);
+ am_Error_e result = mpIAmRoutingReceive->registerSink(converted, sinkID);
+ error = static_cast<am_gen::am_Error_e>(result);
+ if(E_OK==result)
+ mpLookpData->addSinkLookup(sinkID, converted.domainID);
+}
+
+void CAmRoutingService::deregisterSink(am_gen::am_sinkID_t sinkID, am_gen::am_Error_e& returnError) {
+ assert(mpIAmRoutingReceive);
+ assert(mpLookpData);
+ returnError = static_cast<am_gen::am_Error_e>(mpIAmRoutingReceive->deregisterSink(sinkID));
+ if(returnError==am_gen::am_Error_e::E_OK)
+ mpLookpData->removeSinkLookup(sinkID);
+}
+
+void CAmRoutingService::peekSource(std::string name, am_gen::am_sourceID_t& sourceID, am_gen::am_Error_e& error) {
+ assert(mpIAmRoutingReceive);
+ error = static_cast<am_gen::am_Error_e>(mpIAmRoutingReceive->peekSource(name, sourceID));
+}
+
+void CAmRoutingService::registerSource(am_gen::sourceData_s sourceData, am_gen::am_sourceID_t& sourceID, am_gen::am_Error_e& error) {
+ assert(mpIAmRoutingReceive);
+ assert(mpLookpData);
+ am_Source_s converted;
+ CAmConvertCAPI2AM(sourceData, converted);
+ error = static_cast<am_gen::am_Error_e>(mpIAmRoutingReceive->registerSource(converted, sourceID));
+ if(error==am_gen::am_Error_e::E_OK)
+ mpLookpData->addSourceLookup(sourceID, sourceData.domainID);
+}
+
+void CAmRoutingService::deregisterSource(am_gen::am_sourceID_t sourceID, am_gen::am_Error_e& returnError) {
+ assert(mpIAmRoutingReceive);
+ assert(mpLookpData);
+ returnError = static_cast<am_gen::am_Error_e>(mpIAmRoutingReceive->deregisterSource(sourceID));
+ if(returnError==am_gen::am_Error_e::E_OK)
+ mpLookpData->removeSourceLookup(sourceID);
+}
+
+void CAmRoutingService::registerCrossfader(am_gen::crossfaderData_s crossfaderData, am_gen::am_crossfaderID_t& crossfaderID, am_gen::am_Error_e& error) {
+ assert(mpIAmRoutingReceive);
+ am_Crossfader_s converted;
+ CAmConvertCAPI2AM(crossfaderData, converted);
+ error = static_cast<am_gen::am_Error_e>(mpIAmRoutingReceive->registerCrossfader(converted, crossfaderID));
+ if(error==am_gen::am_Error_e::E_OK)
+ mpLookpData->addCrossfaderLookup(crossfaderID, crossfaderData.sourceID);
+}
+
+void CAmRoutingService::deregisterCrossfader(am_gen::am_crossfaderID_t crossfaderID, am_gen::am_Error_e& returnError) {
+ assert(mpIAmRoutingReceive);
+ returnError = static_cast<am_gen::am_Error_e>(mpIAmRoutingReceive->deregisterCrossfader(crossfaderID));
+ if(returnError==am_gen::am_Error_e::E_OK)
+ mpLookpData->removeCrossfaderLookup(crossfaderID);
+}
+
+void CAmRoutingService::peekSourceClassID(std::string name, am_gen::am_sourceClass_t& sourceClassID, am_gen::am_Error_e& error) {
+ error = static_cast<am_gen::am_Error_e>(mpIAmRoutingReceive->peekSourceClassID(name, sourceClassID));
+}
+
+void CAmRoutingService::peekSinkClassID(std::string name, am_gen::am_sinkClass_t& sinkClassID, am_gen::am_Error_e& error) {
+ assert(mpIAmRoutingReceive);
+ error = static_cast<am_gen::am_Error_e>(mpIAmRoutingReceive->peekSinkClassID(name, sinkClassID));
+}
+
+void CAmRoutingService::hookInterruptStatusChange(am_gen::am_sourceID_t sourceID, uint16_t interruptState) {
+ assert(mpIAmRoutingReceive);
+ mpIAmRoutingReceive->hookInterruptStatusChange(sourceID, static_cast<am_InterruptState_e>(interruptState));
+}
+
+void CAmRoutingService::hookDomainRegistrationComplete(am_gen::am_domainID_t domainID) {
+ assert(mpIAmRoutingReceive != NULL);
+ mpIAmRoutingReceive->hookDomainRegistrationComplete(domainID);
+}
+
+void CAmRoutingService::hookSinkAvailablityStatusChange(am_gen::am_sinkID_t sinkID, am_gen::am_Availability_s availability) {
+ assert(mpIAmRoutingReceive);
+ am_Availability_s am_avialabilty;
+ CAmConvertCAPI2AM(availability, am_avialabilty);
+ mpIAmRoutingReceive->hookSinkAvailablityStatusChange(sinkID, am_avialabilty);
+}
+
+void CAmRoutingService::hookSourceAvailablityStatusChange(am_gen::am_sourceID_t sourceID, am_gen::am_Availability_s availability) {
+ assert(mpIAmRoutingReceive);
+ am_Availability_s am_availabilty;
+ CAmConvertCAPI2AM(availability, am_availabilty);
+ mpIAmRoutingReceive->hookSourceAvailablityStatusChange(sourceID, am_availabilty);
+}
+
+void CAmRoutingService::hookDomainStateChange(am_gen::am_domainID_t domainID, am_gen::am_DomainState_e domainState) {
+ assert(mpIAmRoutingReceive);
+ am_DomainState_e am_domainState = static_cast<am_DomainState_e>(domainState);
+ mpIAmRoutingReceive->hookDomainStateChange(domainID, am_domainState);
+}
+
+void CAmRoutingService::hookTimingInformationChanged(am_gen::am_connectionID_t connectionID, int16_t delay) {
+ assert(mpIAmRoutingReceive);
+ mpIAmRoutingReceive->hookTimingInformationChanged(connectionID, delay);
+}
+
+void CAmRoutingService::sendChangedData(am_gen::am_EarlyData_l earlyData_volumes, am_gen::am_EarlyData_l earlyData_soundproperties) {
+
+ assert(mpIAmRoutingReceive);
+ std::vector<am_EarlyData_s> earlyData;
+ auto func = [&](const am_gen::am_EarlyData_s &refObject)
+ {
+ am_EarlyData_s object;
+ CAmConvertCAPI2AM(refObject, object);
+ earlyData.push_back(object);
+ };
+ std::for_each(earlyData_volumes.begin(), earlyData_volumes.end(), func);
+ std::for_each(earlyData_soundproperties.begin(), earlyData_soundproperties.end(), func);
+ mpIAmRoutingReceive->sendChangedData(earlyData);
+}
+
+void CAmRoutingService::gotReady(int16_t numberDomains, uint16_t handle)
+{
+ mReady=true;
+ mNumberDomains=numberDomains;
+ mHandle=handle;
+}
+
+void CAmRoutingService::gotRundown(int16_t numberDomains, uint16_t handle)
+{
+ mReady=false;
+ mNumberDomains=numberDomains;
+ mHandle=handle;
+}
+
+void CAmRoutingService::confirmRoutingReady(am_gen::am_domainID_t) {
+ mpIAmRoutingReceive->confirmRoutingReady(mHandle, E_OK);
+ mNumberDomains++;
+}
+
+void CAmRoutingService::confirmRoutingRundown(am_gen::am_domainID_t) {
+ assert(mpIAmRoutingReceive);
+ mpIAmRoutingReceive->confirmRoutingRundown(mHandle, E_OK);
+ mNumberDomains--;
+}
+
+void CAmRoutingService::updateGateway(am_gen::am_gatewayID_t gatewayID, am_gen::am_ConnectionFormat_L listSourceFormats, am_gen::am_ConnectionFormat_L listSinkFormats, am_gen::bool_L convertionMatrix) {
+
+ assert(mpIAmRoutingReceive);
+ std::vector<am_ConnectionFormat_e> destinationSourceConnectionFormats;
+ CAmConvertCAPIVector2AM(listSourceFormats, destinationSourceConnectionFormats);
+
+ std::vector<am_ConnectionFormat_e> destinationSinkConnectionFormats;
+ CAmConvertCAPIVector2AM(listSinkFormats, destinationSinkConnectionFormats);
+
+ mpIAmRoutingReceive->updateGateway(gatewayID, destinationSourceConnectionFormats, destinationSinkConnectionFormats, convertionMatrix);
+}
+
+void CAmRoutingService::updateSink(am_gen::am_sinkID_t sinkID, am_gen::am_sinkClass_t sinkClassID, am_gen::am_SoundProperty_L listSoundProperties, am_gen::am_ConnectionFormat_L listConnectionFormats, am_gen::am_MainSoundProperty_L listMainSoundProperties) {
+ assert(mpIAmRoutingReceive);
+ std::vector<am_SoundProperty_s> dstListSoundProperties;
+ CAmConvertCAPIVector2AM(listSoundProperties, dstListSoundProperties);
+ std::vector<am_ConnectionFormat_e> dstListSinkConnectionFormats;
+ CAmConvertCAPIVector2AM(listConnectionFormats, dstListSinkConnectionFormats);
+ std::vector<am_MainSoundProperty_s> dstListMainSoundProperties;
+ CAmConvertCAPIVector2AM(listMainSoundProperties, dstListMainSoundProperties);
+ mpIAmRoutingReceive->updateSink( sinkID, sinkClassID, dstListSoundProperties,dstListSinkConnectionFormats,dstListMainSoundProperties);
+}
+
+void CAmRoutingService::updateSource(am_gen::am_sourceID_t sourceID, am_gen::am_sourceClass_t sourceClassID, am_gen::am_SoundProperty_L listSoundProperties, am_gen::am_ConnectionFormat_L listConnectionFormats, am_gen::am_MainSoundProperty_L listMainSoundProperties) {
+ assert(mpIAmRoutingReceive);
+ std::vector<am_SoundProperty_s> dstListSoundProperties;
+ CAmConvertCAPIVector2AM(listSoundProperties, dstListSoundProperties);
+ std::vector<am_ConnectionFormat_e> dstListSinkConnectionFormats;
+ CAmConvertCAPIVector2AM(listConnectionFormats, dstListSinkConnectionFormats);
+ std::vector<am_MainSoundProperty_s> dstListMainSoundProperties;
+ CAmConvertCAPIVector2AM(listMainSoundProperties, dstListMainSoundProperties);
+ mpIAmRoutingReceive->updateSource( sourceID, sourceClassID, dstListSoundProperties,dstListSinkConnectionFormats,dstListMainSoundProperties);
+}
+
+void CAmRoutingService::ackSetVolumes(uint16_t handle, am_gen::am_Volumes_l listVolumes, uint16_t error) {
+ assert(mpIAmRoutingReceive);
+ am_Handle_s handle_s;
+ handle_s.handle = handle;
+ handle_s.handleType = H_SETVOLUMES;
+ std::vector<am_Volumes_s> list;
+ CAmConvertCAPIVector2AM(listVolumes, list);
+ am_Error_e amError = static_cast<am_Error_e>(error);
+ mpIAmRoutingReceive->ackSetVolumes(handle_s, list, amError);
+ mpLookpData->removeHandle(handle);
+}
+
+void CAmRoutingService::ackSinkNotificationConfiguration(uint16_t handle, uint16_t error) {
+ assert(mpIAmRoutingReceive);
+ assert(mpLookpData);
+ am_Handle_s myhandle;
+ myhandle.handleType = H_CONNECT;
+ myhandle.handle = handle;
+ am_Error_e amError = static_cast<am_Error_e>(error);
+ mpIAmRoutingReceive->ackSinkNotificationConfiguration(myhandle, amError);
+ mpLookpData->removeHandle(handle);
+}
+
+void CAmRoutingService::ackSourceNotificationConfiguration(uint16_t handle, uint16_t error) {
+ assert(mpIAmRoutingReceive);
+ assert(mpLookpData);
+ am_Handle_s myhandle;
+ myhandle.handleType = H_CONNECT;
+ myhandle.handle = handle;
+ am_Error_e amError = static_cast<am_Error_e>(error);
+ mpIAmRoutingReceive->ackSourceNotificationConfiguration(myhandle, amError);
+ mpLookpData->removeHandle(handle);
+}
+
+void CAmRoutingService::hookSinkNotificationDataChange(am_gen::am_sinkID_t sinkID, am_gen::notificationPayload_s payload) {
+ assert(mpIAmRoutingReceive);
+ am_NotificationPayload_s converted;
+ CAmConvertCAPI2AM(payload, converted);
+ mpIAmRoutingReceive->hookSinkNotificationDataChange(sinkID, converted);
+}
+
+void CAmRoutingService::hookSourceNotificationDataChange(am_gen::am_sourceID_t sourceID, am_gen::notificationPayload_s payload) {
+ assert(mpIAmRoutingReceive);
+ am_NotificationPayload_s converted;
+ CAmConvertCAPI2AM(payload, converted);
+ mpIAmRoutingReceive->hookSourceNotificationDataChange(sourceID, converted);
+}
+
+void CAmRoutingService::getRoutingReadyState(bool& readyState) {
+ readyState = mReady;
+}
+
+} /* namespace am */
diff --git a/PluginRoutingInterfaceCAPI/test/CAmRoutingInterfaceCAPITests.cpp b/PluginRoutingInterfaceCAPI/test/CAmRoutingInterfaceCAPITests.cpp
new file mode 100644
index 0000000..5f1069e
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/test/CAmRoutingInterfaceCAPITests.cpp
@@ -0,0 +1,2269 @@
+/**
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
+#include <iostream>
+#include <fstream>
+#include <sstream>
+#include <algorithm>
+#include <string>
+#include <vector>
+#include <set>
+#include <sys/time.h>
+#include <CommonAPI/CommonAPI.h>
+#include <org/genivi/audiomanager/am_gen.h>
+#include "CAmRoutingInterfaceCAPITests.h"
+#include "TAmPluginTemplate.h"
+#include "shared/CAmDltWrapper.h"
+#include "../include/CAmRoutingSenderCAPI.h"
+#include "../include/CAmRoutingSenderCommon.h"
+#include "CAmRoutingSenderService.h"
+#include "IAmRoutingSenderBackdoor.h"
+
+using namespace am;
+using namespace org::genivi::audiomanager;
+using namespace CommonAPI;
+using namespace testing;
+
+static CAmTestsEnvironment* env;
+
+/**
+ * Main thread synchronization
+ */
+pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
+pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+
+/**
+ * Common-API connection thread synchronization
+ */
+pthread_cond_t condPxy = PTHREAD_COND_INITIALIZER;
+pthread_mutex_t mutexPxy = PTHREAD_MUTEX_INITIALIZER;
+
+/**
+ * Proxy initialization thread synchronization
+ */
+pthread_cond_t condSer = PTHREAD_COND_INITIALIZER;
+pthread_mutex_t mutexSer = PTHREAD_MUTEX_INITIALIZER;
+
+
+#define TEST_ID_1 102
+#define TEST_ID_2 103
+
+/**
+ * Initialize common-api and am sinks
+ */
+void initSink(am_gen::sinkData_s & newSink, am_Sink_s & newAmSink, const am_gen::am_domainID_t & domainID, const am_gen::am_sinkID_t & sinkID = 0)
+{
+ am_gen::am_MuteState_e muteState = am_gen::am_MuteState_e::MS_UNKNOWN;
+ am_gen::am_Availability_s available(am_gen::am_Availability_e::A_MAX, am_gen::am_AvailabilityReason_e::AR_MAX);
+ am_gen::am_SoundProperty_L listSoundProperties;
+ listSoundProperties.push_back(am_gen::am_SoundProperty_s(am_gen::am_SoundPropertyType_e::SP_INTERR_OVERLAYID, 100));
+ listSoundProperties.push_back(am_gen::am_SoundProperty_s(am_gen::am_SoundPropertyType_e::SP_EXAMPLE_BASS, 101));
+ listSoundProperties.push_back(am_gen::am_SoundProperty_s(am_gen::am_SoundPropertyType_e::SP_MAX, 102));
+ am_gen::am_ConnectionFormat_L listConnectionFormats;
+ listConnectionFormats.push_back(am_gen::am_ConnectionFormat_e::CF_MAX);
+ am_gen::am_MainSoundProperty_L listMainSoundProperties;
+ listMainSoundProperties.push_back(am_gen::am_MainSoundProperty_s(am_gen::am_MainSoundPropertyType_e::MSP_MAX, 100));
+ am_gen::am_NotificationConfiguration_L listMainNotificationConfigurations;
+ listMainNotificationConfigurations.push_back(am_gen::am_NotificationConfiguration_s(am_gen::am_NotificationType_e::NT_MAX, am_gen::am_NotificationStatus_e::NS_MAX, 100));
+ am_gen::am_NotificationConfiguration_L listNotificationConfigurations;
+ listNotificationConfigurations.push_back(am_gen::am_NotificationConfiguration_s(am_gen::am_NotificationType_e::NT_MAX, am_gen::am_NotificationStatus_e::NS_MAX, 100));
+
+ am_gen::sinkData_s sink(sinkID, "name", domainID, 104, 50, true, available, muteState, 50,
+ listSoundProperties, listConnectionFormats, listMainSoundProperties, listMainNotificationConfigurations, listNotificationConfigurations);
+ newSink = sink;
+ CAmConvertCAPI2AM(sink, newAmSink);
+}
+
+/**
+ * Initialize common-api and am sources
+ */
+void initSource(am_gen::sourceData_s & newSource, am_Source_s & newAmSource, const am_gen::am_domainID_t & domainID, const am_gen::am_sourceID_t & sourceID = 0)
+{
+ am_gen::am_SourceState_e srcState = am_gen::am_SourceState_e::SS_MAX;
+ am_gen::am_Availability_s available(am_gen::am_Availability_e::A_MAX, am_gen::am_AvailabilityReason_e::AR_MAX);
+ am_gen::am_SoundProperty_L listSoundProperties;
+ listSoundProperties.push_back(am_gen::am_SoundProperty_s(am_gen::am_SoundPropertyType_e::SP_INTERR_OVERLAYID, 100));
+ listSoundProperties.push_back(am_gen::am_SoundProperty_s(am_gen::am_SoundPropertyType_e::SP_EXAMPLE_BASS, 101));
+ listSoundProperties.push_back(am_gen::am_SoundProperty_s(am_gen::am_SoundPropertyType_e::SP_MAX, 102));
+ am_gen::am_ConnectionFormat_L listConnectionFormats;
+ listConnectionFormats.push_back(am_gen::am_ConnectionFormat_e::CF_MAX);
+ am_gen::am_MainSoundProperty_L listMainSoundProperties;
+ listMainSoundProperties.push_back(am_gen::am_MainSoundProperty_s(am_gen::am_MainSoundPropertyType_e::MSP_MAX, 100));
+ am_gen::am_NotificationConfiguration_L listMainNotificationConfigurations;
+ listMainNotificationConfigurations.push_back(am_gen::am_NotificationConfiguration_s(am_gen::am_NotificationType_e::NT_MAX, am_gen::am_NotificationStatus_e::NS_MAX, 100));
+ am_gen::am_NotificationConfiguration_L listNotificationConfigurations;
+ listNotificationConfigurations.push_back(am_gen::am_NotificationConfiguration_s(am_gen::am_NotificationType_e::NT_MAX, am_gen::am_NotificationStatus_e::NS_MAX, 100));
+
+ am_gen::sourceData_s source(sourceID, domainID, "name", 104, srcState, 50, true, available, am_gen::am_InterruptState_e::IS_MAX,
+ listSoundProperties, listConnectionFormats, listMainSoundProperties, listMainNotificationConfigurations, listNotificationConfigurations);
+ newSource = source;
+ CAmConvertCAPI2AM(source, newAmSource);
+}
+
+/**
+ * Initialize common-api and am crossfaders
+ */
+void initCrossfader(am_gen::crossfaderData_s & newCrossfader, am_Crossfader_s & newAmCrossfader, const am_gen::am_crossfaderID_t & crossfaderID = 0)
+{
+ am_gen::crossfaderData_s crossfader(crossfaderID, "name", TEST_ID_1, TEST_ID_2, TEST_ID_1, am_gen::am_HotSink_e::HS_MAX);
+ CAmConvertCAPI2AM(crossfader, newAmCrossfader);
+ newCrossfader = crossfader;
+}
+
+/**
+ * Client thread where the proxy and the routing test domain service run
+ */
+void* run_client(void*)
+{
+ CAmSocketHandler socketHandler;
+ CAmTestCAPIWrapper wrapper(&socketHandler);
+ env->mSocketHandlerClient = &socketHandler;
+ std::shared_ptr<CommonAPI::Factory> factory = wrapper.factory();
+
+ env->mProxy = factory->buildProxy<RoutingInterfaceProxy>(CAmRoutingSenderCAPI::ROUTING_INTERFACE_SERVICE);
+ env->mProxy->getProxyStatusEvent().subscribe(std::bind(&CAmTestsEnvironment::onServiceStatusEvent,env,std::placeholders::_1));
+
+ env->mDomainService = std::make_shared<CAmRoutingSenderService>(&wrapper, env->mProxy);
+
+ if( false == wrapper.registerStub(env->mDomainService, CAmRoutingSenderService::ROUTING_SENDER_SERVICE) )
+ {
+ printf("\n Can't register service -> %s \n", CAmRoutingSenderService::ROUTING_SENDER_SERVICE);
+ logInfo("Can't register service -> ", CAmRoutingSenderService::ROUTING_SENDER_SERVICE);
+ }
+
+ pthread_mutex_lock(&mutexSer);
+ env->mIsProxyInitilized = true;
+ pthread_mutex_unlock(&mutexSer);
+ pthread_cond_signal(&condSer);
+
+ socketHandler.start_listenting();
+
+//Cleanup
+ env->mProxy.reset();
+ env->mSocketHandlerClient = NULL;
+
+ return (NULL);
+}
+
+/**
+ * Service thread for the routing plugin
+ */
+void* run_service(void*)
+{
+ CAmSocketHandler socketHandler;
+ CAmTestCAPIWrapper wrapper(&socketHandler);
+ CAmRoutingSenderCAPI plugin(&wrapper);
+ env->mpPlugin = &plugin;
+ env->mSocketHandlerService = &socketHandler;
+ MockIAmRoutingReceive mock;
+ env->mpRoutingReceive = &mock;
+ if(plugin.startupInterface(env->mpRoutingReceive)!=E_OK)
+ {
+ logError("CommandSendInterface can't start!");
+ }
+ else
+ {
+ plugin.setRoutingReady(10);
+ socketHandler.start_listenting();
+ plugin.setRoutingRundown(10);
+ plugin.tearDownInterface(env->mpRoutingReceive);
+ }
+ //Cleanup
+ env->mpRoutingReceive = NULL;
+ env->mpPlugin = NULL;
+ env->mSocketHandlerClient = NULL;
+
+ return (NULL);
+}
+
+/**
+ * Helper thread that listens for signals from another threads in order to synchronize them.
+ * This thread starts actually the unit tests.
+ */
+void* run_listener(void*)
+{
+ pthread_mutex_lock(&mutexSer);
+ while (env->mIsProxyInitilized==false)
+ {
+ std::cout << "\n\r Intialize proxy..\n\r" ;
+ pthread_cond_wait(&condSer, &mutexSer);
+ }
+ pthread_mutex_unlock(&mutexSer);
+
+ time_t start = time(0);
+ time_t now = start;
+ pthread_mutex_lock(&mutexPxy);
+ while ( env->mIsServiceAvailable==false && now-start <= 15 )
+ {
+ std::cout << " Waiting for proxy..\n\r" ;
+ struct timespec ts = { 0, 0 };
+ clock_gettime(CLOCK_REALTIME, &ts);
+ ts.tv_sec += 5;
+ pthread_cond_timedwait(&condPxy, &mutexPxy, &ts);
+ now = time(0);
+ }
+ pthread_mutex_unlock(&mutexPxy);
+
+ pthread_cond_signal(&cond);
+
+ return NULL;
+}
+
+
+CAmRoutingInterfaceCAPITests::CAmRoutingInterfaceCAPITests()
+{
+
+}
+
+CAmRoutingInterfaceCAPITests::~CAmRoutingInterfaceCAPITests()
+{
+
+}
+
+void CAmRoutingInterfaceCAPITests::SetUp()
+{
+ ::testing::GTEST_FLAG(throw_on_failure) = false;
+}
+
+void CAmRoutingInterfaceCAPITests::TearDown()
+{
+ ::testing::GTEST_FLAG(throw_on_failure) = true;
+}
+
+
+CAmRoutingSenderCAPITests::CAmRoutingSenderCAPITests()
+{
+
+}
+
+CAmRoutingSenderCAPITests::~CAmRoutingSenderCAPITests()
+{
+
+}
+
+void CAmRoutingSenderCAPITests::SetUp()
+{
+ ::testing::GTEST_FLAG(throw_on_failure) = false;
+}
+
+void CAmRoutingSenderCAPITests::TearDown()
+{
+ ::testing::GTEST_FLAG(throw_on_failure) = true;
+}
+
+int main(int argc, char **argv)
+{
+ ::testing::InitGoogleTest(&argc, argv);
+ ::testing::AddGlobalTestEnvironment(new CAmTestsEnvironment);
+ return RUN_ALL_TESTS();
+}
+
+CAmTestsEnvironment::CAmTestsEnvironment() :
+ mIsProxyInitilized(false),
+ mIsServiceAvailable(false),
+ mIsDomainAvailable(false),
+ mListenerThread(0),
+ mServicePThread(0),
+ mClientPThread(0),
+ mSocketHandlerService(NULL),
+ mSocketHandlerClient(NULL),
+ mpRoutingReceive(NULL),
+ mpPlugin(NULL),
+ mProxy(NULL),
+ mDomainService(NULL)
+{
+ env=this;
+ CAmDltWrapper::instance()->registerApp("capiTest", "capiTest");
+ pthread_create(&mListenerThread, NULL, run_listener, NULL);
+ pthread_create(&mServicePThread, NULL, run_service, NULL);
+ pthread_create(&mClientPThread, NULL, run_client, NULL);
+}
+
+CAmTestsEnvironment::~CAmTestsEnvironment()
+{
+
+}
+
+void CAmTestsEnvironment::SetUp()
+{
+ pthread_cond_wait(&cond, &mutex);
+}
+
+void CAmTestsEnvironment::TearDown()
+{
+ if(mSocketHandlerClient)
+ mSocketHandlerClient->exit_mainloop();
+ pthread_join(mClientPThread, NULL);
+
+ if(mSocketHandlerService)
+ mSocketHandlerService->exit_mainloop();
+ pthread_join(mServicePThread, NULL);
+ sleep(1);
+}
+
+void CAmTestsEnvironment::onServiceStatusEvent(const CommonAPI::AvailabilityStatus& serviceStatus)
+{
+ std::stringstream avail;
+ avail << "(" << static_cast<int>(serviceStatus) << ")";
+
+ logInfo("Service Status changed to ", avail.str());
+ std::cout << std::endl << "Service Status changed to " << avail.str() << std::endl;
+ pthread_mutex_lock(&mutexPxy);
+ mIsServiceAvailable = (serviceStatus==CommonAPI::AvailabilityStatus::AVAILABLE);
+ pthread_mutex_unlock(&mutexPxy);
+ pthread_cond_signal(&condPxy);
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, ClientStartupTest)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+MATCHER_P(IsHandleEqual, value, "") {
+ am_Handle_s & lh = arg;
+ return lh.handle == value.handle && lh.handleType == value.handleType;
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, ackConnect)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_gen::am_connectionID_t connectionID = TEST_ID_1;
+ am_Error_e error = E_OK;
+ am_Handle_s handle = {H_CONNECT, 20};
+ EXPECT_CALL(*env->mpRoutingReceive, ackConnect(IsHandleEqual(handle), connectionID, error)).Times(1);
+ env->mProxy->ackConnect(20, connectionID, error, callStatus);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, ackDisconnect)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_gen::am_connectionID_t connectionID = TEST_ID_1;
+ am_Error_e error = E_OK;
+ am_Handle_s handle = {H_DISCONNECT, 20};
+ EXPECT_CALL(*env->mpRoutingReceive, ackDisconnect(IsHandleEqual(handle), connectionID, error)).Times(1);
+ env->mProxy->ackDisconnect(20, connectionID, error, callStatus);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, ackSetSinkVolumeChange)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_Error_e error = E_OK;
+ am_volume_t volume = 50;
+ am_Handle_s handle = {H_SETSINKVOLUME, 20};
+ EXPECT_CALL(*env->mpRoutingReceive, ackSetSinkVolumeChange(IsHandleEqual(handle), volume, error)).Times(1);
+ env->mProxy->ackSetSinkVolume(20, volume, error, callStatus);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, ackSetSourceVolumeChange)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_Error_e error = E_OK;
+ am_volume_t volume = 50;
+ am_Handle_s handle = {H_SETSOURCEVOLUME, 20};
+ EXPECT_CALL(*env->mpRoutingReceive, ackSetSourceVolumeChange(IsHandleEqual(handle), volume, error)).Times(1);
+ env->mProxy->ackSetSourceVolume(20, volume, error, callStatus);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, ackSetSourceState)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_Error_e error = E_OK;
+ am_volume_t volume = 50;
+ am_Handle_s handle = {H_SETSOURCESTATE, 20};
+ EXPECT_CALL(*env->mpRoutingReceive, ackSetSourceState(IsHandleEqual(handle), error)).Times(1);
+ env->mProxy->ackSetSourceState(20, error, callStatus);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, ackSetSinkSoundProperties)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_Error_e error = E_OK;
+ am_volume_t volume = 50;
+ am_Handle_s handle = {H_SETSINKSOUNDPROPERTIES, 20};
+ EXPECT_CALL(*env->mpRoutingReceive, ackSetSinkSoundProperties(IsHandleEqual(handle), error)).Times(1);
+ env->mProxy->ackSetSinkSoundProperties(20, error, callStatus);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, ackSetSinkSoundProperty)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_Error_e error = E_OK;
+ am_volume_t volume = 50;
+ am_Handle_s handle = {H_SETSINKSOUNDPROPERTY, 20};
+ EXPECT_CALL(*env->mpRoutingReceive, ackSetSinkSoundProperty(IsHandleEqual(handle), error)).Times(1);
+ env->mProxy->ackSetSinkSoundProperty(20, error, callStatus);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, ackSetSourceSoundProperties)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_Error_e error = E_OK;
+ am_volume_t volume = 50;
+ am_Handle_s handle = {H_SETSOURCESOUNDPROPERTIES, 20};
+ EXPECT_CALL(*env->mpRoutingReceive, ackSetSourceSoundProperties(IsHandleEqual(handle), error)).Times(1);
+ env->mProxy->ackSetSourceSoundProperties(20, error, callStatus);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, ackSetSourceSoundProperty)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_Error_e error = E_OK;
+ am_volume_t volume = 50;
+ am_Handle_s handle = {H_SETSOURCESOUNDPROPERTY, 20};
+ EXPECT_CALL(*env->mpRoutingReceive, ackSetSourceSoundProperty(IsHandleEqual(handle), error)).Times(1);
+ env->mProxy->ackSetSourceSoundProperty(20, error, callStatus);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, ackCrossFading)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_Error_e error = E_OK;
+ am_HotSink_e hotSink = HS_UNKNOWN;
+ am_Handle_s handle = {H_CROSSFADE, 20};
+ EXPECT_CALL(*env->mpRoutingReceive, ackCrossFading(IsHandleEqual(handle), hotSink, error)).Times(1);
+ env->mProxy->ackCrossFading(20, static_cast<am_gen::am_HotSink_e>(hotSink), (am_gen::am_Error_e)error, callStatus);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, ackSourceVolumeTick)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_Error_e error = E_OK;
+ am_sourceID_t sourceID = TEST_ID_1;
+ am_Handle_s handle = {H_SETSOURCEVOLUME, 20};
+ EXPECT_CALL(*env->mpRoutingReceive, ackSourceVolumeTick(IsHandleEqual(handle), sourceID, error)).Times(1);
+ env->mProxy->ackSourceVolumeTick(20, sourceID, error, callStatus);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, ackSinkVolumeTick)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_Error_e error = E_OK;
+ am_sinkID_t sID = TEST_ID_1;
+ am_Handle_s handle = {H_SETSINKVOLUME, 20};
+ EXPECT_CALL(*env->mpRoutingReceive, ackSinkVolumeTick(IsHandleEqual(handle), sID, error)).Times(1);
+ env->mProxy->ackSinkVolumeTick(20, sID, error, callStatus);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+ACTION(actionRegister){
+ arg1=TEST_ID_1;
+}
+
+ACTION(actionPeekDomain){
+ arg1=TEST_ID_1;
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, peekDomain)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_gen::am_Error_e error = am_gen::am_Error_e::E_UNKNOWN;
+ std::string name("domain name");
+ am_gen::am_domainID_t domainID = 0;
+ ON_CALL(*env->mpRoutingReceive, peekDomain(_, _)).WillByDefault(Return(E_OK));
+ EXPECT_CALL(*env->mpRoutingReceive, peekDomain(name, _)).WillOnce(DoAll(actionPeekDomain(), Return(E_OK)));
+ env->mProxy->peekDomain(name, callStatus, domainID, error);
+ ASSERT_EQ( domainID, TEST_ID_1 );
+ ASSERT_EQ( error, am_gen::am_Error_e::E_OK );
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+MATCHER_P(IsDomainDataEqualTo, value, "") {
+ auto lh = arg;
+ return lh.domainID == value.domainID &&
+ lh.name == value.name &&
+ lh.nodename == value.nodename &&
+ lh.early == value.early &&
+ lh.complete == value.complete &&
+ lh.state == value.state;
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, registerDomain)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_gen::am_Error_e error = am_gen::am_Error_e::E_UNKNOWN;
+
+ std::string name("domain name");
+ std::string busname("busname");
+ std::string nodename("nodename");
+
+ am_gen::am_Domain_s domainData(0, name, busname, nodename, false, false, am_gen::am_DomainState_e::DS_CONTROLLED);
+ am::am_Domain_s amDomainData;
+ CAmConvertCAPI2AM(domainData, amDomainData);
+ am_gen:am_domainID_t domainID = 0;
+//If the result is E_OK, then the routing service will try to establish a connection with the domain via common-api.
+//For now we won't test common-api connection with the domain therefore E_ABORTED is returned.
+ ON_CALL(*env->mpRoutingReceive, registerDomain(_, _)).WillByDefault(Return(E_ABORTED));
+ EXPECT_CALL(*env->mpRoutingReceive, registerDomain(IsDomainDataEqualTo(amDomainData), _)).WillOnce(DoAll(actionRegister(), Return(E_ABORTED)));
+
+//example: [local:org.genivi.audiomanger.testdomaininterface:org.genivi.audiomanger]
+ env->mProxy->registerDomain(domainData,
+ "org.genivi.audiomanger", //(last part)
+ "",
+ "org.genivi.audiomanger.testdomaininterface", //(middle part)
+ callStatus,
+ domainID,
+ error);
+ ASSERT_EQ( domainID, TEST_ID_1 );
+ ASSERT_EQ( error, am_gen::am_Error_e::E_ABORTED );
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, deregisterDomain)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_gen::am_Error_e error = am_gen::am_Error_e::E_UNKNOWN;
+ am_gen:am_domainID_t domainID = TEST_ID_1;
+
+ ON_CALL(*env->mpRoutingReceive, deregisterDomain(_)).WillByDefault(Return(E_OK));
+ EXPECT_CALL(*env->mpRoutingReceive, deregisterDomain(domainID)).WillOnce(Return(E_OK));
+ env->mProxy->deregisterDomain(domainID, callStatus, error);
+ ASSERT_EQ( error, am_gen::am_Error_e::E_OK );
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+ACTION(actionRegisterGateway){
+ arg1=TEST_ID_1;
+}
+
+MATCHER_P(IsGatewayDataEqualTo, value, "") {
+ auto lh = arg;
+ return lh.gatewayID == value.gatewayID &&
+ lh.name == value.name &&
+ lh.sinkID == value.sinkID &&
+ lh.sourceID == value.sourceID &&
+ lh.domainSinkID == value.domainSinkID &&
+ lh.controlDomainID == value.controlDomainID &&
+ lh.listSourceFormats == value.listSourceFormats &&
+ lh.listSinkFormats == value.listSinkFormats &&
+ lh.convertionMatrix == value.convertionMatrix;
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, registerGateway)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_gen::am_Error_e error = am_gen::am_Error_e::E_UNKNOWN;
+
+ am_gen::am_ConnectionFormat_L listSourceFormats;
+ listSourceFormats.push_back(am_gen::am_ConnectionFormat_e::CF_GENIVI_ANALOG);
+ listSourceFormats.push_back(am_gen::am_ConnectionFormat_e::CF_GENIVI_AUTO);
+ am_gen::am_ConnectionFormat_L listSinkFormats;
+ listSinkFormats.push_back(am_gen::am_ConnectionFormat_e::CF_GENIVI_AUTO);
+ listSinkFormats.push_back(am_gen::am_ConnectionFormat_e::CF_GENIVI_ANALOG);
+ am_gen::bool_L convertionMatrix;
+ convertionMatrix.push_back(1);
+ convertionMatrix.push_back(0);
+
+ am_gen:am_gatewayID_t gatewayID = 0;
+ am_gen::am_Gateway_s gateway(gatewayID, "name", 103, 104, 105, 106, 107, listSourceFormats, listSinkFormats, convertionMatrix);
+ am_Gateway_s amGateway;
+ CAmConvertCAPI2AM(gateway, amGateway);
+
+ ON_CALL(*env->mpRoutingReceive, registerGateway(_, _)).WillByDefault(Return(E_OK));
+ EXPECT_CALL(*env->mpRoutingReceive, registerGateway(IsGatewayDataEqualTo(amGateway), _)).WillOnce(DoAll(actionRegisterGateway(), Return(E_OK)));
+ env->mProxy->registerGateway(gateway, callStatus, gatewayID, error);
+ ASSERT_EQ( gatewayID, TEST_ID_1 );
+ ASSERT_EQ( error, am_gen::am_Error_e::E_OK );
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, deregisterGateway)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_gen::am_Error_e error = am_gen::am_Error_e::E_UNKNOWN;
+ am_gen:am_gatewayID_t gatewayID = TEST_ID_1;
+
+ ON_CALL(*env->mpRoutingReceive, deregisterGateway(_)).WillByDefault(Return(E_OK));
+ EXPECT_CALL(*env->mpRoutingReceive, deregisterGateway(gatewayID)).WillOnce(Return(E_OK));
+ env->mProxy->deregisterGateway(gatewayID, callStatus, error);
+ ASSERT_EQ( error, am_gen::am_Error_e::E_OK );
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+ACTION(actionPeek){
+ arg1=TEST_ID_1;
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, peekSink)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_gen::am_Error_e error = am_gen::am_Error_e::E_UNKNOWN;
+ std::string name("name");
+ am_gen::am_sinkID_t sinkID = 0;
+ ON_CALL(*env->mpRoutingReceive, peekSink(_, _)).WillByDefault(Return(E_OK));
+ EXPECT_CALL(*env->mpRoutingReceive, peekSink(name, _)).WillOnce(DoAll(actionPeek(), Return(E_OK)));
+ env->mProxy->peekSink(name, callStatus, sinkID, error);
+ ASSERT_EQ( sinkID, TEST_ID_1 );
+ ASSERT_EQ( error, am_gen::am_Error_e::E_OK );
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+
+MATCHER_P(IsSinkDataEqualTo, value, "") {
+ auto lh = arg;
+
+ bool bMainSoundProperties = lh.listMainSoundProperties.size() == value.listMainSoundProperties.size();
+ for(int i=0; i<lh.listMainSoundProperties.size(); i++)
+ {
+ bMainSoundProperties &= (lh.listMainSoundProperties.at(i).type==value.listMainSoundProperties.at(i).type &&
+ lh.listMainSoundProperties.at(i).value==value.listMainSoundProperties.at(i).value);
+ }
+
+ bool bSoundProperties = lh.listSoundProperties.size() == value.listSoundProperties.size();
+ for(int i=0; i<lh.listSoundProperties.size(); i++)
+ {
+ bSoundProperties &= (lh.listSoundProperties.at(i).type==value.listSoundProperties.at(i).type &&
+ lh.listSoundProperties.at(i).value==value.listSoundProperties.at(i).value);
+ }
+
+ bool bMainNotificationConfigurations = lh.listMainNotificationConfigurations.size() == value.listMainNotificationConfigurations.size();
+ for(int i=0; i<lh.listMainNotificationConfigurations.size(); i++)
+ {
+ bMainNotificationConfigurations &= (lh.listMainNotificationConfigurations.at(i).type==value.listMainNotificationConfigurations.at(i).type &&
+ lh.listMainNotificationConfigurations.at(i).status==value.listMainNotificationConfigurations.at(i).status &&
+ lh.listMainNotificationConfigurations.at(i).parameter==value.listMainNotificationConfigurations.at(i).parameter);
+ }
+
+ bool bNotificationConfigurations = lh.listNotificationConfigurations.size() == value.listNotificationConfigurations.size();
+ for(int i=0; i<lh.listNotificationConfigurations.size(); i++)
+ {
+ bNotificationConfigurations &= (lh.listNotificationConfigurations.at(i).type==value.listNotificationConfigurations.at(i).type &&
+ lh.listNotificationConfigurations.at(i).status==value.listNotificationConfigurations.at(i).status &&
+ lh.listNotificationConfigurations.at(i).parameter==value.listNotificationConfigurations.at(i).parameter);
+ }
+
+ return bMainSoundProperties &&
+ bSoundProperties &&
+ bNotificationConfigurations &&
+ bMainNotificationConfigurations &&
+ lh.sinkID == value.sinkID &&
+ lh.name == value.name &&
+ lh.domainID == value.domainID &&
+ lh.sinkClassID == value.sinkClassID &&
+ lh.volume == value.volume &&
+ lh.visible == value.visible &&
+ lh.available.availability == value.available.availability &&
+ lh.available.availabilityReason == value.available.availabilityReason &&
+ lh.muteState == value.muteState &&
+ lh.mainVolume == value.mainVolume &&
+ lh.listConnectionFormats == value.listConnectionFormats;
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, registerSink)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_gen::am_Error_e error = am_gen::am_Error_e::E_UNKNOWN;
+
+ am_gen::sinkData_s sink;
+ am_Sink_s amSink;
+ am_gen:am_sinkID_t sinkID = 0;
+ initSink(sink, amSink, TEST_ID_2, sinkID);
+
+ ON_CALL(*env->mpRoutingReceive, registerSink(_, _)).WillByDefault(Return(E_OK));
+ EXPECT_CALL(*env->mpRoutingReceive, registerSink(IsSinkDataEqualTo(amSink), _)).WillOnce(DoAll(actionRegister(), Return(E_OK)));
+ env->mProxy->registerSink(sink, callStatus, sinkID, error);
+ ASSERT_EQ( sinkID, TEST_ID_1 );
+ ASSERT_EQ( error, am_gen::am_Error_e::E_OK );
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, deregisterSink)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_gen::am_Error_e error = am_gen::am_Error_e::E_UNKNOWN;
+ am_gen:am_sinkID_t sinkID = TEST_ID_1;
+
+ ON_CALL(*env->mpRoutingReceive, deregisterSink(_)).WillByDefault(Return(E_OK));
+ EXPECT_CALL(*env->mpRoutingReceive, deregisterSink(sinkID)).WillOnce(Return(E_OK));
+ env->mProxy->deregisterSink(sinkID, callStatus, error);
+ ASSERT_EQ( error, am_gen::am_Error_e::E_OK );
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, peekSource)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_gen::am_Error_e error = am_gen::am_Error_e::E_UNKNOWN;
+ std::string name("name");
+ am_gen::am_sourceID_t sinkID = 0;
+ ON_CALL(*env->mpRoutingReceive, peekSource(_, _)).WillByDefault(Return(E_OK));
+ EXPECT_CALL(*env->mpRoutingReceive, peekSource(name, _)).WillOnce(DoAll(actionPeek(), Return(E_OK)));
+ env->mProxy->peekSource(name, callStatus, sinkID, error);
+ ASSERT_EQ( sinkID, TEST_ID_1 );
+ ASSERT_EQ( error, am_gen::am_Error_e::E_OK );
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+ACTION(actionRegisterSource){
+ arg1=TEST_ID_1;
+}
+
+MATCHER_P(IsSourceDataEqualTo, value, "") {
+ auto lh = arg;
+
+ bool bMainSoundProperties = lh.listMainSoundProperties.size() == value.listMainSoundProperties.size();
+ for(int i=0; i<lh.listMainSoundProperties.size(); i++)
+ {
+ bMainSoundProperties &= (lh.listMainSoundProperties.at(i).type==value.listMainSoundProperties.at(i).type &&
+ lh.listMainSoundProperties.at(i).value==value.listMainSoundProperties.at(i).value);
+ }
+
+ bool bSoundProperties = lh.listSoundProperties.size() == value.listSoundProperties.size();
+ for(int i=0; i<lh.listSoundProperties.size(); i++)
+ {
+ bSoundProperties &= (lh.listSoundProperties.at(i).type==value.listSoundProperties.at(i).type &&
+ lh.listSoundProperties.at(i).value==value.listSoundProperties.at(i).value);
+ }
+
+ bool bMainNotificationConfigurations = lh.listMainNotificationConfigurations.size() == value.listMainNotificationConfigurations.size();
+ for(int i=0; i<lh.listMainNotificationConfigurations.size(); i++)
+ {
+ bMainNotificationConfigurations &= (lh.listMainNotificationConfigurations.at(i).type==value.listMainNotificationConfigurations.at(i).type &&
+ lh.listMainNotificationConfigurations.at(i).status==value.listMainNotificationConfigurations.at(i).status &&
+ lh.listMainNotificationConfigurations.at(i).parameter==value.listMainNotificationConfigurations.at(i).parameter);
+ }
+
+ bool bNotificationConfigurations = lh.listNotificationConfigurations.size() == value.listNotificationConfigurations.size();
+ for(int i=0; i<lh.listNotificationConfigurations.size(); i++)
+ {
+ bNotificationConfigurations &= (lh.listNotificationConfigurations.at(i).type==value.listNotificationConfigurations.at(i).type &&
+ lh.listNotificationConfigurations.at(i).status==value.listNotificationConfigurations.at(i).status &&
+ lh.listNotificationConfigurations.at(i).parameter==value.listNotificationConfigurations.at(i).parameter);
+ }
+ return bMainSoundProperties &&
+ bSoundProperties &&
+ bNotificationConfigurations &&
+ bMainNotificationConfigurations &&
+ lh.sourceID == value.sourceID &&
+ lh.name == value.name &&
+ lh.domainID == value.domainID &&
+ lh.sourceClassID == value.sourceClassID &&
+ lh.volume == value.volume &&
+ lh.visible == value.visible &&
+ lh.available.availability == value.available.availability &&
+ lh.available.availabilityReason == value.available.availabilityReason &&
+ lh.sourceState == value.sourceState &&
+ lh.interruptState == value.interruptState &&
+ lh.listConnectionFormats == value.listConnectionFormats;
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, registerSource)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_gen::am_Error_e error = am_gen::am_Error_e::E_UNKNOWN;
+
+ am_gen::sourceData_s source;
+ am_Source_s amSource;
+ am_gen:am_sourceID_t sinkID = 0;
+ initSource(source, amSource, TEST_ID_2, sinkID);
+
+ ON_CALL(*env->mpRoutingReceive, registerSource(_, _)).WillByDefault(Return(E_OK));
+ EXPECT_CALL(*env->mpRoutingReceive, registerSource(IsSourceDataEqualTo(amSource), _)).WillOnce(DoAll(actionRegister(), Return(E_OK)));
+ env->mProxy->registerSource(source, callStatus, sinkID, error);
+ ASSERT_EQ( sinkID, TEST_ID_1 );
+ ASSERT_EQ( error, am_gen::am_Error_e::E_OK );
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, deregisterSource)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_gen::am_Error_e error = am_gen::am_Error_e::E_UNKNOWN;
+ am_gen:am_sourceID_t sinkID = TEST_ID_1;
+
+ ON_CALL(*env->mpRoutingReceive, deregisterSource(_)).WillByDefault(Return(E_OK));
+ EXPECT_CALL(*env->mpRoutingReceive, deregisterSource(sinkID)).WillOnce(Return(E_OK));
+ env->mProxy->deregisterSource(sinkID, callStatus, error);
+ ASSERT_EQ( error, am_gen::am_Error_e::E_OK );
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+ACTION(actionRegisterCrossfader){
+ arg1=TEST_ID_1;
+}
+
+MATCHER_P(IsCrossfaderDataEqualTo, value, "") {
+ auto lh = arg;
+ return lh.crossfaderID == value.crossfaderID &&
+ lh.name == value.name &&
+ lh.sinkID_A == value.sinkID_A &&
+ lh.sinkID_B == value.sinkID_B &&
+ lh.sinkID_B == value.sinkID_B &&
+ lh.sourceID == value.sourceID &&
+ lh.hotSink == value.hotSink;
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, registerCrossfader)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_gen::am_Error_e error = am_gen::am_Error_e::E_UNKNOWN;
+
+ am_gen:am_crossfaderID_t crossfaderID = 0;
+ am_gen::crossfaderData_s crossfader;
+ am_Crossfader_s amCrossfader;
+ initCrossfader(crossfader, amCrossfader, crossfaderID);
+
+ ON_CALL(*env->mpRoutingReceive, registerCrossfader(_, _)).WillByDefault(Return(E_OK));
+ EXPECT_CALL(*env->mpRoutingReceive, registerCrossfader(IsCrossfaderDataEqualTo(amCrossfader), _)).WillOnce(DoAll(actionRegister(), Return(E_OK)));
+ env->mProxy->registerCrossfader(crossfader, callStatus, crossfaderID, error);
+ ASSERT_EQ( crossfaderID, TEST_ID_1 );
+ ASSERT_EQ( error, am_gen::am_Error_e::E_OK );
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, deregisterCrossfader)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_gen::am_Error_e error = am_gen::am_Error_e::E_UNKNOWN;
+ am_gen:am_crossfaderID_t crossfaderID = TEST_ID_1;
+
+ ON_CALL(*env->mpRoutingReceive, deregisterCrossfader(_)).WillByDefault(Return(E_OK));
+ EXPECT_CALL(*env->mpRoutingReceive, deregisterCrossfader(crossfaderID)).WillOnce(Return(E_OK));
+ env->mProxy->deregisterCrossfader(crossfaderID, callStatus, error);
+ ASSERT_EQ( error, am_gen::am_Error_e::E_OK );
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, peekSourceClassID)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_gen::am_Error_e error = am_gen::am_Error_e::E_UNKNOWN;
+ std::string name("name");
+ am_gen::am_sourceClass_t sinkID = 0;
+ ON_CALL(*env->mpRoutingReceive, peekSourceClassID(_, _)).WillByDefault(Return(E_OK));
+ EXPECT_CALL(*env->mpRoutingReceive, peekSourceClassID(name, _)).WillOnce(DoAll(actionPeek(), Return(E_OK)));
+ env->mProxy->peekSourceClassID(name, callStatus, sinkID, error);
+ ASSERT_EQ( sinkID, TEST_ID_1 );
+ ASSERT_EQ( error, am_gen::am_Error_e::E_OK );
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, peekSinkClassID)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_gen::am_Error_e error = am_gen::am_Error_e::E_UNKNOWN;
+ std::string name("name");
+ am_gen::am_sinkClass_t sinkID = 0;
+ ON_CALL(*env->mpRoutingReceive, peekSinkClassID(_, _)).WillByDefault(Return(E_OK));
+ EXPECT_CALL(*env->mpRoutingReceive, peekSinkClassID(name, _)).WillOnce(DoAll(actionPeek(), Return(E_OK)));
+ env->mProxy->peekSinkClassID(name, callStatus, sinkID, error);
+ ASSERT_EQ( sinkID, TEST_ID_1 );
+ ASSERT_EQ( error, am_gen::am_Error_e::E_OK );
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, hookInterruptStatusChange)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_Error_e error = E_OK;
+ am_gen::am_sourceID_t sourceID = TEST_ID_1;
+ am_InterruptState_e interruptState = am_InterruptState_e::IS_MAX;
+ EXPECT_CALL(*env->mpRoutingReceive, hookInterruptStatusChange(sourceID, interruptState)).Times(1);
+ env->mProxy->hookInterruptStatusChange(sourceID, interruptState, callStatus);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, hookDomainRegistrationComplete)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_Error_e error = E_OK;
+ am_gen::am_domainID_t testID = TEST_ID_1;
+ EXPECT_CALL(*env->mpRoutingReceive, hookDomainRegistrationComplete(testID)).Times(1);
+ env->mProxy->hookDomainRegistrationComplete(testID, callStatus);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+MATCHER_P(IsAvailabilityEqualTo, value, "") {
+ am_Availability_s lh = arg;
+ return lh.availability == value.availability &&
+ lh.availabilityReason == value.availabilityReason;
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, hookSinkAvailablityStatusChange)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_Error_e error = E_OK;
+ am_gen::am_sinkID_t testID = TEST_ID_1;
+
+ am_gen::am_Availability_s available(am_gen::am_Availability_e::A_MAX, am_gen::am_AvailabilityReason_e::AR_MAX);
+ am_Availability_s amAvailable;
+ CAmConvertCAPI2AM(available, amAvailable);
+
+ EXPECT_CALL(*env->mpRoutingReceive, hookSinkAvailablityStatusChange(testID, IsAvailabilityEqualTo(amAvailable))).Times(1);
+ env->mProxy->hookSinkAvailablityStatusChange(testID, available, callStatus);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, hookSourceAvailablityStatusChange)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_Error_e error = E_OK;
+ am_gen::am_sourceID_t testID = TEST_ID_1;
+
+ am_gen::am_Availability_s available(am_gen::am_Availability_e::A_MAX, am_gen::am_AvailabilityReason_e::AR_MAX);
+ am_Availability_s amAvailable;
+ CAmConvertCAPI2AM(available, amAvailable);
+
+ EXPECT_CALL(*env->mpRoutingReceive, hookSourceAvailablityStatusChange(testID, IsAvailabilityEqualTo(amAvailable))).Times(1);
+ env->mProxy->hookSourceAvailablityStatusChange(testID, available, callStatus);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, hookDomainStateChange)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_Error_e error = E_OK;
+ am_gen::am_domainID_t testID = TEST_ID_1;
+ am_gen::am_DomainState_e domainState = am_gen::am_DomainState_e::DS_MAX;
+ EXPECT_CALL(*env->mpRoutingReceive, hookDomainStateChange(testID, (am_DomainState_e)domainState)).Times(1);
+ env->mProxy->hookDomainStateChange(testID, domainState, callStatus);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, hookTimingInformationChanged)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_Error_e error = E_OK;
+ am_gen::am_connectionID_t testID = TEST_ID_1;
+ int16_t delay = 10;
+ am_gen::am_DomainState_e domainState = am_gen::am_DomainState_e::DS_MAX;
+ EXPECT_CALL(*env->mpRoutingReceive, hookTimingInformationChanged(testID, delay)).Times(1);
+ env->mProxy->hookTimingInformationChanged(testID, delay, callStatus);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+MATCHER_P(IsSinkEarlyDataEqualTo, value, "") {
+
+ std::vector<am_EarlyData_s> lh = arg;
+ bool result = lh.size() == value.size();
+ for(int i=0; result && i<lh.size(); i++)
+ {
+ am_EarlyData_s ed_lh = lh.at(i);
+ am_EarlyData_s ed_rh = value.at(i);
+ if(ed_lh.type != ed_rh.type)
+ {
+ result = false;
+ break;
+ }
+ else
+ {
+ if(ed_lh.type==ED_SINK_VOLUME)
+ {
+ result &= ed_lh.data.volume == ed_rh.data.volume;
+ result &= ed_lh.sinksource.sink == ed_rh.sinksource.sink;
+ }
+ else if(ed_lh.type==ED_SINK_PROPERTY)
+ {
+ result &= ed_lh.data.soundProperty.type == ed_rh.data.soundProperty.type;
+ result &= ed_lh.data.soundProperty.value == ed_rh.data.soundProperty.value;
+ result &= ed_lh.sinksource.sink == ed_rh.sinksource.sink;
+ }
+ else
+ {
+ result = false;
+ break;
+ }
+ }
+ }
+
+ return result;
+}
+
+MATCHER_P(IsSourceEarlyDataEqualTo, value, "") {
+
+ std::vector<am_EarlyData_s> lh = arg;
+ bool result = lh.size() == value.size();
+ for(int i=0; result && i<lh.size(); i++)
+ {
+ am_EarlyData_s ed_lh = lh.at(i);
+ am_EarlyData_s ed_rh = value.at(i);
+ if(ed_lh.type != ed_rh.type)
+ {
+ result = false;
+ break;
+ }
+ else
+ {
+ if(ed_lh.type==ED_SOURCE_VOLUME)
+ {
+ result &= ed_lh.data.volume == ed_rh.data.volume;
+ result &= ed_lh.sinksource.source == ed_rh.sinksource.source;
+ }
+ else if(ed_lh.type==ED_SOURCE_PROPERTY)
+ {
+ result &= ed_lh.data.soundProperty.type == ed_rh.data.soundProperty.type;
+ result &= ed_lh.data.soundProperty.value == ed_rh.data.soundProperty.value;
+ result &= ed_lh.sinksource.source == ed_rh.sinksource.source;
+ }
+ else
+ {
+ result = false;
+ break;
+ }
+ }
+ }
+
+ return result;
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, sendChangedData)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_Error_e error = E_OK;
+ am_gen::am_connectionID_t testID = TEST_ID_1;
+ am_gen::am_EarlyData_l earlyData_soundproperties;
+ am_gen::am_EarlyData_l earlyData_volumes;
+
+ am_gen::am_DataType_u dt11(static_cast<am_gen::am_sinkID_t>(103));
+ am_gen::am_EarlyData_u ed11(static_cast<am_gen::am_volume_t>(50));
+ earlyData_volumes.push_back(am_gen::am_EarlyData_s(am_gen::am_EarlyDataType_e::ED_SINK_VOLUME,
+ dt11,
+ ed11));
+ am_gen::am_DataType_u dt12(static_cast<am_gen::am_sinkID_t>(104));
+ earlyData_volumes.push_back(am_gen::am_EarlyData_s(am_gen::am_EarlyDataType_e::ED_SINK_VOLUME,
+ dt12,
+ ed11));
+
+ am_gen::am_DataType_u dt13(static_cast<am_gen::am_sinkID_t>(105));
+ am_gen::am_EarlyData_u ed12(am_gen::am_SoundProperty_s(am_gen::am_SoundPropertyType_e::SP_MAX, 50));
+ earlyData_soundproperties.push_back(am_gen::am_EarlyData_s(am_gen::am_EarlyDataType_e::ED_SINK_PROPERTY,
+ dt13,
+ ed12));
+ am_gen::am_DataType_u dt14(static_cast<am_gen::am_sinkID_t>(106));
+ earlyData_soundproperties.push_back(am_gen::am_EarlyData_s(am_gen::am_EarlyDataType_e::ED_SINK_PROPERTY,
+ dt14,
+ ed12));
+
+ std::vector<am_EarlyData_s> earlyData;
+ am_EarlyData_s amEarlyData11;
+ amEarlyData11.type = am_EarlyDataType_e::ED_SINK_VOLUME;
+ amEarlyData11.data.volume = 50;
+ amEarlyData11.sinksource.sink = 103;
+ earlyData.push_back(amEarlyData11);
+ amEarlyData11.sinksource.sink = 104;
+ earlyData.push_back(amEarlyData11);
+
+ am_EarlyData_s amEarlyData12;
+ amEarlyData12.type = am_EarlyDataType_e::ED_SINK_PROPERTY;
+ amEarlyData12.sinksource.sink = 105;
+ amEarlyData12.data.soundProperty = (am_SoundProperty_s){SP_MAX, 50};
+ earlyData.push_back(amEarlyData12);
+ amEarlyData12.sinksource.sink = 106;
+ earlyData.push_back(amEarlyData12);
+
+ EXPECT_CALL(*env->mpRoutingReceive, sendChangedData(IsSinkEarlyDataEqualTo(earlyData))).Times(1);
+
+ env->mProxy->sendChangedData(earlyData_volumes, earlyData_soundproperties, callStatus);
+
+ earlyData_soundproperties.clear();
+ earlyData_volumes.clear();
+ earlyData.clear();
+
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+
+ am_gen::am_DataType_u dt21(static_cast<am_gen::am_sourceID_t>(103));
+ am_gen::am_EarlyData_u ed21(static_cast<am_gen::am_volume_t>(50));
+ earlyData_volumes.push_back(am_gen::am_EarlyData_s(am_gen::am_EarlyDataType_e::ED_SOURCE_VOLUME,
+ dt21,
+ ed21));
+ am_gen::am_DataType_u dt22(static_cast<am_gen::am_sourceID_t>(104));
+ earlyData_volumes.push_back(am_gen::am_EarlyData_s(am_gen::am_EarlyDataType_e::ED_SOURCE_VOLUME,
+ dt22,
+ ed21));
+
+ am_gen::am_DataType_u dt23(static_cast<am_gen::am_sourceID_t>(105));
+ am_gen::am_EarlyData_u ed22(am_gen::am_SoundProperty_s(am_gen::am_SoundPropertyType_e::SP_MAX, 50));
+ earlyData_soundproperties.push_back(am_gen::am_EarlyData_s(am_gen::am_EarlyDataType_e::ED_SOURCE_PROPERTY,
+ dt23,
+ ed22));
+ am_gen::am_DataType_u dt24(static_cast<am_gen::am_sourceID_t>(106));
+ earlyData_soundproperties.push_back(am_gen::am_EarlyData_s(am_gen::am_EarlyDataType_e::ED_SOURCE_PROPERTY,
+ dt24,
+ ed22));
+
+ am_EarlyData_s amEarlyData21;
+ amEarlyData21.type = am_EarlyDataType_e::ED_SOURCE_VOLUME;
+ amEarlyData21.data.volume = 50;
+ amEarlyData21.sinksource.sink = 103;
+ earlyData.push_back(amEarlyData21);
+ amEarlyData21.sinksource.sink = 104;
+ earlyData.push_back(amEarlyData21);
+
+ am_EarlyData_s amEarlyData22;
+ amEarlyData22.type = am_EarlyDataType_e::ED_SOURCE_PROPERTY;
+ amEarlyData22.sinksource.sink = 105;
+ amEarlyData22.data.soundProperty = (am_SoundProperty_s){SP_MAX, 50};
+ earlyData.push_back(amEarlyData22);
+ amEarlyData22.sinksource.sink = 106;
+ earlyData.push_back(amEarlyData22);
+
+ EXPECT_CALL(*env->mpRoutingReceive, sendChangedData(IsSourceEarlyDataEqualTo(earlyData))).Times(1);
+
+ env->mProxy->sendChangedData(earlyData_volumes, earlyData_soundproperties, callStatus);
+
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, confirmRoutingReady)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_Error_e error = E_OK;
+ am_gen::am_domainID_t testID = TEST_ID_1;
+ EXPECT_CALL(*env->mpRoutingReceive, confirmRoutingReady(10, error)).Times(1);
+ env->mProxy->confirmRoutingReady(testID, callStatus);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, confirmRoutingRundown)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_Error_e error = E_OK;
+ am_gen::am_domainID_t testID = TEST_ID_1;
+ EXPECT_CALL(*env->mpRoutingReceive, confirmRoutingRundown(10, error)).Times(1);
+ env->mProxy->confirmRoutingRundown(testID, callStatus);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, updateGateway)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_Error_e error = E_OK;
+ am_gen::am_gatewayID_t testID = TEST_ID_1;
+
+ am_gen::am_ConnectionFormat_L listSourceFormats;
+ listSourceFormats.push_back(am_gen::am_ConnectionFormat_e::CF_GENIVI_ANALOG);
+ listSourceFormats.push_back(am_gen::am_ConnectionFormat_e::CF_GENIVI_AUTO);
+
+ am_gen::am_ConnectionFormat_L listSinkFormats;
+ listSinkFormats.push_back(am_gen::am_ConnectionFormat_e::CF_GENIVI_AUTO);
+ listSinkFormats.push_back(am_gen::am_ConnectionFormat_e::CF_GENIVI_ANALOG);
+
+ am_gen::bool_L convertionMatrix;
+ convertionMatrix.push_back(1);
+ convertionMatrix.push_back(0);
+
+ std::vector<am_ConnectionFormat_e> am_listSourceFormats;
+ am_listSourceFormats.push_back(am_ConnectionFormat_e::CF_GENIVI_ANALOG);
+ am_listSourceFormats.push_back(am_ConnectionFormat_e::CF_GENIVI_AUTO);
+
+ std::vector<am_ConnectionFormat_e> am_listSinkFormats;
+ am_listSinkFormats.push_back(am_ConnectionFormat_e::CF_GENIVI_AUTO);
+ am_listSinkFormats.push_back(am_ConnectionFormat_e::CF_GENIVI_ANALOG);
+
+ std::vector<bool> am_convertionMatrix;
+ am_convertionMatrix.push_back(1);
+ am_convertionMatrix.push_back(0);
+ ON_CALL(*env->mpRoutingReceive, updateGateway(_, _, _, _)).WillByDefault(Return(E_OK));
+ EXPECT_CALL(*env->mpRoutingReceive, updateGateway(testID, am_listSourceFormats, am_listSinkFormats, am_convertionMatrix)).Times(1);
+
+ env->mProxy->updateGateway(testID, listSourceFormats, listSinkFormats, convertionMatrix, callStatus);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+MATCHER_P(IsSoundPropertiesArrayEqualTo, value, "") {
+ auto lh = arg;
+
+ bool bSoundProperties = lh.size() == value.size();
+ for(int i=0; i<lh.size(); i++)
+ {
+ bSoundProperties &= (lh.at(i).type==value.at(i).type &&
+ lh.at(i).value==value.at(i).value);
+ }
+ return bSoundProperties;
+}
+
+void prepareArrays( am_gen::am_SoundProperty_L & listSoundProperties,
+ am_gen::am_ConnectionFormat_L & listSinkFormats,
+ am_gen::am_MainSoundProperty_L & listMainSoundProperties,
+ std::vector<am_ConnectionFormat_e> & am_listSinkFormats,
+ std::vector<am_SoundProperty_s> & am_listSoundProperties,
+ std::vector<am_MainSoundProperty_s> & am_listMainSoundProperties)
+{
+ listSoundProperties.push_back(am_gen::am_SoundProperty_s(am_gen::am_SoundPropertyType_e::SP_MAX, 50));
+ listSoundProperties.push_back(am_gen::am_SoundProperty_s(am_gen::am_SoundPropertyType_e::SP_MAX, 51));
+
+ listSinkFormats.push_back(am_gen::am_ConnectionFormat_e::CF_GENIVI_AUTO);
+ listSinkFormats.push_back(am_gen::am_ConnectionFormat_e::CF_GENIVI_ANALOG);
+
+ listMainSoundProperties.push_back(am_gen::am_MainSoundProperty_s(am_gen::am_MainSoundPropertyType_e::MSP_MAX, 50));
+ listMainSoundProperties.push_back(am_gen::am_MainSoundProperty_s(am_gen::am_MainSoundPropertyType_e::MSP_MAX, 51));
+
+ am_listSinkFormats.push_back(am_ConnectionFormat_e::CF_GENIVI_AUTO);
+ am_listSinkFormats.push_back(am_ConnectionFormat_e::CF_GENIVI_ANALOG);
+
+ am_listSoundProperties.push_back((am_SoundProperty_s){am_SoundPropertyType_e::SP_MAX, 50});
+ am_listSoundProperties.push_back((am_SoundProperty_s){am_SoundPropertyType_e::SP_MAX, 51});
+
+ am_listMainSoundProperties.push_back((am_MainSoundProperty_s){am_MainSoundPropertyType_e::MSP_MAX, 50});
+ am_listMainSoundProperties.push_back((am_MainSoundProperty_s){am_MainSoundPropertyType_e::MSP_MAX, 51});
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, updateSink)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_Error_e error = E_OK;
+ am_gen::am_sinkID_t testID = TEST_ID_1;
+
+ am_gen::am_SoundProperty_L listSoundProperties;
+ am_gen::am_ConnectionFormat_L listSinkFormats;
+ am_gen::am_MainSoundProperty_L listMainSoundProperties;
+ std::vector<am_ConnectionFormat_e> am_listSinkFormats;
+ std::vector<am_SoundProperty_s> am_listSoundProperties;
+ std::vector<am_MainSoundProperty_s> am_listMainSoundProperties;
+ prepareArrays(listSoundProperties, listSinkFormats, listMainSoundProperties, am_listSinkFormats, am_listSoundProperties, am_listMainSoundProperties);
+
+ ON_CALL(*env->mpRoutingReceive, updateSink(_, _, _, _, _)).WillByDefault(Return(E_OK));
+ EXPECT_CALL(*env->mpRoutingReceive, updateSink(testID, TEST_ID_2, IsSoundPropertiesArrayEqualTo(am_listSoundProperties), am_listSinkFormats, IsSoundPropertiesArrayEqualTo(am_listMainSoundProperties))).Times(1);
+ env->mProxy->updateSink(testID, TEST_ID_2, listSoundProperties, listSinkFormats, listMainSoundProperties, callStatus);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, updateSource)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_Error_e error = E_OK;
+ am_gen::am_sourceID_t testID = TEST_ID_1;
+
+ am_gen::am_SoundProperty_L listSoundProperties;
+ am_gen::am_ConnectionFormat_L listSinkFormats;
+ am_gen::am_MainSoundProperty_L listMainSoundProperties;
+ std::vector<am_ConnectionFormat_e> am_listSinkFormats;
+ std::vector<am_SoundProperty_s> am_listSoundProperties;
+ std::vector<am_MainSoundProperty_s> am_listMainSoundProperties;
+ prepareArrays(listSoundProperties, listSinkFormats, listMainSoundProperties, am_listSinkFormats, am_listSoundProperties, am_listMainSoundProperties);
+
+ ON_CALL(*env->mpRoutingReceive, updateSource(_, _, _, _, _)).WillByDefault(Return(E_OK));
+ EXPECT_CALL(*env->mpRoutingReceive, updateSource(testID, TEST_ID_2, IsSoundPropertiesArrayEqualTo(am_listSoundProperties), am_listSinkFormats, IsSoundPropertiesArrayEqualTo(am_listMainSoundProperties))).Times(1);
+ env->mProxy->updateSource(testID, TEST_ID_2, listSoundProperties, listSinkFormats, listMainSoundProperties, callStatus);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+
+MATCHER_P2(IsSinkVolumeArrayEqualTo, value, isSink, "") {
+
+ std::vector<am_Volumes_s> lh = arg;
+ bool bResult = lh.size() == value.size();
+ for(int i=0; i<lh.size(); i++)
+ {
+ bResult &= (((isSink && lh.at(i).volumeID.sink==value.at(i).volumeID.sink) || (!isSink && lh.at(i).volumeID.source==value.at(i).volumeID.source)) &&
+ lh.at(i).volume==value.at(i).volume &&
+ lh.at(i).ramp==value.at(i).ramp &&
+ lh.at(i).time==value.at(i).time);
+ }
+ return bResult;
+}
+
+MATCHER_P(IsHandleStructEqualTo, value, "") {
+ am_Handle_s lh = arg;
+ return lh.handle==value.handle &&
+ lh.handleType==value.handleType ;
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, ackSetVolumes)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ uint16_t error = (uint16_t)E_OK;
+ uint16_t testID = 10;
+ am_gen::am_Volumes_l listVolumes;
+ am_gen::am_DataType_u dt(static_cast<am_gen::am_sinkID_t>(103));
+ listVolumes.push_back(am_gen::am_Volumes_s(am_gen::am_VolumeType_e::VT_MAX,
+ dt,
+ 50,
+ am_gen::am_RampType_e::RAMP_GENIVI_DIRECT,
+ 50));
+
+ std::vector<am_Volumes_s> am_listVolumes;
+ am_DataType_u dt1;
+ dt1.sink = 103;
+ am_listVolumes.push_back((am_Volumes_s){am_VolumeType_e::VT_MAX,
+ dt1,
+ 50,
+ am_RampType_e::RAMP_GENIVI_DIRECT,
+ 50});
+
+ am_Handle_s handle_s;
+ handle_s.handle = 10;
+ handle_s.handleType = H_SETVOLUMES;
+
+ EXPECT_CALL(*env->mpRoutingReceive, ackSetVolumes(IsHandleStructEqualTo(handle_s), IsSinkVolumeArrayEqualTo(am_listVolumes, true), _)).Times(1);
+ env->mProxy->ackSetVolumes(testID, listVolumes, error, callStatus);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, ackSinkNotificationConfiguration)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_gen::am_Error_e error = am_gen::am_Error_e::E_OK;
+ uint16_t testID = TEST_ID_1;
+ am_Handle_s handle_s;
+ handle_s.handle = testID;
+ handle_s.handleType = H_CONNECT;
+ EXPECT_CALL(*env->mpRoutingReceive, ackSinkNotificationConfiguration(IsHandleStructEqualTo(handle_s), (am_Error_e)error)).Times(1);
+ env->mProxy->ackSinkNotificationConfiguration(testID, (uint16_t)error, callStatus);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, ackSourceNotificationConfiguration)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_gen::am_Error_e error = am_gen::am_Error_e::E_OK;
+ uint16_t testID = TEST_ID_1;
+ am_Handle_s handle_s;
+ handle_s.handle = testID;
+ handle_s.handleType = H_CONNECT;
+ EXPECT_CALL(*env->mpRoutingReceive, ackSourceNotificationConfiguration(IsHandleStructEqualTo(handle_s), (am_Error_e)error)).Times(1);
+ env->mProxy->ackSourceNotificationConfiguration(testID, (uint16_t)error, callStatus);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+MATCHER_P(IsPayloadEqualTo, value, "") {
+
+ auto lh = arg;
+ return lh.type == value.type && lh.value == value.value;
+}
+
+
+TEST_F(CAmRoutingInterfaceCAPITests, hookSinkNotificationDataChange)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_Error_e error = E_OK;
+ am_gen::am_sinkID_t testID = TEST_ID_1;
+ am_gen::notificationPayload_s payload(am_NotificationType_e::NT_MAX, 50);
+
+ am_NotificationPayload_s am_payload = (am_NotificationPayload_s){am_NotificationType_e::NT_MAX, 50};
+
+ EXPECT_CALL(*env->mpRoutingReceive, hookSinkNotificationDataChange(testID, IsPayloadEqualTo(am_payload))).Times(1);
+ env->mProxy->hookSinkNotificationDataChange(testID, payload, callStatus);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingInterfaceCAPITests, hookSourceNotificationDataChange)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_Error_e error = E_OK;
+ am_gen::am_sourceID_t testID = TEST_ID_1;
+ am_gen::notificationPayload_s payload(am_NotificationType_e::NT_MAX, 50);
+
+ am_NotificationPayload_s am_payload = (am_NotificationPayload_s){am_NotificationType_e::NT_MAX, 50};
+
+ EXPECT_CALL(*env->mpRoutingReceive, hookSourceNotificationDataChange(testID, IsPayloadEqualTo(am_payload))).Times(1);
+ env->mProxy->hookSourceNotificationDataChange(testID, payload, callStatus);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+ACTION(actionRegister2){
+ arg1=TEST_ID_2;
+}
+
+
+/** CAmRoutingSenderCAPITests
+ * The following methods must be executed in the given order.
+ * It is important that the TestDomain_register* methods are executed first because they make domain, sink, source and crossfader registrations.
+ * The last couple of methods are TestDomain_deregister* methods which check whether the 'deregistration' functionality works properly.
+ */
+
+TEST_F(CAmRoutingSenderCAPITests, TestDomain_registerDomain)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ IAmRoutingSenderBackdoor backdoor(env->mpPlugin);
+ ASSERT_FALSE( backdoor.containsDomainWithID( (const am_domainID_t)TEST_ID_1) );
+
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_gen::am_Error_e error = am_gen::am_Error_e::E_UNKNOWN;
+ am_gen:am_domainID_t domainID = 0;
+ am_gen::am_Domain_s domainData;
+ domainData.name = "TestDomain";
+ domainData.busname ="TestDomain";
+ domainData.complete = true;
+ domainData.domainID = domainID;
+ domainData.early = false;
+ domainData.nodename = "Test";
+ domainData.state = am_gen::am_DomainState_e::DS_CONTROLLED;
+
+ am::am_Domain_s amDomainData;
+ CAmConvertCAPI2AM(domainData, amDomainData);
+
+ ON_CALL(*env->mpRoutingReceive, registerDomain(_, _)).WillByDefault(Return(E_OK));
+
+ EXPECT_CALL(*env->mpRoutingReceive, registerDomain(IsDomainDataEqualTo(amDomainData), _)).WillOnce(DoAll(actionRegister(), Return(E_OK)));
+ env->mProxy->registerDomain(domainData,
+ CAPI_SENDER_INSTANCE,
+ CAPI_SENDER_PATH,
+ CAPI_SENDER_INTERFACE,
+ callStatus,
+ domainID,
+ error);
+ usleep(50000);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ ASSERT_EQ( error, am_gen::am_Error_e::E_OK );
+ ASSERT_EQ( domainID, TEST_ID_1 );
+ ASSERT_TRUE( backdoor.containsDomainWithID(domainID) );
+
+ domainID = 0;
+ domainData.domainID = 0;
+ domainData.name = "TestDomain2";
+ domainData.busname ="TestDomain2";
+ CAmConvertCAPI2AM(domainData, amDomainData);
+ EXPECT_CALL(*env->mpRoutingReceive, registerDomain(IsDomainDataEqualTo(amDomainData), _)).WillOnce(DoAll(actionRegister2(), Return(E_OK)));
+ env->mProxy->registerDomain(domainData,
+ CAPI_SENDER_INSTANCE,
+ CAPI_SENDER_PATH,
+ CAPI_SENDER_INTERFACE,
+ callStatus,
+ domainID,
+ error);
+ usleep(50000);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ ASSERT_EQ( error, am_gen::am_Error_e::E_OK );
+ ASSERT_EQ( domainID, TEST_ID_2 );
+ ASSERT_TRUE( backdoor.domainsCount()==2 );
+ ASSERT_TRUE( backdoor.containsDomainWithID( (const am_domainID_t)TEST_ID_1) );
+ ASSERT_TRUE( backdoor.containsDomainWithID( (const am_domainID_t)TEST_ID_2) );
+ ASSERT_FALSE( backdoor.containsDomainWithID( (const am_domainID_t)10000) );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingSenderCAPITests, TestDomain_registerSource)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ const am_gen::am_domainID_t domainID = TEST_ID_1;
+ IAmRoutingSenderBackdoor backdoor(env->mpPlugin);
+ ASSERT_TRUE( backdoor.containsDomainWithID( (const am_domainID_t)domainID) );
+
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_gen::am_Error_e error = am_gen::am_Error_e::E_UNKNOWN;
+
+ am_gen::sourceData_s source;
+ am_Source_s amSource;
+ am_gen:am_sourceID_t sinkID = 0;
+ initSource(source, amSource, domainID, sinkID);
+
+ ON_CALL(*env->mpRoutingReceive, registerSource(_, _)).WillByDefault(Return(E_OK));
+ EXPECT_CALL(*env->mpRoutingReceive, registerSource(IsSourceDataEqualTo(amSource), _)).WillOnce(DoAll(actionRegister(), Return(E_OK)));
+ env->mProxy->registerSource(source, callStatus, sinkID, error);
+ usleep(50000);
+ ASSERT_EQ( sinkID, TEST_ID_1 );
+ ASSERT_EQ( error, am_gen::am_Error_e::E_OK );
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ ASSERT_TRUE( backdoor.containsSourceWithID( (const am_sourceID_t)TEST_ID_1) );
+
+ initSource(source, amSource, domainID, sinkID);
+ EXPECT_CALL(*env->mpRoutingReceive, registerSource(IsSourceDataEqualTo(amSource), _)).WillOnce(DoAll(actionRegister2(), Return(E_OK)));
+ env->mProxy->registerSource(source, callStatus, sinkID, error);
+ usleep(50000);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ ASSERT_EQ( error, am_gen::am_Error_e::E_OK );
+ ASSERT_EQ( sinkID, TEST_ID_2 );
+ ASSERT_TRUE( backdoor.containsSourceWithID( (const am_sourceID_t)TEST_ID_2) );
+ ASSERT_TRUE( backdoor.sourcesCount()==2 );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+
+
+TEST_F(CAmRoutingSenderCAPITests, TestDomain_registerSink)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ const am_gen::am_domainID_t domainID = TEST_ID_1;
+ IAmRoutingSenderBackdoor backdoor(env->mpPlugin);
+ ASSERT_TRUE( backdoor.containsDomainWithID( (const am_domainID_t)domainID) );
+
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_gen::am_Error_e error = am_gen::am_Error_e::E_UNKNOWN;
+
+ am_gen::sinkData_s sink;
+ am_Sink_s amSink;
+ am_gen:am_sinkID_t sinkID = 0;
+ initSink(sink, amSink, domainID, sinkID);
+
+ ON_CALL(*env->mpRoutingReceive, registerSink(_, _)).WillByDefault(Return(E_OK));
+ EXPECT_CALL(*env->mpRoutingReceive, registerSink(IsSinkDataEqualTo(amSink), _)).WillOnce(DoAll(actionRegister(), Return(E_OK)));
+ env->mProxy->registerSink(sink, callStatus, sinkID, error);
+
+ usleep(50000);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ ASSERT_EQ( error, am_gen::am_Error_e::E_OK );
+ ASSERT_EQ( sinkID, TEST_ID_1 );
+ ASSERT_TRUE( backdoor.containsSinkWithID( (const am_sourceID_t)TEST_ID_1) );
+
+ initSink(sink, amSink, TEST_ID_1, 0);
+ EXPECT_CALL(*env->mpRoutingReceive, registerSink(IsSinkDataEqualTo(amSink), _)).WillOnce(DoAll(actionRegister2(), Return(E_OK)));
+ env->mProxy->registerSink(sink, callStatus, sinkID, error);
+
+ usleep(50000);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ ASSERT_EQ( error, am_gen::am_Error_e::E_OK );
+ ASSERT_EQ( sinkID, TEST_ID_2 );
+ ASSERT_TRUE( backdoor.containsSinkWithID( (const am_sourceID_t)TEST_ID_2) );
+ ASSERT_TRUE( backdoor.sinksCount()==2 );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingSenderCAPITests, TestDomain_setDomainState)
+{
+//todo: Decide how to test
+}
+
+TEST_F(CAmRoutingSenderCAPITests, TestDomain_asyncSetSourceState)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ const am_gen::am_domainID_t domainID = TEST_ID_1;
+ const am_gen::am_sourceID_t sID = TEST_ID_1;
+ IAmRoutingSenderBackdoor backdoor(env->mpPlugin);
+ ASSERT_TRUE( backdoor.containsDomainWithID( (const am_domainID_t)domainID) );
+ ASSERT_TRUE( backdoor.containsSourceWithID( (const am_sourceID_t)sID) );
+
+ am_volume_t volume = 50;
+ am_Handle_s handle = {H_SETSOURCESTATE, 20};
+ am_SourceState_e state = am_SourceState_e::SS_MAX;
+ EXPECT_CALL(*env->mpRoutingReceive, ackSetSourceState(IsHandleEqual(handle), E_OK)).Times(1);
+ am_Error_e error = env->mpPlugin->asyncSetSourceState(handle, sID, state);
+ usleep(50000);
+ ASSERT_EQ( error, E_OK );
+ ASSERT_FALSE( backdoor.containsHandle( handle.handle) );
+ }
+
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingSenderCAPITests, TestDomain_asyncSetSourceVolume)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ const am_gen::am_domainID_t domainID = TEST_ID_1;
+ const am_gen::am_sourceID_t sID = TEST_ID_1;
+ IAmRoutingSenderBackdoor backdoor(env->mpPlugin);
+ ASSERT_TRUE( backdoor.containsDomainWithID( (const am_domainID_t)domainID) );
+ ASSERT_TRUE( backdoor.containsSourceWithID( (const am_sourceID_t)sID) );
+
+ am_volume_t volume = 50;
+ am_time_t time = 10;
+ am_RampType_e ramp = am_RampType_e::RAMP_GENIVI_DIRECT;
+ am_Handle_s handle = {H_SETSOURCEVOLUME, 20};
+ am_SourceState_e state = am_SourceState_e::SS_MAX;
+ EXPECT_CALL(*env->mpRoutingReceive, ackSetSourceVolumeChange(IsHandleEqual(handle), volume, E_OK)).Times(1);
+ am_Error_e error = env->mpPlugin->asyncSetSourceVolume(handle, sID, volume, ramp, time);
+ usleep(50000);
+ ASSERT_EQ( error, E_OK );
+ ASSERT_FALSE( backdoor.containsHandle( handle.handle) );
+ }
+
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingSenderCAPITests, TestDomain_registerCrossfader)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ const am_gen::am_domainID_t domainID = TEST_ID_1;
+ IAmRoutingSenderBackdoor backdoor(env->mpPlugin);
+ ASSERT_TRUE( backdoor.containsDomainWithID( (const am_domainID_t)domainID) );
+
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_gen::am_Error_e error = am_gen::am_Error_e::E_UNKNOWN;
+
+ am_gen::am_crossfaderID_t crossfaderID = 0;
+ am_gen::crossfaderData_s crossfaderData;
+ am_Crossfader_s amCrossfaderData;
+ initCrossfader(crossfaderData, amCrossfaderData, crossfaderID);
+
+ ON_CALL(*env->mpRoutingReceive, registerCrossfader(_, _)).WillByDefault(Return(E_OK));
+ EXPECT_CALL(*env->mpRoutingReceive, registerCrossfader(IsCrossfaderDataEqualTo(amCrossfaderData), _)).WillOnce(DoAll(actionRegister(), Return(E_OK)));
+ env->mProxy->registerCrossfader(crossfaderData, callStatus, crossfaderID, error);
+
+ usleep(50000);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ ASSERT_EQ( error, am_gen::am_Error_e::E_OK );
+ ASSERT_EQ( crossfaderID, TEST_ID_1 );
+ ASSERT_TRUE( backdoor.containsCrossfader( TEST_ID_1) );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingSenderCAPITests, TestDomain_asyncSetSinkVolume)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ const am_gen::am_domainID_t domainID = TEST_ID_1;
+ const am_gen::am_sinkID_t sID = TEST_ID_1;
+ IAmRoutingSenderBackdoor backdoor(env->mpPlugin);
+ ASSERT_TRUE( backdoor.containsDomainWithID( (const am_domainID_t)domainID) );
+ ASSERT_TRUE( backdoor.containsSourceWithID( (const am_sourceID_t)sID) );
+
+ am_volume_t volume = 50;
+ am_time_t time = 10;
+ am_RampType_e ramp = am_RampType_e::RAMP_GENIVI_DIRECT;
+ am_Handle_s handle = {H_SETSINKVOLUME, 20};
+ am_SourceState_e state = am_SourceState_e::SS_MAX;
+ EXPECT_CALL(*env->mpRoutingReceive, ackSetSinkVolumeChange(IsHandleEqual(handle), volume, E_OK)).Times(1);
+ am_Error_e error = env->mpPlugin->asyncSetSinkVolume(handle, sID, volume, ramp, time);
+ usleep(50000);
+ ASSERT_EQ( error, E_OK );
+ ASSERT_FALSE( backdoor.containsHandle( handle.handle) );
+ }
+
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingSenderCAPITests, TestDomain_asyncConnect)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+// const am_gen::am_domainID_t domainID = TEST_ID_1;
+ IAmRoutingSenderBackdoor backdoor(env->mpPlugin);
+ ASSERT_TRUE( backdoor.containsDomainWithID( TEST_ID_1 ));
+ ASSERT_TRUE( backdoor.containsSinkWithID( TEST_ID_1 ));
+ ASSERT_TRUE( backdoor.containsSourceWithID( TEST_ID_1 ));
+
+ am_gen::am_connectionID_t connectionID = TEST_ID_1;
+ am_Handle_s handle = {H_CONNECT, 20};
+ am_ConnectionFormat_e cf = am_ConnectionFormat_e::CF_GENIVI_STEREO;
+ EXPECT_CALL(*env->mpRoutingReceive, ackConnect(IsHandleEqual(handle), connectionID, E_OK)).Times(1);
+ am_Error_e error = env->mpPlugin->asyncConnect(handle, connectionID, TEST_ID_1, TEST_ID_1, cf);
+ usleep(50000);
+ ASSERT_EQ( error, E_OK );
+ ASSERT_FALSE( backdoor.containsHandle( handle.handle ) );
+ ASSERT_EQ( backdoor.connectionsCount( ) , 1 );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingSenderCAPITests, TestDomain_asyncDisconnect)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ IAmRoutingSenderBackdoor backdoor(env->mpPlugin);
+ ASSERT_TRUE( backdoor.containsDomainWithID( TEST_ID_1 ));
+ ASSERT_TRUE( backdoor.containsConnection( TEST_ID_1 ));
+
+ am_gen::am_connectionID_t connectionID = TEST_ID_1;
+ am_Handle_s handle = {H_DISCONNECT, 20};
+ am_ConnectionFormat_e cf = am_ConnectionFormat_e::CF_GENIVI_STEREO;
+ EXPECT_CALL(*env->mpRoutingReceive, ackDisconnect(IsHandleEqual(handle), connectionID, E_OK)).Times(1);
+ am_Error_e error = env->mpPlugin->asyncDisconnect(handle, connectionID);
+ usleep(50000);
+ ASSERT_EQ( error, E_OK );
+ ASSERT_FALSE( backdoor.containsHandle( handle.handle ) );
+ ASSERT_FALSE( backdoor.containsConnection( TEST_ID_1 ) );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingSenderCAPITests, TestDomain_asyncAbort)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ const am_gen::am_domainID_t domainID = TEST_ID_1;
+ const am_gen::am_sourceID_t sID = TEST_ID_1;
+ IAmRoutingSenderBackdoor backdoor(env->mpPlugin);
+ ASSERT_TRUE( backdoor.containsDomainWithID( (const am_domainID_t)domainID) );
+ ASSERT_TRUE( backdoor.containsSourceWithID( (const am_sourceID_t)sID) );
+
+ am_volume_t volume = 50;
+ am_Handle_s handle = {H_SETSOURCESTATE, 200};
+ am_SourceState_e state = am_SourceState_e::SS_MAX;
+
+ //we set an abort handle in order to test the return status
+ env->mDomainService->setAbortHandle(handle.handle);
+
+ EXPECT_CALL(*env->mpRoutingReceive, ackSetSourceState(IsHandleEqual(handle), E_ABORTED)).Times(1);
+ am_Error_e error = env->mpPlugin->asyncSetSourceState(handle, sID, state);
+ usleep(50000);
+ ASSERT_EQ( error, E_OK );
+ ASSERT_FALSE( backdoor.containsHandle( handle.handle) );
+ }
+
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+MATCHER_P(IsListMainSoundPropertiesEqualTo, value, "") {
+ auto lh = arg;
+
+ bool bMainSoundProperties = lh.size() == value.size();
+ for(int i=0; i<lh.size(); i++)
+ {
+ bMainSoundProperties &= (lh.at(i).type==value.at(i).type &&
+ lh.at(i).value==value.at(i).value);
+ }
+ return bMainSoundProperties;
+}
+
+TEST_F(CAmRoutingSenderCAPITests, TestDomain_asyncSetSinkSoundProperties)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ const am_gen::am_domainID_t domainID = TEST_ID_1;
+ const am_gen::am_sinkID_t sID = TEST_ID_1;
+ IAmRoutingSenderBackdoor backdoor(env->mpPlugin);
+ ASSERT_TRUE( backdoor.containsDomainWithID( (const am_domainID_t)domainID) );
+ ASSERT_TRUE( backdoor.containsSourceWithID( (const am_sourceID_t)sID) );
+
+ am_Handle_s handle = {H_SETSINKSOUNDPROPERTIES, 200};
+ am_SourceState_e state = am_SourceState_e::SS_MAX;
+
+ std::vector<am_SoundProperty_s> listSoundProperties;
+ listSoundProperties.push_back((am_SoundProperty_s){am_SoundPropertyType_e::SP_INTERR_OVERLAYID, 100});
+ listSoundProperties.push_back((am_SoundProperty_s){am_SoundPropertyType_e::SP_MAX, 101});
+ listSoundProperties.push_back((am_SoundProperty_s){am_SoundPropertyType_e::SP_PRIORITY, 100});
+
+ EXPECT_CALL(*env->mpRoutingReceive, ackSetSinkSoundProperties(IsHandleEqual(handle), E_OK)).Times(1);
+ am_Error_e error = env->mpPlugin->asyncSetSinkSoundProperties(handle, sID, listSoundProperties);
+ usleep(50000);
+ ASSERT_EQ( error, E_OK );
+ ASSERT_FALSE( backdoor.containsHandle( handle.handle) );
+ }
+
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingSenderCAPITests, TestDomain_asyncSetSinkSoundProperty)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ const am_gen::am_domainID_t domainID = TEST_ID_1;
+ const am_gen::am_sinkID_t sID = TEST_ID_1;
+ IAmRoutingSenderBackdoor backdoor(env->mpPlugin);
+ ASSERT_TRUE( backdoor.containsDomainWithID( (const am_domainID_t)domainID) );
+ ASSERT_TRUE( backdoor.containsSourceWithID( (const am_sourceID_t)sID) );
+
+ am_Handle_s handle = {H_SETSINKSOUNDPROPERTY, 200};
+ am_SourceState_e state = am_SourceState_e::SS_MAX;
+
+ EXPECT_CALL(*env->mpRoutingReceive, ackSetSinkSoundProperty(IsHandleEqual(handle), E_OK)).Times(1);
+ am_Error_e error = env->mpPlugin->asyncSetSinkSoundProperty(handle, sID, (am_SoundProperty_s){am_SoundPropertyType_e::SP_INTERR_OVERLAYID, 100});
+ usleep(50000);
+ ASSERT_EQ( error, E_OK );
+ ASSERT_FALSE( backdoor.containsHandle( handle.handle) );
+ }
+
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingSenderCAPITests, TestDomain_asyncSetSourceSoundProperties)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ const am_gen::am_domainID_t domainID = TEST_ID_1;
+ const am_gen::am_sourceID_t sID = TEST_ID_1;
+ IAmRoutingSenderBackdoor backdoor(env->mpPlugin);
+ ASSERT_TRUE( backdoor.containsDomainWithID( (const am_domainID_t)domainID) );
+ ASSERT_TRUE( backdoor.containsSourceWithID( (const am_sourceID_t)sID) );
+
+ am_Handle_s handle = {H_SETSOURCESOUNDPROPERTIES, 200};
+ am_SourceState_e state = am_SourceState_e::SS_MAX;
+
+ std::vector<am_SoundProperty_s> listSoundProperties;
+ listSoundProperties.push_back((am_SoundProperty_s){am_SoundPropertyType_e::SP_INTERR_OVERLAYID, 100});
+ listSoundProperties.push_back((am_SoundProperty_s){am_SoundPropertyType_e::SP_MAX, 101});
+ listSoundProperties.push_back((am_SoundProperty_s){am_SoundPropertyType_e::SP_PRIORITY, 100});
+
+ EXPECT_CALL(*env->mpRoutingReceive, ackSetSourceSoundProperties(IsHandleEqual(handle), E_OK)).Times(1);
+ am_Error_e error = env->mpPlugin->asyncSetSourceSoundProperties(handle, sID, listSoundProperties);
+ usleep(50000);
+ ASSERT_EQ( error, E_OK );
+ ASSERT_FALSE( backdoor.containsHandle( handle.handle) );
+ }
+
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingSenderCAPITests, TestDomain_asyncSetSourceSoundProperty)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ const am_gen::am_domainID_t domainID = TEST_ID_1;
+ const am_gen::am_sourceID_t sID = TEST_ID_1;
+ IAmRoutingSenderBackdoor backdoor(env->mpPlugin);
+ ASSERT_TRUE( backdoor.containsDomainWithID( (const am_domainID_t)domainID) );
+ ASSERT_TRUE( backdoor.containsSourceWithID( (const am_sourceID_t)sID) );
+
+ am_Handle_s handle = {H_SETSOURCESOUNDPROPERTY, 200};
+ am_SourceState_e state = am_SourceState_e::SS_MAX;
+
+ EXPECT_CALL(*env->mpRoutingReceive, ackSetSourceSoundProperty(IsHandleEqual(handle), E_OK)).Times(1);
+ am_Error_e error = env->mpPlugin->asyncSetSourceSoundProperty(handle, sID, (am_SoundProperty_s){am_SoundPropertyType_e::SP_INTERR_OVERLAYID, 100});
+ usleep(50000);
+ ASSERT_EQ( error, E_OK );
+ ASSERT_FALSE( backdoor.containsHandle( handle.handle) );
+ }
+
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingSenderCAPITests, TestDomain_asyncCrossFade)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ const am_gen::am_crossfaderID_t sID = TEST_ID_1;
+ IAmRoutingSenderBackdoor backdoor(env->mpPlugin);
+ ASSERT_TRUE( backdoor.containsDomainWithID( TEST_ID_1 ));
+ ASSERT_TRUE( backdoor.containsSourceWithID( TEST_ID_1 ));
+ ASSERT_TRUE( backdoor.containsCrossfader( TEST_ID_1 ));
+
+ am_Handle_s handle = {H_CROSSFADE, 200};
+ am_RampType_e state = am_RampType_e::RAMP_GENIVI_DIRECT;
+ am_HotSink_e hotSink = HS_UNKNOWN;
+ EXPECT_CALL(*env->mpRoutingReceive, ackCrossFading(IsHandleEqual(handle), hotSink, E_OK)).Times(1);
+ am_Error_e error = env->mpPlugin->asyncCrossFade(handle, sID, hotSink, state, 50);
+ usleep(50000);
+ ASSERT_EQ( error, E_OK );
+ ASSERT_FALSE( backdoor.containsHandle( handle.handle) );
+ }
+
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingSenderCAPITests, TestDomain_asyncSetSinkNotificationConfiguration)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ IAmRoutingSenderBackdoor backdoor(env->mpPlugin);
+ ASSERT_TRUE( backdoor.containsDomainWithID( TEST_ID_1 ));
+ ASSERT_TRUE( backdoor.containsSinkWithID( TEST_ID_1 ));
+
+ am_Handle_s handle = {H_CONNECT, 200};
+ am_NotificationConfiguration_s nc = (am_NotificationConfiguration_s){am_NotificationType_e::NT_MAX, am_NotificationStatus_e::NS_MAX};
+ EXPECT_CALL(*env->mpRoutingReceive, ackSinkNotificationConfiguration(IsHandleStructEqualTo(handle), E_OK)).Times(1);
+ am_Error_e error = env->mpPlugin->asyncSetSinkNotificationConfiguration(handle, TEST_ID_1, nc);
+ usleep(50000);
+ ASSERT_EQ( error, E_OK );
+ ASSERT_FALSE( backdoor.containsHandle( handle.handle) );
+ }
+
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingSenderCAPITests, TestDomain_asyncSetSourceNotificationConfiguration)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ IAmRoutingSenderBackdoor backdoor(env->mpPlugin);
+ ASSERT_TRUE( backdoor.containsDomainWithID( TEST_ID_1 ));
+ ASSERT_TRUE( backdoor.containsSinkWithID( TEST_ID_1 ));
+
+ am_Handle_s handle = {H_CONNECT, 200};
+ am_NotificationConfiguration_s nc = (am_NotificationConfiguration_s){am_NotificationType_e::NT_MAX, am_NotificationStatus_e::NS_MAX};
+ EXPECT_CALL(*env->mpRoutingReceive, ackSourceNotificationConfiguration(IsHandleStructEqualTo(handle), E_OK)).Times(1);
+ am_Error_e error = env->mpPlugin->asyncSetSourceNotificationConfiguration(handle, TEST_ID_1, nc);
+ usleep(50000);
+ ASSERT_EQ( error, E_OK );
+ ASSERT_FALSE( backdoor.containsHandle( handle.handle) );
+ }
+
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingSenderCAPITests, TestDomain_asyncSetVolumes)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ IAmRoutingSenderBackdoor backdoor(env->mpPlugin);
+ ASSERT_TRUE( backdoor.containsDomainWithID( TEST_ID_1) );
+ ASSERT_TRUE( backdoor.containsSourceWithID( TEST_ID_1) );
+
+ am_gen::am_Volumes_l listVolumes;
+ am_gen::am_DataType_u dt(static_cast<am_gen::am_sourceID_t>(TEST_ID_1));
+ listVolumes.push_back(am_gen::am_Volumes_s(am_gen::am_VolumeType_e::VT_SOURCE,
+ dt,
+ 50,
+ am_gen::am_RampType_e::RAMP_GENIVI_DIRECT,
+ 50));
+
+ std::vector<am_Volumes_s> am_listVolumes;
+ am_DataType_u dt1;
+ dt1.source = TEST_ID_2;
+ am_listVolumes.push_back((am_Volumes_s){am_VolumeType_e::VT_SOURCE,
+ dt1,
+ 50,
+ am_RampType_e::RAMP_GENIVI_DIRECT,
+ 50});
+
+ am_Handle_s handle = {H_SETVOLUMES, 200};
+ EXPECT_CALL(*env->mpRoutingReceive, ackSetVolumes(IsHandleStructEqualTo(handle), IsSinkVolumeArrayEqualTo(am_listVolumes, false), E_OK)).Times(1);
+ am_Error_e error = env->mpPlugin->asyncSetVolumes(handle, am_listVolumes);
+
+ usleep(50000);
+ ASSERT_EQ( error, E_OK );
+ ASSERT_FALSE( backdoor.containsHandle( handle.handle) );
+
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingSenderCAPITests, TestDomain_deregisterSink)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_gen::am_Error_e error = am_gen::am_Error_e::E_UNKNOWN;
+ am_gen:am_sinkID_t sinkID = TEST_ID_2;
+
+ IAmRoutingSenderBackdoor backdoor(env->mpPlugin);
+ ASSERT_TRUE( backdoor.containsSinkWithID( sinkID ));
+
+ ON_CALL(*env->mpRoutingReceive, deregisterSink(_)).WillByDefault(Return(E_OK));
+ EXPECT_CALL(*env->mpRoutingReceive, deregisterSink(sinkID)).WillOnce(Return(E_OK));
+ env->mProxy->deregisterSink(sinkID, callStatus, error);
+ usleep(50000);
+ ASSERT_EQ( error, am_gen::am_Error_e::E_OK );
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ ASSERT_FALSE( backdoor.containsSinkWithID( sinkID ));
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingSenderCAPITests, TestDomain_deregisterSource)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_gen::am_Error_e error = am_gen::am_Error_e::E_UNKNOWN;
+ am_gen:am_sourceID_t sID = TEST_ID_2;
+
+ IAmRoutingSenderBackdoor backdoor(env->mpPlugin);
+ ASSERT_TRUE( backdoor.containsSourceWithID( sID ));
+
+ ON_CALL(*env->mpRoutingReceive, deregisterSource(_)).WillByDefault(Return(E_OK));
+ EXPECT_CALL(*env->mpRoutingReceive, deregisterSource(sID)).WillOnce(Return(E_OK));
+ env->mProxy->deregisterSource(sID, callStatus, error);
+ usleep(50000);
+ ASSERT_EQ( error, am_gen::am_Error_e::E_OK );
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ ASSERT_FALSE( backdoor.containsSourceWithID( sID ));
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingSenderCAPITests, TestDomain_deregisterCrossfader)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_gen::am_Error_e error = am_gen::am_Error_e::E_UNKNOWN;
+ am_gen:am_crossfaderID_t sID = TEST_ID_1;
+
+ IAmRoutingSenderBackdoor backdoor(env->mpPlugin);
+ ASSERT_TRUE( backdoor.containsCrossfader( sID ));
+
+ ON_CALL(*env->mpRoutingReceive, deregisterCrossfader(_)).WillByDefault(Return(E_OK));
+ EXPECT_CALL(*env->mpRoutingReceive, deregisterCrossfader(sID)).WillOnce(Return(E_OK));
+ env->mProxy->deregisterCrossfader(sID, callStatus, error);
+ usleep(50000);
+ ASSERT_EQ( error, am_gen::am_Error_e::E_OK );
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ ASSERT_FALSE( backdoor.containsCrossfader( sID ));
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
+
+TEST_F(CAmRoutingSenderCAPITests, TestDomain_deregisterDomain)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ IAmRoutingSenderBackdoor backdoor(env->mpPlugin);
+ ASSERT_TRUE( backdoor.containsDomainWithID( TEST_ID_2 ));
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE;
+ am_gen::am_Error_e error = am_gen::am_Error_e::E_UNKNOWN;
+
+ ON_CALL(*env->mpRoutingReceive, deregisterDomain(_)).WillByDefault(Return(E_OK));
+ EXPECT_CALL(*env->mpRoutingReceive, deregisterDomain(TEST_ID_2)).WillOnce(Return(E_OK));
+ env->mProxy->deregisterDomain(TEST_ID_2, callStatus, error);
+ usleep(50000);
+ ASSERT_EQ( error, am_gen::am_Error_e::E_OK );
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ ASSERT_EQ( backdoor.domainsCount(), 1 );
+ ASSERT_FALSE( backdoor.containsDomainWithID( TEST_ID_2 ));
+
+ EXPECT_CALL(*env->mpRoutingReceive, deregisterDomain(TEST_ID_1)).WillOnce(Return(E_OK));
+ env->mProxy->deregisterDomain(TEST_ID_1, callStatus, error);
+ usleep(50000);
+ ASSERT_EQ( error, am_gen::am_Error_e::E_OK );
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ ASSERT_FALSE( backdoor.containsDomainWithID( TEST_ID_1 ));
+ ASSERT_EQ( backdoor.domainsCount(), 0 );
+ ASSERT_EQ( backdoor.sourcesCount(), 0 );
+ ASSERT_EQ( backdoor.sinksCount(), 0 );
+ ASSERT_EQ( backdoor.crossfadersCount(), 0 );
+ ASSERT_EQ( backdoor.connectionsCount(), 0 );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
diff --git a/PluginRoutingInterfaceCAPI/test/CAmRoutingInterfaceCAPITests.h b/PluginRoutingInterfaceCAPI/test/CAmRoutingInterfaceCAPITests.h
new file mode 100644
index 0000000..ee7cc1d
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/test/CAmRoutingInterfaceCAPITests.h
@@ -0,0 +1,104 @@
+/**
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
+
+#ifndef ROUTINGINTERFACETEST_H_
+#define ROUTINGINTERFACETEST_H_
+
+#include "gtest/gtest.h"
+#include "gmock/gmock.h"
+#include "shared/CAmSocketHandler.h"
+#include "CAmTestCAPIWrapper.h"
+#include "../include/CAmRoutingSenderCAPI.h"
+#include "MockIAmRoutingReceive.h"
+#include <../src-gen/org/genivi/audiomanager/RoutingInterfaceProxy.h>
+
+#define UNIT_TEST 1
+
+using namespace testing;
+using namespace CommonAPI;
+namespace am {
+
+using namespace org::genivi::audiomanager;
+
+class CAmCommandSenderDbusBackdoor;
+class IAmCommandSend;
+class CAmRoutingSenderService;
+
+/** Global test environment which sets the routing interface service and test domain service for all tests.
+ * The tests are executed after the connection have been successful established.
+ * If the connection is not available for some reason all tests will fail.
+ */
+class CAmTestsEnvironment : public ::testing::Environment
+{
+ pthread_t mListenerThread; ///< supporting sync thread
+ pthread_t mServicePThread; ///< plugin's thread
+ pthread_t mClientPThread; ///< thread for the routing interface proxy and test domain stub
+
+public:
+ bool mIsProxyInitilized;
+ bool mIsServiceAvailable;
+ bool mIsDomainAvailable;
+ CAmSocketHandler *mSocketHandlerService;
+ CAmSocketHandler *mSocketHandlerClient;
+ MockIAmRoutingReceive *mpRoutingReceive;
+ CAmRoutingSenderCAPI *mpPlugin;
+
+ std::shared_ptr<RoutingInterfaceProxy<>> mProxy; ///< pointer to routing interface proxy
+ std::shared_ptr<CAmRoutingSenderService> mDomainService; ///< pointer to the test domain service
+
+ CAmTestsEnvironment();
+ ~CAmTestsEnvironment();
+ void SetUp();
+ // Override this to define how to tear down the environment.
+ void TearDown();
+ void onServiceStatusEvent(const CommonAPI::AvailabilityStatus& serviceStatus);
+};
+
+/**
+ * Common tests - types and calls matching
+ */
+class CAmRoutingInterfaceCAPITests :public ::testing::Test
+{
+
+public:
+ CAmRoutingInterfaceCAPITests();
+ ~CAmRoutingInterfaceCAPITests();
+
+ void SetUp();
+ void TearDown();
+
+};
+
+/**
+ * Domain tests - connection to domain, registrations, deregistrations, lookups.
+ */
+class CAmRoutingSenderCAPITests :public ::testing::Test
+{
+
+public:
+ CAmRoutingSenderCAPITests();
+ ~CAmRoutingSenderCAPITests();
+
+ void SetUp();
+ void TearDown();
+
+};
+
+}
+
+#endif /* ROUTINGINTERFACETEST_H_ */
diff --git a/PluginRoutingInterfaceCAPI/test/CAmRoutingSenderService.cpp b/PluginRoutingInterfaceCAPI/test/CAmRoutingSenderService.cpp
new file mode 100644
index 0000000..3f2c7b3
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/test/CAmRoutingSenderService.cpp
@@ -0,0 +1,225 @@
+/**
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
+#include <stdint.h>
+#include <limits.h>
+#include "shared/CAmCommonAPIWrapper.h"
+#include "shared/CAmDltWrapper.h"
+#include "CAmRoutingSenderService.h"
+
+
+namespace am {
+
+#define CAPI_SENDER_ADDRESS "local:" CAPI_SENDER_INTERFACE ":" CAPI_SENDER_INSTANCE
+#define CAPI_ROUTING_ADDRESS "local:" CAPI_ROUTING_INTERFACE ":" CAPI_ROUTING_INSTANCE
+
+const char * CAmRoutingSenderService::ROUTING_SENDER_SERVICE = CAPI_SENDER_ADDRESS;
+const char * CAmRoutingSenderService::ROUTING_INTERFACE_SERVICE = CAPI_ROUTING_ADDRESS;
+
+CAmRoutingSenderService::CAmRoutingSenderService(CAmCommonAPIWrapper * aWrapper):
+ mDomainData(), mAbortedHandle(UINT_MAX), mIsDomainRegistred(false), mIsServiceAvailable(0), mIsReady(0), mpWrapper(aWrapper), mRoutingInterfaceProxy(NULL)
+{
+
+}
+
+CAmRoutingSenderService::CAmRoutingSenderService():
+ mDomainData(), mAbortedHandle(UINT_MAX), mIsDomainRegistred(false), mIsServiceAvailable(0), mIsReady(0), mpWrapper(NULL), mRoutingInterfaceProxy(NULL) {
+ // TODO Auto-generated constructor stub
+
+}
+
+CAmRoutingSenderService::CAmRoutingSenderService(CAmCommonAPIWrapper * aWrapper, std::shared_ptr<RoutingInterfaceProxy<> > aProxy):
+ mDomainData(), mAbortedHandle(UINT_MAX), mIsDomainRegistred(false), mIsServiceAvailable(0), mIsReady(0), mpWrapper(aWrapper), mRoutingInterfaceProxy(aProxy)
+{
+ mRoutingInterfaceProxy->getProxyStatusEvent().subscribe(std::bind(&CAmRoutingSenderService::onServiceStatusEvent,this,std::placeholders::_1));
+ mRoutingInterfaceProxy->getSetRoutingReadyEvent().subscribe(std::bind(&CAmRoutingSenderService::onRoutingReadyEvent,this));
+ mRoutingInterfaceProxy->getSetRoutingRundownEvent().subscribe(std::bind(&CAmRoutingSenderService::onRoutingReadyRundown,this));
+}
+
+CAmRoutingSenderService::~CAmRoutingSenderService() {
+ mpWrapper = NULL;
+ if(mRoutingInterfaceProxy)
+ mRoutingInterfaceProxy.reset();
+}
+
+void CAmRoutingSenderService::onServiceStatusEvent(const CommonAPI::AvailabilityStatus& serviceStatus)
+{
+ logInfo(__PRETTY_FUNCTION__);
+ std::stringstream avail;
+ avail << "(" << static_cast<int>(serviceStatus) << ")";
+ logInfo("Domain test service status changed to ", avail.str());
+ std::cout << std::endl << "Domain test service status changed to " << avail.str() << std::endl;
+ if(serviceStatus==CommonAPI::AvailabilityStatus::AVAILABLE)
+ {
+ mIsServiceAvailable = true;
+ CommonAPI::CallStatus callStatus;
+ mRoutingInterfaceProxy->getRoutingReadyState(callStatus, mIsReady);
+ }
+ else
+ {
+ mIsDomainRegistred = false;
+ mIsServiceAvailable = false;
+ mIsReady = false;
+ }
+}
+
+void CAmRoutingSenderService::onRoutingReadyEvent()
+{
+ logInfo(__PRETTY_FUNCTION__);
+ mIsReady = true;
+}
+
+void CAmRoutingSenderService::onRoutingReadyRundown()
+{
+ logInfo(__PRETTY_FUNCTION__);
+ mIsReady = true;
+ mIsDomainRegistred = false;
+}
+
+void CAmRoutingSenderService::setAbortHandle(uint16_t handle)
+{
+ mAbortedHandle = handle;
+}
+
+void CAmRoutingSenderService::registerDomain()
+{
+ if( mIsDomainRegistred || !mIsServiceAvailable || !mIsReady )
+ return;
+ mIsDomainRegistred = true;
+ logInfo(__PRETTY_FUNCTION__,"start registering Domain...");
+ am_gen::am_Error_e error;
+ mDomainData.name = "TestDomain";
+ mDomainData.busname ="TestDomain";
+ mDomainData.complete = true;
+ mDomainData.domainID = 0;
+ mDomainData.early = false;
+ mDomainData.nodename = "Test";
+ mDomainData.state = am_gen::am_DomainState_e::DS_CONTROLLED;
+ CommonAPI::CallStatus callStatus;
+ mRoutingInterfaceProxy->registerDomain(mDomainData,
+ CAPI_SENDER_INSTANCE,
+ CAPI_SENDER_PATH,
+ CAPI_SENDER_INTERFACE,
+ callStatus,
+ mDomainData.domainID,
+ error);
+ logInfo("Domain: got domainID", mDomainData.domainID);
+}
+
+uint16_t CAmRoutingSenderService::errorForHandle(const uint16_t & handle)
+{
+ uint16_t error = E_OK;
+ if(handle==mAbortedHandle && mAbortedHandle!=UINT_MAX)
+ {
+ error = (uint16_t)am_gen::am_Error_e::E_ABORTED;
+ mAbortedHandle = UINT_MAX;
+ }
+ return error;
+}
+
+void CAmRoutingSenderService::asyncSetSourceState(uint16_t handle, am_gen::am_sourceID_t sourceID, am_gen::am_SourceState_e sourceState) {
+ logInfo(__FUNCTION__, " called");
+ CommonAPI::CallStatus callStatus;
+ mRoutingInterfaceProxy->ackSetSourceState(handle, errorForHandle(handle), callStatus);
+}
+
+void CAmRoutingSenderService::setDomainState(am_gen::am_domainID_t domainID, am_gen::am_DomainState_e domainState, am_gen::am_Error_e& error) {
+ logInfo(__FUNCTION__, " called");
+ CommonAPI::CallStatus callStatus;
+ error = am_gen::am_Error_e::E_OK;
+ mRoutingInterfaceProxy->hookDomainStateChange(domainID, domainState, callStatus);
+}
+
+void CAmRoutingSenderService::asyncSetSourceVolume(am_gen::am_handle_t handle, am_gen::am_sourceID_t sourceID, am_gen::am_volume_t volume, am_gen::am_RampType_e ramp, am_gen::am_time_t time) {
+ logInfo(__FUNCTION__, " called");
+ CommonAPI::CallStatus callStatus;
+ mRoutingInterfaceProxy->ackSetSourceVolume(handle, volume, errorForHandle(handle), callStatus);
+}
+
+void CAmRoutingSenderService::asyncSetSinkVolume(am_gen::am_handle_t handle, am_gen::am_sinkID_t sinkID, am_gen::am_volume_t volume, am_gen::am_RampType_e ramp, am_gen::am_time_t time) {
+ logInfo(__FUNCTION__, " called");
+ CommonAPI::CallStatus callStatus;
+ mRoutingInterfaceProxy->ackSetSinkVolume(handle, volume, errorForHandle(handle), callStatus);
+}
+
+void CAmRoutingSenderService::asyncConnect(am_gen::am_handle_t handle, am_gen::am_connectionID_t connectionID, am_gen::am_sourceID_t sourceID, am_gen::am_sinkID_t sinkID, am_gen::am_ConnectionFormat_e connectionFormat) {
+ logInfo(__FUNCTION__, " called");
+ CommonAPI::CallStatus callStatus;
+ mRoutingInterfaceProxy->ackConnect(handle, connectionID, errorForHandle(handle), callStatus);
+}
+
+void CAmRoutingSenderService::asyncDisconnect(am_gen::am_handle_t handle, am_gen::am_connectionID_t connectionID) {
+ logInfo(__FUNCTION__, " called");
+ CommonAPI::CallStatus callStatus;
+ mRoutingInterfaceProxy->ackDisconnect(handle, connectionID, errorForHandle(handle), callStatus);
+}
+
+void CAmRoutingSenderService::asyncAbort(am_gen::am_handle_t handle, am_gen::am_Error_e& error) {
+ logInfo(__FUNCTION__, " called");
+ mAbortedHandle = handle;
+ error = am_gen::am_Error_e::E_OK;
+}
+
+void CAmRoutingSenderService::asyncSetSinkSoundProperties(am_gen::am_handle_t handle, am_gen::am_sinkID_t sinkID, am_gen::am_SoundProperty_L listSoundProperties) {
+ logInfo(__FUNCTION__, " called");
+ CommonAPI::CallStatus callStatus;
+ mRoutingInterfaceProxy->ackSetSinkSoundProperties(handle, errorForHandle(handle), callStatus);
+}
+
+void CAmRoutingSenderService::asyncSetSinkSoundProperty(am_gen::am_handle_t handle, am_gen::am_sinkID_t sinkID, am_gen::am_SoundProperty_s soundProperty) {
+ logInfo(__FUNCTION__, " called");
+ CommonAPI::CallStatus callStatus;
+ mRoutingInterfaceProxy->ackSetSinkSoundProperty(handle, errorForHandle(handle), callStatus);
+}
+
+void CAmRoutingSenderService::asyncSetSourceSoundProperties(am_gen::am_handle_t handle, am_gen::am_sourceID_t sourceID, am_gen::am_SoundProperty_L listSoundProperties) {
+ logInfo(__FUNCTION__, " called");
+ CommonAPI::CallStatus callStatus;
+ mRoutingInterfaceProxy->ackSetSourceSoundProperties(handle, errorForHandle(handle), callStatus);
+}
+
+void CAmRoutingSenderService::asyncSetSourceSoundProperty(am_gen::am_handle_t handle, am_gen::am_sourceID_t sourceID, am_gen::am_SoundProperty_s soundProperty) {
+ logInfo(__FUNCTION__, " called");
+ CommonAPI::CallStatus callStatus;
+ mRoutingInterfaceProxy->ackSetSourceSoundProperty(handle, errorForHandle(handle), callStatus);
+}
+
+void CAmRoutingSenderService::asyncCrossFade(am_gen::am_handle_t handle, am_gen::am_crossfaderID_t crossfaderID, am_gen::am_HotSink_e hotSink, am_gen::am_RampType_e rampType, am_gen::am_time_t time) {
+ logInfo(__FUNCTION__, " called");
+ CommonAPI::CallStatus callStatus;
+ mRoutingInterfaceProxy->ackCrossFading(handle, hotSink, (am_gen::am_Error_e)errorForHandle(handle), callStatus);
+}
+
+void CAmRoutingSenderService::asyncSetVolumes(am_gen::am_handle_t handle, am_gen::am_Volumes_l volumes) {
+ logInfo(__FUNCTION__, " called");
+ CommonAPI::CallStatus callStatus;
+ mRoutingInterfaceProxy->ackSetVolumes(handle, volumes, errorForHandle(handle), callStatus);
+}
+
+void CAmRoutingSenderService::asyncSetSinkNotificationConfiguration(am_gen::am_handle_t handle, am_gen::am_sinkID_t sinkID, am_gen::am_NotificationConfiguration_s notificationConfiguration) {
+ logInfo(__FUNCTION__, " called");
+ CommonAPI::CallStatus callStatus;
+ mRoutingInterfaceProxy->ackSinkNotificationConfiguration(handle, errorForHandle(handle), callStatus);
+}
+
+void CAmRoutingSenderService::asyncSetSourceNotificationConfiguration(am_gen::am_handle_t handle, am_gen::am_sourceID_t sourceID, am_gen::am_NotificationConfiguration_s notificationConfiguration) {
+ logInfo(__FUNCTION__, " called");
+ CommonAPI::CallStatus callStatus;
+ mRoutingInterfaceProxy->ackSourceNotificationConfiguration(handle, errorForHandle(handle), callStatus);
+}
+
+} /* namespace org */
diff --git a/PluginRoutingInterfaceCAPI/test/CAmRoutingSenderService.h b/PluginRoutingInterfaceCAPI/test/CAmRoutingSenderService.h
new file mode 100644
index 0000000..36ae646
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/test/CAmRoutingSenderService.h
@@ -0,0 +1,112 @@
+/**
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
+#ifndef CAMROUTINGSENDERSERVICE_H_
+#define CAMROUTINGSENDERSERVICE_H_
+
+#include "audiomanagertypes.h"
+#include <org/genivi/audiomanager/RoutingSenderStubDefault.h>
+#include <org/genivi/audiomanager/RoutingInterfaceProxy.h>
+
+/**
+ * GENERATED FROM CMAKE. PLEASE USE cmake/CAmRoutingSenderService.h.in IF YOU WANT TO MAKE CHANGES.
+ */
+
+namespace am {
+
+using namespace CommonAPI;
+using namespace org::genivi::audiomanager;
+
+class CAmCommonAPIWrapper;
+
+/**
+ * THE FOLLOWING DEFINES ARE POPULATED FROM THE CMAKELISTS.TXT .
+ */
+#define CAPI_SENDER_INTERFACE "org.genivi.audiomanger.routingsender"
+#define CAPI_SENDER_INSTANCE "org.genivi.routingsender"
+#define CAPI_SENDER_PATH "/org/genivi/audiomanger/routingsender"
+
+#define CAPI_ROUTING_INTERFACE "org.genivi.audiomanger.routinginterface"
+#define CAPI_ROUTING_INSTANCE "org.genivi.audiomanger"
+#define CAPI_ROUTING_PATH "/org/genivi/audiomanger/routinginterface"
+
+
+/** Test class implementing the routing sender service.
+*
+* Please see cmake/CAmRoutingSenderService.h.in
+*/
+class CAmRoutingSenderService : public RoutingSenderStubDefault {
+
+ am_gen::am_Domain_s mDomainData;
+ uint16_t mAbortedHandle;
+ bool mIsServiceAvailable;
+ bool mIsDomainRegistred;
+ bool mIsReady;
+ CAmCommonAPIWrapper *mpWrapper;
+ std::shared_ptr<RoutingInterfaceProxy<> > mRoutingInterfaceProxy;
+
+public:
+
+ CAmRoutingSenderService();
+ CAmRoutingSenderService(CAmCommonAPIWrapper * aWrapper);
+ CAmRoutingSenderService(CAmCommonAPIWrapper * aWrapper, std::shared_ptr<RoutingInterfaceProxy<> > aProxy);
+ virtual ~CAmRoutingSenderService();
+
+ void onServiceStatusEvent(const CommonAPI::AvailabilityStatus& serviceStatus);
+ void onRoutingReadyRundown();
+ void onRoutingReadyEvent();
+ void registerDomain();
+ void setAbortHandle(uint16_t handle);
+ uint16_t errorForHandle(const uint16_t & handle);
+
+ virtual void asyncSetSourceState(uint16_t handle, am_gen::am_sourceID_t sourceID, am_gen::am_SourceState_e sourceState);
+
+ virtual void setDomainState(am_gen::am_domainID_t domainID, am_gen::am_DomainState_e domainState, am_gen::am_Error_e& error);
+
+ virtual void asyncSetSourceVolume(am_gen::am_handle_t handle, am_gen::am_sourceID_t sourceID, am_gen::am_volume_t volume, am_gen::am_RampType_e ramp, am_gen::am_time_t time);
+
+ virtual void asyncSetSinkVolume(am_gen::am_handle_t handle, am_gen::am_sinkID_t sinkID, am_gen::am_volume_t volume, am_gen::am_RampType_e ramp, am_gen::am_time_t time);
+
+ virtual void asyncConnect(am_gen::am_handle_t handle, am_gen::am_connectionID_t connectionID, am_gen::am_sourceID_t sourceID, am_gen::am_sinkID_t sinkID, am_gen::am_ConnectionFormat_e connectionFormat);
+
+ virtual void asyncDisconnect(am_gen::am_handle_t handle, am_gen::am_connectionID_t connectionID);
+
+ virtual void asyncAbort(am_gen::am_handle_t handle, am_gen::am_Error_e& error);
+
+ virtual void asyncSetSinkSoundProperties(am_gen::am_handle_t handle, am_gen::am_sinkID_t sinkID, am_gen::am_SoundProperty_L listSoundProperties);
+
+ virtual void asyncSetSinkSoundProperty(am_gen::am_handle_t handle, am_gen::am_sinkID_t sinkID, am_gen::am_SoundProperty_s soundProperty);
+
+ virtual void asyncSetSourceSoundProperties(am_gen::am_handle_t handle, am_gen::am_sourceID_t sourceID, am_gen::am_SoundProperty_L listSoundProperties);
+
+ virtual void asyncSetSourceSoundProperty(am_gen::am_handle_t handle, am_gen::am_sourceID_t sourceID, am_gen::am_SoundProperty_s soundProperty);
+
+ virtual void asyncCrossFade(am_gen::am_handle_t handle, am_gen::am_crossfaderID_t crossfaderID, am_gen::am_HotSink_e hotSink, am_gen::am_RampType_e rampType, am_gen::am_time_t time);
+
+ virtual void asyncSetVolumes(am_gen::am_handle_t handle, am_gen::am_Volumes_l volumes);
+
+ virtual void asyncSetSinkNotificationConfiguration(am_gen::am_handle_t handle, am_gen::am_sinkID_t sinkID, am_gen::am_NotificationConfiguration_s notificationConfiguration);
+
+ virtual void asyncSetSourceNotificationConfiguration(am_gen::am_handle_t handle, am_gen::am_sourceID_t sourceID, am_gen::am_NotificationConfiguration_s notificationConfiguration);
+
+ static const char * ROUTING_SENDER_SERVICE;
+ static const char * ROUTING_INTERFACE_SERVICE;
+};
+
+
+} /* namespace am */
+#endif /* CAMROUTINGSENDERSERVICE_H_ */
diff --git a/PluginRoutingInterfaceCAPI/test/CAmTestCAPIWrapper.cpp b/PluginRoutingInterfaceCAPI/test/CAmTestCAPIWrapper.cpp
new file mode 100644
index 0000000..6134d62
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/test/CAmTestCAPIWrapper.cpp
@@ -0,0 +1,31 @@
+/**
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
+#include "CAmTestCAPIWrapper.h"
+
+namespace am {
+
+CAmTestCAPIWrapper::CAmTestCAPIWrapper(CAmSocketHandler* socketHandler):CAmCommonAPIWrapper(socketHandler)
+{
+
+}
+
+CAmTestCAPIWrapper::~CAmTestCAPIWrapper() {
+ // TODO Auto-generated destructor stub
+}
+
+} /* namespace am */
diff --git a/PluginRoutingInterfaceCAPI/test/CAmTestCAPIWrapper.h b/PluginRoutingInterfaceCAPI/test/CAmTestCAPIWrapper.h
new file mode 100644
index 0000000..90499f9
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/test/CAmTestCAPIWrapper.h
@@ -0,0 +1,32 @@
+/**
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
+#ifndef CAMTESTCAPIWRAPPER_H_
+#define CAMTESTCAPIWRAPPER_H_
+
+#include "shared/CAmCommonAPIWrapper.h"
+
+namespace am {
+
+class CAmTestCAPIWrapper: public am::CAmCommonAPIWrapper {
+public:
+ CAmTestCAPIWrapper(CAmSocketHandler* socketHandler);
+ virtual ~CAmTestCAPIWrapper();
+};
+
+} /* namespace am */
+#endif /* CAMTESTCAPIWRAPPER_H_ */
diff --git a/PluginRoutingInterfaceCAPI/test/CMakeLists.txt b/PluginRoutingInterfaceCAPI/test/CMakeLists.txt
new file mode 100644
index 0000000..26cdecf
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/test/CMakeLists.txt
@@ -0,0 +1,135 @@
+# Copyright (c) 2012 GENIVI Alliance
+# Copyright (c) 2012 BMW
+#
+# author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+#
+# copyright
+# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+# including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+# subject to the following conditions:
+# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+# THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# For further information see http://www.genivi.org/.
+#
+
+cmake_minimum_required(VERSION 2.6)
+
+PROJECT(CAmRoutingInterfaceCAPITests)
+
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w -g -DUNIT_TEST=1 -DDLT_CONTEXT=AudioManager")
+
+string (REPLACE "-g -Wall -Wextra" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+string (REPLACE "-pedantic" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+
+set(STD_INCLUDE_DIRS "/usr/include")
+set(EXECUTABLE_OUTPUT_PATH ${TEST_EXECUTABLE_OUTPUT_PATH})
+
+FIND_PACKAGE(Threads)
+FIND_PACKAGE(PkgConfig)
+FIND_PACKAGE(PythonLibs REQUIRED)
+pkg_check_modules(PC_COMMON REQUIRED CommonAPI)
+pkg_check_modules(PC_COMMON_DBUS REQUIRED CommonAPI-DBus)
+
+IF(WITH_DLT)
+ pkg_check_modules(DLT REQUIRED automotive-dlt>=2.2.0)
+ENDIF(WITH_DLT)
+
+INCLUDE_DIRECTORIES(
+ ${STD_INCLUDE_DIRS}
+ ${CMAKE_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${AUDIO_INCLUDE_FOLDER}
+ ${CMAKE_SOURCE_DIR}
+ ${DLT_INCLUDE_DIRS}
+ ${PC_COMMON_INCLUDE_DIRS}
+ ${PC_COMMON_DBUS_INCLUDE_DIRS}
+ ${INCLUDE_FOLDER}
+ ${PYTHON_INCLUDE_DIRS}
+ ${GOOGLE_TEST_INCLUDE_DIR}
+ ${GMOCK_INCLUDE_DIR}
+ "../../AudioManagerDaemon/include"
+ "../include"
+)
+
+link_directories(
+ ${LINK_DIRECTORIES}
+ ${PC_COMMON_LIBRARY_DIRS}
+ ${PC_COMMON_DBUS_LIBRARY_DIRS}
+)
+
+file(GLOB CAPI_PLUGIN_INTERFACE_SRCS_CXX
+ "../../AudioManagerDaemon/src/CAmCommonAPIWrapper.cpp"
+ "../../AudioManagerDaemon/src/CAmSocketHandler.cpp"
+ "../../AudioManagerDaemon/src/CAmDltWrapper.cpp"
+ "../src/*.cpp"
+ "CAmRoutingInterfaceCAPITests.cpp"
+ "CAmTestCAPIWrapper.cpp"
+ "CAmCommandSenderCommon.cpp"
+ "CAmRoutingSenderService.cpp"
+ "IAmRoutingSenderBackdoor.cpp"
+)
+
+file(GLOB_RECURSE CAPI_PLUGIN_INTERFACE_GEN_SRCS_CXX
+ "../src-gen/*.cpp"
+)
+
+set (CAPI_SENDER_INTERFACE "org.genivi.audiomanger.routingsender")
+set (CAPI_SENDER_INSTANCE "org.genivi.routingsender")
+set (CAPI_SENDER_PATH "/org/genivi/audiomanger/routingsender")
+
+set (CAPI_SENDER_INTERFACE_H "\"${CAPI_SENDER_INTERFACE}\"")
+set (CAPI_SENDER_INSTANCE_H "\"${CAPI_SENDER_INSTANCE}\"")
+set (CAPI_SENDER_PATH_H "\"${CAPI_SENDER_PATH}\"")
+
+set (CAPI_ROUTING_INTERFACE "org.genivi.audiomanger.routinginterface")
+set (CAPI_ROUTING_INSTANCE "org.genivi.audiomanger")
+set (CAPI_ROUTING_PATH "/org/genivi/audiomanger/routinginterface")
+
+set (CAPI_ROUTING_INTERFACE_H "\"${CAPI_ROUTING_INTERFACE}\"")
+set (CAPI_ROUTING_INSTANCE_H "\"${CAPI_ROUTING_INSTANCE}\"")
+set (CAPI_ROUTING_PATH_H "\"${CAPI_ROUTING_PATH}\"")
+
+
+ADD_EXECUTABLE(AmRoutingInterfaceCAPITests ${CAPI_PLUGIN_INTERFACE_SRCS_CXX} ${CAPI_PLUGIN_INTERFACE_GEN_SRCS_CXX})
+
+TARGET_LINK_LIBRARIES(AmRoutingInterfaceCAPITests
+ ${DLT_LIBRARIES}
+ ${CMAKE_DL_LIBS}
+ ${CMAKE_THREAD_LIBS_INIT}
+ ${PYTHON_LIBRARY}
+ ${PC_GSTREAMER_LIBRARIES}
+ ${PC_COMMON_LIBRARIES}
+ ${PC_COMMON_DBUS_LIBRARIES}
+ gtest
+ gmock
+)
+
+add_custom_command(
+ PRE_BUILD
+ OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/CAmRoutingSenderService.h
+ COMMAND generateheader ${CMAKE_CURRENT_SOURCE_DIR}/cmake/CAmRoutingSenderService.h.in ${CMAKE_CURRENT_SOURCE_DIR}/CAmRoutingSenderService.h
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/cmake/CAmRoutingSenderService.h.in
+)
+
+CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/RoutingSender_dbus.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/RoutingSender_dbus.conf)
+CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/CAmRoutingSenderService.h.in ${CMAKE_CURRENT_SOURCE_DIR}/CAmRoutingSenderService.h)
+
+FILE(READ ${CMAKE_CURRENT_SOURCE_DIR}/RoutingSender_dbus.conf ROUTING_TESTDOMAININTERFACE_DBUS_CONF)
+CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/AmRoutingInterfaceCAPITests_dbus.conf.in ${EXECUTABLE_OUTPUT_PATH}/AmRoutingInterfaceCAPITests_dbus.conf)
+CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/AmRoutingInterfaceCAPITests_dbus.conf.in ${EXECUTABLE_OUTPUT_PATH}/AmRoutingSenderTestDomain_dbus.conf)
+
+INSTALL(TARGETS AmRoutingInterfaceCAPITests
+ DESTINATION "~/AudioManagerTest/"
+ PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ
+ COMPONENT tests
+)
+
+#execute_process(
+# COMMAND cp "${CMAKE_SOURCE_DIR}/PluginCommandInterfaceCAPI/fidls/PluginCommandInterfaceCAPI_dbus.conf" ${EXECUTABLE_OUTPUT_PATH})
+
+SET(ADD_DEPEND "audiomanager-bin" "sqlite3(>=3.6.22)" "dlt" "gtest" "libpthread-stubs0")
+set_property(GLOBAL APPEND PROPERTY tests_prop "${ADD_DEPEND}")
+
diff --git a/PluginRoutingInterfaceCAPI/test/IAmRoutingSenderBackdoor.cpp b/PluginRoutingInterfaceCAPI/test/IAmRoutingSenderBackdoor.cpp
new file mode 100644
index 0000000..945a5e9
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/test/IAmRoutingSenderBackdoor.cpp
@@ -0,0 +1,87 @@
+/**
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
+#include "IAmRoutingSenderBackdoor.h"
+#include "../include/CAmRoutingSenderCAPI.h"
+
+
+namespace am {
+
+bool IAmRoutingSenderBackdoor::containsDomainWithID(const am_domainID_t & domainID)
+{
+ return NULL!=routingSender->mLookupData.getValueForKey(domainID, routingSender->mLookupData.mMapDomains);
+}
+
+bool IAmRoutingSenderBackdoor::containsSourceWithID(const am_sourceID_t & sourceID)
+{
+ return NULL!=routingSender->mLookupData.getValueForKey(sourceID, routingSender->mLookupData.mMapSources);
+}
+
+bool IAmRoutingSenderBackdoor::containsSinkWithID(const am_sinkID_t & sinkID)
+{
+ return NULL!=routingSender->mLookupData.getValueForKey(sinkID, routingSender->mLookupData.mMapSinks);
+}
+
+bool IAmRoutingSenderBackdoor::containsCrossfader(const am_crossfaderID_t & crossfaderID)
+{
+ return routingSender->mLookupData.mMapCrossfaders.find(crossfaderID)!=routingSender->mLookupData.mMapCrossfaders.end();
+}
+
+bool IAmRoutingSenderBackdoor::containsHandle(const uint16_t & handle)
+{
+ return routingSender->mLookupData.mMapHandles.find(handle)!=routingSender->mLookupData.mMapHandles.end();
+}
+
+bool IAmRoutingSenderBackdoor::containsConnection(const am_connectionID_t & connID)
+{
+ return NULL!=routingSender->mLookupData.getValueForKey(connID, routingSender->mLookupData.mMapConnections);
+}
+
+unsigned IAmRoutingSenderBackdoor::domainsCount()
+{
+ return routingSender->mLookupData.mMapDomains.size();
+}
+
+unsigned IAmRoutingSenderBackdoor::sourcesCount()
+{
+ return routingSender->mLookupData.mMapSources.size();
+}
+
+unsigned IAmRoutingSenderBackdoor::sinksCount()
+{
+ return routingSender->mLookupData.mMapSinks.size();
+}
+
+unsigned IAmRoutingSenderBackdoor::crossfadersCount()
+{
+ return routingSender->mLookupData.mMapCrossfaders.size();
+}
+
+unsigned IAmRoutingSenderBackdoor::handlesCount()
+{
+ return routingSender->mLookupData.mMapHandles.size();
+}
+
+unsigned IAmRoutingSenderBackdoor::connectionsCount()
+{
+ return routingSender->mLookupData.mMapConnections.size();
+}
+
+
+}
+
+
diff --git a/PluginRoutingInterfaceCAPI/test/IAmRoutingSenderBackdoor.h b/PluginRoutingInterfaceCAPI/test/IAmRoutingSenderBackdoor.h
new file mode 100644
index 0000000..80d0f4e
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/test/IAmRoutingSenderBackdoor.h
@@ -0,0 +1,53 @@
+/**
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
+
+#ifndef ROUTINGSENDERINTERFACEBACKDOOR_H_
+#define ROUTINGSENDERINTERFACEBACKDOOR_H_
+
+#include "audiomanagertypes.h"
+
+namespace am
+{
+
+class CAmRoutingSenderCAPI;
+
+class IAmRoutingSenderBackdoor
+{
+ CAmRoutingSenderCAPI *routingSender;
+public:
+ IAmRoutingSenderBackdoor():routingSender(NULL){};
+ IAmRoutingSenderBackdoor(CAmRoutingSenderCAPI *aSender):routingSender(aSender){};
+ virtual ~IAmRoutingSenderBackdoor(){routingSender=NULL;};
+
+ bool containsDomainWithID(const am_domainID_t & domainID);
+ bool containsSourceWithID(const am_sourceID_t & sourceID);
+ bool containsSinkWithID(const am_sinkID_t & sinkID);
+ bool containsCrossfader(const am_crossfaderID_t & crossfaderID);
+ bool containsHandle(const uint16_t & handle);
+ bool containsConnection(const am_connectionID_t & connID);
+ unsigned domainsCount();
+ unsigned sourcesCount();
+ unsigned sinksCount();
+ unsigned crossfadersCount();
+ unsigned handlesCount();
+ unsigned connectionsCount();
+};
+
+}
+
+#endif /* ROUTINGSENDERINTERFACEBACKDOOR_H_ */
diff --git a/PluginRoutingInterfaceCAPI/test/MockIAmRoutingReceive.h b/PluginRoutingInterfaceCAPI/test/MockIAmRoutingReceive.h
new file mode 100644
index 0000000..77cded1
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/test/MockIAmRoutingReceive.h
@@ -0,0 +1,126 @@
+/**
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
+#ifndef MOCKROUTINGRECEIVENTERFACE_H_
+#define MOCKROUTINGRECEIVENTERFACE_H_
+
+#include "routing/IAmRoutingReceive.h"
+#include "gtest/gtest.h"
+#include "gmock/gmock.h"
+
+namespace am {
+
+class MockIAmRoutingReceive : public IAmRoutingReceive {
+ public:
+ MOCK_CONST_METHOD1(getInterfaceVersion,
+ void(std::string& version));
+ MOCK_METHOD3(ackConnect,
+ void(const am_Handle_s handle, const am_connectionID_t connectionID, const am_Error_e error));
+ MOCK_METHOD3(ackDisconnect,
+ void(const am_Handle_s handle, const am_connectionID_t connectionID, const am_Error_e error));
+ MOCK_METHOD3(ackSetSinkVolumeChange,
+ void(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error));
+ MOCK_METHOD3(ackSetSourceVolumeChange,
+ 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,
+ void(const am_Handle_s handle, const am_HotSink_e hotSink, const am_Error_e error));
+ MOCK_METHOD3(ackSourceVolumeTick,
+ void(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume));
+ MOCK_METHOD3(ackSinkVolumeTick,
+ void(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume));
+ MOCK_METHOD2(peekDomain,
+ am_Error_e(const std::string& name, am_domainID_t& domainID));
+ MOCK_METHOD2(registerDomain,
+ am_Error_e(const am_Domain_s& domainData, am_domainID_t& domainID));
+ MOCK_METHOD1(deregisterDomain,
+ am_Error_e(const am_domainID_t domainID));
+ MOCK_METHOD2(registerGateway,
+ am_Error_e(const am_Gateway_s& gatewayData, am_gatewayID_t& gatewayID));
+ MOCK_METHOD1(deregisterGateway,
+ am_Error_e(const am_gatewayID_t gatewayID));
+ MOCK_METHOD2(peekSink,
+ am_Error_e(const std::string& name, am_sinkID_t& sinkID));
+ MOCK_METHOD2(registerSink,
+ am_Error_e(const am_Sink_s& sinkData, am_sinkID_t& sinkID));
+ MOCK_METHOD1(deregisterSink,
+ am_Error_e(const am_sinkID_t sinkID));
+ MOCK_METHOD2(peekSource,
+ am_Error_e(const std::string& name, am_sourceID_t& sourceID));
+ MOCK_METHOD2(registerSource,
+ am_Error_e(const am_Source_s& sourceData, am_sourceID_t& sourceID));
+ MOCK_METHOD1(deregisterSource,
+ am_Error_e(const am_sourceID_t sourceID));
+ MOCK_METHOD2(registerCrossfader,
+ am_Error_e(const am_Crossfader_s& crossfaderData, am_crossfaderID_t& crossfaderID));
+ MOCK_METHOD1(deregisterCrossfader,
+ am_Error_e(const am_crossfaderID_t crossfaderID));
+ MOCK_METHOD2(peekSourceClassID,
+ am_Error_e(const std::string& name, am_sourceClass_t& sourceClassID));
+ MOCK_METHOD2(peekSinkClassID,
+ am_Error_e(const std::string& name, am_sinkClass_t& sinkClassID));
+ MOCK_METHOD2(hookInterruptStatusChange,
+ void(const am_sourceID_t sourceID, const am_InterruptState_e interruptState));
+ MOCK_METHOD1(hookDomainRegistrationComplete,
+ void(const am_domainID_t domainID));
+ MOCK_METHOD2(hookSinkAvailablityStatusChange,
+ void(const am_sinkID_t sinkID, const am_Availability_s& availability));
+ MOCK_METHOD2(hookSourceAvailablityStatusChange,
+ void(const am_sourceID_t sourceID, const am_Availability_s& availability));
+ MOCK_METHOD2(hookDomainStateChange,
+ void(const am_domainID_t domainID, const am_DomainState_e domainState));
+ MOCK_METHOD2(hookTimingInformationChanged,
+ void(const am_connectionID_t connectionID, const am_timeSync_t delay));
+ MOCK_METHOD1(sendChangedData,
+ void(const std::vector<am_EarlyData_s>& earlyData));
+ MOCK_CONST_METHOD1(getDBusConnectionWrapper,
+ am_Error_e(CAmDbusWrapper*& dbusConnectionWrapper));
+ MOCK_CONST_METHOD1(getSocketHandler,
+ am_Error_e(CAmSocketHandler*& socketHandler));
+ MOCK_METHOD2(confirmRoutingReady,
+ void(const uint16_t handle, const am_Error_e error));
+ MOCK_METHOD2(confirmRoutingRundown,
+ void(const uint16_t handle, const am_Error_e error));
+ MOCK_METHOD4(updateGateway,
+ am_Error_e(const am_gatewayID_t gatewayID, const std::vector<am_ConnectionFormat_e>& listSourceFormats, const std::vector<am_ConnectionFormat_e>& listSinkFormats, const std::vector<bool>& convertionMatrix));
+ MOCK_METHOD5(updateSink,
+ am_Error_e(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_ConnectionFormat_e>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties));
+ MOCK_METHOD5(updateSource,
+ am_Error_e(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_ConnectionFormat_e>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties));
+ MOCK_METHOD3(ackSetVolumes,
+ void(const am_Handle_s handle, const std::vector<am_Volumes_s>& listvolumes, const am_Error_e error));
+ MOCK_METHOD2(ackSinkNotificationConfiguration,
+ void(const am_Handle_s handle, const am_Error_e error));
+ MOCK_METHOD2(ackSourceNotificationConfiguration,
+ void(const am_Handle_s handle, const am_Error_e error));
+ MOCK_METHOD2(hookSinkNotificationDataChange,
+ void(const am_sinkID_t sinkID, const am_NotificationPayload_s& payload));
+ MOCK_METHOD2(hookSourceNotificationDataChange,
+ void(const am_sourceID_t sourceID, const am_NotificationPayload_s& payload));
+};
+
+} // namespace am
+#endif /* MOCKROUTINGRECEIVENTERFACE_H_ */
diff --git a/PluginRoutingInterfaceCAPI/test/RoutingSender_dbus.conf b/PluginRoutingInterfaceCAPI/test/RoutingSender_dbus.conf
new file mode 100755
index 0000000..f54fdd7
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/test/RoutingSender_dbus.conf
@@ -0,0 +1,8 @@
+##################################### Routing Test Domain Interface configuration ################################
+# RoutingSender_dbus.conf #
+# If you change something make sure you re-configure with 'ccmake..' which generates the *_dbus.conf file again. #
+##################################################################################################################
+[local:org.genivi.audiomanger.routingsender:org.genivi.routingsender]
+dbus_connection=org.genivi.routingsender
+dbus_object=/org/genivi/audiomanger/routingsender
+dbus_interface=org.genivi.audiomanger.routingsender
diff --git a/PluginRoutingInterfaceCAPI/test/cmake/AmRoutingInterfaceCAPITests_dbus.conf.in b/PluginRoutingInterfaceCAPI/test/cmake/AmRoutingInterfaceCAPITests_dbus.conf.in
new file mode 100755
index 0000000..95d09b2
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/test/cmake/AmRoutingInterfaceCAPITests_dbus.conf.in
@@ -0,0 +1,3 @@
+@ROUTING_INTERFACE_DBUS_CONF@
+
+@ROUTING_TESTDOMAININTERFACE_DBUS_CONF@ \ No newline at end of file
diff --git a/PluginRoutingInterfaceCAPI/test/cmake/CAmRoutingSenderService.h.in b/PluginRoutingInterfaceCAPI/test/cmake/CAmRoutingSenderService.h.in
new file mode 100644
index 0000000..2b23745
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/test/cmake/CAmRoutingSenderService.h.in
@@ -0,0 +1,112 @@
+/**
+ * Copyright (c) 2012 BMW
+ *
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
+#ifndef CAMROUTINGSENDERSERVICE_H_
+#define CAMROUTINGSENDERSERVICE_H_
+
+#include "audiomanagertypes.h"
+#include <org/genivi/audiomanager/RoutingSenderStubDefault.h>
+#include <org/genivi/audiomanager/RoutingInterfaceProxy.h>
+
+/**
+ * GENERATED FROM CMAKE. PLEASE USE cmake/CAmRoutingSenderService.h.in IF YOU WANT TO MAKE CHANGES.
+ */
+
+namespace am {
+
+using namespace CommonAPI;
+using namespace org::genivi::audiomanager;
+
+class CAmCommonAPIWrapper;
+
+/**
+ * THE FOLLOWING DEFINES ARE POPULATED FROM THE CMAKELISTS.TXT .
+ */
+#define CAPI_SENDER_INTERFACE @CAPI_SENDER_INTERFACE_H@
+#define CAPI_SENDER_INSTANCE @CAPI_SENDER_INSTANCE_H@
+#define CAPI_SENDER_PATH @CAPI_SENDER_PATH_H@
+
+#define CAPI_ROUTING_INTERFACE @CAPI_ROUTING_INTERFACE_H@
+#define CAPI_ROUTING_INSTANCE @CAPI_ROUTING_INSTANCE_H@
+#define CAPI_ROUTING_PATH @CAPI_ROUTING_PATH_H@
+
+
+/** Test class implementing the routing sender service.
+*
+* Please see cmake/CAmRoutingSenderService.h.in
+*/
+class CAmRoutingSenderService : public RoutingSenderStubDefault {
+
+ am_gen::am_Domain_s mDomainData;
+ uint16_t mAbortedHandle;
+ bool mIsServiceAvailable;
+ bool mIsDomainRegistred;
+ bool mIsReady;
+ CAmCommonAPIWrapper *mpWrapper;
+ std::shared_ptr<RoutingInterfaceProxy<> > mRoutingInterfaceProxy;
+
+public:
+
+ CAmRoutingSenderService();
+ CAmRoutingSenderService(CAmCommonAPIWrapper * aWrapper);
+ CAmRoutingSenderService(CAmCommonAPIWrapper * aWrapper, std::shared_ptr<RoutingInterfaceProxy<> > aProxy);
+ virtual ~CAmRoutingSenderService();
+
+ void onServiceStatusEvent(const CommonAPI::AvailabilityStatus& serviceStatus);
+ void onRoutingReadyRundown();
+ void onRoutingReadyEvent();
+ void registerDomain();
+ void setAbortHandle(uint16_t handle);
+ uint16_t errorForHandle(const uint16_t & handle);
+
+ virtual void asyncSetSourceState(uint16_t handle, am_gen::am_sourceID_t sourceID, am_gen::am_SourceState_e sourceState);
+
+ virtual void setDomainState(am_gen::am_domainID_t domainID, am_gen::am_DomainState_e domainState, am_gen::am_Error_e& error);
+
+ virtual void asyncSetSourceVolume(am_gen::am_handle_t handle, am_gen::am_sourceID_t sourceID, am_gen::am_volume_t volume, am_gen::am_RampType_e ramp, am_gen::am_time_t time);
+
+ virtual void asyncSetSinkVolume(am_gen::am_handle_t handle, am_gen::am_sinkID_t sinkID, am_gen::am_volume_t volume, am_gen::am_RampType_e ramp, am_gen::am_time_t time);
+
+ virtual void asyncConnect(am_gen::am_handle_t handle, am_gen::am_connectionID_t connectionID, am_gen::am_sourceID_t sourceID, am_gen::am_sinkID_t sinkID, am_gen::am_ConnectionFormat_e connectionFormat);
+
+ virtual void asyncDisconnect(am_gen::am_handle_t handle, am_gen::am_connectionID_t connectionID);
+
+ virtual void asyncAbort(am_gen::am_handle_t handle, am_gen::am_Error_e& error);
+
+ virtual void asyncSetSinkSoundProperties(am_gen::am_handle_t handle, am_gen::am_sinkID_t sinkID, am_gen::am_SoundProperty_L listSoundProperties);
+
+ virtual void asyncSetSinkSoundProperty(am_gen::am_handle_t handle, am_gen::am_sinkID_t sinkID, am_gen::am_SoundProperty_s soundProperty);
+
+ virtual void asyncSetSourceSoundProperties(am_gen::am_handle_t handle, am_gen::am_sourceID_t sourceID, am_gen::am_SoundProperty_L listSoundProperties);
+
+ virtual void asyncSetSourceSoundProperty(am_gen::am_handle_t handle, am_gen::am_sourceID_t sourceID, am_gen::am_SoundProperty_s soundProperty);
+
+ virtual void asyncCrossFade(am_gen::am_handle_t handle, am_gen::am_crossfaderID_t crossfaderID, am_gen::am_HotSink_e hotSink, am_gen::am_RampType_e rampType, am_gen::am_time_t time);
+
+ virtual void asyncSetVolumes(am_gen::am_handle_t handle, am_gen::am_Volumes_l volumes);
+
+ virtual void asyncSetSinkNotificationConfiguration(am_gen::am_handle_t handle, am_gen::am_sinkID_t sinkID, am_gen::am_NotificationConfiguration_s notificationConfiguration);
+
+ virtual void asyncSetSourceNotificationConfiguration(am_gen::am_handle_t handle, am_gen::am_sourceID_t sourceID, am_gen::am_NotificationConfiguration_s notificationConfiguration);
+
+ static const char * ROUTING_SENDER_SERVICE;
+ static const char * ROUTING_INTERFACE_SERVICE;
+};
+
+
+} /* namespace am */
+#endif /* CAMROUTINGSENDERSERVICE_H_ */
diff --git a/PluginRoutingInterfaceCAPI/test/cmake/RoutingSender_dbus.conf.in b/PluginRoutingInterfaceCAPI/test/cmake/RoutingSender_dbus.conf.in
new file mode 100755
index 0000000..bcd29a6
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/test/cmake/RoutingSender_dbus.conf.in
@@ -0,0 +1,8 @@
+##################################### Routing Test Domain Interface configuration ################################
+# RoutingSender_dbus.conf #
+# If you change something make sure you re-configure with 'ccmake..' which generates the *_dbus.conf file again. #
+##################################################################################################################
+[local:@CAPI_SENDER_INTERFACE@:@CAPI_SENDER_INSTANCE@]
+dbus_connection=@CAPI_SENDER_INSTANCE@
+dbus_object=@CAPI_SENDER_PATH@
+dbus_interface=@CAPI_SENDER_INTERFACE@ \ No newline at end of file
diff --git a/PluginRoutingInterfaceCAPI/test/cmake/config.cmake b/PluginRoutingInterfaceCAPI/test/cmake/config.cmake
new file mode 100644
index 0000000..b2ef0b2
--- /dev/null
+++ b/PluginRoutingInterfaceCAPI/test/cmake/config.cmake
@@ -0,0 +1,8 @@
+#ifndef _ROUTINGDBUS_CONFIG_H
+#define _ROUTINGDBUS_CONFIG_H
+
+#cmakedefine CAPI_SENDER_INTERFACE "@CAPI_SENDER_INTERFACE@"
+#cmakedefine CAPI_SENDER_INSTANCE "@CAPI_SENDER_INSTANCE@"
+#cmakedefine CAPI_SENDER_PATH "@CAPI_SENDER_PATH@"
+
+#endif /* _ROUTINGDBUS_CONFIG_H */
diff --git a/PluginRoutingInterfaceDbus/CMakeLists.txt b/PluginRoutingInterfaceDbus/CMakeLists.txt
index ec636c3..be7548c 100644
--- a/PluginRoutingInterfaceDbus/CMakeLists.txt
+++ b/PluginRoutingInterfaceDbus/CMakeLists.txt
@@ -60,7 +60,7 @@ INCLUDE_DIRECTORIES(
file(GLOB PLUGINDBUS_SRCS_CXX "src/*.cpp")
-add_library(PluginRoutingInterfaceDbus SHARED ${PLUGINDBUS_SRCS_CXX})
+add_library(PluginRoutingInterfaceDbus MODULE ${PLUGINDBUS_SRCS_CXX})
SET_TARGET_PROPERTIES(PluginRoutingInterfaceDbus PROPERTIES
SOVERSION "${LIB_INTERFACE_VERSION}"
@@ -109,4 +109,4 @@ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/RoutingReceiver.xml
SET(ADD_DEPEND "audiomanager-bin" "dlt" "libdbus-1-3(>=1.2.16)")
set_property(GLOBAL APPEND PROPERTY sampleplugins_prop "${ADD_DEPEND}")
-ENDIF(WITH_ROUTING_INTERFACE_DBUS)
+ENDIF()
diff --git a/PluginRoutingInterfaceDbus/include/CAmRoutingSenderDbus.h b/PluginRoutingInterfaceDbus/include/CAmRoutingSenderDbus.h
index 631ebd3..9530174 100644
--- a/PluginRoutingInterfaceDbus/include/CAmRoutingSenderDbus.h
+++ b/PluginRoutingInterfaceDbus/include/CAmRoutingSenderDbus.h
@@ -2,6 +2,7 @@
* Copyright (c) 2012 BMW
*
* \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
*
* \copyright
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
@@ -81,6 +82,8 @@ private:
typedef std::map<am_connectionID_t,rs_lookupData_s> mapConnections_t;
typedef std::map<uint16_t,rs_lookupData_s> mapHandles_t;
+ template <typename TKey> static void removeEntriesForValue(const rs_lookupData_s & value, std::map<TKey,rs_lookupData_s> & map);
+
mapDomain_t mMapDomains;
mapSinks_t mMapSinks;
mapSources_t mMapSources;
diff --git a/PluginRoutingInterfaceDbus/include/RoutingReceiver.xml b/PluginRoutingInterfaceDbus/include/RoutingReceiver.xml
index 291bdbd..cfdbf7c 100644
--- a/PluginRoutingInterfaceDbus/include/RoutingReceiver.xml
+++ b/PluginRoutingInterfaceDbus/include/RoutingReceiver.xml
@@ -73,6 +73,7 @@
<arg name="domainid" type="q" direction="out" />
<arg name="error" type="q" direction="out" />
</method>
+<!--check the parameters-->
<method name="deregisterDomain">
<arg name="handle" type="q" direction="in" />
<arg name="error" type="q" direction="in" />
@@ -144,19 +145,19 @@
</method>
<method name="hookSinkAvailablityStatusChange">
<arg name="sinkID" type="q" direction="in" />
- <arg name="availability" type="(nn)" direction="out"/>
+ <arg name="availability" type="(nn)" direction="in"/>
</method>
<method name="hookSourceAvailablityStatusChange">
<arg name="sourceID" type="q" direction="in" />
- <arg name="availability" type="(nn)" direction="out"/>
+ <arg name="availability" type="(nn)" direction="in"/>
</method>
<method name="hookDomainStateChange">
<arg name="domainID" type="q" direction="in" />
- <arg name="domainState" type="q" direction="out"/>
+ <arg name="domainState" type="q" direction="in"/>
</method>
<method name="hookTimingInformationChanged">
<arg name="connectionID" type="q" direction="in" />
- <arg name="delay" type="n" direction="out"/>
+ <arg name="delay" type="n" direction="in"/>
</method>
<method name="sendChangedData"> <!--am_EarlyDataType_e type; am_DataType_u sinksource; am_EarlyData_u data; -->
<arg name="earlyData_volumes" type="a(qqn)" direction="in" /> <!-- only the volumes as array -->
diff --git a/PluginRoutingInterfaceDbus/include/configRoutingDbus.h b/PluginRoutingInterfaceDbus/include/configRoutingDbus.h
index aa95328..87ab078 100644
--- a/PluginRoutingInterfaceDbus/include/configRoutingDbus.h
+++ b/PluginRoutingInterfaceDbus/include/configRoutingDbus.h
@@ -1,6 +1,6 @@
#ifndef _ROUTINGDBUS_CONFIG_H
#define _ROUTINGDBUS_CONFIG_H
-#define ROUTING_DBUS_INTROSPECTION_FILE "/home/genius/workspace/workspace/AudioManager/bin/RoutingReceiver.xml"
+#define ROUTING_DBUS_INTROSPECTION_FILE "/home/genius/workspace/AudioManager2/bin/RoutingReceiver.xml"
#endif /* _ROUTINGDBUS_CONFIG_H */
diff --git a/PluginRoutingInterfaceDbus/src/CAmRoutingSenderDbus.cpp b/PluginRoutingInterfaceDbus/src/CAmRoutingSenderDbus.cpp
index 706cbd6..06da0e6 100644
--- a/PluginRoutingInterfaceDbus/src/CAmRoutingSenderDbus.cpp
+++ b/PluginRoutingInterfaceDbus/src/CAmRoutingSenderDbus.cpp
@@ -4,6 +4,7 @@
*
* \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
* \author Sampreeth Ramavana
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
*
* \copyright
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
@@ -335,14 +336,46 @@ void CAmRoutingSenderDbus::addSinkLookup(am_sinkID_t sinkID, am_domainID_t domai
}
}
+template <typename TKey> void CAmRoutingSenderDbus::removeEntriesForValue(const rs_lookupData_s & value, std::map<TKey,rs_lookupData_s> & map)
+{
+ typename std::map<TKey,rs_lookupData_s>::iterator it = map.begin();
+ while ( it != map.end() )
+ {
+ if (it->second.busname == value.busname &&
+ it->second.interface == value.interface &&
+ it->second.path == value.path)
+ {
+ typename std::map<TKey,rs_lookupData_s>::iterator it_tmp = it;
+ it++;
+ map.erase(it_tmp);
+ }
+ else
+ ++it;
+ }
+}
+
void CAmRoutingSenderDbus::removeDomainLookup(am_domainID_t domainID)
{
- mMapHandles.erase(domainID);
+ mapDomain_t::iterator iter(mMapDomains.begin());
+ iter = mMapDomains.find(domainID);
+ if (iter != mMapDomains.end())
+ {
+ CAmRoutingSenderDbus::removeEntriesForValue(iter->second, mMapSources);
+ CAmRoutingSenderDbus::removeEntriesForValue(iter->second, mMapSinks);
+ CAmRoutingSenderDbus::removeEntriesForValue(iter->second, mMapHandles);
+ CAmRoutingSenderDbus::removeEntriesForValue(iter->second, mMapConnections);
+ mMapDomains.erase(domainID);
+ }
}
void CAmRoutingSenderDbus::removeSourceLookup(am_sourceID_t sourceID)
{
- mMapHandles.erase(sourceID);
+ mMapSources.erase(sourceID);
+}
+
+void CAmRoutingSenderDbus::removeSinkLookup(am_sinkID_t sinkID)
+{
+ mMapSinks.erase(sinkID);
}
am_Error_e CAmRoutingSenderDbus::asyncSetVolumes(const am_Handle_s handle, const std::vector<am_Volumes_s>& listVolumes)
@@ -371,10 +404,5 @@ am_Error_e CAmRoutingSenderDbus::asyncSetSourceNotificationConfiguration(const a
return (E_NOT_USED);
}
-void CAmRoutingSenderDbus::removeSinkLookup(am_sinkID_t sinkID)
-{
- mMapHandles.erase(sinkID);
-}
-
}
diff --git a/PluginRoutingInterfaceDbus/src/IAmRoutingReceiverShadow.cpp b/PluginRoutingInterfaceDbus/src/IAmRoutingReceiverShadow.cpp
index 435abf1..96e7070 100644
--- a/PluginRoutingInterfaceDbus/src/IAmRoutingReceiverShadow.cpp
+++ b/PluginRoutingInterfaceDbus/src/IAmRoutingReceiverShadow.cpp
@@ -186,6 +186,7 @@ void IAmRoutingReceiverShadowDbus::ackDisconnect(DBusConnection* conn, DBusMessa
myhandle.handle = handle;
mRoutingReceiveInterface->ackDisconnect(myhandle, connectionID, error);
mpRoutingSenderDbus->removeHandle(handle);
+ //todo: Connection removal ???
mDBUSMessageHandler.initReply(msg);
mDBUSMessageHandler.sendMessage();
}
@@ -252,7 +253,7 @@ void IAmRoutingReceiverShadowDbus::ackSourceVolumeTick(DBusConnection* conn, DBu
am_volume_t volume(mDBUSMessageHandler.getInt());
log(&routingDbus, DLT_LOG_INFO, "IAmRoutingReceiverShadow::ackSourceVolumeTick called, handle", handle, "sourceID", sourceID, "volume", volume);
am_Handle_s myhandle;
- myhandle.handleType = H_SETSINKVOLUME;
+ myhandle.handleType = H_SETSOURCEVOLUME;
myhandle.handle = handle;
mRoutingReceiveInterface->ackSourceVolumeTick(myhandle, sourceID, volume);
mDBUSMessageHandler.initReply(msg);
diff --git a/cmake/FindCommonAPI.cmake b/cmake/FindCommonAPI.cmake
new file mode 100644
index 0000000..e64df66
--- /dev/null
+++ b/cmake/FindCommonAPI.cmake
@@ -0,0 +1,102 @@
+# Copyright (C) 2013, BMW AG
+#
+# This file is part of GENIVI Project AudioManager.
+#
+# Contributions are licensed to the GENIVI Alliance under one or more
+# Contribution License Agreements.
+#
+# copyright
+# This Source Code Form is subject to the terms of the
+# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+# this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# author Christian Linke, christian.linke@bmw.de BMW 2013
+#
+# For further information see http://www.genivi.org/.
+#
+
+include(UsePkgConfig)
+
+pkg_check_modules(COMMON_API CommonAPI)
+
+IF(COMMON_API_FOUND)
+
+ FIND_PATH(COMMON_API_INCLUDE_DIR
+ NAMES CommonAPI/Runtime.h CommonAPI/Proxy.h
+ PATH_SUFFIXES CommonAPI-${COMMON_API_VERSION}
+ PATHS
+ ${COMMON_API_INCLUDE_DIRS}
+ /usr/local/include
+ /usr/include)
+
+ FIND_LIBRARY(COMMON_API_LIBRARY
+ NAMES CommonAPI
+ PATHS
+ ${CommonAPI_PKG_LIBRARY_DIRS}
+ /usr/local/lib
+ /usr/lib)
+
+ELSE(COMMON_API_FOUND)
+
+ MESSAGE(STATUS "CommonAPI package not found, search directly, trying version 0.7 ...")
+
+
+ FIND_PATH(COMMON_API_INCLUDE_DIR
+ NAMES CommonAPI/Runtime.h CommonAPI/Proxy.h
+ PATH_SUFFIXES CommonAPI-0.7
+ PATHS
+ /usr/local/include
+ /usr/include)
+
+ FIND_LIBRARY(COMMON_API_LIBRARY
+ NAMES CommonAPI
+ PATHS
+ /usr/local/lib
+ /usr/lib)
+
+ENDIF(COMMON_API_FOUND)
+
+SET(COMMON_API_LIBRARIES ${COMMON_API_LIBRARY})
+
+IF(COMMON_API_INCLUDE_DIR AND COMMON_API_LIBRARY)
+ message(STATUS "Found CommonAPI")
+ELSE(COMMON_API_LIBRARIES AND COMMON_API_LIBRARY)
+ message(STATUS " CommonAPI not found.")
+ENDIF(COMMON_API_INCLUDE_DIR AND COMMON_API_LIBRARY)
+
+#searching for generated headers
+IF(NOT COMMON_API_SRC_GEN)
+ SET(COMMON_API_SRC_GEN "src-gen/")
+ENDIF(NOT COMMON_API_SRC_GEN)
+
+FILE(GLOB_RECURSE COMMON_API_GEN_HEADER_DIRECTORIES "${COMMON_API_SRC_GEN}*Proxy.h")
+FOREACH(INCLUDE_ITER ${COMMON_API_GEN_HEADER_DIRECTORIES})
+ GET_FILENAME_COMPONENT(TEMP_PATH ${INCLUDE_ITER} PATH)
+ SET(COMMON_API_GEN_INCLUDE_DIR ${COMMON_API_GEN_INCLUDE_DIR} ${TEMP_PATH})
+ENDFOREACH(INCLUDE_ITER ${COMMON_API_GEN_HEADER_DIRECTORIES})
+LIST(REMOVE_DUPLICATES COMMON_API_GEN_INCLUDE_DIR)
+
+#add base path src-gen
+SET(COMMON_API_GEN_INCLUDE_DIR ${COMMON_API_GEN_INCLUDE_DIR} ${COMMON_API_SRC_GEN})
+
+IF (COMMON_API_GEN_INCLUDE_DIR)
+ message(STATUS "Found generated headers !")
+ELSE (COMMON_API_GEN_INCLUDE_DIR)
+ message(STATUS "Did not find generated headers")
+ENDIF(COMMON_API_GEN_INCLUDE_DIR)
+
+#searching for generated sources
+FILE(GLOB_RECURSE COMMON_API_GEN_SOURCES "${COMMON_API_SRC_GEN}*.cpp")
+
+IF (COMMON_API_GEN_SOURCES)
+ message(STATUS "Found generated sources !")
+ELSE (COMMON_API_GEN_SOURCES)
+ message(STATUS "Did not find generated sources !")
+ENDIF(COMMON_API_GEN_SOURCES)
+
+MARK_AS_ADVANCED(
+ COMMON_API_LIBRARIES
+ COMMON_API_INCLUDE_DIR
+ COMMON_API_GEN_INCLUDE_DIR
+ COMMON_API_GEN_SOURCES
+)
diff --git a/cmake/FindCommonAPI_DBus.cmake b/cmake/FindCommonAPI_DBus.cmake
new file mode 100644
index 0000000..bd9aff4
--- /dev/null
+++ b/cmake/FindCommonAPI_DBus.cmake
@@ -0,0 +1,85 @@
+# Copyright (C) 2013, BMW AG
+#
+# This file is part of GENIVI Project AudioManager.
+#
+# Contributions are licensed to the GENIVI Alliance under one or more
+# Contribution License Agreements.
+#
+# copyright
+# This Source Code Form is subject to the terms of the
+# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+# this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# author Christian Linke, christian.linke@bmw.de BMW 2013
+#
+# For further information see http://www.genivi.org/.
+#
+
+include(UsePkgConfig)
+
+pkg_check_modules(COMMON_API_DBUS CommonAPI-DBus)
+
+IF(COMMON_API_DBUS_FOUND)
+
+ FIND_PATH(COMMON_API_DBUS_INCLUDE_DIR
+ NAMES CommonAPI/DBus/DBusRuntime.h CommonAPI/DBus/DBusProxy.h
+ PATH_SUFFIXES CommonAPI-${COMMON_API_VERSION}
+ PATHS
+ ${COMMON_API_DBUS_INCLUDE_DIRS}
+ /usr/local/include
+ /usr/include)
+
+ FIND_LIBRARY(COMMON_API_DBUS_LIBRARY
+ NAMES CommonAPI-DBus
+ PATHS
+ ${CommonAPI_PKG_LIBRARY_DIRS}
+ /usr/local/lib
+ /usr/lib)
+
+
+ELSE(COMMON_API_DBUS_FOUND)
+
+ MESSAGE(STATUS "CommonAPI_DBUS package not found, search directly, trying version 0.7 ...")
+
+
+ FIND_PATH(COMMON_API_DBUS_INCLUDE_DIR
+ NAMES CommonAPI/DBus/DBusRuntime.h CommonAPI/DBus/DBusProxy.h
+ PATH_SUFFIXES CommonAPI-0.7
+ PATHS
+ /usr/local/include
+ /usr/include)
+
+ FIND_LIBRARY(COMMON_API_DBUS_LIBRARY
+ NAMES CommonAPI-DBus
+ PATHS
+ /usr/local/lib
+ /usr/lib)
+
+
+ENDIF(COMMON_API_DBUS_FOUND)
+
+FIND_LIBRARY(DBUS_LIBRARY
+ NAMES dbus-1
+ PATHS
+ /lib
+ /usr/local/lib
+ /usr/lib
+)
+
+IF (NOT DBUS_LIBRARY)
+ MESSAGE (ERROR "did not find DBus library!")
+ENDIF (NOT DBUS_LIBRARY)
+
+
+SET(COMMON_API_DBUS_LIBRARIES ${COMMON_API_DBUS_LIBRARY} ${DBUS_LIBRARY})
+
+IF(COMMON_API_DBUS_INCLUDE_DIR AND COMMON_API_DBUS_LIBRARY)
+ message(STATUS "Found CommonAPI_DBUS")
+ELSE(COMMON_API_DBUS_INCLUDE_DIR AND COMMON_API_DBUS_LIBRARY)
+ message(STATUS " CommonAPI_DBUS not found.")
+ENDIF(COMMON_API_DBUS_INCLUDE_DIR AND COMMON_API_DBUS_LIBRARY)
+
+MARK_AS_ADVANCED(
+ COMMON_API_DBUS_LIBRARIES
+ COMMON_API_DBUS_INCLUDE_DIR
+)
diff --git a/cmake/config.cmake b/cmake/config.cmake
index 8d6f85d..d2fac30 100644
--- a/cmake/config.cmake
+++ b/cmake/config.cmake
@@ -3,6 +3,8 @@
#cmakedefine DAEMONVERSION "@DAEMONVERSION@"
+#cmakedefine WITH_ENABLED_IPC
+#cmakedefine WITH_CAPI_WRAPPER
#cmakedefine WITH_DBUS_WRAPPER
#cmakedefine WITH_DATABASE_STORAGE
#cmakedefine WITH_DLT
diff --git a/include/projecttypes.h b/include/projecttypes.h
index 00919a0..fc889b1 100755..100644
--- a/include/projecttypes.h
+++ b/include/projecttypes.h
@@ -12,22 +12,23 @@
* this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
- * \author Christian Mueller, christian.linke@bmw.de BMW 2011,2012
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
* \file
* For further information see http://www.genivi.org/.
*
* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
-#if !defined(EA_793BA955_1445_4da2_9C22_4EFA92A026C5__INCLUDED_)
-#define EA_793BA955_1445_4da2_9C22_4EFA92A026C5__INCLUDED_
+#if !defined(EA_B5ABC40A_CD0B_4c35_BB93_F4EA426C0B58__INCLUDED_)
+#define EA_B5ABC40A_CD0B_4c35_BB93_F4EA426C0B58__INCLUDED_
namespace am {
/**
- * This enum classifies the format in which data is exchanged within a connection. The enum itself is project specific
- * although there are some Genivi standard formats defined.
+ * This enum classifies the format in which data is exchanged within a connection.
+ * The enum itself is project specific although there are some Genivi standard
+ * formats defined.
* @author Christian Mueller
- * @created 16-Dez-2012 15:58:14
+ * @created 28-Jun-2012 14:00:25
*/
enum am_ConnectionFormat_e
{
@@ -51,13 +52,14 @@ namespace am {
* automatic connection.
*/
CF_GENIVI_AUTO = 4,
+
CF_MAX
};
/**
* This enum gives the information about reason for reason for Source/Sink change
* @author Christian Mueller
- * @created 16-Dez-2012 15:58:14
+ * @created 28-Jun-2012 14:00:25
*/
enum am_AvailabilityReason_e
{
@@ -95,7 +97,7 @@ namespace am {
/**
* product specific identifier of property
* @author Christian Mueller
- * @created 16-Dez-2012 15:58:14
+ * @created 28-Jun-2012 14:00:25
*/
enum am_ClassProperty_e
{
@@ -104,22 +106,47 @@ namespace am {
*/
CP_UNKNOWN = 0,
/**
- * defines the source type of a source. Project specific, could be for example differentiation between interrupt source
- * and main source.
+ * defines the source type of a source. Project specific, could be for example
+ * differentiation between interrupt source and main source.
*/
- CP_GENIVI_SOURCE_TYPE = 1,
+ CP_ENTERTAINMENT = 1,
/**
* defines the SINK_TYPE. Project specific
*/
- CP_GENIVI_SINK_TYPE = 2,
+ CP_INTERRUPT_OVERLAY = 2,
+
+ CP_INTERRUPT_SUPERSEEDING = 3,
+
+ CP_PDC =4,
+
+ CP_GONG = 5,
+
+ CP_CROSSFADER = 6,
+
+ CP_GENIVI_SOURCE_TYPE=7,
+
+ CP_GENIVI_SINK_TYPE=8,
+
+ CP_VIRTUAL_MAINSINK = 9,
+
+ CP_INVISIBLE_SOURCE = 10,
+
+ CP_PLAINSINK = 11,
+
+ CP_MAINSINK = 12,
+
+ CP_INVISIBLE_SINK = 13,
+
CP_MAX
};
/**
- * The given ramp types here are just a possiblity. for products, different ramp types can be defined here.
- * It is in the responsibility of the product to make sure that the routing plugins are aware of the ramp types used.
+ * The given ramp types here are just a possiblity. for products, different ramp
+ * types can be defined here.
+ * It is in the responsibility of the product to make sure that the routing
+ * plugins are aware of the ramp types used.
* @author Christian Mueller
- * @created 16-Dez-2012 15:58:14
+ * @created 28-Jun-2012 14:00:25
*/
enum am_RampType_e
{
@@ -139,9 +166,10 @@ namespace am {
};
/**
- * sound properties. Within genivi only the standard properties are defined, for products these need to be extended.
+ * sound properties. Within genivi only the standard properties are defined, for
+ * products these need to be extended.
* @author Christian Mueller
- * @created 16-Dez-2012 15:58:14
+ * @created 28-Jun-2012 14:00:25
*/
enum am_SoundPropertyType_e
{
@@ -161,13 +189,23 @@ namespace am {
* example bass value min =-10 max =10
*/
SP_EXAMPLE_BASS = 3,
+
+ SP_ENTER_SINKID = 4,
+
+ SP_INTERR_SUPERSEEDINGID = 5,
+
+ SP_INTERR_OVERLAYID = 6,
+
+ SP_PRIORITY = 7,
+
SP_MAX
};
/**
- * Here are all SoundProperties that can be set via the CommandInterface. Product specific
+ * Here are all SoundProperties that can be set via the CommandInterface. Product
+ * specific
* @author Christian Mueller
- * @created 16-Dez-2012 15:58:14
+ * @created 28-Jun-2012 14:00:25
*/
enum am_MainSoundPropertyType_e
{
@@ -187,13 +225,16 @@ namespace am {
* example value between -10 and +10
*/
MSP_EXAMPLE_BASS = 3,
+
+ MSP_SOURCE_TYPE = 4,
+
MSP_MAX
};
/**
* describes the different system properties. Project specific
* @author Christian Mueller
- * @created 16-Dez-2012 15:58:14
+ * @created 28-Jun-2012 14:00:25
*/
enum am_SystemPropertyType_e
{
@@ -204,11 +245,19 @@ namespace am {
SYP_MAX
};
+ enum am_sourceType_e
+ {
+ ST_MULTIMEDIA_LIBRARY = 0,
+ ST_TUNER = 1,
+ ST_AUX_STREAM = 2,
+ ST_MAX
+ };
+
/**
* gives the type of the Notification.
* @author q232968
* @version 1.0
- * @created 16-Dez-2012 15:58:14
+ * @created 05-Dez-2012 12:36:55
*/
enum am_NotificationType_e
{
@@ -216,4 +265,4 @@ namespace am {
NT_MAX
};
}
-#endif // !defined(EA_793BA955_1445_4da2_9C22_4EFA92A026C5__INCLUDED_)
+#endif // !defined(EA_B5ABC40A_CD0B_4c35_BB93_F4EA426C0B58__INCLUDED_)
diff --git a/include/shared/CAmCommonAPIWrapper.h b/include/shared/CAmCommonAPIWrapper.h
new file mode 100644
index 0000000..d6b8476
--- /dev/null
+++ b/include/shared/CAmCommonAPIWrapper.h
@@ -0,0 +1,142 @@
+/**
+ * Copyright (C) 2012, BMW AG
+ *
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * \file CAmCommonAPIWrapper.h
+ * For further information see http://www.genivi.org/.
+ */
+
+
+#ifndef COMMONAPIWRAPPER_H_
+#define COMMONAPIWRAPPER_H_
+
+#include <string>
+#include <list>
+#include <map>
+#include <queue>
+#include <memory>
+#include <CommonAPI/CommonAPI.h>
+#include "config.h"
+#include "CAmSocketHandler.h"
+
+
+/**
+ * A Common-API wrapper class, that loads the common-api runtime and instantiates all necessary other objects. Works with the CAmSocketHandler.
+ * It is implemented as singleton and usually once instantiated at the beginning with CAmSocketHandler.
+ * Example: CAmCommonAPIWrapper *pCAPIWrapper = CAmCommonAPIWrapper::instantiateOnce( aSocketHandlerPointer );
+ */
+
+namespace am
+{
+using namespace CommonAPI;
+
+class CAmSocketHandler;
+
+class CAmCommonAPIWrapper
+{
+public:
+
+ virtual ~CAmCommonAPIWrapper();
+ /**
+ * \brief Returns an already instantiated object.
+ *
+ * This method should be called after the instantiateOnce(...) has been called with non null socket handler parameter.
+ *
+ * @return The common-api wrapper object.
+ */
+ static CAmCommonAPIWrapper* getInstance();
+ /**
+ * \brief Creates a singleton instance attached to the provided socket handler object.
+ *
+ * This method should be called only once because it instantiates a single object.
+ * Otherwise it will throw an exception.
+ * The first call of this method with non null parameter loads the common-api and attaches it to the main loop.
+ *
+ * @param socketHandler: A pointer to socket handler or NULL
+ *
+ * @return The common-api wrapper object.
+ */
+ static CAmCommonAPIWrapper* instantiateOnce(CAmSocketHandler* socketHandler);
+
+ void registerDispatchSource(DispatchSource* dispatchSource, const DispatchPriority dispatchPriority);
+ void deregisterDispatchSource(DispatchSource* dispatchSource);
+ void registerWatch(Watch* watch, const DispatchPriority dispatchPriority);
+ void deregisterWatch(Watch* watch);
+ void registerTimeout(Timeout* timeout, const DispatchPriority dispatchPriority);
+ void deregisterTimeout(Timeout* timeout);
+ void wakeup();
+
+ std::shared_ptr<CommonAPI::Factory> factory() const;
+ std::shared_ptr<CommonAPI::Runtime> runtime() const;
+ //Wraps the invitation to the service publisher
+ template <class TStubImp> bool registerStub(const std::shared_ptr<TStubImp> & shStub, const std::string & aCommonAPIAddress)
+ {
+ return runtime()->getServicePublisher()->registerService(shStub, aCommonAPIAddress, factory());
+ }
+ bool unregisterStub(const std::string & aCommonAPIAddress)
+ {
+ /** Not implemented yet
+ todo: Check whether the appropriate method is available and uncomment...
+
+ return runtime()->getServicePublisher()->unregisterService(aCommonAPIAddress);
+ */
+ return true;
+ }
+
+
+protected:
+ CAmCommonAPIWrapper(CAmSocketHandler* socketHandler) ;
+private:
+ void commonPrepareCallback(const sh_pollHandle_t handle, void* userData);
+ TAmShPollPrepare<CAmCommonAPIWrapper> pCommonPrepareCallback;
+
+ bool commonDispatchCallback(const sh_pollHandle_t handle, void* userData);
+ TAmShPollDispatch<CAmCommonAPIWrapper> pCommonDispatchCallback;
+
+ void commonFireCallback(const pollfd pollfd, const sh_pollHandle_t, void*);
+ TAmShPollFired<CAmCommonAPIWrapper> pCommonFireCallback;
+
+ bool commonCheckCallback(const sh_pollHandle_t handle, void*);
+ TAmShPollCheck<CAmCommonAPIWrapper> pCommonCheckCallback;
+
+ void commonTimerCallback(sh_timerHandle_t handle, void* userData);
+ TAmShTimerCallBack<CAmCommonAPIWrapper> pCommonTimerCallback;
+
+ struct timerHandles
+ {
+ sh_timerHandle_t handle;
+ Timeout* timeout;
+ };
+ //!< reference to the dbus instance
+ CAmSocketHandler *mpSocketHandler; //!< pointer to the sockethandler
+
+ std::shared_ptr<CommonAPI::Factory> mFactory;
+ std::shared_ptr<CommonAPI::MainLoopContext> mContext;
+
+ DispatchSourceListenerSubscription mDispatchSourceListenerSubscription;
+ WatchListenerSubscription mWatchListenerSubscription;
+ TimeoutSourceListenerSubscription mTimeoutSourceListenerSubscription;
+ WakeupListenerSubscription mWakeupListenerSubscription;
+ std::multimap<DispatchPriority, DispatchSource*> mRegisteredDispatchSources;
+ std::map<int,Watch*> mMapWatches;
+ Watch* mWatchToCheck;
+ std::list<DispatchSource*> mSourcesToDispatch;
+ std::vector<timerHandles> mpListTimerhandles;
+};
+
+#define Am_CAPI CAmCommonAPIWrapper::getInstance()
+
+}
+
+#endif /* COMMONAPIWRAPPER_H_ */