From 20491c0f31d70e254c56f171c69b95f3d4ad2813 Mon Sep 17 00:00:00 2001 From: Jens Lorenz Date: Wed, 11 Jun 2014 18:14:58 +0200 Subject: * Bug #100 - removed projecttypes.h which causes compiling conflicts Signed-off-by: Jens Lorenz --- .../include/CAmCommandSenderCommon.h | 10 +- .../src-gen/org/genivi/am.cpp | 43 +++---- PluginCommandInterfaceCAPI/src-gen/org/genivi/am.h | 94 +++++++------- .../src-gen/org/genivi/am/CommandControl.h | 26 ++-- .../org/genivi/am/CommandControlDBusProxy.cpp | 55 ++++---- .../org/genivi/am/CommandControlDBusProxy.h | 27 ++-- .../genivi/am/CommandControlDBusStubAdapter.cpp | 143 +++++++++++---------- .../org/genivi/am/CommandControlDBusStubAdapter.h | 65 ++++++---- .../src-gen/org/genivi/am/CommandControlProxy.h | 35 ++--- .../org/genivi/am/CommandControlProxyBase.h | 23 +--- .../src-gen/org/genivi/am/CommandControlStub.h | 38 +++--- .../org/genivi/am/CommandControlStubDefault.cpp | 32 ++--- .../org/genivi/am/CommandControlStubDefault.h | 39 +++--- .../src/CAmCommandSenderCAPI.cpp | 14 +- .../src/CAmCommandSenderCommon.cpp | 39 +----- .../src/CAmCommandSenderService.cpp | 16 +-- .../test/CAmCommandSenderCAPITest.cpp | 90 ++++++------- 17 files changed, 352 insertions(+), 437 deletions(-) (limited to 'PluginCommandInterfaceCAPI') diff --git a/PluginCommandInterfaceCAPI/include/CAmCommandSenderCommon.h b/PluginCommandInterfaceCAPI/include/CAmCommandSenderCommon.h index 750b2c5..caeb455 100644 --- a/PluginCommandInterfaceCAPI/include/CAmCommandSenderCommon.h +++ b/PluginCommandInterfaceCAPI/include/CAmCommandSenderCommon.h @@ -32,22 +32,14 @@ extern void CAmConvertAvailablility(const am_Availability_s & , org::genivi::am: extern void CAmConvertMainSoundProperty(const am_MainSoundProperty_s & , org::genivi::am::am_MainSoundProperty_s & ); extern void CAmConvertSystemProperty(const am_SystemProperty_s &, org::genivi::am::am_SystemProperty_s &); -extern org::genivi::am::am_ClassProperty_pe CAmConvert2CAPIType(const am_ClassProperty_e & property); -extern org::genivi::am::am_SystemPropertyType_pe CAmConvert2CAPIType(const am_SystemPropertyType_e &); -extern org::genivi::am::am_Availability_e CAmConvert2CAPIType(const am_Availability_e & ); -extern org::genivi::am::am_AvailabilityReason_pe CAmConvert2CAPIType(const am_AvailabilityReason_e & ); +extern org::genivi::am::am_Availability_e CAmConvert2CAPIType(const am_Availability_e &); extern org::genivi::am::am_MuteState_e CAmConvert2CAPIType(const am_MuteState_e &); extern am_MuteState_e CAmConvertFromCAPIType(const org::genivi::am::am_MuteState_e &); -extern org::genivi::am::am_MainSoundPropertyType_pe CAmConvert2CAPIType(const am_MainSoundPropertyType_e &); - extern org::genivi::am::am_ConnectionState_e CAmConvert2CAPIType(const am_ConnectionState_e &); extern am_ConnectionState_e CAmConvertFromCAPIType(const org::genivi::am::am_ConnectionState_e &); -extern am_NotificationType_e CAmConvert2CAPIType(const org::genivi::am::am_NotificationType_pe &); -extern org::genivi::am::am_NotificationType_pe CAmConvertFromCAPIType(const am_NotificationType_e &); - extern am_NotificationStatus_e CAmConvert2CAPIType(const org::genivi::am::am_NotificationStatus_e &); extern org::genivi::am::am_NotificationStatus_e CAmConvertFromCAPIType(const am_NotificationStatus_e &); diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am.cpp b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am.cpp index f79c0f5..161a7b7 100644 --- a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am.cpp +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am.cpp @@ -1,22 +1,11 @@ /* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 2.1.2.201309301424. -* Used org.franca.core 0.8.9.201308271211. +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.5.201312121915. +* Used org.franca.core 0.8.11.201401091023. * -* Copyright (c) 2012 BMW -* -* \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 -* -* \copyright -* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, -* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -* subject to the following conditions: -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -* THE USE OR OTHER DEALINGS IN THE SOFTWARE. -* For further information see http://www.genivi.org/. -* +* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +* If a copy of the MPL was not distributed with this file, You can obtain one at +* http://mozilla.org/MPL/2.0/. */ /** * @author Christian Linke @@ -112,7 +101,7 @@ void am_Route_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) cons outputStream << route; } -am_Availability_s::am_Availability_s(const am_Availability_e& availabilityValue, const am_AvailabilityReason_pe& availabilityReasonValue): +am_Availability_s::am_Availability_s(const am_Availability_e& availabilityValue, const am_CustomAvailabilityReason_t& availabilityReasonValue): availability(availabilityValue), availabilityReason(availabilityReasonValue) { @@ -139,7 +128,7 @@ void am_Availability_s::writeToOutputStream(CommonAPI::OutputStream& outputStrea outputStream << availabilityReason; } -am_ClassProperty_s::am_ClassProperty_s(const am_ClassProperty_pe& classPropertyValue, const int16_t& valueValue): +am_ClassProperty_s::am_ClassProperty_s(const am_CustomClassProperty_t& classPropertyValue, const int16_t& valueValue): classProperty(classPropertyValue), value(valueValue) { @@ -268,7 +257,7 @@ void am_Gateway_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) co outputStream << convertionMatrix; } -am_RoutingElement_s::am_RoutingElement_s(const am_sourceID_t& sourceIDValue, const am_sinkID_t& sinkIDValue, const am_domainID_t& domainIDValue, const am_ConnectionFormat_pe& connectionFormatValue): +am_RoutingElement_s::am_RoutingElement_s(const am_sourceID_t& sourceIDValue, const am_sinkID_t& sinkIDValue, const am_domainID_t& domainIDValue, const am_CustomConnectionFormat_t& connectionFormatValue): sourceID(sourceIDValue), sinkID(sinkIDValue), domainID(domainIDValue), @@ -303,7 +292,7 @@ void am_RoutingElement_s::writeToOutputStream(CommonAPI::OutputStream& outputStr outputStream << connectionFormat; } -am_SoundProperty_s::am_SoundProperty_s(const am_SoundPropertyType_pe& typeValue, const int16_t& valueValue): +am_SoundProperty_s::am_SoundProperty_s(const am_CustomSoundPropertyType_t& typeValue, const int16_t& valueValue): type(typeValue), value(valueValue) { @@ -330,7 +319,7 @@ void am_SoundProperty_s::writeToOutputStream(CommonAPI::OutputStream& outputStre outputStream << value; } -am_SystemProperty_s::am_SystemProperty_s(const am_SystemPropertyType_pe& typeValue, const int16_t& valueValue): +am_SystemProperty_s::am_SystemProperty_s(const am_CustomSystemPropertyType_t& typeValue, const int16_t& valueValue): type(typeValue), value(valueValue) { @@ -524,7 +513,7 @@ void am_Handle_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) con outputStream << handle; } -am_MainSoundProperty_s::am_MainSoundProperty_s(const am_MainSoundPropertyType_pe& typeValue, const int16_t& valueValue): +am_MainSoundProperty_s::am_MainSoundProperty_s(const am_CustomMainSoundPropertyType_t& typeValue, const int16_t& valueValue): type(typeValue), value(valueValue) { @@ -633,7 +622,7 @@ void am_MainConnection_s::writeToOutputStream(CommonAPI::OutputStream& outputStr outputStream << listConnectionID; } -am_NotificationPayload_s::am_NotificationPayload_s(const am_NotificationType_pe& typeValue, const int16_t& valueValue): +am_NotificationPayload_s::am_NotificationPayload_s(const am_CustomNotificationType_t& typeValue, const int16_t& valueValue): type(typeValue), value(valueValue) { @@ -660,7 +649,7 @@ void am_NotificationPayload_s::writeToOutputStream(CommonAPI::OutputStream& outp outputStream << value; } -am_NotificationConfiguration_s::am_NotificationConfiguration_s(const am_NotificationType_pe& typeValue, const am_NotificationStatus_e& statusValue, const int16_t& parameterValue): +am_NotificationConfiguration_s::am_NotificationConfiguration_s(const am_CustomNotificationType_t& typeValue, const am_NotificationStatus_e& statusValue, const int16_t& parameterValue): type(typeValue), status(statusValue), parameter(parameterValue) @@ -919,7 +908,7 @@ void am_EarlyData_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) outputStream << data; } -am_Connection_s::am_Connection_s(const am_connectionID_t& connectionIDValue, const am_sourceID_t& sourceIDValue, const am_sinkID_t& sinkIDValue, const am_timeSync_t& delayValue, const am_ConnectionFormat_pe& connectionFormatValue): +am_Connection_s::am_Connection_s(const am_connectionID_t& connectionIDValue, const am_sourceID_t& sourceIDValue, const am_sinkID_t& sinkIDValue, const am_timeSync_t& delayValue, const am_CustomConnectionFormat_t& connectionFormatValue): connectionID(connectionIDValue), sourceID(sourceIDValue), sinkID(sinkIDValue), @@ -958,7 +947,7 @@ void am_Connection_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) outputStream << connectionFormat; } -am_Volumes_s::am_Volumes_s(const am_VolumeType_e& volumeTypeValue, const am_DataType_u& volumeIDValue, const am_volume_t& volumeValue, const am_RampType_pe& rampValue, const am_time_t& timeValue): +am_Volumes_s::am_Volumes_s(const am_VolumeType_e& volumeTypeValue, const am_DataType_u& volumeIDValue, const am_volume_t& volumeValue, const am_CustomRampType_t& rampValue, const am_time_t& timeValue): volumeType(volumeTypeValue), volumeID(volumeIDValue), volume(volumeValue), diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am.h index adfd7b3..17c0c51 100644 --- a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am.h +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am.h @@ -1,22 +1,11 @@ /* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 2.1.2.201309301424. -* Used org.franca.core 0.8.9.201308271211. +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.5.201312121915. +* Used org.franca.core 0.8.11.201401091023. * -* Copyright (c) 2012 BMW -* -* \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 -* -* \copyright -* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, -* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -* subject to the following conditions: -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -* THE USE OR OTHER DEALINGS IN THE SOFTWARE. -* For further information see http://www.genivi.org/. -* +* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +* If a copy of the MPL was not distributed with this file, You can obtain one at +* http://mozilla.org/MPL/2.0/. */ /** * @author Christian Linke @@ -155,7 +144,7 @@ namespace am { /** * product specific identifier of property */ - typedef uint16_t am_ClassProperty_pe; + typedef uint16_t am_CustomClassProperty_t; /** * describes class properties */ @@ -166,14 +155,14 @@ namespace am { /** * the property as enum */ - am_ClassProperty_pe classProperty; + am_CustomClassProperty_t classProperty; /** * the value of the property */ int16_t value; am_ClassProperty_s() = default; - am_ClassProperty_s(const am_ClassProperty_pe& classProperty, const int16_t& value); + am_ClassProperty_s(const am_CustomClassProperty_t& classProperty, const int16_t& value); virtual void readFromInputStream(CommonAPI::InputStream& inputStream); @@ -246,7 +235,7 @@ namespace am { * This project specific value gives the information about reason for reason for * Source/Sink change */ - typedef uint16_t am_AvailabilityReason_pe; + typedef uint16_t am_CustomAvailabilityReason_t; /** * with the help of this enum, sinks and sources can report their availability * state @@ -304,10 +293,10 @@ namespace am { * the reason for the last change. This can be used to trigger events that deal * with state changes. */ - am_AvailabilityReason_pe availabilityReason; + am_CustomAvailabilityReason_t availabilityReason; am_Availability_s() = default; - am_Availability_s(const am_Availability_e& availability, const am_AvailabilityReason_pe& availabilityReason); + am_Availability_s(const am_Availability_e& availability, const am_CustomAvailabilityReason_t& availabilityReason); virtual void readFromInputStream(CommonAPI::InputStream& inputStream); @@ -473,7 +462,7 @@ namespace am { /** * describes the different system properties. Project specific */ - typedef uint16_t am_SystemPropertyType_pe; + typedef uint16_t am_CustomSystemPropertyType_t; /** * struct describing system properties */ @@ -484,14 +473,14 @@ namespace am { /** * the type that is set */ - am_SystemPropertyType_pe type; + am_CustomSystemPropertyType_t type; /** * the value */ int16_t value; am_SystemProperty_s() = default; - am_SystemProperty_s(const am_SystemPropertyType_pe& type, const int16_t& value); + am_SystemProperty_s(const am_CustomSystemPropertyType_t& type, const int16_t& value); virtual void readFromInputStream(CommonAPI::InputStream& inputStream); @@ -526,7 +515,7 @@ namespace am { /** * Project specific sound properties. */ - typedef uint16_t am_SoundPropertyType_pe; + typedef uint16_t am_CustomSoundPropertyType_t; /** * This enum characterizes the data of the EarlyData_t */ @@ -566,14 +555,14 @@ namespace am { /** * the type of the property - a project specific enum */ - am_SoundPropertyType_pe type; + am_CustomSoundPropertyType_t type; /** * the actual value of the property */ int16_t value; am_SoundProperty_s() = default; - am_SoundProperty_s(const am_SoundPropertyType_pe& type, const int16_t& value); + am_SoundProperty_s(const am_CustomSoundPropertyType_t& type, const int16_t& value); virtual void readFromInputStream(CommonAPI::InputStream& inputStream); @@ -639,7 +628,7 @@ namespace am { * Here are all SoundProperties that can be set via the CommandInterface. Product * specific */ - typedef uint16_t am_MainSoundPropertyType_pe; + typedef uint16_t am_CustomMainSoundPropertyType_t; /** * struct describung mainsound property */ @@ -650,14 +639,14 @@ namespace am { /** * the type of the property */ - am_MainSoundPropertyType_pe type; + am_CustomMainSoundPropertyType_t type; /** * the actual value */ int16_t value; am_MainSoundProperty_s() = default; - am_MainSoundProperty_s(const am_MainSoundPropertyType_pe& type, const int16_t& value); + am_MainSoundProperty_s(const am_CustomMainSoundPropertyType_t& type, const int16_t& value); virtual void readFromInputStream(CommonAPI::InputStream& inputStream); @@ -675,7 +664,7 @@ namespace am { /** * gives the type of the Notification. */ - typedef uint16_t am_NotificationType_pe; + typedef uint16_t am_CustomNotificationType_t; enum class am_NotificationStatus_e: int32_t { NS_UNKNOWN = 0, /** @@ -717,7 +706,7 @@ namespace am { /** * The notification type of the notification */ - am_NotificationType_pe type; + am_CustomNotificationType_t type; /** * The Notification status. This can be periodic, min/max value based or even off * for example @@ -738,7 +727,7 @@ namespace am { int16_t parameter; am_NotificationConfiguration_s() = default; - am_NotificationConfiguration_s(const am_NotificationType_pe& type, const am_NotificationStatus_e& status, const int16_t& parameter); + am_NotificationConfiguration_s(const am_CustomNotificationType_t& type, const am_NotificationStatus_e& status, const int16_t& parameter); virtual void readFromInputStream(CommonAPI::InputStream& inputStream); @@ -766,7 +755,7 @@ namespace am { * This project specific value classifies the format in which data is exchanged * within a connection. */ - typedef uint16_t am_ConnectionFormat_pe; + typedef uint16_t am_CustomConnectionFormat_t; /** * This represents one "hopp" in a route */ @@ -789,10 +778,10 @@ namespace am { /** * the connectionformat that is used for the route */ - am_ConnectionFormat_pe connectionFormat; + am_CustomConnectionFormat_t connectionFormat; am_RoutingElement_s() = default; - am_RoutingElement_s(const am_sourceID_t& sourceID, const am_sinkID_t& sinkID, const am_domainID_t& domainID, const am_ConnectionFormat_pe& connectionFormat); + am_RoutingElement_s(const am_sourceID_t& sourceID, const am_sinkID_t& sinkID, const am_domainID_t& domainID, const am_CustomConnectionFormat_t& connectionFormat); virtual void readFromInputStream(CommonAPI::InputStream& inputStream); @@ -826,7 +815,7 @@ namespace am { * responsibility of the product to make sure that the routing plugins are aware * of the ramp types used. */ - typedef uint16_t am_RampType_pe; + typedef uint16_t am_CustomRampType_t; /** * This datatype determines if a sourceID or a sinkID is used in the union * following @@ -868,14 +857,14 @@ namespace am { /** * the ramp that shall be driven */ - am_RampType_pe ramp; + am_CustomRampType_t ramp; /** * the time for the ramp */ am_time_t time; am_Volumes_s() = default; - am_Volumes_s(const am_VolumeType_e& volumeType, const am_DataType_u& volumeID, const am_volume_t& volume, const am_RampType_pe& ramp, const am_time_t& time); + am_Volumes_s(const am_VolumeType_e& volumeType, const am_DataType_u& volumeID, const am_volume_t& volume, const am_CustomRampType_t& ramp, const am_time_t& time); virtual void readFromInputStream(CommonAPI::InputStream& inputStream); @@ -890,7 +879,7 @@ namespace am { } }; typedef std::vector am_Volumes_L; - typedef std::vector am_ConnectionFormat_L; + typedef std::vector am_ConnectionFormat_L; typedef bool am_bool_t; typedef std::vector am_Convertion_L; /** @@ -1389,7 +1378,7 @@ namespace am { /** * This defines the notification type */ - am_NotificationType_pe type; + am_CustomNotificationType_t type; /** * This is finally the value of the notification. It's meaning depends on the * notificationType @@ -1397,7 +1386,7 @@ namespace am { int16_t value; am_NotificationPayload_s() = default; - am_NotificationPayload_s(const am_NotificationType_pe& type, const int16_t& value); + am_NotificationPayload_s(const am_CustomNotificationType_t& type, const int16_t& value); virtual void readFromInputStream(CommonAPI::InputStream& inputStream); @@ -1783,10 +1772,10 @@ namespace am { /** * the used connectionformat */ - am_ConnectionFormat_pe connectionFormat; + am_CustomConnectionFormat_t connectionFormat; am_Connection_s() = default; - am_Connection_s(const am_connectionID_t& connectionID, const am_sourceID_t& sourceID, const am_sinkID_t& sinkID, const am_timeSync_t& delay, const am_ConnectionFormat_pe& connectionFormat); + am_Connection_s(const am_connectionID_t& connectionID, const am_sourceID_t& sourceID, const am_sinkID_t& sinkID, const am_timeSync_t& delay, const am_CustomConnectionFormat_t& connectionFormat); virtual void readFromInputStream(CommonAPI::InputStream& inputStream); @@ -2107,6 +2096,7 @@ namespace CommonAPI { template<> struct InputStreamVectorHelper { static void beginReadVector(InputStream& inputStream, const std::vector& vectorValue) { + (void)vectorValue; inputStream.beginReadInt32EnumVector(); } }; @@ -2127,6 +2117,7 @@ namespace CommonAPI { template<> struct InputStreamVectorHelper { static void beginReadVector(InputStream& inputStream, const std::vector& vectorValue) { + (void)vectorValue; inputStream.beginReadInt32EnumVector(); } }; @@ -2147,6 +2138,7 @@ namespace CommonAPI { template<> struct InputStreamVectorHelper { static void beginReadVector(InputStream& inputStream, const std::vector& vectorValue) { + (void)vectorValue; inputStream.beginReadInt32EnumVector(); } }; @@ -2167,6 +2159,7 @@ namespace CommonAPI { template<> struct InputStreamVectorHelper { static void beginReadVector(InputStream& inputStream, const std::vector& vectorValue) { + (void)vectorValue; inputStream.beginReadInt32EnumVector(); } }; @@ -2187,6 +2180,7 @@ namespace CommonAPI { template<> struct InputStreamVectorHelper { static void beginReadVector(InputStream& inputStream, const std::vector& vectorValue) { + (void)vectorValue; inputStream.beginReadInt32EnumVector(); } }; @@ -2207,6 +2201,7 @@ namespace CommonAPI { template<> struct InputStreamVectorHelper { static void beginReadVector(InputStream& inputStream, const std::vector& vectorValue) { + (void)vectorValue; inputStream.beginReadInt32EnumVector(); } }; @@ -2227,6 +2222,7 @@ namespace CommonAPI { template<> struct InputStreamVectorHelper { static void beginReadVector(InputStream& inputStream, const std::vector& vectorValue) { + (void)vectorValue; inputStream.beginReadInt32EnumVector(); } }; @@ -2247,6 +2243,7 @@ namespace CommonAPI { template<> struct InputStreamVectorHelper { static void beginReadVector(InputStream& inputStream, const std::vector& vectorValue) { + (void)vectorValue; inputStream.beginReadInt32EnumVector(); } }; @@ -2267,6 +2264,7 @@ namespace CommonAPI { template<> struct InputStreamVectorHelper { static void beginReadVector(InputStream& inputStream, const std::vector& vectorValue) { + (void)vectorValue; inputStream.beginReadInt32EnumVector(); } }; @@ -2287,6 +2285,7 @@ namespace CommonAPI { template<> struct InputStreamVectorHelper { static void beginReadVector(InputStream& inputStream, const std::vector& vectorValue) { + (void)vectorValue; inputStream.beginReadInt32EnumVector(); } }; @@ -2307,6 +2306,7 @@ namespace CommonAPI { template<> struct InputStreamVectorHelper { static void beginReadVector(InputStream& inputStream, const std::vector& vectorValue) { + (void)vectorValue; inputStream.beginReadInt32EnumVector(); } }; @@ -2327,6 +2327,7 @@ namespace CommonAPI { template<> struct InputStreamVectorHelper { static void beginReadVector(InputStream& inputStream, const std::vector& vectorValue) { + (void)vectorValue; inputStream.beginReadInt32EnumVector(); } }; @@ -2347,6 +2348,7 @@ namespace CommonAPI { template<> struct InputStreamVectorHelper { static void beginReadVector(InputStream& inputStream, const std::vector& vectorValue) { + (void)vectorValue; inputStream.beginReadInt32EnumVector(); } }; diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControl.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControl.h index 613cfdb..eb103e5 100644 --- a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControl.h +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControl.h @@ -1,22 +1,11 @@ /* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 2.1.2.201309301424. -* Used org.franca.core 0.8.9.201308271211. +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.5.201312121915. +* Used org.franca.core 0.8.11.201401091023. * -* Copyright (c) 2012 BMW -* -* \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 -* -* \copyright -* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, -* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -* subject to the following conditions: -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -* THE USE OR OTHER DEALINGS IN THE SOFTWARE. -* For further information see http://www.genivi.org/. -* +* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +* If a copy of the MPL was not distributed with this file, You can obtain one at +* http://mozilla.org/MPL/2.0/. */ /** * The interface towards the Controlling Instance (e.g HMI). It handles the @@ -31,6 +20,7 @@ There are two rules that have to be kept in mind + #if !defined (COMMONAPI_INTERNAL_COMPILATION) #define COMMONAPI_INTERNAL_COMPILATION #endif @@ -72,7 +62,7 @@ namespace CommonAPI { namespace std { //hashes for types - + //hashes for error types } diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusProxy.cpp b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusProxy.cpp index 7b0969d..e147744 100644 --- a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusProxy.cpp +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusProxy.cpp @@ -1,22 +1,11 @@ /* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 2.1.2.201309301424. -* Used org.franca.core 0.8.9.201308271211. +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.5.201312121915. +* Used org.franca.core 0.8.11.201401091023. * -* Copyright (c) 2012 BMW -* -* \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 -* -* \copyright -* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, -* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -* subject to the following conditions: -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -* THE USE OR OTHER DEALINGS IN THE SOFTWARE. -* For further information see http://www.genivi.org/. -* +* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +* If a copy of the MPL was not distributed with this file, You can obtain one at +* http://mozilla.org/MPL/2.0/. */ /** * The interface towards the Controlling Instance (e.g HMI). It handles the @@ -46,7 +35,7 @@ __attribute__((constructor)) void registerCommandControlDBusProxy(void) { CommonAPI::DBus::DBusFactory::registerProxyFactoryMethod(CommandControl::getInterfaceId(), &createCommandControlDBusProxy); } - + CommandControlDBusProxy::CommandControlDBusProxy( const std::shared_ptr& factory, const std::string& commonApiAddress, @@ -163,7 +152,7 @@ void CommandControlDBusProxy::connect(const am_sourceID_t& sourceID, const am_si *this, "connect", "qq", - sourceID, sinkID, + sourceID, sinkID, callStatus , mainConnectionID, error); } @@ -187,7 +176,7 @@ void CommandControlDBusProxy::disconnect(const am_mainConnectionID_t& mainConnec *this, "disconnect", "q", - mainConnectionID, + mainConnectionID, callStatus , error); } @@ -211,7 +200,7 @@ void CommandControlDBusProxy::setVolume(const am_sinkID_t& sinkID, const am_main *this, "setVolume", "qn", - sinkID, volume, + sinkID, volume, callStatus , error); } @@ -236,7 +225,7 @@ void CommandControlDBusProxy::volumeStep(const am_sinkID_t& sinkID, const int16_ *this, "volumeStep", "qn", - sinkID, volumeStep_, + sinkID, volumeStep_, callStatus , error); } @@ -260,7 +249,7 @@ void CommandControlDBusProxy::setSinkMuteState(const am_sinkID_t& sinkID, const *this, "setSinkMuteState", "qi", - sinkID, muteState, + sinkID, muteState, callStatus , error); } @@ -286,7 +275,7 @@ void CommandControlDBusProxy::setMainSinkSoundProperty(const am_sinkID_t& sinkID *this, "setMainSinkSoundProperty", "q(qn)", - sinkID, soundProperty, + sinkID, soundProperty, callStatus , error); } @@ -312,7 +301,7 @@ void CommandControlDBusProxy::setMainSourceSoundProperty(const am_sourceID_t& so *this, "setMainSourceSoundProperty", "q(qn)", - sourceID, soundProperty, + sourceID, soundProperty, callStatus , error); } @@ -336,7 +325,7 @@ void CommandControlDBusProxy::setSystemProperty(const am_SystemProperty_s& prope *this, "setSystemProperty", "(qn)", - property, + property, callStatus , error); } @@ -427,7 +416,7 @@ void CommandControlDBusProxy::getListMainSinkSoundProperties(const am_sinkID_t& *this, "getListMainSinkSoundProperties", "q", - sinkID, + sinkID, callStatus , listSoundProperties, error); } @@ -451,7 +440,7 @@ void CommandControlDBusProxy::getListMainSourceSoundProperties(const am_sourceID *this, "getListMainSourceSoundProperties", "q", - sourceID, + sourceID, callStatus , listSourceProperties, error); } @@ -542,7 +531,7 @@ void CommandControlDBusProxy::getTimingInformation(const am_mainConnectionID_t& *this, "getTimingInformation", "q", - mainConnectionID, + mainConnectionID, callStatus , delay, error); } @@ -565,7 +554,7 @@ void CommandControlDBusProxy::getListMainSinkNotificationConfigurations(const am *this, "getListMainSinkNotificationConfigurations", "q", - sinkID, + sinkID, callStatus , listMainNotificationConfigurations, error); } @@ -588,7 +577,7 @@ void CommandControlDBusProxy::getListMainSourceNotificationConfigurations(const *this, "getListMainSourceNotificationConfigurations", "q", - sourceID, + sourceID, callStatus , listMainNotificationConfigurations, error); } @@ -613,7 +602,7 @@ void CommandControlDBusProxy::setMainSinkNotificationConfiguration(const am_sink *this, "setMainSinkNotificationConfiguration", "q(qin)", - sinkID, mainNotificationConfiguration, + sinkID, mainNotificationConfiguration, callStatus , error); } @@ -638,7 +627,7 @@ void CommandControlDBusProxy::setMainSourceNotificationConfiguration(const am_so *this, "setMainSourceNotificationConfiguration", "q(qin)", - sourceID, mainNotificationConfiguration, + sourceID, mainNotificationConfiguration, callStatus , error); } diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusProxy.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusProxy.h index e75bc5b..64091a7 100644 --- a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusProxy.h +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusProxy.h @@ -1,22 +1,11 @@ /* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 2.1.2.201309301424. -* Used org.franca.core 0.8.9.201308271211. +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.5.201312121915. +* Used org.franca.core 0.8.11.201401091023. * -* Copyright (c) 2012 BMW -* -* \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 -* -* \copyright -* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, -* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -* subject to the following conditions: -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -* THE USE OR OTHER DEALINGS IN THE SOFTWARE. -* For further information see http://www.genivi.org/. -* +* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +* If a copy of the MPL was not distributed with this file, You can obtain one at +* http://mozilla.org/MPL/2.0/. */ /** * The interface towards the Controlling Instance (e.g HMI). It handles the @@ -238,7 +227,7 @@ class CommandControlDBusProxy: virtual public CommandControlProxyBase, virtual p */ virtual void setMainSourceNotificationConfiguration(const am_sourceID_t& sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration, CommonAPI::CallStatus& callStatus, am_Error_e& error); virtual std::future setMainSourceNotificationConfigurationAsync(const am_sourceID_t& sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration, SetMainSourceNotificationConfigurationAsyncCallback callback); - + virtual void getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const; @@ -267,7 +256,7 @@ class CommandControlDBusProxy: virtual public CommandControlProxyBase, virtual p CommonAPI::DBus::DBusEvent sourceNotification_; CommonAPI::DBus::DBusEvent mainSinkNotificationConfigurationChanged_; CommonAPI::DBus::DBusEvent mainSourceNotificationConfigurationChanged_; - + }; diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusStubAdapter.cpp b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusStubAdapter.cpp index 16e1d4d..db01c28 100644 --- a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusStubAdapter.cpp +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusStubAdapter.cpp @@ -1,22 +1,11 @@ /* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 2.1.2.201309301424. -* Used org.franca.core 0.8.9.201308271211. +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.5.201312121915. +* Used org.franca.core 0.8.11.201401091023. * -* Copyright (c) 2012 BMW -* -* \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 -* -* \copyright -* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, -* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -* subject to the following conditions: -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -* THE USE OR OTHER DEALINGS IN THE SOFTWARE. -* For further information see http://www.genivi.org/. -* +* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +* If a copy of the MPL was not distributed with this file, You can obtain one at +* http://mozilla.org/MPL/2.0/. */ #include "CommandControlDBusStubAdapter.h" #include @@ -41,31 +30,21 @@ __attribute__((constructor)) void registerCommandControlDBusStubAdapter(void) { &createCommandControlDBusStubAdapter); } -CommandControlDBusStubAdapter::CommandControlDBusStubAdapter( - const std::shared_ptr& factory, - const std::string& commonApiAddress, - const std::string& dbusInterfaceName, - const std::string& dbusBusName, - const std::string& dbusObjectPath, - const std::shared_ptr& dbusConnection, - const std::shared_ptr& stub): - CommandControlDBusStubAdapterHelper(factory, commonApiAddress, dbusInterfaceName, dbusBusName, dbusObjectPath, - dbusConnection, std::dynamic_pointer_cast(stub), - NULL) - { -} -CommandControlDBusStubAdapter::~CommandControlDBusStubAdapter() { + +CommandControlDBusStubAdapterInternal::~CommandControlDBusStubAdapterInternal() { deactivateManagedInstances(); - deinit(); - stub_.reset(); + CommandControlDBusStubAdapterHelper::deinit(); } -void CommandControlDBusStubAdapter::deactivateManagedInstances() { +void CommandControlDBusStubAdapterInternal::deactivateManagedInstances() { } -const char* CommandControlDBusStubAdapter::getMethodsDBusIntrospectionXmlData() const { - static const char* introspectionData = +const char* CommandControlDBusStubAdapterInternal::getMethodsDBusIntrospectionXmlData() const { + static const std::string introspectionData = + "\n" + "" + "\n" /** * Callback that is called when the number of connections change */ @@ -428,10 +407,15 @@ const char* CommandControlDBusStubAdapter::getMethodsDBusIntrospectionXmlData() "\n" "\n" "\n" + ; - return introspectionData; + return introspectionData.c_str(); } +static CommonAPI::DBus::DBusGetAttributeStubDispatcher< + CommandControlStub, + CommonAPI::Version + > getCommandControlInterfaceVersionStubDispatcher(&CommandControlStub::getInterfaceVersion, "uu"); /** @@ -656,7 +640,7 @@ static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< /** * Callback that is called when the number of connections change */ -void CommandControlDBusStubAdapter::fireNewMainConnectionEvent(const am_MainConnectionType_s& mainConnection) { +void CommandControlDBusStubAdapterInternal::fireNewMainConnectionEvent(const am_MainConnectionType_s& mainConnection) { CommonAPI::DBus::DBusStubSignalHelper> ::sendSignal( *this, @@ -668,7 +652,7 @@ void CommandControlDBusStubAdapter::fireNewMainConnectionEvent(const am_MainConn /** * Callback that is called when the number of connections change */ -void CommandControlDBusStubAdapter::fireRemovedMainConnectionEvent(const am_mainConnectionID_t& mainConnection) { +void CommandControlDBusStubAdapterInternal::fireRemovedMainConnectionEvent(const am_mainConnectionID_t& mainConnection) { CommonAPI::DBus::DBusStubSignalHelper> ::sendSignal( *this, @@ -680,7 +664,7 @@ void CommandControlDBusStubAdapter::fireRemovedMainConnectionEvent(const am_main /** * Callback that is called when the number of sinks change */ -void CommandControlDBusStubAdapter::fireNewSinkEvent(const am_SinkType_s& sink) { +void CommandControlDBusStubAdapterInternal::fireNewSinkEvent(const am_SinkType_s& sink) { CommonAPI::DBus::DBusStubSignalHelper> ::sendSignal( *this, @@ -692,7 +676,7 @@ void CommandControlDBusStubAdapter::fireNewSinkEvent(const am_SinkType_s& sink) /** * Callback that is called when the number of sinks change */ -void CommandControlDBusStubAdapter::fireRemovedSinkEvent(const am_sinkID_t& sinkID) { +void CommandControlDBusStubAdapterInternal::fireRemovedSinkEvent(const am_sinkID_t& sinkID) { CommonAPI::DBus::DBusStubSignalHelper> ::sendSignal( *this, @@ -704,7 +688,7 @@ void CommandControlDBusStubAdapter::fireRemovedSinkEvent(const am_sinkID_t& sink /** * Callback that is called when the number of sources change */ -void CommandControlDBusStubAdapter::fireNewSourceEvent(const am_SourceType_s& source) { +void CommandControlDBusStubAdapterInternal::fireNewSourceEvent(const am_SourceType_s& source) { CommonAPI::DBus::DBusStubSignalHelper> ::sendSignal( *this, @@ -716,7 +700,7 @@ void CommandControlDBusStubAdapter::fireNewSourceEvent(const am_SourceType_s& so /** * Callback that is called when the number of sources change */ -void CommandControlDBusStubAdapter::fireRemovedSourceEvent(const am_sourceID_t& source) { +void CommandControlDBusStubAdapterInternal::fireRemovedSourceEvent(const am_sourceID_t& source) { CommonAPI::DBus::DBusStubSignalHelper> ::sendSignal( *this, @@ -728,7 +712,7 @@ void CommandControlDBusStubAdapter::fireRemovedSourceEvent(const am_sourceID_t& /** * this callback is fired if the number of sink classes changed */ -void CommandControlDBusStubAdapter::fireNumberOfSinkClassesChangedEvent() { +void CommandControlDBusStubAdapterInternal::fireNumberOfSinkClassesChangedEvent() { CommonAPI::DBus::DBusStubSignalHelper> ::sendSignal( *this, @@ -739,7 +723,7 @@ void CommandControlDBusStubAdapter::fireNumberOfSinkClassesChangedEvent() { /** * this callback is fired if the number of source classes changed */ -void CommandControlDBusStubAdapter::fireNumberOfSourceClassesChangedEvent() { +void CommandControlDBusStubAdapterInternal::fireNumberOfSourceClassesChangedEvent() { CommonAPI::DBus::DBusStubSignalHelper> ::sendSignal( *this, @@ -750,7 +734,7 @@ void CommandControlDBusStubAdapter::fireNumberOfSourceClassesChangedEvent() { /** * This callback is called when the ConnectionState of a connection changed. */ -void CommandControlDBusStubAdapter::fireMainConnectionStateChangedEvent(const am_mainConnectionID_t& connectionID, const am_ConnectionState_e& connectionState) { +void CommandControlDBusStubAdapterInternal::fireMainConnectionStateChangedEvent(const am_mainConnectionID_t& connectionID, const am_ConnectionState_e& connectionState) { CommonAPI::DBus::DBusStubSignalHelper> ::sendSignal( *this, @@ -762,7 +746,7 @@ void CommandControlDBusStubAdapter::fireMainConnectionStateChangedEvent(const am /** * this callback indicates that a sinkSoundProperty has changed. */ -void CommandControlDBusStubAdapter::fireMainSinkSoundPropertyChangedEvent(const am_sinkID_t& sinkID, const am_MainSoundProperty_s& soundProperty) { +void CommandControlDBusStubAdapterInternal::fireMainSinkSoundPropertyChangedEvent(const am_sinkID_t& sinkID, const am_MainSoundProperty_s& soundProperty) { CommonAPI::DBus::DBusStubSignalHelper> ::sendSignal( *this, @@ -774,7 +758,7 @@ void CommandControlDBusStubAdapter::fireMainSinkSoundPropertyChangedEvent(const /** * this callback indicates that a sourceSoundProperty has changed. */ -void CommandControlDBusStubAdapter::fireMainSourceSoundPropertyChangedEvent(const am_sourceID_t& sourceID, const am_MainSoundProperty_s& soundProperty) { +void CommandControlDBusStubAdapterInternal::fireMainSourceSoundPropertyChangedEvent(const am_sourceID_t& sourceID, const am_MainSoundProperty_s& soundProperty) { CommonAPI::DBus::DBusStubSignalHelper> ::sendSignal( *this, @@ -786,7 +770,7 @@ void CommandControlDBusStubAdapter::fireMainSourceSoundPropertyChangedEvent(cons /** * this callback is called when the availability of a sink has changed */ -void CommandControlDBusStubAdapter::fireSinkAvailabilityChangedEvent(const am_sinkID_t& sinkID, const am_Availability_s& availability) { +void CommandControlDBusStubAdapterInternal::fireSinkAvailabilityChangedEvent(const am_sinkID_t& sinkID, const am_Availability_s& availability) { CommonAPI::DBus::DBusStubSignalHelper> ::sendSignal( *this, @@ -798,7 +782,7 @@ void CommandControlDBusStubAdapter::fireSinkAvailabilityChangedEvent(const am_si /** * this callback is called when the availability of source has changed. */ -void CommandControlDBusStubAdapter::fireSourceAvailabilityChangedEvent(const am_sourceID_t& sourceID, const am_Availability_s& availability) { +void CommandControlDBusStubAdapterInternal::fireSourceAvailabilityChangedEvent(const am_sourceID_t& sourceID, const am_Availability_s& availability) { CommonAPI::DBus::DBusStubSignalHelper> ::sendSignal( *this, @@ -810,7 +794,7 @@ void CommandControlDBusStubAdapter::fireSourceAvailabilityChangedEvent(const am_ /** * this callback indicates a volume change on the indicated sink */ -void CommandControlDBusStubAdapter::fireVolumeChangedEvent(const am_sinkID_t& sinkID, const am_mainVolume_t& volume) { +void CommandControlDBusStubAdapterInternal::fireVolumeChangedEvent(const am_sinkID_t& sinkID, const am_mainVolume_t& volume) { CommonAPI::DBus::DBusStubSignalHelper> ::sendSignal( *this, @@ -822,7 +806,7 @@ void CommandControlDBusStubAdapter::fireVolumeChangedEvent(const am_sinkID_t& si /** * this callback indicates a mute state change on a sink. */ -void CommandControlDBusStubAdapter::fireSinkMuteStateChangedEvent(const am_sinkID_t& sinkID, const am_MuteState_e& muteState) { +void CommandControlDBusStubAdapterInternal::fireSinkMuteStateChangedEvent(const am_sinkID_t& sinkID, const am_MuteState_e& muteState) { CommonAPI::DBus::DBusStubSignalHelper> ::sendSignal( *this, @@ -834,7 +818,7 @@ void CommandControlDBusStubAdapter::fireSinkMuteStateChangedEvent(const am_sinkI /** * is fired if a systemProperty changed */ -void CommandControlDBusStubAdapter::fireSystemPropertyChangedEvent(const am_SystemProperty_s& systemProperty) { +void CommandControlDBusStubAdapterInternal::fireSystemPropertyChangedEvent(const am_SystemProperty_s& systemProperty) { CommonAPI::DBus::DBusStubSignalHelper> ::sendSignal( *this, @@ -846,7 +830,7 @@ void CommandControlDBusStubAdapter::fireSystemPropertyChangedEvent(const am_Syst /** * This callback is fired if the timinginformation for a mainConnectionID changed */ -void CommandControlDBusStubAdapter::fireTimingInformationChangedEvent(const am_mainConnectionID_t& mainConnectionID, const am_timeSync_t& time) { +void CommandControlDBusStubAdapterInternal::fireTimingInformationChangedEvent(const am_mainConnectionID_t& mainConnectionID, const am_timeSync_t& time) { CommonAPI::DBus::DBusStubSignalHelper> ::sendSignal( *this, @@ -858,7 +842,7 @@ void CommandControlDBusStubAdapter::fireTimingInformationChangedEvent(const am_m /** * This callback is called when a sink is updated. */ -void CommandControlDBusStubAdapter::fireSinkUpdatedEvent(const am_sinkID_t& sinkID, const am_sinkClass_t& sinkClassID, const am_MainSoundProperty_L& listMainSoundProperties) { +void CommandControlDBusStubAdapterInternal::fireSinkUpdatedEvent(const am_sinkID_t& sinkID, const am_sinkClass_t& sinkClassID, const am_MainSoundProperty_L& listMainSoundProperties) { CommonAPI::DBus::DBusStubSignalHelper> ::sendSignal( *this, @@ -870,7 +854,7 @@ void CommandControlDBusStubAdapter::fireSinkUpdatedEvent(const am_sinkID_t& sink /** * This callback is called when a source is updated. */ -void CommandControlDBusStubAdapter::fireSourceUpdatedEvent(const am_sourceID_t& sourceID, const am_sourceClass_t& sourceClassID, const am_MainSoundProperty_L& listMainSoundProperties) { +void CommandControlDBusStubAdapterInternal::fireSourceUpdatedEvent(const am_sourceID_t& sourceID, const am_sourceClass_t& sourceClassID, const am_MainSoundProperty_L& listMainSoundProperties) { CommonAPI::DBus::DBusStubSignalHelper> ::sendSignal( *this, @@ -882,7 +866,7 @@ void CommandControlDBusStubAdapter::fireSourceUpdatedEvent(const am_sourceID_t& /** * This callback is called when a notificated value of a sink changes. */ -void CommandControlDBusStubAdapter::fireSinkNotificationEvent(const am_sinkID_t& sinkID, const am_NotificationPayload_s& notification) { +void CommandControlDBusStubAdapterInternal::fireSinkNotificationEvent(const am_sinkID_t& sinkID, const am_NotificationPayload_s& notification) { CommonAPI::DBus::DBusStubSignalHelper> ::sendSignal( *this, @@ -894,7 +878,7 @@ void CommandControlDBusStubAdapter::fireSinkNotificationEvent(const am_sinkID_t& /** * This callback is called when a notifcated value of a source changes. */ -void CommandControlDBusStubAdapter::fireSourceNotificationEvent(const am_sourceID_t& sourceID, const am_NotificationPayload_s& notification) { +void CommandControlDBusStubAdapterInternal::fireSourceNotificationEvent(const am_sourceID_t& sourceID, const am_NotificationPayload_s& notification) { CommonAPI::DBus::DBusStubSignalHelper> ::sendSignal( *this, @@ -906,7 +890,7 @@ void CommandControlDBusStubAdapter::fireSourceNotificationEvent(const am_sourceI /** * This callback is triggered when a mainNotificationConfiguration is changed. */ -void CommandControlDBusStubAdapter::fireMainSinkNotificationConfigurationChangedEvent(const am_sinkID_t& sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration) { +void CommandControlDBusStubAdapterInternal::fireMainSinkNotificationConfigurationChangedEvent(const am_sinkID_t& sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration) { CommonAPI::DBus::DBusStubSignalHelper> ::sendSignal( *this, @@ -918,7 +902,7 @@ void CommandControlDBusStubAdapter::fireMainSinkNotificationConfigurationChanged /** * This callback is triggered when a mainNotificationConfiguration is changed. */ -void CommandControlDBusStubAdapter::fireMainSourceNotificationConfigurationChangedEvent(const am_sourceID_t& sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration) { +void CommandControlDBusStubAdapterInternal::fireMainSourceNotificationConfigurationChangedEvent(const am_sourceID_t& sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration) { CommonAPI::DBus::DBusStubSignalHelper> ::sendSignal( *this, @@ -928,8 +912,37 @@ void CommandControlDBusStubAdapter::fireMainSourceNotificationConfigurationChang ); } -const CommandControlDBusStubAdapter::StubDispatcherTable& CommandControlDBusStubAdapter::getStubDispatcherTable() { - static const CommandControlDBusStubAdapter::StubDispatcherTable stubDispatcherTable = { +const CommandControlDBusStubAdapterHelper::StubDispatcherTable& CommandControlDBusStubAdapterInternal::getStubDispatcherTable() { + return stubDispatcherTable_; +} + + +CommandControlDBusStubAdapterInternal::CommandControlDBusStubAdapterInternal( + const std::shared_ptr& factory, + const std::string& commonApiAddress, + const std::string& dbusInterfaceName, + const std::string& dbusBusName, + const std::string& dbusObjectPath, + const std::shared_ptr& dbusConnection, + const std::shared_ptr& stub): + CommonAPI::DBus::DBusStubAdapter( + factory, + commonApiAddress, + dbusInterfaceName, + dbusBusName, + dbusObjectPath, + dbusConnection, + false), + CommandControlDBusStubAdapterHelper( + factory, + commonApiAddress, + dbusInterfaceName, + dbusBusName, + dbusObjectPath, + dbusConnection, + std::dynamic_pointer_cast(stub), + false), + stubDispatcherTable_({ /** * connects a source to sink (at)return E_OK on success, E_NOT_POSSIBLE on @@ -1063,10 +1076,10 @@ const CommandControlDBusStubAdapter::StubDispatcherTable& CommandControlDBusStub * success, E_NON_EXISTENT if sourceID does not exists, E_DATABASE_ERROR on error */ { { "setMainSourceNotificationConfiguration", "q(qin)" }, &org::genivi::am::setMainSourceNotificationConfigurationStubDispatcher } - }; - return stubDispatcherTable; -} + }) { + stubDispatcherTable_.insert({ { "getInterfaceVersion", "" }, &org::genivi::am::getCommandControlInterfaceVersionStubDispatcher }); +} } // namespace am } // namespace genivi diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusStubAdapter.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusStubAdapter.h index 0580b16..8ef3355 100644 --- a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusStubAdapter.h +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusStubAdapter.h @@ -1,22 +1,11 @@ /* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 2.1.2.201309301424. -* Used org.franca.core 0.8.9.201308271211. +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.5.201312121915. +* Used org.franca.core 0.8.11.201401091023. * -* Copyright (c) 2012 BMW -* -* \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 -* -* \copyright -* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, -* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -* subject to the following conditions: -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -* THE USE OR OTHER DEALINGS IN THE SOFTWARE. -* For further information see http://www.genivi.org/. -* +* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +* If a copy of the MPL was not distributed with this file, You can obtain one at +* http://mozilla.org/MPL/2.0/. */ /** * The interface towards the Controlling Instance (e.g HMI). It handles the @@ -48,9 +37,9 @@ namespace am { typedef CommonAPI::DBus::DBusStubAdapterHelper CommandControlDBusStubAdapterHelper; -class CommandControlDBusStubAdapter: public CommandControlStubAdapter, public CommandControlDBusStubAdapterHelper { +class CommandControlDBusStubAdapterInternal: public CommandControlStubAdapter, public CommandControlDBusStubAdapterHelper { public: - CommandControlDBusStubAdapter( + CommandControlDBusStubAdapterInternal( const std::shared_ptr& factory, const std::string& commonApiAddress, const std::string& dbusInterfaceName, @@ -59,7 +48,7 @@ class CommandControlDBusStubAdapter: public CommandControlStubAdapter, public Co const std::shared_ptr& dbusConnection, const std::shared_ptr& stub); - ~CommandControlDBusStubAdapter(); + ~CommandControlDBusStubAdapterInternal(); /** @@ -154,16 +143,46 @@ class CommandControlDBusStubAdapter: public CommandControlStubAdapter, public Co * This callback is triggered when a mainNotificationConfiguration is changed. */ void fireMainSourceNotificationConfigurationChangedEvent(const am_sourceID_t& sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration); - - const StubDispatcherTable& getStubDispatcherTable(); - + + const CommandControlDBusStubAdapterHelper::StubDispatcherTable& getStubDispatcherTable(); + void deactivateManagedInstances(); + protected: virtual const char* getMethodsDBusIntrospectionXmlData() const; private: + CommandControlDBusStubAdapterHelper::StubDispatcherTable stubDispatcherTable_; +}; + +class CommandControlDBusStubAdapter: public CommandControlDBusStubAdapterInternal, public std::enable_shared_from_this { +public: + CommandControlDBusStubAdapter( + const std::shared_ptr& factory, + const std::string& commonApiAddress, + const std::string& dbusInterfaceName, + const std::string& dbusBusName, + const std::string& dbusObjectPath, + const std::shared_ptr& dbusConnection, + const std::shared_ptr& stub) : + CommonAPI::DBus::DBusStubAdapter( + factory, + commonApiAddress, + dbusInterfaceName, + dbusBusName, + dbusObjectPath, + dbusConnection, + false), + CommandControlDBusStubAdapterInternal( + factory, + commonApiAddress, + dbusInterfaceName, + dbusBusName, + dbusObjectPath, + dbusConnection, + stub) { } }; } // namespace am diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlProxy.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlProxy.h index 90bcd58..656d3f7 100644 --- a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlProxy.h +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlProxy.h @@ -1,22 +1,11 @@ /* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 2.1.2.201309301424. -* Used org.franca.core 0.8.9.201308271211. +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.5.201312121915. +* Used org.franca.core 0.8.11.201401091023. * -* Copyright (c) 2012 BMW -* -* \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 -* -* \copyright -* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, -* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -* subject to the following conditions: -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -* THE USE OR OTHER DEALINGS IN THE SOFTWARE. -* For further information see http://www.genivi.org/. -* +* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +* If a copy of the MPL was not distributed with this file, You can obtain one at +* http://mozilla.org/MPL/2.0/. */ /** * The interface towards the Controlling Instance (e.g HMI). It handles the @@ -31,6 +20,7 @@ There are two rules that have to be kept in mind #include "CommandControlProxyBase.h" + #if !defined (COMMONAPI_INTERNAL_COMPILATION) #define COMMONAPI_INTERNAL_COMPILATION #endif @@ -43,11 +33,15 @@ namespace genivi { namespace am { template -class CommandControlProxy: virtual public CommandControl, virtual public CommandControlProxyBase, public _AttributeExtensions... { - public: +class CommandControlProxy: virtual public CommandControl, virtual public CommandControlProxyBase +, public _AttributeExtensions... { +public: CommandControlProxy(std::shared_ptr delegate); ~CommandControlProxy(); + typedef CommandControl InterfaceType; + + /** * Callback that is called when the number of connections change @@ -783,7 +777,7 @@ class CommandControlProxy: virtual public CommandControl, virtual public Command * It will provide the same value for CallStatus as will be handed to the callback. */ virtual std::future setMainSourceNotificationConfigurationAsync(const am_sourceID_t& sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration, SetMainSourceNotificationConfigurationAsyncCallback callback); - + /** * Returns the CommonAPI address of the remote partner this proxy communicates with. @@ -1187,7 +1181,6 @@ CommonAPI::InterfaceVersionAttribute& CommandControlProxy<_AttributeExtensions.. return delegate_->getInterfaceVersionAttribute(); } - } // namespace am } // namespace genivi diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlProxyBase.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlProxyBase.h index 58c3abf..377547a 100644 --- a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlProxyBase.h +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlProxyBase.h @@ -1,22 +1,11 @@ /* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 2.1.2.201309301424. -* Used org.franca.core 0.8.9.201308271211. +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.5.201312121915. +* Used org.franca.core 0.8.11.201401091023. * -* Copyright (c) 2012 BMW -* -* \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 -* -* \copyright -* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, -* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -* subject to the following conditions: -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -* THE USE OR OTHER DEALINGS IN THE SOFTWARE. -* For further information see http://www.genivi.org/. -* +* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +* If a copy of the MPL was not distributed with this file, You can obtain one at +* http://mozilla.org/MPL/2.0/. */ /** * The interface towards the Controlling Instance (e.g HMI). It handles the diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlStub.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlStub.h index 9767f67..6e8de18 100644 --- a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlStub.h +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlStub.h @@ -1,22 +1,11 @@ /* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 2.1.2.201309301424. -* Used org.franca.core 0.8.9.201308271211. +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.5.201312121915. +* Used org.franca.core 0.8.11.201401091023. * -* Copyright (c) 2012 BMW -* -* \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 -* -* \copyright -* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, -* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -* subject to the following conditions: -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -* THE USE OR OTHER DEALINGS IN THE SOFTWARE. -* For further information see http://www.genivi.org/. -* +* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +* If a copy of the MPL was not distributed with this file, You can obtain one at +* http://mozilla.org/MPL/2.0/. */ /** * The interface towards the Controlling Instance (e.g HMI). It handles the @@ -179,10 +168,9 @@ class CommandControlStubAdapter: virtual public CommonAPI::StubAdapter, public C * Instead, the "fireEvent" methods of the stub should be used. */ virtual void fireMainSourceNotificationConfigurationChangedEvent(const am_sourceID_t& sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration) = 0; - - + + virtual void deactivateManagedInstances() = 0; - protected: /** * Defines properties for storing the ClientIds of clients / proxies that have @@ -216,9 +204,10 @@ class CommandControlStubRemoteEvent { * This class and the one above are the ones an application developer needs to have * a look at if he wants to implement a service. */ -class CommandControlStub : public CommonAPI::Stub { - public: +class CommandControlStub : public virtual CommonAPI::Stub { +public: virtual ~CommandControlStub() { } + virtual const CommonAPI::Version& getInterfaceVersion(std::shared_ptr clientId) = 0; /** @@ -490,7 +479,10 @@ class CommandControlStub : public CommonAPI::Stub::initStubAdapter; + typedef CommonAPI::Stub::StubAdapterType StubAdapterType; + typedef CommonAPI::Stub::RemoteEventHandlerType RemoteEventHandlerType; }; } // namespace am diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlStubDefault.cpp b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlStubDefault.cpp index 7d588c1..f23f2da 100644 --- a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlStubDefault.cpp +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlStubDefault.cpp @@ -1,22 +1,11 @@ /* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 2.1.2.201309301424. -* Used org.franca.core 0.8.9.201308271211. +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.5.201312121915. +* Used org.franca.core 0.8.11.201401091023. * -* Copyright (c) 2012 BMW -* -* \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 -* -* \copyright -* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, -* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -* subject to the following conditions: -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -* THE USE OR OTHER DEALINGS IN THE SOFTWARE. -* For further information see http://www.genivi.org/. -* +* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +* If a copy of the MPL was not distributed with this file, You can obtain one at +* http://mozilla.org/MPL/2.0/. */ #include @@ -25,11 +14,16 @@ namespace genivi { namespace am { CommandControlStubDefault::CommandControlStubDefault(): - remoteEventHandler_(this) { + remoteEventHandler_(this), + interfaceVersion_(CommandControl::getInterfaceVersion()) { +} + +const CommonAPI::Version& CommandControlStubDefault::getInterfaceVersion(std::shared_ptr clientId) { + return interfaceVersion_; } CommandControlStubRemoteEvent* CommandControlStubDefault::initStubAdapter(const std::shared_ptr& stubAdapter) { - stubAdapter_ = stubAdapter; + CommonAPI::Stub::stubAdapter_ = stubAdapter; return &remoteEventHandler_; } diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlStubDefault.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlStubDefault.h index ed2dad3..2bfe6ba 100644 --- a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlStubDefault.h +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlStubDefault.h @@ -1,22 +1,11 @@ /* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 2.1.2.201309301424. -* Used org.franca.core 0.8.9.201308271211. +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.5.201312121915. +* Used org.franca.core 0.8.11.201401091023. * -* Copyright (c) 2012 BMW -* -* \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 -* -* \copyright -* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, -* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -* subject to the following conditions: -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -* THE USE OR OTHER DEALINGS IN THE SOFTWARE. -* For further information see http://www.genivi.org/. -* +* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +* If a copy of the MPL was not distributed with this file, You can obtain one at +* http://mozilla.org/MPL/2.0/. */ /** * The interface towards the Controlling Instance (e.g HMI). It handles the @@ -29,6 +18,7 @@ There are two rules that have to be kept in mind #ifndef ORG_GENIVI_AM_Command_Control_STUB_DEFAULT_H_ #define ORG_GENIVI_AM_Command_Control_STUB_DEFAULT_H_ + #include #include @@ -46,12 +36,14 @@ namespace am { * that would be defined for this service, and/or if you do not need any non-default * behaviour. */ -class CommandControlStubDefault : public CommandControlStub { - public: +class CommandControlStubDefault : public virtual CommandControlStub { +public: CommandControlStubDefault(); CommandControlStubRemoteEvent* initStubAdapter(const std::shared_ptr& stubAdapter); + const CommonAPI::Version& getInterfaceVersion(std::shared_ptr clientId); + /** * connects a source to sink @@ -321,11 +313,10 @@ class CommandControlStubDefault : public CommandControlStub { * This callback is triggered when a mainNotificationConfiguration is changed. */ virtual void fireMainSourceNotificationConfigurationChangedEvent(const am_sourceID_t& sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration); - - protected: - std::shared_ptr stubAdapter_; - private: + +protected: +private: class RemoteEventHandler: public CommandControlStubRemoteEvent { public: RemoteEventHandler(CommandControlStubDefault* defaultStub); @@ -337,6 +328,8 @@ class CommandControlStubDefault : public CommandControlStub { RemoteEventHandler remoteEventHandler_; + + CommonAPI::Version interfaceVersion_; }; } // namespace am diff --git a/PluginCommandInterfaceCAPI/src/CAmCommandSenderCAPI.cpp b/PluginCommandInterfaceCAPI/src/CAmCommandSenderCAPI.cpp index 772b1bd..81e8799 100644 --- a/PluginCommandInterfaceCAPI/src/CAmCommandSenderCAPI.cpp +++ b/PluginCommandInterfaceCAPI/src/CAmCommandSenderCAPI.cpp @@ -222,7 +222,7 @@ void CAmCommandSenderCAPI::cbMainSinkSoundPropertyChanged(const am_sinkID_t sink RETURN_IF_NOT_READY() assert((bool)mService); log(&ctxCommandCAPI, DLT_LOG_INFO, "cbMainSinkSoundPropertyChanged called, sinkID", sinkID, "SoundProperty.type", soundProperty.type, "SoundProperty.value", soundProperty.value); - org::genivi::am::am_MainSoundProperty_s mainSoundProp(CAmConvert2CAPIType(soundProperty.type), soundProperty.value); + org::genivi::am::am_MainSoundProperty_s mainSoundProp(soundProperty.type, soundProperty.value); mService->fireMainSinkSoundPropertyChangedEvent(sinkID, mainSoundProp); } @@ -304,7 +304,7 @@ void CAmCommandSenderCAPI::cbSinkUpdated(const am_sinkID_t sinkID, const am_sink log(&ctxCommandCAPI, DLT_LOG_INFO, "cbSinkUpdated called, sinkID", sinkID); org::genivi::am::am_MainSoundProperty_L list; std::for_each(listMainSoundProperties.begin(), listMainSoundProperties.end(), [&](const am_MainSoundProperty_s & ref) { - org::genivi::am::am_MainSoundProperty_s prop(CAmConvert2CAPIType(ref.type), ref.value); + org::genivi::am::am_MainSoundProperty_s prop(ref.type, ref.value); list.push_back(prop); }); mService->fireSinkUpdatedEvent(sinkID, sinkClassID, list); @@ -317,7 +317,7 @@ void CAmCommandSenderCAPI::cbSourceUpdated(const am_sourceID_t sourceID, const a log(&ctxCommandCAPI, DLT_LOG_INFO, "cbSourceUpdated called, sourceID", sourceID); org::genivi::am::am_MainSoundProperty_L list; std::for_each(listMainSoundProperties.begin(), listMainSoundProperties.end(), [&](const am_MainSoundProperty_s & ref) { - org::genivi::am::am_MainSoundProperty_s prop(CAmConvert2CAPIType(ref.type), ref.value); + org::genivi::am::am_MainSoundProperty_s prop(ref.type, ref.value); list.push_back(prop); }); mService->fireSourceUpdatedEvent(sourceID, sourceClassID, list); @@ -328,7 +328,7 @@ void CAmCommandSenderCAPI::cbSinkNotification(const am_sinkID_t sinkID, const am RETURN_IF_NOT_READY() assert((bool)mService); log(&ctxCommandCAPI, DLT_LOG_INFO, "cbSinkNotification called, sinkID", sinkID); - org::genivi::am::am_NotificationPayload_s ciNnotif(static_cast(notification.type), notification.value); + org::genivi::am::am_NotificationPayload_s ciNnotif(notification.type, notification.value); mService->fireSinkNotificationEvent(sinkID, ciNnotif); } @@ -337,7 +337,7 @@ void CAmCommandSenderCAPI::cbSourceNotification(const am_sourceID_t sourceID, co RETURN_IF_NOT_READY() assert((bool)mService); log(&ctxCommandCAPI, DLT_LOG_INFO, "cbSourceNotification called, sourceID", sourceID); - org::genivi::am::am_NotificationPayload_s ciNnotif(static_cast(notification.type), notification.value); + org::genivi::am::am_NotificationPayload_s ciNnotif(notification.type, notification.value); mService->fireSourceNotificationEvent(sourceID, ciNnotif); } @@ -346,7 +346,7 @@ void CAmCommandSenderCAPI::cbMainSinkNotificationConfigurationChanged(const am_s RETURN_IF_NOT_READY() assert((bool)mService); log(&ctxCommandCAPI, DLT_LOG_INFO, "cbSinkMainNotificationConfigurationChanged called, sinkID", sinkID); - org::genivi::am::am_NotificationConfiguration_s ciNotifConfig(static_cast(mainNotificationConfiguration.type), + org::genivi::am::am_NotificationConfiguration_s ciNotifConfig(mainNotificationConfiguration.type, static_cast(mainNotificationConfiguration.status), mainNotificationConfiguration.parameter); mService->fireMainSinkNotificationConfigurationChangedEvent(sinkID, ciNotifConfig); @@ -357,7 +357,7 @@ void CAmCommandSenderCAPI::cbMainSourceNotificationConfigurationChanged(const am RETURN_IF_NOT_READY() assert((bool)mService); log(&ctxCommandCAPI, DLT_LOG_INFO, "cbSourceMainNotificationConfigurationChanged called, sourceID", sourceID); - org::genivi::am::am_NotificationConfiguration_s ciNotifConfig(static_cast(mainNotificationConfiguration.type), + org::genivi::am::am_NotificationConfiguration_s ciNotifConfig(mainNotificationConfiguration.type, static_cast(mainNotificationConfiguration.status), mainNotificationConfiguration.parameter); mService->fireMainSourceNotificationConfigurationChangedEvent(sourceID, ciNotifConfig); diff --git a/PluginCommandInterfaceCAPI/src/CAmCommandSenderCommon.cpp b/PluginCommandInterfaceCAPI/src/CAmCommandSenderCommon.cpp index 58816ce..06383ad 100644 --- a/PluginCommandInterfaceCAPI/src/CAmCommandSenderCommon.cpp +++ b/PluginCommandInterfaceCAPI/src/CAmCommandSenderCommon.cpp @@ -21,34 +21,24 @@ /** * Utility functions */ -void CAmConvertAvailablility(const am_Availability_s & amAavailability, org::genivi::am::am_Availability_s & result) +void CAmConvertAvailablility(const am_Availability_s & amAvailability, org::genivi::am::am_Availability_s & result) { - result.availability = CAmConvert2CAPIType(amAavailability.availability); - result.availabilityReason = CAmConvert2CAPIType(amAavailability.availabilityReason); + result.availability = CAmConvert2CAPIType(amAvailability.availability); + result.availabilityReason = amAvailability.availabilityReason; } void CAmConvertMainSoundProperty(const am_MainSoundProperty_s & amMainSoundProperty, org::genivi::am::am_MainSoundProperty_s & result) { - result.type = CAmConvert2CAPIType(amMainSoundProperty.type); + result.type = amMainSoundProperty.type; result.value = amMainSoundProperty.value; } void CAmConvertSystemProperty(const am_SystemProperty_s & amSystemProperty, org::genivi::am::am_SystemProperty_s & result) { - result.type = CAmConvert2CAPIType(amSystemProperty.type); + result.type = amSystemProperty.type; result.value = amSystemProperty.value; } -org::genivi::am::am_ClassProperty_pe CAmConvert2CAPIType(const am_ClassProperty_e & property) -{ - return static_cast(property); -} - -org::genivi::am::am_SystemPropertyType_pe CAmConvert2CAPIType(const am_SystemPropertyType_e & property) -{ - return static_cast(property); -} - org::genivi::am::am_Availability_e CAmConvert2CAPIType(const am_Availability_e & availability) { return (A_MAX==availability)?org::genivi::am::am_Availability_e::A_MAX @@ -56,11 +46,6 @@ org::genivi::am::am_Availability_e CAmConvert2CAPIType(const am_Availability_e & static_cast(availability); } -org::genivi::am::am_AvailabilityReason_pe CAmConvert2CAPIType(const am_AvailabilityReason_e & availabilityReason) -{ - return static_cast(availabilityReason); -} - org::genivi::am::am_MuteState_e CAmConvert2CAPIType(const am_MuteState_e & muteState) { return MS_MAX==muteState? @@ -75,15 +60,6 @@ am_MuteState_e CAmConvertFromCAPIType(const org::genivi::am::am_MuteState_e & mu MS_MAX:static_cast(muteState); } -org::genivi::am::am_MainSoundPropertyType_pe CAmConvert2CAPIType(const am_MainSoundPropertyType_e & type) -{ - return static_cast(type); -} -am_MainSoundPropertyType_e CAmConvertFromCAPIType(const org::genivi::am::am_MainSoundPropertyType_pe & type) -{ - return static_cast(type); -} - org::genivi::am::am_ConnectionState_e CAmConvert2CAPIType(const am_ConnectionState_e & connectionState) { return CS_MAX==connectionState? @@ -97,11 +73,6 @@ am_ConnectionState_e CAmConvertFromCAPIType(const org::genivi::am::am_Connection CS_MAX:static_cast(connectionState); } -org::genivi::am::am_NotificationType_pe CAmConvert2CAPIType(const am_NotificationType_e & notificationType) -{ - return static_cast(notificationType); -} - org::genivi::am::am_NotificationStatus_e CAmConvert2CAPIType(const am_NotificationStatus_e & notificationStatus) { return NS_MAX==notificationStatus? diff --git a/PluginCommandInterfaceCAPI/src/CAmCommandSenderService.cpp b/PluginCommandInterfaceCAPI/src/CAmCommandSenderService.cpp index 552ff9a..d2d59f1 100644 --- a/PluginCommandInterfaceCAPI/src/CAmCommandSenderService.cpp +++ b/PluginCommandInterfaceCAPI/src/CAmCommandSenderService.cpp @@ -65,19 +65,19 @@ void CAmCommandSenderService::setSinkMuteState(org::genivi::am::am_sinkID_t sink void CAmCommandSenderService::setMainSinkSoundProperty(org::genivi::am::am_sinkID_t sinkID, org::genivi::am::am_MainSoundProperty_s soundProperty, org::genivi::am::am_Error_e& result) { assert(mpIAmCommandReceive); - am_MainSoundProperty_s property = {static_cast(soundProperty.type), soundProperty.value}; + am_MainSoundProperty_s property = {static_cast(soundProperty.type), soundProperty.value}; result = CAmConvert2CAPIType(mpIAmCommandReceive->setMainSinkSoundProperty(property, sinkID)); } void CAmCommandSenderService::setMainSourceSoundProperty(org::genivi::am::am_sourceID_t sourceID, org::genivi::am::am_MainSoundProperty_s soundProperty, org::genivi::am::am_Error_e& result) { assert(mpIAmCommandReceive); - am_MainSoundProperty_s property = {static_cast(soundProperty.type), soundProperty.value}; + am_MainSoundProperty_s property = {static_cast(soundProperty.type), soundProperty.value}; result = CAmConvert2CAPIType(mpIAmCommandReceive->setMainSourceSoundProperty(property, sourceID)); } void CAmCommandSenderService::setSystemProperty(org::genivi::am::am_SystemProperty_s soundProperty, org::genivi::am::am_Error_e& result) { assert(mpIAmCommandReceive); - am_SystemProperty_s property = {static_cast(soundProperty.type), soundProperty.value}; + am_SystemProperty_s property = {static_cast(soundProperty.type), soundProperty.value}; result = CAmConvert2CAPIType(mpIAmCommandReceive->setSystemProperty(property)); } @@ -147,7 +147,7 @@ void CAmCommandSenderService::getListMainSinkSoundProperties(org::genivi::am::am org::genivi::am::am_MainSoundProperty_s item; for(std::vector::const_iterator iter = list.begin(); iter!=list.end(); iter++) { - item.type = CAmConvert2CAPIType(iter->type); + item.type = iter->type; item.value = iter->value; listSoundProperties.push_back (item); } @@ -163,7 +163,7 @@ void CAmCommandSenderService::getListMainSourceSoundProperties(org::genivi::am:: org::genivi::am::am_MainSoundProperty_s item; for(std::vector::const_iterator iter = list.begin(); iter!=list.end(); iter++) { - item.type = CAmConvert2CAPIType(iter->type); + item.type = iter->type; item.value = iter->value; listSourceProperties.push_back (item); } @@ -183,7 +183,7 @@ void CAmCommandSenderService::getListSourceClasses(org::genivi::am::am_SourceCla item.name = iter->name; item.listClassProperties.clear(); std::for_each(iter->listClassProperties.begin(), iter->listClassProperties.end(), [&](const am_ClassProperty_s & ref) { - org::genivi::am::am_ClassProperty_s classProp(CAmConvert2CAPIType(ref.classProperty), ref.value); + org::genivi::am::am_ClassProperty_s classProp(ref.classProperty, ref.value); item.listClassProperties.push_back(classProp); }); listSourceClasses.push_back (item); @@ -204,7 +204,7 @@ void CAmCommandSenderService::getListSinkClasses(org::genivi::am::am_SinkClass_L item.name = iter->name; item.listClassProperties.clear(); std::for_each(iter->listClassProperties.begin(), iter->listClassProperties.end(), [&](const am_ClassProperty_s & ref) { - org::genivi::am::am_ClassProperty_s classProp(CAmConvert2CAPIType(ref.classProperty), ref.value); + org::genivi::am::am_ClassProperty_s classProp(ref.classProperty, ref.value); item.listClassProperties.push_back(classProp); }); listSinkClasses.push_back (item); @@ -221,7 +221,7 @@ void CAmCommandSenderService::getListSystemProperties(org::genivi::am::am_System org::genivi::am::am_SystemProperty_s item; for(std::vector::const_iterator iter = list.begin(); iter!=list.end(); iter++) { - item.type = CAmConvert2CAPIType(iter->type); + item.type = iter->type; item.value = iter->value; listSystemProperties.push_back (item); } diff --git a/PluginCommandInterfaceCAPI/test/CAmCommandSenderCAPITest.cpp b/PluginCommandInterfaceCAPI/test/CAmCommandSenderCAPITest.cpp index 66bd0dc..f7abcbc 100644 --- a/PluginCommandInterfaceCAPI/test/CAmCommandSenderCAPITest.cpp +++ b/PluginCommandInterfaceCAPI/test/CAmCommandSenderCAPITest.cpp @@ -313,7 +313,7 @@ TEST_F(CAmCommandSenderCAPITest, SetMainSinkSoundPropertyTest) EXPECT_CALL(*env->mpCommandReceive, setMainSinkSoundProperty(AllOf( Field(&am_MainSoundProperty_s::value, 3), Field(&am_MainSoundProperty_s::type, MSP_UNKNOWN)), sinkID)).WillOnce(Return(E_OK)); - org::genivi::am::am_MainSoundProperty_s value(static_cast(am_MainSoundPropertyType_e::MSP_UNKNOWN), (const int16_t)3); + org::genivi::am::am_MainSoundProperty_s value(MSP_UNKNOWN, (const int16_t)3); env->mProxy->setMainSinkSoundProperty(sinkID, value, callStatus, result); ASSERT_EQ(result, org::genivi::am::am_Error_e::E_OK); } @@ -332,7 +332,7 @@ TEST_F(CAmCommandSenderCAPITest, SetMainSourceSoundPropertyTest) EXPECT_CALL(*env->mpCommandReceive, setMainSourceSoundProperty(AllOf( Field(&am_MainSoundProperty_s::value, 3), Field(&am_MainSoundProperty_s::type, MSP_UNKNOWN)), sID)).WillOnce(Return(E_OK)); - org::genivi::am::am_MainSoundProperty_s value(static_cast(am_MainSoundPropertyType_e::MSP_UNKNOWN), (const int16_t)3); + org::genivi::am::am_MainSoundProperty_s value(MSP_UNKNOWN, (const int16_t)3); env->mProxy->setMainSourceSoundProperty(sID, value, callStatus, result); ASSERT_EQ(result, org::genivi::am::am_Error_e::E_OK); } @@ -349,7 +349,7 @@ TEST_F(CAmCommandSenderCAPITest, SetSystemPropertyTest) EXPECT_CALL(*env->mpCommandReceive, setSystemProperty(Field(&am_SystemProperty_s::value, 2))).WillOnce(Return(E_OK)); - org::genivi::am::am_SystemProperty_s value(static_cast(am_SystemPropertyType_e::SYP_UNKNOWN), (const int16_t)2); + org::genivi::am::am_SystemProperty_s value(SYP_UNKNOWN, (const int16_t)2); env->mProxy->setSystemProperty(value, callStatus, result); ASSERT_EQ(result, org::genivi::am::am_Error_e::E_OK); } @@ -417,7 +417,7 @@ TEST_F(CAmCommandSenderCAPITest, GetListMainSinksTest) ASSERT_EQ(34, listMainSinks.at(0).sinkClassID); ASSERT_EQ(24, listMainSinks.at(0).sinkID); ASSERT_EQ(org::genivi::am::am_Availability_e::A_UNAVAILABLE, listMainSinks.at(0).availability.availability); - ASSERT_EQ(static_cast(am_AvailabilityReason_e::AR_GENIVI_NOMEDIA), listMainSinks.at(0).availability.availabilityReason); + ASSERT_EQ(AR_GENIVI_NOMEDIA, listMainSinks.at(0).availability.availabilityReason); } EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive)); } @@ -452,7 +452,7 @@ TEST_F(CAmCommandSenderCAPITest, GetListMainSourcesTest) ASSERT_EQ(12, list.at(0).sourceClassID); ASSERT_EQ(224, list.at(0).sourceID); ASSERT_EQ(org::genivi::am::am_Availability_e::A_MAX, list.at(0).availability.availability); - ASSERT_EQ(static_cast(am_AvailabilityReason_e::AR_GENIVI_SAMEMEDIA), list.at(0).availability.availabilityReason); + ASSERT_EQ(AR_GENIVI_SAMEMEDIA, list.at(0).availability.availabilityReason); ASSERT_EQ(22, list.at(1).sourceID); } EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive)); @@ -461,10 +461,10 @@ TEST_F(CAmCommandSenderCAPITest, GetListMainSourcesTest) ACTION(returnListMainSinkSoundProperties){ std::vector list; am_MainSoundProperty_s listItem; - listItem.type=MSP_MAX; + listItem.type=MSP_UNKNOWN; listItem.value=223; list.push_back(listItem); - listItem.type=MSP_MAX; + listItem.type=MSP_GENIVI_BASS; listItem.value=2; list.push_back(listItem); arg1=list; @@ -485,9 +485,9 @@ TEST_F(CAmCommandSenderCAPITest, GetListMainSinkSoundPropertiesTest) ASSERT_EQ(result, org::genivi::am::am_Error_e::E_OK); ASSERT_EQ(2, list.size()); ASSERT_EQ(223, list.at(0).value); - ASSERT_EQ(static_cast(am_MainSoundPropertyType_e::MSP_MAX), list.at(0).type); + ASSERT_EQ(MSP_UNKNOWN, list.at(0).type); ASSERT_EQ(2, list.at(1).value); - ASSERT_EQ(static_cast(am_MainSoundPropertyType_e::MSP_MAX), list.at(1).type); + ASSERT_EQ(MSP_GENIVI_BASS, list.at(1).type); } EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive)); } @@ -495,10 +495,10 @@ TEST_F(CAmCommandSenderCAPITest, GetListMainSinkSoundPropertiesTest) ACTION(returnListMainSourceSoundProperties){ std::vector list; am_MainSoundProperty_s listItem; - listItem.type=MSP_EXAMPLE_MID; + listItem.type=MSP_GENIVI_MID; listItem.value=223; list.push_back(listItem); - listItem.type=MSP_MAX; + listItem.type=MSP_GENIVI_BASS; listItem.value=2; list.push_back(listItem); arg1=list; @@ -519,9 +519,9 @@ TEST_F(CAmCommandSenderCAPITest, GetListMainSourceSoundPropertiesTest) ASSERT_EQ(result, org::genivi::am::am_Error_e::E_OK); ASSERT_EQ(2, list.size()); ASSERT_EQ(223, list.at(0).value); - ASSERT_EQ(static_cast(am_MainSoundPropertyType_e::MSP_EXAMPLE_MID), list.at(0).type); + ASSERT_EQ(MSP_GENIVI_MID, list.at(0).type); ASSERT_EQ(2, list.at(1).value); - ASSERT_EQ(static_cast(am_MainSoundPropertyType_e::MSP_MAX), list.at(1).type); + ASSERT_EQ(MSP_GENIVI_BASS, list.at(1).type); } EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive)); } @@ -530,7 +530,7 @@ ACTION(returnListSourceClasses){ std::vector list; am_SourceClass_s listItem; am_ClassProperty_s property; - property.classProperty=CP_MAX; + property.classProperty=CP_UNKNOWN; property.value=12; listItem.name="FirstCLass"; listItem.sourceClassID=23; @@ -559,11 +559,11 @@ TEST_F(CAmCommandSenderCAPITest, GetListSourceClassesTest) ASSERT_EQ(23, list.at(0).sourceClassID); ASSERT_EQ(1, list.at(0).listClassProperties.size()); - ASSERT_EQ(static_cast(am_ClassProperty_e::CP_MAX), list.at(0).listClassProperties.at(0).classProperty); + ASSERT_EQ(CP_UNKNOWN, list.at(0).listClassProperties.at(0).classProperty); ASSERT_EQ(2, list.at(1).sourceClassID); ASSERT_EQ(2, list.at(1).listClassProperties.size()); - ASSERT_EQ(static_cast(am_ClassProperty_e::CP_MAX), list.at(1).listClassProperties.at(0).classProperty); + ASSERT_EQ(CP_UNKNOWN, list.at(1).listClassProperties.at(0).classProperty); } EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive)); } @@ -572,7 +572,7 @@ ACTION(returnListSinkClasses){ std::vector list; am_SinkClass_s listItem; am_ClassProperty_s property; - property.classProperty=CP_MAX; + property.classProperty=CP_UNKNOWN; property.value=122; listItem.name="FirstCLass"; listItem.sinkClassID=23; @@ -602,12 +602,12 @@ TEST_F(CAmCommandSenderCAPITest, GetListSinkClassesTest) ASSERT_EQ(0, list.at(0).name.compare("FirstCLass")); ASSERT_EQ(23, list.at(0).sinkClassID); ASSERT_EQ(1, list.at(0).listClassProperties.size()); - ASSERT_EQ(static_cast(am_ClassProperty_e::CP_MAX), list.at(0).listClassProperties.at(0).classProperty); + ASSERT_EQ(CP_UNKNOWN, list.at(0).listClassProperties.at(0).classProperty); ASSERT_EQ(0, list.at(1).name.compare("SecondCLass")); ASSERT_EQ(2, list.at(1).sinkClassID); ASSERT_EQ(2, list.at(1).listClassProperties.size()); - ASSERT_EQ(static_cast(am_ClassProperty_e::CP_MAX), list.at(1).listClassProperties.at(0).classProperty); + ASSERT_EQ(CP_UNKNOWN, list.at(1).listClassProperties.at(0).classProperty); } EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive)); } @@ -615,7 +615,7 @@ TEST_F(CAmCommandSenderCAPITest, GetListSinkClassesTest) ACTION(returnListSystemProperties){ std::vector list; am_SystemProperty_s listItem; - listItem.type=SYP_MAX; + listItem.type=SYP_UNKNOWN; listItem.value=-2245; list.push_back(listItem); arg0=list; @@ -636,7 +636,7 @@ TEST_F(CAmCommandSenderCAPITest, GetListSystemPropertiesTest) ASSERT_EQ(1, list.size()); ASSERT_EQ(-2245, list.at(0).value); - ASSERT_EQ(static_cast(am_SystemPropertyType_e::SYP_MAX), list.at(0).type); + ASSERT_EQ(SYP_UNKNOWN, list.at(0).type); } EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpCommandReceive)); } @@ -735,14 +735,14 @@ TEST_F(CAmCommandSenderCAPITest, onSourceAddedEventTest) destination.sourceID = 100; destination.name = "Name"; destination.availability.availability = org::genivi::am::am_Availability_e::A_MAX; - destination.availability.availabilityReason = static_cast(AR_MAX); + destination.availability.availabilityReason = AR_UNKNOWN; destination.sourceClassID = 200; am_SourceType_s origin; origin.sourceID = 100; origin.name = "Name"; origin.availability.availability = A_MAX; - origin.availability.availabilityReason = AR_MAX; + origin.availability.availabilityReason = AR_UNKNOWN; origin.sourceClassID = 200; EXPECT_CALL(mock, onSourceAddedEvent(destination)); env->mpPlugin->cbNewSource(origin); @@ -780,9 +780,9 @@ TEST_F(CAmCommandSenderCAPITest, onMainSourceSoundPropertyChangedEventTest) am_MainSoundProperty_s soundProperty; soundProperty.value = 10; - soundProperty.type = am_MainSoundPropertyType_e::MSP_MAX; + soundProperty.type = MSP_UNKNOWN; - org::genivi::am::am_MainSoundProperty_s destination(static_cast(MSP_MAX), 10); + org::genivi::am::am_MainSoundProperty_s destination(MSP_UNKNOWN, 10); EXPECT_CALL(mock, onMainSourceSoundPropertyChangedEvent(101, destination)); env->mpPlugin->cbMainSourceSoundPropertyChanged(101, soundProperty); @@ -803,9 +803,9 @@ TEST_F(CAmCommandSenderCAPITest, onSourceAvailabilityChangedEventTest) am_Availability_s availability; availability.availability = A_MAX; - availability.availabilityReason = AR_MAX; + availability.availabilityReason = AR_UNKNOWN; - org::genivi::am::am_Availability_s destination(org::genivi::am::am_Availability_e::A_MAX, static_cast(AR_MAX)); + org::genivi::am::am_Availability_s destination(org::genivi::am::am_Availability_e::A_MAX, AR_UNKNOWN); EXPECT_CALL(mock, onSourceAvailabilityChangedEvent(101, destination)); env->mpPlugin->cbSourceAvailabilityChanged(101, availability); @@ -842,7 +842,7 @@ TEST_F(CAmCommandSenderCAPITest, onSinkAddedEventTest) destination.sinkID = 100; destination.name = "Name"; destination.availability.availability = org::genivi::am::am_Availability_e::A_MAX; - destination.availability.availabilityReason = static_cast(AR_MAX); + destination.availability.availabilityReason = AR_UNKNOWN; destination.muteState = org::genivi::am::am_MuteState_e::MS_MAX; destination.volume = 1; destination.sinkClassID = 100; @@ -851,7 +851,7 @@ TEST_F(CAmCommandSenderCAPITest, onSinkAddedEventTest) origin.sinkID = 100; origin.name = "Name"; origin.availability.availability = A_MAX; - origin.availability.availabilityReason = AR_MAX; + origin.availability.availabilityReason = AR_UNKNOWN; origin.muteState = am_MuteState_e::MS_MAX; origin.volume = 1; origin.sinkClassID = 100; @@ -891,9 +891,9 @@ TEST_F(CAmCommandSenderCAPITest, onMainSinkSoundPropertyChangedEventTest) am_MainSoundProperty_s soundProperty; soundProperty.value = 10; - soundProperty.type = am_MainSoundPropertyType_e::MSP_MAX; + soundProperty.type = MSP_UNKNOWN; - org::genivi::am::am_MainSoundProperty_s destination(static_cast(MSP_MAX), 10); + org::genivi::am::am_MainSoundProperty_s destination(MSP_UNKNOWN, 10); EXPECT_CALL(mock, onMainSinkSoundPropertyChangedEvent(101, destination)); env->mpPlugin->cbMainSinkSoundPropertyChanged(101, soundProperty); @@ -914,9 +914,9 @@ TEST_F(CAmCommandSenderCAPITest, onSinkAvailabilityChangedEventTest) am_Availability_s availability; availability.availability = A_MAX; - availability.availabilityReason = AR_MAX; + availability.availabilityReason = AR_UNKNOWN; - org::genivi::am::am_Availability_s destination(org::genivi::am::am_Availability_e::A_MAX, static_cast(AR_MAX)); + org::genivi::am::am_Availability_s destination(org::genivi::am::am_Availability_e::A_MAX, AR_UNKNOWN); EXPECT_CALL(mock, onSinkAvailabilityChangedEvent(101, destination)); env->mpPlugin->cbSinkAvailabilityChanged(101, availability); @@ -967,10 +967,10 @@ TEST_F(CAmCommandSenderCAPITest, onSystemPropertyChangedEventTest) auto subscription = env->mProxy->getSystemPropertyChangedEvent().subscribe(std::bind(&MockNotificationsClient::onSystemPropertyChangedEvent, std::ref(mock), std::placeholders::_1)); - org::genivi::am::am_SystemProperty_s value(static_cast(SYP_UNKNOWN), (const int16_t)2); + org::genivi::am::am_SystemProperty_s value(static_cast(SYP_UNKNOWN), (const int16_t)2); am_SystemProperty_s systemProperty; systemProperty.value = 2; - systemProperty.type = am_SystemPropertyType_e::SYP_UNKNOWN; + systemProperty.type = SYP_UNKNOWN; EXPECT_CALL(mock, onSystemPropertyChangedEvent(value)); env->mpPlugin->cbSystemPropertyChanged(systemProperty); @@ -1008,7 +1008,7 @@ TEST_F(CAmCommandSenderCAPITest, onSinkUpdatedEventTest) std::vector listMainSoundProperties; am_MainSoundProperty_s prop; prop.value = 1; - prop.type = am_MainSoundPropertyType_e::MSP_MAX; + prop.type = MSP_UNKNOWN; listMainSoundProperties.push_back(prop); EXPECT_CALL(mock, onSinkUpdatedEvent(1, 2, _)); env->mpPlugin->cbSinkUpdated(1, 2, listMainSoundProperties); @@ -1029,7 +1029,7 @@ TEST_F(CAmCommandSenderCAPITest, onSourceUpdatedTest) std::vector listMainSoundProperties; am_MainSoundProperty_s prop; prop.value = 1; - prop.type = am_MainSoundPropertyType_e::MSP_MAX; + prop.type = MSP_UNKNOWN; listMainSoundProperties.push_back(prop); EXPECT_CALL(mock, onSourceUpdatedEvent(1, 2, _)); env->mpPlugin->cbSourceUpdated(1, 2, listMainSoundProperties); @@ -1048,10 +1048,10 @@ TEST_F(CAmCommandSenderCAPITest, onSinkNotificationEventTest) auto subscription = env->mProxy->getSinkNotificationEvent().subscribe(std::bind(&MockNotificationsClient::onSinkNotificationEvent, std::ref(mock), std::placeholders::_1, std::placeholders::_2)); am_NotificationPayload_s orig; - orig.type = am_NotificationType_e::NT_MAX; + orig.type = NT_UNKNOWN; orig.value = 1; org::genivi::am::am_NotificationPayload_s dest; - dest.type = static_cast(NT_MAX); + dest.type = NT_UNKNOWN; dest.value = 1; EXPECT_CALL(mock, onSinkNotificationEvent(1, dest)); @@ -1072,10 +1072,10 @@ TEST_F(CAmCommandSenderCAPITest, onSourceNotificationEventTest) auto subscription = env->mProxy->getSourceNotificationEvent().subscribe(std::bind(&MockNotificationsClient::onSourceNotificationEvent, std::ref(mock), std::placeholders::_1, std::placeholders::_2)); am_NotificationPayload_s orig; - orig.type = am_NotificationType_e::NT_MAX; + orig.type = NT_UNKNOWN; orig.value = 1; org::genivi::am::am_NotificationPayload_s dest; - dest.type = static_cast(NT_MAX); + dest.type = NT_UNKNOWN; dest.value = 1; EXPECT_CALL(mock, onSourceNotificationEvent(1, dest)); @@ -1095,11 +1095,11 @@ TEST_F(CAmCommandSenderCAPITest, onMainSinkNotificationConfigurationChangedEvent auto subscription = env->mProxy->getMainSinkNotificationConfigurationChangedEvent().subscribe(std::bind(&MockNotificationsClient::onMainSinkNotificationConfigurationChangedEvent, std::ref(mock), std::placeholders::_1, std::placeholders::_2)); am_NotificationConfiguration_s orig; - orig.type = am_NotificationType_e::NT_MAX; + orig.type = NT_UNKNOWN; orig.parameter = 1; orig.status = am_NotificationStatus_e::NS_MAX; org::genivi::am::am_NotificationConfiguration_s dest; - dest.type = static_cast(NT_MAX); + dest.type = NT_UNKNOWN; dest.parameter = 1; dest.status = org::genivi::am::am_NotificationStatus_e::NS_MAX; @@ -1120,11 +1120,11 @@ TEST_F(CAmCommandSenderCAPITest, onMainSourceNotificationConfigurationChangedEve auto subscription = env->mProxy->getMainSourceNotificationConfigurationChangedEvent().subscribe(std::bind(&MockNotificationsClient::onMainSourceNotificationConfigurationChangedEvent, std::ref(mock), std::placeholders::_1, std::placeholders::_2)); am_NotificationConfiguration_s orig; - orig.type = am_NotificationType_e::NT_MAX; + orig.type = NT_UNKNOWN; orig.parameter = 1; orig.status = am_NotificationStatus_e::NS_MAX; org::genivi::am::am_NotificationConfiguration_s dest; - dest.type =static_cast(NT_MAX); + dest.type = NT_UNKNOWN; dest.parameter = 1; dest.status = org::genivi::am::am_NotificationStatus_e::NS_MAX; -- cgit v1.2.1