* Bug #100 - removed projecttypes.h which causes compiling conflicts
[profile/ivi/genivi/genivi-audio-manager.git] / AudioManagerDaemon / src-gen / org / genivi / NodeStateManager / LifeCycleConsumerDBusStubAdapter.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 "LifeCycleConsumerDBusStubAdapter.h"
11 #include <org/genivi/NodeStateManager/LifeCycleConsumer.h>
12
13 namespace org {
14 namespace genivi {
15 namespace NodeStateManager {
16
17 std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> createLifeCycleConsumerDBusStubAdapter(
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<LifeCycleConsumerDBusStubAdapter>(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection, stubBase);
26 }
27
28 __attribute__((constructor)) void registerLifeCycleConsumerDBusStubAdapter(void) {
29     CommonAPI::DBus::DBusFactory::registerAdapterFactoryMethod(LifeCycleConsumer::getInterfaceId(),
30                                                                &createLifeCycleConsumerDBusStubAdapter);
31 }
32
33
34
35 LifeCycleConsumerDBusStubAdapterInternal::~LifeCycleConsumerDBusStubAdapterInternal() {
36     deactivateManagedInstances();
37     LifeCycleConsumerDBusStubAdapterHelper::deinit();
38 }
39
40 void LifeCycleConsumerDBusStubAdapterInternal::deactivateManagedInstances() {
41 }
42
43 const char* LifeCycleConsumerDBusStubAdapterInternal::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         "<method name=\"LifecycleRequest\">\n"
49             "<arg name=\"Request\" type=\"u\" direction=\"in\" />\n"
50             "<arg name=\"RequestId\" type=\"u\" direction=\"in\" />\n"
51             "<arg name=\"ErrorCode\" type=\"i\" direction=\"out\" />\n"
52         "</method>\n"
53
54     ;
55     return introspectionData.c_str();
56 }
57
58 static CommonAPI::DBus::DBusGetAttributeStubDispatcher<
59         LifeCycleConsumerStub,
60         CommonAPI::Version
61         > getLifeCycleConsumerInterfaceVersionStubDispatcher(&LifeCycleConsumerStub::getInterfaceVersion, "uu");
62
63
64 static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
65     LifeCycleConsumerStub,
66     std::tuple<uint32_t, uint32_t>,
67     std::tuple<int32_t>
68     > lifecycleRequestStubDispatcher(&LifeCycleConsumerStub::LifecycleRequest, "i");
69
70
71
72 const LifeCycleConsumerDBusStubAdapterHelper::StubDispatcherTable& LifeCycleConsumerDBusStubAdapterInternal::getStubDispatcherTable() {
73     return stubDispatcherTable_;
74 }
75
76
77 LifeCycleConsumerDBusStubAdapterInternal::LifeCycleConsumerDBusStubAdapterInternal(
78         const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
79         const std::string& commonApiAddress,
80         const std::string& dbusInterfaceName,
81         const std::string& dbusBusName,
82         const std::string& dbusObjectPath,
83         const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
84         const std::shared_ptr<CommonAPI::StubBase>& stub):
85         CommonAPI::DBus::DBusStubAdapter(
86                 factory,
87                 commonApiAddress,
88                 dbusInterfaceName,
89                 dbusBusName,
90                 dbusObjectPath,
91                 dbusConnection,
92                 false),
93         LifeCycleConsumerDBusStubAdapterHelper(
94             factory,
95             commonApiAddress,
96             dbusInterfaceName,
97             dbusBusName,
98             dbusObjectPath,
99             dbusConnection,
100             std::dynamic_pointer_cast<LifeCycleConsumerStub>(stub),
101             false),
102         stubDispatcherTable_({
103             { { "LifecycleRequest", "uu" }, &org::genivi::NodeStateManager::lifecycleRequestStubDispatcher }
104             }) {
105
106     stubDispatcherTable_.insert({ { "getInterfaceVersion", "" }, &org::genivi::NodeStateManager::getLifeCycleConsumerInterfaceVersionStubDispatcher });
107 }
108
109 } // namespace NodeStateManager
110 } // namespace genivi
111 } // namespace org