diff options
Diffstat (limited to 'src/test/src-gen/core/v1/commonapi/tests')
54 files changed, 0 insertions, 6078 deletions
diff --git a/src/test/src-gen/core/v1/commonapi/tests/ExtendedInterface.hpp b/src/test/src-gen/core/v1/commonapi/tests/ExtendedInterface.hpp deleted file mode 100644 index 2f401f1..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/ExtendedInterface.hpp +++ /dev/null @@ -1,58 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_EXTENDED_INTERFACE_HPP_ -#define V1_COMMONAPI_TESTS_EXTENDED_INTERFACE_HPP_ - - - -#include <v1/commonapi/tests/TestInterface.hpp> - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <CommonAPI/Types.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { - -class ExtendedInterface -: virtual public TestInterface { -public: - virtual ~ExtendedInterface() { } - - static inline const char* getInterface(); - static inline CommonAPI::Version getInterfaceVersion(); -}; - -const char* ExtendedInterface::getInterface() { - return ("commonapi.tests.ExtendedInterface"); -} - -CommonAPI::Version ExtendedInterface::getInterfaceVersion() { - return CommonAPI::Version(1, 0); -} - - -} // namespace tests -} // namespace commonapi -} // namespace v1 - -namespace CommonAPI { -} - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_EXTENDED_INTERFACE_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/ExtendedInterfaceProxy.hpp b/src/test/src-gen/core/v1/commonapi/tests/ExtendedInterfaceProxy.hpp deleted file mode 100644 index 077c236..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/ExtendedInterfaceProxy.hpp +++ /dev/null @@ -1,161 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_Extended_Interface_PROXY_HPP_ -#define V1_COMMONAPI_TESTS_Extended_Interface_PROXY_HPP_ - -#include <v1/commonapi/tests/ExtendedInterfaceProxyBase.hpp> - -#include "v1/commonapi/tests/TestInterfaceProxy.hpp" - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { - -template <typename ... _AttributeExtensions> -class ExtendedInterfaceProxy - : virtual public ExtendedInterface, - virtual public ExtendedInterfaceProxyBase, - public TestInterfaceProxy<_AttributeExtensions...>, - virtual public _AttributeExtensions... { -public: - ExtendedInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate); - ~ExtendedInterfaceProxy(); - - typedef ExtendedInterface InterfaceType; - - inline static const char* getInterface() { - return(ExtendedInterface::getInterface()); - } - - - - /** - * Calls TestIntMethodExtended with synchronous semantics. - * - * All const parameters are input parameters to this method. - * 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 TestIntMethodExtended(const uint32_t &_inInt, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info = nullptr); - /** - * Calls TestIntMethodExtended 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> TestIntMethodExtendedAsync(const uint32_t &_inInt, TestIntMethodExtendedAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr); - - - /** - * Returns the CommonAPI address of the remote partner this proxy communicates with. - */ - virtual const CommonAPI::Address &getAddress() 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<ExtendedInterfaceProxyBase> delegate_; -}; - -typedef ExtendedInterfaceProxy<> ExtendedInterfaceProxyDefault; - - -// -// ExtendedInterfaceProxy Implementation -// -template <typename ... _AttributeExtensions> -ExtendedInterfaceProxy<_AttributeExtensions...>::ExtendedInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate): - ::v1::commonapi::tests::TestInterfaceProxy<_AttributeExtensions...>(delegate), - _AttributeExtensions(*(std::dynamic_pointer_cast<ExtendedInterfaceProxyBase>(delegate)))..., - delegate_(std::dynamic_pointer_cast<ExtendedInterfaceProxyBase>(delegate)) { -} - -template <typename ... _AttributeExtensions> -ExtendedInterfaceProxy<_AttributeExtensions...>::~ExtendedInterfaceProxy() { -} - -template <typename ... _AttributeExtensions> -void ExtendedInterfaceProxy<_AttributeExtensions...>::TestIntMethodExtended(const uint32_t &_inInt, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info) { - delegate_->TestIntMethodExtended(_inInt, _internalCallStatus, _info); -} - -template <typename ... _AttributeExtensions> -std::future<CommonAPI::CallStatus> ExtendedInterfaceProxy<_AttributeExtensions...>::TestIntMethodExtendedAsync(const uint32_t &_inInt, TestIntMethodExtendedAsyncCallback _callback, const CommonAPI::CallInfo *_info) { - return delegate_->TestIntMethodExtendedAsync(_inInt, _callback, _info); -} - -template <typename ... _AttributeExtensions> -const CommonAPI::Address &ExtendedInterfaceProxy<_AttributeExtensions...>::getAddress() const { - return delegate_->getAddress(); -} - -template <typename ... _AttributeExtensions> -bool ExtendedInterfaceProxy<_AttributeExtensions...>::isAvailable() const { - return delegate_->isAvailable(); -} - -template <typename ... _AttributeExtensions> -bool ExtendedInterfaceProxy<_AttributeExtensions...>::isAvailableBlocking() const { - return delegate_->isAvailableBlocking(); -} - -template <typename ... _AttributeExtensions> -CommonAPI::ProxyStatusEvent& ExtendedInterfaceProxy<_AttributeExtensions...>::getProxyStatusEvent() { - return delegate_->getProxyStatusEvent(); -} - -template <typename ... _AttributeExtensions> -CommonAPI::InterfaceVersionAttribute& ExtendedInterfaceProxy<_AttributeExtensions...>::getInterfaceVersionAttribute() { - return delegate_->getInterfaceVersionAttribute(); -} - - -} // namespace tests -} // namespace commonapi -} // namespace v1 - - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_Extended_Interface_PROXY_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/ExtendedInterfaceProxyBase.hpp b/src/test/src-gen/core/v1/commonapi/tests/ExtendedInterfaceProxyBase.hpp deleted file mode 100644 index 9a3080f..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/ExtendedInterfaceProxyBase.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_Extended_Interface_PROXY_BASE_HPP_ -#define V1_COMMONAPI_TESTS_Extended_Interface_PROXY_BASE_HPP_ - -#include <v1/commonapi/tests/ExtendedInterface.hpp> -#include <v1/commonapi/tests/TestInterfaceProxyBase.hpp> - - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <vector> - -#include <CommonAPI/Proxy.hpp> -#include <functional> -#include <future> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { - -class ExtendedInterfaceProxyBase - : virtual public TestInterfaceProxyBase { -public: - - typedef std::function<void(const CommonAPI::CallStatus&)> TestIntMethodExtendedAsyncCallback; - - - - virtual void TestIntMethodExtended(const uint32_t &_inInt, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info = nullptr) = 0; - virtual std::future<CommonAPI::CallStatus> TestIntMethodExtendedAsync(const uint32_t &_inInt, TestIntMethodExtendedAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr) = 0; -}; - -} // namespace tests -} // namespace commonapi -} // namespace v1 - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_Extended_Interface_PROXY_BASE_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/ExtendedInterfaceStub.hpp b/src/test/src-gen/core/v1/commonapi/tests/ExtendedInterfaceStub.hpp deleted file mode 100644 index 432640f..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/ExtendedInterfaceStub.hpp +++ /dev/null @@ -1,112 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_Extended_Interface_STUB_HPP_ -#define V1_COMMONAPI_TESTS_Extended_Interface_STUB_HPP_ - -#include <functional> - - - -#include <v1/commonapi/tests/TestInterfaceStub.hpp> - -#include <v1/commonapi/tests/ExtendedInterface.hpp> - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <vector> - -#include <CommonAPI/Stub.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { - -/** - * Receives messages from remote and handles all dispatching of deserialized calls - * to a stub for the service ExtendedInterface. 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 ExtendedInterfaceStubAdapter - : public virtual CommonAPI::StubAdapter, - public virtual ExtendedInterface, - public virtual TestInterfaceStubAdapter { - 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 ExtendedInterface. - * 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 ExtendedInterfaceStubRemoteEvent -: public virtual TestInterfaceStubRemoteEvent -{ -public: - virtual ~ExtendedInterfaceStubRemoteEvent() { } - -}; - -/** - * Defines the interface that must be implemented by any class that should provide - * the service ExtendedInterface 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 ExtendedInterfaceStub - : public virtual CommonAPI::Stub<ExtendedInterfaceStubAdapter, ExtendedInterfaceStubRemoteEvent>, - public virtual TestInterfaceStub -{ -public: - typedef std::function<void ()>TestIntMethodExtendedReply_t; - - virtual ~ExtendedInterfaceStub() {} - 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 TestIntMethodExtended. - virtual void TestIntMethodExtended(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _inInt, TestIntMethodExtendedReply_t _reply) = 0; - - using CommonAPI::Stub<ExtendedInterfaceStubAdapter, ExtendedInterfaceStubRemoteEvent>::initStubAdapter; - typedef CommonAPI::Stub<ExtendedInterfaceStubAdapter, ExtendedInterfaceStubRemoteEvent>::StubAdapterType StubAdapterType; - typedef CommonAPI::Stub<ExtendedInterfaceStubAdapter, ExtendedInterfaceStubRemoteEvent>::RemoteEventHandlerType RemoteEventHandlerType; - typedef ExtendedInterfaceStubRemoteEvent RemoteEventType; - typedef ExtendedInterface StubInterface; -}; - -} // namespace tests -} // namespace commonapi -} // namespace v1 - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_Extended_Interface_STUB_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/ExtendedInterfaceStubDefault.cpp b/src/test/src-gen/core/v1/commonapi/tests/ExtendedInterfaceStubDefault.cpp deleted file mode 100644 index f3bc8ac..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/ExtendedInterfaceStubDefault.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#include <v1/commonapi/tests/ExtendedInterfaceStubDefault.hpp> -#include <assert.h> - -namespace v1 { -namespace commonapi { -namespace tests { - -ExtendedInterfaceStubDefault::ExtendedInterfaceStubDefault(): - remoteEventHandler_(this), - interfaceVersion_(ExtendedInterface::getInterfaceVersion()) { -} - -const CommonAPI::Version& ExtendedInterfaceStubDefault::getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> _client) { - (void)_client; - return interfaceVersion_; -} - -ExtendedInterfaceStubRemoteEvent* ExtendedInterfaceStubDefault::initStubAdapter(const std::shared_ptr<ExtendedInterfaceStubAdapter> &_adapter) { - TestInterfaceStubDefault::initStubAdapter(_adapter); - CommonAPI::Stub<ExtendedInterfaceStubAdapter, ExtendedInterfaceStubRemoteEvent>::stubAdapter_ = _adapter; - return &remoteEventHandler_; -} - - -void ExtendedInterfaceStubDefault::TestIntMethodExtended(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _inInt, TestIntMethodExtendedReply_t _reply) { - (void)_client; - (void) _inInt; - _reply(); -} - - - - -ExtendedInterfaceStubDefault::RemoteEventHandler::RemoteEventHandler(ExtendedInterfaceStubDefault *_defaultStub) - : TestInterfaceStubDefault::RemoteEventHandler(_defaultStub), - defaultStub_(_defaultStub) { -} - -} // namespace tests -} // namespace commonapi -} // namespace v1 diff --git a/src/test/src-gen/core/v1/commonapi/tests/ExtendedInterfaceStubDefault.hpp b/src/test/src-gen/core/v1/commonapi/tests/ExtendedInterfaceStubDefault.hpp deleted file mode 100644 index d353919..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/ExtendedInterfaceStubDefault.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_Extended_Interface_STUB_DEFAULT_HPP_ -#define V1_COMMONAPI_TESTS_Extended_Interface_STUB_DEFAULT_HPP_ - -#include <v1/commonapi/tests/TestInterfaceStubDefault.hpp> - -#include <v1/commonapi/tests/ExtendedInterfaceStub.hpp> -#include <sstream> - -namespace v1 { -namespace commonapi { -namespace tests { - -/** - * Provides a default implementation for ExtendedInterfaceStubRemoteEvent and - * ExtendedInterfaceStub. 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 ExtendedInterfaceStubDefault - : public virtual ExtendedInterfaceStub, - public virtual TestInterfaceStubDefault { -public: - ExtendedInterfaceStubDefault(); - - ExtendedInterfaceStubRemoteEvent* initStubAdapter(const std::shared_ptr<ExtendedInterfaceStubAdapter> &_adapter); - - const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> _client); - - - virtual void TestIntMethodExtended(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _inInt, TestIntMethodExtendedReply_t _reply); - - - -protected: - class RemoteEventHandler: public virtual ExtendedInterfaceStubRemoteEvent, public virtual TestInterfaceStubDefault::RemoteEventHandler { - public: - RemoteEventHandler(ExtendedInterfaceStubDefault *_defaultStub); - - - private: - ExtendedInterfaceStubDefault *defaultStub_; - }; -private: - ExtendedInterfaceStubDefault::RemoteEventHandler remoteEventHandler_; - - - CommonAPI::Version interfaceVersion_; -}; - -} // namespace tests -} // namespace commonapi -} // namespace v1 - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_Extended_Interface_STUB_DEFAULT diff --git a/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopDerivedInterface.hpp b/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopDerivedInterface.hpp deleted file mode 100644 index 5ce8a0e..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopDerivedInterface.hpp +++ /dev/null @@ -1,58 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_TEST_FREEDESKTOP_DERIVED_INTERFACE_HPP_ -#define V1_COMMONAPI_TESTS_TEST_FREEDESKTOP_DERIVED_INTERFACE_HPP_ - - - -#include <v1/commonapi/tests/TestFreedesktopInterface.hpp> - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <CommonAPI/Types.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { - -class TestFreedesktopDerivedInterface -: virtual public TestFreedesktopInterface { -public: - virtual ~TestFreedesktopDerivedInterface() { } - - static inline const char* getInterface(); - static inline CommonAPI::Version getInterfaceVersion(); -}; - -const char* TestFreedesktopDerivedInterface::getInterface() { - return ("commonapi.tests.TestFreedesktopDerivedInterface"); -} - -CommonAPI::Version TestFreedesktopDerivedInterface::getInterfaceVersion() { - return CommonAPI::Version(1, 0); -} - - -} // namespace tests -} // namespace commonapi -} // namespace v1 - -namespace CommonAPI { -} - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_TEST_FREEDESKTOP_DERIVED_INTERFACE_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopDerivedInterfaceProxy.hpp b/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopDerivedInterfaceProxy.hpp deleted file mode 100644 index edc78ab..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopDerivedInterfaceProxy.hpp +++ /dev/null @@ -1,173 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_Test_Freedesktop_Derived_Interface_PROXY_HPP_ -#define V1_COMMONAPI_TESTS_Test_Freedesktop_Derived_Interface_PROXY_HPP_ - -#include <v1/commonapi/tests/TestFreedesktopDerivedInterfaceProxyBase.hpp> - -#include "v1/commonapi/tests/TestFreedesktopInterfaceProxy.hpp" - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <CommonAPI/AttributeExtension.hpp> -#include <CommonAPI/Factory.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { - -template <typename ... _AttributeExtensions> -class TestFreedesktopDerivedInterfaceProxy - : virtual public TestFreedesktopDerivedInterface, - virtual public TestFreedesktopDerivedInterfaceProxyBase, - public TestFreedesktopInterfaceProxy<_AttributeExtensions...>, - virtual public _AttributeExtensions... { -public: - TestFreedesktopDerivedInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate); - ~TestFreedesktopDerivedInterfaceProxy(); - - typedef TestFreedesktopDerivedInterface InterfaceType; - - inline static const char* getInterface() { - return(TestFreedesktopDerivedInterface::getInterface()); - } - - /** - * Returns the wrapper class that provides access to the attribute TestAttributedFromDerivedInterface. - */ - virtual TestAttributedFromDerivedInterfaceAttribute& getTestAttributedFromDerivedInterfaceAttribute() { - return delegate_->getTestAttributedFromDerivedInterfaceAttribute(); - } - - - - - /** - * Returns the CommonAPI address of the remote partner this proxy communicates with. - */ - virtual const CommonAPI::Address &getAddress() 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<TestFreedesktopDerivedInterfaceProxyBase> delegate_; -}; - -typedef TestFreedesktopDerivedInterfaceProxy<> TestFreedesktopDerivedInterfaceProxyDefault; - -namespace TestFreedesktopDerivedInterfaceExtensions { - template <template <typename > class _ExtensionType> - class TestAttributedFromDerivedInterfaceAttributeExtension { - public: - typedef _ExtensionType<TestFreedesktopDerivedInterfaceProxyBase::TestAttributedFromDerivedInterfaceAttribute> extension_type; - - static_assert(std::is_base_of<typename CommonAPI::AttributeExtension<TestFreedesktopDerivedInterfaceProxyBase::TestAttributedFromDerivedInterfaceAttribute>, extension_type>::value, - "Not CommonAPI Attribute Extension!"); - #ifdef WIN32 - TestAttributedFromDerivedInterfaceAttributeExtension() {} - #endif - - TestAttributedFromDerivedInterfaceAttributeExtension(TestFreedesktopDerivedInterfaceProxyBase& proxy): attributeExtension_(proxy.getTestAttributedFromDerivedInterfaceAttribute()) { - } - - inline extension_type& getTestAttributedFromDerivedInterfaceAttributeExtension() { - return attributeExtension_; - } - - private: - extension_type attributeExtension_; - }; - -} // namespace TestFreedesktopDerivedInterfaceExtensions - -// -// TestFreedesktopDerivedInterfaceProxy Implementation -// -template <typename ... _AttributeExtensions> -TestFreedesktopDerivedInterfaceProxy<_AttributeExtensions...>::TestFreedesktopDerivedInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate): - ::v1::commonapi::tests::TestFreedesktopInterfaceProxy<_AttributeExtensions...>(delegate), - _AttributeExtensions(*(std::dynamic_pointer_cast<TestFreedesktopDerivedInterfaceProxyBase>(delegate)))..., - delegate_(std::dynamic_pointer_cast<TestFreedesktopDerivedInterfaceProxyBase>(delegate)) { -} - -template <typename ... _AttributeExtensions> -TestFreedesktopDerivedInterfaceProxy<_AttributeExtensions...>::~TestFreedesktopDerivedInterfaceProxy() { -} - - -template <typename ... _AttributeExtensions> -const CommonAPI::Address &TestFreedesktopDerivedInterfaceProxy<_AttributeExtensions...>::getAddress() const { - return delegate_->getAddress(); -} - -template <typename ... _AttributeExtensions> -bool TestFreedesktopDerivedInterfaceProxy<_AttributeExtensions...>::isAvailable() const { - return delegate_->isAvailable(); -} - -template <typename ... _AttributeExtensions> -bool TestFreedesktopDerivedInterfaceProxy<_AttributeExtensions...>::isAvailableBlocking() const { - return delegate_->isAvailableBlocking(); -} - -template <typename ... _AttributeExtensions> -CommonAPI::ProxyStatusEvent& TestFreedesktopDerivedInterfaceProxy<_AttributeExtensions...>::getProxyStatusEvent() { - return delegate_->getProxyStatusEvent(); -} - -template <typename ... _AttributeExtensions> -CommonAPI::InterfaceVersionAttribute& TestFreedesktopDerivedInterfaceProxy<_AttributeExtensions...>::getInterfaceVersionAttribute() { - return delegate_->getInterfaceVersionAttribute(); -} - - -} // namespace tests -} // namespace commonapi -} // namespace v1 - -namespace CommonAPI { -template<template<typename > class _AttributeExtension> -struct DefaultAttributeProxyHelper<::v1::commonapi::tests::TestFreedesktopDerivedInterfaceProxy, - _AttributeExtension> { - typedef typename ::v1::commonapi::tests::TestFreedesktopDerivedInterfaceProxy< - ::v1::commonapi::tests::TestFreedesktopDerivedInterfaceExtensions::TestAttributedFromDerivedInterfaceAttributeExtension<_AttributeExtension> - > class_t; -}; -} - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_Test_Freedesktop_Derived_Interface_PROXY_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopDerivedInterfaceProxyBase.hpp b/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopDerivedInterfaceProxyBase.hpp deleted file mode 100644 index d1496e4..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopDerivedInterfaceProxyBase.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_Test_Freedesktop_Derived_Interface_PROXY_BASE_HPP_ -#define V1_COMMONAPI_TESTS_Test_Freedesktop_Derived_Interface_PROXY_BASE_HPP_ - -#include <v1/commonapi/tests/TestFreedesktopDerivedInterface.hpp> -#include <v1/commonapi/tests/TestFreedesktopInterfaceProxyBase.hpp> - - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - - -#include <CommonAPI/Attribute.hpp> -#include <CommonAPI/Proxy.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { - -class TestFreedesktopDerivedInterfaceProxyBase - : virtual public TestFreedesktopInterfaceProxyBase { -public: - typedef CommonAPI::ObservableAttribute<uint32_t> TestAttributedFromDerivedInterfaceAttribute; - - - virtual TestAttributedFromDerivedInterfaceAttribute& getTestAttributedFromDerivedInterfaceAttribute() = 0; - - -}; - -} // namespace tests -} // namespace commonapi -} // namespace v1 - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_Test_Freedesktop_Derived_Interface_PROXY_BASE_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopDerivedInterfaceStub.hpp b/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopDerivedInterfaceStub.hpp deleted file mode 100644 index 4f2f3fe..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopDerivedInterfaceStub.hpp +++ /dev/null @@ -1,116 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_Test_Freedesktop_Derived_Interface_STUB_HPP_ -#define V1_COMMONAPI_TESTS_Test_Freedesktop_Derived_Interface_STUB_HPP_ - -#include <functional> - - - -#include <v1/commonapi/tests/TestFreedesktopInterfaceStub.hpp> - -#include <v1/commonapi/tests/TestFreedesktopDerivedInterface.hpp> - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - - -#include <CommonAPI/Stub.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { - -/** - * Receives messages from remote and handles all dispatching of deserialized calls - * to a stub for the service TestFreedesktopDerivedInterface. 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 TestFreedesktopDerivedInterfaceStubAdapter - : public virtual CommonAPI::StubAdapter, - public virtual TestFreedesktopDerivedInterface, - public virtual TestFreedesktopInterfaceStubAdapter { - public: - ///Notifies all remote listeners about a change of value of the attribute TestAttributedFromDerivedInterface. - virtual void fireTestAttributedFromDerivedInterfaceAttributeChanged(const uint32_t& TestAttributedFromDerivedInterface) = 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 TestFreedesktopDerivedInterface. - * 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 TestFreedesktopDerivedInterfaceStubRemoteEvent -: public virtual TestFreedesktopInterfaceStubRemoteEvent -{ -public: - virtual ~TestFreedesktopDerivedInterfaceStubRemoteEvent() { } - - /// Verification callback for remote set requests on the attribute TestAttributedFromDerivedInterface - virtual bool onRemoteSetTestAttributedFromDerivedInterfaceAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _value) = 0; - /// Action callback for remote set requests on the attribute TestAttributedFromDerivedInterface - virtual void onRemoteTestAttributedFromDerivedInterfaceAttributeChanged() = 0; -}; - -/** - * Defines the interface that must be implemented by any class that should provide - * the service TestFreedesktopDerivedInterface 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 TestFreedesktopDerivedInterfaceStub - : public virtual CommonAPI::Stub<TestFreedesktopDerivedInterfaceStubAdapter, TestFreedesktopDerivedInterfaceStubRemoteEvent>, - public virtual TestFreedesktopInterfaceStub -{ -public: - - virtual ~TestFreedesktopDerivedInterfaceStub() {} - virtual const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId) = 0; - - /// Provides getter access to the attribute TestAttributedFromDerivedInterface - virtual const uint32_t &getTestAttributedFromDerivedInterfaceAttribute(const std::shared_ptr<CommonAPI::ClientId> _client) = 0; - - - using CommonAPI::Stub<TestFreedesktopDerivedInterfaceStubAdapter, TestFreedesktopDerivedInterfaceStubRemoteEvent>::initStubAdapter; - typedef CommonAPI::Stub<TestFreedesktopDerivedInterfaceStubAdapter, TestFreedesktopDerivedInterfaceStubRemoteEvent>::StubAdapterType StubAdapterType; - typedef CommonAPI::Stub<TestFreedesktopDerivedInterfaceStubAdapter, TestFreedesktopDerivedInterfaceStubRemoteEvent>::RemoteEventHandlerType RemoteEventHandlerType; - typedef TestFreedesktopDerivedInterfaceStubRemoteEvent RemoteEventType; - typedef TestFreedesktopDerivedInterface StubInterface; -}; - -} // namespace tests -} // namespace commonapi -} // namespace v1 - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_Test_Freedesktop_Derived_Interface_STUB_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopDerivedInterfaceStubDefault.cpp b/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopDerivedInterfaceStubDefault.cpp deleted file mode 100644 index 255ad8b..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopDerivedInterfaceStubDefault.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#include <v1/commonapi/tests/TestFreedesktopDerivedInterfaceStubDefault.hpp> -#include <assert.h> - -namespace v1 { -namespace commonapi { -namespace tests { - -TestFreedesktopDerivedInterfaceStubDefault::TestFreedesktopDerivedInterfaceStubDefault(): - remoteEventHandler_(this), - interfaceVersion_(TestFreedesktopDerivedInterface::getInterfaceVersion()) { -} - -const CommonAPI::Version& TestFreedesktopDerivedInterfaceStubDefault::getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> _client) { - (void)_client; - return interfaceVersion_; -} - -TestFreedesktopDerivedInterfaceStubRemoteEvent* TestFreedesktopDerivedInterfaceStubDefault::initStubAdapter(const std::shared_ptr<TestFreedesktopDerivedInterfaceStubAdapter> &_adapter) { - TestFreedesktopInterfaceStubDefault::initStubAdapter(_adapter); - CommonAPI::Stub<TestFreedesktopDerivedInterfaceStubAdapter, TestFreedesktopDerivedInterfaceStubRemoteEvent>::stubAdapter_ = _adapter; - return &remoteEventHandler_; -} - -const uint32_t& TestFreedesktopDerivedInterfaceStubDefault::getTestAttributedFromDerivedInterfaceAttribute() { - return testAttributedFromDerivedInterfaceAttributeValue_; -} - -const uint32_t& TestFreedesktopDerivedInterfaceStubDefault::getTestAttributedFromDerivedInterfaceAttribute(const std::shared_ptr<CommonAPI::ClientId> _client) { - (void)_client; - return getTestAttributedFromDerivedInterfaceAttribute(); -} - -void TestFreedesktopDerivedInterfaceStubDefault::setTestAttributedFromDerivedInterfaceAttribute(uint32_t _value) { - const bool valueChanged = trySetTestAttributedFromDerivedInterfaceAttribute(std::move(_value)); - if (valueChanged) { - auto stubAdapter = CommonAPI::Stub<TestFreedesktopDerivedInterfaceStubAdapter, TestFreedesktopDerivedInterfaceStubRemoteEvent>::stubAdapter_.lock(); - if (stubAdapter) - stubAdapter->fireTestAttributedFromDerivedInterfaceAttributeChanged(testAttributedFromDerivedInterfaceAttributeValue_); - } -} - -bool TestFreedesktopDerivedInterfaceStubDefault::trySetTestAttributedFromDerivedInterfaceAttribute(uint32_t _value) { - if (!validateTestAttributedFromDerivedInterfaceAttributeRequestedValue(_value)) - return false; - - const bool valueChanged = (testAttributedFromDerivedInterfaceAttributeValue_ != _value); - testAttributedFromDerivedInterfaceAttributeValue_ = std::move(_value); - return valueChanged; -} - -bool TestFreedesktopDerivedInterfaceStubDefault::validateTestAttributedFromDerivedInterfaceAttributeRequestedValue(const uint32_t &_value) { - (void)_value; - return true; -} - -void TestFreedesktopDerivedInterfaceStubDefault::setTestAttributedFromDerivedInterfaceAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _value) { - (void)_client; - setTestAttributedFromDerivedInterfaceAttribute(_value); -} - -void TestFreedesktopDerivedInterfaceStubDefault::onRemoteTestAttributedFromDerivedInterfaceAttributeChanged() { - // No operation in default -} - -void TestFreedesktopDerivedInterfaceStubDefault::RemoteEventHandler::onRemoteTestAttributedFromDerivedInterfaceAttributeChanged() { - assert(defaultStub_ !=NULL); - defaultStub_->onRemoteTestAttributedFromDerivedInterfaceAttributeChanged(); -} - -bool TestFreedesktopDerivedInterfaceStubDefault::RemoteEventHandler::onRemoteSetTestAttributedFromDerivedInterfaceAttribute(uint32_t _value) { - assert(defaultStub_ !=NULL); - return defaultStub_->trySetTestAttributedFromDerivedInterfaceAttribute(std::move(_value)); -} - -bool TestFreedesktopDerivedInterfaceStubDefault::RemoteEventHandler::onRemoteSetTestAttributedFromDerivedInterfaceAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _value) { - (void)_client; - return onRemoteSetTestAttributedFromDerivedInterfaceAttribute(_value); -} - - - - - -TestFreedesktopDerivedInterfaceStubDefault::RemoteEventHandler::RemoteEventHandler(TestFreedesktopDerivedInterfaceStubDefault *_defaultStub) - : TestFreedesktopInterfaceStubDefault::RemoteEventHandler(_defaultStub), - defaultStub_(_defaultStub) { -} - -} // namespace tests -} // namespace commonapi -} // namespace v1 diff --git a/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopDerivedInterfaceStubDefault.hpp b/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopDerivedInterfaceStubDefault.hpp deleted file mode 100644 index 63d7b42..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopDerivedInterfaceStubDefault.hpp +++ /dev/null @@ -1,82 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_Test_Freedesktop_Derived_Interface_STUB_DEFAULT_HPP_ -#define V1_COMMONAPI_TESTS_Test_Freedesktop_Derived_Interface_STUB_DEFAULT_HPP_ - -#include <v1/commonapi/tests/TestFreedesktopInterfaceStubDefault.hpp> - -#include <v1/commonapi/tests/TestFreedesktopDerivedInterfaceStub.hpp> -#include <sstream> - -namespace v1 { -namespace commonapi { -namespace tests { - -/** - * Provides a default implementation for TestFreedesktopDerivedInterfaceStubRemoteEvent and - * TestFreedesktopDerivedInterfaceStub. 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 TestFreedesktopDerivedInterfaceStubDefault - : public virtual TestFreedesktopDerivedInterfaceStub, - public virtual TestFreedesktopInterfaceStubDefault { -public: - TestFreedesktopDerivedInterfaceStubDefault(); - - TestFreedesktopDerivedInterfaceStubRemoteEvent* initStubAdapter(const std::shared_ptr<TestFreedesktopDerivedInterfaceStubAdapter> &_adapter); - - const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> _client); - - virtual const uint32_t& getTestAttributedFromDerivedInterfaceAttribute(); - virtual const uint32_t& getTestAttributedFromDerivedInterfaceAttribute(const std::shared_ptr<CommonAPI::ClientId> _client); - virtual void setTestAttributedFromDerivedInterfaceAttribute(uint32_t _value); - virtual void setTestAttributedFromDerivedInterfaceAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _value); - - - - -protected: - virtual bool trySetTestAttributedFromDerivedInterfaceAttribute(uint32_t _value); - virtual bool validateTestAttributedFromDerivedInterfaceAttributeRequestedValue(const uint32_t &_value); - virtual void onRemoteTestAttributedFromDerivedInterfaceAttributeChanged(); - class RemoteEventHandler: public virtual TestFreedesktopDerivedInterfaceStubRemoteEvent, public virtual TestFreedesktopInterfaceStubDefault::RemoteEventHandler { - public: - RemoteEventHandler(TestFreedesktopDerivedInterfaceStubDefault *_defaultStub); - - virtual bool onRemoteSetTestAttributedFromDerivedInterfaceAttribute(uint32_t _value); - virtual bool onRemoteSetTestAttributedFromDerivedInterfaceAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _value); - virtual void onRemoteTestAttributedFromDerivedInterfaceAttributeChanged(); - - - private: - TestFreedesktopDerivedInterfaceStubDefault *defaultStub_; - }; -private: - TestFreedesktopDerivedInterfaceStubDefault::RemoteEventHandler remoteEventHandler_; - - uint32_t testAttributedFromDerivedInterfaceAttributeValue_ {}; - - CommonAPI::Version interfaceVersion_; -}; - -} // namespace tests -} // namespace commonapi -} // namespace v1 - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_Test_Freedesktop_Derived_Interface_STUB_DEFAULT diff --git a/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopInterface.hpp b/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopInterface.hpp deleted file mode 100644 index 801533d..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopInterface.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_TEST_FREEDESKTOP_INTERFACE_HPP_ -#define V1_COMMONAPI_TESTS_TEST_FREEDESKTOP_INTERFACE_HPP_ - - - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <CommonAPI/Types.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { - -class TestFreedesktopInterface { -public: - virtual ~TestFreedesktopInterface() { } - - static inline const char* getInterface(); - static inline CommonAPI::Version getInterfaceVersion(); -}; - -const char* TestFreedesktopInterface::getInterface() { - return ("commonapi.tests.TestFreedesktopInterface"); -} - -CommonAPI::Version TestFreedesktopInterface::getInterfaceVersion() { - return CommonAPI::Version(1, 0); -} - - -} // namespace tests -} // namespace commonapi -} // namespace v1 - -namespace CommonAPI { -} - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_TEST_FREEDESKTOP_INTERFACE_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopInterfaceProxy.hpp b/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopInterfaceProxy.hpp deleted file mode 100644 index e1dc664..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopInterfaceProxy.hpp +++ /dev/null @@ -1,254 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_Test_Freedesktop_Interface_PROXY_HPP_ -#define V1_COMMONAPI_TESTS_Test_Freedesktop_Interface_PROXY_HPP_ - -#include <v1/commonapi/tests/TestFreedesktopInterfaceProxyBase.hpp> - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <CommonAPI/AttributeExtension.hpp> -#include <CommonAPI/Factory.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { - -template <typename ... _AttributeExtensions> -class TestFreedesktopInterfaceProxy - : virtual public TestFreedesktopInterface, - virtual public TestFreedesktopInterfaceProxyBase, - virtual public _AttributeExtensions... { -public: - TestFreedesktopInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate); - ~TestFreedesktopInterfaceProxy(); - - typedef TestFreedesktopInterface InterfaceType; - - - /** - * Returns the wrapper class that provides access to the attribute TestPredefinedTypeAttribute. - */ - virtual TestPredefinedTypeAttributeAttribute& getTestPredefinedTypeAttributeAttribute() { - return delegate_->getTestPredefinedTypeAttributeAttribute(); - } - /** - * Returns the wrapper class that provides access to the attribute TestReadonlyAttribute. - */ - virtual TestReadonlyAttributeAttribute& getTestReadonlyAttributeAttribute() { - return delegate_->getTestReadonlyAttributeAttribute(); - } - /** - * Returns the wrapper class that provides access to the attribute TestDerivedStructAttribute. - */ - virtual TestDerivedStructAttributeAttribute& getTestDerivedStructAttributeAttribute() { - return delegate_->getTestDerivedStructAttributeAttribute(); - } - /** - * Returns the wrapper class that provides access to the attribute TestDerivedArrayAttribute. - */ - virtual TestDerivedArrayAttributeAttribute& getTestDerivedArrayAttributeAttribute() { - return delegate_->getTestDerivedArrayAttributeAttribute(); - } - - - - - /** - * Returns the CommonAPI address of the remote partner this proxy communicates with. - */ - virtual const CommonAPI::Address &getAddress() 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<TestFreedesktopInterfaceProxyBase> delegate_; -}; - -typedef TestFreedesktopInterfaceProxy<> TestFreedesktopInterfaceProxyDefault; - -namespace TestFreedesktopInterfaceExtensions { - template <template <typename > class _ExtensionType> - class TestPredefinedTypeAttributeAttributeExtension { - public: - typedef _ExtensionType<TestFreedesktopInterfaceProxyBase::TestPredefinedTypeAttributeAttribute> extension_type; - - static_assert(std::is_base_of<typename CommonAPI::AttributeExtension<TestFreedesktopInterfaceProxyBase::TestPredefinedTypeAttributeAttribute>, extension_type>::value, - "Not CommonAPI Attribute Extension!"); - #ifdef WIN32 - TestPredefinedTypeAttributeAttributeExtension() {} - #endif - - TestPredefinedTypeAttributeAttributeExtension(TestFreedesktopInterfaceProxyBase& proxy): attributeExtension_(proxy.getTestPredefinedTypeAttributeAttribute()) { - } - - inline extension_type& getTestPredefinedTypeAttributeAttributeExtension() { - return attributeExtension_; - } - - private: - extension_type attributeExtension_; - }; - - template <template <typename > class _ExtensionType> - class TestReadonlyAttributeAttributeExtension { - public: - typedef _ExtensionType<TestFreedesktopInterfaceProxyBase::TestReadonlyAttributeAttribute> extension_type; - - static_assert(std::is_base_of<typename CommonAPI::AttributeExtension<TestFreedesktopInterfaceProxyBase::TestReadonlyAttributeAttribute>, extension_type>::value, - "Not CommonAPI Attribute Extension!"); - #ifdef WIN32 - TestReadonlyAttributeAttributeExtension() {} - #endif - - TestReadonlyAttributeAttributeExtension(TestFreedesktopInterfaceProxyBase& proxy): attributeExtension_(proxy.getTestReadonlyAttributeAttribute()) { - } - - inline extension_type& getTestReadonlyAttributeAttributeExtension() { - return attributeExtension_; - } - - private: - extension_type attributeExtension_; - }; - - template <template <typename > class _ExtensionType> - class TestDerivedStructAttributeAttributeExtension { - public: - typedef _ExtensionType<TestFreedesktopInterfaceProxyBase::TestDerivedStructAttributeAttribute> extension_type; - - static_assert(std::is_base_of<typename CommonAPI::AttributeExtension<TestFreedesktopInterfaceProxyBase::TestDerivedStructAttributeAttribute>, extension_type>::value, - "Not CommonAPI Attribute Extension!"); - #ifdef WIN32 - TestDerivedStructAttributeAttributeExtension() {} - #endif - - TestDerivedStructAttributeAttributeExtension(TestFreedesktopInterfaceProxyBase& proxy): attributeExtension_(proxy.getTestDerivedStructAttributeAttribute()) { - } - - inline extension_type& getTestDerivedStructAttributeAttributeExtension() { - return attributeExtension_; - } - - private: - extension_type attributeExtension_; - }; - - template <template <typename > class _ExtensionType> - class TestDerivedArrayAttributeAttributeExtension { - public: - typedef _ExtensionType<TestFreedesktopInterfaceProxyBase::TestDerivedArrayAttributeAttribute> extension_type; - - static_assert(std::is_base_of<typename CommonAPI::AttributeExtension<TestFreedesktopInterfaceProxyBase::TestDerivedArrayAttributeAttribute>, extension_type>::value, - "Not CommonAPI Attribute Extension!"); - #ifdef WIN32 - TestDerivedArrayAttributeAttributeExtension() {} - #endif - - TestDerivedArrayAttributeAttributeExtension(TestFreedesktopInterfaceProxyBase& proxy): attributeExtension_(proxy.getTestDerivedArrayAttributeAttribute()) { - } - - inline extension_type& getTestDerivedArrayAttributeAttributeExtension() { - return attributeExtension_; - } - - private: - extension_type attributeExtension_; - }; - -} // namespace TestFreedesktopInterfaceExtensions - -// -// TestFreedesktopInterfaceProxy Implementation -// -template <typename ... _AttributeExtensions> -TestFreedesktopInterfaceProxy<_AttributeExtensions...>::TestFreedesktopInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate): - _AttributeExtensions(*(std::dynamic_pointer_cast<TestFreedesktopInterfaceProxyBase>(delegate)))..., - delegate_(std::dynamic_pointer_cast<TestFreedesktopInterfaceProxyBase>(delegate)) { -} - -template <typename ... _AttributeExtensions> -TestFreedesktopInterfaceProxy<_AttributeExtensions...>::~TestFreedesktopInterfaceProxy() { -} - - -template <typename ... _AttributeExtensions> -const CommonAPI::Address &TestFreedesktopInterfaceProxy<_AttributeExtensions...>::getAddress() const { - return delegate_->getAddress(); -} - -template <typename ... _AttributeExtensions> -bool TestFreedesktopInterfaceProxy<_AttributeExtensions...>::isAvailable() const { - return delegate_->isAvailable(); -} - -template <typename ... _AttributeExtensions> -bool TestFreedesktopInterfaceProxy<_AttributeExtensions...>::isAvailableBlocking() const { - return delegate_->isAvailableBlocking(); -} - -template <typename ... _AttributeExtensions> -CommonAPI::ProxyStatusEvent& TestFreedesktopInterfaceProxy<_AttributeExtensions...>::getProxyStatusEvent() { - return delegate_->getProxyStatusEvent(); -} - -template <typename ... _AttributeExtensions> -CommonAPI::InterfaceVersionAttribute& TestFreedesktopInterfaceProxy<_AttributeExtensions...>::getInterfaceVersionAttribute() { - return delegate_->getInterfaceVersionAttribute(); -} - - -} // namespace tests -} // namespace commonapi -} // namespace v1 - -namespace CommonAPI { -template<template<typename > class _AttributeExtension> -struct DefaultAttributeProxyHelper<::v1::commonapi::tests::TestFreedesktopInterfaceProxy, - _AttributeExtension> { - typedef typename ::v1::commonapi::tests::TestFreedesktopInterfaceProxy< - ::v1::commonapi::tests::TestFreedesktopInterfaceExtensions::TestPredefinedTypeAttributeAttributeExtension<_AttributeExtension>, - ::v1::commonapi::tests::TestFreedesktopInterfaceExtensions::TestReadonlyAttributeAttributeExtension<_AttributeExtension>, - ::v1::commonapi::tests::TestFreedesktopInterfaceExtensions::TestDerivedStructAttributeAttributeExtension<_AttributeExtension>, - ::v1::commonapi::tests::TestFreedesktopInterfaceExtensions::TestDerivedArrayAttributeAttributeExtension<_AttributeExtension> - > class_t; -}; -} - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_Test_Freedesktop_Interface_PROXY_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopInterfaceProxyBase.hpp b/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopInterfaceProxyBase.hpp deleted file mode 100644 index fec0ce3..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopInterfaceProxyBase.hpp +++ /dev/null @@ -1,59 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_Test_Freedesktop_Interface_PROXY_BASE_HPP_ -#define V1_COMMONAPI_TESTS_Test_Freedesktop_Interface_PROXY_BASE_HPP_ - -#include <v1/commonapi/tests/TestFreedesktopInterface.hpp> - - -#include <commonapi/tests/DerivedTypeCollection.hpp> - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <cstdint> -#include <vector> - -#include <CommonAPI/Attribute.hpp> -#include <CommonAPI/Proxy.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { - -class TestFreedesktopInterfaceProxyBase - : virtual public CommonAPI::Proxy { -public: - typedef CommonAPI::ObservableAttribute<uint32_t> TestPredefinedTypeAttributeAttribute; - typedef CommonAPI::ObservableReadonlyAttribute<uint32_t> TestReadonlyAttributeAttribute; - typedef CommonAPI::ObservableAttribute<::commonapi::tests::DerivedTypeCollection::TestStructExtended> TestDerivedStructAttributeAttribute; - typedef CommonAPI::ObservableAttribute<::commonapi::tests::DerivedTypeCollection::TestArrayUInt64> TestDerivedArrayAttributeAttribute; - - - virtual TestPredefinedTypeAttributeAttribute& getTestPredefinedTypeAttributeAttribute() = 0; - virtual TestReadonlyAttributeAttribute& getTestReadonlyAttributeAttribute() = 0; - virtual TestDerivedStructAttributeAttribute& getTestDerivedStructAttributeAttribute() = 0; - virtual TestDerivedArrayAttributeAttribute& getTestDerivedArrayAttributeAttribute() = 0; - - -}; - -} // namespace tests -} // namespace commonapi -} // namespace v1 - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_Test_Freedesktop_Interface_PROXY_BASE_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopInterfaceStub.hpp b/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopInterfaceStub.hpp deleted file mode 100644 index c354509..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopInterfaceStub.hpp +++ /dev/null @@ -1,135 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_Test_Freedesktop_Interface_STUB_HPP_ -#define V1_COMMONAPI_TESTS_Test_Freedesktop_Interface_STUB_HPP_ - -#include <functional> - - - -#include <commonapi/tests/DerivedTypeCollection.hpp> - -#include <v1/commonapi/tests/TestFreedesktopInterface.hpp> - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <cstdint> -#include <vector> - -#include <CommonAPI/Stub.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { - -/** - * Receives messages from remote and handles all dispatching of deserialized calls - * to a stub for the service TestFreedesktopInterface. 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 TestFreedesktopInterfaceStubAdapter - : public virtual CommonAPI::StubAdapter, - public virtual TestFreedesktopInterface { - public: - ///Notifies all remote listeners about a change of value of the attribute TestPredefinedTypeAttribute. - virtual void fireTestPredefinedTypeAttributeAttributeChanged(const uint32_t& TestPredefinedTypeAttribute) = 0; - ///Notifies all remote listeners about a change of value of the attribute TestReadonlyAttribute. - virtual void fireTestReadonlyAttributeAttributeChanged(const uint32_t& TestReadonlyAttribute) = 0; - ///Notifies all remote listeners about a change of value of the attribute TestDerivedStructAttribute. - virtual void fireTestDerivedStructAttributeAttributeChanged(const ::commonapi::tests::DerivedTypeCollection::TestStructExtended& TestDerivedStructAttribute) = 0; - ///Notifies all remote listeners about a change of value of the attribute TestDerivedArrayAttribute. - virtual void fireTestDerivedArrayAttributeAttributeChanged(const ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64& TestDerivedArrayAttribute) = 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 TestFreedesktopInterface. - * 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 TestFreedesktopInterfaceStubRemoteEvent -{ -public: - virtual ~TestFreedesktopInterfaceStubRemoteEvent() { } - - /// Verification callback for remote set requests on the attribute TestPredefinedTypeAttribute - virtual bool onRemoteSetTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _value) = 0; - /// Action callback for remote set requests on the attribute TestPredefinedTypeAttribute - virtual void onRemoteTestPredefinedTypeAttributeAttributeChanged() = 0; - /// Verification callback for remote set requests on the attribute TestDerivedStructAttribute - virtual bool onRemoteSetTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::TestStructExtended _value) = 0; - /// Action callback for remote set requests on the attribute TestDerivedStructAttribute - virtual void onRemoteTestDerivedStructAttributeAttributeChanged() = 0; - /// Verification callback for remote set requests on the attribute TestDerivedArrayAttribute - virtual bool onRemoteSetTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64 _value) = 0; - /// Action callback for remote set requests on the attribute TestDerivedArrayAttribute - virtual void onRemoteTestDerivedArrayAttributeAttributeChanged() = 0; -}; - -/** - * Defines the interface that must be implemented by any class that should provide - * the service TestFreedesktopInterface 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 TestFreedesktopInterfaceStub - : public virtual CommonAPI::Stub<TestFreedesktopInterfaceStubAdapter, TestFreedesktopInterfaceStubRemoteEvent> -{ -public: - - virtual ~TestFreedesktopInterfaceStub() {} - virtual const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId) = 0; - - /// Provides getter access to the attribute TestPredefinedTypeAttribute - virtual const uint32_t &getTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client) = 0; - /// Provides getter access to the attribute TestReadonlyAttribute - virtual const uint32_t &getTestReadonlyAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client) = 0; - /// Provides getter access to the attribute TestDerivedStructAttribute - virtual const ::commonapi::tests::DerivedTypeCollection::TestStructExtended &getTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client) = 0; - /// Provides getter access to the attribute TestDerivedArrayAttribute - virtual const ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64 &getTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client) = 0; - - - using CommonAPI::Stub<TestFreedesktopInterfaceStubAdapter, TestFreedesktopInterfaceStubRemoteEvent>::initStubAdapter; - typedef CommonAPI::Stub<TestFreedesktopInterfaceStubAdapter, TestFreedesktopInterfaceStubRemoteEvent>::StubAdapterType StubAdapterType; - typedef CommonAPI::Stub<TestFreedesktopInterfaceStubAdapter, TestFreedesktopInterfaceStubRemoteEvent>::RemoteEventHandlerType RemoteEventHandlerType; - typedef TestFreedesktopInterfaceStubRemoteEvent RemoteEventType; - typedef TestFreedesktopInterface StubInterface; -}; - -} // namespace tests -} // namespace commonapi -} // namespace v1 - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_Test_Freedesktop_Interface_STUB_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopInterfaceStubDefault.cpp b/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopInterfaceStubDefault.cpp deleted file mode 100644 index 4dd9cda..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopInterfaceStubDefault.cpp +++ /dev/null @@ -1,244 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#include <v1/commonapi/tests/TestFreedesktopInterfaceStubDefault.hpp> -#include <assert.h> - -namespace v1 { -namespace commonapi { -namespace tests { - -TestFreedesktopInterfaceStubDefault::TestFreedesktopInterfaceStubDefault(): - remoteEventHandler_(this), - interfaceVersion_(TestFreedesktopInterface::getInterfaceVersion()) { -} - -const CommonAPI::Version& TestFreedesktopInterfaceStubDefault::getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> _client) { - (void)_client; - return interfaceVersion_; -} - -TestFreedesktopInterfaceStubRemoteEvent* TestFreedesktopInterfaceStubDefault::initStubAdapter(const std::shared_ptr<TestFreedesktopInterfaceStubAdapter> &_adapter) { - CommonAPI::Stub<TestFreedesktopInterfaceStubAdapter, TestFreedesktopInterfaceStubRemoteEvent>::stubAdapter_ = _adapter; - return &remoteEventHandler_; -} - -const uint32_t& TestFreedesktopInterfaceStubDefault::getTestPredefinedTypeAttributeAttribute() { - return testPredefinedTypeAttributeAttributeValue_; -} - -const uint32_t& TestFreedesktopInterfaceStubDefault::getTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client) { - (void)_client; - return getTestPredefinedTypeAttributeAttribute(); -} - -void TestFreedesktopInterfaceStubDefault::setTestPredefinedTypeAttributeAttribute(uint32_t _value) { - const bool valueChanged = trySetTestPredefinedTypeAttributeAttribute(std::move(_value)); - if (valueChanged) { - auto stubAdapter = CommonAPI::Stub<TestFreedesktopInterfaceStubAdapter, TestFreedesktopInterfaceStubRemoteEvent>::stubAdapter_.lock(); - if (stubAdapter) - stubAdapter->fireTestPredefinedTypeAttributeAttributeChanged(testPredefinedTypeAttributeAttributeValue_); - } -} - -bool TestFreedesktopInterfaceStubDefault::trySetTestPredefinedTypeAttributeAttribute(uint32_t _value) { - if (!validateTestPredefinedTypeAttributeAttributeRequestedValue(_value)) - return false; - - const bool valueChanged = (testPredefinedTypeAttributeAttributeValue_ != _value); - testPredefinedTypeAttributeAttributeValue_ = std::move(_value); - return valueChanged; -} - -bool TestFreedesktopInterfaceStubDefault::validateTestPredefinedTypeAttributeAttributeRequestedValue(const uint32_t &_value) { - (void)_value; - return true; -} - -void TestFreedesktopInterfaceStubDefault::setTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _value) { - (void)_client; - setTestPredefinedTypeAttributeAttribute(_value); -} - -void TestFreedesktopInterfaceStubDefault::onRemoteTestPredefinedTypeAttributeAttributeChanged() { - // No operation in default -} - -void TestFreedesktopInterfaceStubDefault::RemoteEventHandler::onRemoteTestPredefinedTypeAttributeAttributeChanged() { - assert(defaultStub_ !=NULL); - defaultStub_->onRemoteTestPredefinedTypeAttributeAttributeChanged(); -} - -bool TestFreedesktopInterfaceStubDefault::RemoteEventHandler::onRemoteSetTestPredefinedTypeAttributeAttribute(uint32_t _value) { - assert(defaultStub_ !=NULL); - return defaultStub_->trySetTestPredefinedTypeAttributeAttribute(std::move(_value)); -} - -bool TestFreedesktopInterfaceStubDefault::RemoteEventHandler::onRemoteSetTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _value) { - (void)_client; - return onRemoteSetTestPredefinedTypeAttributeAttribute(_value); -} - -const uint32_t& TestFreedesktopInterfaceStubDefault::getTestReadonlyAttributeAttribute() { - return testReadonlyAttributeAttributeValue_; -} - -const uint32_t& TestFreedesktopInterfaceStubDefault::getTestReadonlyAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client) { - (void)_client; - return getTestReadonlyAttributeAttribute(); -} - -void TestFreedesktopInterfaceStubDefault::setTestReadonlyAttributeAttribute(uint32_t _value) { - const bool valueChanged = trySetTestReadonlyAttributeAttribute(std::move(_value)); - if (valueChanged) { - auto stubAdapter = CommonAPI::Stub<TestFreedesktopInterfaceStubAdapter, TestFreedesktopInterfaceStubRemoteEvent>::stubAdapter_.lock(); - if (stubAdapter) - stubAdapter->fireTestReadonlyAttributeAttributeChanged(testReadonlyAttributeAttributeValue_); - } -} - -bool TestFreedesktopInterfaceStubDefault::trySetTestReadonlyAttributeAttribute(uint32_t _value) { - if (!validateTestReadonlyAttributeAttributeRequestedValue(_value)) - return false; - - const bool valueChanged = (testReadonlyAttributeAttributeValue_ != _value); - testReadonlyAttributeAttributeValue_ = std::move(_value); - return valueChanged; -} - -bool TestFreedesktopInterfaceStubDefault::validateTestReadonlyAttributeAttributeRequestedValue(const uint32_t &_value) { - (void)_value; - return true; -} - - -const ::commonapi::tests::DerivedTypeCollection::TestStructExtended& TestFreedesktopInterfaceStubDefault::getTestDerivedStructAttributeAttribute() { - return testDerivedStructAttributeAttributeValue_; -} - -const ::commonapi::tests::DerivedTypeCollection::TestStructExtended& TestFreedesktopInterfaceStubDefault::getTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client) { - (void)_client; - return getTestDerivedStructAttributeAttribute(); -} - -void TestFreedesktopInterfaceStubDefault::setTestDerivedStructAttributeAttribute(::commonapi::tests::DerivedTypeCollection::TestStructExtended _value) { - const bool valueChanged = trySetTestDerivedStructAttributeAttribute(std::move(_value)); - if (valueChanged) { - auto stubAdapter = CommonAPI::Stub<TestFreedesktopInterfaceStubAdapter, TestFreedesktopInterfaceStubRemoteEvent>::stubAdapter_.lock(); - if (stubAdapter) - stubAdapter->fireTestDerivedStructAttributeAttributeChanged(testDerivedStructAttributeAttributeValue_); - } -} - -bool TestFreedesktopInterfaceStubDefault::trySetTestDerivedStructAttributeAttribute(::commonapi::tests::DerivedTypeCollection::TestStructExtended _value) { - if (!validateTestDerivedStructAttributeAttributeRequestedValue(_value)) - return false; - - const bool valueChanged = (testDerivedStructAttributeAttributeValue_ != _value); - testDerivedStructAttributeAttributeValue_ = std::move(_value); - return valueChanged; -} - -bool TestFreedesktopInterfaceStubDefault::validateTestDerivedStructAttributeAttributeRequestedValue(const ::commonapi::tests::DerivedTypeCollection::TestStructExtended &_value) { - (void)_value; - return true; -} - -void TestFreedesktopInterfaceStubDefault::setTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::TestStructExtended _value) { - (void)_client; - setTestDerivedStructAttributeAttribute(_value); -} - -void TestFreedesktopInterfaceStubDefault::onRemoteTestDerivedStructAttributeAttributeChanged() { - // No operation in default -} - -void TestFreedesktopInterfaceStubDefault::RemoteEventHandler::onRemoteTestDerivedStructAttributeAttributeChanged() { - assert(defaultStub_ !=NULL); - defaultStub_->onRemoteTestDerivedStructAttributeAttributeChanged(); -} - -bool TestFreedesktopInterfaceStubDefault::RemoteEventHandler::onRemoteSetTestDerivedStructAttributeAttribute(::commonapi::tests::DerivedTypeCollection::TestStructExtended _value) { - assert(defaultStub_ !=NULL); - return defaultStub_->trySetTestDerivedStructAttributeAttribute(std::move(_value)); -} - -bool TestFreedesktopInterfaceStubDefault::RemoteEventHandler::onRemoteSetTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::TestStructExtended _value) { - (void)_client; - return onRemoteSetTestDerivedStructAttributeAttribute(_value); -} - -const ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64& TestFreedesktopInterfaceStubDefault::getTestDerivedArrayAttributeAttribute() { - return testDerivedArrayAttributeAttributeValue_; -} - -const ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64& TestFreedesktopInterfaceStubDefault::getTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client) { - (void)_client; - return getTestDerivedArrayAttributeAttribute(); -} - -void TestFreedesktopInterfaceStubDefault::setTestDerivedArrayAttributeAttribute(::commonapi::tests::DerivedTypeCollection::TestArrayUInt64 _value) { - const bool valueChanged = trySetTestDerivedArrayAttributeAttribute(std::move(_value)); - if (valueChanged) { - auto stubAdapter = CommonAPI::Stub<TestFreedesktopInterfaceStubAdapter, TestFreedesktopInterfaceStubRemoteEvent>::stubAdapter_.lock(); - if (stubAdapter) - stubAdapter->fireTestDerivedArrayAttributeAttributeChanged(testDerivedArrayAttributeAttributeValue_); - } -} - -bool TestFreedesktopInterfaceStubDefault::trySetTestDerivedArrayAttributeAttribute(::commonapi::tests::DerivedTypeCollection::TestArrayUInt64 _value) { - if (!validateTestDerivedArrayAttributeAttributeRequestedValue(_value)) - return false; - - const bool valueChanged = (testDerivedArrayAttributeAttributeValue_ != _value); - testDerivedArrayAttributeAttributeValue_ = std::move(_value); - return valueChanged; -} - -bool TestFreedesktopInterfaceStubDefault::validateTestDerivedArrayAttributeAttributeRequestedValue(const ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64 &_value) { - (void)_value; - return true; -} - -void TestFreedesktopInterfaceStubDefault::setTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64 _value) { - (void)_client; - setTestDerivedArrayAttributeAttribute(_value); -} - -void TestFreedesktopInterfaceStubDefault::onRemoteTestDerivedArrayAttributeAttributeChanged() { - // No operation in default -} - -void TestFreedesktopInterfaceStubDefault::RemoteEventHandler::onRemoteTestDerivedArrayAttributeAttributeChanged() { - assert(defaultStub_ !=NULL); - defaultStub_->onRemoteTestDerivedArrayAttributeAttributeChanged(); -} - -bool TestFreedesktopInterfaceStubDefault::RemoteEventHandler::onRemoteSetTestDerivedArrayAttributeAttribute(::commonapi::tests::DerivedTypeCollection::TestArrayUInt64 _value) { - assert(defaultStub_ !=NULL); - return defaultStub_->trySetTestDerivedArrayAttributeAttribute(std::move(_value)); -} - -bool TestFreedesktopInterfaceStubDefault::RemoteEventHandler::onRemoteSetTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64 _value) { - (void)_client; - return onRemoteSetTestDerivedArrayAttributeAttribute(_value); -} - - - - - -TestFreedesktopInterfaceStubDefault::RemoteEventHandler::RemoteEventHandler(TestFreedesktopInterfaceStubDefault *_defaultStub) - : - defaultStub_(_defaultStub) { -} - -} // namespace tests -} // namespace commonapi -} // namespace v1 diff --git a/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopInterfaceStubDefault.hpp b/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopInterfaceStubDefault.hpp deleted file mode 100644 index ba97beb..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/TestFreedesktopInterfaceStubDefault.hpp +++ /dev/null @@ -1,111 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_Test_Freedesktop_Interface_STUB_DEFAULT_HPP_ -#define V1_COMMONAPI_TESTS_Test_Freedesktop_Interface_STUB_DEFAULT_HPP_ - - -#include <v1/commonapi/tests/TestFreedesktopInterfaceStub.hpp> -#include <sstream> - -namespace v1 { -namespace commonapi { -namespace tests { - -/** - * Provides a default implementation for TestFreedesktopInterfaceStubRemoteEvent and - * TestFreedesktopInterfaceStub. 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 TestFreedesktopInterfaceStubDefault - : public virtual TestFreedesktopInterfaceStub { -public: - TestFreedesktopInterfaceStubDefault(); - - TestFreedesktopInterfaceStubRemoteEvent* initStubAdapter(const std::shared_ptr<TestFreedesktopInterfaceStubAdapter> &_adapter); - - const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> _client); - - virtual const uint32_t& getTestPredefinedTypeAttributeAttribute(); - virtual const uint32_t& getTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client); - virtual void setTestPredefinedTypeAttributeAttribute(uint32_t _value); - virtual void setTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _value); - virtual const uint32_t& getTestReadonlyAttributeAttribute(); - virtual const uint32_t& getTestReadonlyAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client); - virtual void setTestReadonlyAttributeAttribute(uint32_t _value); - virtual const ::commonapi::tests::DerivedTypeCollection::TestStructExtended& getTestDerivedStructAttributeAttribute(); - virtual const ::commonapi::tests::DerivedTypeCollection::TestStructExtended& getTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client); - virtual void setTestDerivedStructAttributeAttribute(::commonapi::tests::DerivedTypeCollection::TestStructExtended _value); - virtual void setTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::TestStructExtended _value); - virtual const ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64& getTestDerivedArrayAttributeAttribute(); - virtual const ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64& getTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client); - virtual void setTestDerivedArrayAttributeAttribute(::commonapi::tests::DerivedTypeCollection::TestArrayUInt64 _value); - virtual void setTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64 _value); - - - - -protected: - virtual bool trySetTestPredefinedTypeAttributeAttribute(uint32_t _value); - virtual bool validateTestPredefinedTypeAttributeAttributeRequestedValue(const uint32_t &_value); - virtual void onRemoteTestPredefinedTypeAttributeAttributeChanged(); - virtual bool trySetTestReadonlyAttributeAttribute(uint32_t _value); - virtual bool validateTestReadonlyAttributeAttributeRequestedValue(const uint32_t &_value); - virtual bool trySetTestDerivedStructAttributeAttribute(::commonapi::tests::DerivedTypeCollection::TestStructExtended _value); - virtual bool validateTestDerivedStructAttributeAttributeRequestedValue(const ::commonapi::tests::DerivedTypeCollection::TestStructExtended &_value); - virtual void onRemoteTestDerivedStructAttributeAttributeChanged(); - virtual bool trySetTestDerivedArrayAttributeAttribute(::commonapi::tests::DerivedTypeCollection::TestArrayUInt64 _value); - virtual bool validateTestDerivedArrayAttributeAttributeRequestedValue(const ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64 &_value); - virtual void onRemoteTestDerivedArrayAttributeAttributeChanged(); - class RemoteEventHandler: public virtual TestFreedesktopInterfaceStubRemoteEvent { - public: - RemoteEventHandler(TestFreedesktopInterfaceStubDefault *_defaultStub); - - virtual bool onRemoteSetTestPredefinedTypeAttributeAttribute(uint32_t _value); - virtual bool onRemoteSetTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _value); - virtual void onRemoteTestPredefinedTypeAttributeAttributeChanged(); - - - virtual bool onRemoteSetTestDerivedStructAttributeAttribute(::commonapi::tests::DerivedTypeCollection::TestStructExtended _value); - virtual bool onRemoteSetTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::TestStructExtended _value); - virtual void onRemoteTestDerivedStructAttributeAttributeChanged(); - - virtual bool onRemoteSetTestDerivedArrayAttributeAttribute(::commonapi::tests::DerivedTypeCollection::TestArrayUInt64 _value); - virtual bool onRemoteSetTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64 _value); - virtual void onRemoteTestDerivedArrayAttributeAttributeChanged(); - - - private: - TestFreedesktopInterfaceStubDefault *defaultStub_; - }; -private: - TestFreedesktopInterfaceStubDefault::RemoteEventHandler remoteEventHandler_; - - uint32_t testPredefinedTypeAttributeAttributeValue_ {}; - uint32_t testReadonlyAttributeAttributeValue_ {}; - ::commonapi::tests::DerivedTypeCollection::TestStructExtended testDerivedStructAttributeAttributeValue_ {}; - ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64 testDerivedArrayAttributeAttributeValue_ {}; - - CommonAPI::Version interfaceVersion_; -}; - -} // namespace tests -} // namespace commonapi -} // namespace v1 - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_Test_Freedesktop_Interface_STUB_DEFAULT diff --git a/src/test/src-gen/core/v1/commonapi/tests/TestInterface.hpp b/src/test/src-gen/core/v1/commonapi/tests/TestInterface.hpp deleted file mode 100644 index 2177ee6..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/TestInterface.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_TEST_INTERFACE_HPP_ -#define V1_COMMONAPI_TESTS_TEST_INTERFACE_HPP_ - - - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <CommonAPI/Types.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { - -class TestInterface { -public: - virtual ~TestInterface() { } - - static inline const char* getInterface(); - static inline CommonAPI::Version getInterfaceVersion(); -}; - -const char* TestInterface::getInterface() { - return ("commonapi.tests.TestInterface"); -} - -CommonAPI::Version TestInterface::getInterfaceVersion() { - return CommonAPI::Version(1, 0); -} - - -} // namespace tests -} // namespace commonapi -} // namespace v1 - -namespace CommonAPI { -} - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_TEST_INTERFACE_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceManager.hpp b/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceManager.hpp deleted file mode 100644 index 53e2afb..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceManager.hpp +++ /dev/null @@ -1,57 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_TEST_INTERFACE_MANAGER_HPP_ -#define V1_COMMONAPI_TESTS_TEST_INTERFACE_MANAGER_HPP_ - - -#include <set> - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <CommonAPI/Types.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { - -class TestInterfaceManager { -public: - virtual ~TestInterfaceManager() { } - - static inline const char* getInterface(); - static inline CommonAPI::Version getInterfaceVersion(); -}; - -const char* TestInterfaceManager::getInterface() { - return ("commonapi.tests.TestInterfaceManager"); -} - -CommonAPI::Version TestInterfaceManager::getInterfaceVersion() { - return CommonAPI::Version(1, 0); -} - - -} // namespace tests -} // namespace commonapi -} // namespace v1 - -namespace CommonAPI { -} - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_TEST_INTERFACE_MANAGER_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceManagerProxy.hpp b/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceManagerProxy.hpp deleted file mode 100644 index 41cbd78..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceManagerProxy.hpp +++ /dev/null @@ -1,131 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_Test_Interface_Manager_PROXY_HPP_ -#define V1_COMMONAPI_TESTS_Test_Interface_Manager_PROXY_HPP_ - -#include <v1/commonapi/tests/TestInterfaceManagerProxyBase.hpp> - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { - -template <typename ... _AttributeExtensions> -class TestInterfaceManagerProxy - : virtual public TestInterfaceManager, - virtual public TestInterfaceManagerProxyBase, - virtual public _AttributeExtensions... { -public: - TestInterfaceManagerProxy(std::shared_ptr<CommonAPI::Proxy> delegate); - ~TestInterfaceManagerProxy(); - - typedef TestInterfaceManager InterfaceType; - - - - - - virtual CommonAPI::ProxyManager& getProxyManagerTestInterface(); - - /** - * Returns the CommonAPI address of the remote partner this proxy communicates with. - */ - virtual const CommonAPI::Address &getAddress() 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<TestInterfaceManagerProxyBase> delegate_; -}; - -typedef TestInterfaceManagerProxy<> TestInterfaceManagerProxyDefault; - - -// -// TestInterfaceManagerProxy Implementation -// -template <typename ... _AttributeExtensions> -TestInterfaceManagerProxy<_AttributeExtensions...>::TestInterfaceManagerProxy(std::shared_ptr<CommonAPI::Proxy> delegate): - _AttributeExtensions(*(std::dynamic_pointer_cast<TestInterfaceManagerProxyBase>(delegate)))..., - delegate_(std::dynamic_pointer_cast<TestInterfaceManagerProxyBase>(delegate)) { -} - -template <typename ... _AttributeExtensions> -TestInterfaceManagerProxy<_AttributeExtensions...>::~TestInterfaceManagerProxy() { -} - - -template <typename ... _AttributeExtensions> -const CommonAPI::Address &TestInterfaceManagerProxy<_AttributeExtensions...>::getAddress() const { - return delegate_->getAddress(); -} - -template <typename ... _AttributeExtensions> -bool TestInterfaceManagerProxy<_AttributeExtensions...>::isAvailable() const { - return delegate_->isAvailable(); -} - -template <typename ... _AttributeExtensions> -bool TestInterfaceManagerProxy<_AttributeExtensions...>::isAvailableBlocking() const { - return delegate_->isAvailableBlocking(); -} - -template <typename ... _AttributeExtensions> -CommonAPI::ProxyStatusEvent& TestInterfaceManagerProxy<_AttributeExtensions...>::getProxyStatusEvent() { - return delegate_->getProxyStatusEvent(); -} - -template <typename ... _AttributeExtensions> -CommonAPI::InterfaceVersionAttribute& TestInterfaceManagerProxy<_AttributeExtensions...>::getInterfaceVersionAttribute() { - return delegate_->getInterfaceVersionAttribute(); -} - -template <typename ... _AttributeExtensions> -CommonAPI::ProxyManager& TestInterfaceManagerProxy<_AttributeExtensions...>::getProxyManagerTestInterface() { - return delegate_->getProxyManagerTestInterface(); -} - -} // namespace tests -} // namespace commonapi -} // namespace v1 - - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_Test_Interface_Manager_PROXY_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceManagerProxyBase.hpp b/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceManagerProxyBase.hpp deleted file mode 100644 index 5a0e67f..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceManagerProxyBase.hpp +++ /dev/null @@ -1,50 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_Test_Interface_Manager_PROXY_BASE_HPP_ -#define V1_COMMONAPI_TESTS_Test_Interface_Manager_PROXY_BASE_HPP_ - -#include <v1/commonapi/tests/TestInterfaceManager.hpp> - - -#include <v1/commonapi/tests/TestInterfaceStub.hpp> - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - - -#include <CommonAPI/ProxyManager.hpp> -#include <CommonAPI/Proxy.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { - -class TestInterfaceManagerProxyBase - : virtual public CommonAPI::Proxy { -public: - - - - - virtual CommonAPI::ProxyManager& getProxyManagerTestInterface() = 0; -}; - -} // namespace tests -} // namespace commonapi -} // namespace v1 - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_Test_Interface_Manager_PROXY_BASE_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceManagerStub.hpp b/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceManagerStub.hpp deleted file mode 100644 index 640df57..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceManagerStub.hpp +++ /dev/null @@ -1,111 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_Test_Interface_Manager_STUB_HPP_ -#define V1_COMMONAPI_TESTS_Test_Interface_Manager_STUB_HPP_ - -#include <functional> - - - -#include <v1/commonapi/tests/TestInterfaceStub.hpp> - -#include <v1/commonapi/tests/TestInterfaceManager.hpp> - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - - -#include <CommonAPI/Stub.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { - -/** - * Receives messages from remote and handles all dispatching of deserialized calls - * to a stub for the service TestInterfaceManager. 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 TestInterfaceManagerStubAdapter - : public virtual CommonAPI::StubAdapter, - public virtual TestInterfaceManager { - public: - - - virtual bool registerManagedStubTestInterface(std::shared_ptr<::v1::commonapi::tests::TestInterfaceStub>, const std::string&) = 0; - virtual bool deregisterManagedStubTestInterface(const std::string&) = 0; - virtual std::set<std::string>& getTestInterfaceInstances() = 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 TestInterfaceManager. - * 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 TestInterfaceManagerStubRemoteEvent -{ -public: - virtual ~TestInterfaceManagerStubRemoteEvent() { } - -}; - -/** - * Defines the interface that must be implemented by any class that should provide - * the service TestInterfaceManager 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 TestInterfaceManagerStub - : public virtual CommonAPI::Stub<TestInterfaceManagerStubAdapter, TestInterfaceManagerStubRemoteEvent> -{ -public: - - virtual ~TestInterfaceManagerStub() {} - virtual const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId) = 0; - - - - virtual bool registerManagedStubTestInterface(std::shared_ptr<::v1::commonapi::tests::TestInterfaceStub>, const std::string&) = 0; - virtual bool deregisterManagedStubTestInterface(const std::string&) = 0; - virtual std::set<std::string>& getTestInterfaceInstances() = 0; - using CommonAPI::Stub<TestInterfaceManagerStubAdapter, TestInterfaceManagerStubRemoteEvent>::initStubAdapter; - typedef CommonAPI::Stub<TestInterfaceManagerStubAdapter, TestInterfaceManagerStubRemoteEvent>::StubAdapterType StubAdapterType; - typedef CommonAPI::Stub<TestInterfaceManagerStubAdapter, TestInterfaceManagerStubRemoteEvent>::RemoteEventHandlerType RemoteEventHandlerType; - typedef TestInterfaceManagerStubRemoteEvent RemoteEventType; - typedef TestInterfaceManager StubInterface; -}; - -} // namespace tests -} // namespace commonapi -} // namespace v1 - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_Test_Interface_Manager_STUB_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceManagerStubDefault.cpp b/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceManagerStubDefault.cpp deleted file mode 100644 index 0241f20..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceManagerStubDefault.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#include <v1/commonapi/tests/TestInterfaceManagerStubDefault.hpp> -#include <assert.h> - -namespace v1 { -namespace commonapi { -namespace tests { - -TestInterfaceManagerStubDefault::TestInterfaceManagerStubDefault(): - remoteEventHandler_(this), - autoInstanceCounter_(0), - interfaceVersion_(TestInterfaceManager::getInterfaceVersion()) { -} - -const CommonAPI::Version& TestInterfaceManagerStubDefault::getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> _client) { - (void)_client; - return interfaceVersion_; -} - -TestInterfaceManagerStubRemoteEvent* TestInterfaceManagerStubDefault::initStubAdapter(const std::shared_ptr<TestInterfaceManagerStubAdapter> &_adapter) { - CommonAPI::Stub<TestInterfaceManagerStubAdapter, TestInterfaceManagerStubRemoteEvent>::stubAdapter_ = _adapter; - return &remoteEventHandler_; -} - - - - -bool TestInterfaceManagerStubDefault::registerManagedStubTestInterfaceAutoInstance(std::shared_ptr<::v1::commonapi::tests::TestInterfaceStub> _stub) { - autoInstanceCounter_++; - std::stringstream ss; - assert((CommonAPI::Stub<TestInterfaceManagerStubAdapter, TestInterfaceManagerStubRemoteEvent>::stubAdapter_.lock()) !=NULL); - auto stubAdapter = CommonAPI::Stub<TestInterfaceManagerStubAdapter, TestInterfaceManagerStubRemoteEvent>::stubAdapter_.lock(); - if (stubAdapter) { - ss << stubAdapter->getAddress().getInstance() << ".i" << autoInstanceCounter_; - std::string instance = ss.str(); - return stubAdapter->registerManagedStubTestInterface(_stub, instance); - } else { - return false; - } -} -bool TestInterfaceManagerStubDefault::registerManagedStubTestInterface(std::shared_ptr<::v1::commonapi::tests::TestInterfaceStub> _stub, const std::string &_instance) { - assert((CommonAPI::Stub<TestInterfaceManagerStubAdapter, TestInterfaceManagerStubRemoteEvent>::stubAdapter_.lock()) !=NULL); - auto stubAdapter = CommonAPI::Stub<TestInterfaceManagerStubAdapter, TestInterfaceManagerStubRemoteEvent>::stubAdapter_.lock(); - if (stubAdapter) - return stubAdapter->registerManagedStubTestInterface(_stub, _instance); - else - return false; -} -bool TestInterfaceManagerStubDefault::deregisterManagedStubTestInterface(const std::string &_instance) { - assert((CommonAPI::Stub<TestInterfaceManagerStubAdapter, TestInterfaceManagerStubRemoteEvent>::stubAdapter_.lock()) !=NULL); - auto stubAdapter = CommonAPI::Stub<TestInterfaceManagerStubAdapter, TestInterfaceManagerStubRemoteEvent>::stubAdapter_.lock(); - if (stubAdapter) - return stubAdapter->deregisterManagedStubTestInterface(_instance); - else - return false; -} -std::set<std::string>& TestInterfaceManagerStubDefault::getTestInterfaceInstances() { - assert((CommonAPI::Stub<TestInterfaceManagerStubAdapter, TestInterfaceManagerStubRemoteEvent>::stubAdapter_.lock()) !=NULL); - auto stubAdapter = CommonAPI::Stub<TestInterfaceManagerStubAdapter, TestInterfaceManagerStubRemoteEvent>::stubAdapter_.lock(); - if (stubAdapter) { - return stubAdapter->getTestInterfaceInstances(); - } else { - static std::set<std::string> emptySet = std::set<std::string>(); - return emptySet; - } -} - -TestInterfaceManagerStubDefault::RemoteEventHandler::RemoteEventHandler(TestInterfaceManagerStubDefault *_defaultStub) - : - defaultStub_(_defaultStub) { -} - -} // namespace tests -} // namespace commonapi -} // namespace v1 diff --git a/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceManagerStubDefault.hpp b/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceManagerStubDefault.hpp deleted file mode 100644 index 67f21e8..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceManagerStubDefault.hpp +++ /dev/null @@ -1,73 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_Test_Interface_Manager_STUB_DEFAULT_HPP_ -#define V1_COMMONAPI_TESTS_Test_Interface_Manager_STUB_DEFAULT_HPP_ - - -#include <v1/commonapi/tests/TestInterfaceManagerStub.hpp> -#include <sstream> - -namespace v1 { -namespace commonapi { -namespace tests { - -/** - * Provides a default implementation for TestInterfaceManagerStubRemoteEvent and - * TestInterfaceManagerStub. 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 TestInterfaceManagerStubDefault - : public virtual TestInterfaceManagerStub { -public: - TestInterfaceManagerStubDefault(); - - TestInterfaceManagerStubRemoteEvent* initStubAdapter(const std::shared_ptr<TestInterfaceManagerStubAdapter> &_adapter); - - const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> _client); - - - - - bool registerManagedStubTestInterfaceAutoInstance(std::shared_ptr<::v1::commonapi::tests::TestInterfaceStub>); - bool registerManagedStubTestInterface(std::shared_ptr<::v1::commonapi::tests::TestInterfaceStub>, const std::string&); - bool deregisterManagedStubTestInterface(const std::string&); - std::set<std::string>& getTestInterfaceInstances(); - -protected: - class RemoteEventHandler: public virtual TestInterfaceManagerStubRemoteEvent { - public: - RemoteEventHandler(TestInterfaceManagerStubDefault *_defaultStub); - - - private: - TestInterfaceManagerStubDefault *defaultStub_; - }; -private: - TestInterfaceManagerStubDefault::RemoteEventHandler remoteEventHandler_; - uint32_t autoInstanceCounter_; - - - CommonAPI::Version interfaceVersion_; -}; - -} // namespace tests -} // namespace commonapi -} // namespace v1 - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_Test_Interface_Manager_STUB_DEFAULT diff --git a/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceProxy.hpp b/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceProxy.hpp deleted file mode 100644 index 82b94ce..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceProxy.hpp +++ /dev/null @@ -1,527 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_Test_Interface_PROXY_HPP_ -#define V1_COMMONAPI_TESTS_Test_Interface_PROXY_HPP_ - -#include <v1/commonapi/tests/TestInterfaceProxyBase.hpp> - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <CommonAPI/AttributeExtension.hpp> -#include <CommonAPI/Factory.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { - -template <typename ... _AttributeExtensions> -class TestInterfaceProxy - : virtual public TestInterface, - virtual public TestInterfaceProxyBase, - virtual public _AttributeExtensions... { -public: - TestInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate); - ~TestInterfaceProxy(); - - typedef TestInterface InterfaceType; - - - /** - * Returns the wrapper class that provides access to the attribute TestPredefinedTypeAttribute. - */ - virtual TestPredefinedTypeAttributeAttribute& getTestPredefinedTypeAttributeAttribute() { - return delegate_->getTestPredefinedTypeAttributeAttribute(); - } - /** - * Returns the wrapper class that provides access to the attribute TestDerivedStructAttribute. - */ - virtual TestDerivedStructAttributeAttribute& getTestDerivedStructAttributeAttribute() { - return delegate_->getTestDerivedStructAttributeAttribute(); - } - /** - * Returns the wrapper class that provides access to the attribute TestDerivedArrayAttribute. - */ - virtual TestDerivedArrayAttributeAttribute& getTestDerivedArrayAttributeAttribute() { - return delegate_->getTestDerivedArrayAttributeAttribute(); - } - - /** - * Returns the wrapper class that provides access to the broadcast TestPredefinedTypeBroadcast. - */ - virtual TestPredefinedTypeBroadcastEvent& getTestPredefinedTypeBroadcastEvent() { - return delegate_->getTestPredefinedTypeBroadcastEvent(); - } - /** - * Returns the wrapper class that provides access to the broadcast TestSelectiveBroadcast. - */ - virtual TestSelectiveBroadcastSelectiveEvent& getTestSelectiveBroadcastSelectiveEvent() { - return delegate_->getTestSelectiveBroadcastSelectiveEvent(); - } - /** - * Returns the wrapper class that provides access to the broadcast TestBroadcastWithOutArgs. - */ - virtual TestBroadcastWithOutArgsSelectiveEvent& getTestBroadcastWithOutArgsSelectiveEvent() { - return delegate_->getTestBroadcastWithOutArgsSelectiveEvent(); - } - - /** - * Calls testEmptyMethod with synchronous semantics. - * - * 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 testEmptyMethod(CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info = nullptr); - /** - * Calls testEmptyMethod 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> testEmptyMethodAsync(TestEmptyMethodAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr); - /** - * Calls testVoidPredefinedTypeMethod with synchronous semantics. - * - * All const parameters are input parameters to this method. - * 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 testVoidPredefinedTypeMethod(const uint32_t &_uint32Value, const std::string &_stringValue, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info = nullptr); - /** - * Calls testVoidPredefinedTypeMethod 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> testVoidPredefinedTypeMethodAsync(const uint32_t &_uint32Value, const std::string &_stringValue, TestVoidPredefinedTypeMethodAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr); - /** - * Calls testPredefinedTypeMethod 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 testPredefinedTypeMethod(const uint32_t &_uint32InValue, const std::string &_stringInValue, CommonAPI::CallStatus &_internalCallStatus, uint32_t &_uint32OutValue, std::string &_stringOutValue, const CommonAPI::CallInfo *_info = nullptr); - /** - * Calls testPredefinedTypeMethod 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> testPredefinedTypeMethodAsync(const uint32_t &_uint32InValue, const std::string &_stringInValue, TestPredefinedTypeMethodAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr); - /** - * Calls testVoidDerivedTypeMethod with synchronous semantics. - * - * All const parameters are input parameters to this method. - * 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 testVoidDerivedTypeMethod(const ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 &_testEnumExtended2Value, const ::commonapi::tests::DerivedTypeCollection::TestMap &_testMapValue, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info = nullptr); - /** - * Calls testVoidDerivedTypeMethod 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> testVoidDerivedTypeMethodAsync(const ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 &_testEnumExtended2Value, const ::commonapi::tests::DerivedTypeCollection::TestMap &_testMapValue, TestVoidDerivedTypeMethodAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr); - /** - * Calls testDerivedTypeMethod 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 testDerivedTypeMethod(const ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 &_testEnumExtended2InValue, const ::commonapi::tests::DerivedTypeCollection::TestMap &_testMapInValue, CommonAPI::CallStatus &_internalCallStatus, ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 &_testEnumExtended2OutValue, ::commonapi::tests::DerivedTypeCollection::TestMap &_testMapOutValue, const CommonAPI::CallInfo *_info = nullptr); - /** - * Calls testDerivedTypeMethod 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> testDerivedTypeMethodAsync(const ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 &_testEnumExtended2InValue, const ::commonapi::tests::DerivedTypeCollection::TestMap &_testMapInValue, TestDerivedTypeMethodAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr); - /** - * Calls TestArrayOfPolymorphicStructMethod with synchronous semantics. - * - * All const parameters are input parameters to this method. - * 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 TestArrayOfPolymorphicStructMethod(const std::vector<std::shared_ptr<::commonapi::tests::DerivedTypeCollection::TestPolymorphicStruct>> &_inArray, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info = nullptr); - /** - * Calls TestArrayOfPolymorphicStructMethod 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> TestArrayOfPolymorphicStructMethodAsync(const std::vector<std::shared_ptr<::commonapi::tests::DerivedTypeCollection::TestPolymorphicStruct>> &_inArray, TestArrayOfPolymorphicStructMethodAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr); - /** - * Calls TestMapOfPolymorphicStructMethod with synchronous semantics. - * - * All const parameters are input parameters to this method. - * 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 TestMapOfPolymorphicStructMethod(const ::commonapi::tests::DerivedTypeCollection::MapIntToPolymorphic &_inMap, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info = nullptr); - /** - * Calls TestMapOfPolymorphicStructMethod 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> TestMapOfPolymorphicStructMethodAsync(const ::commonapi::tests::DerivedTypeCollection::MapIntToPolymorphic &_inMap, TestMapOfPolymorphicStructMethodAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr); - /** - * Calls TestStructWithPolymorphicMemberMethod with synchronous semantics. - * - * All const parameters are input parameters to this method. - * 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 TestStructWithPolymorphicMemberMethod(const ::commonapi::tests::DerivedTypeCollection::StructWithPolymorphicMember &_inStruct, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info = nullptr); - /** - * Calls TestStructWithPolymorphicMemberMethod 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> TestStructWithPolymorphicMemberMethodAsync(const ::commonapi::tests::DerivedTypeCollection::StructWithPolymorphicMember &_inStruct, TestStructWithPolymorphicMemberMethodAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr); - /** - * Calls TestStructWithEnumKeyMapMember with synchronous semantics. - * - * All const parameters are input parameters to this method. - * 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 TestStructWithEnumKeyMapMember(const ::commonapi::tests::DerivedTypeCollection::StructWithEnumKeyMap &_inStruct, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info = nullptr); - /** - * Calls TestStructWithEnumKeyMapMember 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> TestStructWithEnumKeyMapMemberAsync(const ::commonapi::tests::DerivedTypeCollection::StructWithEnumKeyMap &_inStruct, TestStructWithEnumKeyMapMemberAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr); - - - /** - * Returns the CommonAPI address of the remote partner this proxy communicates with. - */ - virtual const CommonAPI::Address &getAddress() 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<TestInterfaceProxyBase> delegate_; -}; - -typedef TestInterfaceProxy<> TestInterfaceProxyDefault; - -namespace TestInterfaceExtensions { - template <template <typename > class _ExtensionType> - class TestPredefinedTypeAttributeAttributeExtension { - public: - typedef _ExtensionType<TestInterfaceProxyBase::TestPredefinedTypeAttributeAttribute> extension_type; - - static_assert(std::is_base_of<typename CommonAPI::AttributeExtension<TestInterfaceProxyBase::TestPredefinedTypeAttributeAttribute>, extension_type>::value, - "Not CommonAPI Attribute Extension!"); - #ifdef WIN32 - TestPredefinedTypeAttributeAttributeExtension() {} - #endif - - TestPredefinedTypeAttributeAttributeExtension(TestInterfaceProxyBase& proxy): attributeExtension_(proxy.getTestPredefinedTypeAttributeAttribute()) { - } - - inline extension_type& getTestPredefinedTypeAttributeAttributeExtension() { - return attributeExtension_; - } - - private: - extension_type attributeExtension_; - }; - - template <template <typename > class _ExtensionType> - class TestDerivedStructAttributeAttributeExtension { - public: - typedef _ExtensionType<TestInterfaceProxyBase::TestDerivedStructAttributeAttribute> extension_type; - - static_assert(std::is_base_of<typename CommonAPI::AttributeExtension<TestInterfaceProxyBase::TestDerivedStructAttributeAttribute>, extension_type>::value, - "Not CommonAPI Attribute Extension!"); - #ifdef WIN32 - TestDerivedStructAttributeAttributeExtension() {} - #endif - - TestDerivedStructAttributeAttributeExtension(TestInterfaceProxyBase& proxy): attributeExtension_(proxy.getTestDerivedStructAttributeAttribute()) { - } - - inline extension_type& getTestDerivedStructAttributeAttributeExtension() { - return attributeExtension_; - } - - private: - extension_type attributeExtension_; - }; - - template <template <typename > class _ExtensionType> - class TestDerivedArrayAttributeAttributeExtension { - public: - typedef _ExtensionType<TestInterfaceProxyBase::TestDerivedArrayAttributeAttribute> extension_type; - - static_assert(std::is_base_of<typename CommonAPI::AttributeExtension<TestInterfaceProxyBase::TestDerivedArrayAttributeAttribute>, extension_type>::value, - "Not CommonAPI Attribute Extension!"); - #ifdef WIN32 - TestDerivedArrayAttributeAttributeExtension() {} - #endif - - TestDerivedArrayAttributeAttributeExtension(TestInterfaceProxyBase& proxy): attributeExtension_(proxy.getTestDerivedArrayAttributeAttribute()) { - } - - inline extension_type& getTestDerivedArrayAttributeAttributeExtension() { - return attributeExtension_; - } - - private: - extension_type attributeExtension_; - }; - -} // namespace TestInterfaceExtensions - -// -// TestInterfaceProxy Implementation -// -template <typename ... _AttributeExtensions> -TestInterfaceProxy<_AttributeExtensions...>::TestInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate): - _AttributeExtensions(*(std::dynamic_pointer_cast<TestInterfaceProxyBase>(delegate)))..., - delegate_(std::dynamic_pointer_cast<TestInterfaceProxyBase>(delegate)) { -} - -template <typename ... _AttributeExtensions> -TestInterfaceProxy<_AttributeExtensions...>::~TestInterfaceProxy() { -} - -template <typename ... _AttributeExtensions> -void TestInterfaceProxy<_AttributeExtensions...>::testEmptyMethod(CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info) { - delegate_->testEmptyMethod(_internalCallStatus, _info); -} - -template <typename ... _AttributeExtensions> -std::future<CommonAPI::CallStatus> TestInterfaceProxy<_AttributeExtensions...>::testEmptyMethodAsync(TestEmptyMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info) { - return delegate_->testEmptyMethodAsync(_callback, _info); -} -template <typename ... _AttributeExtensions> -void TestInterfaceProxy<_AttributeExtensions...>::testVoidPredefinedTypeMethod(const uint32_t &_uint32Value, const std::string &_stringValue, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info) { - delegate_->testVoidPredefinedTypeMethod(_uint32Value, _stringValue, _internalCallStatus, _info); -} - -template <typename ... _AttributeExtensions> -std::future<CommonAPI::CallStatus> TestInterfaceProxy<_AttributeExtensions...>::testVoidPredefinedTypeMethodAsync(const uint32_t &_uint32Value, const std::string &_stringValue, TestVoidPredefinedTypeMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info) { - return delegate_->testVoidPredefinedTypeMethodAsync(_uint32Value, _stringValue, _callback, _info); -} -template <typename ... _AttributeExtensions> -void TestInterfaceProxy<_AttributeExtensions...>::testPredefinedTypeMethod(const uint32_t &_uint32InValue, const std::string &_stringInValue, CommonAPI::CallStatus &_internalCallStatus, uint32_t &_uint32OutValue, std::string &_stringOutValue, const CommonAPI::CallInfo *_info) { - delegate_->testPredefinedTypeMethod(_uint32InValue, _stringInValue, _internalCallStatus, _uint32OutValue, _stringOutValue, _info); -} - -template <typename ... _AttributeExtensions> -std::future<CommonAPI::CallStatus> TestInterfaceProxy<_AttributeExtensions...>::testPredefinedTypeMethodAsync(const uint32_t &_uint32InValue, const std::string &_stringInValue, TestPredefinedTypeMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info) { - return delegate_->testPredefinedTypeMethodAsync(_uint32InValue, _stringInValue, _callback, _info); -} -template <typename ... _AttributeExtensions> -void TestInterfaceProxy<_AttributeExtensions...>::testVoidDerivedTypeMethod(const ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 &_testEnumExtended2Value, const ::commonapi::tests::DerivedTypeCollection::TestMap &_testMapValue, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info) { - if (!_testEnumExtended2Value.validate()) { - _internalCallStatus = CommonAPI::CallStatus::INVALID_VALUE; - return; - } - delegate_->testVoidDerivedTypeMethod(_testEnumExtended2Value, _testMapValue, _internalCallStatus, _info); -} - -template <typename ... _AttributeExtensions> -std::future<CommonAPI::CallStatus> TestInterfaceProxy<_AttributeExtensions...>::testVoidDerivedTypeMethodAsync(const ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 &_testEnumExtended2Value, const ::commonapi::tests::DerivedTypeCollection::TestMap &_testMapValue, TestVoidDerivedTypeMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info) { - if (!_testEnumExtended2Value.validate()) { - _callback(CommonAPI::CallStatus::INVALID_VALUE); - std::promise<CommonAPI::CallStatus> promise; - promise.set_value(CommonAPI::CallStatus::INVALID_VALUE); - return promise.get_future(); - } - return delegate_->testVoidDerivedTypeMethodAsync(_testEnumExtended2Value, _testMapValue, _callback, _info); -} -template <typename ... _AttributeExtensions> -void TestInterfaceProxy<_AttributeExtensions...>::testDerivedTypeMethod(const ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 &_testEnumExtended2InValue, const ::commonapi::tests::DerivedTypeCollection::TestMap &_testMapInValue, CommonAPI::CallStatus &_internalCallStatus, ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 &_testEnumExtended2OutValue, ::commonapi::tests::DerivedTypeCollection::TestMap &_testMapOutValue, const CommonAPI::CallInfo *_info) { - if (!_testEnumExtended2InValue.validate()) { - _internalCallStatus = CommonAPI::CallStatus::INVALID_VALUE; - return; - } - delegate_->testDerivedTypeMethod(_testEnumExtended2InValue, _testMapInValue, _internalCallStatus, _testEnumExtended2OutValue, _testMapOutValue, _info); -} - -template <typename ... _AttributeExtensions> -std::future<CommonAPI::CallStatus> TestInterfaceProxy<_AttributeExtensions...>::testDerivedTypeMethodAsync(const ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 &_testEnumExtended2InValue, const ::commonapi::tests::DerivedTypeCollection::TestMap &_testMapInValue, TestDerivedTypeMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info) { - if (!_testEnumExtended2InValue.validate()) { - ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 testEnumExtended2OutValue = ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2::E_NEW2; - ::commonapi::tests::DerivedTypeCollection::TestMap testMapOutValue; - _callback(CommonAPI::CallStatus::INVALID_VALUE, testEnumExtended2OutValue, testMapOutValue); - std::promise<CommonAPI::CallStatus> promise; - promise.set_value(CommonAPI::CallStatus::INVALID_VALUE); - return promise.get_future(); - } - return delegate_->testDerivedTypeMethodAsync(_testEnumExtended2InValue, _testMapInValue, _callback, _info); -} -template <typename ... _AttributeExtensions> -void TestInterfaceProxy<_AttributeExtensions...>::TestArrayOfPolymorphicStructMethod(const std::vector<std::shared_ptr<::commonapi::tests::DerivedTypeCollection::TestPolymorphicStruct>> &_inArray, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info) { - delegate_->TestArrayOfPolymorphicStructMethod(_inArray, _internalCallStatus, _info); -} - -template <typename ... _AttributeExtensions> -std::future<CommonAPI::CallStatus> TestInterfaceProxy<_AttributeExtensions...>::TestArrayOfPolymorphicStructMethodAsync(const std::vector<std::shared_ptr<::commonapi::tests::DerivedTypeCollection::TestPolymorphicStruct>> &_inArray, TestArrayOfPolymorphicStructMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info) { - return delegate_->TestArrayOfPolymorphicStructMethodAsync(_inArray, _callback, _info); -} -template <typename ... _AttributeExtensions> -void TestInterfaceProxy<_AttributeExtensions...>::TestMapOfPolymorphicStructMethod(const ::commonapi::tests::DerivedTypeCollection::MapIntToPolymorphic &_inMap, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info) { - delegate_->TestMapOfPolymorphicStructMethod(_inMap, _internalCallStatus, _info); -} - -template <typename ... _AttributeExtensions> -std::future<CommonAPI::CallStatus> TestInterfaceProxy<_AttributeExtensions...>::TestMapOfPolymorphicStructMethodAsync(const ::commonapi::tests::DerivedTypeCollection::MapIntToPolymorphic &_inMap, TestMapOfPolymorphicStructMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info) { - return delegate_->TestMapOfPolymorphicStructMethodAsync(_inMap, _callback, _info); -} -template <typename ... _AttributeExtensions> -void TestInterfaceProxy<_AttributeExtensions...>::TestStructWithPolymorphicMemberMethod(const ::commonapi::tests::DerivedTypeCollection::StructWithPolymorphicMember &_inStruct, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info) { - delegate_->TestStructWithPolymorphicMemberMethod(_inStruct, _internalCallStatus, _info); -} - -template <typename ... _AttributeExtensions> -std::future<CommonAPI::CallStatus> TestInterfaceProxy<_AttributeExtensions...>::TestStructWithPolymorphicMemberMethodAsync(const ::commonapi::tests::DerivedTypeCollection::StructWithPolymorphicMember &_inStruct, TestStructWithPolymorphicMemberMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info) { - return delegate_->TestStructWithPolymorphicMemberMethodAsync(_inStruct, _callback, _info); -} -template <typename ... _AttributeExtensions> -void TestInterfaceProxy<_AttributeExtensions...>::TestStructWithEnumKeyMapMember(const ::commonapi::tests::DerivedTypeCollection::StructWithEnumKeyMap &_inStruct, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info) { - delegate_->TestStructWithEnumKeyMapMember(_inStruct, _internalCallStatus, _info); -} - -template <typename ... _AttributeExtensions> -std::future<CommonAPI::CallStatus> TestInterfaceProxy<_AttributeExtensions...>::TestStructWithEnumKeyMapMemberAsync(const ::commonapi::tests::DerivedTypeCollection::StructWithEnumKeyMap &_inStruct, TestStructWithEnumKeyMapMemberAsyncCallback _callback, const CommonAPI::CallInfo *_info) { - return delegate_->TestStructWithEnumKeyMapMemberAsync(_inStruct, _callback, _info); -} - -template <typename ... _AttributeExtensions> -const CommonAPI::Address &TestInterfaceProxy<_AttributeExtensions...>::getAddress() const { - return delegate_->getAddress(); -} - -template <typename ... _AttributeExtensions> -bool TestInterfaceProxy<_AttributeExtensions...>::isAvailable() const { - return delegate_->isAvailable(); -} - -template <typename ... _AttributeExtensions> -bool TestInterfaceProxy<_AttributeExtensions...>::isAvailableBlocking() const { - return delegate_->isAvailableBlocking(); -} - -template <typename ... _AttributeExtensions> -CommonAPI::ProxyStatusEvent& TestInterfaceProxy<_AttributeExtensions...>::getProxyStatusEvent() { - return delegate_->getProxyStatusEvent(); -} - -template <typename ... _AttributeExtensions> -CommonAPI::InterfaceVersionAttribute& TestInterfaceProxy<_AttributeExtensions...>::getInterfaceVersionAttribute() { - return delegate_->getInterfaceVersionAttribute(); -} - - -} // namespace tests -} // namespace commonapi -} // namespace v1 - -namespace CommonAPI { -template<template<typename > class _AttributeExtension> -struct DefaultAttributeProxyHelper<::v1::commonapi::tests::TestInterfaceProxy, - _AttributeExtension> { - typedef typename ::v1::commonapi::tests::TestInterfaceProxy< - ::v1::commonapi::tests::TestInterfaceExtensions::TestPredefinedTypeAttributeAttributeExtension<_AttributeExtension>, - ::v1::commonapi::tests::TestInterfaceExtensions::TestDerivedStructAttributeAttributeExtension<_AttributeExtension>, - ::v1::commonapi::tests::TestInterfaceExtensions::TestDerivedArrayAttributeAttributeExtension<_AttributeExtension> - > class_t; -}; -} - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_Test_Interface_PROXY_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceProxyBase.hpp b/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceProxyBase.hpp deleted file mode 100644 index 5c6f74e..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceProxyBase.hpp +++ /dev/null @@ -1,102 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_Test_Interface_PROXY_BASE_HPP_ -#define V1_COMMONAPI_TESTS_Test_Interface_PROXY_BASE_HPP_ - -#include <v1/commonapi/tests/TestInterface.hpp> - - -#include <commonapi/tests/DerivedTypeCollection.hpp> -#include <commonapi/tests/PredefinedTypeCollection.hpp> - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <CommonAPI/Deployment.hpp> -#include <CommonAPI/InputStream.hpp> -#include <CommonAPI/OutputStream.hpp> -#include <CommonAPI/Struct.hpp> -#include <cstdint> -#include <unordered_map> -#include <vector> - -#include <CommonAPI/Attribute.hpp> -#include <CommonAPI/Event.hpp> -#include <CommonAPI/SelectiveEvent.hpp> -#include <CommonAPI/Proxy.hpp> -#include <functional> -#include <future> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { - -class TestInterfaceProxyBase - : virtual public CommonAPI::Proxy { -public: - typedef CommonAPI::ObservableAttribute<uint32_t> TestPredefinedTypeAttributeAttribute; - typedef CommonAPI::ObservableAttribute<::commonapi::tests::DerivedTypeCollection::TestStructExtended> TestDerivedStructAttributeAttribute; - typedef CommonAPI::ObservableAttribute<::commonapi::tests::DerivedTypeCollection::TestArrayUInt64> TestDerivedArrayAttributeAttribute; - typedef CommonAPI::Event< - uint32_t, std::string - > TestPredefinedTypeBroadcastEvent; - typedef CommonAPI::SelectiveEvent<> TestSelectiveBroadcastSelectiveEvent; - typedef CommonAPI::SelectiveEvent<uint32_t, std::string> TestBroadcastWithOutArgsSelectiveEvent; - - typedef std::function<void(const CommonAPI::CallStatus&)> TestEmptyMethodAsyncCallback; - typedef std::function<void(const CommonAPI::CallStatus&)> TestVoidPredefinedTypeMethodAsyncCallback; - typedef std::function<void(const CommonAPI::CallStatus&, const uint32_t&, const std::string&)> TestPredefinedTypeMethodAsyncCallback; - typedef std::function<void(const CommonAPI::CallStatus&)> TestVoidDerivedTypeMethodAsyncCallback; - typedef std::function<void(const CommonAPI::CallStatus&, const ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2&, const ::commonapi::tests::DerivedTypeCollection::TestMap&)> TestDerivedTypeMethodAsyncCallback; - typedef std::function<void(const CommonAPI::CallStatus&)> TestArrayOfPolymorphicStructMethodAsyncCallback; - typedef std::function<void(const CommonAPI::CallStatus&)> TestMapOfPolymorphicStructMethodAsyncCallback; - typedef std::function<void(const CommonAPI::CallStatus&)> TestStructWithPolymorphicMemberMethodAsyncCallback; - typedef std::function<void(const CommonAPI::CallStatus&)> TestStructWithEnumKeyMapMemberAsyncCallback; - - virtual TestPredefinedTypeAttributeAttribute& getTestPredefinedTypeAttributeAttribute() = 0; - virtual TestDerivedStructAttributeAttribute& getTestDerivedStructAttributeAttribute() = 0; - virtual TestDerivedArrayAttributeAttribute& getTestDerivedArrayAttributeAttribute() = 0; - - virtual TestPredefinedTypeBroadcastEvent& getTestPredefinedTypeBroadcastEvent() = 0; - virtual TestSelectiveBroadcastSelectiveEvent& getTestSelectiveBroadcastSelectiveEvent() = 0; - virtual TestBroadcastWithOutArgsSelectiveEvent& getTestBroadcastWithOutArgsSelectiveEvent() = 0; - - virtual void testEmptyMethod(CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info = nullptr) = 0; - virtual std::future<CommonAPI::CallStatus> testEmptyMethodAsync(TestEmptyMethodAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr) = 0; - virtual void testVoidPredefinedTypeMethod(const uint32_t &_uint32Value, const std::string &_stringValue, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info = nullptr) = 0; - virtual std::future<CommonAPI::CallStatus> testVoidPredefinedTypeMethodAsync(const uint32_t &_uint32Value, const std::string &_stringValue, TestVoidPredefinedTypeMethodAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr) = 0; - virtual void testPredefinedTypeMethod(const uint32_t &_uint32InValue, const std::string &_stringInValue, CommonAPI::CallStatus &_internalCallStatus, uint32_t &_uint32OutValue, std::string &_stringOutValue, const CommonAPI::CallInfo *_info = nullptr) = 0; - virtual std::future<CommonAPI::CallStatus> testPredefinedTypeMethodAsync(const uint32_t &_uint32InValue, const std::string &_stringInValue, TestPredefinedTypeMethodAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr) = 0; - virtual void testVoidDerivedTypeMethod(const ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 &_testEnumExtended2Value, const ::commonapi::tests::DerivedTypeCollection::TestMap &_testMapValue, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info = nullptr) = 0; - virtual std::future<CommonAPI::CallStatus> testVoidDerivedTypeMethodAsync(const ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 &_testEnumExtended2Value, const ::commonapi::tests::DerivedTypeCollection::TestMap &_testMapValue, TestVoidDerivedTypeMethodAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr) = 0; - virtual void testDerivedTypeMethod(const ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 &_testEnumExtended2InValue, const ::commonapi::tests::DerivedTypeCollection::TestMap &_testMapInValue, CommonAPI::CallStatus &_internalCallStatus, ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 &_testEnumExtended2OutValue, ::commonapi::tests::DerivedTypeCollection::TestMap &_testMapOutValue, const CommonAPI::CallInfo *_info = nullptr) = 0; - virtual std::future<CommonAPI::CallStatus> testDerivedTypeMethodAsync(const ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 &_testEnumExtended2InValue, const ::commonapi::tests::DerivedTypeCollection::TestMap &_testMapInValue, TestDerivedTypeMethodAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr) = 0; - virtual void TestArrayOfPolymorphicStructMethod(const std::vector<std::shared_ptr<::commonapi::tests::DerivedTypeCollection::TestPolymorphicStruct>> &_inArray, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info = nullptr) = 0; - virtual std::future<CommonAPI::CallStatus> TestArrayOfPolymorphicStructMethodAsync(const std::vector<std::shared_ptr<::commonapi::tests::DerivedTypeCollection::TestPolymorphicStruct>> &_inArray, TestArrayOfPolymorphicStructMethodAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr) = 0; - virtual void TestMapOfPolymorphicStructMethod(const ::commonapi::tests::DerivedTypeCollection::MapIntToPolymorphic &_inMap, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info = nullptr) = 0; - virtual std::future<CommonAPI::CallStatus> TestMapOfPolymorphicStructMethodAsync(const ::commonapi::tests::DerivedTypeCollection::MapIntToPolymorphic &_inMap, TestMapOfPolymorphicStructMethodAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr) = 0; - virtual void TestStructWithPolymorphicMemberMethod(const ::commonapi::tests::DerivedTypeCollection::StructWithPolymorphicMember &_inStruct, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info = nullptr) = 0; - virtual std::future<CommonAPI::CallStatus> TestStructWithPolymorphicMemberMethodAsync(const ::commonapi::tests::DerivedTypeCollection::StructWithPolymorphicMember &_inStruct, TestStructWithPolymorphicMemberMethodAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr) = 0; - virtual void TestStructWithEnumKeyMapMember(const ::commonapi::tests::DerivedTypeCollection::StructWithEnumKeyMap &_inStruct, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info = nullptr) = 0; - virtual std::future<CommonAPI::CallStatus> TestStructWithEnumKeyMapMemberAsync(const ::commonapi::tests::DerivedTypeCollection::StructWithEnumKeyMap &_inStruct, TestStructWithEnumKeyMapMemberAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr) = 0; -}; - -} // namespace tests -} // namespace commonapi -} // namespace v1 - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_Test_Interface_PROXY_BASE_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceStub.hpp b/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceStub.hpp deleted file mode 100644 index dcf9441..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceStub.hpp +++ /dev/null @@ -1,216 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_Test_Interface_STUB_HPP_ -#define V1_COMMONAPI_TESTS_Test_Interface_STUB_HPP_ - -#include <functional> - - - -#include <commonapi/tests/DerivedTypeCollection.hpp> -#include <commonapi/tests/PredefinedTypeCollection.hpp> - -#include <v1/commonapi/tests/TestInterface.hpp> - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <CommonAPI/Deployment.hpp> -#include <CommonAPI/InputStream.hpp> -#include <CommonAPI/OutputStream.hpp> -#include <CommonAPI/Struct.hpp> -#include <cstdint> -#include <unordered_map> -#include <unordered_set> -#include <vector> - -#include <CommonAPI/Stub.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { - -/** - * Receives messages from remote and handles all dispatching of deserialized calls - * to a stub for the service TestInterface. 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 TestInterfaceStubAdapter - : public virtual CommonAPI::StubAdapter, - public virtual TestInterface { - public: - ///Notifies all remote listeners about a change of value of the attribute TestPredefinedTypeAttribute. - virtual void fireTestPredefinedTypeAttributeAttributeChanged(const uint32_t& TestPredefinedTypeAttribute) = 0; - ///Notifies all remote listeners about a change of value of the attribute TestDerivedStructAttribute. - virtual void fireTestDerivedStructAttributeAttributeChanged(const ::commonapi::tests::DerivedTypeCollection::TestStructExtended& TestDerivedStructAttribute) = 0; - ///Notifies all remote listeners about a change of value of the attribute TestDerivedArrayAttribute. - virtual void fireTestDerivedArrayAttributeAttributeChanged(const ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64& TestDerivedArrayAttribute) = 0; - - /** - * Sends a broadcast event for TestPredefinedTypeBroadcast. Should not be called directly. - * Instead, the "fire<broadcastName>Event" methods of the stub should be used. - */ - virtual void fireTestPredefinedTypeBroadcastEvent(const uint32_t &_uint32Value, const std::string &_stringValue) = 0; - /** - * Sends a selective broadcast event for TestSelectiveBroadcast. Should not be called directly. - * Instead, the "fire<broadcastName>Event" methods of the stub should be used. - */ - virtual void fireTestSelectiveBroadcastSelective(const std::shared_ptr<CommonAPI::ClientId> _client) = 0; - virtual void sendTestSelectiveBroadcastSelective(const std::shared_ptr<CommonAPI::ClientIdList> _receivers = nullptr) = 0; - virtual void subscribeForTestSelectiveBroadcastSelective(const std::shared_ptr<CommonAPI::ClientId> clientId, bool& success) = 0; - virtual void unsubscribeFromTestSelectiveBroadcastSelective(const std::shared_ptr<CommonAPI::ClientId> clientId) = 0; - virtual std::shared_ptr<CommonAPI::ClientIdList> const getSubscribersForTestSelectiveBroadcastSelective() = 0; - /** - * Sends a selective broadcast event for TestBroadcastWithOutArgs. Should not be called directly. - * Instead, the "fire<broadcastName>Event" methods of the stub should be used. - */ - virtual void fireTestBroadcastWithOutArgsSelective(const std::shared_ptr<CommonAPI::ClientId> _client, const uint32_t &_uint32Value, const std::string &_stringValue) = 0; - virtual void sendTestBroadcastWithOutArgsSelective(const uint32_t &_uint32Value, const std::string &_stringValue, const std::shared_ptr<CommonAPI::ClientIdList> _receivers = nullptr) = 0; - virtual void subscribeForTestBroadcastWithOutArgsSelective(const std::shared_ptr<CommonAPI::ClientId> clientId, bool& success) = 0; - virtual void unsubscribeFromTestBroadcastWithOutArgsSelective(const std::shared_ptr<CommonAPI::ClientId> clientId) = 0; - virtual std::shared_ptr<CommonAPI::ClientIdList> const getSubscribersForTestBroadcastWithOutArgsSelective() = 0; - - - virtual void deactivateManagedInstances() = 0; -protected: - /** - * Defines properties for storing the ClientIds of clients / proxies that have - * subscribed to the selective broadcasts - */ - std::shared_ptr<CommonAPI::ClientIdList> subscribersForTestSelectiveBroadcastSelective_; - std::shared_ptr<CommonAPI::ClientIdList> subscribersForTestBroadcastWithOutArgsSelective_; -}; - -/** - * Defines the necessary callbacks to handle remote set events related to the attributes - * defined in the IDL description for TestInterface. - * 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 TestInterfaceStubRemoteEvent -{ -public: - virtual ~TestInterfaceStubRemoteEvent() { } - - /// Verification callback for remote set requests on the attribute TestPredefinedTypeAttribute - virtual bool onRemoteSetTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _value) = 0; - /// Action callback for remote set requests on the attribute TestPredefinedTypeAttribute - virtual void onRemoteTestPredefinedTypeAttributeAttributeChanged() = 0; - /// Verification callback for remote set requests on the attribute TestDerivedStructAttribute - virtual bool onRemoteSetTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::TestStructExtended _value) = 0; - /// Action callback for remote set requests on the attribute TestDerivedStructAttribute - virtual void onRemoteTestDerivedStructAttributeAttributeChanged() = 0; - /// Verification callback for remote set requests on the attribute TestDerivedArrayAttribute - virtual bool onRemoteSetTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64 _value) = 0; - /// Action callback for remote set requests on the attribute TestDerivedArrayAttribute - virtual void onRemoteTestDerivedArrayAttributeAttributeChanged() = 0; -}; - -/** - * Defines the interface that must be implemented by any class that should provide - * the service TestInterface 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 TestInterfaceStub - : public virtual CommonAPI::Stub<TestInterfaceStubAdapter, TestInterfaceStubRemoteEvent> -{ -public: - typedef std::function<void ()>testEmptyMethodReply_t; - typedef std::function<void ()>testVoidPredefinedTypeMethodReply_t; - typedef std::function<void (uint32_t _uint32OutValue, std::string _stringOutValue)>testPredefinedTypeMethodReply_t; - typedef std::function<void ()>testVoidDerivedTypeMethodReply_t; - typedef std::function<void (::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 _testEnumExtended2OutValue, ::commonapi::tests::DerivedTypeCollection::TestMap _testMapOutValue)>testDerivedTypeMethodReply_t; - typedef std::function<void ()>TestArrayOfPolymorphicStructMethodReply_t; - typedef std::function<void ()>TestMapOfPolymorphicStructMethodReply_t; - typedef std::function<void ()>TestStructWithPolymorphicMemberMethodReply_t; - typedef std::function<void ()>TestStructWithEnumKeyMapMemberReply_t; - - virtual ~TestInterfaceStub() {} - virtual const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId) = 0; - - /// Provides getter access to the attribute TestPredefinedTypeAttribute - virtual const uint32_t &getTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client) = 0; - /// Provides getter access to the attribute TestDerivedStructAttribute - virtual const ::commonapi::tests::DerivedTypeCollection::TestStructExtended &getTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client) = 0; - /// Provides getter access to the attribute TestDerivedArrayAttribute - virtual const ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64 &getTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client) = 0; - - /// This is the method that will be called on remote calls on the method testEmptyMethod. - virtual void testEmptyMethod(const std::shared_ptr<CommonAPI::ClientId> _client, testEmptyMethodReply_t _reply) = 0; - /// This is the method that will be called on remote calls on the method testVoidPredefinedTypeMethod. - virtual void testVoidPredefinedTypeMethod(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _uint32Value, std::string _stringValue, testVoidPredefinedTypeMethodReply_t _reply) = 0; - /// This is the method that will be called on remote calls on the method testPredefinedTypeMethod. - virtual void testPredefinedTypeMethod(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _uint32InValue, std::string _stringInValue, testPredefinedTypeMethodReply_t _reply) = 0; - /// This is the method that will be called on remote calls on the method testVoidDerivedTypeMethod. - virtual void testVoidDerivedTypeMethod(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 _testEnumExtended2Value, ::commonapi::tests::DerivedTypeCollection::TestMap _testMapValue, testVoidDerivedTypeMethodReply_t _reply) = 0; - /// This is the method that will be called on remote calls on the method testDerivedTypeMethod. - virtual void testDerivedTypeMethod(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 _testEnumExtended2InValue, ::commonapi::tests::DerivedTypeCollection::TestMap _testMapInValue, testDerivedTypeMethodReply_t _reply) = 0; - /// This is the method that will be called on remote calls on the method TestArrayOfPolymorphicStructMethod. - virtual void TestArrayOfPolymorphicStructMethod(const std::shared_ptr<CommonAPI::ClientId> _client, std::vector<std::shared_ptr<::commonapi::tests::DerivedTypeCollection::TestPolymorphicStruct>> _inArray, TestArrayOfPolymorphicStructMethodReply_t _reply) = 0; - /// This is the method that will be called on remote calls on the method TestMapOfPolymorphicStructMethod. - virtual void TestMapOfPolymorphicStructMethod(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::MapIntToPolymorphic _inMap, TestMapOfPolymorphicStructMethodReply_t _reply) = 0; - /// This is the method that will be called on remote calls on the method TestStructWithPolymorphicMemberMethod. - virtual void TestStructWithPolymorphicMemberMethod(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::StructWithPolymorphicMember _inStruct, TestStructWithPolymorphicMemberMethodReply_t _reply) = 0; - /// This is the method that will be called on remote calls on the method TestStructWithEnumKeyMapMember. - virtual void TestStructWithEnumKeyMapMember(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::StructWithEnumKeyMap _inStruct, TestStructWithEnumKeyMapMemberReply_t _reply) = 0; - /// Sends a broadcast event for TestPredefinedTypeBroadcast. - virtual void fireTestPredefinedTypeBroadcastEvent(const uint32_t &_uint32Value, const std::string &_stringValue) = 0; - /** - * Sends a selective broadcast event for TestSelectiveBroadcast to the given ClientIds. - * The ClientIds must all be out of the set of subscribed clients. - * If no ClientIds are given, the selective broadcast is sent to all subscribed clients. - */ - virtual void fireTestSelectiveBroadcastSelective(const std::shared_ptr<CommonAPI::ClientIdList> _receivers = nullptr) = 0; - /// retreives the list of all subscribed clients for TestSelectiveBroadcast - virtual std::shared_ptr<CommonAPI::ClientIdList> const getSubscribersForTestSelectiveBroadcastSelective() = 0; - /// Hook method for reacting on new subscriptions or removed subscriptions respectively for selective broadcasts. - virtual void onTestSelectiveBroadcastSelectiveSubscriptionChanged(const std::shared_ptr<CommonAPI::ClientId> _client, const CommonAPI::SelectiveBroadcastSubscriptionEvent _event) = 0; - /// Hook method for reacting accepting or denying new subscriptions - virtual bool onTestSelectiveBroadcastSelectiveSubscriptionRequested(const std::shared_ptr<CommonAPI::ClientId> _client) = 0; - /** - * Sends a selective broadcast event for TestBroadcastWithOutArgs to the given ClientIds. - * The ClientIds must all be out of the set of subscribed clients. - * If no ClientIds are given, the selective broadcast is sent to all subscribed clients. - */ - virtual void fireTestBroadcastWithOutArgsSelective(const uint32_t &_uint32Value, const std::string &_stringValue, const std::shared_ptr<CommonAPI::ClientIdList> _receivers = nullptr) = 0; - /// retreives the list of all subscribed clients for TestBroadcastWithOutArgs - virtual std::shared_ptr<CommonAPI::ClientIdList> const getSubscribersForTestBroadcastWithOutArgsSelective() = 0; - /// Hook method for reacting on new subscriptions or removed subscriptions respectively for selective broadcasts. - virtual void onTestBroadcastWithOutArgsSelectiveSubscriptionChanged(const std::shared_ptr<CommonAPI::ClientId> _client, const CommonAPI::SelectiveBroadcastSubscriptionEvent _event) = 0; - /// Hook method for reacting accepting or denying new subscriptions - virtual bool onTestBroadcastWithOutArgsSelectiveSubscriptionRequested(const std::shared_ptr<CommonAPI::ClientId> _client) = 0; - - using CommonAPI::Stub<TestInterfaceStubAdapter, TestInterfaceStubRemoteEvent>::initStubAdapter; - typedef CommonAPI::Stub<TestInterfaceStubAdapter, TestInterfaceStubRemoteEvent>::StubAdapterType StubAdapterType; - typedef CommonAPI::Stub<TestInterfaceStubAdapter, TestInterfaceStubRemoteEvent>::RemoteEventHandlerType RemoteEventHandlerType; - typedef TestInterfaceStubRemoteEvent RemoteEventType; - typedef TestInterface StubInterface; -}; - -} // namespace tests -} // namespace commonapi -} // namespace v1 - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_Test_Interface_STUB_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceStubDefault.cpp b/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceStubDefault.cpp deleted file mode 100644 index f669169..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceStubDefault.cpp +++ /dev/null @@ -1,331 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#include <v1/commonapi/tests/TestInterfaceStubDefault.hpp> -#include <assert.h> - -namespace v1 { -namespace commonapi { -namespace tests { - -TestInterfaceStubDefault::TestInterfaceStubDefault(): - remoteEventHandler_(this), - interfaceVersion_(TestInterface::getInterfaceVersion()) { -} - -const CommonAPI::Version& TestInterfaceStubDefault::getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> _client) { - (void)_client; - return interfaceVersion_; -} - -TestInterfaceStubRemoteEvent* TestInterfaceStubDefault::initStubAdapter(const std::shared_ptr<TestInterfaceStubAdapter> &_adapter) { - CommonAPI::Stub<TestInterfaceStubAdapter, TestInterfaceStubRemoteEvent>::stubAdapter_ = _adapter; - return &remoteEventHandler_; -} - -const uint32_t& TestInterfaceStubDefault::getTestPredefinedTypeAttributeAttribute() { - return testPredefinedTypeAttributeAttributeValue_; -} - -const uint32_t& TestInterfaceStubDefault::getTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client) { - (void)_client; - return getTestPredefinedTypeAttributeAttribute(); -} - -void TestInterfaceStubDefault::setTestPredefinedTypeAttributeAttribute(uint32_t _value) { - const bool valueChanged = trySetTestPredefinedTypeAttributeAttribute(std::move(_value)); - if (valueChanged) { - auto stubAdapter = CommonAPI::Stub<TestInterfaceStubAdapter, TestInterfaceStubRemoteEvent>::stubAdapter_.lock(); - if (stubAdapter) - stubAdapter->fireTestPredefinedTypeAttributeAttributeChanged(testPredefinedTypeAttributeAttributeValue_); - } -} - -bool TestInterfaceStubDefault::trySetTestPredefinedTypeAttributeAttribute(uint32_t _value) { - if (!validateTestPredefinedTypeAttributeAttributeRequestedValue(_value)) - return false; - - const bool valueChanged = (testPredefinedTypeAttributeAttributeValue_ != _value); - testPredefinedTypeAttributeAttributeValue_ = std::move(_value); - return valueChanged; -} - -bool TestInterfaceStubDefault::validateTestPredefinedTypeAttributeAttributeRequestedValue(const uint32_t &_value) { - (void)_value; - return true; -} - -void TestInterfaceStubDefault::setTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _value) { - (void)_client; - setTestPredefinedTypeAttributeAttribute(_value); -} - -void TestInterfaceStubDefault::onRemoteTestPredefinedTypeAttributeAttributeChanged() { - // No operation in default -} - -void TestInterfaceStubDefault::RemoteEventHandler::onRemoteTestPredefinedTypeAttributeAttributeChanged() { - assert(defaultStub_ !=NULL); - defaultStub_->onRemoteTestPredefinedTypeAttributeAttributeChanged(); -} - -bool TestInterfaceStubDefault::RemoteEventHandler::onRemoteSetTestPredefinedTypeAttributeAttribute(uint32_t _value) { - assert(defaultStub_ !=NULL); - return defaultStub_->trySetTestPredefinedTypeAttributeAttribute(std::move(_value)); -} - -bool TestInterfaceStubDefault::RemoteEventHandler::onRemoteSetTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _value) { - (void)_client; - return onRemoteSetTestPredefinedTypeAttributeAttribute(_value); -} - -const ::commonapi::tests::DerivedTypeCollection::TestStructExtended& TestInterfaceStubDefault::getTestDerivedStructAttributeAttribute() { - return testDerivedStructAttributeAttributeValue_; -} - -const ::commonapi::tests::DerivedTypeCollection::TestStructExtended& TestInterfaceStubDefault::getTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client) { - (void)_client; - return getTestDerivedStructAttributeAttribute(); -} - -void TestInterfaceStubDefault::setTestDerivedStructAttributeAttribute(::commonapi::tests::DerivedTypeCollection::TestStructExtended _value) { - const bool valueChanged = trySetTestDerivedStructAttributeAttribute(std::move(_value)); - if (valueChanged) { - auto stubAdapter = CommonAPI::Stub<TestInterfaceStubAdapter, TestInterfaceStubRemoteEvent>::stubAdapter_.lock(); - if (stubAdapter) - stubAdapter->fireTestDerivedStructAttributeAttributeChanged(testDerivedStructAttributeAttributeValue_); - } -} - -bool TestInterfaceStubDefault::trySetTestDerivedStructAttributeAttribute(::commonapi::tests::DerivedTypeCollection::TestStructExtended _value) { - if (!validateTestDerivedStructAttributeAttributeRequestedValue(_value)) - return false; - - const bool valueChanged = (testDerivedStructAttributeAttributeValue_ != _value); - testDerivedStructAttributeAttributeValue_ = std::move(_value); - return valueChanged; -} - -bool TestInterfaceStubDefault::validateTestDerivedStructAttributeAttributeRequestedValue(const ::commonapi::tests::DerivedTypeCollection::TestStructExtended &_value) { - (void)_value; - return true; -} - -void TestInterfaceStubDefault::setTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::TestStructExtended _value) { - (void)_client; - setTestDerivedStructAttributeAttribute(_value); -} - -void TestInterfaceStubDefault::onRemoteTestDerivedStructAttributeAttributeChanged() { - // No operation in default -} - -void TestInterfaceStubDefault::RemoteEventHandler::onRemoteTestDerivedStructAttributeAttributeChanged() { - assert(defaultStub_ !=NULL); - defaultStub_->onRemoteTestDerivedStructAttributeAttributeChanged(); -} - -bool TestInterfaceStubDefault::RemoteEventHandler::onRemoteSetTestDerivedStructAttributeAttribute(::commonapi::tests::DerivedTypeCollection::TestStructExtended _value) { - assert(defaultStub_ !=NULL); - return defaultStub_->trySetTestDerivedStructAttributeAttribute(std::move(_value)); -} - -bool TestInterfaceStubDefault::RemoteEventHandler::onRemoteSetTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::TestStructExtended _value) { - (void)_client; - return onRemoteSetTestDerivedStructAttributeAttribute(_value); -} - -const ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64& TestInterfaceStubDefault::getTestDerivedArrayAttributeAttribute() { - return testDerivedArrayAttributeAttributeValue_; -} - -const ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64& TestInterfaceStubDefault::getTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client) { - (void)_client; - return getTestDerivedArrayAttributeAttribute(); -} - -void TestInterfaceStubDefault::setTestDerivedArrayAttributeAttribute(::commonapi::tests::DerivedTypeCollection::TestArrayUInt64 _value) { - const bool valueChanged = trySetTestDerivedArrayAttributeAttribute(std::move(_value)); - if (valueChanged) { - auto stubAdapter = CommonAPI::Stub<TestInterfaceStubAdapter, TestInterfaceStubRemoteEvent>::stubAdapter_.lock(); - if (stubAdapter) - stubAdapter->fireTestDerivedArrayAttributeAttributeChanged(testDerivedArrayAttributeAttributeValue_); - } -} - -bool TestInterfaceStubDefault::trySetTestDerivedArrayAttributeAttribute(::commonapi::tests::DerivedTypeCollection::TestArrayUInt64 _value) { - if (!validateTestDerivedArrayAttributeAttributeRequestedValue(_value)) - return false; - - const bool valueChanged = (testDerivedArrayAttributeAttributeValue_ != _value); - testDerivedArrayAttributeAttributeValue_ = std::move(_value); - return valueChanged; -} - -bool TestInterfaceStubDefault::validateTestDerivedArrayAttributeAttributeRequestedValue(const ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64 &_value) { - (void)_value; - return true; -} - -void TestInterfaceStubDefault::setTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64 _value) { - (void)_client; - setTestDerivedArrayAttributeAttribute(_value); -} - -void TestInterfaceStubDefault::onRemoteTestDerivedArrayAttributeAttributeChanged() { - // No operation in default -} - -void TestInterfaceStubDefault::RemoteEventHandler::onRemoteTestDerivedArrayAttributeAttributeChanged() { - assert(defaultStub_ !=NULL); - defaultStub_->onRemoteTestDerivedArrayAttributeAttributeChanged(); -} - -bool TestInterfaceStubDefault::RemoteEventHandler::onRemoteSetTestDerivedArrayAttributeAttribute(::commonapi::tests::DerivedTypeCollection::TestArrayUInt64 _value) { - assert(defaultStub_ !=NULL); - return defaultStub_->trySetTestDerivedArrayAttributeAttribute(std::move(_value)); -} - -bool TestInterfaceStubDefault::RemoteEventHandler::onRemoteSetTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64 _value) { - (void)_client; - return onRemoteSetTestDerivedArrayAttributeAttribute(_value); -} - - -void TestInterfaceStubDefault::testEmptyMethod(const std::shared_ptr<CommonAPI::ClientId> _client, testEmptyMethodReply_t _reply) { - (void)_client; - _reply(); -} - -void TestInterfaceStubDefault::testVoidPredefinedTypeMethod(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _uint32Value, std::string _stringValue, testVoidPredefinedTypeMethodReply_t _reply) { - (void)_client; - (void) _uint32Value; - (void) _stringValue; - _reply(); -} - -void TestInterfaceStubDefault::testPredefinedTypeMethod(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _uint32InValue, std::string _stringInValue, testPredefinedTypeMethodReply_t _reply) { - (void)_client; - (void) _uint32InValue; - (void) _stringInValue; - uint32_t uint32OutValue = 0ul; - std::string stringOutValue = ""; - _reply(uint32OutValue, stringOutValue); -} - -void TestInterfaceStubDefault::testVoidDerivedTypeMethod(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 _testEnumExtended2Value, ::commonapi::tests::DerivedTypeCollection::TestMap _testMapValue, testVoidDerivedTypeMethodReply_t _reply) { - (void)_client; - (void) _testEnumExtended2Value; - (void) _testMapValue; - _reply(); -} - -void TestInterfaceStubDefault::testDerivedTypeMethod(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 _testEnumExtended2InValue, ::commonapi::tests::DerivedTypeCollection::TestMap _testMapInValue, testDerivedTypeMethodReply_t _reply) { - (void)_client; - (void) _testEnumExtended2InValue; - (void) _testMapInValue; - ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 testEnumExtended2OutValue = ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2::E_NEW2; - ::commonapi::tests::DerivedTypeCollection::TestMap testMapOutValue; - if (!testEnumExtended2OutValue.validate()) { - return; - } - _reply(testEnumExtended2OutValue, testMapOutValue); -} - -void TestInterfaceStubDefault::TestArrayOfPolymorphicStructMethod(const std::shared_ptr<CommonAPI::ClientId> _client, std::vector<std::shared_ptr<::commonapi::tests::DerivedTypeCollection::TestPolymorphicStruct>> _inArray, TestArrayOfPolymorphicStructMethodReply_t _reply) { - (void)_client; - (void) _inArray; - _reply(); -} - -void TestInterfaceStubDefault::TestMapOfPolymorphicStructMethod(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::MapIntToPolymorphic _inMap, TestMapOfPolymorphicStructMethodReply_t _reply) { - (void)_client; - (void) _inMap; - _reply(); -} - -void TestInterfaceStubDefault::TestStructWithPolymorphicMemberMethod(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::StructWithPolymorphicMember _inStruct, TestStructWithPolymorphicMemberMethodReply_t _reply) { - (void)_client; - (void) _inStruct; - _reply(); -} - -void TestInterfaceStubDefault::TestStructWithEnumKeyMapMember(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::StructWithEnumKeyMap _inStruct, TestStructWithEnumKeyMapMemberReply_t _reply) { - (void)_client; - (void) _inStruct; - _reply(); -} - - -void TestInterfaceStubDefault::fireTestPredefinedTypeBroadcastEvent(const uint32_t &_uint32Value, const std::string &_stringValue) { - assert((CommonAPI::Stub<TestInterfaceStubAdapter, TestInterfaceStubRemoteEvent>::stubAdapter_.lock()) !=NULL); - auto stubAdapter = CommonAPI::Stub<TestInterfaceStubAdapter, TestInterfaceStubRemoteEvent>::stubAdapter_.lock(); - if (stubAdapter) - stubAdapter->fireTestPredefinedTypeBroadcastEvent(_uint32Value, _stringValue); -} -void TestInterfaceStubDefault::fireTestSelectiveBroadcastSelective(const std::shared_ptr<CommonAPI::ClientIdList> _receivers) { - assert((CommonAPI::Stub<TestInterfaceStubAdapter, TestInterfaceStubRemoteEvent>::stubAdapter_.lock()) !=NULL); - auto stubAdapter = CommonAPI::Stub<TestInterfaceStubAdapter, TestInterfaceStubRemoteEvent>::stubAdapter_.lock(); - if (stubAdapter) - stubAdapter->sendTestSelectiveBroadcastSelective(_receivers); -} -void TestInterfaceStubDefault::onTestSelectiveBroadcastSelectiveSubscriptionChanged(const std::shared_ptr<CommonAPI::ClientId> _client, const CommonAPI::SelectiveBroadcastSubscriptionEvent _event) { - (void)_client; - (void)_event; - // No operation in default -} -bool TestInterfaceStubDefault::onTestSelectiveBroadcastSelectiveSubscriptionRequested(const std::shared_ptr<CommonAPI::ClientId> _client) { - (void)_client; - // Accept in default - return true; -} -std::shared_ptr<CommonAPI::ClientIdList> const TestInterfaceStubDefault::getSubscribersForTestSelectiveBroadcastSelective() { - assert((CommonAPI::Stub<TestInterfaceStubAdapter, TestInterfaceStubRemoteEvent>::stubAdapter_.lock()) !=NULL); - auto stubAdapter = CommonAPI::Stub<TestInterfaceStubAdapter, TestInterfaceStubRemoteEvent>::stubAdapter_.lock(); - if (stubAdapter) - return(stubAdapter->getSubscribersForTestSelectiveBroadcastSelective()); - else - return NULL; -} - -void TestInterfaceStubDefault::fireTestBroadcastWithOutArgsSelective(const uint32_t &_uint32Value, const std::string &_stringValue, const std::shared_ptr<CommonAPI::ClientIdList> _receivers) { - assert((CommonAPI::Stub<TestInterfaceStubAdapter, TestInterfaceStubRemoteEvent>::stubAdapter_.lock()) !=NULL); - auto stubAdapter = CommonAPI::Stub<TestInterfaceStubAdapter, TestInterfaceStubRemoteEvent>::stubAdapter_.lock(); - if (stubAdapter) - stubAdapter->sendTestBroadcastWithOutArgsSelective(_uint32Value, _stringValue, _receivers); -} -void TestInterfaceStubDefault::onTestBroadcastWithOutArgsSelectiveSubscriptionChanged(const std::shared_ptr<CommonAPI::ClientId> _client, const CommonAPI::SelectiveBroadcastSubscriptionEvent _event) { - (void)_client; - (void)_event; - // No operation in default -} -bool TestInterfaceStubDefault::onTestBroadcastWithOutArgsSelectiveSubscriptionRequested(const std::shared_ptr<CommonAPI::ClientId> _client) { - (void)_client; - // Accept in default - return true; -} -std::shared_ptr<CommonAPI::ClientIdList> const TestInterfaceStubDefault::getSubscribersForTestBroadcastWithOutArgsSelective() { - assert((CommonAPI::Stub<TestInterfaceStubAdapter, TestInterfaceStubRemoteEvent>::stubAdapter_.lock()) !=NULL); - auto stubAdapter = CommonAPI::Stub<TestInterfaceStubAdapter, TestInterfaceStubRemoteEvent>::stubAdapter_.lock(); - if (stubAdapter) - return(stubAdapter->getSubscribersForTestBroadcastWithOutArgsSelective()); - else - return NULL; -} - - - -TestInterfaceStubDefault::RemoteEventHandler::RemoteEventHandler(TestInterfaceStubDefault *_defaultStub) - : - defaultStub_(_defaultStub) { -} - -} // namespace tests -} // namespace commonapi -} // namespace v1 diff --git a/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceStubDefault.hpp b/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceStubDefault.hpp deleted file mode 100644 index 215345d..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/TestInterfaceStubDefault.hpp +++ /dev/null @@ -1,126 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_Test_Interface_STUB_DEFAULT_HPP_ -#define V1_COMMONAPI_TESTS_Test_Interface_STUB_DEFAULT_HPP_ - - -#include <v1/commonapi/tests/TestInterfaceStub.hpp> -#include <sstream> - -namespace v1 { -namespace commonapi { -namespace tests { - -/** - * Provides a default implementation for TestInterfaceStubRemoteEvent and - * TestInterfaceStub. 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 TestInterfaceStubDefault - : public virtual TestInterfaceStub { -public: - TestInterfaceStubDefault(); - - TestInterfaceStubRemoteEvent* initStubAdapter(const std::shared_ptr<TestInterfaceStubAdapter> &_adapter); - - const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> _client); - - virtual const uint32_t& getTestPredefinedTypeAttributeAttribute(); - virtual const uint32_t& getTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client); - virtual void setTestPredefinedTypeAttributeAttribute(uint32_t _value); - virtual void setTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _value); - virtual const ::commonapi::tests::DerivedTypeCollection::TestStructExtended& getTestDerivedStructAttributeAttribute(); - virtual const ::commonapi::tests::DerivedTypeCollection::TestStructExtended& getTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client); - virtual void setTestDerivedStructAttributeAttribute(::commonapi::tests::DerivedTypeCollection::TestStructExtended _value); - virtual void setTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::TestStructExtended _value); - virtual const ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64& getTestDerivedArrayAttributeAttribute(); - virtual const ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64& getTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client); - virtual void setTestDerivedArrayAttributeAttribute(::commonapi::tests::DerivedTypeCollection::TestArrayUInt64 _value); - virtual void setTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64 _value); - - virtual void testEmptyMethod(const std::shared_ptr<CommonAPI::ClientId> _client, testEmptyMethodReply_t _reply); - virtual void testVoidPredefinedTypeMethod(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _uint32Value, std::string _stringValue, testVoidPredefinedTypeMethodReply_t _reply); - virtual void testPredefinedTypeMethod(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _uint32InValue, std::string _stringInValue, testPredefinedTypeMethodReply_t _reply); - virtual void testVoidDerivedTypeMethod(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 _testEnumExtended2Value, ::commonapi::tests::DerivedTypeCollection::TestMap _testMapValue, testVoidDerivedTypeMethodReply_t _reply); - virtual void testDerivedTypeMethod(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 _testEnumExtended2InValue, ::commonapi::tests::DerivedTypeCollection::TestMap _testMapInValue, testDerivedTypeMethodReply_t _reply); - virtual void TestArrayOfPolymorphicStructMethod(const std::shared_ptr<CommonAPI::ClientId> _client, std::vector<std::shared_ptr<::commonapi::tests::DerivedTypeCollection::TestPolymorphicStruct>> _inArray, TestArrayOfPolymorphicStructMethodReply_t _reply); - virtual void TestMapOfPolymorphicStructMethod(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::MapIntToPolymorphic _inMap, TestMapOfPolymorphicStructMethodReply_t _reply); - virtual void TestStructWithPolymorphicMemberMethod(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::StructWithPolymorphicMember _inStruct, TestStructWithPolymorphicMemberMethodReply_t _reply); - virtual void TestStructWithEnumKeyMapMember(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::StructWithEnumKeyMap _inStruct, TestStructWithEnumKeyMapMemberReply_t _reply); - -virtual void fireTestPredefinedTypeBroadcastEvent(const uint32_t &_uint32Value, const std::string &_stringValue); -virtual void fireTestSelectiveBroadcastSelective(const std::shared_ptr<CommonAPI::ClientIdList> _receivers = nullptr); -virtual std::shared_ptr<CommonAPI::ClientIdList> const getSubscribersForTestSelectiveBroadcastSelective(); -/// Hook method for reacting on new subscriptions or removed subscriptions respectively for selective broadcasts. -virtual void onTestSelectiveBroadcastSelectiveSubscriptionChanged(const std::shared_ptr<CommonAPI::ClientId> _client, const CommonAPI::SelectiveBroadcastSubscriptionEvent _event); -/// Hook method for reacting accepting or denying new subscriptions -virtual bool onTestSelectiveBroadcastSelectiveSubscriptionRequested(const std::shared_ptr<CommonAPI::ClientId> _client); -virtual void fireTestBroadcastWithOutArgsSelective(const uint32_t &_uint32Value, const std::string &_stringValue, const std::shared_ptr<CommonAPI::ClientIdList> _receivers = nullptr); -virtual std::shared_ptr<CommonAPI::ClientIdList> const getSubscribersForTestBroadcastWithOutArgsSelective(); -/// Hook method for reacting on new subscriptions or removed subscriptions respectively for selective broadcasts. -virtual void onTestBroadcastWithOutArgsSelectiveSubscriptionChanged(const std::shared_ptr<CommonAPI::ClientId> _client, const CommonAPI::SelectiveBroadcastSubscriptionEvent _event); -/// Hook method for reacting accepting or denying new subscriptions -virtual bool onTestBroadcastWithOutArgsSelectiveSubscriptionRequested(const std::shared_ptr<CommonAPI::ClientId> _client); - - -protected: - virtual bool trySetTestPredefinedTypeAttributeAttribute(uint32_t _value); - virtual bool validateTestPredefinedTypeAttributeAttributeRequestedValue(const uint32_t &_value); - virtual void onRemoteTestPredefinedTypeAttributeAttributeChanged(); - virtual bool trySetTestDerivedStructAttributeAttribute(::commonapi::tests::DerivedTypeCollection::TestStructExtended _value); - virtual bool validateTestDerivedStructAttributeAttributeRequestedValue(const ::commonapi::tests::DerivedTypeCollection::TestStructExtended &_value); - virtual void onRemoteTestDerivedStructAttributeAttributeChanged(); - virtual bool trySetTestDerivedArrayAttributeAttribute(::commonapi::tests::DerivedTypeCollection::TestArrayUInt64 _value); - virtual bool validateTestDerivedArrayAttributeAttributeRequestedValue(const ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64 &_value); - virtual void onRemoteTestDerivedArrayAttributeAttributeChanged(); - class RemoteEventHandler: public virtual TestInterfaceStubRemoteEvent { - public: - RemoteEventHandler(TestInterfaceStubDefault *_defaultStub); - - virtual bool onRemoteSetTestPredefinedTypeAttributeAttribute(uint32_t _value); - virtual bool onRemoteSetTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _value); - virtual void onRemoteTestPredefinedTypeAttributeAttributeChanged(); - - virtual bool onRemoteSetTestDerivedStructAttributeAttribute(::commonapi::tests::DerivedTypeCollection::TestStructExtended _value); - virtual bool onRemoteSetTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::TestStructExtended _value); - virtual void onRemoteTestDerivedStructAttributeAttributeChanged(); - - virtual bool onRemoteSetTestDerivedArrayAttributeAttribute(::commonapi::tests::DerivedTypeCollection::TestArrayUInt64 _value); - virtual bool onRemoteSetTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64 _value); - virtual void onRemoteTestDerivedArrayAttributeAttributeChanged(); - - - private: - TestInterfaceStubDefault *defaultStub_; - }; -private: - TestInterfaceStubDefault::RemoteEventHandler remoteEventHandler_; - - uint32_t testPredefinedTypeAttributeAttributeValue_ {}; - ::commonapi::tests::DerivedTypeCollection::TestStructExtended testDerivedStructAttributeAttributeValue_ {}; - ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64 testDerivedArrayAttributeAttributeValue_ {}; - - CommonAPI::Version interfaceVersion_; -}; - -} // namespace tests -} // namespace commonapi -} // namespace v1 - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_Test_Interface_STUB_DEFAULT diff --git a/src/test/src-gen/core/v1/commonapi/tests/managed/BranchInterface.hpp b/src/test/src-gen/core/v1/commonapi/tests/managed/BranchInterface.hpp deleted file mode 100644 index 3381172..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/managed/BranchInterface.hpp +++ /dev/null @@ -1,96 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_MANAGED_BRANCH_INTERFACE_HPP_ -#define V1_COMMONAPI_TESTS_MANAGED_BRANCH_INTERFACE_HPP_ - - - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <CommonAPI/InputStream.hpp> -#include <CommonAPI/OutputStream.hpp> -#include <CommonAPI/Types.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { -namespace managed { - -class BranchInterface { -public: - virtual ~BranchInterface() { } - - static inline const char* getInterface(); - static inline CommonAPI::Version getInterfaceVersion(); - - struct testBranchMethodError : CommonAPI::Enumeration<int32_t> { - enum Literal : int32_t { - OK = 0, - NOTOK = 1 - }; - - testBranchMethodError() - : CommonAPI::Enumeration<int32_t>(static_cast<int32_t>(Literal::OK)) {} - testBranchMethodError(Literal _literal) - : CommonAPI::Enumeration<int32_t>(static_cast<int32_t>(_literal)) {} - - inline bool validate() const { - switch (value_) { - case static_cast<int32_t>(Literal::OK): - case static_cast<int32_t>(Literal::NOTOK): - return true; - default: - return false; - } - } - - inline bool operator==(const testBranchMethodError &_other) const { return (value_ == _other.value_); } - inline bool operator!=(const testBranchMethodError &_other) const { return (value_ != _other.value_); } - inline bool operator<=(const testBranchMethodError &_other) const { return (value_ <= _other.value_); } - inline bool operator>=(const testBranchMethodError &_other) const { return (value_ >= _other.value_); } - inline bool operator<(const testBranchMethodError &_other) const { return (value_ < _other.value_); } - inline bool operator>(const testBranchMethodError &_other) const { return (value_ > _other.value_); } - - inline bool operator==(const Literal &_value) const { return (value_ == static_cast<int32_t>(_value)); } - inline bool operator!=(const Literal &_value) const { return (value_ != static_cast<int32_t>(_value)); } - inline bool operator<=(const Literal &_value) const { return (value_ <= static_cast<int32_t>(_value)); } - inline bool operator>=(const Literal &_value) const { return (value_ >= static_cast<int32_t>(_value)); } - inline bool operator<(const Literal &_value) const { return (value_ < static_cast<int32_t>(_value)); } - inline bool operator>(const Literal &_value) const { return (value_ > static_cast<int32_t>(_value)); } - }; -}; - -const char* BranchInterface::getInterface() { - return ("commonapi.tests.managed.BranchInterface"); -} - -CommonAPI::Version BranchInterface::getInterfaceVersion() { - return CommonAPI::Version(1, 0); -} - - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1 - -namespace CommonAPI { -} - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_MANAGED_BRANCH_INTERFACE_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/managed/BranchInterfaceProxy.hpp b/src/test/src-gen/core/v1/commonapi/tests/managed/BranchInterfaceProxy.hpp deleted file mode 100644 index bdd01f3..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/managed/BranchInterfaceProxy.hpp +++ /dev/null @@ -1,158 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_MANAGED_Branch_Interface_PROXY_HPP_ -#define V1_COMMONAPI_TESTS_MANAGED_Branch_Interface_PROXY_HPP_ - -#include <v1/commonapi/tests/managed/BranchInterfaceProxyBase.hpp> - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { -namespace managed { - -template <typename ... _AttributeExtensions> -class BranchInterfaceProxy - : virtual public BranchInterface, - virtual public BranchInterfaceProxyBase, - virtual public _AttributeExtensions... { -public: - BranchInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate); - ~BranchInterfaceProxy(); - - typedef BranchInterface InterfaceType; - - - - - /** - * Calls testBranchMethod 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 testBranchMethod(const int32_t &_inInt, const std::string &_inString, CommonAPI::CallStatus &_internalCallStatus, BranchInterface::testBranchMethodError &_error, int32_t &_outInt, std::string &_outString, const CommonAPI::CallInfo *_info = nullptr); - /** - * Calls testBranchMethod 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> testBranchMethodAsync(const int32_t &_inInt, const std::string &_inString, TestBranchMethodAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr); - - - /** - * Returns the CommonAPI address of the remote partner this proxy communicates with. - */ - virtual const CommonAPI::Address &getAddress() 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<BranchInterfaceProxyBase> delegate_; -}; - -typedef BranchInterfaceProxy<> BranchInterfaceProxyDefault; - - -// -// BranchInterfaceProxy Implementation -// -template <typename ... _AttributeExtensions> -BranchInterfaceProxy<_AttributeExtensions...>::BranchInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate): - _AttributeExtensions(*(std::dynamic_pointer_cast<BranchInterfaceProxyBase>(delegate)))..., - delegate_(std::dynamic_pointer_cast<BranchInterfaceProxyBase>(delegate)) { -} - -template <typename ... _AttributeExtensions> -BranchInterfaceProxy<_AttributeExtensions...>::~BranchInterfaceProxy() { -} - -template <typename ... _AttributeExtensions> -void BranchInterfaceProxy<_AttributeExtensions...>::testBranchMethod(const int32_t &_inInt, const std::string &_inString, CommonAPI::CallStatus &_internalCallStatus, BranchInterface::testBranchMethodError &_error, int32_t &_outInt, std::string &_outString, const CommonAPI::CallInfo *_info) { - delegate_->testBranchMethod(_inInt, _inString, _internalCallStatus, _error, _outInt, _outString, _info); -} - -template <typename ... _AttributeExtensions> -std::future<CommonAPI::CallStatus> BranchInterfaceProxy<_AttributeExtensions...>::testBranchMethodAsync(const int32_t &_inInt, const std::string &_inString, TestBranchMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info) { - return delegate_->testBranchMethodAsync(_inInt, _inString, _callback, _info); -} - -template <typename ... _AttributeExtensions> -const CommonAPI::Address &BranchInterfaceProxy<_AttributeExtensions...>::getAddress() const { - return delegate_->getAddress(); -} - -template <typename ... _AttributeExtensions> -bool BranchInterfaceProxy<_AttributeExtensions...>::isAvailable() const { - return delegate_->isAvailable(); -} - -template <typename ... _AttributeExtensions> -bool BranchInterfaceProxy<_AttributeExtensions...>::isAvailableBlocking() const { - return delegate_->isAvailableBlocking(); -} - -template <typename ... _AttributeExtensions> -CommonAPI::ProxyStatusEvent& BranchInterfaceProxy<_AttributeExtensions...>::getProxyStatusEvent() { - return delegate_->getProxyStatusEvent(); -} - -template <typename ... _AttributeExtensions> -CommonAPI::InterfaceVersionAttribute& BranchInterfaceProxy<_AttributeExtensions...>::getInterfaceVersionAttribute() { - return delegate_->getInterfaceVersionAttribute(); -} - - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1 - - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_MANAGED_Branch_Interface_PROXY_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/managed/BranchInterfaceProxyBase.hpp b/src/test/src-gen/core/v1/commonapi/tests/managed/BranchInterfaceProxyBase.hpp deleted file mode 100644 index 72507e9..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/managed/BranchInterfaceProxyBase.hpp +++ /dev/null @@ -1,55 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_MANAGED_Branch_Interface_PROXY_BASE_HPP_ -#define V1_COMMONAPI_TESTS_MANAGED_Branch_Interface_PROXY_BASE_HPP_ - -#include <v1/commonapi/tests/managed/BranchInterface.hpp> - - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <vector> - -#include <CommonAPI/Proxy.hpp> -#include <functional> -#include <future> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { -namespace managed { - -class BranchInterfaceProxyBase - : virtual public CommonAPI::Proxy { -public: - - typedef std::function<void(const CommonAPI::CallStatus&, const BranchInterface::testBranchMethodError&, const int32_t&, const std::string&)> TestBranchMethodAsyncCallback; - - - - virtual void testBranchMethod(const int32_t &_inInt, const std::string &_inString, CommonAPI::CallStatus &_internalCallStatus, BranchInterface::testBranchMethodError &_error, int32_t &_outInt, std::string &_outString, const CommonAPI::CallInfo *_info = nullptr) = 0; - virtual std::future<CommonAPI::CallStatus> testBranchMethodAsync(const int32_t &_inInt, const std::string &_inString, TestBranchMethodAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr) = 0; -}; - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1 - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_MANAGED_Branch_Interface_PROXY_BASE_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/managed/BranchInterfaceStub.hpp b/src/test/src-gen/core/v1/commonapi/tests/managed/BranchInterfaceStub.hpp deleted file mode 100644 index 2122252..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/managed/BranchInterfaceStub.hpp +++ /dev/null @@ -1,110 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_MANAGED_Branch_Interface_STUB_HPP_ -#define V1_COMMONAPI_TESTS_MANAGED_Branch_Interface_STUB_HPP_ - -#include <functional> - - - - -#include <v1/commonapi/tests/managed/BranchInterface.hpp> - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <vector> - -#include <CommonAPI/Stub.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { -namespace managed { - -/** - * Receives messages from remote and handles all dispatching of deserialized calls - * to a stub for the service BranchInterface. 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 BranchInterfaceStubAdapter - : public virtual CommonAPI::StubAdapter, - public virtual BranchInterface { - 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 BranchInterface. - * 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 BranchInterfaceStubRemoteEvent -{ -public: - virtual ~BranchInterfaceStubRemoteEvent() { } - -}; - -/** - * Defines the interface that must be implemented by any class that should provide - * the service BranchInterface 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 BranchInterfaceStub - : public virtual CommonAPI::Stub<BranchInterfaceStubAdapter, BranchInterfaceStubRemoteEvent> -{ -public: - typedef std::function<void (BranchInterface::testBranchMethodError _error, int32_t _outInt, std::string _outString)>testBranchMethodReply_t; - - virtual ~BranchInterfaceStub() {} - 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 testBranchMethod. - virtual void testBranchMethod(const std::shared_ptr<CommonAPI::ClientId> _client, int32_t _inInt, std::string _inString, testBranchMethodReply_t _reply) = 0; - - using CommonAPI::Stub<BranchInterfaceStubAdapter, BranchInterfaceStubRemoteEvent>::initStubAdapter; - typedef CommonAPI::Stub<BranchInterfaceStubAdapter, BranchInterfaceStubRemoteEvent>::StubAdapterType StubAdapterType; - typedef CommonAPI::Stub<BranchInterfaceStubAdapter, BranchInterfaceStubRemoteEvent>::RemoteEventHandlerType RemoteEventHandlerType; - typedef BranchInterfaceStubRemoteEvent RemoteEventType; - typedef BranchInterface StubInterface; -}; - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1 - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_MANAGED_Branch_Interface_STUB_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/managed/BranchInterfaceStubDefault.cpp b/src/test/src-gen/core/v1/commonapi/tests/managed/BranchInterfaceStubDefault.cpp deleted file mode 100644 index 669bd1d..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/managed/BranchInterfaceStubDefault.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#include <v1/commonapi/tests/managed/BranchInterfaceStubDefault.hpp> -#include <assert.h> - -namespace v1 { -namespace commonapi { -namespace tests { -namespace managed { - -BranchInterfaceStubDefault::BranchInterfaceStubDefault(): - remoteEventHandler_(this), - interfaceVersion_(BranchInterface::getInterfaceVersion()) { -} - -const CommonAPI::Version& BranchInterfaceStubDefault::getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> _client) { - (void)_client; - return interfaceVersion_; -} - -BranchInterfaceStubRemoteEvent* BranchInterfaceStubDefault::initStubAdapter(const std::shared_ptr<BranchInterfaceStubAdapter> &_adapter) { - CommonAPI::Stub<BranchInterfaceStubAdapter, BranchInterfaceStubRemoteEvent>::stubAdapter_ = _adapter; - return &remoteEventHandler_; -} - - -void BranchInterfaceStubDefault::testBranchMethod(const std::shared_ptr<CommonAPI::ClientId> _client, int32_t _inInt, std::string _inString, testBranchMethodReply_t _reply) { - (void)_client; - (void) _inInt; - (void) _inString; - BranchInterface::testBranchMethodError error; - int32_t outInt = 0; - std::string outString = ""; - _reply(error, outInt, outString); -} - - - - -BranchInterfaceStubDefault::RemoteEventHandler::RemoteEventHandler(BranchInterfaceStubDefault *_defaultStub) - : - defaultStub_(_defaultStub) { -} - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1 diff --git a/src/test/src-gen/core/v1/commonapi/tests/managed/BranchInterfaceStubDefault.hpp b/src/test/src-gen/core/v1/commonapi/tests/managed/BranchInterfaceStubDefault.hpp deleted file mode 100644 index 4913639..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/managed/BranchInterfaceStubDefault.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_MANAGED_Branch_Interface_STUB_DEFAULT_HPP_ -#define V1_COMMONAPI_TESTS_MANAGED_Branch_Interface_STUB_DEFAULT_HPP_ - - -#include <v1/commonapi/tests/managed/BranchInterfaceStub.hpp> -#include <sstream> - -namespace v1 { -namespace commonapi { -namespace tests { -namespace managed { - -/** - * Provides a default implementation for BranchInterfaceStubRemoteEvent and - * BranchInterfaceStub. 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 BranchInterfaceStubDefault - : public virtual BranchInterfaceStub { -public: - BranchInterfaceStubDefault(); - - BranchInterfaceStubRemoteEvent* initStubAdapter(const std::shared_ptr<BranchInterfaceStubAdapter> &_adapter); - - const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> _client); - - - virtual void testBranchMethod(const std::shared_ptr<CommonAPI::ClientId> _client, int32_t _inInt, std::string _inString, testBranchMethodReply_t _reply); - - - -protected: - class RemoteEventHandler: public virtual BranchInterfaceStubRemoteEvent { - public: - RemoteEventHandler(BranchInterfaceStubDefault *_defaultStub); - - - private: - BranchInterfaceStubDefault *defaultStub_; - }; -private: - BranchInterfaceStubDefault::RemoteEventHandler remoteEventHandler_; - - - CommonAPI::Version interfaceVersion_; -}; - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1 - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_MANAGED_Branch_Interface_STUB_DEFAULT diff --git a/src/test/src-gen/core/v1/commonapi/tests/managed/LeafInterface.hpp b/src/test/src-gen/core/v1/commonapi/tests/managed/LeafInterface.hpp deleted file mode 100644 index f27f3e7..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/managed/LeafInterface.hpp +++ /dev/null @@ -1,96 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_MANAGED_LEAF_INTERFACE_HPP_ -#define V1_COMMONAPI_TESTS_MANAGED_LEAF_INTERFACE_HPP_ - - - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <CommonAPI/InputStream.hpp> -#include <CommonAPI/OutputStream.hpp> -#include <CommonAPI/Types.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { -namespace managed { - -class LeafInterface { -public: - virtual ~LeafInterface() { } - - static inline const char* getInterface(); - static inline CommonAPI::Version getInterfaceVersion(); - - struct testLeafMethodError : CommonAPI::Enumeration<int32_t> { - enum Literal : int32_t { - OK = 0, - NOTOK = 1 - }; - - testLeafMethodError() - : CommonAPI::Enumeration<int32_t>(static_cast<int32_t>(Literal::OK)) {} - testLeafMethodError(Literal _literal) - : CommonAPI::Enumeration<int32_t>(static_cast<int32_t>(_literal)) {} - - inline bool validate() const { - switch (value_) { - case static_cast<int32_t>(Literal::OK): - case static_cast<int32_t>(Literal::NOTOK): - return true; - default: - return false; - } - } - - inline bool operator==(const testLeafMethodError &_other) const { return (value_ == _other.value_); } - inline bool operator!=(const testLeafMethodError &_other) const { return (value_ != _other.value_); } - inline bool operator<=(const testLeafMethodError &_other) const { return (value_ <= _other.value_); } - inline bool operator>=(const testLeafMethodError &_other) const { return (value_ >= _other.value_); } - inline bool operator<(const testLeafMethodError &_other) const { return (value_ < _other.value_); } - inline bool operator>(const testLeafMethodError &_other) const { return (value_ > _other.value_); } - - inline bool operator==(const Literal &_value) const { return (value_ == static_cast<int32_t>(_value)); } - inline bool operator!=(const Literal &_value) const { return (value_ != static_cast<int32_t>(_value)); } - inline bool operator<=(const Literal &_value) const { return (value_ <= static_cast<int32_t>(_value)); } - inline bool operator>=(const Literal &_value) const { return (value_ >= static_cast<int32_t>(_value)); } - inline bool operator<(const Literal &_value) const { return (value_ < static_cast<int32_t>(_value)); } - inline bool operator>(const Literal &_value) const { return (value_ > static_cast<int32_t>(_value)); } - }; -}; - -const char* LeafInterface::getInterface() { - return ("commonapi.tests.managed.LeafInterface"); -} - -CommonAPI::Version LeafInterface::getInterfaceVersion() { - return CommonAPI::Version(1, 0); -} - - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1 - -namespace CommonAPI { -} - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_MANAGED_LEAF_INTERFACE_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/managed/LeafInterfaceProxy.hpp b/src/test/src-gen/core/v1/commonapi/tests/managed/LeafInterfaceProxy.hpp deleted file mode 100644 index cce9ffa..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/managed/LeafInterfaceProxy.hpp +++ /dev/null @@ -1,158 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_MANAGED_Leaf_Interface_PROXY_HPP_ -#define V1_COMMONAPI_TESTS_MANAGED_Leaf_Interface_PROXY_HPP_ - -#include <v1/commonapi/tests/managed/LeafInterfaceProxyBase.hpp> - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { -namespace managed { - -template <typename ... _AttributeExtensions> -class LeafInterfaceProxy - : virtual public LeafInterface, - virtual public LeafInterfaceProxyBase, - virtual public _AttributeExtensions... { -public: - LeafInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate); - ~LeafInterfaceProxy(); - - typedef LeafInterface InterfaceType; - - - - - /** - * Calls testLeafMethod 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 testLeafMethod(const int32_t &_inInt, const std::string &_inString, CommonAPI::CallStatus &_internalCallStatus, LeafInterface::testLeafMethodError &_error, int32_t &_outInt, std::string &_outString, const CommonAPI::CallInfo *_info = nullptr); - /** - * Calls testLeafMethod 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> testLeafMethodAsync(const int32_t &_inInt, const std::string &_inString, TestLeafMethodAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr); - - - /** - * Returns the CommonAPI address of the remote partner this proxy communicates with. - */ - virtual const CommonAPI::Address &getAddress() 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<LeafInterfaceProxyBase> delegate_; -}; - -typedef LeafInterfaceProxy<> LeafInterfaceProxyDefault; - - -// -// LeafInterfaceProxy Implementation -// -template <typename ... _AttributeExtensions> -LeafInterfaceProxy<_AttributeExtensions...>::LeafInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate): - _AttributeExtensions(*(std::dynamic_pointer_cast<LeafInterfaceProxyBase>(delegate)))..., - delegate_(std::dynamic_pointer_cast<LeafInterfaceProxyBase>(delegate)) { -} - -template <typename ... _AttributeExtensions> -LeafInterfaceProxy<_AttributeExtensions...>::~LeafInterfaceProxy() { -} - -template <typename ... _AttributeExtensions> -void LeafInterfaceProxy<_AttributeExtensions...>::testLeafMethod(const int32_t &_inInt, const std::string &_inString, CommonAPI::CallStatus &_internalCallStatus, LeafInterface::testLeafMethodError &_error, int32_t &_outInt, std::string &_outString, const CommonAPI::CallInfo *_info) { - delegate_->testLeafMethod(_inInt, _inString, _internalCallStatus, _error, _outInt, _outString, _info); -} - -template <typename ... _AttributeExtensions> -std::future<CommonAPI::CallStatus> LeafInterfaceProxy<_AttributeExtensions...>::testLeafMethodAsync(const int32_t &_inInt, const std::string &_inString, TestLeafMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info) { - return delegate_->testLeafMethodAsync(_inInt, _inString, _callback, _info); -} - -template <typename ... _AttributeExtensions> -const CommonAPI::Address &LeafInterfaceProxy<_AttributeExtensions...>::getAddress() const { - return delegate_->getAddress(); -} - -template <typename ... _AttributeExtensions> -bool LeafInterfaceProxy<_AttributeExtensions...>::isAvailable() const { - return delegate_->isAvailable(); -} - -template <typename ... _AttributeExtensions> -bool LeafInterfaceProxy<_AttributeExtensions...>::isAvailableBlocking() const { - return delegate_->isAvailableBlocking(); -} - -template <typename ... _AttributeExtensions> -CommonAPI::ProxyStatusEvent& LeafInterfaceProxy<_AttributeExtensions...>::getProxyStatusEvent() { - return delegate_->getProxyStatusEvent(); -} - -template <typename ... _AttributeExtensions> -CommonAPI::InterfaceVersionAttribute& LeafInterfaceProxy<_AttributeExtensions...>::getInterfaceVersionAttribute() { - return delegate_->getInterfaceVersionAttribute(); -} - - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1 - - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_MANAGED_Leaf_Interface_PROXY_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/managed/LeafInterfaceProxyBase.hpp b/src/test/src-gen/core/v1/commonapi/tests/managed/LeafInterfaceProxyBase.hpp deleted file mode 100644 index 752d4aa..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/managed/LeafInterfaceProxyBase.hpp +++ /dev/null @@ -1,55 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_MANAGED_Leaf_Interface_PROXY_BASE_HPP_ -#define V1_COMMONAPI_TESTS_MANAGED_Leaf_Interface_PROXY_BASE_HPP_ - -#include <v1/commonapi/tests/managed/LeafInterface.hpp> - - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <vector> - -#include <CommonAPI/Proxy.hpp> -#include <functional> -#include <future> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { -namespace managed { - -class LeafInterfaceProxyBase - : virtual public CommonAPI::Proxy { -public: - - typedef std::function<void(const CommonAPI::CallStatus&, const LeafInterface::testLeafMethodError&, const int32_t&, const std::string&)> TestLeafMethodAsyncCallback; - - - - virtual void testLeafMethod(const int32_t &_inInt, const std::string &_inString, CommonAPI::CallStatus &_internalCallStatus, LeafInterface::testLeafMethodError &_error, int32_t &_outInt, std::string &_outString, const CommonAPI::CallInfo *_info = nullptr) = 0; - virtual std::future<CommonAPI::CallStatus> testLeafMethodAsync(const int32_t &_inInt, const std::string &_inString, TestLeafMethodAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr) = 0; -}; - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1 - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_MANAGED_Leaf_Interface_PROXY_BASE_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/managed/LeafInterfaceStub.hpp b/src/test/src-gen/core/v1/commonapi/tests/managed/LeafInterfaceStub.hpp deleted file mode 100644 index 2193b8c..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/managed/LeafInterfaceStub.hpp +++ /dev/null @@ -1,110 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_MANAGED_Leaf_Interface_STUB_HPP_ -#define V1_COMMONAPI_TESTS_MANAGED_Leaf_Interface_STUB_HPP_ - -#include <functional> - - - - -#include <v1/commonapi/tests/managed/LeafInterface.hpp> - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <vector> - -#include <CommonAPI/Stub.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { -namespace managed { - -/** - * Receives messages from remote and handles all dispatching of deserialized calls - * to a stub for the service LeafInterface. 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 LeafInterfaceStubAdapter - : public virtual CommonAPI::StubAdapter, - public virtual LeafInterface { - 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 LeafInterface. - * 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 LeafInterfaceStubRemoteEvent -{ -public: - virtual ~LeafInterfaceStubRemoteEvent() { } - -}; - -/** - * Defines the interface that must be implemented by any class that should provide - * the service LeafInterface 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 LeafInterfaceStub - : public virtual CommonAPI::Stub<LeafInterfaceStubAdapter, LeafInterfaceStubRemoteEvent> -{ -public: - typedef std::function<void (LeafInterface::testLeafMethodError _error, int32_t _outInt, std::string _outString)>testLeafMethodReply_t; - - virtual ~LeafInterfaceStub() {} - 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 testLeafMethod. - virtual void testLeafMethod(const std::shared_ptr<CommonAPI::ClientId> _client, int32_t _inInt, std::string _inString, testLeafMethodReply_t _reply) = 0; - - using CommonAPI::Stub<LeafInterfaceStubAdapter, LeafInterfaceStubRemoteEvent>::initStubAdapter; - typedef CommonAPI::Stub<LeafInterfaceStubAdapter, LeafInterfaceStubRemoteEvent>::StubAdapterType StubAdapterType; - typedef CommonAPI::Stub<LeafInterfaceStubAdapter, LeafInterfaceStubRemoteEvent>::RemoteEventHandlerType RemoteEventHandlerType; - typedef LeafInterfaceStubRemoteEvent RemoteEventType; - typedef LeafInterface StubInterface; -}; - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1 - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_MANAGED_Leaf_Interface_STUB_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/managed/LeafInterfaceStubDefault.cpp b/src/test/src-gen/core/v1/commonapi/tests/managed/LeafInterfaceStubDefault.cpp deleted file mode 100644 index 4e8b9a8..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/managed/LeafInterfaceStubDefault.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#include <v1/commonapi/tests/managed/LeafInterfaceStubDefault.hpp> -#include <assert.h> - -namespace v1 { -namespace commonapi { -namespace tests { -namespace managed { - -LeafInterfaceStubDefault::LeafInterfaceStubDefault(): - remoteEventHandler_(this), - interfaceVersion_(LeafInterface::getInterfaceVersion()) { -} - -const CommonAPI::Version& LeafInterfaceStubDefault::getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> _client) { - (void)_client; - return interfaceVersion_; -} - -LeafInterfaceStubRemoteEvent* LeafInterfaceStubDefault::initStubAdapter(const std::shared_ptr<LeafInterfaceStubAdapter> &_adapter) { - CommonAPI::Stub<LeafInterfaceStubAdapter, LeafInterfaceStubRemoteEvent>::stubAdapter_ = _adapter; - return &remoteEventHandler_; -} - - -void LeafInterfaceStubDefault::testLeafMethod(const std::shared_ptr<CommonAPI::ClientId> _client, int32_t _inInt, std::string _inString, testLeafMethodReply_t _reply) { - (void)_client; - (void) _inInt; - (void) _inString; - LeafInterface::testLeafMethodError error; - int32_t outInt = 0; - std::string outString = ""; - _reply(error, outInt, outString); -} - - - - -LeafInterfaceStubDefault::RemoteEventHandler::RemoteEventHandler(LeafInterfaceStubDefault *_defaultStub) - : - defaultStub_(_defaultStub) { -} - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1 diff --git a/src/test/src-gen/core/v1/commonapi/tests/managed/LeafInterfaceStubDefault.hpp b/src/test/src-gen/core/v1/commonapi/tests/managed/LeafInterfaceStubDefault.hpp deleted file mode 100644 index d388742..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/managed/LeafInterfaceStubDefault.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_MANAGED_Leaf_Interface_STUB_DEFAULT_HPP_ -#define V1_COMMONAPI_TESTS_MANAGED_Leaf_Interface_STUB_DEFAULT_HPP_ - - -#include <v1/commonapi/tests/managed/LeafInterfaceStub.hpp> -#include <sstream> - -namespace v1 { -namespace commonapi { -namespace tests { -namespace managed { - -/** - * Provides a default implementation for LeafInterfaceStubRemoteEvent and - * LeafInterfaceStub. 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 LeafInterfaceStubDefault - : public virtual LeafInterfaceStub { -public: - LeafInterfaceStubDefault(); - - LeafInterfaceStubRemoteEvent* initStubAdapter(const std::shared_ptr<LeafInterfaceStubAdapter> &_adapter); - - const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> _client); - - - virtual void testLeafMethod(const std::shared_ptr<CommonAPI::ClientId> _client, int32_t _inInt, std::string _inString, testLeafMethodReply_t _reply); - - - -protected: - class RemoteEventHandler: public virtual LeafInterfaceStubRemoteEvent { - public: - RemoteEventHandler(LeafInterfaceStubDefault *_defaultStub); - - - private: - LeafInterfaceStubDefault *defaultStub_; - }; -private: - LeafInterfaceStubDefault::RemoteEventHandler remoteEventHandler_; - - - CommonAPI::Version interfaceVersion_; -}; - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1 - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_MANAGED_Leaf_Interface_STUB_DEFAULT diff --git a/src/test/src-gen/core/v1/commonapi/tests/managed/RootInterface.hpp b/src/test/src-gen/core/v1/commonapi/tests/managed/RootInterface.hpp deleted file mode 100644 index d7f9e33..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/managed/RootInterface.hpp +++ /dev/null @@ -1,97 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_MANAGED_ROOT_INTERFACE_HPP_ -#define V1_COMMONAPI_TESTS_MANAGED_ROOT_INTERFACE_HPP_ - - -#include <set> - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <CommonAPI/InputStream.hpp> -#include <CommonAPI/OutputStream.hpp> -#include <CommonAPI/Types.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { -namespace managed { - -class RootInterface { -public: - virtual ~RootInterface() { } - - static inline const char* getInterface(); - static inline CommonAPI::Version getInterfaceVersion(); - - struct testRootMethodError : CommonAPI::Enumeration<int32_t> { - enum Literal : int32_t { - OK = 0, - NOTOK = 1 - }; - - testRootMethodError() - : CommonAPI::Enumeration<int32_t>(static_cast<int32_t>(Literal::OK)) {} - testRootMethodError(Literal _literal) - : CommonAPI::Enumeration<int32_t>(static_cast<int32_t>(_literal)) {} - - inline bool validate() const { - switch (value_) { - case static_cast<int32_t>(Literal::OK): - case static_cast<int32_t>(Literal::NOTOK): - return true; - default: - return false; - } - } - - inline bool operator==(const testRootMethodError &_other) const { return (value_ == _other.value_); } - inline bool operator!=(const testRootMethodError &_other) const { return (value_ != _other.value_); } - inline bool operator<=(const testRootMethodError &_other) const { return (value_ <= _other.value_); } - inline bool operator>=(const testRootMethodError &_other) const { return (value_ >= _other.value_); } - inline bool operator<(const testRootMethodError &_other) const { return (value_ < _other.value_); } - inline bool operator>(const testRootMethodError &_other) const { return (value_ > _other.value_); } - - inline bool operator==(const Literal &_value) const { return (value_ == static_cast<int32_t>(_value)); } - inline bool operator!=(const Literal &_value) const { return (value_ != static_cast<int32_t>(_value)); } - inline bool operator<=(const Literal &_value) const { return (value_ <= static_cast<int32_t>(_value)); } - inline bool operator>=(const Literal &_value) const { return (value_ >= static_cast<int32_t>(_value)); } - inline bool operator<(const Literal &_value) const { return (value_ < static_cast<int32_t>(_value)); } - inline bool operator>(const Literal &_value) const { return (value_ > static_cast<int32_t>(_value)); } - }; -}; - -const char* RootInterface::getInterface() { - return ("commonapi.tests.managed.RootInterface"); -} - -CommonAPI::Version RootInterface::getInterfaceVersion() { - return CommonAPI::Version(1, 0); -} - - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1 - -namespace CommonAPI { -} - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_MANAGED_ROOT_INTERFACE_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/managed/RootInterfaceProxy.hpp b/src/test/src-gen/core/v1/commonapi/tests/managed/RootInterfaceProxy.hpp deleted file mode 100644 index 767ac1b..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/managed/RootInterfaceProxy.hpp +++ /dev/null @@ -1,168 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_MANAGED_Root_Interface_PROXY_HPP_ -#define V1_COMMONAPI_TESTS_MANAGED_Root_Interface_PROXY_HPP_ - -#include <v1/commonapi/tests/managed/RootInterfaceProxyBase.hpp> - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { -namespace managed { - -template <typename ... _AttributeExtensions> -class RootInterfaceProxy - : virtual public RootInterface, - virtual public RootInterfaceProxyBase, - virtual public _AttributeExtensions... { -public: - RootInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate); - ~RootInterfaceProxy(); - - typedef RootInterface InterfaceType; - - - - - /** - * Calls testRootMethod 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 testRootMethod(const int32_t &_inInt, const std::string &_inString, CommonAPI::CallStatus &_internalCallStatus, RootInterface::testRootMethodError &_error, int32_t &_outInt, std::string &_outString, const CommonAPI::CallInfo *_info = nullptr); - /** - * Calls testRootMethod 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> testRootMethodAsync(const int32_t &_inInt, const std::string &_inString, TestRootMethodAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr); - - virtual CommonAPI::ProxyManager& getProxyManagerLeafInterface(); - virtual CommonAPI::ProxyManager& getProxyManagerBranchInterface(); - - /** - * Returns the CommonAPI address of the remote partner this proxy communicates with. - */ - virtual const CommonAPI::Address &getAddress() 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<RootInterfaceProxyBase> delegate_; -}; - -typedef RootInterfaceProxy<> RootInterfaceProxyDefault; - - -// -// RootInterfaceProxy Implementation -// -template <typename ... _AttributeExtensions> -RootInterfaceProxy<_AttributeExtensions...>::RootInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate): - _AttributeExtensions(*(std::dynamic_pointer_cast<RootInterfaceProxyBase>(delegate)))..., - delegate_(std::dynamic_pointer_cast<RootInterfaceProxyBase>(delegate)) { -} - -template <typename ... _AttributeExtensions> -RootInterfaceProxy<_AttributeExtensions...>::~RootInterfaceProxy() { -} - -template <typename ... _AttributeExtensions> -void RootInterfaceProxy<_AttributeExtensions...>::testRootMethod(const int32_t &_inInt, const std::string &_inString, CommonAPI::CallStatus &_internalCallStatus, RootInterface::testRootMethodError &_error, int32_t &_outInt, std::string &_outString, const CommonAPI::CallInfo *_info) { - delegate_->testRootMethod(_inInt, _inString, _internalCallStatus, _error, _outInt, _outString, _info); -} - -template <typename ... _AttributeExtensions> -std::future<CommonAPI::CallStatus> RootInterfaceProxy<_AttributeExtensions...>::testRootMethodAsync(const int32_t &_inInt, const std::string &_inString, TestRootMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info) { - return delegate_->testRootMethodAsync(_inInt, _inString, _callback, _info); -} - -template <typename ... _AttributeExtensions> -const CommonAPI::Address &RootInterfaceProxy<_AttributeExtensions...>::getAddress() const { - return delegate_->getAddress(); -} - -template <typename ... _AttributeExtensions> -bool RootInterfaceProxy<_AttributeExtensions...>::isAvailable() const { - return delegate_->isAvailable(); -} - -template <typename ... _AttributeExtensions> -bool RootInterfaceProxy<_AttributeExtensions...>::isAvailableBlocking() const { - return delegate_->isAvailableBlocking(); -} - -template <typename ... _AttributeExtensions> -CommonAPI::ProxyStatusEvent& RootInterfaceProxy<_AttributeExtensions...>::getProxyStatusEvent() { - return delegate_->getProxyStatusEvent(); -} - -template <typename ... _AttributeExtensions> -CommonAPI::InterfaceVersionAttribute& RootInterfaceProxy<_AttributeExtensions...>::getInterfaceVersionAttribute() { - return delegate_->getInterfaceVersionAttribute(); -} - -template <typename ... _AttributeExtensions> -CommonAPI::ProxyManager& RootInterfaceProxy<_AttributeExtensions...>::getProxyManagerLeafInterface() { - return delegate_->getProxyManagerLeafInterface(); -} -template <typename ... _AttributeExtensions> -CommonAPI::ProxyManager& RootInterfaceProxy<_AttributeExtensions...>::getProxyManagerBranchInterface() { - return delegate_->getProxyManagerBranchInterface(); -} - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1 - - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_MANAGED_Root_Interface_PROXY_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/managed/RootInterfaceProxyBase.hpp b/src/test/src-gen/core/v1/commonapi/tests/managed/RootInterfaceProxyBase.hpp deleted file mode 100644 index 248235a..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/managed/RootInterfaceProxyBase.hpp +++ /dev/null @@ -1,60 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_MANAGED_Root_Interface_PROXY_BASE_HPP_ -#define V1_COMMONAPI_TESTS_MANAGED_Root_Interface_PROXY_BASE_HPP_ - -#include <v1/commonapi/tests/managed/RootInterface.hpp> - - -#include <v1/commonapi/tests/managed/BranchInterfaceStub.hpp> -#include <v1/commonapi/tests/managed/LeafInterfaceStub.hpp> - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <vector> - -#include <CommonAPI/ProxyManager.hpp> -#include <CommonAPI/Proxy.hpp> -#include <functional> -#include <future> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { -namespace managed { - -class RootInterfaceProxyBase - : virtual public CommonAPI::Proxy { -public: - - typedef std::function<void(const CommonAPI::CallStatus&, const RootInterface::testRootMethodError&, const int32_t&, const std::string&)> TestRootMethodAsyncCallback; - - - - virtual void testRootMethod(const int32_t &_inInt, const std::string &_inString, CommonAPI::CallStatus &_internalCallStatus, RootInterface::testRootMethodError &_error, int32_t &_outInt, std::string &_outString, const CommonAPI::CallInfo *_info = nullptr) = 0; - virtual std::future<CommonAPI::CallStatus> testRootMethodAsync(const int32_t &_inInt, const std::string &_inString, TestRootMethodAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr) = 0; - virtual CommonAPI::ProxyManager& getProxyManagerLeafInterface() = 0; - virtual CommonAPI::ProxyManager& getProxyManagerBranchInterface() = 0; -}; - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1 - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_MANAGED_Root_Interface_PROXY_BASE_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/managed/RootInterfaceStub.hpp b/src/test/src-gen/core/v1/commonapi/tests/managed/RootInterfaceStub.hpp deleted file mode 100644 index 0513590..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/managed/RootInterfaceStub.hpp +++ /dev/null @@ -1,124 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_MANAGED_Root_Interface_STUB_HPP_ -#define V1_COMMONAPI_TESTS_MANAGED_Root_Interface_STUB_HPP_ - -#include <functional> - - - -#include <v1/commonapi/tests/managed/BranchInterfaceStub.hpp> -#include <v1/commonapi/tests/managed/LeafInterfaceStub.hpp> - -#include <v1/commonapi/tests/managed/RootInterface.hpp> - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <vector> - -#include <CommonAPI/Stub.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { -namespace managed { - -/** - * Receives messages from remote and handles all dispatching of deserialized calls - * to a stub for the service RootInterface. 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 RootInterfaceStubAdapter - : public virtual CommonAPI::StubAdapter, - public virtual RootInterface { - public: - - - virtual bool registerManagedStubLeafInterface(std::shared_ptr<::v1::commonapi::tests::managed::LeafInterfaceStub>, const std::string&) = 0; - virtual bool deregisterManagedStubLeafInterface(const std::string&) = 0; - virtual std::set<std::string>& getLeafInterfaceInstances() = 0; - virtual bool registerManagedStubBranchInterface(std::shared_ptr<::v1::commonapi::tests::managed::BranchInterfaceStub>, const std::string&) = 0; - virtual bool deregisterManagedStubBranchInterface(const std::string&) = 0; - virtual std::set<std::string>& getBranchInterfaceInstances() = 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 RootInterface. - * 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 RootInterfaceStubRemoteEvent -{ -public: - virtual ~RootInterfaceStubRemoteEvent() { } - -}; - -/** - * Defines the interface that must be implemented by any class that should provide - * the service RootInterface 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 RootInterfaceStub - : public virtual CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent> -{ -public: - typedef std::function<void (RootInterface::testRootMethodError _error, int32_t _outInt, std::string _outString)>testRootMethodReply_t; - - virtual ~RootInterfaceStub() {} - 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 testRootMethod. - virtual void testRootMethod(const std::shared_ptr<CommonAPI::ClientId> _client, int32_t _inInt, std::string _inString, testRootMethodReply_t _reply) = 0; - - virtual bool registerManagedStubLeafInterface(std::shared_ptr<::v1::commonapi::tests::managed::LeafInterfaceStub>, const std::string&) = 0; - virtual bool deregisterManagedStubLeafInterface(const std::string&) = 0; - virtual std::set<std::string>& getLeafInterfaceInstances() = 0; - virtual bool registerManagedStubBranchInterface(std::shared_ptr<::v1::commonapi::tests::managed::BranchInterfaceStub>, const std::string&) = 0; - virtual bool deregisterManagedStubBranchInterface(const std::string&) = 0; - virtual std::set<std::string>& getBranchInterfaceInstances() = 0; - using CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::initStubAdapter; - typedef CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::StubAdapterType StubAdapterType; - typedef CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::RemoteEventHandlerType RemoteEventHandlerType; - typedef RootInterfaceStubRemoteEvent RemoteEventType; - typedef RootInterface StubInterface; -}; - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1 - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_MANAGED_Root_Interface_STUB_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/managed/RootInterfaceStubDefault.cpp b/src/test/src-gen/core/v1/commonapi/tests/managed/RootInterfaceStubDefault.cpp deleted file mode 100644 index 5c129f0..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/managed/RootInterfaceStubDefault.cpp +++ /dev/null @@ -1,134 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#include <v1/commonapi/tests/managed/RootInterfaceStubDefault.hpp> -#include <assert.h> - -namespace v1 { -namespace commonapi { -namespace tests { -namespace managed { - -RootInterfaceStubDefault::RootInterfaceStubDefault(): - remoteEventHandler_(this), - autoInstanceCounter_(0), - interfaceVersion_(RootInterface::getInterfaceVersion()) { -} - -const CommonAPI::Version& RootInterfaceStubDefault::getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> _client) { - (void)_client; - return interfaceVersion_; -} - -RootInterfaceStubRemoteEvent* RootInterfaceStubDefault::initStubAdapter(const std::shared_ptr<RootInterfaceStubAdapter> &_adapter) { - CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_ = _adapter; - return &remoteEventHandler_; -} - - -void RootInterfaceStubDefault::testRootMethod(const std::shared_ptr<CommonAPI::ClientId> _client, int32_t _inInt, std::string _inString, testRootMethodReply_t _reply) { - (void)_client; - (void) _inInt; - (void) _inString; - RootInterface::testRootMethodError error; - int32_t outInt = 0; - std::string outString = ""; - _reply(error, outInt, outString); -} - - - -bool RootInterfaceStubDefault::registerManagedStubLeafInterfaceAutoInstance(std::shared_ptr<::v1::commonapi::tests::managed::LeafInterfaceStub> _stub) { - autoInstanceCounter_++; - std::stringstream ss; - assert((CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_.lock()) !=NULL); - auto stubAdapter = CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_.lock(); - if (stubAdapter) { - ss << stubAdapter->getAddress().getInstance() << ".i" << autoInstanceCounter_; - std::string instance = ss.str(); - return stubAdapter->registerManagedStubLeafInterface(_stub, instance); - } else { - return false; - } -} -bool RootInterfaceStubDefault::registerManagedStubLeafInterface(std::shared_ptr<::v1::commonapi::tests::managed::LeafInterfaceStub> _stub, const std::string &_instance) { - assert((CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_.lock()) !=NULL); - auto stubAdapter = CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_.lock(); - if (stubAdapter) - return stubAdapter->registerManagedStubLeafInterface(_stub, _instance); - else - return false; -} -bool RootInterfaceStubDefault::deregisterManagedStubLeafInterface(const std::string &_instance) { - assert((CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_.lock()) !=NULL); - auto stubAdapter = CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_.lock(); - if (stubAdapter) - return stubAdapter->deregisterManagedStubLeafInterface(_instance); - else - return false; -} -std::set<std::string>& RootInterfaceStubDefault::getLeafInterfaceInstances() { - assert((CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_.lock()) !=NULL); - auto stubAdapter = CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_.lock(); - if (stubAdapter) { - return stubAdapter->getLeafInterfaceInstances(); - } else { - static std::set<std::string> emptySet = std::set<std::string>(); - return emptySet; - } -} -bool RootInterfaceStubDefault::registerManagedStubBranchInterfaceAutoInstance(std::shared_ptr<::v1::commonapi::tests::managed::BranchInterfaceStub> _stub) { - autoInstanceCounter_++; - std::stringstream ss; - assert((CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_.lock()) !=NULL); - auto stubAdapter = CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_.lock(); - if (stubAdapter) { - ss << stubAdapter->getAddress().getInstance() << ".i" << autoInstanceCounter_; - std::string instance = ss.str(); - return stubAdapter->registerManagedStubBranchInterface(_stub, instance); - } else { - return false; - } -} -bool RootInterfaceStubDefault::registerManagedStubBranchInterface(std::shared_ptr<::v1::commonapi::tests::managed::BranchInterfaceStub> _stub, const std::string &_instance) { - assert((CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_.lock()) !=NULL); - auto stubAdapter = CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_.lock(); - if (stubAdapter) - return stubAdapter->registerManagedStubBranchInterface(_stub, _instance); - else - return false; -} -bool RootInterfaceStubDefault::deregisterManagedStubBranchInterface(const std::string &_instance) { - assert((CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_.lock()) !=NULL); - auto stubAdapter = CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_.lock(); - if (stubAdapter) - return stubAdapter->deregisterManagedStubBranchInterface(_instance); - else - return false; -} -std::set<std::string>& RootInterfaceStubDefault::getBranchInterfaceInstances() { - assert((CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_.lock()) !=NULL); - auto stubAdapter = CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_.lock(); - if (stubAdapter) { - return stubAdapter->getBranchInterfaceInstances(); - } else { - static std::set<std::string> emptySet = std::set<std::string>(); - return emptySet; - } -} - -RootInterfaceStubDefault::RemoteEventHandler::RemoteEventHandler(RootInterfaceStubDefault *_defaultStub) - : - defaultStub_(_defaultStub) { -} - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1 diff --git a/src/test/src-gen/core/v1/commonapi/tests/managed/RootInterfaceStubDefault.hpp b/src/test/src-gen/core/v1/commonapi/tests/managed/RootInterfaceStubDefault.hpp deleted file mode 100644 index ba18f95..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/managed/RootInterfaceStubDefault.hpp +++ /dev/null @@ -1,80 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_MANAGED_Root_Interface_STUB_DEFAULT_HPP_ -#define V1_COMMONAPI_TESTS_MANAGED_Root_Interface_STUB_DEFAULT_HPP_ - - -#include <v1/commonapi/tests/managed/RootInterfaceStub.hpp> -#include <sstream> - -namespace v1 { -namespace commonapi { -namespace tests { -namespace managed { - -/** - * Provides a default implementation for RootInterfaceStubRemoteEvent and - * RootInterfaceStub. 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 RootInterfaceStubDefault - : public virtual RootInterfaceStub { -public: - RootInterfaceStubDefault(); - - RootInterfaceStubRemoteEvent* initStubAdapter(const std::shared_ptr<RootInterfaceStubAdapter> &_adapter); - - const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> _client); - - - virtual void testRootMethod(const std::shared_ptr<CommonAPI::ClientId> _client, int32_t _inInt, std::string _inString, testRootMethodReply_t _reply); - - - bool registerManagedStubLeafInterfaceAutoInstance(std::shared_ptr<::v1::commonapi::tests::managed::LeafInterfaceStub>); - bool registerManagedStubLeafInterface(std::shared_ptr<::v1::commonapi::tests::managed::LeafInterfaceStub>, const std::string&); - bool deregisterManagedStubLeafInterface(const std::string&); - std::set<std::string>& getLeafInterfaceInstances(); - bool registerManagedStubBranchInterfaceAutoInstance(std::shared_ptr<::v1::commonapi::tests::managed::BranchInterfaceStub>); - bool registerManagedStubBranchInterface(std::shared_ptr<::v1::commonapi::tests::managed::BranchInterfaceStub>, const std::string&); - bool deregisterManagedStubBranchInterface(const std::string&); - std::set<std::string>& getBranchInterfaceInstances(); - -protected: - class RemoteEventHandler: public virtual RootInterfaceStubRemoteEvent { - public: - RemoteEventHandler(RootInterfaceStubDefault *_defaultStub); - - - private: - RootInterfaceStubDefault *defaultStub_; - }; -private: - RootInterfaceStubDefault::RemoteEventHandler remoteEventHandler_; - uint32_t autoInstanceCounter_; - - - CommonAPI::Version interfaceVersion_; -}; - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1 - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_MANAGED_Root_Interface_STUB_DEFAULT diff --git a/src/test/src-gen/core/v1/commonapi/tests/managed/SecondRoot.hpp b/src/test/src-gen/core/v1/commonapi/tests/managed/SecondRoot.hpp deleted file mode 100644 index 360a1ea..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/managed/SecondRoot.hpp +++ /dev/null @@ -1,59 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_MANAGED_SECOND_ROOT_HPP_ -#define V1_COMMONAPI_TESTS_MANAGED_SECOND_ROOT_HPP_ - - -#include <set> - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <CommonAPI/Types.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { -namespace managed { - -class SecondRoot { -public: - virtual ~SecondRoot() { } - - static inline const char* getInterface(); - static inline CommonAPI::Version getInterfaceVersion(); -}; - -const char* SecondRoot::getInterface() { - return ("commonapi.tests.managed.SecondRoot"); -} - -CommonAPI::Version SecondRoot::getInterfaceVersion() { - return CommonAPI::Version(1, 0); -} - - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1 - -namespace CommonAPI { -} - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_MANAGED_SECOND_ROOT_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/managed/SecondRootProxy.hpp b/src/test/src-gen/core/v1/commonapi/tests/managed/SecondRootProxy.hpp deleted file mode 100644 index 0bcf226..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/managed/SecondRootProxy.hpp +++ /dev/null @@ -1,133 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_MANAGED_Second_Root_PROXY_HPP_ -#define V1_COMMONAPI_TESTS_MANAGED_Second_Root_PROXY_HPP_ - -#include <v1/commonapi/tests/managed/SecondRootProxyBase.hpp> - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { -namespace managed { - -template <typename ... _AttributeExtensions> -class SecondRootProxy - : virtual public SecondRoot, - virtual public SecondRootProxyBase, - virtual public _AttributeExtensions... { -public: - SecondRootProxy(std::shared_ptr<CommonAPI::Proxy> delegate); - ~SecondRootProxy(); - - typedef SecondRoot InterfaceType; - - - - - - virtual CommonAPI::ProxyManager& getProxyManagerLeafInterface(); - - /** - * Returns the CommonAPI address of the remote partner this proxy communicates with. - */ - virtual const CommonAPI::Address &getAddress() 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<SecondRootProxyBase> delegate_; -}; - -typedef SecondRootProxy<> SecondRootProxyDefault; - - -// -// SecondRootProxy Implementation -// -template <typename ... _AttributeExtensions> -SecondRootProxy<_AttributeExtensions...>::SecondRootProxy(std::shared_ptr<CommonAPI::Proxy> delegate): - _AttributeExtensions(*(std::dynamic_pointer_cast<SecondRootProxyBase>(delegate)))..., - delegate_(std::dynamic_pointer_cast<SecondRootProxyBase>(delegate)) { -} - -template <typename ... _AttributeExtensions> -SecondRootProxy<_AttributeExtensions...>::~SecondRootProxy() { -} - - -template <typename ... _AttributeExtensions> -const CommonAPI::Address &SecondRootProxy<_AttributeExtensions...>::getAddress() const { - return delegate_->getAddress(); -} - -template <typename ... _AttributeExtensions> -bool SecondRootProxy<_AttributeExtensions...>::isAvailable() const { - return delegate_->isAvailable(); -} - -template <typename ... _AttributeExtensions> -bool SecondRootProxy<_AttributeExtensions...>::isAvailableBlocking() const { - return delegate_->isAvailableBlocking(); -} - -template <typename ... _AttributeExtensions> -CommonAPI::ProxyStatusEvent& SecondRootProxy<_AttributeExtensions...>::getProxyStatusEvent() { - return delegate_->getProxyStatusEvent(); -} - -template <typename ... _AttributeExtensions> -CommonAPI::InterfaceVersionAttribute& SecondRootProxy<_AttributeExtensions...>::getInterfaceVersionAttribute() { - return delegate_->getInterfaceVersionAttribute(); -} - -template <typename ... _AttributeExtensions> -CommonAPI::ProxyManager& SecondRootProxy<_AttributeExtensions...>::getProxyManagerLeafInterface() { - return delegate_->getProxyManagerLeafInterface(); -} - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1 - - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_MANAGED_Second_Root_PROXY_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/managed/SecondRootProxyBase.hpp b/src/test/src-gen/core/v1/commonapi/tests/managed/SecondRootProxyBase.hpp deleted file mode 100644 index 41a4cc2..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/managed/SecondRootProxyBase.hpp +++ /dev/null @@ -1,52 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_MANAGED_Second_Root_PROXY_BASE_HPP_ -#define V1_COMMONAPI_TESTS_MANAGED_Second_Root_PROXY_BASE_HPP_ - -#include <v1/commonapi/tests/managed/SecondRoot.hpp> - - -#include <v1/commonapi/tests/managed/LeafInterfaceStub.hpp> - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - - -#include <CommonAPI/ProxyManager.hpp> -#include <CommonAPI/Proxy.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { -namespace managed { - -class SecondRootProxyBase - : virtual public CommonAPI::Proxy { -public: - - - - - virtual CommonAPI::ProxyManager& getProxyManagerLeafInterface() = 0; -}; - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1 - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_MANAGED_Second_Root_PROXY_BASE_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/managed/SecondRootStub.hpp b/src/test/src-gen/core/v1/commonapi/tests/managed/SecondRootStub.hpp deleted file mode 100644 index ccdddfd..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/managed/SecondRootStub.hpp +++ /dev/null @@ -1,113 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_MANAGED_Second_Root_STUB_HPP_ -#define V1_COMMONAPI_TESTS_MANAGED_Second_Root_STUB_HPP_ - -#include <functional> - - - -#include <v1/commonapi/tests/managed/LeafInterfaceStub.hpp> - -#include <v1/commonapi/tests/managed/SecondRoot.hpp> - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - - -#include <CommonAPI/Stub.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1 { -namespace commonapi { -namespace tests { -namespace managed { - -/** - * Receives messages from remote and handles all dispatching of deserialized calls - * to a stub for the service SecondRoot. 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 SecondRootStubAdapter - : public virtual CommonAPI::StubAdapter, - public virtual SecondRoot { - public: - - - virtual bool registerManagedStubLeafInterface(std::shared_ptr<::v1::commonapi::tests::managed::LeafInterfaceStub>, const std::string&) = 0; - virtual bool deregisterManagedStubLeafInterface(const std::string&) = 0; - virtual std::set<std::string>& getLeafInterfaceInstances() = 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 SecondRoot. - * 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 SecondRootStubRemoteEvent -{ -public: - virtual ~SecondRootStubRemoteEvent() { } - -}; - -/** - * Defines the interface that must be implemented by any class that should provide - * the service SecondRoot 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 SecondRootStub - : public virtual CommonAPI::Stub<SecondRootStubAdapter, SecondRootStubRemoteEvent> -{ -public: - - virtual ~SecondRootStub() {} - virtual const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId) = 0; - - - - virtual bool registerManagedStubLeafInterface(std::shared_ptr<::v1::commonapi::tests::managed::LeafInterfaceStub>, const std::string&) = 0; - virtual bool deregisterManagedStubLeafInterface(const std::string&) = 0; - virtual std::set<std::string>& getLeafInterfaceInstances() = 0; - using CommonAPI::Stub<SecondRootStubAdapter, SecondRootStubRemoteEvent>::initStubAdapter; - typedef CommonAPI::Stub<SecondRootStubAdapter, SecondRootStubRemoteEvent>::StubAdapterType StubAdapterType; - typedef CommonAPI::Stub<SecondRootStubAdapter, SecondRootStubRemoteEvent>::RemoteEventHandlerType RemoteEventHandlerType; - typedef SecondRootStubRemoteEvent RemoteEventType; - typedef SecondRoot StubInterface; -}; - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1 - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_MANAGED_Second_Root_STUB_HPP_ diff --git a/src/test/src-gen/core/v1/commonapi/tests/managed/SecondRootStubDefault.cpp b/src/test/src-gen/core/v1/commonapi/tests/managed/SecondRootStubDefault.cpp deleted file mode 100644 index af9be9f..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/managed/SecondRootStubDefault.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#include <v1/commonapi/tests/managed/SecondRootStubDefault.hpp> -#include <assert.h> - -namespace v1 { -namespace commonapi { -namespace tests { -namespace managed { - -SecondRootStubDefault::SecondRootStubDefault(): - remoteEventHandler_(this), - autoInstanceCounter_(0), - interfaceVersion_(SecondRoot::getInterfaceVersion()) { -} - -const CommonAPI::Version& SecondRootStubDefault::getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> _client) { - (void)_client; - return interfaceVersion_; -} - -SecondRootStubRemoteEvent* SecondRootStubDefault::initStubAdapter(const std::shared_ptr<SecondRootStubAdapter> &_adapter) { - CommonAPI::Stub<SecondRootStubAdapter, SecondRootStubRemoteEvent>::stubAdapter_ = _adapter; - return &remoteEventHandler_; -} - - - - -bool SecondRootStubDefault::registerManagedStubLeafInterfaceAutoInstance(std::shared_ptr<::v1::commonapi::tests::managed::LeafInterfaceStub> _stub) { - autoInstanceCounter_++; - std::stringstream ss; - assert((CommonAPI::Stub<SecondRootStubAdapter, SecondRootStubRemoteEvent>::stubAdapter_.lock()) !=NULL); - auto stubAdapter = CommonAPI::Stub<SecondRootStubAdapter, SecondRootStubRemoteEvent>::stubAdapter_.lock(); - if (stubAdapter) { - ss << stubAdapter->getAddress().getInstance() << ".i" << autoInstanceCounter_; - std::string instance = ss.str(); - return stubAdapter->registerManagedStubLeafInterface(_stub, instance); - } else { - return false; - } -} -bool SecondRootStubDefault::registerManagedStubLeafInterface(std::shared_ptr<::v1::commonapi::tests::managed::LeafInterfaceStub> _stub, const std::string &_instance) { - assert((CommonAPI::Stub<SecondRootStubAdapter, SecondRootStubRemoteEvent>::stubAdapter_.lock()) !=NULL); - auto stubAdapter = CommonAPI::Stub<SecondRootStubAdapter, SecondRootStubRemoteEvent>::stubAdapter_.lock(); - if (stubAdapter) - return stubAdapter->registerManagedStubLeafInterface(_stub, _instance); - else - return false; -} -bool SecondRootStubDefault::deregisterManagedStubLeafInterface(const std::string &_instance) { - assert((CommonAPI::Stub<SecondRootStubAdapter, SecondRootStubRemoteEvent>::stubAdapter_.lock()) !=NULL); - auto stubAdapter = CommonAPI::Stub<SecondRootStubAdapter, SecondRootStubRemoteEvent>::stubAdapter_.lock(); - if (stubAdapter) - return stubAdapter->deregisterManagedStubLeafInterface(_instance); - else - return false; -} -std::set<std::string>& SecondRootStubDefault::getLeafInterfaceInstances() { - assert((CommonAPI::Stub<SecondRootStubAdapter, SecondRootStubRemoteEvent>::stubAdapter_.lock()) !=NULL); - auto stubAdapter = CommonAPI::Stub<SecondRootStubAdapter, SecondRootStubRemoteEvent>::stubAdapter_.lock(); - if (stubAdapter) { - return stubAdapter->getLeafInterfaceInstances(); - } else { - static std::set<std::string> emptySet = std::set<std::string>(); - return emptySet; - } -} - -SecondRootStubDefault::RemoteEventHandler::RemoteEventHandler(SecondRootStubDefault *_defaultStub) - : - defaultStub_(_defaultStub) { -} - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1 diff --git a/src/test/src-gen/core/v1/commonapi/tests/managed/SecondRootStubDefault.hpp b/src/test/src-gen/core/v1/commonapi/tests/managed/SecondRootStubDefault.hpp deleted file mode 100644 index dd7bb14..0000000 --- a/src/test/src-gen/core/v1/commonapi/tests/managed/SecondRootStubDefault.hpp +++ /dev/null @@ -1,75 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.5.v201512091035. -* Used org.franca.core 0.9.1.201412191134. -* -* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -* If a copy of the MPL was not distributed with this file, You can obtain one at -* http://mozilla.org/MPL/2.0/. -*/ -#ifndef V1_COMMONAPI_TESTS_MANAGED_Second_Root_STUB_DEFAULT_HPP_ -#define V1_COMMONAPI_TESTS_MANAGED_Second_Root_STUB_DEFAULT_HPP_ - - -#include <v1/commonapi/tests/managed/SecondRootStub.hpp> -#include <sstream> - -namespace v1 { -namespace commonapi { -namespace tests { -namespace managed { - -/** - * Provides a default implementation for SecondRootStubRemoteEvent and - * SecondRootStub. 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 SecondRootStubDefault - : public virtual SecondRootStub { -public: - SecondRootStubDefault(); - - SecondRootStubRemoteEvent* initStubAdapter(const std::shared_ptr<SecondRootStubAdapter> &_adapter); - - const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> _client); - - - - - bool registerManagedStubLeafInterfaceAutoInstance(std::shared_ptr<::v1::commonapi::tests::managed::LeafInterfaceStub>); - bool registerManagedStubLeafInterface(std::shared_ptr<::v1::commonapi::tests::managed::LeafInterfaceStub>, const std::string&); - bool deregisterManagedStubLeafInterface(const std::string&); - std::set<std::string>& getLeafInterfaceInstances(); - -protected: - class RemoteEventHandler: public virtual SecondRootStubRemoteEvent { - public: - RemoteEventHandler(SecondRootStubDefault *_defaultStub); - - - private: - SecondRootStubDefault *defaultStub_; - }; -private: - SecondRootStubDefault::RemoteEventHandler remoteEventHandler_; - uint32_t autoInstanceCounter_; - - - CommonAPI::Version interfaceVersion_; -}; - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1 - - -// Compatibility -namespace v1_0 = v1; - -#endif // V1_COMMONAPI_TESTS_MANAGED_Second_Root_STUB_DEFAULT |