DBusAddressTranslator::getInstance().searchForDBusAddress(commonApiAddress, interfaceName, connectionName, objectPath);
- if(acquiredConnectionName_ == "") {
- bool isServiceNameAcquired = dbusConnection_->requestServiceNameAndBlock(connectionName);
- if(!isServiceNameAcquired) {
- return false;
- }
- acquiredConnectionName_ = connectionName;
- } else if (acquiredConnectionName_ != connectionName) {
- return false;
- }
+ bool status = false;
+
if(!registeredAdapterFactoryFunctions_) {
registeredAdapterFactoryFunctions_ = new std::unordered_map<std::string, DBusAdapterFactoryFunction> {};
if(!dbusStubAdapter) {
return false;
}
- if(registeredServices_.insert( {std::move(commonApiAddress), dbusStubAdapter} ).second) {
+ if(registeredServices_.insert( {commonApiAddress, dbusStubAdapter} ).second) {
dbusStubAdapter->init();
- return true;
+ status = true;
}
}
- return false;
+ if (acquiredConnectionName_ == "") {
+ bool isServiceNameAcquired = dbusConnection_->requestServiceNameAndBlock(connectionName);
+ if (!isServiceNameAcquired) {
+ registeredServices_.find(commonApiAddress)->second->deinit();
+ registeredServices_.erase(commonApiAddress);
+ return false;
+ }
+ acquiredConnectionName_ = connectionName;
+ } else if (acquiredConnectionName_ != connectionName) {
+ registeredServices_.find(commonApiAddress)->second->deinit();
+ registeredServices_.erase(commonApiAddress);
+ return false;
+ }
+
+ return status;
}
bool DBusFactory::unregisterService(const std::string& participantId, const std::string& serviceName, const std::string& domain) {
#include <CommonAPI/Factory.h>
-#include "CommonAPI/DBus/DBusStubAdapter.h"
+#include "DBusStubAdapter.h"
#include "DBusConnection.h"
#include "DBusProxy.h"
return factory;
}
+
+extern "C" {
+
+CommonAPI::MiddlewareInfo middlewareInfo = CommonAPI::DBus::DBusRuntime::middlewareInfo_;
+
+}
+
} // namespace DBus
} // namespace CommonAPI
} // namespace DBus
} // namespace CommonAPI
-
-extern "C" {
-
-CommonAPI::MiddlewareInfo middlewareInfo = CommonAPI::DBus::DBusRuntime::middlewareInfo_;
-
-}
-
#endif // COMMONAPI_DBUS_DBUS_RUNTIME_H_
return remoteEventHandler_;
}
+ // interfaceMemberName, interfaceMemberSignature
+ typedef std::pair<const char*, const char*> DBusInterfaceMemberPath;
+ typedef std::unordered_map<DBusInterfaceMemberPath, StubDispatcher*> StubDispatcherTable;
protected:
- // interfaceMemberName, interfaceMemberSignature
- typedef std::pair<const char*, const char*> DBusInterfaceMemberPath;
- typedef std::unordered_map<DBusInterfaceMemberPath, StubDispatcher*> StubDispatcherTable;
virtual bool onInterfaceDBusMessage(const DBusMessage& dbusMessage) {
const char* interfaceMemberName = dbusMessage.getMemberName();
}
private:
- template <int... _InArgIndices, int... _OutArgIndices>
+ template <int... _InArgIndices>
inline bool handleDBusMessage(const DBusMessage& dbusMessage,
const std::shared_ptr<_StubClass>& stub,
DBusStubAdapterHelperType& dbusStubAdapterHelper,
}
TEST_F(DBusConnectionTest, LibdbusConnectionsMayCommitSuicide) {
+ dbus_threads_init_default();
const ::DBusBusType libdbusType = ::DBusBusType::DBUS_BUS_SESSION;
::DBusError libdbusError;
dbus_error_init(&libdbusError);
-/* 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/. */
+/*
+* This file was generated by the CommonAPI Generators.
+*
+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/.
+
+Test workspace
+*/
#include "DerivedTypeCollection.h"
namespace commonapi {
-/* 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_DERIVED_TYPE_COLLECTION_H_
-#define COMMONAPI_TESTS_DERIVED_TYPE_COLLECTION_H_
+/*
+* This file was generated by the CommonAPI Generators.
+*
+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/.
+
+Test workspace
+*/
+#ifndef COMMONAPI_TESTS_Derived_Type_Collection_H_
+#define COMMONAPI_TESTS_Derived_Type_Collection_H_
#include <CommonAPI/InputStream.h>
#include <CommonAPI/OutputStream.h>
typedef std::unordered_map<uint32_t, TestArrayTestStruct> TestMap;
enum class TestEnum: int32_t {
- E_UNKNOWN = 0,
- E_OK = 1,
- E_OUT_OF_RANGE = 2,
- E_NOT_USED = 3
+ E_UNKNOWN = 0x0,
+ E_OK = 0x1,
+ E_OUT_OF_RANGE = 0x2,
+ E_NOT_USED = 0x3
};
// XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
E_OUT_OF_RANGE = TestEnum::E_OUT_OF_RANGE,
E_NOT_USED = TestEnum::E_NOT_USED
,
- E_NEW = 4
+ E_NEW = 0x4
};
// XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
E_NEW = TestEnumExtended::E_NEW
,
- E_NEW2 = 5
+ E_NEW2 = 0x5
};
// XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
typedef std::unordered_map<TestEnum, std::string> TestEnumMap;
enum class TestEnumMissingValue: int32_t {
- E1 = 10,
+ E1 = 0xa,
E2,
E3 = 2
};
};
-inline bool operator==(const TestEnumExtended2& lhs, const TestEnum& rhs) {
+inline bool operator==(const TestEnumExtended2& lhs, const DerivedTypeCollection::TestEnum& rhs) {
return static_cast<int32_t>(lhs) == static_cast<int32_t>(rhs);
}
-inline bool operator==(const TestEnum& lhs, const TestEnumExtended2& rhs) {
+inline bool operator==(const DerivedTypeCollection::TestEnum& lhs, const TestEnumExtended2& rhs) {
return static_cast<int32_t>(lhs) == static_cast<int32_t>(rhs);
-}
-inline bool operator!=(const TestEnumExtended2& lhs, const TestEnum& rhs) {
+}
+inline bool operator!=(const TestEnumExtended2& lhs, const DerivedTypeCollection::TestEnum& rhs) {
return static_cast<int32_t>(lhs) != static_cast<int32_t>(rhs);
}
-inline bool operator!=(const TestEnum& lhs, const TestEnumExtended2& rhs) {
+inline bool operator!=(const DerivedTypeCollection::TestEnum& lhs, const TestEnumExtended2& rhs) {
return static_cast<int32_t>(lhs) != static_cast<int32_t>(rhs);
-}
+}
-inline bool operator==(const TestEnumExtended2& lhs, const TestEnumExtended& rhs) {
+inline bool operator==(const TestEnumExtended2& lhs, const DerivedTypeCollection::TestEnumExtended& rhs) {
return static_cast<int32_t>(lhs) == static_cast<int32_t>(rhs);
}
-inline bool operator==(const TestEnumExtended& lhs, const TestEnumExtended2& rhs) {
+inline bool operator==(const DerivedTypeCollection::TestEnumExtended& lhs, const TestEnumExtended2& rhs) {
return static_cast<int32_t>(lhs) == static_cast<int32_t>(rhs);
-}
-inline bool operator!=(const TestEnumExtended2& lhs, const TestEnumExtended& rhs) {
+}
+inline bool operator!=(const TestEnumExtended2& lhs, const DerivedTypeCollection::TestEnumExtended& rhs) {
return static_cast<int32_t>(lhs) != static_cast<int32_t>(rhs);
}
-inline bool operator!=(const TestEnumExtended& lhs, const TestEnumExtended2& rhs) {
+inline bool operator!=(const DerivedTypeCollection::TestEnumExtended& lhs, const TestEnumExtended2& rhs) {
return static_cast<int32_t>(lhs) != static_cast<int32_t>(rhs);
-}
+}
inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, TestEnumMissingValue& enumValue) {
return inputStream.readEnumValue<int32_t>(enumValue);
}
};
-inline bool operator==(const TestEnumExtended& lhs, const TestEnum& rhs) {
+inline bool operator==(const TestEnumExtended& lhs, const DerivedTypeCollection::TestEnum& rhs) {
return static_cast<int32_t>(lhs) == static_cast<int32_t>(rhs);
}
-inline bool operator==(const TestEnum& lhs, const TestEnumExtended& rhs) {
+inline bool operator==(const DerivedTypeCollection::TestEnum& lhs, const TestEnumExtended& rhs) {
return static_cast<int32_t>(lhs) == static_cast<int32_t>(rhs);
-}
-inline bool operator!=(const TestEnumExtended& lhs, const TestEnum& rhs) {
+}
+inline bool operator!=(const TestEnumExtended& lhs, const DerivedTypeCollection::TestEnum& rhs) {
return static_cast<int32_t>(lhs) != static_cast<int32_t>(rhs);
}
-inline bool operator!=(const TestEnum& lhs, const TestEnumExtended& rhs) {
+inline bool operator!=(const DerivedTypeCollection::TestEnum& lhs, const TestEnumExtended& rhs) {
return static_cast<int32_t>(lhs) != static_cast<int32_t>(rhs);
-}
+}
bool operator==(const TestStruct& lhs, const TestStruct& rhs);
inline bool operator!=(const TestStruct& lhs, const TestStruct& rhs) {
return !(lhs == rhs);
namespace std {
+ //Hash for TestEnum
template<>
struct hash<commonapi::tests::DerivedTypeCollection::TestEnum> {
inline size_t operator()(const commonapi::tests::DerivedTypeCollection::TestEnum& testEnum) const {
return static_cast<int32_t>(testEnum);
}
};
+ //Hash for TestEnumExtended2
template<>
struct hash<commonapi::tests::DerivedTypeCollection::TestEnumExtended2> {
inline size_t operator()(const commonapi::tests::DerivedTypeCollection::TestEnumExtended2& testEnumExtended2) const {
return static_cast<int32_t>(testEnumExtended2);
}
};
+ //Hash for TestEnumMissingValue
template<>
struct hash<commonapi::tests::DerivedTypeCollection::TestEnumMissingValue> {
inline size_t operator()(const commonapi::tests::DerivedTypeCollection::TestEnumMissingValue& testEnumMissingValue) const {
return static_cast<int32_t>(testEnumMissingValue);
}
};
+ //Hash for TestEnumExtended
template<>
struct hash<commonapi::tests::DerivedTypeCollection::TestEnumExtended> {
inline size_t operator()(const commonapi::tests::DerivedTypeCollection::TestEnumExtended& testEnumExtended) const {
};
}
-#endif // COMMONAPI_TESTS_DERIVED_TYPE_COLLECTION_H_
+#endif // COMMONAPI_TESTS_Derived_Type_Collection_H_
-/* 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_PREDEFINED_TYPE_COLLECTION_H_
-#define COMMONAPI_TESTS_PREDEFINED_TYPE_COLLECTION_H_
+/*
+* This file was generated by the CommonAPI Generators.
+*
+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/.
+
+Test workspace
+*/
+#ifndef COMMONAPI_TESTS_Predefined_Type_Collection_H_
+#define COMMONAPI_TESTS_Predefined_Type_Collection_H_
#include <CommonAPI/ByteBuffer.h>
#include <CommonAPI/types.h>
namespace std {
}
-#endif // COMMONAPI_TESTS_PREDEFINED_TYPE_COLLECTION_H_
+#endif // COMMONAPI_TESTS_Predefined_Type_Collection_H_
-/* 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_H_
-#define COMMONAPI_TESTS_TEST_INTERFACE_H_
+/*
+* This file was generated by the CommonAPI Generators.
+*
+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/.
+
+Test workspace
+*/
+#ifndef COMMONAPI_TESTS_Test_Interface_H_
+#define COMMONAPI_TESTS_Test_Interface_H_
#include <CommonAPI/types.h>
namespace std {
+ //hashes for types
+
+ //hashes for error types
}
-#endif // COMMONAPI_TESTS_TEST_INTERFACE_H_
+#endif // COMMONAPI_TESTS_Test_Interface_H_
-/* 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/. */
+/*
+* This file was generated by the CommonAPI Generators.
+*
+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/.
+
+Test workspace
+*/
#include "TestInterfaceDBusProxy.h"
namespace commonapi {
-/* 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_H_
-#define COMMONAPI_TESTS_TEST_INTERFACE_DBUS_PROXY_H_
+/*
+* This file was generated by the CommonAPI Generators.
+*
+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/.
+
+Test workspace
+*/
+#ifndef COMMONAPI_TESTS_Test_Interface_DBUS_PROXY_H_
+#define COMMONAPI_TESTS_Test_Interface_DBUS_PROXY_H_
#include <commonapi/tests/TestInterfaceProxyBase.h>
#include <CommonAPI/DBus/DBusFactory.h>
const std::string& objectPath,
const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection);
- virtual ~TestInterfaceDBusProxy() {}
+ virtual ~TestInterfaceDBusProxy() { }
virtual TestPredefinedTypeAttributeAttribute& getTestPredefinedTypeAttributeAttribute();
virtual TestDerivedStructAttributeAttribute& getTestDerivedStructAttributeAttribute();
virtual TestPredefinedTypeBroadcastEvent& getTestPredefinedTypeBroadcastEvent();
+
virtual void testEmptyMethod(CommonAPI::CallStatus& callStatus);
virtual std::future<CommonAPI::CallStatus> testEmptyMethodAsync(TestEmptyMethodAsyncCallback callback);
+
virtual void testVoidPredefinedTypeMethod(const uint32_t& uint32Value, const std::string& stringValue, CommonAPI::CallStatus& callStatus);
virtual std::future<CommonAPI::CallStatus> testVoidPredefinedTypeMethodAsync(const uint32_t& uint32Value, const std::string& stringValue, TestVoidPredefinedTypeMethodAsyncCallback callback);
+
virtual void testPredefinedTypeMethod(const uint32_t& uint32InValue, const std::string& stringInValue, CommonAPI::CallStatus& callStatus, uint32_t& uint32OutValue, std::string& stringOutValue);
virtual std::future<CommonAPI::CallStatus> testPredefinedTypeMethodAsync(const uint32_t& uint32InValue, const std::string& stringInValue, TestPredefinedTypeMethodAsyncCallback callback);
+
virtual void testVoidDerivedTypeMethod(const DerivedTypeCollection::TestEnumExtended2& testEnumExtended2Value, const DerivedTypeCollection::TestMap& testMapValue, CommonAPI::CallStatus& callStatus);
virtual std::future<CommonAPI::CallStatus> testVoidDerivedTypeMethodAsync(const DerivedTypeCollection::TestEnumExtended2& testEnumExtended2Value, const DerivedTypeCollection::TestMap& testMapValue, TestVoidDerivedTypeMethodAsyncCallback callback);
+
virtual void testDerivedTypeMethod(const DerivedTypeCollection::TestEnumExtended2& testEnumExtended2InValue, const DerivedTypeCollection::TestMap& testMapInValue, CommonAPI::CallStatus& callStatus, DerivedTypeCollection::TestEnumExtended2& testEnumExtended2OutValue, DerivedTypeCollection::TestMap& testMapOutValue);
virtual std::future<CommonAPI::CallStatus> testDerivedTypeMethodAsync(const DerivedTypeCollection::TestEnumExtended2& testEnumExtended2InValue, const DerivedTypeCollection::TestMap& testMapInValue, TestDerivedTypeMethodAsyncCallback callback);
-
+
virtual void getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const;
private:
} // namespace tests
} // namespace commonapi
-#endif // COMMONAPI_TESTS_TEST_INTERFACE_DBUS_PROXY_H_
+#endif // COMMONAPI_TESTS_Test_Interface_DBUS_PROXY_H_
-/* 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/. */
+/*
+* This file was generated by the CommonAPI Generators.
+*
+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/.
+
+Test workspace
+*/
#include "TestInterfaceDBusStubAdapter.h"
#include <commonapi/tests/TestInterface.h>
> testDerivedTypeMethodStubDispatcher(&TestInterfaceStub::testDerivedTypeMethod, "ia{ua(sq)}");
-template<>
-const TestInterfaceDBusStubAdapterHelper::StubDispatcherTable TestInterfaceDBusStubAdapterHelper::stubDispatcherTable_ = {
- { { "getTestPredefinedTypeAttributeAttribute", "" }, &commonapi::tests::getTestPredefinedTypeAttributeAttributeStubDispatcher }
- , { { "setTestPredefinedTypeAttributeAttribute", "u" }, &commonapi::tests::setTestPredefinedTypeAttributeAttributeStubDispatcher },
- { { "getTestDerivedStructAttributeAttribute", "" }, &commonapi::tests::getTestDerivedStructAttributeAttributeStubDispatcher }
- , { { "setTestDerivedStructAttributeAttribute", "(sqi)" }, &commonapi::tests::setTestDerivedStructAttributeAttributeStubDispatcher },
- { { "getTestDerivedArrayAttributeAttribute", "" }, &commonapi::tests::getTestDerivedArrayAttributeAttributeStubDispatcher }
- , { { "setTestDerivedArrayAttributeAttribute", "at" }, &commonapi::tests::setTestDerivedArrayAttributeAttributeStubDispatcher }
- ,
- { { "testEmptyMethod", "" }, &commonapi::tests::testEmptyMethodStubDispatcher },
- { { "testVoidPredefinedTypeMethod", "us" }, &commonapi::tests::testVoidPredefinedTypeMethodStubDispatcher },
- { { "testPredefinedTypeMethod", "us" }, &commonapi::tests::testPredefinedTypeMethodStubDispatcher },
- { { "testVoidDerivedTypeMethod", "ia{ua(sq)}" }, &commonapi::tests::testVoidDerivedTypeMethodStubDispatcher },
- { { "testDerivedTypeMethod", "ia{ua(sq)}" }, &commonapi::tests::testDerivedTypeMethodStubDispatcher }
-};
-
void TestInterfaceDBusStubAdapter::fireTestPredefinedTypeAttributeAttributeChanged(const uint32_t& value) {
CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<uint32_t>>
::sendSignal(
} // namespace tests
} // namespace commonapi
+
+template<>
+const commonapi::tests::TestInterfaceDBusStubAdapterHelper::StubDispatcherTable commonapi::tests::TestInterfaceDBusStubAdapterHelper::stubDispatcherTable_ = {
+ { { "getTestPredefinedTypeAttributeAttribute", "" }, &commonapi::tests::getTestPredefinedTypeAttributeAttributeStubDispatcher }
+ , { { "setTestPredefinedTypeAttributeAttribute", "u" }, &commonapi::tests::setTestPredefinedTypeAttributeAttributeStubDispatcher },
+ { { "getTestDerivedStructAttributeAttribute", "" }, &commonapi::tests::getTestDerivedStructAttributeAttributeStubDispatcher }
+ , { { "setTestDerivedStructAttributeAttribute", "(sqi)" }, &commonapi::tests::setTestDerivedStructAttributeAttributeStubDispatcher },
+ { { "getTestDerivedArrayAttributeAttribute", "" }, &commonapi::tests::getTestDerivedArrayAttributeAttributeStubDispatcher }
+ , { { "setTestDerivedArrayAttributeAttribute", "at" }, &commonapi::tests::setTestDerivedArrayAttributeAttributeStubDispatcher }
+ ,
+ { { "testEmptyMethod", "" }, &commonapi::tests::testEmptyMethodStubDispatcher },
+ { { "testVoidPredefinedTypeMethod", "us" }, &commonapi::tests::testVoidPredefinedTypeMethodStubDispatcher },
+ { { "testPredefinedTypeMethod", "us" }, &commonapi::tests::testPredefinedTypeMethodStubDispatcher },
+ { { "testVoidDerivedTypeMethod", "ia{ua(sq)}" }, &commonapi::tests::testVoidDerivedTypeMethodStubDispatcher },
+ { { "testDerivedTypeMethod", "ia{ua(sq)}" }, &commonapi::tests::testDerivedTypeMethodStubDispatcher }
+};
-/* 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_H_
-#define COMMONAPI_TESTS_TEST_INTERFACE_DBUS_STUB_ADAPTER_H_
+/*
+* This file was generated by the CommonAPI Generators.
+*
+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/.
+
+Test workspace
+*/
+#ifndef COMMONAPI_TESTS_Test_Interface_DBUS_STUB_ADAPTER_H_
+#define COMMONAPI_TESTS_Test_Interface_DBUS_STUB_ADAPTER_H_
#include <commonapi/tests/TestInterfaceStub.h>
} // namespace tests
} // namespace commonapi
-#endif // COMMONAPI_TESTS_TEST_INTERFACE_DBUS_STUB_ADAPTER_H_
+#endif // COMMONAPI_TESTS_Test_Interface_DBUS_STUB_ADAPTER_H_
-/* 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_PROXY_H_
-#define COMMONAPI_TESTS_TEST_INTERFACE_PROXY_H_
+/*
+* This file was generated by the CommonAPI Generators.
+*
+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/.
+
+Test workspace
+*/
+#ifndef COMMONAPI_TESTS_Test_Interface_PROXY_H_
+#define COMMONAPI_TESTS_Test_Interface_PROXY_H_
#include "TestInterfaceProxyBase.h"
#include <CommonAPI/AttributeExtension.h>
~TestInterfaceProxy();
/// Returns the wrapper class that provides access to the attribute TestPredefinedTypeAttribute.
- virtual TestPredefinedTypeAttributeAttribute& getTestPredefinedTypeAttributeAttribute();
+ virtual TestPredefinedTypeAttributeAttribute& getTestPredefinedTypeAttributeAttribute() {
+ return delegate_->getTestPredefinedTypeAttributeAttribute();
+ }
+
/// Returns the wrapper class that provides access to the attribute TestDerivedStructAttribute.
- virtual TestDerivedStructAttributeAttribute& getTestDerivedStructAttributeAttribute();
+ virtual TestDerivedStructAttributeAttribute& getTestDerivedStructAttributeAttribute() {
+ return delegate_->getTestDerivedStructAttributeAttribute();
+ }
+
/// Returns the wrapper class that provides access to the attribute TestDerivedArrayAttribute.
- virtual TestDerivedArrayAttributeAttribute& getTestDerivedArrayAttributeAttribute();
+ virtual TestDerivedArrayAttributeAttribute& getTestDerivedArrayAttributeAttribute() {
+ return delegate_->getTestDerivedArrayAttributeAttribute();
+ }
+
/// Returns the wrapper class that provides access to the broadcast TestPredefinedTypeBroadcast.
- virtual TestPredefinedTypeBroadcastEvent& getTestPredefinedTypeBroadcastEvent();
+ virtual TestPredefinedTypeBroadcastEvent& getTestPredefinedTypeBroadcastEvent() {
+ return delegate_->getTestPredefinedTypeBroadcastEvent();
+ }
+
/**
//
template <typename ... _AttributeExtensions>
TestInterfaceProxy<_AttributeExtensions...>::TestInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate):
- delegate_(std::dynamic_pointer_cast<TestInterfaceProxyBase>(delegate)),
- _AttributeExtensions(*(std::dynamic_pointer_cast<TestInterfaceProxyBase>(delegate)))... {
+ delegate_(std::dynamic_pointer_cast<TestInterfaceProxyBase>(delegate))
+#ifndef _WIN32
+ , _AttributeExtensions(*(std::dynamic_pointer_cast<TestInterfaceProxyBase>(delegate)))...
+#endif
+{
}
template <typename ... _AttributeExtensions>
}
template <typename ... _AttributeExtensions>
-typename TestInterfaceProxy<_AttributeExtensions...>::TestPredefinedTypeAttributeAttribute& TestInterfaceProxy<_AttributeExtensions...>::getTestPredefinedTypeAttributeAttribute() {
- return delegate_->getTestPredefinedTypeAttributeAttribute();
-}
-
-template <typename ... _AttributeExtensions>
-typename TestInterfaceProxy<_AttributeExtensions...>::TestDerivedStructAttributeAttribute& TestInterfaceProxy<_AttributeExtensions...>::getTestDerivedStructAttributeAttribute() {
- return delegate_->getTestDerivedStructAttributeAttribute();
-}
-
-template <typename ... _AttributeExtensions>
-typename TestInterfaceProxy<_AttributeExtensions...>::TestDerivedArrayAttributeAttribute& TestInterfaceProxy<_AttributeExtensions...>::getTestDerivedArrayAttributeAttribute() {
- return delegate_->getTestDerivedArrayAttributeAttribute();
-}
-
-
-template <typename ... _AttributeExtensions>
-typename TestInterfaceProxy<_AttributeExtensions...>::TestPredefinedTypeBroadcastEvent& TestInterfaceProxy<_AttributeExtensions...>::getTestPredefinedTypeBroadcastEvent() {
- return delegate_->getTestPredefinedTypeBroadcastEvent();
-}
-
-
-template <typename ... _AttributeExtensions>
void TestInterfaceProxy<_AttributeExtensions...>::testEmptyMethod(CommonAPI::CallStatus& callStatus) {
delegate_->testEmptyMethod(callStatus);
}
}
-#endif // COMMONAPI_TESTS_TEST_INTERFACE_PROXY_H_
+#endif // COMMONAPI_TESTS_Test_Interface_PROXY_H_
-/* 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_PROXY_BASE_H_
-#define COMMONAPI_TESTS_TEST_INTERFACE_PROXY_BASE_H_
+/*
+* This file was generated by the CommonAPI Generators.
+*
+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/.
+
+Test workspace
+*/
+#ifndef COMMONAPI_TESTS_Test_Interface_PROXY_BASE_H_
+#define COMMONAPI_TESTS_Test_Interface_PROXY_BASE_H_
#include "TestInterface.h"
#include <unordered_map>
#include <CommonAPI/Proxy.h>
#include <functional>
#include <future>
+#include <vector>
namespace commonapi {
namespace tests {
virtual std::future<CommonAPI::CallStatus> testDerivedTypeMethodAsync(const DerivedTypeCollection::TestEnumExtended2& testEnumExtended2InValue, const DerivedTypeCollection::TestMap& testMapInValue, TestDerivedTypeMethodAsyncCallback callback) = 0;
};
-
} // namespace tests
} // namespace commonapi
-#endif // COMMONAPI_TESTS_TEST_INTERFACE_PROXY_BASE_H_
+#endif // COMMONAPI_TESTS_Test_Interface_PROXY_BASE_H_
-/* 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_STUB_H_
-#define COMMONAPI_TESTS_TEST_INTERFACE_STUB_H_
+/*
+* This file was generated by the CommonAPI Generators.
+*
+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/.
+
+Test workspace
+*/
+#ifndef COMMONAPI_TESTS_Test_Interface_STUB_H_
+#define COMMONAPI_TESTS_Test_Interface_STUB_H_
#include <unordered_map>
#include <cstdint>
#include "TestInterface.h"
#include <CommonAPI/Stub.h>
+#include <vector>
+
namespace commonapi {
namespace tests {
} // namespace tests
} // namespace commonapi
-#endif // COMMONAPI_TESTS_TEST_INTERFACE_STUB_H_
+#endif // COMMONAPI_TESTS_Test_Interface_STUB_H_
-/* 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/. */
+/*
+* This file was generated by the CommonAPI Generators.
+*
+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/.
+
+Test workspace
+*/
#include <commonapi/tests/TestInterfaceStubDefault.h>
namespace commonapi {
-/* 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_STUB_DEFAULT_H_
-#define COMMONAPI_TESTS_TEST_INTERFACE_STUB_DEFAULT_H_
+/*
+* This file was generated by the CommonAPI Generators.
+*
+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/.
+
+Test workspace
+*/
+#ifndef COMMONAPI_TESTS_Test_Interface_STUB_DEFAULT_H_
+#define COMMONAPI_TESTS_Test_Interface_STUB_DEFAULT_H_
#include <commonapi/tests/TestInterfaceStub.h>
} // namespace tests
} // namespace commonapi
-#endif // COMMONAPI_TESTS_TEST_INTERFACE_STUB_DEFAULT_H_
+#endif // COMMONAPI_TESTS_Test_Interface_STUB_DEFAULT_H_