diff options
Diffstat (limited to 'AudioManagerDaemon')
20 files changed, 0 insertions, 2937 deletions
diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer.h b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer.h deleted file mode 100644 index 916c744..0000000 --- a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer.h +++ /dev/null @@ -1,64 +0,0 @@ -/* -* 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/. -*/ -/** - * @author Christian Linke - */ -#ifndef ORG_GENIVI_NODESTATEMANAGER_Consumer_H_ -#define ORG_GENIVI_NODESTATEMANAGER_Consumer_H_ - - - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <CommonAPI/types.h> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace org { -namespace genivi { -namespace NodeStateManager { - -class Consumer { - public: - virtual ~Consumer() { } - - static inline const char* getInterfaceId(); - static inline CommonAPI::Version getInterfaceVersion(); -}; - -const char* Consumer::getInterfaceId() { - static const char* interfaceId = "org.genivi.NodeStateManager.Consumer"; - return interfaceId; -} - -CommonAPI::Version Consumer::getInterfaceVersion() { - return CommonAPI::Version(1, 0); -} - - -} // namespace NodeStateManager -} // namespace genivi -} // namespace org - -namespace CommonAPI { - -} - - -namespace std { - //hashes for types - - //hashes for error types -} - -#endif // ORG_GENIVI_NODESTATEMANAGER_Consumer_H_ diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerDBusProxy.cpp b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerDBusProxy.cpp deleted file mode 100644 index 6971e07..0000000 --- a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerDBusProxy.cpp +++ /dev/null @@ -1,286 +0,0 @@ -/* -* 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/. -*/ -/** - * @author Christian Linke - */ -#include "ConsumerDBusProxy.h" - -namespace org { -namespace genivi { -namespace NodeStateManager { - -std::shared_ptr<CommonAPI::DBus::DBusProxy> createConsumerDBusProxy( - const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory, - const std::string& commonApiAddress, - const std::string& interfaceName, - const std::string& busName, - const std::string& objectPath, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection) { - return std::make_shared<ConsumerDBusProxy>(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection); -} - -__attribute__((constructor)) void registerConsumerDBusProxy(void) { - CommonAPI::DBus::DBusFactory::registerProxyFactoryMethod(Consumer::getInterfaceId(), - &createConsumerDBusProxy); -} - -ConsumerDBusProxy::ConsumerDBusProxy( - const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory, - const std::string& commonApiAddress, - const std::string& interfaceName, - const std::string& busName, - const std::string& objectPath, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection): - CommonAPI::DBus::DBusProxy(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyconnection) -,bootMode_(*this, "i", "getBootModeAttribute"), -restartReason_(*this, "i", "getRestartReasonAttribute"), -shutdownReason_(*this, "i", "getShutdownReasonAttribute"), -wakeUpReason_(*this, "i", "getWakeUpReasonAttribute") -, nodeApplicationMode_(*this, "NodeApplicationMode", "i"), - sessionStateChanged_(*this, "SessionStateChanged", "sii"), - nodeState_(*this, "NodeState", "i") - { - } - -ConsumerDBusProxy::BootModeAttribute& ConsumerDBusProxy::getBootModeAttribute() { - return bootMode_; -} -ConsumerDBusProxy::RestartReasonAttribute& ConsumerDBusProxy::getRestartReasonAttribute() { - return restartReason_; -} -ConsumerDBusProxy::ShutdownReasonAttribute& ConsumerDBusProxy::getShutdownReasonAttribute() { - return shutdownReason_; -} -ConsumerDBusProxy::WakeUpReasonAttribute& ConsumerDBusProxy::getWakeUpReasonAttribute() { - return wakeUpReason_; -} - -ConsumerDBusProxy::NodeApplicationModeEvent& ConsumerDBusProxy::getNodeApplicationModeEvent() { - return nodeApplicationMode_; -} -ConsumerDBusProxy::SessionStateChangedEvent& ConsumerDBusProxy::getSessionStateChangedEvent() { - return sessionStateChanged_; -} -ConsumerDBusProxy::NodeStateEvent& ConsumerDBusProxy::getNodeStateEvent() { - return nodeState_; -} - -void ConsumerDBusProxy::GetAppHealthCount(CommonAPI::CallStatus& callStatus, uint32_t& Count) { - CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>, - CommonAPI::DBus::DBusSerializableArguments<uint32_t> >::callMethodWithReply( - *this, - "GetAppHealthCount", - "", - callStatus - , Count); -} -std::future<CommonAPI::CallStatus> ConsumerDBusProxy::GetAppHealthCountAsync(GetAppHealthCountAsyncCallback callback) { - return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>, - CommonAPI::DBus::DBusSerializableArguments<uint32_t> >::callMethodAsync( - *this, - "GetAppHealthCount", - "", - std::move(callback)); -} -void ConsumerDBusProxy::LifecycleRequestComplete(const uint32_t& RequestId, const int32_t& Status, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) { - CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint32_t, int32_t>, - CommonAPI::DBus::DBusSerializableArguments<int32_t> >::callMethodWithReply( - *this, - "LifecycleRequestComplete", - "ui", - RequestId, Status, - callStatus - , ErrorCode); -} -std::future<CommonAPI::CallStatus> ConsumerDBusProxy::LifecycleRequestCompleteAsync(const uint32_t& RequestId, const int32_t& Status, LifecycleRequestCompleteAsyncCallback callback) { - return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint32_t, int32_t>, - CommonAPI::DBus::DBusSerializableArguments<int32_t> >::callMethodAsync( - *this, - "LifecycleRequestComplete", - "ui", - RequestId, Status, - std::move(callback)); -} -void ConsumerDBusProxy::GetInterfaceVersion(CommonAPI::CallStatus& callStatus, uint32_t& Version) { - CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>, - CommonAPI::DBus::DBusSerializableArguments<uint32_t> >::callMethodWithReply( - *this, - "GetInterfaceVersion", - "", - callStatus - , Version); -} -std::future<CommonAPI::CallStatus> ConsumerDBusProxy::GetInterfaceVersionAsync(GetInterfaceVersionAsyncCallback callback) { - return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>, - CommonAPI::DBus::DBusSerializableArguments<uint32_t> >::callMethodAsync( - *this, - "GetInterfaceVersion", - "", - std::move(callback)); -} -void ConsumerDBusProxy::GetApplicationMode(CommonAPI::CallStatus& callStatus, int32_t& ErrorCode, int32_t& ApplicationModeId) { - CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>, - CommonAPI::DBus::DBusSerializableArguments<int32_t, int32_t> >::callMethodWithReply( - *this, - "GetApplicationMode", - "", - callStatus - , ErrorCode, ApplicationModeId); -} -std::future<CommonAPI::CallStatus> ConsumerDBusProxy::GetApplicationModeAsync(GetApplicationModeAsyncCallback callback) { - return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>, - CommonAPI::DBus::DBusSerializableArguments<int32_t, int32_t> >::callMethodAsync( - *this, - "GetApplicationMode", - "", - std::move(callback)); -} -void ConsumerDBusProxy::UnRegisterSession(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) { - CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string, std::string, int32_t>, - CommonAPI::DBus::DBusSerializableArguments<int32_t> >::callMethodWithReply( - *this, - "UnRegisterSession", - "ssi", - SessionName, SessionOwner, SeatID, - callStatus - , ErrorCode); -} -std::future<CommonAPI::CallStatus> ConsumerDBusProxy::UnRegisterSessionAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, UnRegisterSessionAsyncCallback callback) { - return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string, std::string, int32_t>, - CommonAPI::DBus::DBusSerializableArguments<int32_t> >::callMethodAsync( - *this, - "UnRegisterSession", - "ssi", - SessionName, SessionOwner, SeatID, - std::move(callback)); -} -void ConsumerDBusProxy::RegisterSession(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) { - CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string, std::string, int32_t, int32_t>, - CommonAPI::DBus::DBusSerializableArguments<int32_t> >::callMethodWithReply( - *this, - "RegisterSession", - "ssii", - SessionName, SessionOwner, SeatID, SessionState, - callStatus - , ErrorCode); -} -std::future<CommonAPI::CallStatus> ConsumerDBusProxy::RegisterSessionAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, RegisterSessionAsyncCallback callback) { - return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string, std::string, int32_t, int32_t>, - CommonAPI::DBus::DBusSerializableArguments<int32_t> >::callMethodAsync( - *this, - "RegisterSession", - "ssii", - SessionName, SessionOwner, SeatID, SessionState, - std::move(callback)); -} -void ConsumerDBusProxy::UnRegisterShutdownClient(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) { - CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string, std::string, uint32_t>, - CommonAPI::DBus::DBusSerializableArguments<int32_t> >::callMethodWithReply( - *this, - "UnRegisterShutdownClient", - "ssu", - BusName, ObjName, ShutdownMode, - callStatus - , ErrorCode); -} -std::future<CommonAPI::CallStatus> ConsumerDBusProxy::UnRegisterShutdownClientAsync(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, UnRegisterShutdownClientAsyncCallback callback) { - return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string, std::string, uint32_t>, - CommonAPI::DBus::DBusSerializableArguments<int32_t> >::callMethodAsync( - *this, - "UnRegisterShutdownClient", - "ssu", - BusName, ObjName, ShutdownMode, - std::move(callback)); -} -void ConsumerDBusProxy::RegisterShutdownClient(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, const uint32_t& TimeoutMs, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) { - CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string, std::string, uint32_t, uint32_t>, - CommonAPI::DBus::DBusSerializableArguments<int32_t> >::callMethodWithReply( - *this, - "RegisterShutdownClient", - "ssuu", - BusName, ObjName, ShutdownMode, TimeoutMs, - callStatus - , ErrorCode); -} -std::future<CommonAPI::CallStatus> ConsumerDBusProxy::RegisterShutdownClientAsync(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, const uint32_t& TimeoutMs, RegisterShutdownClientAsyncCallback callback) { - return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string, std::string, uint32_t, uint32_t>, - CommonAPI::DBus::DBusSerializableArguments<int32_t> >::callMethodAsync( - *this, - "RegisterShutdownClient", - "ssuu", - BusName, ObjName, ShutdownMode, TimeoutMs, - std::move(callback)); -} -void ConsumerDBusProxy::GetNodeState(CommonAPI::CallStatus& callStatus, int32_t& ErrorCode, int32_t& NodeStateId) { - CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>, - CommonAPI::DBus::DBusSerializableArguments<int32_t, int32_t> >::callMethodWithReply( - *this, - "GetNodeState", - "", - callStatus - , ErrorCode, NodeStateId); -} -std::future<CommonAPI::CallStatus> ConsumerDBusProxy::GetNodeStateAsync(GetNodeStateAsyncCallback callback) { - return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>, - CommonAPI::DBus::DBusSerializableArguments<int32_t, int32_t> >::callMethodAsync( - *this, - "GetNodeState", - "", - std::move(callback)); -} -void ConsumerDBusProxy::GetSessionState(const std::string& SessionName, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& SessionState, int32_t& ErrorCode) { - CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string, int32_t>, - CommonAPI::DBus::DBusSerializableArguments<int32_t, int32_t> >::callMethodWithReply( - *this, - "GetSessionState", - "si", - SessionName, SeatID, - callStatus - , SessionState, ErrorCode); -} -std::future<CommonAPI::CallStatus> ConsumerDBusProxy::GetSessionStateAsync(const std::string& SessionName, const int32_t& SeatID, GetSessionStateAsyncCallback callback) { - return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string, int32_t>, - CommonAPI::DBus::DBusSerializableArguments<int32_t, int32_t> >::callMethodAsync( - *this, - "GetSessionState", - "si", - SessionName, SeatID, - std::move(callback)); -} -void ConsumerDBusProxy::SetSessionState(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SessionState, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) { - CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string, std::string, int32_t, int32_t>, - CommonAPI::DBus::DBusSerializableArguments<int32_t> >::callMethodWithReply( - *this, - "SetSessionState", - "ssii", - SessionName, SessionOwner, SessionState, SeatID, - callStatus - , ErrorCode); -} -std::future<CommonAPI::CallStatus> ConsumerDBusProxy::SetSessionStateAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SessionState, const int32_t& SeatID, SetSessionStateAsyncCallback callback) { - return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::string, std::string, int32_t, int32_t>, - CommonAPI::DBus::DBusSerializableArguments<int32_t> >::callMethodAsync( - *this, - "SetSessionState", - "ssii", - SessionName, SessionOwner, SessionState, SeatID, - std::move(callback)); -} - - - -void ConsumerDBusProxy::getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const { - ownVersionMajor = 1; - ownVersionMinor = 0; -} - -} // namespace NodeStateManager -} // namespace genivi -} // namespace org diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerDBusProxy.h b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerDBusProxy.h deleted file mode 100644 index 2e08248..0000000 --- a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerDBusProxy.h +++ /dev/null @@ -1,100 +0,0 @@ -/* -* 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/. -*/ -/** - * @author Christian Linke - */ -#ifndef ORG_GENIVI_NODESTATEMANAGER_Consumer_DBUS_PROXY_H_ -#define ORG_GENIVI_NODESTATEMANAGER_Consumer_DBUS_PROXY_H_ - -#include <org/genivi/NodeStateManager/ConsumerProxyBase.h> - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <CommonAPI/DBus/DBusFactory.h> -#include <CommonAPI/DBus/DBusProxy.h> -#include <CommonAPI/DBus/DBusAttribute.h> -#include <CommonAPI/DBus/DBusEvent.h> - -#undef COMMONAPI_INTERNAL_COMPILATION - -#include <string> - -namespace org { -namespace genivi { -namespace NodeStateManager { - -class ConsumerDBusProxy: virtual public ConsumerProxyBase, virtual public CommonAPI::DBus::DBusProxy { - public: - ConsumerDBusProxy( - const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory, - const std::string& commonApiAddress, - const std::string& interfaceName, - const std::string& busName, - const std::string& objectPath, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection); - - virtual ~ConsumerDBusProxy() { } - - virtual BootModeAttribute& getBootModeAttribute(); - virtual RestartReasonAttribute& getRestartReasonAttribute(); - virtual ShutdownReasonAttribute& getShutdownReasonAttribute(); - virtual WakeUpReasonAttribute& getWakeUpReasonAttribute(); - - virtual NodeApplicationModeEvent& getNodeApplicationModeEvent(); - virtual SessionStateChangedEvent& getSessionStateChangedEvent(); - virtual NodeStateEvent& getNodeStateEvent(); - - virtual void GetAppHealthCount(CommonAPI::CallStatus& callStatus, uint32_t& Count); - virtual std::future<CommonAPI::CallStatus> GetAppHealthCountAsync(GetAppHealthCountAsyncCallback callback); - virtual void LifecycleRequestComplete(const uint32_t& RequestId, const int32_t& Status, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode); - virtual std::future<CommonAPI::CallStatus> LifecycleRequestCompleteAsync(const uint32_t& RequestId, const int32_t& Status, LifecycleRequestCompleteAsyncCallback callback); - virtual void GetInterfaceVersion(CommonAPI::CallStatus& callStatus, uint32_t& Version); - virtual std::future<CommonAPI::CallStatus> GetInterfaceVersionAsync(GetInterfaceVersionAsyncCallback callback); - virtual void GetApplicationMode(CommonAPI::CallStatus& callStatus, int32_t& ErrorCode, int32_t& ApplicationModeId); - virtual std::future<CommonAPI::CallStatus> GetApplicationModeAsync(GetApplicationModeAsyncCallback callback); - virtual void UnRegisterSession(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode); - virtual std::future<CommonAPI::CallStatus> UnRegisterSessionAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, UnRegisterSessionAsyncCallback callback); - virtual void RegisterSession(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode); - virtual std::future<CommonAPI::CallStatus> RegisterSessionAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, RegisterSessionAsyncCallback callback); - virtual void UnRegisterShutdownClient(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode); - virtual std::future<CommonAPI::CallStatus> UnRegisterShutdownClientAsync(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, UnRegisterShutdownClientAsyncCallback callback); - virtual void RegisterShutdownClient(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, const uint32_t& TimeoutMs, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode); - virtual std::future<CommonAPI::CallStatus> RegisterShutdownClientAsync(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, const uint32_t& TimeoutMs, RegisterShutdownClientAsyncCallback callback); - virtual void GetNodeState(CommonAPI::CallStatus& callStatus, int32_t& ErrorCode, int32_t& NodeStateId); - virtual std::future<CommonAPI::CallStatus> GetNodeStateAsync(GetNodeStateAsyncCallback callback); - virtual void GetSessionState(const std::string& SessionName, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& SessionState, int32_t& ErrorCode); - virtual std::future<CommonAPI::CallStatus> GetSessionStateAsync(const std::string& SessionName, const int32_t& SeatID, GetSessionStateAsyncCallback callback); - virtual void SetSessionState(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SessionState, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode); - virtual std::future<CommonAPI::CallStatus> SetSessionStateAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SessionState, const int32_t& SeatID, SetSessionStateAsyncCallback callback); - - - virtual void getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const; - - private: - CommonAPI::DBus::DBusReadonlyAttribute<BootModeAttribute> bootMode_; - CommonAPI::DBus::DBusReadonlyAttribute<RestartReasonAttribute> restartReason_; - CommonAPI::DBus::DBusReadonlyAttribute<ShutdownReasonAttribute> shutdownReason_; - CommonAPI::DBus::DBusReadonlyAttribute<WakeUpReasonAttribute> wakeUpReason_; - - CommonAPI::DBus::DBusEvent<NodeApplicationModeEvent> nodeApplicationMode_; - CommonAPI::DBus::DBusEvent<SessionStateChangedEvent> sessionStateChanged_; - CommonAPI::DBus::DBusEvent<NodeStateEvent> nodeState_; - -}; - - - -} // namespace NodeStateManager -} // namespace genivi -} // namespace org - -#endif // ORG_GENIVI_NODESTATEMANAGER_Consumer_DBUS_PROXY_H_ diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerDBusStubAdapter.cpp b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerDBusStubAdapter.cpp deleted file mode 100755 index 7c00c67..0000000 --- a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerDBusStubAdapter.cpp +++ /dev/null @@ -1,299 +0,0 @@ -/* -* 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 <org/genivi/NodeStateManager/Consumer.h> - -namespace org { -namespace genivi { -namespace NodeStateManager { - -std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> createConsumerDBusStubAdapter( - const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory, - const std::string& commonApiAddress, - const std::string& interfaceName, - const std::string& busName, - const std::string& objectPath, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection, - const std::shared_ptr<CommonAPI::StubBase>& stubBase) { - return std::make_shared<ConsumerDBusStubAdapter>(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 = - "<method name=\"getInterfaceVersion\">\n" - "<arg name=\"value\" type=\"uu\" direction=\"out\" />" - "</method>\n" - "<method name=\"getBootModeAttribute\">\n" - "<arg name=\"value\" type=\"i\" direction=\"out\" />" - "</method>\n" - "<method name=\"getRestartReasonAttribute\">\n" - "<arg name=\"value\" type=\"i\" direction=\"out\" />" - "</method>\n" - "<method name=\"getShutdownReasonAttribute\">\n" - "<arg name=\"value\" type=\"i\" direction=\"out\" />" - "</method>\n" - "<method name=\"getWakeUpReasonAttribute\">\n" - "<arg name=\"value\" type=\"i\" direction=\"out\" />" - "</method>\n" - "<signal name=\"NodeApplicationMode\">\n" - "<arg name=\"ApplicationModeId\" type=\"i\" />\n" - "</signal>\n" - "<signal name=\"SessionStateChanged\">\n" - "<arg name=\"SessionStateName\" type=\"s\" />\n" - "<arg name=\"SeatID\" type=\"i\" />\n" - "<arg name=\"SessionState\" type=\"i\" />\n" - "</signal>\n" - "<signal name=\"NodeState\">\n" - "<arg name=\"NodeState\" type=\"i\" />\n" - "</signal>\n" - "<method name=\"GetAppHealthCount\">\n" - "<arg name=\"Count\" type=\"u\" direction=\"out\" />\n" - "</method>\n" - "<method name=\"LifecycleRequestComplete\">\n" - "<arg name=\"RequestId\" type=\"u\" direction=\"in\" />\n" - "<arg name=\"Status\" type=\"i\" direction=\"in\" />\n" - "<arg name=\"ErrorCode\" type=\"i\" direction=\"out\" />\n" - "</method>\n" - "<method name=\"GetInterfaceVersion\">\n" - "<arg name=\"Version\" type=\"u\" direction=\"out\" />\n" - "</method>\n" - "<method name=\"GetApplicationMode\">\n" - "<arg name=\"ErrorCode\" type=\"i\" direction=\"out\" />\n" - "<arg name=\"ApplicationModeId\" type=\"i\" direction=\"out\" />\n" - "</method>\n" - "<method name=\"UnRegisterSession\">\n" - "<arg name=\"SessionName\" type=\"s\" direction=\"in\" />\n" - "<arg name=\"SessionOwner\" type=\"s\" direction=\"in\" />\n" - "<arg name=\"SeatID\" type=\"i\" direction=\"in\" />\n" - "<arg name=\"ErrorCode\" type=\"i\" direction=\"out\" />\n" - "</method>\n" - "<method name=\"RegisterSession\">\n" - "<arg name=\"SessionName\" type=\"s\" direction=\"in\" />\n" - "<arg name=\"SessionOwner\" type=\"s\" direction=\"in\" />\n" - "<arg name=\"SeatID\" type=\"i\" direction=\"in\" />\n" - "<arg name=\"SessionState\" type=\"i\" direction=\"in\" />\n" - "<arg name=\"ErrorCode\" type=\"i\" direction=\"out\" />\n" - "</method>\n" - "<method name=\"UnRegisterShutdownClient\">\n" - "<arg name=\"BusName\" type=\"s\" direction=\"in\" />\n" - "<arg name=\"ObjName\" type=\"s\" direction=\"in\" />\n" - "<arg name=\"ShutdownMode\" type=\"u\" direction=\"in\" />\n" - "<arg name=\"ErrorCode\" type=\"i\" direction=\"out\" />\n" - "</method>\n" - "<method name=\"RegisterShutdownClient\">\n" - "<arg name=\"BusName\" type=\"s\" direction=\"in\" />\n" - "<arg name=\"ObjName\" type=\"s\" direction=\"in\" />\n" - "<arg name=\"ShutdownMode\" type=\"u\" direction=\"in\" />\n" - "<arg name=\"TimeoutMs\" type=\"u\" direction=\"in\" />\n" - "<arg name=\"ErrorCode\" type=\"i\" direction=\"out\" />\n" - "</method>\n" - "<method name=\"GetNodeState\">\n" - "<arg name=\"ErrorCode\" type=\"i\" direction=\"out\" />\n" - "<arg name=\"NodeStateId\" type=\"i\" direction=\"out\" />\n" - "</method>\n" - "<method name=\"GetSessionState\">\n" - "<arg name=\"SessionName\" type=\"s\" direction=\"in\" />\n" - "<arg name=\"SeatID\" type=\"i\" direction=\"in\" />\n" - "<arg name=\"SessionState\" type=\"i\" direction=\"out\" />\n" - "<arg name=\"ErrorCode\" type=\"i\" direction=\"out\" />\n" - "</method>\n" - "<method name=\"SetSessionState\">\n" - "<arg name=\"SessionName\" type=\"s\" direction=\"in\" />\n" - "<arg name=\"SessionOwner\" type=\"s\" direction=\"in\" />\n" - "<arg name=\"SessionState\" type=\"i\" direction=\"in\" />\n" - "<arg name=\"SeatID\" type=\"i\" direction=\"in\" />\n" - "<arg name=\"ErrorCode\" type=\"i\" direction=\"out\" />\n" - "</method>\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<uint32_t> - > getAppHealthCountStubDispatcher(&ConsumerStub::GetAppHealthCount, "u"); -static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< - ConsumerStub, - std::tuple<uint32_t, int32_t>, - std::tuple<int32_t> - > lifecycleRequestCompleteStubDispatcher(&ConsumerStub::LifecycleRequestComplete, "i"); -static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< - ConsumerStub, - std::tuple<>, - std::tuple<uint32_t> - > getInterfaceVersionStubDispatcher(&ConsumerStub::GetInterfaceVersion, "u"); -static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< - ConsumerStub, - std::tuple<>, - std::tuple<int32_t, int32_t> - > getApplicationModeStubDispatcher(&ConsumerStub::GetApplicationMode, "ii"); -static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< - ConsumerStub, - std::tuple<std::string, std::string, int32_t>, - std::tuple<int32_t> - > unRegisterSessionStubDispatcher(&ConsumerStub::UnRegisterSession, "i"); -static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< - ConsumerStub, - std::tuple<std::string, std::string, int32_t, int32_t>, - std::tuple<int32_t> - > registerSessionStubDispatcher(&ConsumerStub::RegisterSession, "i"); -static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< - ConsumerStub, - std::tuple<std::string, std::string, uint32_t>, - std::tuple<int32_t> - > unRegisterShutdownClientStubDispatcher(&ConsumerStub::UnRegisterShutdownClient, "i"); -static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< - ConsumerStub, - std::tuple<std::string, std::string, uint32_t, uint32_t>, - std::tuple<int32_t> - > registerShutdownClientStubDispatcher(&ConsumerStub::RegisterShutdownClient, "i"); -static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< - ConsumerStub, - std::tuple<>, - std::tuple<int32_t, int32_t> - > getNodeStateStubDispatcher(&ConsumerStub::GetNodeState, "ii"); -static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< - ConsumerStub, - std::tuple<std::string, int32_t>, - std::tuple<int32_t, int32_t> - > getSessionStateStubDispatcher(&ConsumerStub::GetSessionState, "ii"); -static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< - ConsumerStub, - std::tuple<std::string, std::string, int32_t, int32_t>, - std::tuple<int32_t> - > setSessionStateStubDispatcher(&ConsumerStub::SetSessionState, "i"); - - -void ConsumerDBusStubAdapterInternal::fireNodeApplicationModeEvent(const int32_t& ApplicationModeId) { - CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<int32_t>> - ::sendSignal( - *this, - "NodeApplicationMode", - "i", - ApplicationModeId - ); -} -void ConsumerDBusStubAdapterInternal::fireSessionStateChangedEvent(const std::string& SessionStateName, const int32_t& SeatID, const int32_t& SessionState) { - CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<std::string, int32_t, int32_t>> - ::sendSignal( - *this, - "SessionStateChanged", - "sii", - SessionStateName, SeatID, SessionState - ); -} -void ConsumerDBusStubAdapterInternal::fireNodeStateEvent(const int32_t& NodeState) { - CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<int32_t>> - ::sendSignal( - *this, - "NodeState", - "i", - NodeState - ); -} - -const ConsumerDBusStubAdapterHelper::StubDispatcherTable& ConsumerDBusStubAdapterInternal::getStubDispatcherTable() { - return stubDispatcherTable_; -} - - -ConsumerDBusStubAdapterInternal::ConsumerDBusStubAdapterInternal( - const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory, - const std::string& commonApiAddress, - const std::string& dbusInterfaceName, - const std::string& dbusBusName, - const std::string& dbusObjectPath, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection, - const std::shared_ptr<CommonAPI::StubBase>& stub): - CommonAPI::DBus::DBusStubAdapter( - factory, - commonApiAddress, - dbusInterfaceName, - dbusBusName, - dbusObjectPath, - dbusConnection, - false), - ConsumerDBusStubAdapterHelper( - factory, - commonApiAddress, - dbusInterfaceName, - dbusBusName, - dbusObjectPath, - dbusConnection, - std::dynamic_pointer_cast<ConsumerStub>(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 diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerDBusStubAdapter.h b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerDBusStubAdapter.h deleted file mode 100755 index d8335d7..0000000 --- a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerDBusStubAdapter.h +++ /dev/null @@ -1,98 +0,0 @@ -/* -* 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/. -*/ -/** - * @author Christian Linke - */ -#ifndef ORG_GENIVI_NODESTATEMANAGER_Consumer_DBUS_STUB_ADAPTER_H_ -#define ORG_GENIVI_NODESTATEMANAGER_Consumer_DBUS_STUB_ADAPTER_H_ - -#include <org/genivi/NodeStateManager/ConsumerStub.h> - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <CommonAPI/DBus/DBusStubAdapterHelper.h> -#include <CommonAPI/DBus/DBusStubAdapter.h> -#include <CommonAPI/DBus/DBusFactory.h> -#include <CommonAPI/DBus/DBusServicePublisher.h> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace org { -namespace genivi { -namespace NodeStateManager { - -typedef CommonAPI::DBus::DBusStubAdapterHelper<ConsumerStub> ConsumerDBusStubAdapterHelper; - -class ConsumerDBusStubAdapterInternal: public ConsumerStubAdapter, public ConsumerDBusStubAdapterHelper { - public: - ConsumerDBusStubAdapterInternal( - const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory, - const std::string& commonApiAddress, - const std::string& dbusInterfaceName, - const std::string& dbusBusName, - const std::string& dbusObjectPath, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection, - const std::shared_ptr<CommonAPI::StubBase>& stub); - - ~ConsumerDBusStubAdapterInternal(); - - - void fireNodeApplicationModeEvent(const int32_t& ApplicationModeId); - void fireSessionStateChangedEvent(const std::string& SessionStateName, const int32_t& SeatID, const int32_t& SessionState); - void fireNodeStateEvent(const int32_t& NodeState); - - - const ConsumerDBusStubAdapterHelper::StubDispatcherTable& getStubDispatcherTable(); - - void deactivateManagedInstances(); - - - protected: - virtual const char* getMethodsDBusIntrospectionXmlData() const; - - private: - ConsumerDBusStubAdapterHelper::StubDispatcherTable stubDispatcherTable_; -}; - -class ConsumerDBusStubAdapter: public ConsumerDBusStubAdapterInternal, public std::enable_shared_from_this<ConsumerDBusStubAdapter> { -public: - ConsumerDBusStubAdapter( - const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory, - const std::string& commonApiAddress, - const std::string& dbusInterfaceName, - const std::string& dbusBusName, - const std::string& dbusObjectPath, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection, - const std::shared_ptr<CommonAPI::StubBase>& stub) : - CommonAPI::DBus::DBusStubAdapter( - factory, - commonApiAddress, - dbusInterfaceName, - dbusBusName, - dbusObjectPath, - dbusConnection, - false), - ConsumerDBusStubAdapterInternal( - factory, - commonApiAddress, - dbusInterfaceName, - dbusBusName, - dbusObjectPath, - dbusConnection, - stub) { } -}; - -} // namespace NodeStateManager -} // namespace genivi -} // namespace org - -#endif // ORG_GENIVI_NODESTATEMANAGER_Consumer_DBUS_STUB_ADAPTER_H_ diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerProxy.h b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerProxy.h deleted file mode 100644 index bd473f1..0000000 --- a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerProxy.h +++ /dev/null @@ -1,611 +0,0 @@ -/* -* 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/. -*/ -/** - * @author Christian Linke - */ -#ifndef ORG_GENIVI_NODESTATEMANAGER_Consumer_PROXY_H_ -#define ORG_GENIVI_NODESTATEMANAGER_Consumer_PROXY_H_ - -#include "ConsumerProxyBase.h" - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <CommonAPI/AttributeExtension.h> -#include <CommonAPI/Factory.h> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace org { -namespace genivi { -namespace NodeStateManager { - -template <typename ... _AttributeExtensions> -class ConsumerProxy: virtual public Consumer, virtual public ConsumerProxyBase -, public _AttributeExtensions... { -public: - ConsumerProxy(std::shared_ptr<CommonAPI::Proxy> delegate); - ~ConsumerProxy(); - - typedef Consumer InterfaceType; - - - /** - * Returns the wrapper class that provides access to the attribute BootMode. - */ - virtual BootModeAttribute& getBootModeAttribute() { - return delegate_->getBootModeAttribute(); - } - /** - * Returns the wrapper class that provides access to the attribute RestartReason. - */ - virtual RestartReasonAttribute& getRestartReasonAttribute() { - return delegate_->getRestartReasonAttribute(); - } - /** - * Returns the wrapper class that provides access to the attribute ShutdownReason. - */ - virtual ShutdownReasonAttribute& getShutdownReasonAttribute() { - return delegate_->getShutdownReasonAttribute(); - } - /** - * Returns the wrapper class that provides access to the attribute WakeUpReason. - */ - virtual WakeUpReasonAttribute& getWakeUpReasonAttribute() { - return delegate_->getWakeUpReasonAttribute(); - } - - /** - * Returns the wrapper class that provides access to the broadcast NodeApplicationMode. - */ - virtual NodeApplicationModeEvent& getNodeApplicationModeEvent() { - return delegate_->getNodeApplicationModeEvent(); - } - /** - * Returns the wrapper class that provides access to the broadcast SessionStateChanged. - */ - virtual SessionStateChangedEvent& getSessionStateChangedEvent() { - return delegate_->getSessionStateChangedEvent(); - } - /** - * Returns the wrapper class that provides access to the broadcast NodeState. - */ - virtual NodeStateEvent& getNodeStateEvent() { - return delegate_->getNodeStateEvent(); - } - - /** - * Calls GetAppHealthCount with synchronous semantics. - * - * All non-const parameters will be filled with the returned values. - * The CallStatus will be filled when the method returns and indicate either - * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus - * will be set. - */ - virtual void GetAppHealthCount(CommonAPI::CallStatus& callStatus, uint32_t& Count); - /** - * Calls GetAppHealthCount with asynchronous semantics. - * - * The provided callback will be called when the reply to this call arrives or - * an error occurs during the call. The CallStatus will indicate either "SUCCESS" - * or which type of error has occurred. In case of any error, ONLY the CallStatus - * will have a defined value. - * The std::future returned by this method will be fulfilled at arrival of the reply. - * It will provide the same value for CallStatus as will be handed to the callback. - */ - virtual std::future<CommonAPI::CallStatus> GetAppHealthCountAsync(GetAppHealthCountAsyncCallback callback); - /** - * Calls LifecycleRequestComplete with synchronous semantics. - * - * All const parameters are input parameters to this method. - * All non-const parameters will be filled with the returned values. - * The CallStatus will be filled when the method returns and indicate either - * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus - * will be set. - */ - virtual void LifecycleRequestComplete(const uint32_t& RequestId, const int32_t& Status, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode); - /** - * Calls LifecycleRequestComplete with asynchronous semantics. - * - * The provided callback will be called when the reply to this call arrives or - * an error occurs during the call. The CallStatus will indicate either "SUCCESS" - * or which type of error has occurred. In case of any error, ONLY the CallStatus - * will have a defined value. - * The std::future returned by this method will be fulfilled at arrival of the reply. - * It will provide the same value for CallStatus as will be handed to the callback. - */ - virtual std::future<CommonAPI::CallStatus> LifecycleRequestCompleteAsync(const uint32_t& RequestId, const int32_t& Status, LifecycleRequestCompleteAsyncCallback callback); - /** - * Calls GetInterfaceVersion with synchronous semantics. - * - * All non-const parameters will be filled with the returned values. - * The CallStatus will be filled when the method returns and indicate either - * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus - * will be set. - */ - virtual void GetInterfaceVersion(CommonAPI::CallStatus& callStatus, uint32_t& Version); - /** - * Calls GetInterfaceVersion with asynchronous semantics. - * - * The provided callback will be called when the reply to this call arrives or - * an error occurs during the call. The CallStatus will indicate either "SUCCESS" - * or which type of error has occurred. In case of any error, ONLY the CallStatus - * will have a defined value. - * The std::future returned by this method will be fulfilled at arrival of the reply. - * It will provide the same value for CallStatus as will be handed to the callback. - */ - virtual std::future<CommonAPI::CallStatus> GetInterfaceVersionAsync(GetInterfaceVersionAsyncCallback callback); - /** - * Calls GetApplicationMode with synchronous semantics. - * - * All non-const parameters will be filled with the returned values. - * The CallStatus will be filled when the method returns and indicate either - * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus - * will be set. - */ - virtual void GetApplicationMode(CommonAPI::CallStatus& callStatus, int32_t& ErrorCode, int32_t& ApplicationModeId); - /** - * Calls GetApplicationMode with asynchronous semantics. - * - * The provided callback will be called when the reply to this call arrives or - * an error occurs during the call. The CallStatus will indicate either "SUCCESS" - * or which type of error has occurred. In case of any error, ONLY the CallStatus - * will have a defined value. - * The std::future returned by this method will be fulfilled at arrival of the reply. - * It will provide the same value for CallStatus as will be handed to the callback. - */ - virtual std::future<CommonAPI::CallStatus> GetApplicationModeAsync(GetApplicationModeAsyncCallback callback); - /** - * Calls UnRegisterSession with synchronous semantics. - * - * All const parameters are input parameters to this method. - * All non-const parameters will be filled with the returned values. - * The CallStatus will be filled when the method returns and indicate either - * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus - * will be set. - */ - virtual void UnRegisterSession(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode); - /** - * Calls UnRegisterSession with asynchronous semantics. - * - * The provided callback will be called when the reply to this call arrives or - * an error occurs during the call. The CallStatus will indicate either "SUCCESS" - * or which type of error has occurred. In case of any error, ONLY the CallStatus - * will have a defined value. - * The std::future returned by this method will be fulfilled at arrival of the reply. - * It will provide the same value for CallStatus as will be handed to the callback. - */ - virtual std::future<CommonAPI::CallStatus> UnRegisterSessionAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, UnRegisterSessionAsyncCallback callback); - /** - * Calls RegisterSession with synchronous semantics. - * - * All const parameters are input parameters to this method. - * All non-const parameters will be filled with the returned values. - * The CallStatus will be filled when the method returns and indicate either - * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus - * will be set. - */ - virtual void RegisterSession(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode); - /** - * Calls RegisterSession with asynchronous semantics. - * - * The provided callback will be called when the reply to this call arrives or - * an error occurs during the call. The CallStatus will indicate either "SUCCESS" - * or which type of error has occurred. In case of any error, ONLY the CallStatus - * will have a defined value. - * The std::future returned by this method will be fulfilled at arrival of the reply. - * It will provide the same value for CallStatus as will be handed to the callback. - */ - virtual std::future<CommonAPI::CallStatus> RegisterSessionAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, RegisterSessionAsyncCallback callback); - /** - * Calls UnRegisterShutdownClient with synchronous semantics. - * - * All const parameters are input parameters to this method. - * All non-const parameters will be filled with the returned values. - * The CallStatus will be filled when the method returns and indicate either - * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus - * will be set. - */ - virtual void UnRegisterShutdownClient(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode); - /** - * Calls UnRegisterShutdownClient with asynchronous semantics. - * - * The provided callback will be called when the reply to this call arrives or - * an error occurs during the call. The CallStatus will indicate either "SUCCESS" - * or which type of error has occurred. In case of any error, ONLY the CallStatus - * will have a defined value. - * The std::future returned by this method will be fulfilled at arrival of the reply. - * It will provide the same value for CallStatus as will be handed to the callback. - */ - virtual std::future<CommonAPI::CallStatus> UnRegisterShutdownClientAsync(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, UnRegisterShutdownClientAsyncCallback callback); - /** - * Calls RegisterShutdownClient with synchronous semantics. - * - * All const parameters are input parameters to this method. - * All non-const parameters will be filled with the returned values. - * The CallStatus will be filled when the method returns and indicate either - * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus - * will be set. - */ - virtual void RegisterShutdownClient(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, const uint32_t& TimeoutMs, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode); - /** - * Calls RegisterShutdownClient with asynchronous semantics. - * - * The provided callback will be called when the reply to this call arrives or - * an error occurs during the call. The CallStatus will indicate either "SUCCESS" - * or which type of error has occurred. In case of any error, ONLY the CallStatus - * will have a defined value. - * The std::future returned by this method will be fulfilled at arrival of the reply. - * It will provide the same value for CallStatus as will be handed to the callback. - */ - virtual std::future<CommonAPI::CallStatus> RegisterShutdownClientAsync(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, const uint32_t& TimeoutMs, RegisterShutdownClientAsyncCallback callback); - /** - * Calls GetNodeState with synchronous semantics. - * - * All non-const parameters will be filled with the returned values. - * The CallStatus will be filled when the method returns and indicate either - * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus - * will be set. - */ - virtual void GetNodeState(CommonAPI::CallStatus& callStatus, int32_t& ErrorCode, int32_t& NodeStateId); - /** - * Calls GetNodeState with asynchronous semantics. - * - * The provided callback will be called when the reply to this call arrives or - * an error occurs during the call. The CallStatus will indicate either "SUCCESS" - * or which type of error has occurred. In case of any error, ONLY the CallStatus - * will have a defined value. - * The std::future returned by this method will be fulfilled at arrival of the reply. - * It will provide the same value for CallStatus as will be handed to the callback. - */ - virtual std::future<CommonAPI::CallStatus> GetNodeStateAsync(GetNodeStateAsyncCallback callback); - /** - * Calls GetSessionState with synchronous semantics. - * - * All const parameters are input parameters to this method. - * All non-const parameters will be filled with the returned values. - * The CallStatus will be filled when the method returns and indicate either - * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus - * will be set. - */ - virtual void GetSessionState(const std::string& SessionName, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& SessionState, int32_t& ErrorCode); - /** - * Calls GetSessionState with asynchronous semantics. - * - * The provided callback will be called when the reply to this call arrives or - * an error occurs during the call. The CallStatus will indicate either "SUCCESS" - * or which type of error has occurred. In case of any error, ONLY the CallStatus - * will have a defined value. - * The std::future returned by this method will be fulfilled at arrival of the reply. - * It will provide the same value for CallStatus as will be handed to the callback. - */ - virtual std::future<CommonAPI::CallStatus> GetSessionStateAsync(const std::string& SessionName, const int32_t& SeatID, GetSessionStateAsyncCallback callback); - /** - * Calls SetSessionState with synchronous semantics. - * - * All const parameters are input parameters to this method. - * All non-const parameters will be filled with the returned values. - * The CallStatus will be filled when the method returns and indicate either - * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus - * will be set. - */ - virtual void SetSessionState(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SessionState, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode); - /** - * Calls SetSessionState with asynchronous semantics. - * - * The provided callback will be called when the reply to this call arrives or - * an error occurs during the call. The CallStatus will indicate either "SUCCESS" - * or which type of error has occurred. In case of any error, ONLY the CallStatus - * will have a defined value. - * The std::future returned by this method will be fulfilled at arrival of the reply. - * It will provide the same value for CallStatus as will be handed to the callback. - */ - virtual std::future<CommonAPI::CallStatus> SetSessionStateAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SessionState, const int32_t& SeatID, SetSessionStateAsyncCallback callback); - - - /** - * Returns the CommonAPI address of the remote partner this proxy communicates with. - */ - virtual std::string getAddress() const; - - /** - * Returns the domain of the remote partner this proxy communicates with. - */ - virtual const std::string& getDomain() const; - - /** - * Returns the service ID of the remote partner this proxy communicates with. - */ - virtual const std::string& getServiceId() const; - - /** - * Returns the instance ID of the remote partner this proxy communicates with. - */ - virtual const std::string& getInstanceId() const; - - /** - * Returns true if the remote partner for this proxy is currently known to be available. - */ - virtual bool isAvailable() const; - - /** - * Returns true if the remote partner for this proxy is available. - */ - virtual bool isAvailableBlocking() const; - - /** - * Returns the wrapper class that is used to (de-)register for notifications about - * the availability of the remote partner of this proxy. - */ - virtual CommonAPI::ProxyStatusEvent& getProxyStatusEvent(); - - /** - * Returns the wrapper class that is used to access version information of the remote - * partner of this proxy. - */ - virtual CommonAPI::InterfaceVersionAttribute& getInterfaceVersionAttribute(); - - private: - std::shared_ptr<ConsumerProxyBase> delegate_; -}; - -namespace ConsumerExtensions { - template <template <typename > class _ExtensionType> - class BootModeAttributeExtension { - public: - typedef _ExtensionType<ConsumerProxyBase::BootModeAttribute> extension_type; - - static_assert(std::is_base_of<typename CommonAPI::AttributeExtension<ConsumerProxyBase::BootModeAttribute>, extension_type>::value, - "Not CommonAPI Attribute Extension!"); - - BootModeAttributeExtension(ConsumerProxyBase& proxy): attributeExtension_(proxy.getBootModeAttribute()) { - } - - inline extension_type& getBootModeAttributeExtension() { - return attributeExtension_; - } - - private: - extension_type attributeExtension_; - }; - - template <template <typename > class _ExtensionType> - class RestartReasonAttributeExtension { - public: - typedef _ExtensionType<ConsumerProxyBase::RestartReasonAttribute> extension_type; - - static_assert(std::is_base_of<typename CommonAPI::AttributeExtension<ConsumerProxyBase::RestartReasonAttribute>, extension_type>::value, - "Not CommonAPI Attribute Extension!"); - - RestartReasonAttributeExtension(ConsumerProxyBase& proxy): attributeExtension_(proxy.getRestartReasonAttribute()) { - } - - inline extension_type& getRestartReasonAttributeExtension() { - return attributeExtension_; - } - - private: - extension_type attributeExtension_; - }; - - template <template <typename > class _ExtensionType> - class ShutdownReasonAttributeExtension { - public: - typedef _ExtensionType<ConsumerProxyBase::ShutdownReasonAttribute> extension_type; - - static_assert(std::is_base_of<typename CommonAPI::AttributeExtension<ConsumerProxyBase::ShutdownReasonAttribute>, extension_type>::value, - "Not CommonAPI Attribute Extension!"); - - ShutdownReasonAttributeExtension(ConsumerProxyBase& proxy): attributeExtension_(proxy.getShutdownReasonAttribute()) { - } - - inline extension_type& getShutdownReasonAttributeExtension() { - return attributeExtension_; - } - - private: - extension_type attributeExtension_; - }; - - template <template <typename > class _ExtensionType> - class WakeUpReasonAttributeExtension { - public: - typedef _ExtensionType<ConsumerProxyBase::WakeUpReasonAttribute> extension_type; - - static_assert(std::is_base_of<typename CommonAPI::AttributeExtension<ConsumerProxyBase::WakeUpReasonAttribute>, extension_type>::value, - "Not CommonAPI Attribute Extension!"); - - WakeUpReasonAttributeExtension(ConsumerProxyBase& proxy): attributeExtension_(proxy.getWakeUpReasonAttribute()) { - } - - inline extension_type& getWakeUpReasonAttributeExtension() { - return attributeExtension_; - } - - private: - extension_type attributeExtension_; - }; - -} // namespace ConsumerExtensions - -// -// ConsumerProxy Implementation -// -template <typename ... _AttributeExtensions> -ConsumerProxy<_AttributeExtensions...>::ConsumerProxy(std::shared_ptr<CommonAPI::Proxy> delegate): - delegate_(std::dynamic_pointer_cast<ConsumerProxyBase>(delegate)), - _AttributeExtensions(*(std::dynamic_pointer_cast<ConsumerProxyBase>(delegate)))... { -} - -template <typename ... _AttributeExtensions> -ConsumerProxy<_AttributeExtensions...>::~ConsumerProxy() { -} - -template <typename ... _AttributeExtensions> -void ConsumerProxy<_AttributeExtensions...>::GetAppHealthCount(CommonAPI::CallStatus& callStatus, uint32_t& Count) { - delegate_->GetAppHealthCount(callStatus, Count); -} - -template <typename ... _AttributeExtensions> -std::future<CommonAPI::CallStatus> ConsumerProxy<_AttributeExtensions...>::GetAppHealthCountAsync(GetAppHealthCountAsyncCallback callback) { - return delegate_->GetAppHealthCountAsync(callback); -} -template <typename ... _AttributeExtensions> -void ConsumerProxy<_AttributeExtensions...>::LifecycleRequestComplete(const uint32_t& RequestId, const int32_t& Status, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) { - delegate_->LifecycleRequestComplete(RequestId, Status, callStatus, ErrorCode); -} - -template <typename ... _AttributeExtensions> -std::future<CommonAPI::CallStatus> ConsumerProxy<_AttributeExtensions...>::LifecycleRequestCompleteAsync(const uint32_t& RequestId, const int32_t& Status, LifecycleRequestCompleteAsyncCallback callback) { - return delegate_->LifecycleRequestCompleteAsync(RequestId, Status, callback); -} -template <typename ... _AttributeExtensions> -void ConsumerProxy<_AttributeExtensions...>::GetInterfaceVersion(CommonAPI::CallStatus& callStatus, uint32_t& Version) { - delegate_->GetInterfaceVersion(callStatus, Version); -} - -template <typename ... _AttributeExtensions> -std::future<CommonAPI::CallStatus> ConsumerProxy<_AttributeExtensions...>::GetInterfaceVersionAsync(GetInterfaceVersionAsyncCallback callback) { - return delegate_->GetInterfaceVersionAsync(callback); -} -template <typename ... _AttributeExtensions> -void ConsumerProxy<_AttributeExtensions...>::GetApplicationMode(CommonAPI::CallStatus& callStatus, int32_t& ErrorCode, int32_t& ApplicationModeId) { - delegate_->GetApplicationMode(callStatus, ErrorCode, ApplicationModeId); -} - -template <typename ... _AttributeExtensions> -std::future<CommonAPI::CallStatus> ConsumerProxy<_AttributeExtensions...>::GetApplicationModeAsync(GetApplicationModeAsyncCallback callback) { - return delegate_->GetApplicationModeAsync(callback); -} -template <typename ... _AttributeExtensions> -void ConsumerProxy<_AttributeExtensions...>::UnRegisterSession(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) { - delegate_->UnRegisterSession(SessionName, SessionOwner, SeatID, callStatus, ErrorCode); -} - -template <typename ... _AttributeExtensions> -std::future<CommonAPI::CallStatus> ConsumerProxy<_AttributeExtensions...>::UnRegisterSessionAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, UnRegisterSessionAsyncCallback callback) { - return delegate_->UnRegisterSessionAsync(SessionName, SessionOwner, SeatID, callback); -} -template <typename ... _AttributeExtensions> -void ConsumerProxy<_AttributeExtensions...>::RegisterSession(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) { - delegate_->RegisterSession(SessionName, SessionOwner, SeatID, SessionState, callStatus, ErrorCode); -} - -template <typename ... _AttributeExtensions> -std::future<CommonAPI::CallStatus> ConsumerProxy<_AttributeExtensions...>::RegisterSessionAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, RegisterSessionAsyncCallback callback) { - return delegate_->RegisterSessionAsync(SessionName, SessionOwner, SeatID, SessionState, callback); -} -template <typename ... _AttributeExtensions> -void ConsumerProxy<_AttributeExtensions...>::UnRegisterShutdownClient(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) { - delegate_->UnRegisterShutdownClient(BusName, ObjName, ShutdownMode, callStatus, ErrorCode); -} - -template <typename ... _AttributeExtensions> -std::future<CommonAPI::CallStatus> ConsumerProxy<_AttributeExtensions...>::UnRegisterShutdownClientAsync(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, UnRegisterShutdownClientAsyncCallback callback) { - return delegate_->UnRegisterShutdownClientAsync(BusName, ObjName, ShutdownMode, callback); -} -template <typename ... _AttributeExtensions> -void ConsumerProxy<_AttributeExtensions...>::RegisterShutdownClient(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, const uint32_t& TimeoutMs, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) { - delegate_->RegisterShutdownClient(BusName, ObjName, ShutdownMode, TimeoutMs, callStatus, ErrorCode); -} - -template <typename ... _AttributeExtensions> -std::future<CommonAPI::CallStatus> ConsumerProxy<_AttributeExtensions...>::RegisterShutdownClientAsync(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, const uint32_t& TimeoutMs, RegisterShutdownClientAsyncCallback callback) { - return delegate_->RegisterShutdownClientAsync(BusName, ObjName, ShutdownMode, TimeoutMs, callback); -} -template <typename ... _AttributeExtensions> -void ConsumerProxy<_AttributeExtensions...>::GetNodeState(CommonAPI::CallStatus& callStatus, int32_t& ErrorCode, int32_t& NodeStateId) { - delegate_->GetNodeState(callStatus, ErrorCode, NodeStateId); -} - -template <typename ... _AttributeExtensions> -std::future<CommonAPI::CallStatus> ConsumerProxy<_AttributeExtensions...>::GetNodeStateAsync(GetNodeStateAsyncCallback callback) { - return delegate_->GetNodeStateAsync(callback); -} -template <typename ... _AttributeExtensions> -void ConsumerProxy<_AttributeExtensions...>::GetSessionState(const std::string& SessionName, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& SessionState, int32_t& ErrorCode) { - delegate_->GetSessionState(SessionName, SeatID, callStatus, SessionState, ErrorCode); -} - -template <typename ... _AttributeExtensions> -std::future<CommonAPI::CallStatus> ConsumerProxy<_AttributeExtensions...>::GetSessionStateAsync(const std::string& SessionName, const int32_t& SeatID, GetSessionStateAsyncCallback callback) { - return delegate_->GetSessionStateAsync(SessionName, SeatID, callback); -} -template <typename ... _AttributeExtensions> -void ConsumerProxy<_AttributeExtensions...>::SetSessionState(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SessionState, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) { - delegate_->SetSessionState(SessionName, SessionOwner, SessionState, SeatID, callStatus, ErrorCode); -} - -template <typename ... _AttributeExtensions> -std::future<CommonAPI::CallStatus> ConsumerProxy<_AttributeExtensions...>::SetSessionStateAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SessionState, const int32_t& SeatID, SetSessionStateAsyncCallback callback) { - return delegate_->SetSessionStateAsync(SessionName, SessionOwner, SessionState, SeatID, callback); -} - -template <typename ... _AttributeExtensions> -std::string ConsumerProxy<_AttributeExtensions...>::getAddress() const { - return delegate_->getAddress(); -} - -template <typename ... _AttributeExtensions> -const std::string& ConsumerProxy<_AttributeExtensions...>::getDomain() const { - return delegate_->getDomain(); -} - -template <typename ... _AttributeExtensions> -const std::string& ConsumerProxy<_AttributeExtensions...>::getServiceId() const { - return delegate_->getServiceId(); -} - -template <typename ... _AttributeExtensions> -const std::string& ConsumerProxy<_AttributeExtensions...>::getInstanceId() const { - return delegate_->getInstanceId(); -} - -template <typename ... _AttributeExtensions> -bool ConsumerProxy<_AttributeExtensions...>::isAvailable() const { - return delegate_->isAvailable(); -} - -template <typename ... _AttributeExtensions> -bool ConsumerProxy<_AttributeExtensions...>::isAvailableBlocking() const { - return delegate_->isAvailableBlocking(); -} - -template <typename ... _AttributeExtensions> -CommonAPI::ProxyStatusEvent& ConsumerProxy<_AttributeExtensions...>::getProxyStatusEvent() { - return delegate_->getProxyStatusEvent(); -} - -template <typename ... _AttributeExtensions> -CommonAPI::InterfaceVersionAttribute& ConsumerProxy<_AttributeExtensions...>::getInterfaceVersionAttribute() { - return delegate_->getInterfaceVersionAttribute(); -} - - -} // namespace NodeStateManager -} // namespace genivi -} // namespace org - -namespace CommonAPI { -template<template<typename > class _AttributeExtension> -struct DefaultAttributeProxyFactoryHelper<org::genivi::NodeStateManager::ConsumerProxy, - _AttributeExtension> { - typedef typename org::genivi::NodeStateManager::ConsumerProxy< - org::genivi::NodeStateManager::ConsumerExtensions::BootModeAttributeExtension<_AttributeExtension>, - org::genivi::NodeStateManager::ConsumerExtensions::RestartReasonAttributeExtension<_AttributeExtension>, - org::genivi::NodeStateManager::ConsumerExtensions::ShutdownReasonAttributeExtension<_AttributeExtension>, - org::genivi::NodeStateManager::ConsumerExtensions::WakeUpReasonAttributeExtension<_AttributeExtension> - > class_t; -}; -} - -#endif // ORG_GENIVI_NODESTATEMANAGER_Consumer_PROXY_H_ diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerProxyBase.h b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerProxyBase.h deleted file mode 100644 index a5d9ed8..0000000 --- a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerProxyBase.h +++ /dev/null @@ -1,97 +0,0 @@ -/* -* 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/. -*/ -/** - * @author Christian Linke - */ -#ifndef ORG_GENIVI_NODESTATEMANAGER_Consumer_PROXY_BASE_H_ -#define ORG_GENIVI_NODESTATEMANAGER_Consumer_PROXY_BASE_H_ - -#include "Consumer.h" - - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <vector> - -#include <CommonAPI/Attribute.h> -#include <CommonAPI/Event.h> -#include <CommonAPI/Proxy.h> -#include <functional> -#include <future> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace org { -namespace genivi { -namespace NodeStateManager { - -class ConsumerProxyBase: virtual public CommonAPI::Proxy { - public: - typedef CommonAPI::ReadonlyAttribute<int32_t> BootModeAttribute; - typedef CommonAPI::ReadonlyAttribute<int32_t> RestartReasonAttribute; - typedef CommonAPI::ReadonlyAttribute<int32_t> ShutdownReasonAttribute; - typedef CommonAPI::ReadonlyAttribute<int32_t> WakeUpReasonAttribute; - typedef CommonAPI::Event<int32_t> NodeApplicationModeEvent; - typedef CommonAPI::Event<std::string, int32_t, int32_t> SessionStateChangedEvent; - typedef CommonAPI::Event<int32_t> NodeStateEvent; - - typedef std::function<void(const CommonAPI::CallStatus&, const uint32_t&)> GetAppHealthCountAsyncCallback; - typedef std::function<void(const CommonAPI::CallStatus&, const int32_t&)> LifecycleRequestCompleteAsyncCallback; - typedef std::function<void(const CommonAPI::CallStatus&, const uint32_t&)> GetInterfaceVersionAsyncCallback; - typedef std::function<void(const CommonAPI::CallStatus&, const int32_t&, const int32_t&)> GetApplicationModeAsyncCallback; - typedef std::function<void(const CommonAPI::CallStatus&, const int32_t&)> UnRegisterSessionAsyncCallback; - typedef std::function<void(const CommonAPI::CallStatus&, const int32_t&)> RegisterSessionAsyncCallback; - typedef std::function<void(const CommonAPI::CallStatus&, const int32_t&)> UnRegisterShutdownClientAsyncCallback; - typedef std::function<void(const CommonAPI::CallStatus&, const int32_t&)> RegisterShutdownClientAsyncCallback; - typedef std::function<void(const CommonAPI::CallStatus&, const int32_t&, const int32_t&)> GetNodeStateAsyncCallback; - typedef std::function<void(const CommonAPI::CallStatus&, const int32_t&, const int32_t&)> GetSessionStateAsyncCallback; - typedef std::function<void(const CommonAPI::CallStatus&, const int32_t&)> SetSessionStateAsyncCallback; - - virtual BootModeAttribute& getBootModeAttribute() = 0; - virtual RestartReasonAttribute& getRestartReasonAttribute() = 0; - virtual ShutdownReasonAttribute& getShutdownReasonAttribute() = 0; - virtual WakeUpReasonAttribute& getWakeUpReasonAttribute() = 0; - - virtual NodeApplicationModeEvent& getNodeApplicationModeEvent() = 0; - virtual SessionStateChangedEvent& getSessionStateChangedEvent() = 0; - virtual NodeStateEvent& getNodeStateEvent() = 0; - - virtual void GetAppHealthCount(CommonAPI::CallStatus& callStatus, uint32_t& Count) = 0; - virtual std::future<CommonAPI::CallStatus> GetAppHealthCountAsync(GetAppHealthCountAsyncCallback callback) = 0; - virtual void LifecycleRequestComplete(const uint32_t& RequestId, const int32_t& Status, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) = 0; - virtual std::future<CommonAPI::CallStatus> LifecycleRequestCompleteAsync(const uint32_t& RequestId, const int32_t& Status, LifecycleRequestCompleteAsyncCallback callback) = 0; - virtual void GetInterfaceVersion(CommonAPI::CallStatus& callStatus, uint32_t& Version) = 0; - virtual std::future<CommonAPI::CallStatus> GetInterfaceVersionAsync(GetInterfaceVersionAsyncCallback callback) = 0; - virtual void GetApplicationMode(CommonAPI::CallStatus& callStatus, int32_t& ErrorCode, int32_t& ApplicationModeId) = 0; - virtual std::future<CommonAPI::CallStatus> GetApplicationModeAsync(GetApplicationModeAsyncCallback callback) = 0; - virtual void UnRegisterSession(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) = 0; - virtual std::future<CommonAPI::CallStatus> UnRegisterSessionAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, UnRegisterSessionAsyncCallback callback) = 0; - virtual void RegisterSession(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) = 0; - virtual std::future<CommonAPI::CallStatus> RegisterSessionAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, RegisterSessionAsyncCallback callback) = 0; - virtual void UnRegisterShutdownClient(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) = 0; - virtual std::future<CommonAPI::CallStatus> UnRegisterShutdownClientAsync(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, UnRegisterShutdownClientAsyncCallback callback) = 0; - virtual void RegisterShutdownClient(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, const uint32_t& TimeoutMs, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) = 0; - virtual std::future<CommonAPI::CallStatus> RegisterShutdownClientAsync(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, const uint32_t& TimeoutMs, RegisterShutdownClientAsyncCallback callback) = 0; - virtual void GetNodeState(CommonAPI::CallStatus& callStatus, int32_t& ErrorCode, int32_t& NodeStateId) = 0; - virtual std::future<CommonAPI::CallStatus> GetNodeStateAsync(GetNodeStateAsyncCallback callback) = 0; - virtual void GetSessionState(const std::string& SessionName, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& SessionState, int32_t& ErrorCode) = 0; - virtual std::future<CommonAPI::CallStatus> GetSessionStateAsync(const std::string& SessionName, const int32_t& SeatID, GetSessionStateAsyncCallback callback) = 0; - virtual void SetSessionState(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SessionState, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) = 0; - virtual std::future<CommonAPI::CallStatus> SetSessionStateAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SessionState, const int32_t& SeatID, SetSessionStateAsyncCallback callback) = 0; -}; - -} // namespace NodeStateManager -} // namespace genivi -} // namespace org - -#endif // ORG_GENIVI_NODESTATEMANAGER_Consumer_PROXY_BASE_H_ diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerStub.h b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerStub.h deleted file mode 100644 index c56949a..0000000 --- a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerStub.h +++ /dev/null @@ -1,152 +0,0 @@ -/* -* 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/. -*/ -/** - * @author Christian Linke - */ -#ifndef ORG_GENIVI_NODESTATEMANAGER_Consumer_STUB_H_ -#define ORG_GENIVI_NODESTATEMANAGER_Consumer_STUB_H_ - - - - -#include "Consumer.h" - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <unordered_set> -#include <vector> - -#include <CommonAPI/Stub.h> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace org { -namespace genivi { -namespace NodeStateManager { - -/** - * Receives messages from remote and handles all dispatching of deserialized calls - * to a stub for the service Consumer. Also provides means to send broadcasts - * and attribute-changed-notifications of observable attributes as defined by this service. - * An application developer should not need to bother with this class. - */ -class ConsumerStubAdapter: virtual public CommonAPI::StubAdapter, public Consumer { - public: - - /** - * Sends a broadcast event for NodeApplicationMode. Should not be called directly. - * Instead, the "fire<broadcastName>Event" methods of the stub should be used. - */ - virtual void fireNodeApplicationModeEvent(const int32_t& ApplicationModeId) = 0; - /** - * Sends a broadcast event for SessionStateChanged. Should not be called directly. - * Instead, the "fire<broadcastName>Event" methods of the stub should be used. - */ - virtual void fireSessionStateChangedEvent(const std::string& SessionStateName, const int32_t& SeatID, const int32_t& SessionState) = 0; - /** - * Sends a broadcast event for NodeState. Should not be called directly. - * Instead, the "fire<broadcastName>Event" methods of the stub should be used. - */ - virtual void fireNodeStateEvent(const int32_t& NodeState) = 0; - - - virtual void deactivateManagedInstances() = 0; -protected: - /** - * Defines properties for storing the ClientIds of clients / proxies that have - * subscribed to the selective broadcasts - */ -}; - - -/** - * Defines the necessary callbacks to handle remote set events related to the attributes - * defined in the IDL description for Consumer. - * For each attribute two callbacks are defined: - * - a verification callback that allows to verify the requested value and to prevent setting - * e.g. an invalid value ("onRemoteSet<AttributeName>"). - * - an action callback to do local work after the attribute value has been changed - * ("onRemote<AttributeName>Changed"). - * - * This class and the one below are the ones an application developer needs to have - * a look at if he wants to implement a service. - */ -class ConsumerStubRemoteEvent { - public: - virtual ~ConsumerStubRemoteEvent() { } - - - - - -}; - - -/** - * Defines the interface that must be implemented by any class that should provide - * the service Consumer to remote clients. - * This class and the one above are the ones an application developer needs to have - * a look at if he wants to implement a service. - */ -class ConsumerStub : public virtual CommonAPI::Stub<ConsumerStubAdapter, ConsumerStubRemoteEvent> { -public: - virtual ~ConsumerStub() { } - virtual const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId) = 0; - - /// Provides getter access to the attribute BootMode - virtual const int32_t& getBootModeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId) = 0; - /// Provides getter access to the attribute RestartReason - virtual const int32_t& getRestartReasonAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId) = 0; - /// Provides getter access to the attribute ShutdownReason - virtual const int32_t& getShutdownReasonAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId) = 0; - /// Provides getter access to the attribute WakeUpReason - virtual const int32_t& getWakeUpReasonAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId) = 0; - - /// This is the method that will be called on remote calls on the method GetAppHealthCount. - virtual void GetAppHealthCount(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t& Count) = 0; - /// This is the method that will be called on remote calls on the method LifecycleRequestComplete. - virtual void LifecycleRequestComplete(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t RequestId, int32_t Status, int32_t& ErrorCode) = 0; - /// This is the method that will be called on remote calls on the method GetInterfaceVersion. - virtual void GetInterfaceVersion(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t& Version) = 0; - /// This is the method that will be called on remote calls on the method GetApplicationMode. - virtual void GetApplicationMode(const std::shared_ptr<CommonAPI::ClientId> clientId, int32_t& ErrorCode, int32_t& ApplicationModeId) = 0; - /// This is the method that will be called on remote calls on the method UnRegisterSession. - virtual void UnRegisterSession(const std::shared_ptr<CommonAPI::ClientId> clientId, std::string SessionName, std::string SessionOwner, int32_t SeatID, int32_t& ErrorCode) = 0; - /// This is the method that will be called on remote calls on the method RegisterSession. - virtual void RegisterSession(const std::shared_ptr<CommonAPI::ClientId> clientId, std::string SessionName, std::string SessionOwner, int32_t SeatID, int32_t SessionState, int32_t& ErrorCode) = 0; - /// This is the method that will be called on remote calls on the method UnRegisterShutdownClient. - virtual void UnRegisterShutdownClient(const std::shared_ptr<CommonAPI::ClientId> clientId, std::string BusName, std::string ObjName, uint32_t ShutdownMode, int32_t& ErrorCode) = 0; - /// This is the method that will be called on remote calls on the method RegisterShutdownClient. - virtual void RegisterShutdownClient(const std::shared_ptr<CommonAPI::ClientId> clientId, std::string BusName, std::string ObjName, uint32_t ShutdownMode, uint32_t TimeoutMs, int32_t& ErrorCode) = 0; - /// This is the method that will be called on remote calls on the method GetNodeState. - virtual void GetNodeState(const std::shared_ptr<CommonAPI::ClientId> clientId, int32_t& ErrorCode, int32_t& NodeStateId) = 0; - /// This is the method that will be called on remote calls on the method GetSessionState. - virtual void GetSessionState(const std::shared_ptr<CommonAPI::ClientId> clientId, std::string SessionName, int32_t SeatID, int32_t& SessionState, int32_t& ErrorCode) = 0; - /// This is the method that will be called on remote calls on the method SetSessionState. - virtual void SetSessionState(const std::shared_ptr<CommonAPI::ClientId> clientId, std::string SessionName, std::string SessionOwner, int32_t SessionState, int32_t SeatID, int32_t& ErrorCode) = 0; - /// Sends a broadcast event for NodeApplicationMode. - virtual void fireNodeApplicationModeEvent(const int32_t& ApplicationModeId) = 0; - /// Sends a broadcast event for SessionStateChanged. - virtual void fireSessionStateChangedEvent(const std::string& SessionStateName, const int32_t& SeatID, const int32_t& SessionState) = 0; - /// Sends a broadcast event for NodeState. - virtual void fireNodeStateEvent(const int32_t& NodeState) = 0; - - using CommonAPI::Stub<ConsumerStubAdapter, ConsumerStubRemoteEvent>::initStubAdapter; - typedef CommonAPI::Stub<ConsumerStubAdapter, ConsumerStubRemoteEvent>::StubAdapterType StubAdapterType; - typedef CommonAPI::Stub<ConsumerStubAdapter, ConsumerStubRemoteEvent>::RemoteEventHandlerType RemoteEventHandlerType; -}; - -} // namespace NodeStateManager -} // namespace genivi -} // namespace org - -#endif // ORG_GENIVI_NODESTATEMANAGER_Consumer_STUB_H_ diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerStubDefault.cpp b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerStubDefault.cpp deleted file mode 100644 index 1e34da5..0000000 --- a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerStubDefault.cpp +++ /dev/null @@ -1,241 +0,0 @@ -/* -* 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 <org/genivi/NodeStateManager/ConsumerStubDefault.h> - -namespace org { -namespace genivi { -namespace NodeStateManager { - -ConsumerStubDefault::ConsumerStubDefault(): - remoteEventHandler_(this), - interfaceVersion_(Consumer::getInterfaceVersion()) { -} - -const CommonAPI::Version& ConsumerStubDefault::getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId) { - return interfaceVersion_; -} - -ConsumerStubRemoteEvent* ConsumerStubDefault::initStubAdapter(const std::shared_ptr<ConsumerStubAdapter>& stubAdapter) { - CommonAPI::Stub<ConsumerStubAdapter, ConsumerStubRemoteEvent>::stubAdapter_ = stubAdapter; - return &remoteEventHandler_; -} - -const int32_t& ConsumerStubDefault::getBootModeAttribute() { - return bootModeAttributeValue_; -} - -const int32_t& ConsumerStubDefault::getBootModeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId) { - return getBootModeAttribute(); -} - -void ConsumerStubDefault::setBootModeAttribute(int32_t value) { - trySetBootModeAttribute(std::move(value)); -} - -bool ConsumerStubDefault::trySetBootModeAttribute(int32_t value) { - if (!validateBootModeAttributeRequestedValue(value)) - return false; - - const bool valueChanged = (bootModeAttributeValue_ != value); - bootModeAttributeValue_ = std::move(value); - return valueChanged; -} - -bool ConsumerStubDefault::validateBootModeAttributeRequestedValue(const int32_t& value) { - return true; -} - - -const int32_t& ConsumerStubDefault::getRestartReasonAttribute() { - return restartReasonAttributeValue_; -} - -const int32_t& ConsumerStubDefault::getRestartReasonAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId) { - return getRestartReasonAttribute(); -} - -void ConsumerStubDefault::setRestartReasonAttribute(int32_t value) { - trySetRestartReasonAttribute(std::move(value)); -} - -bool ConsumerStubDefault::trySetRestartReasonAttribute(int32_t value) { - if (!validateRestartReasonAttributeRequestedValue(value)) - return false; - - const bool valueChanged = (restartReasonAttributeValue_ != value); - restartReasonAttributeValue_ = std::move(value); - return valueChanged; -} - -bool ConsumerStubDefault::validateRestartReasonAttributeRequestedValue(const int32_t& value) { - return true; -} - - -const int32_t& ConsumerStubDefault::getShutdownReasonAttribute() { - return shutdownReasonAttributeValue_; -} - -const int32_t& ConsumerStubDefault::getShutdownReasonAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId) { - return getShutdownReasonAttribute(); -} - -void ConsumerStubDefault::setShutdownReasonAttribute(int32_t value) { - trySetShutdownReasonAttribute(std::move(value)); -} - -bool ConsumerStubDefault::trySetShutdownReasonAttribute(int32_t value) { - if (!validateShutdownReasonAttributeRequestedValue(value)) - return false; - - const bool valueChanged = (shutdownReasonAttributeValue_ != value); - shutdownReasonAttributeValue_ = std::move(value); - return valueChanged; -} - -bool ConsumerStubDefault::validateShutdownReasonAttributeRequestedValue(const int32_t& value) { - return true; -} - - -const int32_t& ConsumerStubDefault::getWakeUpReasonAttribute() { - return wakeUpReasonAttributeValue_; -} - -const int32_t& ConsumerStubDefault::getWakeUpReasonAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId) { - return getWakeUpReasonAttribute(); -} - -void ConsumerStubDefault::setWakeUpReasonAttribute(int32_t value) { - trySetWakeUpReasonAttribute(std::move(value)); -} - -bool ConsumerStubDefault::trySetWakeUpReasonAttribute(int32_t value) { - if (!validateWakeUpReasonAttributeRequestedValue(value)) - return false; - - const bool valueChanged = (wakeUpReasonAttributeValue_ != value); - wakeUpReasonAttributeValue_ = std::move(value); - return valueChanged; -} - -bool ConsumerStubDefault::validateWakeUpReasonAttributeRequestedValue(const int32_t& value) { - return true; -} - - - -void ConsumerStubDefault::GetAppHealthCount(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t& Count) { - // Call old style methods in default - GetAppHealthCount(Count); -} -void ConsumerStubDefault::GetAppHealthCount(uint32_t& Count) { - // No operation in default -} - -void ConsumerStubDefault::LifecycleRequestComplete(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t RequestId, int32_t Status, int32_t& ErrorCode) { - // Call old style methods in default - LifecycleRequestComplete(RequestId, Status, ErrorCode); -} -void ConsumerStubDefault::LifecycleRequestComplete(uint32_t RequestId, int32_t Status, int32_t& ErrorCode) { - // No operation in default -} - -void ConsumerStubDefault::GetInterfaceVersion(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t& Version) { - // Call old style methods in default - GetInterfaceVersion(Version); -} -void ConsumerStubDefault::GetInterfaceVersion(uint32_t& Version) { - // No operation in default -} - -void ConsumerStubDefault::GetApplicationMode(const std::shared_ptr<CommonAPI::ClientId> clientId, int32_t& ErrorCode, int32_t& ApplicationModeId) { - // Call old style methods in default - GetApplicationMode(ErrorCode, ApplicationModeId); -} -void ConsumerStubDefault::GetApplicationMode(int32_t& ErrorCode, int32_t& ApplicationModeId) { - // No operation in default -} - -void ConsumerStubDefault::UnRegisterSession(const std::shared_ptr<CommonAPI::ClientId> clientId, std::string SessionName, std::string SessionOwner, int32_t SeatID, int32_t& ErrorCode) { - // Call old style methods in default - UnRegisterSession(SessionName, SessionOwner, SeatID, ErrorCode); -} -void ConsumerStubDefault::UnRegisterSession(std::string SessionName, std::string SessionOwner, int32_t SeatID, int32_t& ErrorCode) { - // No operation in default -} - -void ConsumerStubDefault::RegisterSession(const std::shared_ptr<CommonAPI::ClientId> clientId, std::string SessionName, std::string SessionOwner, int32_t SeatID, int32_t SessionState, int32_t& ErrorCode) { - // Call old style methods in default - RegisterSession(SessionName, SessionOwner, SeatID, SessionState, ErrorCode); -} -void ConsumerStubDefault::RegisterSession(std::string SessionName, std::string SessionOwner, int32_t SeatID, int32_t SessionState, int32_t& ErrorCode) { - // No operation in default -} - -void ConsumerStubDefault::UnRegisterShutdownClient(const std::shared_ptr<CommonAPI::ClientId> clientId, std::string BusName, std::string ObjName, uint32_t ShutdownMode, int32_t& ErrorCode) { - // Call old style methods in default - UnRegisterShutdownClient(BusName, ObjName, ShutdownMode, ErrorCode); -} -void ConsumerStubDefault::UnRegisterShutdownClient(std::string BusName, std::string ObjName, uint32_t ShutdownMode, int32_t& ErrorCode) { - // No operation in default -} - -void ConsumerStubDefault::RegisterShutdownClient(const std::shared_ptr<CommonAPI::ClientId> clientId, std::string BusName, std::string ObjName, uint32_t ShutdownMode, uint32_t TimeoutMs, int32_t& ErrorCode) { - // Call old style methods in default - RegisterShutdownClient(BusName, ObjName, ShutdownMode, TimeoutMs, ErrorCode); -} -void ConsumerStubDefault::RegisterShutdownClient(std::string BusName, std::string ObjName, uint32_t ShutdownMode, uint32_t TimeoutMs, int32_t& ErrorCode) { - // No operation in default -} - -void ConsumerStubDefault::GetNodeState(const std::shared_ptr<CommonAPI::ClientId> clientId, int32_t& ErrorCode, int32_t& NodeStateId) { - // Call old style methods in default - GetNodeState(ErrorCode, NodeStateId); -} -void ConsumerStubDefault::GetNodeState(int32_t& ErrorCode, int32_t& NodeStateId) { - // No operation in default -} - -void ConsumerStubDefault::GetSessionState(const std::shared_ptr<CommonAPI::ClientId> clientId, std::string SessionName, int32_t SeatID, int32_t& SessionState, int32_t& ErrorCode) { - // Call old style methods in default - GetSessionState(SessionName, SeatID, SessionState, ErrorCode); -} -void ConsumerStubDefault::GetSessionState(std::string SessionName, int32_t SeatID, int32_t& SessionState, int32_t& ErrorCode) { - // No operation in default -} - -void ConsumerStubDefault::SetSessionState(const std::shared_ptr<CommonAPI::ClientId> clientId, std::string SessionName, std::string SessionOwner, int32_t SessionState, int32_t SeatID, int32_t& ErrorCode) { - // Call old style methods in default - SetSessionState(SessionName, SessionOwner, SessionState, SeatID, ErrorCode); -} -void ConsumerStubDefault::SetSessionState(std::string SessionName, std::string SessionOwner, int32_t SessionState, int32_t SeatID, int32_t& ErrorCode) { - // No operation in default -} - - -void ConsumerStubDefault::fireNodeApplicationModeEvent(const int32_t& ApplicationModeId) { - stubAdapter_->fireNodeApplicationModeEvent(ApplicationModeId); -} -void ConsumerStubDefault::fireSessionStateChangedEvent(const std::string& SessionStateName, const int32_t& SeatID, const int32_t& SessionState) { - stubAdapter_->fireSessionStateChangedEvent(SessionStateName, SeatID, SessionState); -} -void ConsumerStubDefault::fireNodeStateEvent(const int32_t& NodeState) { - stubAdapter_->fireNodeStateEvent(NodeState); -} - - -ConsumerStubDefault::RemoteEventHandler::RemoteEventHandler(ConsumerStubDefault* defaultStub): - defaultStub_(defaultStub) { -} - -} // namespace NodeStateManager -} // namespace genivi -} // namespace org diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerStubDefault.h b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerStubDefault.h deleted file mode 100644 index 80dc926..0000000 --- a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerStubDefault.h +++ /dev/null @@ -1,131 +0,0 @@ -/* -* 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/. -*/ -/** - * @author Christian Linke - */ -#ifndef ORG_GENIVI_NODESTATEMANAGER_Consumer_STUB_DEFAULT_H_ -#define ORG_GENIVI_NODESTATEMANAGER_Consumer_STUB_DEFAULT_H_ - - -#include <org/genivi/NodeStateManager/ConsumerStub.h> -#include <sstream> - -namespace org { -namespace genivi { -namespace NodeStateManager { - -/** - * Provides a default implementation for ConsumerStubRemoteEvent and - * ConsumerStub. Method callbacks have an empty implementation, - * remote set calls on attributes will always change the value of the attribute - * to the one received. - * - * Override this stub if you only want to provide a subset of the functionality - * that would be defined for this service, and/or if you do not need any non-default - * behaviour. - */ -class ConsumerStubDefault : public virtual ConsumerStub { -public: - ConsumerStubDefault(); - - ConsumerStubRemoteEvent* initStubAdapter(const std::shared_ptr<ConsumerStubAdapter>& stubAdapter); - - const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId); - - virtual const int32_t& getBootModeAttribute(); - virtual const int32_t& getBootModeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId); - virtual void setBootModeAttribute(int32_t value); - virtual const int32_t& getRestartReasonAttribute(); - virtual const int32_t& getRestartReasonAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId); - virtual void setRestartReasonAttribute(int32_t value); - virtual const int32_t& getShutdownReasonAttribute(); - virtual const int32_t& getShutdownReasonAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId); - virtual void setShutdownReasonAttribute(int32_t value); - virtual const int32_t& getWakeUpReasonAttribute(); - virtual const int32_t& getWakeUpReasonAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId); - virtual void setWakeUpReasonAttribute(int32_t value); - - virtual void GetAppHealthCount(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t& Count); - virtual void GetAppHealthCount(uint32_t& Count); - - virtual void LifecycleRequestComplete(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t RequestId, int32_t Status, int32_t& ErrorCode); - virtual void LifecycleRequestComplete(uint32_t RequestId, int32_t Status, int32_t& ErrorCode); - - virtual void GetInterfaceVersion(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t& Version); - virtual void GetInterfaceVersion(uint32_t& Version); - - virtual void GetApplicationMode(const std::shared_ptr<CommonAPI::ClientId> clientId, int32_t& ErrorCode, int32_t& ApplicationModeId); - virtual void GetApplicationMode(int32_t& ErrorCode, int32_t& ApplicationModeId); - - virtual void UnRegisterSession(const std::shared_ptr<CommonAPI::ClientId> clientId, std::string SessionName, std::string SessionOwner, int32_t SeatID, int32_t& ErrorCode); - virtual void UnRegisterSession(std::string SessionName, std::string SessionOwner, int32_t SeatID, int32_t& ErrorCode); - - virtual void RegisterSession(const std::shared_ptr<CommonAPI::ClientId> clientId, std::string SessionName, std::string SessionOwner, int32_t SeatID, int32_t SessionState, int32_t& ErrorCode); - virtual void RegisterSession(std::string SessionName, std::string SessionOwner, int32_t SeatID, int32_t SessionState, int32_t& ErrorCode); - - virtual void UnRegisterShutdownClient(const std::shared_ptr<CommonAPI::ClientId> clientId, std::string BusName, std::string ObjName, uint32_t ShutdownMode, int32_t& ErrorCode); - virtual void UnRegisterShutdownClient(std::string BusName, std::string ObjName, uint32_t ShutdownMode, int32_t& ErrorCode); - - virtual void RegisterShutdownClient(const std::shared_ptr<CommonAPI::ClientId> clientId, std::string BusName, std::string ObjName, uint32_t ShutdownMode, uint32_t TimeoutMs, int32_t& ErrorCode); - virtual void RegisterShutdownClient(std::string BusName, std::string ObjName, uint32_t ShutdownMode, uint32_t TimeoutMs, int32_t& ErrorCode); - - virtual void GetNodeState(const std::shared_ptr<CommonAPI::ClientId> clientId, int32_t& ErrorCode, int32_t& NodeStateId); - virtual void GetNodeState(int32_t& ErrorCode, int32_t& NodeStateId); - - virtual void GetSessionState(const std::shared_ptr<CommonAPI::ClientId> clientId, std::string SessionName, int32_t SeatID, int32_t& SessionState, int32_t& ErrorCode); - virtual void GetSessionState(std::string SessionName, int32_t SeatID, int32_t& SessionState, int32_t& ErrorCode); - - virtual void SetSessionState(const std::shared_ptr<CommonAPI::ClientId> clientId, std::string SessionName, std::string SessionOwner, int32_t SessionState, int32_t SeatID, int32_t& ErrorCode); - virtual void SetSessionState(std::string SessionName, std::string SessionOwner, int32_t SessionState, int32_t SeatID, int32_t& ErrorCode); - - - virtual void fireNodeApplicationModeEvent(const int32_t& ApplicationModeId); - virtual void fireSessionStateChangedEvent(const std::string& SessionStateName, const int32_t& SeatID, const int32_t& SessionState); - virtual void fireNodeStateEvent(const int32_t& NodeState); - - -protected: - virtual bool trySetBootModeAttribute(int32_t value); - virtual bool validateBootModeAttributeRequestedValue(const int32_t& value); - virtual bool trySetRestartReasonAttribute(int32_t value); - virtual bool validateRestartReasonAttributeRequestedValue(const int32_t& value); - virtual bool trySetShutdownReasonAttribute(int32_t value); - virtual bool validateShutdownReasonAttributeRequestedValue(const int32_t& value); - virtual bool trySetWakeUpReasonAttribute(int32_t value); - virtual bool validateWakeUpReasonAttributeRequestedValue(const int32_t& value); -private: - class RemoteEventHandler: public ConsumerStubRemoteEvent { - public: - RemoteEventHandler(ConsumerStubDefault* defaultStub); - - - - - - - private: - ConsumerStubDefault* defaultStub_; - }; - - RemoteEventHandler remoteEventHandler_; - - int32_t bootModeAttributeValue_; - int32_t restartReasonAttributeValue_; - int32_t shutdownReasonAttributeValue_; - int32_t wakeUpReasonAttributeValue_; - - CommonAPI::Version interfaceVersion_; -}; - -} // namespace NodeStateManager -} // namespace genivi -} // namespace org - -#endif // ORG_GENIVI_NODESTATEMANAGER_Consumer_STUB_DEFAULT_H_ diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer.h b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer.h deleted file mode 100644 index 56cbf4c..0000000 --- a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer.h +++ /dev/null @@ -1,64 +0,0 @@ -/* -* 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/. -*/ -/** - * @author Christian Linke - */ -#ifndef ORG_GENIVI_NODESTATEMANAGER_Life_Cycle_Consumer_H_ -#define ORG_GENIVI_NODESTATEMANAGER_Life_Cycle_Consumer_H_ - - - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <CommonAPI/types.h> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace org { -namespace genivi { -namespace NodeStateManager { - -class LifeCycleConsumer { - public: - virtual ~LifeCycleConsumer() { } - - static inline const char* getInterfaceId(); - static inline CommonAPI::Version getInterfaceVersion(); -}; - -const char* LifeCycleConsumer::getInterfaceId() { - static const char* interfaceId = "org.genivi.NodeStateManager.LifeCycleConsumer"; - return interfaceId; -} - -CommonAPI::Version LifeCycleConsumer::getInterfaceVersion() { - return CommonAPI::Version(1, 0); -} - - -} // namespace NodeStateManager -} // namespace genivi -} // namespace org - -namespace CommonAPI { - -} - - -namespace std { - //hashes for types - - //hashes for error types -} - -#endif // ORG_GENIVI_NODESTATEMANAGER_Life_Cycle_Consumer_H_ diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerDBusProxy.cpp b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerDBusProxy.cpp deleted file mode 100644 index ab06c26..0000000 --- a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerDBusProxy.cpp +++ /dev/null @@ -1,76 +0,0 @@ -/* -* 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/. -*/ -/** - * @author Christian Linke - */ -#include "LifeCycleConsumerDBusProxy.h" - -namespace org { -namespace genivi { -namespace NodeStateManager { - -std::shared_ptr<CommonAPI::DBus::DBusProxy> createLifeCycleConsumerDBusProxy( - const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory, - const std::string& commonApiAddress, - const std::string& interfaceName, - const std::string& busName, - const std::string& objectPath, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection) { - return std::make_shared<LifeCycleConsumerDBusProxy>(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection); -} - -__attribute__((constructor)) void registerLifeCycleConsumerDBusProxy(void) { - CommonAPI::DBus::DBusFactory::registerProxyFactoryMethod(LifeCycleConsumer::getInterfaceId(), - &createLifeCycleConsumerDBusProxy); -} - -LifeCycleConsumerDBusProxy::LifeCycleConsumerDBusProxy( - const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory, - const std::string& commonApiAddress, - const std::string& interfaceName, - const std::string& busName, - const std::string& objectPath, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection): - CommonAPI::DBus::DBusProxy(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyconnection) - { - } - - - -void LifeCycleConsumerDBusProxy::LifecycleRequest(const uint32_t& Request, const uint32_t& RequestId, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) { - CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint32_t, uint32_t>, - CommonAPI::DBus::DBusSerializableArguments<int32_t> >::callMethodWithReply( - *this, - "LifecycleRequest", - "uu", - Request, RequestId, - callStatus - , ErrorCode); -} -std::future<CommonAPI::CallStatus> LifeCycleConsumerDBusProxy::LifecycleRequestAsync(const uint32_t& Request, const uint32_t& RequestId, LifecycleRequestAsyncCallback callback) { - return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint32_t, uint32_t>, - CommonAPI::DBus::DBusSerializableArguments<int32_t> >::callMethodAsync( - *this, - "LifecycleRequest", - "uu", - Request, RequestId, - std::move(callback)); -} - - - -void LifeCycleConsumerDBusProxy::getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const { - ownVersionMajor = 1; - ownVersionMinor = 0; -} - -} // namespace NodeStateManager -} // namespace genivi -} // namespace org diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerDBusProxy.h b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerDBusProxy.h deleted file mode 100644 index d69d805..0000000 --- a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerDBusProxy.h +++ /dev/null @@ -1,64 +0,0 @@ -/* -* 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/. -*/ -/** - * @author Christian Linke - */ -#ifndef ORG_GENIVI_NODESTATEMANAGER_Life_Cycle_Consumer_DBUS_PROXY_H_ -#define ORG_GENIVI_NODESTATEMANAGER_Life_Cycle_Consumer_DBUS_PROXY_H_ - -#include <org/genivi/NodeStateManager/LifeCycleConsumerProxyBase.h> - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <CommonAPI/DBus/DBusFactory.h> -#include <CommonAPI/DBus/DBusProxy.h> - -#undef COMMONAPI_INTERNAL_COMPILATION - -#include <string> - -namespace org { -namespace genivi { -namespace NodeStateManager { - -class LifeCycleConsumerDBusProxy: virtual public LifeCycleConsumerProxyBase, virtual public CommonAPI::DBus::DBusProxy { - public: - LifeCycleConsumerDBusProxy( - const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory, - const std::string& commonApiAddress, - const std::string& interfaceName, - const std::string& busName, - const std::string& objectPath, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection); - - virtual ~LifeCycleConsumerDBusProxy() { } - - - - virtual void LifecycleRequest(const uint32_t& Request, const uint32_t& RequestId, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode); - virtual std::future<CommonAPI::CallStatus> LifecycleRequestAsync(const uint32_t& Request, const uint32_t& RequestId, LifecycleRequestAsyncCallback callback); - - - virtual void getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const; - - private: - - -}; - - - -} // namespace NodeStateManager -} // namespace genivi -} // namespace org - -#endif // ORG_GENIVI_NODESTATEMANAGER_Life_Cycle_Consumer_DBUS_PROXY_H_ diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerDBusStubAdapter.cpp b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerDBusStubAdapter.cpp deleted file mode 100644 index 96ac35b..0000000 --- a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerDBusStubAdapter.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/* -* 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 "LifeCycleConsumerDBusStubAdapter.h" -#include <org/genivi/NodeStateManager/LifeCycleConsumer.h> - -namespace org { -namespace genivi { -namespace NodeStateManager { - -std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> createLifeCycleConsumerDBusStubAdapter( - const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory, - const std::string& commonApiAddress, - const std::string& interfaceName, - const std::string& busName, - const std::string& objectPath, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection, - const std::shared_ptr<CommonAPI::StubBase>& stubBase) { - return std::make_shared<LifeCycleConsumerDBusStubAdapter>(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection, stubBase); -} - -__attribute__((constructor)) void registerLifeCycleConsumerDBusStubAdapter(void) { - CommonAPI::DBus::DBusFactory::registerAdapterFactoryMethod(LifeCycleConsumer::getInterfaceId(), - &createLifeCycleConsumerDBusStubAdapter); -} - - - -LifeCycleConsumerDBusStubAdapterInternal::~LifeCycleConsumerDBusStubAdapterInternal() { - deactivateManagedInstances(); - LifeCycleConsumerDBusStubAdapterHelper::deinit(); -} - -void LifeCycleConsumerDBusStubAdapterInternal::deactivateManagedInstances() { -} - -const char* LifeCycleConsumerDBusStubAdapterInternal::getMethodsDBusIntrospectionXmlData() const { - static const std::string introspectionData = - "<method name=\"getInterfaceVersion\">\n" - "<arg name=\"value\" type=\"uu\" direction=\"out\" />" - "</method>\n" - "<method name=\"LifecycleRequest\">\n" - "<arg name=\"Request\" type=\"u\" direction=\"in\" />\n" - "<arg name=\"RequestId\" type=\"u\" direction=\"in\" />\n" - "<arg name=\"ErrorCode\" type=\"i\" direction=\"out\" />\n" - "</method>\n" - - ; - return introspectionData.c_str(); -} - -static CommonAPI::DBus::DBusGetAttributeStubDispatcher< - LifeCycleConsumerStub, - CommonAPI::Version - > getLifeCycleConsumerInterfaceVersionStubDispatcher(&LifeCycleConsumerStub::getInterfaceVersion, "uu"); - - -static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< - LifeCycleConsumerStub, - std::tuple<uint32_t, uint32_t>, - std::tuple<int32_t> - > lifecycleRequestStubDispatcher(&LifeCycleConsumerStub::LifecycleRequest, "i"); - - - -const LifeCycleConsumerDBusStubAdapterHelper::StubDispatcherTable& LifeCycleConsumerDBusStubAdapterInternal::getStubDispatcherTable() { - return stubDispatcherTable_; -} - - -LifeCycleConsumerDBusStubAdapterInternal::LifeCycleConsumerDBusStubAdapterInternal( - const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory, - const std::string& commonApiAddress, - const std::string& dbusInterfaceName, - const std::string& dbusBusName, - const std::string& dbusObjectPath, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection, - const std::shared_ptr<CommonAPI::StubBase>& stub): - CommonAPI::DBus::DBusStubAdapter( - factory, - commonApiAddress, - dbusInterfaceName, - dbusBusName, - dbusObjectPath, - dbusConnection, - false), - LifeCycleConsumerDBusStubAdapterHelper( - factory, - commonApiAddress, - dbusInterfaceName, - dbusBusName, - dbusObjectPath, - dbusConnection, - std::dynamic_pointer_cast<LifeCycleConsumerStub>(stub), - false), - stubDispatcherTable_({ - { { "LifecycleRequest", "uu" }, &org::genivi::NodeStateManager::lifecycleRequestStubDispatcher } - }) { - - stubDispatcherTable_.insert({ { "getInterfaceVersion", "" }, &org::genivi::NodeStateManager::getLifeCycleConsumerInterfaceVersionStubDispatcher }); -} - -} // namespace NodeStateManager -} // namespace genivi -} // namespace org diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerDBusStubAdapter.h b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerDBusStubAdapter.h deleted file mode 100644 index c03f0c3..0000000 --- a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerDBusStubAdapter.h +++ /dev/null @@ -1,95 +0,0 @@ -/* -* 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/. -*/ -/** - * @author Christian Linke - */ -#ifndef ORG_GENIVI_NODESTATEMANAGER_Life_Cycle_Consumer_DBUS_STUB_ADAPTER_H_ -#define ORG_GENIVI_NODESTATEMANAGER_Life_Cycle_Consumer_DBUS_STUB_ADAPTER_H_ - -#include <org/genivi/NodeStateManager/LifeCycleConsumerStub.h> - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <CommonAPI/DBus/DBusStubAdapterHelper.h> -#include <CommonAPI/DBus/DBusStubAdapter.h> -#include <CommonAPI/DBus/DBusFactory.h> -#include <CommonAPI/DBus/DBusServicePublisher.h> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace org { -namespace genivi { -namespace NodeStateManager { - -typedef CommonAPI::DBus::DBusStubAdapterHelper<LifeCycleConsumerStub> LifeCycleConsumerDBusStubAdapterHelper; - -class LifeCycleConsumerDBusStubAdapterInternal: public LifeCycleConsumerStubAdapter, public LifeCycleConsumerDBusStubAdapterHelper { - public: - LifeCycleConsumerDBusStubAdapterInternal( - const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory, - const std::string& commonApiAddress, - const std::string& dbusInterfaceName, - const std::string& dbusBusName, - const std::string& dbusObjectPath, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection, - const std::shared_ptr<CommonAPI::StubBase>& stub); - - ~LifeCycleConsumerDBusStubAdapterInternal(); - - - - - const LifeCycleConsumerDBusStubAdapterHelper::StubDispatcherTable& getStubDispatcherTable(); - - void deactivateManagedInstances(); - - - protected: - virtual const char* getMethodsDBusIntrospectionXmlData() const; - - private: - LifeCycleConsumerDBusStubAdapterHelper::StubDispatcherTable stubDispatcherTable_; -}; - -class LifeCycleConsumerDBusStubAdapter: public LifeCycleConsumerDBusStubAdapterInternal, public std::enable_shared_from_this<LifeCycleConsumerDBusStubAdapter> { -public: - LifeCycleConsumerDBusStubAdapter( - const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory, - const std::string& commonApiAddress, - const std::string& dbusInterfaceName, - const std::string& dbusBusName, - const std::string& dbusObjectPath, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection, - const std::shared_ptr<CommonAPI::StubBase>& stub) : - CommonAPI::DBus::DBusStubAdapter( - factory, - commonApiAddress, - dbusInterfaceName, - dbusBusName, - dbusObjectPath, - dbusConnection, - false), - LifeCycleConsumerDBusStubAdapterInternal( - factory, - commonApiAddress, - dbusInterfaceName, - dbusBusName, - dbusObjectPath, - dbusConnection, - stub) { } -}; - -} // namespace NodeStateManager -} // namespace genivi -} // namespace org - -#endif // ORG_GENIVI_NODESTATEMANAGER_Life_Cycle_Consumer_DBUS_STUB_ADAPTER_H_ diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerProxy.h b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerProxy.h deleted file mode 100644 index 374ef1e..0000000 --- a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerProxy.h +++ /dev/null @@ -1,181 +0,0 @@ -/* -* 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/. -*/ -/** - * @author Christian Linke - */ -#ifndef ORG_GENIVI_NODESTATEMANAGER_Life_Cycle_Consumer_PROXY_H_ -#define ORG_GENIVI_NODESTATEMANAGER_Life_Cycle_Consumer_PROXY_H_ - -#include "LifeCycleConsumerProxyBase.h" - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace org { -namespace genivi { -namespace NodeStateManager { - -template <typename ... _AttributeExtensions> -class LifeCycleConsumerProxy: virtual public LifeCycleConsumer, virtual public LifeCycleConsumerProxyBase -, public _AttributeExtensions... { -public: - LifeCycleConsumerProxy(std::shared_ptr<CommonAPI::Proxy> delegate); - ~LifeCycleConsumerProxy(); - - typedef LifeCycleConsumer InterfaceType; - - - - - /** - * Calls LifecycleRequest with synchronous semantics. - * - * All const parameters are input parameters to this method. - * All non-const parameters will be filled with the returned values. - * The CallStatus will be filled when the method returns and indicate either - * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus - * will be set. - */ - virtual void LifecycleRequest(const uint32_t& Request, const uint32_t& RequestId, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode); - /** - * Calls LifecycleRequest with asynchronous semantics. - * - * The provided callback will be called when the reply to this call arrives or - * an error occurs during the call. The CallStatus will indicate either "SUCCESS" - * or which type of error has occurred. In case of any error, ONLY the CallStatus - * will have a defined value. - * The std::future returned by this method will be fulfilled at arrival of the reply. - * It will provide the same value for CallStatus as will be handed to the callback. - */ - virtual std::future<CommonAPI::CallStatus> LifecycleRequestAsync(const uint32_t& Request, const uint32_t& RequestId, LifecycleRequestAsyncCallback callback); - - - /** - * Returns the CommonAPI address of the remote partner this proxy communicates with. - */ - virtual std::string getAddress() const; - - /** - * Returns the domain of the remote partner this proxy communicates with. - */ - virtual const std::string& getDomain() const; - - /** - * Returns the service ID of the remote partner this proxy communicates with. - */ - virtual const std::string& getServiceId() const; - - /** - * Returns the instance ID of the remote partner this proxy communicates with. - */ - virtual const std::string& getInstanceId() const; - - /** - * Returns true if the remote partner for this proxy is currently known to be available. - */ - virtual bool isAvailable() const; - - /** - * Returns true if the remote partner for this proxy is available. - */ - virtual bool isAvailableBlocking() const; - - /** - * Returns the wrapper class that is used to (de-)register for notifications about - * the availability of the remote partner of this proxy. - */ - virtual CommonAPI::ProxyStatusEvent& getProxyStatusEvent(); - - /** - * Returns the wrapper class that is used to access version information of the remote - * partner of this proxy. - */ - virtual CommonAPI::InterfaceVersionAttribute& getInterfaceVersionAttribute(); - - private: - std::shared_ptr<LifeCycleConsumerProxyBase> delegate_; -}; - - -// -// LifeCycleConsumerProxy Implementation -// -template <typename ... _AttributeExtensions> -LifeCycleConsumerProxy<_AttributeExtensions...>::LifeCycleConsumerProxy(std::shared_ptr<CommonAPI::Proxy> delegate): - delegate_(std::dynamic_pointer_cast<LifeCycleConsumerProxyBase>(delegate)), - _AttributeExtensions(*(std::dynamic_pointer_cast<LifeCycleConsumerProxyBase>(delegate)))... { -} - -template <typename ... _AttributeExtensions> -LifeCycleConsumerProxy<_AttributeExtensions...>::~LifeCycleConsumerProxy() { -} - -template <typename ... _AttributeExtensions> -void LifeCycleConsumerProxy<_AttributeExtensions...>::LifecycleRequest(const uint32_t& Request, const uint32_t& RequestId, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) { - delegate_->LifecycleRequest(Request, RequestId, callStatus, ErrorCode); -} - -template <typename ... _AttributeExtensions> -std::future<CommonAPI::CallStatus> LifeCycleConsumerProxy<_AttributeExtensions...>::LifecycleRequestAsync(const uint32_t& Request, const uint32_t& RequestId, LifecycleRequestAsyncCallback callback) { - return delegate_->LifecycleRequestAsync(Request, RequestId, callback); -} - -template <typename ... _AttributeExtensions> -std::string LifeCycleConsumerProxy<_AttributeExtensions...>::getAddress() const { - return delegate_->getAddress(); -} - -template <typename ... _AttributeExtensions> -const std::string& LifeCycleConsumerProxy<_AttributeExtensions...>::getDomain() const { - return delegate_->getDomain(); -} - -template <typename ... _AttributeExtensions> -const std::string& LifeCycleConsumerProxy<_AttributeExtensions...>::getServiceId() const { - return delegate_->getServiceId(); -} - -template <typename ... _AttributeExtensions> -const std::string& LifeCycleConsumerProxy<_AttributeExtensions...>::getInstanceId() const { - return delegate_->getInstanceId(); -} - -template <typename ... _AttributeExtensions> -bool LifeCycleConsumerProxy<_AttributeExtensions...>::isAvailable() const { - return delegate_->isAvailable(); -} - -template <typename ... _AttributeExtensions> -bool LifeCycleConsumerProxy<_AttributeExtensions...>::isAvailableBlocking() const { - return delegate_->isAvailableBlocking(); -} - -template <typename ... _AttributeExtensions> -CommonAPI::ProxyStatusEvent& LifeCycleConsumerProxy<_AttributeExtensions...>::getProxyStatusEvent() { - return delegate_->getProxyStatusEvent(); -} - -template <typename ... _AttributeExtensions> -CommonAPI::InterfaceVersionAttribute& LifeCycleConsumerProxy<_AttributeExtensions...>::getInterfaceVersionAttribute() { - return delegate_->getInterfaceVersionAttribute(); -} - - -} // namespace NodeStateManager -} // namespace genivi -} // namespace org - - -#endif // ORG_GENIVI_NODESTATEMANAGER_Life_Cycle_Consumer_PROXY_H_ diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerProxyBase.h b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerProxyBase.h deleted file mode 100644 index ad8ee6a..0000000 --- a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerProxyBase.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -* 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/. -*/ -/** - * @author Christian Linke - */ -#ifndef ORG_GENIVI_NODESTATEMANAGER_Life_Cycle_Consumer_PROXY_BASE_H_ -#define ORG_GENIVI_NODESTATEMANAGER_Life_Cycle_Consumer_PROXY_BASE_H_ - -#include "LifeCycleConsumer.h" - - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <vector> - -#include <CommonAPI/Proxy.h> -#include <functional> -#include <future> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace org { -namespace genivi { -namespace NodeStateManager { - -class LifeCycleConsumerProxyBase: virtual public CommonAPI::Proxy { - public: - - typedef std::function<void(const CommonAPI::CallStatus&, const int32_t&)> LifecycleRequestAsyncCallback; - - - - virtual void LifecycleRequest(const uint32_t& Request, const uint32_t& RequestId, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) = 0; - virtual std::future<CommonAPI::CallStatus> LifecycleRequestAsync(const uint32_t& Request, const uint32_t& RequestId, LifecycleRequestAsyncCallback callback) = 0; -}; - -} // namespace NodeStateManager -} // namespace genivi -} // namespace org - -#endif // ORG_GENIVI_NODESTATEMANAGER_Life_Cycle_Consumer_PROXY_BASE_H_ diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerStub.h b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerStub.h deleted file mode 100644 index 58f5bb0..0000000 --- a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerStub.h +++ /dev/null @@ -1,98 +0,0 @@ -/* -* 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/. -*/ -/** - * @author Christian Linke - */ -#ifndef ORG_GENIVI_NODESTATEMANAGER_Life_Cycle_Consumer_STUB_H_ -#define ORG_GENIVI_NODESTATEMANAGER_Life_Cycle_Consumer_STUB_H_ - - - - -#include "LifeCycleConsumer.h" - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <vector> - -#include <CommonAPI/Stub.h> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace org { -namespace genivi { -namespace NodeStateManager { - -/** - * Receives messages from remote and handles all dispatching of deserialized calls - * to a stub for the service LifeCycleConsumer. Also provides means to send broadcasts - * and attribute-changed-notifications of observable attributes as defined by this service. - * An application developer should not need to bother with this class. - */ -class LifeCycleConsumerStubAdapter: virtual public CommonAPI::StubAdapter, public LifeCycleConsumer { - public: - - - - virtual void deactivateManagedInstances() = 0; -protected: - /** - * Defines properties for storing the ClientIds of clients / proxies that have - * subscribed to the selective broadcasts - */ -}; - - -/** - * Defines the necessary callbacks to handle remote set events related to the attributes - * defined in the IDL description for LifeCycleConsumer. - * For each attribute two callbacks are defined: - * - a verification callback that allows to verify the requested value and to prevent setting - * e.g. an invalid value ("onRemoteSet<AttributeName>"). - * - an action callback to do local work after the attribute value has been changed - * ("onRemote<AttributeName>Changed"). - * - * This class and the one below are the ones an application developer needs to have - * a look at if he wants to implement a service. - */ -class LifeCycleConsumerStubRemoteEvent { - public: - virtual ~LifeCycleConsumerStubRemoteEvent() { } - -}; - - -/** - * Defines the interface that must be implemented by any class that should provide - * the service LifeCycleConsumer to remote clients. - * This class and the one above are the ones an application developer needs to have - * a look at if he wants to implement a service. - */ -class LifeCycleConsumerStub : public virtual CommonAPI::Stub<LifeCycleConsumerStubAdapter, LifeCycleConsumerStubRemoteEvent> { -public: - virtual ~LifeCycleConsumerStub() { } - virtual const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId) = 0; - - - /// This is the method that will be called on remote calls on the method LifecycleRequest. - virtual void LifecycleRequest(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t Request, uint32_t RequestId, int32_t& ErrorCode) = 0; - - using CommonAPI::Stub<LifeCycleConsumerStubAdapter, LifeCycleConsumerStubRemoteEvent>::initStubAdapter; - typedef CommonAPI::Stub<LifeCycleConsumerStubAdapter, LifeCycleConsumerStubRemoteEvent>::StubAdapterType StubAdapterType; - typedef CommonAPI::Stub<LifeCycleConsumerStubAdapter, LifeCycleConsumerStubRemoteEvent>::RemoteEventHandlerType RemoteEventHandlerType; -}; - -} // namespace NodeStateManager -} // namespace genivi -} // namespace org - -#endif // ORG_GENIVI_NODESTATEMANAGER_Life_Cycle_Consumer_STUB_H_ diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerStubDefault.cpp b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerStubDefault.cpp deleted file mode 100644 index 03801fa..0000000 --- a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerStubDefault.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* -* 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 <org/genivi/NodeStateManager/LifeCycleConsumerStubDefault.h> - -namespace org { -namespace genivi { -namespace NodeStateManager { - -LifeCycleConsumerStubDefault::LifeCycleConsumerStubDefault(): - remoteEventHandler_(this), - interfaceVersion_(LifeCycleConsumer::getInterfaceVersion()) { -} - -const CommonAPI::Version& LifeCycleConsumerStubDefault::getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId) { - return interfaceVersion_; -} - -LifeCycleConsumerStubRemoteEvent* LifeCycleConsumerStubDefault::initStubAdapter(const std::shared_ptr<LifeCycleConsumerStubAdapter>& stubAdapter) { - CommonAPI::Stub<LifeCycleConsumerStubAdapter, LifeCycleConsumerStubRemoteEvent>::stubAdapter_ = stubAdapter; - return &remoteEventHandler_; -} - - -void LifeCycleConsumerStubDefault::LifecycleRequest(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t Request, uint32_t RequestId, int32_t& ErrorCode) { - // Call old style methods in default - LifecycleRequest(Request, RequestId, ErrorCode); -} -void LifeCycleConsumerStubDefault::LifecycleRequest(uint32_t Request, uint32_t RequestId, int32_t& ErrorCode) { - // No operation in default -} - - - - -LifeCycleConsumerStubDefault::RemoteEventHandler::RemoteEventHandler(LifeCycleConsumerStubDefault* defaultStub): - defaultStub_(defaultStub) { -} - -} // namespace NodeStateManager -} // namespace genivi -} // namespace org diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerStubDefault.h b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerStubDefault.h deleted file mode 100644 index fe35b9f..0000000 --- a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerStubDefault.h +++ /dev/null @@ -1,70 +0,0 @@ -/* -* 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/. -*/ -/** - * @author Christian Linke - */ -#ifndef ORG_GENIVI_NODESTATEMANAGER_Life_Cycle_Consumer_STUB_DEFAULT_H_ -#define ORG_GENIVI_NODESTATEMANAGER_Life_Cycle_Consumer_STUB_DEFAULT_H_ - - -#include <org/genivi/NodeStateManager/LifeCycleConsumerStub.h> -#include <sstream> - -namespace org { -namespace genivi { -namespace NodeStateManager { - -/** - * Provides a default implementation for LifeCycleConsumerStubRemoteEvent and - * LifeCycleConsumerStub. Method callbacks have an empty implementation, - * remote set calls on attributes will always change the value of the attribute - * to the one received. - * - * Override this stub if you only want to provide a subset of the functionality - * that would be defined for this service, and/or if you do not need any non-default - * behaviour. - */ -class LifeCycleConsumerStubDefault : public virtual LifeCycleConsumerStub { -public: - LifeCycleConsumerStubDefault(); - - LifeCycleConsumerStubRemoteEvent* initStubAdapter(const std::shared_ptr<LifeCycleConsumerStubAdapter>& stubAdapter); - - const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId); - - - virtual void LifecycleRequest(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t Request, uint32_t RequestId, int32_t& ErrorCode); - virtual void LifecycleRequest(uint32_t Request, uint32_t RequestId, int32_t& ErrorCode); - - - - -protected: -private: - class RemoteEventHandler: public LifeCycleConsumerStubRemoteEvent { - public: - RemoteEventHandler(LifeCycleConsumerStubDefault* defaultStub); - - - private: - LifeCycleConsumerStubDefault* defaultStub_; - }; - - RemoteEventHandler remoteEventHandler_; - - - CommonAPI::Version interfaceVersion_; -}; - -} // namespace NodeStateManager -} // namespace genivi -} // namespace org - -#endif // ORG_GENIVI_NODESTATEMANAGER_Life_Cycle_Consumer_STUB_DEFAULT_H_ |