diff options
author | christian linke <christian.linke@bmw.de> | 2013-01-11 13:09:26 +0100 |
---|---|---|
committer | christian linke <christian.linke@bmw.de> | 2013-01-11 13:09:26 +0100 |
commit | 0269a33680a25e5d682761e8af434611cb28d00c (patch) | |
tree | 75d9373329f35502ac2272b6d5d37d1aea1f392b /AudioManagerDaemon/test/CAmCommonFunctions.cpp | |
parent | 1c3e5d99546d0c2d803d50411168d0d887365399 (diff) | |
download | audiomanager-0269a33680a25e5d682761e8af434611cb28d00c.tar.gz |
* add support to switch dedicated plugins off, fix databasehandler regarding getSourceInfo and getSinkInfo, add and fix tests for database
Signed-off-by: christian linke <christian.linke@bmw.de>
Diffstat (limited to 'AudioManagerDaemon/test/CAmCommonFunctions.cpp')
-rw-r--r-- | AudioManagerDaemon/test/CAmCommonFunctions.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/AudioManagerDaemon/test/CAmCommonFunctions.cpp b/AudioManagerDaemon/test/CAmCommonFunctions.cpp index b11c3a2..c1f1af4 100644 --- a/AudioManagerDaemon/test/CAmCommonFunctions.cpp +++ b/AudioManagerDaemon/test/CAmCommonFunctions.cpp @@ -109,6 +109,11 @@ bool equalMainSoundProperty(const am_MainSoundProperty_s a, const am_MainSoundPr return (a.type == b.type && a.value == b.value); } +bool equalNotificationConfiguration(const am_NotificationConfiguration_s a, const am_NotificationConfiguration_s b) +{ + return (a.notificationParameter == b.notificationParameter && a.notificationStatus == b.notificationStatus && a.notificationType == b.notificationType); +} + bool equalRoutingElement(const am_RoutingElement_s a, const am_RoutingElement_s b) { return (a.connectionFormat == b.connectionFormat && a.domainID == b.domainID && a.sinkID == b.sinkID && a.sourceID == b.sourceID); @@ -235,6 +240,8 @@ void CAmCommonFunctions::createSink(am_Sink_s& sink) const sink.listConnectionFormats = getStandardConnectionFormatList(); sink.listSoundProperties = getStandardSoundPropertyList(); sink.listMainSoundProperties = getStandardMainSoundPropertyList(); + sink.listNotificationConfigurations = getStandardNotificationConfigurationList(); + sink.listMainNotificationConfigurations = getStandardNotificationConfigurationList(); sink.mainVolume = 12; sink.muteState = MS_UNMUTED; sink.visible = true; @@ -252,6 +259,8 @@ void CAmCommonFunctions::createSource(am_Source_s& source) const source.listConnectionFormats = getStandardConnectionFormatList(); source.listSoundProperties = getStandardSoundPropertyList(); source.listMainSoundProperties = getStandardMainSoundPropertyList(); + source.listMainNotificationConfigurations=getStandardNotificationConfigurationList(); + source.listNotificationConfigurations=getStandardNotificationConfigurationList(); source.interruptState = IS_OFF; source.visible = true; source.volume = 23; @@ -307,6 +316,23 @@ std::vector<bool> CAmCommonFunctions::getStandardConvertionMatrix() return convMatrix; } +std::vector<am_NotificationConfiguration_s> am::CAmCommonFunctions::getStandardNotificationConfigurationList() +{ + std::vector<am_NotificationConfiguration_s> listNotificationConfigurations; + am_NotificationConfiguration_s tempNotificationConfiguration; + tempNotificationConfiguration.notificationParameter=12; + tempNotificationConfiguration.notificationStatus=NS_PERIODIC; + tempNotificationConfiguration.notificationType=NT_MAX; + listNotificationConfigurations.push_back(tempNotificationConfiguration); + + tempNotificationConfiguration.notificationParameter=16; + tempNotificationConfiguration.notificationStatus=NS_CHANGE; + tempNotificationConfiguration.notificationType=NT_UNKNOWN; + listNotificationConfigurations.push_back(tempNotificationConfiguration); + + return (listNotificationConfigurations); +} + void CAmCommonFunctions::connectionList2RoutingList(std::vector<am_RoutingElement_s> & routingList, const std::vector<am_Connection_s>& connectionList) { am_RoutingElement_s routingElement; |