diff options
Diffstat (limited to 'src/test/src-gen/dbus/v1/commonapi')
54 files changed, 5801 insertions, 0 deletions
diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/ExtendedInterfaceDBusDeployment.cpp b/src/test/src-gen/dbus/v1/commonapi/tests/ExtendedInterfaceDBusDeployment.cpp new file mode 100644 index 0000000..5350a38 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/ExtendedInterfaceDBusDeployment.cpp @@ -0,0 +1,28 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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 "ExtendedInterfaceDBusDeployment.hpp" + +namespace v1 { +namespace commonapi { +namespace tests { +namespace ExtendedInterface_ { + +// Type-specific deployments + +// Attribute-specific deployments + +// Argument-specific deployments + +// Broadcast-specific deployments + +} // namespace ExtendedInterface_ +} // namespace tests +} // namespace commonapi +} // namespace v1 diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/ExtendedInterfaceDBusDeployment.hpp b/src/test/src-gen/dbus/v1/commonapi/tests/ExtendedInterfaceDBusDeployment.hpp new file mode 100644 index 0000000..3cae58f --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/ExtendedInterfaceDBusDeployment.hpp @@ -0,0 +1,43 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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_EXTENDEDINTERFACE_DEPLOYMENT_HPP_ +#define COMMONAPI_DBUS_EXTENDEDINTERFACE_DEPLOYMENT_HPP_ + + + +#if !defined (COMMONAPI_INTERNAL_COMPILATION) +#define COMMONAPI_INTERNAL_COMPILATION +#endif +#include <CommonAPI/DBus/DBusDeployment.hpp> +#undef COMMONAPI_INTERNAL_COMPILATION + +namespace v1 { +namespace commonapi { +namespace tests { +namespace ExtendedInterface_ { + +// Interface-specific deployment types + +// Type-specific deployments + +// Attribute-specific deployments + +// Argument-specific deployments + +// Broadcast-specific deployments + + +} // namespace ExtendedInterface_ +} // namespace tests +} // namespace commonapi +} // namespace v1 + +#endif // COMMONAPI_DBUS_EXTENDEDINTERFACE_DEPLOYMENT_HPP_ diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/ExtendedInterfaceDBusProxy.cpp b/src/test/src-gen/dbus/v1/commonapi/tests/ExtendedInterfaceDBusProxy.cpp new file mode 100644 index 0000000..1dacb44 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/ExtendedInterfaceDBusProxy.cpp @@ -0,0 +1,83 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* Used org.franca.core 0.9.1.201412191134. +* +* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +* If a copy of the MPL was not distributed with this file, You can obtain one at +* http://mozilla.org/MPL/2.0/. +*/ +#include <v1/commonapi/tests/ExtendedInterfaceDBusProxy.hpp> + +namespace v1 { +namespace commonapi { +namespace tests { + +std::shared_ptr<CommonAPI::DBus::DBusProxy> createExtendedInterfaceDBusProxy( + const CommonAPI::DBus::DBusAddress &_address, + const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection) { + return std::make_shared<ExtendedInterfaceDBusProxy>(_address, _connection); +} + +INITIALIZER(registerExtendedInterfaceDBusProxy) { + CommonAPI::DBus::Factory::get()->registerProxyCreateMethod( + ExtendedInterface::getInterface(), + &createExtendedInterfaceDBusProxy); +} + +ExtendedInterfaceDBusProxy::ExtendedInterfaceDBusProxy( + const CommonAPI::DBus::DBusAddress &_address, + const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection) + : CommonAPI::DBus::DBusProxy(_address, _connection), + TestInterfaceDBusProxy(_address, _connection) +{ +} + + + + void ExtendedInterfaceDBusProxy::TestIntMethodExtended(const uint32_t &_inInt, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info) { + CommonAPI::Deployable<uint32_t, CommonAPI::EmptyDeployment> deploy_inInt(_inInt, static_cast<CommonAPI::EmptyDeployment*>(nullptr)); + CommonAPI::DBus::DBusProxyHelper< + CommonAPI::DBus::DBusSerializableArguments< + CommonAPI::Deployable<uint32_t, CommonAPI::EmptyDeployment > + >, + CommonAPI::DBus::DBusSerializableArguments< + > + >::callMethodWithReply( + *this, + "TestIntMethodExtended", + "u", +(_info ? _info : &CommonAPI::DBus::defaultCallInfo), +deploy_inInt, +_internalCallStatus); +} + std::future<CommonAPI::CallStatus> ExtendedInterfaceDBusProxy::TestIntMethodExtendedAsync(const uint32_t &_inInt, TestIntMethodExtendedAsyncCallback _callback, const CommonAPI::CallInfo *_info) { + CommonAPI::Deployable<uint32_t, CommonAPI::EmptyDeployment> deploy_inInt(_inInt, static_cast<CommonAPI::EmptyDeployment*>(nullptr)); + return CommonAPI::DBus::DBusProxyHelper< + CommonAPI::DBus::DBusSerializableArguments< + CommonAPI::Deployable<uint32_t, CommonAPI::EmptyDeployment > + >, + CommonAPI::DBus::DBusSerializableArguments< + > + >::callMethodAsync( + *this, + "TestIntMethodExtended", + "u", + (_info ? _info : &CommonAPI::DBus::defaultCallInfo), + deploy_inInt, + [_callback] (CommonAPI::CallStatus _internalCallStatus) { + if (_callback) + _callback(_internalCallStatus); + }, + std::make_tuple()); + } + + +void ExtendedInterfaceDBusProxy::getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const { + ownVersionMajor = 1; + ownVersionMinor = 0; + } + + } // namespace tests + } // namespace commonapi + } // namespace v1 diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/ExtendedInterfaceDBusProxy.hpp b/src/test/src-gen/dbus/v1/commonapi/tests/ExtendedInterfaceDBusProxy.hpp new file mode 100644 index 0000000..f4ba72f --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/ExtendedInterfaceDBusProxy.hpp @@ -0,0 +1,63 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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_Extended_Interface_DBUS_PROXY_HPP_ +#define COMMONAPI_TESTS_Extended_Interface_DBUS_PROXY_HPP_ + +#include <v1/commonapi/tests/ExtendedInterfaceProxyBase.hpp> +#include <v1/commonapi/tests/TestInterfaceDBusProxy.hpp> +#include "v1/commonapi/tests/ExtendedInterfaceDBusDeployment.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/DBusAddressTranslator.hpp> + +#undef COMMONAPI_INTERNAL_COMPILATION + +#include <string> + +namespace v1 { +namespace commonapi { +namespace tests { + +class ExtendedInterfaceDBusProxy + : virtual public ExtendedInterfaceProxyBase, + virtual public TestInterfaceDBusProxy { +public: + ExtendedInterfaceDBusProxy( + const CommonAPI::DBus::DBusAddress &_address, + const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection); + + virtual ~ExtendedInterfaceDBusProxy() { } + + + + virtual void TestIntMethodExtended(const uint32_t &_inInt, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info); + virtual std::future<CommonAPI::CallStatus> TestIntMethodExtendedAsync(const uint32_t &_inInt, TestIntMethodExtendedAsyncCallback _callback, const CommonAPI::CallInfo *_info); + + + virtual void getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const; + +private: + + + +}; + +} // namespace tests +} // namespace commonapi +} // namespace v1 + +#endif // COMMONAPI_TESTS_Extended_Interface_DBUS_PROXY_HPP_ + diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/ExtendedInterfaceDBusStubAdapter.cpp b/src/test/src-gen/dbus/v1/commonapi/tests/ExtendedInterfaceDBusStubAdapter.cpp new file mode 100644 index 0000000..cb579a5 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/ExtendedInterfaceDBusStubAdapter.cpp @@ -0,0 +1,339 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* Used org.franca.core 0.9.1.201412191134. +* +* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +* If a copy of the MPL was not distributed with this file, You can obtain one at +* http://mozilla.org/MPL/2.0/. +*/ +#include <v1/commonapi/tests/ExtendedInterface.hpp> +#include <v1/commonapi/tests/ExtendedInterfaceDBusStubAdapter.hpp> + +namespace v1 { +namespace commonapi { +namespace tests { + +std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> createExtendedInterfaceDBusStubAdapter( + const CommonAPI::DBus::DBusAddress &_address, + const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection, + const std::shared_ptr<CommonAPI::StubBase> &_stub) { + return std::make_shared<ExtendedInterfaceDBusStubAdapter>(_address, _connection, _stub); +} + +INITIALIZER(registerExtendedInterfaceDBusStubAdapter) { + CommonAPI::DBus::Factory::get()->registerStubAdapterCreateMethod( + ExtendedInterface::getInterface(), &createExtendedInterfaceDBusStubAdapter); +} + +ExtendedInterfaceDBusStubAdapterInternal::~ExtendedInterfaceDBusStubAdapterInternal() { + deactivateManagedInstances(); + ExtendedInterfaceDBusStubAdapterHelper::deinit(); +} + +void ExtendedInterfaceDBusStubAdapterInternal::deactivateManagedInstances() { + +} + +const char* ExtendedInterfaceDBusStubAdapterInternal::getMethodsDBusIntrospectionXmlData() const { + static const std::string introspectionData = + std::string(TestInterfaceDBusStubAdapterInternal::getMethodsDBusIntrospectionXmlData()) + + "<method name=\"TestIntMethodExtended\">\n" + "<arg name=\"_inInt\" type=\"u\" direction=\"in\" />\n" + "</method>\n" + + ; + return introspectionData.c_str(); +} + +CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + CommonAPI::Version + > ExtendedInterfaceDBusStubAdapterInternal::getExtendedInterfaceInterfaceVersionStubDispatcher(&ExtendedInterfaceStub::getInterfaceVersion, "uu"); + + +#ifdef WIN32 +CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + uint32_t + > ExtendedInterfaceDBusStubAdapterInternal::getTestPredefinedTypeAttributeAttributeStubDispatcher( + &::v1::commonapi::tests::ExtendedInterfaceStub::getTestPredefinedTypeAttributeAttribute + , "u" + ); +CommonAPI::DBus::DBusSetObservableAttributeStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + uint32_t + > ExtendedInterfaceDBusStubAdapterInternal::setTestPredefinedTypeAttributeAttributeStubDispatcher( + &::v1::commonapi::tests::ExtendedInterfaceStub::getTestPredefinedTypeAttributeAttribute, + &ExtendedInterfaceStubRemoteEvent::onRemoteSetTestPredefinedTypeAttributeAttribute, + &ExtendedInterfaceStubRemoteEvent::onRemoteTestPredefinedTypeAttributeAttributeChanged + ,&ExtendedInterfaceStubAdapter::fireTestPredefinedTypeAttributeAttributeChanged + ,"u" + ); +CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestStructExtended, + ::commonapi::tests::DerivedTypeCollection_::TestStructExtendedDeployment_t + > ExtendedInterfaceDBusStubAdapterInternal::getTestDerivedStructAttributeAttributeStubDispatcher( + &::v1::commonapi::tests::ExtendedInterfaceStub::getTestDerivedStructAttributeAttribute + , "(sqi)" + ); +CommonAPI::DBus::DBusSetObservableAttributeStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestStructExtended, + ::commonapi::tests::DerivedTypeCollection_::TestStructExtendedDeployment_t + > ExtendedInterfaceDBusStubAdapterInternal::setTestDerivedStructAttributeAttributeStubDispatcher( + &::v1::commonapi::tests::ExtendedInterfaceStub::getTestDerivedStructAttributeAttribute, + &ExtendedInterfaceStubRemoteEvent::onRemoteSetTestDerivedStructAttributeAttribute, + &ExtendedInterfaceStubRemoteEvent::onRemoteTestDerivedStructAttributeAttributeChanged + ,&ExtendedInterfaceStubAdapter::fireTestDerivedStructAttributeAttributeChanged + ,"(sqi)" + ); +CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64, + ::commonapi::tests::DerivedTypeCollection_::TestArrayUInt64Deployment_t + > ExtendedInterfaceDBusStubAdapterInternal::getTestDerivedArrayAttributeAttributeStubDispatcher( + &::v1::commonapi::tests::ExtendedInterfaceStub::getTestDerivedArrayAttributeAttribute + , "at" + ); +CommonAPI::DBus::DBusSetObservableAttributeStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64, + ::commonapi::tests::DerivedTypeCollection_::TestArrayUInt64Deployment_t + > ExtendedInterfaceDBusStubAdapterInternal::setTestDerivedArrayAttributeAttributeStubDispatcher( + &::v1::commonapi::tests::ExtendedInterfaceStub::getTestDerivedArrayAttributeAttribute, + &ExtendedInterfaceStubRemoteEvent::onRemoteSetTestDerivedArrayAttributeAttribute, + &ExtendedInterfaceStubRemoteEvent::onRemoteTestDerivedArrayAttributeAttributeChanged + ,&ExtendedInterfaceStubAdapter::fireTestDerivedArrayAttributeAttributeChanged + ,"at" + ); +#endif + + +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + std::tuple<uint32_t>, + std::tuple<>, + std::tuple<CommonAPI::EmptyDeployment>, + std::tuple<> + + > ExtendedInterfaceDBusStubAdapterInternal::testIntMethodExtendedStubDispatcher( + &ExtendedInterfaceStub::TestIntMethodExtended, "", + std::make_tuple(static_cast<CommonAPI::EmptyDeployment*>(nullptr)), + std::make_tuple()); + +#ifdef WIN32 + +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + std::tuple<>, + std::tuple<>, + std::tuple<>, + std::tuple<> + + > ExtendedInterfaceDBusStubAdapterInternal::testEmptyMethodStubDispatcher( + &ExtendedInterfaceStub::testEmptyMethod, "", + std::make_tuple(), + std::make_tuple()); + +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + std::tuple<uint32_t, std::string>, + std::tuple<>, + std::tuple<CommonAPI::EmptyDeployment, CommonAPI::DBus::StringDeployment>, + std::tuple<> + + > ExtendedInterfaceDBusStubAdapterInternal::testVoidPredefinedTypeMethodStubDispatcher( + &ExtendedInterfaceStub::testVoidPredefinedTypeMethod, "", + std::make_tuple(static_cast<CommonAPI::EmptyDeployment*>(nullptr), static_cast<CommonAPI::DBus::StringDeployment*>(nullptr)), + std::make_tuple()); + +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + std::tuple<uint32_t, std::string>, + std::tuple<uint32_t, std::string>, + std::tuple<CommonAPI::EmptyDeployment, CommonAPI::DBus::StringDeployment>, + std::tuple<CommonAPI::EmptyDeployment, CommonAPI::DBus::StringDeployment> + + > ExtendedInterfaceDBusStubAdapterInternal::testPredefinedTypeMethodStubDispatcher( + &ExtendedInterfaceStub::testPredefinedTypeMethod, "us", + 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::DBus::StringDeployment*>(nullptr))); + +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + std::tuple<::commonapi::tests::DerivedTypeCollection::TestEnumExtended2, ::commonapi::tests::DerivedTypeCollection::TestMap>, + std::tuple<>, + std::tuple<CommonAPI::EmptyDeployment, ::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t>, + std::tuple<> + + > ExtendedInterfaceDBusStubAdapterInternal::testVoidDerivedTypeMethodStubDispatcher( + &ExtendedInterfaceStub::testVoidDerivedTypeMethod, "", + std::make_tuple(static_cast<CommonAPI::EmptyDeployment*>(nullptr), static_cast<::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t*>(nullptr)), + std::make_tuple()); + +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + std::tuple<::commonapi::tests::DerivedTypeCollection::TestEnumExtended2, ::commonapi::tests::DerivedTypeCollection::TestMap>, + std::tuple<::commonapi::tests::DerivedTypeCollection::TestEnumExtended2, ::commonapi::tests::DerivedTypeCollection::TestMap>, + std::tuple<CommonAPI::EmptyDeployment, ::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t>, + std::tuple<CommonAPI::EmptyDeployment, ::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t> + + > ExtendedInterfaceDBusStubAdapterInternal::testDerivedTypeMethodStubDispatcher( + &ExtendedInterfaceStub::testDerivedTypeMethod, "ia{ua(sq)}", + std::make_tuple(static_cast<CommonAPI::EmptyDeployment*>(nullptr), static_cast<::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t*>(nullptr)), + std::make_tuple(static_cast<CommonAPI::EmptyDeployment*>(nullptr), static_cast<::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t*>(nullptr))); + +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + std::tuple<std::vector<std::shared_ptr<::commonapi::tests::DerivedTypeCollection::TestPolymorphicStruct>>>, + std::tuple<>, + std::tuple<CommonAPI::DBus::ArrayDeployment<::commonapi::tests::DerivedTypeCollection_::TestPolymorphicStructDeployment_t>>, + std::tuple<> + + > ExtendedInterfaceDBusStubAdapterInternal::testArrayOfPolymorphicStructMethodStubDispatcher( + &ExtendedInterfaceStub::TestArrayOfPolymorphicStructMethod, "", + std::make_tuple(static_cast<CommonAPI::DBus::ArrayDeployment<::commonapi::tests::DerivedTypeCollection_::TestPolymorphicStructDeployment_t>*>(nullptr)), + std::make_tuple()); + +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + std::tuple<::commonapi::tests::DerivedTypeCollection::MapIntToPolymorphic>, + std::tuple<>, + std::tuple<::commonapi::tests::DerivedTypeCollection_::MapIntToPolymorphicDeployment_t>, + std::tuple<> + + > ExtendedInterfaceDBusStubAdapterInternal::testMapOfPolymorphicStructMethodStubDispatcher( + &ExtendedInterfaceStub::TestMapOfPolymorphicStructMethod, "", + std::make_tuple(static_cast<::commonapi::tests::DerivedTypeCollection_::MapIntToPolymorphicDeployment_t*>(nullptr)), + std::make_tuple()); + +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + std::tuple<::commonapi::tests::DerivedTypeCollection::StructWithPolymorphicMember>, + std::tuple<>, + std::tuple<::commonapi::tests::DerivedTypeCollection_::StructWithPolymorphicMemberDeployment_t>, + std::tuple<> + + > ExtendedInterfaceDBusStubAdapterInternal::testStructWithPolymorphicMemberMethodStubDispatcher( + &ExtendedInterfaceStub::TestStructWithPolymorphicMemberMethod, "", + std::make_tuple(static_cast<::commonapi::tests::DerivedTypeCollection_::StructWithPolymorphicMemberDeployment_t*>(nullptr)), + std::make_tuple()); + +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + std::tuple<::commonapi::tests::DerivedTypeCollection::StructWithEnumKeyMap>, + std::tuple<>, + std::tuple<::commonapi::tests::DerivedTypeCollection_::StructWithEnumKeyMapDeployment_t>, + std::tuple<> + + > ExtendedInterfaceDBusStubAdapterInternal::testStructWithEnumKeyMapMemberStubDispatcher( + &ExtendedInterfaceStub::TestStructWithEnumKeyMapMember, "", + std::make_tuple(static_cast<::commonapi::tests::DerivedTypeCollection_::StructWithEnumKeyMapDeployment_t*>(nullptr)), + std::make_tuple()); +#endif + + + +#ifdef WIN32 +CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + ExtendedInterfaceStubAdapter, + std::tuple<>, + std::tuple<bool> + > ExtendedInterfaceDBusStubAdapterInternal::subscribeTestSelectiveBroadcastSelectiveStubDispatcher(&ExtendedInterfaceStubAdapter::subscribeForTestSelectiveBroadcastSelective, "b"); + +CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + ExtendedInterfaceStubAdapter, + std::tuple<>, + std::tuple<> + > ExtendedInterfaceDBusStubAdapterInternal::unsubscribeTestSelectiveBroadcastSelectiveStubDispatcher(&ExtendedInterfaceStubAdapter::unsubscribeFromTestSelectiveBroadcastSelective, ""); +CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + ExtendedInterfaceStubAdapter, + std::tuple<>, + std::tuple<bool> + > ExtendedInterfaceDBusStubAdapterInternal::subscribeTestBroadcastWithOutArgsSelectiveStubDispatcher(&ExtendedInterfaceStubAdapter::subscribeForTestBroadcastWithOutArgsSelective, "b"); + +CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + ExtendedInterfaceStubAdapter, + std::tuple<>, + std::tuple<> + > ExtendedInterfaceDBusStubAdapterInternal::unsubscribeTestBroadcastWithOutArgsSelectiveStubDispatcher(&ExtendedInterfaceStubAdapter::unsubscribeFromTestBroadcastWithOutArgsSelective, ""); +#endif + +const ExtendedInterfaceDBusStubAdapterHelper::StubDispatcherTable& ExtendedInterfaceDBusStubAdapterInternal::getStubDispatcherTable() { + return stubDispatcherTable_; +} + +const CommonAPI::DBus::StubAttributeTable& ExtendedInterfaceDBusStubAdapterInternal::getStubAttributeTable() { + return stubAttributeTable_; +} + +ExtendedInterfaceDBusStubAdapterInternal::ExtendedInterfaceDBusStubAdapterInternal( + 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), + ExtendedInterfaceDBusStubAdapterHelper(_address, _connection, std::dynamic_pointer_cast<ExtendedInterfaceStub>(_stub), false), + TestInterfaceDBusStubAdapterInternal(_address, _connection, _stub), + stubDispatcherTable_({ + { { "TestIntMethodExtended", "u" }, &commonapi::tests::ExtendedInterfaceDBusStubAdapterInternal::testIntMethodExtendedStubDispatcher } + #ifdef WIN32 + , + { { "getTestPredefinedTypeAttributeAttribute", "" }, &commonapi::tests::ExtendedInterfaceDBusStubAdapterInternal::getTestPredefinedTypeAttributeAttributeStubDispatcher } + , { { "setTestPredefinedTypeAttributeAttribute", "u" }, &commonapi::tests::ExtendedInterfaceDBusStubAdapterInternal::setTestPredefinedTypeAttributeAttributeStubDispatcher }, + { { "getTestDerivedStructAttributeAttribute", "" }, &commonapi::tests::ExtendedInterfaceDBusStubAdapterInternal::getTestDerivedStructAttributeAttributeStubDispatcher } + , { { "setTestDerivedStructAttributeAttribute", "(sqi)" }, &commonapi::tests::ExtendedInterfaceDBusStubAdapterInternal::setTestDerivedStructAttributeAttributeStubDispatcher }, + { { "getTestDerivedArrayAttributeAttribute", "" }, &commonapi::tests::ExtendedInterfaceDBusStubAdapterInternal::getTestDerivedArrayAttributeAttributeStubDispatcher } + , { { "setTestDerivedArrayAttributeAttribute", "at" }, &commonapi::tests::ExtendedInterfaceDBusStubAdapterInternal::setTestDerivedArrayAttributeAttributeStubDispatcher } + , + { { "testEmptyMethod", "" }, &commonapi::tests::ExtendedInterfaceDBusStubAdapterInternal::testEmptyMethodStubDispatcher }, + { { "testVoidPredefinedTypeMethod", "us" }, &commonapi::tests::ExtendedInterfaceDBusStubAdapterInternal::testVoidPredefinedTypeMethodStubDispatcher }, + { { "testPredefinedTypeMethod", "us" }, &commonapi::tests::ExtendedInterfaceDBusStubAdapterInternal::testPredefinedTypeMethodStubDispatcher }, + { { "testVoidDerivedTypeMethod", "ia{ua(sq)}" }, &commonapi::tests::ExtendedInterfaceDBusStubAdapterInternal::testVoidDerivedTypeMethodStubDispatcher }, + { { "testDerivedTypeMethod", "ia{ua(sq)}" }, &commonapi::tests::ExtendedInterfaceDBusStubAdapterInternal::testDerivedTypeMethodStubDispatcher }, + { { "TestArrayOfPolymorphicStructMethod", "a(uv)" }, &commonapi::tests::ExtendedInterfaceDBusStubAdapterInternal::testArrayOfPolymorphicStructMethodStubDispatcher }, + { { "TestMapOfPolymorphicStructMethod", "a{y(uv)}" }, &commonapi::tests::ExtendedInterfaceDBusStubAdapterInternal::testMapOfPolymorphicStructMethodStubDispatcher }, + { { "TestStructWithPolymorphicMemberMethod", "(u(uv))" }, &commonapi::tests::ExtendedInterfaceDBusStubAdapterInternal::testStructWithPolymorphicMemberMethodStubDispatcher }, + { { "TestStructWithEnumKeyMapMember", "(a{is})" }, &commonapi::tests::ExtendedInterfaceDBusStubAdapterInternal::testStructWithEnumKeyMapMemberStubDispatcher } + , + { { "subscribeForTestSelectiveBroadcastSelective", "" }, &commonapi::tests::ExtendedInterfaceDBusStubAdapterInternal::subscribeTestSelectiveBroadcastSelectiveStubDispatcher } + , + { { "unsubscribeFromTestSelectiveBroadcastSelective", "" }, &commonapi::tests::ExtendedInterfaceDBusStubAdapterInternal::unsubscribeTestSelectiveBroadcastSelectiveStubDispatcher }, + { { "subscribeForTestBroadcastWithOutArgsSelective", "" }, &commonapi::tests::ExtendedInterfaceDBusStubAdapterInternal::subscribeTestBroadcastWithOutArgsSelectiveStubDispatcher } + , + { { "unsubscribeFromTestBroadcastWithOutArgsSelective", "" }, &commonapi::tests::ExtendedInterfaceDBusStubAdapterInternal::unsubscribeTestBroadcastWithOutArgsSelectiveStubDispatcher } + #endif + }), + stubAttributeTable_() { + + #ifdef WIN32 + stubDispatcherTable_.insert({ { "getInterfaceVersion", "" }, &commonapi::tests::ExtendedInterfaceDBusStubAdapterInternal::getExtendedInterfaceInterfaceVersionStubDispatcher }); + #else + auto parentDispatcherTable = TestInterfaceDBusStubAdapterInternal::getStubDispatcherTable(); + stubDispatcherTable_.insert(parentDispatcherTable.begin(), parentDispatcherTable.end()); + + auto interfaceVersionGetter = stubDispatcherTable_.find({ "getInterfaceVersion", "" }); + if(interfaceVersionGetter != stubDispatcherTable_.end()) { + interfaceVersionGetter->second = &commonapi::tests::ExtendedInterfaceDBusStubAdapterInternal::getExtendedInterfaceInterfaceVersionStubDispatcher; + } else { + stubDispatcherTable_.insert({ { "getInterfaceVersion", "" }, &commonapi::tests::ExtendedInterfaceDBusStubAdapterInternal::getExtendedInterfaceInterfaceVersionStubDispatcher }); + } + + auto parentAttributeTable = TestInterfaceDBusStubAdapterInternal::getStubAttributeTable(); + stubAttributeTable_.insert(parentAttributeTable.begin(), parentAttributeTable.end()); + + #endif +} + +bool ExtendedInterfaceDBusStubAdapterInternal::hasFreedesktopProperties() { + return false; +} + +} // namespace tests +} // namespace commonapi +} // namespace v1 diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/ExtendedInterfaceDBusStubAdapter.hpp b/src/test/src-gen/dbus/v1/commonapi/tests/ExtendedInterfaceDBusStubAdapter.hpp new file mode 100644 index 0000000..26fc51b --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/ExtendedInterfaceDBusStubAdapter.hpp @@ -0,0 +1,274 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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_Extended_Interface_DBUS_STUB_ADAPTER_HPP_ +#define COMMONAPI_TESTS_Extended_Interface_DBUS_STUB_ADAPTER_HPP_ + +#include <v1/commonapi/tests/ExtendedInterfaceStub.hpp> +#include <v1/commonapi/tests/TestInterfaceDBusStubAdapter.hpp> +#include "v1/commonapi/tests/ExtendedInterfaceDBusDeployment.hpp" + +#if !defined (COMMONAPI_INTERNAL_COMPILATION) +#define COMMONAPI_INTERNAL_COMPILATION +#endif + +#include <CommonAPI/DBus/DBusAddressTranslator.hpp> +#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 { +namespace commonapi { +namespace tests { + +typedef CommonAPI::DBus::DBusStubAdapterHelper<ExtendedInterfaceStub> ExtendedInterfaceDBusStubAdapterHelper; + +class ExtendedInterfaceDBusStubAdapterInternal + : public virtual ExtendedInterfaceStubAdapter, + public ExtendedInterfaceDBusStubAdapterHelper, + public TestInterfaceDBusStubAdapterInternal +{ +public: + ExtendedInterfaceDBusStubAdapterInternal( + const CommonAPI::DBus::DBusAddress &_address, + const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection, + const std::shared_ptr<CommonAPI::StubBase> &_stub); + + ~ExtendedInterfaceDBusStubAdapterInternal(); + + virtual bool hasFreedesktopProperties(); + + inline static const char* getInterface() { + return ExtendedInterface::getInterface(); + } + + + + + const ExtendedInterfaceDBusStubAdapterHelper::StubDispatcherTable& getStubDispatcherTable(); + const CommonAPI::DBus::StubAttributeTable& getStubAttributeTable(); + + void deactivateManagedInstances(); + + virtual const CommonAPI::Address &getAddress() const { + return DBusStubAdapter::getAddress(); + } + + virtual void init(std::shared_ptr<DBusStubAdapter> instance) { + return ExtendedInterfaceDBusStubAdapterHelper::init(instance); + } + + virtual void deinit() { + return ExtendedInterfaceDBusStubAdapterHelper::deinit(); + } + + virtual bool onInterfaceDBusMessage(const CommonAPI::DBus::DBusMessage& dbusMessage) { + return ExtendedInterfaceDBusStubAdapterHelper::onInterfaceDBusMessage(dbusMessage); + } + + virtual bool onInterfaceDBusFreedesktopPropertiesMessage(const CommonAPI::DBus::DBusMessage& dbusMessage) { + return ExtendedInterfaceDBusStubAdapterHelper::onInterfaceDBusFreedesktopPropertiesMessage(dbusMessage); + } + +static CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + CommonAPI::Version + > getExtendedInterfaceInterfaceVersionStubDispatcher; + + +#ifdef WIN32 +static CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + uint32_t + > getTestPredefinedTypeAttributeAttributeStubDispatcher; +static CommonAPI::DBus::DBusSetObservableAttributeStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + uint32_t + > setTestPredefinedTypeAttributeAttributeStubDispatcher; +static CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestStructExtended, + ::commonapi::tests::DerivedTypeCollection_::TestStructExtendedDeployment_t + > getTestDerivedStructAttributeAttributeStubDispatcher; +static CommonAPI::DBus::DBusSetObservableAttributeStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestStructExtended, + ::commonapi::tests::DerivedTypeCollection_::TestStructExtendedDeployment_t + > setTestDerivedStructAttributeAttributeStubDispatcher; +static CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64, + ::commonapi::tests::DerivedTypeCollection_::TestArrayUInt64Deployment_t + > getTestDerivedArrayAttributeAttributeStubDispatcher; +static CommonAPI::DBus::DBusSetObservableAttributeStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64, + ::commonapi::tests::DerivedTypeCollection_::TestArrayUInt64Deployment_t + > setTestDerivedArrayAttributeAttributeStubDispatcher; +#endif + + +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + std::tuple<uint32_t>, + std::tuple<>, + std::tuple<CommonAPI::EmptyDeployment>, + std::tuple<> + + > testIntMethodExtendedStubDispatcher; + +#ifdef WIN32 + +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + std::tuple<>, + std::tuple<>, + std::tuple<>, + std::tuple<> + + > testEmptyMethodStubDispatcher; + +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + std::tuple<uint32_t, std::string>, + std::tuple<>, + std::tuple<CommonAPI::EmptyDeployment, CommonAPI::DBus::StringDeployment>, + std::tuple<> + + > testVoidPredefinedTypeMethodStubDispatcher; + +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + std::tuple<uint32_t, std::string>, + std::tuple<uint32_t, std::string>, + std::tuple<CommonAPI::EmptyDeployment, CommonAPI::DBus::StringDeployment>, + std::tuple<CommonAPI::EmptyDeployment, CommonAPI::DBus::StringDeployment> + + > testPredefinedTypeMethodStubDispatcher; + +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + std::tuple<::commonapi::tests::DerivedTypeCollection::TestEnumExtended2, ::commonapi::tests::DerivedTypeCollection::TestMap>, + std::tuple<>, + std::tuple<CommonAPI::EmptyDeployment, ::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t>, + std::tuple<> + + > testVoidDerivedTypeMethodStubDispatcher; + +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + std::tuple<::commonapi::tests::DerivedTypeCollection::TestEnumExtended2, ::commonapi::tests::DerivedTypeCollection::TestMap>, + std::tuple<::commonapi::tests::DerivedTypeCollection::TestEnumExtended2, ::commonapi::tests::DerivedTypeCollection::TestMap>, + std::tuple<CommonAPI::EmptyDeployment, ::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t>, + std::tuple<CommonAPI::EmptyDeployment, ::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t> + + > testDerivedTypeMethodStubDispatcher; + +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + std::tuple<std::vector<std::shared_ptr<::commonapi::tests::DerivedTypeCollection::TestPolymorphicStruct>>>, + std::tuple<>, + std::tuple<CommonAPI::DBus::ArrayDeployment<::commonapi::tests::DerivedTypeCollection_::TestPolymorphicStructDeployment_t>>, + std::tuple<> + + > testArrayOfPolymorphicStructMethodStubDispatcher; + +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + std::tuple<::commonapi::tests::DerivedTypeCollection::MapIntToPolymorphic>, + std::tuple<>, + std::tuple<::commonapi::tests::DerivedTypeCollection_::MapIntToPolymorphicDeployment_t>, + std::tuple<> + + > testMapOfPolymorphicStructMethodStubDispatcher; + +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + std::tuple<::commonapi::tests::DerivedTypeCollection::StructWithPolymorphicMember>, + std::tuple<>, + std::tuple<::commonapi::tests::DerivedTypeCollection_::StructWithPolymorphicMemberDeployment_t>, + std::tuple<> + + > testStructWithPolymorphicMemberMethodStubDispatcher; + +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + std::tuple<::commonapi::tests::DerivedTypeCollection::StructWithEnumKeyMap>, + std::tuple<>, + std::tuple<::commonapi::tests::DerivedTypeCollection_::StructWithEnumKeyMapDeployment_t>, + std::tuple<> + + > testStructWithEnumKeyMapMemberStubDispatcher; +#endif + + +#ifdef WIN32 +static CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + ExtendedInterfaceStubAdapter, + std::tuple<>, + std::tuple<bool> + > subscribeTestSelectiveBroadcastSelectiveStubDispatcher; + +static CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + ExtendedInterfaceStubAdapter, + std::tuple<>, + std::tuple<> + > unsubscribeTestSelectiveBroadcastSelectiveStubDispatcher; +static CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + ExtendedInterfaceStubAdapter, + std::tuple<>, + std::tuple<bool> + > subscribeTestBroadcastWithOutArgsSelectiveStubDispatcher; + +static CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher< + ::v1::commonapi::tests::ExtendedInterfaceStub, + ExtendedInterfaceStubAdapter, + std::tuple<>, + std::tuple<> + > unsubscribeTestBroadcastWithOutArgsSelectiveStubDispatcher; +#endif + + protected: + virtual const char* getMethodsDBusIntrospectionXmlData() const; + + private: + ExtendedInterfaceDBusStubAdapterHelper::StubDispatcherTable stubDispatcherTable_; + CommonAPI::DBus::StubAttributeTable stubAttributeTable_; +}; + +class ExtendedInterfaceDBusStubAdapter + : public ExtendedInterfaceDBusStubAdapterInternal, + public std::enable_shared_from_this<ExtendedInterfaceDBusStubAdapter> { +public: + ExtendedInterfaceDBusStubAdapter( + 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), + ExtendedInterfaceDBusStubAdapterInternal( + _address, + _connection, + _stub) { + } +}; + +} // namespace tests +} // namespace commonapi +} // namespace v1 + +#endif // COMMONAPI_TESTS_Extended_Interface_DBUS_STUB_ADAPTER_HPP_ diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopDerivedInterfaceDBusDeployment.cpp b/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopDerivedInterfaceDBusDeployment.cpp new file mode 100644 index 0000000..2d53d35 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopDerivedInterfaceDBusDeployment.cpp @@ -0,0 +1,28 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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 "TestFreedesktopDerivedInterfaceDBusDeployment.hpp" + +namespace v1 { +namespace commonapi { +namespace tests { +namespace TestFreedesktopDerivedInterface_ { + +// Type-specific deployments + +// Attribute-specific deployments + +// Argument-specific deployments + +// Broadcast-specific deployments + +} // namespace TestFreedesktopDerivedInterface_ +} // namespace tests +} // namespace commonapi +} // namespace v1 diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopDerivedInterfaceDBusDeployment.hpp b/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopDerivedInterfaceDBusDeployment.hpp new file mode 100644 index 0000000..6169af6 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopDerivedInterfaceDBusDeployment.hpp @@ -0,0 +1,43 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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_TESTFREEDESKTOPDERIVEDINTERFACE_DEPLOYMENT_HPP_ +#define COMMONAPI_DBUS_TESTFREEDESKTOPDERIVEDINTERFACE_DEPLOYMENT_HPP_ + + + +#if !defined (COMMONAPI_INTERNAL_COMPILATION) +#define COMMONAPI_INTERNAL_COMPILATION +#endif +#include <CommonAPI/DBus/DBusDeployment.hpp> +#undef COMMONAPI_INTERNAL_COMPILATION + +namespace v1 { +namespace commonapi { +namespace tests { +namespace TestFreedesktopDerivedInterface_ { + +// Interface-specific deployment types + +// Type-specific deployments + +// Attribute-specific deployments + +// Argument-specific deployments + +// Broadcast-specific deployments + + +} // namespace TestFreedesktopDerivedInterface_ +} // namespace tests +} // namespace commonapi +} // namespace v1 + +#endif // COMMONAPI_DBUS_TESTFREEDESKTOPDERIVEDINTERFACE_DEPLOYMENT_HPP_ diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopDerivedInterfaceDBusProxy.cpp b/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopDerivedInterfaceDBusProxy.cpp new file mode 100644 index 0000000..09aac22 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopDerivedInterfaceDBusProxy.cpp @@ -0,0 +1,51 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* Used org.franca.core 0.9.1.201412191134. +* +* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +* If a copy of the MPL was not distributed with this file, You can obtain one at +* http://mozilla.org/MPL/2.0/. +*/ +#include <v1/commonapi/tests/TestFreedesktopDerivedInterfaceDBusProxy.hpp> + +namespace v1 { +namespace commonapi { +namespace tests { + +std::shared_ptr<CommonAPI::DBus::DBusProxy> createTestFreedesktopDerivedInterfaceDBusProxy( + const CommonAPI::DBus::DBusAddress &_address, + const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection) { + return std::make_shared<TestFreedesktopDerivedInterfaceDBusProxy>(_address, _connection); +} + +INITIALIZER(registerTestFreedesktopDerivedInterfaceDBusProxy) { + CommonAPI::DBus::Factory::get()->registerProxyCreateMethod( + TestFreedesktopDerivedInterface::getInterface(), + &createTestFreedesktopDerivedInterfaceDBusProxy); +} + +TestFreedesktopDerivedInterfaceDBusProxy::TestFreedesktopDerivedInterfaceDBusProxy( + const CommonAPI::DBus::DBusAddress &_address, + const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection) + : CommonAPI::DBus::DBusProxy(_address, _connection), + TestFreedesktopInterfaceDBusProxy(_address, _connection) +, testAttributedFromDerivedInterface_(*this, getAddress().getInterface(), "TestAttributedFromDerivedInterface", static_cast<CommonAPI::EmptyDeployment*>(nullptr)) +{ +} + + TestFreedesktopDerivedInterfaceDBusProxy::TestAttributedFromDerivedInterfaceAttribute& TestFreedesktopDerivedInterfaceDBusProxy::getTestAttributedFromDerivedInterfaceAttribute() { + return testAttributedFromDerivedInterface_; + } + + + + +void TestFreedesktopDerivedInterfaceDBusProxy::getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const { + ownVersionMajor = 1; + ownVersionMinor = 0; + } + + } // namespace tests + } // namespace commonapi + } // namespace v1 diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopDerivedInterfaceDBusProxy.hpp b/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopDerivedInterfaceDBusProxy.hpp new file mode 100644 index 0000000..e7bd68a --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopDerivedInterfaceDBusProxy.hpp @@ -0,0 +1,65 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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_Test_Freedesktop_Derived_Interface_DBUS_PROXY_HPP_ +#define COMMONAPI_TESTS_Test_Freedesktop_Derived_Interface_DBUS_PROXY_HPP_ + +#include <v1/commonapi/tests/TestFreedesktopDerivedInterfaceProxyBase.hpp> +#include <v1/commonapi/tests/TestFreedesktopInterfaceDBusProxy.hpp> +#include "v1/commonapi/tests/TestFreedesktopDerivedInterfaceDBusDeployment.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/DBusAddressTranslator.hpp> +#include <CommonAPI/DBus/DBusAttribute.hpp> +#include <CommonAPI/DBus/DBusFreedesktopAttribute.hpp> + +#undef COMMONAPI_INTERNAL_COMPILATION + +#include <string> + +namespace v1 { +namespace commonapi { +namespace tests { + +class TestFreedesktopDerivedInterfaceDBusProxy + : virtual public TestFreedesktopDerivedInterfaceProxyBase, + virtual public TestFreedesktopInterfaceDBusProxy { +public: + TestFreedesktopDerivedInterfaceDBusProxy( + const CommonAPI::DBus::DBusAddress &_address, + const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection); + + virtual ~TestFreedesktopDerivedInterfaceDBusProxy() { } + + virtual TestAttributedFromDerivedInterfaceAttribute& getTestAttributedFromDerivedInterfaceAttribute(); + + + + + virtual void getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const; + +private: + + CommonAPI::DBus::DBusFreedesktopObservableAttribute<CommonAPI::DBus::DBusFreedesktopAttribute<TestAttributedFromDerivedInterfaceAttribute>> testAttributedFromDerivedInterface_; + + +}; + +} // namespace tests +} // namespace commonapi +} // namespace v1 + +#endif // COMMONAPI_TESTS_Test_Freedesktop_Derived_Interface_DBUS_PROXY_HPP_ + diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopDerivedInterfaceDBusStubAdapter.cpp b/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopDerivedInterfaceDBusStubAdapter.cpp new file mode 100644 index 0000000..77577e1 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopDerivedInterfaceDBusStubAdapter.cpp @@ -0,0 +1,232 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* Used org.franca.core 0.9.1.201412191134. +* +* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +* If a copy of the MPL was not distributed with this file, You can obtain one at +* http://mozilla.org/MPL/2.0/. +*/ +#include <v1/commonapi/tests/TestFreedesktopDerivedInterface.hpp> +#include <v1/commonapi/tests/TestFreedesktopDerivedInterfaceDBusStubAdapter.hpp> + +namespace v1 { +namespace commonapi { +namespace tests { + +std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> createTestFreedesktopDerivedInterfaceDBusStubAdapter( + const CommonAPI::DBus::DBusAddress &_address, + const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection, + const std::shared_ptr<CommonAPI::StubBase> &_stub) { + return std::make_shared<TestFreedesktopDerivedInterfaceDBusStubAdapter>(_address, _connection, _stub); +} + +INITIALIZER(registerTestFreedesktopDerivedInterfaceDBusStubAdapter) { + CommonAPI::DBus::Factory::get()->registerStubAdapterCreateMethod( + TestFreedesktopDerivedInterface::getInterface(), &createTestFreedesktopDerivedInterfaceDBusStubAdapter); +} + +TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::~TestFreedesktopDerivedInterfaceDBusStubAdapterInternal() { + deactivateManagedInstances(); + TestFreedesktopDerivedInterfaceDBusStubAdapterHelper::deinit(); +} + +void TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::deactivateManagedInstances() { + +} + +const char* TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::getMethodsDBusIntrospectionXmlData() const { + static const std::string introspectionData = + std::string(TestFreedesktopInterfaceDBusStubAdapterInternal::getMethodsDBusIntrospectionXmlData()) + + "<property name=\"TestAttributedFromDerivedInterface\" type=\"u\" access=\"readwrite\" />\n" + + ; + return introspectionData.c_str(); +} + +CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopDerivedInterfaceStub, + CommonAPI::Version + > TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::getTestFreedesktopDerivedInterfaceInterfaceVersionStubDispatcher(&TestFreedesktopDerivedInterfaceStub::getInterfaceVersion, "uu"); + +CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopDerivedInterfaceStub, + uint32_t + > TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::getTestAttributedFromDerivedInterfaceAttributeStubDispatcher( + &::v1::commonapi::tests::TestFreedesktopDerivedInterfaceStub::getTestAttributedFromDerivedInterfaceAttribute + ); +CommonAPI::DBus::DBusSetFreedesktopObservableAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopDerivedInterfaceStub, + uint32_t + > TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::setTestAttributedFromDerivedInterfaceAttributeStubDispatcher( + &::v1::commonapi::tests::TestFreedesktopDerivedInterfaceStub::getTestAttributedFromDerivedInterfaceAttribute, + &TestFreedesktopDerivedInterfaceStubRemoteEvent::onRemoteSetTestAttributedFromDerivedInterfaceAttribute, + &TestFreedesktopDerivedInterfaceStubRemoteEvent::onRemoteTestAttributedFromDerivedInterfaceAttributeChanged + ,&TestFreedesktopDerivedInterfaceStubAdapter::fireTestAttributedFromDerivedInterfaceAttributeChanged + ); + +#ifdef WIN32 +CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopDerivedInterfaceStub, + uint32_t + > TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::getTestPredefinedTypeAttributeAttributeStubDispatcher( + &::v1::commonapi::tests::TestFreedesktopDerivedInterfaceStub::getTestPredefinedTypeAttributeAttribute + ); +CommonAPI::DBus::DBusSetFreedesktopObservableAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopDerivedInterfaceStub, + uint32_t + > TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::setTestPredefinedTypeAttributeAttributeStubDispatcher( + &::v1::commonapi::tests::TestFreedesktopDerivedInterfaceStub::getTestPredefinedTypeAttributeAttribute, + &TestFreedesktopDerivedInterfaceStubRemoteEvent::onRemoteSetTestPredefinedTypeAttributeAttribute, + &TestFreedesktopDerivedInterfaceStubRemoteEvent::onRemoteTestPredefinedTypeAttributeAttributeChanged + ,&TestFreedesktopDerivedInterfaceStubAdapter::fireTestPredefinedTypeAttributeAttributeChanged + ); +CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopDerivedInterfaceStub, + uint32_t + > TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::getTestReadonlyAttributeAttributeStubDispatcher( + &::v1::commonapi::tests::TestFreedesktopDerivedInterfaceStub::getTestReadonlyAttributeAttribute + ); +CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopDerivedInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestStructExtended, + ::commonapi::tests::DerivedTypeCollection_::TestStructExtendedDeployment_t + > TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::getTestDerivedStructAttributeAttributeStubDispatcher( + &::v1::commonapi::tests::TestFreedesktopDerivedInterfaceStub::getTestDerivedStructAttributeAttribute + ); +CommonAPI::DBus::DBusSetFreedesktopObservableAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopDerivedInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestStructExtended, + ::commonapi::tests::DerivedTypeCollection_::TestStructExtendedDeployment_t + > TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::setTestDerivedStructAttributeAttributeStubDispatcher( + &::v1::commonapi::tests::TestFreedesktopDerivedInterfaceStub::getTestDerivedStructAttributeAttribute, + &TestFreedesktopDerivedInterfaceStubRemoteEvent::onRemoteSetTestDerivedStructAttributeAttribute, + &TestFreedesktopDerivedInterfaceStubRemoteEvent::onRemoteTestDerivedStructAttributeAttributeChanged + ,&TestFreedesktopDerivedInterfaceStubAdapter::fireTestDerivedStructAttributeAttributeChanged + ); +CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopDerivedInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64, + ::commonapi::tests::DerivedTypeCollection_::TestArrayUInt64Deployment_t + > TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::getTestDerivedArrayAttributeAttributeStubDispatcher( + &::v1::commonapi::tests::TestFreedesktopDerivedInterfaceStub::getTestDerivedArrayAttributeAttribute + ); +CommonAPI::DBus::DBusSetFreedesktopObservableAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopDerivedInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64, + ::commonapi::tests::DerivedTypeCollection_::TestArrayUInt64Deployment_t + > TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::setTestDerivedArrayAttributeAttributeStubDispatcher( + &::v1::commonapi::tests::TestFreedesktopDerivedInterfaceStub::getTestDerivedArrayAttributeAttribute, + &TestFreedesktopDerivedInterfaceStubRemoteEvent::onRemoteSetTestDerivedArrayAttributeAttribute, + &TestFreedesktopDerivedInterfaceStubRemoteEvent::onRemoteTestDerivedArrayAttributeAttributeChanged + ,&TestFreedesktopDerivedInterfaceStubAdapter::fireTestDerivedArrayAttributeAttributeChanged + ); +#endif + + +#ifdef WIN32 +#endif + +void TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::fireTestAttributedFromDerivedInterfaceAttributeChanged(const uint32_t& value) { + CommonAPI::DBus::DBusStubFreedesktopPropertiesSignalHelper< + uint32_t, + CommonAPI::EmptyDeployment + > ::sendPropertiesChangedSignal( + *this, + "TestAttributedFromDerivedInterface", + value, + static_cast<CommonAPI::EmptyDeployment*>(nullptr) + ); +} + + +#ifdef WIN32 +#endif + +const TestFreedesktopDerivedInterfaceDBusStubAdapterHelper::StubDispatcherTable& TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::getStubDispatcherTable() { + return stubDispatcherTable_; +} + +const CommonAPI::DBus::StubAttributeTable& TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::getStubAttributeTable() { + return stubAttributeTable_; +} + +TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::TestFreedesktopDerivedInterfaceDBusStubAdapterInternal( + 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), + TestFreedesktopDerivedInterfaceDBusStubAdapterHelper(_address, _connection, std::dynamic_pointer_cast<TestFreedesktopDerivedInterfaceStub>(_stub), false), + TestFreedesktopInterfaceDBusStubAdapterInternal(_address, _connection, _stub), + stubDispatcherTable_({ + #ifdef WIN32 + #endif + }), + stubAttributeTable_({ + { + "TestAttributedFromDerivedInterface", + { + &commonapi::tests::TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::getTestAttributedFromDerivedInterfaceAttributeStubDispatcher, + &commonapi::tests::TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::setTestAttributedFromDerivedInterfaceAttributeStubDispatcher + } + } + #ifdef WIN32 + , + { + "TestPredefinedTypeAttribute", + { + &commonapi::tests::TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::getTestPredefinedTypeAttributeAttributeStubDispatcher, + &commonapi::tests::TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::setTestPredefinedTypeAttributeAttributeStubDispatcher + } + }, + { + "TestReadonlyAttribute", + { + &commonapi::tests::TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::getTestReadonlyAttributeAttributeStubDispatcher, + NULL + } + }, + { + "TestDerivedStructAttribute", + { + &commonapi::tests::TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::getTestDerivedStructAttributeAttributeStubDispatcher, + &commonapi::tests::TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::setTestDerivedStructAttributeAttributeStubDispatcher + } + }, + { + "TestDerivedArrayAttribute", + { + &commonapi::tests::TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::getTestDerivedArrayAttributeAttributeStubDispatcher, + &commonapi::tests::TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::setTestDerivedArrayAttributeAttributeStubDispatcher + } + } + #endif + } + ) { + + #ifdef WIN32 + stubDispatcherTable_.insert({ { "getInterfaceVersion", "" }, &commonapi::tests::TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::getTestFreedesktopDerivedInterfaceInterfaceVersionStubDispatcher }); + #else + auto parentDispatcherTable = TestFreedesktopInterfaceDBusStubAdapterInternal::getStubDispatcherTable(); + stubDispatcherTable_.insert(parentDispatcherTable.begin(), parentDispatcherTable.end()); + + auto interfaceVersionGetter = stubDispatcherTable_.find({ "getInterfaceVersion", "" }); + if(interfaceVersionGetter != stubDispatcherTable_.end()) { + interfaceVersionGetter->second = &commonapi::tests::TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::getTestFreedesktopDerivedInterfaceInterfaceVersionStubDispatcher; + } else { + stubDispatcherTable_.insert({ { "getInterfaceVersion", "" }, &commonapi::tests::TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::getTestFreedesktopDerivedInterfaceInterfaceVersionStubDispatcher }); + } + + auto parentAttributeTable = TestFreedesktopInterfaceDBusStubAdapterInternal::getStubAttributeTable(); + stubAttributeTable_.insert(parentAttributeTable.begin(), parentAttributeTable.end()); + + #endif +} + +bool TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::hasFreedesktopProperties() { + return true; +} + +} // namespace tests +} // namespace commonapi +} // namespace v1 diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopDerivedInterfaceDBusStubAdapter.hpp b/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopDerivedInterfaceDBusStubAdapter.hpp new file mode 100644 index 0000000..52f645e --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopDerivedInterfaceDBusStubAdapter.hpp @@ -0,0 +1,172 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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_Test_Freedesktop_Derived_Interface_DBUS_STUB_ADAPTER_HPP_ +#define COMMONAPI_TESTS_Test_Freedesktop_Derived_Interface_DBUS_STUB_ADAPTER_HPP_ + +#include <v1/commonapi/tests/TestFreedesktopDerivedInterfaceStub.hpp> +#include <v1/commonapi/tests/TestFreedesktopInterfaceDBusStubAdapter.hpp> +#include "v1/commonapi/tests/TestFreedesktopDerivedInterfaceDBusDeployment.hpp" + +#if !defined (COMMONAPI_INTERNAL_COMPILATION) +#define COMMONAPI_INTERNAL_COMPILATION +#endif + +#include <CommonAPI/DBus/DBusAddressTranslator.hpp> +#include <CommonAPI/DBus/DBusFactory.hpp> +#include <CommonAPI/DBus/DBusStubAdapterHelper.hpp> +#include <CommonAPI/DBus/DBusStubAdapter.hpp> +#include <CommonAPI/DBus/DBusFreedesktopStubAdapterHelper.hpp> +#include <CommonAPI/DBus/DBusDeployment.hpp> + +#undef COMMONAPI_INTERNAL_COMPILATION + +namespace v1 { +namespace commonapi { +namespace tests { + +typedef CommonAPI::DBus::DBusStubAdapterHelper<TestFreedesktopDerivedInterfaceStub> TestFreedesktopDerivedInterfaceDBusStubAdapterHelper; + +class TestFreedesktopDerivedInterfaceDBusStubAdapterInternal + : public virtual TestFreedesktopDerivedInterfaceStubAdapter, + public TestFreedesktopDerivedInterfaceDBusStubAdapterHelper, + public TestFreedesktopInterfaceDBusStubAdapterInternal +{ +public: + TestFreedesktopDerivedInterfaceDBusStubAdapterInternal( + const CommonAPI::DBus::DBusAddress &_address, + const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection, + const std::shared_ptr<CommonAPI::StubBase> &_stub); + + ~TestFreedesktopDerivedInterfaceDBusStubAdapterInternal(); + + virtual bool hasFreedesktopProperties(); + + inline static const char* getInterface() { + return TestFreedesktopDerivedInterface::getInterface(); + } + + void fireTestAttributedFromDerivedInterfaceAttributeChanged(const uint32_t& value); + + + + const TestFreedesktopDerivedInterfaceDBusStubAdapterHelper::StubDispatcherTable& getStubDispatcherTable(); + const CommonAPI::DBus::StubAttributeTable& getStubAttributeTable(); + + void deactivateManagedInstances(); + + virtual const CommonAPI::Address &getAddress() const { + return DBusStubAdapter::getAddress(); + } + + virtual void init(std::shared_ptr<DBusStubAdapter> instance) { + return TestFreedesktopDerivedInterfaceDBusStubAdapterHelper::init(instance); + } + + virtual void deinit() { + return TestFreedesktopDerivedInterfaceDBusStubAdapterHelper::deinit(); + } + + virtual bool onInterfaceDBusMessage(const CommonAPI::DBus::DBusMessage& dbusMessage) { + return TestFreedesktopDerivedInterfaceDBusStubAdapterHelper::onInterfaceDBusMessage(dbusMessage); + } + + virtual bool onInterfaceDBusFreedesktopPropertiesMessage(const CommonAPI::DBus::DBusMessage& dbusMessage) { + return TestFreedesktopDerivedInterfaceDBusStubAdapterHelper::onInterfaceDBusFreedesktopPropertiesMessage(dbusMessage); + } + +static CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopDerivedInterfaceStub, + CommonAPI::Version + > getTestFreedesktopDerivedInterfaceInterfaceVersionStubDispatcher; + +static CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopDerivedInterfaceStub, + uint32_t + > getTestAttributedFromDerivedInterfaceAttributeStubDispatcher; +static CommonAPI::DBus::DBusSetFreedesktopObservableAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopDerivedInterfaceStub, + uint32_t + > setTestAttributedFromDerivedInterfaceAttributeStubDispatcher; + +#ifdef WIN32 +static CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopDerivedInterfaceStub, + uint32_t + > getTestPredefinedTypeAttributeAttributeStubDispatcher; +static CommonAPI::DBus::DBusSetFreedesktopObservableAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopDerivedInterfaceStub, + uint32_t + > setTestPredefinedTypeAttributeAttributeStubDispatcher; +static CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopDerivedInterfaceStub, + uint32_t + > getTestReadonlyAttributeAttributeStubDispatcher; +static CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopDerivedInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestStructExtended, + ::commonapi::tests::DerivedTypeCollection_::TestStructExtendedDeployment_t + > getTestDerivedStructAttributeAttributeStubDispatcher; +static CommonAPI::DBus::DBusSetFreedesktopObservableAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopDerivedInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestStructExtended, + ::commonapi::tests::DerivedTypeCollection_::TestStructExtendedDeployment_t + > setTestDerivedStructAttributeAttributeStubDispatcher; +static CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopDerivedInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64, + ::commonapi::tests::DerivedTypeCollection_::TestArrayUInt64Deployment_t + > getTestDerivedArrayAttributeAttributeStubDispatcher; +static CommonAPI::DBus::DBusSetFreedesktopObservableAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopDerivedInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64, + ::commonapi::tests::DerivedTypeCollection_::TestArrayUInt64Deployment_t + > setTestDerivedArrayAttributeAttributeStubDispatcher; +#endif + + +#ifdef WIN32 +#endif + + +#ifdef WIN32 +#endif + + protected: + virtual const char* getMethodsDBusIntrospectionXmlData() const; + + private: + TestFreedesktopDerivedInterfaceDBusStubAdapterHelper::StubDispatcherTable stubDispatcherTable_; + CommonAPI::DBus::StubAttributeTable stubAttributeTable_; +}; + +class TestFreedesktopDerivedInterfaceDBusStubAdapter + : public TestFreedesktopDerivedInterfaceDBusStubAdapterInternal, + public std::enable_shared_from_this<TestFreedesktopDerivedInterfaceDBusStubAdapter> { +public: + TestFreedesktopDerivedInterfaceDBusStubAdapter( + 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), + TestFreedesktopDerivedInterfaceDBusStubAdapterInternal( + _address, + _connection, + _stub) { + } +}; + +} // namespace tests +} // namespace commonapi +} // namespace v1 + +#endif // COMMONAPI_TESTS_Test_Freedesktop_Derived_Interface_DBUS_STUB_ADAPTER_HPP_ diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopInterfaceDBusDeployment.cpp b/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopInterfaceDBusDeployment.cpp new file mode 100644 index 0000000..7c2dabd --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopInterfaceDBusDeployment.cpp @@ -0,0 +1,28 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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 "TestFreedesktopInterfaceDBusDeployment.hpp" + +namespace v1 { +namespace commonapi { +namespace tests { +namespace TestFreedesktopInterface_ { + +// Type-specific deployments + +// Attribute-specific deployments + +// Argument-specific deployments + +// Broadcast-specific deployments + +} // namespace TestFreedesktopInterface_ +} // namespace tests +} // namespace commonapi +} // namespace v1 diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopInterfaceDBusDeployment.hpp b/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopInterfaceDBusDeployment.hpp new file mode 100644 index 0000000..eb509d2 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopInterfaceDBusDeployment.hpp @@ -0,0 +1,45 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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_TESTFREEDESKTOPINTERFACE_DEPLOYMENT_HPP_ +#define COMMONAPI_DBUS_TESTFREEDESKTOPINTERFACE_DEPLOYMENT_HPP_ + +#include <commonapi/tests/DerivedTypeCollectionDBusDeployment.hpp> + +#include <commonapi/tests/DerivedTypeCollectionDBusDeployment.hpp> + +#if !defined (COMMONAPI_INTERNAL_COMPILATION) +#define COMMONAPI_INTERNAL_COMPILATION +#endif +#include <CommonAPI/DBus/DBusDeployment.hpp> +#undef COMMONAPI_INTERNAL_COMPILATION + +namespace v1 { +namespace commonapi { +namespace tests { +namespace TestFreedesktopInterface_ { + +// Interface-specific deployment types + +// Type-specific deployments + +// Attribute-specific deployments + +// Argument-specific deployments + +// Broadcast-specific deployments + + +} // namespace TestFreedesktopInterface_ +} // namespace tests +} // namespace commonapi +} // namespace v1 + +#endif // COMMONAPI_DBUS_TESTFREEDESKTOPINTERFACE_DEPLOYMENT_HPP_ diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopInterfaceDBusProxy.cpp b/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopInterfaceDBusProxy.cpp new file mode 100644 index 0000000..79f9fb1 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopInterfaceDBusProxy.cpp @@ -0,0 +1,62 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* Used org.franca.core 0.9.1.201412191134. +* +* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +* If a copy of the MPL was not distributed with this file, You can obtain one at +* http://mozilla.org/MPL/2.0/. +*/ +#include <v1/commonapi/tests/TestFreedesktopInterfaceDBusProxy.hpp> + +namespace v1 { +namespace commonapi { +namespace tests { + +std::shared_ptr<CommonAPI::DBus::DBusProxy> createTestFreedesktopInterfaceDBusProxy( + const CommonAPI::DBus::DBusAddress &_address, + const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection) { + return std::make_shared<TestFreedesktopInterfaceDBusProxy>(_address, _connection); +} + +INITIALIZER(registerTestFreedesktopInterfaceDBusProxy) { + CommonAPI::DBus::Factory::get()->registerProxyCreateMethod( + TestFreedesktopInterface::getInterface(), + &createTestFreedesktopInterfaceDBusProxy); +} + +TestFreedesktopInterfaceDBusProxy::TestFreedesktopInterfaceDBusProxy( + const CommonAPI::DBus::DBusAddress &_address, + const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection) + : CommonAPI::DBus::DBusProxy(_address, _connection) +, testPredefinedTypeAttribute_(*this, getAddress().getInterface(), "TestPredefinedTypeAttribute", static_cast<CommonAPI::EmptyDeployment*>(nullptr)), + testReadonlyAttribute_(*this, getAddress().getInterface(), "TestReadonlyAttribute", static_cast<CommonAPI::EmptyDeployment*>(nullptr)), + testDerivedStructAttribute_(*this, getAddress().getInterface(), "TestDerivedStructAttribute", static_cast<::commonapi::tests::DerivedTypeCollection_::TestStructExtendedDeployment_t*>(nullptr)), + testDerivedArrayAttribute_(*this, getAddress().getInterface(), "TestDerivedArrayAttribute", static_cast<::commonapi::tests::DerivedTypeCollection_::TestArrayUInt64Deployment_t*>(nullptr)) +{ +} + + TestFreedesktopInterfaceDBusProxy::TestPredefinedTypeAttributeAttribute& TestFreedesktopInterfaceDBusProxy::getTestPredefinedTypeAttributeAttribute() { + return testPredefinedTypeAttribute_; + } + TestFreedesktopInterfaceDBusProxy::TestReadonlyAttributeAttribute& TestFreedesktopInterfaceDBusProxy::getTestReadonlyAttributeAttribute() { + return testReadonlyAttribute_; + } + TestFreedesktopInterfaceDBusProxy::TestDerivedStructAttributeAttribute& TestFreedesktopInterfaceDBusProxy::getTestDerivedStructAttributeAttribute() { + return testDerivedStructAttribute_; + } + TestFreedesktopInterfaceDBusProxy::TestDerivedArrayAttributeAttribute& TestFreedesktopInterfaceDBusProxy::getTestDerivedArrayAttributeAttribute() { + return testDerivedArrayAttribute_; + } + + + + +void TestFreedesktopInterfaceDBusProxy::getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const { + ownVersionMajor = 1; + ownVersionMinor = 0; + } + + } // namespace tests + } // namespace commonapi + } // namespace v1 diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopInterfaceDBusProxy.hpp b/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopInterfaceDBusProxy.hpp new file mode 100644 index 0000000..be3c892 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopInterfaceDBusProxy.hpp @@ -0,0 +1,70 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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_Test_Freedesktop_Interface_DBUS_PROXY_HPP_ +#define COMMONAPI_TESTS_Test_Freedesktop_Interface_DBUS_PROXY_HPP_ + +#include <v1/commonapi/tests/TestFreedesktopInterfaceProxyBase.hpp> +#include "v1/commonapi/tests/TestFreedesktopInterfaceDBusDeployment.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/DBusAddressTranslator.hpp> +#include <CommonAPI/DBus/DBusAttribute.hpp> +#include <CommonAPI/DBus/DBusFreedesktopAttribute.hpp> + +#undef COMMONAPI_INTERNAL_COMPILATION + +#include <string> + +namespace v1 { +namespace commonapi { +namespace tests { + +class TestFreedesktopInterfaceDBusProxy + : virtual public TestFreedesktopInterfaceProxyBase, + virtual public CommonAPI::DBus::DBusProxy { +public: + TestFreedesktopInterfaceDBusProxy( + const CommonAPI::DBus::DBusAddress &_address, + const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection); + + virtual ~TestFreedesktopInterfaceDBusProxy() { } + + virtual TestPredefinedTypeAttributeAttribute& getTestPredefinedTypeAttributeAttribute(); + virtual TestReadonlyAttributeAttribute& getTestReadonlyAttributeAttribute(); + virtual TestDerivedStructAttributeAttribute& getTestDerivedStructAttributeAttribute(); + virtual TestDerivedArrayAttributeAttribute& getTestDerivedArrayAttributeAttribute(); + + + + + virtual void getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const; + +private: + + CommonAPI::DBus::DBusFreedesktopObservableAttribute<CommonAPI::DBus::DBusFreedesktopAttribute<TestPredefinedTypeAttributeAttribute>> testPredefinedTypeAttribute_; + CommonAPI::DBus::DBusFreedesktopObservableAttribute<CommonAPI::DBus::DBusFreedesktopReadonlyAttribute<TestReadonlyAttributeAttribute>> testReadonlyAttribute_; + CommonAPI::DBus::DBusFreedesktopObservableAttribute<CommonAPI::DBus::DBusFreedesktopAttribute<TestDerivedStructAttributeAttribute, ::commonapi::tests::DerivedTypeCollection_::TestStructExtendedDeployment_t>> testDerivedStructAttribute_; + CommonAPI::DBus::DBusFreedesktopObservableAttribute<CommonAPI::DBus::DBusFreedesktopAttribute<TestDerivedArrayAttributeAttribute, ::commonapi::tests::DerivedTypeCollection_::TestArrayUInt64Deployment_t>> testDerivedArrayAttribute_; + + +}; + +} // namespace tests +} // namespace commonapi +} // namespace v1 + +#endif // COMMONAPI_TESTS_Test_Freedesktop_Interface_DBUS_PROXY_HPP_ + diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopInterfaceDBusStubAdapter.cpp b/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopInterfaceDBusStubAdapter.cpp new file mode 100644 index 0000000..ed77a4e --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopInterfaceDBusStubAdapter.cpp @@ -0,0 +1,220 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* Used org.franca.core 0.9.1.201412191134. +* +* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +* If a copy of the MPL was not distributed with this file, You can obtain one at +* http://mozilla.org/MPL/2.0/. +*/ +#include <v1/commonapi/tests/TestFreedesktopInterface.hpp> +#include <v1/commonapi/tests/TestFreedesktopInterfaceDBusStubAdapter.hpp> + +namespace v1 { +namespace commonapi { +namespace tests { + +std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> createTestFreedesktopInterfaceDBusStubAdapter( + const CommonAPI::DBus::DBusAddress &_address, + const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection, + const std::shared_ptr<CommonAPI::StubBase> &_stub) { + return std::make_shared<TestFreedesktopInterfaceDBusStubAdapter>(_address, _connection, _stub); +} + +INITIALIZER(registerTestFreedesktopInterfaceDBusStubAdapter) { + CommonAPI::DBus::Factory::get()->registerStubAdapterCreateMethod( + TestFreedesktopInterface::getInterface(), &createTestFreedesktopInterfaceDBusStubAdapter); +} + +TestFreedesktopInterfaceDBusStubAdapterInternal::~TestFreedesktopInterfaceDBusStubAdapterInternal() { + deactivateManagedInstances(); + TestFreedesktopInterfaceDBusStubAdapterHelper::deinit(); +} + +void TestFreedesktopInterfaceDBusStubAdapterInternal::deactivateManagedInstances() { + +} + +const char* TestFreedesktopInterfaceDBusStubAdapterInternal::getMethodsDBusIntrospectionXmlData() const { + static const std::string introspectionData = + "<method name=\"getInterfaceVersion\">\n" + "<arg name=\"value\" type=\"uu\" direction=\"out\" />" + "</method>\n" + "<property name=\"TestPredefinedTypeAttribute\" type=\"u\" access=\"readwrite\" />\n" + "<property name=\"TestReadonlyAttribute\" type=\"u\" access=\"read\" />\n" + "<property name=\"TestDerivedStructAttribute\" type=\"(sqi)\" access=\"readwrite\" />\n" + "<property name=\"TestDerivedArrayAttribute\" type=\"at\" access=\"readwrite\" />\n" + + ; + return introspectionData.c_str(); +} + +CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopInterfaceStub, + CommonAPI::Version + > TestFreedesktopInterfaceDBusStubAdapterInternal::getTestFreedesktopInterfaceInterfaceVersionStubDispatcher(&TestFreedesktopInterfaceStub::getInterfaceVersion, "uu"); + +CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopInterfaceStub, + uint32_t + > TestFreedesktopInterfaceDBusStubAdapterInternal::getTestPredefinedTypeAttributeAttributeStubDispatcher( + &::v1::commonapi::tests::TestFreedesktopInterfaceStub::getTestPredefinedTypeAttributeAttribute + ); +CommonAPI::DBus::DBusSetFreedesktopObservableAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopInterfaceStub, + uint32_t + > TestFreedesktopInterfaceDBusStubAdapterInternal::setTestPredefinedTypeAttributeAttributeStubDispatcher( + &::v1::commonapi::tests::TestFreedesktopInterfaceStub::getTestPredefinedTypeAttributeAttribute, + &TestFreedesktopInterfaceStubRemoteEvent::onRemoteSetTestPredefinedTypeAttributeAttribute, + &TestFreedesktopInterfaceStubRemoteEvent::onRemoteTestPredefinedTypeAttributeAttributeChanged + ,&TestFreedesktopInterfaceStubAdapter::fireTestPredefinedTypeAttributeAttributeChanged + ); +CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopInterfaceStub, + uint32_t + > TestFreedesktopInterfaceDBusStubAdapterInternal::getTestReadonlyAttributeAttributeStubDispatcher( + &::v1::commonapi::tests::TestFreedesktopInterfaceStub::getTestReadonlyAttributeAttribute + ); +CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestStructExtended, + ::commonapi::tests::DerivedTypeCollection_::TestStructExtendedDeployment_t + > TestFreedesktopInterfaceDBusStubAdapterInternal::getTestDerivedStructAttributeAttributeStubDispatcher( + &::v1::commonapi::tests::TestFreedesktopInterfaceStub::getTestDerivedStructAttributeAttribute + ); +CommonAPI::DBus::DBusSetFreedesktopObservableAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestStructExtended, + ::commonapi::tests::DerivedTypeCollection_::TestStructExtendedDeployment_t + > TestFreedesktopInterfaceDBusStubAdapterInternal::setTestDerivedStructAttributeAttributeStubDispatcher( + &::v1::commonapi::tests::TestFreedesktopInterfaceStub::getTestDerivedStructAttributeAttribute, + &TestFreedesktopInterfaceStubRemoteEvent::onRemoteSetTestDerivedStructAttributeAttribute, + &TestFreedesktopInterfaceStubRemoteEvent::onRemoteTestDerivedStructAttributeAttributeChanged + ,&TestFreedesktopInterfaceStubAdapter::fireTestDerivedStructAttributeAttributeChanged + ); +CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64, + ::commonapi::tests::DerivedTypeCollection_::TestArrayUInt64Deployment_t + > TestFreedesktopInterfaceDBusStubAdapterInternal::getTestDerivedArrayAttributeAttributeStubDispatcher( + &::v1::commonapi::tests::TestFreedesktopInterfaceStub::getTestDerivedArrayAttributeAttribute + ); +CommonAPI::DBus::DBusSetFreedesktopObservableAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64, + ::commonapi::tests::DerivedTypeCollection_::TestArrayUInt64Deployment_t + > TestFreedesktopInterfaceDBusStubAdapterInternal::setTestDerivedArrayAttributeAttributeStubDispatcher( + &::v1::commonapi::tests::TestFreedesktopInterfaceStub::getTestDerivedArrayAttributeAttribute, + &TestFreedesktopInterfaceStubRemoteEvent::onRemoteSetTestDerivedArrayAttributeAttribute, + &TestFreedesktopInterfaceStubRemoteEvent::onRemoteTestDerivedArrayAttributeAttributeChanged + ,&TestFreedesktopInterfaceStubAdapter::fireTestDerivedArrayAttributeAttributeChanged + ); + + + + +void TestFreedesktopInterfaceDBusStubAdapterInternal::fireTestPredefinedTypeAttributeAttributeChanged(const uint32_t& value) { + CommonAPI::DBus::DBusStubFreedesktopPropertiesSignalHelper< + uint32_t, + CommonAPI::EmptyDeployment + > ::sendPropertiesChangedSignal( + *this, + "TestPredefinedTypeAttribute", + value, + static_cast<CommonAPI::EmptyDeployment*>(nullptr) + ); +} +void TestFreedesktopInterfaceDBusStubAdapterInternal::fireTestReadonlyAttributeAttributeChanged(const uint32_t& value) { + CommonAPI::DBus::DBusStubFreedesktopPropertiesSignalHelper< + uint32_t, + CommonAPI::EmptyDeployment + > ::sendPropertiesChangedSignal( + *this, + "TestReadonlyAttribute", + value, + static_cast<CommonAPI::EmptyDeployment*>(nullptr) + ); +} +void TestFreedesktopInterfaceDBusStubAdapterInternal::fireTestDerivedStructAttributeAttributeChanged(const ::commonapi::tests::DerivedTypeCollection::TestStructExtended& value) { + CommonAPI::DBus::DBusStubFreedesktopPropertiesSignalHelper< + ::commonapi::tests::DerivedTypeCollection::TestStructExtended, + ::commonapi::tests::DerivedTypeCollection_::TestStructExtendedDeployment_t + > ::sendPropertiesChangedSignal( + *this, + "TestDerivedStructAttribute", + value, + static_cast<::commonapi::tests::DerivedTypeCollection_::TestStructExtendedDeployment_t*>(nullptr) + ); +} +void TestFreedesktopInterfaceDBusStubAdapterInternal::fireTestDerivedArrayAttributeAttributeChanged(const ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64& value) { + CommonAPI::DBus::DBusStubFreedesktopPropertiesSignalHelper< + ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64, + ::commonapi::tests::DerivedTypeCollection_::TestArrayUInt64Deployment_t + > ::sendPropertiesChangedSignal( + *this, + "TestDerivedArrayAttribute", + value, + static_cast<::commonapi::tests::DerivedTypeCollection_::TestArrayUInt64Deployment_t*>(nullptr) + ); +} + + + +const TestFreedesktopInterfaceDBusStubAdapterHelper::StubDispatcherTable& TestFreedesktopInterfaceDBusStubAdapterInternal::getStubDispatcherTable() { + return stubDispatcherTable_; +} + +const CommonAPI::DBus::StubAttributeTable& TestFreedesktopInterfaceDBusStubAdapterInternal::getStubAttributeTable() { + return stubAttributeTable_; +} + +TestFreedesktopInterfaceDBusStubAdapterInternal::TestFreedesktopInterfaceDBusStubAdapterInternal( + 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), + TestFreedesktopInterfaceDBusStubAdapterHelper(_address, _connection, std::dynamic_pointer_cast<TestFreedesktopInterfaceStub>(_stub), false), + stubDispatcherTable_({ + }), + stubAttributeTable_({ + { + "TestPredefinedTypeAttribute", + { + &commonapi::tests::TestFreedesktopInterfaceDBusStubAdapterInternal::getTestPredefinedTypeAttributeAttributeStubDispatcher, + &commonapi::tests::TestFreedesktopInterfaceDBusStubAdapterInternal::setTestPredefinedTypeAttributeAttributeStubDispatcher + } + }, + { + "TestReadonlyAttribute", + { + &commonapi::tests::TestFreedesktopInterfaceDBusStubAdapterInternal::getTestReadonlyAttributeAttributeStubDispatcher, + NULL + } + }, + { + "TestDerivedStructAttribute", + { + &commonapi::tests::TestFreedesktopInterfaceDBusStubAdapterInternal::getTestDerivedStructAttributeAttributeStubDispatcher, + &commonapi::tests::TestFreedesktopInterfaceDBusStubAdapterInternal::setTestDerivedStructAttributeAttributeStubDispatcher + } + }, + { + "TestDerivedArrayAttribute", + { + &commonapi::tests::TestFreedesktopInterfaceDBusStubAdapterInternal::getTestDerivedArrayAttributeAttributeStubDispatcher, + &commonapi::tests::TestFreedesktopInterfaceDBusStubAdapterInternal::setTestDerivedArrayAttributeAttributeStubDispatcher + } + } + } + ) { + + stubDispatcherTable_.insert({ { "getInterfaceVersion", "" }, &commonapi::tests::TestFreedesktopInterfaceDBusStubAdapterInternal::getTestFreedesktopInterfaceInterfaceVersionStubDispatcher }); +} + +bool TestFreedesktopInterfaceDBusStubAdapterInternal::hasFreedesktopProperties() { + return true; +} + +} // namespace tests +} // namespace commonapi +} // namespace v1 diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopInterfaceDBusStubAdapter.hpp b/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopInterfaceDBusStubAdapter.hpp new file mode 100644 index 0000000..dbbfa5a --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/TestFreedesktopInterfaceDBusStubAdapter.hpp @@ -0,0 +1,141 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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_Test_Freedesktop_Interface_DBUS_STUB_ADAPTER_HPP_ +#define COMMONAPI_TESTS_Test_Freedesktop_Interface_DBUS_STUB_ADAPTER_HPP_ + +#include <v1/commonapi/tests/TestFreedesktopInterfaceStub.hpp> +#include "v1/commonapi/tests/TestFreedesktopInterfaceDBusDeployment.hpp" +#include <commonapi/tests/DerivedTypeCollectionDBusDeployment.hpp> + +#if !defined (COMMONAPI_INTERNAL_COMPILATION) +#define COMMONAPI_INTERNAL_COMPILATION +#endif + +#include <CommonAPI/DBus/DBusAddressTranslator.hpp> +#include <CommonAPI/DBus/DBusFactory.hpp> +#include <CommonAPI/DBus/DBusStubAdapterHelper.hpp> +#include <CommonAPI/DBus/DBusStubAdapter.hpp> +#include <CommonAPI/DBus/DBusFreedesktopStubAdapterHelper.hpp> +#include <CommonAPI/DBus/DBusDeployment.hpp> + +#undef COMMONAPI_INTERNAL_COMPILATION + +namespace v1 { +namespace commonapi { +namespace tests { + +typedef CommonAPI::DBus::DBusStubAdapterHelper<TestFreedesktopInterfaceStub> TestFreedesktopInterfaceDBusStubAdapterHelper; + +class TestFreedesktopInterfaceDBusStubAdapterInternal + : public virtual TestFreedesktopInterfaceStubAdapter, + public TestFreedesktopInterfaceDBusStubAdapterHelper +{ +public: + TestFreedesktopInterfaceDBusStubAdapterInternal( + const CommonAPI::DBus::DBusAddress &_address, + const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection, + const std::shared_ptr<CommonAPI::StubBase> &_stub); + + ~TestFreedesktopInterfaceDBusStubAdapterInternal(); + + virtual bool hasFreedesktopProperties(); + + inline static const char* getInterface() { + return TestFreedesktopInterface::getInterface(); + } + + void fireTestPredefinedTypeAttributeAttributeChanged(const uint32_t& value); + void fireTestReadonlyAttributeAttributeChanged(const uint32_t& value); + void fireTestDerivedStructAttributeAttributeChanged(const ::commonapi::tests::DerivedTypeCollection::TestStructExtended& value); + void fireTestDerivedArrayAttributeAttributeChanged(const ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64& value); + + + + const TestFreedesktopInterfaceDBusStubAdapterHelper::StubDispatcherTable& getStubDispatcherTable(); + const CommonAPI::DBus::StubAttributeTable& getStubAttributeTable(); + + void deactivateManagedInstances(); + + +static CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopInterfaceStub, + CommonAPI::Version + > getTestFreedesktopInterfaceInterfaceVersionStubDispatcher; + +static CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopInterfaceStub, + uint32_t + > getTestPredefinedTypeAttributeAttributeStubDispatcher; +static CommonAPI::DBus::DBusSetFreedesktopObservableAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopInterfaceStub, + uint32_t + > setTestPredefinedTypeAttributeAttributeStubDispatcher; +static CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopInterfaceStub, + uint32_t + > getTestReadonlyAttributeAttributeStubDispatcher; +static CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestStructExtended, + ::commonapi::tests::DerivedTypeCollection_::TestStructExtendedDeployment_t + > getTestDerivedStructAttributeAttributeStubDispatcher; +static CommonAPI::DBus::DBusSetFreedesktopObservableAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestStructExtended, + ::commonapi::tests::DerivedTypeCollection_::TestStructExtendedDeployment_t + > setTestDerivedStructAttributeAttributeStubDispatcher; +static CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64, + ::commonapi::tests::DerivedTypeCollection_::TestArrayUInt64Deployment_t + > getTestDerivedArrayAttributeAttributeStubDispatcher; +static CommonAPI::DBus::DBusSetFreedesktopObservableAttributeStubDispatcher< + ::v1::commonapi::tests::TestFreedesktopInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64, + ::commonapi::tests::DerivedTypeCollection_::TestArrayUInt64Deployment_t + > setTestDerivedArrayAttributeAttributeStubDispatcher; + + + + + + + protected: + virtual const char* getMethodsDBusIntrospectionXmlData() const; + + private: + TestFreedesktopInterfaceDBusStubAdapterHelper::StubDispatcherTable stubDispatcherTable_; + CommonAPI::DBus::StubAttributeTable stubAttributeTable_; +}; + +class TestFreedesktopInterfaceDBusStubAdapter + : public TestFreedesktopInterfaceDBusStubAdapterInternal, + public std::enable_shared_from_this<TestFreedesktopInterfaceDBusStubAdapter> { +public: + TestFreedesktopInterfaceDBusStubAdapter( + 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), + TestFreedesktopInterfaceDBusStubAdapterInternal( + _address, + _connection, + _stub) { + } +}; + +} // namespace tests +} // namespace commonapi +} // namespace v1 + +#endif // COMMONAPI_TESTS_Test_Freedesktop_Interface_DBUS_STUB_ADAPTER_HPP_ diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceDBusDeployment.cpp b/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceDBusDeployment.cpp new file mode 100644 index 0000000..76d5d69 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceDBusDeployment.cpp @@ -0,0 +1,28 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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 "TestInterfaceDBusDeployment.hpp" + +namespace v1 { +namespace commonapi { +namespace tests { +namespace TestInterface_ { + +// Type-specific deployments + +// Attribute-specific deployments + +// Argument-specific deployments + +// Broadcast-specific deployments + +} // namespace TestInterface_ +} // namespace tests +} // namespace commonapi +} // namespace v1 diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceDBusDeployment.hpp b/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceDBusDeployment.hpp new file mode 100644 index 0000000..38acd4c --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceDBusDeployment.hpp @@ -0,0 +1,45 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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_TESTINTERFACE_DEPLOYMENT_HPP_ +#define COMMONAPI_DBUS_TESTINTERFACE_DEPLOYMENT_HPP_ + +#include <commonapi/tests/DerivedTypeCollectionDBusDeployment.hpp> + +#include <commonapi/tests/DerivedTypeCollectionDBusDeployment.hpp> + +#if !defined (COMMONAPI_INTERNAL_COMPILATION) +#define COMMONAPI_INTERNAL_COMPILATION +#endif +#include <CommonAPI/DBus/DBusDeployment.hpp> +#undef COMMONAPI_INTERNAL_COMPILATION + +namespace v1 { +namespace commonapi { +namespace tests { +namespace TestInterface_ { + +// Interface-specific deployment types + +// Type-specific deployments + +// Attribute-specific deployments + +// Argument-specific deployments + +// Broadcast-specific deployments + + +} // namespace TestInterface_ +} // namespace tests +} // namespace commonapi +} // namespace v1 + +#endif // COMMONAPI_DBUS_TESTINTERFACE_DEPLOYMENT_HPP_ diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceDBusProxy.cpp b/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceDBusProxy.cpp new file mode 100644 index 0000000..e4eeee7 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceDBusProxy.cpp @@ -0,0 +1,426 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* Used org.franca.core 0.9.1.201412191134. +* +* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +* If a copy of the MPL was not distributed with this file, You can obtain one at +* http://mozilla.org/MPL/2.0/. +*/ +#include <v1/commonapi/tests/TestInterfaceDBusProxy.hpp> + +namespace v1 { +namespace commonapi { +namespace tests { + +std::shared_ptr<CommonAPI::DBus::DBusProxy> createTestInterfaceDBusProxy( + const CommonAPI::DBus::DBusAddress &_address, + const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection) { + return std::make_shared<TestInterfaceDBusProxy>(_address, _connection); +} + +INITIALIZER(registerTestInterfaceDBusProxy) { + CommonAPI::DBus::Factory::get()->registerProxyCreateMethod( + TestInterface::getInterface(), + &createTestInterfaceDBusProxy); +} + +TestInterfaceDBusProxy::TestInterfaceDBusProxy( + const CommonAPI::DBus::DBusAddress &_address, + const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection) + : CommonAPI::DBus::DBusProxy(_address, _connection) +, testPredefinedTypeAttribute_(*this, "onTestPredefinedTypeAttributeAttributeChanged", "setTestPredefinedTypeAttributeAttribute", "u", "getTestPredefinedTypeAttributeAttribute", static_cast<CommonAPI::EmptyDeployment*>(nullptr)), + testDerivedStructAttribute_(*this, "onTestDerivedStructAttributeAttributeChanged", "setTestDerivedStructAttributeAttribute", "(sqi)", "getTestDerivedStructAttributeAttribute", static_cast<::commonapi::tests::DerivedTypeCollection_::TestStructExtendedDeployment_t*>(nullptr)), + testDerivedArrayAttribute_(*this, "onTestDerivedArrayAttributeAttributeChanged", "setTestDerivedArrayAttributeAttribute", "at", "getTestDerivedArrayAttributeAttribute", static_cast<::commonapi::tests::DerivedTypeCollection_::TestArrayUInt64Deployment_t*>(nullptr)) +, testPredefinedTypeBroadcast_(*this, "TestPredefinedTypeBroadcast", "us", std::make_tuple(static_cast<CommonAPI::EmptyDeployment*>(nullptr), static_cast<CommonAPI::DBus::StringDeployment*>(nullptr))), + testSelectiveBroadcastSelective_(*this, "TestSelectiveBroadcast", "", std::make_tuple()), + testBroadcastWithOutArgsSelective_(*this, "TestBroadcastWithOutArgs", "us", std::make_tuple(static_cast<CommonAPI::EmptyDeployment*>(nullptr), static_cast<CommonAPI::DBus::StringDeployment*>(nullptr))) +{ +} + + TestInterfaceDBusProxy::TestPredefinedTypeAttributeAttribute& TestInterfaceDBusProxy::getTestPredefinedTypeAttributeAttribute() { + return testPredefinedTypeAttribute_; + } + TestInterfaceDBusProxy::TestDerivedStructAttributeAttribute& TestInterfaceDBusProxy::getTestDerivedStructAttributeAttribute() { + return testDerivedStructAttribute_; + } + TestInterfaceDBusProxy::TestDerivedArrayAttributeAttribute& TestInterfaceDBusProxy::getTestDerivedArrayAttributeAttribute() { + return testDerivedArrayAttribute_; + } + +TestInterfaceDBusProxy::TestPredefinedTypeBroadcastEvent& TestInterfaceDBusProxy::getTestPredefinedTypeBroadcastEvent() { + return testPredefinedTypeBroadcast_; +} +TestInterfaceDBusProxy::TestSelectiveBroadcastSelectiveEvent& TestInterfaceDBusProxy::getTestSelectiveBroadcastSelectiveEvent() { + return testSelectiveBroadcastSelective_; +} +TestInterfaceDBusProxy::TestBroadcastWithOutArgsSelectiveEvent& TestInterfaceDBusProxy::getTestBroadcastWithOutArgsSelectiveEvent() { + return testBroadcastWithOutArgsSelective_; +} + + void TestInterfaceDBusProxy::testEmptyMethod(CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info) { + CommonAPI::DBus::DBusProxyHelper< + CommonAPI::DBus::DBusSerializableArguments< + >, + CommonAPI::DBus::DBusSerializableArguments< + > + >::callMethodWithReply( + *this, + "testEmptyMethod", + "", +(_info ? _info : &CommonAPI::DBus::defaultCallInfo), +_internalCallStatus); +} + std::future<CommonAPI::CallStatus> TestInterfaceDBusProxy::testEmptyMethodAsync(TestEmptyMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info) { + return CommonAPI::DBus::DBusProxyHelper< + CommonAPI::DBus::DBusSerializableArguments< + >, + CommonAPI::DBus::DBusSerializableArguments< + > + >::callMethodAsync( + *this, + "testEmptyMethod", + "", + (_info ? _info : &CommonAPI::DBus::defaultCallInfo), + [_callback] (CommonAPI::CallStatus _internalCallStatus) { + if (_callback) + _callback(_internalCallStatus); + }, + std::make_tuple()); + } + void TestInterfaceDBusProxy::testVoidPredefinedTypeMethod(const uint32_t &_uint32Value, const std::string &_stringValue, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info) { + CommonAPI::Deployable<uint32_t, CommonAPI::EmptyDeployment> deploy_uint32Value(_uint32Value, static_cast<CommonAPI::EmptyDeployment*>(nullptr)); + CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment> deploy_stringValue(_stringValue, static_cast<CommonAPI::DBus::StringDeployment*>(nullptr)); + CommonAPI::DBus::DBusProxyHelper< + CommonAPI::DBus::DBusSerializableArguments< + CommonAPI::Deployable<uint32_t, CommonAPI::EmptyDeployment >, + CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment > + >, + CommonAPI::DBus::DBusSerializableArguments< + > + >::callMethodWithReply( + *this, + "testVoidPredefinedTypeMethod", + "us", +(_info ? _info : &CommonAPI::DBus::defaultCallInfo), +deploy_uint32Value, deploy_stringValue, +_internalCallStatus); +} + std::future<CommonAPI::CallStatus> TestInterfaceDBusProxy::testVoidPredefinedTypeMethodAsync(const uint32_t &_uint32Value, const std::string &_stringValue, TestVoidPredefinedTypeMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info) { + CommonAPI::Deployable<uint32_t, CommonAPI::EmptyDeployment> deploy_uint32Value(_uint32Value, static_cast<CommonAPI::EmptyDeployment*>(nullptr)); + CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment> deploy_stringValue(_stringValue, static_cast<CommonAPI::DBus::StringDeployment*>(nullptr)); + return CommonAPI::DBus::DBusProxyHelper< + CommonAPI::DBus::DBusSerializableArguments< + CommonAPI::Deployable<uint32_t, CommonAPI::EmptyDeployment >, + CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment > + >, + CommonAPI::DBus::DBusSerializableArguments< + > + >::callMethodAsync( + *this, + "testVoidPredefinedTypeMethod", + "us", + (_info ? _info : &CommonAPI::DBus::defaultCallInfo), + deploy_uint32Value, deploy_stringValue, + [_callback] (CommonAPI::CallStatus _internalCallStatus) { + if (_callback) + _callback(_internalCallStatus); + }, + std::make_tuple()); + } + void TestInterfaceDBusProxy::testPredefinedTypeMethod(const uint32_t &_uint32InValue, const std::string &_stringInValue, CommonAPI::CallStatus &_internalCallStatus, uint32_t &_uint32OutValue, std::string &_stringOutValue, const CommonAPI::CallInfo *_info) { + CommonAPI::Deployable<uint32_t, CommonAPI::EmptyDeployment> deploy_uint32InValue(_uint32InValue, static_cast<CommonAPI::EmptyDeployment*>(nullptr)); + CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment> deploy_stringInValue(_stringInValue, static_cast<CommonAPI::DBus::StringDeployment*>(nullptr)); + CommonAPI::Deployable<uint32_t, CommonAPI::EmptyDeployment> deploy_uint32OutValue(static_cast<CommonAPI::EmptyDeployment*>(nullptr)); + CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment> deploy_stringOutValue(static_cast<CommonAPI::DBus::StringDeployment*>(nullptr)); + CommonAPI::DBus::DBusProxyHelper< + CommonAPI::DBus::DBusSerializableArguments< + CommonAPI::Deployable<uint32_t, CommonAPI::EmptyDeployment >, + CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment > + >, + CommonAPI::DBus::DBusSerializableArguments< + CommonAPI::Deployable<uint32_t,CommonAPI::EmptyDeployment>, + CommonAPI::Deployable<std::string,CommonAPI::DBus::StringDeployment> + > + >::callMethodWithReply( + *this, + "testPredefinedTypeMethod", + "us", +(_info ? _info : &CommonAPI::DBus::defaultCallInfo), +deploy_uint32InValue, deploy_stringInValue, +_internalCallStatus, +deploy_uint32OutValue, deploy_stringOutValue); +_uint32OutValue = deploy_uint32OutValue.getValue(); +_stringOutValue = deploy_stringOutValue.getValue(); +} + std::future<CommonAPI::CallStatus> TestInterfaceDBusProxy::testPredefinedTypeMethodAsync(const uint32_t &_uint32InValue, const std::string &_stringInValue, TestPredefinedTypeMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info) { + CommonAPI::Deployable<uint32_t, CommonAPI::EmptyDeployment> deploy_uint32InValue(_uint32InValue, static_cast<CommonAPI::EmptyDeployment*>(nullptr)); + CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment> deploy_stringInValue(_stringInValue, static_cast<CommonAPI::DBus::StringDeployment*>(nullptr)); + CommonAPI::Deployable<uint32_t, CommonAPI::EmptyDeployment> deploy_uint32OutValue(static_cast<CommonAPI::EmptyDeployment*>(nullptr)); + CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment> deploy_stringOutValue(static_cast<CommonAPI::DBus::StringDeployment*>(nullptr)); + return CommonAPI::DBus::DBusProxyHelper< + CommonAPI::DBus::DBusSerializableArguments< + CommonAPI::Deployable<uint32_t, CommonAPI::EmptyDeployment >, + CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment > + >, + CommonAPI::DBus::DBusSerializableArguments< + CommonAPI::Deployable<uint32_t,CommonAPI::EmptyDeployment>, + CommonAPI::Deployable<std::string,CommonAPI::DBus::StringDeployment> + > + >::callMethodAsync( + *this, + "testPredefinedTypeMethod", + "us", + (_info ? _info : &CommonAPI::DBus::defaultCallInfo), + deploy_uint32InValue, deploy_stringInValue, + [_callback] (CommonAPI::CallStatus _internalCallStatus, CommonAPI::Deployable<uint32_t, CommonAPI::EmptyDeployment> _uint32OutValue, CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment> _stringOutValue) { + if (_callback) + _callback(_internalCallStatus, _uint32OutValue.getValue(), _stringOutValue.getValue()); + }, + std::make_tuple(deploy_uint32OutValue, deploy_stringOutValue)); + } + void TestInterfaceDBusProxy::testVoidDerivedTypeMethod(const ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 &_testEnumExtended2Value, const ::commonapi::tests::DerivedTypeCollection::TestMap &_testMapValue, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info) { + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::TestEnumExtended2, CommonAPI::EmptyDeployment> deploy_testEnumExtended2Value(_testEnumExtended2Value, static_cast<CommonAPI::EmptyDeployment*>(nullptr)); + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::TestMap, ::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t> deploy_testMapValue(_testMapValue, static_cast<::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t*>(nullptr)); + CommonAPI::DBus::DBusProxyHelper< + CommonAPI::DBus::DBusSerializableArguments< + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::TestEnumExtended2, CommonAPI::EmptyDeployment >, + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::TestMap, ::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t > + >, + CommonAPI::DBus::DBusSerializableArguments< + > + >::callMethodWithReply( + *this, + "testVoidDerivedTypeMethod", + "ia{ua(sq)}", +(_info ? _info : &CommonAPI::DBus::defaultCallInfo), +deploy_testEnumExtended2Value, deploy_testMapValue, +_internalCallStatus); +} + std::future<CommonAPI::CallStatus> TestInterfaceDBusProxy::testVoidDerivedTypeMethodAsync(const ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 &_testEnumExtended2Value, const ::commonapi::tests::DerivedTypeCollection::TestMap &_testMapValue, TestVoidDerivedTypeMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info) { + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::TestEnumExtended2, CommonAPI::EmptyDeployment> deploy_testEnumExtended2Value(_testEnumExtended2Value, static_cast<CommonAPI::EmptyDeployment*>(nullptr)); + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::TestMap, ::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t> deploy_testMapValue(_testMapValue, static_cast<::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t*>(nullptr)); + return CommonAPI::DBus::DBusProxyHelper< + CommonAPI::DBus::DBusSerializableArguments< + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::TestEnumExtended2, CommonAPI::EmptyDeployment >, + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::TestMap, ::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t > + >, + CommonAPI::DBus::DBusSerializableArguments< + > + >::callMethodAsync( + *this, + "testVoidDerivedTypeMethod", + "ia{ua(sq)}", + (_info ? _info : &CommonAPI::DBus::defaultCallInfo), + deploy_testEnumExtended2Value, deploy_testMapValue, + [_callback] (CommonAPI::CallStatus _internalCallStatus) { + if (_callback) + _callback(_internalCallStatus); + }, + std::make_tuple()); + } + void TestInterfaceDBusProxy::testDerivedTypeMethod(const ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 &_testEnumExtended2InValue, const ::commonapi::tests::DerivedTypeCollection::TestMap &_testMapInValue, CommonAPI::CallStatus &_internalCallStatus, ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 &_testEnumExtended2OutValue, ::commonapi::tests::DerivedTypeCollection::TestMap &_testMapOutValue, const CommonAPI::CallInfo *_info) { + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::TestEnumExtended2, CommonAPI::EmptyDeployment> deploy_testEnumExtended2InValue(_testEnumExtended2InValue, static_cast<CommonAPI::EmptyDeployment*>(nullptr)); + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::TestMap, ::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t> deploy_testMapInValue(_testMapInValue, static_cast<::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t*>(nullptr)); + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::TestEnumExtended2, CommonAPI::EmptyDeployment> deploy_testEnumExtended2OutValue(static_cast<CommonAPI::EmptyDeployment*>(nullptr)); + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::TestMap, ::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t> deploy_testMapOutValue(static_cast<::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t*>(nullptr)); + CommonAPI::DBus::DBusProxyHelper< + CommonAPI::DBus::DBusSerializableArguments< + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::TestEnumExtended2, CommonAPI::EmptyDeployment >, + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::TestMap, ::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t > + >, + CommonAPI::DBus::DBusSerializableArguments< + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::TestEnumExtended2,CommonAPI::EmptyDeployment>, + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::TestMap,::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t> + > + >::callMethodWithReply( + *this, + "testDerivedTypeMethod", + "ia{ua(sq)}", +(_info ? _info : &CommonAPI::DBus::defaultCallInfo), +deploy_testEnumExtended2InValue, deploy_testMapInValue, +_internalCallStatus, +deploy_testEnumExtended2OutValue, deploy_testMapOutValue); +_testEnumExtended2OutValue = deploy_testEnumExtended2OutValue.getValue(); +_testMapOutValue = deploy_testMapOutValue.getValue(); +} + std::future<CommonAPI::CallStatus> TestInterfaceDBusProxy::testDerivedTypeMethodAsync(const ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 &_testEnumExtended2InValue, const ::commonapi::tests::DerivedTypeCollection::TestMap &_testMapInValue, TestDerivedTypeMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info) { + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::TestEnumExtended2, CommonAPI::EmptyDeployment> deploy_testEnumExtended2InValue(_testEnumExtended2InValue, static_cast<CommonAPI::EmptyDeployment*>(nullptr)); + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::TestMap, ::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t> deploy_testMapInValue(_testMapInValue, static_cast<::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t*>(nullptr)); + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::TestEnumExtended2, CommonAPI::EmptyDeployment> deploy_testEnumExtended2OutValue(static_cast<CommonAPI::EmptyDeployment*>(nullptr)); + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::TestMap, ::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t> deploy_testMapOutValue(static_cast<::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t*>(nullptr)); + return CommonAPI::DBus::DBusProxyHelper< + CommonAPI::DBus::DBusSerializableArguments< + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::TestEnumExtended2, CommonAPI::EmptyDeployment >, + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::TestMap, ::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t > + >, + CommonAPI::DBus::DBusSerializableArguments< + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::TestEnumExtended2,CommonAPI::EmptyDeployment>, + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::TestMap,::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t> + > + >::callMethodAsync( + *this, + "testDerivedTypeMethod", + "ia{ua(sq)}", + (_info ? _info : &CommonAPI::DBus::defaultCallInfo), + deploy_testEnumExtended2InValue, deploy_testMapInValue, + [_callback] (CommonAPI::CallStatus _internalCallStatus, CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::TestEnumExtended2, CommonAPI::EmptyDeployment> _testEnumExtended2OutValue, CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::TestMap, ::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t> _testMapOutValue) { + if (_callback) + _callback(_internalCallStatus, _testEnumExtended2OutValue.getValue(), _testMapOutValue.getValue()); + }, + std::make_tuple(deploy_testEnumExtended2OutValue, deploy_testMapOutValue)); + } + void TestInterfaceDBusProxy::TestArrayOfPolymorphicStructMethod(const std::vector<std::shared_ptr<::commonapi::tests::DerivedTypeCollection::TestPolymorphicStruct>> &_inArray, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info) { + CommonAPI::Deployable<std::vector<std::shared_ptr<::commonapi::tests::DerivedTypeCollection::TestPolymorphicStruct>>, CommonAPI::DBus::ArrayDeployment<::commonapi::tests::DerivedTypeCollection_::TestPolymorphicStructDeployment_t>> deploy_inArray(_inArray, static_cast<CommonAPI::DBus::ArrayDeployment<::commonapi::tests::DerivedTypeCollection_::TestPolymorphicStructDeployment_t>*>(nullptr)); + CommonAPI::DBus::DBusProxyHelper< + CommonAPI::DBus::DBusSerializableArguments< + CommonAPI::Deployable<std::vector<std::shared_ptr<::commonapi::tests::DerivedTypeCollection::TestPolymorphicStruct>>, CommonAPI::DBus::ArrayDeployment<::commonapi::tests::DerivedTypeCollection_::TestPolymorphicStructDeployment_t> > + >, + CommonAPI::DBus::DBusSerializableArguments< + > + >::callMethodWithReply( + *this, + "TestArrayOfPolymorphicStructMethod", + "a(uv)", +(_info ? _info : &CommonAPI::DBus::defaultCallInfo), +deploy_inArray, +_internalCallStatus); +} + std::future<CommonAPI::CallStatus> TestInterfaceDBusProxy::TestArrayOfPolymorphicStructMethodAsync(const std::vector<std::shared_ptr<::commonapi::tests::DerivedTypeCollection::TestPolymorphicStruct>> &_inArray, TestArrayOfPolymorphicStructMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info) { + CommonAPI::Deployable<std::vector<std::shared_ptr<::commonapi::tests::DerivedTypeCollection::TestPolymorphicStruct>>, CommonAPI::DBus::ArrayDeployment<::commonapi::tests::DerivedTypeCollection_::TestPolymorphicStructDeployment_t>> deploy_inArray(_inArray, static_cast<CommonAPI::DBus::ArrayDeployment<::commonapi::tests::DerivedTypeCollection_::TestPolymorphicStructDeployment_t>*>(nullptr)); + return CommonAPI::DBus::DBusProxyHelper< + CommonAPI::DBus::DBusSerializableArguments< + CommonAPI::Deployable<std::vector<std::shared_ptr<::commonapi::tests::DerivedTypeCollection::TestPolymorphicStruct>>, CommonAPI::DBus::ArrayDeployment<::commonapi::tests::DerivedTypeCollection_::TestPolymorphicStructDeployment_t> > + >, + CommonAPI::DBus::DBusSerializableArguments< + > + >::callMethodAsync( + *this, + "TestArrayOfPolymorphicStructMethod", + "a(uv)", + (_info ? _info : &CommonAPI::DBus::defaultCallInfo), + deploy_inArray, + [_callback] (CommonAPI::CallStatus _internalCallStatus) { + if (_callback) + _callback(_internalCallStatus); + }, + std::make_tuple()); + } + void TestInterfaceDBusProxy::TestMapOfPolymorphicStructMethod(const ::commonapi::tests::DerivedTypeCollection::MapIntToPolymorphic &_inMap, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info) { + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::MapIntToPolymorphic, ::commonapi::tests::DerivedTypeCollection_::MapIntToPolymorphicDeployment_t> deploy_inMap(_inMap, static_cast<::commonapi::tests::DerivedTypeCollection_::MapIntToPolymorphicDeployment_t*>(nullptr)); + CommonAPI::DBus::DBusProxyHelper< + CommonAPI::DBus::DBusSerializableArguments< + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::MapIntToPolymorphic, ::commonapi::tests::DerivedTypeCollection_::MapIntToPolymorphicDeployment_t > + >, + CommonAPI::DBus::DBusSerializableArguments< + > + >::callMethodWithReply( + *this, + "TestMapOfPolymorphicStructMethod", + "a{y(uv)}", +(_info ? _info : &CommonAPI::DBus::defaultCallInfo), +deploy_inMap, +_internalCallStatus); +} + std::future<CommonAPI::CallStatus> TestInterfaceDBusProxy::TestMapOfPolymorphicStructMethodAsync(const ::commonapi::tests::DerivedTypeCollection::MapIntToPolymorphic &_inMap, TestMapOfPolymorphicStructMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info) { + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::MapIntToPolymorphic, ::commonapi::tests::DerivedTypeCollection_::MapIntToPolymorphicDeployment_t> deploy_inMap(_inMap, static_cast<::commonapi::tests::DerivedTypeCollection_::MapIntToPolymorphicDeployment_t*>(nullptr)); + return CommonAPI::DBus::DBusProxyHelper< + CommonAPI::DBus::DBusSerializableArguments< + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::MapIntToPolymorphic, ::commonapi::tests::DerivedTypeCollection_::MapIntToPolymorphicDeployment_t > + >, + CommonAPI::DBus::DBusSerializableArguments< + > + >::callMethodAsync( + *this, + "TestMapOfPolymorphicStructMethod", + "a{y(uv)}", + (_info ? _info : &CommonAPI::DBus::defaultCallInfo), + deploy_inMap, + [_callback] (CommonAPI::CallStatus _internalCallStatus) { + if (_callback) + _callback(_internalCallStatus); + }, + std::make_tuple()); + } + void TestInterfaceDBusProxy::TestStructWithPolymorphicMemberMethod(const ::commonapi::tests::DerivedTypeCollection::StructWithPolymorphicMember &_inStruct, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info) { + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::StructWithPolymorphicMember, ::commonapi::tests::DerivedTypeCollection_::StructWithPolymorphicMemberDeployment_t> deploy_inStruct(_inStruct, static_cast<::commonapi::tests::DerivedTypeCollection_::StructWithPolymorphicMemberDeployment_t*>(nullptr)); + CommonAPI::DBus::DBusProxyHelper< + CommonAPI::DBus::DBusSerializableArguments< + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::StructWithPolymorphicMember, ::commonapi::tests::DerivedTypeCollection_::StructWithPolymorphicMemberDeployment_t > + >, + CommonAPI::DBus::DBusSerializableArguments< + > + >::callMethodWithReply( + *this, + "TestStructWithPolymorphicMemberMethod", + "(u(uv))", +(_info ? _info : &CommonAPI::DBus::defaultCallInfo), +deploy_inStruct, +_internalCallStatus); +} + std::future<CommonAPI::CallStatus> TestInterfaceDBusProxy::TestStructWithPolymorphicMemberMethodAsync(const ::commonapi::tests::DerivedTypeCollection::StructWithPolymorphicMember &_inStruct, TestStructWithPolymorphicMemberMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info) { + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::StructWithPolymorphicMember, ::commonapi::tests::DerivedTypeCollection_::StructWithPolymorphicMemberDeployment_t> deploy_inStruct(_inStruct, static_cast<::commonapi::tests::DerivedTypeCollection_::StructWithPolymorphicMemberDeployment_t*>(nullptr)); + return CommonAPI::DBus::DBusProxyHelper< + CommonAPI::DBus::DBusSerializableArguments< + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::StructWithPolymorphicMember, ::commonapi::tests::DerivedTypeCollection_::StructWithPolymorphicMemberDeployment_t > + >, + CommonAPI::DBus::DBusSerializableArguments< + > + >::callMethodAsync( + *this, + "TestStructWithPolymorphicMemberMethod", + "(u(uv))", + (_info ? _info : &CommonAPI::DBus::defaultCallInfo), + deploy_inStruct, + [_callback] (CommonAPI::CallStatus _internalCallStatus) { + if (_callback) + _callback(_internalCallStatus); + }, + std::make_tuple()); + } + void TestInterfaceDBusProxy::TestStructWithEnumKeyMapMember(const ::commonapi::tests::DerivedTypeCollection::StructWithEnumKeyMap &_inStruct, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info) { + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::StructWithEnumKeyMap, ::commonapi::tests::DerivedTypeCollection_::StructWithEnumKeyMapDeployment_t> deploy_inStruct(_inStruct, static_cast<::commonapi::tests::DerivedTypeCollection_::StructWithEnumKeyMapDeployment_t*>(nullptr)); + CommonAPI::DBus::DBusProxyHelper< + CommonAPI::DBus::DBusSerializableArguments< + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::StructWithEnumKeyMap, ::commonapi::tests::DerivedTypeCollection_::StructWithEnumKeyMapDeployment_t > + >, + CommonAPI::DBus::DBusSerializableArguments< + > + >::callMethodWithReply( + *this, + "TestStructWithEnumKeyMapMember", + "(a{is})", +(_info ? _info : &CommonAPI::DBus::defaultCallInfo), +deploy_inStruct, +_internalCallStatus); +} + std::future<CommonAPI::CallStatus> TestInterfaceDBusProxy::TestStructWithEnumKeyMapMemberAsync(const ::commonapi::tests::DerivedTypeCollection::StructWithEnumKeyMap &_inStruct, TestStructWithEnumKeyMapMemberAsyncCallback _callback, const CommonAPI::CallInfo *_info) { + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::StructWithEnumKeyMap, ::commonapi::tests::DerivedTypeCollection_::StructWithEnumKeyMapDeployment_t> deploy_inStruct(_inStruct, static_cast<::commonapi::tests::DerivedTypeCollection_::StructWithEnumKeyMapDeployment_t*>(nullptr)); + return CommonAPI::DBus::DBusProxyHelper< + CommonAPI::DBus::DBusSerializableArguments< + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::StructWithEnumKeyMap, ::commonapi::tests::DerivedTypeCollection_::StructWithEnumKeyMapDeployment_t > + >, + CommonAPI::DBus::DBusSerializableArguments< + > + >::callMethodAsync( + *this, + "TestStructWithEnumKeyMapMember", + "(a{is})", + (_info ? _info : &CommonAPI::DBus::defaultCallInfo), + deploy_inStruct, + [_callback] (CommonAPI::CallStatus _internalCallStatus) { + if (_callback) + _callback(_internalCallStatus); + }, + std::make_tuple()); + } + + +void TestInterfaceDBusProxy::getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const { + ownVersionMajor = 1; + ownVersionMinor = 0; + } + + } // namespace tests + } // namespace commonapi + } // namespace v1 diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceDBusProxy.hpp b/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceDBusProxy.hpp new file mode 100644 index 0000000..c7c1389 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceDBusProxy.hpp @@ -0,0 +1,94 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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_Test_Interface_DBUS_PROXY_HPP_ +#define COMMONAPI_TESTS_Test_Interface_DBUS_PROXY_HPP_ + +#include <v1/commonapi/tests/TestInterfaceProxyBase.hpp> +#include "v1/commonapi/tests/TestInterfaceDBusDeployment.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/DBusAddressTranslator.hpp> +#include <CommonAPI/DBus/DBusAttribute.hpp> +#include <CommonAPI/DBus/DBusEvent.hpp> +#include <CommonAPI/Types.hpp> +#include <CommonAPI/DBus/DBusSelectiveEvent.hpp> + +#undef COMMONAPI_INTERNAL_COMPILATION + +#include <string> + +namespace v1 { +namespace commonapi { +namespace tests { + +class TestInterfaceDBusProxy + : virtual public TestInterfaceProxyBase, + virtual public CommonAPI::DBus::DBusProxy { +public: + TestInterfaceDBusProxy( + const CommonAPI::DBus::DBusAddress &_address, + const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection); + + virtual ~TestInterfaceDBusProxy() { } + + virtual TestPredefinedTypeAttributeAttribute& getTestPredefinedTypeAttributeAttribute(); + virtual TestDerivedStructAttributeAttribute& getTestDerivedStructAttributeAttribute(); + virtual TestDerivedArrayAttributeAttribute& getTestDerivedArrayAttributeAttribute(); + + virtual TestPredefinedTypeBroadcastEvent& getTestPredefinedTypeBroadcastEvent(); + virtual TestSelectiveBroadcastSelectiveEvent& getTestSelectiveBroadcastSelectiveEvent(); + virtual TestBroadcastWithOutArgsSelectiveEvent& getTestBroadcastWithOutArgsSelectiveEvent(); + + virtual void testEmptyMethod(CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info); + virtual std::future<CommonAPI::CallStatus> testEmptyMethodAsync(TestEmptyMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info); + virtual void testVoidPredefinedTypeMethod(const uint32_t &_uint32Value, const std::string &_stringValue, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info); + virtual std::future<CommonAPI::CallStatus> testVoidPredefinedTypeMethodAsync(const uint32_t &_uint32Value, const std::string &_stringValue, TestVoidPredefinedTypeMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info); + virtual void testPredefinedTypeMethod(const uint32_t &_uint32InValue, const std::string &_stringInValue, CommonAPI::CallStatus &_internalCallStatus, uint32_t &_uint32OutValue, std::string &_stringOutValue, const CommonAPI::CallInfo *_info); + virtual std::future<CommonAPI::CallStatus> testPredefinedTypeMethodAsync(const uint32_t &_uint32InValue, const std::string &_stringInValue, TestPredefinedTypeMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info); + virtual void testVoidDerivedTypeMethod(const ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 &_testEnumExtended2Value, const ::commonapi::tests::DerivedTypeCollection::TestMap &_testMapValue, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info); + virtual std::future<CommonAPI::CallStatus> testVoidDerivedTypeMethodAsync(const ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 &_testEnumExtended2Value, const ::commonapi::tests::DerivedTypeCollection::TestMap &_testMapValue, TestVoidDerivedTypeMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info); + virtual void testDerivedTypeMethod(const ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 &_testEnumExtended2InValue, const ::commonapi::tests::DerivedTypeCollection::TestMap &_testMapInValue, CommonAPI::CallStatus &_internalCallStatus, ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 &_testEnumExtended2OutValue, ::commonapi::tests::DerivedTypeCollection::TestMap &_testMapOutValue, const CommonAPI::CallInfo *_info); + virtual std::future<CommonAPI::CallStatus> testDerivedTypeMethodAsync(const ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2 &_testEnumExtended2InValue, const ::commonapi::tests::DerivedTypeCollection::TestMap &_testMapInValue, TestDerivedTypeMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info); + virtual void TestArrayOfPolymorphicStructMethod(const std::vector<std::shared_ptr<::commonapi::tests::DerivedTypeCollection::TestPolymorphicStruct>> &_inArray, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info); + virtual std::future<CommonAPI::CallStatus> TestArrayOfPolymorphicStructMethodAsync(const std::vector<std::shared_ptr<::commonapi::tests::DerivedTypeCollection::TestPolymorphicStruct>> &_inArray, TestArrayOfPolymorphicStructMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info); + virtual void TestMapOfPolymorphicStructMethod(const ::commonapi::tests::DerivedTypeCollection::MapIntToPolymorphic &_inMap, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info); + virtual std::future<CommonAPI::CallStatus> TestMapOfPolymorphicStructMethodAsync(const ::commonapi::tests::DerivedTypeCollection::MapIntToPolymorphic &_inMap, TestMapOfPolymorphicStructMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info); + virtual void TestStructWithPolymorphicMemberMethod(const ::commonapi::tests::DerivedTypeCollection::StructWithPolymorphicMember &_inStruct, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info); + virtual std::future<CommonAPI::CallStatus> TestStructWithPolymorphicMemberMethodAsync(const ::commonapi::tests::DerivedTypeCollection::StructWithPolymorphicMember &_inStruct, TestStructWithPolymorphicMemberMethodAsyncCallback _callback, const CommonAPI::CallInfo *_info); + virtual void TestStructWithEnumKeyMapMember(const ::commonapi::tests::DerivedTypeCollection::StructWithEnumKeyMap &_inStruct, CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info); + virtual std::future<CommonAPI::CallStatus> TestStructWithEnumKeyMapMemberAsync(const ::commonapi::tests::DerivedTypeCollection::StructWithEnumKeyMap &_inStruct, TestStructWithEnumKeyMapMemberAsyncCallback _callback, const CommonAPI::CallInfo *_info); + + + virtual void getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const; + +private: + + CommonAPI::DBus::DBusObservableAttribute<CommonAPI::DBus::DBusAttribute<TestPredefinedTypeAttributeAttribute>> testPredefinedTypeAttribute_; + CommonAPI::DBus::DBusObservableAttribute<CommonAPI::DBus::DBusAttribute<TestDerivedStructAttributeAttribute, ::commonapi::tests::DerivedTypeCollection_::TestStructExtendedDeployment_t>> testDerivedStructAttribute_; + CommonAPI::DBus::DBusObservableAttribute<CommonAPI::DBus::DBusAttribute<TestDerivedArrayAttributeAttribute, ::commonapi::tests::DerivedTypeCollection_::TestArrayUInt64Deployment_t>> testDerivedArrayAttribute_; + + CommonAPI::DBus::DBusEvent<TestPredefinedTypeBroadcastEvent, CommonAPI::Deployable<uint32_t, CommonAPI::EmptyDeployment>, CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment>> testPredefinedTypeBroadcast_; + CommonAPI::DBus::DBusSelectiveEvent<TestSelectiveBroadcastSelectiveEvent> testSelectiveBroadcastSelective_; + CommonAPI::DBus::DBusSelectiveEvent<TestBroadcastWithOutArgsSelectiveEvent, CommonAPI::Deployable<uint32_t, CommonAPI::EmptyDeployment>, CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment>> testBroadcastWithOutArgsSelective_; + +}; + +} // namespace tests +} // namespace commonapi +} // namespace v1 + +#endif // COMMONAPI_TESTS_Test_Interface_DBUS_PROXY_HPP_ + diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceDBusStubAdapter.cpp b/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceDBusStubAdapter.cpp new file mode 100644 index 0000000..67a8b07 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceDBusStubAdapter.cpp @@ -0,0 +1,531 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* Used org.franca.core 0.9.1.201412191134. +* +* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +* If a copy of the MPL was not distributed with this file, You can obtain one at +* http://mozilla.org/MPL/2.0/. +*/ +#include <v1/commonapi/tests/TestInterface.hpp> +#include <v1/commonapi/tests/TestInterfaceDBusStubAdapter.hpp> + +namespace v1 { +namespace commonapi { +namespace tests { + +std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> createTestInterfaceDBusStubAdapter( + const CommonAPI::DBus::DBusAddress &_address, + const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection, + const std::shared_ptr<CommonAPI::StubBase> &_stub) { + return std::make_shared<TestInterfaceDBusStubAdapter>(_address, _connection, _stub); +} + +INITIALIZER(registerTestInterfaceDBusStubAdapter) { + CommonAPI::DBus::Factory::get()->registerStubAdapterCreateMethod( + TestInterface::getInterface(), &createTestInterfaceDBusStubAdapter); +} + +TestInterfaceDBusStubAdapterInternal::~TestInterfaceDBusStubAdapterInternal() { + deactivateManagedInstances(); + TestInterfaceDBusStubAdapterHelper::deinit(); +} + +void TestInterfaceDBusStubAdapterInternal::deactivateManagedInstances() { + +} + +const char* TestInterfaceDBusStubAdapterInternal::getMethodsDBusIntrospectionXmlData() const { + static const std::string introspectionData = + "<method name=\"getInterfaceVersion\">\n" + "<arg name=\"value\" type=\"uu\" direction=\"out\" />" + "</method>\n" + "<method name=\"getTestPredefinedTypeAttributeAttribute\">\n" + "<arg name=\"value\" type=\"u\" direction=\"out\" />" + "</method>\n" + "<method name=\"setTestPredefinedTypeAttributeAttribute\">\n" + "<arg name=\"requestedValue\" type=\"u\" direction=\"in\" />\n" + "<arg name=\"setValue\" type=\"u\" direction=\"out\" />\n" + "</method>\n" + "<signal name=\"onTestPredefinedTypeAttributeAttributeChanged\">\n" + "<arg name=\"changedValue\" type=\"u\" />\n" + "</signal>\n" + "<method name=\"getTestDerivedStructAttributeAttribute\">\n" + "<arg name=\"value\" type=\"(sqi)\" direction=\"out\" />" + "</method>\n" + "<method name=\"setTestDerivedStructAttributeAttribute\">\n" + "<arg name=\"requestedValue\" type=\"(sqi)\" direction=\"in\" />\n" + "<arg name=\"setValue\" type=\"(sqi)\" direction=\"out\" />\n" + "</method>\n" + "<signal name=\"onTestDerivedStructAttributeAttributeChanged\">\n" + "<arg name=\"changedValue\" type=\"(sqi)\" />\n" + "</signal>\n" + "<method name=\"getTestDerivedArrayAttributeAttribute\">\n" + "<arg name=\"value\" type=\"at\" direction=\"out\" />" + "</method>\n" + "<method name=\"setTestDerivedArrayAttributeAttribute\">\n" + "<arg name=\"requestedValue\" type=\"at\" direction=\"in\" />\n" + "<arg name=\"setValue\" type=\"at\" direction=\"out\" />\n" + "</method>\n" + "<signal name=\"onTestDerivedArrayAttributeAttributeChanged\">\n" + "<arg name=\"changedValue\" type=\"at\" />\n" + "</signal>\n" + "<signal name=\"TestPredefinedTypeBroadcast\">\n" + "<arg name=\"uint32Value\" type=\"u\" />\n" + "<arg name=\"stringValue\" type=\"s\" />\n" + "</signal>\n" + "<signal name=\"TestSelectiveBroadcast\">\n" + "</signal>\n" + "<signal name=\"TestBroadcastWithOutArgs\">\n" + "<arg name=\"uint32Value\" type=\"u\" />\n" + "<arg name=\"stringValue\" type=\"s\" />\n" + "</signal>\n" + "<method name=\"testEmptyMethod\">\n" + "</method>\n" + "<method name=\"testVoidPredefinedTypeMethod\">\n" + "<arg name=\"_uint32Value\" type=\"u\" direction=\"in\" />\n" + "<arg name=\"_stringValue\" type=\"s\" direction=\"in\" />\n" + "</method>\n" + "<method name=\"testPredefinedTypeMethod\">\n" + "<arg name=\"_uint32InValue\" type=\"u\" direction=\"in\" />\n" + "<arg name=\"_stringInValue\" type=\"s\" direction=\"in\" />\n" + "<arg name=\"_uint32OutValue\" type=\"u\" direction=\"out\" />\n" + "<arg name=\"_stringOutValue\" type=\"s\" direction=\"out\" />\n" + "</method>\n" + "<method name=\"testVoidDerivedTypeMethod\">\n" + "<arg name=\"_testEnumExtended2Value\" type=\"i\" direction=\"in\" />\n" + "<arg name=\"_testMapValue\" type=\"a{ua(sq)}\" direction=\"in\" />\n" + "</method>\n" + "<method name=\"testDerivedTypeMethod\">\n" + "<arg name=\"_testEnumExtended2InValue\" type=\"i\" direction=\"in\" />\n" + "<arg name=\"_testMapInValue\" type=\"a{ua(sq)}\" direction=\"in\" />\n" + "<arg name=\"_testEnumExtended2OutValue\" type=\"i\" direction=\"out\" />\n" + "<arg name=\"_testMapOutValue\" type=\"a{ua(sq)}\" direction=\"out\" />\n" + "</method>\n" + "<method name=\"TestArrayOfPolymorphicStructMethod\">\n" + "<arg name=\"_inArray\" type=\"a(uv)\" direction=\"in\" />\n" + "</method>\n" + "<method name=\"TestMapOfPolymorphicStructMethod\">\n" + "<arg name=\"_inMap\" type=\"a{y(uv)}\" direction=\"in\" />\n" + "</method>\n" + "<method name=\"TestStructWithPolymorphicMemberMethod\">\n" + "<arg name=\"_inStruct\" type=\"(u(uv))\" direction=\"in\" />\n" + "</method>\n" + "<method name=\"TestStructWithEnumKeyMapMember\">\n" + "<arg name=\"_inStruct\" type=\"(a{is})\" direction=\"in\" />\n" + "</method>\n" + + ; + return introspectionData.c_str(); +} + +CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + CommonAPI::Version + > TestInterfaceDBusStubAdapterInternal::getTestInterfaceInterfaceVersionStubDispatcher(&TestInterfaceStub::getInterfaceVersion, "uu"); + +CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + uint32_t + > TestInterfaceDBusStubAdapterInternal::getTestPredefinedTypeAttributeAttributeStubDispatcher( + &::v1::commonapi::tests::TestInterfaceStub::getTestPredefinedTypeAttributeAttribute + , "u" + ); +CommonAPI::DBus::DBusSetObservableAttributeStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + uint32_t + > TestInterfaceDBusStubAdapterInternal::setTestPredefinedTypeAttributeAttributeStubDispatcher( + &::v1::commonapi::tests::TestInterfaceStub::getTestPredefinedTypeAttributeAttribute, + &TestInterfaceStubRemoteEvent::onRemoteSetTestPredefinedTypeAttributeAttribute, + &TestInterfaceStubRemoteEvent::onRemoteTestPredefinedTypeAttributeAttributeChanged + ,&TestInterfaceStubAdapter::fireTestPredefinedTypeAttributeAttributeChanged + ,"u" + ); +CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestStructExtended, + ::commonapi::tests::DerivedTypeCollection_::TestStructExtendedDeployment_t + > TestInterfaceDBusStubAdapterInternal::getTestDerivedStructAttributeAttributeStubDispatcher( + &::v1::commonapi::tests::TestInterfaceStub::getTestDerivedStructAttributeAttribute + , "(sqi)" + ); +CommonAPI::DBus::DBusSetObservableAttributeStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestStructExtended, + ::commonapi::tests::DerivedTypeCollection_::TestStructExtendedDeployment_t + > TestInterfaceDBusStubAdapterInternal::setTestDerivedStructAttributeAttributeStubDispatcher( + &::v1::commonapi::tests::TestInterfaceStub::getTestDerivedStructAttributeAttribute, + &TestInterfaceStubRemoteEvent::onRemoteSetTestDerivedStructAttributeAttribute, + &TestInterfaceStubRemoteEvent::onRemoteTestDerivedStructAttributeAttributeChanged + ,&TestInterfaceStubAdapter::fireTestDerivedStructAttributeAttributeChanged + ,"(sqi)" + ); +CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64, + ::commonapi::tests::DerivedTypeCollection_::TestArrayUInt64Deployment_t + > TestInterfaceDBusStubAdapterInternal::getTestDerivedArrayAttributeAttributeStubDispatcher( + &::v1::commonapi::tests::TestInterfaceStub::getTestDerivedArrayAttributeAttribute + , "at" + ); +CommonAPI::DBus::DBusSetObservableAttributeStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64, + ::commonapi::tests::DerivedTypeCollection_::TestArrayUInt64Deployment_t + > TestInterfaceDBusStubAdapterInternal::setTestDerivedArrayAttributeAttributeStubDispatcher( + &::v1::commonapi::tests::TestInterfaceStub::getTestDerivedArrayAttributeAttribute, + &TestInterfaceStubRemoteEvent::onRemoteSetTestDerivedArrayAttributeAttribute, + &TestInterfaceStubRemoteEvent::onRemoteTestDerivedArrayAttributeAttributeChanged + ,&TestInterfaceStubAdapter::fireTestDerivedArrayAttributeAttributeChanged + ,"at" + ); + + + +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + std::tuple<>, + std::tuple<>, + std::tuple<>, + std::tuple<> + + > TestInterfaceDBusStubAdapterInternal::testEmptyMethodStubDispatcher( + &TestInterfaceStub::testEmptyMethod, "", + std::make_tuple(), + std::make_tuple()); + +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + std::tuple<uint32_t, std::string>, + std::tuple<>, + std::tuple<CommonAPI::EmptyDeployment, CommonAPI::DBus::StringDeployment>, + std::tuple<> + + > TestInterfaceDBusStubAdapterInternal::testVoidPredefinedTypeMethodStubDispatcher( + &TestInterfaceStub::testVoidPredefinedTypeMethod, "", + std::make_tuple(static_cast<CommonAPI::EmptyDeployment*>(nullptr), static_cast<CommonAPI::DBus::StringDeployment*>(nullptr)), + std::make_tuple()); + +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + std::tuple<uint32_t, std::string>, + std::tuple<uint32_t, std::string>, + std::tuple<CommonAPI::EmptyDeployment, CommonAPI::DBus::StringDeployment>, + std::tuple<CommonAPI::EmptyDeployment, CommonAPI::DBus::StringDeployment> + + > TestInterfaceDBusStubAdapterInternal::testPredefinedTypeMethodStubDispatcher( + &TestInterfaceStub::testPredefinedTypeMethod, "us", + 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::DBus::StringDeployment*>(nullptr))); + +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + std::tuple<::commonapi::tests::DerivedTypeCollection::TestEnumExtended2, ::commonapi::tests::DerivedTypeCollection::TestMap>, + std::tuple<>, + std::tuple<CommonAPI::EmptyDeployment, ::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t>, + std::tuple<> + + > TestInterfaceDBusStubAdapterInternal::testVoidDerivedTypeMethodStubDispatcher( + &TestInterfaceStub::testVoidDerivedTypeMethod, "", + std::make_tuple(static_cast<CommonAPI::EmptyDeployment*>(nullptr), static_cast<::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t*>(nullptr)), + std::make_tuple()); + +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + std::tuple<::commonapi::tests::DerivedTypeCollection::TestEnumExtended2, ::commonapi::tests::DerivedTypeCollection::TestMap>, + std::tuple<::commonapi::tests::DerivedTypeCollection::TestEnumExtended2, ::commonapi::tests::DerivedTypeCollection::TestMap>, + std::tuple<CommonAPI::EmptyDeployment, ::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t>, + std::tuple<CommonAPI::EmptyDeployment, ::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t> + + > TestInterfaceDBusStubAdapterInternal::testDerivedTypeMethodStubDispatcher( + &TestInterfaceStub::testDerivedTypeMethod, "ia{ua(sq)}", + std::make_tuple(static_cast<CommonAPI::EmptyDeployment*>(nullptr), static_cast<::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t*>(nullptr)), + std::make_tuple(static_cast<CommonAPI::EmptyDeployment*>(nullptr), static_cast<::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t*>(nullptr))); + +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + std::tuple<std::vector<std::shared_ptr<::commonapi::tests::DerivedTypeCollection::TestPolymorphicStruct>>>, + std::tuple<>, + std::tuple<CommonAPI::DBus::ArrayDeployment<::commonapi::tests::DerivedTypeCollection_::TestPolymorphicStructDeployment_t>>, + std::tuple<> + + > TestInterfaceDBusStubAdapterInternal::testArrayOfPolymorphicStructMethodStubDispatcher( + &TestInterfaceStub::TestArrayOfPolymorphicStructMethod, "", + std::make_tuple(static_cast<CommonAPI::DBus::ArrayDeployment<::commonapi::tests::DerivedTypeCollection_::TestPolymorphicStructDeployment_t>*>(nullptr)), + std::make_tuple()); + +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + std::tuple<::commonapi::tests::DerivedTypeCollection::MapIntToPolymorphic>, + std::tuple<>, + std::tuple<::commonapi::tests::DerivedTypeCollection_::MapIntToPolymorphicDeployment_t>, + std::tuple<> + + > TestInterfaceDBusStubAdapterInternal::testMapOfPolymorphicStructMethodStubDispatcher( + &TestInterfaceStub::TestMapOfPolymorphicStructMethod, "", + std::make_tuple(static_cast<::commonapi::tests::DerivedTypeCollection_::MapIntToPolymorphicDeployment_t*>(nullptr)), + std::make_tuple()); + +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + std::tuple<::commonapi::tests::DerivedTypeCollection::StructWithPolymorphicMember>, + std::tuple<>, + std::tuple<::commonapi::tests::DerivedTypeCollection_::StructWithPolymorphicMemberDeployment_t>, + std::tuple<> + + > TestInterfaceDBusStubAdapterInternal::testStructWithPolymorphicMemberMethodStubDispatcher( + &TestInterfaceStub::TestStructWithPolymorphicMemberMethod, "", + std::make_tuple(static_cast<::commonapi::tests::DerivedTypeCollection_::StructWithPolymorphicMemberDeployment_t*>(nullptr)), + std::make_tuple()); + +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + std::tuple<::commonapi::tests::DerivedTypeCollection::StructWithEnumKeyMap>, + std::tuple<>, + std::tuple<::commonapi::tests::DerivedTypeCollection_::StructWithEnumKeyMapDeployment_t>, + std::tuple<> + + > TestInterfaceDBusStubAdapterInternal::testStructWithEnumKeyMapMemberStubDispatcher( + &TestInterfaceStub::TestStructWithEnumKeyMapMember, "", + std::make_tuple(static_cast<::commonapi::tests::DerivedTypeCollection_::StructWithEnumKeyMapDeployment_t*>(nullptr)), + std::make_tuple()); + + +void TestInterfaceDBusStubAdapterInternal::fireTestPredefinedTypeAttributeAttributeChanged(const uint32_t& value) { + CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments< + uint32_t + >> + ::sendSignal( + *this, + "onTestPredefinedTypeAttributeAttributeChanged", + "u", + value + + ); +} +void TestInterfaceDBusStubAdapterInternal::fireTestDerivedStructAttributeAttributeChanged(const ::commonapi::tests::DerivedTypeCollection::TestStructExtended& value) { + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::TestStructExtended, ::commonapi::tests::DerivedTypeCollection_::TestStructExtendedDeployment_t> deployedValue(value, static_cast<::commonapi::tests::DerivedTypeCollection_::TestStructExtendedDeployment_t*>(nullptr)); + CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments< + CommonAPI::Deployable< + ::commonapi::tests::DerivedTypeCollection::TestStructExtended, + ::commonapi::tests::DerivedTypeCollection_::TestStructExtendedDeployment_t + > + >> + ::sendSignal( + *this, + "onTestDerivedStructAttributeAttributeChanged", + "(sqi)", + deployedValue + + ); +} +void TestInterfaceDBusStubAdapterInternal::fireTestDerivedArrayAttributeAttributeChanged(const ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64& value) { + CommonAPI::Deployable<::commonapi::tests::DerivedTypeCollection::TestArrayUInt64, ::commonapi::tests::DerivedTypeCollection_::TestArrayUInt64Deployment_t> deployedValue(value, static_cast<::commonapi::tests::DerivedTypeCollection_::TestArrayUInt64Deployment_t*>(nullptr)); + CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments< + CommonAPI::Deployable< + ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64, + ::commonapi::tests::DerivedTypeCollection_::TestArrayUInt64Deployment_t + > + >> + ::sendSignal( + *this, + "onTestDerivedArrayAttributeAttributeChanged", + "at", + deployedValue + + ); +} + +void TestInterfaceDBusStubAdapterInternal::fireTestPredefinedTypeBroadcastEvent(const uint32_t& uint32Value, const std::string& stringValue) { + CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments< + uint32_t, + CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment> + >>::sendSignal( + *this, + "TestPredefinedTypeBroadcast", + "us", + uint32Value, + CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment>(stringValue, static_cast<CommonAPI::DBus::StringDeployment*>(nullptr)) + ); +} +CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + TestInterfaceStubAdapter, + std::tuple<>, + std::tuple<bool> + > TestInterfaceDBusStubAdapterInternal::subscribeTestSelectiveBroadcastSelectiveStubDispatcher(&TestInterfaceStubAdapter::subscribeForTestSelectiveBroadcastSelective, "b"); + +CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + TestInterfaceStubAdapter, + std::tuple<>, + std::tuple<> + > TestInterfaceDBusStubAdapterInternal::unsubscribeTestSelectiveBroadcastSelectiveStubDispatcher(&TestInterfaceStubAdapter::unsubscribeFromTestSelectiveBroadcastSelective, ""); + +void TestInterfaceDBusStubAdapterInternal::fireTestSelectiveBroadcastSelective(const std::shared_ptr<CommonAPI::ClientId> _client) { + std::shared_ptr<CommonAPI::DBus::DBusClientId> dbusClient = std::dynamic_pointer_cast<CommonAPI::DBus::DBusClientId, CommonAPI::ClientId>(_client); + + if(dbusClient) + { + CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments< + >>::sendSignal( + dbusClient->getDBusId(), + *this, + "TestSelectiveBroadcast", + "" + ); + } +} + +void TestInterfaceDBusStubAdapterInternal::sendTestSelectiveBroadcastSelective(const std::shared_ptr<CommonAPI::ClientIdList> _receivers) { + std::shared_ptr<CommonAPI::ClientIdList> actualReceiverList = _receivers; + + if (!_receivers) + actualReceiverList = subscribersForTestSelectiveBroadcastSelective_; + + for (auto clientIdIterator = actualReceiverList->cbegin(); clientIdIterator != actualReceiverList->cend(); clientIdIterator++) { + if (!_receivers || subscribersForTestSelectiveBroadcastSelective_->find(*clientIdIterator) != subscribersForTestSelectiveBroadcastSelective_->end()) { + fireTestSelectiveBroadcastSelective(*clientIdIterator); + } + } +} + +void TestInterfaceDBusStubAdapterInternal::subscribeForTestSelectiveBroadcastSelective(const std::shared_ptr<CommonAPI::ClientId> clientId, bool& success) { + bool ok = TestInterfaceDBusStubAdapterHelper::stub_->onTestSelectiveBroadcastSelectiveSubscriptionRequested(clientId); + if (ok) { + subscribersForTestSelectiveBroadcastSelective_->insert(clientId); + TestInterfaceDBusStubAdapterHelper::stub_->onTestSelectiveBroadcastSelectiveSubscriptionChanged(clientId, CommonAPI::SelectiveBroadcastSubscriptionEvent::SUBSCRIBED); + success = true; + } else { + success = false; + } +} + +void TestInterfaceDBusStubAdapterInternal::unsubscribeFromTestSelectiveBroadcastSelective(const std::shared_ptr<CommonAPI::ClientId> clientId) { + subscribersForTestSelectiveBroadcastSelective_->erase(clientId); + TestInterfaceDBusStubAdapterHelper::stub_->onTestSelectiveBroadcastSelectiveSubscriptionChanged(clientId, CommonAPI::SelectiveBroadcastSubscriptionEvent::UNSUBSCRIBED); +} + +std::shared_ptr<CommonAPI::ClientIdList> const TestInterfaceDBusStubAdapterInternal::getSubscribersForTestSelectiveBroadcastSelective() { + return subscribersForTestSelectiveBroadcastSelective_; +} +CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + TestInterfaceStubAdapter, + std::tuple<>, + std::tuple<bool> + > TestInterfaceDBusStubAdapterInternal::subscribeTestBroadcastWithOutArgsSelectiveStubDispatcher(&TestInterfaceStubAdapter::subscribeForTestBroadcastWithOutArgsSelective, "b"); + +CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + TestInterfaceStubAdapter, + std::tuple<>, + std::tuple<> + > TestInterfaceDBusStubAdapterInternal::unsubscribeTestBroadcastWithOutArgsSelectiveStubDispatcher(&TestInterfaceStubAdapter::unsubscribeFromTestBroadcastWithOutArgsSelective, ""); + +void TestInterfaceDBusStubAdapterInternal::fireTestBroadcastWithOutArgsSelective(const std::shared_ptr<CommonAPI::ClientId> _client, const uint32_t &_uint32Value, const std::string &_stringValue) { + std::shared_ptr<CommonAPI::DBus::DBusClientId> dbusClient = std::dynamic_pointer_cast<CommonAPI::DBus::DBusClientId, CommonAPI::ClientId>(_client); + + if(dbusClient) + { + CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments< + uint32_t, + CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment> + >>::sendSignal( + dbusClient->getDBusId(), + *this, + "TestBroadcastWithOutArgs", + "us", + _uint32Value, + CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment>(_stringValue, static_cast<CommonAPI::DBus::StringDeployment*>(nullptr)) + ); + } +} + +void TestInterfaceDBusStubAdapterInternal::sendTestBroadcastWithOutArgsSelective(const uint32_t &_uint32Value, const std::string &_stringValue, const std::shared_ptr<CommonAPI::ClientIdList> _receivers) { + std::shared_ptr<CommonAPI::ClientIdList> actualReceiverList = _receivers; + + if (!_receivers) + actualReceiverList = subscribersForTestBroadcastWithOutArgsSelective_; + + for (auto clientIdIterator = actualReceiverList->cbegin(); clientIdIterator != actualReceiverList->cend(); clientIdIterator++) { + if (!_receivers || subscribersForTestBroadcastWithOutArgsSelective_->find(*clientIdIterator) != subscribersForTestBroadcastWithOutArgsSelective_->end()) { + fireTestBroadcastWithOutArgsSelective(*clientIdIterator, _uint32Value, _stringValue); + } + } +} + +void TestInterfaceDBusStubAdapterInternal::subscribeForTestBroadcastWithOutArgsSelective(const std::shared_ptr<CommonAPI::ClientId> clientId, bool& success) { + bool ok = TestInterfaceDBusStubAdapterHelper::stub_->onTestBroadcastWithOutArgsSelectiveSubscriptionRequested(clientId); + if (ok) { + subscribersForTestBroadcastWithOutArgsSelective_->insert(clientId); + TestInterfaceDBusStubAdapterHelper::stub_->onTestBroadcastWithOutArgsSelectiveSubscriptionChanged(clientId, CommonAPI::SelectiveBroadcastSubscriptionEvent::SUBSCRIBED); + success = true; + } else { + success = false; + } +} + +void TestInterfaceDBusStubAdapterInternal::unsubscribeFromTestBroadcastWithOutArgsSelective(const std::shared_ptr<CommonAPI::ClientId> clientId) { + subscribersForTestBroadcastWithOutArgsSelective_->erase(clientId); + TestInterfaceDBusStubAdapterHelper::stub_->onTestBroadcastWithOutArgsSelectiveSubscriptionChanged(clientId, CommonAPI::SelectiveBroadcastSubscriptionEvent::UNSUBSCRIBED); +} + +std::shared_ptr<CommonAPI::ClientIdList> const TestInterfaceDBusStubAdapterInternal::getSubscribersForTestBroadcastWithOutArgsSelective() { + return subscribersForTestBroadcastWithOutArgsSelective_; +} + + +const TestInterfaceDBusStubAdapterHelper::StubDispatcherTable& TestInterfaceDBusStubAdapterInternal::getStubDispatcherTable() { + return stubDispatcherTable_; +} + +const CommonAPI::DBus::StubAttributeTable& TestInterfaceDBusStubAdapterInternal::getStubAttributeTable() { + return stubAttributeTable_; +} + +TestInterfaceDBusStubAdapterInternal::TestInterfaceDBusStubAdapterInternal( + 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), + TestInterfaceDBusStubAdapterHelper(_address, _connection, std::dynamic_pointer_cast<TestInterfaceStub>(_stub), false), + stubDispatcherTable_({ + { { "getTestPredefinedTypeAttributeAttribute", "" }, &commonapi::tests::TestInterfaceDBusStubAdapterInternal::getTestPredefinedTypeAttributeAttributeStubDispatcher } + , { { "setTestPredefinedTypeAttributeAttribute", "u" }, &commonapi::tests::TestInterfaceDBusStubAdapterInternal::setTestPredefinedTypeAttributeAttributeStubDispatcher }, + { { "getTestDerivedStructAttributeAttribute", "" }, &commonapi::tests::TestInterfaceDBusStubAdapterInternal::getTestDerivedStructAttributeAttributeStubDispatcher } + , { { "setTestDerivedStructAttributeAttribute", "(sqi)" }, &commonapi::tests::TestInterfaceDBusStubAdapterInternal::setTestDerivedStructAttributeAttributeStubDispatcher }, + { { "getTestDerivedArrayAttributeAttribute", "" }, &commonapi::tests::TestInterfaceDBusStubAdapterInternal::getTestDerivedArrayAttributeAttributeStubDispatcher } + , { { "setTestDerivedArrayAttributeAttribute", "at" }, &commonapi::tests::TestInterfaceDBusStubAdapterInternal::setTestDerivedArrayAttributeAttributeStubDispatcher } + , + { { "testEmptyMethod", "" }, &commonapi::tests::TestInterfaceDBusStubAdapterInternal::testEmptyMethodStubDispatcher }, + { { "testVoidPredefinedTypeMethod", "us" }, &commonapi::tests::TestInterfaceDBusStubAdapterInternal::testVoidPredefinedTypeMethodStubDispatcher }, + { { "testPredefinedTypeMethod", "us" }, &commonapi::tests::TestInterfaceDBusStubAdapterInternal::testPredefinedTypeMethodStubDispatcher }, + { { "testVoidDerivedTypeMethod", "ia{ua(sq)}" }, &commonapi::tests::TestInterfaceDBusStubAdapterInternal::testVoidDerivedTypeMethodStubDispatcher }, + { { "testDerivedTypeMethod", "ia{ua(sq)}" }, &commonapi::tests::TestInterfaceDBusStubAdapterInternal::testDerivedTypeMethodStubDispatcher }, + { { "TestArrayOfPolymorphicStructMethod", "a(uv)" }, &commonapi::tests::TestInterfaceDBusStubAdapterInternal::testArrayOfPolymorphicStructMethodStubDispatcher }, + { { "TestMapOfPolymorphicStructMethod", "a{y(uv)}" }, &commonapi::tests::TestInterfaceDBusStubAdapterInternal::testMapOfPolymorphicStructMethodStubDispatcher }, + { { "TestStructWithPolymorphicMemberMethod", "(u(uv))" }, &commonapi::tests::TestInterfaceDBusStubAdapterInternal::testStructWithPolymorphicMemberMethodStubDispatcher }, + { { "TestStructWithEnumKeyMapMember", "(a{is})" }, &commonapi::tests::TestInterfaceDBusStubAdapterInternal::testStructWithEnumKeyMapMemberStubDispatcher } + , + { { "subscribeForTestSelectiveBroadcastSelective", "" }, &commonapi::tests::TestInterfaceDBusStubAdapterInternal::subscribeTestSelectiveBroadcastSelectiveStubDispatcher } + , + { { "unsubscribeFromTestSelectiveBroadcastSelective", "" }, &commonapi::tests::TestInterfaceDBusStubAdapterInternal::unsubscribeTestSelectiveBroadcastSelectiveStubDispatcher }, + { { "subscribeForTestBroadcastWithOutArgsSelective", "" }, &commonapi::tests::TestInterfaceDBusStubAdapterInternal::subscribeTestBroadcastWithOutArgsSelectiveStubDispatcher } + , + { { "unsubscribeFromTestBroadcastWithOutArgsSelective", "" }, &commonapi::tests::TestInterfaceDBusStubAdapterInternal::unsubscribeTestBroadcastWithOutArgsSelectiveStubDispatcher } + }), + stubAttributeTable_() { + subscribersForTestSelectiveBroadcastSelective_ = std::make_shared<CommonAPI::ClientIdList>(); + subscribersForTestBroadcastWithOutArgsSelective_ = std::make_shared<CommonAPI::ClientIdList>(); + + stubDispatcherTable_.insert({ { "getInterfaceVersion", "" }, &commonapi::tests::TestInterfaceDBusStubAdapterInternal::getTestInterfaceInterfaceVersionStubDispatcher }); +} + +bool TestInterfaceDBusStubAdapterInternal::hasFreedesktopProperties() { + return false; +} + +} // namespace tests +} // namespace commonapi +} // namespace v1 diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceDBusStubAdapter.hpp b/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceDBusStubAdapter.hpp new file mode 100644 index 0000000..e2a7787 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceDBusStubAdapter.hpp @@ -0,0 +1,253 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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_Test_Interface_DBUS_STUB_ADAPTER_HPP_ +#define COMMONAPI_TESTS_Test_Interface_DBUS_STUB_ADAPTER_HPP_ + +#include <v1/commonapi/tests/TestInterfaceStub.hpp> +#include "v1/commonapi/tests/TestInterfaceDBusDeployment.hpp" +#include <commonapi/tests/DerivedTypeCollectionDBusDeployment.hpp> + +#if !defined (COMMONAPI_INTERNAL_COMPILATION) +#define COMMONAPI_INTERNAL_COMPILATION +#endif + +#include <CommonAPI/DBus/DBusAddressTranslator.hpp> +#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 { +namespace commonapi { +namespace tests { + +typedef CommonAPI::DBus::DBusStubAdapterHelper<TestInterfaceStub> TestInterfaceDBusStubAdapterHelper; + +class TestInterfaceDBusStubAdapterInternal + : public virtual TestInterfaceStubAdapter, + public TestInterfaceDBusStubAdapterHelper +{ +public: + TestInterfaceDBusStubAdapterInternal( + const CommonAPI::DBus::DBusAddress &_address, + const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection, + const std::shared_ptr<CommonAPI::StubBase> &_stub); + + ~TestInterfaceDBusStubAdapterInternal(); + + virtual bool hasFreedesktopProperties(); + + inline static const char* getInterface() { + return TestInterface::getInterface(); + } + + void fireTestPredefinedTypeAttributeAttributeChanged(const uint32_t& value); + void fireTestDerivedStructAttributeAttributeChanged(const ::commonapi::tests::DerivedTypeCollection::TestStructExtended& value); + void fireTestDerivedArrayAttributeAttributeChanged(const ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64& value); + + void fireTestPredefinedTypeBroadcastEvent(const uint32_t& uint32Value, const std::string& stringValue); + void fireTestSelectiveBroadcastSelective(const std::shared_ptr<CommonAPI::ClientId> _client); + void sendTestSelectiveBroadcastSelective(const std::shared_ptr<CommonAPI::ClientIdList> _receivers = nullptr); + void subscribeForTestSelectiveBroadcastSelective(const std::shared_ptr<CommonAPI::ClientId> clientId, bool& success); + void unsubscribeFromTestSelectiveBroadcastSelective(const std::shared_ptr<CommonAPI::ClientId> clientId); + std::shared_ptr<CommonAPI::ClientIdList> const getSubscribersForTestSelectiveBroadcastSelective(); + void fireTestBroadcastWithOutArgsSelective(const std::shared_ptr<CommonAPI::ClientId> _client, const uint32_t &_uint32Value, const std::string &_stringValue); + void sendTestBroadcastWithOutArgsSelective(const uint32_t &_uint32Value, const std::string &_stringValue, const std::shared_ptr<CommonAPI::ClientIdList> _receivers = nullptr); + void subscribeForTestBroadcastWithOutArgsSelective(const std::shared_ptr<CommonAPI::ClientId> clientId, bool& success); + void unsubscribeFromTestBroadcastWithOutArgsSelective(const std::shared_ptr<CommonAPI::ClientId> clientId); + std::shared_ptr<CommonAPI::ClientIdList> const getSubscribersForTestBroadcastWithOutArgsSelective(); + + + const TestInterfaceDBusStubAdapterHelper::StubDispatcherTable& getStubDispatcherTable(); + const CommonAPI::DBus::StubAttributeTable& getStubAttributeTable(); + + void deactivateManagedInstances(); + + +static CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + CommonAPI::Version + > getTestInterfaceInterfaceVersionStubDispatcher; + +static CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + uint32_t + > getTestPredefinedTypeAttributeAttributeStubDispatcher; +static CommonAPI::DBus::DBusSetObservableAttributeStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + uint32_t + > setTestPredefinedTypeAttributeAttributeStubDispatcher; +static CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestStructExtended, + ::commonapi::tests::DerivedTypeCollection_::TestStructExtendedDeployment_t + > getTestDerivedStructAttributeAttributeStubDispatcher; +static CommonAPI::DBus::DBusSetObservableAttributeStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestStructExtended, + ::commonapi::tests::DerivedTypeCollection_::TestStructExtendedDeployment_t + > setTestDerivedStructAttributeAttributeStubDispatcher; +static CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64, + ::commonapi::tests::DerivedTypeCollection_::TestArrayUInt64Deployment_t + > getTestDerivedArrayAttributeAttributeStubDispatcher; +static CommonAPI::DBus::DBusSetObservableAttributeStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64, + ::commonapi::tests::DerivedTypeCollection_::TestArrayUInt64Deployment_t + > setTestDerivedArrayAttributeAttributeStubDispatcher; + + + +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + std::tuple<>, + std::tuple<>, + std::tuple<>, + std::tuple<> + + > testEmptyMethodStubDispatcher; + +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + std::tuple<uint32_t, std::string>, + std::tuple<>, + std::tuple<CommonAPI::EmptyDeployment, CommonAPI::DBus::StringDeployment>, + std::tuple<> + + > testVoidPredefinedTypeMethodStubDispatcher; + +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + std::tuple<uint32_t, std::string>, + std::tuple<uint32_t, std::string>, + std::tuple<CommonAPI::EmptyDeployment, CommonAPI::DBus::StringDeployment>, + std::tuple<CommonAPI::EmptyDeployment, CommonAPI::DBus::StringDeployment> + + > testPredefinedTypeMethodStubDispatcher; + +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + std::tuple<::commonapi::tests::DerivedTypeCollection::TestEnumExtended2, ::commonapi::tests::DerivedTypeCollection::TestMap>, + std::tuple<>, + std::tuple<CommonAPI::EmptyDeployment, ::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t>, + std::tuple<> + + > testVoidDerivedTypeMethodStubDispatcher; + +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + std::tuple<::commonapi::tests::DerivedTypeCollection::TestEnumExtended2, ::commonapi::tests::DerivedTypeCollection::TestMap>, + std::tuple<::commonapi::tests::DerivedTypeCollection::TestEnumExtended2, ::commonapi::tests::DerivedTypeCollection::TestMap>, + std::tuple<CommonAPI::EmptyDeployment, ::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t>, + std::tuple<CommonAPI::EmptyDeployment, ::commonapi::tests::DerivedTypeCollection_::TestMapDeployment_t> + + > testDerivedTypeMethodStubDispatcher; + +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + std::tuple<std::vector<std::shared_ptr<::commonapi::tests::DerivedTypeCollection::TestPolymorphicStruct>>>, + std::tuple<>, + std::tuple<CommonAPI::DBus::ArrayDeployment<::commonapi::tests::DerivedTypeCollection_::TestPolymorphicStructDeployment_t>>, + std::tuple<> + + > testArrayOfPolymorphicStructMethodStubDispatcher; + +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + std::tuple<::commonapi::tests::DerivedTypeCollection::MapIntToPolymorphic>, + std::tuple<>, + std::tuple<::commonapi::tests::DerivedTypeCollection_::MapIntToPolymorphicDeployment_t>, + std::tuple<> + + > testMapOfPolymorphicStructMethodStubDispatcher; + +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + std::tuple<::commonapi::tests::DerivedTypeCollection::StructWithPolymorphicMember>, + std::tuple<>, + std::tuple<::commonapi::tests::DerivedTypeCollection_::StructWithPolymorphicMemberDeployment_t>, + std::tuple<> + + > testStructWithPolymorphicMemberMethodStubDispatcher; + +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + std::tuple<::commonapi::tests::DerivedTypeCollection::StructWithEnumKeyMap>, + std::tuple<>, + std::tuple<::commonapi::tests::DerivedTypeCollection_::StructWithEnumKeyMapDeployment_t>, + std::tuple<> + + > testStructWithEnumKeyMapMemberStubDispatcher; + + +static CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + TestInterfaceStubAdapter, + std::tuple<>, + std::tuple<bool> + > subscribeTestSelectiveBroadcastSelectiveStubDispatcher; + +static CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + TestInterfaceStubAdapter, + std::tuple<>, + std::tuple<> + > unsubscribeTestSelectiveBroadcastSelectiveStubDispatcher; +static CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + TestInterfaceStubAdapter, + std::tuple<>, + std::tuple<bool> + > subscribeTestBroadcastWithOutArgsSelectiveStubDispatcher; + +static CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher< + ::v1::commonapi::tests::TestInterfaceStub, + TestInterfaceStubAdapter, + std::tuple<>, + std::tuple<> + > unsubscribeTestBroadcastWithOutArgsSelectiveStubDispatcher; + + + protected: + virtual const char* getMethodsDBusIntrospectionXmlData() const; + + private: + TestInterfaceDBusStubAdapterHelper::StubDispatcherTable stubDispatcherTable_; + CommonAPI::DBus::StubAttributeTable stubAttributeTable_; +}; + +class TestInterfaceDBusStubAdapter + : public TestInterfaceDBusStubAdapterInternal, + public std::enable_shared_from_this<TestInterfaceDBusStubAdapter> { +public: + TestInterfaceDBusStubAdapter( + 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), + TestInterfaceDBusStubAdapterInternal( + _address, + _connection, + _stub) { + } +}; + +} // namespace tests +} // namespace commonapi +} // namespace v1 + +#endif // COMMONAPI_TESTS_Test_Interface_DBUS_STUB_ADAPTER_HPP_ diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceManagerDBusDeployment.cpp b/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceManagerDBusDeployment.cpp new file mode 100644 index 0000000..8cfbdf1 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceManagerDBusDeployment.cpp @@ -0,0 +1,28 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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 "TestInterfaceManagerDBusDeployment.hpp" + +namespace v1 { +namespace commonapi { +namespace tests { +namespace TestInterfaceManager_ { + +// Type-specific deployments + +// Attribute-specific deployments + +// Argument-specific deployments + +// Broadcast-specific deployments + +} // namespace TestInterfaceManager_ +} // namespace tests +} // namespace commonapi +} // namespace v1 diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceManagerDBusDeployment.hpp b/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceManagerDBusDeployment.hpp new file mode 100644 index 0000000..d1ea4b5 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceManagerDBusDeployment.hpp @@ -0,0 +1,43 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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_TESTINTERFACEMANAGER_DEPLOYMENT_HPP_ +#define COMMONAPI_DBUS_TESTINTERFACEMANAGER_DEPLOYMENT_HPP_ + + + +#if !defined (COMMONAPI_INTERNAL_COMPILATION) +#define COMMONAPI_INTERNAL_COMPILATION +#endif +#include <CommonAPI/DBus/DBusDeployment.hpp> +#undef COMMONAPI_INTERNAL_COMPILATION + +namespace v1 { +namespace commonapi { +namespace tests { +namespace TestInterfaceManager_ { + +// Interface-specific deployment types + +// Type-specific deployments + +// Attribute-specific deployments + +// Argument-specific deployments + +// Broadcast-specific deployments + + +} // namespace TestInterfaceManager_ +} // namespace tests +} // namespace commonapi +} // namespace v1 + +#endif // COMMONAPI_DBUS_TESTINTERFACEMANAGER_DEPLOYMENT_HPP_ diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceManagerDBusProxy.cpp b/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceManagerDBusProxy.cpp new file mode 100644 index 0000000..594c9f3 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceManagerDBusProxy.cpp @@ -0,0 +1,50 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* Used org.franca.core 0.9.1.201412191134. +* +* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +* If a copy of the MPL was not distributed with this file, You can obtain one at +* http://mozilla.org/MPL/2.0/. +*/ +#include <v1/commonapi/tests/TestInterfaceManagerDBusProxy.hpp> + +namespace v1 { +namespace commonapi { +namespace tests { + +std::shared_ptr<CommonAPI::DBus::DBusProxy> createTestInterfaceManagerDBusProxy( + const CommonAPI::DBus::DBusAddress &_address, + const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection) { + return std::make_shared<TestInterfaceManagerDBusProxy>(_address, _connection); +} + +INITIALIZER(registerTestInterfaceManagerDBusProxy) { + CommonAPI::DBus::Factory::get()->registerProxyCreateMethod( + TestInterfaceManager::getInterface(), + &createTestInterfaceManagerDBusProxy); +} + +TestInterfaceManagerDBusProxy::TestInterfaceManagerDBusProxy( + const CommonAPI::DBus::DBusAddress &_address, + const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection) + : CommonAPI::DBus::DBusProxy(_address, _connection) +, proxyManagerTestInterface_(*this, "commonapi.tests.TestInterface") +{ +} + + + + +CommonAPI::ProxyManager& TestInterfaceManagerDBusProxy::getProxyManagerTestInterface() { +return proxyManagerTestInterface_; + } + +void TestInterfaceManagerDBusProxy::getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const { + ownVersionMajor = 1; + ownVersionMinor = 0; + } + + } // namespace tests + } // namespace commonapi + } // namespace v1 diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceManagerDBusProxy.hpp b/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceManagerDBusProxy.hpp new file mode 100644 index 0000000..ca52bac --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceManagerDBusProxy.hpp @@ -0,0 +1,63 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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_Test_Interface_Manager_DBUS_PROXY_HPP_ +#define COMMONAPI_TESTS_Test_Interface_Manager_DBUS_PROXY_HPP_ + +#include <v1/commonapi/tests/TestInterfaceManagerProxyBase.hpp> +#include "v1/commonapi/tests/TestInterfaceManagerDBusDeployment.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/DBusAddressTranslator.hpp> +#include <CommonAPI/DBus/DBusProxyManager.hpp> + +#undef COMMONAPI_INTERNAL_COMPILATION + +#include <string> + +namespace v1 { +namespace commonapi { +namespace tests { + +class TestInterfaceManagerDBusProxy + : virtual public TestInterfaceManagerProxyBase, + virtual public CommonAPI::DBus::DBusProxy { +public: + TestInterfaceManagerDBusProxy( + const CommonAPI::DBus::DBusAddress &_address, + const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection); + + virtual ~TestInterfaceManagerDBusProxy() { } + + + + + virtual CommonAPI::ProxyManager& getProxyManagerTestInterface(); + + virtual void getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const; + +private: + + + + CommonAPI::DBus::DBusProxyManager proxyManagerTestInterface_; +}; + +} // namespace tests +} // namespace commonapi +} // namespace v1 + +#endif // COMMONAPI_TESTS_Test_Interface_Manager_DBUS_PROXY_HPP_ + diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceManagerDBusStubAdapter.cpp b/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceManagerDBusStubAdapter.cpp new file mode 100644 index 0000000..511b538 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceManagerDBusStubAdapter.cpp @@ -0,0 +1,149 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* Used org.franca.core 0.9.1.201412191134. +* +* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +* If a copy of the MPL was not distributed with this file, You can obtain one at +* http://mozilla.org/MPL/2.0/. +*/ +#include <v1/commonapi/tests/TestInterfaceManager.hpp> +#include <v1/commonapi/tests/TestInterfaceManagerDBusStubAdapter.hpp> + +namespace v1 { +namespace commonapi { +namespace tests { + +std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> createTestInterfaceManagerDBusStubAdapter( + const CommonAPI::DBus::DBusAddress &_address, + const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection, + const std::shared_ptr<CommonAPI::StubBase> &_stub) { + return std::make_shared<TestInterfaceManagerDBusStubAdapter>(_address, _connection, _stub); +} + +INITIALIZER(registerTestInterfaceManagerDBusStubAdapter) { + CommonAPI::DBus::Factory::get()->registerStubAdapterCreateMethod( + TestInterfaceManager::getInterface(), &createTestInterfaceManagerDBusStubAdapter); +} + +TestInterfaceManagerDBusStubAdapterInternal::~TestInterfaceManagerDBusStubAdapterInternal() { + deactivateManagedInstances(); + TestInterfaceManagerDBusStubAdapterHelper::deinit(); +} + +void TestInterfaceManagerDBusStubAdapterInternal::deactivateManagedInstances() { + std::set<std::string>::iterator iter; + std::set<std::string>::iterator iterNext; + + iter = registeredTestInterfaceInstances.begin(); + while (iter != registeredTestInterfaceInstances.end()) { + iterNext = std::next(iter); + + if (deregisterManagedStubTestInterface(*iter)) { + iter = iterNext; + } + else { + iter++; + } + } +} + +const char* TestInterfaceManagerDBusStubAdapterInternal::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< + ::v1::commonapi::tests::TestInterfaceManagerStub, + CommonAPI::Version + > TestInterfaceManagerDBusStubAdapterInternal::getTestInterfaceManagerInterfaceVersionStubDispatcher(&TestInterfaceManagerStub::getInterfaceVersion, "uu"); + + + + + + + + +const TestInterfaceManagerDBusStubAdapterHelper::StubDispatcherTable& TestInterfaceManagerDBusStubAdapterInternal::getStubDispatcherTable() { + return stubDispatcherTable_; +} + +const CommonAPI::DBus::StubAttributeTable& TestInterfaceManagerDBusStubAdapterInternal::getStubAttributeTable() { + return stubAttributeTable_; +} +bool TestInterfaceManagerDBusStubAdapterInternal::registerManagedStubTestInterface(std::shared_ptr<::v1::commonapi::tests::TestInterfaceStub> _stub, const std::string &_instance) { + if (registeredTestInterfaceInstances.find(_instance) == registeredTestInterfaceInstances.end()) { + std::string itsAddress = "local:commonapi.tests.TestInterface:" + _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.TestInterface", itsDBusAddress, connection_); + bool isRegistered = itsFactory->registerManagedService(stubAdapter); + if (isRegistered) { + bool isExported = connection_->getDBusObjectManager()->exportManagedDBusStubAdapter(adapterObjectPath, stubAdapter); + if (isExported) { + registeredTestInterfaceInstances.insert(_instance); + return true; + } else { + itsFactory->unregisterManagedService(itsAddress); + } + } + } + } + return false; +} + +bool TestInterfaceManagerDBusStubAdapterInternal::deregisterManagedStubTestInterface(const std::string &_instance) { + std::string itsAddress = "local:commonapi.tests.TestInterface:" + _instance; + if (registeredTestInterfaceInstances.find(_instance) != registeredTestInterfaceInstances.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); + registeredTestInterfaceInstances.erase(_instance); + return true; + } + } + return false; +} + +std::set<std::string>& TestInterfaceManagerDBusStubAdapterInternal::getTestInterfaceInstances() { + return registeredTestInterfaceInstances; +} + +TestInterfaceManagerDBusStubAdapterInternal::TestInterfaceManagerDBusStubAdapterInternal( + 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), + TestInterfaceManagerDBusStubAdapterHelper(_address, _connection, std::dynamic_pointer_cast<TestInterfaceManagerStub>(_stub), true), + stubDispatcherTable_({ + }), + stubAttributeTable_() { + + stubDispatcherTable_.insert({ { "getInterfaceVersion", "" }, &commonapi::tests::TestInterfaceManagerDBusStubAdapterInternal::getTestInterfaceManagerInterfaceVersionStubDispatcher }); +} + +bool TestInterfaceManagerDBusStubAdapterInternal::hasFreedesktopProperties() { + return false; +} + +} // namespace tests +} // namespace commonapi +} // namespace v1 diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceManagerDBusStubAdapter.hpp b/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceManagerDBusStubAdapter.hpp new file mode 100644 index 0000000..1d2fd09 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/TestInterfaceManagerDBusStubAdapter.hpp @@ -0,0 +1,108 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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_Test_Interface_Manager_DBUS_STUB_ADAPTER_HPP_ +#define COMMONAPI_TESTS_Test_Interface_Manager_DBUS_STUB_ADAPTER_HPP_ + +#include <v1/commonapi/tests/TestInterfaceManagerStub.hpp> +#include "v1/commonapi/tests/TestInterfaceManagerDBusDeployment.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 { +namespace commonapi { +namespace tests { + +typedef CommonAPI::DBus::DBusStubAdapterHelper<TestInterfaceManagerStub> TestInterfaceManagerDBusStubAdapterHelper; + +class TestInterfaceManagerDBusStubAdapterInternal + : public virtual TestInterfaceManagerStubAdapter, + public TestInterfaceManagerDBusStubAdapterHelper +{ +public: + TestInterfaceManagerDBusStubAdapterInternal( + const CommonAPI::DBus::DBusAddress &_address, + const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection, + const std::shared_ptr<CommonAPI::StubBase> &_stub); + + ~TestInterfaceManagerDBusStubAdapterInternal(); + + virtual bool hasFreedesktopProperties(); + + inline static const char* getInterface() { + return TestInterfaceManager::getInterface(); + } + + + + bool registerManagedStubTestInterface(std::shared_ptr<::v1::commonapi::tests::TestInterfaceStub>, const std::string&); + bool deregisterManagedStubTestInterface(const std::string&); + std::set<std::string>& getTestInterfaceInstances(); + + const TestInterfaceManagerDBusStubAdapterHelper::StubDispatcherTable& getStubDispatcherTable(); + const CommonAPI::DBus::StubAttributeTable& getStubAttributeTable(); + + void deactivateManagedInstances(); + + +static CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ::v1::commonapi::tests::TestInterfaceManagerStub, + CommonAPI::Version + > getTestInterfaceManagerInterfaceVersionStubDispatcher; + + + + + + + + protected: + virtual const char* getMethodsDBusIntrospectionXmlData() const; + + private: + std::set<std::string> registeredTestInterfaceInstances; + TestInterfaceManagerDBusStubAdapterHelper::StubDispatcherTable stubDispatcherTable_; + CommonAPI::DBus::StubAttributeTable stubAttributeTable_; +}; + +class TestInterfaceManagerDBusStubAdapter + : public TestInterfaceManagerDBusStubAdapterInternal, + public std::enable_shared_from_this<TestInterfaceManagerDBusStubAdapter> { +public: + TestInterfaceManagerDBusStubAdapter( + 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), + TestInterfaceManagerDBusStubAdapterInternal( + _address, + _connection, + _stub) { + } +}; + +} // namespace tests +} // namespace commonapi +} // namespace v1 + +#endif // COMMONAPI_TESTS_Test_Interface_Manager_DBUS_STUB_ADAPTER_HPP_ diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/managed/BranchInterfaceDBusDeployment.cpp b/src/test/src-gen/dbus/v1/commonapi/tests/managed/BranchInterfaceDBusDeployment.cpp new file mode 100644 index 0000000..19e51f5 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/managed/BranchInterfaceDBusDeployment.cpp @@ -0,0 +1,30 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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 { +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 diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/managed/BranchInterfaceDBusDeployment.hpp b/src/test/src-gen/dbus/v1/commonapi/tests/managed/BranchInterfaceDBusDeployment.hpp new file mode 100644 index 0000000..49bdd2c --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/managed/BranchInterfaceDBusDeployment.hpp @@ -0,0 +1,45 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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 { +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 + +#endif // COMMONAPI_DBUS_BRANCHINTERFACE_DEPLOYMENT_HPP_ diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/managed/BranchInterfaceDBusProxy.cpp b/src/test/src-gen/dbus/v1/commonapi/tests/managed/BranchInterfaceDBusProxy.cpp new file mode 100644 index 0000000..43872d8 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/managed/BranchInterfaceDBusProxy.cpp @@ -0,0 +1,105 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* Used org.franca.core 0.9.1.201412191134. +* +* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +* If a copy of the MPL was not distributed with this file, You can obtain one at +* http://mozilla.org/MPL/2.0/. +*/ +#include <v1/commonapi/tests/managed/BranchInterfaceDBusProxy.hpp> + +namespace v1 { +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 _internalCallStatus, CommonAPI::Deployable<BranchInterface::testBranchMethodError, CommonAPI::EmptyDeployment> _deploy_error, CommonAPI::Deployable<int32_t, CommonAPI::EmptyDeployment> _outInt, CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment> _outString) { + if (_callback) + _callback(_internalCallStatus, _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 diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/managed/BranchInterfaceDBusProxy.hpp b/src/test/src-gen/dbus/v1/commonapi/tests/managed/BranchInterfaceDBusProxy.hpp new file mode 100644 index 0000000..36987e2 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/managed/BranchInterfaceDBusProxy.hpp @@ -0,0 +1,64 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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/commonapi/tests/managed/BranchInterfaceProxyBase.hpp> +#include "v1/commonapi/tests/managed/BranchInterfaceDBusDeployment.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/DBusAddressTranslator.hpp> + +#undef COMMONAPI_INTERNAL_COMPILATION + +#include <string> + +namespace v1 { +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 + +#endif // COMMONAPI_TESTS_MANAGED_Branch_Interface_DBUS_PROXY_HPP_ + diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/managed/BranchInterfaceDBusStubAdapter.cpp b/src/test/src-gen/dbus/v1/commonapi/tests/managed/BranchInterfaceDBusStubAdapter.cpp new file mode 100644 index 0000000..7fb3e68 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/managed/BranchInterfaceDBusStubAdapter.cpp @@ -0,0 +1,109 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* Used org.franca.core 0.9.1.201412191134. +* +* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +* If a copy of the MPL was not distributed with this file, You can obtain one at +* http://mozilla.org/MPL/2.0/. +*/ +#include <v1/commonapi/tests/managed/BranchInterface.hpp> +#include <v1/commonapi/tests/managed/BranchInterfaceDBusStubAdapter.hpp> + +namespace v1 { +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< + ::v1::commonapi::tests::managed::BranchInterfaceStub, + CommonAPI::Version + > BranchInterfaceDBusStubAdapterInternal::getBranchInterfaceInterfaceVersionStubDispatcher(&BranchInterfaceStub::getInterfaceVersion, "uu"); + + + + +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::managed::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 }); +} + +bool BranchInterfaceDBusStubAdapterInternal::hasFreedesktopProperties() { + return false; +} + +} // namespace managed +} // namespace tests +} // namespace commonapi +} // namespace v1 diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/managed/BranchInterfaceDBusStubAdapter.hpp b/src/test/src-gen/dbus/v1/commonapi/tests/managed/BranchInterfaceDBusStubAdapter.hpp new file mode 100644 index 0000000..a66319e --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/managed/BranchInterfaceDBusStubAdapter.hpp @@ -0,0 +1,114 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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/commonapi/tests/managed/BranchInterfaceStub.hpp> +#include "v1/commonapi/tests/managed/BranchInterfaceDBusDeployment.hpp" + +#if !defined (COMMONAPI_INTERNAL_COMPILATION) +#define COMMONAPI_INTERNAL_COMPILATION +#endif + +#include <CommonAPI/DBus/DBusAddressTranslator.hpp> +#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 { +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 bool hasFreedesktopProperties(); + + inline static const char* getInterface() { + return BranchInterface::getInterface(); + } + + + + + const BranchInterfaceDBusStubAdapterHelper::StubDispatcherTable& getStubDispatcherTable(); + const CommonAPI::DBus::StubAttributeTable& getStubAttributeTable(); + + void deactivateManagedInstances(); + + +static CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ::v1::commonapi::tests::managed::BranchInterfaceStub, + CommonAPI::Version + > getBranchInterfaceInterfaceVersionStubDispatcher; + + + + +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::managed::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 + +#endif // COMMONAPI_TESTS_MANAGED_Branch_Interface_DBUS_STUB_ADAPTER_HPP_ diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/managed/LeafInterfaceDBusDeployment.cpp b/src/test/src-gen/dbus/v1/commonapi/tests/managed/LeafInterfaceDBusDeployment.cpp new file mode 100644 index 0000000..ad090e2 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/managed/LeafInterfaceDBusDeployment.cpp @@ -0,0 +1,30 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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 { +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 diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/managed/LeafInterfaceDBusDeployment.hpp b/src/test/src-gen/dbus/v1/commonapi/tests/managed/LeafInterfaceDBusDeployment.hpp new file mode 100644 index 0000000..2263af3 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/managed/LeafInterfaceDBusDeployment.hpp @@ -0,0 +1,45 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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 { +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 + +#endif // COMMONAPI_DBUS_LEAFINTERFACE_DEPLOYMENT_HPP_ diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/managed/LeafInterfaceDBusProxy.cpp b/src/test/src-gen/dbus/v1/commonapi/tests/managed/LeafInterfaceDBusProxy.cpp new file mode 100644 index 0000000..fd4df47 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/managed/LeafInterfaceDBusProxy.cpp @@ -0,0 +1,105 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* Used org.franca.core 0.9.1.201412191134. +* +* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +* If a copy of the MPL was not distributed with this file, You can obtain one at +* http://mozilla.org/MPL/2.0/. +*/ +#include <v1/commonapi/tests/managed/LeafInterfaceDBusProxy.hpp> + +namespace v1 { +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 _internalCallStatus, CommonAPI::Deployable<LeafInterface::testLeafMethodError, CommonAPI::EmptyDeployment> _deploy_error, CommonAPI::Deployable<int32_t, CommonAPI::EmptyDeployment> _outInt, CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment> _outString) { + if (_callback) + _callback(_internalCallStatus, _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 diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/managed/LeafInterfaceDBusProxy.hpp b/src/test/src-gen/dbus/v1/commonapi/tests/managed/LeafInterfaceDBusProxy.hpp new file mode 100644 index 0000000..8eff349 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/managed/LeafInterfaceDBusProxy.hpp @@ -0,0 +1,64 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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/commonapi/tests/managed/LeafInterfaceProxyBase.hpp> +#include "v1/commonapi/tests/managed/LeafInterfaceDBusDeployment.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/DBusAddressTranslator.hpp> + +#undef COMMONAPI_INTERNAL_COMPILATION + +#include <string> + +namespace v1 { +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 + +#endif // COMMONAPI_TESTS_MANAGED_Leaf_Interface_DBUS_PROXY_HPP_ + diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/managed/LeafInterfaceDBusStubAdapter.cpp b/src/test/src-gen/dbus/v1/commonapi/tests/managed/LeafInterfaceDBusStubAdapter.cpp new file mode 100644 index 0000000..dbf3f36 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/managed/LeafInterfaceDBusStubAdapter.cpp @@ -0,0 +1,109 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* Used org.franca.core 0.9.1.201412191134. +* +* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +* If a copy of the MPL was not distributed with this file, You can obtain one at +* http://mozilla.org/MPL/2.0/. +*/ +#include <v1/commonapi/tests/managed/LeafInterface.hpp> +#include <v1/commonapi/tests/managed/LeafInterfaceDBusStubAdapter.hpp> + +namespace v1 { +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< + ::v1::commonapi::tests::managed::LeafInterfaceStub, + CommonAPI::Version + > LeafInterfaceDBusStubAdapterInternal::getLeafInterfaceInterfaceVersionStubDispatcher(&LeafInterfaceStub::getInterfaceVersion, "uu"); + + + + +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::managed::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 }); +} + +bool LeafInterfaceDBusStubAdapterInternal::hasFreedesktopProperties() { + return false; +} + +} // namespace managed +} // namespace tests +} // namespace commonapi +} // namespace v1 diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/managed/LeafInterfaceDBusStubAdapter.hpp b/src/test/src-gen/dbus/v1/commonapi/tests/managed/LeafInterfaceDBusStubAdapter.hpp new file mode 100644 index 0000000..ca99f2f --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/managed/LeafInterfaceDBusStubAdapter.hpp @@ -0,0 +1,114 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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/commonapi/tests/managed/LeafInterfaceStub.hpp> +#include "v1/commonapi/tests/managed/LeafInterfaceDBusDeployment.hpp" + +#if !defined (COMMONAPI_INTERNAL_COMPILATION) +#define COMMONAPI_INTERNAL_COMPILATION +#endif + +#include <CommonAPI/DBus/DBusAddressTranslator.hpp> +#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 { +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 bool hasFreedesktopProperties(); + + inline static const char* getInterface() { + return LeafInterface::getInterface(); + } + + + + + const LeafInterfaceDBusStubAdapterHelper::StubDispatcherTable& getStubDispatcherTable(); + const CommonAPI::DBus::StubAttributeTable& getStubAttributeTable(); + + void deactivateManagedInstances(); + + +static CommonAPI::DBus::DBusGetAttributeStubDispatcher< + ::v1::commonapi::tests::managed::LeafInterfaceStub, + CommonAPI::Version + > getLeafInterfaceInterfaceVersionStubDispatcher; + + + + +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::managed::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 + +#endif // COMMONAPI_TESTS_MANAGED_Leaf_Interface_DBUS_STUB_ADAPTER_HPP_ diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/managed/RootInterfaceDBusDeployment.cpp b/src/test/src-gen/dbus/v1/commonapi/tests/managed/RootInterfaceDBusDeployment.cpp new file mode 100644 index 0000000..7df2021 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/managed/RootInterfaceDBusDeployment.cpp @@ -0,0 +1,30 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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 { +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 diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/managed/RootInterfaceDBusDeployment.hpp b/src/test/src-gen/dbus/v1/commonapi/tests/managed/RootInterfaceDBusDeployment.hpp new file mode 100644 index 0000000..1d3e157 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/managed/RootInterfaceDBusDeployment.hpp @@ -0,0 +1,45 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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 { +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 + +#endif // COMMONAPI_DBUS_ROOTINTERFACE_DEPLOYMENT_HPP_ diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/managed/RootInterfaceDBusProxy.cpp b/src/test/src-gen/dbus/v1/commonapi/tests/managed/RootInterfaceDBusProxy.cpp new file mode 100644 index 0000000..8115315 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/managed/RootInterfaceDBusProxy.cpp @@ -0,0 +1,113 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* Used org.franca.core 0.9.1.201412191134. +* +* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +* If a copy of the MPL was not distributed with this file, You can obtain one at +* http://mozilla.org/MPL/2.0/. +*/ +#include <v1/commonapi/tests/managed/RootInterfaceDBusProxy.hpp> + +namespace v1 { +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 _internalCallStatus, CommonAPI::Deployable<RootInterface::testRootMethodError, CommonAPI::EmptyDeployment> _deploy_error, CommonAPI::Deployable<int32_t, CommonAPI::EmptyDeployment> _outInt, CommonAPI::Deployable<std::string, CommonAPI::DBus::StringDeployment> _outString) { + if (_callback) + _callback(_internalCallStatus, _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 diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/managed/RootInterfaceDBusProxy.hpp b/src/test/src-gen/dbus/v1/commonapi/tests/managed/RootInterfaceDBusProxy.hpp new file mode 100644 index 0000000..f0a458f --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/managed/RootInterfaceDBusProxy.hpp @@ -0,0 +1,69 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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/commonapi/tests/managed/RootInterfaceProxyBase.hpp> +#include "v1/commonapi/tests/managed/RootInterfaceDBusDeployment.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/DBusAddressTranslator.hpp> +#include <CommonAPI/DBus/DBusProxyManager.hpp> + +#undef COMMONAPI_INTERNAL_COMPILATION + +#include <string> + +namespace v1 { +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 + +#endif // COMMONAPI_TESTS_MANAGED_Root_Interface_DBUS_PROXY_HPP_ + diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/managed/RootInterfaceDBusStubAdapter.cpp b/src/test/src-gen/dbus/v1/commonapi/tests/managed/RootInterfaceDBusStubAdapter.cpp new file mode 100644 index 0000000..6466b61 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/managed/RootInterfaceDBusStubAdapter.cpp @@ -0,0 +1,229 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* Used org.franca.core 0.9.1.201412191134. +* +* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +* If a copy of the MPL was not distributed with this file, You can obtain one at +* http://mozilla.org/MPL/2.0/. +*/ +#include <v1/commonapi/tests/managed/RootInterface.hpp> +#include <v1/commonapi/tests/managed/RootInterfaceDBusStubAdapter.hpp> + +namespace v1 { +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< + ::v1::commonapi::tests::managed::RootInterfaceStub, + CommonAPI::Version + > RootInterfaceDBusStubAdapterInternal::getRootInterfaceInterfaceVersionStubDispatcher(&RootInterfaceStub::getInterfaceVersion, "uu"); + + + + +CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::managed::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<::v1::commonapi::tests::managed::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<::v1::commonapi::tests::managed::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 }); +} + +bool RootInterfaceDBusStubAdapterInternal::hasFreedesktopProperties() { + return false; +} + +} // namespace managed +} // namespace tests +} // namespace commonapi +} // namespace v1 diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/managed/RootInterfaceDBusStubAdapter.hpp b/src/test/src-gen/dbus/v1/commonapi/tests/managed/RootInterfaceDBusStubAdapter.hpp new file mode 100644 index 0000000..de6ffe9 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/managed/RootInterfaceDBusStubAdapter.hpp @@ -0,0 +1,123 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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/commonapi/tests/managed/RootInterfaceStub.hpp> +#include "v1/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 { +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 bool hasFreedesktopProperties(); + + inline static const char* getInterface() { + return RootInterface::getInterface(); + } + + + + bool registerManagedStubLeafInterface(std::shared_ptr<::v1::commonapi::tests::managed::LeafInterfaceStub>, const std::string&); + bool deregisterManagedStubLeafInterface(const std::string&); + std::set<std::string>& getLeafInterfaceInstances(); + bool registerManagedStubBranchInterface(std::shared_ptr<::v1::commonapi::tests::managed::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< + ::v1::commonapi::tests::managed::RootInterfaceStub, + CommonAPI::Version + > getRootInterfaceInterfaceVersionStubDispatcher; + + + + +static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< + ::v1::commonapi::tests::managed::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 + +#endif // COMMONAPI_TESTS_MANAGED_Root_Interface_DBUS_STUB_ADAPTER_HPP_ diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/managed/SecondRootDBusDeployment.cpp b/src/test/src-gen/dbus/v1/commonapi/tests/managed/SecondRootDBusDeployment.cpp new file mode 100644 index 0000000..596e267 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/managed/SecondRootDBusDeployment.cpp @@ -0,0 +1,30 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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 { +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 diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/managed/SecondRootDBusDeployment.hpp b/src/test/src-gen/dbus/v1/commonapi/tests/managed/SecondRootDBusDeployment.hpp new file mode 100644 index 0000000..423adf0 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/managed/SecondRootDBusDeployment.hpp @@ -0,0 +1,45 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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 { +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 + +#endif // COMMONAPI_DBUS_SECONDROOT_DEPLOYMENT_HPP_ diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/managed/SecondRootDBusProxy.cpp b/src/test/src-gen/dbus/v1/commonapi/tests/managed/SecondRootDBusProxy.cpp new file mode 100644 index 0000000..35fac99 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/managed/SecondRootDBusProxy.cpp @@ -0,0 +1,52 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* Used org.franca.core 0.9.1.201412191134. +* +* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +* If a copy of the MPL was not distributed with this file, You can obtain one at +* http://mozilla.org/MPL/2.0/. +*/ +#include <v1/commonapi/tests/managed/SecondRootDBusProxy.hpp> + +namespace v1 { +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 diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/managed/SecondRootDBusProxy.hpp b/src/test/src-gen/dbus/v1/commonapi/tests/managed/SecondRootDBusProxy.hpp new file mode 100644 index 0000000..ed2e0d3 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/managed/SecondRootDBusProxy.hpp @@ -0,0 +1,65 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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/commonapi/tests/managed/SecondRootProxyBase.hpp> +#include "v1/commonapi/tests/managed/SecondRootDBusDeployment.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/DBusAddressTranslator.hpp> +#include <CommonAPI/DBus/DBusProxyManager.hpp> + +#undef COMMONAPI_INTERNAL_COMPILATION + +#include <string> + +namespace v1 { +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 + +#endif // COMMONAPI_TESTS_MANAGED_Second_Root_DBUS_PROXY_HPP_ + diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/managed/SecondRootDBusStubAdapter.cpp b/src/test/src-gen/dbus/v1/commonapi/tests/managed/SecondRootDBusStubAdapter.cpp new file mode 100644 index 0000000..355c97c --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/managed/SecondRootDBusStubAdapter.cpp @@ -0,0 +1,151 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* Used org.franca.core 0.9.1.201412191134. +* +* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +* If a copy of the MPL was not distributed with this file, You can obtain one at +* http://mozilla.org/MPL/2.0/. +*/ +#include <v1/commonapi/tests/managed/SecondRoot.hpp> +#include <v1/commonapi/tests/managed/SecondRootDBusStubAdapter.hpp> + +namespace v1 { +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< + ::v1::commonapi::tests::managed::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<::v1::commonapi::tests::managed::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 }); +} + +bool SecondRootDBusStubAdapterInternal::hasFreedesktopProperties() { + return false; +} + +} // namespace managed +} // namespace tests +} // namespace commonapi +} // namespace v1 diff --git a/src/test/src-gen/dbus/v1/commonapi/tests/managed/SecondRootDBusStubAdapter.hpp b/src/test/src-gen/dbus/v1/commonapi/tests/managed/SecondRootDBusStubAdapter.hpp new file mode 100644 index 0000000..f68ffa7 --- /dev/null +++ b/src/test/src-gen/dbus/v1/commonapi/tests/managed/SecondRootDBusStubAdapter.hpp @@ -0,0 +1,110 @@ +/* +* This file was generated by the CommonAPI Generators. +* Used org.genivi.commonapi.dbus 3.1.4.v201511201313. +* 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/commonapi/tests/managed/SecondRootStub.hpp> +#include "v1/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 { +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 bool hasFreedesktopProperties(); + + inline static const char* getInterface() { + return SecondRoot::getInterface(); + } + + + + bool registerManagedStubLeafInterface(std::shared_ptr<::v1::commonapi::tests::managed::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< + ::v1::commonapi::tests::managed::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 + +#endif // COMMONAPI_TESTS_MANAGED_Second_Root_DBUS_STUB_ADAPTER_HPP_ |