2 * This file was generated by the CommonAPI Generators.
3 * Used org.genivi.commonapi.core 2.1.1.201309251246.
4 * Used org.franca.core 0.8.9.201308271211.
6 * Copyright (c) 2012 BMW
8 * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
11 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
12 * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
13 * subject to the following conditions:
14 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
16 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
17 * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19 * For further information see http://www.genivi.org/.
22 * This class implements everything from Audiomanager -> RoutingAdapter
23 * @author Christian Mueller
25 #include "RoutingControlDBusProxy.h"
31 std::shared_ptr<CommonAPI::DBus::DBusProxy> createRoutingControlDBusProxy(
32 const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
33 const std::string& commonApiAddress,
34 const std::string& interfaceName,
35 const std::string& busName,
36 const std::string& objectPath,
37 const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection) {
38 return std::make_shared<RoutingControlDBusProxy>(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection);
41 __attribute__((constructor)) void registerRoutingControlDBusProxy(void) {
42 CommonAPI::DBus::DBusFactory::registerProxyFactoryMethod(RoutingControl::getInterfaceId(),
43 &createRoutingControlDBusProxy);
46 RoutingControlDBusProxy::RoutingControlDBusProxy(
47 const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
48 const std::string& commonApiAddress,
49 const std::string& interfaceName,
50 const std::string& busName,
51 const std::string& objectPath,
52 const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection):
53 CommonAPI::DBus::DBusProxy(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyconnection)
60 * aborts an asynchronous action.
61 (at)return E_OK on success, E_UNKNOWN on error,
62 * E_NON_EXISTENT if handle was not found
64 void RoutingControlDBusProxy::asyncAbort(const am_Handle_s& handle, CommonAPI::CallStatus& callStatus) {
65 CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_Handle_s>,
66 CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
74 std::future<CommonAPI::CallStatus> RoutingControlDBusProxy::asyncAbortAsync(const am_Handle_s& handle, AsyncAbortAsyncCallback callback) {
75 return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_Handle_s>,
76 CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
84 * connects a source to a sink
85 (at)return E_OK on success, E_UNKNOWN on error,
86 * E_WRONG_FORMAT in case am_ConnectionFormat_e does not match
88 void RoutingControlDBusProxy::asyncConnect(const am_Handle_s& handle, const am_connectionID_t& connectionID, const am_sourceID_t& sourceID, const am_sinkID_t& sinkID, const am_ConnectionFormat_pe& connectionFormat, CommonAPI::CallStatus& callStatus) {
89 CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_Handle_s, am_connectionID_t, am_sourceID_t, am_sinkID_t, am_ConnectionFormat_pe>,
90 CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
94 handle, connectionID, sourceID, sinkID, connectionFormat,
98 std::future<CommonAPI::CallStatus> RoutingControlDBusProxy::asyncConnectAsync(const am_Handle_s& handle, const am_connectionID_t& connectionID, const am_sourceID_t& sourceID, const am_sinkID_t& sinkID, const am_ConnectionFormat_pe& connectionFormat, AsyncConnectAsyncCallback callback) {
99 return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_Handle_s, am_connectionID_t, am_sourceID_t, am_sinkID_t, am_ConnectionFormat_pe>,
100 CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
104 handle, connectionID, sourceID, sinkID, connectionFormat,
105 std::move(callback));
108 * disconnect a connection with given connectionID
109 (at)return E_OK on success,
110 * E_UNKNOWN on error, E_NON_EXISTENT if connection was not found
112 void RoutingControlDBusProxy::asyncDisconnect(const am_Handle_s& handle, const am_connectionID_t& connectionID, CommonAPI::CallStatus& callStatus) {
113 CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_Handle_s, am_connectionID_t>,
114 CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
118 handle, connectionID,
122 std::future<CommonAPI::CallStatus> RoutingControlDBusProxy::asyncDisconnectAsync(const am_Handle_s& handle, const am_connectionID_t& connectionID, AsyncDisconnectAsyncCallback callback) {
123 return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_Handle_s, am_connectionID_t>,
124 CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
128 handle, connectionID,
129 std::move(callback));
132 * this method is used to set the volume of a sink. This function is used to drive
133 * ramps, to mute or unmute or directly set the value. The difference is made
134 * through the ramptype.
135 (at)return E_OK on success, E_UNKNOWN on error,
136 * E_OUT_OF_RANGE if new volume is out of range
138 void RoutingControlDBusProxy::asyncSetSinkVolume(const am_Handle_s& handle, const am_sinkID_t& sinkID, const am_volume_t& volume, const am_RampType_pe& ramp, const am_time_t& time, CommonAPI::CallStatus& callStatus) {
139 CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_Handle_s, am_sinkID_t, am_volume_t, am_RampType_pe, am_time_t>,
140 CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
142 "asyncSetSinkVolume",
144 handle, sinkID, volume, ramp, time,
148 std::future<CommonAPI::CallStatus> RoutingControlDBusProxy::asyncSetSinkVolumeAsync(const am_Handle_s& handle, const am_sinkID_t& sinkID, const am_volume_t& volume, const am_RampType_pe& ramp, const am_time_t& time, AsyncSetSinkVolumeAsyncCallback callback) {
149 return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_Handle_s, am_sinkID_t, am_volume_t, am_RampType_pe, am_time_t>,
150 CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
152 "asyncSetSinkVolume",
154 handle, sinkID, volume, ramp, time,
155 std::move(callback));
158 * sets the volume of a source. This method is used to set the volume of a sink.
159 * This function is used to drive ramps, to mute or unmute or directly set the
160 * value. The difference is made through the ramptype.
162 * success, E_UNKNOWN on error, E_OUT_OF_RANGE if volume is out of
164 triggers the acknowledge ackSourceVolumeChange
166 void RoutingControlDBusProxy::asyncSetSourceVolume(const am_Handle_s& handle, const am_sourceID_t& sourceID, const am_volume_t& volume, const am_RampType_pe& ramp, const am_time_t& time, CommonAPI::CallStatus& callStatus) {
167 CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_Handle_s, am_sourceID_t, am_volume_t, am_RampType_pe, am_time_t>,
168 CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
170 "asyncSetSourceVolume",
172 handle, sourceID, volume, ramp, time,
176 std::future<CommonAPI::CallStatus> RoutingControlDBusProxy::asyncSetSourceVolumeAsync(const am_Handle_s& handle, const am_sourceID_t& sourceID, const am_volume_t& volume, const am_RampType_pe& ramp, const am_time_t& time, AsyncSetSourceVolumeAsyncCallback callback) {
177 return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_Handle_s, am_sourceID_t, am_volume_t, am_RampType_pe, am_time_t>,
178 CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
180 "asyncSetSourceVolume",
182 handle, sourceID, volume, ramp, time,
183 std::move(callback));
186 * This function is used to set the source state of a particular
188 (at)return E_OK on success, E_UNKNOWN on error
190 void RoutingControlDBusProxy::asyncSetSourceState(const am_Handle_s& handle, const am_sourceID_t& sourceID, const am_SourceState_e& state, CommonAPI::CallStatus& callStatus) {
191 CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_Handle_s, am_sourceID_t, am_SourceState_e>,
192 CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
194 "asyncSetSourceState",
196 handle, sourceID, state,
200 std::future<CommonAPI::CallStatus> RoutingControlDBusProxy::asyncSetSourceStateAsync(const am_Handle_s& handle, const am_sourceID_t& sourceID, const am_SourceState_e& state, AsyncSetSourceStateAsyncCallback callback) {
201 return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_Handle_s, am_sourceID_t, am_SourceState_e>,
202 CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
204 "asyncSetSourceState",
206 handle, sourceID, state,
207 std::move(callback));
210 * this function sets the sinksoundproperty.
211 (at)return E_OK on success,
212 * E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
214 void RoutingControlDBusProxy::asyncSetSinkSoundProperties(const am_Handle_s& handle, const am_sinkID_t& sinkID, const am_SoundProperty_L& listSoundProperties, CommonAPI::CallStatus& callStatus) {
215 CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_Handle_s, am_sinkID_t, am_SoundProperty_L>,
216 CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
218 "asyncSetSinkSoundProperties",
220 handle, sinkID, listSoundProperties,
224 std::future<CommonAPI::CallStatus> RoutingControlDBusProxy::asyncSetSinkSoundPropertiesAsync(const am_Handle_s& handle, const am_sinkID_t& sinkID, const am_SoundProperty_L& listSoundProperties, AsyncSetSinkSoundPropertiesAsyncCallback callback) {
225 return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_Handle_s, am_sinkID_t, am_SoundProperty_L>,
226 CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
228 "asyncSetSinkSoundProperties",
230 handle, sinkID, listSoundProperties,
231 std::move(callback));
234 * this function sets the sinksoundproperty.
235 (at)return E_OK on success,
236 * E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
238 void RoutingControlDBusProxy::asyncSetSinkSoundProperty(const am_Handle_s& handle, const am_sinkID_t& sinkID, const am_SoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus) {
239 CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_Handle_s, am_sinkID_t, am_SoundProperty_s>,
240 CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
242 "asyncSetSinkSoundProperty",
244 handle, sinkID, soundProperty,
248 std::future<CommonAPI::CallStatus> RoutingControlDBusProxy::asyncSetSinkSoundPropertyAsync(const am_Handle_s& handle, const am_sinkID_t& sinkID, const am_SoundProperty_s& soundProperty, AsyncSetSinkSoundPropertyAsyncCallback callback) {
249 return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_Handle_s, am_sinkID_t, am_SoundProperty_s>,
250 CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
252 "asyncSetSinkSoundProperty",
254 handle, sinkID, soundProperty,
255 std::move(callback));
258 * this function sets the sourcesoundproperty.
259 (at)return E_OK on success,
260 * E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
262 void RoutingControlDBusProxy::asyncSetSourceSoundProperties(const am_Handle_s& handle, const am_sourceID_t& sourceID, const am_SoundProperty_L& listSoundProperties, CommonAPI::CallStatus& callStatus) {
263 CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_Handle_s, am_sourceID_t, am_SoundProperty_L>,
264 CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
266 "asyncSetSourceSoundProperties",
268 handle, sourceID, listSoundProperties,
272 std::future<CommonAPI::CallStatus> RoutingControlDBusProxy::asyncSetSourceSoundPropertiesAsync(const am_Handle_s& handle, const am_sourceID_t& sourceID, const am_SoundProperty_L& listSoundProperties, AsyncSetSourceSoundPropertiesAsyncCallback callback) {
273 return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_Handle_s, am_sourceID_t, am_SoundProperty_L>,
274 CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
276 "asyncSetSourceSoundProperties",
278 handle, sourceID, listSoundProperties,
279 std::move(callback));
282 * this function sets the sourcesoundproperty.
283 (at)return E_OK on success,
284 * E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
286 void RoutingControlDBusProxy::asyncSetSourceSoundProperty(const am_Handle_s& handle, const am_sourceID_t& sourceID, const am_SoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus) {
287 CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_Handle_s, am_sourceID_t, am_SoundProperty_s>,
288 CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
290 "asyncSetSourceSoundProperty",
292 handle, sourceID, soundProperty,
296 std::future<CommonAPI::CallStatus> RoutingControlDBusProxy::asyncSetSourceSoundPropertyAsync(const am_Handle_s& handle, const am_sourceID_t& sourceID, const am_SoundProperty_s& soundProperty, AsyncSetSourceSoundPropertyAsyncCallback callback) {
297 return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_Handle_s, am_sourceID_t, am_SoundProperty_s>,
298 CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
300 "asyncSetSourceSoundProperty",
302 handle, sourceID, soundProperty,
303 std::move(callback));
306 * this function triggers crossfading.
307 (at)return E_OK on success, E_UNKNOWN on
310 void RoutingControlDBusProxy::asyncCrossFade(const am_Handle_s& handle, const am_crossfaderID_t& crossfaderID, const am_HotSink_e& hotSink, const am_RampType_pe& rampType, const am_time_t& time, CommonAPI::CallStatus& callStatus) {
311 CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_Handle_s, am_crossfaderID_t, am_HotSink_e, am_RampType_pe, am_time_t>,
312 CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
316 handle, crossfaderID, hotSink, rampType, time,
320 std::future<CommonAPI::CallStatus> RoutingControlDBusProxy::asyncCrossFadeAsync(const am_Handle_s& handle, const am_crossfaderID_t& crossfaderID, const am_HotSink_e& hotSink, const am_RampType_pe& rampType, const am_time_t& time, AsyncCrossFadeAsyncCallback callback) {
321 return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_Handle_s, am_crossfaderID_t, am_HotSink_e, am_RampType_pe, am_time_t>,
322 CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
326 handle, crossfaderID, hotSink, rampType, time,
327 std::move(callback));
330 * this function is used for early and late audio functions to set the domain
332 (at)return E_OK on success, E_UNKNOWN on error
334 void RoutingControlDBusProxy::setDomainState(const am_domainID_t& domainID, const am_DomainState_e& domainState, CommonAPI::CallStatus& callStatus, am_Error_e& error) {
335 CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_domainID_t, am_DomainState_e>,
336 CommonAPI::DBus::DBusSerializableArguments<am_Error_e> >::callMethodWithReply(
340 domainID, domainState,
344 std::future<CommonAPI::CallStatus> RoutingControlDBusProxy::setDomainStateAsync(const am_domainID_t& domainID, const am_DomainState_e& domainState, SetDomainStateAsyncCallback callback) {
345 return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_domainID_t, am_DomainState_e>,
346 CommonAPI::DBus::DBusSerializableArguments<am_Error_e> >::callMethodAsync(
350 domainID, domainState,
351 std::move(callback));
353 void RoutingControlDBusProxy::asyncSetVolumes(const am_Handle_s& handle, const am_Volumes_L& volumes, CommonAPI::CallStatus& callStatus) {
354 CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_Handle_s, am_Volumes_L>,
355 CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
363 std::future<CommonAPI::CallStatus> RoutingControlDBusProxy::asyncSetVolumesAsync(const am_Handle_s& handle, const am_Volumes_L& volumes, AsyncSetVolumesAsyncCallback callback) {
364 return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_Handle_s, am_Volumes_L>,
365 CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
370 std::move(callback));
372 void RoutingControlDBusProxy::asyncSetSinkNotificationConfiguration(const am_Handle_s& handle, const am_sinkID_t& sinkID, const am_NotificationConfiguration_s& notificationConfiguration, CommonAPI::CallStatus& callStatus) {
373 CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_Handle_s, am_sinkID_t, am_NotificationConfiguration_s>,
374 CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
376 "asyncSetSinkNotificationConfiguration",
378 handle, sinkID, notificationConfiguration,
382 std::future<CommonAPI::CallStatus> RoutingControlDBusProxy::asyncSetSinkNotificationConfigurationAsync(const am_Handle_s& handle, const am_sinkID_t& sinkID, const am_NotificationConfiguration_s& notificationConfiguration, AsyncSetSinkNotificationConfigurationAsyncCallback callback) {
383 return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_Handle_s, am_sinkID_t, am_NotificationConfiguration_s>,
384 CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
386 "asyncSetSinkNotificationConfiguration",
388 handle, sinkID, notificationConfiguration,
389 std::move(callback));
391 void RoutingControlDBusProxy::asyncSetSourceNotificationConfiguration(const am_Handle_s& handle, const am_sourceID_t& sourceID, const am_NotificationConfiguration_s& notificationConfiguration, CommonAPI::CallStatus& callStatus) {
392 CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_Handle_s, am_sourceID_t, am_NotificationConfiguration_s>,
393 CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
395 "asyncSetSourceNotificationConfiguration",
397 handle, sourceID, notificationConfiguration,
401 std::future<CommonAPI::CallStatus> RoutingControlDBusProxy::asyncSetSourceNotificationConfigurationAsync(const am_Handle_s& handle, const am_sourceID_t& sourceID, const am_NotificationConfiguration_s& notificationConfiguration, AsyncSetSourceNotificationConfigurationAsyncCallback callback) {
402 return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_Handle_s, am_sourceID_t, am_NotificationConfiguration_s>,
403 CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
405 "asyncSetSourceNotificationConfiguration",
407 handle, sourceID, notificationConfiguration,
408 std::move(callback));
413 void RoutingControlDBusProxy::getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const {
419 } // namespace genivi