diff options
author | Dirk Huss <dirk_huss@mentor.com> | 2015-11-25 14:59:52 +0100 |
---|---|---|
committer | Dirk Huss <dirk_huss@mentor.com> | 2015-11-25 14:59:52 +0100 |
commit | faea5f299525500093843da72215d279c3eb483d (patch) | |
tree | 559a22a4f9844a4f8d04d8e39f37d04da797d1a0 /src/test/src-gen/core/v1_0/commonapi/tests/managed | |
parent | db96446ece67ba1f495811e29838e8c7bc7984ff (diff) | |
download | genivi-common-api-dbus-runtime-faea5f299525500093843da72215d279c3eb483d.tar.gz |
CommonAPI-D-Bus 3.1.43.1.4
Diffstat (limited to 'src/test/src-gen/core/v1_0/commonapi/tests/managed')
27 files changed, 0 insertions, 2153 deletions
diff --git a/src/test/src-gen/core/v1_0/commonapi/tests/managed/BranchInterface.cpp b/src/test/src-gen/core/v1_0/commonapi/tests/managed/BranchInterface.cpp deleted file mode 100644 index f0c9365..0000000 --- a/src/test/src-gen/core/v1_0/commonapi/tests/managed/BranchInterface.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.2.v201507021046. -* 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 "BranchInterface.hpp" - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { - - - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1_0 diff --git a/src/test/src-gen/core/v1_0/commonapi/tests/managed/BranchInterface.hpp b/src/test/src-gen/core/v1_0/commonapi/tests/managed/BranchInterface.hpp deleted file mode 100644 index 2070910..0000000 --- a/src/test/src-gen/core/v1_0/commonapi/tests/managed/BranchInterface.hpp +++ /dev/null @@ -1,81 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.2.v201507021046. -* 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 COMMONAPI_TESTS_MANAGED_BRANCH_INTERFACE_HPP_ -#define 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_0 { -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() = default; - testBranchMethodError(const Literal &_value) - : CommonAPI::Enumeration<int32_t>(static_cast<int32_t>(_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 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_0 - -namespace CommonAPI { -} - -#endif // COMMONAPI_TESTS_MANAGED_BRANCH_INTERFACE_HPP_ diff --git a/src/test/src-gen/core/v1_0/commonapi/tests/managed/BranchInterfaceProxy.hpp b/src/test/src-gen/core/v1_0/commonapi/tests/managed/BranchInterfaceProxy.hpp deleted file mode 100644 index bff2547..0000000 --- a/src/test/src-gen/core/v1_0/commonapi/tests/managed/BranchInterfaceProxy.hpp +++ /dev/null @@ -1,154 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.2.v201507021046. -* 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 COMMONAPI_TESTS_MANAGED_Branch_Interface_PROXY_HPP_ -#define COMMONAPI_TESTS_MANAGED_Branch_Interface_PROXY_HPP_ - -#include <v1_0/commonapi/tests/managed/BranchInterfaceProxyBase.hpp> - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { - -template <typename ... _AttributeExtensions> -class BranchInterfaceProxy - : virtual public BranchInterface, - virtual public BranchInterfaceProxyBase, - 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, 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_0 - - -#endif // COMMONAPI_TESTS_MANAGED_Branch_Interface_PROXY_HPP_ diff --git a/src/test/src-gen/core/v1_0/commonapi/tests/managed/BranchInterfaceProxyBase.hpp b/src/test/src-gen/core/v1_0/commonapi/tests/managed/BranchInterfaceProxyBase.hpp deleted file mode 100644 index 4296bca..0000000 --- a/src/test/src-gen/core/v1_0/commonapi/tests/managed/BranchInterfaceProxyBase.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.2.v201507021046. -* 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 COMMONAPI_TESTS_MANAGED_Branch_Interface_PROXY_BASE_HPP_ -#define COMMONAPI_TESTS_MANAGED_Branch_Interface_PROXY_BASE_HPP_ - -#include <v1_0/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_0 { -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, const CommonAPI::CallInfo *_info = nullptr) = 0; -}; - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1_0 - -#endif // COMMONAPI_TESTS_MANAGED_Branch_Interface_PROXY_BASE_HPP_ diff --git a/src/test/src-gen/core/v1_0/commonapi/tests/managed/BranchInterfaceStub.hpp b/src/test/src-gen/core/v1_0/commonapi/tests/managed/BranchInterfaceStub.hpp deleted file mode 100644 index 9b7a01d..0000000 --- a/src/test/src-gen/core/v1_0/commonapi/tests/managed/BranchInterfaceStub.hpp +++ /dev/null @@ -1,106 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.2.v201507021046. -* 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 COMMONAPI_TESTS_MANAGED_Branch_Interface_STUB_HPP_ -#define COMMONAPI_TESTS_MANAGED_Branch_Interface_STUB_HPP_ - -#include <functional> - - - - -#include <v1_0/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_0 { -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 - : virtual public CommonAPI::StubAdapter, - public 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_0 - -#endif // COMMONAPI_TESTS_MANAGED_Branch_Interface_STUB_HPP_ diff --git a/src/test/src-gen/core/v1_0/commonapi/tests/managed/BranchInterfaceStubDefault.cpp b/src/test/src-gen/core/v1_0/commonapi/tests/managed/BranchInterfaceStubDefault.cpp deleted file mode 100644 index 10b02a7..0000000 --- a/src/test/src-gen/core/v1_0/commonapi/tests/managed/BranchInterfaceStubDefault.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.2.v201507021046. -* 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_0/commonapi/tests/managed/BranchInterfaceStubDefault.hpp> -#include <assert.h> - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { - -BranchInterfaceStubDefault::BranchInterfaceStubDefault(): - remoteEventHandler_(this), - interfaceVersion_(BranchInterface::getInterfaceVersion()) { -} - -const CommonAPI::Version& BranchInterfaceStubDefault::getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> _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) { - 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_0 diff --git a/src/test/src-gen/core/v1_0/commonapi/tests/managed/BranchInterfaceStubDefault.hpp b/src/test/src-gen/core/v1_0/commonapi/tests/managed/BranchInterfaceStubDefault.hpp deleted file mode 100644 index 3cdd147..0000000 --- a/src/test/src-gen/core/v1_0/commonapi/tests/managed/BranchInterfaceStubDefault.hpp +++ /dev/null @@ -1,67 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.2.v201507021046. -* 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 COMMONAPI_TESTS_MANAGED_Branch_Interface_STUB_DEFAULT_HPP_ -#define COMMONAPI_TESTS_MANAGED_Branch_Interface_STUB_DEFAULT_HPP_ - - -#include <v1_0/commonapi/tests/managed/BranchInterfaceStub.hpp> -#include <sstream> - -namespace v1_0 { -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_0 - -#endif // COMMONAPI_TESTS_MANAGED_Branch_Interface_STUB_DEFAULT diff --git a/src/test/src-gen/core/v1_0/commonapi/tests/managed/LeafInterface.cpp b/src/test/src-gen/core/v1_0/commonapi/tests/managed/LeafInterface.cpp deleted file mode 100644 index e2f172b..0000000 --- a/src/test/src-gen/core/v1_0/commonapi/tests/managed/LeafInterface.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.2.v201507021046. -* 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 "LeafInterface.hpp" - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { - - - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1_0 diff --git a/src/test/src-gen/core/v1_0/commonapi/tests/managed/LeafInterface.hpp b/src/test/src-gen/core/v1_0/commonapi/tests/managed/LeafInterface.hpp deleted file mode 100644 index ac7e377..0000000 --- a/src/test/src-gen/core/v1_0/commonapi/tests/managed/LeafInterface.hpp +++ /dev/null @@ -1,81 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.2.v201507021046. -* 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 COMMONAPI_TESTS_MANAGED_LEAF_INTERFACE_HPP_ -#define 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_0 { -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() = default; - testLeafMethodError(const Literal &_value) - : CommonAPI::Enumeration<int32_t>(static_cast<int32_t>(_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 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_0 - -namespace CommonAPI { -} - -#endif // COMMONAPI_TESTS_MANAGED_LEAF_INTERFACE_HPP_ diff --git a/src/test/src-gen/core/v1_0/commonapi/tests/managed/LeafInterfaceProxy.hpp b/src/test/src-gen/core/v1_0/commonapi/tests/managed/LeafInterfaceProxy.hpp deleted file mode 100644 index a0382f4..0000000 --- a/src/test/src-gen/core/v1_0/commonapi/tests/managed/LeafInterfaceProxy.hpp +++ /dev/null @@ -1,154 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.2.v201507021046. -* 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 COMMONAPI_TESTS_MANAGED_Leaf_Interface_PROXY_HPP_ -#define COMMONAPI_TESTS_MANAGED_Leaf_Interface_PROXY_HPP_ - -#include <v1_0/commonapi/tests/managed/LeafInterfaceProxyBase.hpp> - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { - -template <typename ... _AttributeExtensions> -class LeafInterfaceProxy - : virtual public LeafInterface, - virtual public LeafInterfaceProxyBase, - 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, 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_0 - - -#endif // COMMONAPI_TESTS_MANAGED_Leaf_Interface_PROXY_HPP_ diff --git a/src/test/src-gen/core/v1_0/commonapi/tests/managed/LeafInterfaceProxyBase.hpp b/src/test/src-gen/core/v1_0/commonapi/tests/managed/LeafInterfaceProxyBase.hpp deleted file mode 100644 index f00bd30..0000000 --- a/src/test/src-gen/core/v1_0/commonapi/tests/managed/LeafInterfaceProxyBase.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.2.v201507021046. -* 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 COMMONAPI_TESTS_MANAGED_Leaf_Interface_PROXY_BASE_HPP_ -#define COMMONAPI_TESTS_MANAGED_Leaf_Interface_PROXY_BASE_HPP_ - -#include <v1_0/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_0 { -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, const CommonAPI::CallInfo *_info = nullptr) = 0; -}; - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1_0 - -#endif // COMMONAPI_TESTS_MANAGED_Leaf_Interface_PROXY_BASE_HPP_ diff --git a/src/test/src-gen/core/v1_0/commonapi/tests/managed/LeafInterfaceStub.hpp b/src/test/src-gen/core/v1_0/commonapi/tests/managed/LeafInterfaceStub.hpp deleted file mode 100644 index 62e2a0a..0000000 --- a/src/test/src-gen/core/v1_0/commonapi/tests/managed/LeafInterfaceStub.hpp +++ /dev/null @@ -1,106 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.2.v201507021046. -* 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 COMMONAPI_TESTS_MANAGED_Leaf_Interface_STUB_HPP_ -#define COMMONAPI_TESTS_MANAGED_Leaf_Interface_STUB_HPP_ - -#include <functional> - - - - -#include <v1_0/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_0 { -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 - : virtual public CommonAPI::StubAdapter, - public 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_0 - -#endif // COMMONAPI_TESTS_MANAGED_Leaf_Interface_STUB_HPP_ diff --git a/src/test/src-gen/core/v1_0/commonapi/tests/managed/LeafInterfaceStubDefault.cpp b/src/test/src-gen/core/v1_0/commonapi/tests/managed/LeafInterfaceStubDefault.cpp deleted file mode 100644 index 89bad18..0000000 --- a/src/test/src-gen/core/v1_0/commonapi/tests/managed/LeafInterfaceStubDefault.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.2.v201507021046. -* 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_0/commonapi/tests/managed/LeafInterfaceStubDefault.hpp> -#include <assert.h> - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { - -LeafInterfaceStubDefault::LeafInterfaceStubDefault(): - remoteEventHandler_(this), - interfaceVersion_(LeafInterface::getInterfaceVersion()) { -} - -const CommonAPI::Version& LeafInterfaceStubDefault::getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> _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) { - 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_0 diff --git a/src/test/src-gen/core/v1_0/commonapi/tests/managed/LeafInterfaceStubDefault.hpp b/src/test/src-gen/core/v1_0/commonapi/tests/managed/LeafInterfaceStubDefault.hpp deleted file mode 100644 index 9d9dd2b..0000000 --- a/src/test/src-gen/core/v1_0/commonapi/tests/managed/LeafInterfaceStubDefault.hpp +++ /dev/null @@ -1,67 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.2.v201507021046. -* 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 COMMONAPI_TESTS_MANAGED_Leaf_Interface_STUB_DEFAULT_HPP_ -#define COMMONAPI_TESTS_MANAGED_Leaf_Interface_STUB_DEFAULT_HPP_ - - -#include <v1_0/commonapi/tests/managed/LeafInterfaceStub.hpp> -#include <sstream> - -namespace v1_0 { -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_0 - -#endif // COMMONAPI_TESTS_MANAGED_Leaf_Interface_STUB_DEFAULT diff --git a/src/test/src-gen/core/v1_0/commonapi/tests/managed/RootInterface.cpp b/src/test/src-gen/core/v1_0/commonapi/tests/managed/RootInterface.cpp deleted file mode 100644 index 42e6cea..0000000 --- a/src/test/src-gen/core/v1_0/commonapi/tests/managed/RootInterface.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.2.v201507021046. -* 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 "RootInterface.hpp" - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { - - - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1_0 diff --git a/src/test/src-gen/core/v1_0/commonapi/tests/managed/RootInterface.hpp b/src/test/src-gen/core/v1_0/commonapi/tests/managed/RootInterface.hpp deleted file mode 100644 index 72ab4f2..0000000 --- a/src/test/src-gen/core/v1_0/commonapi/tests/managed/RootInterface.hpp +++ /dev/null @@ -1,82 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.2.v201507021046. -* 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 COMMONAPI_TESTS_MANAGED_ROOT_INTERFACE_HPP_ -#define 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_0 { -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() = default; - testRootMethodError(const Literal &_value) - : CommonAPI::Enumeration<int32_t>(static_cast<int32_t>(_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 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_0 - -namespace CommonAPI { -} - -#endif // COMMONAPI_TESTS_MANAGED_ROOT_INTERFACE_HPP_ diff --git a/src/test/src-gen/core/v1_0/commonapi/tests/managed/RootInterfaceProxy.hpp b/src/test/src-gen/core/v1_0/commonapi/tests/managed/RootInterfaceProxy.hpp deleted file mode 100644 index 04e4002..0000000 --- a/src/test/src-gen/core/v1_0/commonapi/tests/managed/RootInterfaceProxy.hpp +++ /dev/null @@ -1,164 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.2.v201507021046. -* 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 COMMONAPI_TESTS_MANAGED_Root_Interface_PROXY_HPP_ -#define COMMONAPI_TESTS_MANAGED_Root_Interface_PROXY_HPP_ - -#include <v1_0/commonapi/tests/managed/RootInterfaceProxyBase.hpp> - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { - -template <typename ... _AttributeExtensions> -class RootInterfaceProxy - : virtual public RootInterface, - virtual public RootInterfaceProxyBase, - 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, 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_0 - - -#endif // COMMONAPI_TESTS_MANAGED_Root_Interface_PROXY_HPP_ diff --git a/src/test/src-gen/core/v1_0/commonapi/tests/managed/RootInterfaceProxyBase.hpp b/src/test/src-gen/core/v1_0/commonapi/tests/managed/RootInterfaceProxyBase.hpp deleted file mode 100644 index 60d512c..0000000 --- a/src/test/src-gen/core/v1_0/commonapi/tests/managed/RootInterfaceProxyBase.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.2.v201507021046. -* 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 COMMONAPI_TESTS_MANAGED_Root_Interface_PROXY_BASE_HPP_ -#define COMMONAPI_TESTS_MANAGED_Root_Interface_PROXY_BASE_HPP_ - -#include <v1_0/commonapi/tests/managed/RootInterface.hpp> - - -#include <v1_0/commonapi/tests/managed/BranchInterfaceStub.hpp> -#include <v1_0/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_0 { -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, const CommonAPI::CallInfo *_info = nullptr) = 0; - virtual CommonAPI::ProxyManager& getProxyManagerLeafInterface() = 0; - virtual CommonAPI::ProxyManager& getProxyManagerBranchInterface() = 0; -}; - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1_0 - -#endif // COMMONAPI_TESTS_MANAGED_Root_Interface_PROXY_BASE_HPP_ diff --git a/src/test/src-gen/core/v1_0/commonapi/tests/managed/RootInterfaceStub.hpp b/src/test/src-gen/core/v1_0/commonapi/tests/managed/RootInterfaceStub.hpp deleted file mode 100644 index f78527e..0000000 --- a/src/test/src-gen/core/v1_0/commonapi/tests/managed/RootInterfaceStub.hpp +++ /dev/null @@ -1,120 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.2.v201507021046. -* 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 COMMONAPI_TESTS_MANAGED_Root_Interface_STUB_HPP_ -#define COMMONAPI_TESTS_MANAGED_Root_Interface_STUB_HPP_ - -#include <functional> - - - -#include <v1_0/commonapi/tests/managed/BranchInterfaceStub.hpp> -#include <v1_0/commonapi/tests/managed/LeafInterfaceStub.hpp> - -#include <v1_0/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_0 { -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 - : virtual public CommonAPI::StubAdapter, - public RootInterface { - public: - - - virtual bool registerManagedStubLeafInterface(std::shared_ptr<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<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<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<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_0 - -#endif // COMMONAPI_TESTS_MANAGED_Root_Interface_STUB_HPP_ diff --git a/src/test/src-gen/core/v1_0/commonapi/tests/managed/RootInterfaceStubDefault.cpp b/src/test/src-gen/core/v1_0/commonapi/tests/managed/RootInterfaceStubDefault.cpp deleted file mode 100644 index 9fc6c40..0000000 --- a/src/test/src-gen/core/v1_0/commonapi/tests/managed/RootInterfaceStubDefault.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.2.v201507021046. -* 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_0/commonapi/tests/managed/RootInterfaceStubDefault.hpp> -#include <assert.h> - -namespace v1_0 { -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) { - 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) { - RootInterface::testRootMethodError error; - int32_t outInt = 0; - std::string outString = ""; - _reply(error, outInt, outString); -} - - - -bool RootInterfaceStubDefault::registerManagedStubLeafInterfaceAutoInstance(std::shared_ptr<LeafInterfaceStub> _stub) { - autoInstanceCounter_++; - std::stringstream ss; - ss << CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_->getAddress().getInstance() << ".i" << autoInstanceCounter_; - std::string instance = ss.str(); - assert((CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_) !=NULL); - return CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_->registerManagedStubLeafInterface(_stub, instance); -} -bool RootInterfaceStubDefault::registerManagedStubLeafInterface(std::shared_ptr<LeafInterfaceStub> _stub, const std::string &_instance) { - assert((CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_) !=NULL); - return CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_->registerManagedStubLeafInterface(_stub, _instance); -} -bool RootInterfaceStubDefault::deregisterManagedStubLeafInterface(const std::string &_instance) { - assert((CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_) !=NULL); - return CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_->deregisterManagedStubLeafInterface(_instance); -} -std::set<std::string>& RootInterfaceStubDefault::getLeafInterfaceInstances() { - assert((CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_) !=NULL); - return CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_->getLeafInterfaceInstances(); -} -bool RootInterfaceStubDefault::registerManagedStubBranchInterfaceAutoInstance(std::shared_ptr<BranchInterfaceStub> _stub) { - autoInstanceCounter_++; - std::stringstream ss; - ss << CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_->getAddress().getInstance() << ".i" << autoInstanceCounter_; - std::string instance = ss.str(); - assert((CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_) !=NULL); - return CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_->registerManagedStubBranchInterface(_stub, instance); -} -bool RootInterfaceStubDefault::registerManagedStubBranchInterface(std::shared_ptr<BranchInterfaceStub> _stub, const std::string &_instance) { - assert((CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_) !=NULL); - return CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_->registerManagedStubBranchInterface(_stub, _instance); -} -bool RootInterfaceStubDefault::deregisterManagedStubBranchInterface(const std::string &_instance) { - assert((CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_) !=NULL); - return CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_->deregisterManagedStubBranchInterface(_instance); -} -std::set<std::string>& RootInterfaceStubDefault::getBranchInterfaceInstances() { - assert((CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_) !=NULL); - return CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_->getBranchInterfaceInstances(); -} - -RootInterfaceStubDefault::RemoteEventHandler::RemoteEventHandler(RootInterfaceStubDefault *_defaultStub) - : - defaultStub_(_defaultStub) { -} - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1_0 diff --git a/src/test/src-gen/core/v1_0/commonapi/tests/managed/RootInterfaceStubDefault.hpp b/src/test/src-gen/core/v1_0/commonapi/tests/managed/RootInterfaceStubDefault.hpp deleted file mode 100644 index ae51dab..0000000 --- a/src/test/src-gen/core/v1_0/commonapi/tests/managed/RootInterfaceStubDefault.hpp +++ /dev/null @@ -1,76 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.2.v201507021046. -* 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 COMMONAPI_TESTS_MANAGED_Root_Interface_STUB_DEFAULT_HPP_ -#define COMMONAPI_TESTS_MANAGED_Root_Interface_STUB_DEFAULT_HPP_ - - -#include <v1_0/commonapi/tests/managed/RootInterfaceStub.hpp> -#include <sstream> - -namespace v1_0 { -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<LeafInterfaceStub>); - bool registerManagedStubLeafInterface(std::shared_ptr<LeafInterfaceStub>, const std::string&); - bool deregisterManagedStubLeafInterface(const std::string&); - std::set<std::string>& getLeafInterfaceInstances(); - bool registerManagedStubBranchInterfaceAutoInstance(std::shared_ptr<BranchInterfaceStub>); - bool registerManagedStubBranchInterface(std::shared_ptr<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_0 - -#endif // COMMONAPI_TESTS_MANAGED_Root_Interface_STUB_DEFAULT diff --git a/src/test/src-gen/core/v1_0/commonapi/tests/managed/SecondRoot.hpp b/src/test/src-gen/core/v1_0/commonapi/tests/managed/SecondRoot.hpp deleted file mode 100644 index 9a7a6b8..0000000 --- a/src/test/src-gen/core/v1_0/commonapi/tests/managed/SecondRoot.hpp +++ /dev/null @@ -1,55 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.2.v201507021046. -* 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 COMMONAPI_TESTS_MANAGED_SECOND_ROOT_HPP_ -#define 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_0 { -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_0 - -namespace CommonAPI { -} - -#endif // COMMONAPI_TESTS_MANAGED_SECOND_ROOT_HPP_ diff --git a/src/test/src-gen/core/v1_0/commonapi/tests/managed/SecondRootProxy.hpp b/src/test/src-gen/core/v1_0/commonapi/tests/managed/SecondRootProxy.hpp deleted file mode 100644 index 5c2a9e8..0000000 --- a/src/test/src-gen/core/v1_0/commonapi/tests/managed/SecondRootProxy.hpp +++ /dev/null @@ -1,129 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.2.v201507021046. -* 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 COMMONAPI_TESTS_MANAGED_Second_Root_PROXY_HPP_ -#define COMMONAPI_TESTS_MANAGED_Second_Root_PROXY_HPP_ - -#include <v1_0/commonapi/tests/managed/SecondRootProxyBase.hpp> - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { - -template <typename ... _AttributeExtensions> -class SecondRootProxy - : virtual public SecondRoot, - virtual public SecondRootProxyBase, - 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_0 - - -#endif // COMMONAPI_TESTS_MANAGED_Second_Root_PROXY_HPP_ diff --git a/src/test/src-gen/core/v1_0/commonapi/tests/managed/SecondRootProxyBase.hpp b/src/test/src-gen/core/v1_0/commonapi/tests/managed/SecondRootProxyBase.hpp deleted file mode 100644 index 9fc8c35..0000000 --- a/src/test/src-gen/core/v1_0/commonapi/tests/managed/SecondRootProxyBase.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.2.v201507021046. -* 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 COMMONAPI_TESTS_MANAGED_Second_Root_PROXY_BASE_HPP_ -#define COMMONAPI_TESTS_MANAGED_Second_Root_PROXY_BASE_HPP_ - -#include <v1_0/commonapi/tests/managed/SecondRoot.hpp> - - -#include <v1_0/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_0 { -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_0 - -#endif // COMMONAPI_TESTS_MANAGED_Second_Root_PROXY_BASE_HPP_ diff --git a/src/test/src-gen/core/v1_0/commonapi/tests/managed/SecondRootStub.hpp b/src/test/src-gen/core/v1_0/commonapi/tests/managed/SecondRootStub.hpp deleted file mode 100644 index 01cb65d..0000000 --- a/src/test/src-gen/core/v1_0/commonapi/tests/managed/SecondRootStub.hpp +++ /dev/null @@ -1,109 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.2.v201507021046. -* 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 COMMONAPI_TESTS_MANAGED_Second_Root_STUB_HPP_ -#define COMMONAPI_TESTS_MANAGED_Second_Root_STUB_HPP_ - -#include <functional> - - - -#include <v1_0/commonapi/tests/managed/LeafInterfaceStub.hpp> - -#include <v1_0/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_0 { -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 - : virtual public CommonAPI::StubAdapter, - public SecondRoot { - public: - - - virtual bool registerManagedStubLeafInterface(std::shared_ptr<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<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_0 - -#endif // COMMONAPI_TESTS_MANAGED_Second_Root_STUB_HPP_ diff --git a/src/test/src-gen/core/v1_0/commonapi/tests/managed/SecondRootStubDefault.cpp b/src/test/src-gen/core/v1_0/commonapi/tests/managed/SecondRootStubDefault.cpp deleted file mode 100644 index 452aadc..0000000 --- a/src/test/src-gen/core/v1_0/commonapi/tests/managed/SecondRootStubDefault.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.2.v201507021046. -* 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_0/commonapi/tests/managed/SecondRootStubDefault.hpp> -#include <assert.h> - -namespace v1_0 { -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) { - 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<LeafInterfaceStub> _stub) { - autoInstanceCounter_++; - std::stringstream ss; - ss << CommonAPI::Stub<SecondRootStubAdapter, SecondRootStubRemoteEvent>::stubAdapter_->getAddress().getInstance() << ".i" << autoInstanceCounter_; - std::string instance = ss.str(); - assert((CommonAPI::Stub<SecondRootStubAdapter, SecondRootStubRemoteEvent>::stubAdapter_) !=NULL); - return CommonAPI::Stub<SecondRootStubAdapter, SecondRootStubRemoteEvent>::stubAdapter_->registerManagedStubLeafInterface(_stub, instance); -} -bool SecondRootStubDefault::registerManagedStubLeafInterface(std::shared_ptr<LeafInterfaceStub> _stub, const std::string &_instance) { - assert((CommonAPI::Stub<SecondRootStubAdapter, SecondRootStubRemoteEvent>::stubAdapter_) !=NULL); - return CommonAPI::Stub<SecondRootStubAdapter, SecondRootStubRemoteEvent>::stubAdapter_->registerManagedStubLeafInterface(_stub, _instance); -} -bool SecondRootStubDefault::deregisterManagedStubLeafInterface(const std::string &_instance) { - assert((CommonAPI::Stub<SecondRootStubAdapter, SecondRootStubRemoteEvent>::stubAdapter_) !=NULL); - return CommonAPI::Stub<SecondRootStubAdapter, SecondRootStubRemoteEvent>::stubAdapter_->deregisterManagedStubLeafInterface(_instance); -} -std::set<std::string>& SecondRootStubDefault::getLeafInterfaceInstances() { - assert((CommonAPI::Stub<SecondRootStubAdapter, SecondRootStubRemoteEvent>::stubAdapter_) !=NULL); - return CommonAPI::Stub<SecondRootStubAdapter, SecondRootStubRemoteEvent>::stubAdapter_->getLeafInterfaceInstances(); -} - -SecondRootStubDefault::RemoteEventHandler::RemoteEventHandler(SecondRootStubDefault *_defaultStub) - : - defaultStub_(_defaultStub) { -} - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1_0 diff --git a/src/test/src-gen/core/v1_0/commonapi/tests/managed/SecondRootStubDefault.hpp b/src/test/src-gen/core/v1_0/commonapi/tests/managed/SecondRootStubDefault.hpp deleted file mode 100644 index c56d7ac..0000000 --- a/src/test/src-gen/core/v1_0/commonapi/tests/managed/SecondRootStubDefault.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.2.v201507021046. -* 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 COMMONAPI_TESTS_MANAGED_Second_Root_STUB_DEFAULT_HPP_ -#define COMMONAPI_TESTS_MANAGED_Second_Root_STUB_DEFAULT_HPP_ - - -#include <v1_0/commonapi/tests/managed/SecondRootStub.hpp> -#include <sstream> - -namespace v1_0 { -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<LeafInterfaceStub>); - bool registerManagedStubLeafInterface(std::shared_ptr<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_0 - -#endif // COMMONAPI_TESTS_MANAGED_Second_Root_STUB_DEFAULT |