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/dbus/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/dbus/v1_0/commonapi/tests/managed')
24 files changed, 0 insertions, 1967 deletions
diff --git a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/BranchInterfaceDBusDeployment.cpp b/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/BranchInterfaceDBusDeployment.cpp deleted file mode 100644 index f58b844..0000000 --- a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/BranchInterfaceDBusDeployment.cpp +++ /dev/null @@ -1,30 +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 "BranchInterfaceDBusDeployment.hpp" - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { -namespace BranchInterface_ { - -// Type-specific deployments - -// Attribute-specific deployments - -// Argument-specific deployments - -// Broadcast-specific deployments - -} // namespace BranchInterface_ -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1_0 diff --git a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/BranchInterfaceDBusDeployment.hpp b/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/BranchInterfaceDBusDeployment.hpp deleted file mode 100644 index f87fdb9..0000000 --- a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/BranchInterfaceDBusDeployment.hpp +++ /dev/null @@ -1,45 +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_DBUS_BRANCHINTERFACE_DEPLOYMENT_HPP_ -#define COMMONAPI_DBUS_BRANCHINTERFACE_DEPLOYMENT_HPP_ - - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif -#include <CommonAPI/DBus/DBusDeployment.hpp> -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { -namespace BranchInterface_ { - -// Interface-specific deployment types - -// Type-specific deployments - -// Attribute-specific deployments - -// Argument-specific deployments - -// Broadcast-specific deployments - - -} // namespace BranchInterface_ -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1_0 - -#endif // COMMONAPI_DBUS_BRANCHINTERFACE_DEPLOYMENT_HPP_ diff --git a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/BranchInterfaceDBusProxy.cpp b/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/BranchInterfaceDBusProxy.cpp deleted file mode 100644 index 0c7c6ce..0000000 --- a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/BranchInterfaceDBusProxy.cpp +++ /dev/null @@ -1,104 +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/BranchInterfaceDBusProxy.hpp> - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { - -std::shared_ptr<CommonAPI::DBus::DBusProxy> createBranchInterfaceDBusProxy( - const CommonAPI::DBus::DBusAddress &_address, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection) { - return std::make_shared<BranchInterfaceDBusProxy>(_address, _connection); -} - -INITIALIZER(registerBranchInterfaceDBusProxy) { - CommonAPI::DBus::Factory::get()->registerProxyCreateMethod( - BranchInterface::getInterface(), - &createBranchInterfaceDBusProxy); -} - -BranchInterfaceDBusProxy::BranchInterfaceDBusProxy( - const CommonAPI::DBus::DBusAddress &_address, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection) - : CommonAPI::DBus::DBusProxy(_address, _connection) -{ -} - - - - void BranchInterfaceDBusProxy::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) { - CommonAPI::Deployable<BranchInterface::testBranchMethodError, CommonAPI::EmptyDeployment> deploy_error(static_cast<CommonAPI::EmptyDeployment *>(nullptr)); - CommonAPI::Deployable<int32_t, CommonAPI::EmptyDeployment> deploy_inInt(_inInt, static_cast<CommonAPI::EmptyDeployment*>(nullptr)); - CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment> deploy_inString(_inString, static_cast<CommonAPI::DBus::StringDeployment*>(nullptr)); - CommonAPI::Deployable<int32_t, CommonAPI::EmptyDeployment> deploy_outInt(static_cast<CommonAPI::EmptyDeployment*>(nullptr)); - CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment> deploy_outString(static_cast<CommonAPI::DBus::StringDeployment*>(nullptr)); - CommonAPI::DBus::DBusProxyHelper< - CommonAPI::DBus::DBusSerializableArguments< - CommonAPI::Deployable<int32_t, CommonAPI::EmptyDeployment >, - CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment > - >, - CommonAPI::DBus::DBusSerializableArguments< - CommonAPI::Deployable<BranchInterface::testBranchMethodError, CommonAPI::EmptyDeployment>, - CommonAPI::Deployable<int32_t,CommonAPI::EmptyDeployment>, - CommonAPI::Deployable<std::string,CommonAPI::DBus::StringDeployment> - > - >::callMethodWithReply( - *this, - "testBranchMethod", - "is", - (_info ? _info : &CommonAPI::DBus::defaultCallInfo), - deploy_inInt, deploy_inString, - _internalCallStatus, - deploy_error, - deploy_outInt, deploy_outString); - _error = deploy_error.getValue(); - _outInt = deploy_outInt.getValue(); - _outString = deploy_outString.getValue(); - } - std::future<CommonAPI::CallStatus> BranchInterfaceDBusProxy::testBranchMethodAsync(const int32_t &_inInt, const std::string &_inString, TestBranchMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info) { - CommonAPI::Deployable<BranchInterface::testBranchMethodError, CommonAPI::EmptyDeployment> deploy_error(static_cast<CommonAPI::EmptyDeployment *>(nullptr)); - CommonAPI::Deployable<int32_t, CommonAPI::EmptyDeployment> deploy_inInt(_inInt, static_cast<CommonAPI::EmptyDeployment*>(nullptr)); - CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment> deploy_inString(_inString, static_cast<CommonAPI::DBus::StringDeployment*>(nullptr)); - CommonAPI::Deployable<int32_t, CommonAPI::EmptyDeployment> deploy_outInt(static_cast<CommonAPI::EmptyDeployment*>(nullptr)); - CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment> deploy_outString(static_cast<CommonAPI::DBus::StringDeployment*>(nullptr)); - return CommonAPI::DBus::DBusProxyHelper< - CommonAPI::DBus::DBusSerializableArguments< - CommonAPI::Deployable<int32_t, CommonAPI::EmptyDeployment >, - CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment > - >, - CommonAPI::DBus::DBusSerializableArguments< - CommonAPI::Deployable<BranchInterface::testBranchMethodError, CommonAPI::EmptyDeployment>, - CommonAPI::Deployable<int32_t,CommonAPI::EmptyDeployment>, - CommonAPI::Deployable<std::string,CommonAPI::DBus::StringDeployment> - > - >::callMethodAsync( - *this, - "testBranchMethod", - "is", - (_info ? _info : &CommonAPI::DBus::defaultCallInfo), - deploy_inInt, deploy_inString, - [_callback] (CommonAPI::CallStatus _status, CommonAPI::Deployable<BranchInterface::testBranchMethodError, CommonAPI::EmptyDeployment> _deploy_error, CommonAPI::Deployable<int32_t, CommonAPI::EmptyDeployment> _outInt, CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment> _outString) { - _callback(_status, _deploy_error.getValue(), _outInt.getValue(), _outString.getValue()); - }, - std::make_tuple(deploy_error, deploy_outInt, deploy_outString)); - } - - - void BranchInterfaceDBusProxy::getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const { - ownVersionMajor = 1; - ownVersionMinor = 0; - } - - } // namespace managed - } // namespace tests - } // namespace commonapi - } // namespace v1_0 diff --git a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/BranchInterfaceDBusProxy.hpp b/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/BranchInterfaceDBusProxy.hpp deleted file mode 100644 index 4f66233..0000000 --- a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/BranchInterfaceDBusProxy.hpp +++ /dev/null @@ -1,62 +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_DBUS_PROXY_HPP_ -#define COMMONAPI_TESTS_MANAGED_Branch_Interface_DBUS_PROXY_HPP_ - -#include <v1_0/commonapi/tests/managed/BranchInterfaceProxyBase.hpp> - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <CommonAPI/DBus/DBusAddress.hpp> -#include <CommonAPI/DBus/DBusFactory.hpp> -#include <CommonAPI/DBus/DBusProxy.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -#include <string> - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { - -class BranchInterfaceDBusProxy - : virtual public BranchInterfaceProxyBase, - virtual public CommonAPI::DBus::DBusProxy { -public: - BranchInterfaceDBusProxy( - const CommonAPI::DBus::DBusAddress &_address, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection); - - virtual ~BranchInterfaceDBusProxy() { } - - - - 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); - virtual std::future<CommonAPI::CallStatus> testBranchMethodAsync(const int32_t &_inInt, const std::string &_inString, TestBranchMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info); - - - virtual void getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const; - -private: - - - -}; - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1_0 - -#endif // COMMONAPI_TESTS_MANAGED_Branch_Interface_DBUS_PROXY_HPP_ - diff --git a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/BranchInterfaceDBusStubAdapter.cpp b/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/BranchInterfaceDBusStubAdapter.cpp deleted file mode 100644 index ce8f413..0000000 --- a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/BranchInterfaceDBusStubAdapter.cpp +++ /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/. -*/ -#include <v1_0/commonapi/tests/managed/BranchInterface.hpp> -#include <v1_0/commonapi/tests/managed/BranchInterfaceDBusStubAdapter.hpp> - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { - -std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> createBranchInterfaceDBusStubAdapter( - const CommonAPI::DBus::DBusAddress &_address, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection, - const std::shared_ptr<CommonAPI::StubBase> &_stub) { - return std::make_shared<BranchInterfaceDBusStubAdapter>(_address, _connection, _stub); -} - -INITIALIZER(registerBranchInterfaceDBusStubAdapter) { - CommonAPI::DBus::Factory::get()->registerStubAdapterCreateMethod( - BranchInterface::getInterface(), &createBranchInterfaceDBusStubAdapter); -} - -BranchInterfaceDBusStubAdapterInternal::~BranchInterfaceDBusStubAdapterInternal() { - deactivateManagedInstances(); - BranchInterfaceDBusStubAdapterHelper::deinit(); -} - -void BranchInterfaceDBusStubAdapterInternal::deactivateManagedInstances() { - -} - -const char* BranchInterfaceDBusStubAdapterInternal::getMethodsDBusIntrospectionXmlData() const { - static const std::string introspectionData = - "<method name=\"getInterfaceVersion\">\n" - "<arg name=\"value\" type=\"uu\" direction=\"out\" />" - "</method>\n" - "<method name=\"testBranchMethod\">\n" - "<arg name=\"_inInt\" type=\"i\" direction=\"in\" />\n" - "<arg name=\"_inString\" type=\"s\" direction=\"in\" />\n" - "<arg name=\"_error\" type=\"i\" direction=\"out\" />\n" - "<arg name=\"_outInt\" type=\"i\" direction=\"out\" />\n" - "<arg name=\"_outString\" type=\"s\" direction=\"out\" />\n" - "</method>\n" - - ; - return introspectionData.c_str(); -} - -CommonAPI::DBus::DBusGetAttributeStubDispatcher< - BranchInterfaceStub, - CommonAPI::Version - > BranchInterfaceDBusStubAdapterInternal::getBranchInterfaceInterfaceVersionStubDispatcher(&BranchInterfaceStub::getInterfaceVersion, "uu"); - - - - -CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< - BranchInterfaceStub, - std::tuple<int32_t, std::string>, - std::tuple<BranchInterface::testBranchMethodError, int32_t, std::string>, - std::tuple<CommonAPI::EmptyDeployment, CommonAPI::DBus::StringDeployment>, - std::tuple<CommonAPI::EmptyDeployment, CommonAPI::EmptyDeployment, CommonAPI::DBus::StringDeployment> - - > BranchInterfaceDBusStubAdapterInternal::testBranchMethodStubDispatcher( - &BranchInterfaceStub::testBranchMethod, "iis", - std::make_tuple(static_cast<CommonAPI::EmptyDeployment*>(nullptr), static_cast<CommonAPI::DBus::StringDeployment*>(nullptr)), - std::make_tuple(static_cast<CommonAPI::EmptyDeployment *>(nullptr), static_cast<CommonAPI::EmptyDeployment*>(nullptr), static_cast<CommonAPI::DBus::StringDeployment*>(nullptr))); - - - - - -const BranchInterfaceDBusStubAdapterHelper::StubDispatcherTable& BranchInterfaceDBusStubAdapterInternal::getStubDispatcherTable() { - return stubDispatcherTable_; -} - -const CommonAPI::DBus::StubAttributeTable& BranchInterfaceDBusStubAdapterInternal::getStubAttributeTable() { - return stubAttributeTable_; -} - -BranchInterfaceDBusStubAdapterInternal::BranchInterfaceDBusStubAdapterInternal( - const CommonAPI::DBus::DBusAddress &_address, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection, - const std::shared_ptr<CommonAPI::StubBase> &_stub) - : CommonAPI::DBus::DBusStubAdapter(_address, _connection,false), - BranchInterfaceDBusStubAdapterHelper(_address, _connection, std::dynamic_pointer_cast<BranchInterfaceStub>(_stub), false), - stubDispatcherTable_({ - { { "testBranchMethod", "is" }, &commonapi::tests::managed::BranchInterfaceDBusStubAdapterInternal::testBranchMethodStubDispatcher } - }), - stubAttributeTable_() { - - stubDispatcherTable_.insert({ { "getInterfaceVersion", "" }, &commonapi::tests::managed::BranchInterfaceDBusStubAdapterInternal::getBranchInterfaceInterfaceVersionStubDispatcher }); -} - -const bool BranchInterfaceDBusStubAdapterInternal::hasFreedesktopProperties() { - return false; -} - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1_0 diff --git a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/BranchInterfaceDBusStubAdapter.hpp b/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/BranchInterfaceDBusStubAdapter.hpp deleted file mode 100644 index 1da6539..0000000 --- a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/BranchInterfaceDBusStubAdapter.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_Branch_Interface_DBUS_STUB_ADAPTER_HPP_ -#define COMMONAPI_TESTS_MANAGED_Branch_Interface_DBUS_STUB_ADAPTER_HPP_ - -#include <v1_0/commonapi/tests/managed/BranchInterfaceStub.hpp> -#include "v1_0/commonapi/tests/managed/BranchInterfaceDBusDeployment.hpp" - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <CommonAPI/DBus/DBusFactory.hpp> -#include <CommonAPI/DBus/DBusStubAdapterHelper.hpp> -#include <CommonAPI/DBus/DBusStubAdapter.hpp> -#include <CommonAPI/DBus/DBusDeployment.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { - -typedef CommonAPI::DBus::DBusStubAdapterHelper<BranchInterfaceStub> BranchInterfaceDBusStubAdapterHelper; - -class BranchInterfaceDBusStubAdapterInternal - : public virtual BranchInterfaceStubAdapter, - public BranchInterfaceDBusStubAdapterHelper -{ -public: - BranchInterfaceDBusStubAdapterInternal( - const CommonAPI::DBus::DBusAddress &_address, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection, - const std::shared_ptr<CommonAPI::StubBase> &_stub); - - ~BranchInterfaceDBusStubAdapterInternal(); - - virtual const bool hasFreedesktopProperties(); - - - - - const BranchInterfaceDBusStubAdapterHelper::StubDispatcherTable& getStubDispatcherTable(); - const CommonAPI::DBus::StubAttributeTable& getStubAttributeTable(); - - void deactivateManagedInstances(); - - -static CommonAPI::DBus::DBusGetAttributeStubDispatcher< - BranchInterfaceStub, - CommonAPI::Version - > getBranchInterfaceInterfaceVersionStubDispatcher; - - - - -static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< - BranchInterfaceStub, - std::tuple<int32_t, std::string>, - std::tuple<BranchInterface::testBranchMethodError, int32_t, std::string>, - std::tuple<CommonAPI::EmptyDeployment, CommonAPI::DBus::StringDeployment>, - std::tuple<CommonAPI::EmptyDeployment, CommonAPI::EmptyDeployment, CommonAPI::DBus::StringDeployment> - - > testBranchMethodStubDispatcher; - - - - - protected: - virtual const char* getMethodsDBusIntrospectionXmlData() const; - - private: - BranchInterfaceDBusStubAdapterHelper::StubDispatcherTable stubDispatcherTable_; - CommonAPI::DBus::StubAttributeTable stubAttributeTable_; -}; - -class BranchInterfaceDBusStubAdapter - : public BranchInterfaceDBusStubAdapterInternal, - public std::enable_shared_from_this<BranchInterfaceDBusStubAdapter> { -public: - BranchInterfaceDBusStubAdapter( - const CommonAPI::DBus::DBusAddress &_address, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection, - const std::shared_ptr<CommonAPI::StubBase> &_stub) - : CommonAPI::DBus::DBusStubAdapter( - _address, - _connection, - false), - BranchInterfaceDBusStubAdapterInternal( - _address, - _connection, - _stub) { - } -}; - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1_0 - -#endif // COMMONAPI_TESTS_MANAGED_Branch_Interface_DBUS_STUB_ADAPTER_HPP_ diff --git a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/LeafInterfaceDBusDeployment.cpp b/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/LeafInterfaceDBusDeployment.cpp deleted file mode 100644 index d28ab96..0000000 --- a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/LeafInterfaceDBusDeployment.cpp +++ /dev/null @@ -1,30 +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 "LeafInterfaceDBusDeployment.hpp" - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { -namespace LeafInterface_ { - -// Type-specific deployments - -// Attribute-specific deployments - -// Argument-specific deployments - -// Broadcast-specific deployments - -} // namespace LeafInterface_ -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1_0 diff --git a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/LeafInterfaceDBusDeployment.hpp b/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/LeafInterfaceDBusDeployment.hpp deleted file mode 100644 index 71e0f4c..0000000 --- a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/LeafInterfaceDBusDeployment.hpp +++ /dev/null @@ -1,45 +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_DBUS_LEAFINTERFACE_DEPLOYMENT_HPP_ -#define COMMONAPI_DBUS_LEAFINTERFACE_DEPLOYMENT_HPP_ - - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif -#include <CommonAPI/DBus/DBusDeployment.hpp> -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { -namespace LeafInterface_ { - -// Interface-specific deployment types - -// Type-specific deployments - -// Attribute-specific deployments - -// Argument-specific deployments - -// Broadcast-specific deployments - - -} // namespace LeafInterface_ -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1_0 - -#endif // COMMONAPI_DBUS_LEAFINTERFACE_DEPLOYMENT_HPP_ diff --git a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/LeafInterfaceDBusProxy.cpp b/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/LeafInterfaceDBusProxy.cpp deleted file mode 100644 index 6a26285..0000000 --- a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/LeafInterfaceDBusProxy.cpp +++ /dev/null @@ -1,104 +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/LeafInterfaceDBusProxy.hpp> - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { - -std::shared_ptr<CommonAPI::DBus::DBusProxy> createLeafInterfaceDBusProxy( - const CommonAPI::DBus::DBusAddress &_address, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection) { - return std::make_shared<LeafInterfaceDBusProxy>(_address, _connection); -} - -INITIALIZER(registerLeafInterfaceDBusProxy) { - CommonAPI::DBus::Factory::get()->registerProxyCreateMethod( - LeafInterface::getInterface(), - &createLeafInterfaceDBusProxy); -} - -LeafInterfaceDBusProxy::LeafInterfaceDBusProxy( - const CommonAPI::DBus::DBusAddress &_address, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection) - : CommonAPI::DBus::DBusProxy(_address, _connection) -{ -} - - - - void LeafInterfaceDBusProxy::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) { - CommonAPI::Deployable<LeafInterface::testLeafMethodError, CommonAPI::EmptyDeployment> deploy_error(static_cast<CommonAPI::EmptyDeployment *>(nullptr)); - CommonAPI::Deployable<int32_t, CommonAPI::EmptyDeployment> deploy_inInt(_inInt, static_cast<CommonAPI::EmptyDeployment*>(nullptr)); - CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment> deploy_inString(_inString, static_cast<CommonAPI::DBus::StringDeployment*>(nullptr)); - CommonAPI::Deployable<int32_t, CommonAPI::EmptyDeployment> deploy_outInt(static_cast<CommonAPI::EmptyDeployment*>(nullptr)); - CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment> deploy_outString(static_cast<CommonAPI::DBus::StringDeployment*>(nullptr)); - CommonAPI::DBus::DBusProxyHelper< - CommonAPI::DBus::DBusSerializableArguments< - CommonAPI::Deployable<int32_t, CommonAPI::EmptyDeployment >, - CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment > - >, - CommonAPI::DBus::DBusSerializableArguments< - CommonAPI::Deployable<LeafInterface::testLeafMethodError, CommonAPI::EmptyDeployment>, - CommonAPI::Deployable<int32_t,CommonAPI::EmptyDeployment>, - CommonAPI::Deployable<std::string,CommonAPI::DBus::StringDeployment> - > - >::callMethodWithReply( - *this, - "testLeafMethod", - "is", - (_info ? _info : &CommonAPI::DBus::defaultCallInfo), - deploy_inInt, deploy_inString, - _internalCallStatus, - deploy_error, - deploy_outInt, deploy_outString); - _error = deploy_error.getValue(); - _outInt = deploy_outInt.getValue(); - _outString = deploy_outString.getValue(); - } - std::future<CommonAPI::CallStatus> LeafInterfaceDBusProxy::testLeafMethodAsync(const int32_t &_inInt, const std::string &_inString, TestLeafMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info) { - CommonAPI::Deployable<LeafInterface::testLeafMethodError, CommonAPI::EmptyDeployment> deploy_error(static_cast<CommonAPI::EmptyDeployment *>(nullptr)); - CommonAPI::Deployable<int32_t, CommonAPI::EmptyDeployment> deploy_inInt(_inInt, static_cast<CommonAPI::EmptyDeployment*>(nullptr)); - CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment> deploy_inString(_inString, static_cast<CommonAPI::DBus::StringDeployment*>(nullptr)); - CommonAPI::Deployable<int32_t, CommonAPI::EmptyDeployment> deploy_outInt(static_cast<CommonAPI::EmptyDeployment*>(nullptr)); - CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment> deploy_outString(static_cast<CommonAPI::DBus::StringDeployment*>(nullptr)); - return CommonAPI::DBus::DBusProxyHelper< - CommonAPI::DBus::DBusSerializableArguments< - CommonAPI::Deployable<int32_t, CommonAPI::EmptyDeployment >, - CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment > - >, - CommonAPI::DBus::DBusSerializableArguments< - CommonAPI::Deployable<LeafInterface::testLeafMethodError, CommonAPI::EmptyDeployment>, - CommonAPI::Deployable<int32_t,CommonAPI::EmptyDeployment>, - CommonAPI::Deployable<std::string,CommonAPI::DBus::StringDeployment> - > - >::callMethodAsync( - *this, - "testLeafMethod", - "is", - (_info ? _info : &CommonAPI::DBus::defaultCallInfo), - deploy_inInt, deploy_inString, - [_callback] (CommonAPI::CallStatus _status, CommonAPI::Deployable<LeafInterface::testLeafMethodError, CommonAPI::EmptyDeployment> _deploy_error, CommonAPI::Deployable<int32_t, CommonAPI::EmptyDeployment> _outInt, CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment> _outString) { - _callback(_status, _deploy_error.getValue(), _outInt.getValue(), _outString.getValue()); - }, - std::make_tuple(deploy_error, deploy_outInt, deploy_outString)); - } - - - void LeafInterfaceDBusProxy::getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const { - ownVersionMajor = 1; - ownVersionMinor = 0; - } - - } // namespace managed - } // namespace tests - } // namespace commonapi - } // namespace v1_0 diff --git a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/LeafInterfaceDBusProxy.hpp b/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/LeafInterfaceDBusProxy.hpp deleted file mode 100644 index 8fec7ca..0000000 --- a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/LeafInterfaceDBusProxy.hpp +++ /dev/null @@ -1,62 +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_DBUS_PROXY_HPP_ -#define COMMONAPI_TESTS_MANAGED_Leaf_Interface_DBUS_PROXY_HPP_ - -#include <v1_0/commonapi/tests/managed/LeafInterfaceProxyBase.hpp> - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <CommonAPI/DBus/DBusAddress.hpp> -#include <CommonAPI/DBus/DBusFactory.hpp> -#include <CommonAPI/DBus/DBusProxy.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -#include <string> - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { - -class LeafInterfaceDBusProxy - : virtual public LeafInterfaceProxyBase, - virtual public CommonAPI::DBus::DBusProxy { -public: - LeafInterfaceDBusProxy( - const CommonAPI::DBus::DBusAddress &_address, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection); - - virtual ~LeafInterfaceDBusProxy() { } - - - - 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); - virtual std::future<CommonAPI::CallStatus> testLeafMethodAsync(const int32_t &_inInt, const std::string &_inString, TestLeafMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info); - - - virtual void getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const; - -private: - - - -}; - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1_0 - -#endif // COMMONAPI_TESTS_MANAGED_Leaf_Interface_DBUS_PROXY_HPP_ - diff --git a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/LeafInterfaceDBusStubAdapter.cpp b/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/LeafInterfaceDBusStubAdapter.cpp deleted file mode 100644 index d622168..0000000 --- a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/LeafInterfaceDBusStubAdapter.cpp +++ /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/. -*/ -#include <v1_0/commonapi/tests/managed/LeafInterface.hpp> -#include <v1_0/commonapi/tests/managed/LeafInterfaceDBusStubAdapter.hpp> - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { - -std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> createLeafInterfaceDBusStubAdapter( - const CommonAPI::DBus::DBusAddress &_address, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection, - const std::shared_ptr<CommonAPI::StubBase> &_stub) { - return std::make_shared<LeafInterfaceDBusStubAdapter>(_address, _connection, _stub); -} - -INITIALIZER(registerLeafInterfaceDBusStubAdapter) { - CommonAPI::DBus::Factory::get()->registerStubAdapterCreateMethod( - LeafInterface::getInterface(), &createLeafInterfaceDBusStubAdapter); -} - -LeafInterfaceDBusStubAdapterInternal::~LeafInterfaceDBusStubAdapterInternal() { - deactivateManagedInstances(); - LeafInterfaceDBusStubAdapterHelper::deinit(); -} - -void LeafInterfaceDBusStubAdapterInternal::deactivateManagedInstances() { - -} - -const char* LeafInterfaceDBusStubAdapterInternal::getMethodsDBusIntrospectionXmlData() const { - static const std::string introspectionData = - "<method name=\"getInterfaceVersion\">\n" - "<arg name=\"value\" type=\"uu\" direction=\"out\" />" - "</method>\n" - "<method name=\"testLeafMethod\">\n" - "<arg name=\"_inInt\" type=\"i\" direction=\"in\" />\n" - "<arg name=\"_inString\" type=\"s\" direction=\"in\" />\n" - "<arg name=\"_error\" type=\"i\" direction=\"out\" />\n" - "<arg name=\"_outInt\" type=\"i\" direction=\"out\" />\n" - "<arg name=\"_outString\" type=\"s\" direction=\"out\" />\n" - "</method>\n" - - ; - return introspectionData.c_str(); -} - -CommonAPI::DBus::DBusGetAttributeStubDispatcher< - LeafInterfaceStub, - CommonAPI::Version - > LeafInterfaceDBusStubAdapterInternal::getLeafInterfaceInterfaceVersionStubDispatcher(&LeafInterfaceStub::getInterfaceVersion, "uu"); - - - - -CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< - LeafInterfaceStub, - std::tuple<int32_t, std::string>, - std::tuple<LeafInterface::testLeafMethodError, int32_t, std::string>, - std::tuple<CommonAPI::EmptyDeployment, CommonAPI::DBus::StringDeployment>, - std::tuple<CommonAPI::EmptyDeployment, CommonAPI::EmptyDeployment, CommonAPI::DBus::StringDeployment> - - > LeafInterfaceDBusStubAdapterInternal::testLeafMethodStubDispatcher( - &LeafInterfaceStub::testLeafMethod, "iis", - std::make_tuple(static_cast<CommonAPI::EmptyDeployment*>(nullptr), static_cast<CommonAPI::DBus::StringDeployment*>(nullptr)), - std::make_tuple(static_cast<CommonAPI::EmptyDeployment *>(nullptr), static_cast<CommonAPI::EmptyDeployment*>(nullptr), static_cast<CommonAPI::DBus::StringDeployment*>(nullptr))); - - - - - -const LeafInterfaceDBusStubAdapterHelper::StubDispatcherTable& LeafInterfaceDBusStubAdapterInternal::getStubDispatcherTable() { - return stubDispatcherTable_; -} - -const CommonAPI::DBus::StubAttributeTable& LeafInterfaceDBusStubAdapterInternal::getStubAttributeTable() { - return stubAttributeTable_; -} - -LeafInterfaceDBusStubAdapterInternal::LeafInterfaceDBusStubAdapterInternal( - const CommonAPI::DBus::DBusAddress &_address, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection, - const std::shared_ptr<CommonAPI::StubBase> &_stub) - : CommonAPI::DBus::DBusStubAdapter(_address, _connection,false), - LeafInterfaceDBusStubAdapterHelper(_address, _connection, std::dynamic_pointer_cast<LeafInterfaceStub>(_stub), false), - stubDispatcherTable_({ - { { "testLeafMethod", "is" }, &commonapi::tests::managed::LeafInterfaceDBusStubAdapterInternal::testLeafMethodStubDispatcher } - }), - stubAttributeTable_() { - - stubDispatcherTable_.insert({ { "getInterfaceVersion", "" }, &commonapi::tests::managed::LeafInterfaceDBusStubAdapterInternal::getLeafInterfaceInterfaceVersionStubDispatcher }); -} - -const bool LeafInterfaceDBusStubAdapterInternal::hasFreedesktopProperties() { - return false; -} - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1_0 diff --git a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/LeafInterfaceDBusStubAdapter.hpp b/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/LeafInterfaceDBusStubAdapter.hpp deleted file mode 100644 index 853dbfb..0000000 --- a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/LeafInterfaceDBusStubAdapter.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_Leaf_Interface_DBUS_STUB_ADAPTER_HPP_ -#define COMMONAPI_TESTS_MANAGED_Leaf_Interface_DBUS_STUB_ADAPTER_HPP_ - -#include <v1_0/commonapi/tests/managed/LeafInterfaceStub.hpp> -#include "v1_0/commonapi/tests/managed/LeafInterfaceDBusDeployment.hpp" - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <CommonAPI/DBus/DBusFactory.hpp> -#include <CommonAPI/DBus/DBusStubAdapterHelper.hpp> -#include <CommonAPI/DBus/DBusStubAdapter.hpp> -#include <CommonAPI/DBus/DBusDeployment.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { - -typedef CommonAPI::DBus::DBusStubAdapterHelper<LeafInterfaceStub> LeafInterfaceDBusStubAdapterHelper; - -class LeafInterfaceDBusStubAdapterInternal - : public virtual LeafInterfaceStubAdapter, - public LeafInterfaceDBusStubAdapterHelper -{ -public: - LeafInterfaceDBusStubAdapterInternal( - const CommonAPI::DBus::DBusAddress &_address, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection, - const std::shared_ptr<CommonAPI::StubBase> &_stub); - - ~LeafInterfaceDBusStubAdapterInternal(); - - virtual const bool hasFreedesktopProperties(); - - - - - const LeafInterfaceDBusStubAdapterHelper::StubDispatcherTable& getStubDispatcherTable(); - const CommonAPI::DBus::StubAttributeTable& getStubAttributeTable(); - - void deactivateManagedInstances(); - - -static CommonAPI::DBus::DBusGetAttributeStubDispatcher< - LeafInterfaceStub, - CommonAPI::Version - > getLeafInterfaceInterfaceVersionStubDispatcher; - - - - -static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< - LeafInterfaceStub, - std::tuple<int32_t, std::string>, - std::tuple<LeafInterface::testLeafMethodError, int32_t, std::string>, - std::tuple<CommonAPI::EmptyDeployment, CommonAPI::DBus::StringDeployment>, - std::tuple<CommonAPI::EmptyDeployment, CommonAPI::EmptyDeployment, CommonAPI::DBus::StringDeployment> - - > testLeafMethodStubDispatcher; - - - - - protected: - virtual const char* getMethodsDBusIntrospectionXmlData() const; - - private: - LeafInterfaceDBusStubAdapterHelper::StubDispatcherTable stubDispatcherTable_; - CommonAPI::DBus::StubAttributeTable stubAttributeTable_; -}; - -class LeafInterfaceDBusStubAdapter - : public LeafInterfaceDBusStubAdapterInternal, - public std::enable_shared_from_this<LeafInterfaceDBusStubAdapter> { -public: - LeafInterfaceDBusStubAdapter( - const CommonAPI::DBus::DBusAddress &_address, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection, - const std::shared_ptr<CommonAPI::StubBase> &_stub) - : CommonAPI::DBus::DBusStubAdapter( - _address, - _connection, - false), - LeafInterfaceDBusStubAdapterInternal( - _address, - _connection, - _stub) { - } -}; - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1_0 - -#endif // COMMONAPI_TESTS_MANAGED_Leaf_Interface_DBUS_STUB_ADAPTER_HPP_ diff --git a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/RootInterfaceDBusDeployment.cpp b/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/RootInterfaceDBusDeployment.cpp deleted file mode 100644 index c514b7e..0000000 --- a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/RootInterfaceDBusDeployment.cpp +++ /dev/null @@ -1,30 +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 "RootInterfaceDBusDeployment.hpp" - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { -namespace RootInterface_ { - -// Type-specific deployments - -// Attribute-specific deployments - -// Argument-specific deployments - -// Broadcast-specific deployments - -} // namespace RootInterface_ -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1_0 diff --git a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/RootInterfaceDBusDeployment.hpp b/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/RootInterfaceDBusDeployment.hpp deleted file mode 100644 index 63a1fdf..0000000 --- a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/RootInterfaceDBusDeployment.hpp +++ /dev/null @@ -1,45 +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_DBUS_ROOTINTERFACE_DEPLOYMENT_HPP_ -#define COMMONAPI_DBUS_ROOTINTERFACE_DEPLOYMENT_HPP_ - - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif -#include <CommonAPI/DBus/DBusDeployment.hpp> -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { -namespace RootInterface_ { - -// Interface-specific deployment types - -// Type-specific deployments - -// Attribute-specific deployments - -// Argument-specific deployments - -// Broadcast-specific deployments - - -} // namespace RootInterface_ -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1_0 - -#endif // COMMONAPI_DBUS_ROOTINTERFACE_DEPLOYMENT_HPP_ diff --git a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/RootInterfaceDBusProxy.cpp b/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/RootInterfaceDBusProxy.cpp deleted file mode 100644 index 4ad729e..0000000 --- a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/RootInterfaceDBusProxy.cpp +++ /dev/null @@ -1,112 +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/RootInterfaceDBusProxy.hpp> - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { - -std::shared_ptr<CommonAPI::DBus::DBusProxy> createRootInterfaceDBusProxy( - const CommonAPI::DBus::DBusAddress &_address, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection) { - return std::make_shared<RootInterfaceDBusProxy>(_address, _connection); -} - -INITIALIZER(registerRootInterfaceDBusProxy) { - CommonAPI::DBus::Factory::get()->registerProxyCreateMethod( - RootInterface::getInterface(), - &createRootInterfaceDBusProxy); -} - -RootInterfaceDBusProxy::RootInterfaceDBusProxy( - const CommonAPI::DBus::DBusAddress &_address, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection) - : CommonAPI::DBus::DBusProxy(_address, _connection) -, proxyManagerLeafInterface_(*this, "commonapi.tests.managed.LeafInterface"), - proxyManagerBranchInterface_(*this, "commonapi.tests.managed.BranchInterface") -{ -} - - - - void RootInterfaceDBusProxy::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) { - CommonAPI::Deployable<RootInterface::testRootMethodError, CommonAPI::EmptyDeployment> deploy_error(static_cast<CommonAPI::EmptyDeployment *>(nullptr)); - CommonAPI::Deployable<int32_t, CommonAPI::EmptyDeployment> deploy_inInt(_inInt, static_cast<CommonAPI::EmptyDeployment*>(nullptr)); - CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment> deploy_inString(_inString, static_cast<CommonAPI::DBus::StringDeployment*>(nullptr)); - CommonAPI::Deployable<int32_t, CommonAPI::EmptyDeployment> deploy_outInt(static_cast<CommonAPI::EmptyDeployment*>(nullptr)); - CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment> deploy_outString(static_cast<CommonAPI::DBus::StringDeployment*>(nullptr)); - CommonAPI::DBus::DBusProxyHelper< - CommonAPI::DBus::DBusSerializableArguments< - CommonAPI::Deployable<int32_t, CommonAPI::EmptyDeployment >, - CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment > - >, - CommonAPI::DBus::DBusSerializableArguments< - CommonAPI::Deployable<RootInterface::testRootMethodError, CommonAPI::EmptyDeployment>, - CommonAPI::Deployable<int32_t,CommonAPI::EmptyDeployment>, - CommonAPI::Deployable<std::string,CommonAPI::DBus::StringDeployment> - > - >::callMethodWithReply( - *this, - "testRootMethod", - "is", - (_info ? _info : &CommonAPI::DBus::defaultCallInfo), - deploy_inInt, deploy_inString, - _internalCallStatus, - deploy_error, - deploy_outInt, deploy_outString); - _error = deploy_error.getValue(); - _outInt = deploy_outInt.getValue(); - _outString = deploy_outString.getValue(); - } - std::future<CommonAPI::CallStatus> RootInterfaceDBusProxy::testRootMethodAsync(const int32_t &_inInt, const std::string &_inString, TestRootMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info) { - CommonAPI::Deployable<RootInterface::testRootMethodError, CommonAPI::EmptyDeployment> deploy_error(static_cast<CommonAPI::EmptyDeployment *>(nullptr)); - CommonAPI::Deployable<int32_t, CommonAPI::EmptyDeployment> deploy_inInt(_inInt, static_cast<CommonAPI::EmptyDeployment*>(nullptr)); - CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment> deploy_inString(_inString, static_cast<CommonAPI::DBus::StringDeployment*>(nullptr)); - CommonAPI::Deployable<int32_t, CommonAPI::EmptyDeployment> deploy_outInt(static_cast<CommonAPI::EmptyDeployment*>(nullptr)); - CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment> deploy_outString(static_cast<CommonAPI::DBus::StringDeployment*>(nullptr)); - return CommonAPI::DBus::DBusProxyHelper< - CommonAPI::DBus::DBusSerializableArguments< - CommonAPI::Deployable<int32_t, CommonAPI::EmptyDeployment >, - CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment > - >, - CommonAPI::DBus::DBusSerializableArguments< - CommonAPI::Deployable<RootInterface::testRootMethodError, CommonAPI::EmptyDeployment>, - CommonAPI::Deployable<int32_t,CommonAPI::EmptyDeployment>, - CommonAPI::Deployable<std::string,CommonAPI::DBus::StringDeployment> - > - >::callMethodAsync( - *this, - "testRootMethod", - "is", - (_info ? _info : &CommonAPI::DBus::defaultCallInfo), - deploy_inInt, deploy_inString, - [_callback] (CommonAPI::CallStatus _status, CommonAPI::Deployable<RootInterface::testRootMethodError, CommonAPI::EmptyDeployment> _deploy_error, CommonAPI::Deployable<int32_t, CommonAPI::EmptyDeployment> _outInt, CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment> _outString) { - _callback(_status, _deploy_error.getValue(), _outInt.getValue(), _outString.getValue()); - }, - std::make_tuple(deploy_error, deploy_outInt, deploy_outString)); - } - - CommonAPI::ProxyManager& RootInterfaceDBusProxy::getProxyManagerLeafInterface() { - return proxyManagerLeafInterface_; - } - CommonAPI::ProxyManager& RootInterfaceDBusProxy::getProxyManagerBranchInterface() { - return proxyManagerBranchInterface_; - } - - void RootInterfaceDBusProxy::getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const { - ownVersionMajor = 1; - ownVersionMinor = 0; - } - - } // namespace managed - } // namespace tests - } // namespace commonapi - } // namespace v1_0 diff --git a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/RootInterfaceDBusProxy.hpp b/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/RootInterfaceDBusProxy.hpp deleted file mode 100644 index a0c7443..0000000 --- a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/RootInterfaceDBusProxy.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_Root_Interface_DBUS_PROXY_HPP_ -#define COMMONAPI_TESTS_MANAGED_Root_Interface_DBUS_PROXY_HPP_ - -#include <v1_0/commonapi/tests/managed/RootInterfaceProxyBase.hpp> - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <CommonAPI/DBus/DBusAddress.hpp> -#include <CommonAPI/DBus/DBusFactory.hpp> -#include <CommonAPI/DBus/DBusProxy.hpp> -#include <CommonAPI/DBus/DBusProxyManager.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -#include <string> - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { - -class RootInterfaceDBusProxy - : virtual public RootInterfaceProxyBase, - virtual public CommonAPI::DBus::DBusProxy { -public: - RootInterfaceDBusProxy( - const CommonAPI::DBus::DBusAddress &_address, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection); - - virtual ~RootInterfaceDBusProxy() { } - - - - 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); - virtual std::future<CommonAPI::CallStatus> testRootMethodAsync(const int32_t &_inInt, const std::string &_inString, TestRootMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info); - - virtual CommonAPI::ProxyManager& getProxyManagerLeafInterface(); - virtual CommonAPI::ProxyManager& getProxyManagerBranchInterface(); - - virtual void getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const; - -private: - - - - CommonAPI::DBus::DBusProxyManager proxyManagerLeafInterface_; - CommonAPI::DBus::DBusProxyManager proxyManagerBranchInterface_; -}; - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1_0 - -#endif // COMMONAPI_TESTS_MANAGED_Root_Interface_DBUS_PROXY_HPP_ - diff --git a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/RootInterfaceDBusStubAdapter.cpp b/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/RootInterfaceDBusStubAdapter.cpp deleted file mode 100644 index c414d4c..0000000 --- a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/RootInterfaceDBusStubAdapter.cpp +++ /dev/null @@ -1,229 +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/RootInterface.hpp> -#include <v1_0/commonapi/tests/managed/RootInterfaceDBusStubAdapter.hpp> - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { - -std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> createRootInterfaceDBusStubAdapter( - const CommonAPI::DBus::DBusAddress &_address, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection, - const std::shared_ptr<CommonAPI::StubBase> &_stub) { - return std::make_shared<RootInterfaceDBusStubAdapter>(_address, _connection, _stub); -} - -INITIALIZER(registerRootInterfaceDBusStubAdapter) { - CommonAPI::DBus::Factory::get()->registerStubAdapterCreateMethod( - RootInterface::getInterface(), &createRootInterfaceDBusStubAdapter); -} - -RootInterfaceDBusStubAdapterInternal::~RootInterfaceDBusStubAdapterInternal() { - deactivateManagedInstances(); - RootInterfaceDBusStubAdapterHelper::deinit(); -} - -void RootInterfaceDBusStubAdapterInternal::deactivateManagedInstances() { - std::set<std::string>::iterator iter; - std::set<std::string>::iterator iterNext; - - iter = registeredLeafInterfaceInstances.begin(); - while (iter != registeredLeafInterfaceInstances.end()) { - iterNext = std::next(iter); - - if (deregisterManagedStubLeafInterface(*iter)) { - iter = iterNext; - } - else { - iter++; - } - } - iter = registeredBranchInterfaceInstances.begin(); - while (iter != registeredBranchInterfaceInstances.end()) { - iterNext = std::next(iter); - - if (deregisterManagedStubBranchInterface(*iter)) { - iter = iterNext; - } - else { - iter++; - } - } -} - -const char* RootInterfaceDBusStubAdapterInternal::getMethodsDBusIntrospectionXmlData() const { - static const std::string introspectionData = - "<method name=\"getInterfaceVersion\">\n" - "<arg name=\"value\" type=\"uu\" direction=\"out\" />" - "</method>\n" - "<method name=\"testRootMethod\">\n" - "<arg name=\"_inInt\" type=\"i\" direction=\"in\" />\n" - "<arg name=\"_inString\" type=\"s\" direction=\"in\" />\n" - "<arg name=\"_error\" type=\"i\" direction=\"out\" />\n" - "<arg name=\"_outInt\" type=\"i\" direction=\"out\" />\n" - "<arg name=\"_outString\" type=\"s\" direction=\"out\" />\n" - "</method>\n" - - ; - return introspectionData.c_str(); -} - -CommonAPI::DBus::DBusGetAttributeStubDispatcher< - RootInterfaceStub, - CommonAPI::Version - > RootInterfaceDBusStubAdapterInternal::getRootInterfaceInterfaceVersionStubDispatcher(&RootInterfaceStub::getInterfaceVersion, "uu"); - - - - -CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< - RootInterfaceStub, - std::tuple<int32_t, std::string>, - std::tuple<RootInterface::testRootMethodError, int32_t, std::string>, - std::tuple<CommonAPI::EmptyDeployment, CommonAPI::DBus::StringDeployment>, - std::tuple<CommonAPI::EmptyDeployment, CommonAPI::EmptyDeployment, CommonAPI::DBus::StringDeployment> - - > RootInterfaceDBusStubAdapterInternal::testRootMethodStubDispatcher( - &RootInterfaceStub::testRootMethod, "iis", - std::make_tuple(static_cast<CommonAPI::EmptyDeployment*>(nullptr), static_cast<CommonAPI::DBus::StringDeployment*>(nullptr)), - std::make_tuple(static_cast<CommonAPI::EmptyDeployment *>(nullptr), static_cast<CommonAPI::EmptyDeployment*>(nullptr), static_cast<CommonAPI::DBus::StringDeployment*>(nullptr))); - - - - - -const RootInterfaceDBusStubAdapterHelper::StubDispatcherTable& RootInterfaceDBusStubAdapterInternal::getStubDispatcherTable() { - return stubDispatcherTable_; -} - -const CommonAPI::DBus::StubAttributeTable& RootInterfaceDBusStubAdapterInternal::getStubAttributeTable() { - return stubAttributeTable_; -} -bool RootInterfaceDBusStubAdapterInternal::registerManagedStubLeafInterface(std::shared_ptr<LeafInterfaceStub> _stub, const std::string &_instance) { - if (registeredLeafInterfaceInstances.find(_instance) == registeredLeafInterfaceInstances.end()) { - std::string itsAddress = "local:commonapi.tests.managed.LeafInterface:" + _instance; - CommonAPI::DBus::DBusAddress itsDBusAddress; - CommonAPI::DBus::DBusAddressTranslator::get()->translate(itsAddress, itsDBusAddress); - - std::string objectPath(itsDBusAddress.getObjectPath()); - std::string adapterObjectPath(getDBusAddress().getObjectPath()); - - if (objectPath.compare(0, adapterObjectPath.length(), adapterObjectPath) == 0) { - std::shared_ptr<CommonAPI::DBus::Factory> itsFactory = CommonAPI::DBus::Factory::get(); - - auto stubAdapter = itsFactory->createDBusStubAdapter(_stub, "commonapi.tests.managed.LeafInterface", itsDBusAddress, connection_); - bool isRegistered = itsFactory->registerManagedService(stubAdapter); - if (isRegistered) { - bool isExported = connection_->getDBusObjectManager()->exportManagedDBusStubAdapter(adapterObjectPath, stubAdapter); - if (isExported) { - registeredLeafInterfaceInstances.insert(_instance); - return true; - } else { - itsFactory->unregisterManagedService(itsAddress); - } - } - } - } - return false; -} - -bool RootInterfaceDBusStubAdapterInternal::deregisterManagedStubLeafInterface(const std::string &_instance) { - std::string itsAddress = "local:commonapi.tests.managed.LeafInterface:" + _instance; - if (registeredLeafInterfaceInstances.find(_instance) != registeredLeafInterfaceInstances.end()) { - std::shared_ptr<CommonAPI::DBus::Factory> itsFactory = CommonAPI::DBus::Factory::get(); - std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> stubAdapter - = itsFactory->getRegisteredService(itsAddress); - if (stubAdapter) { - connection_->getDBusObjectManager()->unexportManagedDBusStubAdapter( - getDBusAddress().getObjectPath(), stubAdapter); - itsFactory->unregisterManagedService(itsAddress); - registeredLeafInterfaceInstances.erase(_instance); - return true; - } - } - return false; -} - -std::set<std::string>& RootInterfaceDBusStubAdapterInternal::getLeafInterfaceInstances() { - return registeredLeafInterfaceInstances; -} -bool RootInterfaceDBusStubAdapterInternal::registerManagedStubBranchInterface(std::shared_ptr<BranchInterfaceStub> _stub, const std::string &_instance) { - if (registeredBranchInterfaceInstances.find(_instance) == registeredBranchInterfaceInstances.end()) { - std::string itsAddress = "local:commonapi.tests.managed.BranchInterface:" + _instance; - CommonAPI::DBus::DBusAddress itsDBusAddress; - CommonAPI::DBus::DBusAddressTranslator::get()->translate(itsAddress, itsDBusAddress); - - std::string objectPath(itsDBusAddress.getObjectPath()); - std::string adapterObjectPath(getDBusAddress().getObjectPath()); - - if (objectPath.compare(0, adapterObjectPath.length(), adapterObjectPath) == 0) { - std::shared_ptr<CommonAPI::DBus::Factory> itsFactory = CommonAPI::DBus::Factory::get(); - - auto stubAdapter = itsFactory->createDBusStubAdapter(_stub, "commonapi.tests.managed.BranchInterface", itsDBusAddress, connection_); - bool isRegistered = itsFactory->registerManagedService(stubAdapter); - if (isRegistered) { - bool isExported = connection_->getDBusObjectManager()->exportManagedDBusStubAdapter(adapterObjectPath, stubAdapter); - if (isExported) { - registeredBranchInterfaceInstances.insert(_instance); - return true; - } else { - itsFactory->unregisterManagedService(itsAddress); - } - } - } - } - return false; -} - -bool RootInterfaceDBusStubAdapterInternal::deregisterManagedStubBranchInterface(const std::string &_instance) { - std::string itsAddress = "local:commonapi.tests.managed.BranchInterface:" + _instance; - if (registeredBranchInterfaceInstances.find(_instance) != registeredBranchInterfaceInstances.end()) { - std::shared_ptr<CommonAPI::DBus::Factory> itsFactory = CommonAPI::DBus::Factory::get(); - std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> stubAdapter - = itsFactory->getRegisteredService(itsAddress); - if (stubAdapter) { - connection_->getDBusObjectManager()->unexportManagedDBusStubAdapter( - getDBusAddress().getObjectPath(), stubAdapter); - itsFactory->unregisterManagedService(itsAddress); - registeredBranchInterfaceInstances.erase(_instance); - return true; - } - } - return false; -} - -std::set<std::string>& RootInterfaceDBusStubAdapterInternal::getBranchInterfaceInstances() { - return registeredBranchInterfaceInstances; -} - -RootInterfaceDBusStubAdapterInternal::RootInterfaceDBusStubAdapterInternal( - const CommonAPI::DBus::DBusAddress &_address, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection, - const std::shared_ptr<CommonAPI::StubBase> &_stub) - : CommonAPI::DBus::DBusStubAdapter(_address, _connection,true), - RootInterfaceDBusStubAdapterHelper(_address, _connection, std::dynamic_pointer_cast<RootInterfaceStub>(_stub), true), - stubDispatcherTable_({ - { { "testRootMethod", "is" }, &commonapi::tests::managed::RootInterfaceDBusStubAdapterInternal::testRootMethodStubDispatcher } - }), - stubAttributeTable_() { - - stubDispatcherTable_.insert({ { "getInterfaceVersion", "" }, &commonapi::tests::managed::RootInterfaceDBusStubAdapterInternal::getRootInterfaceInterfaceVersionStubDispatcher }); -} - -const bool RootInterfaceDBusStubAdapterInternal::hasFreedesktopProperties() { - return false; -} - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1_0 diff --git a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/RootInterfaceDBusStubAdapter.hpp b/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/RootInterfaceDBusStubAdapter.hpp deleted file mode 100644 index d50ebe4..0000000 --- a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/RootInterfaceDBusStubAdapter.hpp +++ /dev/null @@ -1,119 +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_DBUS_STUB_ADAPTER_HPP_ -#define COMMONAPI_TESTS_MANAGED_Root_Interface_DBUS_STUB_ADAPTER_HPP_ - -#include <v1_0/commonapi/tests/managed/RootInterfaceStub.hpp> -#include "v1_0/commonapi/tests/managed/RootInterfaceDBusDeployment.hpp" - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <CommonAPI/DBus/DBusAddressTranslator.hpp> -#include <CommonAPI/DBus/DBusFactory.hpp> -#include <CommonAPI/DBus/DBusObjectManager.hpp> -#include <CommonAPI/DBus/DBusStubAdapterHelper.hpp> -#include <CommonAPI/DBus/DBusStubAdapter.hpp> -#include <CommonAPI/DBus/DBusDeployment.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { - -typedef CommonAPI::DBus::DBusStubAdapterHelper<RootInterfaceStub> RootInterfaceDBusStubAdapterHelper; - -class RootInterfaceDBusStubAdapterInternal - : public virtual RootInterfaceStubAdapter, - public RootInterfaceDBusStubAdapterHelper -{ -public: - RootInterfaceDBusStubAdapterInternal( - const CommonAPI::DBus::DBusAddress &_address, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection, - const std::shared_ptr<CommonAPI::StubBase> &_stub); - - ~RootInterfaceDBusStubAdapterInternal(); - - virtual const bool hasFreedesktopProperties(); - - - - bool registerManagedStubLeafInterface(std::shared_ptr<LeafInterfaceStub>, const std::string&); - bool deregisterManagedStubLeafInterface(const std::string&); - std::set<std::string>& getLeafInterfaceInstances(); - bool registerManagedStubBranchInterface(std::shared_ptr<BranchInterfaceStub>, const std::string&); - bool deregisterManagedStubBranchInterface(const std::string&); - std::set<std::string>& getBranchInterfaceInstances(); - - const RootInterfaceDBusStubAdapterHelper::StubDispatcherTable& getStubDispatcherTable(); - const CommonAPI::DBus::StubAttributeTable& getStubAttributeTable(); - - void deactivateManagedInstances(); - - -static CommonAPI::DBus::DBusGetAttributeStubDispatcher< - RootInterfaceStub, - CommonAPI::Version - > getRootInterfaceInterfaceVersionStubDispatcher; - - - - -static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< - RootInterfaceStub, - std::tuple<int32_t, std::string>, - std::tuple<RootInterface::testRootMethodError, int32_t, std::string>, - std::tuple<CommonAPI::EmptyDeployment, CommonAPI::DBus::StringDeployment>, - std::tuple<CommonAPI::EmptyDeployment, CommonAPI::EmptyDeployment, CommonAPI::DBus::StringDeployment> - - > testRootMethodStubDispatcher; - - - - - protected: - virtual const char* getMethodsDBusIntrospectionXmlData() const; - - private: - std::set<std::string> registeredLeafInterfaceInstances; - std::set<std::string> registeredBranchInterfaceInstances; - RootInterfaceDBusStubAdapterHelper::StubDispatcherTable stubDispatcherTable_; - CommonAPI::DBus::StubAttributeTable stubAttributeTable_; -}; - -class RootInterfaceDBusStubAdapter - : public RootInterfaceDBusStubAdapterInternal, - public std::enable_shared_from_this<RootInterfaceDBusStubAdapter> { -public: - RootInterfaceDBusStubAdapter( - const CommonAPI::DBus::DBusAddress &_address, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection, - const std::shared_ptr<CommonAPI::StubBase> &_stub) - : CommonAPI::DBus::DBusStubAdapter( - _address, - _connection, - true), - RootInterfaceDBusStubAdapterInternal( - _address, - _connection, - _stub) { - } -}; - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1_0 - -#endif // COMMONAPI_TESTS_MANAGED_Root_Interface_DBUS_STUB_ADAPTER_HPP_ diff --git a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/SecondRootDBusDeployment.cpp b/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/SecondRootDBusDeployment.cpp deleted file mode 100644 index 855d2af..0000000 --- a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/SecondRootDBusDeployment.cpp +++ /dev/null @@ -1,30 +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 "SecondRootDBusDeployment.hpp" - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { -namespace SecondRoot_ { - -// Type-specific deployments - -// Attribute-specific deployments - -// Argument-specific deployments - -// Broadcast-specific deployments - -} // namespace SecondRoot_ -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1_0 diff --git a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/SecondRootDBusDeployment.hpp b/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/SecondRootDBusDeployment.hpp deleted file mode 100644 index d328176..0000000 --- a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/SecondRootDBusDeployment.hpp +++ /dev/null @@ -1,45 +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_DBUS_SECONDROOT_DEPLOYMENT_HPP_ -#define COMMONAPI_DBUS_SECONDROOT_DEPLOYMENT_HPP_ - - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif -#include <CommonAPI/DBus/DBusDeployment.hpp> -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { -namespace SecondRoot_ { - -// Interface-specific deployment types - -// Type-specific deployments - -// Attribute-specific deployments - -// Argument-specific deployments - -// Broadcast-specific deployments - - -} // namespace SecondRoot_ -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1_0 - -#endif // COMMONAPI_DBUS_SECONDROOT_DEPLOYMENT_HPP_ diff --git a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/SecondRootDBusProxy.cpp b/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/SecondRootDBusProxy.cpp deleted file mode 100644 index 767912b..0000000 --- a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/SecondRootDBusProxy.cpp +++ /dev/null @@ -1,52 +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/SecondRootDBusProxy.hpp> - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { - -std::shared_ptr<CommonAPI::DBus::DBusProxy> createSecondRootDBusProxy( - const CommonAPI::DBus::DBusAddress &_address, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection) { - return std::make_shared<SecondRootDBusProxy>(_address, _connection); -} - -INITIALIZER(registerSecondRootDBusProxy) { - CommonAPI::DBus::Factory::get()->registerProxyCreateMethod( - SecondRoot::getInterface(), - &createSecondRootDBusProxy); -} - -SecondRootDBusProxy::SecondRootDBusProxy( - const CommonAPI::DBus::DBusAddress &_address, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection) - : CommonAPI::DBus::DBusProxy(_address, _connection) -, proxyManagerLeafInterface_(*this, "commonapi.tests.managed.LeafInterface") -{ -} - - - - - CommonAPI::ProxyManager& SecondRootDBusProxy::getProxyManagerLeafInterface() { - return proxyManagerLeafInterface_; - } - - void SecondRootDBusProxy::getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const { - ownVersionMajor = 1; - ownVersionMinor = 0; - } - - } // namespace managed - } // namespace tests - } // namespace commonapi - } // namespace v1_0 diff --git a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/SecondRootDBusProxy.hpp b/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/SecondRootDBusProxy.hpp deleted file mode 100644 index 82e6e06..0000000 --- a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/SecondRootDBusProxy.hpp +++ /dev/null @@ -1,63 +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_DBUS_PROXY_HPP_ -#define COMMONAPI_TESTS_MANAGED_Second_Root_DBUS_PROXY_HPP_ - -#include <v1_0/commonapi/tests/managed/SecondRootProxyBase.hpp> - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <CommonAPI/DBus/DBusAddress.hpp> -#include <CommonAPI/DBus/DBusFactory.hpp> -#include <CommonAPI/DBus/DBusProxy.hpp> -#include <CommonAPI/DBus/DBusProxyManager.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -#include <string> - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { - -class SecondRootDBusProxy - : virtual public SecondRootProxyBase, - virtual public CommonAPI::DBus::DBusProxy { -public: - SecondRootDBusProxy( - const CommonAPI::DBus::DBusAddress &_address, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection); - - virtual ~SecondRootDBusProxy() { } - - - - - virtual CommonAPI::ProxyManager& getProxyManagerLeafInterface(); - - virtual void getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const; - -private: - - - - CommonAPI::DBus::DBusProxyManager proxyManagerLeafInterface_; -}; - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1_0 - -#endif // COMMONAPI_TESTS_MANAGED_Second_Root_DBUS_PROXY_HPP_ - diff --git a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/SecondRootDBusStubAdapter.cpp b/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/SecondRootDBusStubAdapter.cpp deleted file mode 100644 index 36b8c10..0000000 --- a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/SecondRootDBusStubAdapter.cpp +++ /dev/null @@ -1,151 +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/SecondRoot.hpp> -#include <v1_0/commonapi/tests/managed/SecondRootDBusStubAdapter.hpp> - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { - -std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> createSecondRootDBusStubAdapter( - const CommonAPI::DBus::DBusAddress &_address, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection, - const std::shared_ptr<CommonAPI::StubBase> &_stub) { - return std::make_shared<SecondRootDBusStubAdapter>(_address, _connection, _stub); -} - -INITIALIZER(registerSecondRootDBusStubAdapter) { - CommonAPI::DBus::Factory::get()->registerStubAdapterCreateMethod( - SecondRoot::getInterface(), &createSecondRootDBusStubAdapter); -} - -SecondRootDBusStubAdapterInternal::~SecondRootDBusStubAdapterInternal() { - deactivateManagedInstances(); - SecondRootDBusStubAdapterHelper::deinit(); -} - -void SecondRootDBusStubAdapterInternal::deactivateManagedInstances() { - std::set<std::string>::iterator iter; - std::set<std::string>::iterator iterNext; - - iter = registeredLeafInterfaceInstances.begin(); - while (iter != registeredLeafInterfaceInstances.end()) { - iterNext = std::next(iter); - - if (deregisterManagedStubLeafInterface(*iter)) { - iter = iterNext; - } - else { - iter++; - } - } -} - -const char* SecondRootDBusStubAdapterInternal::getMethodsDBusIntrospectionXmlData() const { - static const std::string introspectionData = - "<method name=\"getInterfaceVersion\">\n" - "<arg name=\"value\" type=\"uu\" direction=\"out\" />" - "</method>\n" - - "" - ; - return introspectionData.c_str(); -} - -CommonAPI::DBus::DBusGetAttributeStubDispatcher< - SecondRootStub, - CommonAPI::Version - > SecondRootDBusStubAdapterInternal::getSecondRootInterfaceVersionStubDispatcher(&SecondRootStub::getInterfaceVersion, "uu"); - - - - - - - - -const SecondRootDBusStubAdapterHelper::StubDispatcherTable& SecondRootDBusStubAdapterInternal::getStubDispatcherTable() { - return stubDispatcherTable_; -} - -const CommonAPI::DBus::StubAttributeTable& SecondRootDBusStubAdapterInternal::getStubAttributeTable() { - return stubAttributeTable_; -} -bool SecondRootDBusStubAdapterInternal::registerManagedStubLeafInterface(std::shared_ptr<LeafInterfaceStub> _stub, const std::string &_instance) { - if (registeredLeafInterfaceInstances.find(_instance) == registeredLeafInterfaceInstances.end()) { - std::string itsAddress = "local:commonapi.tests.managed.LeafInterface:" + _instance; - CommonAPI::DBus::DBusAddress itsDBusAddress; - CommonAPI::DBus::DBusAddressTranslator::get()->translate(itsAddress, itsDBusAddress); - - std::string objectPath(itsDBusAddress.getObjectPath()); - std::string adapterObjectPath(getDBusAddress().getObjectPath()); - - if (objectPath.compare(0, adapterObjectPath.length(), adapterObjectPath) == 0) { - std::shared_ptr<CommonAPI::DBus::Factory> itsFactory = CommonAPI::DBus::Factory::get(); - - auto stubAdapter = itsFactory->createDBusStubAdapter(_stub, "commonapi.tests.managed.LeafInterface", itsDBusAddress, connection_); - bool isRegistered = itsFactory->registerManagedService(stubAdapter); - if (isRegistered) { - bool isExported = connection_->getDBusObjectManager()->exportManagedDBusStubAdapter(adapterObjectPath, stubAdapter); - if (isExported) { - registeredLeafInterfaceInstances.insert(_instance); - return true; - } else { - itsFactory->unregisterManagedService(itsAddress); - } - } - } - } - return false; -} - -bool SecondRootDBusStubAdapterInternal::deregisterManagedStubLeafInterface(const std::string &_instance) { - std::string itsAddress = "local:commonapi.tests.managed.LeafInterface:" + _instance; - if (registeredLeafInterfaceInstances.find(_instance) != registeredLeafInterfaceInstances.end()) { - std::shared_ptr<CommonAPI::DBus::Factory> itsFactory = CommonAPI::DBus::Factory::get(); - std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> stubAdapter - = itsFactory->getRegisteredService(itsAddress); - if (stubAdapter) { - connection_->getDBusObjectManager()->unexportManagedDBusStubAdapter( - getDBusAddress().getObjectPath(), stubAdapter); - itsFactory->unregisterManagedService(itsAddress); - registeredLeafInterfaceInstances.erase(_instance); - return true; - } - } - return false; -} - -std::set<std::string>& SecondRootDBusStubAdapterInternal::getLeafInterfaceInstances() { - return registeredLeafInterfaceInstances; -} - -SecondRootDBusStubAdapterInternal::SecondRootDBusStubAdapterInternal( - const CommonAPI::DBus::DBusAddress &_address, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection, - const std::shared_ptr<CommonAPI::StubBase> &_stub) - : CommonAPI::DBus::DBusStubAdapter(_address, _connection,true), - SecondRootDBusStubAdapterHelper(_address, _connection, std::dynamic_pointer_cast<SecondRootStub>(_stub), true), - stubDispatcherTable_({ - }), - stubAttributeTable_() { - - stubDispatcherTable_.insert({ { "getInterfaceVersion", "" }, &commonapi::tests::managed::SecondRootDBusStubAdapterInternal::getSecondRootInterfaceVersionStubDispatcher }); -} - -const bool SecondRootDBusStubAdapterInternal::hasFreedesktopProperties() { - return false; -} - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1_0 diff --git a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/SecondRootDBusStubAdapter.hpp b/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/SecondRootDBusStubAdapter.hpp deleted file mode 100644 index eaf9944..0000000 --- a/src/test/src-gen/dbus/v1_0/commonapi/tests/managed/SecondRootDBusStubAdapter.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_Second_Root_DBUS_STUB_ADAPTER_HPP_ -#define COMMONAPI_TESTS_MANAGED_Second_Root_DBUS_STUB_ADAPTER_HPP_ - -#include <v1_0/commonapi/tests/managed/SecondRootStub.hpp> -#include "v1_0/commonapi/tests/managed/SecondRootDBusDeployment.hpp" - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <CommonAPI/DBus/DBusAddressTranslator.hpp> -#include <CommonAPI/DBus/DBusFactory.hpp> -#include <CommonAPI/DBus/DBusObjectManager.hpp> -#include <CommonAPI/DBus/DBusStubAdapterHelper.hpp> -#include <CommonAPI/DBus/DBusStubAdapter.hpp> -#include <CommonAPI/DBus/DBusDeployment.hpp> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace v1_0 { -namespace commonapi { -namespace tests { -namespace managed { - -typedef CommonAPI::DBus::DBusStubAdapterHelper<SecondRootStub> SecondRootDBusStubAdapterHelper; - -class SecondRootDBusStubAdapterInternal - : public virtual SecondRootStubAdapter, - public SecondRootDBusStubAdapterHelper -{ -public: - SecondRootDBusStubAdapterInternal( - const CommonAPI::DBus::DBusAddress &_address, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection, - const std::shared_ptr<CommonAPI::StubBase> &_stub); - - ~SecondRootDBusStubAdapterInternal(); - - virtual const bool hasFreedesktopProperties(); - - - - bool registerManagedStubLeafInterface(std::shared_ptr<LeafInterfaceStub>, const std::string&); - bool deregisterManagedStubLeafInterface(const std::string&); - std::set<std::string>& getLeafInterfaceInstances(); - - const SecondRootDBusStubAdapterHelper::StubDispatcherTable& getStubDispatcherTable(); - const CommonAPI::DBus::StubAttributeTable& getStubAttributeTable(); - - void deactivateManagedInstances(); - - -static CommonAPI::DBus::DBusGetAttributeStubDispatcher< - SecondRootStub, - CommonAPI::Version - > getSecondRootInterfaceVersionStubDispatcher; - - - - - - - - protected: - virtual const char* getMethodsDBusIntrospectionXmlData() const; - - private: - std::set<std::string> registeredLeafInterfaceInstances; - SecondRootDBusStubAdapterHelper::StubDispatcherTable stubDispatcherTable_; - CommonAPI::DBus::StubAttributeTable stubAttributeTable_; -}; - -class SecondRootDBusStubAdapter - : public SecondRootDBusStubAdapterInternal, - public std::enable_shared_from_this<SecondRootDBusStubAdapter> { -public: - SecondRootDBusStubAdapter( - const CommonAPI::DBus::DBusAddress &_address, - const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection, - const std::shared_ptr<CommonAPI::StubBase> &_stub) - : CommonAPI::DBus::DBusStubAdapter( - _address, - _connection, - true), - SecondRootDBusStubAdapterInternal( - _address, - _connection, - _stub) { - } -}; - -} // namespace managed -} // namespace tests -} // namespace commonapi -} // namespace v1_0 - -#endif // COMMONAPI_TESTS_MANAGED_Second_Root_DBUS_STUB_ADAPTER_HPP_ |