2 * Copyright (C) 2011, BMW AG
\r
4 * GeniviAudioMananger
\r
8 * \date 20-Oct-2011 3:42:04 PM
\r
9 * \author Christian Mueller (christian.ei.mueller@bmw.de)
\r
12 * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
\r
13 * Copyright (C) 2011, BMW AG Christian M?ller Christian.ei.mueller@bmw.de
\r
15 * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
\r
16 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
\r
17 * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
\r
18 * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
\r
19 * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
\r
20 * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
\r
21 * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
\r
23 * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
\r
25 #if !defined(EA_F931365D_53A0_4830_8B3E_29C95C767ADC__INCLUDED_)
\r
26 #define EA_F931365D_53A0_4830_8B3E_29C95C767ADC__INCLUDED_
\r
30 #include "audiomanagertypes.h"
\r
33 class ControlReceiveInterface;
\r
36 #define ControlSendVersion 1
39 * This interface is presented by the AudioManager controller.
\r
40 * All the hooks represent system events that need to be handled. The callback functions are used to handle for example answers to function calls on the AudioManagerCoreInterface.
43 * @created 10-Feb-2012 1:31:06 PM
45 class ControlSendInterface
49 ControlSendInterface() {
53 virtual ~ControlSendInterface() {
58 * Starts up the controller.
60 * @param controlreceiveinterface This is a pointer to the ControlReceiveInterface so that the controller knows to whom to communicate.
62 virtual am_Error_e startupController(ControlReceiveInterface* controlreceiveinterface) =0;
64 * stops the controller
66 virtual am_Error_e stopController() =0;
68 * This hook is fired when all plugins have been loaded.
70 virtual void hookAllPluginsLoaded() =0;
72 * is called when a connection request comes in via the command interface
\r
73 * @return E_OK on success, E_NOT_POSSIBLE on error, E_ALREADY_EXISTENT if already exists
77 * @param mainConnectionID
79 virtual am_Error_e hookUserConnectionRequest(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID) =0;
81 * is called when a disconnection request comes in via the command interface
\r
82 * @return E_OK on success, E_NOT_POSSIBLE on error, E_NON_EXISTENT if connection does not exists
86 virtual am_Error_e hookUserDisconnectionRequest(const am_mainConnectionID_t connectionID) =0;
88 * sets a user MainSinkSoundProperty
\r
89 * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
92 * @param soundProperty
94 virtual am_Error_e hookUserSetMainSinkSoundProperty(const am_sinkID_t sinkID, const am_MainSoundProperty_s& soundProperty) =0;
96 * sets a user MainSourceSoundProperty
\r
97 * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
100 * @param soundProperty
102 virtual am_Error_e hookUserSetMainSourceSoundProperty(const am_sourceID_t sourceID, const am_MainSoundProperty_s& soundProperty) =0;
104 * sets a user SystemProperty
\r
105 * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
109 virtual am_Error_e hookUserSetSystemProperty(const am_SystemProperty_s& property) =0;
111 * sets a user volume
\r
112 * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
117 virtual am_Error_e hookUserVolumeChange(const am_sinkID_t SinkID, const am_mainVolume_t newVolume) =0;
119 * sets a user volume as increment
\r
120 * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
123 * @param increment the steps
125 virtual am_Error_e hookUserVolumeStep(const am_sinkID_t SinkID, const int16_t increment) =0;
127 * sets the mute state of a sink
\r
128 * @return E_OK on success, E_UNKNOWN on error
131 * @param muteState true=muted
133 virtual am_Error_e hookUserSetSinkMuteState(const am_sinkID_t sinkID, const am_MuteState_e muteState) =0;
135 * is called when a routing adaptor registers its domain
\r
136 * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already exists
138 * @param domainData ID is omitted here since it has not been created yet
141 virtual am_Error_e hookSystemRegisterDomain(const am_Domain_s& domainData, am_domainID_t& domainID) =0;
143 * is called when a routing adaptor wants to derigister a domain
\r
144 * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
148 virtual am_Error_e hookSystemDeregisterDomain(const am_domainID_t domainID) =0;
150 * is called when a domain registered all the elements
154 virtual void hookSystemDomainRegistrationComplete(const am_domainID_t domainID) =0;
156 * is called when a routing adaptor registers a sink
\r
157 * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already exists
159 * @param sinkData Id is omitted here, since it has not been created yet
162 virtual am_Error_e hookSystemRegisterSink(const am_Sink_s& sinkData, am_sinkID_t& sinkID) =0;
164 * is called when a routing adaptor deregisters a sink
\r
165 * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
169 virtual am_Error_e hookSystemDeregisterSink(const am_sinkID_t sinkID) =0;
171 * is called when a routing adaptor registers a source
\r
172 * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already exists
174 * @param sourceData ID is omitted here since it is not yet created
177 virtual am_Error_e hookSystemRegisterSource(const am_Source_s& sourceData, am_sourceID_t& sourceID) =0;
179 * is called when a routing adaptor deregisters a source
\r
180 * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
184 virtual am_Error_e hookSystemDeregisterSource(const am_sourceID_t sourceID) =0;
186 * is called when a routing adaptor registers a gateway
\r
187 * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already exists
189 * @param gatewayData gatewayID is not set here since it is not created at this point of time
192 virtual am_Error_e hookSystemRegisterGateway(const am_Gateway_s& gatewayData, am_gatewayID_t& gatewayID) =0;
194 * is called when a routing adaptor deregisters a gateway
\r
195 * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
199 virtual am_Error_e hookSystemDeregisterGateway(const am_gatewayID_t gatewayID) =0;
201 * is called when a routing adaptor registers a crossfader
\r
202 * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already exists
204 * @param crossfaderData gatewayID is not set here since it is not created at this point of time
205 * @param crossfaderID
207 virtual am_Error_e hookSystemRegisterCrossfader(const am_Crossfader_s& crossfaderData, am_crossfaderID_t& crossfaderID) =0;
209 * is called when a routing adaptor deregisters a crossfader
\r
210 * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
212 * @param crossfaderID
214 virtual am_Error_e hookSystemDeregisterCrossfader(const am_crossfaderID_t crossfaderID) =0;
216 * volumeticks. therse are used to indicate volumechanges during a ramp
222 virtual void hookSystemSinkVolumeTick(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume) =0;
224 * volumeticks. therse are used to indicate volumechanges during a ramp
230 virtual void hookSystemSourceVolumeTick(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume) =0;
232 * is called when an low level interrupt changed its state
235 * @param interruptState
237 virtual void hookSystemInterruptStateChange(const am_sourceID_t sourceID, const am_InterruptState_e interruptState) =0;
239 * id called when a sink changed its availability
242 * @param availability
244 virtual void hookSystemSinkAvailablityStateChange(const am_sinkID_t sinkID, const am_Availability_s& availability) =0;
246 * id called when a source changed its availability
249 * @param availability
251 virtual void hookSystemSourceAvailablityStateChange(const am_sourceID_t sourceID, const am_Availability_s& availability) =0;
253 * id called when domainstate was changed
258 virtual void hookSystemDomainStateChange(const am_domainID_t domainID, const am_DomainState_e state) =0;
260 * when early data was received
264 virtual void hookSystemReceiveEarlyData(const std::vector<am_EarlyData_s>& data) =0;
266 * this hook provides information about speed changes.
\r
267 * The quantization and sampling rate of the speed can be adjusted at compile time of the AudioManagerDaemon.
271 virtual void hookSystemSpeedChange(const am_speed_t speed) =0;
273 * this hook is fired whenever the timing information of a mainconnection has changed.
275 * @param mainConnectionID
278 virtual void hookSystemTimingInformationChanged(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time) =0;
285 virtual void cbAckConnect(const am_Handle_s handle, const am_Error_e errorID) =0;
292 virtual void cbAckDisconnect(const am_Handle_s handle, const am_Error_e errorID) =0;
294 * ack for crossfading
300 virtual void cbAckCrossFade(const am_Handle_s handle, const am_HotSink_e hostsink, const am_Error_e error) =0;
302 * ack for sink volume changes
308 virtual void cbAckSetSinkVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error) =0;
310 * ack for source volume changes
312 * @param handle the handle that is connected to the volume change
313 * @param voulme the volume after the action ended (the desired volume if everything went right, the actual one in case of abortion)
316 virtual void cbAckSetSourceVolumeChange(const am_Handle_s handle, const am_volume_t voulme, const am_Error_e error) =0;
318 * ack for setting of source states
323 virtual void cbAckSetSourceState(const am_Handle_s handle, const am_Error_e error) =0;
325 * ack for setting of sourcesoundproperties
330 virtual void cbAckSetSourceSoundProperties(const am_Handle_s handle, const am_Error_e error) =0;
332 * ack for setting of sourcesoundproperties
337 virtual void cbAckSetSourceSoundProperty(const am_Handle_s handle, const am_Error_e error) =0;
339 * ack for setting of sinksoundproperties
344 virtual void cbAckSetSinkSoundProperties(const am_Handle_s handle, const am_Error_e error) =0;
346 * ack for setting of sinksoundproperties
351 virtual void cbAckSetSinkSoundProperty(const am_Handle_s handle, const am_Error_e error) =0;
353 * This function is used by the routing algorithm to retrieve a priorized list of connectionFormats from the Controller.
\r
354 * @return E_OK in case of successfull priorisation.
356 * @param sourceID sourceID of source that shall be connected
357 * @param sinkID sinkID of sink that shall be connected
358 * @param listPossibleConnectionFormats list of possible connectionformats
359 * @param listPrioConnectionFormats the list return with prioos from the controller. Best choice on first position.
361 virtual am_Error_e getConnectionFormatChoice(const am_sourceID_t sourceID, const am_sinkID_t sinkID, const std::vector<am_ConnectionFormat_e> listPossibleConnectionFormats, std::vector<am_ConnectionFormat_e>& listPrioConnectionFormats) =0;
363 * This function returns the version of the interface
\r
364 * returns E_OK, E_UNKOWN if version is unknown.
366 virtual uint16_t getInterfaceVersion() const =0;
370 #endif // !defined(EA_F931365D_53A0_4830_8B3E_29C95C767ADC__INCLUDED_)