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 "LifeCycleConsumerDBusStubAdapter.h"
11 #include <org/genivi/NodeStateManager/LifeCycleConsumer.h>
15 namespace NodeStateManager {
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);
28 __attribute__((constructor)) void registerLifeCycleConsumerDBusStubAdapter(void) {
29 CommonAPI::DBus::DBusFactory::registerAdapterFactoryMethod(LifeCycleConsumer::getInterfaceId(),
30 &createLifeCycleConsumerDBusStubAdapter);
35 LifeCycleConsumerDBusStubAdapterInternal::~LifeCycleConsumerDBusStubAdapterInternal() {
36 deactivateManagedInstances();
37 LifeCycleConsumerDBusStubAdapterHelper::deinit();
40 void LifeCycleConsumerDBusStubAdapterInternal::deactivateManagedInstances() {
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\" />"
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"
55 return introspectionData.c_str();
58 static CommonAPI::DBus::DBusGetAttributeStubDispatcher<
59 LifeCycleConsumerStub,
61 > getLifeCycleConsumerInterfaceVersionStubDispatcher(&LifeCycleConsumerStub::getInterfaceVersion, "uu");
64 static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
65 LifeCycleConsumerStub,
66 std::tuple<uint32_t, uint32_t>,
68 > lifecycleRequestStubDispatcher(&LifeCycleConsumerStub::LifecycleRequest, "i");
72 const LifeCycleConsumerDBusStubAdapterHelper::StubDispatcherTable& LifeCycleConsumerDBusStubAdapterInternal::getStubDispatcherTable() {
73 return stubDispatcherTable_;
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(
93 LifeCycleConsumerDBusStubAdapterHelper(
100 std::dynamic_pointer_cast<LifeCycleConsumerStub>(stub),
102 stubDispatcherTable_({
103 { { "LifecycleRequest", "uu" }, &org::genivi::NodeStateManager::lifecycleRequestStubDispatcher }
106 stubDispatcherTable_.insert({ { "getInterfaceVersion", "" }, &org::genivi::NodeStateManager::getLifeCycleConsumerInterfaceVersionStubDispatcher });
109 } // namespace NodeStateManager
110 } // namespace genivi