diff options
author | Jens Lorenz <jlorenz@de.adit-jv.com> | 2014-06-11 18:14:58 +0200 |
---|---|---|
committer | Christian Linke <christian.linke@bmw.de> | 2014-06-23 14:05:37 +0200 |
commit | 20491c0f31d70e254c56f171c69b95f3d4ad2813 (patch) | |
tree | 5409ce980ecf4285a21cf0f1b38ba19dafe3129a /PluginCommandInterfaceCAPI/src | |
parent | b0bc6ede2d23dde9a177483aa9470871422fe9aa (diff) | |
download | audiomanager-20491c0f31d70e254c56f171c69b95f3d4ad2813.tar.gz |
* Bug #100 - removed projecttypes.h which causes compiling conflicts5.1
Signed-off-by: Jens Lorenz <jlorenz@de.adit-jv.com>
Diffstat (limited to 'PluginCommandInterfaceCAPI/src')
3 files changed, 20 insertions, 49 deletions
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<org::genivi::am::am_NotificationType_pe>(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<org::genivi::am::am_NotificationType_pe>(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<org::genivi::am::am_NotificationType_pe>(mainNotificationConfiguration.type), + org::genivi::am::am_NotificationConfiguration_s ciNotifConfig(mainNotificationConfiguration.type, static_cast<org::genivi::am::am_NotificationStatus_e>(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<org::genivi::am::am_NotificationType_pe>(mainNotificationConfiguration.type), + org::genivi::am::am_NotificationConfiguration_s ciNotifConfig(mainNotificationConfiguration.type, static_cast<org::genivi::am::am_NotificationStatus_e>(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<org::genivi::am::am_ClassProperty_pe>(property); -} - -org::genivi::am::am_SystemPropertyType_pe CAmConvert2CAPIType(const am_SystemPropertyType_e & property) -{ - return static_cast<org::genivi::am::am_SystemPropertyType_pe>(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<org::genivi::am::am_Availability_e>(availability); } -org::genivi::am::am_AvailabilityReason_pe CAmConvert2CAPIType(const am_AvailabilityReason_e & availabilityReason) -{ - return static_cast<org::genivi::am::am_AvailabilityReason_pe>(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<am_MuteState_e>(muteState); } -org::genivi::am::am_MainSoundPropertyType_pe CAmConvert2CAPIType(const am_MainSoundPropertyType_e & type) -{ - return static_cast<org::genivi::am::am_MainSoundPropertyType_pe>(type); -} -am_MainSoundPropertyType_e CAmConvertFromCAPIType(const org::genivi::am::am_MainSoundPropertyType_pe & type) -{ - return static_cast<am_MainSoundPropertyType_e>(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<am_ConnectionState_e>(connectionState); } -org::genivi::am::am_NotificationType_pe CAmConvert2CAPIType(const am_NotificationType_e & notificationType) -{ - return static_cast<org::genivi::am::am_NotificationType_pe>(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<am_MainSoundPropertyType_e>(soundProperty.type), soundProperty.value}; + am_MainSoundProperty_s property = {static_cast<am_CustomMainSoundPropertyType_t>(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<am_MainSoundPropertyType_e>(soundProperty.type), soundProperty.value}; + am_MainSoundProperty_s property = {static_cast<am_CustomMainSoundPropertyType_t>(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<am_SystemPropertyType_e>(soundProperty.type), soundProperty.value}; + am_SystemProperty_s property = {static_cast<am_CustomSystemPropertyType_t>(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<am_MainSoundProperty_s>::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<am_MainSoundProperty_s>::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<am_SystemProperty_s>::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); } |