/* * This file was generated by the CommonAPI Generators. * * Copyright (C) 2013, BMW AG * * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 */ #ifndef ORG_GENIVI_NODESTATEMANAGER_Consumer_PROXY_H_ #define ORG_GENIVI_NODESTATEMANAGER_Consumer_PROXY_H_ #include "ConsumerProxyBase.h" #define COMMONAPI_INTERNAL_COMPILATION #include #include #undef COMMONAPI_INTERNAL_COMPILATION namespace org { namespace genivi { namespace NodeStateManager { template class ConsumerProxy: virtual public Consumer, virtual public ConsumerProxyBase, public _AttributeExtensions... { public: ConsumerProxy(std::shared_ptr delegate); ~ConsumerProxy(); /// 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. * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used. */ 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 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. * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used. */ 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 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. * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used. */ 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 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. * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used. */ 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 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. * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used. */ 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 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. * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used. */ 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 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. * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used. */ 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 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. * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used. */ 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 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. * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used. */ 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 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. * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used. */ 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 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. * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used. */ 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 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 available. virtual bool isAvailable() 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 delegate_; }; namespace ConsumerExtensions { template