2 * Copyright (C) 2012, BMW AG
\r
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 Mueller, christian.linke@bmw.de BMW 2011,2012
\r
18 * For further information see http://www.genivi.org/.
\r
20 * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
\r
22 #if !defined(EA_3888D932_2C16_4c2a_BD7C_E1F819C9A7F0__INCLUDED_)
\r
23 #define EA_3888D932_2C16_4c2a_BD7C_E1F819C9A7F0__INCLUDED_
\r
27 #include "audiomanagertypes.h"
\r
29 class CAmDbusWrapper;
\r
30 class CAmSocketHandler;
\r
34 #include "audiomanagertypes.h"
36 #define CommandReceiveVersion "2.0"
39 * The interface towards the Controlling Instance (e.g HMI). It handles the communication towards the HMI and other system
40 * components who need to interact with the audiomanagement.
41 * There are two rules that have to be kept in mind when implementing against this interface:\n
43 * 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
44 * 2. YOU MAY NOT CALL THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS CALL THAT EXPECTS A RETURN VALUE.\n
46 * Violation these rules may lead to unexpected behavior! Nevertheless you can implement thread safe by using the deferred-
47 * call pattern described on the wiki which also helps to implement calls that are forbidden.\n
48 * For more information, please check CAmSerializer
49 * @author Christian Mueller
50 * @created 16-Dez-2012 15:58:14
52 class IAmCommandReceive
60 virtual ~IAmCommandReceive() {
65 * This function returns the version of the interface.
69 virtual void getInterfaceVersion(std::string& version) const =0;
71 * connects a source to sink
72 * @return E_OK on success, E_NOT_POSSIBLE on failure, E_ALREADY_EXISTS if the connection does already exists
76 * @param mainConnectionID
78 virtual am_Error_e connect(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID) =0;
80 * disconnects a mainConnection
81 * @return E_OK on successes, E_NON_EXISTENT if the connection does not exist, E_NOT_POSSIBLE on error.
83 * @param mainConnectionID
85 virtual am_Error_e disconnect(const am_mainConnectionID_t mainConnectionID) =0;
87 * sets the volume for a sink
88 * @return E_OK on success, E_UNKOWN on error, E_OUT_OF_RANGE in case the value is out of range
90 * @param sinkID the sink
91 * @param volume the volume
93 virtual am_Error_e setVolume(const am_sinkID_t sinkID, const am_mainVolume_t volume) =0;
95 * This function is used to increment or decrement the current volume for a sink.
96 * @return E_OK on success, E_UNKNOWN on error and E_OUT_OF_RANGE if the value is not in the given volume range.
99 * @param volumeStep indicated the number of steps that should be incremented or decremented. Positive values here
100 * inkrement, negative values decrement
102 virtual am_Error_e volumeStep(const am_sinkID_t sinkID, const int16_t volumeStep) =0;
104 * sets the mute state of a sink
105 * @return E_OK on success, E_UNKNOWN on error. If the mute state is already the desired one, the Daemon will return E_OK.
110 virtual am_Error_e setSinkMuteState(const am_sinkID_t sinkID, const am_MuteState_e muteState) =0;
112 * This method is used to set sound properties, e.g. Equalizer Values. Since the capabilities of the system can differ,
113 * the exact key value pairs can be extended in each product
114 * @return E_OK on success, E_OUT_OF_RANGE if value exceeds range, E_UNKNOWN in case of an error
116 * @param soundProperty
119 virtual am_Error_e setMainSinkSoundProperty(const am_MainSoundProperty_s& soundProperty, const am_sinkID_t sinkID) =0;
121 * This method is used to set sound properties, e.g. Equalizer Values. Since the capabilities of the system can differ,
122 * the exact key value pairs can be extended in each product
123 * @return E_OK on success, E_OUT_OF_RANGE if value exceeds range, E_UNKNOWN in case of an error
125 * @param soundProperty
128 virtual am_Error_e setMainSourceSoundProperty(const am_MainSoundProperty_s& soundProperty, const am_sourceID_t sourceID) =0;
130 * is used to set a specific system property.
131 * @return E_OK on success, E_OUT_OF_RANGE if value exceeds range, E_UNKNOWN in case of an error
133 * @param property the property that shall be set
135 virtual am_Error_e setSystemProperty(const am_SystemProperty_s& property) =0;
137 * returns the actual list of MainConnections
138 * @return E_OK on success, E_DATABASE_ERROR on error
140 * @param listConnections returns a list of all connections
142 virtual am_Error_e getListMainConnections(std::vector<am_MainConnectionType_s>& listConnections) const =0;
144 * returns the actual list of Sinks
145 * @return E_OK on success, E_DATABASE_ERROR on error
147 * @param listMainSinks the list of the sinks
149 virtual am_Error_e getListMainSinks(std::vector<am_SinkType_s>& listMainSinks) const =0;
151 * returns the actual list of Sources
152 * @return E_OK on success, E_DATABASE_ERROR on error
154 * @param listMainSources the list of sources
156 virtual am_Error_e getListMainSources(std::vector<am_SourceType_s>& listMainSources) const =0;
158 * This is used to retrieve all source sound properties related to a source. Returns a vector of the sound properties and
160 * @return E_OK on success, E_DATABASE_ERROR on error
163 * @param listSoundProperties
165 virtual am_Error_e getListMainSinkSoundProperties(const am_sinkID_t sinkID, std::vector<am_MainSoundProperty_s>& listSoundProperties) const =0;
167 * This is used to retrieve all source sound properties related to a source.
168 * @return E_OK on success, E_DATABASE_ERROR on error
171 * @param listSourceProperties
173 virtual am_Error_e getListMainSourceSoundProperties(const am_sourceID_t sourceID, std::vector<am_MainSoundProperty_s>& listSourceProperties) const =0;
175 * This is used to retrieve SourceClass Information of all source classes
176 * @return E_OK on success, E_DATABASE_ERROR on error
178 * @param listSourceClasses
180 virtual am_Error_e getListSourceClasses(std::vector<am_SourceClass_s>& listSourceClasses) const =0;
182 * This is used to retrieve SinkClass Information of all sink classes
183 * @return E_OK on success, E_DATABASE_ERROR on error
185 * @param listSinkClasses
187 virtual am_Error_e getListSinkClasses(std::vector<am_SinkClass_s>& listSinkClasses) const =0;
189 * Retrieves a complete list of all systemProperties.
190 * @return E_OK on success, E_DATABASE_ERROR on error
192 * @param listSystemProperties
194 virtual am_Error_e getListSystemProperties(std::vector<am_SystemProperty_s>& listSystemProperties) const =0;
196 * returns the delay in ms that the audiopath for the given mainConnection has
197 * @return E_OK on success, E_NOT_POSSIBLE if timing information is not yet retrieved, E_DATABASE_ERROR on read error on
200 * @param mainConnectionID
203 virtual am_Error_e getTimingInformation(const am_mainConnectionID_t mainConnectionID, am_timeSync_t& delay) const =0;
205 * this function is used to retrieve a pointer to the dBusConnectionWrapper
206 * @return E_OK if pointer is valid, E_UKNOWN if AudioManager was compiled without DBus Support
208 * @param dbusConnectionWrapper This is a wrapper class that is needed to keep dbus inclusions away from the interface.
209 * The DBusWrapperClass will return the pointer to the DbusConnection call (getDBusConnection)
211 virtual am_Error_e getDBusConnectionWrapper(CAmDbusWrapper*& dbusConnectionWrapper) const =0;
213 * This function returns the pointer to the socketHandler. This can be used to integrate socket-based activites like
214 * communication with the mainloop of the AudioManager.
215 * returns E_OK if pointer is valid, E_UNKNOWN in case AudioManager was compiled without socketHandler support,
217 * @param socketHandler
219 virtual am_Error_e getSocketHandler(CAmSocketHandler*& socketHandler) const =0;
221 * asynchronous confirmation of setCommandReady.
223 * @param handle the handle that was handed over by setCommandReady
224 * @param error E_OK if the ready command succeeded. E_UNKNOWN if an error happened.
226 virtual void confirmCommandReady(const uint16_t handle, const am_Error_e error) =0;
228 * asynchronous confirmation of setCommandRundown
230 * @param handle the handle that was given via setCommandRundown
231 * @param error E_OK if the ready command succeeded. E_UNKNOWN if an error happened.
233 virtual void confirmCommandRundown(const uint16_t handle, const am_Error_e error) =0;
235 * Rtrieves the list of MainNotifications for a sink.
237 * @param sinkID The sinkID
238 * @param listMainNotificationConfigurations
240 virtual am_Error_e getListSinkMainNotificationConfigurations(const am_sinkID_t sinkID, std::vector<am_NotificationConfiguration_s>& listMainNotificationConfigurations) const =0;
242 * Rtrieves the list of MainNotifications for a source.
244 * @param sourceID The sourceID
245 * @param listMainNotificationConfigurations
247 virtual am_Error_e getListSourceMainNotificationConfigurations(const am_sourceID_t sourceID, std::vector<am_NotificationConfiguration_s>& listMainNotificationConfigurations) const =0;
249 * sets a MainNotificationConfiuration. This can be used to turn on an off notifications an to change the mode of the
252 * @param sinkID The sinkID of the MainNotification to be changed
253 * @param mainNotificationConfiguration The MainNotifiication that needs to be set
255 virtual am_Error_e setSinkMainNotificationConfiguration(const am_sinkID_t sinkID, const am_NotificationConfiguration_s mainNotificationConfiguration) =0;
257 * sets a MainNotificationConfiuration. This can be used to turn on an off notifications an to change the mode of the
260 * @param sourceID The sourceID of the MainNotification to be changed
261 * @param mainNotificationConfiguration The MainNotifiication that needs to be set
263 virtual am_Error_e setSourceMainNotificationConfiguration(const am_sourceID_t sourceID, const am_NotificationConfiguration_s mainNotificationConfiguration) =0;
267 #endif // !defined(EA_3888D932_2C16_4c2a_BD7C_E1F819C9A7F0__INCLUDED_)