2 * Copyright (C) 2012 - 2014, BMW AG
4 * This file is part of GENIVI Project AudioManager.
6 * Contributions are licensed to the GENIVI Alliance under one or more
7 * Contribution License Agreements.
10 * This Source Code Form is subject to the terms of the
11 * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
12 * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
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_75F8849C_0F4B_4641_B0B9_01DE137E6938__INCLUDED_)
24 #define EA_75F8849C_0F4B_4641_B0B9_01DE137E6938__INCLUDED_
28 #include "audiomanagertypes.h"
30 class IAmRoutingReceive;
33 #include "audiomanagertypes.h"
34 #include "IAmRoutingReceive.h"
36 #define RoutingSendVersion "3.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
44 * 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
45 * 2. YOU MAY NOT CALL THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS
46 * CALL THAT EXPECTS A RETURN VALUE.\n
48 * Violation these rules may lead to unexpected behavior! Nevertheless you can
49 * implement thread safe by using the deferred-call pattern described on the wiki
50 * which also helps to implement calls that are forbidden.\n
51 * For more information, please check CAmSerializer
61 virtual ~IAmRoutingSend() {
66 * This function returns the version of the interface
68 virtual void getInterfaceVersion(std::string& version) const =0;
70 * starts up the interface. In the implementations, here is the best place for
73 virtual am_Error_e startupInterface(IAmRoutingReceive* routingreceiveinterface) =0;
75 * indicates that the routing now ready to be used. Should be used as trigger to
76 * register all sinks, sources, etc...
78 virtual void setRoutingReady(const uint16_t handle) =0;
80 * indicates that the routing plugins need to be prepared to switch the power off
83 virtual void setRoutingRundown(const uint16_t handle) =0;
85 * aborts an asynchronous action.
86 * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if handle was not
89 virtual am_Error_e asyncAbort(const am_Handle_s handle) =0;
91 * connects a source to a sink
92 * @return E_OK on success, E_UNKNOWN on error, E_WRONG_FORMAT in case
93 * am_ConnectionFormat_e does not match
95 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_CustomConnectionFormat_t connectionFormat) =0;
97 * disconnect a connection with given connectionID
98 * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if connection was
101 virtual am_Error_e asyncDisconnect(const am_Handle_s handle, const am_connectionID_t connectionID) =0;
103 * this method is used to set the volume of a sink. This function is used to drive
104 * ramps, to mute or unmute or directly set the value. The difference is made
105 * through the ramptype.
106 * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if new volume is
109 virtual am_Error_e asyncSetSinkVolume(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume, const am_CustomRampType_t ramp, const am_time_t time) =0;
111 * sets the volume of a source. This method is used to set the volume of a sink.
112 * This function is used to drive ramps, to mute or unmute or directly set the
113 * value. The difference is made through the ramptype.
114 * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if volume is out of
116 * triggers the acknowledge ackSourceVolumeChange
118 virtual am_Error_e asyncSetSourceVolume(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume, const am_CustomRampType_t ramp, const am_time_t time) =0;
120 * This function is used to set the source state of a particular source.
121 * @return E_OK on success, E_UNKNOWN on error
123 virtual am_Error_e asyncSetSourceState(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SourceState_e state) =0;
125 * this function sets the sinksoundproperty.
126 * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery
127 * value is out of range
129 virtual am_Error_e asyncSetSinkSoundProperties(const am_Handle_s handle, const am_sinkID_t sinkID, const std::vector<am_SoundProperty_s>& listSoundProperties) =0;
131 * this function sets the sinksoundproperty.
132 * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery
133 * value is out of range
135 virtual am_Error_e asyncSetSinkSoundProperty(const am_Handle_s handle, const am_sinkID_t sinkID, const am_SoundProperty_s& soundProperty) =0;
137 * this function sets the sourcesoundproperty.
138 * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery
139 * value is out of range
141 virtual am_Error_e asyncSetSourceSoundProperties(const am_Handle_s handle, const am_sourceID_t sourceID, const std::vector<am_SoundProperty_s>& listSoundProperties) =0;
143 * this function sets the sourcesoundproperty.
144 * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery
145 * value is out of range
147 virtual am_Error_e asyncSetSourceSoundProperty(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SoundProperty_s& soundProperty) =0;
149 * this function triggers crossfading.
150 * @return E_OK on success, E_UNKNOWN on error
152 virtual am_Error_e asyncCrossFade(const am_Handle_s handle, const am_crossfaderID_t crossfaderID, const am_HotSink_e hotSink, const am_CustomRampType_t rampType, const am_time_t time) =0;
154 * this function is used for early and late audio functions to set the domain
156 * @return E_OK on success, E_UNKNOWN on error
158 virtual am_Error_e setDomainState(const am_domainID_t domainID, const am_DomainState_e domainState) =0;
160 * this method is used to retrieve the busname during startup of the plugin. Needs
162 * @return E_OK on success, E_UNKNOWN on error
164 virtual am_Error_e returnBusName(std::string& BusName) const =0;
166 * This command sets multiple source or and sink volumes within a domain at a time.
167 * It can be used to synchronize volume setting events.
168 * @return E_OK on success, E_UNKNOWN on error.
170 virtual am_Error_e asyncSetVolumes(const am_Handle_s handle, const std::vector<am_Volumes_s>& listVolumes) =0;
172 * sets the notification configuration of a sink.
173 * @return E_OK on success, E_UNKNOWN on error.
175 virtual am_Error_e asyncSetSinkNotificationConfiguration(const am_Handle_s handle, const am_sinkID_t sinkID, const am_NotificationConfiguration_s& notificationConfiguration) =0;
177 * sets the notification configuration of a source.
178 * @return E_OK on success, E_UNKNOWN on error.
180 virtual am_Error_e asyncSetSourceNotificationConfiguration(const am_Handle_s handle, const am_sourceID_t sourceID, const am_NotificationConfiguration_s& notificationConfiguration) =0;
184 #endif // !defined(EA_75F8849C_0F4B_4641_B0B9_01DE137E6938__INCLUDED_)