/* * This file was generated by the CommonAPI Generators. * Used org.genivi.commonapi.core 2.1.5.201312121915. * Used org.franca.core 0.8.11.201401091023. * * 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/. */ #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); } __attribute__((constructor)) void registerConsumerDBusStubAdapter(void) { 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" "\n" "\n" "\n" "\n" ; return introspectionData.c_str(); } static CommonAPI::DBus::DBusGetAttributeStubDispatcher< ConsumerStub, CommonAPI::Version > getConsumerInterfaceVersionStubDispatcher(&ConsumerStub::getInterfaceVersion, "uu"); static CommonAPI::DBus::DBusGetAttributeStubDispatcher< ConsumerStub, int32_t > getBootModeAttributeStubDispatcher(&ConsumerStub::getBootModeAttribute, "i"); static CommonAPI::DBus::DBusGetAttributeStubDispatcher< ConsumerStub, int32_t > getRestartReasonAttributeStubDispatcher(&ConsumerStub::getRestartReasonAttribute, "i"); static CommonAPI::DBus::DBusGetAttributeStubDispatcher< ConsumerStub, int32_t > getShutdownReasonAttributeStubDispatcher(&ConsumerStub::getShutdownReasonAttribute, "i"); static CommonAPI::DBus::DBusGetAttributeStubDispatcher< ConsumerStub, int32_t > getWakeUpReasonAttributeStubDispatcher(&ConsumerStub::getWakeUpReasonAttribute, "i"); static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< ConsumerStub, std::tuple<>, std::tuple > getAppHealthCountStubDispatcher(&ConsumerStub::GetAppHealthCount, "u"); static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< ConsumerStub, std::tuple, std::tuple > lifecycleRequestCompleteStubDispatcher(&ConsumerStub::LifecycleRequestComplete, "i"); static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< ConsumerStub, std::tuple<>, std::tuple > getInterfaceVersionStubDispatcher(&ConsumerStub::GetInterfaceVersion, "u"); static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< ConsumerStub, std::tuple<>, std::tuple > getApplicationModeStubDispatcher(&ConsumerStub::GetApplicationMode, "ii"); static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< ConsumerStub, std::tuple, std::tuple > unRegisterSessionStubDispatcher(&ConsumerStub::UnRegisterSession, "i"); static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< ConsumerStub, std::tuple, std::tuple > registerSessionStubDispatcher(&ConsumerStub::RegisterSession, "i"); static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< ConsumerStub, std::tuple, std::tuple > unRegisterShutdownClientStubDispatcher(&ConsumerStub::UnRegisterShutdownClient, "i"); static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< ConsumerStub, std::tuple, std::tuple > registerShutdownClientStubDispatcher(&ConsumerStub::RegisterShutdownClient, "i"); static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< ConsumerStub, std::tuple<>, std::tuple > getNodeStateStubDispatcher(&ConsumerStub::GetNodeState, "ii"); static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< ConsumerStub, std::tuple, std::tuple > getSessionStateStubDispatcher(&ConsumerStub::GetSessionState, "ii"); static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< ConsumerStub, std::tuple, std::tuple > 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_; } 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_({ { { "getBootModeAttribute", "" }, &org::genivi::NodeStateManager::getBootModeAttributeStubDispatcher }, { { "getRestartReasonAttribute", "" }, &org::genivi::NodeStateManager::getRestartReasonAttributeStubDispatcher }, { { "getShutdownReasonAttribute", "" }, &org::genivi::NodeStateManager::getShutdownReasonAttributeStubDispatcher }, { { "getWakeUpReasonAttribute", "" }, &org::genivi::NodeStateManager::getWakeUpReasonAttributeStubDispatcher } , { { "GetAppHealthCount", "" }, &org::genivi::NodeStateManager::getAppHealthCountStubDispatcher }, { { "LifecycleRequestComplete", "ui" }, &org::genivi::NodeStateManager::lifecycleRequestCompleteStubDispatcher }, { { "GetInterfaceVersion", "" }, &org::genivi::NodeStateManager::getInterfaceVersionStubDispatcher }, { { "GetApplicationMode", "" }, &org::genivi::NodeStateManager::getApplicationModeStubDispatcher }, { { "UnRegisterSession", "ssi" }, &org::genivi::NodeStateManager::unRegisterSessionStubDispatcher }, { { "RegisterSession", "ssii" }, &org::genivi::NodeStateManager::registerSessionStubDispatcher }, { { "UnRegisterShutdownClient", "ssu" }, &org::genivi::NodeStateManager::unRegisterShutdownClientStubDispatcher }, { { "RegisterShutdownClient", "ssuu" }, &org::genivi::NodeStateManager::registerShutdownClientStubDispatcher }, { { "GetNodeState", "" }, &org::genivi::NodeStateManager::getNodeStateStubDispatcher }, { { "GetSessionState", "si" }, &org::genivi::NodeStateManager::getSessionStateStubDispatcher }, { { "SetSessionState", "ssii" }, &org::genivi::NodeStateManager::setSessionStateStubDispatcher } }) { stubDispatcherTable_.insert({ { "getInterfaceVersion", "" }, &org::genivi::NodeStateManager::getConsumerInterfaceVersionStubDispatcher }); } } // namespace NodeStateManager } // namespace genivi } // namespace org