/* * This file was generated by the CommonAPI Generators. * Used org.genivi.commonapi.core 2.1.6.v20140519. * Used org.franca.core 0.8.11.201401091023. * * Copyright (C) 2012, BMW AG * * This file is part of GENIVI Project AudioManager. * * Contributions are licensed to the GENIVI Alliance under one or more * Contribution License Agreements. * * \copyright * This Source Code Form is subject to the terms of the * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with * this file, You can obtain one at http://mozilla.org/MPL/2.0/. * * * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 * * For further information see http://www.genivi.org/. */ #include "ConsumerDBusStubAdapter.h" #include namespace org { namespace genivi { namespace NodeStateManager { std::shared_ptr createConsumerDBusStubAdapter( const std::shared_ptr& factory, const std::string& commonApiAddress, const std::string& interfaceName, const std::string& busName, const std::string& objectPath, const std::shared_ptr& dbusProxyConnection, const std::shared_ptr& stubBase) { return std::make_shared(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection, stubBase); } INITIALIZER(registerConsumerDBusStubAdapter) { CommonAPI::DBus::DBusFactory::registerAdapterFactoryMethod(Consumer::getInterfaceId(), &createConsumerDBusStubAdapter); } ConsumerDBusStubAdapterInternal::~ConsumerDBusStubAdapterInternal() { deactivateManagedInstances(); ConsumerDBusStubAdapterHelper::deinit(); } void ConsumerDBusStubAdapterInternal::deactivateManagedInstances() { } const char* ConsumerDBusStubAdapterInternal::getMethodsDBusIntrospectionXmlData() const { static const std::string introspectionData = "\n" "" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" ; return introspectionData.c_str(); } CommonAPI::DBus::DBusGetAttributeStubDispatcher< ConsumerStub, CommonAPI::Version > ConsumerDBusStubAdapterInternal::getConsumerInterfaceVersionStubDispatcher(&ConsumerStub::getInterfaceVersion, "uu"); CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher< ConsumerStub, int32_t > ConsumerDBusStubAdapterInternal::getBootModeAttributeStubDispatcher(&ConsumerStub::getBootModeAttribute); CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher< ConsumerStub, int32_t > ConsumerDBusStubAdapterInternal::getRestartReasonAttributeStubDispatcher(&ConsumerStub::getRestartReasonAttribute); CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher< ConsumerStub, int32_t > ConsumerDBusStubAdapterInternal::getShutdownReasonAttributeStubDispatcher(&ConsumerStub::getShutdownReasonAttribute); CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher< ConsumerStub, int32_t > ConsumerDBusStubAdapterInternal::getWakeUpReasonAttributeStubDispatcher(&ConsumerStub::getWakeUpReasonAttribute); CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< ConsumerStub, std::tuple<>, std::tuple > ConsumerDBusStubAdapterInternal::getAppHealthCountStubDispatcher(&ConsumerStub::GetAppHealthCount, "u"); CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< ConsumerStub, std::tuple, std::tuple > ConsumerDBusStubAdapterInternal::lifecycleRequestCompleteStubDispatcher(&ConsumerStub::LifecycleRequestComplete, "i"); CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< ConsumerStub, std::tuple<>, std::tuple > ConsumerDBusStubAdapterInternal::getInterfaceVersionStubDispatcher(&ConsumerStub::GetInterfaceVersion, "u"); CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< ConsumerStub, std::tuple<>, std::tuple > ConsumerDBusStubAdapterInternal::getApplicationModeStubDispatcher(&ConsumerStub::GetApplicationMode, "ii"); CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< ConsumerStub, std::tuple, std::tuple > ConsumerDBusStubAdapterInternal::unRegisterSessionStubDispatcher(&ConsumerStub::UnRegisterSession, "i"); CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< ConsumerStub, std::tuple, std::tuple > ConsumerDBusStubAdapterInternal::registerSessionStubDispatcher(&ConsumerStub::RegisterSession, "i"); CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< ConsumerStub, std::tuple, std::tuple > ConsumerDBusStubAdapterInternal::unRegisterShutdownClientStubDispatcher(&ConsumerStub::UnRegisterShutdownClient, "i"); CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< ConsumerStub, std::tuple, std::tuple > ConsumerDBusStubAdapterInternal::registerShutdownClientStubDispatcher(&ConsumerStub::RegisterShutdownClient, "i"); CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< ConsumerStub, std::tuple<>, std::tuple > ConsumerDBusStubAdapterInternal::getNodeStateStubDispatcher(&ConsumerStub::GetNodeState, "ii"); CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< ConsumerStub, std::tuple, std::tuple > ConsumerDBusStubAdapterInternal::getSessionStateStubDispatcher(&ConsumerStub::GetSessionState, "ii"); CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< ConsumerStub, std::tuple, std::tuple > ConsumerDBusStubAdapterInternal::setSessionStateStubDispatcher(&ConsumerStub::SetSessionState, "i"); void ConsumerDBusStubAdapterInternal::fireNodeApplicationModeEvent(const int32_t& ApplicationModeId) { CommonAPI::DBus::DBusStubSignalHelper> ::sendSignal( *this, "NodeApplicationMode", "i", ApplicationModeId ); } void ConsumerDBusStubAdapterInternal::fireSessionStateChangedEvent(const std::string& SessionStateName, const int32_t& SeatID, const int32_t& SessionState) { CommonAPI::DBus::DBusStubSignalHelper> ::sendSignal( *this, "SessionStateChanged", "sii", SessionStateName, SeatID, SessionState ); } void ConsumerDBusStubAdapterInternal::fireNodeStateEvent(const int32_t& NodeState) { CommonAPI::DBus::DBusStubSignalHelper> ::sendSignal( *this, "NodeState", "i", NodeState ); } const ConsumerDBusStubAdapterHelper::StubDispatcherTable& ConsumerDBusStubAdapterInternal::getStubDispatcherTable() { return stubDispatcherTable_; } const CommonAPI::DBus::StubAttributeTable& ConsumerDBusStubAdapterInternal::getStubAttributeTable() { return stubAttributeTable_; } ConsumerDBusStubAdapterInternal::ConsumerDBusStubAdapterInternal( const std::shared_ptr& factory, const std::string& commonApiAddress, const std::string& dbusInterfaceName, const std::string& dbusBusName, const std::string& dbusObjectPath, const std::shared_ptr& dbusConnection, const std::shared_ptr& stub): CommonAPI::DBus::DBusStubAdapter( factory, commonApiAddress, dbusInterfaceName, dbusBusName, dbusObjectPath, dbusConnection, false), ConsumerDBusStubAdapterHelper( factory, commonApiAddress, dbusInterfaceName, dbusBusName, dbusObjectPath, dbusConnection, std::dynamic_pointer_cast(stub), false), stubDispatcherTable_({ { { "GetAppHealthCount", "" }, &org::genivi::NodeStateManager::ConsumerDBusStubAdapterInternal::getAppHealthCountStubDispatcher }, { { "LifecycleRequestComplete", "ui" }, &org::genivi::NodeStateManager::ConsumerDBusStubAdapterInternal::lifecycleRequestCompleteStubDispatcher }, { { "GetInterfaceVersion", "" }, &org::genivi::NodeStateManager::ConsumerDBusStubAdapterInternal::getInterfaceVersionStubDispatcher }, { { "GetApplicationMode", "" }, &org::genivi::NodeStateManager::ConsumerDBusStubAdapterInternal::getApplicationModeStubDispatcher }, { { "UnRegisterSession", "ssi" }, &org::genivi::NodeStateManager::ConsumerDBusStubAdapterInternal::unRegisterSessionStubDispatcher }, { { "RegisterSession", "ssii" }, &org::genivi::NodeStateManager::ConsumerDBusStubAdapterInternal::registerSessionStubDispatcher }, { { "UnRegisterShutdownClient", "ssu" }, &org::genivi::NodeStateManager::ConsumerDBusStubAdapterInternal::unRegisterShutdownClientStubDispatcher }, { { "RegisterShutdownClient", "ssuu" }, &org::genivi::NodeStateManager::ConsumerDBusStubAdapterInternal::registerShutdownClientStubDispatcher }, { { "GetNodeState", "" }, &org::genivi::NodeStateManager::ConsumerDBusStubAdapterInternal::getNodeStateStubDispatcher }, { { "GetSessionState", "si" }, &org::genivi::NodeStateManager::ConsumerDBusStubAdapterInternal::getSessionStateStubDispatcher }, { { "SetSessionState", "ssii" }, &org::genivi::NodeStateManager::ConsumerDBusStubAdapterInternal::setSessionStateStubDispatcher } }), stubAttributeTable_({ { "BootMode", { &org::genivi::NodeStateManager::ConsumerDBusStubAdapterInternal::getBootModeAttributeStubDispatcher, NULL } }, { "RestartReason", { &org::genivi::NodeStateManager::ConsumerDBusStubAdapterInternal::getRestartReasonAttributeStubDispatcher, NULL } }, { "ShutdownReason", { &org::genivi::NodeStateManager::ConsumerDBusStubAdapterInternal::getShutdownReasonAttributeStubDispatcher, NULL } }, { "WakeUpReason", { &org::genivi::NodeStateManager::ConsumerDBusStubAdapterInternal::getWakeUpReasonAttributeStubDispatcher, NULL } } } ) { stubDispatcherTable_.insert({ { "getInterfaceVersion", "" }, &org::genivi::NodeStateManager::ConsumerDBusStubAdapterInternal::getConsumerInterfaceVersionStubDispatcher }); } const bool ConsumerDBusStubAdapterInternal::hasFreedesktopProperties() { return true; } } // namespace NodeStateManager } // namespace genivi } // namespace org