diff options
author | Andrei Gherzan <andrei.gherzan@windriver.com> | 2015-05-13 16:06:11 +0200 |
---|---|---|
committer | James Thomas <james.thomas@codethink.co.uk> | 2015-05-19 09:21:51 +0000 |
commit | 54960599eebf199d5237f863df5a2c08e3c25823 (patch) | |
tree | b3d51a7d14a0fb97872ba56ad852e4c2216c522e | |
parent | f494c08ef20ea0057604e6f867ac439ccc088864 (diff) | |
download | audiomanager-baserock/genivi/6.2010gf494c08-generated-headers.tar.gz |
Add CommonAPI sources generated with CommonAPI 2.1.6 generatorbaserock/genivi/6.2010gf494c08-generated-headers
Signed-off-by: Andrei Gherzan <andrei.gherzan@windriver.com>
54 files changed, 25542 insertions, 0 deletions
diff --git a/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer.h b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer.h new file mode 100644 index 0000000..62c8f39 --- /dev/null +++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/Consumer.h @@ -0,0 +1,62 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +/** + * @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 new file mode 100644 index 0000000..6f4139e --- /dev/null +++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerDBusProxy.cpp @@ -0,0 +1,284 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +/** + * @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); +} + +INITIALIZER(registerConsumerDBusProxy) { + 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 new file mode 100644 index 0000000..139dd7e --- /dev/null +++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerDBusProxy.h @@ -0,0 +1,98 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +/** + * @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 new file mode 100644 index 0000000..1d59a34 --- /dev/null +++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerDBusStubAdapter.cpp @@ -0,0 +1,305 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +#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); +} + +INITIALIZER(registerConsumerDBusStubAdapter) { + CommonAPI::DBus::DBusFactory::registerAdapterFactoryMethod(Consumer::getInterfaceId(), + &createConsumerDBusStubAdapter); +} + + + +ConsumerDBusStubAdapterInternal::~ConsumerDBusStubAdapterInternal() { + deactivateManagedInstances(); + ConsumerDBusStubAdapterHelper::deinit(); +} + +void ConsumerDBusStubAdapterInternal::deactivateManagedInstances() { + +} + +const char* ConsumerDBusStubAdapterInternal::getMethodsDBusIntrospectionXmlData() const { + static const std::string introspectionData = + "<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(); +} + +CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ConsumerStub, + CommonAPI::Version + > ConsumerDBusStubAdapterInternal::getConsumerInterfaceVersionStubDispatcher(&ConsumerStub::getInterfaceVersion, "uu"); + +CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ConsumerStub, + int32_t + > ConsumerDBusStubAdapterInternal::getBootModeAttributeStubDispatcher(&ConsumerStub::getBootModeAttribute, "i"); +CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ConsumerStub, + int32_t + > ConsumerDBusStubAdapterInternal::getRestartReasonAttributeStubDispatcher(&ConsumerStub::getRestartReasonAttribute, "i"); +CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ConsumerStub, + int32_t + > ConsumerDBusStubAdapterInternal::getShutdownReasonAttributeStubDispatcher(&ConsumerStub::getShutdownReasonAttribute, "i"); +CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ConsumerStub, + int32_t + > ConsumerDBusStubAdapterInternal::getWakeUpReasonAttributeStubDispatcher(&ConsumerStub::getWakeUpReasonAttribute, "i"); + + +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ConsumerStub, + std::tuple<>, + std::tuple<uint32_t> + > ConsumerDBusStubAdapterInternal::getAppHealthCountStubDispatcher(&ConsumerStub::GetAppHealthCount, "u"); +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ConsumerStub, + std::tuple<uint32_t, int32_t>, + std::tuple<int32_t> + > ConsumerDBusStubAdapterInternal::lifecycleRequestCompleteStubDispatcher(&ConsumerStub::LifecycleRequestComplete, "i"); +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ConsumerStub, + std::tuple<>, + std::tuple<uint32_t> + > ConsumerDBusStubAdapterInternal::getInterfaceVersionStubDispatcher(&ConsumerStub::GetInterfaceVersion, "u"); +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ConsumerStub, + std::tuple<>, + std::tuple<int32_t, int32_t> + > ConsumerDBusStubAdapterInternal::getApplicationModeStubDispatcher(&ConsumerStub::GetApplicationMode, "ii"); +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ConsumerStub, + std::tuple<std::string, std::string, int32_t>, + std::tuple<int32_t> + > ConsumerDBusStubAdapterInternal::unRegisterSessionStubDispatcher(&ConsumerStub::UnRegisterSession, "i"); +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ConsumerStub, + std::tuple<std::string, std::string, int32_t, int32_t>, + std::tuple<int32_t> + > ConsumerDBusStubAdapterInternal::registerSessionStubDispatcher(&ConsumerStub::RegisterSession, "i"); +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ConsumerStub, + std::tuple<std::string, std::string, uint32_t>, + std::tuple<int32_t> + > ConsumerDBusStubAdapterInternal::unRegisterShutdownClientStubDispatcher(&ConsumerStub::UnRegisterShutdownClient, "i"); +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ConsumerStub, + std::tuple<std::string, std::string, uint32_t, uint32_t>, + std::tuple<int32_t> + > ConsumerDBusStubAdapterInternal::registerShutdownClientStubDispatcher(&ConsumerStub::RegisterShutdownClient, "i"); +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ConsumerStub, + std::tuple<>, + std::tuple<int32_t, int32_t> + > ConsumerDBusStubAdapterInternal::getNodeStateStubDispatcher(&ConsumerStub::GetNodeState, "ii"); +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ConsumerStub, + std::tuple<std::string, int32_t>, + std::tuple<int32_t, int32_t> + > ConsumerDBusStubAdapterInternal::getSessionStateStubDispatcher(&ConsumerStub::GetSessionState, "ii"); +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ConsumerStub, + std::tuple<std::string, std::string, int32_t, int32_t>, + std::tuple<int32_t> + > ConsumerDBusStubAdapterInternal::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_; +} + +const CommonAPI::DBus::StubAttributeTable& ConsumerDBusStubAdapterInternal::getStubAttributeTable() { + return stubAttributeTable_; +} + +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::ConsumerDBusStubAdapterInternal::getBootModeAttributeStubDispatcher }, + { { "getRestartReasonAttribute", "" }, &org::genivi::NodeStateManager::ConsumerDBusStubAdapterInternal::getRestartReasonAttributeStubDispatcher }, + { { "getShutdownReasonAttribute", "" }, &org::genivi::NodeStateManager::ConsumerDBusStubAdapterInternal::getShutdownReasonAttributeStubDispatcher }, + { { "getWakeUpReasonAttribute", "" }, &org::genivi::NodeStateManager::ConsumerDBusStubAdapterInternal::getWakeUpReasonAttributeStubDispatcher } + , + { { "GetAppHealthCount", "" }, &org::genivi::NodeStateManager::ConsumerDBusStubAdapterInternal::getAppHealthCountStubDispatcher }, + { { "LifecycleRequestComplete", "ui" }, &org::genivi::NodeStateManager::ConsumerDBusStubAdapterInternal::lifecycleRequestCompleteStubDispatcher }, + { { "GetInterfaceVersion", "" }, &org::genivi::NodeStateManager::ConsumerDBusStubAdapterInternal::getInterfaceVersionStubDispatcher }, + { { "GetApplicationMode", "" }, &org::genivi::NodeStateManager::ConsumerDBusStubAdapterInternal::getApplicationModeStubDispatcher }, + { { "UnRegisterSession", "ssi" }, &org::genivi::NodeStateManager::ConsumerDBusStubAdapterInternal::unRegisterSessionStubDispatcher }, + { { "RegisterSession", "ssii" }, &org::genivi::NodeStateManager::ConsumerDBusStubAdapterInternal::registerSessionStubDispatcher }, + { { "UnRegisterShutdownClient", "ssu" }, &org::genivi::NodeStateManager::ConsumerDBusStubAdapterInternal::unRegisterShutdownClientStubDispatcher }, + { { "RegisterShutdownClient", "ssuu" }, &org::genivi::NodeStateManager::ConsumerDBusStubAdapterInternal::registerShutdownClientStubDispatcher }, + { { "GetNodeState", "" }, &org::genivi::NodeStateManager::ConsumerDBusStubAdapterInternal::getNodeStateStubDispatcher }, + { { "GetSessionState", "si" }, &org::genivi::NodeStateManager::ConsumerDBusStubAdapterInternal::getSessionStateStubDispatcher }, + { { "SetSessionState", "ssii" }, &org::genivi::NodeStateManager::ConsumerDBusStubAdapterInternal::setSessionStateStubDispatcher } + }), + stubAttributeTable_() { + + stubDispatcherTable_.insert({ { "getInterfaceVersion", "" }, &org::genivi::NodeStateManager::ConsumerDBusStubAdapterInternal::getConsumerInterfaceVersionStubDispatcher }); +} + +const bool ConsumerDBusStubAdapterInternal::hasFreedesktopProperties() { + return false; +} + +} // 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 new file mode 100644 index 0000000..aacecd0 --- /dev/null +++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerDBusStubAdapter.h @@ -0,0 +1,182 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +/** + * @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 virtual 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(); + + virtual const bool hasFreedesktopProperties(); + + + 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(); + const CommonAPI::DBus::StubAttributeTable& getStubAttributeTable(); + + void deactivateManagedInstances(); + + +static CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ConsumerStub, + CommonAPI::Version + > getConsumerInterfaceVersionStubDispatcher; + +static CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ConsumerStub, + int32_t + > getBootModeAttributeStubDispatcher; +static CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ConsumerStub, + int32_t + > getRestartReasonAttributeStubDispatcher; +static CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ConsumerStub, + int32_t + > getShutdownReasonAttributeStubDispatcher; +static CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ConsumerStub, + int32_t + > getWakeUpReasonAttributeStubDispatcher; + + +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ConsumerStub, + std::tuple<>, + std::tuple<uint32_t> + > getAppHealthCountStubDispatcher; +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ConsumerStub, + std::tuple<uint32_t, int32_t>, + std::tuple<int32_t> + > lifecycleRequestCompleteStubDispatcher; +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ConsumerStub, + std::tuple<>, + std::tuple<uint32_t> + > getInterfaceVersionStubDispatcher; +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ConsumerStub, + std::tuple<>, + std::tuple<int32_t, int32_t> + > getApplicationModeStubDispatcher; +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ConsumerStub, + std::tuple<std::string, std::string, int32_t>, + std::tuple<int32_t> + > unRegisterSessionStubDispatcher; +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ConsumerStub, + std::tuple<std::string, std::string, int32_t, int32_t>, + std::tuple<int32_t> + > registerSessionStubDispatcher; +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ConsumerStub, + std::tuple<std::string, std::string, uint32_t>, + std::tuple<int32_t> + > unRegisterShutdownClientStubDispatcher; +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ConsumerStub, + std::tuple<std::string, std::string, uint32_t, uint32_t>, + std::tuple<int32_t> + > registerShutdownClientStubDispatcher; +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ConsumerStub, + std::tuple<>, + std::tuple<int32_t, int32_t> + > getNodeStateStubDispatcher; +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ConsumerStub, + std::tuple<std::string, int32_t>, + std::tuple<int32_t, int32_t> + > getSessionStateStubDispatcher; +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ConsumerStub, + std::tuple<std::string, std::string, int32_t, int32_t>, + std::tuple<int32_t> + > setSessionStateStubDispatcher; + + + + + protected: + virtual const char* getMethodsDBusIntrospectionXmlData() const; + + private: + ConsumerDBusStubAdapterHelper::StubDispatcherTable stubDispatcherTable_; + CommonAPI::DBus::StubAttributeTable stubAttributeTable_; +}; + +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 new file mode 100644 index 0000000..5b7c14a --- /dev/null +++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerProxy.h @@ -0,0 +1,627 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +/** + * @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_; +}; + +#ifdef WIN32 + typedef ConsumerProxy<CommonAPI::WINDummyAttributeExtension<CommonAPI::WINDummyAttribute>> ConsumerProxyDefault; +#else + typedef ConsumerProxy<> ConsumerProxyDefault; +#endif + +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!"); + #ifdef WIN32 + BootModeAttributeExtension() {} + #endif + + 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!"); + #ifdef WIN32 + RestartReasonAttributeExtension() {} + #endif + + 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!"); + #ifdef WIN32 + ShutdownReasonAttributeExtension() {} + #endif + + 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!"); + #ifdef WIN32 + WakeUpReasonAttributeExtension() {} + #endif + + 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): + _AttributeExtensions(*(std::dynamic_pointer_cast<ConsumerProxyBase>(delegate)))..., + delegate_(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 new file mode 100644 index 0000000..b0afe99 --- /dev/null +++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerProxyBase.h @@ -0,0 +1,95 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +/** + * @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 new file mode 100644 index 0000000..107749e --- /dev/null +++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerStub.h @@ -0,0 +1,152 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +/** + * @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; + typedef ConsumerStubRemoteEvent RemoteEventType; + typedef Consumer StubInterface; +}; + +} // 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 new file mode 100644 index 0000000..18edb79 --- /dev/null +++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerStubDefault.cpp @@ -0,0 +1,239 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +#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 new file mode 100644 index 0000000..b28944c --- /dev/null +++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/ConsumerStubDefault.h @@ -0,0 +1,128 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +/** + * @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); + class RemoteEventHandler: public virtual ConsumerStubRemoteEvent { + public: + RemoteEventHandler(ConsumerStubDefault* defaultStub); + + + + + + + private: + ConsumerStubDefault* defaultStub_; + }; +private: + ConsumerStubDefault::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 new file mode 100644 index 0000000..d810ef8 --- /dev/null +++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumer.h @@ -0,0 +1,62 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +/** + * @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 new file mode 100644 index 0000000..877f3cc --- /dev/null +++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerDBusProxy.cpp @@ -0,0 +1,74 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +/** + * @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); +} + +INITIALIZER(registerLifeCycleConsumerDBusProxy) { + 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 new file mode 100644 index 0000000..abaa4d1 --- /dev/null +++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerDBusProxy.h @@ -0,0 +1,62 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +/** + * @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 new file mode 100644 index 0000000..0a2bb4d --- /dev/null +++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerDBusStubAdapter.cpp @@ -0,0 +1,121 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +#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); +} + +INITIALIZER(registerLifeCycleConsumerDBusStubAdapter) { + 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(); +} + +CommonAPI::DBus::DBusGetAttributeStubDispatcher< + LifeCycleConsumerStub, + CommonAPI::Version + > LifeCycleConsumerDBusStubAdapterInternal::getLifeCycleConsumerInterfaceVersionStubDispatcher(&LifeCycleConsumerStub::getInterfaceVersion, "uu"); + + + +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + LifeCycleConsumerStub, + std::tuple<uint32_t, uint32_t>, + std::tuple<int32_t> + > LifeCycleConsumerDBusStubAdapterInternal::lifecycleRequestStubDispatcher(&LifeCycleConsumerStub::LifecycleRequest, "i"); + + + + + +const LifeCycleConsumerDBusStubAdapterHelper::StubDispatcherTable& LifeCycleConsumerDBusStubAdapterInternal::getStubDispatcherTable() { + return stubDispatcherTable_; +} + +const CommonAPI::DBus::StubAttributeTable& LifeCycleConsumerDBusStubAdapterInternal::getStubAttributeTable() { + return stubAttributeTable_; +} + +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::LifeCycleConsumerDBusStubAdapterInternal::lifecycleRequestStubDispatcher } + }), + stubAttributeTable_() { + + stubDispatcherTable_.insert({ { "getInterfaceVersion", "" }, &org::genivi::NodeStateManager::LifeCycleConsumerDBusStubAdapterInternal::getLifeCycleConsumerInterfaceVersionStubDispatcher }); +} + +const bool LifeCycleConsumerDBusStubAdapterInternal::hasFreedesktopProperties() { + return false; +} + +} // 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 new file mode 100644 index 0000000..ac3d6ed --- /dev/null +++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerDBusStubAdapter.h @@ -0,0 +1,113 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +/** + * @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 virtual 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(); + + virtual const bool hasFreedesktopProperties(); + + + + + const LifeCycleConsumerDBusStubAdapterHelper::StubDispatcherTable& getStubDispatcherTable(); + const CommonAPI::DBus::StubAttributeTable& getStubAttributeTable(); + + void deactivateManagedInstances(); + + +static CommonAPI::DBus::DBusGetAttributeStubDispatcher< + LifeCycleConsumerStub, + CommonAPI::Version + > getLifeCycleConsumerInterfaceVersionStubDispatcher; + + + +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + LifeCycleConsumerStub, + std::tuple<uint32_t, uint32_t>, + std::tuple<int32_t> + > lifecycleRequestStubDispatcher; + + + + + protected: + virtual const char* getMethodsDBusIntrospectionXmlData() const; + + private: + LifeCycleConsumerDBusStubAdapterHelper::StubDispatcherTable stubDispatcherTable_; + CommonAPI::DBus::StubAttributeTable stubAttributeTable_; +}; + +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 new file mode 100644 index 0000000..710e1d8 --- /dev/null +++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerProxy.h @@ -0,0 +1,185 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +/** + * @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_; +}; + +#ifdef WIN32 + typedef LifeCycleConsumerProxy<CommonAPI::WINDummyAttributeExtension<CommonAPI::WINDummyAttribute>> LifeCycleConsumerProxyDefault; +#else + typedef LifeCycleConsumerProxy<> LifeCycleConsumerProxyDefault; +#endif + + +// +// LifeCycleConsumerProxy Implementation +// +template <typename ... _AttributeExtensions> +LifeCycleConsumerProxy<_AttributeExtensions...>::LifeCycleConsumerProxy(std::shared_ptr<CommonAPI::Proxy> delegate): + _AttributeExtensions(*(std::dynamic_pointer_cast<LifeCycleConsumerProxyBase>(delegate)))..., + delegate_(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 new file mode 100644 index 0000000..c6b3c4b --- /dev/null +++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerProxyBase.h @@ -0,0 +1,49 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +/** + * @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 new file mode 100644 index 0000000..b7c8de6 --- /dev/null +++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerStub.h @@ -0,0 +1,98 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +/** + * @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; + typedef LifeCycleConsumerStubRemoteEvent RemoteEventType; + typedef LifeCycleConsumer StubInterface; +}; + +} // 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 new file mode 100644 index 0000000..aa86851 --- /dev/null +++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerStubDefault.cpp @@ -0,0 +1,46 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +#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 new file mode 100644 index 0000000..a474249 --- /dev/null +++ b/AudioManagerDaemon/src-gen/org/genivi/NodeStateManager/LifeCycleConsumerStubDefault.h @@ -0,0 +1,67 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +/** + * @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: + class RemoteEventHandler: public virtual LifeCycleConsumerStubRemoteEvent { + public: + RemoteEventHandler(LifeCycleConsumerStubDefault* defaultStub); + + + private: + LifeCycleConsumerStubDefault* defaultStub_; + }; +private: + LifeCycleConsumerStubDefault::RemoteEventHandler remoteEventHandler_; + + + CommonAPI::Version interfaceVersion_; +}; + +} // namespace NodeStateManager +} // namespace genivi +} // namespace org + +#endif // ORG_GENIVI_NODESTATEMANAGER_Life_Cycle_Consumer_STUB_DEFAULT_H_ diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am.cpp b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am.cpp new file mode 100644 index 0000000..8092420 --- /dev/null +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am.cpp @@ -0,0 +1,1043 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +/** + * @author Christian Linke + */ +#include "am.h" + + +namespace org { +namespace genivi { +namespace am { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +am_Route_s::am_Route_s(const am_sourceID_t& sourceIDValue, const am_sinkID_t& sinkIDValue, const am_RoutingElement_L& routeValue): + sourceID(sourceIDValue), + sinkID(sinkIDValue), + route(routeValue) +{ +} + + +bool operator==(const am_Route_s& lhs, const am_Route_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.sourceID == rhs.sourceID && + lhs.sinkID == rhs.sinkID && + lhs.route == rhs.route + ; +} + +void am_Route_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> sourceID; + inputStream >> sinkID; + inputStream >> route; +} + +void am_Route_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << sourceID; + outputStream << sinkID; + outputStream << route; +} + +am_Availability_s::am_Availability_s(const am_Availability_e& availabilityValue, const am_CustomAvailabilityReason_t& availabilityReasonValue): + availability(availabilityValue), + availabilityReason(availabilityReasonValue) +{ +} + + +bool operator==(const am_Availability_s& lhs, const am_Availability_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.availability == rhs.availability && + lhs.availabilityReason == rhs.availabilityReason + ; +} + +void am_Availability_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> availability; + inputStream >> availabilityReason; +} + +void am_Availability_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << availability; + outputStream << availabilityReason; +} + +am_ClassProperty_s::am_ClassProperty_s(const am_CustomClassProperty_t& classPropertyValue, const int16_t& valueValue): + classProperty(classPropertyValue), + value(valueValue) +{ +} + + +bool operator==(const am_ClassProperty_s& lhs, const am_ClassProperty_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.classProperty == rhs.classProperty && + lhs.value == rhs.value + ; +} + +void am_ClassProperty_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> classProperty; + inputStream >> value; +} + +void am_ClassProperty_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << classProperty; + outputStream << value; +} + +am_Crossfader_s::am_Crossfader_s(const am_crossfaderID_t& crossfaderIDValue, const std::string& nameValue, const am_sinkID_t& sinkID_AValue, const am_sinkID_t& sinkID_BValue, const am_sourceID_t& sourceIDValue, const am_HotSink_e& hotSinkValue): + crossfaderID(crossfaderIDValue), + name(nameValue), + sinkID_A(sinkID_AValue), + sinkID_B(sinkID_BValue), + sourceID(sourceIDValue), + hotSink(hotSinkValue) +{ +} + + +bool operator==(const am_Crossfader_s& lhs, const am_Crossfader_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.crossfaderID == rhs.crossfaderID && + lhs.name == rhs.name && + lhs.sinkID_A == rhs.sinkID_A && + lhs.sinkID_B == rhs.sinkID_B && + lhs.sourceID == rhs.sourceID && + lhs.hotSink == rhs.hotSink + ; +} + +void am_Crossfader_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> crossfaderID; + inputStream >> name; + inputStream >> sinkID_A; + inputStream >> sinkID_B; + inputStream >> sourceID; + inputStream >> hotSink; +} + +void am_Crossfader_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << crossfaderID; + outputStream << name; + outputStream << sinkID_A; + outputStream << sinkID_B; + outputStream << sourceID; + outputStream << hotSink; +} + +am_Gateway_s::am_Gateway_s(const am_gatewayID_t& gatewayIDValue, const std::string& nameValue, const am_sinkID_t& sinkIDValue, const am_sourceID_t& sourceIDValue, const am_domainID_t& domainSinkIDValue, const am_domainID_t& domainSourceIDValue, const am_domainID_t& controlDomainIDValue, const am_ConnectionFormat_L& listSourceFormatsValue, const am_ConnectionFormat_L& listSinkFormatsValue, const am_Convertion_L& convertionMatrixValue): + gatewayID(gatewayIDValue), + name(nameValue), + sinkID(sinkIDValue), + sourceID(sourceIDValue), + domainSinkID(domainSinkIDValue), + domainSourceID(domainSourceIDValue), + controlDomainID(controlDomainIDValue), + listSourceFormats(listSourceFormatsValue), + listSinkFormats(listSinkFormatsValue), + convertionMatrix(convertionMatrixValue) +{ +} + + +bool operator==(const am_Gateway_s& lhs, const am_Gateway_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.gatewayID == rhs.gatewayID && + lhs.name == rhs.name && + lhs.sinkID == rhs.sinkID && + lhs.sourceID == rhs.sourceID && + lhs.domainSinkID == rhs.domainSinkID && + lhs.domainSourceID == rhs.domainSourceID && + lhs.controlDomainID == rhs.controlDomainID && + lhs.listSourceFormats == rhs.listSourceFormats && + lhs.listSinkFormats == rhs.listSinkFormats && + lhs.convertionMatrix == rhs.convertionMatrix + ; +} + +void am_Gateway_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> gatewayID; + inputStream >> name; + inputStream >> sinkID; + inputStream >> sourceID; + inputStream >> domainSinkID; + inputStream >> domainSourceID; + inputStream >> controlDomainID; + inputStream >> listSourceFormats; + inputStream >> listSinkFormats; + inputStream >> convertionMatrix; +} + +void am_Gateway_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << gatewayID; + outputStream << name; + outputStream << sinkID; + outputStream << sourceID; + outputStream << domainSinkID; + outputStream << domainSourceID; + outputStream << controlDomainID; + outputStream << listSourceFormats; + outputStream << listSinkFormats; + outputStream << convertionMatrix; +} + +am_Converter_s::am_Converter_s(const am_converterID_t& converterIDValue, const std::string& nameValue, const am_sinkID_t& sinkIDValue, const am_sourceID_t& sourceIDValue, const am_domainID_t& domainIDValue, const am_ConnectionFormat_L& listSourceFormatsValue, const am_ConnectionFormat_L& listSinkFormatsValue, const am_Convertion_L& convertionMatrixValue): + converterID(converterIDValue), + name(nameValue), + sinkID(sinkIDValue), + sourceID(sourceIDValue), + domainID(domainIDValue), + listSourceFormats(listSourceFormatsValue), + listSinkFormats(listSinkFormatsValue), + convertionMatrix(convertionMatrixValue) +{ +} + + +bool operator==(const am_Converter_s& lhs, const am_Converter_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.converterID == rhs.converterID && + lhs.name == rhs.name && + lhs.sinkID == rhs.sinkID && + lhs.sourceID == rhs.sourceID && + lhs.domainID == rhs.domainID && + lhs.listSourceFormats == rhs.listSourceFormats && + lhs.listSinkFormats == rhs.listSinkFormats && + lhs.convertionMatrix == rhs.convertionMatrix + ; +} + +void am_Converter_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> converterID; + inputStream >> name; + inputStream >> sinkID; + inputStream >> sourceID; + inputStream >> domainID; + inputStream >> listSourceFormats; + inputStream >> listSinkFormats; + inputStream >> convertionMatrix; +} + +void am_Converter_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << converterID; + outputStream << name; + outputStream << sinkID; + outputStream << sourceID; + outputStream << domainID; + outputStream << listSourceFormats; + outputStream << listSinkFormats; + outputStream << convertionMatrix; +} + +am_RoutingElement_s::am_RoutingElement_s(const am_sourceID_t& sourceIDValue, const am_sinkID_t& sinkIDValue, const am_domainID_t& domainIDValue, const am_CustomConnectionFormat_t& connectionFormatValue): + sourceID(sourceIDValue), + sinkID(sinkIDValue), + domainID(domainIDValue), + connectionFormat(connectionFormatValue) +{ +} + + +bool operator==(const am_RoutingElement_s& lhs, const am_RoutingElement_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.sourceID == rhs.sourceID && + lhs.sinkID == rhs.sinkID && + lhs.domainID == rhs.domainID && + lhs.connectionFormat == rhs.connectionFormat + ; +} + +void am_RoutingElement_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> sourceID; + inputStream >> sinkID; + inputStream >> domainID; + inputStream >> connectionFormat; +} + +void am_RoutingElement_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << sourceID; + outputStream << sinkID; + outputStream << domainID; + outputStream << connectionFormat; +} + +am_SoundProperty_s::am_SoundProperty_s(const am_CustomSoundPropertyType_t& typeValue, const int16_t& valueValue): + type(typeValue), + value(valueValue) +{ +} + + +bool operator==(const am_SoundProperty_s& lhs, const am_SoundProperty_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.type == rhs.type && + lhs.value == rhs.value + ; +} + +void am_SoundProperty_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> type; + inputStream >> value; +} + +void am_SoundProperty_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << type; + outputStream << value; +} + +am_SystemProperty_s::am_SystemProperty_s(const am_CustomSystemPropertyType_t& typeValue, const int16_t& valueValue): + type(typeValue), + value(valueValue) +{ +} + + +bool operator==(const am_SystemProperty_s& lhs, const am_SystemProperty_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.type == rhs.type && + lhs.value == rhs.value + ; +} + +void am_SystemProperty_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> type; + inputStream >> value; +} + +void am_SystemProperty_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << type; + outputStream << value; +} + +am_SinkClass_s::am_SinkClass_s(const am_sinkClass_t& sinkClassIDValue, const std::string& nameValue, const am_ClassProperty_L& listClassPropertiesValue): + sinkClassID(sinkClassIDValue), + name(nameValue), + listClassProperties(listClassPropertiesValue) +{ +} + + +bool operator==(const am_SinkClass_s& lhs, const am_SinkClass_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.sinkClassID == rhs.sinkClassID && + lhs.name == rhs.name && + lhs.listClassProperties == rhs.listClassProperties + ; +} + +void am_SinkClass_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> sinkClassID; + inputStream >> name; + inputStream >> listClassProperties; +} + +void am_SinkClass_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << sinkClassID; + outputStream << name; + outputStream << listClassProperties; +} + +am_SourceClass_s::am_SourceClass_s(const am_sourceClass_t& sourceClassIDValue, const std::string& nameValue, const am_ClassProperty_L& listClassPropertiesValue): + sourceClassID(sourceClassIDValue), + name(nameValue), + listClassProperties(listClassPropertiesValue) +{ +} + + +bool operator==(const am_SourceClass_s& lhs, const am_SourceClass_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.sourceClassID == rhs.sourceClassID && + lhs.name == rhs.name && + lhs.listClassProperties == rhs.listClassProperties + ; +} + +void am_SourceClass_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> sourceClassID; + inputStream >> name; + inputStream >> listClassProperties; +} + +void am_SourceClass_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << sourceClassID; + outputStream << name; + outputStream << listClassProperties; +} + +am_SourceType_s::am_SourceType_s(const am_sourceID_t& sourceIDValue, const std::string& nameValue, const am_Availability_s& availabilityValue, const am_sourceClass_t& sourceClassIDValue): + sourceID(sourceIDValue), + name(nameValue), + availability(availabilityValue), + sourceClassID(sourceClassIDValue) +{ +} + + +bool operator==(const am_SourceType_s& lhs, const am_SourceType_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.sourceID == rhs.sourceID && + lhs.name == rhs.name && + lhs.availability == rhs.availability && + lhs.sourceClassID == rhs.sourceClassID + ; +} + +void am_SourceType_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> sourceID; + inputStream >> name; + inputStream >> availability; + inputStream >> sourceClassID; +} + +void am_SourceType_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << sourceID; + outputStream << name; + outputStream << availability; + outputStream << sourceClassID; +} + +am_SinkType_s::am_SinkType_s(const am_sinkID_t& sinkIDValue, const std::string& nameValue, const am_Availability_s& availabilityValue, const am_mainVolume_t& volumeValue, const am_MuteState_e& muteStateValue, const am_sinkClass_t& sinkClassIDValue): + sinkID(sinkIDValue), + name(nameValue), + availability(availabilityValue), + volume(volumeValue), + muteState(muteStateValue), + sinkClassID(sinkClassIDValue) +{ +} + + +bool operator==(const am_SinkType_s& lhs, const am_SinkType_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.sinkID == rhs.sinkID && + lhs.name == rhs.name && + lhs.availability == rhs.availability && + lhs.volume == rhs.volume && + lhs.muteState == rhs.muteState && + lhs.sinkClassID == rhs.sinkClassID + ; +} + +void am_SinkType_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> sinkID; + inputStream >> name; + inputStream >> availability; + inputStream >> volume; + inputStream >> muteState; + inputStream >> sinkClassID; +} + +void am_SinkType_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << sinkID; + outputStream << name; + outputStream << availability; + outputStream << volume; + outputStream << muteState; + outputStream << sinkClassID; +} + +am_Handle_s::am_Handle_s(const am_Handle_e& handleTypeValue, const uint16_t& handleValue): + handleType(handleTypeValue), + handle(handleValue) +{ +} + + +bool operator==(const am_Handle_s& lhs, const am_Handle_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.handleType == rhs.handleType && + lhs.handle == rhs.handle + ; +} + +void am_Handle_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> handleType; + inputStream >> handle; +} + +void am_Handle_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << handleType; + outputStream << handle; +} + +am_MainSoundProperty_s::am_MainSoundProperty_s(const am_CustomMainSoundPropertyType_t& typeValue, const int16_t& valueValue): + type(typeValue), + value(valueValue) +{ +} + + +bool operator==(const am_MainSoundProperty_s& lhs, const am_MainSoundProperty_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.type == rhs.type && + lhs.value == rhs.value + ; +} + +void am_MainSoundProperty_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> type; + inputStream >> value; +} + +void am_MainSoundProperty_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << type; + outputStream << value; +} + +am_MainConnectionType_s::am_MainConnectionType_s(const am_mainConnectionID_t& mainConnectionIDValue, const am_sourceID_t& sourceIDValue, const am_sinkID_t& sinkIDValue, const am_timeSync_t& delayValue, const am_ConnectionState_e& connectionStateValue): + mainConnectionID(mainConnectionIDValue), + sourceID(sourceIDValue), + sinkID(sinkIDValue), + delay(delayValue), + connectionState(connectionStateValue) +{ +} + + +bool operator==(const am_MainConnectionType_s& lhs, const am_MainConnectionType_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.mainConnectionID == rhs.mainConnectionID && + lhs.sourceID == rhs.sourceID && + lhs.sinkID == rhs.sinkID && + lhs.delay == rhs.delay && + lhs.connectionState == rhs.connectionState + ; +} + +void am_MainConnectionType_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> mainConnectionID; + inputStream >> sourceID; + inputStream >> sinkID; + inputStream >> delay; + inputStream >> connectionState; +} + +void am_MainConnectionType_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << mainConnectionID; + outputStream << sourceID; + outputStream << sinkID; + outputStream << delay; + outputStream << connectionState; +} + +am_MainConnection_s::am_MainConnection_s(const am_mainConnectionID_t& mainConnectionIDValue, const am_ConnectionState_e& connectionStateValue, const am_sinkID_t& sinkIDValue, const am_sourceID_t& sourceIDValue, const am_timeSync_t& delayValue, const am_ConnectionID_L& listConnectionIDValue): + mainConnectionID(mainConnectionIDValue), + connectionState(connectionStateValue), + sinkID(sinkIDValue), + sourceID(sourceIDValue), + delay(delayValue), + listConnectionID(listConnectionIDValue) +{ +} + + +bool operator==(const am_MainConnection_s& lhs, const am_MainConnection_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.mainConnectionID == rhs.mainConnectionID && + lhs.connectionState == rhs.connectionState && + lhs.sinkID == rhs.sinkID && + lhs.sourceID == rhs.sourceID && + lhs.delay == rhs.delay && + lhs.listConnectionID == rhs.listConnectionID + ; +} + +void am_MainConnection_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> mainConnectionID; + inputStream >> connectionState; + inputStream >> sinkID; + inputStream >> sourceID; + inputStream >> delay; + inputStream >> listConnectionID; +} + +void am_MainConnection_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << mainConnectionID; + outputStream << connectionState; + outputStream << sinkID; + outputStream << sourceID; + outputStream << delay; + outputStream << listConnectionID; +} + +am_NotificationPayload_s::am_NotificationPayload_s(const am_CustomNotificationType_t& typeValue, const int16_t& valueValue): + type(typeValue), + value(valueValue) +{ +} + + +bool operator==(const am_NotificationPayload_s& lhs, const am_NotificationPayload_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.type == rhs.type && + lhs.value == rhs.value + ; +} + +void am_NotificationPayload_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> type; + inputStream >> value; +} + +void am_NotificationPayload_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << type; + outputStream << value; +} + +am_NotificationConfiguration_s::am_NotificationConfiguration_s(const am_CustomNotificationType_t& typeValue, const am_NotificationStatus_e& statusValue, const int16_t& parameterValue): + type(typeValue), + status(statusValue), + parameter(parameterValue) +{ +} + + +bool operator==(const am_NotificationConfiguration_s& lhs, const am_NotificationConfiguration_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.type == rhs.type && + lhs.status == rhs.status && + lhs.parameter == rhs.parameter + ; +} + +void am_NotificationConfiguration_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> type; + inputStream >> status; + inputStream >> parameter; +} + +void am_NotificationConfiguration_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << type; + outputStream << status; + outputStream << parameter; +} + +am_Sink_s::am_Sink_s(const am_sinkID_t& sinkIDValue, const std::string& nameValue, const am_domainID_t& domainIDValue, const am_sinkClass_t& sinkClassIDValue, const am_volume_t& volumeValue, const bool& visibleValue, const am_Availability_s& availableValue, const am_MuteState_e& muteStateValue, const am_mainVolume_t& mainVolumeValue, const am_SoundProperty_L& listSoundPropertiesValue, const am_ConnectionFormat_L& listConnectionFormatsValue, const am_MainSoundProperty_L& listMainSoundPropertiesValue, const am_NotificationConfiguration_L& listMainNotificationConfigurationsValue, const am_NotificationConfiguration_L& listNotificationConfigurationsValue): + sinkID(sinkIDValue), + name(nameValue), + domainID(domainIDValue), + sinkClassID(sinkClassIDValue), + volume(volumeValue), + visible(visibleValue), + available(availableValue), + muteState(muteStateValue), + mainVolume(mainVolumeValue), + listSoundProperties(listSoundPropertiesValue), + listConnectionFormats(listConnectionFormatsValue), + listMainSoundProperties(listMainSoundPropertiesValue), + listMainNotificationConfigurations(listMainNotificationConfigurationsValue), + listNotificationConfigurations(listNotificationConfigurationsValue) +{ +} + + +bool operator==(const am_Sink_s& lhs, const am_Sink_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.sinkID == rhs.sinkID && + lhs.name == rhs.name && + lhs.domainID == rhs.domainID && + lhs.sinkClassID == rhs.sinkClassID && + lhs.volume == rhs.volume && + lhs.visible == rhs.visible && + lhs.available == rhs.available && + lhs.muteState == rhs.muteState && + lhs.mainVolume == rhs.mainVolume && + lhs.listSoundProperties == rhs.listSoundProperties && + lhs.listConnectionFormats == rhs.listConnectionFormats && + lhs.listMainSoundProperties == rhs.listMainSoundProperties && + lhs.listMainNotificationConfigurations == rhs.listMainNotificationConfigurations && + lhs.listNotificationConfigurations == rhs.listNotificationConfigurations + ; +} + +void am_Sink_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> sinkID; + inputStream >> name; + inputStream >> domainID; + inputStream >> sinkClassID; + inputStream >> volume; + inputStream >> visible; + inputStream >> available; + inputStream >> muteState; + inputStream >> mainVolume; + inputStream >> listSoundProperties; + inputStream >> listConnectionFormats; + inputStream >> listMainSoundProperties; + inputStream >> listMainNotificationConfigurations; + inputStream >> listNotificationConfigurations; +} + +void am_Sink_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << sinkID; + outputStream << name; + outputStream << domainID; + outputStream << sinkClassID; + outputStream << volume; + outputStream << visible; + outputStream << available; + outputStream << muteState; + outputStream << mainVolume; + outputStream << listSoundProperties; + outputStream << listConnectionFormats; + outputStream << listMainSoundProperties; + outputStream << listMainNotificationConfigurations; + outputStream << listNotificationConfigurations; +} + +am_Source_s::am_Source_s(const am_sourceID_t& sourceIDValue, const am_domainID_t& domainIDValue, const std::string& nameValue, const am_sourceClass_t& sourceClassIDValue, const am_SourceState_e& sourceStateValue, const am_volume_t& volumeValue, const bool& visibleValue, const am_Availability_s& availableValue, const am_InterruptState_e& interruptStateValue, const am_SoundProperty_L& listSoundPropertiesValue, const am_ConnectionFormat_L& listConnectionFormatsValue, const am_MainSoundProperty_L& listMainSoundPropertiesValue, const am_NotificationConfiguration_L& listMainNotificationConfigurationsValue, const am_NotificationConfiguration_L& listNotificationConfigurationsValue): + sourceID(sourceIDValue), + domainID(domainIDValue), + name(nameValue), + sourceClassID(sourceClassIDValue), + sourceState(sourceStateValue), + volume(volumeValue), + visible(visibleValue), + available(availableValue), + interruptState(interruptStateValue), + listSoundProperties(listSoundPropertiesValue), + listConnectionFormats(listConnectionFormatsValue), + listMainSoundProperties(listMainSoundPropertiesValue), + listMainNotificationConfigurations(listMainNotificationConfigurationsValue), + listNotificationConfigurations(listNotificationConfigurationsValue) +{ +} + + +bool operator==(const am_Source_s& lhs, const am_Source_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.sourceID == rhs.sourceID && + lhs.domainID == rhs.domainID && + lhs.name == rhs.name && + lhs.sourceClassID == rhs.sourceClassID && + lhs.sourceState == rhs.sourceState && + lhs.volume == rhs.volume && + lhs.visible == rhs.visible && + lhs.available == rhs.available && + lhs.interruptState == rhs.interruptState && + lhs.listSoundProperties == rhs.listSoundProperties && + lhs.listConnectionFormats == rhs.listConnectionFormats && + lhs.listMainSoundProperties == rhs.listMainSoundProperties && + lhs.listMainNotificationConfigurations == rhs.listMainNotificationConfigurations && + lhs.listNotificationConfigurations == rhs.listNotificationConfigurations + ; +} + +void am_Source_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> sourceID; + inputStream >> domainID; + inputStream >> name; + inputStream >> sourceClassID; + inputStream >> sourceState; + inputStream >> volume; + inputStream >> visible; + inputStream >> available; + inputStream >> interruptState; + inputStream >> listSoundProperties; + inputStream >> listConnectionFormats; + inputStream >> listMainSoundProperties; + inputStream >> listMainNotificationConfigurations; + inputStream >> listNotificationConfigurations; +} + +void am_Source_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << sourceID; + outputStream << domainID; + outputStream << name; + outputStream << sourceClassID; + outputStream << sourceState; + outputStream << volume; + outputStream << visible; + outputStream << available; + outputStream << interruptState; + outputStream << listSoundProperties; + outputStream << listConnectionFormats; + outputStream << listMainSoundProperties; + outputStream << listMainNotificationConfigurations; + outputStream << listNotificationConfigurations; +} + +am_Domain_s::am_Domain_s(const am_domainID_t& domainIDValue, const std::string& nameValue, const std::string& busnameValue, const std::string& nodenameValue, const bool& earlyValue, const bool& completeValue, const am_DomainState_e& stateValue): + domainID(domainIDValue), + name(nameValue), + busname(busnameValue), + nodename(nodenameValue), + early(earlyValue), + complete(completeValue), + state(stateValue) +{ +} + + +bool operator==(const am_Domain_s& lhs, const am_Domain_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.domainID == rhs.domainID && + lhs.name == rhs.name && + lhs.busname == rhs.busname && + lhs.nodename == rhs.nodename && + lhs.early == rhs.early && + lhs.complete == rhs.complete && + lhs.state == rhs.state + ; +} + +void am_Domain_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> domainID; + inputStream >> name; + inputStream >> busname; + inputStream >> nodename; + inputStream >> early; + inputStream >> complete; + inputStream >> state; +} + +void am_Domain_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << domainID; + outputStream << name; + outputStream << busname; + outputStream << nodename; + outputStream << early; + outputStream << complete; + outputStream << state; +} + +am_EarlyData_s::am_EarlyData_s(const am_EarlyDataType_e& typeValue, const am_DataType_u& sinksourceValue, const am_EarlyData_u& dataValue): + type(typeValue), + sinksource(sinksourceValue), + data(dataValue) +{ +} + + +bool operator==(const am_EarlyData_s& lhs, const am_EarlyData_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.type == rhs.type && + lhs.sinksource == rhs.sinksource && + lhs.data == rhs.data + ; +} + +void am_EarlyData_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> type; + inputStream >> sinksource; + inputStream >> data; +} + +void am_EarlyData_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << type; + outputStream << sinksource; + outputStream << data; +} + +am_Connection_s::am_Connection_s(const am_connectionID_t& connectionIDValue, const am_sourceID_t& sourceIDValue, const am_sinkID_t& sinkIDValue, const am_timeSync_t& delayValue, const am_CustomConnectionFormat_t& connectionFormatValue): + connectionID(connectionIDValue), + sourceID(sourceIDValue), + sinkID(sinkIDValue), + delay(delayValue), + connectionFormat(connectionFormatValue) +{ +} + + +bool operator==(const am_Connection_s& lhs, const am_Connection_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.connectionID == rhs.connectionID && + lhs.sourceID == rhs.sourceID && + lhs.sinkID == rhs.sinkID && + lhs.delay == rhs.delay && + lhs.connectionFormat == rhs.connectionFormat + ; +} + +void am_Connection_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> connectionID; + inputStream >> sourceID; + inputStream >> sinkID; + inputStream >> delay; + inputStream >> connectionFormat; +} + +void am_Connection_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << connectionID; + outputStream << sourceID; + outputStream << sinkID; + outputStream << delay; + outputStream << connectionFormat; +} + +am_Volumes_s::am_Volumes_s(const am_VolumeType_e& volumeTypeValue, const am_DataType_u& volumeIDValue, const am_volume_t& volumeValue, const am_CustomRampType_t& rampValue, const am_time_t& timeValue): + volumeType(volumeTypeValue), + volumeID(volumeIDValue), + volume(volumeValue), + ramp(rampValue), + time(timeValue) +{ +} + + +bool operator==(const am_Volumes_s& lhs, const am_Volumes_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.volumeType == rhs.volumeType && + lhs.volumeID == rhs.volumeID && + lhs.volume == rhs.volume && + lhs.ramp == rhs.ramp && + lhs.time == rhs.time + ; +} + +void am_Volumes_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> volumeType; + inputStream >> volumeID; + inputStream >> volume; + inputStream >> ramp; + inputStream >> time; +} + +void am_Volumes_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << volumeType; + outputStream << volumeID; + outputStream << volume; + outputStream << ramp; + outputStream << time; +} + + + +} // namespace am +} // namespace genivi +} // namespace org diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am.h new file mode 100644 index 0000000..e75db5d --- /dev/null +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am.h @@ -0,0 +1,2551 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +/** + * @author Christian Linke + */ +#ifndef ORG_GENIVI_am_H_ +#define ORG_GENIVI_am_H_ + + + +#if !defined (COMMONAPI_INTERNAL_COMPILATION) +#define COMMONAPI_INTERNAL_COMPILATION +#endif + +#include <CommonAPI/InputStream.h> +#include <CommonAPI/OutputStream.h> +#include <CommonAPI/SerializableStruct.h> +#include <CommonAPI/SerializableVariant.h> +#include <CommonAPI/types.h> +#include <cstdint> +#include <memory> +#include <string> +#include <vector> + +#undef COMMONAPI_INTERNAL_COMPILATION + +namespace org { +namespace genivi { + +namespace am { + /** + * a source ID + */ + /** + * a source ID + */ + typedef uint16_t am_sourceID_t; + /** + * a mainConnection ID + */ + /** + * a mainConnection ID + */ + typedef uint16_t am_mainConnectionID_t; + /** + * offset time that is introduced in milli seconds. + */ + /** + * offset time that is introduced in milli seconds. + */ + typedef int16_t am_timeSync_t; + /** + * a sink ID + */ + /** + * a sink ID + */ + typedef uint16_t am_sinkID_t; + /** + * represents the connection state + */ + enum class am_ConnectionState_e: int32_t { + CS_UNKNOWN = 0, + /** + * This means the connection is just building up + */ + CS_CONNECTING = 1, + /** + * the connection is ready to be used + */ + CS_CONNECTED = 2, + /** + * the connection is in the course to be knocked down + */ + CS_DISCONNECTING = 3, + /** + * only relevant for connectionStatechanged. Is send after the connection was + * removed + */ + CS_DISCONNECTED = 4, + /** + * this means the connection is still build up but unused at the moment + */ + CS_SUSPENDED = 5, + CS_MAX + }; + + // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1 + struct am_ConnectionState_eComparator; + /** + * this type holds all information of connections relevant to the HMI + */ + /** + * this type holds all information of connections relevant to the HMI + */ + struct am_MainConnectionType_s: CommonAPI::SerializableStruct { + /** + * the ID of the mainconnection + */ + am_mainConnectionID_t mainConnectionID; + /** + * the sourceID where the connection starts + */ + am_sourceID_t sourceID; + /** + * the sinkID where the connection ends + */ + am_sinkID_t sinkID; + /** + * the delay of the mainconnection + */ + am_timeSync_t delay; + /** + * the current connection state + */ + am_ConnectionState_e connectionState; + + am_MainConnectionType_s() = default; + am_MainConnectionType_s(const am_mainConnectionID_t& mainConnectionID, const am_sourceID_t& sourceID, const am_sinkID_t& sinkID, const am_timeSync_t& delay, const am_ConnectionState_e& connectionState); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeInt16Type(); + typeOutputStream.writeInt32Type(); + } + }; + typedef std::vector<am_MainConnectionType_s> am_MainConnection_L; + /** + * product specific identifier of property + */ + /** + * product specific identifier of property + */ + typedef uint16_t am_CustomClassProperty_t; + /** + * describes class properties + */ + /** + * describes class properties + */ + struct am_ClassProperty_s: CommonAPI::SerializableStruct { + /** + * the property as enum + */ + am_CustomClassProperty_t classProperty; + /** + * the value of the property + */ + int16_t value; + + am_ClassProperty_s() = default; + am_ClassProperty_s(const am_CustomClassProperty_t& classProperty, const int16_t& value); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeInt16Type(); + } + }; + typedef std::vector<am_ClassProperty_s> am_ClassProperty_L; + typedef uint16_t am_sinkClass_t; + /** + * struct describing sinkclasses + */ + /** + * struct describing sinkclasses + */ + struct am_SinkClass_s: CommonAPI::SerializableStruct { + /** + * the ID of the sinkClass + */ + am_sinkClass_t sinkClassID; + /** + * the name of the sinkClass - must be unique in the system + */ + std::string name; + /** + * the list of the class properties. These are pairs of a project specific enum + * describing the type of the value and an integer holding the real value. + */ + am_ClassProperty_L listClassProperties; + + am_SinkClass_s() = default; + am_SinkClass_s(const am_sinkClass_t& sinkClassID, const std::string& name, const am_ClassProperty_L& listClassProperties); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeStringType(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.beginWriteStructType(); + typeOutputStream.writeUInt16Type();typeOutputStream.writeInt16Type(); + typeOutputStream.endWriteStructType(); + typeOutputStream.endWriteVectorType(); + } + }; + typedef std::vector<am_SinkClass_s> am_SinkClass_L; + /** + * This is the volume presented on the command interface. It is in the duty of the + * Controller to change the volumes given here into meaningful values on the + * routing interface. + The range of this type is customer specific. + */ + /** + * This is the volume presented on the command interface. It is in the duty of the + * Controller to change the volumes given here into meaningful values on the + * routing interface. + The range of this type is customer specific. + */ + typedef int16_t am_mainVolume_t; + /** + * This project specific value gives the information about reason for reason for + * Source/Sink change + */ + /** + * This project specific value gives the information about reason for reason for + * Source/Sink change + */ + typedef uint16_t am_CustomAvailabilityReason_t; + /** + * with the help of this enum, sinks and sources can report their availability + * state + */ + enum class am_Availability_e: int32_t { + /** + * default + */ + A_UNKNOWN = 0, + /** + * The source / sink is available + */ + A_AVAILABLE = 1, + /** + * the source / sink is not available + */ + A_UNAVAILABLE = 2, + A_MAX + }; + + // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1 + struct am_Availability_eComparator; + enum class am_MuteState_e: int32_t { + /** + * default + */ + MS_UNKNOWN = 0, + /** + * the source / sink is muted + */ + MS_MUTED = 1, + /** + * the source / sink is unmuted + */ + MS_UNMUTED = 2, + MS_MAX + }; + + // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1 + struct am_MuteState_eComparator; + /** + * this describes the availability of a sink or a source together with the latest + * change + */ + /** + * this describes the availability of a sink or a source together with the latest + * change + */ + struct am_Availability_s: CommonAPI::SerializableStruct { + /** + * the current availability state + */ + am_Availability_e availability; + /** + * the reason for the last change. This can be used to trigger events that deal + * with state changes. + */ + am_CustomAvailabilityReason_t availabilityReason; + + am_Availability_s() = default; + am_Availability_s(const am_Availability_e& availability, const am_CustomAvailabilityReason_t& availabilityReason); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeInt32Type(); + typeOutputStream.writeUInt16Type(); + } + }; + /** + * this type holds all information of sinks relevant to the HMI + */ + /** + * this type holds all information of sinks relevant to the HMI + */ + struct am_SinkType_s: CommonAPI::SerializableStruct { + /** + * This is the ID of the sink, it is unique in the system. There are 2 ways, ID + * can be created: either it is assigned during the registration process (in a + * dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it + * is a fixed (the project has to ensure the uniqueness of the ID). + */ + am_sinkID_t sinkID; + /** + * The name of the sink. Must be unique in the whole system. + */ + std::string name; + /** + * This attribute reflects the availability of the sink. There are several reasons + * why a sink could be not available for the moment: for example the shutdown of + * a sink because of overtemperature or over- & undervoltage. The + * availability consists of two pieces of information: + + Availablility: the + * status itself, can be A_AVAILABLE, A_UNAVAILABLE or A_UNKNOWN + + * AvailabilityReason: this informs about the last reason for a change in + * availability. The reasons itself are product specific. + */ + am_Availability_s availability; + /** + * This is the representation of the Volume for the commandInterface. It is used + * by the HMI to set the volume of a sink, the AudioManagerController has to + * transform this into real source and sink volumes. + */ + am_mainVolume_t volume; + am_MuteState_e muteState; + /** + * The sinkClassID references to a sinkClass. With the help of classification, + * rules can be setup to define the system behaviour. + */ + am_sinkClass_t sinkClassID; + + am_SinkType_s() = default; + am_SinkType_s(const am_sinkID_t& sinkID, const std::string& name, const am_Availability_s& availability, const am_mainVolume_t& volume, const am_MuteState_e& muteState, const am_sinkClass_t& sinkClassID); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeStringType(); + typeOutputStream.beginWriteStructType(); + typeOutputStream.writeInt32Type();typeOutputStream.writeUInt16Type(); + typeOutputStream.endWriteStructType(); + typeOutputStream.writeInt16Type(); + typeOutputStream.writeInt32Type(); + typeOutputStream.writeUInt16Type(); + } + }; + typedef std::vector<am_SinkType_s> am_SinkType_L; + typedef uint16_t am_sourceClass_t; + /** + * struct describing source classes + */ + /** + * struct describing source classes + */ + struct am_SourceClass_s: CommonAPI::SerializableStruct { + /** + * the source ID + */ + am_sourceClass_t sourceClassID; + /** + * the name of the sourceClass - must be unique in the system + */ + std::string name; + /** + * the list of the class properties. These are pairs of a project specific enum + * describing the type of the value and an integer holding the real value. + */ + am_ClassProperty_L listClassProperties; + + am_SourceClass_s() = default; + am_SourceClass_s(const am_sourceClass_t& sourceClassID, const std::string& name, const am_ClassProperty_L& listClassProperties); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeStringType(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.beginWriteStructType(); + typeOutputStream.writeUInt16Type();typeOutputStream.writeInt16Type(); + typeOutputStream.endWriteStructType(); + typeOutputStream.endWriteVectorType(); + } + }; + typedef std::vector<am_SourceClass_s> am_SourceClass_L; + /** + * this type holds all information of sources relevant to the HMI + */ + /** + * this type holds all information of sources relevant to the HMI + */ + struct am_SourceType_s: CommonAPI::SerializableStruct { + /** + * This is the ID of the source, it is unique in the system. There are 2 ways, ID + * can be created: either it is assigned during the registration process (in a + * dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it + * is a fixed (the project has to ensure the uniqueness of the ID). + */ + am_sourceID_t sourceID; + /** + * The name of the source. Must be unique in the whole system. + */ + std::string name; + /** + * the availability of the source + */ + am_Availability_s availability; + /** + * the sourceClassID, indicates the class the source is in. This information can + * be used by the Controller to implement different behaviour for different + * classes. + */ + am_sourceClass_t sourceClassID; + + am_SourceType_s() = default; + am_SourceType_s(const am_sourceID_t& sourceID, const std::string& name, const am_Availability_s& availability, const am_sourceClass_t& sourceClassID); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeStringType(); + typeOutputStream.beginWriteStructType(); + typeOutputStream.writeInt32Type();typeOutputStream.writeUInt16Type(); + typeOutputStream.endWriteStructType(); + typeOutputStream.writeUInt16Type(); + } + }; + typedef std::vector<am_SourceType_s> am_SourceType_L; + /** + * describes the different system properties. Project specific + */ + /** + * describes the different system properties. Project specific + */ + typedef uint16_t am_CustomSystemPropertyType_t; + /** + * struct describing system properties + */ + /** + * struct describing system properties + */ + struct am_SystemProperty_s: CommonAPI::SerializableStruct { + /** + * the type that is set + */ + am_CustomSystemPropertyType_t type; + /** + * the value + */ + int16_t value; + + am_SystemProperty_s() = default; + am_SystemProperty_s(const am_CustomSystemPropertyType_t& type, const int16_t& value); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeInt16Type(); + } + }; + typedef std::vector<am_SystemProperty_s> am_SystemProperty_L; + /** + * a connection ID + */ + /** + * a connection ID + */ + typedef uint16_t am_connectionID_t; + typedef std::vector<am_connectionID_t> am_ConnectionID_L; + /** + * The unit is 0.1 db steps,The smallest value -3000 (=AM_MUTE). The minimum and + * maximum can be limited by actual project. + */ + /** + * The unit is 0.1 db steps,The smallest value -3000 (=AM_MUTE). The minimum and + * maximum can be limited by actual project. + */ + typedef int16_t am_volume_t; + /** + * Project specific sound properties. + */ + /** + * Project specific sound properties. + */ + typedef uint16_t am_CustomSoundPropertyType_t; + /** + * This enum characterizes the data of the EarlyData_t + */ + enum class am_EarlyDataType_e: int32_t { + /** + * default + */ + ES_UNKNOWN = 0, + /** + * the source volume + */ + ED_SOURCE_VOLUME = 1, + /** + * the sink volume + */ + ED_SINK_VOLUME = 2, + /** + * a source property + */ + ED_SOURCE_PROPERTY = 3, + /** + * a sink property + */ + ED_SINK_PROPERTY = 4, + ED_MAX + }; + + // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1 + struct am_EarlyDataType_eComparator; + /** + * struct describing the sound property + */ + /** + * struct describing the sound property + */ + struct am_SoundProperty_s: CommonAPI::SerializableStruct { + /** + * the type of the property - a project specific enum + */ + am_CustomSoundPropertyType_t type; + /** + * the actual value of the property + */ + int16_t value; + + am_SoundProperty_s() = default; + am_SoundProperty_s(const am_CustomSoundPropertyType_t& type, const int16_t& value); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeInt16Type(); + } + }; + /** + * data type depends of am_EarlyDataType_e: + volume_t in case of ED_SOURCE_VOLUME, + * ED_SINK_VOLUME + soundProperty_t in case of ED_SOURCE_PROPERTY, + * ED_SINK_PROPERTY + */ + /** + * data type depends of am_EarlyDataType_e: + volume_t in case of ED_SOURCE_VOLUME, + * ED_SINK_VOLUME + soundProperty_t in case of ED_SOURCE_PROPERTY, + * ED_SINK_PROPERTY + */ + typedef CommonAPI::Variant<am_volume_t, am_SoundProperty_s> am_EarlyData_u; + /** + * data type depends of am_EarlyDataType_e: + sourceID in case of ED_SOURCE_VOLUME, + * ED_SOURCE_PROPERTY + sinkID in case of ED_SINK_VOLUME, ED_SINK_PROPERTY + */ + /** + * data type depends of am_EarlyDataType_e: + sourceID in case of ED_SOURCE_VOLUME, + * ED_SOURCE_PROPERTY + sinkID in case of ED_SINK_VOLUME, ED_SINK_PROPERTY + */ + typedef CommonAPI::Variant<am_sinkID_t, am_sourceID_t> am_DataType_u; + struct am_EarlyData_s: CommonAPI::SerializableStruct { + am_EarlyDataType_e type; + am_DataType_u sinksource; + am_EarlyData_u data; + + am_EarlyData_s() = default; + am_EarlyData_s(const am_EarlyDataType_e& type, const am_DataType_u& sinksource, const am_EarlyData_u& data); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeInt32Type(); + typeOutputStream.writeVariantType(); + typeOutputStream.writeVariantType(); + } + }; + typedef std::vector<am_EarlyData_s> am_EarlyData_L; + /** + * Here are all SoundProperties that can be set via the CommandInterface. Product + * specific + */ + /** + * Here are all SoundProperties that can be set via the CommandInterface. Product + * specific + */ + typedef uint16_t am_CustomMainSoundPropertyType_t; + /** + * struct describung mainsound property + */ + /** + * struct describung mainsound property + */ + struct am_MainSoundProperty_s: CommonAPI::SerializableStruct { + /** + * the type of the property + */ + am_CustomMainSoundPropertyType_t type; + /** + * the actual value + */ + int16_t value; + + am_MainSoundProperty_s() = default; + am_MainSoundProperty_s(const am_CustomMainSoundPropertyType_t& type, const int16_t& value); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeInt16Type(); + } + }; + typedef std::vector<am_MainSoundProperty_s> am_MainSoundProperty_L; + /** + * gives the type of the Notification. + */ + /** + * gives the type of the Notification. + */ + typedef uint16_t am_CustomNotificationType_t; + enum class am_NotificationStatus_e: int32_t { + NS_UNKNOWN = 0, + /** + * No notification, the function is turned off + */ + NS_OFF = 1, + /** + * Periodic notifications are sent out. The period in ms is given by + * am_NotificationParameter + */ + NS_PERIODIC = 2, + /** + * The notification is sent out when the minimum given by am_NotificationParameter + * is reached. + */ + NS_MINIMUM = 3, + /** + * The notification is sent out when the maximum given by am_NotificationParameter + * is reached. + */ + NS_MAXIMUM = 4, + /** + * The notification is sent out when a change happened. The Resolution of the + * change is defined by am_NotificationParameter. + */ + NS_CHANGE_ = 5, + NS_MAX + }; + + // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1 + struct am_NotificationStatus_eComparator; + /** + * This struct holds information about the configuration for notifications + */ + /** + * This struct holds information about the configuration for notifications + */ + struct am_NotificationConfiguration_s: CommonAPI::SerializableStruct { + /** + * The notification type of the notification + */ + am_CustomNotificationType_t type; + /** + * The Notification status. This can be periodic, min/max value based or even off + * for example + */ + am_NotificationStatus_e status; + /** + * This gives additional information to the notification status. + Relation between + * notification status and the value: + NS_PERIODIC - the period in ms + NS_MINIMUM + * - the minimum value that triggers the notification + NS_MAXIMUM - the maximum + * value that triggers the notifcation + NS_CHANGE - the resolution of the change + * value + */ + int16_t parameter; + + am_NotificationConfiguration_s() = default; + am_NotificationConfiguration_s(const am_CustomNotificationType_t& type, const am_NotificationStatus_e& status, const int16_t& parameter); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeInt32Type(); + typeOutputStream.writeInt16Type(); + } + }; + typedef std::vector<am_NotificationConfiguration_s> am_NotificationConfiguration_L; + /** + * a domain ID + */ + /** + * a domain ID + */ + typedef uint16_t am_domainID_t; + /** + * This project specific value classifies the format in which data is exchanged + * within a connection. + */ + /** + * This project specific value classifies the format in which data is exchanged + * within a connection. + */ + typedef uint16_t am_CustomConnectionFormat_t; + /** + * This represents one "hopp" in a route + */ + /** + * This represents one "hopp" in a route + */ + struct am_RoutingElement_s: CommonAPI::SerializableStruct { + /** + * the source ID + */ + am_sourceID_t sourceID; + /** + * the sinkID + */ + am_sinkID_t sinkID; + /** + * the domainID the routeElement is in + */ + am_domainID_t domainID; + /** + * the connectionformat that is used for the route + */ + am_CustomConnectionFormat_t connectionFormat; + + am_RoutingElement_s() = default; + am_RoutingElement_s(const am_sourceID_t& sourceID, const am_sinkID_t& sinkID, const am_domainID_t& domainID, const am_CustomConnectionFormat_t& connectionFormat); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + } + }; + typedef std::vector<am_RoutingElement_s> am_RoutingElement_L; + typedef std::vector<am_SoundProperty_s> am_SoundProperty_L; + /** + * time in ms! + */ + /** + * time in ms! + */ + typedef int16_t am_time_t; + /** + * For products, different ramp types can be defined here. + It is in the + * responsibility of the product to make sure that the routing plugins are aware + * of the ramp types used. + */ + /** + * For products, different ramp types can be defined here. + It is in the + * responsibility of the product to make sure that the routing plugins are aware + * of the ramp types used. + */ + typedef uint16_t am_CustomRampType_t; + /** + * This datatype determines if a sourceID or a sinkID is used in the union + * following + */ + enum class am_VolumeType_e: int32_t { + VT_UNKNOWN = 0, + /** + * the following type is a sink + */ + VT_SINK = 1, + /** + * the following type is a source + */ + VT_SOURCE = 2, + VT_MAX + }; + + // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1 + struct am_VolumeType_eComparator; + /** + * This types describe a mixed description for source and sinks volumes. + */ + /** + * This types describe a mixed description for source and sinks volumes. + */ + struct am_Volumes_s: CommonAPI::SerializableStruct { + /** + * describes the type of the volume: source or sink. + */ + am_VolumeType_e volumeType; + /** + * either sourceID or sinkID + */ + am_DataType_u volumeID; + /** + * The volume + */ + am_volume_t volume; + /** + * the ramp that shall be driven + */ + am_CustomRampType_t ramp; + /** + * the time for the ramp + */ + am_time_t time; + + am_Volumes_s() = default; + am_Volumes_s(const am_VolumeType_e& volumeType, const am_DataType_u& volumeID, const am_volume_t& volume, const am_CustomRampType_t& ramp, const am_time_t& time); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeInt32Type(); + typeOutputStream.writeVariantType(); + typeOutputStream.writeInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeInt16Type(); + } + }; + typedef std::vector<am_Volumes_s> am_Volumes_L; + typedef std::vector<am_CustomConnectionFormat_t> am_ConnectionFormat_L; + typedef bool am_bool_t; + typedef std::vector<am_bool_t> am_Convertion_L; + /** + * a gateway ID + */ + /** + * a gateway ID + */ + typedef uint16_t am_gatewayID_t; + /** + * a converter ID + */ + /** + * a converter ID + */ + typedef uint16_t am_converterID_t; + /** + * a crossfader ID + */ + /** + * a crossfader ID + */ + typedef uint16_t am_crossfaderID_t; + /** + * speed + */ + /** + * speed + */ + typedef uint16_t am_speed_t; + /** + * describes the active sink of a crossfader. + */ + enum class am_HotSink_e: int32_t { + /** + * default + */ + HS_UNKNOWN = 0, + /** + * sinkA is active + */ + HS_SINKA = 1, + /** + * sinkB is active + */ + HS_SINKB = 2, + /** + * the crossfader is in the transition state + */ + HS_INTERMEDIATE = 3, + HS_MAX + }; + + // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1 + struct am_HotSink_eComparator; + enum class am_DomainState_e: int32_t { + /** + * default + */ + DS_UNKNOWN = 0, + /** + * the domain is controlled by the daemon + */ + DS_CONTROLLED = 1, + /** + * the domain is independent starting up + */ + DS_INDEPENDENT_STARTUP = 1, + /** + * the domain is independent running down + */ + DS_INDEPENDENT_RUNDOWN = 2, + DS_MAX + }; + + // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1 + struct am_DomainState_eComparator; + /** + * the errors of the audiomanager. All possible errors are in here. This enum is + * used widely as return parameter. + */ + enum class am_Error_e: int32_t { + /** + * no error - positive reply + */ + E_OK = 0, + /** + * default + */ + E_UNKNOWN = 1, + /** + * value out of range + */ + E_OUT_OF_RANGE = 2, + /** + * not used + */ + E_NOT_USED = 3, + /** + * a database error occurred + */ + E_DATABASE_ERROR = 4, + /** + * the desired object already exists + */ + E_ALREADY_EXISTS = 5, + /** + * there is no change + */ + E_NO_CHANGE = 6, + /** + * the desired action is not possible + */ + E_NOT_POSSIBLE = 7, + /** + * the desired object is non existent + */ + E_NON_EXISTENT = 8, + /** + * the asynchronous action was aborted + */ + E_ABORTED = 9, + /** + * This error is returned in case a connect is issued with a connectionFormat that + * cannot be selected for the connection. This could be either due to the + * capabilities of a source or a sink or gateway compatibilities for example + */ + E_WRONG_FORMAT = 10, + E_MAX + }; + + // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1 + struct am_Error_eComparator; + enum class am_InterruptState_e: int32_t { + /** + * default + */ + IS_UNKNOWN = 0, + /** + * the interrupt state is off - no interrupt + */ + IS_OFF = 1, + /** + * the interrupt state is interrupted - the interrupt is active + */ + IS_INTERRUPTED = 2, + IS_MAX + }; + + // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1 + struct am_InterruptState_eComparator; + /** + * This enumeration is used to define the type of the action that is correlated to + * a handle. + */ + enum class am_Handle_e: int32_t { + H_UNKNOWN = 0, + H_CONNECT = 1, + H_DISCONNECT = 2, + H_SETSOURCESTATE = 3, + H_SETSINKVOLUME = 4, + H_SETSOURCEVOLUME = 5, + H_SETSINKSOUNDPROPERTY = 6, + H_SETSOURCESOUNDPROPERTY = 7, + H_SETSINKSOUNDPROPERTIES = 8, + H_SETSOURCESOUNDPROPERTIES = 9, + H_CROSSFADE = 10, + H_SETVOLUMES = 11, + H_SETSINKNOTIFICATION = 12, + H_SETSOURCENOTIFICATION = 13, + H_MAX + }; + + // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1 + struct am_Handle_eComparator; + /** + * The source state reflects the state of the source + */ + enum class am_SourceState_e: int32_t { + SS_UNKNNOWN = 0, + /** + * The source can be activly heared + */ + SS_ON = 1, + /** + * The source cannot be heared + */ + SS_OFF = 2, + /** + * The source is paused. Meaning it cannot be heared but should be prepared to + * play again soon. + */ + SS_PAUSED = 3, + SS_MAX + }; + + // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1 + struct am_SourceState_eComparator; + /** + * This enum describes the ready state of the routing part + */ + enum class am_RoutingReady_e: int32_t { + RR_UNKNOWN = 0, + RR_READY = 1, + RR_RUNDOWN = 2 + }; + + // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1 + struct am_RoutingReady_eComparator; + /** + * a list of routing elements that lead from source to sink + */ + /** + * a list of routing elements that lead from source to sink + */ + struct am_Route_s: CommonAPI::SerializableStruct { + /** + * the sourceID where the route starts + */ + am_sourceID_t sourceID; + /** + * the sinkID where the route ends + */ + am_sinkID_t sinkID; + /** + * the actual route as list of routing elements + */ + am_RoutingElement_L route; + + am_Route_s() = default; + am_Route_s(const am_sourceID_t& sourceID, const am_sinkID_t& sinkID, const am_RoutingElement_L& route); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.beginWriteStructType(); + typeOutputStream.writeUInt16Type();typeOutputStream.writeUInt16Type();typeOutputStream.writeUInt16Type();typeOutputStream.writeUInt16Type(); + typeOutputStream.endWriteStructType(); + typeOutputStream.endWriteVectorType(); + } + }; + /** + * This struct describes the attribiutes of a crossfader. + */ + /** + * This struct describes the attribiutes of a crossfader. + */ + struct am_Crossfader_s: CommonAPI::SerializableStruct { + /** + * This is the ID of the crossfader, it is unique in the system. There are 2 ways, + * ID can be created: either it is assigned during the registration process (in a + * dynamic context, uniqueness will be ensured by the AudioManager daemon), or it + * is a fixed (the project has to ensure the uniqueness of the ID). + */ + am_crossfaderID_t crossfaderID; + /** + * The name of the crossfader. Must be unique in the whole system. + */ + std::string name; + /** + * The sinkID of the SinkA. Sinks shall be registered before registering the + * crossfader. + */ + am_sinkID_t sinkID_A; + /** + * The sinkID of the SinkB. Sinks shall be registered before registering the + * crossfader. + */ + am_sinkID_t sinkID_B; + /** + * The sourceID of the crossfader source. The source shall be registered before + * the crossfader. + */ + am_sourceID_t sourceID; + /** + * This enum can have 3 states: + + HS_SINKA sinkA is the current hot one, sinkB + * is not audible + HS_SINKB sinkB is the current hot one, sinkB is not + * audible + HS_INTERMEDIATE the fader is stuck in between a cross-fading + * action. This could be due to an abort or an error. Before using the + * crossfader, it must be set to either HS_SINKA or HS_SINKB. + */ + am_HotSink_e hotSink; + + am_Crossfader_s() = default; + am_Crossfader_s(const am_crossfaderID_t& crossfaderID, const std::string& name, const am_sinkID_t& sinkID_A, const am_sinkID_t& sinkID_B, const am_sourceID_t& sourceID, const am_HotSink_e& hotSink); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeStringType(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeInt32Type(); + } + }; + /** + * This struct describes the attributes of a gateway. + */ + /** + * This struct describes the attributes of a gateway. + */ + struct am_Gateway_s: CommonAPI::SerializableStruct { + /** + * This is the ID of the gateway, it is unique in the system. There are 2 ways, ID + * can be created: either it is assigned during the registration process (in a + * dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it + * is a fixed (the project has to ensure the uniqueness of the ID). + */ + am_gatewayID_t gatewayID; + /** + * The name of the gateway. Must be unique in the whole system. + */ + std::string name; + /** + * The sinkID of the gateway sink-end. The sink is a full blown sink with + * connectionFormats, sinkClassIDs etc... It makes sense to register the sinks of + * a gateway as non-visible. Care needs to be taken that the connectionsFormats + * match with the ones in the conversionMatrix. If the sink is located in the + * controllingDomain, the ID needs to be retrieved by registering the sink before + * registering the gateway. In case the sink is in a different domain, the ID + * needs to be retrieved via peeking. + */ + am_sinkID_t sinkID; + /** + * The sourceID of the gateway sink-end. The sink is a full blown source with + * connectionFormats, sinkClassIDs etc... It makes sense to register the sources + * of a gateway as non-visible. Care needs to be taken that the + * connectionsFormats match with the ones in the conversionMatrix. If the source + * is located in the controllingDomain, the ID needs to be retrieved by + * registering the source before registering the gateway. In case the source is + * in a different domain, the ID needs to be retrieved via peeking. + */ + am_sourceID_t sourceID; + /** + * The ID of the sink. If the domain is the same like the controlling domain, the + * ID is known due to registration. If the domain is different, the ID needs to + * be retrieved via peeking. + */ + am_domainID_t domainSinkID; + /** + * The ID of the source. If the domain is the same like the controlling domain, + * the ID is known due to registration. If the domain is different, the ID needs + * to be retrieved via peeking. + */ + am_domainID_t domainSourceID; + /** + * This is the ID of the domain that registers the gateway. + */ + am_domainID_t controlDomainID; + /** + * This is the list of available formats on the source side of the gateway. It is + * not defined during the gateway registration but copied from the source + * registration. + */ + am_ConnectionFormat_L listSourceFormats; + /** + * This is the list of available formats on the sink side of the gateway. It is + * not defined during the gateway registration but copied from the sink + * registration. + */ + am_ConnectionFormat_L listSinkFormats; + /** + * This is matrix holding information about the conversion capability of the + * gateway, it's length is defined by the length(listSinkFormats) x + * length(listSourceFormats). + If a SinkFormat can be converted into a + * SourceFormat, the vector will hold a 1, if no conversion is possible, a + * 0. + The data is stored row orientated, where the rows are related to the + * sinksFormats and the columns to the sourceFormats. The first value will hold + * the conversion information from the first sourceFormat to the first sinkFormat + * for example and the seventh value the information about the 3rd sinkFormat to + * the 1st sourceFormat in case we would have 3 sourceFormats. + */ + am_Convertion_L convertionMatrix; + + am_Gateway_s() = default; + am_Gateway_s(const am_gatewayID_t& gatewayID, const std::string& name, const am_sinkID_t& sinkID, const am_sourceID_t& sourceID, const am_domainID_t& domainSinkID, const am_domainID_t& domainSourceID, const am_domainID_t& controlDomainID, const am_ConnectionFormat_L& listSourceFormats, const am_ConnectionFormat_L& listSinkFormats, const am_Convertion_L& convertionMatrix); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeStringType(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.endWriteVectorType(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.endWriteVectorType(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.writeBoolType(); + typeOutputStream.endWriteVectorType(); + } + }; + /** + * This struct describes the attributes of a gateway. + */ + /** + * This struct describes the attributes of a gateway. + */ + struct am_Converter_s: CommonAPI::SerializableStruct { + /** + * This is the ID of the gateway, it is unique in the system. There are 2 ways, ID + * can be created: either it is assigned during the registration process (in a + * dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it + * is a fixed (the project has to ensure the uniqueness of the ID). + */ + am_converterID_t converterID; + /** + * The name of the gateway. Must be unique in the whole system. + */ + std::string name; + /** + * The sinkID of the gateway sink-end. The sink is a full blown sink with + * connectionFormats, sinkClassIDs etc... It makes sense to register the sinks of + * a gateway as non-visible. Care needs to be taken that the connectionsFormats + * match with the ones in the conversionMatrix. If the sink is located in the + * controllingDomain, the ID needs to be retrieved by registering the sink before + * registering the gateway. In case the sink is in a different domain, the ID + * needs to be retrieved via peeking. + */ + am_sinkID_t sinkID; + /** + * The sourceID of the gateway sink-end. The sink is a full blown source with + * connectionFormats, sinkClassIDs etc... It makes sense to register the sources + * of a gateway as non-visible. Care needs to be taken that the + * connectionsFormats match with the ones in the conversionMatrix. If the source + * is located in the controllingDomain, the ID needs to be retrieved by + * registering the source before registering the gateway. In case the source is + * in a different domain, the ID needs to be retrieved via peeking. + */ + am_sourceID_t sourceID; + /** + * The ID of the sink. If the domain is the same like the controlling domain, the + * ID is known due to registration. If the domain is different, the ID needs to + * be retrieved via peeking. + */ + am_domainID_t domainID; + /** + * This is the list of available formats on the source side of the gateway. It is + * not defined during the gateway registration but copied from the source + * registration. + */ + am_ConnectionFormat_L listSourceFormats; + /** + * This is the list of available formats on the sink side of the gateway. It is + * not defined during the gateway registration but copied from the sink + * registration. + */ + am_ConnectionFormat_L listSinkFormats; + /** + * This is matrix holding information about the conversion capability of the + * gateway, it's length is defined by the length(listSinkFormats) x + * length(listSourceFormats). + If a SinkFormat can be converted into a + * SourceFormat, the vector will hold a 1, if no conversion is possible, a + * 0. + The data is stored row orientated, where the rows are related to the + * sinksFormats and the columns to the sourceFormats. The first value will hold + * the conversion information from the first sourceFormat to the first sinkFormat + * for example and the seventh value the information about the 3rd sinkFormat to + * the 1st sourceFormat in case we would have 3 sourceFormats. + */ + am_Convertion_L convertionMatrix; + + am_Converter_s() = default; + am_Converter_s(const am_converterID_t& converterID, const std::string& name, const am_sinkID_t& sinkID, const am_sourceID_t& sourceID, const am_domainID_t& domainID, const am_ConnectionFormat_L& listSourceFormats, const am_ConnectionFormat_L& listSinkFormats, const am_Convertion_L& convertionMatrix); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeStringType(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.endWriteVectorType(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.endWriteVectorType(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.writeBoolType(); + typeOutputStream.endWriteVectorType(); + } + }; + /** + * a handle is used for asynchronous operations and is uniquely assigned for each + * of this operations + */ + /** + * a handle is used for asynchronous operations and is uniquely assigned for each + * of this operations + */ + struct am_Handle_s: CommonAPI::SerializableStruct { + /** + * the handletype + */ + am_Handle_e handleType; + /** + * the handle as value + */ + uint16_t handle; + + am_Handle_s() = default; + am_Handle_s(const am_Handle_e& handleType, const uint16_t& handle); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeInt32Type(); + typeOutputStream.writeUInt16Type(); + } + }; + /** + * struct that holds attribiutes of a mainconnection + */ + /** + * struct that holds attribiutes of a mainconnection + */ + struct am_MainConnection_s: CommonAPI::SerializableStruct { + /** + * the assigned ID + */ + am_mainConnectionID_t mainConnectionID; + /** + * the current connection state + */ + am_ConnectionState_e connectionState; + /** + * the sinkID + */ + am_sinkID_t sinkID; + /** + * the sourceID + */ + am_sourceID_t sourceID; + /** + * the delay of the connection + */ + am_timeSync_t delay; + /** + * the list of sub connection IDs the mainconnection consists of + */ + am_ConnectionID_L listConnectionID; + + am_MainConnection_s() = default; + am_MainConnection_s(const am_mainConnectionID_t& mainConnectionID, const am_ConnectionState_e& connectionState, const am_sinkID_t& sinkID, const am_sourceID_t& sourceID, const am_timeSync_t& delay, const am_ConnectionID_L& listConnectionID); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeInt32Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeInt16Type(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.endWriteVectorType(); + } + }; + /** + * This struct holds the payload of a notification. + */ + /** + * This struct holds the payload of a notification. + */ + struct am_NotificationPayload_s: CommonAPI::SerializableStruct { + /** + * This defines the notification type + */ + am_CustomNotificationType_t type; + /** + * This is finally the value of the notification. It's meaning depends on the + * notificationType + */ + int16_t value; + + am_NotificationPayload_s() = default; + am_NotificationPayload_s(const am_CustomNotificationType_t& type, const int16_t& value); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeInt16Type(); + } + }; + /** + * This struct describes the attribiutes of a sink + */ + /** + * This struct describes the attribiutes of a sink + */ + struct am_Sink_s: CommonAPI::SerializableStruct { + /** + * This is the ID of the sink, it is unique in the system. There are 2 ways, ID + * can be created: either it is assigned during the registration process (in a + * dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it + * is a fixed (the project has to ensure the uniqueness of the ID). + */ + am_sinkID_t sinkID; + /** + * The name of the sink. Must be unique in the whole system. + */ + std::string name; + /** + * The domainID is the domain the sink belongs to. A sink can only be in one + * domain. + */ + am_domainID_t domainID; + /** + * The sinkClassID references to a sinkClass. With the help of classification, + * rules can be setup to define the system behaviour. + */ + am_sinkClass_t sinkClassID; + /** + * This is the volume of the sink. It is set by the AudioManagerController. + */ + am_volume_t volume; + /** + * This Boolean flag indicates whether a sink is visible to the commandInterface + * or not. If the User must have the possibility to choose the source in the HMI, + * it must be visible. But there are also good reasons for invisible sinks, for + * example if the sink is part of a crossfader or gateway. HMI relevant changes + * in visible sinks will be automatically reported by the daemon to the + * commandInterface. + */ + bool visible; + /** + * This attribute reflects the availability of the sink. There are several reasons + * why a sink could be not available for the moment: for example the shutdown of + * a sink because of overtemperature or over- & undervoltage. The + * availability consists of two pieces of information: + + Availablility: the + * status itself, can be A_AVAILABLE, A_UNAVAILABLE or A_UNKNOWN + + * AvailabilityReason: this informs about the last reason for a change in + * availability. The reasons itself are product specific. + */ + am_Availability_s available; + /** + * This attribute reflects the muteState of the sink. The information is not the + * "real" state of the sink, but the HMI representation for he commandInterface + * controlled by the AudioManagerController. + */ + am_MuteState_e muteState; + /** + * This is the representation of the Volume for the commandInterface. It is used + * by the HMI to set the volume of a sink, the AudioManagerController has to + * transform this into real source and sink volumes. + */ + am_mainVolume_t mainVolume; + /** + * This is the list of soundProperties, that the sink is capable of. The + * soundProperties itself are project specific. For sinks, a possible + * soundProperty could be for example settings. + */ + am_SoundProperty_L listSoundProperties; + /** + * This list holds information about the formats that the Source is capable of + * supporting when delivering audio. + */ + am_ConnectionFormat_L listConnectionFormats; + /** + * This is the list of the available mainSoundProperties. The principle is the + * same than with soundProperties, but they are only visible to the + * CommandInterface. + */ + am_MainSoundProperty_L listMainSoundProperties; + /** + * This is the list of the MainNotificationConfigurations. These notifications + * work on the level of command interface. + */ + am_NotificationConfiguration_L listMainNotificationConfigurations; + /** + * This is the list of the NotificationConfigurations. These notifications work on + * the level of RoutingPlugins. + */ + am_NotificationConfiguration_L listNotificationConfigurations; + + am_Sink_s() = default; + am_Sink_s(const am_sinkID_t& sinkID, const std::string& name, const am_domainID_t& domainID, const am_sinkClass_t& sinkClassID, const am_volume_t& volume, const bool& visible, const am_Availability_s& available, const am_MuteState_e& muteState, const am_mainVolume_t& mainVolume, const am_SoundProperty_L& listSoundProperties, const am_ConnectionFormat_L& listConnectionFormats, const am_MainSoundProperty_L& listMainSoundProperties, const am_NotificationConfiguration_L& listMainNotificationConfigurations, const am_NotificationConfiguration_L& listNotificationConfigurations); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeStringType(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeInt16Type(); + typeOutputStream.writeBoolType(); + typeOutputStream.beginWriteStructType(); + typeOutputStream.writeInt32Type();typeOutputStream.writeUInt16Type(); + typeOutputStream.endWriteStructType(); + typeOutputStream.writeInt32Type(); + typeOutputStream.writeInt16Type(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.beginWriteStructType(); + typeOutputStream.writeUInt16Type();typeOutputStream.writeInt16Type(); + typeOutputStream.endWriteStructType(); + typeOutputStream.endWriteVectorType(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.endWriteVectorType(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.beginWriteStructType(); + typeOutputStream.writeUInt16Type();typeOutputStream.writeInt16Type(); + typeOutputStream.endWriteStructType(); + typeOutputStream.endWriteVectorType(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.beginWriteStructType(); + typeOutputStream.writeUInt16Type();typeOutputStream.writeInt32Type();typeOutputStream.writeInt16Type(); + typeOutputStream.endWriteStructType(); + typeOutputStream.endWriteVectorType(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.beginWriteStructType(); + typeOutputStream.writeUInt16Type();typeOutputStream.writeInt32Type();typeOutputStream.writeInt16Type(); + typeOutputStream.endWriteStructType(); + typeOutputStream.endWriteVectorType(); + } + }; + /** + * This struct describes the attribiutes of a source + */ + /** + * This struct describes the attribiutes of a source + */ + struct am_Source_s: CommonAPI::SerializableStruct { + /** + * This is the ID of the source, it is unique in the system. There are 2 ways, ID + * can be created: either it is assigned during the registration process (in a + * dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it + * is a fixed (the project has to ensure the uniqueness of the ID). + */ + am_sourceID_t sourceID; + /** + * The domainID is the domain the source belongs to. A source can only be in one + * domain. + */ + am_domainID_t domainID; + /** + * The name of the source. Must be unique in the whole system. + */ + std::string name; + /** + * the sourceClassID, indicates the class the source is in. This information can + * be used by the Controller to implement different behaviour for different + * classes. + */ + am_sourceClass_t sourceClassID; + /** + * The source state is an indication towards the source if it is actively heard or + * not. The source can use this information to implement features like automatic + * spin down of CD's in case the CD is not the active source or AF following of a + * tuner that is not actively heard. The source state is set by the + * AudioManagerController.There are 3 possible states: + + SS_ON: the source is + * active + SS_OFF: the source is off + SS_PAUSED: the source is paused and + * not active. + */ + am_SourceState_e sourceState; + /** + * This is the volume of the source. It is set by the AudioManagerController. It + * is used to adopt different audiolevels in a system and mixing of sources (e.g. + * navigation hints & music). + */ + am_volume_t volume; + /** + * This Boolean flag indicates whether a source is visible to the commandInterface + * or not. If the User must have the possibility to choose the source in the HMI, + * it must be visible. But there are also good reasons for invisible sources, for + * example if the source is part of a crossfader or gateway. HMI relevant changes + * in visible sources will be automatically reported by the daemon to the + * commandInterface. + */ + bool visible; + /** + * This attribute reflects the availability of the source. There are several + * reasons why a source could be not available for the moment. For example a CD + * player which has no CD entered in the slot can be unavailable, or a USB player + * with no or unreadable stick attached. Other scenarios involve the shutdown of + * a source because of overtemperature or over- & undervoltage. The + * availability consists of two informations: + + Availablility: the status + * itself, can be A_AVAILABLE, A_UNAVAILABLE or A_UNKNOWN + + * AvailabilityReason: this informs about the last reason for a change in + * availability. The reasons itself are product specific. + */ + am_Availability_s available; + /** + * Some special sources can have special behaviors, the are so called "Low Level + * Interrupts". Here the current status is documented. The information can be + * used by the AudioManagerController to react to the changes by for example + * lowering the volume of the mainSources. The two states are + + IS_OFF: the + * interrupt is not active at the moment + IS_INTERRUPTED: the interrupt is + * playing at the moment. + */ + am_InterruptState_e interruptState; + /** + * This is the list of soundProperties, that the source is capable of. The + * soundProperties itself are project specific. For sources, a possible + * soundProperty could be navigation volume offset, for example. + */ + am_SoundProperty_L listSoundProperties; + /** + * This list holds information about the formats that the Source is capable of + * supporting when delivering audio. + */ + am_ConnectionFormat_L listConnectionFormats; + /** + * This is the list of the available mainSoundProperties. The principle is the + * same than with soundProperties, but they are only visible to the + * CommandInterface. + */ + am_MainSoundProperty_L listMainSoundProperties; + /** + * The list of MainNotificationConfigurations. These notifications work on the + * level of CommandInterface. + */ + am_NotificationConfiguration_L listMainNotificationConfigurations; + /** + * The list of MainNotificationConfigurations. These notifications work on the + * level of RoutingInterface. + */ + am_NotificationConfiguration_L listNotificationConfigurations; + + am_Source_s() = default; + am_Source_s(const am_sourceID_t& sourceID, const am_domainID_t& domainID, const std::string& name, const am_sourceClass_t& sourceClassID, const am_SourceState_e& sourceState, const am_volume_t& volume, const bool& visible, const am_Availability_s& available, const am_InterruptState_e& interruptState, const am_SoundProperty_L& listSoundProperties, const am_ConnectionFormat_L& listConnectionFormats, const am_MainSoundProperty_L& listMainSoundProperties, const am_NotificationConfiguration_L& listMainNotificationConfigurations, const am_NotificationConfiguration_L& listNotificationConfigurations); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeStringType(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeInt32Type(); + typeOutputStream.writeInt16Type(); + typeOutputStream.writeBoolType(); + typeOutputStream.beginWriteStructType(); + typeOutputStream.writeInt32Type();typeOutputStream.writeUInt16Type(); + typeOutputStream.endWriteStructType(); + typeOutputStream.writeInt32Type(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.beginWriteStructType(); + typeOutputStream.writeUInt16Type();typeOutputStream.writeInt16Type(); + typeOutputStream.endWriteStructType(); + typeOutputStream.endWriteVectorType(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.endWriteVectorType(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.beginWriteStructType(); + typeOutputStream.writeUInt16Type();typeOutputStream.writeInt16Type(); + typeOutputStream.endWriteStructType(); + typeOutputStream.endWriteVectorType(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.beginWriteStructType(); + typeOutputStream.writeUInt16Type();typeOutputStream.writeInt32Type();typeOutputStream.writeInt16Type(); + typeOutputStream.endWriteStructType(); + typeOutputStream.endWriteVectorType(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.beginWriteStructType(); + typeOutputStream.writeUInt16Type();typeOutputStream.writeInt32Type();typeOutputStream.writeInt16Type(); + typeOutputStream.endWriteStructType(); + typeOutputStream.endWriteVectorType(); + } + }; + /** + * This struct describes the attribiutes of a domain + */ + /** + * This struct describes the attribiutes of a domain + */ + struct am_Domain_s: CommonAPI::SerializableStruct { + /** + * the domain ID + */ + am_domainID_t domainID; + /** + * the name of the domain + */ + std::string name; + /** + * the busname. This is equal to a plugin name and is used to dispatch messages to + * the elements of a plugin + */ + std::string busname; + /** + * the name of the node + */ + std::string nodename; + /** + * indicated if the domain is independent at startup or not + */ + bool early; + /** + * indicates if the domain registration is complete or not + */ + bool complete; + /** + * the current domain state + */ + am_DomainState_e state; + + am_Domain_s() = default; + am_Domain_s(const am_domainID_t& domainID, const std::string& name, const std::string& busname, const std::string& nodename, const bool& early, const bool& complete, const am_DomainState_e& state); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeStringType(); + typeOutputStream.writeStringType(); + typeOutputStream.writeStringType(); + typeOutputStream.writeBoolType(); + typeOutputStream.writeBoolType(); + typeOutputStream.writeInt32Type(); + } + }; + /** + * a connection + */ + /** + * a connection + */ + struct am_Connection_s: CommonAPI::SerializableStruct { + /** + * the assigned ID + */ + am_connectionID_t connectionID; + /** + * the source the audio flows from + */ + am_sourceID_t sourceID; + /** + * the sink the audio flows to + */ + am_sinkID_t sinkID; + /** + * the delay of the conneciton + */ + am_timeSync_t delay; + /** + * the used connectionformat + */ + am_CustomConnectionFormat_t connectionFormat; + + am_Connection_s() = default; + am_Connection_s(const am_connectionID_t& connectionID, const am_sourceID_t& sourceID, const am_sinkID_t& sinkID, const am_timeSync_t& delay, const am_CustomConnectionFormat_t& connectionFormat); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeInt16Type(); + typeOutputStream.writeUInt16Type(); + } + }; + +inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_Availability_e& enumValue) { + return inputStream.readEnumValue<int32_t>(enumValue); +} + +inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_Availability_e& enumValue) { + return outputStream.writeEnumValue(static_cast<int32_t>(enumValue)); +} + +struct am_Availability_eComparator { + inline bool operator()(const am_Availability_e& lhs, const am_Availability_e& rhs) const { + return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs); + } +}; + +inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_HotSink_e& enumValue) { + return inputStream.readEnumValue<int32_t>(enumValue); +} + +inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_HotSink_e& enumValue) { + return outputStream.writeEnumValue(static_cast<int32_t>(enumValue)); +} + +struct am_HotSink_eComparator { + inline bool operator()(const am_HotSink_e& lhs, const am_HotSink_e& rhs) const { + return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs); + } +}; + +inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_ConnectionState_e& enumValue) { + return inputStream.readEnumValue<int32_t>(enumValue); +} + +inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_ConnectionState_e& enumValue) { + return outputStream.writeEnumValue(static_cast<int32_t>(enumValue)); +} + +struct am_ConnectionState_eComparator { + inline bool operator()(const am_ConnectionState_e& lhs, const am_ConnectionState_e& rhs) const { + return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs); + } +}; + +inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_DomainState_e& enumValue) { + return inputStream.readEnumValue<int32_t>(enumValue); +} + +inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_DomainState_e& enumValue) { + return outputStream.writeEnumValue(static_cast<int32_t>(enumValue)); +} + +struct am_DomainState_eComparator { + inline bool operator()(const am_DomainState_e& lhs, const am_DomainState_e& rhs) const { + return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs); + } +}; + +inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_EarlyDataType_e& enumValue) { + return inputStream.readEnumValue<int32_t>(enumValue); +} + +inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_EarlyDataType_e& enumValue) { + return outputStream.writeEnumValue(static_cast<int32_t>(enumValue)); +} + +struct am_EarlyDataType_eComparator { + inline bool operator()(const am_EarlyDataType_e& lhs, const am_EarlyDataType_e& rhs) const { + return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs); + } +}; + +inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_Error_e& enumValue) { + return inputStream.readEnumValue<int32_t>(enumValue); +} + +inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_Error_e& enumValue) { + return outputStream.writeEnumValue(static_cast<int32_t>(enumValue)); +} + +struct am_Error_eComparator { + inline bool operator()(const am_Error_e& lhs, const am_Error_e& rhs) const { + return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs); + } +}; + +inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_MuteState_e& enumValue) { + return inputStream.readEnumValue<int32_t>(enumValue); +} + +inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_MuteState_e& enumValue) { + return outputStream.writeEnumValue(static_cast<int32_t>(enumValue)); +} + +struct am_MuteState_eComparator { + inline bool operator()(const am_MuteState_e& lhs, const am_MuteState_e& rhs) const { + return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs); + } +}; + +inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_InterruptState_e& enumValue) { + return inputStream.readEnumValue<int32_t>(enumValue); +} + +inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_InterruptState_e& enumValue) { + return outputStream.writeEnumValue(static_cast<int32_t>(enumValue)); +} + +struct am_InterruptState_eComparator { + inline bool operator()(const am_InterruptState_e& lhs, const am_InterruptState_e& rhs) const { + return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs); + } +}; + +inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_VolumeType_e& enumValue) { + return inputStream.readEnumValue<int32_t>(enumValue); +} + +inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_VolumeType_e& enumValue) { + return outputStream.writeEnumValue(static_cast<int32_t>(enumValue)); +} + +struct am_VolumeType_eComparator { + inline bool operator()(const am_VolumeType_e& lhs, const am_VolumeType_e& rhs) const { + return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs); + } +}; + +inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_NotificationStatus_e& enumValue) { + return inputStream.readEnumValue<int32_t>(enumValue); +} + +inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_NotificationStatus_e& enumValue) { + return outputStream.writeEnumValue(static_cast<int32_t>(enumValue)); +} + +struct am_NotificationStatus_eComparator { + inline bool operator()(const am_NotificationStatus_e& lhs, const am_NotificationStatus_e& rhs) const { + return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs); + } +}; + +inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_Handle_e& enumValue) { + return inputStream.readEnumValue<int32_t>(enumValue); +} + +inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_Handle_e& enumValue) { + return outputStream.writeEnumValue(static_cast<int32_t>(enumValue)); +} + +struct am_Handle_eComparator { + inline bool operator()(const am_Handle_e& lhs, const am_Handle_e& rhs) const { + return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs); + } +}; + +inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_SourceState_e& enumValue) { + return inputStream.readEnumValue<int32_t>(enumValue); +} + +inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_SourceState_e& enumValue) { + return outputStream.writeEnumValue(static_cast<int32_t>(enumValue)); +} + +struct am_SourceState_eComparator { + inline bool operator()(const am_SourceState_e& lhs, const am_SourceState_e& rhs) const { + return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs); + } +}; + +inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, am_RoutingReady_e& enumValue) { + return inputStream.readEnumValue<int32_t>(enumValue); +} + +inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const am_RoutingReady_e& enumValue) { + return outputStream.writeEnumValue(static_cast<int32_t>(enumValue)); +} + +struct am_RoutingReady_eComparator { + inline bool operator()(const am_RoutingReady_e& lhs, const am_RoutingReady_e& rhs) const { + return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs); + } +}; + +bool operator==(const am_Route_s& lhs, const am_Route_s& rhs); +inline bool operator!=(const am_Route_s& lhs, const am_Route_s& rhs) { + return !(lhs == rhs); +} +bool operator==(const am_Availability_s& lhs, const am_Availability_s& rhs); +inline bool operator!=(const am_Availability_s& lhs, const am_Availability_s& rhs) { + return !(lhs == rhs); +} +bool operator==(const am_ClassProperty_s& lhs, const am_ClassProperty_s& rhs); +inline bool operator!=(const am_ClassProperty_s& lhs, const am_ClassProperty_s& rhs) { + return !(lhs == rhs); +} +bool operator==(const am_Crossfader_s& lhs, const am_Crossfader_s& rhs); +inline bool operator!=(const am_Crossfader_s& lhs, const am_Crossfader_s& rhs) { + return !(lhs == rhs); +} +bool operator==(const am_Gateway_s& lhs, const am_Gateway_s& rhs); +inline bool operator!=(const am_Gateway_s& lhs, const am_Gateway_s& rhs) { + return !(lhs == rhs); +} +bool operator==(const am_Converter_s& lhs, const am_Converter_s& rhs); +inline bool operator!=(const am_Converter_s& lhs, const am_Converter_s& rhs) { + return !(lhs == rhs); +} +bool operator==(const am_RoutingElement_s& lhs, const am_RoutingElement_s& rhs); +inline bool operator!=(const am_RoutingElement_s& lhs, const am_RoutingElement_s& rhs) { + return !(lhs == rhs); +} +bool operator==(const am_SoundProperty_s& lhs, const am_SoundProperty_s& rhs); +inline bool operator!=(const am_SoundProperty_s& lhs, const am_SoundProperty_s& rhs) { + return !(lhs == rhs); +} +bool operator==(const am_SystemProperty_s& lhs, const am_SystemProperty_s& rhs); +inline bool operator!=(const am_SystemProperty_s& lhs, const am_SystemProperty_s& rhs) { + return !(lhs == rhs); +} +bool operator==(const am_SinkClass_s& lhs, const am_SinkClass_s& rhs); +inline bool operator!=(const am_SinkClass_s& lhs, const am_SinkClass_s& rhs) { + return !(lhs == rhs); +} +bool operator==(const am_SourceClass_s& lhs, const am_SourceClass_s& rhs); +inline bool operator!=(const am_SourceClass_s& lhs, const am_SourceClass_s& rhs) { + return !(lhs == rhs); +} +bool operator==(const am_SourceType_s& lhs, const am_SourceType_s& rhs); +inline bool operator!=(const am_SourceType_s& lhs, const am_SourceType_s& rhs) { + return !(lhs == rhs); +} +bool operator==(const am_SinkType_s& lhs, const am_SinkType_s& rhs); +inline bool operator!=(const am_SinkType_s& lhs, const am_SinkType_s& rhs) { + return !(lhs == rhs); +} +bool operator==(const am_Handle_s& lhs, const am_Handle_s& rhs); +inline bool operator!=(const am_Handle_s& lhs, const am_Handle_s& rhs) { + return !(lhs == rhs); +} +bool operator==(const am_MainSoundProperty_s& lhs, const am_MainSoundProperty_s& rhs); +inline bool operator!=(const am_MainSoundProperty_s& lhs, const am_MainSoundProperty_s& rhs) { + return !(lhs == rhs); +} +bool operator==(const am_MainConnectionType_s& lhs, const am_MainConnectionType_s& rhs); +inline bool operator!=(const am_MainConnectionType_s& lhs, const am_MainConnectionType_s& rhs) { + return !(lhs == rhs); +} +bool operator==(const am_MainConnection_s& lhs, const am_MainConnection_s& rhs); +inline bool operator!=(const am_MainConnection_s& lhs, const am_MainConnection_s& rhs) { + return !(lhs == rhs); +} +bool operator==(const am_NotificationPayload_s& lhs, const am_NotificationPayload_s& rhs); +inline bool operator!=(const am_NotificationPayload_s& lhs, const am_NotificationPayload_s& rhs) { + return !(lhs == rhs); +} +bool operator==(const am_NotificationConfiguration_s& lhs, const am_NotificationConfiguration_s& rhs); +inline bool operator!=(const am_NotificationConfiguration_s& lhs, const am_NotificationConfiguration_s& rhs) { + return !(lhs == rhs); +} +bool operator==(const am_Sink_s& lhs, const am_Sink_s& rhs); +inline bool operator!=(const am_Sink_s& lhs, const am_Sink_s& rhs) { + return !(lhs == rhs); +} +bool operator==(const am_Source_s& lhs, const am_Source_s& rhs); +inline bool operator!=(const am_Source_s& lhs, const am_Source_s& rhs) { + return !(lhs == rhs); +} +bool operator==(const am_Domain_s& lhs, const am_Domain_s& rhs); +inline bool operator!=(const am_Domain_s& lhs, const am_Domain_s& rhs) { + return !(lhs == rhs); +} +bool operator==(const am_EarlyData_s& lhs, const am_EarlyData_s& rhs); +inline bool operator!=(const am_EarlyData_s& lhs, const am_EarlyData_s& rhs) { + return !(lhs == rhs); +} +bool operator==(const am_Connection_s& lhs, const am_Connection_s& rhs); +inline bool operator!=(const am_Connection_s& lhs, const am_Connection_s& rhs) { + return !(lhs == rhs); +} +bool operator==(const am_Volumes_s& lhs, const am_Volumes_s& rhs); +inline bool operator!=(const am_Volumes_s& lhs, const am_Volumes_s& rhs) { + return !(lhs == rhs); +} + + +static inline const char* getTypeCollectionName() { + static const char* typeCollectionName = "org.genivi.am"; + return typeCollectionName; +} + +inline CommonAPI::Version getTypeCollectionVersion() { + return CommonAPI::Version(2, 0); +} + +} // namespace am + +} // namespace genivi +} // namespace org + +namespace CommonAPI { + + template<> + struct BasicTypeWriter<org::genivi::am::am_Availability_e> { + inline static void writeType (CommonAPI::TypeOutputStream& typeStream) { + typeStream.writeInt32EnumType(); + } + }; + + template<> + struct InputStreamVectorHelper<org::genivi::am::am_Availability_e> { + static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::am::am_Availability_e>& vectorValue) { + inputStream.beginReadInt32EnumVector(); + } + }; + + template <> + struct OutputStreamVectorHelper<org::genivi::am::am_Availability_e> { + static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::am::am_Availability_e>& vectorValue) { + outputStream.beginWriteInt32EnumVector(vectorValue.size()); + } + }; + template<> + struct BasicTypeWriter<org::genivi::am::am_HotSink_e> { + inline static void writeType (CommonAPI::TypeOutputStream& typeStream) { + typeStream.writeInt32EnumType(); + } + }; + + template<> + struct InputStreamVectorHelper<org::genivi::am::am_HotSink_e> { + static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::am::am_HotSink_e>& vectorValue) { + inputStream.beginReadInt32EnumVector(); + } + }; + + template <> + struct OutputStreamVectorHelper<org::genivi::am::am_HotSink_e> { + static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::am::am_HotSink_e>& vectorValue) { + outputStream.beginWriteInt32EnumVector(vectorValue.size()); + } + }; + template<> + struct BasicTypeWriter<org::genivi::am::am_ConnectionState_e> { + inline static void writeType (CommonAPI::TypeOutputStream& typeStream) { + typeStream.writeInt32EnumType(); + } + }; + + template<> + struct InputStreamVectorHelper<org::genivi::am::am_ConnectionState_e> { + static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::am::am_ConnectionState_e>& vectorValue) { + inputStream.beginReadInt32EnumVector(); + } + }; + + template <> + struct OutputStreamVectorHelper<org::genivi::am::am_ConnectionState_e> { + static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::am::am_ConnectionState_e>& vectorValue) { + outputStream.beginWriteInt32EnumVector(vectorValue.size()); + } + }; + template<> + struct BasicTypeWriter<org::genivi::am::am_DomainState_e> { + inline static void writeType (CommonAPI::TypeOutputStream& typeStream) { + typeStream.writeInt32EnumType(); + } + }; + + template<> + struct InputStreamVectorHelper<org::genivi::am::am_DomainState_e> { + static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::am::am_DomainState_e>& vectorValue) { + inputStream.beginReadInt32EnumVector(); + } + }; + + template <> + struct OutputStreamVectorHelper<org::genivi::am::am_DomainState_e> { + static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::am::am_DomainState_e>& vectorValue) { + outputStream.beginWriteInt32EnumVector(vectorValue.size()); + } + }; + template<> + struct BasicTypeWriter<org::genivi::am::am_EarlyDataType_e> { + inline static void writeType (CommonAPI::TypeOutputStream& typeStream) { + typeStream.writeInt32EnumType(); + } + }; + + template<> + struct InputStreamVectorHelper<org::genivi::am::am_EarlyDataType_e> { + static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::am::am_EarlyDataType_e>& vectorValue) { + inputStream.beginReadInt32EnumVector(); + } + }; + + template <> + struct OutputStreamVectorHelper<org::genivi::am::am_EarlyDataType_e> { + static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::am::am_EarlyDataType_e>& vectorValue) { + outputStream.beginWriteInt32EnumVector(vectorValue.size()); + } + }; + template<> + struct BasicTypeWriter<org::genivi::am::am_Error_e> { + inline static void writeType (CommonAPI::TypeOutputStream& typeStream) { + typeStream.writeInt32EnumType(); + } + }; + + template<> + struct InputStreamVectorHelper<org::genivi::am::am_Error_e> { + static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::am::am_Error_e>& vectorValue) { + inputStream.beginReadInt32EnumVector(); + } + }; + + template <> + struct OutputStreamVectorHelper<org::genivi::am::am_Error_e> { + static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::am::am_Error_e>& vectorValue) { + outputStream.beginWriteInt32EnumVector(vectorValue.size()); + } + }; + template<> + struct BasicTypeWriter<org::genivi::am::am_MuteState_e> { + inline static void writeType (CommonAPI::TypeOutputStream& typeStream) { + typeStream.writeInt32EnumType(); + } + }; + + template<> + struct InputStreamVectorHelper<org::genivi::am::am_MuteState_e> { + static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::am::am_MuteState_e>& vectorValue) { + inputStream.beginReadInt32EnumVector(); + } + }; + + template <> + struct OutputStreamVectorHelper<org::genivi::am::am_MuteState_e> { + static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::am::am_MuteState_e>& vectorValue) { + outputStream.beginWriteInt32EnumVector(vectorValue.size()); + } + }; + template<> + struct BasicTypeWriter<org::genivi::am::am_InterruptState_e> { + inline static void writeType (CommonAPI::TypeOutputStream& typeStream) { + typeStream.writeInt32EnumType(); + } + }; + + template<> + struct InputStreamVectorHelper<org::genivi::am::am_InterruptState_e> { + static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::am::am_InterruptState_e>& vectorValue) { + inputStream.beginReadInt32EnumVector(); + } + }; + + template <> + struct OutputStreamVectorHelper<org::genivi::am::am_InterruptState_e> { + static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::am::am_InterruptState_e>& vectorValue) { + outputStream.beginWriteInt32EnumVector(vectorValue.size()); + } + }; + template<> + struct BasicTypeWriter<org::genivi::am::am_VolumeType_e> { + inline static void writeType (CommonAPI::TypeOutputStream& typeStream) { + typeStream.writeInt32EnumType(); + } + }; + + template<> + struct InputStreamVectorHelper<org::genivi::am::am_VolumeType_e> { + static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::am::am_VolumeType_e>& vectorValue) { + inputStream.beginReadInt32EnumVector(); + } + }; + + template <> + struct OutputStreamVectorHelper<org::genivi::am::am_VolumeType_e> { + static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::am::am_VolumeType_e>& vectorValue) { + outputStream.beginWriteInt32EnumVector(vectorValue.size()); + } + }; + template<> + struct BasicTypeWriter<org::genivi::am::am_NotificationStatus_e> { + inline static void writeType (CommonAPI::TypeOutputStream& typeStream) { + typeStream.writeInt32EnumType(); + } + }; + + template<> + struct InputStreamVectorHelper<org::genivi::am::am_NotificationStatus_e> { + static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::am::am_NotificationStatus_e>& vectorValue) { + inputStream.beginReadInt32EnumVector(); + } + }; + + template <> + struct OutputStreamVectorHelper<org::genivi::am::am_NotificationStatus_e> { + static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::am::am_NotificationStatus_e>& vectorValue) { + outputStream.beginWriteInt32EnumVector(vectorValue.size()); + } + }; + template<> + struct BasicTypeWriter<org::genivi::am::am_Handle_e> { + inline static void writeType (CommonAPI::TypeOutputStream& typeStream) { + typeStream.writeInt32EnumType(); + } + }; + + template<> + struct InputStreamVectorHelper<org::genivi::am::am_Handle_e> { + static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::am::am_Handle_e>& vectorValue) { + inputStream.beginReadInt32EnumVector(); + } + }; + + template <> + struct OutputStreamVectorHelper<org::genivi::am::am_Handle_e> { + static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::am::am_Handle_e>& vectorValue) { + outputStream.beginWriteInt32EnumVector(vectorValue.size()); + } + }; + template<> + struct BasicTypeWriter<org::genivi::am::am_SourceState_e> { + inline static void writeType (CommonAPI::TypeOutputStream& typeStream) { + typeStream.writeInt32EnumType(); + } + }; + + template<> + struct InputStreamVectorHelper<org::genivi::am::am_SourceState_e> { + static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::am::am_SourceState_e>& vectorValue) { + inputStream.beginReadInt32EnumVector(); + } + }; + + template <> + struct OutputStreamVectorHelper<org::genivi::am::am_SourceState_e> { + static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::am::am_SourceState_e>& vectorValue) { + outputStream.beginWriteInt32EnumVector(vectorValue.size()); + } + }; + template<> + struct BasicTypeWriter<org::genivi::am::am_RoutingReady_e> { + inline static void writeType (CommonAPI::TypeOutputStream& typeStream) { + typeStream.writeInt32EnumType(); + } + }; + + template<> + struct InputStreamVectorHelper<org::genivi::am::am_RoutingReady_e> { + static void beginReadVector(InputStream& inputStream, const std::vector<org::genivi::am::am_RoutingReady_e>& vectorValue) { + inputStream.beginReadInt32EnumVector(); + } + }; + + template <> + struct OutputStreamVectorHelper<org::genivi::am::am_RoutingReady_e> { + static void beginWriteVector(OutputStream& outputStream, const std::vector<org::genivi::am::am_RoutingReady_e>& vectorValue) { + outputStream.beginWriteInt32EnumVector(vectorValue.size()); + } + }; + +} + + +namespace std { + //Hash for am_Availability_e + template<> + struct hash<org::genivi::am::am_Availability_e> { + inline size_t operator()(const org::genivi::am::am_Availability_e& am_Availability_e) const { + return static_cast<int32_t>(am_Availability_e); + } + }; + //Hash for am_HotSink_e + template<> + struct hash<org::genivi::am::am_HotSink_e> { + inline size_t operator()(const org::genivi::am::am_HotSink_e& am_HotSink_e) const { + return static_cast<int32_t>(am_HotSink_e); + } + }; + //Hash for am_ConnectionState_e + template<> + struct hash<org::genivi::am::am_ConnectionState_e> { + inline size_t operator()(const org::genivi::am::am_ConnectionState_e& am_ConnectionState_e) const { + return static_cast<int32_t>(am_ConnectionState_e); + } + }; + //Hash for am_DomainState_e + template<> + struct hash<org::genivi::am::am_DomainState_e> { + inline size_t operator()(const org::genivi::am::am_DomainState_e& am_DomainState_e) const { + return static_cast<int32_t>(am_DomainState_e); + } + }; + //Hash for am_EarlyDataType_e + template<> + struct hash<org::genivi::am::am_EarlyDataType_e> { + inline size_t operator()(const org::genivi::am::am_EarlyDataType_e& am_EarlyDataType_e) const { + return static_cast<int32_t>(am_EarlyDataType_e); + } + }; + //Hash for am_Error_e + template<> + struct hash<org::genivi::am::am_Error_e> { + inline size_t operator()(const org::genivi::am::am_Error_e& am_Error_e) const { + return static_cast<int32_t>(am_Error_e); + } + }; + //Hash for am_MuteState_e + template<> + struct hash<org::genivi::am::am_MuteState_e> { + inline size_t operator()(const org::genivi::am::am_MuteState_e& am_MuteState_e) const { + return static_cast<int32_t>(am_MuteState_e); + } + }; + //Hash for am_InterruptState_e + template<> + struct hash<org::genivi::am::am_InterruptState_e> { + inline size_t operator()(const org::genivi::am::am_InterruptState_e& am_InterruptState_e) const { + return static_cast<int32_t>(am_InterruptState_e); + } + }; + //Hash for am_VolumeType_e + template<> + struct hash<org::genivi::am::am_VolumeType_e> { + inline size_t operator()(const org::genivi::am::am_VolumeType_e& am_VolumeType_e) const { + return static_cast<int32_t>(am_VolumeType_e); + } + }; + //Hash for am_NotificationStatus_e + template<> + struct hash<org::genivi::am::am_NotificationStatus_e> { + inline size_t operator()(const org::genivi::am::am_NotificationStatus_e& am_NotificationStatus_e) const { + return static_cast<int32_t>(am_NotificationStatus_e); + } + }; + //Hash for am_Handle_e + template<> + struct hash<org::genivi::am::am_Handle_e> { + inline size_t operator()(const org::genivi::am::am_Handle_e& am_Handle_e) const { + return static_cast<int32_t>(am_Handle_e); + } + }; + //Hash for am_SourceState_e + template<> + struct hash<org::genivi::am::am_SourceState_e> { + inline size_t operator()(const org::genivi::am::am_SourceState_e& am_SourceState_e) const { + return static_cast<int32_t>(am_SourceState_e); + } + }; + //Hash for am_RoutingReady_e + template<> + struct hash<org::genivi::am::am_RoutingReady_e> { + inline size_t operator()(const org::genivi::am::am_RoutingReady_e& am_RoutingReady_e) const { + return static_cast<int32_t>(am_RoutingReady_e); + } + }; +} + +#endif // ORG_GENIVI_am_H_ diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControl.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControl.h new file mode 100644 index 0000000..106e5ad --- /dev/null +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControl.h @@ -0,0 +1,67 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +/** + * The interface towards the Controlling Instance (e.g HMI). It handles the + * communication towards the HMI and other system components who need to interact + * with the audiomanagement. +There are two rules that have to be kept in mind + * when implementing against this interface: + * @author Christian Mueller + */ +#ifndef ORG_GENIVI_AM_Command_Control_H_ +#define ORG_GENIVI_AM_Command_Control_H_ + + + + +#if !defined (COMMONAPI_INTERNAL_COMPILATION) +#define COMMONAPI_INTERNAL_COMPILATION +#endif + +#include <CommonAPI/types.h> + +#undef COMMONAPI_INTERNAL_COMPILATION + +namespace org { +namespace genivi { +namespace am { + +class CommandControl { + public: + virtual ~CommandControl() { } + + static inline const char* getInterfaceId(); + static inline CommonAPI::Version getInterfaceVersion(); +}; + +const char* CommandControl::getInterfaceId() { + static const char* interfaceId = "org.genivi.am.CommandControl"; + return interfaceId; +} + +CommonAPI::Version CommandControl::getInterfaceVersion() { + return CommonAPI::Version(2, 0); +} + + +} // namespace am +} // namespace genivi +} // namespace org + +namespace CommonAPI { + +} + + +namespace std { + //hashes for types + + //hashes for error types +} + +#endif // ORG_GENIVI_AM_Command_Control_H_ diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusProxy.cpp b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusProxy.cpp new file mode 100644 index 0000000..bf46af3 --- /dev/null +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusProxy.cpp @@ -0,0 +1,651 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +/** + * The interface towards the Controlling Instance (e.g HMI). It handles the + * communication towards the HMI and other system components who need to interact + * with the audiomanagement. +There are two rules that have to be kept in mind + * when implementing against this interface: + * @author Christian Mueller + */ +#include "CommandControlDBusProxy.h" + +namespace org { +namespace genivi { +namespace am { + +std::shared_ptr<CommonAPI::DBus::DBusProxy> createCommandControlDBusProxy( + 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<CommandControlDBusProxy>(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection); +} + +INITIALIZER(registerCommandControlDBusProxy) { + CommonAPI::DBus::DBusFactory::registerProxyFactoryMethod(CommandControl::getInterfaceId(), + &createCommandControlDBusProxy); +} + +CommandControlDBusProxy::CommandControlDBusProxy( + 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) +, newMainConnection_(*this, "newMainConnection", "(qqqni)"), + removedMainConnection_(*this, "removedMainConnection", "q"), + newSink_(*this, "newSink", "(qs(iq)niq)"), + removedSink_(*this, "removedSink", "q"), + newSource_(*this, "newSource", "(qs(iq)q)"), + removedSource_(*this, "removedSource", "q"), + numberOfSinkClassesChanged_(*this, "numberOfSinkClassesChanged", ""), + numberOfSourceClassesChanged_(*this, "numberOfSourceClassesChanged", ""), + mainConnectionStateChanged_(*this, "mainConnectionStateChanged", "qi"), + mainSinkSoundPropertyChanged_(*this, "mainSinkSoundPropertyChanged", "q(qn)"), + mainSourceSoundPropertyChanged_(*this, "mainSourceSoundPropertyChanged", "q(qn)"), + sinkAvailabilityChanged_(*this, "sinkAvailabilityChanged", "q(iq)"), + sourceAvailabilityChanged_(*this, "sourceAvailabilityChanged", "q(iq)"), + volumeChanged_(*this, "volumeChanged", "qn"), + sinkMuteStateChanged_(*this, "sinkMuteStateChanged", "qi"), + systemPropertyChanged_(*this, "systemPropertyChanged", "(qn)"), + timingInformationChanged_(*this, "timingInformationChanged", "qn"), + sinkUpdated_(*this, "sinkUpdated", "qqa(qn)"), + sourceUpdated_(*this, "sourceUpdated", "qqa(qn)"), + sinkNotification_(*this, "sinkNotification", "q(qn)"), + sourceNotification_(*this, "sourceNotification", "q(qn)"), + mainSinkNotificationConfigurationChanged_(*this, "mainSinkNotificationConfigurationChanged", "q(qin)"), + mainSourceNotificationConfigurationChanged_(*this, "mainSourceNotificationConfigurationChanged", "q(qin)") + { + } + + +CommandControlDBusProxy::NewMainConnectionEvent& CommandControlDBusProxy::getNewMainConnectionEvent() { + return newMainConnection_; +} +CommandControlDBusProxy::RemovedMainConnectionEvent& CommandControlDBusProxy::getRemovedMainConnectionEvent() { + return removedMainConnection_; +} +CommandControlDBusProxy::NewSinkEvent& CommandControlDBusProxy::getNewSinkEvent() { + return newSink_; +} +CommandControlDBusProxy::RemovedSinkEvent& CommandControlDBusProxy::getRemovedSinkEvent() { + return removedSink_; +} +CommandControlDBusProxy::NewSourceEvent& CommandControlDBusProxy::getNewSourceEvent() { + return newSource_; +} +CommandControlDBusProxy::RemovedSourceEvent& CommandControlDBusProxy::getRemovedSourceEvent() { + return removedSource_; +} +CommandControlDBusProxy::NumberOfSinkClassesChangedEvent& CommandControlDBusProxy::getNumberOfSinkClassesChangedEvent() { + return numberOfSinkClassesChanged_; +} +CommandControlDBusProxy::NumberOfSourceClassesChangedEvent& CommandControlDBusProxy::getNumberOfSourceClassesChangedEvent() { + return numberOfSourceClassesChanged_; +} +CommandControlDBusProxy::MainConnectionStateChangedEvent& CommandControlDBusProxy::getMainConnectionStateChangedEvent() { + return mainConnectionStateChanged_; +} +CommandControlDBusProxy::MainSinkSoundPropertyChangedEvent& CommandControlDBusProxy::getMainSinkSoundPropertyChangedEvent() { + return mainSinkSoundPropertyChanged_; +} +CommandControlDBusProxy::MainSourceSoundPropertyChangedEvent& CommandControlDBusProxy::getMainSourceSoundPropertyChangedEvent() { + return mainSourceSoundPropertyChanged_; +} +CommandControlDBusProxy::SinkAvailabilityChangedEvent& CommandControlDBusProxy::getSinkAvailabilityChangedEvent() { + return sinkAvailabilityChanged_; +} +CommandControlDBusProxy::SourceAvailabilityChangedEvent& CommandControlDBusProxy::getSourceAvailabilityChangedEvent() { + return sourceAvailabilityChanged_; +} +CommandControlDBusProxy::VolumeChangedEvent& CommandControlDBusProxy::getVolumeChangedEvent() { + return volumeChanged_; +} +CommandControlDBusProxy::SinkMuteStateChangedEvent& CommandControlDBusProxy::getSinkMuteStateChangedEvent() { + return sinkMuteStateChanged_; +} +CommandControlDBusProxy::SystemPropertyChangedEvent& CommandControlDBusProxy::getSystemPropertyChangedEvent() { + return systemPropertyChanged_; +} +CommandControlDBusProxy::TimingInformationChangedEvent& CommandControlDBusProxy::getTimingInformationChangedEvent() { + return timingInformationChanged_; +} +CommandControlDBusProxy::SinkUpdatedEvent& CommandControlDBusProxy::getSinkUpdatedEvent() { + return sinkUpdated_; +} +CommandControlDBusProxy::SourceUpdatedEvent& CommandControlDBusProxy::getSourceUpdatedEvent() { + return sourceUpdated_; +} +CommandControlDBusProxy::SinkNotificationEvent& CommandControlDBusProxy::getSinkNotificationEvent() { + return sinkNotification_; +} +CommandControlDBusProxy::SourceNotificationEvent& CommandControlDBusProxy::getSourceNotificationEvent() { + return sourceNotification_; +} +CommandControlDBusProxy::MainSinkNotificationConfigurationChangedEvent& CommandControlDBusProxy::getMainSinkNotificationConfigurationChangedEvent() { + return mainSinkNotificationConfigurationChanged_; +} +CommandControlDBusProxy::MainSourceNotificationConfigurationChangedEvent& CommandControlDBusProxy::getMainSourceNotificationConfigurationChangedEvent() { + return mainSourceNotificationConfigurationChanged_; +} + +/** + * connects a source to sink +(at)return E_OK on success, E_NOT_POSSIBLE on + * failure, E_ALREADY_EXISTS if the connection does already exists + */ +void CommandControlDBusProxy::connect(const am_sourceID_t& sourceID, const am_sinkID_t& sinkID, CommonAPI::CallStatus& callStatus, am_mainConnectionID_t& mainConnectionID, am_Error_e& error) { + CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_sourceID_t, am_sinkID_t>, + CommonAPI::DBus::DBusSerializableArguments<am_mainConnectionID_t, am_Error_e> >::callMethodWithReply( + *this, + "connect", + "qq", + sourceID, sinkID, + callStatus + , mainConnectionID, error); +} +std::future<CommonAPI::CallStatus> CommandControlDBusProxy::connectAsync(const am_sourceID_t& sourceID, const am_sinkID_t& sinkID, ConnectAsyncCallback callback) { + return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_sourceID_t, am_sinkID_t>, + CommonAPI::DBus::DBusSerializableArguments<am_mainConnectionID_t, am_Error_e> >::callMethodAsync( + *this, + "connect", + "qq", + sourceID, sinkID, + std::move(callback)); +} +/** + * disconnects a mainConnection +(at)return E_OK on successes, E_NON_EXISTENT if + * the connection does not exist, E_NOT_POSSIBLE on error. + */ +void CommandControlDBusProxy::disconnect(const am_mainConnectionID_t& mainConnectionID, CommonAPI::CallStatus& callStatus, am_Error_e& error) { + CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_mainConnectionID_t>, + CommonAPI::DBus::DBusSerializableArguments<am_Error_e> >::callMethodWithReply( + *this, + "disconnect", + "q", + mainConnectionID, + callStatus + , error); +} +std::future<CommonAPI::CallStatus> CommandControlDBusProxy::disconnectAsync(const am_mainConnectionID_t& mainConnectionID, DisconnectAsyncCallback callback) { + return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_mainConnectionID_t>, + CommonAPI::DBus::DBusSerializableArguments<am_Error_e> >::callMethodAsync( + *this, + "disconnect", + "q", + mainConnectionID, + std::move(callback)); +} +/** + * sets the volume for a sink +(at)return E_OK on success, E_UNKOWN on error, + * E_OUT_OF_RANGE in case the value is out of range + */ +void CommandControlDBusProxy::setVolume(const am_sinkID_t& sinkID, const am_mainVolume_t& volume, CommonAPI::CallStatus& callStatus, am_Error_e& error) { + CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_sinkID_t, am_mainVolume_t>, + CommonAPI::DBus::DBusSerializableArguments<am_Error_e> >::callMethodWithReply( + *this, + "setVolume", + "qn", + sinkID, volume, + callStatus + , error); +} +std::future<CommonAPI::CallStatus> CommandControlDBusProxy::setVolumeAsync(const am_sinkID_t& sinkID, const am_mainVolume_t& volume, SetVolumeAsyncCallback callback) { + return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_sinkID_t, am_mainVolume_t>, + CommonAPI::DBus::DBusSerializableArguments<am_Error_e> >::callMethodAsync( + *this, + "setVolume", + "qn", + sinkID, volume, + std::move(callback)); +} +/** + * This function is used to increment or decrement the current volume for a + * sink. +(at)return E_OK on success, E_UNKNOWN on error and E_OUT_OF_RANGE if the + * value is not in the given volume range. + */ +void CommandControlDBusProxy::volumeStep(const am_sinkID_t& sinkID, const int16_t& volStep, CommonAPI::CallStatus& callStatus, am_Error_e& error) { + CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_sinkID_t, int16_t>, + CommonAPI::DBus::DBusSerializableArguments<am_Error_e> >::callMethodWithReply( + *this, + "volumeStep", + "qn", + sinkID, volStep, + callStatus + , error); +} +std::future<CommonAPI::CallStatus> CommandControlDBusProxy::volumeStepAsync(const am_sinkID_t& sinkID, const int16_t& volStep, VolumeStepAsyncCallback callback) { + return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_sinkID_t, int16_t>, + CommonAPI::DBus::DBusSerializableArguments<am_Error_e> >::callMethodAsync( + *this, + "volumeStep", + "qn", + sinkID, volStep, + std::move(callback)); +} +/** + * sets the mute state of a sink +(at)return E_OK on success, E_UNKNOWN on error. + * If the mute state is already the desired one, the Daemon will return E_OK. + */ +void CommandControlDBusProxy::setSinkMuteState(const am_sinkID_t& sinkID, const am_MuteState_e& muteState, CommonAPI::CallStatus& callStatus, am_Error_e& error) { + CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_sinkID_t, am_MuteState_e>, + CommonAPI::DBus::DBusSerializableArguments<am_Error_e> >::callMethodWithReply( + *this, + "setSinkMuteState", + "qi", + sinkID, muteState, + callStatus + , error); +} +std::future<CommonAPI::CallStatus> CommandControlDBusProxy::setSinkMuteStateAsync(const am_sinkID_t& sinkID, const am_MuteState_e& muteState, SetSinkMuteStateAsyncCallback callback) { + return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_sinkID_t, am_MuteState_e>, + CommonAPI::DBus::DBusSerializableArguments<am_Error_e> >::callMethodAsync( + *this, + "setSinkMuteState", + "qi", + sinkID, muteState, + std::move(callback)); +} +/** + * This method is used to set sound properties, e.g. Equalizer Values. Since the + * capabilities of the system can differ, the exact key value pairs can be + * extended in each product +(at)return E_OK on success, E_OUT_OF_RANGE if value + * exceeds range, E_UNKNOWN in case of an error + */ +void CommandControlDBusProxy::setMainSinkSoundProperty(const am_sinkID_t& sinkID, const am_MainSoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus, am_Error_e& error) { + CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_sinkID_t, am_MainSoundProperty_s>, + CommonAPI::DBus::DBusSerializableArguments<am_Error_e> >::callMethodWithReply( + *this, + "setMainSinkSoundProperty", + "q(qn)", + sinkID, soundProperty, + callStatus + , error); +} +std::future<CommonAPI::CallStatus> CommandControlDBusProxy::setMainSinkSoundPropertyAsync(const am_sinkID_t& sinkID, const am_MainSoundProperty_s& soundProperty, SetMainSinkSoundPropertyAsyncCallback callback) { + return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_sinkID_t, am_MainSoundProperty_s>, + CommonAPI::DBus::DBusSerializableArguments<am_Error_e> >::callMethodAsync( + *this, + "setMainSinkSoundProperty", + "q(qn)", + sinkID, soundProperty, + std::move(callback)); +} +/** + * This method is used to set sound properties, e.g. Equalizer Values. Since the + * capabilities of the system can differ, the exact key value pairs can be + * extended in each product +(at)return E_OK on success, E_OUT_OF_RANGE if value + * exceeds range, E_UNKNOWN in case of an error + */ +void CommandControlDBusProxy::setMainSourceSoundProperty(const am_sourceID_t& sourceID, const am_MainSoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus, am_Error_e& error) { + CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_sourceID_t, am_MainSoundProperty_s>, + CommonAPI::DBus::DBusSerializableArguments<am_Error_e> >::callMethodWithReply( + *this, + "setMainSourceSoundProperty", + "q(qn)", + sourceID, soundProperty, + callStatus + , error); +} +std::future<CommonAPI::CallStatus> CommandControlDBusProxy::setMainSourceSoundPropertyAsync(const am_sourceID_t& sourceID, const am_MainSoundProperty_s& soundProperty, SetMainSourceSoundPropertyAsyncCallback callback) { + return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_sourceID_t, am_MainSoundProperty_s>, + CommonAPI::DBus::DBusSerializableArguments<am_Error_e> >::callMethodAsync( + *this, + "setMainSourceSoundProperty", + "q(qn)", + sourceID, soundProperty, + std::move(callback)); +} +/** + * is used to set a specific system property. +(at)return E_OK on success, + * E_OUT_OF_RANGE if value exceeds range, E_UNKNOWN in case of an error + */ +void CommandControlDBusProxy::setSystemProperty(const am_SystemProperty_s& property, CommonAPI::CallStatus& callStatus, am_Error_e& error) { + CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_SystemProperty_s>, + CommonAPI::DBus::DBusSerializableArguments<am_Error_e> >::callMethodWithReply( + *this, + "setSystemProperty", + "(qn)", + property, + callStatus + , error); +} +std::future<CommonAPI::CallStatus> CommandControlDBusProxy::setSystemPropertyAsync(const am_SystemProperty_s& property, SetSystemPropertyAsyncCallback callback) { + return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_SystemProperty_s>, + CommonAPI::DBus::DBusSerializableArguments<am_Error_e> >::callMethodAsync( + *this, + "setSystemProperty", + "(qn)", + property, + std::move(callback)); +} +/** + * returns the actual list of MainConnections +(at)return E_OK on success, + * E_DATABASE_ERROR on error + */ +void CommandControlDBusProxy::getListMainConnections(CommonAPI::CallStatus& callStatus, am_MainConnection_L& listConnections, am_Error_e& error) { + CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>, + CommonAPI::DBus::DBusSerializableArguments<am_MainConnection_L, am_Error_e> >::callMethodWithReply( + *this, + "getListMainConnections", + "", + callStatus + , listConnections, error); +} +std::future<CommonAPI::CallStatus> CommandControlDBusProxy::getListMainConnectionsAsync(GetListMainConnectionsAsyncCallback callback) { + return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>, + CommonAPI::DBus::DBusSerializableArguments<am_MainConnection_L, am_Error_e> >::callMethodAsync( + *this, + "getListMainConnections", + "", + std::move(callback)); +} +/** + * returns the actual list of Sinks +(at)return E_OK on success, E_DATABASE_ERROR + * on error + */ +void CommandControlDBusProxy::getListMainSinks(CommonAPI::CallStatus& callStatus, am_SinkType_L& listMainSinks, am_Error_e& error) { + CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>, + CommonAPI::DBus::DBusSerializableArguments<am_SinkType_L, am_Error_e> >::callMethodWithReply( + *this, + "getListMainSinks", + "", + callStatus + , listMainSinks, error); +} +std::future<CommonAPI::CallStatus> CommandControlDBusProxy::getListMainSinksAsync(GetListMainSinksAsyncCallback callback) { + return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>, + CommonAPI::DBus::DBusSerializableArguments<am_SinkType_L, am_Error_e> >::callMethodAsync( + *this, + "getListMainSinks", + "", + std::move(callback)); +} +/** + * returns the actual list of Sources +(at)return E_OK on success, E_DATABASE_ERROR + * on error + */ +void CommandControlDBusProxy::getListMainSources(CommonAPI::CallStatus& callStatus, am_SourceType_L& listMainSources, am_Error_e& error) { + CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>, + CommonAPI::DBus::DBusSerializableArguments<am_SourceType_L, am_Error_e> >::callMethodWithReply( + *this, + "getListMainSources", + "", + callStatus + , listMainSources, error); +} +std::future<CommonAPI::CallStatus> CommandControlDBusProxy::getListMainSourcesAsync(GetListMainSourcesAsyncCallback callback) { + return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>, + CommonAPI::DBus::DBusSerializableArguments<am_SourceType_L, am_Error_e> >::callMethodAsync( + *this, + "getListMainSources", + "", + std::move(callback)); +} +/** + * This is used to retrieve all source sound properties related to a source. + * Returns a vector of the sound properties and values as pair +(at)return E_OK on + * success, E_DATABASE_ERROR on error + */ +void CommandControlDBusProxy::getListMainSinkSoundProperties(const am_sinkID_t& sinkID, CommonAPI::CallStatus& callStatus, am_MainSoundProperty_L& listSoundProperties, am_Error_e& error) { + CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_sinkID_t>, + CommonAPI::DBus::DBusSerializableArguments<am_MainSoundProperty_L, am_Error_e> >::callMethodWithReply( + *this, + "getListMainSinkSoundProperties", + "q", + sinkID, + callStatus + , listSoundProperties, error); +} +std::future<CommonAPI::CallStatus> CommandControlDBusProxy::getListMainSinkSoundPropertiesAsync(const am_sinkID_t& sinkID, GetListMainSinkSoundPropertiesAsyncCallback callback) { + return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_sinkID_t>, + CommonAPI::DBus::DBusSerializableArguments<am_MainSoundProperty_L, am_Error_e> >::callMethodAsync( + *this, + "getListMainSinkSoundProperties", + "q", + sinkID, + std::move(callback)); +} +/** + * This is used to retrieve all source sound properties related to a + * source. +(at)return E_OK on success, E_DATABASE_ERROR on error + */ +void CommandControlDBusProxy::getListMainSourceSoundProperties(const am_sourceID_t& sourceID, CommonAPI::CallStatus& callStatus, am_MainSoundProperty_L& listSourceProperties, am_Error_e& error) { + CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_sourceID_t>, + CommonAPI::DBus::DBusSerializableArguments<am_MainSoundProperty_L, am_Error_e> >::callMethodWithReply( + *this, + "getListMainSourceSoundProperties", + "q", + sourceID, + callStatus + , listSourceProperties, error); +} +std::future<CommonAPI::CallStatus> CommandControlDBusProxy::getListMainSourceSoundPropertiesAsync(const am_sourceID_t& sourceID, GetListMainSourceSoundPropertiesAsyncCallback callback) { + return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_sourceID_t>, + CommonAPI::DBus::DBusSerializableArguments<am_MainSoundProperty_L, am_Error_e> >::callMethodAsync( + *this, + "getListMainSourceSoundProperties", + "q", + sourceID, + std::move(callback)); +} +/** + * This is used to retrieve SourceClass Information of all source classes + * +(at)return E_OK on success, E_DATABASE_ERROR on error + */ +void CommandControlDBusProxy::getListSourceClasses(CommonAPI::CallStatus& callStatus, am_SourceClass_L& listSourceClasses, am_Error_e& error) { + CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>, + CommonAPI::DBus::DBusSerializableArguments<am_SourceClass_L, am_Error_e> >::callMethodWithReply( + *this, + "getListSourceClasses", + "", + callStatus + , listSourceClasses, error); +} +std::future<CommonAPI::CallStatus> CommandControlDBusProxy::getListSourceClassesAsync(GetListSourceClassesAsyncCallback callback) { + return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>, + CommonAPI::DBus::DBusSerializableArguments<am_SourceClass_L, am_Error_e> >::callMethodAsync( + *this, + "getListSourceClasses", + "", + std::move(callback)); +} +/** + * This is used to retrieve SinkClass Information of all sink classes +(at)return + * E_OK on success, E_DATABASE_ERROR on error + */ +void CommandControlDBusProxy::getListSinkClasses(CommonAPI::CallStatus& callStatus, am_SinkClass_L& listSinkClasses, am_Error_e& error) { + CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>, + CommonAPI::DBus::DBusSerializableArguments<am_SinkClass_L, am_Error_e> >::callMethodWithReply( + *this, + "getListSinkClasses", + "", + callStatus + , listSinkClasses, error); +} +std::future<CommonAPI::CallStatus> CommandControlDBusProxy::getListSinkClassesAsync(GetListSinkClassesAsyncCallback callback) { + return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>, + CommonAPI::DBus::DBusSerializableArguments<am_SinkClass_L, am_Error_e> >::callMethodAsync( + *this, + "getListSinkClasses", + "", + std::move(callback)); +} +/** + * Retrieves a complete list of all systemProperties. +(at)return E_OK on success, + * E_DATABASE_ERROR on error + */ +void CommandControlDBusProxy::getListSystemProperties(CommonAPI::CallStatus& callStatus, am_SystemProperty_L& listSystemProperties, am_Error_e& error) { + CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>, + CommonAPI::DBus::DBusSerializableArguments<am_SystemProperty_L, am_Error_e> >::callMethodWithReply( + *this, + "getListSystemProperties", + "", + callStatus + , listSystemProperties, error); +} +std::future<CommonAPI::CallStatus> CommandControlDBusProxy::getListSystemPropertiesAsync(GetListSystemPropertiesAsyncCallback callback) { + return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>, + CommonAPI::DBus::DBusSerializableArguments<am_SystemProperty_L, am_Error_e> >::callMethodAsync( + *this, + "getListSystemProperties", + "", + std::move(callback)); +} +/** + * returns the delay in ms that the audiopath for the given mainConnection + * has +(at)return E_OK on success, E_NOT_POSSIBLE if timing information is not + * yet retrieved, E_DATABASE_ERROR on read error on the database + */ +void CommandControlDBusProxy::getTimingInformation(const am_mainConnectionID_t& mainConnectionID, CommonAPI::CallStatus& callStatus, am_timeSync_t& delay, am_Error_e& error) { + CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_mainConnectionID_t>, + CommonAPI::DBus::DBusSerializableArguments<am_timeSync_t, am_Error_e> >::callMethodWithReply( + *this, + "getTimingInformation", + "q", + mainConnectionID, + callStatus + , delay, error); +} +std::future<CommonAPI::CallStatus> CommandControlDBusProxy::getTimingInformationAsync(const am_mainConnectionID_t& mainConnectionID, GetTimingInformationAsyncCallback callback) { + return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_mainConnectionID_t>, + CommonAPI::DBus::DBusSerializableArguments<am_timeSync_t, am_Error_e> >::callMethodAsync( + *this, + "getTimingInformation", + "q", + mainConnectionID, + std::move(callback)); +} +/** + * Retrieves the list of MainNotifications for a sink. Does not return the + * possible ones. + */ +void CommandControlDBusProxy::getListMainSinkNotificationConfigurations(const am_sinkID_t& sinkID, CommonAPI::CallStatus& callStatus, am_NotificationConfiguration_L& listMainNotificationConfigurations, am_Error_e& error) { + CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_sinkID_t>, + CommonAPI::DBus::DBusSerializableArguments<am_NotificationConfiguration_L, am_Error_e> >::callMethodWithReply( + *this, + "getListMainSinkNotificationConfigurations", + "q", + sinkID, + callStatus + , listMainNotificationConfigurations, error); +} +std::future<CommonAPI::CallStatus> CommandControlDBusProxy::getListMainSinkNotificationConfigurationsAsync(const am_sinkID_t& sinkID, GetListMainSinkNotificationConfigurationsAsyncCallback callback) { + return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_sinkID_t>, + CommonAPI::DBus::DBusSerializableArguments<am_NotificationConfiguration_L, am_Error_e> >::callMethodAsync( + *this, + "getListMainSinkNotificationConfigurations", + "q", + sinkID, + std::move(callback)); +} +/** + * Retrieves the list of MainNotifications for a source. Does not return the + * possible ones. + */ +void CommandControlDBusProxy::getListMainSourceNotificationConfigurations(const am_sourceID_t& sourceID, CommonAPI::CallStatus& callStatus, am_NotificationConfiguration_L& listMainNotificationConfigurations, am_Error_e& error) { + CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_sourceID_t>, + CommonAPI::DBus::DBusSerializableArguments<am_NotificationConfiguration_L, am_Error_e> >::callMethodWithReply( + *this, + "getListMainSourceNotificationConfigurations", + "q", + sourceID, + callStatus + , listMainNotificationConfigurations, error); +} +std::future<CommonAPI::CallStatus> CommandControlDBusProxy::getListMainSourceNotificationConfigurationsAsync(const am_sourceID_t& sourceID, GetListMainSourceNotificationConfigurationsAsyncCallback callback) { + return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_sourceID_t>, + CommonAPI::DBus::DBusSerializableArguments<am_NotificationConfiguration_L, am_Error_e> >::callMethodAsync( + *this, + "getListMainSourceNotificationConfigurations", + "q", + sourceID, + std::move(callback)); +} +/** + * sets a MainNotificationConfiuration. This can be used to turn on an off + * notifications an to change the mode of the configuration. +(at)return E_OK on + * success, E_NON_EXISTENT if sinkID does not exists, E_DATABASE_ERROR on error + */ +void CommandControlDBusProxy::setMainSinkNotificationConfiguration(const am_sinkID_t& sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration, CommonAPI::CallStatus& callStatus, am_Error_e& error) { + CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_sinkID_t, am_NotificationConfiguration_s>, + CommonAPI::DBus::DBusSerializableArguments<am_Error_e> >::callMethodWithReply( + *this, + "setMainSinkNotificationConfiguration", + "q(qin)", + sinkID, mainNotificationConfiguration, + callStatus + , error); +} +std::future<CommonAPI::CallStatus> CommandControlDBusProxy::setMainSinkNotificationConfigurationAsync(const am_sinkID_t& sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration, SetMainSinkNotificationConfigurationAsyncCallback callback) { + return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_sinkID_t, am_NotificationConfiguration_s>, + CommonAPI::DBus::DBusSerializableArguments<am_Error_e> >::callMethodAsync( + *this, + "setMainSinkNotificationConfiguration", + "q(qin)", + sinkID, mainNotificationConfiguration, + std::move(callback)); +} +/** + * sets a MainNotificationConfiuration. This can be used to turn on an off + * notifications an to change the mode of the configuration. +(at)return E_OK on + * success, E_NON_EXISTENT if sourceID does not exists, E_DATABASE_ERROR on error + */ +void CommandControlDBusProxy::setMainSourceNotificationConfiguration(const am_sourceID_t& sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration, CommonAPI::CallStatus& callStatus, am_Error_e& error) { + CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_sourceID_t, am_NotificationConfiguration_s>, + CommonAPI::DBus::DBusSerializableArguments<am_Error_e> >::callMethodWithReply( + *this, + "setMainSourceNotificationConfiguration", + "q(qin)", + sourceID, mainNotificationConfiguration, + callStatus + , error); +} +std::future<CommonAPI::CallStatus> CommandControlDBusProxy::setMainSourceNotificationConfigurationAsync(const am_sourceID_t& sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration, SetMainSourceNotificationConfigurationAsyncCallback callback) { + return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<am_sourceID_t, am_NotificationConfiguration_s>, + CommonAPI::DBus::DBusSerializableArguments<am_Error_e> >::callMethodAsync( + *this, + "setMainSourceNotificationConfiguration", + "q(qin)", + sourceID, mainNotificationConfiguration, + std::move(callback)); +} + + + +void CommandControlDBusProxy::getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const { + ownVersionMajor = 2; + ownVersionMinor = 0; +} + +} // namespace am +} // namespace genivi +} // namespace org diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusProxy.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusProxy.h new file mode 100644 index 0000000..c2a53ca --- /dev/null +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusProxy.h @@ -0,0 +1,266 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +/** + * The interface towards the Controlling Instance (e.g HMI). It handles the + * communication towards the HMI and other system components who need to interact + * with the audiomanagement. +There are two rules that have to be kept in mind + * when implementing against this interface: + * @author Christian Mueller + */ +#ifndef ORG_GENIVI_AM_Command_Control_DBUS_PROXY_H_ +#define ORG_GENIVI_AM_Command_Control_DBUS_PROXY_H_ + +#include <org/genivi/am/CommandControlProxyBase.h> + +#if !defined (COMMONAPI_INTERNAL_COMPILATION) +#define COMMONAPI_INTERNAL_COMPILATION +#endif + +#include <CommonAPI/DBus/DBusFactory.h> +#include <CommonAPI/DBus/DBusProxy.h> +#include <CommonAPI/DBus/DBusEvent.h> + +#undef COMMONAPI_INTERNAL_COMPILATION + +#include <string> + +namespace org { +namespace genivi { +namespace am { + +class CommandControlDBusProxy: virtual public CommandControlProxyBase, virtual public CommonAPI::DBus::DBusProxy { + public: + CommandControlDBusProxy( + 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 ~CommandControlDBusProxy() { } + + + virtual NewMainConnectionEvent& getNewMainConnectionEvent(); + virtual RemovedMainConnectionEvent& getRemovedMainConnectionEvent(); + virtual NewSinkEvent& getNewSinkEvent(); + virtual RemovedSinkEvent& getRemovedSinkEvent(); + virtual NewSourceEvent& getNewSourceEvent(); + virtual RemovedSourceEvent& getRemovedSourceEvent(); + virtual NumberOfSinkClassesChangedEvent& getNumberOfSinkClassesChangedEvent(); + virtual NumberOfSourceClassesChangedEvent& getNumberOfSourceClassesChangedEvent(); + virtual MainConnectionStateChangedEvent& getMainConnectionStateChangedEvent(); + virtual MainSinkSoundPropertyChangedEvent& getMainSinkSoundPropertyChangedEvent(); + virtual MainSourceSoundPropertyChangedEvent& getMainSourceSoundPropertyChangedEvent(); + virtual SinkAvailabilityChangedEvent& getSinkAvailabilityChangedEvent(); + virtual SourceAvailabilityChangedEvent& getSourceAvailabilityChangedEvent(); + virtual VolumeChangedEvent& getVolumeChangedEvent(); + virtual SinkMuteStateChangedEvent& getSinkMuteStateChangedEvent(); + virtual SystemPropertyChangedEvent& getSystemPropertyChangedEvent(); + virtual TimingInformationChangedEvent& getTimingInformationChangedEvent(); + virtual SinkUpdatedEvent& getSinkUpdatedEvent(); + virtual SourceUpdatedEvent& getSourceUpdatedEvent(); + virtual SinkNotificationEvent& getSinkNotificationEvent(); + virtual SourceNotificationEvent& getSourceNotificationEvent(); + virtual MainSinkNotificationConfigurationChangedEvent& getMainSinkNotificationConfigurationChangedEvent(); + virtual MainSourceNotificationConfigurationChangedEvent& getMainSourceNotificationConfigurationChangedEvent(); + + /** + * connects a source to sink + (at)return E_OK on success, E_NOT_POSSIBLE on + * failure, E_ALREADY_EXISTS if the connection does already exists + */ + virtual void connect(const am_sourceID_t& sourceID, const am_sinkID_t& sinkID, CommonAPI::CallStatus& callStatus, am_mainConnectionID_t& mainConnectionID, am_Error_e& error); + virtual std::future<CommonAPI::CallStatus> connectAsync(const am_sourceID_t& sourceID, const am_sinkID_t& sinkID, ConnectAsyncCallback callback); + /** + * disconnects a mainConnection + (at)return E_OK on successes, E_NON_EXISTENT if + * the connection does not exist, E_NOT_POSSIBLE on error. + */ + virtual void disconnect(const am_mainConnectionID_t& mainConnectionID, CommonAPI::CallStatus& callStatus, am_Error_e& error); + virtual std::future<CommonAPI::CallStatus> disconnectAsync(const am_mainConnectionID_t& mainConnectionID, DisconnectAsyncCallback callback); + /** + * sets the volume for a sink + (at)return E_OK on success, E_UNKOWN on error, + * E_OUT_OF_RANGE in case the value is out of range + */ + virtual void setVolume(const am_sinkID_t& sinkID, const am_mainVolume_t& volume, CommonAPI::CallStatus& callStatus, am_Error_e& error); + virtual std::future<CommonAPI::CallStatus> setVolumeAsync(const am_sinkID_t& sinkID, const am_mainVolume_t& volume, SetVolumeAsyncCallback callback); + /** + * This function is used to increment or decrement the current volume for a + * sink. + (at)return E_OK on success, E_UNKNOWN on error and E_OUT_OF_RANGE if the + * value is not in the given volume range. + */ + virtual void volumeStep(const am_sinkID_t& sinkID, const int16_t& volStep, CommonAPI::CallStatus& callStatus, am_Error_e& error); + virtual std::future<CommonAPI::CallStatus> volumeStepAsync(const am_sinkID_t& sinkID, const int16_t& volStep, VolumeStepAsyncCallback callback); + /** + * sets the mute state of a sink + (at)return E_OK on success, E_UNKNOWN on error. + * If the mute state is already the desired one, the Daemon will return E_OK. + */ + virtual void setSinkMuteState(const am_sinkID_t& sinkID, const am_MuteState_e& muteState, CommonAPI::CallStatus& callStatus, am_Error_e& error); + virtual std::future<CommonAPI::CallStatus> setSinkMuteStateAsync(const am_sinkID_t& sinkID, const am_MuteState_e& muteState, SetSinkMuteStateAsyncCallback callback); + /** + * This method is used to set sound properties, e.g. Equalizer Values. Since the + * capabilities of the system can differ, the exact key value pairs can be + * extended in each product + (at)return E_OK on success, E_OUT_OF_RANGE if value + * exceeds range, E_UNKNOWN in case of an error + */ + virtual void setMainSinkSoundProperty(const am_sinkID_t& sinkID, const am_MainSoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus, am_Error_e& error); + virtual std::future<CommonAPI::CallStatus> setMainSinkSoundPropertyAsync(const am_sinkID_t& sinkID, const am_MainSoundProperty_s& soundProperty, SetMainSinkSoundPropertyAsyncCallback callback); + /** + * This method is used to set sound properties, e.g. Equalizer Values. Since the + * capabilities of the system can differ, the exact key value pairs can be + * extended in each product + (at)return E_OK on success, E_OUT_OF_RANGE if value + * exceeds range, E_UNKNOWN in case of an error + */ + virtual void setMainSourceSoundProperty(const am_sourceID_t& sourceID, const am_MainSoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus, am_Error_e& error); + virtual std::future<CommonAPI::CallStatus> setMainSourceSoundPropertyAsync(const am_sourceID_t& sourceID, const am_MainSoundProperty_s& soundProperty, SetMainSourceSoundPropertyAsyncCallback callback); + /** + * is used to set a specific system property. + (at)return E_OK on success, + * E_OUT_OF_RANGE if value exceeds range, E_UNKNOWN in case of an error + */ + virtual void setSystemProperty(const am_SystemProperty_s& property, CommonAPI::CallStatus& callStatus, am_Error_e& error); + virtual std::future<CommonAPI::CallStatus> setSystemPropertyAsync(const am_SystemProperty_s& property, SetSystemPropertyAsyncCallback callback); + /** + * returns the actual list of MainConnections + (at)return E_OK on success, + * E_DATABASE_ERROR on error + */ + virtual void getListMainConnections(CommonAPI::CallStatus& callStatus, am_MainConnection_L& listConnections, am_Error_e& error); + virtual std::future<CommonAPI::CallStatus> getListMainConnectionsAsync(GetListMainConnectionsAsyncCallback callback); + /** + * returns the actual list of Sinks + (at)return E_OK on success, E_DATABASE_ERROR + * on error + */ + virtual void getListMainSinks(CommonAPI::CallStatus& callStatus, am_SinkType_L& listMainSinks, am_Error_e& error); + virtual std::future<CommonAPI::CallStatus> getListMainSinksAsync(GetListMainSinksAsyncCallback callback); + /** + * returns the actual list of Sources + (at)return E_OK on success, E_DATABASE_ERROR + * on error + */ + virtual void getListMainSources(CommonAPI::CallStatus& callStatus, am_SourceType_L& listMainSources, am_Error_e& error); + virtual std::future<CommonAPI::CallStatus> getListMainSourcesAsync(GetListMainSourcesAsyncCallback callback); + /** + * This is used to retrieve all source sound properties related to a source. + * Returns a vector of the sound properties and values as pair + (at)return E_OK on + * success, E_DATABASE_ERROR on error + */ + virtual void getListMainSinkSoundProperties(const am_sinkID_t& sinkID, CommonAPI::CallStatus& callStatus, am_MainSoundProperty_L& listSoundProperties, am_Error_e& error); + virtual std::future<CommonAPI::CallStatus> getListMainSinkSoundPropertiesAsync(const am_sinkID_t& sinkID, GetListMainSinkSoundPropertiesAsyncCallback callback); + /** + * This is used to retrieve all source sound properties related to a + * source. + (at)return E_OK on success, E_DATABASE_ERROR on error + */ + virtual void getListMainSourceSoundProperties(const am_sourceID_t& sourceID, CommonAPI::CallStatus& callStatus, am_MainSoundProperty_L& listSourceProperties, am_Error_e& error); + virtual std::future<CommonAPI::CallStatus> getListMainSourceSoundPropertiesAsync(const am_sourceID_t& sourceID, GetListMainSourceSoundPropertiesAsyncCallback callback); + /** + * This is used to retrieve SourceClass Information of all source classes + * + (at)return E_OK on success, E_DATABASE_ERROR on error + */ + virtual void getListSourceClasses(CommonAPI::CallStatus& callStatus, am_SourceClass_L& listSourceClasses, am_Error_e& error); + virtual std::future<CommonAPI::CallStatus> getListSourceClassesAsync(GetListSourceClassesAsyncCallback callback); + /** + * This is used to retrieve SinkClass Information of all sink classes + (at)return + * E_OK on success, E_DATABASE_ERROR on error + */ + virtual void getListSinkClasses(CommonAPI::CallStatus& callStatus, am_SinkClass_L& listSinkClasses, am_Error_e& error); + virtual std::future<CommonAPI::CallStatus> getListSinkClassesAsync(GetListSinkClassesAsyncCallback callback); + /** + * Retrieves a complete list of all systemProperties. + (at)return E_OK on success, + * E_DATABASE_ERROR on error + */ + virtual void getListSystemProperties(CommonAPI::CallStatus& callStatus, am_SystemProperty_L& listSystemProperties, am_Error_e& error); + virtual std::future<CommonAPI::CallStatus> getListSystemPropertiesAsync(GetListSystemPropertiesAsyncCallback callback); + /** + * returns the delay in ms that the audiopath for the given mainConnection + * has + (at)return E_OK on success, E_NOT_POSSIBLE if timing information is not + * yet retrieved, E_DATABASE_ERROR on read error on the database + */ + virtual void getTimingInformation(const am_mainConnectionID_t& mainConnectionID, CommonAPI::CallStatus& callStatus, am_timeSync_t& delay, am_Error_e& error); + virtual std::future<CommonAPI::CallStatus> getTimingInformationAsync(const am_mainConnectionID_t& mainConnectionID, GetTimingInformationAsyncCallback callback); + /** + * Retrieves the list of MainNotifications for a sink. Does not return the + * possible ones. + */ + virtual void getListMainSinkNotificationConfigurations(const am_sinkID_t& sinkID, CommonAPI::CallStatus& callStatus, am_NotificationConfiguration_L& listMainNotificationConfigurations, am_Error_e& error); + virtual std::future<CommonAPI::CallStatus> getListMainSinkNotificationConfigurationsAsync(const am_sinkID_t& sinkID, GetListMainSinkNotificationConfigurationsAsyncCallback callback); + /** + * Retrieves the list of MainNotifications for a source. Does not return the + * possible ones. + */ + virtual void getListMainSourceNotificationConfigurations(const am_sourceID_t& sourceID, CommonAPI::CallStatus& callStatus, am_NotificationConfiguration_L& listMainNotificationConfigurations, am_Error_e& error); + virtual std::future<CommonAPI::CallStatus> getListMainSourceNotificationConfigurationsAsync(const am_sourceID_t& sourceID, GetListMainSourceNotificationConfigurationsAsyncCallback callback); + /** + * sets a MainNotificationConfiuration. This can be used to turn on an off + * notifications an to change the mode of the configuration. + (at)return E_OK on + * success, E_NON_EXISTENT if sinkID does not exists, E_DATABASE_ERROR on error + */ + virtual void setMainSinkNotificationConfiguration(const am_sinkID_t& sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration, CommonAPI::CallStatus& callStatus, am_Error_e& error); + virtual std::future<CommonAPI::CallStatus> setMainSinkNotificationConfigurationAsync(const am_sinkID_t& sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration, SetMainSinkNotificationConfigurationAsyncCallback callback); + /** + * sets a MainNotificationConfiuration. This can be used to turn on an off + * notifications an to change the mode of the configuration. + (at)return E_OK on + * success, E_NON_EXISTENT if sourceID does not exists, E_DATABASE_ERROR on error + */ + virtual void setMainSourceNotificationConfiguration(const am_sourceID_t& sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration, CommonAPI::CallStatus& callStatus, am_Error_e& error); + virtual std::future<CommonAPI::CallStatus> setMainSourceNotificationConfigurationAsync(const am_sourceID_t& sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration, SetMainSourceNotificationConfigurationAsyncCallback callback); + + + virtual void getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const; + + private: + + CommonAPI::DBus::DBusEvent<NewMainConnectionEvent> newMainConnection_; + CommonAPI::DBus::DBusEvent<RemovedMainConnectionEvent> removedMainConnection_; + CommonAPI::DBus::DBusEvent<NewSinkEvent> newSink_; + CommonAPI::DBus::DBusEvent<RemovedSinkEvent> removedSink_; + CommonAPI::DBus::DBusEvent<NewSourceEvent> newSource_; + CommonAPI::DBus::DBusEvent<RemovedSourceEvent> removedSource_; + CommonAPI::DBus::DBusEvent<NumberOfSinkClassesChangedEvent> numberOfSinkClassesChanged_; + CommonAPI::DBus::DBusEvent<NumberOfSourceClassesChangedEvent> numberOfSourceClassesChanged_; + CommonAPI::DBus::DBusEvent<MainConnectionStateChangedEvent> mainConnectionStateChanged_; + CommonAPI::DBus::DBusEvent<MainSinkSoundPropertyChangedEvent> mainSinkSoundPropertyChanged_; + CommonAPI::DBus::DBusEvent<MainSourceSoundPropertyChangedEvent> mainSourceSoundPropertyChanged_; + CommonAPI::DBus::DBusEvent<SinkAvailabilityChangedEvent> sinkAvailabilityChanged_; + CommonAPI::DBus::DBusEvent<SourceAvailabilityChangedEvent> sourceAvailabilityChanged_; + CommonAPI::DBus::DBusEvent<VolumeChangedEvent> volumeChanged_; + CommonAPI::DBus::DBusEvent<SinkMuteStateChangedEvent> sinkMuteStateChanged_; + CommonAPI::DBus::DBusEvent<SystemPropertyChangedEvent> systemPropertyChanged_; + CommonAPI::DBus::DBusEvent<TimingInformationChangedEvent> timingInformationChanged_; + CommonAPI::DBus::DBusEvent<SinkUpdatedEvent> sinkUpdated_; + CommonAPI::DBus::DBusEvent<SourceUpdatedEvent> sourceUpdated_; + CommonAPI::DBus::DBusEvent<SinkNotificationEvent> sinkNotification_; + CommonAPI::DBus::DBusEvent<SourceNotificationEvent> sourceNotification_; + CommonAPI::DBus::DBusEvent<MainSinkNotificationConfigurationChangedEvent> mainSinkNotificationConfigurationChanged_; + CommonAPI::DBus::DBusEvent<MainSourceNotificationConfigurationChangedEvent> mainSourceNotificationConfigurationChanged_; + +}; + + + +} // namespace am +} // namespace genivi +} // namespace org + +#endif // ORG_GENIVI_AM_Command_Control_DBUS_PROXY_H_ diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusStubAdapter.cpp b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusStubAdapter.cpp new file mode 100644 index 0000000..6da5cfd --- /dev/null +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusStubAdapter.cpp @@ -0,0 +1,1096 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +#include "CommandControlDBusStubAdapter.h" +#include <org/genivi/am/CommandControl.h> + +namespace org { +namespace genivi { +namespace am { + +std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> createCommandControlDBusStubAdapter( + 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<CommandControlDBusStubAdapter>(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection, stubBase); +} + +INITIALIZER(registerCommandControlDBusStubAdapter) { + CommonAPI::DBus::DBusFactory::registerAdapterFactoryMethod(CommandControl::getInterfaceId(), + &createCommandControlDBusStubAdapter); +} + + + +CommandControlDBusStubAdapterInternal::~CommandControlDBusStubAdapterInternal() { + deactivateManagedInstances(); + CommandControlDBusStubAdapterHelper::deinit(); +} + +void CommandControlDBusStubAdapterInternal::deactivateManagedInstances() { + +} + +const char* CommandControlDBusStubAdapterInternal::getMethodsDBusIntrospectionXmlData() const { + static const std::string introspectionData = + "<method name=\"getInterfaceVersion\">\n" + "<arg name=\"value\" type=\"uu\" direction=\"out\" />" + "</method>\n" + /** + * Callback that is called when the number of connections change + */ + "<signal name=\"newMainConnection\">\n" + "<arg name=\"mainConnection\" type=\"(qqqni)\" />\n" + "</signal>\n" + /** + * Callback that is called when the number of connections change + */ + "<signal name=\"removedMainConnection\">\n" + "<arg name=\"mainConnection\" type=\"q\" />\n" + "</signal>\n" + /** + * Callback that is called when the number of sinks change + */ + "<signal name=\"newSink\">\n" + "<arg name=\"sink\" type=\"(qs(iq)niq)\" />\n" + "</signal>\n" + /** + * Callback that is called when the number of sinks change + */ + "<signal name=\"removedSink\">\n" + "<arg name=\"sinkID\" type=\"q\" />\n" + "</signal>\n" + /** + * Callback that is called when the number of sources change + */ + "<signal name=\"newSource\">\n" + "<arg name=\"source\" type=\"(qs(iq)q)\" />\n" + "</signal>\n" + /** + * Callback that is called when the number of sources change + */ + "<signal name=\"removedSource\">\n" + "<arg name=\"source\" type=\"q\" />\n" + "</signal>\n" + /** + * this callback is fired if the number of sink classes changed + */ + "<signal name=\"numberOfSinkClassesChanged\">\n" + "</signal>\n" + /** + * this callback is fired if the number of source classes changed + */ + "<signal name=\"numberOfSourceClassesChanged\">\n" + "</signal>\n" + /** + * This callback is called when the ConnectionState of a connection changed. + */ + "<signal name=\"mainConnectionStateChanged\">\n" + "<arg name=\"connectionID\" type=\"q\" />\n" + "<arg name=\"connectionState\" type=\"i\" />\n" + "</signal>\n" + /** + * this callback indicates that a sinkSoundProperty has changed. + */ + "<signal name=\"mainSinkSoundPropertyChanged\">\n" + "<arg name=\"sinkID\" type=\"q\" />\n" + "<arg name=\"soundProperty\" type=\"(qn)\" />\n" + "</signal>\n" + /** + * this callback indicates that a sourceSoundProperty has changed. + */ + "<signal name=\"mainSourceSoundPropertyChanged\">\n" + "<arg name=\"sourceID\" type=\"q\" />\n" + "<arg name=\"soundProperty\" type=\"(qn)\" />\n" + "</signal>\n" + /** + * this callback is called when the availability of a sink has changed + */ + "<signal name=\"sinkAvailabilityChanged\">\n" + "<arg name=\"sinkID\" type=\"q\" />\n" + "<arg name=\"availability\" type=\"(iq)\" />\n" + "</signal>\n" + /** + * this callback is called when the availability of source has changed. + */ + "<signal name=\"sourceAvailabilityChanged\">\n" + "<arg name=\"sourceID\" type=\"q\" />\n" + "<arg name=\"availability\" type=\"(iq)\" />\n" + "</signal>\n" + /** + * this callback indicates a volume change on the indicated sink + */ + "<signal name=\"volumeChanged\">\n" + "<arg name=\"sinkID\" type=\"q\" />\n" + "<arg name=\"volume\" type=\"n\" />\n" + "</signal>\n" + /** + * this callback indicates a mute state change on a sink. + */ + "<signal name=\"sinkMuteStateChanged\">\n" + "<arg name=\"sinkID\" type=\"q\" />\n" + "<arg name=\"muteState\" type=\"i\" />\n" + "</signal>\n" + /** + * is fired if a systemProperty changed + */ + "<signal name=\"systemPropertyChanged\">\n" + "<arg name=\"systemProperty\" type=\"(qn)\" />\n" + "</signal>\n" + /** + * This callback is fired if the timinginformation for a mainConnectionID changed + */ + "<signal name=\"timingInformationChanged\">\n" + "<arg name=\"mainConnectionID\" type=\"q\" />\n" + "<arg name=\"time\" type=\"n\" />\n" + "</signal>\n" + /** + * This callback is called when a sink is updated. + */ + "<signal name=\"sinkUpdated\">\n" + "<arg name=\"sinkID\" type=\"q\" />\n" + "<arg name=\"sinkClassID\" type=\"q\" />\n" + "<arg name=\"listMainSoundProperties\" type=\"a(qn)\" />\n" + "</signal>\n" + /** + * This callback is called when a source is updated. + */ + "<signal name=\"sourceUpdated\">\n" + "<arg name=\"sourceID\" type=\"q\" />\n" + "<arg name=\"sourceClassID\" type=\"q\" />\n" + "<arg name=\"listMainSoundProperties\" type=\"a(qn)\" />\n" + "</signal>\n" + /** + * This callback is called when a notificated value of a sink changes. + */ + "<signal name=\"sinkNotification\">\n" + "<arg name=\"sinkID\" type=\"q\" />\n" + "<arg name=\"notification\" type=\"(qn)\" />\n" + "</signal>\n" + /** + * This callback is called when a notifcated value of a source changes. + */ + "<signal name=\"sourceNotification\">\n" + "<arg name=\"sourceID\" type=\"q\" />\n" + "<arg name=\"notification\" type=\"(qn)\" />\n" + "</signal>\n" + /** + * This callback is triggered when a mainNotificationConfiguration is changed. + */ + "<signal name=\"mainSinkNotificationConfigurationChanged\">\n" + "<arg name=\"sinkID\" type=\"q\" />\n" + "<arg name=\"mainNotificationConfiguration\" type=\"(qin)\" />\n" + "</signal>\n" + /** + * This callback is triggered when a mainNotificationConfiguration is changed. + */ + "<signal name=\"mainSourceNotificationConfigurationChanged\">\n" + "<arg name=\"sourceID\" type=\"q\" />\n" + "<arg name=\"mainNotificationConfiguration\" type=\"(qin)\" />\n" + "</signal>\n" + /** + * connects a source to sink + (at)return E_OK on success, E_NOT_POSSIBLE on + * failure, E_ALREADY_EXISTS if the connection does already exists + */ + "<method name=\"connect\">\n" + "<arg name=\"sourceID\" type=\"q\" direction=\"in\" />\n" + "<arg name=\"sinkID\" type=\"q\" direction=\"in\" />\n" + "<arg name=\"mainConnectionID\" type=\"q\" direction=\"out\" />\n" + "<arg name=\"error\" type=\"i\" direction=\"out\" />\n" + "</method>\n" + /** + * disconnects a mainConnection + (at)return E_OK on successes, E_NON_EXISTENT if + * the connection does not exist, E_NOT_POSSIBLE on error. + */ + "<method name=\"disconnect\">\n" + "<arg name=\"mainConnectionID\" type=\"q\" direction=\"in\" />\n" + "<arg name=\"error\" type=\"i\" direction=\"out\" />\n" + "</method>\n" + /** + * sets the volume for a sink + (at)return E_OK on success, E_UNKOWN on error, + * E_OUT_OF_RANGE in case the value is out of range + */ + "<method name=\"setVolume\">\n" + "<arg name=\"sinkID\" type=\"q\" direction=\"in\" />\n" + "<arg name=\"volume\" type=\"n\" direction=\"in\" />\n" + "<arg name=\"error\" type=\"i\" direction=\"out\" />\n" + "</method>\n" + /** + * This function is used to increment or decrement the current volume for a + * sink. + (at)return E_OK on success, E_UNKNOWN on error and E_OUT_OF_RANGE if the + * value is not in the given volume range. + */ + "<method name=\"volumeStep\">\n" + "<arg name=\"sinkID\" type=\"q\" direction=\"in\" />\n" + "<arg name=\"volStep\" type=\"n\" direction=\"in\" />\n" + "<arg name=\"error\" type=\"i\" direction=\"out\" />\n" + "</method>\n" + /** + * sets the mute state of a sink + (at)return E_OK on success, E_UNKNOWN on error. + * If the mute state is already the desired one, the Daemon will return E_OK. + */ + "<method name=\"setSinkMuteState\">\n" + "<arg name=\"sinkID\" type=\"q\" direction=\"in\" />\n" + "<arg name=\"muteState\" type=\"i\" direction=\"in\" />\n" + "<arg name=\"error\" type=\"i\" direction=\"out\" />\n" + "</method>\n" + /** + * This method is used to set sound properties, e.g. Equalizer Values. Since the + * capabilities of the system can differ, the exact key value pairs can be + * extended in each product + (at)return E_OK on success, E_OUT_OF_RANGE if value + * exceeds range, E_UNKNOWN in case of an error + */ + "<method name=\"setMainSinkSoundProperty\">\n" + "<arg name=\"sinkID\" type=\"q\" direction=\"in\" />\n" + "<arg name=\"soundProperty\" type=\"(qn)\" direction=\"in\" />\n" + "<arg name=\"error\" type=\"i\" direction=\"out\" />\n" + "</method>\n" + /** + * This method is used to set sound properties, e.g. Equalizer Values. Since the + * capabilities of the system can differ, the exact key value pairs can be + * extended in each product + (at)return E_OK on success, E_OUT_OF_RANGE if value + * exceeds range, E_UNKNOWN in case of an error + */ + "<method name=\"setMainSourceSoundProperty\">\n" + "<arg name=\"sourceID\" type=\"q\" direction=\"in\" />\n" + "<arg name=\"soundProperty\" type=\"(qn)\" direction=\"in\" />\n" + "<arg name=\"error\" type=\"i\" direction=\"out\" />\n" + "</method>\n" + /** + * is used to set a specific system property. + (at)return E_OK on success, + * E_OUT_OF_RANGE if value exceeds range, E_UNKNOWN in case of an error + */ + "<method name=\"setSystemProperty\">\n" + "<arg name=\"property\" type=\"(qn)\" direction=\"in\" />\n" + "<arg name=\"error\" type=\"i\" direction=\"out\" />\n" + "</method>\n" + /** + * returns the actual list of MainConnections + (at)return E_OK on success, + * E_DATABASE_ERROR on error + */ + "<method name=\"getListMainConnections\">\n" + "<arg name=\"listConnections\" type=\"a(qqqni)\" direction=\"out\" />\n" + "<arg name=\"error\" type=\"i\" direction=\"out\" />\n" + "</method>\n" + /** + * returns the actual list of Sinks + (at)return E_OK on success, E_DATABASE_ERROR + * on error + */ + "<method name=\"getListMainSinks\">\n" + "<arg name=\"listMainSinks\" type=\"a(qs(iq)niq)\" direction=\"out\" />\n" + "<arg name=\"error\" type=\"i\" direction=\"out\" />\n" + "</method>\n" + /** + * returns the actual list of Sources + (at)return E_OK on success, E_DATABASE_ERROR + * on error + */ + "<method name=\"getListMainSources\">\n" + "<arg name=\"listMainSources\" type=\"a(qs(iq)q)\" direction=\"out\" />\n" + "<arg name=\"error\" type=\"i\" direction=\"out\" />\n" + "</method>\n" + /** + * This is used to retrieve all source sound properties related to a source. + * Returns a vector of the sound properties and values as pair + (at)return E_OK on + * success, E_DATABASE_ERROR on error + */ + "<method name=\"getListMainSinkSoundProperties\">\n" + "<arg name=\"sinkID\" type=\"q\" direction=\"in\" />\n" + "<arg name=\"listSoundProperties\" type=\"a(qn)\" direction=\"out\" />\n" + "<arg name=\"error\" type=\"i\" direction=\"out\" />\n" + "</method>\n" + /** + * This is used to retrieve all source sound properties related to a + * source. + (at)return E_OK on success, E_DATABASE_ERROR on error + */ + "<method name=\"getListMainSourceSoundProperties\">\n" + "<arg name=\"sourceID\" type=\"q\" direction=\"in\" />\n" + "<arg name=\"listSourceProperties\" type=\"a(qn)\" direction=\"out\" />\n" + "<arg name=\"error\" type=\"i\" direction=\"out\" />\n" + "</method>\n" + /** + * This is used to retrieve SourceClass Information of all source classes + * + (at)return E_OK on success, E_DATABASE_ERROR on error + */ + "<method name=\"getListSourceClasses\">\n" + "<arg name=\"listSourceClasses\" type=\"a(qsa(qn))\" direction=\"out\" />\n" + "<arg name=\"error\" type=\"i\" direction=\"out\" />\n" + "</method>\n" + /** + * This is used to retrieve SinkClass Information of all sink classes + (at)return + * E_OK on success, E_DATABASE_ERROR on error + */ + "<method name=\"getListSinkClasses\">\n" + "<arg name=\"listSinkClasses\" type=\"a(qsa(qn))\" direction=\"out\" />\n" + "<arg name=\"error\" type=\"i\" direction=\"out\" />\n" + "</method>\n" + /** + * Retrieves a complete list of all systemProperties. + (at)return E_OK on success, + * E_DATABASE_ERROR on error + */ + "<method name=\"getListSystemProperties\">\n" + "<arg name=\"listSystemProperties\" type=\"a(qn)\" direction=\"out\" />\n" + "<arg name=\"error\" type=\"i\" direction=\"out\" />\n" + "</method>\n" + /** + * returns the delay in ms that the audiopath for the given mainConnection + * has + (at)return E_OK on success, E_NOT_POSSIBLE if timing information is not + * yet retrieved, E_DATABASE_ERROR on read error on the database + */ + "<method name=\"getTimingInformation\">\n" + "<arg name=\"mainConnectionID\" type=\"q\" direction=\"in\" />\n" + "<arg name=\"delay\" type=\"n\" direction=\"out\" />\n" + "<arg name=\"error\" type=\"i\" direction=\"out\" />\n" + "</method>\n" + /** + * Retrieves the list of MainNotifications for a sink. Does not return the + * possible ones. + */ + "<method name=\"getListMainSinkNotificationConfigurations\">\n" + "<arg name=\"sinkID\" type=\"q\" direction=\"in\" />\n" + "<arg name=\"listMainNotificationConfigurations\" type=\"a(qin)\" direction=\"out\" />\n" + "<arg name=\"error\" type=\"i\" direction=\"out\" />\n" + "</method>\n" + /** + * Retrieves the list of MainNotifications for a source. Does not return the + * possible ones. + */ + "<method name=\"getListMainSourceNotificationConfigurations\">\n" + "<arg name=\"sourceID\" type=\"q\" direction=\"in\" />\n" + "<arg name=\"listMainNotificationConfigurations\" type=\"a(qin)\" direction=\"out\" />\n" + "<arg name=\"error\" type=\"i\" direction=\"out\" />\n" + "</method>\n" + /** + * sets a MainNotificationConfiuration. This can be used to turn on an off + * notifications an to change the mode of the configuration. + (at)return E_OK on + * success, E_NON_EXISTENT if sinkID does not exists, E_DATABASE_ERROR on error + */ + "<method name=\"setMainSinkNotificationConfiguration\">\n" + "<arg name=\"sinkID\" type=\"q\" direction=\"in\" />\n" + "<arg name=\"mainNotificationConfiguration\" type=\"(qin)\" direction=\"in\" />\n" + "<arg name=\"error\" type=\"i\" direction=\"out\" />\n" + "</method>\n" + /** + * sets a MainNotificationConfiuration. This can be used to turn on an off + * notifications an to change the mode of the configuration. + (at)return E_OK on + * success, E_NON_EXISTENT if sourceID does not exists, E_DATABASE_ERROR on error + */ + "<method name=\"setMainSourceNotificationConfiguration\">\n" + "<arg name=\"sourceID\" type=\"q\" direction=\"in\" />\n" + "<arg name=\"mainNotificationConfiguration\" type=\"(qin)\" direction=\"in\" />\n" + "<arg name=\"error\" type=\"i\" direction=\"out\" />\n" + "</method>\n" + + ; + return introspectionData.c_str(); +} + +CommonAPI::DBus::DBusGetAttributeStubDispatcher< + CommandControlStub, + CommonAPI::Version + > CommandControlDBusStubAdapterInternal::getCommandControlInterfaceVersionStubDispatcher(&CommandControlStub::getInterfaceVersion, "uu"); + + + +/** + * connects a source to sink +(at)return E_OK on success, E_NOT_POSSIBLE on + * failure, E_ALREADY_EXISTS if the connection does already exists + */ +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<am_sourceID_t, am_sinkID_t>, + std::tuple<am_mainConnectionID_t, am_Error_e> + > CommandControlDBusStubAdapterInternal::connectStubDispatcher(&CommandControlStub::connect, "qi"); +/** + * disconnects a mainConnection +(at)return E_OK on successes, E_NON_EXISTENT if + * the connection does not exist, E_NOT_POSSIBLE on error. + */ +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<am_mainConnectionID_t>, + std::tuple<am_Error_e> + > CommandControlDBusStubAdapterInternal::disconnectStubDispatcher(&CommandControlStub::disconnect, "i"); +/** + * sets the volume for a sink +(at)return E_OK on success, E_UNKOWN on error, + * E_OUT_OF_RANGE in case the value is out of range + */ +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<am_sinkID_t, am_mainVolume_t>, + std::tuple<am_Error_e> + > CommandControlDBusStubAdapterInternal::setVolumeStubDispatcher(&CommandControlStub::setVolume, "i"); +/** + * This function is used to increment or decrement the current volume for a + * sink. +(at)return E_OK on success, E_UNKNOWN on error and E_OUT_OF_RANGE if the + * value is not in the given volume range. + */ +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<am_sinkID_t, int16_t>, + std::tuple<am_Error_e> + > CommandControlDBusStubAdapterInternal::volumeStepStubDispatcher(&CommandControlStub::volumeStep, "i"); +/** + * sets the mute state of a sink +(at)return E_OK on success, E_UNKNOWN on error. + * If the mute state is already the desired one, the Daemon will return E_OK. + */ +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<am_sinkID_t, am_MuteState_e>, + std::tuple<am_Error_e> + > CommandControlDBusStubAdapterInternal::setSinkMuteStateStubDispatcher(&CommandControlStub::setSinkMuteState, "i"); +/** + * This method is used to set sound properties, e.g. Equalizer Values. Since the + * capabilities of the system can differ, the exact key value pairs can be + * extended in each product +(at)return E_OK on success, E_OUT_OF_RANGE if value + * exceeds range, E_UNKNOWN in case of an error + */ +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<am_sinkID_t, am_MainSoundProperty_s>, + std::tuple<am_Error_e> + > CommandControlDBusStubAdapterInternal::setMainSinkSoundPropertyStubDispatcher(&CommandControlStub::setMainSinkSoundProperty, "i"); +/** + * This method is used to set sound properties, e.g. Equalizer Values. Since the + * capabilities of the system can differ, the exact key value pairs can be + * extended in each product +(at)return E_OK on success, E_OUT_OF_RANGE if value + * exceeds range, E_UNKNOWN in case of an error + */ +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<am_sourceID_t, am_MainSoundProperty_s>, + std::tuple<am_Error_e> + > CommandControlDBusStubAdapterInternal::setMainSourceSoundPropertyStubDispatcher(&CommandControlStub::setMainSourceSoundProperty, "i"); +/** + * is used to set a specific system property. +(at)return E_OK on success, + * E_OUT_OF_RANGE if value exceeds range, E_UNKNOWN in case of an error + */ +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<am_SystemProperty_s>, + std::tuple<am_Error_e> + > CommandControlDBusStubAdapterInternal::setSystemPropertyStubDispatcher(&CommandControlStub::setSystemProperty, "i"); +/** + * returns the actual list of MainConnections +(at)return E_OK on success, + * E_DATABASE_ERROR on error + */ +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<>, + std::tuple<am_MainConnection_L, am_Error_e> + > CommandControlDBusStubAdapterInternal::getListMainConnectionsStubDispatcher(&CommandControlStub::getListMainConnections, "a(qqqni)i"); +/** + * returns the actual list of Sinks +(at)return E_OK on success, E_DATABASE_ERROR + * on error + */ +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<>, + std::tuple<am_SinkType_L, am_Error_e> + > CommandControlDBusStubAdapterInternal::getListMainSinksStubDispatcher(&CommandControlStub::getListMainSinks, "a(qs(iq)niq)i"); +/** + * returns the actual list of Sources +(at)return E_OK on success, E_DATABASE_ERROR + * on error + */ +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<>, + std::tuple<am_SourceType_L, am_Error_e> + > CommandControlDBusStubAdapterInternal::getListMainSourcesStubDispatcher(&CommandControlStub::getListMainSources, "a(qs(iq)q)i"); +/** + * This is used to retrieve all source sound properties related to a source. + * Returns a vector of the sound properties and values as pair +(at)return E_OK on + * success, E_DATABASE_ERROR on error + */ +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<am_sinkID_t>, + std::tuple<am_MainSoundProperty_L, am_Error_e> + > CommandControlDBusStubAdapterInternal::getListMainSinkSoundPropertiesStubDispatcher(&CommandControlStub::getListMainSinkSoundProperties, "a(qn)i"); +/** + * This is used to retrieve all source sound properties related to a + * source. +(at)return E_OK on success, E_DATABASE_ERROR on error + */ +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<am_sourceID_t>, + std::tuple<am_MainSoundProperty_L, am_Error_e> + > CommandControlDBusStubAdapterInternal::getListMainSourceSoundPropertiesStubDispatcher(&CommandControlStub::getListMainSourceSoundProperties, "a(qn)i"); +/** + * This is used to retrieve SourceClass Information of all source classes + * +(at)return E_OK on success, E_DATABASE_ERROR on error + */ +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<>, + std::tuple<am_SourceClass_L, am_Error_e> + > CommandControlDBusStubAdapterInternal::getListSourceClassesStubDispatcher(&CommandControlStub::getListSourceClasses, "a(qsa(qn))i"); +/** + * This is used to retrieve SinkClass Information of all sink classes +(at)return + * E_OK on success, E_DATABASE_ERROR on error + */ +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<>, + std::tuple<am_SinkClass_L, am_Error_e> + > CommandControlDBusStubAdapterInternal::getListSinkClassesStubDispatcher(&CommandControlStub::getListSinkClasses, "a(qsa(qn))i"); +/** + * Retrieves a complete list of all systemProperties. +(at)return E_OK on success, + * E_DATABASE_ERROR on error + */ +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<>, + std::tuple<am_SystemProperty_L, am_Error_e> + > CommandControlDBusStubAdapterInternal::getListSystemPropertiesStubDispatcher(&CommandControlStub::getListSystemProperties, "a(qn)i"); +/** + * returns the delay in ms that the audiopath for the given mainConnection + * has +(at)return E_OK on success, E_NOT_POSSIBLE if timing information is not + * yet retrieved, E_DATABASE_ERROR on read error on the database + */ +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<am_mainConnectionID_t>, + std::tuple<am_timeSync_t, am_Error_e> + > CommandControlDBusStubAdapterInternal::getTimingInformationStubDispatcher(&CommandControlStub::getTimingInformation, "ni"); +/** + * Retrieves the list of MainNotifications for a sink. Does not return the + * possible ones. + */ +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<am_sinkID_t>, + std::tuple<am_NotificationConfiguration_L, am_Error_e> + > CommandControlDBusStubAdapterInternal::getListMainSinkNotificationConfigurationsStubDispatcher(&CommandControlStub::getListMainSinkNotificationConfigurations, "a(qin)i"); +/** + * Retrieves the list of MainNotifications for a source. Does not return the + * possible ones. + */ +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<am_sourceID_t>, + std::tuple<am_NotificationConfiguration_L, am_Error_e> + > CommandControlDBusStubAdapterInternal::getListMainSourceNotificationConfigurationsStubDispatcher(&CommandControlStub::getListMainSourceNotificationConfigurations, "a(qin)i"); +/** + * sets a MainNotificationConfiuration. This can be used to turn on an off + * notifications an to change the mode of the configuration. +(at)return E_OK on + * success, E_NON_EXISTENT if sinkID does not exists, E_DATABASE_ERROR on error + */ +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<am_sinkID_t, am_NotificationConfiguration_s>, + std::tuple<am_Error_e> + > CommandControlDBusStubAdapterInternal::setMainSinkNotificationConfigurationStubDispatcher(&CommandControlStub::setMainSinkNotificationConfiguration, "i"); +/** + * sets a MainNotificationConfiuration. This can be used to turn on an off + * notifications an to change the mode of the configuration. +(at)return E_OK on + * success, E_NON_EXISTENT if sourceID does not exists, E_DATABASE_ERROR on error + */ +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<am_sourceID_t, am_NotificationConfiguration_s>, + std::tuple<am_Error_e> + > CommandControlDBusStubAdapterInternal::setMainSourceNotificationConfigurationStubDispatcher(&CommandControlStub::setMainSourceNotificationConfiguration, "i"); + + + +/** + * Callback that is called when the number of connections change + */ +void CommandControlDBusStubAdapterInternal::fireNewMainConnectionEvent(const am_MainConnectionType_s& mainConnection) { + CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<am_MainConnectionType_s>> + ::sendSignal( + *this, + "newMainConnection", + "(qqqni)", + mainConnection + ); +} +/** + * Callback that is called when the number of connections change + */ +void CommandControlDBusStubAdapterInternal::fireRemovedMainConnectionEvent(const am_mainConnectionID_t& mainConnection) { + CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<am_mainConnectionID_t>> + ::sendSignal( + *this, + "removedMainConnection", + "q", + mainConnection + ); +} +/** + * Callback that is called when the number of sinks change + */ +void CommandControlDBusStubAdapterInternal::fireNewSinkEvent(const am_SinkType_s& sink) { + CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<am_SinkType_s>> + ::sendSignal( + *this, + "newSink", + "(qs(iq)niq)", + sink + ); +} +/** + * Callback that is called when the number of sinks change + */ +void CommandControlDBusStubAdapterInternal::fireRemovedSinkEvent(const am_sinkID_t& sinkID) { + CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<am_sinkID_t>> + ::sendSignal( + *this, + "removedSink", + "q", + sinkID + ); +} +/** + * Callback that is called when the number of sources change + */ +void CommandControlDBusStubAdapterInternal::fireNewSourceEvent(const am_SourceType_s& source) { + CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<am_SourceType_s>> + ::sendSignal( + *this, + "newSource", + "(qs(iq)q)", + source + ); +} +/** + * Callback that is called when the number of sources change + */ +void CommandControlDBusStubAdapterInternal::fireRemovedSourceEvent(const am_sourceID_t& source) { + CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<am_sourceID_t>> + ::sendSignal( + *this, + "removedSource", + "q", + source + ); +} +/** + * this callback is fired if the number of sink classes changed + */ +void CommandControlDBusStubAdapterInternal::fireNumberOfSinkClassesChangedEvent() { + CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<>> + ::sendSignal( + *this, + "numberOfSinkClassesChanged", + "" + ); +} +/** + * this callback is fired if the number of source classes changed + */ +void CommandControlDBusStubAdapterInternal::fireNumberOfSourceClassesChangedEvent() { + CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<>> + ::sendSignal( + *this, + "numberOfSourceClassesChanged", + "" + ); +} +/** + * This callback is called when the ConnectionState of a connection changed. + */ +void CommandControlDBusStubAdapterInternal::fireMainConnectionStateChangedEvent(const am_mainConnectionID_t& connectionID, const am_ConnectionState_e& connectionState) { + CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<am_mainConnectionID_t, am_ConnectionState_e>> + ::sendSignal( + *this, + "mainConnectionStateChanged", + "qi", + connectionID, connectionState + ); +} +/** + * this callback indicates that a sinkSoundProperty has changed. + */ +void CommandControlDBusStubAdapterInternal::fireMainSinkSoundPropertyChangedEvent(const am_sinkID_t& sinkID, const am_MainSoundProperty_s& soundProperty) { + CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<am_sinkID_t, am_MainSoundProperty_s>> + ::sendSignal( + *this, + "mainSinkSoundPropertyChanged", + "q(qn)", + sinkID, soundProperty + ); +} +/** + * this callback indicates that a sourceSoundProperty has changed. + */ +void CommandControlDBusStubAdapterInternal::fireMainSourceSoundPropertyChangedEvent(const am_sourceID_t& sourceID, const am_MainSoundProperty_s& soundProperty) { + CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<am_sourceID_t, am_MainSoundProperty_s>> + ::sendSignal( + *this, + "mainSourceSoundPropertyChanged", + "q(qn)", + sourceID, soundProperty + ); +} +/** + * this callback is called when the availability of a sink has changed + */ +void CommandControlDBusStubAdapterInternal::fireSinkAvailabilityChangedEvent(const am_sinkID_t& sinkID, const am_Availability_s& availability) { + CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<am_sinkID_t, am_Availability_s>> + ::sendSignal( + *this, + "sinkAvailabilityChanged", + "q(iq)", + sinkID, availability + ); +} +/** + * this callback is called when the availability of source has changed. + */ +void CommandControlDBusStubAdapterInternal::fireSourceAvailabilityChangedEvent(const am_sourceID_t& sourceID, const am_Availability_s& availability) { + CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<am_sourceID_t, am_Availability_s>> + ::sendSignal( + *this, + "sourceAvailabilityChanged", + "q(iq)", + sourceID, availability + ); +} +/** + * this callback indicates a volume change on the indicated sink + */ +void CommandControlDBusStubAdapterInternal::fireVolumeChangedEvent(const am_sinkID_t& sinkID, const am_mainVolume_t& volume) { + CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<am_sinkID_t, am_mainVolume_t>> + ::sendSignal( + *this, + "volumeChanged", + "qn", + sinkID, volume + ); +} +/** + * this callback indicates a mute state change on a sink. + */ +void CommandControlDBusStubAdapterInternal::fireSinkMuteStateChangedEvent(const am_sinkID_t& sinkID, const am_MuteState_e& muteState) { + CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<am_sinkID_t, am_MuteState_e>> + ::sendSignal( + *this, + "sinkMuteStateChanged", + "qi", + sinkID, muteState + ); +} +/** + * is fired if a systemProperty changed + */ +void CommandControlDBusStubAdapterInternal::fireSystemPropertyChangedEvent(const am_SystemProperty_s& systemProperty) { + CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<am_SystemProperty_s>> + ::sendSignal( + *this, + "systemPropertyChanged", + "(qn)", + systemProperty + ); +} +/** + * This callback is fired if the timinginformation for a mainConnectionID changed + */ +void CommandControlDBusStubAdapterInternal::fireTimingInformationChangedEvent(const am_mainConnectionID_t& mainConnectionID, const am_timeSync_t& time) { + CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<am_mainConnectionID_t, am_timeSync_t>> + ::sendSignal( + *this, + "timingInformationChanged", + "qn", + mainConnectionID, time + ); +} +/** + * This callback is called when a sink is updated. + */ +void CommandControlDBusStubAdapterInternal::fireSinkUpdatedEvent(const am_sinkID_t& sinkID, const am_sinkClass_t& sinkClassID, const am_MainSoundProperty_L& listMainSoundProperties) { + CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<am_sinkID_t, am_sinkClass_t, am_MainSoundProperty_L>> + ::sendSignal( + *this, + "sinkUpdated", + "qqa(qn)", + sinkID, sinkClassID, listMainSoundProperties + ); +} +/** + * This callback is called when a source is updated. + */ +void CommandControlDBusStubAdapterInternal::fireSourceUpdatedEvent(const am_sourceID_t& sourceID, const am_sourceClass_t& sourceClassID, const am_MainSoundProperty_L& listMainSoundProperties) { + CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<am_sourceID_t, am_sourceClass_t, am_MainSoundProperty_L>> + ::sendSignal( + *this, + "sourceUpdated", + "qqa(qn)", + sourceID, sourceClassID, listMainSoundProperties + ); +} +/** + * This callback is called when a notificated value of a sink changes. + */ +void CommandControlDBusStubAdapterInternal::fireSinkNotificationEvent(const am_sinkID_t& sinkID, const am_NotificationPayload_s& notification) { + CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<am_sinkID_t, am_NotificationPayload_s>> + ::sendSignal( + *this, + "sinkNotification", + "q(qn)", + sinkID, notification + ); +} +/** + * This callback is called when a notifcated value of a source changes. + */ +void CommandControlDBusStubAdapterInternal::fireSourceNotificationEvent(const am_sourceID_t& sourceID, const am_NotificationPayload_s& notification) { + CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<am_sourceID_t, am_NotificationPayload_s>> + ::sendSignal( + *this, + "sourceNotification", + "q(qn)", + sourceID, notification + ); +} +/** + * This callback is triggered when a mainNotificationConfiguration is changed. + */ +void CommandControlDBusStubAdapterInternal::fireMainSinkNotificationConfigurationChangedEvent(const am_sinkID_t& sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration) { + CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<am_sinkID_t, am_NotificationConfiguration_s>> + ::sendSignal( + *this, + "mainSinkNotificationConfigurationChanged", + "q(qin)", + sinkID, mainNotificationConfiguration + ); +} +/** + * This callback is triggered when a mainNotificationConfiguration is changed. + */ +void CommandControlDBusStubAdapterInternal::fireMainSourceNotificationConfigurationChangedEvent(const am_sourceID_t& sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration) { + CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<am_sourceID_t, am_NotificationConfiguration_s>> + ::sendSignal( + *this, + "mainSourceNotificationConfigurationChanged", + "q(qin)", + sourceID, mainNotificationConfiguration + ); +} + + +const CommandControlDBusStubAdapterHelper::StubDispatcherTable& CommandControlDBusStubAdapterInternal::getStubDispatcherTable() { + return stubDispatcherTable_; +} + +const CommonAPI::DBus::StubAttributeTable& CommandControlDBusStubAdapterInternal::getStubAttributeTable() { + return stubAttributeTable_; +} + +CommandControlDBusStubAdapterInternal::CommandControlDBusStubAdapterInternal( + 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), + CommandControlDBusStubAdapterHelper( + factory, + commonApiAddress, + dbusInterfaceName, + dbusBusName, + dbusObjectPath, + dbusConnection, + std::dynamic_pointer_cast<CommandControlStub>(stub), + false), + stubDispatcherTable_({ + /** + * connects a source to sink + (at)return E_OK on success, E_NOT_POSSIBLE on + * failure, E_ALREADY_EXISTS if the connection does already exists + */ + { { "connect", "qq" }, &org::genivi::am::CommandControlDBusStubAdapterInternal::connectStubDispatcher }, + /** + * disconnects a mainConnection + (at)return E_OK on successes, E_NON_EXISTENT if + * the connection does not exist, E_NOT_POSSIBLE on error. + */ + { { "disconnect", "q" }, &org::genivi::am::CommandControlDBusStubAdapterInternal::disconnectStubDispatcher }, + /** + * sets the volume for a sink + (at)return E_OK on success, E_UNKOWN on error, + * E_OUT_OF_RANGE in case the value is out of range + */ + { { "setVolume", "qn" }, &org::genivi::am::CommandControlDBusStubAdapterInternal::setVolumeStubDispatcher }, + /** + * This function is used to increment or decrement the current volume for a + * sink. + (at)return E_OK on success, E_UNKNOWN on error and E_OUT_OF_RANGE if the + * value is not in the given volume range. + */ + { { "volumeStep", "qn" }, &org::genivi::am::CommandControlDBusStubAdapterInternal::volumeStepStubDispatcher }, + /** + * sets the mute state of a sink + (at)return E_OK on success, E_UNKNOWN on error. + * If the mute state is already the desired one, the Daemon will return E_OK. + */ + { { "setSinkMuteState", "qi" }, &org::genivi::am::CommandControlDBusStubAdapterInternal::setSinkMuteStateStubDispatcher }, + /** + * This method is used to set sound properties, e.g. Equalizer Values. Since the + * capabilities of the system can differ, the exact key value pairs can be + * extended in each product + (at)return E_OK on success, E_OUT_OF_RANGE if value + * exceeds range, E_UNKNOWN in case of an error + */ + { { "setMainSinkSoundProperty", "q(qn)" }, &org::genivi::am::CommandControlDBusStubAdapterInternal::setMainSinkSoundPropertyStubDispatcher }, + /** + * This method is used to set sound properties, e.g. Equalizer Values. Since the + * capabilities of the system can differ, the exact key value pairs can be + * extended in each product + (at)return E_OK on success, E_OUT_OF_RANGE if value + * exceeds range, E_UNKNOWN in case of an error + */ + { { "setMainSourceSoundProperty", "q(qn)" }, &org::genivi::am::CommandControlDBusStubAdapterInternal::setMainSourceSoundPropertyStubDispatcher }, + /** + * is used to set a specific system property. + (at)return E_OK on success, + * E_OUT_OF_RANGE if value exceeds range, E_UNKNOWN in case of an error + */ + { { "setSystemProperty", "(qn)" }, &org::genivi::am::CommandControlDBusStubAdapterInternal::setSystemPropertyStubDispatcher }, + /** + * returns the actual list of MainConnections + (at)return E_OK on success, + * E_DATABASE_ERROR on error + */ + { { "getListMainConnections", "" }, &org::genivi::am::CommandControlDBusStubAdapterInternal::getListMainConnectionsStubDispatcher }, + /** + * returns the actual list of Sinks + (at)return E_OK on success, E_DATABASE_ERROR + * on error + */ + { { "getListMainSinks", "" }, &org::genivi::am::CommandControlDBusStubAdapterInternal::getListMainSinksStubDispatcher }, + /** + * returns the actual list of Sources + (at)return E_OK on success, E_DATABASE_ERROR + * on error + */ + { { "getListMainSources", "" }, &org::genivi::am::CommandControlDBusStubAdapterInternal::getListMainSourcesStubDispatcher }, + /** + * This is used to retrieve all source sound properties related to a source. + * Returns a vector of the sound properties and values as pair + (at)return E_OK on + * success, E_DATABASE_ERROR on error + */ + { { "getListMainSinkSoundProperties", "q" }, &org::genivi::am::CommandControlDBusStubAdapterInternal::getListMainSinkSoundPropertiesStubDispatcher }, + /** + * This is used to retrieve all source sound properties related to a + * source. + (at)return E_OK on success, E_DATABASE_ERROR on error + */ + { { "getListMainSourceSoundProperties", "q" }, &org::genivi::am::CommandControlDBusStubAdapterInternal::getListMainSourceSoundPropertiesStubDispatcher }, + /** + * This is used to retrieve SourceClass Information of all source classes + * + (at)return E_OK on success, E_DATABASE_ERROR on error + */ + { { "getListSourceClasses", "" }, &org::genivi::am::CommandControlDBusStubAdapterInternal::getListSourceClassesStubDispatcher }, + /** + * This is used to retrieve SinkClass Information of all sink classes + (at)return + * E_OK on success, E_DATABASE_ERROR on error + */ + { { "getListSinkClasses", "" }, &org::genivi::am::CommandControlDBusStubAdapterInternal::getListSinkClassesStubDispatcher }, + /** + * Retrieves a complete list of all systemProperties. + (at)return E_OK on success, + * E_DATABASE_ERROR on error + */ + { { "getListSystemProperties", "" }, &org::genivi::am::CommandControlDBusStubAdapterInternal::getListSystemPropertiesStubDispatcher }, + /** + * returns the delay in ms that the audiopath for the given mainConnection + * has + (at)return E_OK on success, E_NOT_POSSIBLE if timing information is not + * yet retrieved, E_DATABASE_ERROR on read error on the database + */ + { { "getTimingInformation", "q" }, &org::genivi::am::CommandControlDBusStubAdapterInternal::getTimingInformationStubDispatcher }, + /** + * Retrieves the list of MainNotifications for a sink. Does not return the + * possible ones. + */ + { { "getListMainSinkNotificationConfigurations", "q" }, &org::genivi::am::CommandControlDBusStubAdapterInternal::getListMainSinkNotificationConfigurationsStubDispatcher }, + /** + * Retrieves the list of MainNotifications for a source. Does not return the + * possible ones. + */ + { { "getListMainSourceNotificationConfigurations", "q" }, &org::genivi::am::CommandControlDBusStubAdapterInternal::getListMainSourceNotificationConfigurationsStubDispatcher }, + /** + * sets a MainNotificationConfiuration. This can be used to turn on an off + * notifications an to change the mode of the configuration. + (at)return E_OK on + * success, E_NON_EXISTENT if sinkID does not exists, E_DATABASE_ERROR on error + */ + { { "setMainSinkNotificationConfiguration", "q(qin)" }, &org::genivi::am::CommandControlDBusStubAdapterInternal::setMainSinkNotificationConfigurationStubDispatcher }, + /** + * sets a MainNotificationConfiuration. This can be used to turn on an off + * notifications an to change the mode of the configuration. + (at)return E_OK on + * success, E_NON_EXISTENT if sourceID does not exists, E_DATABASE_ERROR on error + */ + { { "setMainSourceNotificationConfiguration", "q(qin)" }, &org::genivi::am::CommandControlDBusStubAdapterInternal::setMainSourceNotificationConfigurationStubDispatcher } + }), + stubAttributeTable_() { + + stubDispatcherTable_.insert({ { "getInterfaceVersion", "" }, &org::genivi::am::CommandControlDBusStubAdapterInternal::getCommandControlInterfaceVersionStubDispatcher }); +} + +const bool CommandControlDBusStubAdapterInternal::hasFreedesktopProperties() { + return false; +} + +} // namespace am +} // namespace genivi +} // namespace org diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusStubAdapter.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusStubAdapter.h new file mode 100644 index 0000000..0909211 --- /dev/null +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusStubAdapter.h @@ -0,0 +1,422 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +/** + * The interface towards the Controlling Instance (e.g HMI). It handles the + * communication towards the HMI and other system components who need to interact + * with the audiomanagement. +There are two rules that have to be kept in mind + * when implementing against this interface: + * @author Christian Mueller + */ +#ifndef ORG_GENIVI_AM_Command_Control_DBUS_STUB_ADAPTER_H_ +#define ORG_GENIVI_AM_Command_Control_DBUS_STUB_ADAPTER_H_ + +#include <org/genivi/am/CommandControlStub.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 am { + +typedef CommonAPI::DBus::DBusStubAdapterHelper<CommandControlStub> CommandControlDBusStubAdapterHelper; + +class CommandControlDBusStubAdapterInternal: public virtual CommandControlStubAdapter, public CommandControlDBusStubAdapterHelper { + public: + CommandControlDBusStubAdapterInternal( + 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); + + ~CommandControlDBusStubAdapterInternal(); + + virtual const bool hasFreedesktopProperties(); + + + /** + * Callback that is called when the number of connections change + */ + void fireNewMainConnectionEvent(const am_MainConnectionType_s& mainConnection); + /** + * Callback that is called when the number of connections change + */ + void fireRemovedMainConnectionEvent(const am_mainConnectionID_t& mainConnection); + /** + * Callback that is called when the number of sinks change + */ + void fireNewSinkEvent(const am_SinkType_s& sink); + /** + * Callback that is called when the number of sinks change + */ + void fireRemovedSinkEvent(const am_sinkID_t& sinkID); + /** + * Callback that is called when the number of sources change + */ + void fireNewSourceEvent(const am_SourceType_s& source); + /** + * Callback that is called when the number of sources change + */ + void fireRemovedSourceEvent(const am_sourceID_t& source); + /** + * this callback is fired if the number of sink classes changed + */ + void fireNumberOfSinkClassesChangedEvent(); + /** + * this callback is fired if the number of source classes changed + */ + void fireNumberOfSourceClassesChangedEvent(); + /** + * This callback is called when the ConnectionState of a connection changed. + */ + void fireMainConnectionStateChangedEvent(const am_mainConnectionID_t& connectionID, const am_ConnectionState_e& connectionState); + /** + * this callback indicates that a sinkSoundProperty has changed. + */ + void fireMainSinkSoundPropertyChangedEvent(const am_sinkID_t& sinkID, const am_MainSoundProperty_s& soundProperty); + /** + * this callback indicates that a sourceSoundProperty has changed. + */ + void fireMainSourceSoundPropertyChangedEvent(const am_sourceID_t& sourceID, const am_MainSoundProperty_s& soundProperty); + /** + * this callback is called when the availability of a sink has changed + */ + void fireSinkAvailabilityChangedEvent(const am_sinkID_t& sinkID, const am_Availability_s& availability); + /** + * this callback is called when the availability of source has changed. + */ + void fireSourceAvailabilityChangedEvent(const am_sourceID_t& sourceID, const am_Availability_s& availability); + /** + * this callback indicates a volume change on the indicated sink + */ + void fireVolumeChangedEvent(const am_sinkID_t& sinkID, const am_mainVolume_t& volume); + /** + * this callback indicates a mute state change on a sink. + */ + void fireSinkMuteStateChangedEvent(const am_sinkID_t& sinkID, const am_MuteState_e& muteState); + /** + * is fired if a systemProperty changed + */ + void fireSystemPropertyChangedEvent(const am_SystemProperty_s& systemProperty); + /** + * This callback is fired if the timinginformation for a mainConnectionID changed + */ + void fireTimingInformationChangedEvent(const am_mainConnectionID_t& mainConnectionID, const am_timeSync_t& time); + /** + * This callback is called when a sink is updated. + */ + void fireSinkUpdatedEvent(const am_sinkID_t& sinkID, const am_sinkClass_t& sinkClassID, const am_MainSoundProperty_L& listMainSoundProperties); + /** + * This callback is called when a source is updated. + */ + void fireSourceUpdatedEvent(const am_sourceID_t& sourceID, const am_sourceClass_t& sourceClassID, const am_MainSoundProperty_L& listMainSoundProperties); + /** + * This callback is called when a notificated value of a sink changes. + */ + void fireSinkNotificationEvent(const am_sinkID_t& sinkID, const am_NotificationPayload_s& notification); + /** + * This callback is called when a notifcated value of a source changes. + */ + void fireSourceNotificationEvent(const am_sourceID_t& sourceID, const am_NotificationPayload_s& notification); + /** + * This callback is triggered when a mainNotificationConfiguration is changed. + */ + void fireMainSinkNotificationConfigurationChangedEvent(const am_sinkID_t& sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration); + /** + * This callback is triggered when a mainNotificationConfiguration is changed. + */ + void fireMainSourceNotificationConfigurationChangedEvent(const am_sourceID_t& sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration); + + + const CommandControlDBusStubAdapterHelper::StubDispatcherTable& getStubDispatcherTable(); + const CommonAPI::DBus::StubAttributeTable& getStubAttributeTable(); + + void deactivateManagedInstances(); + + +static CommonAPI::DBus::DBusGetAttributeStubDispatcher< + CommandControlStub, + CommonAPI::Version + > getCommandControlInterfaceVersionStubDispatcher; + + + +/** + * connects a source to sink +(at)return E_OK on success, E_NOT_POSSIBLE on + * failure, E_ALREADY_EXISTS if the connection does already exists + */ +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<am_sourceID_t, am_sinkID_t>, + std::tuple<am_mainConnectionID_t, am_Error_e> + > connectStubDispatcher; +/** + * disconnects a mainConnection +(at)return E_OK on successes, E_NON_EXISTENT if + * the connection does not exist, E_NOT_POSSIBLE on error. + */ +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<am_mainConnectionID_t>, + std::tuple<am_Error_e> + > disconnectStubDispatcher; +/** + * sets the volume for a sink +(at)return E_OK on success, E_UNKOWN on error, + * E_OUT_OF_RANGE in case the value is out of range + */ +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<am_sinkID_t, am_mainVolume_t>, + std::tuple<am_Error_e> + > setVolumeStubDispatcher; +/** + * This function is used to increment or decrement the current volume for a + * sink. +(at)return E_OK on success, E_UNKNOWN on error and E_OUT_OF_RANGE if the + * value is not in the given volume range. + */ +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<am_sinkID_t, int16_t>, + std::tuple<am_Error_e> + > volumeStepStubDispatcher; +/** + * sets the mute state of a sink +(at)return E_OK on success, E_UNKNOWN on error. + * If the mute state is already the desired one, the Daemon will return E_OK. + */ +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<am_sinkID_t, am_MuteState_e>, + std::tuple<am_Error_e> + > setSinkMuteStateStubDispatcher; +/** + * This method is used to set sound properties, e.g. Equalizer Values. Since the + * capabilities of the system can differ, the exact key value pairs can be + * extended in each product +(at)return E_OK on success, E_OUT_OF_RANGE if value + * exceeds range, E_UNKNOWN in case of an error + */ +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<am_sinkID_t, am_MainSoundProperty_s>, + std::tuple<am_Error_e> + > setMainSinkSoundPropertyStubDispatcher; +/** + * This method is used to set sound properties, e.g. Equalizer Values. Since the + * capabilities of the system can differ, the exact key value pairs can be + * extended in each product +(at)return E_OK on success, E_OUT_OF_RANGE if value + * exceeds range, E_UNKNOWN in case of an error + */ +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<am_sourceID_t, am_MainSoundProperty_s>, + std::tuple<am_Error_e> + > setMainSourceSoundPropertyStubDispatcher; +/** + * is used to set a specific system property. +(at)return E_OK on success, + * E_OUT_OF_RANGE if value exceeds range, E_UNKNOWN in case of an error + */ +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<am_SystemProperty_s>, + std::tuple<am_Error_e> + > setSystemPropertyStubDispatcher; +/** + * returns the actual list of MainConnections +(at)return E_OK on success, + * E_DATABASE_ERROR on error + */ +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<>, + std::tuple<am_MainConnection_L, am_Error_e> + > getListMainConnectionsStubDispatcher; +/** + * returns the actual list of Sinks +(at)return E_OK on success, E_DATABASE_ERROR + * on error + */ +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<>, + std::tuple<am_SinkType_L, am_Error_e> + > getListMainSinksStubDispatcher; +/** + * returns the actual list of Sources +(at)return E_OK on success, E_DATABASE_ERROR + * on error + */ +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<>, + std::tuple<am_SourceType_L, am_Error_e> + > getListMainSourcesStubDispatcher; +/** + * This is used to retrieve all source sound properties related to a source. + * Returns a vector of the sound properties and values as pair +(at)return E_OK on + * success, E_DATABASE_ERROR on error + */ +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<am_sinkID_t>, + std::tuple<am_MainSoundProperty_L, am_Error_e> + > getListMainSinkSoundPropertiesStubDispatcher; +/** + * This is used to retrieve all source sound properties related to a + * source. +(at)return E_OK on success, E_DATABASE_ERROR on error + */ +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<am_sourceID_t>, + std::tuple<am_MainSoundProperty_L, am_Error_e> + > getListMainSourceSoundPropertiesStubDispatcher; +/** + * This is used to retrieve SourceClass Information of all source classes + * +(at)return E_OK on success, E_DATABASE_ERROR on error + */ +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<>, + std::tuple<am_SourceClass_L, am_Error_e> + > getListSourceClassesStubDispatcher; +/** + * This is used to retrieve SinkClass Information of all sink classes +(at)return + * E_OK on success, E_DATABASE_ERROR on error + */ +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<>, + std::tuple<am_SinkClass_L, am_Error_e> + > getListSinkClassesStubDispatcher; +/** + * Retrieves a complete list of all systemProperties. +(at)return E_OK on success, + * E_DATABASE_ERROR on error + */ +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<>, + std::tuple<am_SystemProperty_L, am_Error_e> + > getListSystemPropertiesStubDispatcher; +/** + * returns the delay in ms that the audiopath for the given mainConnection + * has +(at)return E_OK on success, E_NOT_POSSIBLE if timing information is not + * yet retrieved, E_DATABASE_ERROR on read error on the database + */ +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<am_mainConnectionID_t>, + std::tuple<am_timeSync_t, am_Error_e> + > getTimingInformationStubDispatcher; +/** + * Retrieves the list of MainNotifications for a sink. Does not return the + * possible ones. + */ +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<am_sinkID_t>, + std::tuple<am_NotificationConfiguration_L, am_Error_e> + > getListMainSinkNotificationConfigurationsStubDispatcher; +/** + * Retrieves the list of MainNotifications for a source. Does not return the + * possible ones. + */ +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<am_sourceID_t>, + std::tuple<am_NotificationConfiguration_L, am_Error_e> + > getListMainSourceNotificationConfigurationsStubDispatcher; +/** + * sets a MainNotificationConfiuration. This can be used to turn on an off + * notifications an to change the mode of the configuration. +(at)return E_OK on + * success, E_NON_EXISTENT if sinkID does not exists, E_DATABASE_ERROR on error + */ +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<am_sinkID_t, am_NotificationConfiguration_s>, + std::tuple<am_Error_e> + > setMainSinkNotificationConfigurationStubDispatcher; +/** + * sets a MainNotificationConfiuration. This can be used to turn on an off + * notifications an to change the mode of the configuration. +(at)return E_OK on + * success, E_NON_EXISTENT if sourceID does not exists, E_DATABASE_ERROR on error + */ +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + CommandControlStub, + std::tuple<am_sourceID_t, am_NotificationConfiguration_s>, + std::tuple<am_Error_e> + > setMainSourceNotificationConfigurationStubDispatcher; + + + + + protected: + virtual const char* getMethodsDBusIntrospectionXmlData() const; + + private: + CommandControlDBusStubAdapterHelper::StubDispatcherTable stubDispatcherTable_; + CommonAPI::DBus::StubAttributeTable stubAttributeTable_; +}; + +class CommandControlDBusStubAdapter: public CommandControlDBusStubAdapterInternal, public std::enable_shared_from_this<CommandControlDBusStubAdapter> { +public: + CommandControlDBusStubAdapter( + 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), + CommandControlDBusStubAdapterInternal( + factory, + commonApiAddress, + dbusInterfaceName, + dbusBusName, + dbusObjectPath, + dbusConnection, + stub) { } +}; + +} // namespace am +} // namespace genivi +} // namespace org + +#endif // ORG_GENIVI_AM_Command_Control_DBUS_STUB_ADAPTER_H_ diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlProxy.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlProxy.h new file mode 100644 index 0000000..03e6a62 --- /dev/null +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlProxy.h @@ -0,0 +1,1194 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +/** + * The interface towards the Controlling Instance (e.g HMI). It handles the + * communication towards the HMI and other system components who need to interact + * with the audiomanagement. +There are two rules that have to be kept in mind + * when implementing against this interface: + * @author Christian Mueller + */ +#ifndef ORG_GENIVI_AM_Command_Control_PROXY_H_ +#define ORG_GENIVI_AM_Command_Control_PROXY_H_ + +#include "CommandControlProxyBase.h" + + +#if !defined (COMMONAPI_INTERNAL_COMPILATION) +#define COMMONAPI_INTERNAL_COMPILATION +#endif + + +#undef COMMONAPI_INTERNAL_COMPILATION + +namespace org { +namespace genivi { +namespace am { + +template <typename ... _AttributeExtensions> +class CommandControlProxy: virtual public CommandControl, virtual public CommandControlProxyBase +, public _AttributeExtensions... { +public: + CommandControlProxy(std::shared_ptr<CommonAPI::Proxy> delegate); + ~CommandControlProxy(); + + typedef CommandControl InterfaceType; + + + + /** + * Callback that is called when the number of connections change + */ + /** + * Returns the wrapper class that provides access to the broadcast newMainConnection. + */ + virtual NewMainConnectionEvent& getNewMainConnectionEvent() { + return delegate_->getNewMainConnectionEvent(); + } + /** + * Callback that is called when the number of connections change + */ + /** + * Returns the wrapper class that provides access to the broadcast removedMainConnection. + */ + virtual RemovedMainConnectionEvent& getRemovedMainConnectionEvent() { + return delegate_->getRemovedMainConnectionEvent(); + } + /** + * Callback that is called when the number of sinks change + */ + /** + * Returns the wrapper class that provides access to the broadcast newSink. + */ + virtual NewSinkEvent& getNewSinkEvent() { + return delegate_->getNewSinkEvent(); + } + /** + * Callback that is called when the number of sinks change + */ + /** + * Returns the wrapper class that provides access to the broadcast removedSink. + */ + virtual RemovedSinkEvent& getRemovedSinkEvent() { + return delegate_->getRemovedSinkEvent(); + } + /** + * Callback that is called when the number of sources change + */ + /** + * Returns the wrapper class that provides access to the broadcast newSource. + */ + virtual NewSourceEvent& getNewSourceEvent() { + return delegate_->getNewSourceEvent(); + } + /** + * Callback that is called when the number of sources change + */ + /** + * Returns the wrapper class that provides access to the broadcast removedSource. + */ + virtual RemovedSourceEvent& getRemovedSourceEvent() { + return delegate_->getRemovedSourceEvent(); + } + /** + * this callback is fired if the number of sink classes changed + */ + /** + * Returns the wrapper class that provides access to the broadcast numberOfSinkClassesChanged. + */ + virtual NumberOfSinkClassesChangedEvent& getNumberOfSinkClassesChangedEvent() { + return delegate_->getNumberOfSinkClassesChangedEvent(); + } + /** + * this callback is fired if the number of source classes changed + */ + /** + * Returns the wrapper class that provides access to the broadcast numberOfSourceClassesChanged. + */ + virtual NumberOfSourceClassesChangedEvent& getNumberOfSourceClassesChangedEvent() { + return delegate_->getNumberOfSourceClassesChangedEvent(); + } + /** + * This callback is called when the ConnectionState of a connection changed. + */ + /** + * Returns the wrapper class that provides access to the broadcast mainConnectionStateChanged. + */ + virtual MainConnectionStateChangedEvent& getMainConnectionStateChangedEvent() { + return delegate_->getMainConnectionStateChangedEvent(); + } + /** + * this callback indicates that a sinkSoundProperty has changed. + */ + /** + * Returns the wrapper class that provides access to the broadcast mainSinkSoundPropertyChanged. + */ + virtual MainSinkSoundPropertyChangedEvent& getMainSinkSoundPropertyChangedEvent() { + return delegate_->getMainSinkSoundPropertyChangedEvent(); + } + /** + * this callback indicates that a sourceSoundProperty has changed. + */ + /** + * Returns the wrapper class that provides access to the broadcast mainSourceSoundPropertyChanged. + */ + virtual MainSourceSoundPropertyChangedEvent& getMainSourceSoundPropertyChangedEvent() { + return delegate_->getMainSourceSoundPropertyChangedEvent(); + } + /** + * this callback is called when the availability of a sink has changed + */ + /** + * Returns the wrapper class that provides access to the broadcast sinkAvailabilityChanged. + */ + virtual SinkAvailabilityChangedEvent& getSinkAvailabilityChangedEvent() { + return delegate_->getSinkAvailabilityChangedEvent(); + } + /** + * this callback is called when the availability of source has changed. + */ + /** + * Returns the wrapper class that provides access to the broadcast sourceAvailabilityChanged. + */ + virtual SourceAvailabilityChangedEvent& getSourceAvailabilityChangedEvent() { + return delegate_->getSourceAvailabilityChangedEvent(); + } + /** + * this callback indicates a volume change on the indicated sink + */ + /** + * Returns the wrapper class that provides access to the broadcast volumeChanged. + */ + virtual VolumeChangedEvent& getVolumeChangedEvent() { + return delegate_->getVolumeChangedEvent(); + } + /** + * this callback indicates a mute state change on a sink. + */ + /** + * Returns the wrapper class that provides access to the broadcast sinkMuteStateChanged. + */ + virtual SinkMuteStateChangedEvent& getSinkMuteStateChangedEvent() { + return delegate_->getSinkMuteStateChangedEvent(); + } + /** + * is fired if a systemProperty changed + */ + /** + * Returns the wrapper class that provides access to the broadcast systemPropertyChanged. + */ + virtual SystemPropertyChangedEvent& getSystemPropertyChangedEvent() { + return delegate_->getSystemPropertyChangedEvent(); + } + /** + * This callback is fired if the timinginformation for a mainConnectionID changed + */ + /** + * Returns the wrapper class that provides access to the broadcast timingInformationChanged. + */ + virtual TimingInformationChangedEvent& getTimingInformationChangedEvent() { + return delegate_->getTimingInformationChangedEvent(); + } + /** + * This callback is called when a sink is updated. + */ + /** + * Returns the wrapper class that provides access to the broadcast sinkUpdated. + */ + virtual SinkUpdatedEvent& getSinkUpdatedEvent() { + return delegate_->getSinkUpdatedEvent(); + } + /** + * This callback is called when a source is updated. + */ + /** + * Returns the wrapper class that provides access to the broadcast sourceUpdated. + */ + virtual SourceUpdatedEvent& getSourceUpdatedEvent() { + return delegate_->getSourceUpdatedEvent(); + } + /** + * This callback is called when a notificated value of a sink changes. + */ + /** + * Returns the wrapper class that provides access to the broadcast sinkNotification. + */ + virtual SinkNotificationEvent& getSinkNotificationEvent() { + return delegate_->getSinkNotificationEvent(); + } + /** + * This callback is called when a notifcated value of a source changes. + */ + /** + * Returns the wrapper class that provides access to the broadcast sourceNotification. + */ + virtual SourceNotificationEvent& getSourceNotificationEvent() { + return delegate_->getSourceNotificationEvent(); + } + /** + * This callback is triggered when a mainNotificationConfiguration is changed. + */ + /** + * Returns the wrapper class that provides access to the broadcast mainSinkNotificationConfigurationChanged. + */ + virtual MainSinkNotificationConfigurationChangedEvent& getMainSinkNotificationConfigurationChangedEvent() { + return delegate_->getMainSinkNotificationConfigurationChangedEvent(); + } + /** + * This callback is triggered when a mainNotificationConfiguration is changed. + */ + /** + * Returns the wrapper class that provides access to the broadcast mainSourceNotificationConfigurationChanged. + */ + virtual MainSourceNotificationConfigurationChangedEvent& getMainSourceNotificationConfigurationChangedEvent() { + return delegate_->getMainSourceNotificationConfigurationChangedEvent(); + } + + /** + * connects a source to sink + (at)return E_OK on success, E_NOT_POSSIBLE on + * failure, E_ALREADY_EXISTS if the connection does already exists + * + * Calls connect 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 connect(const am_sourceID_t& sourceID, const am_sinkID_t& sinkID, CommonAPI::CallStatus& callStatus, am_mainConnectionID_t& mainConnectionID, am_Error_e& error); + /** + * Calls connect 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> connectAsync(const am_sourceID_t& sourceID, const am_sinkID_t& sinkID, ConnectAsyncCallback callback); + /** + * disconnects a mainConnection + (at)return E_OK on successes, E_NON_EXISTENT if + * the connection does not exist, E_NOT_POSSIBLE on error. + * + * Calls disconnect 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 disconnect(const am_mainConnectionID_t& mainConnectionID, CommonAPI::CallStatus& callStatus, am_Error_e& error); + /** + * Calls disconnect 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> disconnectAsync(const am_mainConnectionID_t& mainConnectionID, DisconnectAsyncCallback callback); + /** + * sets the volume for a sink + (at)return E_OK on success, E_UNKOWN on error, + * E_OUT_OF_RANGE in case the value is out of range + * + * Calls setVolume 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 setVolume(const am_sinkID_t& sinkID, const am_mainVolume_t& volume, CommonAPI::CallStatus& callStatus, am_Error_e& error); + /** + * Calls setVolume 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> setVolumeAsync(const am_sinkID_t& sinkID, const am_mainVolume_t& volume, SetVolumeAsyncCallback callback); + /** + * This function is used to increment or decrement the current volume for a + * sink. + (at)return E_OK on success, E_UNKNOWN on error and E_OUT_OF_RANGE if the + * value is not in the given volume range. + * + * Calls volumeStep 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 volumeStep(const am_sinkID_t& sinkID, const int16_t& volStep, CommonAPI::CallStatus& callStatus, am_Error_e& error); + /** + * Calls volumeStep 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> volumeStepAsync(const am_sinkID_t& sinkID, const int16_t& volStep, VolumeStepAsyncCallback callback); + /** + * sets the mute state of a sink + (at)return E_OK on success, E_UNKNOWN on error. + * If the mute state is already the desired one, the Daemon will return E_OK. + * + * Calls setSinkMuteState 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 setSinkMuteState(const am_sinkID_t& sinkID, const am_MuteState_e& muteState, CommonAPI::CallStatus& callStatus, am_Error_e& error); + /** + * Calls setSinkMuteState 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> setSinkMuteStateAsync(const am_sinkID_t& sinkID, const am_MuteState_e& muteState, SetSinkMuteStateAsyncCallback callback); + /** + * This method is used to set sound properties, e.g. Equalizer Values. Since the + * capabilities of the system can differ, the exact key value pairs can be + * extended in each product + (at)return E_OK on success, E_OUT_OF_RANGE if value + * exceeds range, E_UNKNOWN in case of an error + * + * Calls setMainSinkSoundProperty 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 setMainSinkSoundProperty(const am_sinkID_t& sinkID, const am_MainSoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus, am_Error_e& error); + /** + * Calls setMainSinkSoundProperty 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> setMainSinkSoundPropertyAsync(const am_sinkID_t& sinkID, const am_MainSoundProperty_s& soundProperty, SetMainSinkSoundPropertyAsyncCallback callback); + /** + * This method is used to set sound properties, e.g. Equalizer Values. Since the + * capabilities of the system can differ, the exact key value pairs can be + * extended in each product + (at)return E_OK on success, E_OUT_OF_RANGE if value + * exceeds range, E_UNKNOWN in case of an error + * + * Calls setMainSourceSoundProperty 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 setMainSourceSoundProperty(const am_sourceID_t& sourceID, const am_MainSoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus, am_Error_e& error); + /** + * Calls setMainSourceSoundProperty 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> setMainSourceSoundPropertyAsync(const am_sourceID_t& sourceID, const am_MainSoundProperty_s& soundProperty, SetMainSourceSoundPropertyAsyncCallback callback); + /** + * is used to set a specific system property. + (at)return E_OK on success, + * E_OUT_OF_RANGE if value exceeds range, E_UNKNOWN in case of an error + * + * Calls setSystemProperty 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 setSystemProperty(const am_SystemProperty_s& property, CommonAPI::CallStatus& callStatus, am_Error_e& error); + /** + * Calls setSystemProperty 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> setSystemPropertyAsync(const am_SystemProperty_s& property, SetSystemPropertyAsyncCallback callback); + /** + * returns the actual list of MainConnections + (at)return E_OK on success, + * E_DATABASE_ERROR on error + * + * Calls getListMainConnections 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 getListMainConnections(CommonAPI::CallStatus& callStatus, am_MainConnection_L& listConnections, am_Error_e& error); + /** + * Calls getListMainConnections 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> getListMainConnectionsAsync(GetListMainConnectionsAsyncCallback callback); + /** + * returns the actual list of Sinks + (at)return E_OK on success, E_DATABASE_ERROR + * on error + * + * Calls getListMainSinks 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 getListMainSinks(CommonAPI::CallStatus& callStatus, am_SinkType_L& listMainSinks, am_Error_e& error); + /** + * Calls getListMainSinks 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> getListMainSinksAsync(GetListMainSinksAsyncCallback callback); + /** + * returns the actual list of Sources + (at)return E_OK on success, E_DATABASE_ERROR + * on error + * + * Calls getListMainSources 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 getListMainSources(CommonAPI::CallStatus& callStatus, am_SourceType_L& listMainSources, am_Error_e& error); + /** + * Calls getListMainSources 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> getListMainSourcesAsync(GetListMainSourcesAsyncCallback callback); + /** + * This is used to retrieve all source sound properties related to a source. + * Returns a vector of the sound properties and values as pair + (at)return E_OK on + * success, E_DATABASE_ERROR on error + * + * Calls getListMainSinkSoundProperties 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 getListMainSinkSoundProperties(const am_sinkID_t& sinkID, CommonAPI::CallStatus& callStatus, am_MainSoundProperty_L& listSoundProperties, am_Error_e& error); + /** + * Calls getListMainSinkSoundProperties 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> getListMainSinkSoundPropertiesAsync(const am_sinkID_t& sinkID, GetListMainSinkSoundPropertiesAsyncCallback callback); + /** + * This is used to retrieve all source sound properties related to a + * source. + (at)return E_OK on success, E_DATABASE_ERROR on error + * + * Calls getListMainSourceSoundProperties 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 getListMainSourceSoundProperties(const am_sourceID_t& sourceID, CommonAPI::CallStatus& callStatus, am_MainSoundProperty_L& listSourceProperties, am_Error_e& error); + /** + * Calls getListMainSourceSoundProperties 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> getListMainSourceSoundPropertiesAsync(const am_sourceID_t& sourceID, GetListMainSourceSoundPropertiesAsyncCallback callback); + /** + * This is used to retrieve SourceClass Information of all source classes + * + (at)return E_OK on success, E_DATABASE_ERROR on error + * + * Calls getListSourceClasses 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 getListSourceClasses(CommonAPI::CallStatus& callStatus, am_SourceClass_L& listSourceClasses, am_Error_e& error); + /** + * Calls getListSourceClasses 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> getListSourceClassesAsync(GetListSourceClassesAsyncCallback callback); + /** + * This is used to retrieve SinkClass Information of all sink classes + (at)return + * E_OK on success, E_DATABASE_ERROR on error + * + * Calls getListSinkClasses 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 getListSinkClasses(CommonAPI::CallStatus& callStatus, am_SinkClass_L& listSinkClasses, am_Error_e& error); + /** + * Calls getListSinkClasses 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> getListSinkClassesAsync(GetListSinkClassesAsyncCallback callback); + /** + * Retrieves a complete list of all systemProperties. + (at)return E_OK on success, + * E_DATABASE_ERROR on error + * + * Calls getListSystemProperties 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 getListSystemProperties(CommonAPI::CallStatus& callStatus, am_SystemProperty_L& listSystemProperties, am_Error_e& error); + /** + * Calls getListSystemProperties 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> getListSystemPropertiesAsync(GetListSystemPropertiesAsyncCallback callback); + /** + * returns the delay in ms that the audiopath for the given mainConnection + * has + (at)return E_OK on success, E_NOT_POSSIBLE if timing information is not + * yet retrieved, E_DATABASE_ERROR on read error on the database + * + * Calls getTimingInformation 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 getTimingInformation(const am_mainConnectionID_t& mainConnectionID, CommonAPI::CallStatus& callStatus, am_timeSync_t& delay, am_Error_e& error); + /** + * Calls getTimingInformation 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> getTimingInformationAsync(const am_mainConnectionID_t& mainConnectionID, GetTimingInformationAsyncCallback callback); + /** + * Retrieves the list of MainNotifications for a sink. Does not return the + * possible ones. + * + * Calls getListMainSinkNotificationConfigurations 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 getListMainSinkNotificationConfigurations(const am_sinkID_t& sinkID, CommonAPI::CallStatus& callStatus, am_NotificationConfiguration_L& listMainNotificationConfigurations, am_Error_e& error); + /** + * Calls getListMainSinkNotificationConfigurations 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> getListMainSinkNotificationConfigurationsAsync(const am_sinkID_t& sinkID, GetListMainSinkNotificationConfigurationsAsyncCallback callback); + /** + * Retrieves the list of MainNotifications for a source. Does not return the + * possible ones. + * + * Calls getListMainSourceNotificationConfigurations 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 getListMainSourceNotificationConfigurations(const am_sourceID_t& sourceID, CommonAPI::CallStatus& callStatus, am_NotificationConfiguration_L& listMainNotificationConfigurations, am_Error_e& error); + /** + * Calls getListMainSourceNotificationConfigurations 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> getListMainSourceNotificationConfigurationsAsync(const am_sourceID_t& sourceID, GetListMainSourceNotificationConfigurationsAsyncCallback callback); + /** + * sets a MainNotificationConfiuration. This can be used to turn on an off + * notifications an to change the mode of the configuration. + (at)return E_OK on + * success, E_NON_EXISTENT if sinkID does not exists, E_DATABASE_ERROR on error + * + * Calls setMainSinkNotificationConfiguration 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 setMainSinkNotificationConfiguration(const am_sinkID_t& sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration, CommonAPI::CallStatus& callStatus, am_Error_e& error); + /** + * Calls setMainSinkNotificationConfiguration 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> setMainSinkNotificationConfigurationAsync(const am_sinkID_t& sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration, SetMainSinkNotificationConfigurationAsyncCallback callback); + /** + * sets a MainNotificationConfiuration. This can be used to turn on an off + * notifications an to change the mode of the configuration. + (at)return E_OK on + * success, E_NON_EXISTENT if sourceID does not exists, E_DATABASE_ERROR on error + * + * Calls setMainSourceNotificationConfiguration 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 setMainSourceNotificationConfiguration(const am_sourceID_t& sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration, CommonAPI::CallStatus& callStatus, am_Error_e& error); + /** + * Calls setMainSourceNotificationConfiguration 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> setMainSourceNotificationConfigurationAsync(const am_sourceID_t& sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration, SetMainSourceNotificationConfigurationAsyncCallback 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<CommandControlProxyBase> delegate_; +}; + +#ifdef WIN32 + typedef CommandControlProxy<CommonAPI::WINDummyAttributeExtension<CommonAPI::WINDummyAttribute>> CommandControlProxyDefault; +#else + typedef CommandControlProxy<> CommandControlProxyDefault; +#endif + + +// +// CommandControlProxy Implementation +// +template <typename ... _AttributeExtensions> +CommandControlProxy<_AttributeExtensions...>::CommandControlProxy(std::shared_ptr<CommonAPI::Proxy> delegate): + _AttributeExtensions(*(std::dynamic_pointer_cast<CommandControlProxyBase>(delegate)))..., + delegate_(std::dynamic_pointer_cast<CommandControlProxyBase>(delegate)) { +} + +template <typename ... _AttributeExtensions> +CommandControlProxy<_AttributeExtensions...>::~CommandControlProxy() { +} + +/** + * connects a source to sink +(at)return E_OK on success, E_NOT_POSSIBLE on + * failure, E_ALREADY_EXISTS if the connection does already exists + */ +template <typename ... _AttributeExtensions> +void CommandControlProxy<_AttributeExtensions...>::connect(const am_sourceID_t& sourceID, const am_sinkID_t& sinkID, CommonAPI::CallStatus& callStatus, am_mainConnectionID_t& mainConnectionID, am_Error_e& error) { + delegate_->connect(sourceID, sinkID, callStatus, mainConnectionID, error); +} + +template <typename ... _AttributeExtensions> +std::future<CommonAPI::CallStatus> CommandControlProxy<_AttributeExtensions...>::connectAsync(const am_sourceID_t& sourceID, const am_sinkID_t& sinkID, ConnectAsyncCallback callback) { + return delegate_->connectAsync(sourceID, sinkID, callback); +} +/** + * disconnects a mainConnection +(at)return E_OK on successes, E_NON_EXISTENT if + * the connection does not exist, E_NOT_POSSIBLE on error. + */ +template <typename ... _AttributeExtensions> +void CommandControlProxy<_AttributeExtensions...>::disconnect(const am_mainConnectionID_t& mainConnectionID, CommonAPI::CallStatus& callStatus, am_Error_e& error) { + delegate_->disconnect(mainConnectionID, callStatus, error); +} + +template <typename ... _AttributeExtensions> +std::future<CommonAPI::CallStatus> CommandControlProxy<_AttributeExtensions...>::disconnectAsync(const am_mainConnectionID_t& mainConnectionID, DisconnectAsyncCallback callback) { + return delegate_->disconnectAsync(mainConnectionID, callback); +} +/** + * sets the volume for a sink +(at)return E_OK on success, E_UNKOWN on error, + * E_OUT_OF_RANGE in case the value is out of range + */ +template <typename ... _AttributeExtensions> +void CommandControlProxy<_AttributeExtensions...>::setVolume(const am_sinkID_t& sinkID, const am_mainVolume_t& volume, CommonAPI::CallStatus& callStatus, am_Error_e& error) { + delegate_->setVolume(sinkID, volume, callStatus, error); +} + +template <typename ... _AttributeExtensions> +std::future<CommonAPI::CallStatus> CommandControlProxy<_AttributeExtensions...>::setVolumeAsync(const am_sinkID_t& sinkID, const am_mainVolume_t& volume, SetVolumeAsyncCallback callback) { + return delegate_->setVolumeAsync(sinkID, volume, callback); +} +/** + * This function is used to increment or decrement the current volume for a + * sink. +(at)return E_OK on success, E_UNKNOWN on error and E_OUT_OF_RANGE if the + * value is not in the given volume range. + */ +template <typename ... _AttributeExtensions> +void CommandControlProxy<_AttributeExtensions...>::volumeStep(const am_sinkID_t& sinkID, const int16_t& volStep, CommonAPI::CallStatus& callStatus, am_Error_e& error) { + delegate_->volumeStep(sinkID, volStep, callStatus, error); +} + +template <typename ... _AttributeExtensions> +std::future<CommonAPI::CallStatus> CommandControlProxy<_AttributeExtensions...>::volumeStepAsync(const am_sinkID_t& sinkID, const int16_t& volStep, VolumeStepAsyncCallback callback) { + return delegate_->volumeStepAsync(sinkID, volStep, callback); +} +/** + * sets the mute state of a sink +(at)return E_OK on success, E_UNKNOWN on error. + * If the mute state is already the desired one, the Daemon will return E_OK. + */ +template <typename ... _AttributeExtensions> +void CommandControlProxy<_AttributeExtensions...>::setSinkMuteState(const am_sinkID_t& sinkID, const am_MuteState_e& muteState, CommonAPI::CallStatus& callStatus, am_Error_e& error) { + delegate_->setSinkMuteState(sinkID, muteState, callStatus, error); +} + +template <typename ... _AttributeExtensions> +std::future<CommonAPI::CallStatus> CommandControlProxy<_AttributeExtensions...>::setSinkMuteStateAsync(const am_sinkID_t& sinkID, const am_MuteState_e& muteState, SetSinkMuteStateAsyncCallback callback) { + return delegate_->setSinkMuteStateAsync(sinkID, muteState, callback); +} +/** + * This method is used to set sound properties, e.g. Equalizer Values. Since the + * capabilities of the system can differ, the exact key value pairs can be + * extended in each product +(at)return E_OK on success, E_OUT_OF_RANGE if value + * exceeds range, E_UNKNOWN in case of an error + */ +template <typename ... _AttributeExtensions> +void CommandControlProxy<_AttributeExtensions...>::setMainSinkSoundProperty(const am_sinkID_t& sinkID, const am_MainSoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus, am_Error_e& error) { + delegate_->setMainSinkSoundProperty(sinkID, soundProperty, callStatus, error); +} + +template <typename ... _AttributeExtensions> +std::future<CommonAPI::CallStatus> CommandControlProxy<_AttributeExtensions...>::setMainSinkSoundPropertyAsync(const am_sinkID_t& sinkID, const am_MainSoundProperty_s& soundProperty, SetMainSinkSoundPropertyAsyncCallback callback) { + return delegate_->setMainSinkSoundPropertyAsync(sinkID, soundProperty, callback); +} +/** + * This method is used to set sound properties, e.g. Equalizer Values. Since the + * capabilities of the system can differ, the exact key value pairs can be + * extended in each product +(at)return E_OK on success, E_OUT_OF_RANGE if value + * exceeds range, E_UNKNOWN in case of an error + */ +template <typename ... _AttributeExtensions> +void CommandControlProxy<_AttributeExtensions...>::setMainSourceSoundProperty(const am_sourceID_t& sourceID, const am_MainSoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus, am_Error_e& error) { + delegate_->setMainSourceSoundProperty(sourceID, soundProperty, callStatus, error); +} + +template <typename ... _AttributeExtensions> +std::future<CommonAPI::CallStatus> CommandControlProxy<_AttributeExtensions...>::setMainSourceSoundPropertyAsync(const am_sourceID_t& sourceID, const am_MainSoundProperty_s& soundProperty, SetMainSourceSoundPropertyAsyncCallback callback) { + return delegate_->setMainSourceSoundPropertyAsync(sourceID, soundProperty, callback); +} +/** + * is used to set a specific system property. +(at)return E_OK on success, + * E_OUT_OF_RANGE if value exceeds range, E_UNKNOWN in case of an error + */ +template <typename ... _AttributeExtensions> +void CommandControlProxy<_AttributeExtensions...>::setSystemProperty(const am_SystemProperty_s& property, CommonAPI::CallStatus& callStatus, am_Error_e& error) { + delegate_->setSystemProperty(property, callStatus, error); +} + +template <typename ... _AttributeExtensions> +std::future<CommonAPI::CallStatus> CommandControlProxy<_AttributeExtensions...>::setSystemPropertyAsync(const am_SystemProperty_s& property, SetSystemPropertyAsyncCallback callback) { + return delegate_->setSystemPropertyAsync(property, callback); +} +/** + * returns the actual list of MainConnections +(at)return E_OK on success, + * E_DATABASE_ERROR on error + */ +template <typename ... _AttributeExtensions> +void CommandControlProxy<_AttributeExtensions...>::getListMainConnections(CommonAPI::CallStatus& callStatus, am_MainConnection_L& listConnections, am_Error_e& error) { + delegate_->getListMainConnections(callStatus, listConnections, error); +} + +template <typename ... _AttributeExtensions> +std::future<CommonAPI::CallStatus> CommandControlProxy<_AttributeExtensions...>::getListMainConnectionsAsync(GetListMainConnectionsAsyncCallback callback) { + return delegate_->getListMainConnectionsAsync(callback); +} +/** + * returns the actual list of Sinks +(at)return E_OK on success, E_DATABASE_ERROR + * on error + */ +template <typename ... _AttributeExtensions> +void CommandControlProxy<_AttributeExtensions...>::getListMainSinks(CommonAPI::CallStatus& callStatus, am_SinkType_L& listMainSinks, am_Error_e& error) { + delegate_->getListMainSinks(callStatus, listMainSinks, error); +} + +template <typename ... _AttributeExtensions> +std::future<CommonAPI::CallStatus> CommandControlProxy<_AttributeExtensions...>::getListMainSinksAsync(GetListMainSinksAsyncCallback callback) { + return delegate_->getListMainSinksAsync(callback); +} +/** + * returns the actual list of Sources +(at)return E_OK on success, E_DATABASE_ERROR + * on error + */ +template <typename ... _AttributeExtensions> +void CommandControlProxy<_AttributeExtensions...>::getListMainSources(CommonAPI::CallStatus& callStatus, am_SourceType_L& listMainSources, am_Error_e& error) { + delegate_->getListMainSources(callStatus, listMainSources, error); +} + +template <typename ... _AttributeExtensions> +std::future<CommonAPI::CallStatus> CommandControlProxy<_AttributeExtensions...>::getListMainSourcesAsync(GetListMainSourcesAsyncCallback callback) { + return delegate_->getListMainSourcesAsync(callback); +} +/** + * This is used to retrieve all source sound properties related to a source. + * Returns a vector of the sound properties and values as pair +(at)return E_OK on + * success, E_DATABASE_ERROR on error + */ +template <typename ... _AttributeExtensions> +void CommandControlProxy<_AttributeExtensions...>::getListMainSinkSoundProperties(const am_sinkID_t& sinkID, CommonAPI::CallStatus& callStatus, am_MainSoundProperty_L& listSoundProperties, am_Error_e& error) { + delegate_->getListMainSinkSoundProperties(sinkID, callStatus, listSoundProperties, error); +} + +template <typename ... _AttributeExtensions> +std::future<CommonAPI::CallStatus> CommandControlProxy<_AttributeExtensions...>::getListMainSinkSoundPropertiesAsync(const am_sinkID_t& sinkID, GetListMainSinkSoundPropertiesAsyncCallback callback) { + return delegate_->getListMainSinkSoundPropertiesAsync(sinkID, callback); +} +/** + * This is used to retrieve all source sound properties related to a + * source. +(at)return E_OK on success, E_DATABASE_ERROR on error + */ +template <typename ... _AttributeExtensions> +void CommandControlProxy<_AttributeExtensions...>::getListMainSourceSoundProperties(const am_sourceID_t& sourceID, CommonAPI::CallStatus& callStatus, am_MainSoundProperty_L& listSourceProperties, am_Error_e& error) { + delegate_->getListMainSourceSoundProperties(sourceID, callStatus, listSourceProperties, error); +} + +template <typename ... _AttributeExtensions> +std::future<CommonAPI::CallStatus> CommandControlProxy<_AttributeExtensions...>::getListMainSourceSoundPropertiesAsync(const am_sourceID_t& sourceID, GetListMainSourceSoundPropertiesAsyncCallback callback) { + return delegate_->getListMainSourceSoundPropertiesAsync(sourceID, callback); +} +/** + * This is used to retrieve SourceClass Information of all source classes + * +(at)return E_OK on success, E_DATABASE_ERROR on error + */ +template <typename ... _AttributeExtensions> +void CommandControlProxy<_AttributeExtensions...>::getListSourceClasses(CommonAPI::CallStatus& callStatus, am_SourceClass_L& listSourceClasses, am_Error_e& error) { + delegate_->getListSourceClasses(callStatus, listSourceClasses, error); +} + +template <typename ... _AttributeExtensions> +std::future<CommonAPI::CallStatus> CommandControlProxy<_AttributeExtensions...>::getListSourceClassesAsync(GetListSourceClassesAsyncCallback callback) { + return delegate_->getListSourceClassesAsync(callback); +} +/** + * This is used to retrieve SinkClass Information of all sink classes +(at)return + * E_OK on success, E_DATABASE_ERROR on error + */ +template <typename ... _AttributeExtensions> +void CommandControlProxy<_AttributeExtensions...>::getListSinkClasses(CommonAPI::CallStatus& callStatus, am_SinkClass_L& listSinkClasses, am_Error_e& error) { + delegate_->getListSinkClasses(callStatus, listSinkClasses, error); +} + +template <typename ... _AttributeExtensions> +std::future<CommonAPI::CallStatus> CommandControlProxy<_AttributeExtensions...>::getListSinkClassesAsync(GetListSinkClassesAsyncCallback callback) { + return delegate_->getListSinkClassesAsync(callback); +} +/** + * Retrieves a complete list of all systemProperties. +(at)return E_OK on success, + * E_DATABASE_ERROR on error + */ +template <typename ... _AttributeExtensions> +void CommandControlProxy<_AttributeExtensions...>::getListSystemProperties(CommonAPI::CallStatus& callStatus, am_SystemProperty_L& listSystemProperties, am_Error_e& error) { + delegate_->getListSystemProperties(callStatus, listSystemProperties, error); +} + +template <typename ... _AttributeExtensions> +std::future<CommonAPI::CallStatus> CommandControlProxy<_AttributeExtensions...>::getListSystemPropertiesAsync(GetListSystemPropertiesAsyncCallback callback) { + return delegate_->getListSystemPropertiesAsync(callback); +} +/** + * returns the delay in ms that the audiopath for the given mainConnection + * has +(at)return E_OK on success, E_NOT_POSSIBLE if timing information is not + * yet retrieved, E_DATABASE_ERROR on read error on the database + */ +template <typename ... _AttributeExtensions> +void CommandControlProxy<_AttributeExtensions...>::getTimingInformation(const am_mainConnectionID_t& mainConnectionID, CommonAPI::CallStatus& callStatus, am_timeSync_t& delay, am_Error_e& error) { + delegate_->getTimingInformation(mainConnectionID, callStatus, delay, error); +} + +template <typename ... _AttributeExtensions> +std::future<CommonAPI::CallStatus> CommandControlProxy<_AttributeExtensions...>::getTimingInformationAsync(const am_mainConnectionID_t& mainConnectionID, GetTimingInformationAsyncCallback callback) { + return delegate_->getTimingInformationAsync(mainConnectionID, callback); +} +/** + * Retrieves the list of MainNotifications for a sink. Does not return the + * possible ones. + */ +template <typename ... _AttributeExtensions> +void CommandControlProxy<_AttributeExtensions...>::getListMainSinkNotificationConfigurations(const am_sinkID_t& sinkID, CommonAPI::CallStatus& callStatus, am_NotificationConfiguration_L& listMainNotificationConfigurations, am_Error_e& error) { + delegate_->getListMainSinkNotificationConfigurations(sinkID, callStatus, listMainNotificationConfigurations, error); +} + +template <typename ... _AttributeExtensions> +std::future<CommonAPI::CallStatus> CommandControlProxy<_AttributeExtensions...>::getListMainSinkNotificationConfigurationsAsync(const am_sinkID_t& sinkID, GetListMainSinkNotificationConfigurationsAsyncCallback callback) { + return delegate_->getListMainSinkNotificationConfigurationsAsync(sinkID, callback); +} +/** + * Retrieves the list of MainNotifications for a source. Does not return the + * possible ones. + */ +template <typename ... _AttributeExtensions> +void CommandControlProxy<_AttributeExtensions...>::getListMainSourceNotificationConfigurations(const am_sourceID_t& sourceID, CommonAPI::CallStatus& callStatus, am_NotificationConfiguration_L& listMainNotificationConfigurations, am_Error_e& error) { + delegate_->getListMainSourceNotificationConfigurations(sourceID, callStatus, listMainNotificationConfigurations, error); +} + +template <typename ... _AttributeExtensions> +std::future<CommonAPI::CallStatus> CommandControlProxy<_AttributeExtensions...>::getListMainSourceNotificationConfigurationsAsync(const am_sourceID_t& sourceID, GetListMainSourceNotificationConfigurationsAsyncCallback callback) { + return delegate_->getListMainSourceNotificationConfigurationsAsync(sourceID, callback); +} +/** + * sets a MainNotificationConfiuration. This can be used to turn on an off + * notifications an to change the mode of the configuration. +(at)return E_OK on + * success, E_NON_EXISTENT if sinkID does not exists, E_DATABASE_ERROR on error + */ +template <typename ... _AttributeExtensions> +void CommandControlProxy<_AttributeExtensions...>::setMainSinkNotificationConfiguration(const am_sinkID_t& sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration, CommonAPI::CallStatus& callStatus, am_Error_e& error) { + delegate_->setMainSinkNotificationConfiguration(sinkID, mainNotificationConfiguration, callStatus, error); +} + +template <typename ... _AttributeExtensions> +std::future<CommonAPI::CallStatus> CommandControlProxy<_AttributeExtensions...>::setMainSinkNotificationConfigurationAsync(const am_sinkID_t& sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration, SetMainSinkNotificationConfigurationAsyncCallback callback) { + return delegate_->setMainSinkNotificationConfigurationAsync(sinkID, mainNotificationConfiguration, callback); +} +/** + * sets a MainNotificationConfiuration. This can be used to turn on an off + * notifications an to change the mode of the configuration. +(at)return E_OK on + * success, E_NON_EXISTENT if sourceID does not exists, E_DATABASE_ERROR on error + */ +template <typename ... _AttributeExtensions> +void CommandControlProxy<_AttributeExtensions...>::setMainSourceNotificationConfiguration(const am_sourceID_t& sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration, CommonAPI::CallStatus& callStatus, am_Error_e& error) { + delegate_->setMainSourceNotificationConfiguration(sourceID, mainNotificationConfiguration, callStatus, error); +} + +template <typename ... _AttributeExtensions> +std::future<CommonAPI::CallStatus> CommandControlProxy<_AttributeExtensions...>::setMainSourceNotificationConfigurationAsync(const am_sourceID_t& sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration, SetMainSourceNotificationConfigurationAsyncCallback callback) { + return delegate_->setMainSourceNotificationConfigurationAsync(sourceID, mainNotificationConfiguration, callback); +} + +template <typename ... _AttributeExtensions> +std::string CommandControlProxy<_AttributeExtensions...>::getAddress() const { + return delegate_->getAddress(); +} + +template <typename ... _AttributeExtensions> +const std::string& CommandControlProxy<_AttributeExtensions...>::getDomain() const { + return delegate_->getDomain(); +} + +template <typename ... _AttributeExtensions> +const std::string& CommandControlProxy<_AttributeExtensions...>::getServiceId() const { + return delegate_->getServiceId(); +} + +template <typename ... _AttributeExtensions> +const std::string& CommandControlProxy<_AttributeExtensions...>::getInstanceId() const { + return delegate_->getInstanceId(); +} + +template <typename ... _AttributeExtensions> +bool CommandControlProxy<_AttributeExtensions...>::isAvailable() const { + return delegate_->isAvailable(); +} + +template <typename ... _AttributeExtensions> +bool CommandControlProxy<_AttributeExtensions...>::isAvailableBlocking() const { + return delegate_->isAvailableBlocking(); +} + +template <typename ... _AttributeExtensions> +CommonAPI::ProxyStatusEvent& CommandControlProxy<_AttributeExtensions...>::getProxyStatusEvent() { + return delegate_->getProxyStatusEvent(); +} + +template <typename ... _AttributeExtensions> +CommonAPI::InterfaceVersionAttribute& CommandControlProxy<_AttributeExtensions...>::getInterfaceVersionAttribute() { + return delegate_->getInterfaceVersionAttribute(); +} + + +} // namespace am +} // namespace genivi +} // namespace org + + +#endif // ORG_GENIVI_AM_Command_Control_PROXY_H_ diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlProxyBase.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlProxyBase.h new file mode 100644 index 0000000..767b9e1 --- /dev/null +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlProxyBase.h @@ -0,0 +1,348 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +/** + * The interface towards the Controlling Instance (e.g HMI). It handles the + * communication towards the HMI and other system components who need to interact + * with the audiomanagement. +There are two rules that have to be kept in mind + * when implementing against this interface: + * @author Christian Mueller + */ +#ifndef ORG_GENIVI_AM_Command_Control_PROXY_BASE_H_ +#define ORG_GENIVI_AM_Command_Control_PROXY_BASE_H_ + +#include "CommandControl.h" + + +#include <org/genivi/am.h> + +#if !defined (COMMONAPI_INTERNAL_COMPILATION) +#define COMMONAPI_INTERNAL_COMPILATION +#endif + +#include <CommonAPI/InputStream.h> +#include <CommonAPI/OutputStream.h> +#include <CommonAPI/SerializableStruct.h> +#include <cstdint> +#include <string> +#include <vector> + +#include <CommonAPI/Event.h> +#include <CommonAPI/Proxy.h> +#include <functional> +#include <future> + +#undef COMMONAPI_INTERNAL_COMPILATION + +namespace org { +namespace genivi { +namespace am { + +class CommandControlProxyBase: virtual public CommonAPI::Proxy { + public: + typedef CommonAPI::Event<am_MainConnectionType_s> NewMainConnectionEvent; + typedef CommonAPI::Event<am_mainConnectionID_t> RemovedMainConnectionEvent; + typedef CommonAPI::Event<am_SinkType_s> NewSinkEvent; + typedef CommonAPI::Event<am_sinkID_t> RemovedSinkEvent; + typedef CommonAPI::Event<am_SourceType_s> NewSourceEvent; + typedef CommonAPI::Event<am_sourceID_t> RemovedSourceEvent; + typedef CommonAPI::Event<> NumberOfSinkClassesChangedEvent; + typedef CommonAPI::Event<> NumberOfSourceClassesChangedEvent; + typedef CommonAPI::Event<am_mainConnectionID_t, am_ConnectionState_e> MainConnectionStateChangedEvent; + typedef CommonAPI::Event<am_sinkID_t, am_MainSoundProperty_s> MainSinkSoundPropertyChangedEvent; + typedef CommonAPI::Event<am_sourceID_t, am_MainSoundProperty_s> MainSourceSoundPropertyChangedEvent; + typedef CommonAPI::Event<am_sinkID_t, am_Availability_s> SinkAvailabilityChangedEvent; + typedef CommonAPI::Event<am_sourceID_t, am_Availability_s> SourceAvailabilityChangedEvent; + typedef CommonAPI::Event<am_sinkID_t, am_mainVolume_t> VolumeChangedEvent; + typedef CommonAPI::Event<am_sinkID_t, am_MuteState_e> SinkMuteStateChangedEvent; + typedef CommonAPI::Event<am_SystemProperty_s> SystemPropertyChangedEvent; + typedef CommonAPI::Event<am_mainConnectionID_t, am_timeSync_t> TimingInformationChangedEvent; + typedef CommonAPI::Event<am_sinkID_t, am_sinkClass_t, am_MainSoundProperty_L> SinkUpdatedEvent; + typedef CommonAPI::Event<am_sourceID_t, am_sourceClass_t, am_MainSoundProperty_L> SourceUpdatedEvent; + typedef CommonAPI::Event<am_sinkID_t, am_NotificationPayload_s> SinkNotificationEvent; + typedef CommonAPI::Event<am_sourceID_t, am_NotificationPayload_s> SourceNotificationEvent; + typedef CommonAPI::Event<am_sinkID_t, am_NotificationConfiguration_s> MainSinkNotificationConfigurationChangedEvent; + typedef CommonAPI::Event<am_sourceID_t, am_NotificationConfiguration_s> MainSourceNotificationConfigurationChangedEvent; + + typedef std::function<void(const CommonAPI::CallStatus&, const am_mainConnectionID_t&, const am_Error_e&)> ConnectAsyncCallback; + typedef std::function<void(const CommonAPI::CallStatus&, const am_Error_e&)> DisconnectAsyncCallback; + typedef std::function<void(const CommonAPI::CallStatus&, const am_Error_e&)> SetVolumeAsyncCallback; + typedef std::function<void(const CommonAPI::CallStatus&, const am_Error_e&)> VolumeStepAsyncCallback; + typedef std::function<void(const CommonAPI::CallStatus&, const am_Error_e&)> SetSinkMuteStateAsyncCallback; + typedef std::function<void(const CommonAPI::CallStatus&, const am_Error_e&)> SetMainSinkSoundPropertyAsyncCallback; + typedef std::function<void(const CommonAPI::CallStatus&, const am_Error_e&)> SetMainSourceSoundPropertyAsyncCallback; + typedef std::function<void(const CommonAPI::CallStatus&, const am_Error_e&)> SetSystemPropertyAsyncCallback; + typedef std::function<void(const CommonAPI::CallStatus&, const am_MainConnection_L&, const am_Error_e&)> GetListMainConnectionsAsyncCallback; + typedef std::function<void(const CommonAPI::CallStatus&, const am_SinkType_L&, const am_Error_e&)> GetListMainSinksAsyncCallback; + typedef std::function<void(const CommonAPI::CallStatus&, const am_SourceType_L&, const am_Error_e&)> GetListMainSourcesAsyncCallback; + typedef std::function<void(const CommonAPI::CallStatus&, const am_MainSoundProperty_L&, const am_Error_e&)> GetListMainSinkSoundPropertiesAsyncCallback; + typedef std::function<void(const CommonAPI::CallStatus&, const am_MainSoundProperty_L&, const am_Error_e&)> GetListMainSourceSoundPropertiesAsyncCallback; + typedef std::function<void(const CommonAPI::CallStatus&, const am_SourceClass_L&, const am_Error_e&)> GetListSourceClassesAsyncCallback; + typedef std::function<void(const CommonAPI::CallStatus&, const am_SinkClass_L&, const am_Error_e&)> GetListSinkClassesAsyncCallback; + typedef std::function<void(const CommonAPI::CallStatus&, const am_SystemProperty_L&, const am_Error_e&)> GetListSystemPropertiesAsyncCallback; + typedef std::function<void(const CommonAPI::CallStatus&, const am_timeSync_t&, const am_Error_e&)> GetTimingInformationAsyncCallback; + typedef std::function<void(const CommonAPI::CallStatus&, const am_NotificationConfiguration_L&, const am_Error_e&)> GetListMainSinkNotificationConfigurationsAsyncCallback; + typedef std::function<void(const CommonAPI::CallStatus&, const am_NotificationConfiguration_L&, const am_Error_e&)> GetListMainSourceNotificationConfigurationsAsyncCallback; + typedef std::function<void(const CommonAPI::CallStatus&, const am_Error_e&)> SetMainSinkNotificationConfigurationAsyncCallback; + typedef std::function<void(const CommonAPI::CallStatus&, const am_Error_e&)> SetMainSourceNotificationConfigurationAsyncCallback; + + + /** + * Callback that is called when the number of connections change + */ + virtual NewMainConnectionEvent& getNewMainConnectionEvent() = 0; + /** + * Callback that is called when the number of connections change + */ + virtual RemovedMainConnectionEvent& getRemovedMainConnectionEvent() = 0; + /** + * Callback that is called when the number of sinks change + */ + virtual NewSinkEvent& getNewSinkEvent() = 0; + /** + * Callback that is called when the number of sinks change + */ + virtual RemovedSinkEvent& getRemovedSinkEvent() = 0; + /** + * Callback that is called when the number of sources change + */ + virtual NewSourceEvent& getNewSourceEvent() = 0; + /** + * Callback that is called when the number of sources change + */ + virtual RemovedSourceEvent& getRemovedSourceEvent() = 0; + /** + * this callback is fired if the number of sink classes changed + */ + virtual NumberOfSinkClassesChangedEvent& getNumberOfSinkClassesChangedEvent() = 0; + /** + * this callback is fired if the number of source classes changed + */ + virtual NumberOfSourceClassesChangedEvent& getNumberOfSourceClassesChangedEvent() = 0; + /** + * This callback is called when the ConnectionState of a connection changed. + */ + virtual MainConnectionStateChangedEvent& getMainConnectionStateChangedEvent() = 0; + /** + * this callback indicates that a sinkSoundProperty has changed. + */ + virtual MainSinkSoundPropertyChangedEvent& getMainSinkSoundPropertyChangedEvent() = 0; + /** + * this callback indicates that a sourceSoundProperty has changed. + */ + virtual MainSourceSoundPropertyChangedEvent& getMainSourceSoundPropertyChangedEvent() = 0; + /** + * this callback is called when the availability of a sink has changed + */ + virtual SinkAvailabilityChangedEvent& getSinkAvailabilityChangedEvent() = 0; + /** + * this callback is called when the availability of source has changed. + */ + virtual SourceAvailabilityChangedEvent& getSourceAvailabilityChangedEvent() = 0; + /** + * this callback indicates a volume change on the indicated sink + */ + virtual VolumeChangedEvent& getVolumeChangedEvent() = 0; + /** + * this callback indicates a mute state change on a sink. + */ + virtual SinkMuteStateChangedEvent& getSinkMuteStateChangedEvent() = 0; + /** + * is fired if a systemProperty changed + */ + virtual SystemPropertyChangedEvent& getSystemPropertyChangedEvent() = 0; + /** + * This callback is fired if the timinginformation for a mainConnectionID changed + */ + virtual TimingInformationChangedEvent& getTimingInformationChangedEvent() = 0; + /** + * This callback is called when a sink is updated. + */ + virtual SinkUpdatedEvent& getSinkUpdatedEvent() = 0; + /** + * This callback is called when a source is updated. + */ + virtual SourceUpdatedEvent& getSourceUpdatedEvent() = 0; + /** + * This callback is called when a notificated value of a sink changes. + */ + virtual SinkNotificationEvent& getSinkNotificationEvent() = 0; + /** + * This callback is called when a notifcated value of a source changes. + */ + virtual SourceNotificationEvent& getSourceNotificationEvent() = 0; + /** + * This callback is triggered when a mainNotificationConfiguration is changed. + */ + virtual MainSinkNotificationConfigurationChangedEvent& getMainSinkNotificationConfigurationChangedEvent() = 0; + /** + * This callback is triggered when a mainNotificationConfiguration is changed. + */ + virtual MainSourceNotificationConfigurationChangedEvent& getMainSourceNotificationConfigurationChangedEvent() = 0; + + /** + * connects a source to sink + (at)return E_OK on success, E_NOT_POSSIBLE on + * failure, E_ALREADY_EXISTS if the connection does already exists + */ + virtual void connect(const am_sourceID_t& sourceID, const am_sinkID_t& sinkID, CommonAPI::CallStatus& callStatus, am_mainConnectionID_t& mainConnectionID, am_Error_e& error) = 0; + virtual std::future<CommonAPI::CallStatus> connectAsync(const am_sourceID_t& sourceID, const am_sinkID_t& sinkID, ConnectAsyncCallback callback) = 0; + /** + * disconnects a mainConnection + (at)return E_OK on successes, E_NON_EXISTENT if + * the connection does not exist, E_NOT_POSSIBLE on error. + */ + virtual void disconnect(const am_mainConnectionID_t& mainConnectionID, CommonAPI::CallStatus& callStatus, am_Error_e& error) = 0; + virtual std::future<CommonAPI::CallStatus> disconnectAsync(const am_mainConnectionID_t& mainConnectionID, DisconnectAsyncCallback callback) = 0; + /** + * sets the volume for a sink + (at)return E_OK on success, E_UNKOWN on error, + * E_OUT_OF_RANGE in case the value is out of range + */ + virtual void setVolume(const am_sinkID_t& sinkID, const am_mainVolume_t& volume, CommonAPI::CallStatus& callStatus, am_Error_e& error) = 0; + virtual std::future<CommonAPI::CallStatus> setVolumeAsync(const am_sinkID_t& sinkID, const am_mainVolume_t& volume, SetVolumeAsyncCallback callback) = 0; + /** + * This function is used to increment or decrement the current volume for a + * sink. + (at)return E_OK on success, E_UNKNOWN on error and E_OUT_OF_RANGE if the + * value is not in the given volume range. + */ + virtual void volumeStep(const am_sinkID_t& sinkID, const int16_t& volStep, CommonAPI::CallStatus& callStatus, am_Error_e& error) = 0; + virtual std::future<CommonAPI::CallStatus> volumeStepAsync(const am_sinkID_t& sinkID, const int16_t& volStep, VolumeStepAsyncCallback callback) = 0; + /** + * sets the mute state of a sink + (at)return E_OK on success, E_UNKNOWN on error. + * If the mute state is already the desired one, the Daemon will return E_OK. + */ + virtual void setSinkMuteState(const am_sinkID_t& sinkID, const am_MuteState_e& muteState, CommonAPI::CallStatus& callStatus, am_Error_e& error) = 0; + virtual std::future<CommonAPI::CallStatus> setSinkMuteStateAsync(const am_sinkID_t& sinkID, const am_MuteState_e& muteState, SetSinkMuteStateAsyncCallback callback) = 0; + /** + * This method is used to set sound properties, e.g. Equalizer Values. Since the + * capabilities of the system can differ, the exact key value pairs can be + * extended in each product + (at)return E_OK on success, E_OUT_OF_RANGE if value + * exceeds range, E_UNKNOWN in case of an error + */ + virtual void setMainSinkSoundProperty(const am_sinkID_t& sinkID, const am_MainSoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus, am_Error_e& error) = 0; + virtual std::future<CommonAPI::CallStatus> setMainSinkSoundPropertyAsync(const am_sinkID_t& sinkID, const am_MainSoundProperty_s& soundProperty, SetMainSinkSoundPropertyAsyncCallback callback) = 0; + /** + * This method is used to set sound properties, e.g. Equalizer Values. Since the + * capabilities of the system can differ, the exact key value pairs can be + * extended in each product + (at)return E_OK on success, E_OUT_OF_RANGE if value + * exceeds range, E_UNKNOWN in case of an error + */ + virtual void setMainSourceSoundProperty(const am_sourceID_t& sourceID, const am_MainSoundProperty_s& soundProperty, CommonAPI::CallStatus& callStatus, am_Error_e& error) = 0; + virtual std::future<CommonAPI::CallStatus> setMainSourceSoundPropertyAsync(const am_sourceID_t& sourceID, const am_MainSoundProperty_s& soundProperty, SetMainSourceSoundPropertyAsyncCallback callback) = 0; + /** + * is used to set a specific system property. + (at)return E_OK on success, + * E_OUT_OF_RANGE if value exceeds range, E_UNKNOWN in case of an error + */ + virtual void setSystemProperty(const am_SystemProperty_s& property, CommonAPI::CallStatus& callStatus, am_Error_e& error) = 0; + virtual std::future<CommonAPI::CallStatus> setSystemPropertyAsync(const am_SystemProperty_s& property, SetSystemPropertyAsyncCallback callback) = 0; + /** + * returns the actual list of MainConnections + (at)return E_OK on success, + * E_DATABASE_ERROR on error + */ + virtual void getListMainConnections(CommonAPI::CallStatus& callStatus, am_MainConnection_L& listConnections, am_Error_e& error) = 0; + virtual std::future<CommonAPI::CallStatus> getListMainConnectionsAsync(GetListMainConnectionsAsyncCallback callback) = 0; + /** + * returns the actual list of Sinks + (at)return E_OK on success, E_DATABASE_ERROR + * on error + */ + virtual void getListMainSinks(CommonAPI::CallStatus& callStatus, am_SinkType_L& listMainSinks, am_Error_e& error) = 0; + virtual std::future<CommonAPI::CallStatus> getListMainSinksAsync(GetListMainSinksAsyncCallback callback) = 0; + /** + * returns the actual list of Sources + (at)return E_OK on success, E_DATABASE_ERROR + * on error + */ + virtual void getListMainSources(CommonAPI::CallStatus& callStatus, am_SourceType_L& listMainSources, am_Error_e& error) = 0; + virtual std::future<CommonAPI::CallStatus> getListMainSourcesAsync(GetListMainSourcesAsyncCallback callback) = 0; + /** + * This is used to retrieve all source sound properties related to a source. + * Returns a vector of the sound properties and values as pair + (at)return E_OK on + * success, E_DATABASE_ERROR on error + */ + virtual void getListMainSinkSoundProperties(const am_sinkID_t& sinkID, CommonAPI::CallStatus& callStatus, am_MainSoundProperty_L& listSoundProperties, am_Error_e& error) = 0; + virtual std::future<CommonAPI::CallStatus> getListMainSinkSoundPropertiesAsync(const am_sinkID_t& sinkID, GetListMainSinkSoundPropertiesAsyncCallback callback) = 0; + /** + * This is used to retrieve all source sound properties related to a + * source. + (at)return E_OK on success, E_DATABASE_ERROR on error + */ + virtual void getListMainSourceSoundProperties(const am_sourceID_t& sourceID, CommonAPI::CallStatus& callStatus, am_MainSoundProperty_L& listSourceProperties, am_Error_e& error) = 0; + virtual std::future<CommonAPI::CallStatus> getListMainSourceSoundPropertiesAsync(const am_sourceID_t& sourceID, GetListMainSourceSoundPropertiesAsyncCallback callback) = 0; + /** + * This is used to retrieve SourceClass Information of all source classes + * + (at)return E_OK on success, E_DATABASE_ERROR on error + */ + virtual void getListSourceClasses(CommonAPI::CallStatus& callStatus, am_SourceClass_L& listSourceClasses, am_Error_e& error) = 0; + virtual std::future<CommonAPI::CallStatus> getListSourceClassesAsync(GetListSourceClassesAsyncCallback callback) = 0; + /** + * This is used to retrieve SinkClass Information of all sink classes + (at)return + * E_OK on success, E_DATABASE_ERROR on error + */ + virtual void getListSinkClasses(CommonAPI::CallStatus& callStatus, am_SinkClass_L& listSinkClasses, am_Error_e& error) = 0; + virtual std::future<CommonAPI::CallStatus> getListSinkClassesAsync(GetListSinkClassesAsyncCallback callback) = 0; + /** + * Retrieves a complete list of all systemProperties. + (at)return E_OK on success, + * E_DATABASE_ERROR on error + */ + virtual void getListSystemProperties(CommonAPI::CallStatus& callStatus, am_SystemProperty_L& listSystemProperties, am_Error_e& error) = 0; + virtual std::future<CommonAPI::CallStatus> getListSystemPropertiesAsync(GetListSystemPropertiesAsyncCallback callback) = 0; + /** + * returns the delay in ms that the audiopath for the given mainConnection + * has + (at)return E_OK on success, E_NOT_POSSIBLE if timing information is not + * yet retrieved, E_DATABASE_ERROR on read error on the database + */ + virtual void getTimingInformation(const am_mainConnectionID_t& mainConnectionID, CommonAPI::CallStatus& callStatus, am_timeSync_t& delay, am_Error_e& error) = 0; + virtual std::future<CommonAPI::CallStatus> getTimingInformationAsync(const am_mainConnectionID_t& mainConnectionID, GetTimingInformationAsyncCallback callback) = 0; + /** + * Retrieves the list of MainNotifications for a sink. Does not return the + * possible ones. + */ + virtual void getListMainSinkNotificationConfigurations(const am_sinkID_t& sinkID, CommonAPI::CallStatus& callStatus, am_NotificationConfiguration_L& listMainNotificationConfigurations, am_Error_e& error) = 0; + virtual std::future<CommonAPI::CallStatus> getListMainSinkNotificationConfigurationsAsync(const am_sinkID_t& sinkID, GetListMainSinkNotificationConfigurationsAsyncCallback callback) = 0; + /** + * Retrieves the list of MainNotifications for a source. Does not return the + * possible ones. + */ + virtual void getListMainSourceNotificationConfigurations(const am_sourceID_t& sourceID, CommonAPI::CallStatus& callStatus, am_NotificationConfiguration_L& listMainNotificationConfigurations, am_Error_e& error) = 0; + virtual std::future<CommonAPI::CallStatus> getListMainSourceNotificationConfigurationsAsync(const am_sourceID_t& sourceID, GetListMainSourceNotificationConfigurationsAsyncCallback callback) = 0; + /** + * sets a MainNotificationConfiuration. This can be used to turn on an off + * notifications an to change the mode of the configuration. + (at)return E_OK on + * success, E_NON_EXISTENT if sinkID does not exists, E_DATABASE_ERROR on error + */ + virtual void setMainSinkNotificationConfiguration(const am_sinkID_t& sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration, CommonAPI::CallStatus& callStatus, am_Error_e& error) = 0; + virtual std::future<CommonAPI::CallStatus> setMainSinkNotificationConfigurationAsync(const am_sinkID_t& sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration, SetMainSinkNotificationConfigurationAsyncCallback callback) = 0; + /** + * sets a MainNotificationConfiuration. This can be used to turn on an off + * notifications an to change the mode of the configuration. + (at)return E_OK on + * success, E_NON_EXISTENT if sourceID does not exists, E_DATABASE_ERROR on error + */ + virtual void setMainSourceNotificationConfiguration(const am_sourceID_t& sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration, CommonAPI::CallStatus& callStatus, am_Error_e& error) = 0; + virtual std::future<CommonAPI::CallStatus> setMainSourceNotificationConfigurationAsync(const am_sourceID_t& sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration, SetMainSourceNotificationConfigurationAsyncCallback callback) = 0; +}; + +} // namespace am +} // namespace genivi +} // namespace org + +#endif // ORG_GENIVI_AM_Command_Control_PROXY_BASE_H_ diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlStub.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlStub.h new file mode 100644 index 0000000..4e15ce0 --- /dev/null +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlStub.h @@ -0,0 +1,492 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +/** + * The interface towards the Controlling Instance (e.g HMI). It handles the + * communication towards the HMI and other system components who need to interact + * with the audiomanagement. +There are two rules that have to be kept in mind + * when implementing against this interface: + * @author Christian Mueller + */ +#ifndef ORG_GENIVI_AM_Command_Control_STUB_H_ +#define ORG_GENIVI_AM_Command_Control_STUB_H_ + + + +#include <org/genivi/am.h> + +#include "CommandControl.h" + +#if !defined (COMMONAPI_INTERNAL_COMPILATION) +#define COMMONAPI_INTERNAL_COMPILATION +#endif + +#include <CommonAPI/InputStream.h> +#include <CommonAPI/OutputStream.h> +#include <CommonAPI/SerializableStruct.h> +#include <cstdint> +#include <string> +#include <unordered_set> +#include <vector> + +#include <CommonAPI/Stub.h> + +#undef COMMONAPI_INTERNAL_COMPILATION + +namespace org { +namespace genivi { +namespace am { + +/** + * Receives messages from remote and handles all dispatching of deserialized calls + * to a stub for the service CommandControl. 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 CommandControlStubAdapter: virtual public CommonAPI::StubAdapter, public CommandControl { + public: + + /** + * Sends a broadcast event for newMainConnection. Should not be called directly. + * Instead, the "fire<broadcastName>Event" methods of the stub should be used. + */ + virtual void fireNewMainConnectionEvent(const am_MainConnectionType_s& mainConnection) = 0; + /** + * Sends a broadcast event for removedMainConnection. Should not be called directly. + * Instead, the "fire<broadcastName>Event" methods of the stub should be used. + */ + virtual void fireRemovedMainConnectionEvent(const am_mainConnectionID_t& mainConnection) = 0; + /** + * Sends a broadcast event for newSink. Should not be called directly. + * Instead, the "fire<broadcastName>Event" methods of the stub should be used. + */ + virtual void fireNewSinkEvent(const am_SinkType_s& sink) = 0; + /** + * Sends a broadcast event for removedSink. Should not be called directly. + * Instead, the "fire<broadcastName>Event" methods of the stub should be used. + */ + virtual void fireRemovedSinkEvent(const am_sinkID_t& sinkID) = 0; + /** + * Sends a broadcast event for newSource. Should not be called directly. + * Instead, the "fire<broadcastName>Event" methods of the stub should be used. + */ + virtual void fireNewSourceEvent(const am_SourceType_s& source) = 0; + /** + * Sends a broadcast event for removedSource. Should not be called directly. + * Instead, the "fire<broadcastName>Event" methods of the stub should be used. + */ + virtual void fireRemovedSourceEvent(const am_sourceID_t& source) = 0; + /** + * Sends a broadcast event for numberOfSinkClassesChanged. Should not be called directly. + * Instead, the "fire<broadcastName>Event" methods of the stub should be used. + */ + virtual void fireNumberOfSinkClassesChangedEvent() = 0; + /** + * Sends a broadcast event for numberOfSourceClassesChanged. Should not be called directly. + * Instead, the "fire<broadcastName>Event" methods of the stub should be used. + */ + virtual void fireNumberOfSourceClassesChangedEvent() = 0; + /** + * Sends a broadcast event for mainConnectionStateChanged. Should not be called directly. + * Instead, the "fire<broadcastName>Event" methods of the stub should be used. + */ + virtual void fireMainConnectionStateChangedEvent(const am_mainConnectionID_t& connectionID, const am_ConnectionState_e& connectionState) = 0; + /** + * Sends a broadcast event for mainSinkSoundPropertyChanged. Should not be called directly. + * Instead, the "fire<broadcastName>Event" methods of the stub should be used. + */ + virtual void fireMainSinkSoundPropertyChangedEvent(const am_sinkID_t& sinkID, const am_MainSoundProperty_s& soundProperty) = 0; + /** + * Sends a broadcast event for mainSourceSoundPropertyChanged. Should not be called directly. + * Instead, the "fire<broadcastName>Event" methods of the stub should be used. + */ + virtual void fireMainSourceSoundPropertyChangedEvent(const am_sourceID_t& sourceID, const am_MainSoundProperty_s& soundProperty) = 0; + /** + * Sends a broadcast event for sinkAvailabilityChanged. Should not be called directly. + * Instead, the "fire<broadcastName>Event" methods of the stub should be used. + */ + virtual void fireSinkAvailabilityChangedEvent(const am_sinkID_t& sinkID, const am_Availability_s& availability) = 0; + /** + * Sends a broadcast event for sourceAvailabilityChanged. Should not be called directly. + * Instead, the "fire<broadcastName>Event" methods of the stub should be used. + */ + virtual void fireSourceAvailabilityChangedEvent(const am_sourceID_t& sourceID, const am_Availability_s& availability) = 0; + /** + * Sends a broadcast event for volumeChanged. Should not be called directly. + * Instead, the "fire<broadcastName>Event" methods of the stub should be used. + */ + virtual void fireVolumeChangedEvent(const am_sinkID_t& sinkID, const am_mainVolume_t& volume) = 0; + /** + * Sends a broadcast event for sinkMuteStateChanged. Should not be called directly. + * Instead, the "fire<broadcastName>Event" methods of the stub should be used. + */ + virtual void fireSinkMuteStateChangedEvent(const am_sinkID_t& sinkID, const am_MuteState_e& muteState) = 0; + /** + * Sends a broadcast event for systemPropertyChanged. Should not be called directly. + * Instead, the "fire<broadcastName>Event" methods of the stub should be used. + */ + virtual void fireSystemPropertyChangedEvent(const am_SystemProperty_s& systemProperty) = 0; + /** + * Sends a broadcast event for timingInformationChanged. Should not be called directly. + * Instead, the "fire<broadcastName>Event" methods of the stub should be used. + */ + virtual void fireTimingInformationChangedEvent(const am_mainConnectionID_t& mainConnectionID, const am_timeSync_t& time) = 0; + /** + * Sends a broadcast event for sinkUpdated. Should not be called directly. + * Instead, the "fire<broadcastName>Event" methods of the stub should be used. + */ + virtual void fireSinkUpdatedEvent(const am_sinkID_t& sinkID, const am_sinkClass_t& sinkClassID, const am_MainSoundProperty_L& listMainSoundProperties) = 0; + /** + * Sends a broadcast event for sourceUpdated. Should not be called directly. + * Instead, the "fire<broadcastName>Event" methods of the stub should be used. + */ + virtual void fireSourceUpdatedEvent(const am_sourceID_t& sourceID, const am_sourceClass_t& sourceClassID, const am_MainSoundProperty_L& listMainSoundProperties) = 0; + /** + * Sends a broadcast event for sinkNotification. Should not be called directly. + * Instead, the "fire<broadcastName>Event" methods of the stub should be used. + */ + virtual void fireSinkNotificationEvent(const am_sinkID_t& sinkID, const am_NotificationPayload_s& notification) = 0; + /** + * Sends a broadcast event for sourceNotification. Should not be called directly. + * Instead, the "fire<broadcastName>Event" methods of the stub should be used. + */ + virtual void fireSourceNotificationEvent(const am_sourceID_t& sourceID, const am_NotificationPayload_s& notification) = 0; + /** + * Sends a broadcast event for mainSinkNotificationConfigurationChanged. Should not be called directly. + * Instead, the "fire<broadcastName>Event" methods of the stub should be used. + */ + virtual void fireMainSinkNotificationConfigurationChangedEvent(const am_sinkID_t& sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration) = 0; + /** + * Sends a broadcast event for mainSourceNotificationConfigurationChanged. Should not be called directly. + * Instead, the "fire<broadcastName>Event" methods of the stub should be used. + */ + virtual void fireMainSourceNotificationConfigurationChangedEvent(const am_sourceID_t& sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration) = 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 CommandControl. + * 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 CommandControlStubRemoteEvent { + public: + virtual ~CommandControlStubRemoteEvent() { } + +}; + + +/** + * Defines the interface that must be implemented by any class that should provide + * the service CommandControl 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 CommandControlStub: public virtual CommonAPI::Stub<CommandControlStubAdapter, CommandControlStubRemoteEvent> { +public: + virtual ~CommandControlStub() { } + virtual const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId) = 0; + + + /** + * connects a source to sink + (at)return E_OK on success, E_NOT_POSSIBLE on + * failure, E_ALREADY_EXISTS if the connection does already exists + */ + /// This is the method that will be called on remote calls on the method connect. + virtual void connect(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sourceID_t sourceID, am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID, am_Error_e& error) = 0; + /** + * disconnects a mainConnection + (at)return E_OK on successes, E_NON_EXISTENT if + * the connection does not exist, E_NOT_POSSIBLE on error. + */ + /// This is the method that will be called on remote calls on the method disconnect. + virtual void disconnect(const std::shared_ptr<CommonAPI::ClientId> clientId, am_mainConnectionID_t mainConnectionID, am_Error_e& error) = 0; + /** + * sets the volume for a sink + (at)return E_OK on success, E_UNKOWN on error, + * E_OUT_OF_RANGE in case the value is out of range + */ + /// This is the method that will be called on remote calls on the method setVolume. + virtual void setVolume(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sinkID_t sinkID, am_mainVolume_t volume, am_Error_e& error) = 0; + /** + * This function is used to increment or decrement the current volume for a + * sink. + (at)return E_OK on success, E_UNKNOWN on error and E_OUT_OF_RANGE if the + * value is not in the given volume range. + */ + /// This is the method that will be called on remote calls on the method volumeStep. + virtual void volumeStep(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sinkID_t sinkID, int16_t volStep, am_Error_e& error) = 0; + /** + * sets the mute state of a sink + (at)return E_OK on success, E_UNKNOWN on error. + * If the mute state is already the desired one, the Daemon will return E_OK. + */ + /// This is the method that will be called on remote calls on the method setSinkMuteState. + virtual void setSinkMuteState(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sinkID_t sinkID, am_MuteState_e muteState, am_Error_e& error) = 0; + /** + * This method is used to set sound properties, e.g. Equalizer Values. Since the + * capabilities of the system can differ, the exact key value pairs can be + * extended in each product + (at)return E_OK on success, E_OUT_OF_RANGE if value + * exceeds range, E_UNKNOWN in case of an error + */ + /// This is the method that will be called on remote calls on the method setMainSinkSoundProperty. + virtual void setMainSinkSoundProperty(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sinkID_t sinkID, am_MainSoundProperty_s soundProperty, am_Error_e& error) = 0; + /** + * This method is used to set sound properties, e.g. Equalizer Values. Since the + * capabilities of the system can differ, the exact key value pairs can be + * extended in each product + (at)return E_OK on success, E_OUT_OF_RANGE if value + * exceeds range, E_UNKNOWN in case of an error + */ + /// This is the method that will be called on remote calls on the method setMainSourceSoundProperty. + virtual void setMainSourceSoundProperty(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sourceID_t sourceID, am_MainSoundProperty_s soundProperty, am_Error_e& error) = 0; + /** + * is used to set a specific system property. + (at)return E_OK on success, + * E_OUT_OF_RANGE if value exceeds range, E_UNKNOWN in case of an error + */ + /// This is the method that will be called on remote calls on the method setSystemProperty. + virtual void setSystemProperty(const std::shared_ptr<CommonAPI::ClientId> clientId, am_SystemProperty_s property, am_Error_e& error) = 0; + /** + * returns the actual list of MainConnections + (at)return E_OK on success, + * E_DATABASE_ERROR on error + */ + /// This is the method that will be called on remote calls on the method getListMainConnections. + virtual void getListMainConnections(const std::shared_ptr<CommonAPI::ClientId> clientId, am_MainConnection_L& listConnections, am_Error_e& error) = 0; + /** + * returns the actual list of Sinks + (at)return E_OK on success, E_DATABASE_ERROR + * on error + */ + /// This is the method that will be called on remote calls on the method getListMainSinks. + virtual void getListMainSinks(const std::shared_ptr<CommonAPI::ClientId> clientId, am_SinkType_L& listMainSinks, am_Error_e& error) = 0; + /** + * returns the actual list of Sources + (at)return E_OK on success, E_DATABASE_ERROR + * on error + */ + /// This is the method that will be called on remote calls on the method getListMainSources. + virtual void getListMainSources(const std::shared_ptr<CommonAPI::ClientId> clientId, am_SourceType_L& listMainSources, am_Error_e& error) = 0; + /** + * This is used to retrieve all source sound properties related to a source. + * Returns a vector of the sound properties and values as pair + (at)return E_OK on + * success, E_DATABASE_ERROR on error + */ + /// This is the method that will be called on remote calls on the method getListMainSinkSoundProperties. + virtual void getListMainSinkSoundProperties(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sinkID_t sinkID, am_MainSoundProperty_L& listSoundProperties, am_Error_e& error) = 0; + /** + * This is used to retrieve all source sound properties related to a + * source. + (at)return E_OK on success, E_DATABASE_ERROR on error + */ + /// This is the method that will be called on remote calls on the method getListMainSourceSoundProperties. + virtual void getListMainSourceSoundProperties(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sourceID_t sourceID, am_MainSoundProperty_L& listSourceProperties, am_Error_e& error) = 0; + /** + * This is used to retrieve SourceClass Information of all source classes + * + (at)return E_OK on success, E_DATABASE_ERROR on error + */ + /// This is the method that will be called on remote calls on the method getListSourceClasses. + virtual void getListSourceClasses(const std::shared_ptr<CommonAPI::ClientId> clientId, am_SourceClass_L& listSourceClasses, am_Error_e& error) = 0; + /** + * This is used to retrieve SinkClass Information of all sink classes + (at)return + * E_OK on success, E_DATABASE_ERROR on error + */ + /// This is the method that will be called on remote calls on the method getListSinkClasses. + virtual void getListSinkClasses(const std::shared_ptr<CommonAPI::ClientId> clientId, am_SinkClass_L& listSinkClasses, am_Error_e& error) = 0; + /** + * Retrieves a complete list of all systemProperties. + (at)return E_OK on success, + * E_DATABASE_ERROR on error + */ + /// This is the method that will be called on remote calls on the method getListSystemProperties. + virtual void getListSystemProperties(const std::shared_ptr<CommonAPI::ClientId> clientId, am_SystemProperty_L& listSystemProperties, am_Error_e& error) = 0; + /** + * returns the delay in ms that the audiopath for the given mainConnection + * has + (at)return E_OK on success, E_NOT_POSSIBLE if timing information is not + * yet retrieved, E_DATABASE_ERROR on read error on the database + */ + /// This is the method that will be called on remote calls on the method getTimingInformation. + virtual void getTimingInformation(const std::shared_ptr<CommonAPI::ClientId> clientId, am_mainConnectionID_t mainConnectionID, am_timeSync_t& delay, am_Error_e& error) = 0; + /** + * Retrieves the list of MainNotifications for a sink. Does not return the + * possible ones. + */ + /// This is the method that will be called on remote calls on the method getListMainSinkNotificationConfigurations. + virtual void getListMainSinkNotificationConfigurations(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sinkID_t sinkID, am_NotificationConfiguration_L& listMainNotificationConfigurations, am_Error_e& error) = 0; + /** + * Retrieves the list of MainNotifications for a source. Does not return the + * possible ones. + */ + /// This is the method that will be called on remote calls on the method getListMainSourceNotificationConfigurations. + virtual void getListMainSourceNotificationConfigurations(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sourceID_t sourceID, am_NotificationConfiguration_L& listMainNotificationConfigurations, am_Error_e& error) = 0; + /** + * sets a MainNotificationConfiuration. This can be used to turn on an off + * notifications an to change the mode of the configuration. + (at)return E_OK on + * success, E_NON_EXISTENT if sinkID does not exists, E_DATABASE_ERROR on error + */ + /// This is the method that will be called on remote calls on the method setMainSinkNotificationConfiguration. + virtual void setMainSinkNotificationConfiguration(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sinkID_t sinkID, am_NotificationConfiguration_s mainNotificationConfiguration, am_Error_e& error) = 0; + /** + * sets a MainNotificationConfiuration. This can be used to turn on an off + * notifications an to change the mode of the configuration. + (at)return E_OK on + * success, E_NON_EXISTENT if sourceID does not exists, E_DATABASE_ERROR on error + */ + /// This is the method that will be called on remote calls on the method setMainSourceNotificationConfiguration. + virtual void setMainSourceNotificationConfiguration(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sourceID_t sourceID, am_NotificationConfiguration_s mainNotificationConfiguration, am_Error_e& error) = 0; + /** + * Callback that is called when the number of connections change + */ + /// Sends a broadcast event for newMainConnection. + virtual void fireNewMainConnectionEvent(const am_MainConnectionType_s& mainConnection) = 0; + /** + * Callback that is called when the number of connections change + */ + /// Sends a broadcast event for removedMainConnection. + virtual void fireRemovedMainConnectionEvent(const am_mainConnectionID_t& mainConnection) = 0; + /** + * Callback that is called when the number of sinks change + */ + /// Sends a broadcast event for newSink. + virtual void fireNewSinkEvent(const am_SinkType_s& sink) = 0; + /** + * Callback that is called when the number of sinks change + */ + /// Sends a broadcast event for removedSink. + virtual void fireRemovedSinkEvent(const am_sinkID_t& sinkID) = 0; + /** + * Callback that is called when the number of sources change + */ + /// Sends a broadcast event for newSource. + virtual void fireNewSourceEvent(const am_SourceType_s& source) = 0; + /** + * Callback that is called when the number of sources change + */ + /// Sends a broadcast event for removedSource. + virtual void fireRemovedSourceEvent(const am_sourceID_t& source) = 0; + /** + * this callback is fired if the number of sink classes changed + */ + /// Sends a broadcast event for numberOfSinkClassesChanged. + virtual void fireNumberOfSinkClassesChangedEvent() = 0; + /** + * this callback is fired if the number of source classes changed + */ + /// Sends a broadcast event for numberOfSourceClassesChanged. + virtual void fireNumberOfSourceClassesChangedEvent() = 0; + /** + * This callback is called when the ConnectionState of a connection changed. + */ + /// Sends a broadcast event for mainConnectionStateChanged. + virtual void fireMainConnectionStateChangedEvent(const am_mainConnectionID_t& connectionID, const am_ConnectionState_e& connectionState) = 0; + /** + * this callback indicates that a sinkSoundProperty has changed. + */ + /// Sends a broadcast event for mainSinkSoundPropertyChanged. + virtual void fireMainSinkSoundPropertyChangedEvent(const am_sinkID_t& sinkID, const am_MainSoundProperty_s& soundProperty) = 0; + /** + * this callback indicates that a sourceSoundProperty has changed. + */ + /// Sends a broadcast event for mainSourceSoundPropertyChanged. + virtual void fireMainSourceSoundPropertyChangedEvent(const am_sourceID_t& sourceID, const am_MainSoundProperty_s& soundProperty) = 0; + /** + * this callback is called when the availability of a sink has changed + */ + /// Sends a broadcast event for sinkAvailabilityChanged. + virtual void fireSinkAvailabilityChangedEvent(const am_sinkID_t& sinkID, const am_Availability_s& availability) = 0; + /** + * this callback is called when the availability of source has changed. + */ + /// Sends a broadcast event for sourceAvailabilityChanged. + virtual void fireSourceAvailabilityChangedEvent(const am_sourceID_t& sourceID, const am_Availability_s& availability) = 0; + /** + * this callback indicates a volume change on the indicated sink + */ + /// Sends a broadcast event for volumeChanged. + virtual void fireVolumeChangedEvent(const am_sinkID_t& sinkID, const am_mainVolume_t& volume) = 0; + /** + * this callback indicates a mute state change on a sink. + */ + /// Sends a broadcast event for sinkMuteStateChanged. + virtual void fireSinkMuteStateChangedEvent(const am_sinkID_t& sinkID, const am_MuteState_e& muteState) = 0; + /** + * is fired if a systemProperty changed + */ + /// Sends a broadcast event for systemPropertyChanged. + virtual void fireSystemPropertyChangedEvent(const am_SystemProperty_s& systemProperty) = 0; + /** + * This callback is fired if the timinginformation for a mainConnectionID changed + */ + /// Sends a broadcast event for timingInformationChanged. + virtual void fireTimingInformationChangedEvent(const am_mainConnectionID_t& mainConnectionID, const am_timeSync_t& time) = 0; + /** + * This callback is called when a sink is updated. + */ + /// Sends a broadcast event for sinkUpdated. + virtual void fireSinkUpdatedEvent(const am_sinkID_t& sinkID, const am_sinkClass_t& sinkClassID, const am_MainSoundProperty_L& listMainSoundProperties) = 0; + /** + * This callback is called when a source is updated. + */ + /// Sends a broadcast event for sourceUpdated. + virtual void fireSourceUpdatedEvent(const am_sourceID_t& sourceID, const am_sourceClass_t& sourceClassID, const am_MainSoundProperty_L& listMainSoundProperties) = 0; + /** + * This callback is called when a notificated value of a sink changes. + */ + /// Sends a broadcast event for sinkNotification. + virtual void fireSinkNotificationEvent(const am_sinkID_t& sinkID, const am_NotificationPayload_s& notification) = 0; + /** + * This callback is called when a notifcated value of a source changes. + */ + /// Sends a broadcast event for sourceNotification. + virtual void fireSourceNotificationEvent(const am_sourceID_t& sourceID, const am_NotificationPayload_s& notification) = 0; + /** + * This callback is triggered when a mainNotificationConfiguration is changed. + */ + /// Sends a broadcast event for mainSinkNotificationConfigurationChanged. + virtual void fireMainSinkNotificationConfigurationChangedEvent(const am_sinkID_t& sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration) = 0; + /** + * This callback is triggered when a mainNotificationConfiguration is changed. + */ + /// Sends a broadcast event for mainSourceNotificationConfigurationChanged. + virtual void fireMainSourceNotificationConfigurationChangedEvent(const am_sourceID_t& sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration) = 0; + + using CommonAPI::Stub<CommandControlStubAdapter, CommandControlStubRemoteEvent>::initStubAdapter; + typedef CommonAPI::Stub<CommandControlStubAdapter, CommandControlStubRemoteEvent>::StubAdapterType StubAdapterType; + typedef CommonAPI::Stub<CommandControlStubAdapter, CommandControlStubRemoteEvent>::RemoteEventHandlerType RemoteEventHandlerType; + typedef CommandControlStubRemoteEvent RemoteEventType; + typedef CommandControl StubInterface; +}; + +} // namespace am +} // namespace genivi +} // namespace org + +#endif // ORG_GENIVI_AM_Command_Control_STUB_H_ diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlStubDefault.cpp b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlStubDefault.cpp new file mode 100644 index 0000000..cca1a5e --- /dev/null +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlStubDefault.cpp @@ -0,0 +1,456 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +#include <org/genivi/am/CommandControlStubDefault.h> + +namespace org { +namespace genivi { +namespace am { + +CommandControlStubDefault::CommandControlStubDefault(): + remoteEventHandler_(this), + interfaceVersion_(CommandControl::getInterfaceVersion()) { +} + +const CommonAPI::Version& CommandControlStubDefault::getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId) { + return interfaceVersion_; +} + +CommandControlStubRemoteEvent* CommandControlStubDefault::initStubAdapter(const std::shared_ptr<CommandControlStubAdapter>& stubAdapter) { + CommonAPI::Stub<CommandControlStubAdapter, CommandControlStubRemoteEvent>::stubAdapter_ = stubAdapter; + return &remoteEventHandler_; +} + + +/** + * connects a source to sink +(at)return E_OK on success, E_NOT_POSSIBLE on + * failure, E_ALREADY_EXISTS if the connection does already exists + */ +void CommandControlStubDefault::connect(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sourceID_t sourceID, am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID, am_Error_e& error) { + // Call old style methods in default + connect(sourceID, sinkID, mainConnectionID, error); +} +void CommandControlStubDefault::connect(am_sourceID_t sourceID, am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID, am_Error_e& error) { + // No operation in default +} + +/** + * disconnects a mainConnection +(at)return E_OK on successes, E_NON_EXISTENT if + * the connection does not exist, E_NOT_POSSIBLE on error. + */ +void CommandControlStubDefault::disconnect(const std::shared_ptr<CommonAPI::ClientId> clientId, am_mainConnectionID_t mainConnectionID, am_Error_e& error) { + // Call old style methods in default + disconnect(mainConnectionID, error); +} +void CommandControlStubDefault::disconnect(am_mainConnectionID_t mainConnectionID, am_Error_e& error) { + // No operation in default +} + +/** + * sets the volume for a sink +(at)return E_OK on success, E_UNKOWN on error, + * E_OUT_OF_RANGE in case the value is out of range + */ +void CommandControlStubDefault::setVolume(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sinkID_t sinkID, am_mainVolume_t volume, am_Error_e& error) { + // Call old style methods in default + setVolume(sinkID, volume, error); +} +void CommandControlStubDefault::setVolume(am_sinkID_t sinkID, am_mainVolume_t volume, am_Error_e& error) { + // No operation in default +} + +/** + * This function is used to increment or decrement the current volume for a + * sink. +(at)return E_OK on success, E_UNKNOWN on error and E_OUT_OF_RANGE if the + * value is not in the given volume range. + */ +void CommandControlStubDefault::volumeStep(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sinkID_t sinkID, int16_t volStep, am_Error_e& error) { + // Call old style methods in default + volumeStep(sinkID, volStep, error); +} +void CommandControlStubDefault::volumeStep(am_sinkID_t sinkID, int16_t volStep, am_Error_e& error) { + // No operation in default +} + +/** + * sets the mute state of a sink +(at)return E_OK on success, E_UNKNOWN on error. + * If the mute state is already the desired one, the Daemon will return E_OK. + */ +void CommandControlStubDefault::setSinkMuteState(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sinkID_t sinkID, am_MuteState_e muteState, am_Error_e& error) { + // Call old style methods in default + setSinkMuteState(sinkID, muteState, error); +} +void CommandControlStubDefault::setSinkMuteState(am_sinkID_t sinkID, am_MuteState_e muteState, am_Error_e& error) { + // No operation in default +} + +/** + * This method is used to set sound properties, e.g. Equalizer Values. Since the + * capabilities of the system can differ, the exact key value pairs can be + * extended in each product +(at)return E_OK on success, E_OUT_OF_RANGE if value + * exceeds range, E_UNKNOWN in case of an error + */ +void CommandControlStubDefault::setMainSinkSoundProperty(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sinkID_t sinkID, am_MainSoundProperty_s soundProperty, am_Error_e& error) { + // Call old style methods in default + setMainSinkSoundProperty(sinkID, soundProperty, error); +} +void CommandControlStubDefault::setMainSinkSoundProperty(am_sinkID_t sinkID, am_MainSoundProperty_s soundProperty, am_Error_e& error) { + // No operation in default +} + +/** + * This method is used to set sound properties, e.g. Equalizer Values. Since the + * capabilities of the system can differ, the exact key value pairs can be + * extended in each product +(at)return E_OK on success, E_OUT_OF_RANGE if value + * exceeds range, E_UNKNOWN in case of an error + */ +void CommandControlStubDefault::setMainSourceSoundProperty(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sourceID_t sourceID, am_MainSoundProperty_s soundProperty, am_Error_e& error) { + // Call old style methods in default + setMainSourceSoundProperty(sourceID, soundProperty, error); +} +void CommandControlStubDefault::setMainSourceSoundProperty(am_sourceID_t sourceID, am_MainSoundProperty_s soundProperty, am_Error_e& error) { + // No operation in default +} + +/** + * is used to set a specific system property. +(at)return E_OK on success, + * E_OUT_OF_RANGE if value exceeds range, E_UNKNOWN in case of an error + */ +void CommandControlStubDefault::setSystemProperty(const std::shared_ptr<CommonAPI::ClientId> clientId, am_SystemProperty_s property, am_Error_e& error) { + // Call old style methods in default + setSystemProperty(property, error); +} +void CommandControlStubDefault::setSystemProperty(am_SystemProperty_s property, am_Error_e& error) { + // No operation in default +} + +/** + * returns the actual list of MainConnections +(at)return E_OK on success, + * E_DATABASE_ERROR on error + */ +void CommandControlStubDefault::getListMainConnections(const std::shared_ptr<CommonAPI::ClientId> clientId, am_MainConnection_L& listConnections, am_Error_e& error) { + // Call old style methods in default + getListMainConnections(listConnections, error); +} +void CommandControlStubDefault::getListMainConnections(am_MainConnection_L& listConnections, am_Error_e& error) { + // No operation in default +} + +/** + * returns the actual list of Sinks +(at)return E_OK on success, E_DATABASE_ERROR + * on error + */ +void CommandControlStubDefault::getListMainSinks(const std::shared_ptr<CommonAPI::ClientId> clientId, am_SinkType_L& listMainSinks, am_Error_e& error) { + // Call old style methods in default + getListMainSinks(listMainSinks, error); +} +void CommandControlStubDefault::getListMainSinks(am_SinkType_L& listMainSinks, am_Error_e& error) { + // No operation in default +} + +/** + * returns the actual list of Sources +(at)return E_OK on success, E_DATABASE_ERROR + * on error + */ +void CommandControlStubDefault::getListMainSources(const std::shared_ptr<CommonAPI::ClientId> clientId, am_SourceType_L& listMainSources, am_Error_e& error) { + // Call old style methods in default + getListMainSources(listMainSources, error); +} +void CommandControlStubDefault::getListMainSources(am_SourceType_L& listMainSources, am_Error_e& error) { + // No operation in default +} + +/** + * This is used to retrieve all source sound properties related to a source. + * Returns a vector of the sound properties and values as pair +(at)return E_OK on + * success, E_DATABASE_ERROR on error + */ +void CommandControlStubDefault::getListMainSinkSoundProperties(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sinkID_t sinkID, am_MainSoundProperty_L& listSoundProperties, am_Error_e& error) { + // Call old style methods in default + getListMainSinkSoundProperties(sinkID, listSoundProperties, error); +} +void CommandControlStubDefault::getListMainSinkSoundProperties(am_sinkID_t sinkID, am_MainSoundProperty_L& listSoundProperties, am_Error_e& error) { + // No operation in default +} + +/** + * This is used to retrieve all source sound properties related to a + * source. +(at)return E_OK on success, E_DATABASE_ERROR on error + */ +void CommandControlStubDefault::getListMainSourceSoundProperties(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sourceID_t sourceID, am_MainSoundProperty_L& listSourceProperties, am_Error_e& error) { + // Call old style methods in default + getListMainSourceSoundProperties(sourceID, listSourceProperties, error); +} +void CommandControlStubDefault::getListMainSourceSoundProperties(am_sourceID_t sourceID, am_MainSoundProperty_L& listSourceProperties, am_Error_e& error) { + // No operation in default +} + +/** + * This is used to retrieve SourceClass Information of all source classes + * +(at)return E_OK on success, E_DATABASE_ERROR on error + */ +void CommandControlStubDefault::getListSourceClasses(const std::shared_ptr<CommonAPI::ClientId> clientId, am_SourceClass_L& listSourceClasses, am_Error_e& error) { + // Call old style methods in default + getListSourceClasses(listSourceClasses, error); +} +void CommandControlStubDefault::getListSourceClasses(am_SourceClass_L& listSourceClasses, am_Error_e& error) { + // No operation in default +} + +/** + * This is used to retrieve SinkClass Information of all sink classes +(at)return + * E_OK on success, E_DATABASE_ERROR on error + */ +void CommandControlStubDefault::getListSinkClasses(const std::shared_ptr<CommonAPI::ClientId> clientId, am_SinkClass_L& listSinkClasses, am_Error_e& error) { + // Call old style methods in default + getListSinkClasses(listSinkClasses, error); +} +void CommandControlStubDefault::getListSinkClasses(am_SinkClass_L& listSinkClasses, am_Error_e& error) { + // No operation in default +} + +/** + * Retrieves a complete list of all systemProperties. +(at)return E_OK on success, + * E_DATABASE_ERROR on error + */ +void CommandControlStubDefault::getListSystemProperties(const std::shared_ptr<CommonAPI::ClientId> clientId, am_SystemProperty_L& listSystemProperties, am_Error_e& error) { + // Call old style methods in default + getListSystemProperties(listSystemProperties, error); +} +void CommandControlStubDefault::getListSystemProperties(am_SystemProperty_L& listSystemProperties, am_Error_e& error) { + // No operation in default +} + +/** + * returns the delay in ms that the audiopath for the given mainConnection + * has +(at)return E_OK on success, E_NOT_POSSIBLE if timing information is not + * yet retrieved, E_DATABASE_ERROR on read error on the database + */ +void CommandControlStubDefault::getTimingInformation(const std::shared_ptr<CommonAPI::ClientId> clientId, am_mainConnectionID_t mainConnectionID, am_timeSync_t& delay, am_Error_e& error) { + // Call old style methods in default + getTimingInformation(mainConnectionID, delay, error); +} +void CommandControlStubDefault::getTimingInformation(am_mainConnectionID_t mainConnectionID, am_timeSync_t& delay, am_Error_e& error) { + // No operation in default +} + +/** + * Retrieves the list of MainNotifications for a sink. Does not return the + * possible ones. + */ +void CommandControlStubDefault::getListMainSinkNotificationConfigurations(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sinkID_t sinkID, am_NotificationConfiguration_L& listMainNotificationConfigurations, am_Error_e& error) { + // Call old style methods in default + getListMainSinkNotificationConfigurations(sinkID, listMainNotificationConfigurations, error); +} +void CommandControlStubDefault::getListMainSinkNotificationConfigurations(am_sinkID_t sinkID, am_NotificationConfiguration_L& listMainNotificationConfigurations, am_Error_e& error) { + // No operation in default +} + +/** + * Retrieves the list of MainNotifications for a source. Does not return the + * possible ones. + */ +void CommandControlStubDefault::getListMainSourceNotificationConfigurations(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sourceID_t sourceID, am_NotificationConfiguration_L& listMainNotificationConfigurations, am_Error_e& error) { + // Call old style methods in default + getListMainSourceNotificationConfigurations(sourceID, listMainNotificationConfigurations, error); +} +void CommandControlStubDefault::getListMainSourceNotificationConfigurations(am_sourceID_t sourceID, am_NotificationConfiguration_L& listMainNotificationConfigurations, am_Error_e& error) { + // No operation in default +} + +/** + * sets a MainNotificationConfiuration. This can be used to turn on an off + * notifications an to change the mode of the configuration. +(at)return E_OK on + * success, E_NON_EXISTENT if sinkID does not exists, E_DATABASE_ERROR on error + */ +void CommandControlStubDefault::setMainSinkNotificationConfiguration(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sinkID_t sinkID, am_NotificationConfiguration_s mainNotificationConfiguration, am_Error_e& error) { + // Call old style methods in default + setMainSinkNotificationConfiguration(sinkID, mainNotificationConfiguration, error); +} +void CommandControlStubDefault::setMainSinkNotificationConfiguration(am_sinkID_t sinkID, am_NotificationConfiguration_s mainNotificationConfiguration, am_Error_e& error) { + // No operation in default +} + +/** + * sets a MainNotificationConfiuration. This can be used to turn on an off + * notifications an to change the mode of the configuration. +(at)return E_OK on + * success, E_NON_EXISTENT if sourceID does not exists, E_DATABASE_ERROR on error + */ +void CommandControlStubDefault::setMainSourceNotificationConfiguration(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sourceID_t sourceID, am_NotificationConfiguration_s mainNotificationConfiguration, am_Error_e& error) { + // Call old style methods in default + setMainSourceNotificationConfiguration(sourceID, mainNotificationConfiguration, error); +} +void CommandControlStubDefault::setMainSourceNotificationConfiguration(am_sourceID_t sourceID, am_NotificationConfiguration_s mainNotificationConfiguration, am_Error_e& error) { + // No operation in default +} + + +/** + * Callback that is called when the number of connections change + */ +void CommandControlStubDefault::fireNewMainConnectionEvent(const am_MainConnectionType_s& mainConnection) { + stubAdapter_->fireNewMainConnectionEvent(mainConnection); +} +/** + * Callback that is called when the number of connections change + */ +void CommandControlStubDefault::fireRemovedMainConnectionEvent(const am_mainConnectionID_t& mainConnection) { + stubAdapter_->fireRemovedMainConnectionEvent(mainConnection); +} +/** + * Callback that is called when the number of sinks change + */ +void CommandControlStubDefault::fireNewSinkEvent(const am_SinkType_s& sink) { + stubAdapter_->fireNewSinkEvent(sink); +} +/** + * Callback that is called when the number of sinks change + */ +void CommandControlStubDefault::fireRemovedSinkEvent(const am_sinkID_t& sinkID) { + stubAdapter_->fireRemovedSinkEvent(sinkID); +} +/** + * Callback that is called when the number of sources change + */ +void CommandControlStubDefault::fireNewSourceEvent(const am_SourceType_s& source) { + stubAdapter_->fireNewSourceEvent(source); +} +/** + * Callback that is called when the number of sources change + */ +void CommandControlStubDefault::fireRemovedSourceEvent(const am_sourceID_t& source) { + stubAdapter_->fireRemovedSourceEvent(source); +} +/** + * this callback is fired if the number of sink classes changed + */ +void CommandControlStubDefault::fireNumberOfSinkClassesChangedEvent() { + stubAdapter_->fireNumberOfSinkClassesChangedEvent(); +} +/** + * this callback is fired if the number of source classes changed + */ +void CommandControlStubDefault::fireNumberOfSourceClassesChangedEvent() { + stubAdapter_->fireNumberOfSourceClassesChangedEvent(); +} +/** + * This callback is called when the ConnectionState of a connection changed. + */ +void CommandControlStubDefault::fireMainConnectionStateChangedEvent(const am_mainConnectionID_t& connectionID, const am_ConnectionState_e& connectionState) { + stubAdapter_->fireMainConnectionStateChangedEvent(connectionID, connectionState); +} +/** + * this callback indicates that a sinkSoundProperty has changed. + */ +void CommandControlStubDefault::fireMainSinkSoundPropertyChangedEvent(const am_sinkID_t& sinkID, const am_MainSoundProperty_s& soundProperty) { + stubAdapter_->fireMainSinkSoundPropertyChangedEvent(sinkID, soundProperty); +} +/** + * this callback indicates that a sourceSoundProperty has changed. + */ +void CommandControlStubDefault::fireMainSourceSoundPropertyChangedEvent(const am_sourceID_t& sourceID, const am_MainSoundProperty_s& soundProperty) { + stubAdapter_->fireMainSourceSoundPropertyChangedEvent(sourceID, soundProperty); +} +/** + * this callback is called when the availability of a sink has changed + */ +void CommandControlStubDefault::fireSinkAvailabilityChangedEvent(const am_sinkID_t& sinkID, const am_Availability_s& availability) { + stubAdapter_->fireSinkAvailabilityChangedEvent(sinkID, availability); +} +/** + * this callback is called when the availability of source has changed. + */ +void CommandControlStubDefault::fireSourceAvailabilityChangedEvent(const am_sourceID_t& sourceID, const am_Availability_s& availability) { + stubAdapter_->fireSourceAvailabilityChangedEvent(sourceID, availability); +} +/** + * this callback indicates a volume change on the indicated sink + */ +void CommandControlStubDefault::fireVolumeChangedEvent(const am_sinkID_t& sinkID, const am_mainVolume_t& volume) { + stubAdapter_->fireVolumeChangedEvent(sinkID, volume); +} +/** + * this callback indicates a mute state change on a sink. + */ +void CommandControlStubDefault::fireSinkMuteStateChangedEvent(const am_sinkID_t& sinkID, const am_MuteState_e& muteState) { + stubAdapter_->fireSinkMuteStateChangedEvent(sinkID, muteState); +} +/** + * is fired if a systemProperty changed + */ +void CommandControlStubDefault::fireSystemPropertyChangedEvent(const am_SystemProperty_s& systemProperty) { + stubAdapter_->fireSystemPropertyChangedEvent(systemProperty); +} +/** + * This callback is fired if the timinginformation for a mainConnectionID changed + */ +void CommandControlStubDefault::fireTimingInformationChangedEvent(const am_mainConnectionID_t& mainConnectionID, const am_timeSync_t& time) { + stubAdapter_->fireTimingInformationChangedEvent(mainConnectionID, time); +} +/** + * This callback is called when a sink is updated. + */ +void CommandControlStubDefault::fireSinkUpdatedEvent(const am_sinkID_t& sinkID, const am_sinkClass_t& sinkClassID, const am_MainSoundProperty_L& listMainSoundProperties) { + stubAdapter_->fireSinkUpdatedEvent(sinkID, sinkClassID, listMainSoundProperties); +} +/** + * This callback is called when a source is updated. + */ +void CommandControlStubDefault::fireSourceUpdatedEvent(const am_sourceID_t& sourceID, const am_sourceClass_t& sourceClassID, const am_MainSoundProperty_L& listMainSoundProperties) { + stubAdapter_->fireSourceUpdatedEvent(sourceID, sourceClassID, listMainSoundProperties); +} +/** + * This callback is called when a notificated value of a sink changes. + */ +void CommandControlStubDefault::fireSinkNotificationEvent(const am_sinkID_t& sinkID, const am_NotificationPayload_s& notification) { + stubAdapter_->fireSinkNotificationEvent(sinkID, notification); +} +/** + * This callback is called when a notifcated value of a source changes. + */ +void CommandControlStubDefault::fireSourceNotificationEvent(const am_sourceID_t& sourceID, const am_NotificationPayload_s& notification) { + stubAdapter_->fireSourceNotificationEvent(sourceID, notification); +} +/** + * This callback is triggered when a mainNotificationConfiguration is changed. + */ +void CommandControlStubDefault::fireMainSinkNotificationConfigurationChangedEvent(const am_sinkID_t& sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration) { + stubAdapter_->fireMainSinkNotificationConfigurationChangedEvent(sinkID, mainNotificationConfiguration); +} +/** + * This callback is triggered when a mainNotificationConfiguration is changed. + */ +void CommandControlStubDefault::fireMainSourceNotificationConfigurationChangedEvent(const am_sourceID_t& sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration) { + stubAdapter_->fireMainSourceNotificationConfigurationChangedEvent(sourceID, mainNotificationConfiguration); +} + + +CommandControlStubDefault::RemoteEventHandler::RemoteEventHandler(CommandControlStubDefault* defaultStub): + defaultStub_(defaultStub) { +} + +} // namespace am +} // namespace genivi +} // namespace org diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlStubDefault.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlStubDefault.h new file mode 100644 index 0000000..a6d46f8 --- /dev/null +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlStubDefault.h @@ -0,0 +1,336 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +/** + * The interface towards the Controlling Instance (e.g HMI). It handles the + * communication towards the HMI and other system components who need to interact + * with the audiomanagement. +There are two rules that have to be kept in mind + * when implementing against this interface: + * @author Christian Mueller + */ +#ifndef ORG_GENIVI_AM_Command_Control_STUB_DEFAULT_H_ +#define ORG_GENIVI_AM_Command_Control_STUB_DEFAULT_H_ + + +#include <org/genivi/am/CommandControlStub.h> +#include <sstream> + +namespace org { +namespace genivi { +namespace am { + +/** + * Provides a default implementation for CommandControlStubRemoteEvent and + * CommandControlStub. 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 CommandControlStubDefault : public virtual CommandControlStub { +public: + CommandControlStubDefault(); + + CommandControlStubRemoteEvent* initStubAdapter(const std::shared_ptr<CommandControlStubAdapter>& stubAdapter); + + const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId); + + + /** + * connects a source to sink + (at)return E_OK on success, E_NOT_POSSIBLE on + * failure, E_ALREADY_EXISTS if the connection does already exists + */ + virtual void connect(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sourceID_t sourceID, am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID, am_Error_e& error); + virtual void connect(am_sourceID_t sourceID, am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID, am_Error_e& error); + + /** + * disconnects a mainConnection + (at)return E_OK on successes, E_NON_EXISTENT if + * the connection does not exist, E_NOT_POSSIBLE on error. + */ + virtual void disconnect(const std::shared_ptr<CommonAPI::ClientId> clientId, am_mainConnectionID_t mainConnectionID, am_Error_e& error); + virtual void disconnect(am_mainConnectionID_t mainConnectionID, am_Error_e& error); + + /** + * sets the volume for a sink + (at)return E_OK on success, E_UNKOWN on error, + * E_OUT_OF_RANGE in case the value is out of range + */ + virtual void setVolume(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sinkID_t sinkID, am_mainVolume_t volume, am_Error_e& error); + virtual void setVolume(am_sinkID_t sinkID, am_mainVolume_t volume, am_Error_e& error); + + /** + * This function is used to increment or decrement the current volume for a + * sink. + (at)return E_OK on success, E_UNKNOWN on error and E_OUT_OF_RANGE if the + * value is not in the given volume range. + */ + virtual void volumeStep(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sinkID_t sinkID, int16_t volStep, am_Error_e& error); + virtual void volumeStep(am_sinkID_t sinkID, int16_t volStep, am_Error_e& error); + + /** + * sets the mute state of a sink + (at)return E_OK on success, E_UNKNOWN on error. + * If the mute state is already the desired one, the Daemon will return E_OK. + */ + virtual void setSinkMuteState(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sinkID_t sinkID, am_MuteState_e muteState, am_Error_e& error); + virtual void setSinkMuteState(am_sinkID_t sinkID, am_MuteState_e muteState, am_Error_e& error); + + /** + * This method is used to set sound properties, e.g. Equalizer Values. Since the + * capabilities of the system can differ, the exact key value pairs can be + * extended in each product + (at)return E_OK on success, E_OUT_OF_RANGE if value + * exceeds range, E_UNKNOWN in case of an error + */ + virtual void setMainSinkSoundProperty(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sinkID_t sinkID, am_MainSoundProperty_s soundProperty, am_Error_e& error); + virtual void setMainSinkSoundProperty(am_sinkID_t sinkID, am_MainSoundProperty_s soundProperty, am_Error_e& error); + + /** + * This method is used to set sound properties, e.g. Equalizer Values. Since the + * capabilities of the system can differ, the exact key value pairs can be + * extended in each product + (at)return E_OK on success, E_OUT_OF_RANGE if value + * exceeds range, E_UNKNOWN in case of an error + */ + virtual void setMainSourceSoundProperty(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sourceID_t sourceID, am_MainSoundProperty_s soundProperty, am_Error_e& error); + virtual void setMainSourceSoundProperty(am_sourceID_t sourceID, am_MainSoundProperty_s soundProperty, am_Error_e& error); + + /** + * is used to set a specific system property. + (at)return E_OK on success, + * E_OUT_OF_RANGE if value exceeds range, E_UNKNOWN in case of an error + */ + virtual void setSystemProperty(const std::shared_ptr<CommonAPI::ClientId> clientId, am_SystemProperty_s property, am_Error_e& error); + virtual void setSystemProperty(am_SystemProperty_s property, am_Error_e& error); + + /** + * returns the actual list of MainConnections + (at)return E_OK on success, + * E_DATABASE_ERROR on error + */ + virtual void getListMainConnections(const std::shared_ptr<CommonAPI::ClientId> clientId, am_MainConnection_L& listConnections, am_Error_e& error); + virtual void getListMainConnections(am_MainConnection_L& listConnections, am_Error_e& error); + + /** + * returns the actual list of Sinks + (at)return E_OK on success, E_DATABASE_ERROR + * on error + */ + virtual void getListMainSinks(const std::shared_ptr<CommonAPI::ClientId> clientId, am_SinkType_L& listMainSinks, am_Error_e& error); + virtual void getListMainSinks(am_SinkType_L& listMainSinks, am_Error_e& error); + + /** + * returns the actual list of Sources + (at)return E_OK on success, E_DATABASE_ERROR + * on error + */ + virtual void getListMainSources(const std::shared_ptr<CommonAPI::ClientId> clientId, am_SourceType_L& listMainSources, am_Error_e& error); + virtual void getListMainSources(am_SourceType_L& listMainSources, am_Error_e& error); + + /** + * This is used to retrieve all source sound properties related to a source. + * Returns a vector of the sound properties and values as pair + (at)return E_OK on + * success, E_DATABASE_ERROR on error + */ + virtual void getListMainSinkSoundProperties(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sinkID_t sinkID, am_MainSoundProperty_L& listSoundProperties, am_Error_e& error); + virtual void getListMainSinkSoundProperties(am_sinkID_t sinkID, am_MainSoundProperty_L& listSoundProperties, am_Error_e& error); + + /** + * This is used to retrieve all source sound properties related to a + * source. + (at)return E_OK on success, E_DATABASE_ERROR on error + */ + virtual void getListMainSourceSoundProperties(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sourceID_t sourceID, am_MainSoundProperty_L& listSourceProperties, am_Error_e& error); + virtual void getListMainSourceSoundProperties(am_sourceID_t sourceID, am_MainSoundProperty_L& listSourceProperties, am_Error_e& error); + + /** + * This is used to retrieve SourceClass Information of all source classes + * + (at)return E_OK on success, E_DATABASE_ERROR on error + */ + virtual void getListSourceClasses(const std::shared_ptr<CommonAPI::ClientId> clientId, am_SourceClass_L& listSourceClasses, am_Error_e& error); + virtual void getListSourceClasses(am_SourceClass_L& listSourceClasses, am_Error_e& error); + + /** + * This is used to retrieve SinkClass Information of all sink classes + (at)return + * E_OK on success, E_DATABASE_ERROR on error + */ + virtual void getListSinkClasses(const std::shared_ptr<CommonAPI::ClientId> clientId, am_SinkClass_L& listSinkClasses, am_Error_e& error); + virtual void getListSinkClasses(am_SinkClass_L& listSinkClasses, am_Error_e& error); + + /** + * Retrieves a complete list of all systemProperties. + (at)return E_OK on success, + * E_DATABASE_ERROR on error + */ + virtual void getListSystemProperties(const std::shared_ptr<CommonAPI::ClientId> clientId, am_SystemProperty_L& listSystemProperties, am_Error_e& error); + virtual void getListSystemProperties(am_SystemProperty_L& listSystemProperties, am_Error_e& error); + + /** + * returns the delay in ms that the audiopath for the given mainConnection + * has + (at)return E_OK on success, E_NOT_POSSIBLE if timing information is not + * yet retrieved, E_DATABASE_ERROR on read error on the database + */ + virtual void getTimingInformation(const std::shared_ptr<CommonAPI::ClientId> clientId, am_mainConnectionID_t mainConnectionID, am_timeSync_t& delay, am_Error_e& error); + virtual void getTimingInformation(am_mainConnectionID_t mainConnectionID, am_timeSync_t& delay, am_Error_e& error); + + /** + * Retrieves the list of MainNotifications for a sink. Does not return the + * possible ones. + */ + virtual void getListMainSinkNotificationConfigurations(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sinkID_t sinkID, am_NotificationConfiguration_L& listMainNotificationConfigurations, am_Error_e& error); + virtual void getListMainSinkNotificationConfigurations(am_sinkID_t sinkID, am_NotificationConfiguration_L& listMainNotificationConfigurations, am_Error_e& error); + + /** + * Retrieves the list of MainNotifications for a source. Does not return the + * possible ones. + */ + virtual void getListMainSourceNotificationConfigurations(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sourceID_t sourceID, am_NotificationConfiguration_L& listMainNotificationConfigurations, am_Error_e& error); + virtual void getListMainSourceNotificationConfigurations(am_sourceID_t sourceID, am_NotificationConfiguration_L& listMainNotificationConfigurations, am_Error_e& error); + + /** + * sets a MainNotificationConfiuration. This can be used to turn on an off + * notifications an to change the mode of the configuration. + (at)return E_OK on + * success, E_NON_EXISTENT if sinkID does not exists, E_DATABASE_ERROR on error + */ + virtual void setMainSinkNotificationConfiguration(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sinkID_t sinkID, am_NotificationConfiguration_s mainNotificationConfiguration, am_Error_e& error); + virtual void setMainSinkNotificationConfiguration(am_sinkID_t sinkID, am_NotificationConfiguration_s mainNotificationConfiguration, am_Error_e& error); + + /** + * sets a MainNotificationConfiuration. This can be used to turn on an off + * notifications an to change the mode of the configuration. + (at)return E_OK on + * success, E_NON_EXISTENT if sourceID does not exists, E_DATABASE_ERROR on error + */ + virtual void setMainSourceNotificationConfiguration(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sourceID_t sourceID, am_NotificationConfiguration_s mainNotificationConfiguration, am_Error_e& error); + virtual void setMainSourceNotificationConfiguration(am_sourceID_t sourceID, am_NotificationConfiguration_s mainNotificationConfiguration, am_Error_e& error); + + + /** + * Callback that is called when the number of connections change + */ + virtual void fireNewMainConnectionEvent(const am_MainConnectionType_s& mainConnection); + /** + * Callback that is called when the number of connections change + */ + virtual void fireRemovedMainConnectionEvent(const am_mainConnectionID_t& mainConnection); + /** + * Callback that is called when the number of sinks change + */ + virtual void fireNewSinkEvent(const am_SinkType_s& sink); + /** + * Callback that is called when the number of sinks change + */ + virtual void fireRemovedSinkEvent(const am_sinkID_t& sinkID); + /** + * Callback that is called when the number of sources change + */ + virtual void fireNewSourceEvent(const am_SourceType_s& source); + /** + * Callback that is called when the number of sources change + */ + virtual void fireRemovedSourceEvent(const am_sourceID_t& source); + /** + * this callback is fired if the number of sink classes changed + */ + virtual void fireNumberOfSinkClassesChangedEvent(); + /** + * this callback is fired if the number of source classes changed + */ + virtual void fireNumberOfSourceClassesChangedEvent(); + /** + * This callback is called when the ConnectionState of a connection changed. + */ + virtual void fireMainConnectionStateChangedEvent(const am_mainConnectionID_t& connectionID, const am_ConnectionState_e& connectionState); + /** + * this callback indicates that a sinkSoundProperty has changed. + */ + virtual void fireMainSinkSoundPropertyChangedEvent(const am_sinkID_t& sinkID, const am_MainSoundProperty_s& soundProperty); + /** + * this callback indicates that a sourceSoundProperty has changed. + */ + virtual void fireMainSourceSoundPropertyChangedEvent(const am_sourceID_t& sourceID, const am_MainSoundProperty_s& soundProperty); + /** + * this callback is called when the availability of a sink has changed + */ + virtual void fireSinkAvailabilityChangedEvent(const am_sinkID_t& sinkID, const am_Availability_s& availability); + /** + * this callback is called when the availability of source has changed. + */ + virtual void fireSourceAvailabilityChangedEvent(const am_sourceID_t& sourceID, const am_Availability_s& availability); + /** + * this callback indicates a volume change on the indicated sink + */ + virtual void fireVolumeChangedEvent(const am_sinkID_t& sinkID, const am_mainVolume_t& volume); + /** + * this callback indicates a mute state change on a sink. + */ + virtual void fireSinkMuteStateChangedEvent(const am_sinkID_t& sinkID, const am_MuteState_e& muteState); + /** + * is fired if a systemProperty changed + */ + virtual void fireSystemPropertyChangedEvent(const am_SystemProperty_s& systemProperty); + /** + * This callback is fired if the timinginformation for a mainConnectionID changed + */ + virtual void fireTimingInformationChangedEvent(const am_mainConnectionID_t& mainConnectionID, const am_timeSync_t& time); + /** + * This callback is called when a sink is updated. + */ + virtual void fireSinkUpdatedEvent(const am_sinkID_t& sinkID, const am_sinkClass_t& sinkClassID, const am_MainSoundProperty_L& listMainSoundProperties); + /** + * This callback is called when a source is updated. + */ + virtual void fireSourceUpdatedEvent(const am_sourceID_t& sourceID, const am_sourceClass_t& sourceClassID, const am_MainSoundProperty_L& listMainSoundProperties); + /** + * This callback is called when a notificated value of a sink changes. + */ + virtual void fireSinkNotificationEvent(const am_sinkID_t& sinkID, const am_NotificationPayload_s& notification); + /** + * This callback is called when a notifcated value of a source changes. + */ + virtual void fireSourceNotificationEvent(const am_sourceID_t& sourceID, const am_NotificationPayload_s& notification); + /** + * This callback is triggered when a mainNotificationConfiguration is changed. + */ + virtual void fireMainSinkNotificationConfigurationChangedEvent(const am_sinkID_t& sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration); + /** + * This callback is triggered when a mainNotificationConfiguration is changed. + */ + virtual void fireMainSourceNotificationConfigurationChangedEvent(const am_sourceID_t& sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration); + + +protected: + class RemoteEventHandler: public virtual CommandControlStubRemoteEvent { + public: + RemoteEventHandler(CommandControlStubDefault* defaultStub); + + + private: + CommandControlStubDefault* defaultStub_; + }; +private: + CommandControlStubDefault::RemoteEventHandler remoteEventHandler_; + + + CommonAPI::Version interfaceVersion_; +}; + +} // namespace am +} // namespace genivi +} // namespace org + +#endif // ORG_GENIVI_AM_Command_Control_STUB_DEFAULT_H_ diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am.cpp b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am.cpp new file mode 100644 index 0000000..8092420 --- /dev/null +++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am.cpp @@ -0,0 +1,1043 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +/** + * @author Christian Linke + */ +#include "am.h" + + +namespace org { +namespace genivi { +namespace am { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +am_Route_s::am_Route_s(const am_sourceID_t& sourceIDValue, const am_sinkID_t& sinkIDValue, const am_RoutingElement_L& routeValue): + sourceID(sourceIDValue), + sinkID(sinkIDValue), + route(routeValue) +{ +} + + +bool operator==(const am_Route_s& lhs, const am_Route_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.sourceID == rhs.sourceID && + lhs.sinkID == rhs.sinkID && + lhs.route == rhs.route + ; +} + +void am_Route_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> sourceID; + inputStream >> sinkID; + inputStream >> route; +} + +void am_Route_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << sourceID; + outputStream << sinkID; + outputStream << route; +} + +am_Availability_s::am_Availability_s(const am_Availability_e& availabilityValue, const am_CustomAvailabilityReason_t& availabilityReasonValue): + availability(availabilityValue), + availabilityReason(availabilityReasonValue) +{ +} + + +bool operator==(const am_Availability_s& lhs, const am_Availability_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.availability == rhs.availability && + lhs.availabilityReason == rhs.availabilityReason + ; +} + +void am_Availability_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> availability; + inputStream >> availabilityReason; +} + +void am_Availability_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << availability; + outputStream << availabilityReason; +} + +am_ClassProperty_s::am_ClassProperty_s(const am_CustomClassProperty_t& classPropertyValue, const int16_t& valueValue): + classProperty(classPropertyValue), + value(valueValue) +{ +} + + +bool operator==(const am_ClassProperty_s& lhs, const am_ClassProperty_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.classProperty == rhs.classProperty && + lhs.value == rhs.value + ; +} + +void am_ClassProperty_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> classProperty; + inputStream >> value; +} + +void am_ClassProperty_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << classProperty; + outputStream << value; +} + +am_Crossfader_s::am_Crossfader_s(const am_crossfaderID_t& crossfaderIDValue, const std::string& nameValue, const am_sinkID_t& sinkID_AValue, const am_sinkID_t& sinkID_BValue, const am_sourceID_t& sourceIDValue, const am_HotSink_e& hotSinkValue): + crossfaderID(crossfaderIDValue), + name(nameValue), + sinkID_A(sinkID_AValue), + sinkID_B(sinkID_BValue), + sourceID(sourceIDValue), + hotSink(hotSinkValue) +{ +} + + +bool operator==(const am_Crossfader_s& lhs, const am_Crossfader_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.crossfaderID == rhs.crossfaderID && + lhs.name == rhs.name && + lhs.sinkID_A == rhs.sinkID_A && + lhs.sinkID_B == rhs.sinkID_B && + lhs.sourceID == rhs.sourceID && + lhs.hotSink == rhs.hotSink + ; +} + +void am_Crossfader_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> crossfaderID; + inputStream >> name; + inputStream >> sinkID_A; + inputStream >> sinkID_B; + inputStream >> sourceID; + inputStream >> hotSink; +} + +void am_Crossfader_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << crossfaderID; + outputStream << name; + outputStream << sinkID_A; + outputStream << sinkID_B; + outputStream << sourceID; + outputStream << hotSink; +} + +am_Gateway_s::am_Gateway_s(const am_gatewayID_t& gatewayIDValue, const std::string& nameValue, const am_sinkID_t& sinkIDValue, const am_sourceID_t& sourceIDValue, const am_domainID_t& domainSinkIDValue, const am_domainID_t& domainSourceIDValue, const am_domainID_t& controlDomainIDValue, const am_ConnectionFormat_L& listSourceFormatsValue, const am_ConnectionFormat_L& listSinkFormatsValue, const am_Convertion_L& convertionMatrixValue): + gatewayID(gatewayIDValue), + name(nameValue), + sinkID(sinkIDValue), + sourceID(sourceIDValue), + domainSinkID(domainSinkIDValue), + domainSourceID(domainSourceIDValue), + controlDomainID(controlDomainIDValue), + listSourceFormats(listSourceFormatsValue), + listSinkFormats(listSinkFormatsValue), + convertionMatrix(convertionMatrixValue) +{ +} + + +bool operator==(const am_Gateway_s& lhs, const am_Gateway_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.gatewayID == rhs.gatewayID && + lhs.name == rhs.name && + lhs.sinkID == rhs.sinkID && + lhs.sourceID == rhs.sourceID && + lhs.domainSinkID == rhs.domainSinkID && + lhs.domainSourceID == rhs.domainSourceID && + lhs.controlDomainID == rhs.controlDomainID && + lhs.listSourceFormats == rhs.listSourceFormats && + lhs.listSinkFormats == rhs.listSinkFormats && + lhs.convertionMatrix == rhs.convertionMatrix + ; +} + +void am_Gateway_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> gatewayID; + inputStream >> name; + inputStream >> sinkID; + inputStream >> sourceID; + inputStream >> domainSinkID; + inputStream >> domainSourceID; + inputStream >> controlDomainID; + inputStream >> listSourceFormats; + inputStream >> listSinkFormats; + inputStream >> convertionMatrix; +} + +void am_Gateway_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << gatewayID; + outputStream << name; + outputStream << sinkID; + outputStream << sourceID; + outputStream << domainSinkID; + outputStream << domainSourceID; + outputStream << controlDomainID; + outputStream << listSourceFormats; + outputStream << listSinkFormats; + outputStream << convertionMatrix; +} + +am_Converter_s::am_Converter_s(const am_converterID_t& converterIDValue, const std::string& nameValue, const am_sinkID_t& sinkIDValue, const am_sourceID_t& sourceIDValue, const am_domainID_t& domainIDValue, const am_ConnectionFormat_L& listSourceFormatsValue, const am_ConnectionFormat_L& listSinkFormatsValue, const am_Convertion_L& convertionMatrixValue): + converterID(converterIDValue), + name(nameValue), + sinkID(sinkIDValue), + sourceID(sourceIDValue), + domainID(domainIDValue), + listSourceFormats(listSourceFormatsValue), + listSinkFormats(listSinkFormatsValue), + convertionMatrix(convertionMatrixValue) +{ +} + + +bool operator==(const am_Converter_s& lhs, const am_Converter_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.converterID == rhs.converterID && + lhs.name == rhs.name && + lhs.sinkID == rhs.sinkID && + lhs.sourceID == rhs.sourceID && + lhs.domainID == rhs.domainID && + lhs.listSourceFormats == rhs.listSourceFormats && + lhs.listSinkFormats == rhs.listSinkFormats && + lhs.convertionMatrix == rhs.convertionMatrix + ; +} + +void am_Converter_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> converterID; + inputStream >> name; + inputStream >> sinkID; + inputStream >> sourceID; + inputStream >> domainID; + inputStream >> listSourceFormats; + inputStream >> listSinkFormats; + inputStream >> convertionMatrix; +} + +void am_Converter_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << converterID; + outputStream << name; + outputStream << sinkID; + outputStream << sourceID; + outputStream << domainID; + outputStream << listSourceFormats; + outputStream << listSinkFormats; + outputStream << convertionMatrix; +} + +am_RoutingElement_s::am_RoutingElement_s(const am_sourceID_t& sourceIDValue, const am_sinkID_t& sinkIDValue, const am_domainID_t& domainIDValue, const am_CustomConnectionFormat_t& connectionFormatValue): + sourceID(sourceIDValue), + sinkID(sinkIDValue), + domainID(domainIDValue), + connectionFormat(connectionFormatValue) +{ +} + + +bool operator==(const am_RoutingElement_s& lhs, const am_RoutingElement_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.sourceID == rhs.sourceID && + lhs.sinkID == rhs.sinkID && + lhs.domainID == rhs.domainID && + lhs.connectionFormat == rhs.connectionFormat + ; +} + +void am_RoutingElement_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> sourceID; + inputStream >> sinkID; + inputStream >> domainID; + inputStream >> connectionFormat; +} + +void am_RoutingElement_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << sourceID; + outputStream << sinkID; + outputStream << domainID; + outputStream << connectionFormat; +} + +am_SoundProperty_s::am_SoundProperty_s(const am_CustomSoundPropertyType_t& typeValue, const int16_t& valueValue): + type(typeValue), + value(valueValue) +{ +} + + +bool operator==(const am_SoundProperty_s& lhs, const am_SoundProperty_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.type == rhs.type && + lhs.value == rhs.value + ; +} + +void am_SoundProperty_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> type; + inputStream >> value; +} + +void am_SoundProperty_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << type; + outputStream << value; +} + +am_SystemProperty_s::am_SystemProperty_s(const am_CustomSystemPropertyType_t& typeValue, const int16_t& valueValue): + type(typeValue), + value(valueValue) +{ +} + + +bool operator==(const am_SystemProperty_s& lhs, const am_SystemProperty_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.type == rhs.type && + lhs.value == rhs.value + ; +} + +void am_SystemProperty_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> type; + inputStream >> value; +} + +void am_SystemProperty_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << type; + outputStream << value; +} + +am_SinkClass_s::am_SinkClass_s(const am_sinkClass_t& sinkClassIDValue, const std::string& nameValue, const am_ClassProperty_L& listClassPropertiesValue): + sinkClassID(sinkClassIDValue), + name(nameValue), + listClassProperties(listClassPropertiesValue) +{ +} + + +bool operator==(const am_SinkClass_s& lhs, const am_SinkClass_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.sinkClassID == rhs.sinkClassID && + lhs.name == rhs.name && + lhs.listClassProperties == rhs.listClassProperties + ; +} + +void am_SinkClass_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> sinkClassID; + inputStream >> name; + inputStream >> listClassProperties; +} + +void am_SinkClass_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << sinkClassID; + outputStream << name; + outputStream << listClassProperties; +} + +am_SourceClass_s::am_SourceClass_s(const am_sourceClass_t& sourceClassIDValue, const std::string& nameValue, const am_ClassProperty_L& listClassPropertiesValue): + sourceClassID(sourceClassIDValue), + name(nameValue), + listClassProperties(listClassPropertiesValue) +{ +} + + +bool operator==(const am_SourceClass_s& lhs, const am_SourceClass_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.sourceClassID == rhs.sourceClassID && + lhs.name == rhs.name && + lhs.listClassProperties == rhs.listClassProperties + ; +} + +void am_SourceClass_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> sourceClassID; + inputStream >> name; + inputStream >> listClassProperties; +} + +void am_SourceClass_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << sourceClassID; + outputStream << name; + outputStream << listClassProperties; +} + +am_SourceType_s::am_SourceType_s(const am_sourceID_t& sourceIDValue, const std::string& nameValue, const am_Availability_s& availabilityValue, const am_sourceClass_t& sourceClassIDValue): + sourceID(sourceIDValue), + name(nameValue), + availability(availabilityValue), + sourceClassID(sourceClassIDValue) +{ +} + + +bool operator==(const am_SourceType_s& lhs, const am_SourceType_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.sourceID == rhs.sourceID && + lhs.name == rhs.name && + lhs.availability == rhs.availability && + lhs.sourceClassID == rhs.sourceClassID + ; +} + +void am_SourceType_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> sourceID; + inputStream >> name; + inputStream >> availability; + inputStream >> sourceClassID; +} + +void am_SourceType_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << sourceID; + outputStream << name; + outputStream << availability; + outputStream << sourceClassID; +} + +am_SinkType_s::am_SinkType_s(const am_sinkID_t& sinkIDValue, const std::string& nameValue, const am_Availability_s& availabilityValue, const am_mainVolume_t& volumeValue, const am_MuteState_e& muteStateValue, const am_sinkClass_t& sinkClassIDValue): + sinkID(sinkIDValue), + name(nameValue), + availability(availabilityValue), + volume(volumeValue), + muteState(muteStateValue), + sinkClassID(sinkClassIDValue) +{ +} + + +bool operator==(const am_SinkType_s& lhs, const am_SinkType_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.sinkID == rhs.sinkID && + lhs.name == rhs.name && + lhs.availability == rhs.availability && + lhs.volume == rhs.volume && + lhs.muteState == rhs.muteState && + lhs.sinkClassID == rhs.sinkClassID + ; +} + +void am_SinkType_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> sinkID; + inputStream >> name; + inputStream >> availability; + inputStream >> volume; + inputStream >> muteState; + inputStream >> sinkClassID; +} + +void am_SinkType_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << sinkID; + outputStream << name; + outputStream << availability; + outputStream << volume; + outputStream << muteState; + outputStream << sinkClassID; +} + +am_Handle_s::am_Handle_s(const am_Handle_e& handleTypeValue, const uint16_t& handleValue): + handleType(handleTypeValue), + handle(handleValue) +{ +} + + +bool operator==(const am_Handle_s& lhs, const am_Handle_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.handleType == rhs.handleType && + lhs.handle == rhs.handle + ; +} + +void am_Handle_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> handleType; + inputStream >> handle; +} + +void am_Handle_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << handleType; + outputStream << handle; +} + +am_MainSoundProperty_s::am_MainSoundProperty_s(const am_CustomMainSoundPropertyType_t& typeValue, const int16_t& valueValue): + type(typeValue), + value(valueValue) +{ +} + + +bool operator==(const am_MainSoundProperty_s& lhs, const am_MainSoundProperty_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.type == rhs.type && + lhs.value == rhs.value + ; +} + +void am_MainSoundProperty_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> type; + inputStream >> value; +} + +void am_MainSoundProperty_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << type; + outputStream << value; +} + +am_MainConnectionType_s::am_MainConnectionType_s(const am_mainConnectionID_t& mainConnectionIDValue, const am_sourceID_t& sourceIDValue, const am_sinkID_t& sinkIDValue, const am_timeSync_t& delayValue, const am_ConnectionState_e& connectionStateValue): + mainConnectionID(mainConnectionIDValue), + sourceID(sourceIDValue), + sinkID(sinkIDValue), + delay(delayValue), + connectionState(connectionStateValue) +{ +} + + +bool operator==(const am_MainConnectionType_s& lhs, const am_MainConnectionType_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.mainConnectionID == rhs.mainConnectionID && + lhs.sourceID == rhs.sourceID && + lhs.sinkID == rhs.sinkID && + lhs.delay == rhs.delay && + lhs.connectionState == rhs.connectionState + ; +} + +void am_MainConnectionType_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> mainConnectionID; + inputStream >> sourceID; + inputStream >> sinkID; + inputStream >> delay; + inputStream >> connectionState; +} + +void am_MainConnectionType_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << mainConnectionID; + outputStream << sourceID; + outputStream << sinkID; + outputStream << delay; + outputStream << connectionState; +} + +am_MainConnection_s::am_MainConnection_s(const am_mainConnectionID_t& mainConnectionIDValue, const am_ConnectionState_e& connectionStateValue, const am_sinkID_t& sinkIDValue, const am_sourceID_t& sourceIDValue, const am_timeSync_t& delayValue, const am_ConnectionID_L& listConnectionIDValue): + mainConnectionID(mainConnectionIDValue), + connectionState(connectionStateValue), + sinkID(sinkIDValue), + sourceID(sourceIDValue), + delay(delayValue), + listConnectionID(listConnectionIDValue) +{ +} + + +bool operator==(const am_MainConnection_s& lhs, const am_MainConnection_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.mainConnectionID == rhs.mainConnectionID && + lhs.connectionState == rhs.connectionState && + lhs.sinkID == rhs.sinkID && + lhs.sourceID == rhs.sourceID && + lhs.delay == rhs.delay && + lhs.listConnectionID == rhs.listConnectionID + ; +} + +void am_MainConnection_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> mainConnectionID; + inputStream >> connectionState; + inputStream >> sinkID; + inputStream >> sourceID; + inputStream >> delay; + inputStream >> listConnectionID; +} + +void am_MainConnection_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << mainConnectionID; + outputStream << connectionState; + outputStream << sinkID; + outputStream << sourceID; + outputStream << delay; + outputStream << listConnectionID; +} + +am_NotificationPayload_s::am_NotificationPayload_s(const am_CustomNotificationType_t& typeValue, const int16_t& valueValue): + type(typeValue), + value(valueValue) +{ +} + + +bool operator==(const am_NotificationPayload_s& lhs, const am_NotificationPayload_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.type == rhs.type && + lhs.value == rhs.value + ; +} + +void am_NotificationPayload_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> type; + inputStream >> value; +} + +void am_NotificationPayload_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << type; + outputStream << value; +} + +am_NotificationConfiguration_s::am_NotificationConfiguration_s(const am_CustomNotificationType_t& typeValue, const am_NotificationStatus_e& statusValue, const int16_t& parameterValue): + type(typeValue), + status(statusValue), + parameter(parameterValue) +{ +} + + +bool operator==(const am_NotificationConfiguration_s& lhs, const am_NotificationConfiguration_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.type == rhs.type && + lhs.status == rhs.status && + lhs.parameter == rhs.parameter + ; +} + +void am_NotificationConfiguration_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> type; + inputStream >> status; + inputStream >> parameter; +} + +void am_NotificationConfiguration_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << type; + outputStream << status; + outputStream << parameter; +} + +am_Sink_s::am_Sink_s(const am_sinkID_t& sinkIDValue, const std::string& nameValue, const am_domainID_t& domainIDValue, const am_sinkClass_t& sinkClassIDValue, const am_volume_t& volumeValue, const bool& visibleValue, const am_Availability_s& availableValue, const am_MuteState_e& muteStateValue, const am_mainVolume_t& mainVolumeValue, const am_SoundProperty_L& listSoundPropertiesValue, const am_ConnectionFormat_L& listConnectionFormatsValue, const am_MainSoundProperty_L& listMainSoundPropertiesValue, const am_NotificationConfiguration_L& listMainNotificationConfigurationsValue, const am_NotificationConfiguration_L& listNotificationConfigurationsValue): + sinkID(sinkIDValue), + name(nameValue), + domainID(domainIDValue), + sinkClassID(sinkClassIDValue), + volume(volumeValue), + visible(visibleValue), + available(availableValue), + muteState(muteStateValue), + mainVolume(mainVolumeValue), + listSoundProperties(listSoundPropertiesValue), + listConnectionFormats(listConnectionFormatsValue), + listMainSoundProperties(listMainSoundPropertiesValue), + listMainNotificationConfigurations(listMainNotificationConfigurationsValue), + listNotificationConfigurations(listNotificationConfigurationsValue) +{ +} + + +bool operator==(const am_Sink_s& lhs, const am_Sink_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.sinkID == rhs.sinkID && + lhs.name == rhs.name && + lhs.domainID == rhs.domainID && + lhs.sinkClassID == rhs.sinkClassID && + lhs.volume == rhs.volume && + lhs.visible == rhs.visible && + lhs.available == rhs.available && + lhs.muteState == rhs.muteState && + lhs.mainVolume == rhs.mainVolume && + lhs.listSoundProperties == rhs.listSoundProperties && + lhs.listConnectionFormats == rhs.listConnectionFormats && + lhs.listMainSoundProperties == rhs.listMainSoundProperties && + lhs.listMainNotificationConfigurations == rhs.listMainNotificationConfigurations && + lhs.listNotificationConfigurations == rhs.listNotificationConfigurations + ; +} + +void am_Sink_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> sinkID; + inputStream >> name; + inputStream >> domainID; + inputStream >> sinkClassID; + inputStream >> volume; + inputStream >> visible; + inputStream >> available; + inputStream >> muteState; + inputStream >> mainVolume; + inputStream >> listSoundProperties; + inputStream >> listConnectionFormats; + inputStream >> listMainSoundProperties; + inputStream >> listMainNotificationConfigurations; + inputStream >> listNotificationConfigurations; +} + +void am_Sink_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << sinkID; + outputStream << name; + outputStream << domainID; + outputStream << sinkClassID; + outputStream << volume; + outputStream << visible; + outputStream << available; + outputStream << muteState; + outputStream << mainVolume; + outputStream << listSoundProperties; + outputStream << listConnectionFormats; + outputStream << listMainSoundProperties; + outputStream << listMainNotificationConfigurations; + outputStream << listNotificationConfigurations; +} + +am_Source_s::am_Source_s(const am_sourceID_t& sourceIDValue, const am_domainID_t& domainIDValue, const std::string& nameValue, const am_sourceClass_t& sourceClassIDValue, const am_SourceState_e& sourceStateValue, const am_volume_t& volumeValue, const bool& visibleValue, const am_Availability_s& availableValue, const am_InterruptState_e& interruptStateValue, const am_SoundProperty_L& listSoundPropertiesValue, const am_ConnectionFormat_L& listConnectionFormatsValue, const am_MainSoundProperty_L& listMainSoundPropertiesValue, const am_NotificationConfiguration_L& listMainNotificationConfigurationsValue, const am_NotificationConfiguration_L& listNotificationConfigurationsValue): + sourceID(sourceIDValue), + domainID(domainIDValue), + name(nameValue), + sourceClassID(sourceClassIDValue), + sourceState(sourceStateValue), + volume(volumeValue), + visible(visibleValue), + available(availableValue), + interruptState(interruptStateValue), + listSoundProperties(listSoundPropertiesValue), + listConnectionFormats(listConnectionFormatsValue), + listMainSoundProperties(listMainSoundPropertiesValue), + listMainNotificationConfigurations(listMainNotificationConfigurationsValue), + listNotificationConfigurations(listNotificationConfigurationsValue) +{ +} + + +bool operator==(const am_Source_s& lhs, const am_Source_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.sourceID == rhs.sourceID && + lhs.domainID == rhs.domainID && + lhs.name == rhs.name && + lhs.sourceClassID == rhs.sourceClassID && + lhs.sourceState == rhs.sourceState && + lhs.volume == rhs.volume && + lhs.visible == rhs.visible && + lhs.available == rhs.available && + lhs.interruptState == rhs.interruptState && + lhs.listSoundProperties == rhs.listSoundProperties && + lhs.listConnectionFormats == rhs.listConnectionFormats && + lhs.listMainSoundProperties == rhs.listMainSoundProperties && + lhs.listMainNotificationConfigurations == rhs.listMainNotificationConfigurations && + lhs.listNotificationConfigurations == rhs.listNotificationConfigurations + ; +} + +void am_Source_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> sourceID; + inputStream >> domainID; + inputStream >> name; + inputStream >> sourceClassID; + inputStream >> sourceState; + inputStream >> volume; + inputStream >> visible; + inputStream >> available; + inputStream >> interruptState; + inputStream >> listSoundProperties; + inputStream >> listConnectionFormats; + inputStream >> listMainSoundProperties; + inputStream >> listMainNotificationConfigurations; + inputStream >> listNotificationConfigurations; +} + +void am_Source_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << sourceID; + outputStream << domainID; + outputStream << name; + outputStream << sourceClassID; + outputStream << sourceState; + outputStream << volume; + outputStream << visible; + outputStream << available; + outputStream << interruptState; + outputStream << listSoundProperties; + outputStream << listConnectionFormats; + outputStream << listMainSoundProperties; + outputStream << listMainNotificationConfigurations; + outputStream << listNotificationConfigurations; +} + +am_Domain_s::am_Domain_s(const am_domainID_t& domainIDValue, const std::string& nameValue, const std::string& busnameValue, const std::string& nodenameValue, const bool& earlyValue, const bool& completeValue, const am_DomainState_e& stateValue): + domainID(domainIDValue), + name(nameValue), + busname(busnameValue), + nodename(nodenameValue), + early(earlyValue), + complete(completeValue), + state(stateValue) +{ +} + + +bool operator==(const am_Domain_s& lhs, const am_Domain_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.domainID == rhs.domainID && + lhs.name == rhs.name && + lhs.busname == rhs.busname && + lhs.nodename == rhs.nodename && + lhs.early == rhs.early && + lhs.complete == rhs.complete && + lhs.state == rhs.state + ; +} + +void am_Domain_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> domainID; + inputStream >> name; + inputStream >> busname; + inputStream >> nodename; + inputStream >> early; + inputStream >> complete; + inputStream >> state; +} + +void am_Domain_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << domainID; + outputStream << name; + outputStream << busname; + outputStream << nodename; + outputStream << early; + outputStream << complete; + outputStream << state; +} + +am_EarlyData_s::am_EarlyData_s(const am_EarlyDataType_e& typeValue, const am_DataType_u& sinksourceValue, const am_EarlyData_u& dataValue): + type(typeValue), + sinksource(sinksourceValue), + data(dataValue) +{ +} + + +bool operator==(const am_EarlyData_s& lhs, const am_EarlyData_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.type == rhs.type && + lhs.sinksource == rhs.sinksource && + lhs.data == rhs.data + ; +} + +void am_EarlyData_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> type; + inputStream >> sinksource; + inputStream >> data; +} + +void am_EarlyData_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << type; + outputStream << sinksource; + outputStream << data; +} + +am_Connection_s::am_Connection_s(const am_connectionID_t& connectionIDValue, const am_sourceID_t& sourceIDValue, const am_sinkID_t& sinkIDValue, const am_timeSync_t& delayValue, const am_CustomConnectionFormat_t& connectionFormatValue): + connectionID(connectionIDValue), + sourceID(sourceIDValue), + sinkID(sinkIDValue), + delay(delayValue), + connectionFormat(connectionFormatValue) +{ +} + + +bool operator==(const am_Connection_s& lhs, const am_Connection_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.connectionID == rhs.connectionID && + lhs.sourceID == rhs.sourceID && + lhs.sinkID == rhs.sinkID && + lhs.delay == rhs.delay && + lhs.connectionFormat == rhs.connectionFormat + ; +} + +void am_Connection_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> connectionID; + inputStream >> sourceID; + inputStream >> sinkID; + inputStream >> delay; + inputStream >> connectionFormat; +} + +void am_Connection_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << connectionID; + outputStream << sourceID; + outputStream << sinkID; + outputStream << delay; + outputStream << connectionFormat; +} + +am_Volumes_s::am_Volumes_s(const am_VolumeType_e& volumeTypeValue, const am_DataType_u& volumeIDValue, const am_volume_t& volumeValue, const am_CustomRampType_t& rampValue, const am_time_t& timeValue): + volumeType(volumeTypeValue), + volumeID(volumeIDValue), + volume(volumeValue), + ramp(rampValue), + time(timeValue) +{ +} + + +bool operator==(const am_Volumes_s& lhs, const am_Volumes_s& rhs) { + if (&lhs == &rhs) + return true; + + return + lhs.volumeType == rhs.volumeType && + lhs.volumeID == rhs.volumeID && + lhs.volume == rhs.volume && + lhs.ramp == rhs.ramp && + lhs.time == rhs.time + ; +} + +void am_Volumes_s::readFromInputStream(CommonAPI::InputStream& inputStream) { + inputStream >> volumeType; + inputStream >> volumeID; + inputStream >> volume; + inputStream >> ramp; + inputStream >> time; +} + +void am_Volumes_s::writeToOutputStream(CommonAPI::OutputStream& outputStream) const { + outputStream << volumeType; + outputStream << volumeID; + outputStream << volume; + outputStream << ramp; + outputStream << time; +} + + + +} // namespace am +} // namespace genivi +} // namespace org diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am.h b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am.h new file mode 100644 index 0000000..e75db5d --- /dev/null +++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am.h @@ -0,0 +1,2551 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.core 2.1.6.v20150127. +* Used org.franca.core 0.8.10.201309262002. +* +* +*/ +/** + * @author Christian Linke + */ +#ifndef ORG_GENIVI_am_H_ +#define ORG_GENIVI_am_H_ + + + +#if !defined (COMMONAPI_INTERNAL_COMPILATION) +#define COMMONAPI_INTERNAL_COMPILATION +#endif + +#include <CommonAPI/InputStream.h> +#include <CommonAPI/OutputStream.h> +#include <CommonAPI/SerializableStruct.h> +#include <CommonAPI/SerializableVariant.h> +#include <CommonAPI/types.h> +#include <cstdint> +#include <memory> +#include <string> +#include <vector> + +#undef COMMONAPI_INTERNAL_COMPILATION + +namespace org { +namespace genivi { + +namespace am { + /** + * a source ID + */ + /** + * a source ID + */ + typedef uint16_t am_sourceID_t; + /** + * a mainConnection ID + */ + /** + * a mainConnection ID + */ + typedef uint16_t am_mainConnectionID_t; + /** + * offset time that is introduced in milli seconds. + */ + /** + * offset time that is introduced in milli seconds. + */ + typedef int16_t am_timeSync_t; + /** + * a sink ID + */ + /** + * a sink ID + */ + typedef uint16_t am_sinkID_t; + /** + * represents the connection state + */ + enum class am_ConnectionState_e: int32_t { + CS_UNKNOWN = 0, + /** + * This means the connection is just building up + */ + CS_CONNECTING = 1, + /** + * the connection is ready to be used + */ + CS_CONNECTED = 2, + /** + * the connection is in the course to be knocked down + */ + CS_DISCONNECTING = 3, + /** + * only relevant for connectionStatechanged. Is send after the connection was + * removed + */ + CS_DISCONNECTED = 4, + /** + * this means the connection is still build up but unused at the moment + */ + CS_SUSPENDED = 5, + CS_MAX + }; + + // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1 + struct am_ConnectionState_eComparator; + /** + * this type holds all information of connections relevant to the HMI + */ + /** + * this type holds all information of connections relevant to the HMI + */ + struct am_MainConnectionType_s: CommonAPI::SerializableStruct { + /** + * the ID of the mainconnection + */ + am_mainConnectionID_t mainConnectionID; + /** + * the sourceID where the connection starts + */ + am_sourceID_t sourceID; + /** + * the sinkID where the connection ends + */ + am_sinkID_t sinkID; + /** + * the delay of the mainconnection + */ + am_timeSync_t delay; + /** + * the current connection state + */ + am_ConnectionState_e connectionState; + + am_MainConnectionType_s() = default; + am_MainConnectionType_s(const am_mainConnectionID_t& mainConnectionID, const am_sourceID_t& sourceID, const am_sinkID_t& sinkID, const am_timeSync_t& delay, const am_ConnectionState_e& connectionState); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeInt16Type(); + typeOutputStream.writeInt32Type(); + } + }; + typedef std::vector<am_MainConnectionType_s> am_MainConnection_L; + /** + * product specific identifier of property + */ + /** + * product specific identifier of property + */ + typedef uint16_t am_CustomClassProperty_t; + /** + * describes class properties + */ + /** + * describes class properties + */ + struct am_ClassProperty_s: CommonAPI::SerializableStruct { + /** + * the property as enum + */ + am_CustomClassProperty_t classProperty; + /** + * the value of the property + */ + int16_t value; + + am_ClassProperty_s() = default; + am_ClassProperty_s(const am_CustomClassProperty_t& classProperty, const int16_t& value); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeInt16Type(); + } + }; + typedef std::vector<am_ClassProperty_s> am_ClassProperty_L; + typedef uint16_t am_sinkClass_t; + /** + * struct describing sinkclasses + */ + /** + * struct describing sinkclasses + */ + struct am_SinkClass_s: CommonAPI::SerializableStruct { + /** + * the ID of the sinkClass + */ + am_sinkClass_t sinkClassID; + /** + * the name of the sinkClass - must be unique in the system + */ + std::string name; + /** + * the list of the class properties. These are pairs of a project specific enum + * describing the type of the value and an integer holding the real value. + */ + am_ClassProperty_L listClassProperties; + + am_SinkClass_s() = default; + am_SinkClass_s(const am_sinkClass_t& sinkClassID, const std::string& name, const am_ClassProperty_L& listClassProperties); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeStringType(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.beginWriteStructType(); + typeOutputStream.writeUInt16Type();typeOutputStream.writeInt16Type(); + typeOutputStream.endWriteStructType(); + typeOutputStream.endWriteVectorType(); + } + }; + typedef std::vector<am_SinkClass_s> am_SinkClass_L; + /** + * This is the volume presented on the command interface. It is in the duty of the + * Controller to change the volumes given here into meaningful values on the + * routing interface. + The range of this type is customer specific. + */ + /** + * This is the volume presented on the command interface. It is in the duty of the + * Controller to change the volumes given here into meaningful values on the + * routing interface. + The range of this type is customer specific. + */ + typedef int16_t am_mainVolume_t; + /** + * This project specific value gives the information about reason for reason for + * Source/Sink change + */ + /** + * This project specific value gives the information about reason for reason for + * Source/Sink change + */ + typedef uint16_t am_CustomAvailabilityReason_t; + /** + * with the help of this enum, sinks and sources can report their availability + * state + */ + enum class am_Availability_e: int32_t { + /** + * default + */ + A_UNKNOWN = 0, + /** + * The source / sink is available + */ + A_AVAILABLE = 1, + /** + * the source / sink is not available + */ + A_UNAVAILABLE = 2, + A_MAX + }; + + // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1 + struct am_Availability_eComparator; + enum class am_MuteState_e: int32_t { + /** + * default + */ + MS_UNKNOWN = 0, + /** + * the source / sink is muted + */ + MS_MUTED = 1, + /** + * the source / sink is unmuted + */ + MS_UNMUTED = 2, + MS_MAX + }; + + // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1 + struct am_MuteState_eComparator; + /** + * this describes the availability of a sink or a source together with the latest + * change + */ + /** + * this describes the availability of a sink or a source together with the latest + * change + */ + struct am_Availability_s: CommonAPI::SerializableStruct { + /** + * the current availability state + */ + am_Availability_e availability; + /** + * the reason for the last change. This can be used to trigger events that deal + * with state changes. + */ + am_CustomAvailabilityReason_t availabilityReason; + + am_Availability_s() = default; + am_Availability_s(const am_Availability_e& availability, const am_CustomAvailabilityReason_t& availabilityReason); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeInt32Type(); + typeOutputStream.writeUInt16Type(); + } + }; + /** + * this type holds all information of sinks relevant to the HMI + */ + /** + * this type holds all information of sinks relevant to the HMI + */ + struct am_SinkType_s: CommonAPI::SerializableStruct { + /** + * This is the ID of the sink, it is unique in the system. There are 2 ways, ID + * can be created: either it is assigned during the registration process (in a + * dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it + * is a fixed (the project has to ensure the uniqueness of the ID). + */ + am_sinkID_t sinkID; + /** + * The name of the sink. Must be unique in the whole system. + */ + std::string name; + /** + * This attribute reflects the availability of the sink. There are several reasons + * why a sink could be not available for the moment: for example the shutdown of + * a sink because of overtemperature or over- & undervoltage. The + * availability consists of two pieces of information: + + Availablility: the + * status itself, can be A_AVAILABLE, A_UNAVAILABLE or A_UNKNOWN + + * AvailabilityReason: this informs about the last reason for a change in + * availability. The reasons itself are product specific. + */ + am_Availability_s availability; + /** + * This is the representation of the Volume for the commandInterface. It is used + * by the HMI to set the volume of a sink, the AudioManagerController has to + * transform this into real source and sink volumes. + */ + am_mainVolume_t volume; + am_MuteState_e muteState; + /** + * The sinkClassID references to a sinkClass. With the help of classification, + * rules can be setup to define the system behaviour. + */ + am_sinkClass_t sinkClassID; + + am_SinkType_s() = default; + am_SinkType_s(const am_sinkID_t& sinkID, const std::string& name, const am_Availability_s& availability, const am_mainVolume_t& volume, const am_MuteState_e& muteState, const am_sinkClass_t& sinkClassID); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeStringType(); + typeOutputStream.beginWriteStructType(); + typeOutputStream.writeInt32Type();typeOutputStream.writeUInt16Type(); + typeOutputStream.endWriteStructType(); + typeOutputStream.writeInt16Type(); + typeOutputStream.writeInt32Type(); + typeOutputStream.writeUInt16Type(); + } + }; + typedef std::vector<am_SinkType_s> am_SinkType_L; + typedef uint16_t am_sourceClass_t; + /** + * struct describing source classes + */ + /** + * struct describing source classes + */ + struct am_SourceClass_s: CommonAPI::SerializableStruct { + /** + * the source ID + */ + am_sourceClass_t sourceClassID; + /** + * the name of the sourceClass - must be unique in the system + */ + std::string name; + /** + * the list of the class properties. These are pairs of a project specific enum + * describing the type of the value and an integer holding the real value. + */ + am_ClassProperty_L listClassProperties; + + am_SourceClass_s() = default; + am_SourceClass_s(const am_sourceClass_t& sourceClassID, const std::string& name, const am_ClassProperty_L& listClassProperties); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeStringType(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.beginWriteStructType(); + typeOutputStream.writeUInt16Type();typeOutputStream.writeInt16Type(); + typeOutputStream.endWriteStructType(); + typeOutputStream.endWriteVectorType(); + } + }; + typedef std::vector<am_SourceClass_s> am_SourceClass_L; + /** + * this type holds all information of sources relevant to the HMI + */ + /** + * this type holds all information of sources relevant to the HMI + */ + struct am_SourceType_s: CommonAPI::SerializableStruct { + /** + * This is the ID of the source, it is unique in the system. There are 2 ways, ID + * can be created: either it is assigned during the registration process (in a + * dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it + * is a fixed (the project has to ensure the uniqueness of the ID). + */ + am_sourceID_t sourceID; + /** + * The name of the source. Must be unique in the whole system. + */ + std::string name; + /** + * the availability of the source + */ + am_Availability_s availability; + /** + * the sourceClassID, indicates the class the source is in. This information can + * be used by the Controller to implement different behaviour for different + * classes. + */ + am_sourceClass_t sourceClassID; + + am_SourceType_s() = default; + am_SourceType_s(const am_sourceID_t& sourceID, const std::string& name, const am_Availability_s& availability, const am_sourceClass_t& sourceClassID); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeStringType(); + typeOutputStream.beginWriteStructType(); + typeOutputStream.writeInt32Type();typeOutputStream.writeUInt16Type(); + typeOutputStream.endWriteStructType(); + typeOutputStream.writeUInt16Type(); + } + }; + typedef std::vector<am_SourceType_s> am_SourceType_L; + /** + * describes the different system properties. Project specific + */ + /** + * describes the different system properties. Project specific + */ + typedef uint16_t am_CustomSystemPropertyType_t; + /** + * struct describing system properties + */ + /** + * struct describing system properties + */ + struct am_SystemProperty_s: CommonAPI::SerializableStruct { + /** + * the type that is set + */ + am_CustomSystemPropertyType_t type; + /** + * the value + */ + int16_t value; + + am_SystemProperty_s() = default; + am_SystemProperty_s(const am_CustomSystemPropertyType_t& type, const int16_t& value); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeInt16Type(); + } + }; + typedef std::vector<am_SystemProperty_s> am_SystemProperty_L; + /** + * a connection ID + */ + /** + * a connection ID + */ + typedef uint16_t am_connectionID_t; + typedef std::vector<am_connectionID_t> am_ConnectionID_L; + /** + * The unit is 0.1 db steps,The smallest value -3000 (=AM_MUTE). The minimum and + * maximum can be limited by actual project. + */ + /** + * The unit is 0.1 db steps,The smallest value -3000 (=AM_MUTE). The minimum and + * maximum can be limited by actual project. + */ + typedef int16_t am_volume_t; + /** + * Project specific sound properties. + */ + /** + * Project specific sound properties. + */ + typedef uint16_t am_CustomSoundPropertyType_t; + /** + * This enum characterizes the data of the EarlyData_t + */ + enum class am_EarlyDataType_e: int32_t { + /** + * default + */ + ES_UNKNOWN = 0, + /** + * the source volume + */ + ED_SOURCE_VOLUME = 1, + /** + * the sink volume + */ + ED_SINK_VOLUME = 2, + /** + * a source property + */ + ED_SOURCE_PROPERTY = 3, + /** + * a sink property + */ + ED_SINK_PROPERTY = 4, + ED_MAX + }; + + // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1 + struct am_EarlyDataType_eComparator; + /** + * struct describing the sound property + */ + /** + * struct describing the sound property + */ + struct am_SoundProperty_s: CommonAPI::SerializableStruct { + /** + * the type of the property - a project specific enum + */ + am_CustomSoundPropertyType_t type; + /** + * the actual value of the property + */ + int16_t value; + + am_SoundProperty_s() = default; + am_SoundProperty_s(const am_CustomSoundPropertyType_t& type, const int16_t& value); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeInt16Type(); + } + }; + /** + * data type depends of am_EarlyDataType_e: + volume_t in case of ED_SOURCE_VOLUME, + * ED_SINK_VOLUME + soundProperty_t in case of ED_SOURCE_PROPERTY, + * ED_SINK_PROPERTY + */ + /** + * data type depends of am_EarlyDataType_e: + volume_t in case of ED_SOURCE_VOLUME, + * ED_SINK_VOLUME + soundProperty_t in case of ED_SOURCE_PROPERTY, + * ED_SINK_PROPERTY + */ + typedef CommonAPI::Variant<am_volume_t, am_SoundProperty_s> am_EarlyData_u; + /** + * data type depends of am_EarlyDataType_e: + sourceID in case of ED_SOURCE_VOLUME, + * ED_SOURCE_PROPERTY + sinkID in case of ED_SINK_VOLUME, ED_SINK_PROPERTY + */ + /** + * data type depends of am_EarlyDataType_e: + sourceID in case of ED_SOURCE_VOLUME, + * ED_SOURCE_PROPERTY + sinkID in case of ED_SINK_VOLUME, ED_SINK_PROPERTY + */ + typedef CommonAPI::Variant<am_sinkID_t, am_sourceID_t> am_DataType_u; + struct am_EarlyData_s: CommonAPI::SerializableStruct { + am_EarlyDataType_e type; + am_DataType_u sinksource; + am_EarlyData_u data; + + am_EarlyData_s() = default; + am_EarlyData_s(const am_EarlyDataType_e& type, const am_DataType_u& sinksource, const am_EarlyData_u& data); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeInt32Type(); + typeOutputStream.writeVariantType(); + typeOutputStream.writeVariantType(); + } + }; + typedef std::vector<am_EarlyData_s> am_EarlyData_L; + /** + * Here are all SoundProperties that can be set via the CommandInterface. Product + * specific + */ + /** + * Here are all SoundProperties that can be set via the CommandInterface. Product + * specific + */ + typedef uint16_t am_CustomMainSoundPropertyType_t; + /** + * struct describung mainsound property + */ + /** + * struct describung mainsound property + */ + struct am_MainSoundProperty_s: CommonAPI::SerializableStruct { + /** + * the type of the property + */ + am_CustomMainSoundPropertyType_t type; + /** + * the actual value + */ + int16_t value; + + am_MainSoundProperty_s() = default; + am_MainSoundProperty_s(const am_CustomMainSoundPropertyType_t& type, const int16_t& value); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeInt16Type(); + } + }; + typedef std::vector<am_MainSoundProperty_s> am_MainSoundProperty_L; + /** + * gives the type of the Notification. + */ + /** + * gives the type of the Notification. + */ + typedef uint16_t am_CustomNotificationType_t; + enum class am_NotificationStatus_e: int32_t { + NS_UNKNOWN = 0, + /** + * No notification, the function is turned off + */ + NS_OFF = 1, + /** + * Periodic notifications are sent out. The period in ms is given by + * am_NotificationParameter + */ + NS_PERIODIC = 2, + /** + * The notification is sent out when the minimum given by am_NotificationParameter + * is reached. + */ + NS_MINIMUM = 3, + /** + * The notification is sent out when the maximum given by am_NotificationParameter + * is reached. + */ + NS_MAXIMUM = 4, + /** + * The notification is sent out when a change happened. The Resolution of the + * change is defined by am_NotificationParameter. + */ + NS_CHANGE_ = 5, + NS_MAX + }; + + // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1 + struct am_NotificationStatus_eComparator; + /** + * This struct holds information about the configuration for notifications + */ + /** + * This struct holds information about the configuration for notifications + */ + struct am_NotificationConfiguration_s: CommonAPI::SerializableStruct { + /** + * The notification type of the notification + */ + am_CustomNotificationType_t type; + /** + * The Notification status. This can be periodic, min/max value based or even off + * for example + */ + am_NotificationStatus_e status; + /** + * This gives additional information to the notification status. + Relation between + * notification status and the value: + NS_PERIODIC - the period in ms + NS_MINIMUM + * - the minimum value that triggers the notification + NS_MAXIMUM - the maximum + * value that triggers the notifcation + NS_CHANGE - the resolution of the change + * value + */ + int16_t parameter; + + am_NotificationConfiguration_s() = default; + am_NotificationConfiguration_s(const am_CustomNotificationType_t& type, const am_NotificationStatus_e& status, const int16_t& parameter); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeInt32Type(); + typeOutputStream.writeInt16Type(); + } + }; + typedef std::vector<am_NotificationConfiguration_s> am_NotificationConfiguration_L; + /** + * a domain ID + */ + /** + * a domain ID + */ + typedef uint16_t am_domainID_t; + /** + * This project specific value classifies the format in which data is exchanged + * within a connection. + */ + /** + * This project specific value classifies the format in which data is exchanged + * within a connection. + */ + typedef uint16_t am_CustomConnectionFormat_t; + /** + * This represents one "hopp" in a route + */ + /** + * This represents one "hopp" in a route + */ + struct am_RoutingElement_s: CommonAPI::SerializableStruct { + /** + * the source ID + */ + am_sourceID_t sourceID; + /** + * the sinkID + */ + am_sinkID_t sinkID; + /** + * the domainID the routeElement is in + */ + am_domainID_t domainID; + /** + * the connectionformat that is used for the route + */ + am_CustomConnectionFormat_t connectionFormat; + + am_RoutingElement_s() = default; + am_RoutingElement_s(const am_sourceID_t& sourceID, const am_sinkID_t& sinkID, const am_domainID_t& domainID, const am_CustomConnectionFormat_t& connectionFormat); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + } + }; + typedef std::vector<am_RoutingElement_s> am_RoutingElement_L; + typedef std::vector<am_SoundProperty_s> am_SoundProperty_L; + /** + * time in ms! + */ + /** + * time in ms! + */ + typedef int16_t am_time_t; + /** + * For products, different ramp types can be defined here. + It is in the + * responsibility of the product to make sure that the routing plugins are aware + * of the ramp types used. + */ + /** + * For products, different ramp types can be defined here. + It is in the + * responsibility of the product to make sure that the routing plugins are aware + * of the ramp types used. + */ + typedef uint16_t am_CustomRampType_t; + /** + * This datatype determines if a sourceID or a sinkID is used in the union + * following + */ + enum class am_VolumeType_e: int32_t { + VT_UNKNOWN = 0, + /** + * the following type is a sink + */ + VT_SINK = 1, + /** + * the following type is a source + */ + VT_SOURCE = 2, + VT_MAX + }; + + // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1 + struct am_VolumeType_eComparator; + /** + * This types describe a mixed description for source and sinks volumes. + */ + /** + * This types describe a mixed description for source and sinks volumes. + */ + struct am_Volumes_s: CommonAPI::SerializableStruct { + /** + * describes the type of the volume: source or sink. + */ + am_VolumeType_e volumeType; + /** + * either sourceID or sinkID + */ + am_DataType_u volumeID; + /** + * The volume + */ + am_volume_t volume; + /** + * the ramp that shall be driven + */ + am_CustomRampType_t ramp; + /** + * the time for the ramp + */ + am_time_t time; + + am_Volumes_s() = default; + am_Volumes_s(const am_VolumeType_e& volumeType, const am_DataType_u& volumeID, const am_volume_t& volume, const am_CustomRampType_t& ramp, const am_time_t& time); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeInt32Type(); + typeOutputStream.writeVariantType(); + typeOutputStream.writeInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeInt16Type(); + } + }; + typedef std::vector<am_Volumes_s> am_Volumes_L; + typedef std::vector<am_CustomConnectionFormat_t> am_ConnectionFormat_L; + typedef bool am_bool_t; + typedef std::vector<am_bool_t> am_Convertion_L; + /** + * a gateway ID + */ + /** + * a gateway ID + */ + typedef uint16_t am_gatewayID_t; + /** + * a converter ID + */ + /** + * a converter ID + */ + typedef uint16_t am_converterID_t; + /** + * a crossfader ID + */ + /** + * a crossfader ID + */ + typedef uint16_t am_crossfaderID_t; + /** + * speed + */ + /** + * speed + */ + typedef uint16_t am_speed_t; + /** + * describes the active sink of a crossfader. + */ + enum class am_HotSink_e: int32_t { + /** + * default + */ + HS_UNKNOWN = 0, + /** + * sinkA is active + */ + HS_SINKA = 1, + /** + * sinkB is active + */ + HS_SINKB = 2, + /** + * the crossfader is in the transition state + */ + HS_INTERMEDIATE = 3, + HS_MAX + }; + + // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1 + struct am_HotSink_eComparator; + enum class am_DomainState_e: int32_t { + /** + * default + */ + DS_UNKNOWN = 0, + /** + * the domain is controlled by the daemon + */ + DS_CONTROLLED = 1, + /** + * the domain is independent starting up + */ + DS_INDEPENDENT_STARTUP = 1, + /** + * the domain is independent running down + */ + DS_INDEPENDENT_RUNDOWN = 2, + DS_MAX + }; + + // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1 + struct am_DomainState_eComparator; + /** + * the errors of the audiomanager. All possible errors are in here. This enum is + * used widely as return parameter. + */ + enum class am_Error_e: int32_t { + /** + * no error - positive reply + */ + E_OK = 0, + /** + * default + */ + E_UNKNOWN = 1, + /** + * value out of range + */ + E_OUT_OF_RANGE = 2, + /** + * not used + */ + E_NOT_USED = 3, + /** + * a database error occurred + */ + E_DATABASE_ERROR = 4, + /** + * the desired object already exists + */ + E_ALREADY_EXISTS = 5, + /** + * there is no change + */ + E_NO_CHANGE = 6, + /** + * the desired action is not possible + */ + E_NOT_POSSIBLE = 7, + /** + * the desired object is non existent + */ + E_NON_EXISTENT = 8, + /** + * the asynchronous action was aborted + */ + E_ABORTED = 9, + /** + * This error is returned in case a connect is issued with a connectionFormat that + * cannot be selected for the connection. This could be either due to the + * capabilities of a source or a sink or gateway compatibilities for example + */ + E_WRONG_FORMAT = 10, + E_MAX + }; + + // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1 + struct am_Error_eComparator; + enum class am_InterruptState_e: int32_t { + /** + * default + */ + IS_UNKNOWN = 0, + /** + * the interrupt state is off - no interrupt + */ + IS_OFF = 1, + /** + * the interrupt state is interrupted - the interrupt is active + */ + IS_INTERRUPTED = 2, + IS_MAX + }; + + // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1 + struct am_InterruptState_eComparator; + /** + * This enumeration is used to define the type of the action that is correlated to + * a handle. + */ + enum class am_Handle_e: int32_t { + H_UNKNOWN = 0, + H_CONNECT = 1, + H_DISCONNECT = 2, + H_SETSOURCESTATE = 3, + H_SETSINKVOLUME = 4, + H_SETSOURCEVOLUME = 5, + H_SETSINKSOUNDPROPERTY = 6, + H_SETSOURCESOUNDPROPERTY = 7, + H_SETSINKSOUNDPROPERTIES = 8, + H_SETSOURCESOUNDPROPERTIES = 9, + H_CROSSFADE = 10, + H_SETVOLUMES = 11, + H_SETSINKNOTIFICATION = 12, + H_SETSOURCENOTIFICATION = 13, + H_MAX + }; + + // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1 + struct am_Handle_eComparator; + /** + * The source state reflects the state of the source + */ + enum class am_SourceState_e: int32_t { + SS_UNKNNOWN = 0, + /** + * The source can be activly heared + */ + SS_ON = 1, + /** + * The source cannot be heared + */ + SS_OFF = 2, + /** + * The source is paused. Meaning it cannot be heared but should be prepared to + * play again soon. + */ + SS_PAUSED = 3, + SS_MAX + }; + + // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1 + struct am_SourceState_eComparator; + /** + * This enum describes the ready state of the routing part + */ + enum class am_RoutingReady_e: int32_t { + RR_UNKNOWN = 0, + RR_READY = 1, + RR_RUNDOWN = 2 + }; + + // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1 + struct am_RoutingReady_eComparator; + /** + * a list of routing elements that lead from source to sink + */ + /** + * a list of routing elements that lead from source to sink + */ + struct am_Route_s: CommonAPI::SerializableStruct { + /** + * the sourceID where the route starts + */ + am_sourceID_t sourceID; + /** + * the sinkID where the route ends + */ + am_sinkID_t sinkID; + /** + * the actual route as list of routing elements + */ + am_RoutingElement_L route; + + am_Route_s() = default; + am_Route_s(const am_sourceID_t& sourceID, const am_sinkID_t& sinkID, const am_RoutingElement_L& route); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.beginWriteStructType(); + typeOutputStream.writeUInt16Type();typeOutputStream.writeUInt16Type();typeOutputStream.writeUInt16Type();typeOutputStream.writeUInt16Type(); + typeOutputStream.endWriteStructType(); + typeOutputStream.endWriteVectorType(); + } + }; + /** + * This struct describes the attribiutes of a crossfader. + */ + /** + * This struct describes the attribiutes of a crossfader. + */ + struct am_Crossfader_s: CommonAPI::SerializableStruct { + /** + * This is the ID of the crossfader, it is unique in the system. There are 2 ways, + * ID can be created: either it is assigned during the registration process (in a + * dynamic context, uniqueness will be ensured by the AudioManager daemon), or it + * is a fixed (the project has to ensure the uniqueness of the ID). + */ + am_crossfaderID_t crossfaderID; + /** + * The name of the crossfader. Must be unique in the whole system. + */ + std::string name; + /** + * The sinkID of the SinkA. Sinks shall be registered before registering the + * crossfader. + */ + am_sinkID_t sinkID_A; + /** + * The sinkID of the SinkB. Sinks shall be registered before registering the + * crossfader. + */ + am_sinkID_t sinkID_B; + /** + * The sourceID of the crossfader source. The source shall be registered before + * the crossfader. + */ + am_sourceID_t sourceID; + /** + * This enum can have 3 states: + + HS_SINKA sinkA is the current hot one, sinkB + * is not audible + HS_SINKB sinkB is the current hot one, sinkB is not + * audible + HS_INTERMEDIATE the fader is stuck in between a cross-fading + * action. This could be due to an abort or an error. Before using the + * crossfader, it must be set to either HS_SINKA or HS_SINKB. + */ + am_HotSink_e hotSink; + + am_Crossfader_s() = default; + am_Crossfader_s(const am_crossfaderID_t& crossfaderID, const std::string& name, const am_sinkID_t& sinkID_A, const am_sinkID_t& sinkID_B, const am_sourceID_t& sourceID, const am_HotSink_e& hotSink); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeStringType(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeInt32Type(); + } + }; + /** + * This struct describes the attributes of a gateway. + */ + /** + * This struct describes the attributes of a gateway. + */ + struct am_Gateway_s: CommonAPI::SerializableStruct { + /** + * This is the ID of the gateway, it is unique in the system. There are 2 ways, ID + * can be created: either it is assigned during the registration process (in a + * dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it + * is a fixed (the project has to ensure the uniqueness of the ID). + */ + am_gatewayID_t gatewayID; + /** + * The name of the gateway. Must be unique in the whole system. + */ + std::string name; + /** + * The sinkID of the gateway sink-end. The sink is a full blown sink with + * connectionFormats, sinkClassIDs etc... It makes sense to register the sinks of + * a gateway as non-visible. Care needs to be taken that the connectionsFormats + * match with the ones in the conversionMatrix. If the sink is located in the + * controllingDomain, the ID needs to be retrieved by registering the sink before + * registering the gateway. In case the sink is in a different domain, the ID + * needs to be retrieved via peeking. + */ + am_sinkID_t sinkID; + /** + * The sourceID of the gateway sink-end. The sink is a full blown source with + * connectionFormats, sinkClassIDs etc... It makes sense to register the sources + * of a gateway as non-visible. Care needs to be taken that the + * connectionsFormats match with the ones in the conversionMatrix. If the source + * is located in the controllingDomain, the ID needs to be retrieved by + * registering the source before registering the gateway. In case the source is + * in a different domain, the ID needs to be retrieved via peeking. + */ + am_sourceID_t sourceID; + /** + * The ID of the sink. If the domain is the same like the controlling domain, the + * ID is known due to registration. If the domain is different, the ID needs to + * be retrieved via peeking. + */ + am_domainID_t domainSinkID; + /** + * The ID of the source. If the domain is the same like the controlling domain, + * the ID is known due to registration. If the domain is different, the ID needs + * to be retrieved via peeking. + */ + am_domainID_t domainSourceID; + /** + * This is the ID of the domain that registers the gateway. + */ + am_domainID_t controlDomainID; + /** + * This is the list of available formats on the source side of the gateway. It is + * not defined during the gateway registration but copied from the source + * registration. + */ + am_ConnectionFormat_L listSourceFormats; + /** + * This is the list of available formats on the sink side of the gateway. It is + * not defined during the gateway registration but copied from the sink + * registration. + */ + am_ConnectionFormat_L listSinkFormats; + /** + * This is matrix holding information about the conversion capability of the + * gateway, it's length is defined by the length(listSinkFormats) x + * length(listSourceFormats). + If a SinkFormat can be converted into a + * SourceFormat, the vector will hold a 1, if no conversion is possible, a + * 0. + The data is stored row orientated, where the rows are related to the + * sinksFormats and the columns to the sourceFormats. The first value will hold + * the conversion information from the first sourceFormat to the first sinkFormat + * for example and the seventh value the information about the 3rd sinkFormat to + * the 1st sourceFormat in case we would have 3 sourceFormats. + */ + am_Convertion_L convertionMatrix; + + am_Gateway_s() = default; + am_Gateway_s(const am_gatewayID_t& gatewayID, const std::string& name, const am_sinkID_t& sinkID, const am_sourceID_t& sourceID, const am_domainID_t& domainSinkID, const am_domainID_t& domainSourceID, const am_domainID_t& controlDomainID, const am_ConnectionFormat_L& listSourceFormats, const am_ConnectionFormat_L& listSinkFormats, const am_Convertion_L& convertionMatrix); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeStringType(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.endWriteVectorType(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.endWriteVectorType(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.writeBoolType(); + typeOutputStream.endWriteVectorType(); + } + }; + /** + * This struct describes the attributes of a gateway. + */ + /** + * This struct describes the attributes of a gateway. + */ + struct am_Converter_s: CommonAPI::SerializableStruct { + /** + * This is the ID of the gateway, it is unique in the system. There are 2 ways, ID + * can be created: either it is assigned during the registration process (in a + * dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it + * is a fixed (the project has to ensure the uniqueness of the ID). + */ + am_converterID_t converterID; + /** + * The name of the gateway. Must be unique in the whole system. + */ + std::string name; + /** + * The sinkID of the gateway sink-end. The sink is a full blown sink with + * connectionFormats, sinkClassIDs etc... It makes sense to register the sinks of + * a gateway as non-visible. Care needs to be taken that the connectionsFormats + * match with the ones in the conversionMatrix. If the sink is located in the + * controllingDomain, the ID needs to be retrieved by registering the sink before + * registering the gateway. In case the sink is in a different domain, the ID + * needs to be retrieved via peeking. + */ + am_sinkID_t sinkID; + /** + * The sourceID of the gateway sink-end. The sink is a full blown source with + * connectionFormats, sinkClassIDs etc... It makes sense to register the sources + * of a gateway as non-visible. Care needs to be taken that the + * connectionsFormats match with the ones in the conversionMatrix. If the source + * is located in the controllingDomain, the ID needs to be retrieved by + * registering the source before registering the gateway. In case the source is + * in a different domain, the ID needs to be retrieved via peeking. + */ + am_sourceID_t sourceID; + /** + * The ID of the sink. If the domain is the same like the controlling domain, the + * ID is known due to registration. If the domain is different, the ID needs to + * be retrieved via peeking. + */ + am_domainID_t domainID; + /** + * This is the list of available formats on the source side of the gateway. It is + * not defined during the gateway registration but copied from the source + * registration. + */ + am_ConnectionFormat_L listSourceFormats; + /** + * This is the list of available formats on the sink side of the gateway. It is + * not defined during the gateway registration but copied from the sink + * registration. + */ + am_ConnectionFormat_L listSinkFormats; + /** + * This is matrix holding information about the conversion capability of the + * gateway, it's length is defined by the length(listSinkFormats) x + * length(listSourceFormats). + If a SinkFormat can be converted into a + * SourceFormat, the vector will hold a 1, if no conversion is possible, a + * 0. + The data is stored row orientated, where the rows are related to the + * sinksFormats and the columns to the sourceFormats. The first value will hold + * the conversion information from the first sourceFormat to the first sinkFormat + * for example and the seventh value the information about the 3rd sinkFormat to + * the 1st sourceFormat in case we would have 3 sourceFormats. + */ + am_Convertion_L convertionMatrix; + + am_Converter_s() = default; + am_Converter_s(const am_converterID_t& converterID, const std::string& name, const am_sinkID_t& sinkID, const am_sourceID_t& sourceID, const am_domainID_t& domainID, const am_ConnectionFormat_L& listSourceFormats, const am_ConnectionFormat_L& listSinkFormats, const am_Convertion_L& convertionMatrix); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeStringType(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.endWriteVectorType(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.endWriteVectorType(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.writeBoolType(); + typeOutputStream.endWriteVectorType(); + } + }; + /** + * a handle is used for asynchronous operations and is uniquely assigned for each + * of this operations + */ + /** + * a handle is used for asynchronous operations and is uniquely assigned for each + * of this operations + */ + struct am_Handle_s: CommonAPI::SerializableStruct { + /** + * the handletype + */ + am_Handle_e handleType; + /** + * the handle as value + */ + uint16_t handle; + + am_Handle_s() = default; + am_Handle_s(const am_Handle_e& handleType, const uint16_t& handle); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeInt32Type(); + typeOutputStream.writeUInt16Type(); + } + }; + /** + * struct that holds attribiutes of a mainconnection + */ + /** + * struct that holds attribiutes of a mainconnection + */ + struct am_MainConnection_s: CommonAPI::SerializableStruct { + /** + * the assigned ID + */ + am_mainConnectionID_t mainConnectionID; + /** + * the current connection state + */ + am_ConnectionState_e connectionState; + /** + * the sinkID + */ + am_sinkID_t sinkID; + /** + * the sourceID + */ + am_sourceID_t sourceID; + /** + * the delay of the connection + */ + am_timeSync_t delay; + /** + * the list of sub connection IDs the mainconnection consists of + */ + am_ConnectionID_L listConnectionID; + + am_MainConnection_s() = default; + am_MainConnection_s(const am_mainConnectionID_t& mainConnectionID, const am_ConnectionState_e& connectionState, const am_sinkID_t& sinkID, const am_sourceID_t& sourceID, const am_timeSync_t& delay, const am_ConnectionID_L& listConnectionID); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeInt32Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeInt16Type(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.endWriteVectorType(); + } + }; + /** + * This struct holds the payload of a notification. + */ + /** + * This struct holds the payload of a notification. + */ + struct am_NotificationPayload_s: CommonAPI::SerializableStruct { + /** + * This defines the notification type + */ + am_CustomNotificationType_t type; + /** + * This is finally the value of the notification. It's meaning depends on the + * notificationType + */ + int16_t value; + + am_NotificationPayload_s() = default; + am_NotificationPayload_s(const am_CustomNotificationType_t& type, const int16_t& value); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeInt16Type(); + } + }; + /** + * This struct describes the attribiutes of a sink + */ + /** + * This struct describes the attribiutes of a sink + */ + struct am_Sink_s: CommonAPI::SerializableStruct { + /** + * This is the ID of the sink, it is unique in the system. There are 2 ways, ID + * can be created: either it is assigned during the registration process (in a + * dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it + * is a fixed (the project has to ensure the uniqueness of the ID). + */ + am_sinkID_t sinkID; + /** + * The name of the sink. Must be unique in the whole system. + */ + std::string name; + /** + * The domainID is the domain the sink belongs to. A sink can only be in one + * domain. + */ + am_domainID_t domainID; + /** + * The sinkClassID references to a sinkClass. With the help of classification, + * rules can be setup to define the system behaviour. + */ + am_sinkClass_t sinkClassID; + /** + * This is the volume of the sink. It is set by the AudioManagerController. + */ + am_volume_t volume; + /** + * This Boolean flag indicates whether a sink is visible to the commandInterface + * or not. If the User must have the possibility to choose the source in the HMI, + * it must be visible. But there are also good reasons for invisible sinks, for + * example if the sink is part of a crossfader or gateway. HMI relevant changes + * in visible sinks will be automatically reported by the daemon to the + * commandInterface. + */ + bool visible; + /** + * This attribute reflects the availability of the sink. There are several reasons + * why a sink could be not available for the moment: for example the shutdown of + * a sink because of overtemperature or over- & undervoltage. The + * availability consists of two pieces of information: + + Availablility: the + * status itself, can be A_AVAILABLE, A_UNAVAILABLE or A_UNKNOWN + + * AvailabilityReason: this informs about the last reason for a change in + * availability. The reasons itself are product specific. + */ + am_Availability_s available; + /** + * This attribute reflects the muteState of the sink. The information is not the + * "real" state of the sink, but the HMI representation for he commandInterface + * controlled by the AudioManagerController. + */ + am_MuteState_e muteState; + /** + * This is the representation of the Volume for the commandInterface. It is used + * by the HMI to set the volume of a sink, the AudioManagerController has to + * transform this into real source and sink volumes. + */ + am_mainVolume_t mainVolume; + /** + * This is the list of soundProperties, that the sink is capable of. The + * soundProperties itself are project specific. For sinks, a possible + * soundProperty could be for example settings. + */ + am_SoundProperty_L listSoundProperties; + /** + * This list holds information about the formats that the Source is capable of + * supporting when delivering audio. + */ + am_ConnectionFormat_L listConnectionFormats; + /** + * This is the list of the available mainSoundProperties. The principle is the + * same than with soundProperties, but they are only visible to the + * CommandInterface. + */ + am_MainSoundProperty_L listMainSoundProperties; + /** + * This is the list of the MainNotificationConfigurations. These notifications + * work on the level of command interface. + */ + am_NotificationConfiguration_L listMainNotificationConfigurations; + /** + * This is the list of the NotificationConfigurations. These notifications work on + * the level of RoutingPlugins. + */ + am_NotificationConfiguration_L listNotificationConfigurations; + + am_Sink_s() = default; + am_Sink_s(const am_sinkID_t& sinkID, const std::string& name, const am_domainID_t& domainID, const am_sinkClass_t& sinkClassID, const am_volume_t& volume, const bool& visible, const am_Availability_s& available, const am_MuteState_e& muteState, const am_mainVolume_t& mainVolume, const am_SoundProperty_L& listSoundProperties, const am_ConnectionFormat_L& listConnectionFormats, const am_MainSoundProperty_L& listMainSoundProperties, const am_NotificationConfiguration_L& listMainNotificationConfigurations, const am_NotificationConfiguration_L& listNotificationConfigurations); + + + virtual void readFromInputStream(CommonAPI::InputStream& inputStream); + virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const; + + static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) { + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeStringType(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.writeInt16Type(); + typeOutputStream.writeBoolType(); + typeOutputStream.beginWriteStructType(); + typeOutputStream.writeInt32Type();typeOutputStream.writeUInt16Type(); + typeOutputStream.endWriteStructType(); + typeOutputStream.writeInt32Type(); + typeOutputStream.writeInt16Type(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.beginWriteStructType(); + typeOutputStream.writeUInt16Type();typeOutputStream.writeInt16Type(); + typeOutputStream.endWriteStructType(); + typeOutputStream.endWriteVectorType(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.writeUInt16Type(); + typeOutputStream.endWriteVectorType(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.beginWriteStructType(); + typeOutputStream.writeUInt16Type();typeOutputStream.writeInt16Type(); + typeOutputStream.endWriteStructType(); + typeOutputStream.endWriteVectorType(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.beginWriteStructType(); + typeOutputStream.writeUInt16Type();typeOutputStream.writeInt32Type();typeOutputStream.writeInt16Type(); + typeOutputStream.endWriteStructType(); + typeOutputStream.endWriteVectorType(); + typeOutputStream.beginWriteVectorType(); + typeOutputStream.beginWriteStructType(); + typeOutputStream.writeUInt16Type();typeOutputStream.writeInt32Type();typeOutputStream.writeInt16Type(); + typeOutputStream.endWriteStructType(); + typeOutputStream.endWriteVectorType(); + } + }; + /** + * This struct describes the attribiutes of a source + */ + /** + * This struct describes the attribiutes of a source + */ + struct am_Source_s: CommonAPI::SerializableStruct { + /** + * This is the ID of the source, it is unique in the system. There are 2 ways, ID + * can be created: either it is assigned during the registration process (in a + * dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it + * is a fixed (the project has to ensure the uniqueness of the ID). + */ + am_sourceID_t sourceID; + /** + * The domainID is the domain the source belongs to. A source can only be in one + * domain. + */ + am_domainID_t domainID; + /** + * The name of the source. Must be unique in the whole system. + */ + std::string name; + /** + * the sourceClassID, indicates the class the source is in. This information can + * be used by the Controller to implement different behaviour for different + * classes. + */ + am_sourceClass_t sourceClassID; + /** + * The source state is an indication towards the source if it is actively heard or + * not. The source can use this information to implement features like automatic + * spin down of CD's in case the CD is not the active source or AF following of a + * tuner that is not actively heard. The source state is set by the + * AudioManagerController.There are 3 possible states: + + SS_ON: the source is + * active + SS_OFF: the source is off + SS_PAUSED: the source is paused and + * not active. + */ + am_SourceState_e sourceState; + /** + * This is the volume of the source. It is set by the AudioManagerController. It + * is used to adopt different audiolevels in a system and mixing of sources (e.g. + * navigation hints & music). + */ + am_volume_t volume; + /** + * This Boolean flag indicates whether a source is visible to the commandInterface + * or not. If the User must have the possibility to choose the source in the HMI, + * it must be visible. But there are also good reasons for invisible sources, for + * example if the source is part of a crossfader or gateway. HMI relevant changes + * in visible sources will be automatically reported by the daemon to the + * commandInterface. + */ + bool visible; + /** + * This attribute reflects the availability of the source. There are several + * reasons why a source could be not available for the moment. For example a CD + * player which has no CD entered in the slot can be unavailable, or a USB player + * with no or unreadable stick attached. Other scenarios involve the shutdown of + * a source because of overtemperature or over- & undervoltage. The + * availability consists of two informations: + + Availablility: the status + * itself, can be A_AVAILABLE, A_UNAVAILABLE or A_UNKNOWN + + * AvailabilityReason: this informs about the last reason for a change in + * availability. The reasons itself are product specific. + */ + am_Availability_s available; + /** + * Some special sources can have special behaviors, the are so called "Low Level + * Interrupts". Here the current status is documented. The information can be + * used by the AudioManagerController to react to the changes by for example + * lowering the volume of the mainSources. The two states are + + IS_OFF: the + * interrupt is not active at the moment + IS_INTERRUPTED: the interrupt is + * playing at the moment. + */ + am_InterruptState_e interruptState; + /** + * This is the list of soundProperties, that the source is capable of. The + * soundProperties itself are project specific. For sources, a possible + * soundProperty could be navigation volume offset, for example. + */ + am_SoundProperty_L listSoundProperties; + /** + |