summaryrefslogtreecommitdiff
path: root/PluginControlInterface
diff options
context:
space:
mode:
Diffstat (limited to 'PluginControlInterface')
-rw-r--r--PluginControlInterface/CMakeLists.txt78
-rw-r--r--PluginControlInterface/include/CAmControlSenderBase.h246
-rw-r--r--PluginControlInterface/include/IAmControlReceiverShadow.h115
-rw-r--r--PluginControlInterface/src/CAmControlSenderBase.cpp958
-rw-r--r--PluginControlInterface/src/IAmControlReceiverShadow.cpp523
-rw-r--r--PluginControlInterface/test/CAmControlReceiverShadowTest.cpp135
-rw-r--r--PluginControlInterface/test/CAmControlReceiverShadowTest.h46
-rw-r--r--PluginControlInterface/test/CMakeLists.txt98
8 files changed, 0 insertions, 2199 deletions
diff --git a/PluginControlInterface/CMakeLists.txt b/PluginControlInterface/CMakeLists.txt
deleted file mode 100644
index 1c4d3fd..0000000
--- a/PluginControlInterface/CMakeLists.txt
+++ /dev/null
@@ -1,78 +0,0 @@
-# Copyright (c) 2012 BMW
-#
-# author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
-#
-# 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(PluginControlInterface)
-
-OPTION (WITH_TEST_CONTROLLER
- "Build with the test controller" ON)
-
-IF (WITH_TEST_CONTROLLER)
-
-set(LIBRARY_OUTPUT_PATH ${PLUGINS_OUTPUT_PATH}/control)
-set(DOC_OUTPUT_PATH ${DOC_OUTPUT_PATH}/ControlPlugin)
-set(INCLUDE_FOLDER "include")
-
-FILE(READ "${AUDIO_INCLUDE_FOLDER}/control/IAmControlSend.h" VERSION_BUFFER LIMIT 6000)
-STRING(REGEX MATCH "ControlSendVersion*.[^0-9]*[0-9].[0-9]*[0-9]" LIB_INTERFACE_VERSION_STRING ${VERSION_BUFFER})
-STRING(REGEX REPLACE "ControlSendVersion*.." "" LIB_INTERFACE_VERSION ${LIB_INTERFACE_VERSION_STRING})
-MESSAGE(STATUS "Building against control interface version ${LIB_INTERFACE_VERSION}")
-
-FIND_PACKAGE(NSM REQUIRED)
-
-INCLUDE_DIRECTORIES(
- ${CMAKE_SOURCE_DIR}
- ${STD_INCLUDE_DIRS}
- ${CMAKE_CURRENT_BINARY_DIR}
- ${AUDIO_INCLUDE_FOLDER}
- ${PROJECT_INCLUDE_FOLDER}
- ${INCLUDE_FOLDER}
- ${NSM_INCLUDE_DIR}
-)
-
-# all source files go here
-file(GLOB PLUGIN_CONTROL_SRCS_CXX "src/*.cpp")
-
-add_library(PluginControlInterface MODULE ${PLUGIN_CONTROL_SRCS_CXX})
-
-
-TARGET_LINK_LIBRARIES(PluginControlInterface
- ${DLT_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 (PluginControlInterfaceDBusDocs 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 PluginControlInterface
- DESTINATION "lib/${LIB_INSTALL_SUFFIX}/control"
- PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ
- COMPONENT sampleplugins
-)
-
-SET(ADD_DEPEND "audiomanager-bin")
-set_property(GLOBAL APPEND PROPERTY sampleplugins_prop "${ADD_DEPEND}")
-
-ENDIF (WITH_TEST_CONTROLLER)
diff --git a/PluginControlInterface/include/CAmControlSenderBase.h b/PluginControlInterface/include/CAmControlSenderBase.h
deleted file mode 100644
index a2d2cec..0000000
--- a/PluginControlInterface/include/CAmControlSenderBase.h
+++ /dev/null
@@ -1,246 +0,0 @@
-/**
- * Copyright (c) 2012 BMW
- *
- * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
- *
- * \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 CONTROLSENDER_H_
-#define CONTROLSENDER_H_
-
-#include "control/IAmControlSend.h"
-#include <list>
-
-using namespace am;
-
-class CAmControlSenderBase: public IAmControlSend
-{
-public:
- CAmControlSenderBase();
- virtual ~CAmControlSenderBase();
- am_Error_e startupController(IAmControlReceive* controlreceiveinterface);
- void setControllerReady();
- void setControllerRundown(const int16_t signal);
- am_Error_e hookUserConnectionRequest(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID);
- am_Error_e hookUserDisconnectionRequest(const am_mainConnectionID_t connectionID);
- am_Error_e hookUserSetMainSinkSoundProperty(const am_sinkID_t sinkID, const am_MainSoundProperty_s& soundProperty);
- am_Error_e hookUserSetMainSourceSoundProperty(const am_sourceID_t sourceID, const am_MainSoundProperty_s& soundProperty);
- am_Error_e hookUserSetSystemProperty(const am_SystemProperty_s& property);
- am_Error_e hookUserVolumeChange(const am_sinkID_t SinkID, const am_mainVolume_t newVolume);
- am_Error_e hookUserVolumeStep(const am_sinkID_t SinkID, const int16_t increment);
- am_Error_e hookUserSetSinkMuteState(const am_sinkID_t sinkID, const am_MuteState_e muteState);
- am_Error_e hookSystemRegisterDomain(const am_Domain_s& domainData, am_domainID_t& domainID);
- am_Error_e hookSystemDeregisterDomain(const am_domainID_t domainID);
- void hookSystemDomainRegistrationComplete(const am_domainID_t domainID);
- am_Error_e hookSystemRegisterSink(const am_Sink_s& sinkData, am_sinkID_t& sinkID);
- am_Error_e hookSystemDeregisterSink(const am_sinkID_t sinkID);
- am_Error_e hookSystemRegisterSource(const am_Source_s& sourceData, am_sourceID_t& sourceID);
- am_Error_e hookSystemDeregisterSource(const am_sourceID_t sourceID);
- am_Error_e hookSystemRegisterGateway(const am_Gateway_s& gatewayData, am_gatewayID_t& gatewayID);
- am_Error_e hookSystemRegisterConverter(const am_Converter_s& converterData, am_converterID_t& converterID);
- am_Error_e hookSystemDeregisterConverter(const am_converterID_t converterID);
- am_Error_e hookSystemDeregisterGateway(const am_gatewayID_t gatewayID);
- am_Error_e hookSystemRegisterCrossfader(const am_Crossfader_s& crossfaderData, am_crossfaderID_t& crossfaderID);
- am_Error_e hookSystemDeregisterCrossfader(const am_crossfaderID_t crossfaderID);
- void hookSystemSinkVolumeTick(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume);
- void hookSystemSourceVolumeTick(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume);
- void hookSystemInterruptStateChange(const am_sourceID_t sourceID, const am_InterruptState_e interruptState);
- void hookSystemSinkAvailablityStateChange(const am_sinkID_t sinkID, const am_Availability_s& availability);
- void hookSystemSourceAvailablityStateChange(const am_sourceID_t sourceID, const am_Availability_s& availability);
- void hookSystemDomainStateChange(const am_domainID_t domainID, const am_DomainState_e state);
- void hookSystemReceiveEarlyData(const std::vector<am_EarlyData_s>& data);
- void hookSystemSpeedChange(const am_speed_t speed);
- void hookSystemTimingInformationChanged(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time);
- void cbAckConnect(const am_Handle_s handle, const am_Error_e errorID);
- void cbAckDisconnect(const am_Handle_s handle, const am_Error_e errorID);
- void cbAckCrossFade(const am_Handle_s handle, const am_HotSink_e hostsink, const am_Error_e error);
- void cbAckSetSinkVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error);
- void cbAckSetSourceVolumeChange(const am_Handle_s handle, const am_volume_t voulme, const am_Error_e error);
- void cbAckSetSourceState(const am_Handle_s handle, const am_Error_e error);
- void cbAckSetSourceSoundProperties(const am_Handle_s handle, const am_Error_e error);
- void cbAckSetSourceSoundProperty(const am_Handle_s handle, const am_Error_e error);
- void cbAckSetSinkSoundProperties(const am_Handle_s handle, const am_Error_e error);
- void cbAckSetSinkSoundProperty(const am_Handle_s handle, const am_Error_e error);
- am_Error_e getConnectionFormatChoice(const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_Route_s listRoute, const std::vector<am_CustomConnectionFormat_t> listPossibleConnectionFormats, std::vector<am_CustomConnectionFormat_t>& listPrioConnectionFormats);
- void getInterfaceVersion(std::string& version) const;
- void confirmCommandReady(const am_Error_e error) ;
- void confirmRoutingReady(const am_Error_e error) ;
- void confirmCommandRundown(const am_Error_e error) ;
- void confirmRoutingRundown(const am_Error_e error) ;
- am_Error_e hookSystemUpdateSink(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_CustomConnectionFormat_t>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties) ;
- am_Error_e hookSystemUpdateSource(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_CustomConnectionFormat_t>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties) ;
- am_Error_e hookSystemUpdateGateway(const am_gatewayID_t gatewayID, const std::vector<am_CustomConnectionFormat_t>& listSourceConnectionFormats, const std::vector<am_CustomConnectionFormat_t>& listSinkConnectionFormats, const std::vector<bool>& convertionMatrix) ;
- am_Error_e hookSystemUpdateConverter(const am_converterID_t converterID, const std::vector<am_CustomConnectionFormat_t>& listSourceConnectionFormats, const std::vector<am_CustomConnectionFormat_t>& listSinkConnectionFormats, const std::vector<bool>& convertionMatrix);
- void cbAckSetVolumes(const am_Handle_s handle, const std::vector<am_Volumes_s>& listVolumes, const am_Error_e error) ;
- void cbAckSetSinkNotificationConfiguration(const am_Handle_s handle, const am_Error_e error) ;
- void cbAckSetSourceNotificationConfiguration(const am_Handle_s handle, const am_Error_e error) ;
- void hookSinkNotificationDataChanged(const am_sinkID_t sinkID, const am_NotificationPayload_s& payload) ;
- void hookSourceNotificationDataChanged(const am_sourceID_t sourceID, const am_NotificationPayload_s& payload) ;
- am_Error_e hookUserSetMainSinkNotificationConfiguration(const am_sinkID_t sinkID, const am_NotificationConfiguration_s& notificationConfiguration) ;
- am_Error_e hookUserSetMainSourceNotificationConfiguration(const am_sourceID_t sourceID, const am_NotificationConfiguration_s& notificationConfiguration) ;
- void hookSystemNodeStateChanged(const NsmNodeState_e NodeStateId) ;
- void hookSystemNodeApplicationModeChanged(const NsmApplicationMode_e ApplicationModeId) ;
- void hookSystemSessionStateChanged(const std::string& sessionName, const NsmSeat_e seatID, const NsmSessionState_e sessionStateID) ;
- NsmErrorStatus_e hookSystemLifecycleRequest(const uint32_t Request, const uint32_t RequestId) ;
-
-private:
- IAmControlReceive * mControlReceiveInterface;
-
- void disconnect(am_mainConnectionID_t connectionID);
- void connect(am_sourceID_t sourceID, am_sinkID_t sinkID, am_mainConnectionID_t mainConnectionID);
-
- struct handleStatus
- {
- bool status;
- am_Handle_s handle;
- };
-
- struct mainConnectionSet
- {
- am_mainConnectionID_t connectionID;
- std::vector<handleStatus> listHandleStaus;
- };
-
- struct mainVolumeSet
- {
- am_sinkID_t sinkID;
- am_Handle_s handle;
- am_mainVolume_t mainVolume;
- };
-
- struct mainSinkSoundPropertySet
- {
- am_sinkID_t sinkID;
- am_Handle_s handle;
- am_MainSoundProperty_s mainSoundProperty;
- };
-
- class findHandle
- {
- handleStatus mHandle;
- public:
- explicit findHandle(handleStatus handle) :
- mHandle(handle)
- {
- }
- bool operator()(const handleStatus& handle) const
- {
- return (handle.handle.handle == mHandle.handle.handle);
- }
- };
-
- struct checkHandle
- {
-
- handleStatus mHandleStatus;
- explicit checkHandle(const handleStatus& value) :
- mHandleStatus(value)
- {
- }
-
- bool operator()(const handleStatus &value)
- {
- return !value.status;
- }
- };
-
- struct checkMainConnectionID
- {
- am_MainConnection_s mMainConnection;
- explicit checkMainConnectionID(const am_MainConnection_s& mainConnection) :
- mMainConnection(mainConnection)
- {
- }
- bool operator()(const am_MainConnection_s& mainConnection)
- {
- if (mMainConnection.mainConnectionID == mainConnection.mainConnectionID)
- return true;
- return false;
- }
- };
-
- enum cs_stateflow_e
- {
- SF_NONE,
- SF_CONNECT,
- SF_NAVI,
- SF_TA
- };
-
- enum cs_connectSf_e
- {
- SFC_RAMP_DOWN,
- SFC_SOURCE_STATE_OFF,
- SFC_DISCONNECT,
- SFC_CONNECT,
- SFC_SOURCE_STATE_ON,
- SFC_RAMP_UP,
- SFC_FINISHED
- };
-
- enum cs_naviSf_e
- {
- NAVC_RAMP_DOWN,
- NAVC_CONNECT,
- NAVC_SOURCE_STATE_ON,
- NAVC_RAMP_UP,
- NAVC_WAIT_STATE,
- NAVC_RAMP_DOWN_AGAIN,
- NAVC_SOURCE_VOLUME_BACK,
- NAVC_SOURCE_ACTIVITY_BACK,
- NAVC_DISCONNECT,
- NAVC_FINISHED
- };
-
- enum cs_trafficSf_e
- {
- TA_RAMP_DOWN,
- TA_CONNECT,
- TA_SOURCE_STATE_ON,
- TA_RAMP_UP,
- TA_WAIT_STATE,
- TA_RAMP_DOWN_AGAIN,
- TA_SOURCE_STATE_OFF,
- TA_SOURCE_STATE_OLD_OFF,
- TA_DISCONNECT,
- TA_FINISHED
- };
-
- struct cs_connectData_s
- {
- am_mainConnectionID_t currentMainConnection;
- am_mainConnectionID_t newMainConnection;
- am_sourceID_t oldSourceID;
- am_sinkID_t sinkID;
- am_sourceID_t sourceID;
- };
-
- void callStateFlowHandler();
- void callConnectHandler();
- void callNaviHandler();
- void callTAHandler();
-
- std::vector<mainConnectionSet> mListOpenConnections;
- std::vector<mainConnectionSet> mListOpenDisconnections;
- std::vector<mainVolumeSet> mListOpenVolumeChanges;
- std::vector<mainSinkSoundPropertySet> mListMainSoundPropertyChanges;
-
- cs_connectSf_e mConnectSf;
- cs_naviSf_e mNaviSf;
- cs_trafficSf_e mTrafficSf;
- cs_connectData_s mConnectData;
- cs_stateflow_e mStateflow;
-
-};
-
-#endif /* CONTROLSENDER_H_ */
diff --git a/PluginControlInterface/include/IAmControlReceiverShadow.h b/PluginControlInterface/include/IAmControlReceiverShadow.h
deleted file mode 100644
index 2557836..0000000
--- a/PluginControlInterface/include/IAmControlReceiverShadow.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * Copyright (c) 2012 BMW
- *
- * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
- *
- * \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 IAMCONTROLRECEIVERSHADOW_H_
-#define IAMCONTROLRECEIVERSHADOW_H_
-
-#include "audiomanagertypes.h"
-#include "shared/CAmSerializer.h"
-
-namespace am
-{
-class IAmControlReceive;
-class CAmSocketHandler;
-
-/**
- * shadow class that used CAmSerializer to make threadsafe calls to the IAmControlReceive interface.
- */
-class IAmControlReceiverShadow
-{
-public:
- IAmControlReceiverShadow(IAmControlReceive* iReceiveInterface, CAmSocketHandler* iSocketHandler);
- ~IAmControlReceiverShadow();
- am_Error_e getRoute(bool onlyfree, am_sourceID_t sourceID, am_sinkID_t sinkID, std::vector<am_Route_s>& returnList);
- am_Error_e connect(am_Handle_s& handle, am_connectionID_t& connectionID, am_CustomConnectionFormat_t format, am_sourceID_t sourceID, am_sinkID_t sinkID);
- am_Error_e disconnect(am_Handle_s& handle, am_connectionID_t connectionID);
- am_Error_e crossfade(am_Handle_s& handle, am_HotSink_e hotSource, am_crossfaderID_t crossfaderID, am_CustomRampType_t rampType, am_time_t rampTime);
- am_Error_e abortAction(am_Handle_s handle);
- am_Error_e setSourceState(am_Handle_s& handle, am_sourceID_t sourceID, am_SourceState_e state);
- am_Error_e setSinkVolume(am_Handle_s& handle, am_sinkID_t sinkID, am_volume_t volume, am_CustomRampType_t ramp, am_time_t time);
- am_Error_e setSourceVolume(am_Handle_s& handle, am_sourceID_t sourceID, am_volume_t volume, am_CustomRampType_t rampType, am_time_t time);
- am_Error_e setSinkSoundProperties(am_Handle_s& handle, am_sinkID_t sinkID, std::vector<am_SoundProperty_s>& soundProperty);
- am_Error_e setSinkSoundProperty(am_Handle_s& handle, am_sinkID_t sinkID, am_SoundProperty_s& soundProperty);
- am_Error_e setSourceSoundProperties(am_Handle_s& handle, am_sourceID_t sourceID, std::vector<am_SoundProperty_s>& soundProperty);
- am_Error_e setSourceSoundProperty(am_Handle_s& handle, am_sourceID_t sourceID, am_SoundProperty_s& soundProperty);
- am_Error_e setDomainState(am_domainID_t domainID, am_DomainState_e domainState);
- am_Error_e enterDomainDB(am_Domain_s& domainData, am_domainID_t& domainID);
- am_Error_e enterMainConnectionDB(am_MainConnection_s& mainConnectionData, am_mainConnectionID_t& connectionID);
- am_Error_e enterSinkDB(am_Sink_s& sinkData, am_sinkID_t& sinkID);
- am_Error_e enterCrossfaderDB(am_Crossfader_s& crossfaderData, am_crossfaderID_t& crossfaderID);
- am_Error_e enterGatewayDB(am_Gateway_s& gatewayData, am_gatewayID_t& gatewayID);
- am_Error_e enterSourceDB(am_Source_s& sourceData, am_sourceID_t& sourceID);
- am_Error_e enterSinkClassDB(am_SinkClass_s& sinkClass, am_sinkClass_t& sinkClassID);
- am_Error_e enterSourceClassDB(am_sourceClass_t& sourceClassID, am_SourceClass_s& sourceClass);
- am_Error_e changeSinkClassInfoDB(am_SinkClass_s& sinkClass);
- am_Error_e changeSourceClassInfoDB(am_SourceClass_s& sourceClass);
- am_Error_e enterSystemPropertiesListDB(std::vector<am_SystemProperty_s>& listSystemProperties);
- am_Error_e changeMainConnectionRouteDB(am_mainConnectionID_t mainconnectionID, std::vector<am_connectionID_t>& listConnectionID);
- am_Error_e changeMainConnectionStateDB(am_mainConnectionID_t mainconnectionID, am_ConnectionState_e connectionState);
- am_Error_e changeSinkMainVolumeDB(am_mainVolume_t mainVolume, am_sinkID_t sinkID);
- am_Error_e changeSinkAvailabilityDB(am_Availability_s& availability, am_sinkID_t sinkID);
- am_Error_e changDomainStateDB(am_DomainState_e domainState, am_domainID_t domainID);
- am_Error_e changeSinkMuteStateDB(am_MuteState_e muteState, am_sinkID_t sinkID);
- am_Error_e changeMainSinkSoundPropertyDB(am_MainSoundProperty_s& soundProperty, am_sinkID_t sinkID);
- am_Error_e changeMainSourceSoundPropertyDB(am_MainSoundProperty_s& soundProperty, am_sourceID_t sourceID);
- am_Error_e changeSourceAvailabilityDB(am_Availability_s& availability, am_sourceID_t sourceID);
- am_Error_e changeSystemPropertyDB(am_SystemProperty_s& property);
- am_Error_e removeMainConnectionDB(am_mainConnectionID_t mainConnectionID);
- am_Error_e removeSinkDB(am_sinkID_t sinkID);
- am_Error_e removeSourceDB(am_sourceID_t sourceID);
- am_Error_e removeGatewayDB(am_gatewayID_t gatewayID);
- am_Error_e removeCrossfaderDB(am_crossfaderID_t crossfaderID);
- am_Error_e removeDomainDB(am_domainID_t domainID);
- am_Error_e removeSinkClassDB(am_sinkClass_t sinkClassID);
- am_Error_e removeSourceClassDB(am_sourceClass_t sourceClassID);
- am_Error_e getSourceClassInfoDB(am_sourceID_t sourceID, am_SourceClass_s& classInfo);
- am_Error_e getSinkClassInfoDB(am_sinkID_t sinkID, am_SinkClass_s& sinkClass);
- am_Error_e getSinkInfoDB(am_sinkID_t sinkID, am_Sink_s& sinkData);
- am_Error_e getSourceInfoDB(am_sourceID_t sourceID, am_Source_s& sourceData);
- am_Error_e getGatewayInfoDB(am_gatewayID_t gatewayID, am_Gateway_s& gatewayData);
- am_Error_e getCrossfaderInfoDB(am_crossfaderID_t crossfaderID, am_Crossfader_s& crossfaderData);
- am_Error_e getMainConnectionInfoDB(am_mainConnectionID_t mainConnectionID, am_MainConnection_s& mainConnectionData);
- am_Error_e getListSinksOfDomain(am_domainID_t domainID, std::vector<am_sinkID_t>& listSinkID);
- am_Error_e getListSourcesOfDomain(am_domainID_t domainID, std::vector<am_sourceID_t>& listSourceID);
- am_Error_e getListCrossfadersOfDomain(am_domainID_t domainID, std::vector<am_crossfaderID_t>& listCrossfadersID);
- am_Error_e getListGatewaysOfDomain(am_domainID_t domainID, std::vector<am_gatewayID_t>& listGatewaysID);
- am_Error_e getListMainConnections(std::vector<am_MainConnection_s>& listMainConnections);
- am_Error_e getListDomains(std::vector<am_Domain_s>& listDomains);
- am_Error_e getListConnections(std::vector<am_Connection_s>& listConnections);
- am_Error_e getListSinks(std::vector<am_Sink_s>& listSinks);
- am_Error_e getListSources(std::vector<am_Source_s>& listSources);
- am_Error_e getListSourceClasses(std::vector<am_SourceClass_s>& listSourceClasses);
- am_Error_e getListHandles(std::vector<am_Handle_s>& listHandles);
- am_Error_e getListCrossfaders(std::vector<am_Crossfader_s>& listCrossfaders);
- am_Error_e getListGateways(std::vector<am_Gateway_s>& listGateways);
- am_Error_e getListSinkClasses(std::vector<am_SinkClass_s>& listSinkClasses);
- am_Error_e getListSystemProperties(std::vector<am_SystemProperty_s>& listSystemProperties);
- void setCommandReady();
- void setCommandRundown();
- void setRoutingReady();
- void setRoutingRundown();
- void confirmControllerReady(am_Error_e error);
- void confirmControllerRundown(am_Error_e error);
- am_Error_e getSocketHandler(CAmSocketHandler*& socketHandler);
-private:
- IAmControlReceive *mpIAmControlReceiver;
- CAmSerializer mCAmSerializer;
-
-};
-
-} /* namespace am */
-#endif /* IAMCONTROLRECEIVERSHADOW_H_ */
diff --git a/PluginControlInterface/src/CAmControlSenderBase.cpp b/PluginControlInterface/src/CAmControlSenderBase.cpp
deleted file mode 100644
index 9d5aa8b..0000000
--- a/PluginControlInterface/src/CAmControlSenderBase.cpp
+++ /dev/null
@@ -1,958 +0,0 @@
-/**
- * Copyright (c) 2012 BMW
- *
- * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
- *
- * \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 "CAmControlSenderBase.h"
-#include <cassert>
-#include <algorithm>
-#include "shared/CAmDltWrapper.h"
-#include "control/IAmControlReceive.h"
-
-using namespace am;
-
-extern "C" IAmControlSend* PluginControlInterfaceFactory()
-{
- return (new CAmControlSenderBase());
-}
-
-extern "C" void destroyControlPluginInterface(IAmControlSend* controlSendInterface)
-{
- delete controlSendInterface;
-}
-
-CAmControlSenderBase::CAmControlSenderBase() :
- mControlReceiveInterface(NULL), //
- mListOpenConnections(), //
- mListOpenDisconnections(), //
- mListOpenVolumeChanges(),//
- mConnectSf (SFC_RAMP_DOWN), //
- mNaviSf(NAVC_RAMP_DOWN), //
- mTrafficSf(TA_RAMP_DOWN),//
- mConnectData(), //
- mStateflow(SF_NONE)
-{
-}
-
-CAmControlSenderBase::~CAmControlSenderBase()
-{
-}
-
-am_Error_e CAmControlSenderBase::startupController(IAmControlReceive *controlreceiveinterface)
-{
- assert(controlreceiveinterface);
- mControlReceiveInterface = controlreceiveinterface;
- am_sourceClass_t sourceClassID;
- am_SourceClass_s sourceClass;
- sourceClass.name="player";
- sourceClass.sourceClassID=1;
- mControlReceiveInterface->enterSourceClassDB(sourceClassID,sourceClass);
- sourceClass.name="navi";
- sourceClass.sourceClassID=2;
- mControlReceiveInterface->enterSourceClassDB(sourceClassID,sourceClass);
- sourceClass.name="ta";
- sourceClass.sourceClassID=3;
- mControlReceiveInterface->enterSourceClassDB(sourceClassID,sourceClass);
- //here is a good place to insert SystemProperties into the database...
- //and might be a good place to insert the Source and Sink CLasses as well
- return E_NOT_USED;
-}
-
-void CAmControlSenderBase::setControllerReady()
-{
- //here is a good place to insert Source and SinkClasses into the database...
- mControlReceiveInterface->setRoutingReady();
- mControlReceiveInterface->setCommandReady();
-}
-
-am_Error_e CAmControlSenderBase::hookUserConnectionRequest(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t & mainConnectionID)
-{
- if (mStateflow!=SF_NONE)
- return (E_NOT_POSSIBLE);
-
- std::vector<am_Route_s> listRoutes;
- std::vector<am_connectionID_t> listConnectionIDs;
- am_SourceClass_s sourceClass, tempSourceClass;
- bool exististingConnection(false);
- mControlReceiveInterface->getRoute(false, sourceID, sinkID, listRoutes);
- if (listRoutes.empty())
- return (E_NOT_POSSIBLE);
-
- std::vector<am_MainConnection_s> listAllMainConnections;
- mControlReceiveInterface->getListMainConnections(listAllMainConnections);
- mControlReceiveInterface->getSourceClassInfoDB(sourceID, sourceClass);
-
- //go through all connections
- std::vector<am_MainConnection_s>::iterator itAll(listAllMainConnections.begin());
- for (; itAll != listAllMainConnections.end(); ++itAll)
- {
- if (itAll->sinkID == sinkID && itAll->sourceID == sourceID)
- return (E_ALREADY_EXISTS);
-
- //check if there is already an existing connection
- mControlReceiveInterface->getSourceClassInfoDB(itAll->sourceID, tempSourceClass);
- if (tempSourceClass.sourceClassID == 1)
- {
- mConnectData.currentMainConnection=itAll->mainConnectionID;
- exististingConnection=true;
- mConnectData.oldSourceID=itAll->sourceID;
- }
- }
-
- am_MainConnection_s mainConnectionData;
- mainConnectionData.mainConnectionID = 0;
- mainConnectionData.sinkID = sinkID;
- mainConnectionData.sourceID = sourceID;
- mainConnectionData.connectionState = CS_CONNECTING;
- mainConnectionData.delay = 0;
-
- mControlReceiveInterface->enterMainConnectionDB(mainConnectionData, mainConnectionID);
- mConnectData.newMainConnection=mainConnectionID;
- mConnectData.sourceID=sourceID;
- mConnectData.sinkID=sinkID;
-
- if(sourceClass.sourceClassID==1)
- {
- if(exististingConnection)
- mConnectSf=SFC_RAMP_DOWN;
- else
- mConnectSf=SFC_CONNECT;
-
- mStateflow=SF_CONNECT;
- }
- else if (sourceClass.sourceClassID==2)
- {
- if(exististingConnection)
- mConnectSf=SFC_RAMP_DOWN;
- else
- mConnectSf=SFC_CONNECT;
-
- mStateflow=SF_NAVI;
- }
- else if (sourceClass.sourceClassID==3)
- {
- if(exististingConnection)
- mConnectSf=SFC_RAMP_DOWN;
- else
- mConnectSf=SFC_CONNECT;
-
- mStateflow=SF_TA;
- }
-
- callStateFlowHandler();
- return (E_OK);
-}
-
-am_Error_e CAmControlSenderBase::hookUserDisconnectionRequest(const am_mainConnectionID_t connectionID)
-{
- if (mStateflow==SF_NAVI)
- {
- mNaviSf=NAVC_RAMP_DOWN_AGAIN;
- callStateFlowHandler();
- return (E_OK);
- }
- if (mStateflow==SF_TA)
- {
- mTrafficSf=TA_RAMP_DOWN_AGAIN;
- callStateFlowHandler();
- return (E_OK);
- }
- else if (mStateflow!=SF_NONE)
- {
- return (E_NOT_POSSIBLE);
- }
- disconnect(connectionID);
- return (E_OK);
-}
-
-am_Error_e CAmControlSenderBase::hookUserSetMainSinkSoundProperty(const am_sinkID_t sinkID, const am_MainSoundProperty_s & soundProperty)
-{
- if (mStateflow!=SF_NONE)
- return (E_NOT_POSSIBLE);
-
- if (sinkID == 0)
- return (E_NON_EXISTENT);
-
- mainSinkSoundPropertySet set;
- set.sinkID = sinkID;
- set.mainSoundProperty = soundProperty;
- am_SoundProperty_s sp;
- std::vector<mainSinkSoundPropertySet>::iterator it(mListMainSoundPropertyChanges.begin());
- for (; it != mListMainSoundPropertyChanges.end(); ++it)
- {
- if (it->sinkID == sinkID)
- return E_NOT_POSSIBLE;
- }
-
-//I know this is bad - just for the reference, ok?
- sp.type = static_cast<am_CustomSoundPropertyType_t>(soundProperty.type);
- sp.value = (soundProperty.value - 5) * 30;
- am_Error_e error;
- if ((error = mControlReceiveInterface->setSinkSoundProperty(set.handle, sinkID, sp)) != E_OK)
- {
- return error;
- }
- mListMainSoundPropertyChanges.push_back(set);
- return E_OK;
-}
-
-am_Error_e CAmControlSenderBase::hookUserSetMainSourceSoundProperty(const am_sourceID_t sourceID, const am_MainSoundProperty_s & soundProperty)
-{
- (void) sourceID;
- (void) soundProperty;
- return E_NOT_USED;
-}
-
-am_Error_e CAmControlSenderBase::hookUserSetSystemProperty(const am_SystemProperty_s & property)
-{
- (void) property;
- return E_NOT_USED;
-}
-
-am_Error_e CAmControlSenderBase::hookUserVolumeChange(const am_sinkID_t SinkID, const am_mainVolume_t newVolume)
-{
- if (mStateflow!=SF_NONE)
- return (E_NOT_POSSIBLE);
-
- assert(SinkID!=0);
- mainVolumeSet set;
- set.sinkID = SinkID;
- set.mainVolume = newVolume;
- am_Error_e error;
-
- std::vector<mainVolumeSet>::iterator it(mListOpenVolumeChanges.begin());
- for (; it != mListOpenVolumeChanges.end(); ++it)
- {
- if (it->sinkID == SinkID)
- return E_NOT_POSSIBLE;
- }
-
- am_Sink_s sinkData;
- mControlReceiveInterface->getSinkInfoDB(SinkID, sinkData);
-
- if (sinkData.mainVolume == newVolume)
- return E_NO_CHANGE;
-
- if ((error = mControlReceiveInterface->setSinkVolume(set.handle, SinkID, (newVolume-10)*6, RAMP_UNKNOWN, 20)) != E_OK)
- {
- return error;
- }
- mListOpenVolumeChanges.push_back(set);
- return E_OK;
-}
-
-am_Error_e CAmControlSenderBase::hookUserVolumeStep(const am_sinkID_t SinkID, const int16_t increment)
-{
- if (mStateflow!=SF_NONE)
- return (E_NOT_POSSIBLE);
-
- assert(SinkID!=0);
- mainVolumeSet set;
- set.sinkID = SinkID;
- am_Error_e error;
- am_Sink_s sink;
- std::vector<mainVolumeSet>::iterator it(mListOpenVolumeChanges.begin());
- for (; it != mListOpenVolumeChanges.end(); ++it)
- {
- if (it->sinkID == SinkID)
- return E_NOT_POSSIBLE;
- }
- mControlReceiveInterface->getSinkInfoDB(SinkID, sink);
- set.mainVolume = sink.mainVolume + increment;
- if ((error = mControlReceiveInterface->setSinkVolume(set.handle, SinkID, (set.mainVolume-10)*6, RAMP_UNKNOWN, 20)) != E_OK)
- {
- return error;
- }
- mListOpenVolumeChanges.push_back(set);
- return E_OK;
-}
-
-am_Error_e CAmControlSenderBase::hookUserSetSinkMuteState(const am_sinkID_t sinkID, const am_MuteState_e muteState)
-{
- if (mStateflow!=SF_NONE)
- return (E_NOT_POSSIBLE);
-
- assert(sinkID!=0);
-
- mainVolumeSet set;
- set.sinkID = sinkID;
- am_Error_e error;
- am_Sink_s sink;
- mControlReceiveInterface->getSinkInfoDB(sinkID, sink);
-
- if (muteState == MS_MUTED)
- {
- set.mainVolume = sink.mainVolume;
- if ((error = mControlReceiveInterface->setSinkVolume(set.handle, sinkID, 0, RAMP_GENIVI_DIRECT, 20)) != E_OK)
- {
- return error;
- }
- }
- else
- {
- set.mainVolume = sink.mainVolume;
- if ((error = mControlReceiveInterface->setSinkVolume(set.handle, sinkID, set.mainVolume, RAMP_GENIVI_DIRECT, 20)) != E_OK)
- {
- return error;
- }
- }
- mListOpenVolumeChanges.push_back(set);
- mControlReceiveInterface->changeSinkMuteStateDB(muteState, sinkID);
- return (E_OK);
-}
-
-am_Error_e CAmControlSenderBase::hookSystemRegisterDomain(const am_Domain_s & domainData, am_domainID_t & domainID)
-{
-//this application does not do anything with it -> but some product might want to take influence here
- return mControlReceiveInterface->enterDomainDB(domainData, domainID);
-}
-
-am_Error_e CAmControlSenderBase::hookSystemDeregisterDomain(const am_domainID_t domainID)
-{
-//this application does not do anything with it -> but some product might want to take influence here
- return mControlReceiveInterface->removeDomainDB(domainID);
-}
-
-void CAmControlSenderBase::hookSystemDomainRegistrationComplete(const am_domainID_t domainID)
-{
- (void) domainID;
-}
-
-am_Error_e CAmControlSenderBase::hookSystemRegisterSink(const am_Sink_s & sinkData, am_sinkID_t & sinkID)
-{
-//this application does not do anything with it -> but some product might want to take influence here
- return mControlReceiveInterface->enterSinkDB(sinkData, sinkID);
-}
-
-am_Error_e CAmControlSenderBase::hookSystemDeregisterSink(const am_sinkID_t sinkID)
-{
-//this application does not do anything with it -> but some product might want to take influence here
- return mControlReceiveInterface->removeSinkDB(sinkID);
-}
-
-am_Error_e CAmControlSenderBase::hookSystemRegisterSource(const am_Source_s & sourceData, am_sourceID_t & sourceID)
-{
-//this application does not do anything with it -> but some product might want to take influence here
- return mControlReceiveInterface->enterSourceDB(sourceData, sourceID);
-}
-
-am_Error_e CAmControlSenderBase::hookSystemDeregisterSource(const am_sourceID_t sourceID)
-{
-//this application does not do anything with it -> but some product might want to take influence here
- return mControlReceiveInterface->removeSourceDB(sourceID);
-}
-
-am_Error_e CAmControlSenderBase::hookSystemRegisterGateway(const am_Gateway_s & gatewayData, am_gatewayID_t & gatewayID)
-{
-//this application does not do anything with it -> but some product might want to take influence here
- return mControlReceiveInterface->enterGatewayDB(gatewayData, gatewayID);
-}
-
-am_Error_e CAmControlSenderBase::hookSystemRegisterConverter(const am_Converter_s & converterData, am_converterID_t & converterID)
-{
-//this application does not do anything with it -> but some product might want to take influence here
- return mControlReceiveInterface->enterConverterDB(converterData, converterID);
-}
-
-am_Error_e CAmControlSenderBase::hookSystemDeregisterGateway(const am_gatewayID_t gatewayID)
-{
-//this application does not do anything with it -> but some product might want to take influence here
- return mControlReceiveInterface->removeGatewayDB(gatewayID);
-}
-
-am_Error_e CAmControlSenderBase::hookSystemDeregisterConverter(const am_converterID_t converterID)
-{
- return mControlReceiveInterface->removeConverterDB(converterID);
-}
-
-am_Error_e CAmControlSenderBase::hookSystemRegisterCrossfader(const am_Crossfader_s & crossfaderData, am_crossfaderID_t & crossfaderID)
-{
-//this application does not do anything with it -> but some product might want to take influence here
- return mControlReceiveInterface->enterCrossfaderDB(crossfaderData, crossfaderID);
-}
-
-am_Error_e CAmControlSenderBase::hookSystemDeregisterCrossfader(const am_crossfaderID_t crossfaderID)
-{
-//this application does not do anything with it -> but some product might want to take influence here
- return mControlReceiveInterface->removeCrossfaderDB(crossfaderID);
-}
-
-void CAmControlSenderBase::hookSystemSinkVolumeTick(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume)
-{
- (void) handle;
- (void) sinkID;
- (void) volume;
-}
-
-void CAmControlSenderBase::hookSystemSourceVolumeTick(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume)
-{
- (void) handle;
- (void) sourceID;
- (void) volume;
-}
-
-void CAmControlSenderBase::hookSystemInterruptStateChange(const am_sourceID_t sourceID, const am_InterruptState_e interruptState)
-{
- (void) sourceID;
- (void) interruptState;
-}
-
-void CAmControlSenderBase::hookSystemSinkAvailablityStateChange(const am_sinkID_t sinkID, const am_Availability_s & availability)
-{
- (void) sinkID;
- (void) availability;
-}
-
-void CAmControlSenderBase::hookSystemSourceAvailablityStateChange(const am_sourceID_t sourceID, const am_Availability_s & availability)
-{
- (void) sourceID;
- (void) availability;
-}
-
-void CAmControlSenderBase::hookSystemDomainStateChange(const am_domainID_t domainID, const am_DomainState_e state)
-{
- (void) domainID;
- (void) state;
-}
-
-void CAmControlSenderBase::hookSystemReceiveEarlyData(const std::vector<am_EarlyData_s> & data)
-{
- (void) data;
-}
-
-void CAmControlSenderBase::hookSystemSpeedChange(const am_speed_t speed)
-{
- (void) speed;
-}
-
-void CAmControlSenderBase::hookSystemTimingInformationChanged(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time)
-{
- (void) mainConnectionID;
- (void) time;
-}
-
-void CAmControlSenderBase::cbAckConnect(const am_Handle_s handle, const am_Error_e errorID)
-{
- (void) errorID;
-//\todo:error checking
- std::vector<mainConnectionSet>::iterator it(mListOpenConnections.begin());
- for (; it != mListOpenConnections.end(); ++it)
- {
- std::vector<handleStatus>::iterator hit;
- handleStatus status;
- status.status = true;
- status.handle = handle;
- hit = std::find_if(it->listHandleStaus.begin(), it->listHandleStaus.end(), findHandle(status));
- if (hit == it->listHandleStaus.end())
- continue;
- hit->status = true;
- if (it->listHandleStaus.end() == std::find_if(it->listHandleStaus.begin(), it->listHandleStaus.end(), checkHandle(status)))
- {
- mControlReceiveInterface->changeMainConnectionStateDB(it->connectionID, CS_CONNECTED);
- mListOpenConnections.erase(it);
- break;
- }
- }
- callStateFlowHandler();
-}
-
-void CAmControlSenderBase::cbAckDisconnect(const am_Handle_s handle, const am_Error_e errorID)
-{
- (void) errorID;
-//\todo:error checking
- std::vector<mainConnectionSet>::iterator it(mListOpenDisconnections.begin());
- for (; it != mListOpenDisconnections.end(); ++it)
- {
- std::vector<handleStatus>::iterator hit;
- handleStatus status;
- status.status = true;
- status.handle = handle;
- hit = std::find_if(it->listHandleStaus.begin(), it->listHandleStaus.end(), findHandle(status));
- if (hit == it->listHandleStaus.end())
- continue;
- hit->status = true;
- if (it->listHandleStaus.end() == std::find_if(it->listHandleStaus.begin(), it->listHandleStaus.end(), checkHandle(status)))
- {
- mControlReceiveInterface->removeMainConnectionDB(it->connectionID);
- mListOpenDisconnections.erase(it);
- break;
- }
- }
- callStateFlowHandler();
-}
-
-void CAmControlSenderBase::cbAckCrossFade(const am_Handle_s handle, const am_HotSink_e hostsink, const am_Error_e error)
-{
- (void) handle;
- (void) hostsink;
- (void) error;
-}
-
-void CAmControlSenderBase::cbAckSetSinkVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error)
-{
- (void) error;
- (void) volume;
- //\todo:error checking
- std::vector<mainVolumeSet>::iterator it(mListOpenVolumeChanges.begin());
- for (; it != mListOpenVolumeChanges.end(); ++it)
- {
- if (handle.handle == it->handle.handle)
- {
- mControlReceiveInterface->changeSinkMainVolumeDB(it->mainVolume, it->sinkID);
- mListOpenVolumeChanges.erase(it);
- break;
- }
- }
- callStateFlowHandler();
-}
-
-void CAmControlSenderBase::cbAckSetSourceVolumeChange(const am_Handle_s handle, const am_volume_t voulme, const am_Error_e error)
-{
- (void) error;
- (void) voulme;
- (void) handle;
- callStateFlowHandler();
-}
-
-void CAmControlSenderBase::cbAckSetSourceState(const am_Handle_s handle, const am_Error_e error)
-{
- (void) error;
- (void) handle;
- callStateFlowHandler();
-}
-
-void CAmControlSenderBase::cbAckSetSourceSoundProperty(const am_Handle_s handle, const am_Error_e error)
-{
- (void) error;
- (void) handle;
-}
-
-void CAmControlSenderBase::cbAckSetSinkSoundProperty(const am_Handle_s handle, const am_Error_e error)
-{
- (void) error;
-//\todo:error checking
- std::vector<mainSinkSoundPropertySet>::iterator it(mListMainSoundPropertyChanges.begin());
- for (; it != mListMainSoundPropertyChanges.end(); ++it)
- {
- if (handle.handle == it->handle.handle)
- {
- mControlReceiveInterface->changeMainSinkSoundPropertyDB(it->mainSoundProperty, it->sinkID);
- mListMainSoundPropertyChanges.erase(it);
- break;
- }
- }
-}
-
-void CAmControlSenderBase::cbAckSetSourceSoundProperties(const am_Handle_s handle, const am_Error_e error)
-{
- (void) error;
- (void) handle;
-}
-
-void CAmControlSenderBase::cbAckSetSinkSoundProperties(const am_Handle_s handle, const am_Error_e error)
-{
- (void) error;
- (void) handle;
-}
-
-void CAmControlSenderBase::setControllerRundown(const int16_t signal)
-{
- logInfo("CAmControlSenderBase::setControllerRundown() was called signal=",signal);
- if (signal==2)
- mControlReceiveInterface->confirmControllerRundown(E_UNKNOWN);
-
- mControlReceiveInterface->confirmControllerRundown(E_OK);
-}
-
-am_Error_e CAmControlSenderBase::getConnectionFormatChoice(const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_Route_s listRoute, const std::vector<am_CustomAvailabilityReason_t> listPossibleConnectionFormats, std::vector<am_CustomConnectionFormat_t> & listPrioConnectionFormats)
-{
- (void) sourceID;
- (void) sinkID;
- (void) listRoute;
-//ok, this is cheap. In a real product you have your preferences, right?
- listPrioConnectionFormats = listPossibleConnectionFormats;
- return (E_OK);
-}
-
-void CAmControlSenderBase::getInterfaceVersion(std::string & version) const
-{
- version = ControlSendVersion;
-}
-
-
-void CAmControlSenderBase::disconnect(am_mainConnectionID_t connectionID)
-{
-
- am_MainConnection_s mainConnection;
- am_Error_e error;
- if ((error = mControlReceiveInterface->getMainConnectionInfoDB(connectionID, mainConnection)) != E_OK)
- {
- logError("CAmControlSenderBase::disconnect Could not getInfor for mainconnection Error: ", error);
- return;
- }
-
- std::vector<am_connectionID_t>::iterator it(mainConnection.listConnectionID.begin());
- std::vector<handleStatus> listHandleStaus;
- for (; it != mainConnection.listConnectionID.end(); ++it)
- {
- handleStatus status;
- status.status = false;
- if ((error = mControlReceiveInterface->disconnect(status.handle, *it)))
- {
- logError("Could not disconnect, Error", error);
- }
- listHandleStaus.push_back(status);
- }
- mainConnectionSet set;
- set.connectionID = connectionID;
- set.listHandleStaus = listHandleStaus;
- mListOpenDisconnections.push_back(set);
-}
-
-void CAmControlSenderBase::connect(am_sourceID_t sourceID, am_sinkID_t sinkID, am_mainConnectionID_t mainConnectionID)
-{
- std::vector<am_Route_s> listRoutes;
- std::vector<am_connectionID_t> listConnectionIDs;
- am_SourceClass_s sourceClass, tempSourceClass;
- am_Handle_s handle;
- mControlReceiveInterface->getRoute(false, sourceID, sinkID, listRoutes);
- if (listRoutes.empty())
- logError("CAmControlSenderBase::connect not possible");
-
- std::vector<handleStatus> listHandleStaus;
- std::vector<am_RoutingElement_s>::iterator it(listRoutes[0].route.begin());
- for (; it != listRoutes[0].route.end(); ++it)
- {
- am_connectionID_t connectionID;
- mControlReceiveInterface->connect(handle, connectionID, it->connectionFormat, it->sourceID, it->sinkID);
- handleStatus status;
- status.handle = handle;
- status.status = false;
- listHandleStaus.push_back(status);
- listConnectionIDs.push_back(connectionID);
- }
- mainConnectionSet set;
- set.connectionID = mainConnectionID;
- set.listHandleStaus = listHandleStaus;
- mControlReceiveInterface->changeMainConnectionRouteDB(mainConnectionID,listConnectionIDs);
- mListOpenConnections.push_back(set);
-}
-
-void CAmControlSenderBase::callStateFlowHandler()
-{
- logInfo("CAmControlSenderBase::callStateFlowHandler() called, state ",mStateflow);
-
- switch(mStateflow)
- {
- case SF_CONNECT:
- callConnectHandler();
- break;
- case SF_TA:
- callTAHandler();
- break;
- case SF_NAVI:
- callNaviHandler();
- break;
- default:
- break;
-
- }
-}
-
-void CAmControlSenderBase::callConnectHandler()
-{
- logInfo("CAmControlSenderBase::callConnectHandler() called, state ",mConnectSf);
-
- am_Handle_s handle;
- am_Sink_s sinkData;
- switch (mConnectSf)
- {
- case SFC_RAMP_DOWN:
- mControlReceiveInterface->setSinkVolume(handle, mConnectData.sinkID, -60, RAMP_GENIVI_EXP_INV, 4000);
- mConnectSf = SFC_SOURCE_STATE_OFF;
- break;
- case SFC_SOURCE_STATE_OFF:
- mControlReceiveInterface->setSourceState(handle, mConnectData.oldSourceID, SS_OFF);
- mConnectSf = SFC_DISCONNECT;
- break;
- case SFC_DISCONNECT:
- disconnect(mConnectData.currentMainConnection);
- mConnectSf = SFC_CONNECT;
- break;
- case SFC_CONNECT:
- connect(mConnectData.sourceID, mConnectData.sinkID, mConnectData.newMainConnection);
- mConnectSf = SFC_SOURCE_STATE_ON;
- break;
- case SFC_SOURCE_STATE_ON:
- mControlReceiveInterface->setSourceState(handle, mConnectData.sourceID, SS_ON);
- mConnectSf = SFC_RAMP_UP;
- break;
- case SFC_RAMP_UP:
- mControlReceiveInterface->getSinkInfoDB(mConnectData.sinkID, sinkData);
- if (mControlReceiveInterface->setSinkVolume(handle, mConnectData.sinkID, (sinkData.mainVolume-10)*6, RAMP_GENIVI_EXP_INV, 4000)==E_NO_CHANGE)
- mStateflow=SF_NONE;
- mConnectSf=SFC_FINISHED;
- break;
- case SFC_FINISHED:
- mStateflow=SF_NONE;
- break;
- default:
- break;
- }
-}
-
-void CAmControlSenderBase::callNaviHandler()
-{
- logInfo("CAmControlSenderBase::callNaviHandler() called, state ",mConnectSf);
-
- am_Handle_s handle;
- am_Source_s sourceData;
- am_Sink_s sinkData;
- switch (mNaviSf)
- {
- case NAVC_RAMP_DOWN:
- mControlReceiveInterface->setSourceVolume(handle, mConnectData.oldSourceID, -13, RAMP_UNKNOWN, 2000);
- mNaviSf = NAVC_CONNECT;
- break;
- case NAVC_CONNECT:
- connect(mConnectData.sourceID, mConnectData.sinkID, mConnectData.newMainConnection);
- mNaviSf = NAVC_SOURCE_STATE_ON;
- break;
- case NAVC_SOURCE_STATE_ON:
- mControlReceiveInterface->setSourceState(handle, mConnectData.sourceID, SS_ON);
- mNaviSf = NAVC_RAMP_UP;
- break;
- case NAVC_RAMP_UP:
- mControlReceiveInterface->getSinkInfoDB(mConnectData.sinkID, sinkData);
- mControlReceiveInterface->setSinkVolume(handle, mConnectData.sinkID, (sinkData.mainVolume-10)*60+2, RAMP_UNKNOWN, 2000);
- mNaviSf=NAVC_WAIT_STATE;
- break;
- case NAVC_WAIT_STATE:
- mNaviSf=NAVC_RAMP_DOWN_AGAIN;
- break;
- case NAVC_RAMP_DOWN_AGAIN:
- mControlReceiveInterface->setSinkVolume(handle, mConnectData.sinkID, (sinkData.mainVolume-10)*60, RAMP_UNKNOWN, 2000);
- mNaviSf=NAVC_SOURCE_VOLUME_BACK;
- break;
- case NAVC_SOURCE_VOLUME_BACK:
- mControlReceiveInterface->setSourceVolume(handle, mConnectData.oldSourceID, 0, RAMP_UNKNOWN, 2000);
- mNaviSf=NAVC_SOURCE_ACTIVITY_BACK;
- break;
- case NAVC_SOURCE_ACTIVITY_BACK:
- mControlReceiveInterface->setSourceState(handle, mConnectData.sourceID, SS_OFF);
- mNaviSf=NAVC_DISCONNECT;
- break;
- case NAVC_DISCONNECT:
- disconnect(mConnectData.newMainConnection);
- mNaviSf=NAVC_FINISHED;
- break;
- case NAVC_FINISHED:
- mStateflow=SF_NONE;
- break;
- default:
- break;
- }
-}
-
-void CAmControlSenderBase::confirmCommandReady(const am_Error_e error)
-{
- (void) error;
- logInfo("ControlSenderPlugin got Command Ready confirmed");
-}
-
-void CAmControlSenderBase::confirmRoutingReady(const am_Error_e error)
-{
- (void)error;
- logInfo("ControlSenderPlugin got Routing Ready confirmed");
-}
-
-void CAmControlSenderBase::confirmCommandRundown(const am_Error_e error)
-{
- (void)error;
- logInfo("ControlSenderPlugin got Command Rundown confirmed");
-}
-
-void CAmControlSenderBase::confirmRoutingRundown(const am_Error_e error)
-{
- (void)error;
- logInfo("ControlSenderPlugin got Routing Rundown confirmed");
-}
-
-void CAmControlSenderBase::hookSystemNodeStateChanged(const NsmNodeState_e NodeStateId)
-{
- (void) NodeStateId;
- //here you can process informations about the notestate
-}
-
-void CAmControlSenderBase::hookSystemNodeApplicationModeChanged(const NsmApplicationMode_e ApplicationModeId)
-{
- (void) ApplicationModeId;
-}
-
-
-void CAmControlSenderBase::cbAckSetSinkNotificationConfiguration(const am_Handle_s handle, const am_Error_e error)
-{
- (void) handle;
- (void) error;
-}
-
-void CAmControlSenderBase::cbAckSetSourceNotificationConfiguration(const am_Handle_s handle, const am_Error_e error)
-{
- (void) handle;
- (void) error;
-}
-
-
-NsmErrorStatus_e CAmControlSenderBase::hookSystemLifecycleRequest(const uint32_t Request, const uint32_t RequestId)
-{
- (void) Request;
- (void) RequestId;
- logInfo("CAmControlSenderBase::hookSystemLifecycleRequest request=",Request," requestID=",RequestId);
- return (NsmErrorStatus_Error);
-}
-
-am_Error_e CAmControlSenderBase::hookSystemUpdateSink(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_CustomConnectionFormat_t>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties)
-{
- (void) sinkID;
- (void) sinkClassID;
- (void) listMainSoundProperties;
- (void) listConnectionFormats;
- (void) listSoundProperties;
- return (E_NOT_USED);
-}
-
-am_Error_e CAmControlSenderBase::hookSystemUpdateSource(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_CustomConnectionFormat_t>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties)
-{
- (void) sourceID;
- (void) sourceClassID;
- (void) listSoundProperties;
- (void) listMainSoundProperties;
- (void) listConnectionFormats;
- return (E_NOT_USED);
-}
-
-am_Error_e CAmControlSenderBase::hookSystemUpdateGateway(const am_gatewayID_t gatewayID, const std::vector<am_CustomConnectionFormat_t>& listSourceConnectionFormats, const std::vector<am_CustomConnectionFormat_t>& listSinkConnectionFormats, const std::vector<bool>& convertionMatrix)
-{
- (void) gatewayID;
- (void) listSourceConnectionFormats;
- (void) listSinkConnectionFormats;
- (void) convertionMatrix;
- return (E_NOT_USED);
-}
-
-am_Error_e CAmControlSenderBase::hookSystemUpdateConverter(const am_converterID_t converterID, const std::vector<am_CustomConnectionFormat_t>& listSourceConnectionFormats, const std::vector<am_CustomConnectionFormat_t>& listSinkConnectionFormats, const std::vector<bool>& convertionMatrix)
-{
- (void) converterID;
- (void) listSourceConnectionFormats;
- (void) listSinkConnectionFormats;
- (void) convertionMatrix;
- return (E_NOT_USED);
-}
-
-void CAmControlSenderBase::cbAckSetVolumes(const am_Handle_s handle, const std::vector<am_Volumes_s>& listVolumes, const am_Error_e error)
-{
- (void) handle;
- (void) listVolumes;
- (void) error;
-}
-
-void CAmControlSenderBase::hookSinkNotificationDataChanged(const am_sinkID_t sinkID, const am_NotificationPayload_s& payload)
-{
- (void) sinkID;
- (void) payload;
-}
-
-void CAmControlSenderBase::hookSourceNotificationDataChanged(const am_sourceID_t sourceID, const am_NotificationPayload_s& payload)
-{
- (void) sourceID;
- (void) payload;
-}
-
-am_Error_e CAmControlSenderBase::hookUserSetMainSinkNotificationConfiguration(const am_sinkID_t sinkID, const am_NotificationConfiguration_s& notificationConfiguration)
-{
- (void) sinkID;
- (void) notificationConfiguration;
- return (E_NOT_USED);
-}
-
-am_Error_e CAmControlSenderBase::hookUserSetMainSourceNotificationConfiguration(const am_sourceID_t sourceID, const am_NotificationConfiguration_s& notificationConfiguration)
-{
- (void) sourceID;
- (void) notificationConfiguration;
- return (E_NOT_USED);
-}
-
-void CAmControlSenderBase::hookSystemSessionStateChanged(const std::string& sessionName, const NsmSeat_e seatID, const NsmSessionState_e sessionStateID)
-{
- (void) sessionName;
- (void) seatID;
- (void) sessionStateID;
-}
-
-void CAmControlSenderBase::callTAHandler()
-{
- logInfo("CAmControlSenderBase::callTAHandler() called, state ",mConnectSf);
-
- am_Handle_s handle;
- am_Source_s sourceData;
- am_Sink_s sinkData;
- switch (mTrafficSf)
- {
- case TA_RAMP_DOWN:
- mControlReceiveInterface->setSourceState(handle, mConnectData.oldSourceID, SS_PAUSED);
- mTrafficSf = TA_CONNECT;
- break;
- case TA_CONNECT:
- connect(mConnectData.sourceID, mConnectData.sinkID, mConnectData.newMainConnection);
- mTrafficSf = TA_SOURCE_STATE_ON;
- break;
- case TA_SOURCE_STATE_ON:
- mControlReceiveInterface->setSourceState(handle, mConnectData.sourceID, SS_ON);
- mTrafficSf = TA_RAMP_UP;
- break;
- case TA_RAMP_UP:
- mControlReceiveInterface->getSinkInfoDB(mConnectData.sinkID, sinkData);
- mControlReceiveInterface->setSinkVolume(handle, mConnectData.sinkID, (sinkData.mainVolume-10)*60+2, RAMP_UNKNOWN, 2000);
- mTrafficSf=TA_WAIT_STATE;
- break;
- case TA_WAIT_STATE:
- mTrafficSf=TA_RAMP_DOWN_AGAIN;
- break;
- case TA_RAMP_DOWN_AGAIN:
- mControlReceiveInterface->setSinkVolume(handle, mConnectData.sinkID, (sinkData.mainVolume-10)*60, RAMP_UNKNOWN, 2000);
- mTrafficSf=TA_SOURCE_STATE_OFF;
- break;
- case TA_SOURCE_STATE_OFF:
- mControlReceiveInterface->setSourceState(handle, mConnectData.oldSourceID, SS_ON);
- mTrafficSf=TA_SOURCE_STATE_OLD_OFF;
- break;
- case TA_SOURCE_STATE_OLD_OFF:
- mControlReceiveInterface->setSourceState(handle, mConnectData.sourceID, SS_OFF);
- mTrafficSf=TA_DISCONNECT;
- break;
- case TA_DISCONNECT:
- disconnect(mConnectData.newMainConnection);
- mTrafficSf=TA_FINISHED;
- break;
- case TA_FINISHED:
- mStateflow=SF_NONE;
- break;
- default:
- break;
- }
-}
-
-
-
diff --git a/PluginControlInterface/src/IAmControlReceiverShadow.cpp b/PluginControlInterface/src/IAmControlReceiverShadow.cpp
deleted file mode 100644
index 649d621..0000000
--- a/PluginControlInterface/src/IAmControlReceiverShadow.cpp
+++ /dev/null
@@ -1,523 +0,0 @@
-/**
- * Copyright (c) 2012 BMW
- *
- * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
- *
- * \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 "IAmControlReceiverShadow.h"
-#include "control/IAmControlReceive.h"
-
-namespace am
-{
-
-IAmControlReceiverShadow::IAmControlReceiverShadow(IAmControlReceive *iReceiveInterface, CAmSocketHandler *iSocketHandler) :
- mpIAmControlReceiver(iReceiveInterface), //
- mCAmSerializer(iSocketHandler)
-{
-}
-
-IAmControlReceiverShadow::~IAmControlReceiverShadow()
-{
-
-}
-
-am_Error_e IAmControlReceiverShadow::getRoute(bool onlyfree, am_sourceID_t sourceID, am_sinkID_t sinkID, std::vector<am_Route_s> & returnList)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const bool, const am_sourceID_t, const am_sinkID_t, std::vector<am_Route_s> &, bool, am_sourceID_t, am_sinkID_t, std::vector<am_Route_s> >(mpIAmControlReceiver, &IAmControlReceive::getRoute, error, onlyfree, sourceID, sinkID, returnList);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::connect(am_Handle_s & handle, am_connectionID_t & connectionID, am_CustomConnectionFormat_t format, am_sourceID_t sourceID, am_sinkID_t sinkID)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, am_Handle_s &, am_connectionID_t &, const am_CustomConnectionFormat_t, const am_sourceID_t, const am_sinkID_t, am_Handle_s, am_connectionID_t, am_CustomConnectionFormat_t, am_sourceID_t, am_sinkID_t>(mpIAmControlReceiver, &IAmControlReceive::connect, error, handle, connectionID, format, sourceID, sinkID);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::disconnect(am_Handle_s & handle, am_connectionID_t connectionID)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, am_Handle_s &, const am_connectionID_t, am_Handle_s, am_connectionID_t>(mpIAmControlReceiver, &IAmControlReceive::disconnect, error, handle, connectionID);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::crossfade(am_Handle_s & handle, am_HotSink_e hotSource, am_crossfaderID_t crossfaderID, am_CustomRampType_t rampType, am_time_t rampTime)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, am_Handle_s &, const am_HotSink_e, const am_crossfaderID_t, const am_CustomRampType_t, const am_time_t, am_Handle_s, am_HotSink_e, am_crossfaderID_t, am_CustomRampType_t, am_time_t>(mpIAmControlReceiver, &IAmControlReceive::crossfade, error, handle, hotSource, crossfaderID, rampType, rampTime);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::abortAction(am_Handle_s handle)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_Handle_s, am_Handle_s>(mpIAmControlReceiver, &IAmControlReceive::abortAction, error, handle);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::setSourceState(am_Handle_s & handle, am_sourceID_t sourceID, am_SourceState_e state)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, am_Handle_s&, const am_sourceID_t, const am_SourceState_e, am_Handle_s, am_sourceID_t, am_SourceState_e>(mpIAmControlReceiver, &IAmControlReceive::setSourceState, error, handle, sourceID, state);
- return (error);
-
-}
-
-am_Error_e IAmControlReceiverShadow::setSinkVolume(am_Handle_s & handle, am_sinkID_t sinkID, am_volume_t volume, am_CustomRampType_t ramp, am_time_t time)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, am_Handle_s&, const am_sinkID_t, const am_volume_t, const am_CustomRampType_t, const am_time_t, am_Handle_s, am_sinkID_t, am_volume_t, am_CustomRampType_t, am_time_t>(mpIAmControlReceiver, &IAmControlReceive::setSinkVolume, error, handle, sinkID, volume, ramp, time);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::setSourceVolume(am_Handle_s & handle, am_sourceID_t sourceID, am_volume_t volume, am_CustomRampType_t rampType, am_time_t time)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, am_Handle_s&, const am_sourceID_t, const am_volume_t, const am_CustomRampType_t, const am_time_t, am_Handle_s, am_sourceID_t, am_volume_t, am_CustomRampType_t, am_time_t>(mpIAmControlReceiver, &IAmControlReceive::setSourceVolume, error, handle, sourceID, volume, rampType, time);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::setSinkSoundProperties(am_Handle_s & handle, am_sinkID_t sinkID, std::vector<am_SoundProperty_s> & soundProperty)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, am_Handle_s &, const am_sinkID_t, const std::vector<am_SoundProperty_s> &, am_Handle_s, am_sinkID_t, std::vector<am_SoundProperty_s> >(mpIAmControlReceiver, &IAmControlReceive::setSinkSoundProperties, error, handle, sinkID, soundProperty);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::setSinkSoundProperty(am_Handle_s & handle, am_sinkID_t sinkID, am_SoundProperty_s & soundProperty)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, am_Handle_s &, const am_sinkID_t, const am_SoundProperty_s &, am_Handle_s, am_sinkID_t, am_SoundProperty_s>(mpIAmControlReceiver, &IAmControlReceive::setSinkSoundProperty, error, handle, sinkID, soundProperty);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::setSourceSoundProperties(am_Handle_s & handle, am_sourceID_t sourceID, std::vector<am_SoundProperty_s> & soundProperty)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, am_Handle_s &, const am_sourceID_t, const std::vector<am_SoundProperty_s> &, am_Handle_s, am_sourceID_t, std::vector<am_SoundProperty_s> >(mpIAmControlReceiver, &IAmControlReceive::setSourceSoundProperties, error, handle, sourceID, soundProperty);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::setSourceSoundProperty(am_Handle_s & handle, am_sourceID_t sourceID, am_SoundProperty_s & soundProperty)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, am_Handle_s &, const am_sourceID_t, const am_SoundProperty_s &, am_Handle_s, am_sourceID_t, am_SoundProperty_s>(mpIAmControlReceiver, &IAmControlReceive::setSourceSoundProperty, error, handle, sourceID, soundProperty);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::setDomainState(am_domainID_t domainID, am_DomainState_e domainState)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_domainID_t, const am_DomainState_e, am_domainID_t, am_DomainState_e>(mpIAmControlReceiver, &IAmControlReceive::setDomainState, error, domainID, domainState);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::enterDomainDB(am_Domain_s & domainData, am_domainID_t & domainID)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_Domain_s&, am_domainID_t &, am_Domain_s, am_domainID_t>(mpIAmControlReceiver, &IAmControlReceive::enterDomainDB, error, domainData, domainID);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::enterMainConnectionDB(am_MainConnection_s & mainConnectionData, am_mainConnectionID_t & connectionID)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_MainConnection_s &, am_mainConnectionID_t&, am_MainConnection_s, am_mainConnectionID_t>(mpIAmControlReceiver, &IAmControlReceive::enterMainConnectionDB, error, mainConnectionData, connectionID);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::enterSinkDB(am_Sink_s & sinkData, am_sinkID_t & sinkID)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_Sink_s &, am_sinkID_t&, am_Sink_s, am_sinkID_t>(mpIAmControlReceiver, &IAmControlReceive::enterSinkDB, error, sinkData, sinkID);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::enterCrossfaderDB(am_Crossfader_s & crossfaderData, am_crossfaderID_t & crossfaderID)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_Crossfader_s &, am_crossfaderID_t &, am_Crossfader_s, am_crossfaderID_t>(mpIAmControlReceiver, &IAmControlReceive::enterCrossfaderDB, error, crossfaderData, crossfaderID);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::enterGatewayDB(am_Gateway_s & gatewayData, am_gatewayID_t & gatewayID)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_Gateway_s &, am_gatewayID_t &, am_Gateway_s, am_gatewayID_t>(mpIAmControlReceiver, &IAmControlReceive::enterGatewayDB, error, gatewayData, gatewayID);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::enterSourceDB(am_Source_s & sourceData, am_sourceID_t & sourceID)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_Source_s &, am_sourceID_t &, am_Source_s, am_sourceID_t>(mpIAmControlReceiver, &IAmControlReceive::enterSourceDB, error, sourceData, sourceID);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::enterSinkClassDB(am_SinkClass_s & sinkClass, am_sinkClass_t & sinkClassID)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_SinkClass_s &, am_sinkClass_t &, am_SinkClass_s, am_sinkClass_t>(mpIAmControlReceiver, &IAmControlReceive::enterSinkClassDB, error, sinkClass, sinkClassID);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::enterSourceClassDB(am_sourceClass_t & sourceClassID, am_SourceClass_s & sourceClass)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, am_sourceClass_t &, const am_SourceClass_s &, am_sourceClass_t, am_SourceClass_s>(mpIAmControlReceiver, &IAmControlReceive::enterSourceClassDB, error, sourceClassID, sourceClass);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::changeSinkClassInfoDB(am_SinkClass_s & sinkClass)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_SinkClass_s &, am_SinkClass_s>(mpIAmControlReceiver, &IAmControlReceive::changeSinkClassInfoDB, error, sinkClass);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::changeSourceClassInfoDB(am_SourceClass_s & sourceClass)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_SourceClass_s &, am_SourceClass_s>(mpIAmControlReceiver, &IAmControlReceive::changeSourceClassInfoDB, error, sourceClass);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::enterSystemPropertiesListDB(std::vector<am_SystemProperty_s> & listSystemProperties)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const std::vector<am_SystemProperty_s> &, std::vector<am_SystemProperty_s> >(mpIAmControlReceiver, &IAmControlReceive::enterSystemPropertiesListDB, error, listSystemProperties);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::changeMainConnectionRouteDB(am_mainConnectionID_t mainconnectionID, std::vector<am_connectionID_t> & listConnectionID)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_mainConnectionID_t, const std::vector<am_connectionID_t> &, am_mainConnectionID_t, std::vector<am_connectionID_t> >(mpIAmControlReceiver, &IAmControlReceive::changeMainConnectionRouteDB, error, mainconnectionID, listConnectionID);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::changeMainConnectionStateDB(am_mainConnectionID_t mainconnectionID, am_ConnectionState_e connectionState)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_mainConnectionID_t, const am_ConnectionState_e, am_mainConnectionID_t, am_ConnectionState_e>(mpIAmControlReceiver, &IAmControlReceive::changeMainConnectionStateDB, error, mainconnectionID, connectionState);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::changeSinkMainVolumeDB(am_mainVolume_t mainVolume, am_sinkID_t sinkID)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_mainVolume_t, const am_sinkID_t, am_mainVolume_t, am_sinkID_t>(mpIAmControlReceiver, &IAmControlReceive::changeSinkMainVolumeDB, error, mainVolume, sinkID);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::getListMainConnections(std::vector<am_MainConnection_s> & listMainConnections)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, std::vector<am_MainConnection_s> &, std::vector<am_MainConnection_s> >(mpIAmControlReceiver, &IAmControlReceive::getListMainConnections, error, listMainConnections);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::getListDomains(std::vector<am_Domain_s> & listDomains)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, std::vector<am_Domain_s> &, std::vector<am_Domain_s> >(mpIAmControlReceiver, &IAmControlReceive::getListDomains, error, listDomains);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::getListConnections(std::vector<am_Connection_s> & listConnections)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, std::vector<am_Connection_s>&, std::vector<am_Connection_s> >(mpIAmControlReceiver, &IAmControlReceive::getListConnections, error, listConnections);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::getListSinks(std::vector<am_Sink_s> & listSinks)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, std::vector<am_Sink_s> &, std::vector<am_Sink_s> >(mpIAmControlReceiver, &IAmControlReceive::getListSinks, error, listSinks);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::getListSources(std::vector<am_Source_s> & listSources)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, std::vector<am_Source_s> &, std::vector<am_Source_s> >(mpIAmControlReceiver, &IAmControlReceive::getListSources, error, listSources);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::getListSourceClasses(std::vector<am_SourceClass_s> & listSourceClasses)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, std::vector<am_SourceClass_s> &, std::vector<am_SourceClass_s> >(mpIAmControlReceiver, &IAmControlReceive::getListSourceClasses, error, listSourceClasses);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::getListHandles(std::vector<am_Handle_s> & listHandles)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, std::vector<am_Handle_s> &, std::vector<am_Handle_s> >(mpIAmControlReceiver, &IAmControlReceive::getListHandles, error, listHandles);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::getListCrossfaders(std::vector<am_Crossfader_s> & listCrossfaders)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, std::vector<am_Crossfader_s> &, std::vector<am_Crossfader_s> >(mpIAmControlReceiver, &IAmControlReceive::getListCrossfaders, error, listCrossfaders);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::getListGateways(std::vector<am_Gateway_s> & listGateways)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, std::vector<am_Gateway_s>&, std::vector<am_Gateway_s> >(mpIAmControlReceiver, &IAmControlReceive::getListGateways, error, listGateways);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::getListSinkClasses(std::vector<am_SinkClass_s> & listSinkClasses)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, std::vector<am_SinkClass_s> &, std::vector<am_SinkClass_s> >(mpIAmControlReceiver, &IAmControlReceive::getListSinkClasses, error, listSinkClasses);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::getListSystemProperties(std::vector<am_SystemProperty_s> & listSystemProperties)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, std::vector<am_SystemProperty_s> &, std::vector<am_SystemProperty_s> >(mpIAmControlReceiver, &IAmControlReceive::getListSystemProperties, error, listSystemProperties);
- return (error);
-}
-
-void IAmControlReceiverShadow::setCommandReady()
-{
- mCAmSerializer.asyncCall<IAmControlReceive>(mpIAmControlReceiver, &IAmControlReceive::setCommandReady);
-}
-
-void IAmControlReceiverShadow::setCommandRundown()
-{
- mCAmSerializer.asyncCall<IAmControlReceive>(mpIAmControlReceiver, &IAmControlReceive::setCommandRundown);
-}
-
-void IAmControlReceiverShadow::setRoutingReady()
-{
- mCAmSerializer.asyncCall<IAmControlReceive>(mpIAmControlReceiver, &IAmControlReceive::setRoutingReady);
-}
-
-void IAmControlReceiverShadow::setRoutingRundown()
-{
- mCAmSerializer.asyncCall<IAmControlReceive>(mpIAmControlReceiver, &IAmControlReceive::setRoutingRundown);
-}
-
-void am::IAmControlReceiverShadow::confirmControllerReady(am_Error_e error)
-{
- mCAmSerializer.asyncCall<IAmControlReceive,am_Error_e>(mpIAmControlReceiver,&IAmControlReceive::confirmControllerReady,error);
-}
-
-void am::IAmControlReceiverShadow::confirmControllerRundown(am_Error_e error)
-{
- mCAmSerializer.asyncCall<IAmControlReceive,am_Error_e>(mpIAmControlReceiver, &IAmControlReceive::confirmControllerRundown,error);
-}
-
-am_Error_e IAmControlReceiverShadow::getSocketHandler(CAmSocketHandler *& socketHandler)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, CAmSocketHandler*&, CAmSocketHandler*>(mpIAmControlReceiver, &IAmControlReceive::getSocketHandler, error, socketHandler);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::changeSinkAvailabilityDB(am_Availability_s& availability, am_sinkID_t sinkID)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_Availability_s&, const am_sinkID_t, am_Availability_s, am_sinkID_t>(mpIAmControlReceiver, &IAmControlReceive::changeSinkAvailabilityDB, error, availability, sinkID);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::changDomainStateDB(am_DomainState_e domainState, am_domainID_t domainID)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, am_DomainState_e, const am_domainID_t, am_DomainState_e, am_domainID_t>(mpIAmControlReceiver, &IAmControlReceive::changDomainStateDB, error, domainState, domainID);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::changeSinkMuteStateDB(am_MuteState_e muteState, am_sinkID_t sinkID)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, am_MuteState_e, const am_sinkID_t, am_MuteState_e, am_sinkID_t>(mpIAmControlReceiver, &IAmControlReceive::changeSinkMuteStateDB, error, muteState, sinkID);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::changeMainSinkSoundPropertyDB(am_MainSoundProperty_s& soundProperty, am_sinkID_t sinkID)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_MainSoundProperty_s&, const am_sinkID_t, am_MainSoundProperty_s, am_sinkID_t>(mpIAmControlReceiver, &IAmControlReceive::changeMainSinkSoundPropertyDB, error, soundProperty, sinkID);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::changeMainSourceSoundPropertyDB(am_MainSoundProperty_s& soundProperty, am_sourceID_t sourceID)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_MainSoundProperty_s&, const am_sourceID_t, am_MainSoundProperty_s, am_sourceID_t>(mpIAmControlReceiver, &IAmControlReceive::changeMainSourceSoundPropertyDB, error, soundProperty, sourceID);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::changeSourceAvailabilityDB(am_Availability_s& availability, am_sourceID_t sourceID)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_Availability_s&, const am_sourceID_t, am_Availability_s, am_sourceID_t>(mpIAmControlReceiver, &IAmControlReceive::changeSourceAvailabilityDB, error, availability, sourceID);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::changeSystemPropertyDB(am_SystemProperty_s& property)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_SystemProperty_s&, am_SystemProperty_s>(mpIAmControlReceiver, &IAmControlReceive::changeSystemPropertyDB, error, property);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::removeMainConnectionDB(am_mainConnectionID_t mainConnectionID)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_mainConnectionID_t, am_mainConnectionID_t>(mpIAmControlReceiver, &IAmControlReceive::removeMainConnectionDB, error, mainConnectionID);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::removeSinkDB(am_sinkID_t sinkID)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_sinkID_t, am_sinkID_t>(mpIAmControlReceiver, &IAmControlReceive::removeSinkDB, error, sinkID);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::removeSourceDB(am_sourceID_t sourceID)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_sourceID_t, am_sourceID_t>(mpIAmControlReceiver, &IAmControlReceive::removeSourceDB, error, sourceID);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::removeGatewayDB(am_gatewayID_t gatewayID)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_gatewayID_t, am_gatewayID_t>(mpIAmControlReceiver, &IAmControlReceive::removeGatewayDB, error, gatewayID);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::removeCrossfaderDB(am_crossfaderID_t crossfaderID)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_crossfaderID_t, am_crossfaderID_t>(mpIAmControlReceiver, &IAmControlReceive::removeCrossfaderDB, error, crossfaderID);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::removeDomainDB(am_domainID_t domainID)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_domainID_t, am_domainID_t>(mpIAmControlReceiver, &IAmControlReceive::removeDomainDB, error, domainID);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::removeSinkClassDB(am_sinkClass_t sinkClassID)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_sinkClass_t, am_sinkClass_t>(mpIAmControlReceiver, &IAmControlReceive::removeSinkClassDB, error, sinkClassID);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::removeSourceClassDB(am_sourceClass_t sourceClassID)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_sourceClass_t, am_sourceClass_t>(mpIAmControlReceiver, &IAmControlReceive::removeSourceClassDB, error, sourceClassID);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::getSourceClassInfoDB(am_sourceID_t sourceID, am_SourceClass_s& classInfo)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_sourceID_t, am_SourceClass_s&, am_sourceID_t, am_SourceClass_s>(mpIAmControlReceiver, &IAmControlReceive::getSourceClassInfoDB, error, sourceID, classInfo);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::getSinkClassInfoDB(am_sinkID_t sinkID, am_SinkClass_s& sinkClass)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_sinkID_t, am_SinkClass_s&, am_sinkID_t, am_SinkClass_s>(mpIAmControlReceiver, &IAmControlReceive::getSinkClassInfoDB, error, sinkID, sinkClass);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::getSinkInfoDB(am_sinkID_t sinkID, am_Sink_s& sinkData)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_sinkID_t, am_Sink_s&, am_sinkID_t, am_Sink_s>(mpIAmControlReceiver, &IAmControlReceive::getSinkInfoDB, error, sinkID, sinkData);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::getSourceInfoDB(am_sourceID_t sourceID, am_Source_s& sourceData)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_sourceID_t, am_Source_s&, am_sourceID_t, am_Source_s>(mpIAmControlReceiver, &IAmControlReceive::getSourceInfoDB, error, sourceID, sourceData);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::getGatewayInfoDB(am_gatewayID_t gatewayID, am_Gateway_s& gatewayData)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_gatewayID_t, am_Gateway_s&, am_gatewayID_t, am_Gateway_s>(mpIAmControlReceiver, &IAmControlReceive::getGatewayInfoDB, error, gatewayID, gatewayData);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::getCrossfaderInfoDB(am_crossfaderID_t crossfaderID, am_Crossfader_s& crossfaderData)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_crossfaderID_t, am_Crossfader_s&, am_crossfaderID_t, am_Crossfader_s>(mpIAmControlReceiver, &IAmControlReceive::getCrossfaderInfoDB, error, crossfaderID, crossfaderData);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::getMainConnectionInfoDB(am_mainConnectionID_t mainConnectionID, am_MainConnection_s& mainConnectionData)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_mainConnectionID_t, am_MainConnection_s&, am_mainConnectionID_t, am_MainConnection_s>(mpIAmControlReceiver, &IAmControlReceive::getMainConnectionInfoDB, error, mainConnectionID, mainConnectionData);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::getListSinksOfDomain(am_domainID_t domainID, std::vector<am_sinkID_t>& listSinkID)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_domainID_t, std::vector<am_sinkID_t>&, am_domainID_t, std::vector<am_sinkID_t> >(mpIAmControlReceiver, &IAmControlReceive::getListSinksOfDomain, error, domainID, listSinkID);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::getListSourcesOfDomain(am_domainID_t domainID, std::vector<am_sourceID_t>& listSourceID)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_domainID_t, std::vector<am_sourceID_t>&, am_domainID_t, std::vector<am_sourceID_t> >(mpIAmControlReceiver, &IAmControlReceive::getListSourcesOfDomain, error, domainID, listSourceID);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::getListCrossfadersOfDomain(am_domainID_t domainID, std::vector<am_crossfaderID_t>& listCrossfadersID)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_domainID_t, std::vector<am_crossfaderID_t>&, am_domainID_t, std::vector<am_crossfaderID_t> >(mpIAmControlReceiver, &IAmControlReceive::getListCrossfadersOfDomain, error, domainID, listCrossfadersID);
- return (error);
-}
-
-am_Error_e IAmControlReceiverShadow::getListGatewaysOfDomain(am_domainID_t domainID, std::vector<am_gatewayID_t>& listGatewaysID)
-{
- am_Error_e error;
- mCAmSerializer.syncCall<IAmControlReceive, am_Error_e, const am_domainID_t, std::vector<am_gatewayID_t>&, am_domainID_t, std::vector<am_gatewayID_t> >(mpIAmControlReceiver, &IAmControlReceive::getListGatewaysOfDomain, error, domainID, listGatewaysID);
- return (error);
-}
-
-
-
-} /* namespace am */
diff --git a/PluginControlInterface/test/CAmControlReceiverShadowTest.cpp b/PluginControlInterface/test/CAmControlReceiverShadowTest.cpp
deleted file mode 100644
index 3eed9f2..0000000
--- a/PluginControlInterface/test/CAmControlReceiverShadowTest.cpp
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * Copyright (c) 2012 BMW
- *
- * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
- *
- * \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 "CAmControlReceiverShadowTest.h"
-
-using namespace testing;
-using namespace am;
-
-CAmControlReceiverShadowTest::CAmControlReceiverShadowTest() :
- psocketHandler(), //
- pMockReceive(), //
- pShadow(&pMockReceive, &psocketHandler), //
- ptimerCallback(this, &CAmControlReceiverShadowTest::timerCallback)
-{
- DefaultValue<am_Error_e>::Set(E_OK); // Sets the default value to be returned.
-}
-
-CAmControlReceiverShadowTest::~CAmControlReceiverShadowTest()
-{
-}
-
-void CAmControlReceiverShadowTest::SetUp()
-{
- timespec t;
- t.tv_nsec = 1000000;
- t.tv_sec = 0;
-
- sh_timerHandle_t handle;
-
- IAmShTimerCallBack *buf = &ptimerCallback;
- //lets use a timeout so the test will finish
- psocketHandler.addTimer(t, buf, handle, (void*) NULL);
-}
-
-void CAmControlReceiverShadowTest::timerCallback(sh_timerHandle_t handle, void* userData)
-{
- (void)handle;
- (void)userData;
- psocketHandler.stop_listening();
-}
-
-void CAmControlReceiverShadowTest::TearDown()
-{
-}
-
-void* run_the_loop(void* socketHandlerPtr)
-{
- CAmSocketHandler* socketHandler = static_cast<CAmSocketHandler*>(socketHandlerPtr);
- socketHandler->start_listenting();
- return (NULL);
-}
-
-TEST_F(CAmControlReceiverShadowTest,getRoute)
-{
- pthread_t ptestThread;
- bool onlyfree(true);
- am_sourceID_t sourceID(1);
- am_sinkID_t sinkID(2);
- am_Route_s route;
- am_RoutingElement_s routingElement;
- std::vector<am_RoutingElement_s> route_;
- std::vector<am_Route_s> returnList, List;
- routingElement.sinkID = 1;
- routingElement.sourceID = 2;
- routingElement.domainID = 3;
- routingElement.connectionFormat = CF_GENIVI_ANALOG;
- route_.push_back(routingElement);
- route.sinkID = 1;
- route.sourceID = 2;
- route.route = route_;
- returnList.push_back(route);
- EXPECT_CALL(pMockReceive,getRoute(onlyfree,sourceID,sinkID,_)).WillOnce(DoAll(SetArgReferee<3>(returnList),Return(E_OK)));
- pthread_create(&ptestThread, NULL, run_the_loop, (void*) &psocketHandler);
- ASSERT_EQ(E_OK, pShadow.getRoute(onlyfree, sourceID, sinkID, List));
- pthread_join(ptestThread, NULL);
-}
-
-TEST_F(CAmControlReceiverShadowTest,connect)
-{
- pthread_t ptestThread;
- am_Handle_s handle, handleReturn;
- handle.handle = 1;
- handle.handleType = H_CONNECT;
- am_connectionID_t connectionID(3), connectionIDReturn;
- am_CustomAvailabilityReason_t connectionFormat(CF_GENIVI_ANALOG);
- am_sourceID_t sourceID(1);
- am_sinkID_t sinkID(2);
-
- EXPECT_CALL(pMockReceive, connect(_,_, connectionFormat, sourceID, sinkID)).WillOnce(DoAll(SetArgReferee<0>(handle),SetArgReferee<1>(connectionID),Return(E_OK)));
- pthread_create(&ptestThread, NULL, run_the_loop, (void*) &psocketHandler);
- ASSERT_EQ(E_OK,pShadow.connect(handleReturn,connectionIDReturn, connectionFormat, sourceID, sinkID));
- ASSERT_EQ(handleReturn.handle,handle.handle);
- ASSERT_EQ(handleReturn.handleType,handle.handleType);
- ASSERT_EQ(connectionIDReturn,connectionID);
- pthread_join(ptestThread, NULL);
-}
-
-TEST_F(CAmControlReceiverShadowTest,disconnect)
-{
- pthread_t ptestThread;
- am_Handle_s handle, handleReturn;
- handle.handle = 1;
- handle.handleType = H_CONNECT;
- am_connectionID_t connectionID(3);
-
- EXPECT_CALL(pMockReceive, disconnect(_,connectionID)).WillOnce(DoAll(SetArgReferee<0>(handle),Return(E_OK)));
- pthread_create(&ptestThread, NULL, run_the_loop, (void*) &psocketHandler);
- ASSERT_EQ(E_OK,pShadow.disconnect(handleReturn,connectionID));
- ASSERT_EQ(handleReturn.handle,handle.handle);
- ASSERT_EQ(handleReturn.handleType,handle.handleType);
- pthread_join(ptestThread, NULL);
-}
-
-//todo: implement more tests !
-
-int main(int argc, char **argv)
-{
- ::testing::InitGoogleTest(&argc, argv);
- return RUN_ALL_TESTS();
-}
-
diff --git a/PluginControlInterface/test/CAmControlReceiverShadowTest.h b/PluginControlInterface/test/CAmControlReceiverShadowTest.h
deleted file mode 100644
index a544c39..0000000
--- a/PluginControlInterface/test/CAmControlReceiverShadowTest.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Copyright (c) 2012 BMW
- *
- * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
- *
- * \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 CAMCONTROLRECEIVERSHADOWTEST_H_
-#define CAMCONTROLRECEIVERSHADOWTEST_H_
-
-#include "gtest/gtest.h"
-#include "gmock/gmock.h"
-#include "MockIAmControlReceive.h"
-#include "shared/CAmSocketHandler.h"
-#include "shared/CAmSerializer.h"
-#include "../include/IAmControlReceiverShadow.h"
-
-namespace am
-{
-
-class CAmControlReceiverShadowTest: public ::testing::Test
-{
-public:
- CAmSocketHandler psocketHandler;
- MockIAmControlReceive pMockReceive;
- IAmControlReceiverShadow pShadow;
- void timerCallback(sh_timerHandle_t handle, void* userData);
- TAmShTimerCallBack<CAmControlReceiverShadowTest> ptimerCallback;
- CAmControlReceiverShadowTest();
- ~CAmControlReceiverShadowTest();
- void SetUp();
- void TearDown();
-};
-
-} /* namespace am */
-#endif /* CAMCONTROLRECEIVERSHADOWTEST_H_ */
diff --git a/PluginControlInterface/test/CMakeLists.txt b/PluginControlInterface/test/CMakeLists.txt
deleted file mode 100644
index 3dc5d08..0000000
--- a/PluginControlInterface/test/CMakeLists.txt
+++ /dev/null
@@ -1,98 +0,0 @@
-# Copyright (c) 2012 GENIVI Alliance
-# Copyright (c) 2012 BMW
-#
-# author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
-#
-# 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(AmControlReceiverShadowTest)
-
-set(EXECUTABLE_OUTPUT_PATH ${TEST_EXECUTABLE_OUTPUT_PATH})
-
-FIND_PACKAGE (Threads)
-FIND_PACKAGE(PkgConfig)
-
-
-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}
- ${DBUS_INCLUDE_DIR}
- ${DBUS_ARCH_INCLUDE_DIR}
- ${GOOGLE_TEST_INCLUDE_DIR}
- ${GMOCK_INCLUDE_DIR}
- "../../AudioManagerDaemon/include"
- "../include"
-)
-
-file(GLOB CONTROL_RECEIVER_PLUGIN_INTERFACE_SRCS_CXX
- "../../AudioManagerDaemon/src/CAmSocketHandler.cpp"
- "../../AudioManagerDaemon/src/CAmDltWrapper.cpp"
- "../../AudioManagerDaemon/src/CAmDatabaseObserver.cpp"
- "../../AudioManagerDaemon/src/CAmCommandSender.cpp"
- "../../AudioManagerDaemon/src/CAmTelnetServer.cpp"
- "../../AudioManagerDaemon/src/CAmTelnetMenuHelper.cpp"
- "../../AudioManagerDaemon/src/CAmRoutingSender.cpp"
- "../../AudioManagerDaemon/src/CAmRoutingReceiver.cpp"
- "../../AudioManagerDaemon/src/CAmCommandReceiver.cpp"
- "../../AudioManagerDaemon/src/CAmControlSender.cpp"
- "../../AudioManagerDaemon/src/CAmControlReceiver.cpp"
- "../../AudioManagerDaemon/src/CAmRouter.cpp"
- "../src/IAmControlReceiverShadow.cpp"
- "CAmControlReceiverShadowTest.cpp"
-)
-
-IF(WITH_DATABASE_STORAGE)
- SET (CONTROL_RECEIVER_PLUGIN_INTERFACE_SRCS_CXX
- ${CONTROL_RECEIVER_PLUGIN_INTERFACE_SRCS_CXX}
- "../../AudioManagerDaemon/src/CAmDatabaseHandlerSQLite.cpp")
-ELSE(WITH_DATABASE_STORAGE)
- SET (CONTROL_RECEIVER_PLUGIN_INTERFACE_SRCS_CXX
- ${CONTROL_RECEIVER_PLUGIN_INTERFACE_SRCS_CXX}
- "../../AudioManagerDaemon/src/CAmDatabaseHandlerMap.cpp")
-ENDIF(WITH_DATABASE_STORAGE)
-
-ADD_EXECUTABLE(AmControlReceiverShadowTest ${CONTROL_RECEIVER_PLUGIN_INTERFACE_SRCS_CXX})
-
-
-TARGET_LINK_LIBRARIES(AmControlReceiverShadowTest
- ${DLT_LIBRARIES}
- ${CMAKE_DL_LIBS}
- ${CMAKE_THREAD_LIBS_INIT}
- ${DBUS_LIBRARIES}
- ${SQLITE_LIBRARIES}
- gtest
- gmock
- rt
-)
-
-ADD_DEPENDENCIES(AmControlReceiverShadowTest gtest gmock)
-
-INSTALL(TARGETS AmControlReceiverShadowTest
- DESTINATION "~/AudioManagerTest/"
- PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ
- COMPONENT tests
-)
-
-SET(ADD_DEPEND "audiomanager-bin" "dlt" "libdbus-1-3(>=1.2.16)" "libpthread-stubs0")
-set_property(GLOBAL APPEND PROPERTY tests_prop "${ADD_DEPEND}")
-