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_19B3916A_5323_4939_B585_FE9193DA3FAD__INCLUDED_)
\r
23 #define EA_19B3916A_5323_4939_B585_FE9193DA3FAD__INCLUDED_
\r
27 #include "audiomanagertypes.h"
\r
30 class IAmRoutingReceive;
\r
33 #include "audiomanagertypes.h"
34 #include "IAmRoutingReceive.h"
35 #include "projecttypes.h"
37 #define RoutingSendVersion "2.0"
40 * This class implements everything from Audiomanager -> RoutingAdapter
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 17-Jan-2013 10:00:26
60 virtual ~IAmRoutingSend() {
65 * This function returns the version of the interface
69 virtual void getInterfaceVersion(std::string& version) const =0;
71 * starts up the interface. In the implementations, here is the best place for init routines.
73 * @param routingreceiveinterface pointer to the receive interface
75 virtual am_Error_e startupInterface(IAmRoutingReceive* routingreceiveinterface) =0;
77 * indicates that the routing now ready to be used. Should be used as trigger to register all sinks, sources, etc...
79 * @param handle handle that uniquely identifies the request
81 virtual void setRoutingReady(const uint16_t handle) =0;
83 * indicates that the routing plugins need to be prepared to switch the power off or be ready again.
85 * @param handle the handle that uniquely identifies the request
87 virtual void setRoutingRundown(const uint16_t handle) =0;
89 * aborts an asynchronous action.
90 * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if handle was not found
94 virtual am_Error_e asyncAbort(const am_Handle_s handle) =0;
96 * connects a source to a sink
97 * @return E_OK on success, E_UNKNOWN on error, E_WRONG_FORMAT in case am_ConnectionFormat_e does not match
100 * @param connectionID
103 * @param connectionFormat
105 virtual am_Error_e asyncConnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_ConnectionFormat_e connectionFormat) =0;
107 * disconnect a connection with given connectionID
108 * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if connection was not found
111 * @param connectionID
113 virtual am_Error_e asyncDisconnect(const am_Handle_s handle, const am_connectionID_t connectionID) =0;
115 * this method is used to set the volume of a sink. This function is used to drive ramps, to mute or unmute or directly
116 * set the value. The difference is made through the ramptype.
117 * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if new volume is out of range
125 virtual am_Error_e asyncSetSinkVolume(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time) =0;
127 * sets the volume of a source. This method is used to set the volume of a sink. This function is used to drive ramps, to
128 * mute or unmute or directly set the value. The difference is made through the ramptype.
129 * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if volume is out of range.
130 * triggers the acknowledge ackSourceVolumeChange
138 virtual am_Error_e asyncSetSourceVolume(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time) =0;
140 * This function is used to set the source state of a particular source.
141 * @return E_OK on success, E_UNKNOWN on error
147 virtual am_Error_e asyncSetSourceState(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SourceState_e state) =0;
149 * this function sets the sinksoundproperty.
150 * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
154 * @param listSoundProperties
156 virtual am_Error_e asyncSetSinkSoundProperties(const am_Handle_s handle, const am_sinkID_t sinkID, const std::vector<am_SoundProperty_s>& listSoundProperties) =0;
158 * this function sets the sinksoundproperty.
159 * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
163 * @param soundProperty
165 virtual am_Error_e asyncSetSinkSoundProperty(const am_Handle_s handle, const am_sinkID_t sinkID, const am_SoundProperty_s& soundProperty) =0;
167 * this function sets the sourcesoundproperty.
168 * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
172 * @param listSoundProperties
174 virtual am_Error_e asyncSetSourceSoundProperties(const am_Handle_s handle, const am_sourceID_t sourceID, const std::vector<am_SoundProperty_s>& listSoundProperties) =0;
176 * this function sets the sourcesoundproperty.
177 * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
181 * @param soundProperty
183 virtual am_Error_e asyncSetSourceSoundProperty(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SoundProperty_s& soundProperty) =0;
185 * this function triggers crossfading.
186 * @return E_OK on success, E_UNKNOWN on error
189 * @param crossfaderID
194 virtual am_Error_e asyncCrossFade(const am_Handle_s handle, const am_crossfaderID_t crossfaderID, const am_HotSink_e hotSink, const am_RampType_e rampType, const am_time_t time) =0;
196 * this function is used for early and late audio functions to set the domain state
197 * @return E_OK on success, E_UNKNOWN on error
202 virtual am_Error_e setDomainState(const am_domainID_t domainID, const am_DomainState_e domainState) =0;
204 * this method is used to retrieve the busname during startup of the plugin. Needs to be implemented
205 * @return E_OK on success, E_UNKNOWN on error
209 virtual am_Error_e returnBusName(std::string& BusName) const =0;
211 * This command sets multiple source or and sink volumes within a domain at a time. It can be used to synchronize volume
213 * @return E_OK on success, E_UNKNOWN on error.
215 * @param handle the handle
216 * @param listVolumes a list of volumes that shall be set a the same time
218 virtual am_Error_e asyncSetVolumes(const am_Handle_s handle, const std::vector<am_Volumes_s>& listVolumes) =0;
220 * sets the notification configuration of a sink.
221 * @return E_OK on success, E_UNKNOWN on error.
223 * @param handle The handle for this operation.
224 * @param sinkID the sourceID of the source the notification should be set
225 * @param notificationConfiguration The notification configuration
227 virtual am_Error_e asyncSetSinkNotificationConfiguration(const am_Handle_s handle, const am_sinkID_t sinkID, const am_NotificationConfiguration_s& notificationConfiguration) =0;
229 * sets the notification configuration of a source.
230 * @return E_OK on success, E_UNKNOWN on error.
232 * @param handle The handle for this operation.
233 * @param sourceID the sourceID of the source the notification should be set
234 * @param notificationConfiguration The notification configuration
236 virtual am_Error_e asyncSetSourceNotificationConfiguration(const am_Handle_s handle, const am_sourceID_t sourceID, const am_NotificationConfiguration_s& notificationConfiguration) =0;
240 #endif // !defined(EA_19B3916A_5323_4939_B585_FE9193DA3FAD__INCLUDED_)