* formatting all the source code with eclipse source code style
[profile/ivi/audiomanager.git] / includes / routing / RoutingSendInterface.h
1 /**\r
2 * Copyright (C) 2011, BMW AG\r
3 *\r
4 * GeniviAudioMananger\r
5 *\r
6 * \file  \r
7 *\r
8 * \date 20-Oct-2011 3:42:04 PM\r
9 * \author Christian Mueller (christian.ei.mueller@bmw.de)\r
10 *\r
11 * \section License\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
14 *\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
22 *\r
23 * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN\r
24 */\r
25 #if !defined(EA_D17051E6_21F6_42a8_A7D0_F996E885E15F__INCLUDED_)\r
26 #define EA_D17051E6_21F6_42a8_A7D0_F996E885E15F__INCLUDED_\r
27 \r
28 #include <vector>\r
29 #include <string>\r
30 #include "../audiomanagertypes.h"\r
31 \r
32 namespace am {\r
33 class RoutingReceiveInterface;\r
34 }
35
36 #include "RoutingReceiveInterface.h"
37
38 #define RoutingSendVersion 1
39 namespace am {
40         /**
41          *  This class implements everything from Audiomanager -> RoutingAdapter
42          * @author christian
43          * @version 1.0
44          * @created 19-Jan-2012 4:32:02 PM
45          */
46         class RoutingSendInterface
47         {
48
49         public:
50                 /**
51                  * starts up the interface. In the implementations, here is the best place for init routines.
52                  * 
53                  * @param routingreceiveinterface    pointer to the receive interface
54                  */
55                 virtual void startupRoutingInterface(RoutingReceiveInterface* routingreceiveinterface) =0;
56                 /**
57                  * indicates that the interface is now ready to be used. Should be used as trigger to register all sinks, sources, etc...
58                  */
59                 virtual void routingInterfacesReady() =0;
60                 /**
61                  * is used to indicate the rundown of the system
62                  */
63                 virtual void routingInterfacesRundown() =0;
64                 /**
65                  * aborts an asynchronous action.\r
66                  * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if handle was not found
67                  * 
68                  * @param handle
69                  */
70                 virtual am_Error_e asyncAbort(const am_Handle_s handle) =0;
71                 /**
72                  * connects a source to a sink\r
73                  * @return E_OK on success, E_UNKNOWN on error, E_WRONG_FORMAT in case am_ConnectionFormat_e does not match
74                  * 
75                  * @param handle
76                  * @param connectionID
77                  * @param sourceID
78                  * @param sinkID
79                  * @param connectionFormat
80                  */
81                 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;
82                 /**
83                  * disconnect a connection with given connectionID\r
84                  * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if connection was not found
85                  * 
86                  * @param handle
87                  * @param connectionID
88                  */
89                 virtual am_Error_e asyncDisconnect(const am_Handle_s handle, const am_connectionID_t connectionID) =0;
90                 /**
91                  * this method is used to set the volume of a sink. This function is used to drive ramps, to mute or unmute or directly set the value. The difference is made through the ramptype.\r
92                  * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if new volume is out of range
93                  * 
94                  * @param handle
95                  * @param sinkID
96                  * @param volume
97                  * @param ramp
98                  * @param time
99                  */
100                 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;
101                 /**
102                  * 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 mute or unmute or directly set the value. The difference is made through the ramptype.\r
103                  * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if volume is out of range.\r
104                  * triggers the acknowledge ackSourceVolumeChange
105                  * 
106                  * @param handle
107                  * @param sourceID
108                  * @param volume
109                  * @param ramp
110                  * @param time
111                  */
112                 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;
113                 /**
114                  * This function is used to set the source state of a particular source.\r
115                  * @return E_OK on success, E_UNKNOWN on error
116                  * 
117                  * @param handle
118                  * @param sourceID
119                  * @param state
120                  */
121                 virtual am_Error_e asyncSetSourceState(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SourceState_e state) =0;
122                 /**
123                  * this function sets the sinksoundproperty.\r
124                  * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
125                  * 
126                  * @param handle
127                  * @param listSoundProperties
128                  * @param sinkID
129                  */
130                 virtual am_Error_e asyncSetSinkSoundProperties(const am_Handle_s handle, const std::vector<am_SoundProperty_s>& listSoundProperties, const am_sinkID_t sinkID) =0;
131                 /**
132                  * this function sets the sinksoundproperty.\r
133                  * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
134                  * 
135                  * @param handle
136                  * @param soundProperty
137                  * @param sinkID
138                  */
139                 virtual am_Error_e asyncSetSinkSoundProperty(const am_Handle_s handle, const am_SoundProperty_s& soundProperty, const am_sinkID_t sinkID) =0;
140                 /**
141                  * this function sets the sourcesoundproperty.\r
142                  * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
143                  * 
144                  * @param handle
145                  * @param listSoundProperties
146                  * @param sourceID
147                  */
148                 virtual am_Error_e asyncSetSourceSoundProperties(const am_Handle_s handle, const std::vector<am_SoundProperty_s>& listSoundProperties, const am_sourceID_t sourceID) =0;
149                 /**
150                  * this function sets the sourcesoundproperty.\r
151                  * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
152                  * 
153                  * @param handle
154                  * @param soundProperty
155                  * @param sourceID
156                  */
157                 virtual am_Error_e asyncSetSourceSoundProperty(const am_Handle_s handle, const am_SoundProperty_s& soundProperty, const am_sourceID_t sourceID) =0;
158                 /**
159                  * this function triggers crossfading.\r
160                  * @return E_OK on success, E_UNKNOWN on error
161                  * 
162                  * @param handle
163                  * @param crossfaderID
164                  * @param hotSink
165                  * @param rampType
166                  * @param time
167                  */
168                 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;
169                 /**
170                  * this function is used for early and late audio functions to set the domain state\r
171                  * @return E_OK on success, E_UNKNOWN on error
172                  * 
173                  * @param domainID
174                  * @param domainState
175                  */
176                 virtual am_Error_e setDomainState(const am_domainID_t domainID, const am_DomainState_e domainState) =0;
177                 /**
178                  * this method is used to retrieve the busname during startup of the plugin. Needs to be implemented\r
179                  * @return E_OK on success, E_UNKNOWN on error
180                  * 
181                  * @param BusName
182                  */
183                 virtual am_Error_e returnBusName(std::string& BusName) const =0;
184                 /**
185                  * This function returns the version of the interface
186                  */
187                 virtual uint16_t getInterfaceVersion() const =0;
188
189         };
190 }
191 #endif // !defined(EA_D17051E6_21F6_42a8_A7D0_F996E885E15F__INCLUDED_)