summaryrefslogtreecommitdiff
path: root/includes/routing/RoutingSendInterface.h
blob: ac4b6aba7224fc7bac5f3ab3ee45711ac8325585 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
/**
* Copyright (C) 2011, BMW AG
*
* GeniviAudioMananger
*
* \file  
*
* \date 20-Oct-2011 3:42:04 PM
* \author Christian Mueller (christian.ei.mueller@bmw.de)
*
* \section License
* GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
* Copyright (C) 2011, BMW AG Christian M?ller  Christian.ei.mueller@bmw.de
*
* 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.
* 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.
* 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>.
* 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.
* 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.
* 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.
* 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.
*
* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
#if !defined(EA_D17051E6_21F6_42a8_A7D0_F996E885E15F__INCLUDED_)
#define EA_D17051E6_21F6_42a8_A7D0_F996E885E15F__INCLUDED_

#include <vector>
#include <string>
#include "../audiomanagertypes.h"

namespace am {
class RoutingReceiveInterface;
}

#include "RoutingReceiveInterface.h"

#define RoutingSendVersion 1
namespace am {
	/**
	 *  This class implements everything from Audiomanager -> RoutingAdapter
	 * @author christian
	 * @version 1.0
	 * @created 19-Jan-2012 4:32:02 PM
	 */
	class RoutingSendInterface
	{

	public:
		/**
		 * starts up the interface. In the implementations, here is the best place for init routines.
		 * 
		 * @param routingreceiveinterface    pointer to the receive interface
		 */
		virtual void startupRoutingInterface(RoutingReceiveInterface* routingreceiveinterface) =0;
		/**
		 * indicates that the interface is now ready to be used. Should be used as trigger to register all sinks, sources, etc...
		 */
		virtual void routingInterfacesReady() =0;
		/**
		 * is used to indicate the rundown of the system
		 */
		virtual void routingInterfacesRundown() =0;
		/**
		 * aborts an asynchronous action.
		 * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if handle was not found
		 * 
		 * @param handle
		 */
		virtual am_Error_e asyncAbort(const am_Handle_s handle) =0;
		/**
		 * connects a source to a sink
		 * @return E_OK on success, E_UNKNOWN on error, E_WRONG_FORMAT in case am_ConnectionFormat_e does not match
		 * 
		 * @param handle
		 * @param connectionID
		 * @param sourceID
		 * @param sinkID
		 * @param connectionFormat
		 */
		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;
		/**
		 * disconnect a connection with given connectionID
		 * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if connection was not found
		 * 
		 * @param handle
		 * @param connectionID
		 */
		virtual am_Error_e asyncDisconnect(const am_Handle_s handle, const am_connectionID_t connectionID) =0;
		/**
		 * 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.
		 * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if new volume is out of range
		 * 
		 * @param handle
		 * @param sinkID
		 * @param volume
		 * @param ramp
		 * @param time
		 */
		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;
		/**
		 * 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.
		 * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if volume is out of range.
		 * triggers the acknowledge ackSourceVolumeChange
		 * 
		 * @param handle
		 * @param sourceID
		 * @param volume
		 * @param ramp
		 * @param time
		 */
		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;
		/**
		 * This function is used to set the source state of a particular source.
		 * @return E_OK on success, E_UNKNOWN on error
		 * 
		 * @param handle
		 * @param sourceID
		 * @param state
		 */
		virtual am_Error_e asyncSetSourceState(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SourceState_e state) =0;
		/**
		 * this function sets the sinksoundproperty.
		 * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
		 * 
		 * @param handle
		 * @param listSoundProperties
		 * @param sinkID
		 */
		virtual am_Error_e asyncSetSinkSoundProperties(const am_Handle_s handle, const std::vector<am_SoundProperty_s>& listSoundProperties, const am_sinkID_t sinkID) =0;
		/**
		 * this function sets the sinksoundproperty.
		 * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
		 * 
		 * @param handle
		 * @param soundProperty
		 * @param sinkID
		 */
		virtual am_Error_e asyncSetSinkSoundProperty(const am_Handle_s handle, const am_SoundProperty_s& soundProperty, const am_sinkID_t sinkID) =0;
		/**
		 * this function sets the sourcesoundproperty.
		 * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
		 * 
		 * @param handle
		 * @param listSoundProperties
		 * @param sourceID
		 */
		virtual am_Error_e asyncSetSourceSoundProperties(const am_Handle_s handle, const std::vector<am_SoundProperty_s>& listSoundProperties, const am_sourceID_t sourceID) =0;
		/**
		 * this function sets the sourcesoundproperty.
		 * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
		 * 
		 * @param handle
		 * @param soundProperty
		 * @param sourceID
		 */
		virtual am_Error_e asyncSetSourceSoundProperty(const am_Handle_s handle, const am_SoundProperty_s& soundProperty, const am_sourceID_t sourceID) =0;
		/**
		 * this function triggers crossfading.
		 * @return E_OK on success, E_UNKNOWN on error
		 * 
		 * @param handle
		 * @param crossfaderID
		 * @param hotSink
		 * @param rampType
		 * @param time
		 */
		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;
		/**
		 * this function is used for early and late audio functions to set the domain state
		 * @return E_OK on success, E_UNKNOWN on error
		 * 
		 * @param domainID
		 * @param domainState
		 */
		virtual am_Error_e setDomainState(const am_domainID_t domainID, const am_DomainState_e domainState) =0;
		/**
		 * this method is used to retrieve the busname during startup of the plugin. Needs to be implemented
		 * @return E_OK on success, E_UNKNOWN on error
		 * 
		 * @param BusName
		 */
		virtual am_Error_e returnBusName(std::string& BusName) const =0;
		/**
		 * This function returns the version of the interface
		 */
		virtual uint16_t getInterfaceVersion() const =0;

	};
}
#endif // !defined(EA_D17051E6_21F6_42a8_A7D0_F996E885E15F__INCLUDED_)