summaryrefslogtreecommitdiff
path: root/PluginCommandInterfaceCAPI/src
diff options
context:
space:
mode:
Diffstat (limited to 'PluginCommandInterfaceCAPI/src')
-rw-r--r--PluginCommandInterfaceCAPI/src/CAmCommandSenderCAPI.cpp60
-rw-r--r--PluginCommandInterfaceCAPI/src/CAmCommandSenderCommon.cpp105
-rw-r--r--PluginCommandInterfaceCAPI/src/CAmCommandSenderService.cpp76
3 files changed, 106 insertions, 135 deletions
diff --git a/PluginCommandInterfaceCAPI/src/CAmCommandSenderCAPI.cpp b/PluginCommandInterfaceCAPI/src/CAmCommandSenderCAPI.cpp
index 75414c2..e37f583 100644
--- a/PluginCommandInterfaceCAPI/src/CAmCommandSenderCAPI.cpp
+++ b/PluginCommandInterfaceCAPI/src/CAmCommandSenderCAPI.cpp
@@ -138,12 +138,13 @@ void CAmCommandSenderCAPI::setCommandRundown(const uint16_t handle)
mpIAmCommandReceive->confirmCommandRundown(handle,E_OK);
}
-void CAmCommandSenderCAPI::cbNewMainConnection(const am_MainConnectionType_s& )
+void CAmCommandSenderCAPI::cbNewMainConnection(const am_MainConnectionType_s& mainConnectionType)
{
RETURN_IF_NOT_READY()
assert((bool)mService);
log(&ctxCommandCAPI, DLT_LOG_INFO, "cbNumberOfMainConnectionsChanged called");
- mService->fireNumberOfMainConnectionsChangedEvent();
+ org::genivi::am::am_MainConnectionType_s mainConnection(mainConnectionType.mainConnectionID,mainConnectionType.sourceID,mainConnectionType.sinkID,mainConnectionType.delay,CAmConvert2CAPIType(mainConnectionType.connectionState));
+ mService->fireNewMainConnectionEvent(mainConnection);
}
void CAmCommandSenderCAPI::cbRemovedMainConnection(const am_mainConnectionID_t mainConnection)
@@ -151,7 +152,7 @@ void CAmCommandSenderCAPI::cbRemovedMainConnection(const am_mainConnectionID_t m
RETURN_IF_NOT_READY()
assert((bool)mService);
log(&ctxCommandCAPI, DLT_LOG_INFO, "cbNumberOfMainConnectionsChanged called");
- mService->fireNumberOfMainConnectionsChangedEvent();
+ mService->fireRemovedMainConnectionEvent(mainConnection);
}
void CAmCommandSenderCAPI::cbNewSink(const am_SinkType_s& sink)
@@ -159,10 +160,10 @@ void CAmCommandSenderCAPI::cbNewSink(const am_SinkType_s& sink)
RETURN_IF_NOT_READY()
assert((bool)mService);
log(&ctxCommandCAPI, DLT_LOG_INFO, "cbNewSink called");
- CommandInterface::am_Availability_s convAvailability;
+ org::genivi::am::am_Availability_s convAvailability;
CAmConvertAvailablility(sink.availability, convAvailability);
- CommandInterface::am_SinkType_s ciSink(sink.sinkID, sink.name, convAvailability, sink.volume, CAmConvert2CAPIType(sink.muteState), sink.sinkClassID);
- mService->fireSinkAddedEvent(ciSink);
+ org::genivi::am::am_SinkType_s ciSink(sink.sinkID, sink.name, convAvailability, sink.volume, CAmConvert2CAPIType(sink.muteState), sink.sinkClassID);
+ mService->fireNewSinkEvent(ciSink);
}
void CAmCommandSenderCAPI::cbRemovedSink(const am_sinkID_t sinkID)
@@ -170,7 +171,7 @@ void CAmCommandSenderCAPI::cbRemovedSink(const am_sinkID_t sinkID)
RETURN_IF_NOT_READY()
assert((bool)mService);
log(&ctxCommandCAPI, DLT_LOG_INFO, "cbRemovedSink called");
- mService->fireSinkRemovedEvent(sinkID);
+ mService->fireRemovedSinkEvent(sinkID);
}
void CAmCommandSenderCAPI::cbNewSource(const am_SourceType_s& source)
@@ -178,10 +179,10 @@ void CAmCommandSenderCAPI::cbNewSource(const am_SourceType_s& source)
RETURN_IF_NOT_READY()
assert((bool)mService);
log(&ctxCommandCAPI, DLT_LOG_INFO, "cbNewSource called");
- CommandInterface::am_Availability_s convAvailability;
+ org::genivi::am::am_Availability_s convAvailability;
CAmConvertAvailablility(source.availability, convAvailability);
- CommandInterface::am_SourceType_s ciSource(source.sourceID, source.name, convAvailability, source.sourceClassID);
- mService->fireSourceAddedEvent(ciSource);
+ org::genivi::am::am_SourceType_s ciSource(source.sourceID, source.name, convAvailability, source.sourceClassID);
+ mService->fireNewSourceEvent(ciSource);
}
void CAmCommandSenderCAPI::cbRemovedSource(const am_sourceID_t source)
@@ -189,7 +190,7 @@ void CAmCommandSenderCAPI::cbRemovedSource(const am_sourceID_t source)
RETURN_IF_NOT_READY()
assert((bool)mService);
log(&ctxCommandCAPI, DLT_LOG_INFO, "cbRemovedSource called");
- mService->fireSourceRemovedEvent(source);
+ mService->fireRemovedSourceEvent(source);
}
void CAmCommandSenderCAPI::cbNumberOfSinkClassesChanged()
@@ -213,8 +214,7 @@ void CAmCommandSenderCAPI::cbMainConnectionStateChanged(const am_mainConnectionI
RETURN_IF_NOT_READY()
assert((bool)mService);
log(&ctxCommandCAPI, DLT_LOG_INFO, "cbMainConnectionStateChanged called, connectionID=", connectionID, "connectionState=", connectionState);
- CommandInterface::am_mainConnectionID_t cID = connectionID;
- mService->fireMainConnectionStateChangedEvent(cID, CAmConvert2CAPIType(connectionState));
+ mService->fireMainConnectionStateChangedEvent(connectionID, CAmConvert2CAPIType(connectionState));
}
void CAmCommandSenderCAPI::cbMainSinkSoundPropertyChanged(const am_sinkID_t sinkID, const am_MainSoundProperty_s & soundProperty)
@@ -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);
- CommandInterface::am_MainSoundProperty_s mainSoundProp(CAmConvert2CAPIType(soundProperty.type), soundProperty.value);
+ org::genivi::am::am_MainSoundProperty_s mainSoundProp(CAmConvert2CAPIType(soundProperty.type), soundProperty.value);
mService->fireMainSinkSoundPropertyChangedEvent(sinkID, mainSoundProp);
}
@@ -231,7 +231,7 @@ void CAmCommandSenderCAPI::cbMainSourceSoundPropertyChanged(const am_sourceID_t
RETURN_IF_NOT_READY()
assert((bool)mService);
log(&ctxCommandCAPI, DLT_LOG_INFO, "cbMainSourceSoundPropertyChanged called, sourceID", sourceID, "SoundProperty.type", SoundProperty.type, "SoundProperty.value", SoundProperty.value);
- CommandInterface::am_MainSoundProperty_s convValue;
+ org::genivi::am::am_MainSoundProperty_s convValue;
CAmConvertMainSoundProperty(SoundProperty, convValue);
mService->fireMainSourceSoundPropertyChangedEvent(sourceID, convValue);
}
@@ -241,7 +241,7 @@ void CAmCommandSenderCAPI::cbSinkAvailabilityChanged(const am_sinkID_t sinkID, c
RETURN_IF_NOT_READY()
assert((bool)mService);
log(&ctxCommandCAPI, DLT_LOG_INFO, "cbSinkAvailabilityChanged called, sinkID", sinkID, "availability.availability", availability.availability, "SoundProperty.reason", availability.availabilityReason);
- CommandInterface::am_Availability_s convAvailability;
+ org::genivi::am::am_Availability_s convAvailability;
CAmConvertAvailablility(availability, convAvailability);
mService->fireSinkAvailabilityChangedEvent(sinkID, convAvailability);
}
@@ -251,7 +251,7 @@ void CAmCommandSenderCAPI::cbSourceAvailabilityChanged(const am_sourceID_t sourc
RETURN_IF_NOT_READY()
assert((bool)mService);
log(&ctxCommandCAPI, DLT_LOG_INFO, "cbSourceAvailabilityChanged called, sourceID", sourceID, "availability.availability", availability.availability, "SoundProperty.reason", availability.availabilityReason);
- CommandInterface::am_Availability_s convAvailability;
+ org::genivi::am::am_Availability_s convAvailability;
CAmConvertAvailablility(availability, convAvailability);
mService->fireSourceAvailabilityChangedEvent(sourceID, convAvailability);
}
@@ -269,7 +269,7 @@ void CAmCommandSenderCAPI::cbSinkMuteStateChanged(const am_sinkID_t sinkID, cons
RETURN_IF_NOT_READY()
assert((bool)mService);
log(&ctxCommandCAPI, DLT_LOG_INFO, "cbSinkMuteStateChanged called, sinkID", sinkID, "muteState", muteState);
- CommandInterface::am_MuteState_e ciMuteState = CAmConvert2CAPIType(muteState);
+ org::genivi::am::am_MuteState_e ciMuteState = CAmConvert2CAPIType(muteState);
mService->fireSinkMuteStateChangedEvent(sinkID, ciMuteState);
}
@@ -278,7 +278,7 @@ void CAmCommandSenderCAPI::cbSystemPropertyChanged(const am_SystemProperty_s & S
RETURN_IF_NOT_READY()
assert((bool)mService);
log(&ctxCommandCAPI, DLT_LOG_INFO, "cbSystemPropertyChanged called, SystemProperty.type", SystemProperty.type, "SystemProperty.value", SystemProperty.value);
- CommandInterface::am_SystemProperty_s convValue;
+ org::genivi::am::am_SystemProperty_s convValue;
CAmConvertSystemProperty(SystemProperty, convValue);
mService->fireSystemPropertyChangedEvent(convValue);
}
@@ -288,7 +288,7 @@ void CAmCommandSenderCAPI::cbTimingInformationChanged(const am_mainConnectionID_
RETURN_IF_NOT_READY()
assert((bool)mService);
log(&ctxCommandCAPI, DLT_LOG_INFO, "cbTimingInformationChanged called, mainConnectionID=", mainConnectionID, "time=", time);
- CommandInterface::am_mainConnectionID_t ciMainConnection = mainConnectionID;
+ org::genivi::am::am_mainConnectionID_t ciMainConnection = mainConnectionID;
mService->fireTimingInformationChangedEvent(ciMainConnection, time);
}
@@ -302,9 +302,9 @@ void CAmCommandSenderCAPI::cbSinkUpdated(const am_sinkID_t sinkID, const am_sink
RETURN_IF_NOT_READY()
assert((bool)mService);
log(&ctxCommandCAPI, DLT_LOG_INFO, "cbSinkUpdated called, sinkID", sinkID);
- CommandInterface::am_MainSoundProperty_l list;
+ org::genivi::am::am_MainSoundProperty_L list;
std::for_each(listMainSoundProperties.begin(), listMainSoundProperties.end(), [&](const am_MainSoundProperty_s & ref) {
- CommandInterface::am_MainSoundProperty_s prop(CAmConvert2CAPIType(ref.type), ref.value);
+ org::genivi::am::am_MainSoundProperty_s prop(CAmConvert2CAPIType(ref.type), ref.value);
list.push_back(prop);
});
mService->fireSinkUpdatedEvent(sinkID, sinkClassID, list);
@@ -315,9 +315,9 @@ void CAmCommandSenderCAPI::cbSourceUpdated(const am_sourceID_t sourceID, const a
RETURN_IF_NOT_READY()
assert((bool)mService);
log(&ctxCommandCAPI, DLT_LOG_INFO, "cbSourceUpdated called, sourceID", sourceID);
- CommandInterface::am_MainSoundProperty_l list;
+ org::genivi::am::am_MainSoundProperty_L list;
std::for_each(listMainSoundProperties.begin(), listMainSoundProperties.end(), [&](const am_MainSoundProperty_s & ref) {
- CommandInterface::am_MainSoundProperty_s prop(CAmConvert2CAPIType(ref.type), ref.value);
+ org::genivi::am::am_MainSoundProperty_s prop(CAmConvert2CAPIType(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);
- CommandInterface::am_NotificationPayload_s ciNnotif(CAmConvert2CAPIType(notification.type), notification.value);
+ org::genivi::am::am_NotificationPayload_s ciNnotif(static_cast<org::genivi::am::am_NotificationType_pe>(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);
- CommandInterface::am_NotificationPayload_s ciNnotif(CAmConvert2CAPIType(notification.type), notification.value);
+ org::genivi::am::am_NotificationPayload_s ciNnotif(static_cast<org::genivi::am::am_NotificationType_pe>(notification.type), notification.value);
mService->fireSourceNotificationEvent(sourceID, ciNnotif);
}
@@ -346,8 +346,8 @@ void CAmCommandSenderCAPI::cbMainSinkNotificationConfigurationChanged(const am_s
RETURN_IF_NOT_READY()
assert((bool)mService);
log(&ctxCommandCAPI, DLT_LOG_INFO, "cbSinkMainNotificationConfigurationChanged called, sinkID", sinkID);
- org::genivi::audiomanager::am::am_NotificationConfiguration_s ciNotifConfig(CAmConvert2CAPIType(mainNotificationConfiguration.type),
- CAmConvert2CAPIType(mainNotificationConfiguration.status),
+ org::genivi::am::am_NotificationConfiguration_s ciNotifConfig(static_cast<org::genivi::am::am_NotificationType_pe>(mainNotificationConfiguration.type),
+ static_cast<org::genivi::am::am_NotificationStatus_e>(mainNotificationConfiguration.status),
mainNotificationConfiguration.parameter);
mService->fireMainSinkNotificationConfigurationChangedEvent(sinkID, ciNotifConfig);
}
@@ -357,8 +357,8 @@ void CAmCommandSenderCAPI::cbMainSourceNotificationConfigurationChanged(const am
RETURN_IF_NOT_READY()
assert((bool)mService);
log(&ctxCommandCAPI, DLT_LOG_INFO, "cbSourceMainNotificationConfigurationChanged called, sourceID", sourceID);
- org::genivi::audiomanager::am::am_NotificationConfiguration_s ciNotifConfig(CAmConvert2CAPIType(mainNotificationConfiguration.type),
- CAmConvert2CAPIType(mainNotificationConfiguration.status),
+ org::genivi::am::am_NotificationConfiguration_s ciNotifConfig(static_cast<org::genivi::am::am_NotificationType_pe>(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 dca4f50..58816ce 100644
--- a/PluginCommandInterfaceCAPI/src/CAmCommandSenderCommon.cpp
+++ b/PluginCommandInterfaceCAPI/src/CAmCommandSenderCommon.cpp
@@ -21,139 +21,110 @@
/**
* Utility functions
*/
-void CAmConvertAvailablility(const am_Availability_s & amAavailability, CommandInterface::am_Availability_s & result)
+void CAmConvertAvailablility(const am_Availability_s & amAavailability, org::genivi::am::am_Availability_s & result)
{
result.availability = CAmConvert2CAPIType(amAavailability.availability);
result.availabilityReason = CAmConvert2CAPIType(amAavailability.availabilityReason);
}
-void CAmConvertMainSoundProperty(const am_MainSoundProperty_s & amMainSoundProperty, CommandInterface::am_MainSoundProperty_s & result)
+void CAmConvertMainSoundProperty(const am_MainSoundProperty_s & amMainSoundProperty, org::genivi::am::am_MainSoundProperty_s & result)
{
result.type = CAmConvert2CAPIType(amMainSoundProperty.type);
result.value = amMainSoundProperty.value;
}
-void CAmConvertSystemProperty(const am_SystemProperty_s & amSystemProperty, CommandInterface::am_SystemProperty_s & result)
+void CAmConvertSystemProperty(const am_SystemProperty_s & amSystemProperty, org::genivi::am::am_SystemProperty_s & result)
{
result.type = CAmConvert2CAPIType(amSystemProperty.type);
result.value = amSystemProperty.value;
}
-CommandInterface::am_ClassProperty_e CAmConvert2CAPIType(const am_ClassProperty_e & property)
+org::genivi::am::am_ClassProperty_pe CAmConvert2CAPIType(const am_ClassProperty_e & property)
{
- return CP_MAX==property?
- CommandInterface::am_ClassProperty_e::CP_MAX
- :
- static_cast<CommandInterface::am_ClassProperty_e>(property);
+ return static_cast<org::genivi::am::am_ClassProperty_pe>(property);
}
-CommandInterface::am_SystemPropertyType_e CAmConvert2CAPIType(const am_SystemPropertyType_e & property)
+org::genivi::am::am_SystemPropertyType_pe CAmConvert2CAPIType(const am_SystemPropertyType_e & property)
{
- return SYP_MAX==property?
- CommandInterface::am_SystemPropertyType_e::SYP_MAX
- :
- static_cast<CommandInterface::am_SystemPropertyType_e>(property);
+ return static_cast<org::genivi::am::am_SystemPropertyType_pe>(property);
}
-CommandInterface::am_Availablility_e CAmConvert2CAPIType(const am_Availability_e & availability)
+org::genivi::am::am_Availability_e CAmConvert2CAPIType(const am_Availability_e & availability)
{
- return (A_MAX==availability)?CommandInterface::am_Availablility_e::A_MAX
+ return (A_MAX==availability)?org::genivi::am::am_Availability_e::A_MAX
:
- static_cast<CommandInterface::am_Availablility_e>(availability);
+ static_cast<org::genivi::am::am_Availability_e>(availability);
}
-CommandInterface::am_AvailabilityReason_e CAmConvert2CAPIType(const am_AvailabilityReason_e & availabilityReason)
+org::genivi::am::am_AvailabilityReason_pe CAmConvert2CAPIType(const am_AvailabilityReason_e & availabilityReason)
{
- return (AR_MAX==availabilityReason)?CommandInterface::am_AvailabilityReason_e::AR_MAX
- :
- static_cast<CommandInterface::am_AvailabilityReason_e>(availabilityReason);
+ return static_cast<org::genivi::am::am_AvailabilityReason_pe>(availabilityReason);
}
-CommandInterface::am_MuteState_e CAmConvert2CAPIType(const am_MuteState_e & muteState)
+org::genivi::am::am_MuteState_e CAmConvert2CAPIType(const am_MuteState_e & muteState)
{
return MS_MAX==muteState?
- CommandInterface::am_MuteState_e::MS_MAX
+ org::genivi::am::am_MuteState_e::MS_MAX
:
- static_cast<CommandInterface::am_MuteState_e>(muteState);
+ static_cast<org::genivi::am::am_MuteState_e>(muteState);
}
-am_MuteState_e CAmConvertFromCAPIType(const CommandInterface::am_MuteState_e & muteState)
+am_MuteState_e CAmConvertFromCAPIType(const org::genivi::am::am_MuteState_e & muteState)
{
- return CommandInterface::am_MuteState_e::MS_MAX==muteState?
+ return org::genivi::am::am_MuteState_e::MS_MAX==muteState?
MS_MAX:static_cast<am_MuteState_e>(muteState);
}
-CommandInterface::am_MainSoundPropertyType_e CAmConvert2CAPIType(const am_MainSoundPropertyType_e & type)
+org::genivi::am::am_MainSoundPropertyType_pe CAmConvert2CAPIType(const am_MainSoundPropertyType_e & type)
{
- return MSP_MAX==type?
- CommandInterface::am_MainSoundPropertyType_e::MSP_MAX
- :
- static_cast<CommandInterface::am_MainSoundPropertyType_e>(type);
+ return static_cast<org::genivi::am::am_MainSoundPropertyType_pe>(type);
}
-am_MainSoundPropertyType_e CAmConvertFromCAPIType(const CommandInterface::am_MainSoundPropertyType_e & type)
+am_MainSoundPropertyType_e CAmConvertFromCAPIType(const org::genivi::am::am_MainSoundPropertyType_pe & type)
{
- return CommandInterface::am_MainSoundPropertyType_e::MSP_MAX==type?
- MSP_MAX:static_cast<am_MainSoundPropertyType_e>(type);
+ return static_cast<am_MainSoundPropertyType_e>(type);
}
-
-
-CommandInterface::am_ConnectionState_e CAmConvert2CAPIType(const am_ConnectionState_e & connectionState)
+org::genivi::am::am_ConnectionState_e CAmConvert2CAPIType(const am_ConnectionState_e & connectionState)
{
return CS_MAX==connectionState?
- CommandInterface::am_ConnectionState_e::CS_MAX
+ org::genivi::am::am_ConnectionState_e::CS_MAX
:
- static_cast<CommandInterface::am_ConnectionState_e>(connectionState);
+ static_cast<org::genivi::am::am_ConnectionState_e>(connectionState);
}
-am_ConnectionState_e CAmConvertFromCAPIType(const CommandInterface::am_ConnectionState_e & connectionState)
+am_ConnectionState_e CAmConvertFromCAPIType(const org::genivi::am::am_ConnectionState_e & connectionState)
{
- return CommandInterface::am_ConnectionState_e::CS_MAX==connectionState?
+ return org::genivi::am::am_ConnectionState_e::CS_MAX==connectionState?
CS_MAX:static_cast<am_ConnectionState_e>(connectionState);
}
-org::genivi::audiomanager::am::am_NotificationType_e CAmConvert2CAPIType(const am_NotificationType_e & notificationType)
-{
- return NT_MAX==notificationType?
- org::genivi::audiomanager::am::am_NotificationType_e::NT_MAX
- :
- static_cast<org::genivi::audiomanager::am::am_NotificationType_e>(notificationType);
-}
-am_NotificationType_e CAmConvertFromCAPIType(const org::genivi::audiomanager::am::am_NotificationType_e & notificationType)
+org::genivi::am::am_NotificationType_pe CAmConvert2CAPIType(const am_NotificationType_e & notificationType)
{
- return org::genivi::audiomanager::am::am_NotificationType_e::NT_MAX==notificationType?
- NT_MAX:static_cast<am_NotificationType_e>(notificationType);
+ return static_cast<org::genivi::am::am_NotificationType_pe>(notificationType);
}
-org::genivi::audiomanager::am::am_NotificationStatus_e CAmConvert2CAPIType(const am_NotificationStatus_e & notificationStatus)
+org::genivi::am::am_NotificationStatus_e CAmConvert2CAPIType(const am_NotificationStatus_e & notificationStatus)
{
return NS_MAX==notificationStatus?
- org::genivi::audiomanager::am::am_NotificationStatus_e::NS_MAX
+ org::genivi::am::am_NotificationStatus_e::NS_MAX
:
- static_cast<org::genivi::audiomanager::am::am_NotificationStatus_e>(notificationStatus);
+ static_cast<org::genivi::am::am_NotificationStatus_e>(notificationStatus);
}
-am_NotificationStatus_e CAmConvertFromCAPIType(const org::genivi::audiomanager::am::am_NotificationStatus_e & notificationStatus)
+am_NotificationStatus_e CAmConvertFromCAPIType(const org::genivi::am::am_NotificationStatus_e & notificationStatus)
{
- return org::genivi::audiomanager::am::am_NotificationStatus_e::NS_MAX==notificationStatus?
+ return org::genivi::am::am_NotificationStatus_e::NS_MAX==notificationStatus?
NS_MAX:static_cast<am_NotificationStatus_e>(notificationStatus);
}
-CommandInterface::am_Error_e CAmConvert2CAPIType(const am_Error_e & error)
+org::genivi::am::am_Error_e CAmConvert2CAPIType(const am_Error_e & error)
{
return E_MAX==error?
- CommandInterface::am_Error_e::E_MAX
+ org::genivi::am::am_Error_e::E_MAX
:
- static_cast<CommandInterface::am_Error_e>(error);
+ static_cast<org::genivi::am::am_Error_e>(error);
}
-am_Error_e CAmConvertFromCAPIType(const CommandInterface::am_Error_e & error)
+am_Error_e CAmConvertFromCAPIType(const org::genivi::am::am_Error_e & error)
{
- return CommandInterface::am_Error_e::E_MAX==error?
+ return org::genivi::am::am_Error_e::E_MAX==error?
E_MAX:static_cast<am_Error_e>(error);
}
-
-am_SystemPropertyType_e CAmConvertFromCAPIType(const CommandInterface::am_SystemPropertyType_e & propType)
-{
- return CommandInterface::am_SystemPropertyType_e::SYP_MAX==propType?
- SYP_MAX:static_cast<am_SystemPropertyType_e>(propType);
-}
-
diff --git a/PluginCommandInterfaceCAPI/src/CAmCommandSenderService.cpp b/PluginCommandInterfaceCAPI/src/CAmCommandSenderService.cpp
index 4d463d2..e9f7f9a 100644
--- a/PluginCommandInterfaceCAPI/src/CAmCommandSenderService.cpp
+++ b/PluginCommandInterfaceCAPI/src/CAmCommandSenderService.cpp
@@ -37,57 +37,57 @@ CAmCommandSenderService::~CAmCommandSenderService() {
// TODO Auto-generated destructor stub
}
-void CAmCommandSenderService::Connect(CommandInterface::am_sourceID_t sourceID, CommandInterface::am_sinkID_t sinkID, CommandInterface::am_Error_e& result, CommandInterface::am_mainConnectionID_t& mainConnectionID) {
+void CAmCommandSenderService::connect(org::genivi::am::am_sourceID_t sourceID, org::genivi::am::am_sinkID_t sinkID, org::genivi::am::am_mainConnectionID_t& mainConnectionID,org::genivi::am::am_Error_e& result) {
assert(mpIAmCommandReceive);
result = CAmConvert2CAPIType(mpIAmCommandReceive->connect(sourceID, sinkID, mainConnectionID));
}
-void CAmCommandSenderService::Disconnect(CommandInterface::am_mainConnectionID_t mainConnectionID, CommandInterface::am_Error_e& result) {
+void CAmCommandSenderService::disconnect(org::genivi::am::am_mainConnectionID_t mainConnectionID, org::genivi::am::am_Error_e& result) {
assert(mpIAmCommandReceive);
result = CAmConvert2CAPIType(mpIAmCommandReceive->disconnect(mainConnectionID));
}
-void CAmCommandSenderService::SetVolume(CommandInterface::am_sinkID_t sinkID, CommandInterface::am_mainVolume_t volume, CommandInterface::am_Error_e& result) {
+void CAmCommandSenderService::setVolume(org::genivi::am::am_sinkID_t sinkID, org::genivi::am::am_mainVolume_t volume, org::genivi::am::am_Error_e& result) {
assert(mpIAmCommandReceive);
result = CAmConvert2CAPIType(mpIAmCommandReceive->setVolume(sinkID, volume));
}
-void CAmCommandSenderService::VolumeStep(CommandInterface::am_sinkID_t sinkID, CommandInterface::am_mainVolume_t volumeStep, CommandInterface::am_Error_e& result) {
+void CAmCommandSenderService::volumeStep(org::genivi::am::am_sinkID_t sinkID, org::genivi::am::am_mainVolume_t volumeStep, org::genivi::am::am_Error_e& result) {
assert(mpIAmCommandReceive);
result = CAmConvert2CAPIType(mpIAmCommandReceive->volumeStep(sinkID, volumeStep));
}
-void CAmCommandSenderService::SetSinkMuteState(CommandInterface::am_sinkID_t sinkID, CommandInterface::am_MuteState_e muteState, CommandInterface::am_Error_e& result) {
+void CAmCommandSenderService::setSinkMuteState(org::genivi::am::am_sinkID_t sinkID, org::genivi::am::am_MuteState_e muteState, org::genivi::am::am_Error_e& result) {
assert(mpIAmCommandReceive);
result = CAmConvert2CAPIType(mpIAmCommandReceive->setSinkMuteState(sinkID, CAmConvertFromCAPIType(muteState)));
}
-void CAmCommandSenderService::SetMainSinkSoundProperty(CommandInterface::am_sinkID_t sinkID, CommandInterface::am_MainSoundProperty_s soundProperty, CommandInterface::am_Error_e& result) {
+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 = {CAmConvertFromCAPIType(soundProperty.type), soundProperty.value};
+ am_MainSoundProperty_s property = {static_cast<am_MainSoundPropertyType_e>(soundProperty.type), soundProperty.value};
result = CAmConvert2CAPIType(mpIAmCommandReceive->setMainSinkSoundProperty(property, sinkID));
}
-void CAmCommandSenderService::SetMainSourceSoundProperty(CommandInterface::am_sourceID_t sourceID, CommandInterface::am_MainSoundProperty_s soundProperty, CommandInterface::am_Error_e& result) {
+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 = {CAmConvertFromCAPIType(soundProperty.type), soundProperty.value};
+ am_MainSoundProperty_s property = {static_cast<am_MainSoundPropertyType_e>(soundProperty.type), soundProperty.value};
result = CAmConvert2CAPIType(mpIAmCommandReceive->setMainSourceSoundProperty(property, sourceID));
}
-void CAmCommandSenderService::SetSystemProperty(CommandInterface::am_SystemProperty_s soundProperty, CommandInterface::am_Error_e& result) {
+void CAmCommandSenderService::setSystemProperty(org::genivi::am::am_SystemProperty_s soundProperty, org::genivi::am::am_Error_e& result) {
assert(mpIAmCommandReceive);
- am_SystemProperty_s property = {CAmConvertFromCAPIType(soundProperty.type), soundProperty.value};
+ am_SystemProperty_s property = {static_cast<am_SystemPropertyType_e>(soundProperty.type), soundProperty.value};
result = CAmConvert2CAPIType(mpIAmCommandReceive->setSystemProperty(property));
}
-void CAmCommandSenderService::GetListMainConnections(CommandInterface::am_Error_e& result, CommandInterface::am_MainConnectionType_l& listConnections) {
+void CAmCommandSenderService::getListMainConnections(org::genivi::am::am_Error_e& result, org::genivi::am::am_MainConnection_L& listConnections) {
assert(mpIAmCommandReceive);
std::vector<am_MainConnectionType_s> list;
result = CAmConvert2CAPIType(mpIAmCommandReceive->getListMainConnections(list));
- if(result==CommandInterface::am_Error_e::E_OK)
+ if(result==org::genivi::am::am_Error_e::E_OK)
{
- CommandInterface::am_MainConnectionType_s item;
+ org::genivi::am::am_MainConnectionType_s item;
for(std::vector<am_MainConnectionType_s>::const_iterator iter = list.begin(); iter!=list.end(); iter++)
{
item.mainConnectionID = iter->mainConnectionID;
@@ -100,13 +100,13 @@ void CAmCommandSenderService::GetListMainConnections(CommandInterface::am_Error_
}
}
-void CAmCommandSenderService::GetListMainSinks(CommandInterface::am_Error_e& result, CommandInterface::am_SinkType_l& listMainSinks) {
+void CAmCommandSenderService::getListMainSinks(org::genivi::am::am_SinkType_L& listMainSinks,org::genivi::am::am_Error_e& result) {
assert(mpIAmCommandReceive);
std::vector<am_SinkType_s> list;
result = CAmConvert2CAPIType(mpIAmCommandReceive->getListMainSinks(list));
- if(result==CommandInterface::am_Error_e::E_OK)
+ if(result==org::genivi::am::am_Error_e::E_OK)
{
- CommandInterface::am_SinkType_s item;
+ org::genivi::am::am_SinkType_s item;
for(std::vector<am_SinkType_s>::const_iterator iter = list.begin(); iter!=list.end(); iter++)
{
item.sinkID = iter->sinkID;
@@ -120,13 +120,13 @@ void CAmCommandSenderService::GetListMainSinks(CommandInterface::am_Error_e& res
}
}
-void CAmCommandSenderService::GetListMainSources(CommandInterface::am_Error_e& result, CommandInterface::am_SourceType_l& listMainSources) {
+void CAmCommandSenderService::getListMainSources(org::genivi::am::am_SourceType_L& listMainSources,org::genivi::am::am_Error_e& result) {
assert(mpIAmCommandReceive);
std::vector<am_SourceType_s> list;
result = CAmConvert2CAPIType(mpIAmCommandReceive->getListMainSources(list));
- if(result==CommandInterface::am_Error_e::E_OK)
+ if(result==org::genivi::am::am_Error_e::E_OK)
{
- CommandInterface::am_SourceType_s item;
+ org::genivi::am::am_SourceType_s item;
for(std::vector<am_SourceType_s>::const_iterator iter = list.begin(); iter!=list.end(); iter++)
{
item.sourceID = iter->sourceID;
@@ -138,13 +138,13 @@ void CAmCommandSenderService::GetListMainSources(CommandInterface::am_Error_e& r
}
}
-void CAmCommandSenderService::GetListMainSinkSoundProperties(CommandInterface::am_sinkID_t sinkID, CommandInterface::am_Error_e& result, CommandInterface::am_MainSoundProperty_l& listSoundProperties) {
+void CAmCommandSenderService::getListMainSinkSoundProperties(org::genivi::am::am_sinkID_t sinkID, org::genivi::am::am_MainSoundProperty_L& listSoundProperties,org::genivi::am::am_Error_e& result) {
assert(mpIAmCommandReceive);
std::vector<am_MainSoundProperty_s> list;
result = CAmConvert2CAPIType(mpIAmCommandReceive->getListMainSinkSoundProperties(sinkID, list));
- if(result==CommandInterface::am_Error_e::E_OK)
+ if(result==org::genivi::am::am_Error_e::E_OK)
{
- CommandInterface::am_MainSoundProperty_s item;
+ 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);
@@ -154,13 +154,13 @@ void CAmCommandSenderService::GetListMainSinkSoundProperties(CommandInterface::a
}
}
-void CAmCommandSenderService::GetListMainSourceSoundProperties(CommandInterface::am_sourceID_t sourceID, CommandInterface::am_Error_e& result, CommandInterface::am_MainSoundProperty_l& listSourceProperties) {
+void CAmCommandSenderService::getListMainSourceSoundProperties(org::genivi::am::am_sourceID_t sourceID, org::genivi::am::am_MainSoundProperty_L& listSourceProperties,org::genivi::am::am_Error_e& result) {
assert(mpIAmCommandReceive);
std::vector<am_MainSoundProperty_s> list;
result = CAmConvert2CAPIType(mpIAmCommandReceive->getListMainSourceSoundProperties(sourceID, list));
- if(result==CommandInterface::am_Error_e::E_OK)
+ if(result==org::genivi::am::am_Error_e::E_OK)
{
- CommandInterface::am_MainSoundProperty_s item;
+ 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);
@@ -170,20 +170,20 @@ void CAmCommandSenderService::GetListMainSourceSoundProperties(CommandInterface:
}
}
-void CAmCommandSenderService::GetListSourceClasses(CommandInterface::am_Error_e& result, CommandInterface::am_SourceClass_l& listSourceClasses) {
+void CAmCommandSenderService::getListSourceClasses(org::genivi::am::am_SourceClass_L& listSourceClasses,org::genivi::am::am_Error_e& result) {
assert(mpIAmCommandReceive);
std::vector<am_SourceClass_s> list;
result = CAmConvert2CAPIType(mpIAmCommandReceive->getListSourceClasses(list));
- if(result==CommandInterface::am_Error_e::E_OK)
+ if(result==org::genivi::am::am_Error_e::E_OK)
{
- CommandInterface::am_SourceClass_s item;
+ org::genivi::am::am_SourceClass_s item;
for(std::vector<am_SourceClass_s>::const_iterator iter = list.begin(); iter!=list.end(); iter++)
{
item.sourceClassID = iter->sourceClassID;
item.name = iter->name;
item.listClassProperties.clear();
std::for_each(iter->listClassProperties.begin(), iter->listClassProperties.end(), [&](const am_ClassProperty_s & ref) {
- CommandInterface::am_ClassProperty_s classProp(CAmConvert2CAPIType(ref.classProperty), ref.value);
+ org::genivi::am::am_ClassProperty_s classProp(CAmConvert2CAPIType(ref.classProperty), ref.value);
item.listClassProperties.push_back(classProp);
});
listSourceClasses.push_back (item);
@@ -191,20 +191,20 @@ void CAmCommandSenderService::GetListSourceClasses(CommandInterface::am_Error_e&
}
}
-void CAmCommandSenderService::GetListSinkClasses(CommandInterface::am_Error_e& result, CommandInterface::am_SinkClass_l& listSinkClasses) {
+void CAmCommandSenderService::getListSinkClasses(org::genivi::am::am_SinkClass_L& listSinkClasses,org::genivi::am::am_Error_e& result) {
assert(mpIAmCommandReceive);
std::vector<am_SinkClass_s> list;
result = CAmConvert2CAPIType(mpIAmCommandReceive->getListSinkClasses(list));
- if(result==CommandInterface::am_Error_e::E_OK)
+ if(result==org::genivi::am::am_Error_e::E_OK)
{
- CommandInterface::am_SinkClass_s item;
+ org::genivi::am::am_SinkClass_s item;
for(std::vector<am_SinkClass_s>::const_iterator iter = list.begin(); iter!=list.end(); iter++)
{
item.sinkClassID = iter->sinkClassID;
item.name = iter->name;
item.listClassProperties.clear();
std::for_each(iter->listClassProperties.begin(), iter->listClassProperties.end(), [&](const am_ClassProperty_s & ref) {
- CommandInterface::am_ClassProperty_s classProp(CAmConvert2CAPIType(ref.classProperty), ref.value);
+ org::genivi::am::am_ClassProperty_s classProp(CAmConvert2CAPIType(ref.classProperty), ref.value);
item.listClassProperties.push_back(classProp);
});
listSinkClasses.push_back (item);
@@ -212,13 +212,13 @@ void CAmCommandSenderService::GetListSinkClasses(CommandInterface::am_Error_e& r
}
}
-void CAmCommandSenderService::GetListSystemProperties(CommandInterface::am_Error_e& result, CommandInterface::am_SystemProperty_l& listSystemProperties) {
+void CAmCommandSenderService::getListSystemProperties(org::genivi::am::am_SystemProperty_L& listSystemProperties,org::genivi::am::am_Error_e& result) {
assert(mpIAmCommandReceive);
std::vector<am_SystemProperty_s> list;
result = CAmConvert2CAPIType(mpIAmCommandReceive->getListSystemProperties(list));
- if(result==CommandInterface::am_Error_e::E_OK)
+ if(result==org::genivi::am::am_Error_e::E_OK)
{
- CommandInterface::am_SystemProperty_s item;
+ 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);
@@ -228,7 +228,7 @@ void CAmCommandSenderService::GetListSystemProperties(CommandInterface::am_Error
}
}
-void CAmCommandSenderService::GetTimingInformation(CommandInterface::am_mainConnectionID_t mainConnectionID, CommandInterface::am_Error_e& result, CommandInterface::am_timeSync_t& delay) {
+void CAmCommandSenderService::getTimingInformation(org::genivi::am::am_mainConnectionID_t mainConnectionID, org::genivi::am::am_timeSync_t& delay,org::genivi::am::am_Error_e& result) {
assert(mpIAmCommandReceive);
result = CAmConvert2CAPIType(mpIAmCommandReceive->getTimingInformation(mainConnectionID, delay));
}