2 * Copyright (C) 2012 - 2014, BMW AG
4 * This file is part of GENIVI Project AudioManager.
\r
6 * Contributions are licensed to the GENIVI Alliance under one or more
\r
7 * Contribution License Agreements.
\r
10 * This Source Code Form is subject to the terms of the
\r
11 * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
\r
12 * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
\r
15 * \author Christian Linke, christian.linke@bmw.de BMW 2011 - 2014
18 * For further information see http://projects.genivi.org/audio-manager
20 * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL.
21 * PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN.
23 #if !defined(EA_FA7CC74B_CBCB_4356_89AE_B7F88A8CEC7F__INCLUDED_)
24 #define EA_FA7CC74B_CBCB_4356_89AE_B7F88A8CEC7F__INCLUDED_
28 #include "audiomanagertypes.h"
\r
30 class CAmDbusWrapper;
\r
31 class CAmSocketHandler;
\r
35 #include "audiomanagertypes.h"
37 #define CommandReceiveVersion "2.0"
41 * The interface towards the Controlling Instance (e.g HMI). It handles the
42 * communication towards the HMI and other system components who need to interact
43 * with the audiomanagement.
44 * There are two rules that have to be kept in mind when implementing against this
47 * 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
48 * 2. YOU MAY NOT CALL THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS
49 * CALL THAT EXPECTS A RETURN VALUE.\n
51 * Violation these rules may lead to unexpected behavior! Nevertheless you can
52 * implement thread safe by using the deferred-call pattern described on the wiki
53 * which also helps to implement calls that are forbidden.\n
54 * For more information, please check CAmSerializer
56 class IAmCommandReceive
64 virtual ~IAmCommandReceive() {
68 virtual void getInterfaceVersion(std::string& version) const =0;
69 virtual am_Error_e connect(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID) =0;
70 virtual am_Error_e disconnect(const am_mainConnectionID_t mainConnectionID) =0;
71 virtual am_Error_e setVolume(const am_sinkID_t sinkID, const am_mainVolume_t volume) =0;
72 virtual am_Error_e volumeStep(const am_sinkID_t sinkID, const int16_t volumeStep) =0;
73 virtual am_Error_e setSinkMuteState(const am_sinkID_t sinkID, const am_MuteState_e muteState) =0;
74 virtual am_Error_e setMainSinkSoundProperty(const am_MainSoundProperty_s& soundProperty, const am_sinkID_t sinkID) =0;
75 virtual am_Error_e setMainSourceSoundProperty(const am_MainSoundProperty_s& soundProperty, const am_sourceID_t sourceID) =0;
76 virtual am_Error_e setSystemProperty(const am_SystemProperty_s& property) =0;
77 virtual am_Error_e getListMainConnections(std::vector<am_MainConnectionType_s>& listConnections) const =0;
78 virtual am_Error_e getListMainSinks(std::vector<am_SinkType_s>& listMainSinks) const =0;
79 virtual am_Error_e getListMainSources(std::vector<am_SourceType_s>& listMainSources) const =0;
80 virtual am_Error_e getListMainSinkSoundProperties(const am_sinkID_t sinkID, std::vector<am_MainSoundProperty_s>& listSoundProperties) const =0;
81 virtual am_Error_e getListMainSourceSoundProperties(const am_sourceID_t sourceID, std::vector<am_MainSoundProperty_s>& listSourceProperties) const =0;
82 virtual am_Error_e getListSourceClasses(std::vector<am_SourceClass_s>& listSourceClasses) const =0;
83 virtual am_Error_e getListSinkClasses(std::vector<am_SinkClass_s>& listSinkClasses) const =0;
84 virtual am_Error_e getListSystemProperties(std::vector<am_SystemProperty_s>& listSystemProperties) const =0;
85 virtual am_Error_e getTimingInformation(const am_mainConnectionID_t mainConnectionID, am_timeSync_t& delay) const =0;
86 virtual am_Error_e getDBusConnectionWrapper(CAmDbusWrapper*& dbusConnectionWrapper) const =0;
87 virtual am_Error_e getSocketHandler(CAmSocketHandler*& socketHandler) const =0;
88 virtual void confirmCommandReady(const uint16_t handle, const am_Error_e error) =0;
89 virtual void confirmCommandRundown(const uint16_t handle, const am_Error_e error) =0;
90 virtual am_Error_e getListMainSinkNotificationConfigurations(const am_sinkID_t sinkID, std::vector<am_NotificationConfiguration_s>& listMainNotificationConfigurations) const =0;
91 virtual am_Error_e getListMainSourceNotificationConfigurations(const am_sourceID_t sourceID, std::vector<am_NotificationConfiguration_s>& listMainNotificationConfigurations) const =0;
92 virtual am_Error_e setMainSinkNotificationConfiguration(const am_sinkID_t sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration) =0;
93 virtual am_Error_e setMainSourceNotificationConfiguration(const am_sourceID_t sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration) =0;
97 #endif // !defined(EA_FA7CC74B_CBCB_4356_89AE_B7F88A8CEC7F__INCLUDED_)