* Bug #100 - removed projecttypes.h which causes compiling conflicts
[profile/ivi/genivi/genivi-audio-manager.git] / PluginRoutingInterfaceCAPI / src-gen / org / genivi / am / RoutingControlDBusStubAdapter.cpp
1 /*
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.
5 *
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/.
9 */
10 #include "RoutingControlDBusStubAdapter.h"
11 #include <org/genivi/am/RoutingControl.h>
12
13 namespace org {
14 namespace genivi {
15 namespace am {
16
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);
26 }
27
28 __attribute__((constructor)) void registerRoutingControlDBusStubAdapter(void) {
29     CommonAPI::DBus::DBusFactory::registerAdapterFactoryMethod(RoutingControl::getInterfaceId(),
30                                                                &createRoutingControlDBusStubAdapter);
31 }
32
33
34
35 RoutingControlDBusStubAdapterInternal::~RoutingControlDBusStubAdapterInternal() {
36     deactivateManagedInstances();
37     RoutingControlDBusStubAdapterHelper::deinit();
38 }
39
40 void RoutingControlDBusStubAdapterInternal::deactivateManagedInstances() {
41 }
42
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\" />"
47         "</method>\n"
48         /**
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
52          */
53         "<method name=\"asyncAbort\">\n"
54             "<arg name=\"handle\" type=\"(iq)\" direction=\"in\" />\n"
55         "</method>\n"
56         /**
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
60          */
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"
67         "</method>\n"
68         /**
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
72          */
73         "<method name=\"asyncDisconnect\">\n"
74             "<arg name=\"handle\" type=\"(iq)\" direction=\"in\" />\n"
75             "<arg name=\"connectionID\" type=\"q\" direction=\"in\" />\n"
76         "</method>\n"
77         /**
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
83          */
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"
90         "</method>\n"
91         /**
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.
95         (at)return E_OK on
96          *  success, E_UNKNOWN on error, E_OUT_OF_RANGE if volume is out of
97          *  range.
98         triggers the acknowledge ackSourceVolumeChange
99          */
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"
106         "</method>\n"
107         /**
108          * This function is used to set the source state of a particular
109          *  source.
110         (at)return E_OK on success, E_UNKNOWN on error
111          */
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"
116         "</method>\n"
117         /**
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
121          */
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"
126         "</method>\n"
127         /**
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
131          */
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"
136         "</method>\n"
137         /**
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
141          */
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"
146         "</method>\n"
147         /**
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
151          */
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"
156         "</method>\n"
157         /**
158          * this function triggers crossfading.
159         (at)return E_OK on success, E_UNKNOWN on
160          *  error
161          */
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"
168         "</method>\n"
169         /**
170          * this function is used for early and late audio functions to set the domain
171          *  state
172         (at)return E_OK on success, E_UNKNOWN on error
173          */
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"
178         "</method>\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"
182         "</method>\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"
187         "</method>\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"
192         "</method>\n"
193
194     ;
195     return introspectionData.c_str();
196 }
197
198 static CommonAPI::DBus::DBusGetAttributeStubDispatcher<
199         RoutingControlStub,
200         CommonAPI::Version
201         > getRoutingControlInterfaceVersionStubDispatcher(&RoutingControlStub::getInterfaceVersion, "uu");
202
203
204 /**
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
208  */
209 static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
210     RoutingControlStub,
211     std::tuple<am_Handle_s>,
212     std::tuple<>
213     > asyncAbortStubDispatcher(&RoutingControlStub::asyncAbort, "");
214 /**
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
218  */
219 static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
220     RoutingControlStub,
221     std::tuple<am_Handle_s, am_connectionID_t, am_sourceID_t, am_sinkID_t, am_CustomConnectionFormat_t>,
222     std::tuple<>
223     > asyncConnectStubDispatcher(&RoutingControlStub::asyncConnect, "");
224 /**
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
228  */
229 static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
230     RoutingControlStub,
231     std::tuple<am_Handle_s, am_connectionID_t>,
232     std::tuple<>
233     > asyncDisconnectStubDispatcher(&RoutingControlStub::asyncDisconnect, "");
234 /**
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
240  */
241 static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
242     RoutingControlStub,
243     std::tuple<am_Handle_s, am_sinkID_t, am_volume_t, am_CustomRampType_t, am_time_t>,
244     std::tuple<>
245     > asyncSetSinkVolumeStubDispatcher(&RoutingControlStub::asyncSetSinkVolume, "");
246 /**
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.
250 (at)return E_OK on
251  *  success, E_UNKNOWN on error, E_OUT_OF_RANGE if volume is out of
252  *  range.
253 triggers the acknowledge ackSourceVolumeChange
254  */
255 static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
256     RoutingControlStub,
257     std::tuple<am_Handle_s, am_sourceID_t, am_volume_t, am_CustomRampType_t, am_time_t>,
258     std::tuple<>
259     > asyncSetSourceVolumeStubDispatcher(&RoutingControlStub::asyncSetSourceVolume, "");
260 /**
261  * This function is used to set the source state of a particular
262  *  source.
263 (at)return E_OK on success, E_UNKNOWN on error
264  */
265 static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
266     RoutingControlStub,
267     std::tuple<am_Handle_s, am_sourceID_t, am_SourceState_e>,
268     std::tuple<>
269     > asyncSetSourceStateStubDispatcher(&RoutingControlStub::asyncSetSourceState, "");
270 /**
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
274  */
275 static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
276     RoutingControlStub,
277     std::tuple<am_Handle_s, am_sinkID_t, am_SoundProperty_L>,
278     std::tuple<>
279     > asyncSetSinkSoundPropertiesStubDispatcher(&RoutingControlStub::asyncSetSinkSoundProperties, "");
280 /**
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
284  */
285 static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
286     RoutingControlStub,
287     std::tuple<am_Handle_s, am_sinkID_t, am_SoundProperty_s>,
288     std::tuple<>
289     > asyncSetSinkSoundPropertyStubDispatcher(&RoutingControlStub::asyncSetSinkSoundProperty, "");
290 /**
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
294  */
295 static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
296     RoutingControlStub,
297     std::tuple<am_Handle_s, am_sourceID_t, am_SoundProperty_L>,
298     std::tuple<>
299     > asyncSetSourceSoundPropertiesStubDispatcher(&RoutingControlStub::asyncSetSourceSoundProperties, "");
300 /**
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
304  */
305 static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
306     RoutingControlStub,
307     std::tuple<am_Handle_s, am_sourceID_t, am_SoundProperty_s>,
308     std::tuple<>
309     > asyncSetSourceSoundPropertyStubDispatcher(&RoutingControlStub::asyncSetSourceSoundProperty, "");
310 /**
311  * this function triggers crossfading.
312 (at)return E_OK on success, E_UNKNOWN on
313  *  error
314  */
315 static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
316     RoutingControlStub,
317     std::tuple<am_Handle_s, am_crossfaderID_t, am_HotSink_e, am_CustomRampType_t, am_time_t>,
318     std::tuple<>
319     > asyncCrossFadeStubDispatcher(&RoutingControlStub::asyncCrossFade, "");
320 /**
321  * this function is used for early and late audio functions to set the domain
322  *  state
323 (at)return E_OK on success, E_UNKNOWN on error
324  */
325 static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
326     RoutingControlStub,
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<
331     RoutingControlStub,
332     std::tuple<am_Handle_s, am_Volumes_L>,
333     std::tuple<>
334     > asyncSetVolumesStubDispatcher(&RoutingControlStub::asyncSetVolumes, "");
335 static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
336     RoutingControlStub,
337     std::tuple<am_Handle_s, am_sinkID_t, am_NotificationConfiguration_s>,
338     std::tuple<>
339     > asyncSetSinkNotificationConfigurationStubDispatcher(&RoutingControlStub::asyncSetSinkNotificationConfiguration, "");
340 static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
341     RoutingControlStub,
342     std::tuple<am_Handle_s, am_sourceID_t, am_NotificationConfiguration_s>,
343     std::tuple<>
344     > asyncSetSourceNotificationConfigurationStubDispatcher(&RoutingControlStub::asyncSetSourceNotificationConfiguration, "");
345
346
347
348 const RoutingControlDBusStubAdapterHelper::StubDispatcherTable& RoutingControlDBusStubAdapterInternal::getStubDispatcherTable() {
349     return stubDispatcherTable_;
350 }
351
352
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(
362                 factory,
363                 commonApiAddress,
364                 dbusInterfaceName,
365                 dbusBusName,
366                 dbusObjectPath,
367                 dbusConnection,
368                 false),
369         RoutingControlDBusStubAdapterHelper(
370             factory,
371             commonApiAddress,
372             dbusInterfaceName,
373             dbusBusName,
374             dbusObjectPath,
375             dbusConnection,
376             std::dynamic_pointer_cast<RoutingControlStub>(stub),
377             false),
378         stubDispatcherTable_({
379             /**
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
383              */
384             { { "asyncAbort", "(iq)" }, &org::genivi::am::asyncAbortStubDispatcher },
385             /**
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
389              */
390             { { "asyncConnect", "(iq)qqqq" }, &org::genivi::am::asyncConnectStubDispatcher },
391             /**
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
395              */
396             { { "asyncDisconnect", "(iq)q" }, &org::genivi::am::asyncDisconnectStubDispatcher },
397             /**
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
403              */
404             { { "asyncSetSinkVolume", "(iq)qnqn" }, &org::genivi::am::asyncSetSinkVolumeStubDispatcher },
405             /**
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.
409             (at)return E_OK on
410              *  success, E_UNKNOWN on error, E_OUT_OF_RANGE if volume is out of
411              *  range.
412             triggers the acknowledge ackSourceVolumeChange
413              */
414             { { "asyncSetSourceVolume", "(iq)qnqn" }, &org::genivi::am::asyncSetSourceVolumeStubDispatcher },
415             /**
416              * This function is used to set the source state of a particular
417              *  source.
418             (at)return E_OK on success, E_UNKNOWN on error
419              */
420             { { "asyncSetSourceState", "(iq)qi" }, &org::genivi::am::asyncSetSourceStateStubDispatcher },
421             /**
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
425              */
426             { { "asyncSetSinkSoundProperties", "(iq)qa(qn)" }, &org::genivi::am::asyncSetSinkSoundPropertiesStubDispatcher },
427             /**
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
431              */
432             { { "asyncSetSinkSoundProperty", "(iq)q(qn)" }, &org::genivi::am::asyncSetSinkSoundPropertyStubDispatcher },
433             /**
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
437              */
438             { { "asyncSetSourceSoundProperties", "(iq)qa(qn)" }, &org::genivi::am::asyncSetSourceSoundPropertiesStubDispatcher },
439             /**
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
443              */
444             { { "asyncSetSourceSoundProperty", "(iq)q(qn)" }, &org::genivi::am::asyncSetSourceSoundPropertyStubDispatcher },
445             /**
446              * this function triggers crossfading.
447             (at)return E_OK on success, E_UNKNOWN on
448              *  error
449              */
450             { { "asyncCrossFade", "(iq)qiqn" }, &org::genivi::am::asyncCrossFadeStubDispatcher },
451             /**
452              * this function is used for early and late audio functions to set the domain
453              *  state
454             (at)return E_OK on success, E_UNKNOWN on error
455              */
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 }
460             }) {
461
462     stubDispatcherTable_.insert({ { "getInterfaceVersion", "" }, &org::genivi::am::getRoutingControlInterfaceVersionStubDispatcher });
463 }
464
465 } // namespace am
466 } // namespace genivi
467 } // namespace org