2 * This file was generated by the CommonAPI Generators.
3 * Used org.genivi.commonapi.core 2.1.5.201312121915.
4 * Used org.franca.core 0.8.11.201401091023.
6 * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
7 * If a copy of the MPL was not distributed with this file, You can obtain one at
8 * http://mozilla.org/MPL/2.0/.
10 #include "RoutingControlDBusStubAdapter.h"
11 #include <org/genivi/am/RoutingControl.h>
17 std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> createRoutingControlDBusStubAdapter(
18 const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
19 const std::string& commonApiAddress,
20 const std::string& interfaceName,
21 const std::string& busName,
22 const std::string& objectPath,
23 const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection,
24 const std::shared_ptr<CommonAPI::StubBase>& stubBase) {
25 return std::make_shared<RoutingControlDBusStubAdapter>(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection, stubBase);
28 __attribute__((constructor)) void registerRoutingControlDBusStubAdapter(void) {
29 CommonAPI::DBus::DBusFactory::registerAdapterFactoryMethod(RoutingControl::getInterfaceId(),
30 &createRoutingControlDBusStubAdapter);
35 RoutingControlDBusStubAdapterInternal::~RoutingControlDBusStubAdapterInternal() {
36 deactivateManagedInstances();
37 RoutingControlDBusStubAdapterHelper::deinit();
40 void RoutingControlDBusStubAdapterInternal::deactivateManagedInstances() {
43 const char* RoutingControlDBusStubAdapterInternal::getMethodsDBusIntrospectionXmlData() const {
44 static const std::string introspectionData =
45 "<method name=\"getInterfaceVersion\">\n"
46 "<arg name=\"value\" type=\"uu\" direction=\"out\" />"
49 * aborts an asynchronous action.
50 (at)return E_OK on success, E_UNKNOWN on error,
51 * E_NON_EXISTENT if handle was not found
53 "<method name=\"asyncAbort\">\n"
54 "<arg name=\"handle\" type=\"(iq)\" direction=\"in\" />\n"
57 * connects a source to a sink
58 (at)return E_OK on success, E_UNKNOWN on error,
59 * E_WRONG_FORMAT in case am_CustomConnectionFormat_t does not match
61 "<method name=\"asyncConnect\">\n"
62 "<arg name=\"handle\" type=\"(iq)\" direction=\"in\" />\n"
63 "<arg name=\"connectionID\" type=\"q\" direction=\"in\" />\n"
64 "<arg name=\"sourceID\" type=\"q\" direction=\"in\" />\n"
65 "<arg name=\"sinkID\" type=\"q\" direction=\"in\" />\n"
66 "<arg name=\"connectionFormat\" type=\"q\" direction=\"in\" />\n"
69 * disconnect a connection with given connectionID
70 (at)return E_OK on success,
71 * E_UNKNOWN on error, E_NON_EXISTENT if connection was not found
73 "<method name=\"asyncDisconnect\">\n"
74 "<arg name=\"handle\" type=\"(iq)\" direction=\"in\" />\n"
75 "<arg name=\"connectionID\" type=\"q\" direction=\"in\" />\n"
78 * this method is used to set the volume of a sink. This function is used to drive
79 * ramps, to mute or unmute or directly set the value. The difference is made
80 * through the ramptype.
81 (at)return E_OK on success, E_UNKNOWN on error,
82 * E_OUT_OF_RANGE if new volume is out of range
84 "<method name=\"asyncSetSinkVolume\">\n"
85 "<arg name=\"handle\" type=\"(iq)\" direction=\"in\" />\n"
86 "<arg name=\"sinkID\" type=\"q\" direction=\"in\" />\n"
87 "<arg name=\"volume\" type=\"n\" direction=\"in\" />\n"
88 "<arg name=\"ramp\" type=\"q\" direction=\"in\" />\n"
89 "<arg name=\"time\" type=\"n\" direction=\"in\" />\n"
92 * sets the volume of a source. This method is used to set the volume of a sink.
93 * This function is used to drive ramps, to mute or unmute or directly set the
94 * value. The difference is made through the ramptype.
96 * success, E_UNKNOWN on error, E_OUT_OF_RANGE if volume is out of
98 triggers the acknowledge ackSourceVolumeChange
100 "<method name=\"asyncSetSourceVolume\">\n"
101 "<arg name=\"handle\" type=\"(iq)\" direction=\"in\" />\n"
102 "<arg name=\"sourceID\" type=\"q\" direction=\"in\" />\n"
103 "<arg name=\"volume\" type=\"n\" direction=\"in\" />\n"
104 "<arg name=\"ramp\" type=\"q\" direction=\"in\" />\n"
105 "<arg name=\"time\" type=\"n\" direction=\"in\" />\n"
108 * This function is used to set the source state of a particular
110 (at)return E_OK on success, E_UNKNOWN on error
112 "<method name=\"asyncSetSourceState\">\n"
113 "<arg name=\"handle\" type=\"(iq)\" direction=\"in\" />\n"
114 "<arg name=\"sourceID\" type=\"q\" direction=\"in\" />\n"
115 "<arg name=\"state\" type=\"i\" direction=\"in\" />\n"
118 * this function sets the sinksoundproperty.
119 (at)return E_OK on success,
120 * E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
122 "<method name=\"asyncSetSinkSoundProperties\">\n"
123 "<arg name=\"handle\" type=\"(iq)\" direction=\"in\" />\n"
124 "<arg name=\"sinkID\" type=\"q\" direction=\"in\" />\n"
125 "<arg name=\"listSoundProperties\" type=\"a(qn)\" direction=\"in\" />\n"
128 * this function sets the sinksoundproperty.
129 (at)return E_OK on success,
130 * E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
132 "<method name=\"asyncSetSinkSoundProperty\">\n"
133 "<arg name=\"handle\" type=\"(iq)\" direction=\"in\" />\n"
134 "<arg name=\"sinkID\" type=\"q\" direction=\"in\" />\n"
135 "<arg name=\"soundProperty\" type=\"(qn)\" direction=\"in\" />\n"
138 * this function sets the sourcesoundproperty.
139 (at)return E_OK on success,
140 * E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
142 "<method name=\"asyncSetSourceSoundProperties\">\n"
143 "<arg name=\"handle\" type=\"(iq)\" direction=\"in\" />\n"
144 "<arg name=\"sourceID\" type=\"q\" direction=\"in\" />\n"
145 "<arg name=\"listSoundProperties\" type=\"a(qn)\" direction=\"in\" />\n"
148 * this function sets the sourcesoundproperty.
149 (at)return E_OK on success,
150 * E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
152 "<method name=\"asyncSetSourceSoundProperty\">\n"
153 "<arg name=\"handle\" type=\"(iq)\" direction=\"in\" />\n"
154 "<arg name=\"sourceID\" type=\"q\" direction=\"in\" />\n"
155 "<arg name=\"soundProperty\" type=\"(qn)\" direction=\"in\" />\n"
158 * this function triggers crossfading.
159 (at)return E_OK on success, E_UNKNOWN on
162 "<method name=\"asyncCrossFade\">\n"
163 "<arg name=\"handle\" type=\"(iq)\" direction=\"in\" />\n"
164 "<arg name=\"crossfaderID\" type=\"q\" direction=\"in\" />\n"
165 "<arg name=\"hotSink\" type=\"i\" direction=\"in\" />\n"
166 "<arg name=\"rampType\" type=\"q\" direction=\"in\" />\n"
167 "<arg name=\"time\" type=\"n\" direction=\"in\" />\n"
170 * this function is used for early and late audio functions to set the domain
172 (at)return E_OK on success, E_UNKNOWN on error
174 "<method name=\"setDomainState\">\n"
175 "<arg name=\"domainID\" type=\"q\" direction=\"in\" />\n"
176 "<arg name=\"domainState\" type=\"i\" direction=\"in\" />\n"
177 "<arg name=\"error\" type=\"i\" direction=\"out\" />\n"
179 "<method name=\"asyncSetVolumes\">\n"
180 "<arg name=\"handle\" type=\"(iq)\" direction=\"in\" />\n"
181 "<arg name=\"volumes\" type=\"a(i(yv)nqn)\" direction=\"in\" />\n"
183 "<method name=\"asyncSetSinkNotificationConfiguration\">\n"
184 "<arg name=\"handle\" type=\"(iq)\" direction=\"in\" />\n"
185 "<arg name=\"sinkID\" type=\"q\" direction=\"in\" />\n"
186 "<arg name=\"notificationConfiguration\" type=\"(qin)\" direction=\"in\" />\n"
188 "<method name=\"asyncSetSourceNotificationConfiguration\">\n"
189 "<arg name=\"handle\" type=\"(iq)\" direction=\"in\" />\n"
190 "<arg name=\"sourceID\" type=\"q\" direction=\"in\" />\n"
191 "<arg name=\"notificationConfiguration\" type=\"(qin)\" direction=\"in\" />\n"
195 return introspectionData.c_str();
198 static CommonAPI::DBus::DBusGetAttributeStubDispatcher<
201 > getRoutingControlInterfaceVersionStubDispatcher(&RoutingControlStub::getInterfaceVersion, "uu");
205 * aborts an asynchronous action.
206 (at)return E_OK on success, E_UNKNOWN on error,
207 * E_NON_EXISTENT if handle was not found
209 static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
211 std::tuple<am_Handle_s>,
213 > asyncAbortStubDispatcher(&RoutingControlStub::asyncAbort, "");
215 * connects a source to a sink
216 (at)return E_OK on success, E_UNKNOWN on error,
217 * E_WRONG_FORMAT in case am_CustomConnectionFormat_t does not match
219 static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
221 std::tuple<am_Handle_s, am_connectionID_t, am_sourceID_t, am_sinkID_t, am_CustomConnectionFormat_t>,
223 > asyncConnectStubDispatcher(&RoutingControlStub::asyncConnect, "");
225 * disconnect a connection with given connectionID
226 (at)return E_OK on success,
227 * E_UNKNOWN on error, E_NON_EXISTENT if connection was not found
229 static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
231 std::tuple<am_Handle_s, am_connectionID_t>,
233 > asyncDisconnectStubDispatcher(&RoutingControlStub::asyncDisconnect, "");
235 * this method is used to set the volume of a sink. This function is used to drive
236 * ramps, to mute or unmute or directly set the value. The difference is made
237 * through the ramptype.
238 (at)return E_OK on success, E_UNKNOWN on error,
239 * E_OUT_OF_RANGE if new volume is out of range
241 static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
243 std::tuple<am_Handle_s, am_sinkID_t, am_volume_t, am_CustomRampType_t, am_time_t>,
245 > asyncSetSinkVolumeStubDispatcher(&RoutingControlStub::asyncSetSinkVolume, "");
247 * sets the volume of a source. This method is used to set the volume of a sink.
248 * This function is used to drive ramps, to mute or unmute or directly set the
249 * value. The difference is made through the ramptype.
251 * success, E_UNKNOWN on error, E_OUT_OF_RANGE if volume is out of
253 triggers the acknowledge ackSourceVolumeChange
255 static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
257 std::tuple<am_Handle_s, am_sourceID_t, am_volume_t, am_CustomRampType_t, am_time_t>,
259 > asyncSetSourceVolumeStubDispatcher(&RoutingControlStub::asyncSetSourceVolume, "");
261 * This function is used to set the source state of a particular
263 (at)return E_OK on success, E_UNKNOWN on error
265 static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
267 std::tuple<am_Handle_s, am_sourceID_t, am_SourceState_e>,
269 > asyncSetSourceStateStubDispatcher(&RoutingControlStub::asyncSetSourceState, "");
271 * this function sets the sinksoundproperty.
272 (at)return E_OK on success,
273 * E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
275 static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
277 std::tuple<am_Handle_s, am_sinkID_t, am_SoundProperty_L>,
279 > asyncSetSinkSoundPropertiesStubDispatcher(&RoutingControlStub::asyncSetSinkSoundProperties, "");
281 * this function sets the sinksoundproperty.
282 (at)return E_OK on success,
283 * E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
285 static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
287 std::tuple<am_Handle_s, am_sinkID_t, am_SoundProperty_s>,
289 > asyncSetSinkSoundPropertyStubDispatcher(&RoutingControlStub::asyncSetSinkSoundProperty, "");
291 * this function sets the sourcesoundproperty.
292 (at)return E_OK on success,
293 * E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
295 static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
297 std::tuple<am_Handle_s, am_sourceID_t, am_SoundProperty_L>,
299 > asyncSetSourceSoundPropertiesStubDispatcher(&RoutingControlStub::asyncSetSourceSoundProperties, "");
301 * this function sets the sourcesoundproperty.
302 (at)return E_OK on success,
303 * E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
305 static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
307 std::tuple<am_Handle_s, am_sourceID_t, am_SoundProperty_s>,
309 > asyncSetSourceSoundPropertyStubDispatcher(&RoutingControlStub::asyncSetSourceSoundProperty, "");
311 * this function triggers crossfading.
312 (at)return E_OK on success, E_UNKNOWN on
315 static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
317 std::tuple<am_Handle_s, am_crossfaderID_t, am_HotSink_e, am_CustomRampType_t, am_time_t>,
319 > asyncCrossFadeStubDispatcher(&RoutingControlStub::asyncCrossFade, "");
321 * this function is used for early and late audio functions to set the domain
323 (at)return E_OK on success, E_UNKNOWN on error
325 static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
327 std::tuple<am_domainID_t, am_DomainState_e>,
328 std::tuple<am_Error_e>
329 > setDomainStateStubDispatcher(&RoutingControlStub::setDomainState, "i");
330 static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
332 std::tuple<am_Handle_s, am_Volumes_L>,
334 > asyncSetVolumesStubDispatcher(&RoutingControlStub::asyncSetVolumes, "");
335 static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
337 std::tuple<am_Handle_s, am_sinkID_t, am_NotificationConfiguration_s>,
339 > asyncSetSinkNotificationConfigurationStubDispatcher(&RoutingControlStub::asyncSetSinkNotificationConfiguration, "");
340 static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
342 std::tuple<am_Handle_s, am_sourceID_t, am_NotificationConfiguration_s>,
344 > asyncSetSourceNotificationConfigurationStubDispatcher(&RoutingControlStub::asyncSetSourceNotificationConfiguration, "");
348 const RoutingControlDBusStubAdapterHelper::StubDispatcherTable& RoutingControlDBusStubAdapterInternal::getStubDispatcherTable() {
349 return stubDispatcherTable_;
353 RoutingControlDBusStubAdapterInternal::RoutingControlDBusStubAdapterInternal(
354 const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
355 const std::string& commonApiAddress,
356 const std::string& dbusInterfaceName,
357 const std::string& dbusBusName,
358 const std::string& dbusObjectPath,
359 const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
360 const std::shared_ptr<CommonAPI::StubBase>& stub):
361 CommonAPI::DBus::DBusStubAdapter(
369 RoutingControlDBusStubAdapterHelper(
376 std::dynamic_pointer_cast<RoutingControlStub>(stub),
378 stubDispatcherTable_({
380 * aborts an asynchronous action.
381 (at)return E_OK on success, E_UNKNOWN on error,
382 * E_NON_EXISTENT if handle was not found
384 { { "asyncAbort", "(iq)" }, &org::genivi::am::asyncAbortStubDispatcher },
386 * connects a source to a sink
387 (at)return E_OK on success, E_UNKNOWN on error,
388 * E_WRONG_FORMAT in case am_CustomConnectionFormat_t does not match
390 { { "asyncConnect", "(iq)qqqq" }, &org::genivi::am::asyncConnectStubDispatcher },
392 * disconnect a connection with given connectionID
393 (at)return E_OK on success,
394 * E_UNKNOWN on error, E_NON_EXISTENT if connection was not found
396 { { "asyncDisconnect", "(iq)q" }, &org::genivi::am::asyncDisconnectStubDispatcher },
398 * this method is used to set the volume of a sink. This function is used to drive
399 * ramps, to mute or unmute or directly set the value. The difference is made
400 * through the ramptype.
401 (at)return E_OK on success, E_UNKNOWN on error,
402 * E_OUT_OF_RANGE if new volume is out of range
404 { { "asyncSetSinkVolume", "(iq)qnqn" }, &org::genivi::am::asyncSetSinkVolumeStubDispatcher },
406 * sets the volume of a source. This method is used to set the volume of a sink.
407 * This function is used to drive ramps, to mute or unmute or directly set the
408 * value. The difference is made through the ramptype.
410 * success, E_UNKNOWN on error, E_OUT_OF_RANGE if volume is out of
412 triggers the acknowledge ackSourceVolumeChange
414 { { "asyncSetSourceVolume", "(iq)qnqn" }, &org::genivi::am::asyncSetSourceVolumeStubDispatcher },
416 * This function is used to set the source state of a particular
418 (at)return E_OK on success, E_UNKNOWN on error
420 { { "asyncSetSourceState", "(iq)qi" }, &org::genivi::am::asyncSetSourceStateStubDispatcher },
422 * this function sets the sinksoundproperty.
423 (at)return E_OK on success,
424 * E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
426 { { "asyncSetSinkSoundProperties", "(iq)qa(qn)" }, &org::genivi::am::asyncSetSinkSoundPropertiesStubDispatcher },
428 * this function sets the sinksoundproperty.
429 (at)return E_OK on success,
430 * E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
432 { { "asyncSetSinkSoundProperty", "(iq)q(qn)" }, &org::genivi::am::asyncSetSinkSoundPropertyStubDispatcher },
434 * this function sets the sourcesoundproperty.
435 (at)return E_OK on success,
436 * E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
438 { { "asyncSetSourceSoundProperties", "(iq)qa(qn)" }, &org::genivi::am::asyncSetSourceSoundPropertiesStubDispatcher },
440 * this function sets the sourcesoundproperty.
441 (at)return E_OK on success,
442 * E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
444 { { "asyncSetSourceSoundProperty", "(iq)q(qn)" }, &org::genivi::am::asyncSetSourceSoundPropertyStubDispatcher },
446 * this function triggers crossfading.
447 (at)return E_OK on success, E_UNKNOWN on
450 { { "asyncCrossFade", "(iq)qiqn" }, &org::genivi::am::asyncCrossFadeStubDispatcher },
452 * this function is used for early and late audio functions to set the domain
454 (at)return E_OK on success, E_UNKNOWN on error
456 { { "setDomainState", "qi" }, &org::genivi::am::setDomainStateStubDispatcher },
457 { { "asyncSetVolumes", "(iq)a(i(yv)nqn)" }, &org::genivi::am::asyncSetVolumesStubDispatcher },
458 { { "asyncSetSinkNotificationConfiguration", "(iq)q(qin)" }, &org::genivi::am::asyncSetSinkNotificationConfigurationStubDispatcher },
459 { { "asyncSetSourceNotificationConfiguration", "(iq)q(qin)" }, &org::genivi::am::asyncSetSourceNotificationConfigurationStubDispatcher }
462 stubDispatcherTable_.insert({ { "getInterfaceVersion", "" }, &org::genivi::am::getRoutingControlInterfaceVersionStubDispatcher });
466 } // namespace genivi