summaryrefslogtreecommitdiff
path: root/src/test/commonapi/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/commonapi/tests')
-rw-r--r--src/test/commonapi/tests/DerivedTypeCollection.cpp227
-rw-r--r--src/test/commonapi/tests/DerivedTypeCollection.h476
-rw-r--r--src/test/commonapi/tests/DerivedTypeCollection.hpp354
-rw-r--r--src/test/commonapi/tests/ExtendedInterface.h60
-rw-r--r--src/test/commonapi/tests/ExtendedInterfaceDBusProxy.cpp78
-rw-r--r--src/test/commonapi/tests/ExtendedInterfaceDBusProxy.h60
-rw-r--r--src/test/commonapi/tests/ExtendedInterfaceDBusStubAdapter.cpp286
-rw-r--r--src/test/commonapi/tests/ExtendedInterfaceDBusStubAdapter.h243
-rw-r--r--src/test/commonapi/tests/ExtendedInterfaceProxy.h187
-rw-r--r--src/test/commonapi/tests/ExtendedInterfaceProxyBase.h47
-rw-r--r--src/test/commonapi/tests/ExtendedInterfaceStub.h96
-rw-r--r--src/test/commonapi/tests/ExtendedInterfaceStubDefault.cpp48
-rw-r--r--src/test/commonapi/tests/ExtendedInterfaceStubDefault.h65
-rw-r--r--src/test/commonapi/tests/PredefinedTypeCollection.hpp (renamed from src/test/commonapi/tests/PredefinedTypeCollection.h)20
-rw-r--r--src/test/commonapi/tests/TestFreedesktopDerivedInterface.h60
-rw-r--r--src/test/commonapi/tests/TestFreedesktopDerivedInterfaceDBusProxy.cpp63
-rw-r--r--src/test/commonapi/tests/TestFreedesktopDerivedInterfaceDBusProxy.h61
-rw-r--r--src/test/commonapi/tests/TestFreedesktopDerivedInterfaceDBusStubAdapter.cpp245
-rw-r--r--src/test/commonapi/tests/TestFreedesktopDerivedInterfaceDBusStubAdapter.h180
-rw-r--r--src/test/commonapi/tests/TestFreedesktopDerivedInterfaceProxy.h199
-rw-r--r--src/test/commonapi/tests/TestFreedesktopDerivedInterfaceProxyBase.h44
-rw-r--r--src/test/commonapi/tests/TestFreedesktopDerivedInterfaceStub.h102
-rw-r--r--src/test/commonapi/tests/TestFreedesktopDerivedInterfaceStubDefault.cpp88
-rw-r--r--src/test/commonapi/tests/TestFreedesktopDerivedInterfaceStubDefault.h74
-rw-r--r--src/test/commonapi/tests/TestFreedesktopInterface.h59
-rw-r--r--src/test/commonapi/tests/TestFreedesktopInterfaceDBusProxy.cpp68
-rw-r--r--src/test/commonapi/tests/TestFreedesktopInterfaceDBusProxy.h66
-rw-r--r--src/test/commonapi/tests/TestFreedesktopInterfaceDBusStubAdapter.cpp219
-rw-r--r--src/test/commonapi/tests/TestFreedesktopInterfaceDBusStubAdapter.h137
-rw-r--r--src/test/commonapi/tests/TestFreedesktopInterfaceProxy.h280
-rw-r--r--src/test/commonapi/tests/TestFreedesktopInterfaceProxyBase.h52
-rw-r--r--src/test/commonapi/tests/TestFreedesktopInterfaceStub.h127
-rw-r--r--src/test/commonapi/tests/TestFreedesktopInterfaceStubDefault.cpp211
-rw-r--r--src/test/commonapi/tests/TestFreedesktopInterfaceStubDefault.h104
-rw-r--r--src/test/commonapi/tests/TestInterface.h59
-rw-r--r--src/test/commonapi/tests/TestInterfaceDBusProxy.cpp245
-rw-r--r--src/test/commonapi/tests/TestInterfaceDBusProxy.h91
-rw-r--r--src/test/commonapi/tests/TestInterfaceDBusStubAdapter.cpp469
-rw-r--r--src/test/commonapi/tests/TestInterfaceDBusStubAdapter.h214
-rw-r--r--src/test/commonapi/tests/TestInterfaceProxy.h531
-rw-r--r--src/test/commonapi/tests/TestInterfaceProxyBase.h92
-rw-r--r--src/test/commonapi/tests/TestInterfaceStub.h197
-rw-r--r--src/test/commonapi/tests/TestInterfaceStubDefault.cpp285
-rw-r--r--src/test/commonapi/tests/TestInterfaceStubDefault.h137
-rw-r--r--src/test/commonapi/tests/managed/BranchInterface.h91
-rw-r--r--src/test/commonapi/tests/managed/BranchInterfaceDBusProxy.cpp74
-rw-r--r--src/test/commonapi/tests/managed/BranchInterfaceDBusProxy.h61
-rw-r--r--src/test/commonapi/tests/managed/BranchInterfaceDBusStubAdapter.cpp125
-rw-r--r--src/test/commonapi/tests/managed/BranchInterfaceDBusStubAdapter.h112
-rw-r--r--src/test/commonapi/tests/managed/BranchInterfaceProxy.h184
-rw-r--r--src/test/commonapi/tests/managed/BranchInterfaceProxyBase.h48
-rw-r--r--src/test/commonapi/tests/managed/BranchInterfaceStub.h97
-rw-r--r--src/test/commonapi/tests/managed/BranchInterfaceStubDefault.cpp48
-rw-r--r--src/test/commonapi/tests/managed/BranchInterfaceStubDefault.h66
-rw-r--r--src/test/commonapi/tests/managed/LeafInterface.h91
-rw-r--r--src/test/commonapi/tests/managed/LeafInterfaceDBusProxy.cpp74
-rw-r--r--src/test/commonapi/tests/managed/LeafInterfaceDBusProxy.h61
-rw-r--r--src/test/commonapi/tests/managed/LeafInterfaceDBusStubAdapter.cpp125
-rw-r--r--src/test/commonapi/tests/managed/LeafInterfaceDBusStubAdapter.h112
-rw-r--r--src/test/commonapi/tests/managed/LeafInterfaceProxy.h184
-rw-r--r--src/test/commonapi/tests/managed/LeafInterfaceProxyBase.h48
-rw-r--r--src/test/commonapi/tests/managed/LeafInterfaceStub.h97
-rw-r--r--src/test/commonapi/tests/managed/LeafInterfaceStubDefault.cpp48
-rw-r--r--src/test/commonapi/tests/managed/LeafInterfaceStubDefault.h66
-rw-r--r--src/test/commonapi/tests/managed/RootInterface.h92
-rw-r--r--src/test/commonapi/tests/managed/RootInterfaceDBusProxy.cpp82
-rw-r--r--src/test/commonapi/tests/managed/RootInterfaceDBusProxy.h66
-rw-r--r--src/test/commonapi/tests/managed/RootInterfaceDBusStubAdapter.cpp253
-rw-r--r--src/test/commonapi/tests/managed/RootInterfaceDBusStubAdapter.h120
-rw-r--r--src/test/commonapi/tests/managed/RootInterfaceProxy.h194
-rw-r--r--src/test/commonapi/tests/managed/RootInterfaceProxyBase.h53
-rw-r--r--src/test/commonapi/tests/managed/RootInterfaceStub.h111
-rw-r--r--src/test/commonapi/tests/managed/RootInterfaceStubDefault.cpp81
-rw-r--r--src/test/commonapi/tests/managed/RootInterfaceStubDefault.h75
-rw-r--r--src/test/commonapi/tests/managed/SecondRoot.h62
-rw-r--r--src/test/commonapi/tests/managed/SecondRootDBusProxy.cpp58
-rw-r--r--src/test/commonapi/tests/managed/SecondRootDBusProxy.h62
-rw-r--r--src/test/commonapi/tests/managed/SecondRootDBusStubAdapter.cpp178
-rw-r--r--src/test/commonapi/tests/managed/SecondRootDBusStubAdapter.h111
-rw-r--r--src/test/commonapi/tests/managed/SecondRootProxy.h159
-rw-r--r--src/test/commonapi/tests/managed/SecondRootProxyBase.h45
-rw-r--r--src/test/commonapi/tests/managed/SecondRootStub.h101
-rw-r--r--src/test/commonapi/tests/managed/SecondRootStubDefault.cpp57
-rw-r--r--src/test/commonapi/tests/managed/SecondRootStubDefault.h68
84 files changed, 399 insertions, 10447 deletions
diff --git a/src/test/commonapi/tests/DerivedTypeCollection.cpp b/src/test/commonapi/tests/DerivedTypeCollection.cpp
index 09063a1..edf4c7c 100644
--- a/src/test/commonapi/tests/DerivedTypeCollection.cpp
+++ b/src/test/commonapi/tests/DerivedTypeCollection.cpp
@@ -1,225 +1,70 @@
/*
* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
+* Used org.genivi.commonapi.core 3.0.1.v201504231326.
+* 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 "DerivedTypeCollection.h"
+#include "DerivedTypeCollection.hpp"
namespace commonapi {
namespace tests {
-namespace DerivedTypeCollection {
-
-TestStructExtended::TestStructExtended(const PredefinedTypeCollection::TestString& testStringValue, const uint16_t& uintValueValue, const TestEnumExtended2& testEnumExtended2Value):
- TestStruct(testStringValue, uintValueValue),
- testEnumExtended2(testEnumExtended2Value)
-{
-}
-
-
-bool operator==(const TestStructExtended& lhs, const TestStructExtended& rhs) {
- if (&lhs == &rhs)
- return true;
-
- return
- static_cast<TestStructExtended::TestStruct>(lhs) == static_cast<TestStructExtended::TestStruct>(rhs) &&
- lhs.testEnumExtended2 == rhs.testEnumExtended2
- ;
-}
-
-void TestStructExtended::readFromInputStream(CommonAPI::InputStream& inputStream) {
- TestStruct::readFromInputStream(inputStream);
- inputStream >> testEnumExtended2;
-}
-
-void TestStructExtended::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
- TestStruct::writeToOutputStream(outputStream);
- outputStream << testEnumExtended2;
-}
-
-
-
-
-
-
-
-
-TestStruct::TestStruct(const PredefinedTypeCollection::TestString& testStringValue, const uint16_t& uintValueValue):
- testString(testStringValue),
- uintValue(uintValueValue)
-{
-}
-
-
-bool operator==(const TestStruct& lhs, const TestStruct& rhs) {
- if (&lhs == &rhs)
- return true;
-
- return
- lhs.testString == rhs.testString &&
- lhs.uintValue == rhs.uintValue
- ;
-}
-
-void TestStruct::readFromInputStream(CommonAPI::InputStream& inputStream) {
- inputStream >> testString;
- inputStream >> uintValue;
-}
-
-void TestStruct::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
- outputStream << testString;
- outputStream << uintValue;
-}
-
-TestPolymorphicStruct::TestPolymorphicStruct(const PredefinedTypeCollection::TestString& testStringValue, const uint16_t& uintValueValue):
- testString(testStringValue),
- uintValue(uintValueValue)
-{
-}
-
-TestPolymorphicStruct* TestPolymorphicStruct::createInstance(const uint32_t& serialId) {
- if (serialId == SERIAL_ID)
- return new TestPolymorphicStruct;
-
- const std::function<TestPolymorphicStruct*()> createDerivedInstanceFuncs[] = {
- [&]() { return TestExtendedPolymorphicStruct::createInstance(serialId); }
- };
-
- for (auto& createDerivedInstanceFunc : createDerivedInstanceFuncs) {
- TestPolymorphicStruct* derivedInstance = createDerivedInstanceFunc();
- if (derivedInstance != NULL)
- return derivedInstance;
- }
-
- return NULL;
-}
-
-uint32_t TestPolymorphicStruct::getSerialId() const {
- return SERIAL_ID;
-}
-
-void TestPolymorphicStruct::createTypeSignature(CommonAPI::TypeOutputStream& typeOutputStream) const {
- TestPolymorphicStruct::writeToTypeOutputStream(typeOutputStream);
-}
-
-bool operator==(const TestPolymorphicStruct& lhs, const TestPolymorphicStruct& rhs) {
- if (&lhs == &rhs)
- return true;
-
- return
- lhs.testString == rhs.testString &&
- lhs.uintValue == rhs.uintValue
- ;
-}
-
-void TestPolymorphicStruct::readFromInputStream(CommonAPI::InputStream& inputStream) {
- inputStream >> testString;
- inputStream >> uintValue;
-}
-
-void TestPolymorphicStruct::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
- outputStream << testString;
- outputStream << uintValue;
-}
-
-TestExtendedPolymorphicStruct::TestExtendedPolymorphicStruct(const PredefinedTypeCollection::TestString& testStringValue, const uint16_t& uintValueValue, const uint32_t& additionalValueValue):
- TestPolymorphicStruct(testStringValue, uintValueValue),
- additionalValue(additionalValueValue)
-{
-}
-
-TestExtendedPolymorphicStruct* TestExtendedPolymorphicStruct::createInstance(const uint32_t& serialId) {
- if (serialId == SERIAL_ID)
- return new TestExtendedPolymorphicStruct;
-
- return NULL;
-}
-
-uint32_t TestExtendedPolymorphicStruct::getSerialId() const {
- return SERIAL_ID;
-}
-
-void TestExtendedPolymorphicStruct::createTypeSignature(CommonAPI::TypeOutputStream& typeOutputStream) const {
- TestExtendedPolymorphicStruct::writeToTypeOutputStream(typeOutputStream);
+bool DerivedTypeCollection::TestStructExtended::operator==(const DerivedTypeCollection::TestStructExtended& _other) const {
+ return (getTestString() == _other.getTestString() && getUintValue() == _other.getUintValue() && getTestEnumExtended2() == _other.getTestEnumExtended2());
}
-bool operator==(const TestExtendedPolymorphicStruct& lhs, const TestExtendedPolymorphicStruct& rhs) {
- if (&lhs == &rhs)
- return true;
-
- return
- static_cast<TestExtendedPolymorphicStruct::TestPolymorphicStruct>(lhs) == static_cast<TestExtendedPolymorphicStruct::TestPolymorphicStruct>(rhs) &&
- lhs.additionalValue == rhs.additionalValue
- ;
-}
+#ifndef WIN32
+const int32_t DerivedTypeCollection::TestEnum::E_UNKNOWN;
+const int32_t DerivedTypeCollection::TestEnum::E_OK;
+const int32_t DerivedTypeCollection::TestEnum::E_OUT_OF_RANGE;
+const int32_t DerivedTypeCollection::TestEnum::E_NOT_USED;
+const int32_t DerivedTypeCollection::TestEnumExtended2::E_NEW2;
+const int32_t DerivedTypeCollection::TestEnumMissingValue::E1;
+const int32_t DerivedTypeCollection::TestEnumMissingValue::E2;
+const int32_t DerivedTypeCollection::TestEnumMissingValue::E3;
+const int32_t DerivedTypeCollection::TestEnumExtended::E_NEW;
+#endif
-void TestExtendedPolymorphicStruct::readFromInputStream(CommonAPI::InputStream& inputStream) {
- TestPolymorphicStruct::readFromInputStream(inputStream);
- inputStream >> additionalValue;
+bool DerivedTypeCollection::TestStruct::operator==(const DerivedTypeCollection::TestStruct& _other) const {
+ return (getTestString() == _other.getTestString() && getUintValue() == _other.getUintValue());
}
-void TestExtendedPolymorphicStruct::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
- TestPolymorphicStruct::writeToOutputStream(outputStream);
- outputStream << additionalValue;
+std::shared_ptr<DerivedTypeCollection::TestPolymorphicStruct> DerivedTypeCollection::TestPolymorphicStruct::create(CommonAPI::Serial _serial) {
+ switch (_serial) {
+ case DerivedTypeCollection::TESTPOLYMORPHICSTRUCT_SERIAL:
+ return std::make_shared<DerivedTypeCollection::TestPolymorphicStruct>();
+ case DerivedTypeCollection::TESTEXTENDEDPOLYMORPHICSTRUCT_SERIAL:
+ return std::make_shared<DerivedTypeCollection::TestExtendedPolymorphicStruct>();
+ default:
+ break;
+ }
+ return std::shared_ptr<DerivedTypeCollection::TestPolymorphicStruct>();
}
-
-StructWithPolymorphicMember::StructWithPolymorphicMember(const uint32_t& numberValueValue, const std::shared_ptr<TestPolymorphicStruct>& polymorphicMemberValue):
- numberValue(numberValueValue),
- polymorphicMember(polymorphicMemberValue)
-{
+bool DerivedTypeCollection::TestPolymorphicStruct::operator==(const DerivedTypeCollection::TestPolymorphicStruct& _other) const {
+ return (getTestString() == _other.getTestString() && getUintValue() == _other.getUintValue());
}
-bool operator==(const StructWithPolymorphicMember& lhs, const StructWithPolymorphicMember& rhs) {
- if (&lhs == &rhs)
- return true;
-
- return
- lhs.numberValue == rhs.numberValue &&
- lhs.polymorphicMember == rhs.polymorphicMember
- ;
-}
-
-void StructWithPolymorphicMember::readFromInputStream(CommonAPI::InputStream& inputStream) {
- inputStream >> numberValue;
- inputStream >> polymorphicMember;
+bool DerivedTypeCollection::TestExtendedPolymorphicStruct::operator==(const DerivedTypeCollection::TestExtendedPolymorphicStruct& _other) const {
+ return (getTestString() == _other.getTestString() && getUintValue() == _other.getUintValue() && getAdditionalValue() == _other.getAdditionalValue());
}
-void StructWithPolymorphicMember::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
- outputStream << numberValue;
- outputStream << polymorphicMember;
-}
-StructWithEnumKeyMap::StructWithEnumKeyMap(const TestEnumMap& testMapValue):
- testMap(testMapValue)
-{
+bool DerivedTypeCollection::StructWithPolymorphicMember::operator==(const DerivedTypeCollection::StructWithPolymorphicMember& _other) const {
+ return (getNumberValue() == _other.getNumberValue() && getPolymorphicMember() == _other.getPolymorphicMember());
}
-bool operator==(const StructWithEnumKeyMap& lhs, const StructWithEnumKeyMap& rhs) {
- if (&lhs == &rhs)
- return true;
-
- return
- lhs.testMap == rhs.testMap
- ;
-}
-
-void StructWithEnumKeyMap::readFromInputStream(CommonAPI::InputStream& inputStream) {
- inputStream >> testMap;
+bool DerivedTypeCollection::StructWithEnumKeyMap::operator==(const DerivedTypeCollection::StructWithEnumKeyMap& _other) const {
+ return (getTestMap() == _other.getTestMap());
}
-void StructWithEnumKeyMap::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
- outputStream << testMap;
-}
-} // namespace DerivedTypeCollection
} // namespace tests
} // namespace commonapi
diff --git a/src/test/commonapi/tests/DerivedTypeCollection.h b/src/test/commonapi/tests/DerivedTypeCollection.h
deleted file mode 100644
index 9e43d78..0000000
--- a/src/test/commonapi/tests/DerivedTypeCollection.h
+++ /dev/null
@@ -1,476 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_
-
-
-#include <commonapi/tests/PredefinedTypeCollection.h>
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <CommonAPI/InputStream.h>
-#include <CommonAPI/OutputStream.h>
-#include <CommonAPI/SerializableStruct.h>
-#include <CommonAPI/types.h>
-#include <cstdint>
-#include <string>
-#include <unordered_map>
-#include <vector>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-
-namespace DerivedTypeCollection {
- struct TestStruct: CommonAPI::SerializableStruct {
- /**
- * the name of the property
- */
- PredefinedTypeCollection::TestString testString;
- /**
- * the actual value
- */
- uint16_t uintValue;
-
- TestStruct() = default;
- TestStruct(const PredefinedTypeCollection::TestString& testString, const uint16_t& uintValue);
-
-
- virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
- virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
-
- static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
- typeOutputStream.writeStringType();
- typeOutputStream.writeUInt16Type();
- }
- };
- typedef std::vector<TestStruct> TestArrayTestStruct;
- typedef std::unordered_map<uint32_t, TestArrayTestStruct> TestMap;
- /**
- * Common errors.
- */
- enum class TestEnum: int32_t {
- /**
- * default
- */
- E_UNKNOWN = 0x0,
- /**
- * no error - positive reply
- */
- E_OK = 0x1,
- /**
- * value out of range
- */
- E_OUT_OF_RANGE = 0x2,
- /**
- * not used
- */
- E_NOT_USED = 0x3
- };
-
- // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
- struct TestEnumComparator;
- enum class TestEnumExtended: int32_t {
- E_UNKNOWN = TestEnum::E_UNKNOWN,
- E_OK = TestEnum::E_OK,
- E_OUT_OF_RANGE = TestEnum::E_OUT_OF_RANGE,
- E_NOT_USED = TestEnum::E_NOT_USED
- ,
- /**
- * new error
- */
- E_NEW = 0x4
- };
-
- // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
- struct TestEnumExtendedComparator;
- enum class TestEnumExtended2: int32_t {
- E_UNKNOWN = TestEnum::E_UNKNOWN,
- E_OK = TestEnum::E_OK,
- E_OUT_OF_RANGE = TestEnum::E_OUT_OF_RANGE,
- E_NOT_USED = TestEnum::E_NOT_USED,
-
- E_NEW = TestEnumExtended::E_NEW
- ,
- /**
- * new error
- */
- E_NEW2 = 0x5
- };
-
- // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
- struct TestEnumExtended2Comparator;
- struct TestStructExtended: TestStruct {
- TestEnumExtended2 testEnumExtended2;
-
- TestStructExtended() = default;
- TestStructExtended(const PredefinedTypeCollection::TestString& testString, const uint16_t& uintValue, const TestEnumExtended2& testEnumExtended2);
-
-
- virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
- virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
-
- static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
- TestStruct::writeToTypeOutputStream(typeOutputStream);
- typeOutputStream.writeInt32Type();
- }
- };
- typedef std::unordered_map<TestEnum, std::string, CommonAPI::EnumHasher<TestEnum>> TestEnumMap;
- enum class TestEnumMissingValue: int32_t {
- /**
- * default
- */
- E1 = 0xa,
- E2,
- E3 = 2
- };
-
- // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
- struct TestEnumMissingValueComparator;
- typedef std::vector<uint64_t> TestArrayUInt64;
- struct TestPolymorphicStruct: CommonAPI::SerializablePolymorphicStruct {
- /**
- * the name of the property
- */
- PredefinedTypeCollection::TestString testString;
- /**
- * the actual value
- */
- uint16_t uintValue;
-
- TestPolymorphicStruct() = default;
- TestPolymorphicStruct(const PredefinedTypeCollection::TestString& testString, const uint16_t& uintValue);
-
- enum: uint32_t { SERIAL_ID = 0x8f51a326 };
-
- static TestPolymorphicStruct* createInstance(const uint32_t& serialId);
-
- virtual uint32_t getSerialId() const;
- virtual void createTypeSignature(CommonAPI::TypeOutputStream& typeOutputStream) const;
-
- virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
- virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
-
- static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
- typeOutputStream.writeStringType();
- typeOutputStream.writeUInt16Type();
- }
- };
- struct TestExtendedPolymorphicStruct: TestPolymorphicStruct {
- uint32_t additionalValue;
-
- TestExtendedPolymorphicStruct() = default;
- TestExtendedPolymorphicStruct(const PredefinedTypeCollection::TestString& testString, const uint16_t& uintValue, const uint32_t& additionalValue);
-
- enum: uint32_t { SERIAL_ID = 0xa49310f2 };
-
- static TestExtendedPolymorphicStruct* createInstance(const uint32_t& serialId);
-
- virtual uint32_t getSerialId() const;
- virtual void createTypeSignature(CommonAPI::TypeOutputStream& typeOutputStream) const;
-
- virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
- virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
-
- static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
- TestPolymorphicStruct::writeToTypeOutputStream(typeOutputStream);
- typeOutputStream.writeUInt32Type();
- }
- };
- typedef std::unordered_map<uint8_t, std::shared_ptr<TestPolymorphicStruct>> MapIntToPolymorphic;
- struct StructWithPolymorphicMember: CommonAPI::SerializableStruct {
- uint32_t numberValue;
- std::shared_ptr<TestPolymorphicStruct> polymorphicMember;
-
- StructWithPolymorphicMember() = default;
- StructWithPolymorphicMember(const uint32_t& numberValue, const std::shared_ptr<TestPolymorphicStruct>& polymorphicMember);
-
-
- virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
- virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
-
- static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
- typeOutputStream.writeUInt32Type();
- typeOutputStream.beginWriteStructType();
- typeOutputStream.writeStringType();typeOutputStream.writeUInt16Type();
- typeOutputStream.endWriteStructType();
- }
- };
- struct StructWithEnumKeyMap: CommonAPI::SerializableStruct {
- TestEnumMap testMap;
-
- StructWithEnumKeyMap() = default;
- StructWithEnumKeyMap(const TestEnumMap& testMap);
-
-
- virtual void readFromInputStream(CommonAPI::InputStream& inputStream);
- virtual void writeToOutputStream(CommonAPI::OutputStream& outputStream) const;
-
- static inline void writeToTypeOutputStream(CommonAPI::TypeOutputStream& typeOutputStream) {
- typeOutputStream.beginWriteMapType();
- typeOutputStream.writeInt32Type();
- typeOutputStream.writeStringType();
- typeOutputStream.endWriteMapType();
- }
- };
-
-bool operator==(const TestStructExtended& lhs, const TestStructExtended& rhs);
-inline bool operator!=(const TestStructExtended& lhs, const TestStructExtended& rhs) {
- return !(lhs == rhs);
-}
-inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, TestEnum& enumValue) {
- return inputStream.readEnumValue<int32_t>(enumValue);
-}
-
-inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const TestEnum& enumValue) {
- return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
-}
-
-struct TestEnumComparator {
- inline bool operator()(const TestEnum& lhs, const TestEnum& rhs) const {
- return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
- }
-};
-
-inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, TestEnumExtended2& enumValue) {
- return inputStream.readEnumValue<int32_t>(enumValue);
-}
-
-inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const TestEnumExtended2& enumValue) {
- return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
-}
-
-struct TestEnumExtended2Comparator {
- inline bool operator()(const TestEnumExtended2& lhs, const TestEnumExtended2& rhs) const {
- return static_cast<int32_t>(lhs) < static_cast<int32_t>(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 DerivedTypeCollection::TestEnum& lhs, const TestEnumExtended2& rhs) {
- return static_cast<int32_t>(lhs) == static_cast<int32_t>(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 DerivedTypeCollection::TestEnum& lhs, const TestEnumExtended2& rhs) {
- return static_cast<int32_t>(lhs) != static_cast<int32_t>(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 DerivedTypeCollection::TestEnumExtended& lhs, const TestEnumExtended2& rhs) {
- return static_cast<int32_t>(lhs) == static_cast<int32_t>(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 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 CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const TestEnumMissingValue& enumValue) {
- return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
-}
-
-struct TestEnumMissingValueComparator {
- inline bool operator()(const TestEnumMissingValue& lhs, const TestEnumMissingValue& rhs) const {
- return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
- }
-};
-
-inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, TestEnumExtended& enumValue) {
- return inputStream.readEnumValue<int32_t>(enumValue);
-}
-
-inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const TestEnumExtended& enumValue) {
- return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
-}
-
-struct TestEnumExtendedComparator {
- inline bool operator()(const TestEnumExtended& lhs, const TestEnumExtended& rhs) const {
- return static_cast<int32_t>(lhs) < static_cast<int32_t>(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 DerivedTypeCollection::TestEnum& lhs, const TestEnumExtended& rhs) {
- return static_cast<int32_t>(lhs) == static_cast<int32_t>(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 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);
-}
-bool operator==(const TestPolymorphicStruct& lhs, const TestPolymorphicStruct& rhs);
-inline bool operator!=(const TestPolymorphicStruct& lhs, const TestPolymorphicStruct& rhs) {
- return !(lhs == rhs);
-}
-bool operator==(const TestExtendedPolymorphicStruct& lhs, const TestExtendedPolymorphicStruct& rhs);
-inline bool operator!=(const TestExtendedPolymorphicStruct& lhs, const TestExtendedPolymorphicStruct& rhs) {
- return !(lhs == rhs);
-}
-bool operator==(const StructWithPolymorphicMember& lhs, const StructWithPolymorphicMember& rhs);
-inline bool operator!=(const StructWithPolymorphicMember& lhs, const StructWithPolymorphicMember& rhs) {
- return !(lhs == rhs);
-}
-bool operator==(const StructWithEnumKeyMap& lhs, const StructWithEnumKeyMap& rhs);
-inline bool operator!=(const StructWithEnumKeyMap& lhs, const StructWithEnumKeyMap& rhs) {
- return !(lhs == rhs);
-}
-
-
-static inline const char* getTypeCollectionName() {
- static const char* typeCollectionName = "commonapi.tests.DerivedTypeCollection";
- return typeCollectionName;
-}
-
-
-} // namespace DerivedTypeCollection
-
-} // namespace tests
-} // namespace commonapi
-
-namespace CommonAPI {
-
- template<>
- struct BasicTypeWriter<commonapi::tests::DerivedTypeCollection::TestEnum> {
- inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
- typeStream.writeInt32EnumType();
- }
- };
-
- template<>
- struct InputStreamVectorHelper<commonapi::tests::DerivedTypeCollection::TestEnum> {
- static void beginReadVector(InputStream& inputStream, const std::vector<commonapi::tests::DerivedTypeCollection::TestEnum>& vectorValue) {
- inputStream.beginReadInt32EnumVector();
- }
- };
-
- template <>
- struct OutputStreamVectorHelper<commonapi::tests::DerivedTypeCollection::TestEnum> {
- static void beginWriteVector(OutputStream& outputStream, const std::vector<commonapi::tests::DerivedTypeCollection::TestEnum>& vectorValue) {
- outputStream.beginWriteInt32EnumVector(vectorValue.size());
- }
- };
- template<>
- struct BasicTypeWriter<commonapi::tests::DerivedTypeCollection::TestEnumExtended2> {
- inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
- typeStream.writeInt32EnumType();
- }
- };
-
- template<>
- struct InputStreamVectorHelper<commonapi::tests::DerivedTypeCollection::TestEnumExtended2> {
- static void beginReadVector(InputStream& inputStream, const std::vector<commonapi::tests::DerivedTypeCollection::TestEnumExtended2>& vectorValue) {
- inputStream.beginReadInt32EnumVector();
- }
- };
-
- template <>
- struct OutputStreamVectorHelper<commonapi::tests::DerivedTypeCollection::TestEnumExtended2> {
- static void beginWriteVector(OutputStream& outputStream, const std::vector<commonapi::tests::DerivedTypeCollection::TestEnumExtended2>& vectorValue) {
- outputStream.beginWriteInt32EnumVector(vectorValue.size());
- }
- };
- template<>
- struct BasicTypeWriter<commonapi::tests::DerivedTypeCollection::TestEnumMissingValue> {
- inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
- typeStream.writeInt32EnumType();
- }
- };
-
- template<>
- struct InputStreamVectorHelper<commonapi::tests::DerivedTypeCollection::TestEnumMissingValue> {
- static void beginReadVector(InputStream& inputStream, const std::vector<commonapi::tests::DerivedTypeCollection::TestEnumMissingValue>& vectorValue) {
- inputStream.beginReadInt32EnumVector();
- }
- };
-
- template <>
- struct OutputStreamVectorHelper<commonapi::tests::DerivedTypeCollection::TestEnumMissingValue> {
- static void beginWriteVector(OutputStream& outputStream, const std::vector<commonapi::tests::DerivedTypeCollection::TestEnumMissingValue>& vectorValue) {
- outputStream.beginWriteInt32EnumVector(vectorValue.size());
- }
- };
- template<>
- struct BasicTypeWriter<commonapi::tests::DerivedTypeCollection::TestEnumExtended> {
- inline static void writeType (CommonAPI::TypeOutputStream& typeStream) {
- typeStream.writeInt32EnumType();
- }
- };
-
- template<>
- struct InputStreamVectorHelper<commonapi::tests::DerivedTypeCollection::TestEnumExtended> {
- static void beginReadVector(InputStream& inputStream, const std::vector<commonapi::tests::DerivedTypeCollection::TestEnumExtended>& vectorValue) {
- inputStream.beginReadInt32EnumVector();
- }
- };
-
- template <>
- struct OutputStreamVectorHelper<commonapi::tests::DerivedTypeCollection::TestEnumExtended> {
- static void beginWriteVector(OutputStream& outputStream, const std::vector<commonapi::tests::DerivedTypeCollection::TestEnumExtended>& vectorValue) {
- outputStream.beginWriteInt32EnumVector(vectorValue.size());
- }
- };
-
-}
-
-
-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 {
- return static_cast<int32_t>(testEnumExtended);
- }
- };
-}
-
-#endif // COMMONAPI_TESTS_Derived_Type_Collection_H_
diff --git a/src/test/commonapi/tests/DerivedTypeCollection.hpp b/src/test/commonapi/tests/DerivedTypeCollection.hpp
new file mode 100644
index 0000000..95d63c5
--- /dev/null
+++ b/src/test/commonapi/tests/DerivedTypeCollection.hpp
@@ -0,0 +1,354 @@
+/*
+* This file was generated by the CommonAPI Generators.
+* Used org.genivi.commonapi.core 3.0.1.v201504231326.
+* 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_Derived_Type_Collection_HPP_
+#define COMMONAPI_TESTS_Derived_Type_Collection_HPP_
+
+
+#include <commonapi/tests/PredefinedTypeCollection.hpp>
+
+#if !defined (COMMONAPI_INTERNAL_COMPILATION)
+#define COMMONAPI_INTERNAL_COMPILATION
+#endif
+
+#include <CommonAPI/Deployment.hpp>
+#include <CommonAPI/InputStream.hpp>
+#include <CommonAPI/OutputStream.hpp>
+#include <CommonAPI/Struct.hpp>
+#include <CommonAPI/Types.hpp>
+#include <cstdint>
+#include <string>
+#include <unordered_map>
+#include <vector>
+
+#undef COMMONAPI_INTERNAL_COMPILATION
+
+namespace commonapi {
+namespace tests {
+
+struct DerivedTypeCollection {
+ struct TestStruct : CommonAPI::Struct<commonapi::tests::PredefinedTypeCollection::TestString, uint16_t> {
+
+ TestStruct() {
+ }
+ TestStruct(const commonapi::tests::PredefinedTypeCollection::TestString &_testString, const uint16_t &_uintValue)
+ {
+ std::get<0>(values_) = _testString;
+ std::get<1>(values_) = _uintValue;
+ }
+ /**
+ * the name of the property
+ */
+ inline const commonapi::tests::PredefinedTypeCollection::TestString &getTestString() const { return std::get<0>(values_); }
+ inline void setTestString(const commonapi::tests::PredefinedTypeCollection::TestString &_value) { std::get<0>(values_) = _value; }
+ /**
+ * the actual value
+ */
+ inline const uint16_t &getUintValue() const { return std::get<1>(values_); }
+ inline void setUintValue(const uint16_t &_value) { std::get<1>(values_) = _value; }
+ bool operator==(const TestStruct &_other) const;
+ inline bool operator!=(const TestStruct &_other) const {
+ return !((*this) == _other);
+ }
+
+ };
+ typedef std::vector<TestStruct> TestArrayTestStruct;
+ typedef std::unordered_map<uint32_t, TestArrayTestStruct> TestMap;
+ /**
+ * Common errors.
+ */
+
+ struct TestEnum : CommonAPI::Enumeration<int32_t> {
+ TestEnum() = default;
+ TestEnum(const int32_t &_value)
+ : CommonAPI::Enumeration<int32_t>(_value) {}
+ static const int32_t E_UNKNOWN = 0;
+ static const int32_t E_OK = 1;
+ static const int32_t E_OUT_OF_RANGE = 2;
+ static const int32_t E_NOT_USED = 3;
+ };
+
+ struct TestEnumExtended : TestEnum {
+ TestEnumExtended() = default;
+ TestEnumExtended(const int32_t &_value)
+ : TestEnum(_value) {}
+ static const int32_t E_NEW = 4;
+ };
+
+ struct TestEnumExtended2 : TestEnumExtended {
+ TestEnumExtended2() = default;
+ TestEnumExtended2(const int32_t &_value)
+ : TestEnumExtended(_value) {}
+ static const int32_t E_NEW2 = 5;
+ };
+ struct TestStructExtended : CommonAPI::Struct<commonapi::tests::PredefinedTypeCollection::TestString, uint16_t, TestEnumExtended2> {
+
+ TestStructExtended() {
+ }
+ TestStructExtended(const commonapi::tests::PredefinedTypeCollection::TestString &_testString, const uint16_t &_uintValue, const TestEnumExtended2 &_testEnumExtended2)
+ {
+ std::get<0>(values_) = _testString;
+ std::get<1>(values_) = _uintValue;
+ std::get<2>(values_) = _testEnumExtended2;
+ }
+ /**
+ * the name of the property
+ */
+ inline const commonapi::tests::PredefinedTypeCollection::TestString &getTestString() const { return std::get<0>(values_); }
+ inline void setTestString(const commonapi::tests::PredefinedTypeCollection::TestString &_value) { std::get<0>(values_) = _value; }
+ /**
+ * the actual value
+ */
+ inline const uint16_t &getUintValue() const { return std::get<1>(values_); }
+ inline void setUintValue(const uint16_t &_value) { std::get<1>(values_) = _value; }
+ inline const TestEnumExtended2 &getTestEnumExtended2() const { return std::get<2>(values_); }
+ inline void setTestEnumExtended2(const TestEnumExtended2 &_value) { std::get<2>(values_) = _value; }
+ bool operator==(const TestStructExtended &_other) const;
+ inline bool operator!=(const TestStructExtended &_other) const {
+ return !((*this) == _other);
+ }
+
+ };
+ typedef std::unordered_map<TestEnum, std::string, CommonAPI::EnumHasher<TestEnum>> TestEnumMap;
+
+ struct TestEnumMissingValue : CommonAPI::Enumeration<int32_t> {
+ TestEnumMissingValue() = default;
+ TestEnumMissingValue(const int32_t &_value)
+ : CommonAPI::Enumeration<int32_t>(_value) {}
+ static const int32_t E1 = 0;
+ static const int32_t E2 = 1;
+ static const int32_t E3 = 2;
+ };
+ typedef std::vector<uint64_t> TestArrayUInt64;
+ static const CommonAPI::Serial TESTPOLYMORPHICSTRUCT_SERIAL = 0x8F51A326;
+ static const CommonAPI::Serial TESTEXTENDEDPOLYMORPHICSTRUCT_SERIAL = 0xA49310F2;
+
+ struct TestPolymorphicStruct : CommonAPI::PolymorphicStruct {
+ static std::shared_ptr<TestPolymorphicStruct> create(CommonAPI::Serial _serial);
+ const CommonAPI::Serial getSerial() const { return TESTPOLYMORPHICSTRUCT_SERIAL; }
+
+ TestPolymorphicStruct() {
+ }
+ TestPolymorphicStruct(const commonapi::tests::PredefinedTypeCollection::TestString &_testString, const uint16_t &_uintValue)
+ {
+ std::get<0>(values_) = _testString;
+ std::get<1>(values_) = _uintValue;
+ }
+ template<class _Input>
+ void readValue(CommonAPI::InputStream<_Input> &_input, const CommonAPI::EmptyDeployment *_depl) {
+ _input.template readValue<CommonAPI::EmptyDeployment>(std::get<0>(values_));
+ _input.template readValue<CommonAPI::EmptyDeployment>(std::get<1>(values_));
+ switch (getSerial()) {
+ case TESTEXTENDEDPOLYMORPHICSTRUCT_SERIAL:
+ static_cast<TestExtendedPolymorphicStruct *>(this)->template readValue<_Input>(_input, _depl);
+ break;
+ default:
+ break;
+ }
+ }
+
+ template<class _Input, class _Deployment>
+ void readValue(CommonAPI::InputStream<_Input> &_input, const _Deployment *_depl) {
+ _input.template readValue<>(std::get<0>(values_), std::get<0>(_depl->values_));
+ _input.template readValue<>(std::get<1>(values_), std::get<1>(_depl->values_));
+ switch (getSerial()) {
+ case TESTEXTENDEDPOLYMORPHICSTRUCT_SERIAL:
+ static_cast<TestExtendedPolymorphicStruct *>(this)->template readValue<>(_input, _depl);
+ break;
+ default:
+ break;
+ }
+ }
+
+ template<class _Output>
+ void writeType(CommonAPI::TypeOutputStream<_Output> &_output) {
+ _output.writeType(std::get<0>(values_));
+ _output.writeType(std::get<1>(values_));
+ switch (getSerial()) {
+ case TESTEXTENDEDPOLYMORPHICSTRUCT_SERIAL:
+ static_cast<TestExtendedPolymorphicStruct *>(this)->template writeType<_Output>(_output);
+ break;
+ default:
+ break;
+ }
+ }
+
+ template<class _Output>
+ void writeValue(CommonAPI::OutputStream<_Output> &_output, const CommonAPI::EmptyDeployment *_depl) {
+ _output.template writeValue<CommonAPI::EmptyDeployment>(std::get<0>(values_));
+ _output.template writeValue<CommonAPI::EmptyDeployment>(std::get<1>(values_));
+ switch (getSerial()) {
+ case TESTEXTENDEDPOLYMORPHICSTRUCT_SERIAL:
+ static_cast<TestExtendedPolymorphicStruct *>(this)->template writeValue<_Output>(_output, _depl);
+ break;
+ default:
+ break;
+ }
+ }
+
+ template<class _Output, class _Deployment>
+ void writeValue(CommonAPI::OutputStream<_Output> &_output, const _Deployment *_depl) {
+ _output.template writeValue<>(std::get<0>(values_), _depl, std::get<0>(_depl->values_));
+ _output.template writeValue<>(std::get<1>(values_), _depl, std::get<1>(_depl->values_));
+ switch (getSerial()) {
+ case TESTEXTENDEDPOLYMORPHICSTRUCT_SERIAL:
+ static_cast<TestExtendedPolymorphicStruct *>(this)->template writeValue<>(_output, _depl);
+ break;
+ default:
+ break;
+ }
+ }
+ /**
+ * the name of the property
+ */
+ inline const commonapi::tests::PredefinedTypeCollection::TestString &getTestString() const { return std::get<0>(values_); }
+ inline void setTestString(const commonapi::tests::PredefinedTypeCollection::TestString &_value) { std::get<0>(values_) = _value; }
+ /**
+ * the actual value
+ */
+ inline const uint16_t &getUintValue() const { return std::get<1>(values_); }
+ inline void setUintValue(const uint16_t &_value) { std::get<1>(values_) = _value; }
+
+ std::tuple<commonapi::tests::PredefinedTypeCollection::TestString, uint16_t> values_;
+ bool operator==(const TestPolymorphicStruct &_other) const;
+ inline bool operator!=(const TestPolymorphicStruct &_other) const {
+ return !((*this) == _other);
+ }
+
+ };
+ struct TestExtendedPolymorphicStruct : TestPolymorphicStruct {
+ const CommonAPI::Serial getSerial() const { return TESTEXTENDEDPOLYMORPHICSTRUCT_SERIAL; }
+
+ TestExtendedPolymorphicStruct() {
+ }
+ TestExtendedPolymorphicStruct(const commonapi::tests::PredefinedTypeCollection::TestString &_testString, const uint16_t &_uintValue, const uint32_t &_additionalValue)
+ : TestPolymorphicStruct(_testString, _uintValue)
+ {
+ std::get<0>(values_) = _additionalValue;
+ }
+ template<class _Input>
+ void readValue(CommonAPI::InputStream<_Input> &_input, const CommonAPI::EmptyDeployment *_depl) {
+ _input.template readValue<CommonAPI::EmptyDeployment>(std::get<0>(values_));
+ }
+
+ template<class _Input, class _Deployment>
+ void readValue(CommonAPI::InputStream<_Input> &_input, const _Deployment *_depl) {
+ _input.template readValue<>(std::get<0>(values_), std::get<2>(_depl->values_));
+ }
+
+ template<class _Output>
+ void writeType(CommonAPI::TypeOutputStream<_Output> &_output) {
+ _output.writeType(std::get<0>(values_));
+ }
+
+ template<class _Output>
+ void writeValue(CommonAPI::OutputStream<_Output> &_output, const CommonAPI::EmptyDeployment *_depl) {
+ _output.template writeValue<CommonAPI::EmptyDeployment>(std::get<0>(values_));
+ }
+
+ template<class _Output, class _Deployment>
+ void writeValue(CommonAPI::OutputStream<_Output> &_output, const _Deployment *_depl) {
+ _output.template writeValue<>(std::get<0>(values_), _depl, std::get<2>(_depl->values_));
+ }
+ inline const uint32_t &getAdditionalValue() const { return std::get<0>(values_); }
+ inline void setAdditionalValue(const uint32_t &_value) { std::get<0>(values_) = _value; }
+
+ std::tuple<uint32_t> values_;
+ bool operator==(const TestExtendedPolymorphicStruct &_other) const;
+ inline bool operator!=(const TestExtendedPolymorphicStruct &_other) const {
+ return !((*this) == _other);
+ }
+
+ };
+ typedef std::unordered_map<uint8_t, std::shared_ptr<TestPolymorphicStruct>> MapIntToPolymorphic;
+ struct StructWithPolymorphicMember : CommonAPI::Struct<uint32_t, std::shared_ptr<TestPolymorphicStruct>> {
+
+ StructWithPolymorphicMember() {
+ }
+ StructWithPolymorphicMember(const uint32_t &_numberValue, const std::shared_ptr<TestPolymorphicStruct> &_polymorphicMember)
+ {
+ std::get<0>(values_) = _numberValue;
+ std::get<1>(values_) = _polymorphicMember;
+ }
+ inline const uint32_t &getNumberValue() const { return std::get<0>(values_); }
+ inline void setNumberValue(const uint32_t &_value) { std::get<0>(values_) = _value; }
+ inline const std::shared_ptr<TestPolymorphicStruct> &getPolymorphicMember() const { return std::get<1>(values_); }
+ inline void setPolymorphicMember(const std::shared_ptr<TestPolymorphicStruct> &_value) { std::get<1>(values_) = _value; }
+ bool operator==(const StructWithPolymorphicMember &_other) const;
+ inline bool operator!=(const StructWithPolymorphicMember &_other) const {
+ return !((*this) == _other);
+ }
+
+ };
+ struct StructWithEnumKeyMap : CommonAPI::Struct<TestEnumMap> {
+
+ StructWithEnumKeyMap() {
+ }
+ StructWithEnumKeyMap(const TestEnumMap &_testMap)
+ {
+ std::get<0>(values_) = _testMap;
+ }
+ inline const TestEnumMap &getTestMap() const { return std::get<0>(values_); }
+ inline void setTestMap(const TestEnumMap &_value) { std::get<0>(values_) = _value; }
+ bool operator==(const StructWithEnumKeyMap &_other) const;
+ inline bool operator!=(const StructWithEnumKeyMap &_other) const {
+ return !((*this) == _other);
+ }
+
+ };
+
+
+
+static inline const char* getTypeCollectionName() {
+ static const char* typeCollectionName = "commonapi.tests.DerivedTypeCollection";
+ return typeCollectionName;
+}
+
+
+}; // struct DerivedTypeCollection
+
+} // namespace tests
+} // namespace commonapi
+
+namespace CommonAPI {
+}
+
+
+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 {
+ return static_cast<int32_t>(testEnumExtended);
+ }
+ };
+}
+
+#endif // COMMONAPI_TESTS_Derived_Type_Collection_HPP_
diff --git a/src/test/commonapi/tests/ExtendedInterface.h b/src/test/commonapi/tests/ExtendedInterface.h
deleted file mode 100644
index 4d99e5e..0000000
--- a/src/test/commonapi/tests/ExtendedInterface.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_H_
-#define COMMONAPI_TESTS_Extended_Interface_H_
-
-
-
-#include <commonapi/tests/TestInterface.h>
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <CommonAPI/types.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-
-class ExtendedInterface: public TestInterface {
- public:
- virtual ~ExtendedInterface() { }
-
- static inline const char* getInterfaceId();
- static inline CommonAPI::Version getInterfaceVersion();
-};
-
-const char* ExtendedInterface::getInterfaceId() {
- static const char* interfaceId = "commonapi.tests.ExtendedInterface";
- return interfaceId;
-}
-
-CommonAPI::Version ExtendedInterface::getInterfaceVersion() {
- return CommonAPI::Version(1, 0);
-}
-
-
-} // namespace tests
-} // namespace commonapi
-
-namespace CommonAPI {
-
-}
-
-
-namespace std {
- //hashes for types
-
- //hashes for error types
-}
-
-#endif // COMMONAPI_TESTS_Extended_Interface_H_
diff --git a/src/test/commonapi/tests/ExtendedInterfaceDBusProxy.cpp b/src/test/commonapi/tests/ExtendedInterfaceDBusProxy.cpp
deleted file mode 100644
index 8306c51..0000000
--- a/src/test/commonapi/tests/ExtendedInterfaceDBusProxy.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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 "ExtendedInterfaceDBusProxy.h"
-
-namespace commonapi {
-namespace tests {
-
-std::shared_ptr<CommonAPI::DBus::DBusProxy> createExtendedInterfaceDBusProxy(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection) {
- return std::make_shared<ExtendedInterfaceDBusProxy>(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection);
-}
-
-INITIALIZER(registerExtendedInterfaceDBusProxy) {
- CommonAPI::DBus::DBusFactory::registerProxyFactoryMethod(ExtendedInterface::getInterfaceId(),
- &createExtendedInterfaceDBusProxy);
-}
-
-ExtendedInterfaceDBusProxy::ExtendedInterfaceDBusProxy(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection):
- CommonAPI::DBus::DBusProxy(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyconnection)
- , TestInterfaceDBusProxy(
- factory,
- commonApiAddress,
- interfaceName,
- busName,
- objectPath,
- dbusProxyconnection)
- {
- }
-
-
-
-void ExtendedInterfaceDBusProxy::TestIntMethodExtended(const uint32_t& inInt, CommonAPI::CallStatus& callStatus) {
- CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint32_t>,
- CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
- *this,
- "TestIntMethodExtended",
- "u",
- inInt,
- callStatus
- );
-}
-std::future<CommonAPI::CallStatus> ExtendedInterfaceDBusProxy::TestIntMethodExtendedAsync(const uint32_t& inInt, TestIntMethodExtendedAsyncCallback callback) {
- return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint32_t>,
- CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
- *this,
- "TestIntMethodExtended",
- "u",
- inInt,
- std::move(callback));
-}
-
-
-
-void ExtendedInterfaceDBusProxy::getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const {
- ownVersionMajor = 1;
- ownVersionMinor = 0;
-}
-
-} // namespace tests
-} // namespace commonapi
diff --git a/src/test/commonapi/tests/ExtendedInterfaceDBusProxy.h b/src/test/commonapi/tests/ExtendedInterfaceDBusProxy.h
deleted file mode 100644
index 9e59f68..0000000
--- a/src/test/commonapi/tests/ExtendedInterfaceDBusProxy.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_H_
-#define COMMONAPI_TESTS_Extended_Interface_DBUS_PROXY_H_
-
-#include <commonapi/tests/ExtendedInterfaceProxyBase.h>
-#include <commonapi/tests/TestInterfaceDBusProxy.h>
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <CommonAPI/DBus/DBusFactory.h>
-#include <CommonAPI/DBus/DBusProxy.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-#include <string>
-
-namespace commonapi {
-namespace tests {
-
-class ExtendedInterfaceDBusProxy: virtual public ExtendedInterfaceProxyBase, virtual public TestInterfaceDBusProxy {
- public:
- ExtendedInterfaceDBusProxy(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection);
-
- virtual ~ExtendedInterfaceDBusProxy() { }
-
-
-
- virtual void TestIntMethodExtended(const uint32_t& inInt, CommonAPI::CallStatus& callStatus);
- virtual std::future<CommonAPI::CallStatus> TestIntMethodExtendedAsync(const uint32_t& inInt, TestIntMethodExtendedAsyncCallback callback);
-
-
- virtual void getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const;
-
- private:
-
-
-};
-
-
-
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_Extended_Interface_DBUS_PROXY_H_
diff --git a/src/test/commonapi/tests/ExtendedInterfaceDBusStubAdapter.cpp b/src/test/commonapi/tests/ExtendedInterfaceDBusStubAdapter.cpp
deleted file mode 100644
index bbfa2b8..0000000
--- a/src/test/commonapi/tests/ExtendedInterfaceDBusStubAdapter.cpp
+++ /dev/null
@@ -1,286 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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 "ExtendedInterfaceDBusStubAdapter.h"
-#include <commonapi/tests/ExtendedInterface.h>
-
-namespace commonapi {
-namespace tests {
-
-std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> createExtendedInterfaceDBusStubAdapter(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stubBase) {
- return std::make_shared<ExtendedInterfaceDBusStubAdapter>(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection, stubBase);
-}
-
-INITIALIZER(registerExtendedInterfaceDBusStubAdapter) {
- CommonAPI::DBus::DBusFactory::registerAdapterFactoryMethod(ExtendedInterface::getInterfaceId(),
- &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<
- ExtendedInterfaceStub,
- CommonAPI::Version
- > ExtendedInterfaceDBusStubAdapterInternal::getExtendedInterfaceInterfaceVersionStubDispatcher(&ExtendedInterfaceStub::getInterfaceVersion, "uu");
-
-
-#ifdef WIN32
-CommonAPI::DBus::DBusGetAttributeStubDispatcher<
- ExtendedInterfaceStub,
- uint32_t
- > ExtendedInterfaceDBusStubAdapterInternal::getTestPredefinedTypeAttributeAttributeStubDispatcher(&ExtendedInterfaceStub::getTestPredefinedTypeAttributeAttribute, "u");
-CommonAPI::DBus::DBusSetObservableAttributeStubDispatcher<
- ExtendedInterfaceStub,
- uint32_t
- > ExtendedInterfaceDBusStubAdapterInternal::setTestPredefinedTypeAttributeAttributeStubDispatcher(
- &ExtendedInterfaceStub::getTestPredefinedTypeAttributeAttribute,
- &ExtendedInterfaceStubRemoteEvent::onRemoteSetTestPredefinedTypeAttributeAttribute,
- &ExtendedInterfaceStubRemoteEvent::onRemoteTestPredefinedTypeAttributeAttributeChanged
- ,&ExtendedInterfaceStubAdapter::fireTestPredefinedTypeAttributeAttributeChanged
- ,"u"
- );
-CommonAPI::DBus::DBusGetAttributeStubDispatcher<
- ExtendedInterfaceStub,
- DerivedTypeCollection::TestStructExtended
- > ExtendedInterfaceDBusStubAdapterInternal::getTestDerivedStructAttributeAttributeStubDispatcher(&ExtendedInterfaceStub::getTestDerivedStructAttributeAttribute, "(sqi)");
-CommonAPI::DBus::DBusSetObservableAttributeStubDispatcher<
- ExtendedInterfaceStub,
- DerivedTypeCollection::TestStructExtended
- > ExtendedInterfaceDBusStubAdapterInternal::setTestDerivedStructAttributeAttributeStubDispatcher(
- &ExtendedInterfaceStub::getTestDerivedStructAttributeAttribute,
- &ExtendedInterfaceStubRemoteEvent::onRemoteSetTestDerivedStructAttributeAttribute,
- &ExtendedInterfaceStubRemoteEvent::onRemoteTestDerivedStructAttributeAttributeChanged
- ,&ExtendedInterfaceStubAdapter::fireTestDerivedStructAttributeAttributeChanged
- ,"(sqi)"
- );
-CommonAPI::DBus::DBusGetAttributeStubDispatcher<
- ExtendedInterfaceStub,
- DerivedTypeCollection::TestArrayUInt64
- > ExtendedInterfaceDBusStubAdapterInternal::getTestDerivedArrayAttributeAttributeStubDispatcher(&ExtendedInterfaceStub::getTestDerivedArrayAttributeAttribute, "at");
-CommonAPI::DBus::DBusSetObservableAttributeStubDispatcher<
- ExtendedInterfaceStub,
- DerivedTypeCollection::TestArrayUInt64
- > ExtendedInterfaceDBusStubAdapterInternal::setTestDerivedArrayAttributeAttributeStubDispatcher(
- &ExtendedInterfaceStub::getTestDerivedArrayAttributeAttribute,
- &ExtendedInterfaceStubRemoteEvent::onRemoteSetTestDerivedArrayAttributeAttribute,
- &ExtendedInterfaceStubRemoteEvent::onRemoteTestDerivedArrayAttributeAttributeChanged
- ,&ExtendedInterfaceStubAdapter::fireTestDerivedArrayAttributeAttributeChanged
- ,"at"
- );
-#endif
-
-CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- ExtendedInterfaceStub,
- std::tuple<uint32_t>,
- std::tuple<>
- > ExtendedInterfaceDBusStubAdapterInternal::testIntMethodExtendedStubDispatcher(&ExtendedInterfaceStub::TestIntMethodExtended, "");
-
-#ifdef WIN32
-CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- ExtendedInterfaceStub,
- std::tuple<>,
- std::tuple<>
- > ExtendedInterfaceDBusStubAdapterInternal::testEmptyMethodStubDispatcher(&ExtendedInterfaceStub::testEmptyMethod, "");
-CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- ExtendedInterfaceStub,
- std::tuple<uint32_t, std::string>,
- std::tuple<>
- > ExtendedInterfaceDBusStubAdapterInternal::testVoidPredefinedTypeMethodStubDispatcher(&ExtendedInterfaceStub::testVoidPredefinedTypeMethod, "");
-CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- ExtendedInterfaceStub,
- std::tuple<uint32_t, std::string>,
- std::tuple<uint32_t, std::string>
- > ExtendedInterfaceDBusStubAdapterInternal::testPredefinedTypeMethodStubDispatcher(&ExtendedInterfaceStub::testPredefinedTypeMethod, "us");
-CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- ExtendedInterfaceStub,
- std::tuple<DerivedTypeCollection::TestEnumExtended2, DerivedTypeCollection::TestMap>,
- std::tuple<>
- > ExtendedInterfaceDBusStubAdapterInternal::testVoidDerivedTypeMethodStubDispatcher(&ExtendedInterfaceStub::testVoidDerivedTypeMethod, "");
-CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- ExtendedInterfaceStub,
- std::tuple<DerivedTypeCollection::TestEnumExtended2, DerivedTypeCollection::TestMap>,
- std::tuple<DerivedTypeCollection::TestEnumExtended2, DerivedTypeCollection::TestMap>
- > ExtendedInterfaceDBusStubAdapterInternal::testDerivedTypeMethodStubDispatcher(&ExtendedInterfaceStub::testDerivedTypeMethod, "ia{ua(sq)}");
-CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- ExtendedInterfaceStub,
- std::tuple<std::vector<std::shared_ptr<DerivedTypeCollection::TestPolymorphicStruct>>>,
- std::tuple<>
- > ExtendedInterfaceDBusStubAdapterInternal::testArrayOfPolymorphicStructMethodStubDispatcher(&ExtendedInterfaceStub::TestArrayOfPolymorphicStructMethod, "");
-CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- ExtendedInterfaceStub,
- std::tuple<DerivedTypeCollection::MapIntToPolymorphic>,
- std::tuple<>
- > ExtendedInterfaceDBusStubAdapterInternal::testMapOfPolymorphicStructMethodStubDispatcher(&ExtendedInterfaceStub::TestMapOfPolymorphicStructMethod, "");
-CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- ExtendedInterfaceStub,
- std::tuple<DerivedTypeCollection::StructWithPolymorphicMember>,
- std::tuple<>
- > ExtendedInterfaceDBusStubAdapterInternal::testStructWithPolymorphicMemberMethodStubDispatcher(&ExtendedInterfaceStub::TestStructWithPolymorphicMemberMethod, "");
-CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- ExtendedInterfaceStub,
- std::tuple<DerivedTypeCollection::StructWithEnumKeyMap>,
- std::tuple<>
- > ExtendedInterfaceDBusStubAdapterInternal::testStructWithEnumKeyMapMemberStubDispatcher(&ExtendedInterfaceStub::TestStructWithEnumKeyMapMember, "");
-#endif
-
-
-
-#ifdef WIN32
-CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher<
- ExtendedInterfaceStub,
- ExtendedInterfaceStubAdapter,
- std::tuple<>,
- std::tuple<bool>
- > ExtendedInterfaceDBusStubAdapterInternal::subscribeTestSelectiveBroadcastSelectiveStubDispatcher(&ExtendedInterfaceStubAdapter::subscribeForTestSelectiveBroadcastSelective, "b");
-
-CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher<
- ExtendedInterfaceStub,
- ExtendedInterfaceStubAdapter,
- std::tuple<>,
- std::tuple<>
- > ExtendedInterfaceDBusStubAdapterInternal::unsubscribeTestSelectiveBroadcastSelectiveStubDispatcher(&ExtendedInterfaceStubAdapter::unsubscribeFromTestSelectiveBroadcastSelective, "");
-CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher<
- ExtendedInterfaceStub,
- ExtendedInterfaceStubAdapter,
- std::tuple<>,
- std::tuple<bool>
- > ExtendedInterfaceDBusStubAdapterInternal::subscribeTestBroadcastWithOutArgsSelectiveStubDispatcher(&ExtendedInterfaceStubAdapter::subscribeForTestBroadcastWithOutArgsSelective, "b");
-
-CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher<
- 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 std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& dbusInterfaceName,
- const std::string& dbusBusName,
- const std::string& dbusObjectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stub):
- CommonAPI::DBus::DBusStubAdapter(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- false),
- ExtendedInterfaceDBusStubAdapterHelper(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- std::dynamic_pointer_cast<ExtendedInterfaceStub>(stub),
- false),
- TestInterfaceDBusStubAdapterInternal(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- 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
-}
-
-const bool ExtendedInterfaceDBusStubAdapterInternal::hasFreedesktopProperties() {
- return false;
-}
-
-} // namespace tests
-} // namespace commonapi
diff --git a/src/test/commonapi/tests/ExtendedInterfaceDBusStubAdapter.h b/src/test/commonapi/tests/ExtendedInterfaceDBusStubAdapter.h
deleted file mode 100644
index 5c43471..0000000
--- a/src/test/commonapi/tests/ExtendedInterfaceDBusStubAdapter.h
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_H_
-#define COMMONAPI_TESTS_Extended_Interface_DBUS_STUB_ADAPTER_H_
-
-#include <commonapi/tests/ExtendedInterfaceStub.h>
-#include <commonapi/tests/TestInterfaceDBusStubAdapter.h>
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <CommonAPI/DBus/DBusStubAdapterHelper.h>
-#include <CommonAPI/DBus/DBusStubAdapter.h>
-#include <CommonAPI/DBus/DBusFactory.h>
-#include <CommonAPI/DBus/DBusServicePublisher.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-
-typedef CommonAPI::DBus::DBusStubAdapterHelper<ExtendedInterfaceStub> ExtendedInterfaceDBusStubAdapterHelper;
-
-class ExtendedInterfaceDBusStubAdapterInternal: public virtual ExtendedInterfaceStubAdapter, public ExtendedInterfaceDBusStubAdapterHelper, public TestInterfaceDBusStubAdapterInternal {
- public:
- ExtendedInterfaceDBusStubAdapterInternal(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& dbusInterfaceName,
- const std::string& dbusBusName,
- const std::string& dbusObjectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stub);
-
- ~ExtendedInterfaceDBusStubAdapterInternal();
-
- virtual const bool hasFreedesktopProperties();
-
-
-
-
- const ExtendedInterfaceDBusStubAdapterHelper::StubDispatcherTable& getStubDispatcherTable();
- const CommonAPI::DBus::StubAttributeTable& getStubAttributeTable();
-
- void deactivateManagedInstances();
-
- virtual const std::string getAddress() const {
- return DBusStubAdapter::getAddress();
- }
-
- virtual const std::string& getDomain() const {
- return DBusStubAdapter::getDomain();
- }
-
- virtual const std::string& getServiceId() const {
- return DBusStubAdapter::getServiceId();
- }
-
- virtual const std::string& getInstanceId() const {
- return DBusStubAdapter::getInstanceId();
- }
-
- 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<
- ExtendedInterfaceStub,
- CommonAPI::Version
- > getExtendedInterfaceInterfaceVersionStubDispatcher;
-
-
-#ifdef WIN32
-static CommonAPI::DBus::DBusGetAttributeStubDispatcher<
- ExtendedInterfaceStub,
- uint32_t
- > getTestPredefinedTypeAttributeAttributeStubDispatcher;
-static CommonAPI::DBus::DBusSetObservableAttributeStubDispatcher<
- ExtendedInterfaceStub,
- uint32_t
- > setTestPredefinedTypeAttributeAttributeStubDispatcher;
-static CommonAPI::DBus::DBusGetAttributeStubDispatcher<
- ExtendedInterfaceStub,
- DerivedTypeCollection::TestStructExtended
- > getTestDerivedStructAttributeAttributeStubDispatcher;
-static CommonAPI::DBus::DBusSetObservableAttributeStubDispatcher<
- ExtendedInterfaceStub,
- DerivedTypeCollection::TestStructExtended
- > setTestDerivedStructAttributeAttributeStubDispatcher;
-static CommonAPI::DBus::DBusGetAttributeStubDispatcher<
- ExtendedInterfaceStub,
- DerivedTypeCollection::TestArrayUInt64
- > getTestDerivedArrayAttributeAttributeStubDispatcher;
-static CommonAPI::DBus::DBusSetObservableAttributeStubDispatcher<
- ExtendedInterfaceStub,
- DerivedTypeCollection::TestArrayUInt64
- > setTestDerivedArrayAttributeAttributeStubDispatcher;
-#endif
-
-static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- ExtendedInterfaceStub,
- std::tuple<uint32_t>,
- std::tuple<>
- > testIntMethodExtendedStubDispatcher;
-
-#ifdef WIN32
-static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- ExtendedInterfaceStub,
- std::tuple<>,
- std::tuple<>
- > testEmptyMethodStubDispatcher;
-static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- ExtendedInterfaceStub,
- std::tuple<uint32_t, std::string>,
- std::tuple<>
- > testVoidPredefinedTypeMethodStubDispatcher;
-static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- ExtendedInterfaceStub,
- std::tuple<uint32_t, std::string>,
- std::tuple<uint32_t, std::string>
- > testPredefinedTypeMethodStubDispatcher;
-static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- ExtendedInterfaceStub,
- std::tuple<DerivedTypeCollection::TestEnumExtended2, DerivedTypeCollection::TestMap>,
- std::tuple<>
- > testVoidDerivedTypeMethodStubDispatcher;
-static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- ExtendedInterfaceStub,
- std::tuple<DerivedTypeCollection::TestEnumExtended2, DerivedTypeCollection::TestMap>,
- std::tuple<DerivedTypeCollection::TestEnumExtended2, DerivedTypeCollection::TestMap>
- > testDerivedTypeMethodStubDispatcher;
-static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- ExtendedInterfaceStub,
- std::tuple<std::vector<std::shared_ptr<DerivedTypeCollection::TestPolymorphicStruct>>>,
- std::tuple<>
- > testArrayOfPolymorphicStructMethodStubDispatcher;
-static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- ExtendedInterfaceStub,
- std::tuple<DerivedTypeCollection::MapIntToPolymorphic>,
- std::tuple<>
- > testMapOfPolymorphicStructMethodStubDispatcher;
-static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- ExtendedInterfaceStub,
- std::tuple<DerivedTypeCollection::StructWithPolymorphicMember>,
- std::tuple<>
- > testStructWithPolymorphicMemberMethodStubDispatcher;
-static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- ExtendedInterfaceStub,
- std::tuple<DerivedTypeCollection::StructWithEnumKeyMap>,
- std::tuple<>
- > testStructWithEnumKeyMapMemberStubDispatcher;
-#endif
-
-
-#ifdef WIN32
-static CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher<
- ExtendedInterfaceStub,
- ExtendedInterfaceStubAdapter,
- std::tuple<>,
- std::tuple<bool>
- > subscribeTestSelectiveBroadcastSelectiveStubDispatcher;
-
-static CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher<
- ExtendedInterfaceStub,
- ExtendedInterfaceStubAdapter,
- std::tuple<>,
- std::tuple<>
- > unsubscribeTestSelectiveBroadcastSelectiveStubDispatcher;
-static CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher<
- ExtendedInterfaceStub,
- ExtendedInterfaceStubAdapter,
- std::tuple<>,
- std::tuple<bool>
- > subscribeTestBroadcastWithOutArgsSelectiveStubDispatcher;
-
-static CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher<
- 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 std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& dbusInterfaceName,
- const std::string& dbusBusName,
- const std::string& dbusObjectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stub) :
- CommonAPI::DBus::DBusStubAdapter(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- false),
- ExtendedInterfaceDBusStubAdapterInternal(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- stub) { }
-};
-
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_Extended_Interface_DBUS_STUB_ADAPTER_H_
diff --git a/src/test/commonapi/tests/ExtendedInterfaceProxy.h b/src/test/commonapi/tests/ExtendedInterfaceProxy.h
deleted file mode 100644
index de00deb..0000000
--- a/src/test/commonapi/tests/ExtendedInterfaceProxy.h
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_PROXY_H_
-#define COMMONAPI_TESTS_Extended_Interface_PROXY_H_
-
-#include "ExtendedInterfaceProxyBase.h"
-
-#include "TestInterfaceProxy.h"
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-
-template <typename ... _AttributeExtensions>
-class ExtendedInterfaceProxy: virtual public ExtendedInterface, virtual public ExtendedInterfaceProxyBase
-, virtual public TestInterfaceProxy<_AttributeExtensions...>
-, public _AttributeExtensions... {
-public:
- ExtendedInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate);
- ~ExtendedInterfaceProxy();
-
- typedef ExtendedInterface InterfaceType;
-
- inline static const char* getInterfaceId() {
- return(ExtendedInterface::getInterfaceId());
- }
-
-
-
- /**
- * Calls TestIntMethodExtended with synchronous semantics.
- *
- * All const parameters are input parameters to this method.
- * The CallStatus will be filled when the method returns and indicate either
- * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
- * will be set.
- */
- virtual void TestIntMethodExtended(const uint32_t& inInt, CommonAPI::CallStatus& callStatus);
- /**
- * Calls TestIntMethodExtended with asynchronous semantics.
- *
- * The provided callback will be called when the reply to this call arrives or
- * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
- * or which type of error has occurred. In case of any error, ONLY the CallStatus
- * will have a defined value.
- * The std::future returned by this method will be fulfilled at arrival of the reply.
- * It will provide the same value for CallStatus as will be handed to the callback.
- */
- virtual std::future<CommonAPI::CallStatus> TestIntMethodExtendedAsync(const uint32_t& inInt, TestIntMethodExtendedAsyncCallback callback);
-
-
- /**
- * Returns the CommonAPI address of the remote partner this proxy communicates with.
- */
- virtual std::string getAddress() const;
-
- /**
- * Returns the domain of the remote partner this proxy communicates with.
- */
- virtual const std::string& getDomain() const;
-
- /**
- * Returns the service ID of the remote partner this proxy communicates with.
- */
- virtual const std::string& getServiceId() const;
-
- /**
- * Returns the instance ID of the remote partner this proxy communicates with.
- */
- virtual const std::string& getInstanceId() const;
-
- /**
- * Returns true if the remote partner for this proxy is currently known to be available.
- */
- virtual bool isAvailable() const;
-
- /**
- * Returns true if the remote partner for this proxy is available.
- */
- virtual bool isAvailableBlocking() const;
-
- /**
- * Returns the wrapper class that is used to (de-)register for notifications about
- * the availability of the remote partner of this proxy.
- */
- virtual CommonAPI::ProxyStatusEvent& getProxyStatusEvent();
-
- /**
- * Returns the wrapper class that is used to access version information of the remote
- * partner of this proxy.
- */
- virtual CommonAPI::InterfaceVersionAttribute& getInterfaceVersionAttribute();
-
- private:
- std::shared_ptr<ExtendedInterfaceProxyBase> delegate_;
-};
-
-#ifdef WIN32
- typedef ExtendedInterfaceProxy<CommonAPI::WINDummyAttributeExtension<CommonAPI::WINDummyAttribute>> ExtendedInterfaceProxyDefault;
-#else
- typedef ExtendedInterfaceProxy<> ExtendedInterfaceProxyDefault;
-#endif
-
-
-//
-// ExtendedInterfaceProxy Implementation
-//
-template <typename ... _AttributeExtensions>
-ExtendedInterfaceProxy<_AttributeExtensions...>::ExtendedInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate):
- TestInterfaceProxy<_AttributeExtensions...>(delegate),
- _AttributeExtensions(*(std::dynamic_pointer_cast<ExtendedInterfaceProxyBase>(delegate)))...,
- delegate_(std::dynamic_pointer_cast<ExtendedInterfaceProxyBase>(delegate)) {
-}
-
-template <typename ... _AttributeExtensions>
-ExtendedInterfaceProxy<_AttributeExtensions...>::~ExtendedInterfaceProxy() {
-}
-
-template <typename ... _AttributeExtensions>
-void ExtendedInterfaceProxy<_AttributeExtensions...>::TestIntMethodExtended(const uint32_t& inInt, CommonAPI::CallStatus& callStatus) {
- delegate_->TestIntMethodExtended(inInt, callStatus);
-}
-
-template <typename ... _AttributeExtensions>
-std::future<CommonAPI::CallStatus> ExtendedInterfaceProxy<_AttributeExtensions...>::TestIntMethodExtendedAsync(const uint32_t& inInt, TestIntMethodExtendedAsyncCallback callback) {
- return delegate_->TestIntMethodExtendedAsync(inInt, callback);
-}
-
-template <typename ... _AttributeExtensions>
-std::string ExtendedInterfaceProxy<_AttributeExtensions...>::getAddress() const {
- return delegate_->getAddress();
-}
-
-template <typename ... _AttributeExtensions>
-const std::string& ExtendedInterfaceProxy<_AttributeExtensions...>::getDomain() const {
- return delegate_->getDomain();
-}
-
-template <typename ... _AttributeExtensions>
-const std::string& ExtendedInterfaceProxy<_AttributeExtensions...>::getServiceId() const {
- return delegate_->getServiceId();
-}
-
-template <typename ... _AttributeExtensions>
-const std::string& ExtendedInterfaceProxy<_AttributeExtensions...>::getInstanceId() const {
- return delegate_->getInstanceId();
-}
-
-template <typename ... _AttributeExtensions>
-bool ExtendedInterfaceProxy<_AttributeExtensions...>::isAvailable() const {
- return delegate_->isAvailable();
-}
-
-template <typename ... _AttributeExtensions>
-bool ExtendedInterfaceProxy<_AttributeExtensions...>::isAvailableBlocking() const {
- return delegate_->isAvailableBlocking();
-}
-
-template <typename ... _AttributeExtensions>
-CommonAPI::ProxyStatusEvent& ExtendedInterfaceProxy<_AttributeExtensions...>::getProxyStatusEvent() {
- return delegate_->getProxyStatusEvent();
-}
-
-template <typename ... _AttributeExtensions>
-CommonAPI::InterfaceVersionAttribute& ExtendedInterfaceProxy<_AttributeExtensions...>::getInterfaceVersionAttribute() {
- return delegate_->getInterfaceVersionAttribute();
-}
-
-
-} // namespace tests
-} // namespace commonapi
-
-
-#endif // COMMONAPI_TESTS_Extended_Interface_PROXY_H_
diff --git a/src/test/commonapi/tests/ExtendedInterfaceProxyBase.h b/src/test/commonapi/tests/ExtendedInterfaceProxyBase.h
deleted file mode 100644
index b2d504a..0000000
--- a/src/test/commonapi/tests/ExtendedInterfaceProxyBase.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_PROXY_BASE_H_
-#define COMMONAPI_TESTS_Extended_Interface_PROXY_BASE_H_
-
-#include "ExtendedInterface.h"
-#include "TestInterfaceProxyBase.h"
-
-
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <vector>
-
-#include <CommonAPI/Proxy.h>
-#include <functional>
-#include <future>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-
-class ExtendedInterfaceProxyBase: virtual public TestInterfaceProxyBase {
- public:
-
- typedef std::function<void(const CommonAPI::CallStatus&)> TestIntMethodExtendedAsyncCallback;
-
-
-
- virtual void TestIntMethodExtended(const uint32_t& inInt, CommonAPI::CallStatus& callStatus) = 0;
- virtual std::future<CommonAPI::CallStatus> TestIntMethodExtendedAsync(const uint32_t& inInt, TestIntMethodExtendedAsyncCallback callback) = 0;
-};
-
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_Extended_Interface_PROXY_BASE_H_
diff --git a/src/test/commonapi/tests/ExtendedInterfaceStub.h b/src/test/commonapi/tests/ExtendedInterfaceStub.h
deleted file mode 100644
index 7e253ac..0000000
--- a/src/test/commonapi/tests/ExtendedInterfaceStub.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_STUB_H_
-#define COMMONAPI_TESTS_Extended_Interface_STUB_H_
-
-
-
-#include <commonapi/tests/TestInterfaceStub.h>
-
-#include "ExtendedInterface.h"
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <vector>
-
-#include <CommonAPI/Stub.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-
-/**
- * Receives messages from remote and handles all dispatching of deserialized calls
- * to a stub for the service ExtendedInterface. Also provides means to send broadcasts
- * and attribute-changed-notifications of observable attributes as defined by this service.
- * An application developer should not need to bother with this class.
- */
-class ExtendedInterfaceStubAdapter: virtual public CommonAPI::StubAdapter, public ExtendedInterface, public virtual TestInterfaceStubAdapter {
- public:
-
-
-
- virtual void deactivateManagedInstances() = 0;
-protected:
- /**
- * Defines properties for storing the ClientIds of clients / proxies that have
- * subscribed to the selective broadcasts
- */
-};
-
-
-/**
- * Defines the necessary callbacks to handle remote set events related to the attributes
- * defined in the IDL description for ExtendedInterface.
- * For each attribute two callbacks are defined:
- * - a verification callback that allows to verify the requested value and to prevent setting
- * e.g. an invalid value ("onRemoteSet<AttributeName>").
- * - an action callback to do local work after the attribute value has been changed
- * ("onRemote<AttributeName>Changed").
- *
- * This class and the one below are the ones an application developer needs to have
- * a look at if he wants to implement a service.
- */
-class ExtendedInterfaceStubRemoteEvent: public virtual TestInterfaceStubRemoteEvent {
- public:
- virtual ~ExtendedInterfaceStubRemoteEvent() { }
-
-};
-
-
-/**
- * Defines the interface that must be implemented by any class that should provide
- * the service ExtendedInterface to remote clients.
- * This class and the one above are the ones an application developer needs to have
- * a look at if he wants to implement a service.
- */
-class ExtendedInterfaceStub: public virtual CommonAPI::Stub<ExtendedInterfaceStubAdapter, ExtendedInterfaceStubRemoteEvent>, public virtual TestInterfaceStub {
-public:
- virtual ~ExtendedInterfaceStub() { }
- virtual const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId) = 0;
-
-
- /// This is the method that will be called on remote calls on the method TestIntMethodExtended.
- virtual void TestIntMethodExtended(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t inInt) = 0;
-
- using CommonAPI::Stub<ExtendedInterfaceStubAdapter, ExtendedInterfaceStubRemoteEvent>::initStubAdapter;
- typedef CommonAPI::Stub<ExtendedInterfaceStubAdapter, ExtendedInterfaceStubRemoteEvent>::StubAdapterType StubAdapterType;
- typedef CommonAPI::Stub<ExtendedInterfaceStubAdapter, ExtendedInterfaceStubRemoteEvent>::RemoteEventHandlerType RemoteEventHandlerType;
- typedef ExtendedInterfaceStubRemoteEvent RemoteEventType;
- typedef ExtendedInterface StubInterface;
-};
-
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_Extended_Interface_STUB_H_
diff --git a/src/test/commonapi/tests/ExtendedInterfaceStubDefault.cpp b/src/test/commonapi/tests/ExtendedInterfaceStubDefault.cpp
deleted file mode 100644
index 468a5e7..0000000
--- a/src/test/commonapi/tests/ExtendedInterfaceStubDefault.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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 <commonapi/tests/ExtendedInterfaceStubDefault.h>
-
-namespace commonapi {
-namespace tests {
-
-ExtendedInterfaceStubDefault::ExtendedInterfaceStubDefault():
- remoteEventHandler_(this),
- interfaceVersion_(ExtendedInterface::getInterfaceVersion()) {
-}
-
-const CommonAPI::Version& ExtendedInterfaceStubDefault::getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId) {
- return interfaceVersion_;
-}
-
-ExtendedInterfaceStubRemoteEvent* ExtendedInterfaceStubDefault::initStubAdapter(const std::shared_ptr<ExtendedInterfaceStubAdapter>& stubAdapter) {
- TestInterfaceStubDefault::initStubAdapter(stubAdapter);
- CommonAPI::Stub<ExtendedInterfaceStubAdapter, ExtendedInterfaceStubRemoteEvent>::stubAdapter_ = stubAdapter;
- return &remoteEventHandler_;
-}
-
-
-void ExtendedInterfaceStubDefault::TestIntMethodExtended(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t inInt) {
- // Call old style methods in default
- TestIntMethodExtended(inInt);
-}
-void ExtendedInterfaceStubDefault::TestIntMethodExtended(uint32_t inInt) {
- // No operation in default
-}
-
-
-
-
-ExtendedInterfaceStubDefault::RemoteEventHandler::RemoteEventHandler(ExtendedInterfaceStubDefault* defaultStub):
- TestInterfaceStubDefault::RemoteEventHandler(defaultStub),
- defaultStub_(defaultStub) {
-}
-
-} // namespace tests
-} // namespace commonapi
diff --git a/src/test/commonapi/tests/ExtendedInterfaceStubDefault.h b/src/test/commonapi/tests/ExtendedInterfaceStubDefault.h
deleted file mode 100644
index 7117532..0000000
--- a/src/test/commonapi/tests/ExtendedInterfaceStubDefault.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_STUB_DEFAULT_H_
-#define COMMONAPI_TESTS_Extended_Interface_STUB_DEFAULT_H_
-
-#include <commonapi/tests/TestInterfaceStubDefault.h>
-
-#include <commonapi/tests/ExtendedInterfaceStub.h>
-#include <sstream>
-
-namespace commonapi {
-namespace tests {
-
-/**
- * Provides a default implementation for ExtendedInterfaceStubRemoteEvent and
- * ExtendedInterfaceStub. Method callbacks have an empty implementation,
- * remote set calls on attributes will always change the value of the attribute
- * to the one received.
- *
- * Override this stub if you only want to provide a subset of the functionality
- * that would be defined for this service, and/or if you do not need any non-default
- * behaviour.
- */
-class ExtendedInterfaceStubDefault : public virtual ExtendedInterfaceStub, public virtual TestInterfaceStubDefault {
-public:
- ExtendedInterfaceStubDefault();
-
- ExtendedInterfaceStubRemoteEvent* initStubAdapter(const std::shared_ptr<ExtendedInterfaceStubAdapter>& stubAdapter);
-
- const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId);
-
-
- virtual void TestIntMethodExtended(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t inInt);
- virtual void TestIntMethodExtended(uint32_t inInt);
-
-
-
-
-protected:
- class RemoteEventHandler: public virtual ExtendedInterfaceStubRemoteEvent, public virtual TestInterfaceStubDefault::RemoteEventHandler {
- public:
- RemoteEventHandler(ExtendedInterfaceStubDefault* defaultStub);
-
-
- private:
- ExtendedInterfaceStubDefault* defaultStub_;
- };
-private:
- ExtendedInterfaceStubDefault::RemoteEventHandler remoteEventHandler_;
-
-
- CommonAPI::Version interfaceVersion_;
-};
-
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_Extended_Interface_STUB_DEFAULT_H_
diff --git a/src/test/commonapi/tests/PredefinedTypeCollection.h b/src/test/commonapi/tests/PredefinedTypeCollection.hpp
index 7ccf60d..4abfb2d 100644
--- a/src/test/commonapi/tests/PredefinedTypeCollection.h
+++ b/src/test/commonapi/tests/PredefinedTypeCollection.hpp
@@ -1,14 +1,14 @@
/*
* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
+* Used org.genivi.commonapi.core 3.0.1.v201504231326.
+* 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_Predefined_Type_Collection_H_
-#define COMMONAPI_TESTS_Predefined_Type_Collection_H_
+#ifndef COMMONAPI_TESTS_Predefined_Type_Collection_HPP_
+#define COMMONAPI_TESTS_Predefined_Type_Collection_HPP_
@@ -16,8 +16,8 @@
#define COMMONAPI_INTERNAL_COMPILATION
#endif
-#include <CommonAPI/ByteBuffer.h>
-#include <CommonAPI/types.h>
+#include <CommonAPI/ByteBuffer.hpp>
+#include <CommonAPI/Types.hpp>
#include <cstdint>
#include <string>
@@ -26,7 +26,7 @@
namespace commonapi {
namespace tests {
-namespace PredefinedTypeCollection {
+struct PredefinedTypeCollection {
typedef uint8_t TestUInt8;
typedef uint16_t TestUInt16;
typedef uint32_t TestUInt32;
@@ -49,18 +49,16 @@ static inline const char* getTypeCollectionName() {
}
-} // namespace PredefinedTypeCollection
+}; // struct PredefinedTypeCollection
} // namespace tests
} // namespace commonapi
namespace CommonAPI {
-
-
}
namespace std {
}
-#endif // COMMONAPI_TESTS_Predefined_Type_Collection_H_
+#endif // COMMONAPI_TESTS_Predefined_Type_Collection_HPP_
diff --git a/src/test/commonapi/tests/TestFreedesktopDerivedInterface.h b/src/test/commonapi/tests/TestFreedesktopDerivedInterface.h
deleted file mode 100644
index ea40d73..0000000
--- a/src/test/commonapi/tests/TestFreedesktopDerivedInterface.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_H_
-#define COMMONAPI_TESTS_Test_Freedesktop_Derived_Interface_H_
-
-
-
-#include <commonapi/tests/TestFreedesktopInterface.h>
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <CommonAPI/types.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-
-class TestFreedesktopDerivedInterface: public TestFreedesktopInterface {
- public:
- virtual ~TestFreedesktopDerivedInterface() { }
-
- static inline const char* getInterfaceId();
- static inline CommonAPI::Version getInterfaceVersion();
-};
-
-const char* TestFreedesktopDerivedInterface::getInterfaceId() {
- static const char* interfaceId = "commonapi.tests.TestFreedesktopDerivedInterface";
- return interfaceId;
-}
-
-CommonAPI::Version TestFreedesktopDerivedInterface::getInterfaceVersion() {
- return CommonAPI::Version(1, 0);
-}
-
-
-} // namespace tests
-} // namespace commonapi
-
-namespace CommonAPI {
-
-}
-
-
-namespace std {
- //hashes for types
-
- //hashes for error types
-}
-
-#endif // COMMONAPI_TESTS_Test_Freedesktop_Derived_Interface_H_
diff --git a/src/test/commonapi/tests/TestFreedesktopDerivedInterfaceDBusProxy.cpp b/src/test/commonapi/tests/TestFreedesktopDerivedInterfaceDBusProxy.cpp
deleted file mode 100644
index d8b2602..0000000
--- a/src/test/commonapi/tests/TestFreedesktopDerivedInterfaceDBusProxy.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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 "TestFreedesktopDerivedInterfaceDBusProxy.h"
-
-namespace commonapi {
-namespace tests {
-
-std::shared_ptr<CommonAPI::DBus::DBusProxy> createTestFreedesktopDerivedInterfaceDBusProxy(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection) {
- return std::make_shared<TestFreedesktopDerivedInterfaceDBusProxy>(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection);
-}
-
-INITIALIZER(registerTestFreedesktopDerivedInterfaceDBusProxy) {
- CommonAPI::DBus::DBusFactory::registerProxyFactoryMethod(TestFreedesktopDerivedInterface::getInterfaceId(),
- &createTestFreedesktopDerivedInterfaceDBusProxy);
-}
-
-TestFreedesktopDerivedInterfaceDBusProxy::TestFreedesktopDerivedInterfaceDBusProxy(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection):
- CommonAPI::DBus::DBusProxy(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyconnection)
- , TestFreedesktopInterfaceDBusProxy(
- factory,
- commonApiAddress,
- interfaceName,
- busName,
- objectPath,
- dbusProxyconnection)
-,testAttributedFromDerivedInterface_(*this, interfaceName.c_str(), "TestAttributedFromDerivedInterface")
- {
- }
-
-TestFreedesktopDerivedInterfaceDBusProxy::TestAttributedFromDerivedInterfaceAttribute& TestFreedesktopDerivedInterfaceDBusProxy::getTestAttributedFromDerivedInterfaceAttribute() {
- return testAttributedFromDerivedInterface_;
-}
-
-
-
-
-
-void TestFreedesktopDerivedInterfaceDBusProxy::getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const {
- ownVersionMajor = 1;
- ownVersionMinor = 0;
-}
-
-} // namespace tests
-} // namespace commonapi
diff --git a/src/test/commonapi/tests/TestFreedesktopDerivedInterfaceDBusProxy.h b/src/test/commonapi/tests/TestFreedesktopDerivedInterfaceDBusProxy.h
deleted file mode 100644
index 260e3ce..0000000
--- a/src/test/commonapi/tests/TestFreedesktopDerivedInterfaceDBusProxy.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_H_
-#define COMMONAPI_TESTS_Test_Freedesktop_Derived_Interface_DBUS_PROXY_H_
-
-#include <commonapi/tests/TestFreedesktopDerivedInterfaceProxyBase.h>
-#include <commonapi/tests/TestFreedesktopInterfaceDBusProxy.h>
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <CommonAPI/DBus/DBusFactory.h>
-#include <CommonAPI/DBus/DBusProxy.h>
-#include <CommonAPI/DBus/DBusAttribute.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-#include <string>
-
-namespace commonapi {
-namespace tests {
-
-class TestFreedesktopDerivedInterfaceDBusProxy: virtual public TestFreedesktopDerivedInterfaceProxyBase, virtual public TestFreedesktopInterfaceDBusProxy {
- public:
- TestFreedesktopDerivedInterfaceDBusProxy(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection);
-
- 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
-
-#endif // COMMONAPI_TESTS_Test_Freedesktop_Derived_Interface_DBUS_PROXY_H_
diff --git a/src/test/commonapi/tests/TestFreedesktopDerivedInterfaceDBusStubAdapter.cpp b/src/test/commonapi/tests/TestFreedesktopDerivedInterfaceDBusStubAdapter.cpp
deleted file mode 100644
index 71ac6fe..0000000
--- a/src/test/commonapi/tests/TestFreedesktopDerivedInterfaceDBusStubAdapter.cpp
+++ /dev/null
@@ -1,245 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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 "TestFreedesktopDerivedInterfaceDBusStubAdapter.h"
-#include <commonapi/tests/TestFreedesktopDerivedInterface.h>
-
-namespace commonapi {
-namespace tests {
-
-std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> createTestFreedesktopDerivedInterfaceDBusStubAdapter(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stubBase) {
- return std::make_shared<TestFreedesktopDerivedInterfaceDBusStubAdapter>(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection, stubBase);
-}
-
-INITIALIZER(registerTestFreedesktopDerivedInterfaceDBusStubAdapter) {
- CommonAPI::DBus::DBusFactory::registerAdapterFactoryMethod(TestFreedesktopDerivedInterface::getInterfaceId(),
- &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<
- TestFreedesktopDerivedInterfaceStub,
- CommonAPI::Version
- > TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::getTestFreedesktopDerivedInterfaceInterfaceVersionStubDispatcher(&TestFreedesktopDerivedInterfaceStub::getInterfaceVersion, "uu");
-
-CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher<
- TestFreedesktopDerivedInterfaceStub,
- uint32_t
- > TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::getTestAttributedFromDerivedInterfaceAttributeStubDispatcher(&TestFreedesktopDerivedInterfaceStub::getTestAttributedFromDerivedInterfaceAttribute);
-CommonAPI::DBus::DBusSetFreedesktopObservableAttributeStubDispatcher<
- TestFreedesktopDerivedInterfaceStub,
- uint32_t
- > TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::setTestAttributedFromDerivedInterfaceAttributeStubDispatcher(
- &TestFreedesktopDerivedInterfaceStub::getTestAttributedFromDerivedInterfaceAttribute,
- &TestFreedesktopDerivedInterfaceStubRemoteEvent::onRemoteSetTestAttributedFromDerivedInterfaceAttribute,
- &TestFreedesktopDerivedInterfaceStubRemoteEvent::onRemoteTestAttributedFromDerivedInterfaceAttributeChanged
- ,&TestFreedesktopDerivedInterfaceStubAdapter::fireTestAttributedFromDerivedInterfaceAttributeChanged
- );
-
-#ifdef WIN32
-CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher<
- TestFreedesktopDerivedInterfaceStub,
- uint32_t
- > TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::getTestPredefinedTypeAttributeAttributeStubDispatcher(&TestFreedesktopDerivedInterfaceStub::getTestPredefinedTypeAttributeAttribute);
-CommonAPI::DBus::DBusSetFreedesktopObservableAttributeStubDispatcher<
- TestFreedesktopDerivedInterfaceStub,
- uint32_t
- > TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::setTestPredefinedTypeAttributeAttributeStubDispatcher(
- &TestFreedesktopDerivedInterfaceStub::getTestPredefinedTypeAttributeAttribute,
- &TestFreedesktopDerivedInterfaceStubRemoteEvent::onRemoteSetTestPredefinedTypeAttributeAttribute,
- &TestFreedesktopDerivedInterfaceStubRemoteEvent::onRemoteTestPredefinedTypeAttributeAttributeChanged
- ,&TestFreedesktopDerivedInterfaceStubAdapter::fireTestPredefinedTypeAttributeAttributeChanged
- );
-CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher<
- TestFreedesktopDerivedInterfaceStub,
- uint32_t
- > TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::getTestReadonlyAttributeAttributeStubDispatcher(&TestFreedesktopDerivedInterfaceStub::getTestReadonlyAttributeAttribute);
-CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher<
- TestFreedesktopDerivedInterfaceStub,
- DerivedTypeCollection::TestStructExtended
- > TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::getTestDerivedStructAttributeAttributeStubDispatcher(&TestFreedesktopDerivedInterfaceStub::getTestDerivedStructAttributeAttribute);
-CommonAPI::DBus::DBusSetFreedesktopObservableAttributeStubDispatcher<
- TestFreedesktopDerivedInterfaceStub,
- DerivedTypeCollection::TestStructExtended
- > TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::setTestDerivedStructAttributeAttributeStubDispatcher(
- &TestFreedesktopDerivedInterfaceStub::getTestDerivedStructAttributeAttribute,
- &TestFreedesktopDerivedInterfaceStubRemoteEvent::onRemoteSetTestDerivedStructAttributeAttribute,
- &TestFreedesktopDerivedInterfaceStubRemoteEvent::onRemoteTestDerivedStructAttributeAttributeChanged
- ,&TestFreedesktopDerivedInterfaceStubAdapter::fireTestDerivedStructAttributeAttributeChanged
- );
-CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher<
- TestFreedesktopDerivedInterfaceStub,
- DerivedTypeCollection::TestArrayUInt64
- > TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::getTestDerivedArrayAttributeAttributeStubDispatcher(&TestFreedesktopDerivedInterfaceStub::getTestDerivedArrayAttributeAttribute);
-CommonAPI::DBus::DBusSetFreedesktopObservableAttributeStubDispatcher<
- TestFreedesktopDerivedInterfaceStub,
- DerivedTypeCollection::TestArrayUInt64
- > TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::setTestDerivedArrayAttributeAttributeStubDispatcher(
- &TestFreedesktopDerivedInterfaceStub::getTestDerivedArrayAttributeAttribute,
- &TestFreedesktopDerivedInterfaceStubRemoteEvent::onRemoteSetTestDerivedArrayAttributeAttribute,
- &TestFreedesktopDerivedInterfaceStubRemoteEvent::onRemoteTestDerivedArrayAttributeAttributeChanged
- ,&TestFreedesktopDerivedInterfaceStubAdapter::fireTestDerivedArrayAttributeAttributeChanged
- );
-#endif
-
-
-#ifdef WIN32
-#endif
-
-void TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::fireTestAttributedFromDerivedInterfaceAttributeChanged(const uint32_t& value) {
- CommonAPI::DBus::DBusStubFreedesktopPropertiesSignalHelper<CommonAPI::DBus::DBusSerializableArguments<uint32_t>>
- ::sendPropertiesChangedSignal(
- *this,
- "TestAttributedFromDerivedInterface",
- value
- );
-}
-
-
-#ifdef WIN32
-#endif
-
-const TestFreedesktopDerivedInterfaceDBusStubAdapterHelper::StubDispatcherTable& TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::getStubDispatcherTable() {
- return stubDispatcherTable_;
-}
-
-const CommonAPI::DBus::StubAttributeTable& TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::getStubAttributeTable() {
- return stubAttributeTable_;
-}
-
-TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::TestFreedesktopDerivedInterfaceDBusStubAdapterInternal(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& dbusInterfaceName,
- const std::string& dbusBusName,
- const std::string& dbusObjectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stub):
- CommonAPI::DBus::DBusStubAdapter(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- false),
- TestFreedesktopDerivedInterfaceDBusStubAdapterHelper(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- std::dynamic_pointer_cast<TestFreedesktopDerivedInterfaceStub>(stub),
- false),
- TestFreedesktopInterfaceDBusStubAdapterInternal(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- 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
-}
-
-const bool TestFreedesktopDerivedInterfaceDBusStubAdapterInternal::hasFreedesktopProperties() {
- return true;
-}
-
-} // namespace tests
-} // namespace commonapi
diff --git a/src/test/commonapi/tests/TestFreedesktopDerivedInterfaceDBusStubAdapter.h b/src/test/commonapi/tests/TestFreedesktopDerivedInterfaceDBusStubAdapter.h
deleted file mode 100644
index c22afff..0000000
--- a/src/test/commonapi/tests/TestFreedesktopDerivedInterfaceDBusStubAdapter.h
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_H_
-#define COMMONAPI_TESTS_Test_Freedesktop_Derived_Interface_DBUS_STUB_ADAPTER_H_
-
-#include <commonapi/tests/TestFreedesktopDerivedInterfaceStub.h>
-#include <commonapi/tests/TestFreedesktopInterfaceDBusStubAdapter.h>
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <CommonAPI/DBus/DBusStubAdapterHelper.h>
-#include <CommonAPI/DBus/DBusStubAdapter.h>
-#include <CommonAPI/DBus/DBusFactory.h>
-#include <CommonAPI/DBus/DBusServicePublisher.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-
-typedef CommonAPI::DBus::DBusStubAdapterHelper<TestFreedesktopDerivedInterfaceStub> TestFreedesktopDerivedInterfaceDBusStubAdapterHelper;
-
-class TestFreedesktopDerivedInterfaceDBusStubAdapterInternal: public virtual TestFreedesktopDerivedInterfaceStubAdapter, public TestFreedesktopDerivedInterfaceDBusStubAdapterHelper, public TestFreedesktopInterfaceDBusStubAdapterInternal {
- public:
- TestFreedesktopDerivedInterfaceDBusStubAdapterInternal(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& dbusInterfaceName,
- const std::string& dbusBusName,
- const std::string& dbusObjectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stub);
-
- ~TestFreedesktopDerivedInterfaceDBusStubAdapterInternal();
-
- virtual const bool hasFreedesktopProperties();
-
- void fireTestAttributedFromDerivedInterfaceAttributeChanged(const uint32_t& value);
-
-
-
- const TestFreedesktopDerivedInterfaceDBusStubAdapterHelper::StubDispatcherTable& getStubDispatcherTable();
- const CommonAPI::DBus::StubAttributeTable& getStubAttributeTable();
-
- void deactivateManagedInstances();
-
- virtual const std::string getAddress() const {
- return DBusStubAdapter::getAddress();
- }
-
- virtual const std::string& getDomain() const {
- return DBusStubAdapter::getDomain();
- }
-
- virtual const std::string& getServiceId() const {
- return DBusStubAdapter::getServiceId();
- }
-
- virtual const std::string& getInstanceId() const {
- return DBusStubAdapter::getInstanceId();
- }
-
- 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<
- TestFreedesktopDerivedInterfaceStub,
- CommonAPI::Version
- > getTestFreedesktopDerivedInterfaceInterfaceVersionStubDispatcher;
-
-static CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher<
- TestFreedesktopDerivedInterfaceStub,
- uint32_t
- > getTestAttributedFromDerivedInterfaceAttributeStubDispatcher;
-static CommonAPI::DBus::DBusSetFreedesktopObservableAttributeStubDispatcher<
- TestFreedesktopDerivedInterfaceStub,
- uint32_t
- > setTestAttributedFromDerivedInterfaceAttributeStubDispatcher;
-
-#ifdef WIN32
-static CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher<
- TestFreedesktopDerivedInterfaceStub,
- uint32_t
- > getTestPredefinedTypeAttributeAttributeStubDispatcher;
-static CommonAPI::DBus::DBusSetFreedesktopObservableAttributeStubDispatcher<
- TestFreedesktopDerivedInterfaceStub,
- uint32_t
- > setTestPredefinedTypeAttributeAttributeStubDispatcher;
-static CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher<
- TestFreedesktopDerivedInterfaceStub,
- uint32_t
- > getTestReadonlyAttributeAttributeStubDispatcher;
-static CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher<
- TestFreedesktopDerivedInterfaceStub,
- DerivedTypeCollection::TestStructExtended
- > getTestDerivedStructAttributeAttributeStubDispatcher;
-static CommonAPI::DBus::DBusSetFreedesktopObservableAttributeStubDispatcher<
- TestFreedesktopDerivedInterfaceStub,
- DerivedTypeCollection::TestStructExtended
- > setTestDerivedStructAttributeAttributeStubDispatcher;
-static CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher<
- TestFreedesktopDerivedInterfaceStub,
- DerivedTypeCollection::TestArrayUInt64
- > getTestDerivedArrayAttributeAttributeStubDispatcher;
-static CommonAPI::DBus::DBusSetFreedesktopObservableAttributeStubDispatcher<
- TestFreedesktopDerivedInterfaceStub,
- DerivedTypeCollection::TestArrayUInt64
- > 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 std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& dbusInterfaceName,
- const std::string& dbusBusName,
- const std::string& dbusObjectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stub) :
- CommonAPI::DBus::DBusStubAdapter(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- false),
- TestFreedesktopDerivedInterfaceDBusStubAdapterInternal(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- stub) { }
-};
-
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_Test_Freedesktop_Derived_Interface_DBUS_STUB_ADAPTER_H_
diff --git a/src/test/commonapi/tests/TestFreedesktopDerivedInterfaceProxy.h b/src/test/commonapi/tests/TestFreedesktopDerivedInterfaceProxy.h
deleted file mode 100644
index c449582..0000000
--- a/src/test/commonapi/tests/TestFreedesktopDerivedInterfaceProxy.h
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_PROXY_H_
-#define COMMONAPI_TESTS_Test_Freedesktop_Derived_Interface_PROXY_H_
-
-#include "TestFreedesktopDerivedInterfaceProxyBase.h"
-
-#include "TestFreedesktopInterfaceProxy.h"
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <CommonAPI/AttributeExtension.h>
-#include <CommonAPI/Factory.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-
-template <typename ... _AttributeExtensions>
-class TestFreedesktopDerivedInterfaceProxy: virtual public TestFreedesktopDerivedInterface, virtual public TestFreedesktopDerivedInterfaceProxyBase
-, virtual public TestFreedesktopInterfaceProxy<_AttributeExtensions...>
-, public _AttributeExtensions... {
-public:
- TestFreedesktopDerivedInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate);
- ~TestFreedesktopDerivedInterfaceProxy();
-
- typedef TestFreedesktopDerivedInterface InterfaceType;
-
- inline static const char* getInterfaceId() {
- return(TestFreedesktopDerivedInterface::getInterfaceId());
- }
-
- /**
- * Returns the wrapper class that provides access to the attribute TestAttributedFromDerivedInterface.
- */
- virtual TestAttributedFromDerivedInterfaceAttribute& getTestAttributedFromDerivedInterfaceAttribute() {
- return delegate_->getTestAttributedFromDerivedInterfaceAttribute();
- }
-
-
-
-
- /**
- * Returns the CommonAPI address of the remote partner this proxy communicates with.
- */
- virtual std::string getAddress() const;
-
- /**
- * Returns the domain of the remote partner this proxy communicates with.
- */
- virtual const std::string& getDomain() const;
-
- /**
- * Returns the service ID of the remote partner this proxy communicates with.
- */
- virtual const std::string& getServiceId() const;
-
- /**
- * Returns the instance ID of the remote partner this proxy communicates with.
- */
- virtual const std::string& getInstanceId() const;
-
- /**
- * Returns true if the remote partner for this proxy is currently known to be available.
- */
- virtual bool isAvailable() const;
-
- /**
- * Returns true if the remote partner for this proxy is available.
- */
- virtual bool isAvailableBlocking() const;
-
- /**
- * Returns the wrapper class that is used to (de-)register for notifications about
- * the availability of the remote partner of this proxy.
- */
- virtual CommonAPI::ProxyStatusEvent& getProxyStatusEvent();
-
- /**
- * Returns the wrapper class that is used to access version information of the remote
- * partner of this proxy.
- */
- virtual CommonAPI::InterfaceVersionAttribute& getInterfaceVersionAttribute();
-
- private:
- std::shared_ptr<TestFreedesktopDerivedInterfaceProxyBase> delegate_;
-};
-
-#ifdef WIN32
- typedef TestFreedesktopDerivedInterfaceProxy<CommonAPI::WINDummyAttributeExtension<CommonAPI::WINDummyAttribute>> TestFreedesktopDerivedInterfaceProxyDefault;
-#else
- typedef TestFreedesktopDerivedInterfaceProxy<> TestFreedesktopDerivedInterfaceProxyDefault;
-#endif
-
-namespace TestFreedesktopDerivedInterfaceExtensions {
- template <template <typename > class _ExtensionType>
- class TestAttributedFromDerivedInterfaceAttributeExtension {
- public:
- typedef _ExtensionType<TestFreedesktopDerivedInterfaceProxyBase::TestAttributedFromDerivedInterfaceAttribute> extension_type;
-
- static_assert(std::is_base_of<typename CommonAPI::AttributeExtension<TestFreedesktopDerivedInterfaceProxyBase::TestAttributedFromDerivedInterfaceAttribute>, extension_type>::value,
- "Not CommonAPI Attribute Extension!");
- #ifdef WIN32
- TestAttributedFromDerivedInterfaceAttributeExtension() {}
- #endif
-
- TestAttributedFromDerivedInterfaceAttributeExtension(TestFreedesktopDerivedInterfaceProxyBase& proxy): attributeExtension_(proxy.getTestAttributedFromDerivedInterfaceAttribute()) {
- }
-
- inline extension_type& getTestAttributedFromDerivedInterfaceAttributeExtension() {
- return attributeExtension_;
- }
-
- private:
- extension_type attributeExtension_;
- };
-
-} // namespace TestFreedesktopDerivedInterfaceExtensions
-
-//
-// TestFreedesktopDerivedInterfaceProxy Implementation
-//
-template <typename ... _AttributeExtensions>
-TestFreedesktopDerivedInterfaceProxy<_AttributeExtensions...>::TestFreedesktopDerivedInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate):
- TestFreedesktopInterfaceProxy<_AttributeExtensions...>(delegate),
- _AttributeExtensions(*(std::dynamic_pointer_cast<TestFreedesktopDerivedInterfaceProxyBase>(delegate)))...,
- delegate_(std::dynamic_pointer_cast<TestFreedesktopDerivedInterfaceProxyBase>(delegate)) {
-}
-
-template <typename ... _AttributeExtensions>
-TestFreedesktopDerivedInterfaceProxy<_AttributeExtensions...>::~TestFreedesktopDerivedInterfaceProxy() {
-}
-
-
-template <typename ... _AttributeExtensions>
-std::string TestFreedesktopDerivedInterfaceProxy<_AttributeExtensions...>::getAddress() const {
- return delegate_->getAddress();
-}
-
-template <typename ... _AttributeExtensions>
-const std::string& TestFreedesktopDerivedInterfaceProxy<_AttributeExtensions...>::getDomain() const {
- return delegate_->getDomain();
-}
-
-template <typename ... _AttributeExtensions>
-const std::string& TestFreedesktopDerivedInterfaceProxy<_AttributeExtensions...>::getServiceId() const {
- return delegate_->getServiceId();
-}
-
-template <typename ... _AttributeExtensions>
-const std::string& TestFreedesktopDerivedInterfaceProxy<_AttributeExtensions...>::getInstanceId() const {
- return delegate_->getInstanceId();
-}
-
-template <typename ... _AttributeExtensions>
-bool TestFreedesktopDerivedInterfaceProxy<_AttributeExtensions...>::isAvailable() const {
- return delegate_->isAvailable();
-}
-
-template <typename ... _AttributeExtensions>
-bool TestFreedesktopDerivedInterfaceProxy<_AttributeExtensions...>::isAvailableBlocking() const {
- return delegate_->isAvailableBlocking();
-}
-
-template <typename ... _AttributeExtensions>
-CommonAPI::ProxyStatusEvent& TestFreedesktopDerivedInterfaceProxy<_AttributeExtensions...>::getProxyStatusEvent() {
- return delegate_->getProxyStatusEvent();
-}
-
-template <typename ... _AttributeExtensions>
-CommonAPI::InterfaceVersionAttribute& TestFreedesktopDerivedInterfaceProxy<_AttributeExtensions...>::getInterfaceVersionAttribute() {
- return delegate_->getInterfaceVersionAttribute();
-}
-
-
-} // namespace tests
-} // namespace commonapi
-
-namespace CommonAPI {
-template<template<typename > class _AttributeExtension>
-struct DefaultAttributeProxyFactoryHelper<commonapi::tests::TestFreedesktopDerivedInterfaceProxy,
- _AttributeExtension> {
- typedef typename commonapi::tests::TestFreedesktopDerivedInterfaceProxy<
- commonapi::tests::TestFreedesktopDerivedInterfaceExtensions::TestAttributedFromDerivedInterfaceAttributeExtension<_AttributeExtension>
- > class_t;
-};
-}
-
-#endif // COMMONAPI_TESTS_Test_Freedesktop_Derived_Interface_PROXY_H_
diff --git a/src/test/commonapi/tests/TestFreedesktopDerivedInterfaceProxyBase.h b/src/test/commonapi/tests/TestFreedesktopDerivedInterfaceProxyBase.h
deleted file mode 100644
index 97a3c0f..0000000
--- a/src/test/commonapi/tests/TestFreedesktopDerivedInterfaceProxyBase.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_PROXY_BASE_H_
-#define COMMONAPI_TESTS_Test_Freedesktop_Derived_Interface_PROXY_BASE_H_
-
-#include "TestFreedesktopDerivedInterface.h"
-#include "TestFreedesktopInterfaceProxyBase.h"
-
-
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-
-#include <CommonAPI/Attribute.h>
-#include <CommonAPI/Proxy.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-
-class TestFreedesktopDerivedInterfaceProxyBase: virtual public TestFreedesktopInterfaceProxyBase {
- public:
- typedef CommonAPI::ObservableAttribute<uint32_t> TestAttributedFromDerivedInterfaceAttribute;
-
-
- virtual TestAttributedFromDerivedInterfaceAttribute& getTestAttributedFromDerivedInterfaceAttribute() = 0;
-
-
-};
-
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_Test_Freedesktop_Derived_Interface_PROXY_BASE_H_
diff --git a/src/test/commonapi/tests/TestFreedesktopDerivedInterfaceStub.h b/src/test/commonapi/tests/TestFreedesktopDerivedInterfaceStub.h
deleted file mode 100644
index c81a7d2..0000000
--- a/src/test/commonapi/tests/TestFreedesktopDerivedInterfaceStub.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_STUB_H_
-#define COMMONAPI_TESTS_Test_Freedesktop_Derived_Interface_STUB_H_
-
-
-
-#include <commonapi/tests/TestFreedesktopInterfaceStub.h>
-
-#include "TestFreedesktopDerivedInterface.h"
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-
-#include <CommonAPI/Stub.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-
-/**
- * Receives messages from remote and handles all dispatching of deserialized calls
- * to a stub for the service TestFreedesktopDerivedInterface. Also provides means to send broadcasts
- * and attribute-changed-notifications of observable attributes as defined by this service.
- * An application developer should not need to bother with this class.
- */
-class TestFreedesktopDerivedInterfaceStubAdapter: virtual public CommonAPI::StubAdapter, public TestFreedesktopDerivedInterface, public virtual TestFreedesktopInterfaceStubAdapter {
- public:
- ///Notifies all remote listeners about a change of value of the attribute TestAttributedFromDerivedInterface.
- virtual void fireTestAttributedFromDerivedInterfaceAttributeChanged(const uint32_t& TestAttributedFromDerivedInterface) = 0;
-
-
-
- virtual void deactivateManagedInstances() = 0;
-protected:
- /**
- * Defines properties for storing the ClientIds of clients / proxies that have
- * subscribed to the selective broadcasts
- */
-};
-
-
-/**
- * Defines the necessary callbacks to handle remote set events related to the attributes
- * defined in the IDL description for TestFreedesktopDerivedInterface.
- * For each attribute two callbacks are defined:
- * - a verification callback that allows to verify the requested value and to prevent setting
- * e.g. an invalid value ("onRemoteSet<AttributeName>").
- * - an action callback to do local work after the attribute value has been changed
- * ("onRemote<AttributeName>Changed").
- *
- * This class and the one below are the ones an application developer needs to have
- * a look at if he wants to implement a service.
- */
-class TestFreedesktopDerivedInterfaceStubRemoteEvent: public virtual TestFreedesktopInterfaceStubRemoteEvent {
- public:
- virtual ~TestFreedesktopDerivedInterfaceStubRemoteEvent() { }
-
- /// Verification callback for remote set requests on the attribute TestAttributedFromDerivedInterface
- virtual bool onRemoteSetTestAttributedFromDerivedInterfaceAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t TestAttributedFromDerivedInterface) = 0;
- /// Action callback for remote set requests on the attribute TestAttributedFromDerivedInterface
- virtual void onRemoteTestAttributedFromDerivedInterfaceAttributeChanged() = 0;
-
-};
-
-
-/**
- * Defines the interface that must be implemented by any class that should provide
- * the service TestFreedesktopDerivedInterface to remote clients.
- * This class and the one above are the ones an application developer needs to have
- * a look at if he wants to implement a service.
- */
-class TestFreedesktopDerivedInterfaceStub: public virtual CommonAPI::Stub<TestFreedesktopDerivedInterfaceStubAdapter, TestFreedesktopDerivedInterfaceStubRemoteEvent>, public virtual TestFreedesktopInterfaceStub {
-public:
- virtual ~TestFreedesktopDerivedInterfaceStub() { }
- virtual const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId) = 0;
-
- /// Provides getter access to the attribute TestAttributedFromDerivedInterface
- virtual const uint32_t& getTestAttributedFromDerivedInterfaceAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId) = 0;
-
-
- using CommonAPI::Stub<TestFreedesktopDerivedInterfaceStubAdapter, TestFreedesktopDerivedInterfaceStubRemoteEvent>::initStubAdapter;
- typedef CommonAPI::Stub<TestFreedesktopDerivedInterfaceStubAdapter, TestFreedesktopDerivedInterfaceStubRemoteEvent>::StubAdapterType StubAdapterType;
- typedef CommonAPI::Stub<TestFreedesktopDerivedInterfaceStubAdapter, TestFreedesktopDerivedInterfaceStubRemoteEvent>::RemoteEventHandlerType RemoteEventHandlerType;
- typedef TestFreedesktopDerivedInterfaceStubRemoteEvent RemoteEventType;
- typedef TestFreedesktopDerivedInterface StubInterface;
-};
-
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_Test_Freedesktop_Derived_Interface_STUB_H_
diff --git a/src/test/commonapi/tests/TestFreedesktopDerivedInterfaceStubDefault.cpp b/src/test/commonapi/tests/TestFreedesktopDerivedInterfaceStubDefault.cpp
deleted file mode 100644
index 44ef5a0..0000000
--- a/src/test/commonapi/tests/TestFreedesktopDerivedInterfaceStubDefault.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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 <commonapi/tests/TestFreedesktopDerivedInterfaceStubDefault.h>
-
-namespace commonapi {
-namespace tests {
-
-TestFreedesktopDerivedInterfaceStubDefault::TestFreedesktopDerivedInterfaceStubDefault():
- remoteEventHandler_(this),
- interfaceVersion_(TestFreedesktopDerivedInterface::getInterfaceVersion()) {
-}
-
-const CommonAPI::Version& TestFreedesktopDerivedInterfaceStubDefault::getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId) {
- return interfaceVersion_;
-}
-
-TestFreedesktopDerivedInterfaceStubRemoteEvent* TestFreedesktopDerivedInterfaceStubDefault::initStubAdapter(const std::shared_ptr<TestFreedesktopDerivedInterfaceStubAdapter>& stubAdapter) {
- TestFreedesktopInterfaceStubDefault::initStubAdapter(stubAdapter);
- CommonAPI::Stub<TestFreedesktopDerivedInterfaceStubAdapter, TestFreedesktopDerivedInterfaceStubRemoteEvent>::stubAdapter_ = stubAdapter;
- return &remoteEventHandler_;
-}
-
-const uint32_t& TestFreedesktopDerivedInterfaceStubDefault::getTestAttributedFromDerivedInterfaceAttribute() {
- return testAttributedFromDerivedInterfaceAttributeValue_;
-}
-
-const uint32_t& TestFreedesktopDerivedInterfaceStubDefault::getTestAttributedFromDerivedInterfaceAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId) {
- return getTestAttributedFromDerivedInterfaceAttribute();
-}
-
-void TestFreedesktopDerivedInterfaceStubDefault::setTestAttributedFromDerivedInterfaceAttribute(uint32_t value) {
- const bool valueChanged = trySetTestAttributedFromDerivedInterfaceAttribute(std::move(value));
- if (valueChanged) {
- CommonAPI::Stub<TestFreedesktopDerivedInterfaceStubAdapter, TestFreedesktopDerivedInterfaceStubRemoteEvent>::stubAdapter_->fireTestAttributedFromDerivedInterfaceAttributeChanged(testAttributedFromDerivedInterfaceAttributeValue_);
- }
-}
-
-bool TestFreedesktopDerivedInterfaceStubDefault::trySetTestAttributedFromDerivedInterfaceAttribute(uint32_t value) {
- if (!validateTestAttributedFromDerivedInterfaceAttributeRequestedValue(value))
- return false;
-
- const bool valueChanged = (testAttributedFromDerivedInterfaceAttributeValue_ != value);
- testAttributedFromDerivedInterfaceAttributeValue_ = std::move(value);
- return valueChanged;
-}
-
-bool TestFreedesktopDerivedInterfaceStubDefault::validateTestAttributedFromDerivedInterfaceAttributeRequestedValue(const uint32_t& value) {
- return true;
-}
-
-void TestFreedesktopDerivedInterfaceStubDefault::setTestAttributedFromDerivedInterfaceAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t value) {
- setTestAttributedFromDerivedInterfaceAttribute(value);
-}
-
-void TestFreedesktopDerivedInterfaceStubDefault::onRemoteTestAttributedFromDerivedInterfaceAttributeChanged() {
- // No operation in default
-}
-
-void TestFreedesktopDerivedInterfaceStubDefault::RemoteEventHandler::onRemoteTestAttributedFromDerivedInterfaceAttributeChanged() {
- defaultStub_->onRemoteTestAttributedFromDerivedInterfaceAttributeChanged();
-}
-
-bool TestFreedesktopDerivedInterfaceStubDefault::RemoteEventHandler::onRemoteSetTestAttributedFromDerivedInterfaceAttribute(uint32_t value) {
- return defaultStub_->trySetTestAttributedFromDerivedInterfaceAttribute(std::move(value));
-}
-
-bool TestFreedesktopDerivedInterfaceStubDefault::RemoteEventHandler::onRemoteSetTestAttributedFromDerivedInterfaceAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t value) {
- return onRemoteSetTestAttributedFromDerivedInterfaceAttribute(value);
-}
-
-
-
-
-
-TestFreedesktopDerivedInterfaceStubDefault::RemoteEventHandler::RemoteEventHandler(TestFreedesktopDerivedInterfaceStubDefault* defaultStub):
- TestFreedesktopInterfaceStubDefault::RemoteEventHandler(defaultStub),
- defaultStub_(defaultStub) {
-}
-
-} // namespace tests
-} // namespace commonapi
diff --git a/src/test/commonapi/tests/TestFreedesktopDerivedInterfaceStubDefault.h b/src/test/commonapi/tests/TestFreedesktopDerivedInterfaceStubDefault.h
deleted file mode 100644
index 22f88d5..0000000
--- a/src/test/commonapi/tests/TestFreedesktopDerivedInterfaceStubDefault.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_STUB_DEFAULT_H_
-#define COMMONAPI_TESTS_Test_Freedesktop_Derived_Interface_STUB_DEFAULT_H_
-
-#include <commonapi/tests/TestFreedesktopInterfaceStubDefault.h>
-
-#include <commonapi/tests/TestFreedesktopDerivedInterfaceStub.h>
-#include <sstream>
-
-namespace commonapi {
-namespace tests {
-
-/**
- * Provides a default implementation for TestFreedesktopDerivedInterfaceStubRemoteEvent and
- * TestFreedesktopDerivedInterfaceStub. Method callbacks have an empty implementation,
- * remote set calls on attributes will always change the value of the attribute
- * to the one received.
- *
- * Override this stub if you only want to provide a subset of the functionality
- * that would be defined for this service, and/or if you do not need any non-default
- * behaviour.
- */
-class TestFreedesktopDerivedInterfaceStubDefault : public virtual TestFreedesktopDerivedInterfaceStub, public virtual TestFreedesktopInterfaceStubDefault {
-public:
- TestFreedesktopDerivedInterfaceStubDefault();
-
- TestFreedesktopDerivedInterfaceStubRemoteEvent* initStubAdapter(const std::shared_ptr<TestFreedesktopDerivedInterfaceStubAdapter>& stubAdapter);
-
- const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId);
-
- virtual const uint32_t& getTestAttributedFromDerivedInterfaceAttribute();
- virtual const uint32_t& getTestAttributedFromDerivedInterfaceAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId);
- virtual void setTestAttributedFromDerivedInterfaceAttribute(uint32_t value);
- virtual void setTestAttributedFromDerivedInterfaceAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t value);
-
-
-
-
-protected:
- virtual bool trySetTestAttributedFromDerivedInterfaceAttribute(uint32_t value);
- virtual bool validateTestAttributedFromDerivedInterfaceAttributeRequestedValue(const uint32_t& value);
- virtual void onRemoteTestAttributedFromDerivedInterfaceAttributeChanged();
- class RemoteEventHandler: public virtual TestFreedesktopDerivedInterfaceStubRemoteEvent, public virtual TestFreedesktopInterfaceStubDefault::RemoteEventHandler {
- public:
- RemoteEventHandler(TestFreedesktopDerivedInterfaceStubDefault* defaultStub);
-
- virtual bool onRemoteSetTestAttributedFromDerivedInterfaceAttribute(uint32_t value);
- virtual bool onRemoteSetTestAttributedFromDerivedInterfaceAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t value);
- virtual void onRemoteTestAttributedFromDerivedInterfaceAttributeChanged();
-
-
- private:
- TestFreedesktopDerivedInterfaceStubDefault* defaultStub_;
- };
-private:
- TestFreedesktopDerivedInterfaceStubDefault::RemoteEventHandler remoteEventHandler_;
-
- uint32_t testAttributedFromDerivedInterfaceAttributeValue_;
-
- CommonAPI::Version interfaceVersion_;
-};
-
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_Test_Freedesktop_Derived_Interface_STUB_DEFAULT_H_
diff --git a/src/test/commonapi/tests/TestFreedesktopInterface.h b/src/test/commonapi/tests/TestFreedesktopInterface.h
deleted file mode 100644
index 7b97b15..0000000
--- a/src/test/commonapi/tests/TestFreedesktopInterface.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_H_
-#define COMMONAPI_TESTS_Test_Freedesktop_Interface_H_
-
-
-
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <CommonAPI/types.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-
-class TestFreedesktopInterface {
- public:
- virtual ~TestFreedesktopInterface() { }
-
- static inline const char* getInterfaceId();
- static inline CommonAPI::Version getInterfaceVersion();
-};
-
-const char* TestFreedesktopInterface::getInterfaceId() {
- static const char* interfaceId = "commonapi.tests.TestFreedesktopInterface";
- return interfaceId;
-}
-
-CommonAPI::Version TestFreedesktopInterface::getInterfaceVersion() {
- return CommonAPI::Version(1, 0);
-}
-
-
-} // namespace tests
-} // namespace commonapi
-
-namespace CommonAPI {
-
-}
-
-
-namespace std {
- //hashes for types
-
- //hashes for error types
-}
-
-#endif // COMMONAPI_TESTS_Test_Freedesktop_Interface_H_
diff --git a/src/test/commonapi/tests/TestFreedesktopInterfaceDBusProxy.cpp b/src/test/commonapi/tests/TestFreedesktopInterfaceDBusProxy.cpp
deleted file mode 100644
index ad98cec..0000000
--- a/src/test/commonapi/tests/TestFreedesktopInterfaceDBusProxy.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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 "TestFreedesktopInterfaceDBusProxy.h"
-
-namespace commonapi {
-namespace tests {
-
-std::shared_ptr<CommonAPI::DBus::DBusProxy> createTestFreedesktopInterfaceDBusProxy(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection) {
- return std::make_shared<TestFreedesktopInterfaceDBusProxy>(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection);
-}
-
-INITIALIZER(registerTestFreedesktopInterfaceDBusProxy) {
- CommonAPI::DBus::DBusFactory::registerProxyFactoryMethod(TestFreedesktopInterface::getInterfaceId(),
- &createTestFreedesktopInterfaceDBusProxy);
-}
-
-TestFreedesktopInterfaceDBusProxy::TestFreedesktopInterfaceDBusProxy(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection):
- CommonAPI::DBus::DBusProxy(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyconnection)
-,testPredefinedTypeAttribute_(*this, interfaceName.c_str(), "TestPredefinedTypeAttribute"),
-testReadonlyAttribute_(*this, interfaceName.c_str(), "TestReadonlyAttribute"),
-testDerivedStructAttribute_(*this, interfaceName.c_str(), "TestDerivedStructAttribute"),
-testDerivedArrayAttribute_(*this, interfaceName.c_str(), "TestDerivedArrayAttribute")
- {
- }
-
-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
diff --git a/src/test/commonapi/tests/TestFreedesktopInterfaceDBusProxy.h b/src/test/commonapi/tests/TestFreedesktopInterfaceDBusProxy.h
deleted file mode 100644
index 869fa29..0000000
--- a/src/test/commonapi/tests/TestFreedesktopInterfaceDBusProxy.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_H_
-#define COMMONAPI_TESTS_Test_Freedesktop_Interface_DBUS_PROXY_H_
-
-#include <commonapi/tests/TestFreedesktopInterfaceProxyBase.h>
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <CommonAPI/DBus/DBusFactory.h>
-#include <CommonAPI/DBus/DBusProxy.h>
-#include <CommonAPI/DBus/DBusAttribute.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-#include <string>
-
-namespace commonapi {
-namespace tests {
-
-class TestFreedesktopInterfaceDBusProxy: virtual public TestFreedesktopInterfaceProxyBase, virtual public CommonAPI::DBus::DBusProxy {
- public:
- TestFreedesktopInterfaceDBusProxy(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection);
-
- 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>> testDerivedStructAttribute_;
- CommonAPI::DBus::DBusFreedesktopObservableAttribute<CommonAPI::DBus::DBusFreedesktopAttribute<TestDerivedArrayAttributeAttribute>> testDerivedArrayAttribute_;
-
-
-};
-
-
-
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_Test_Freedesktop_Interface_DBUS_PROXY_H_
diff --git a/src/test/commonapi/tests/TestFreedesktopInterfaceDBusStubAdapter.cpp b/src/test/commonapi/tests/TestFreedesktopInterfaceDBusStubAdapter.cpp
deleted file mode 100644
index 22317d2..0000000
--- a/src/test/commonapi/tests/TestFreedesktopInterfaceDBusStubAdapter.cpp
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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 "TestFreedesktopInterfaceDBusStubAdapter.h"
-#include <commonapi/tests/TestFreedesktopInterface.h>
-
-namespace commonapi {
-namespace tests {
-
-std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> createTestFreedesktopInterfaceDBusStubAdapter(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stubBase) {
- return std::make_shared<TestFreedesktopInterfaceDBusStubAdapter>(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection, stubBase);
-}
-
-INITIALIZER(registerTestFreedesktopInterfaceDBusStubAdapter) {
- CommonAPI::DBus::DBusFactory::registerAdapterFactoryMethod(TestFreedesktopInterface::getInterfaceId(),
- &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<
- TestFreedesktopInterfaceStub,
- CommonAPI::Version
- > TestFreedesktopInterfaceDBusStubAdapterInternal::getTestFreedesktopInterfaceInterfaceVersionStubDispatcher(&TestFreedesktopInterfaceStub::getInterfaceVersion, "uu");
-
-CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher<
- TestFreedesktopInterfaceStub,
- uint32_t
- > TestFreedesktopInterfaceDBusStubAdapterInternal::getTestPredefinedTypeAttributeAttributeStubDispatcher(&TestFreedesktopInterfaceStub::getTestPredefinedTypeAttributeAttribute);
-CommonAPI::DBus::DBusSetFreedesktopObservableAttributeStubDispatcher<
- TestFreedesktopInterfaceStub,
- uint32_t
- > TestFreedesktopInterfaceDBusStubAdapterInternal::setTestPredefinedTypeAttributeAttributeStubDispatcher(
- &TestFreedesktopInterfaceStub::getTestPredefinedTypeAttributeAttribute,
- &TestFreedesktopInterfaceStubRemoteEvent::onRemoteSetTestPredefinedTypeAttributeAttribute,
- &TestFreedesktopInterfaceStubRemoteEvent::onRemoteTestPredefinedTypeAttributeAttributeChanged
- ,&TestFreedesktopInterfaceStubAdapter::fireTestPredefinedTypeAttributeAttributeChanged
- );
-CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher<
- TestFreedesktopInterfaceStub,
- uint32_t
- > TestFreedesktopInterfaceDBusStubAdapterInternal::getTestReadonlyAttributeAttributeStubDispatcher(&TestFreedesktopInterfaceStub::getTestReadonlyAttributeAttribute);
-CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher<
- TestFreedesktopInterfaceStub,
- DerivedTypeCollection::TestStructExtended
- > TestFreedesktopInterfaceDBusStubAdapterInternal::getTestDerivedStructAttributeAttributeStubDispatcher(&TestFreedesktopInterfaceStub::getTestDerivedStructAttributeAttribute);
-CommonAPI::DBus::DBusSetFreedesktopObservableAttributeStubDispatcher<
- TestFreedesktopInterfaceStub,
- DerivedTypeCollection::TestStructExtended
- > TestFreedesktopInterfaceDBusStubAdapterInternal::setTestDerivedStructAttributeAttributeStubDispatcher(
- &TestFreedesktopInterfaceStub::getTestDerivedStructAttributeAttribute,
- &TestFreedesktopInterfaceStubRemoteEvent::onRemoteSetTestDerivedStructAttributeAttribute,
- &TestFreedesktopInterfaceStubRemoteEvent::onRemoteTestDerivedStructAttributeAttributeChanged
- ,&TestFreedesktopInterfaceStubAdapter::fireTestDerivedStructAttributeAttributeChanged
- );
-CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher<
- TestFreedesktopInterfaceStub,
- DerivedTypeCollection::TestArrayUInt64
- > TestFreedesktopInterfaceDBusStubAdapterInternal::getTestDerivedArrayAttributeAttributeStubDispatcher(&TestFreedesktopInterfaceStub::getTestDerivedArrayAttributeAttribute);
-CommonAPI::DBus::DBusSetFreedesktopObservableAttributeStubDispatcher<
- TestFreedesktopInterfaceStub,
- DerivedTypeCollection::TestArrayUInt64
- > TestFreedesktopInterfaceDBusStubAdapterInternal::setTestDerivedArrayAttributeAttributeStubDispatcher(
- &TestFreedesktopInterfaceStub::getTestDerivedArrayAttributeAttribute,
- &TestFreedesktopInterfaceStubRemoteEvent::onRemoteSetTestDerivedArrayAttributeAttribute,
- &TestFreedesktopInterfaceStubRemoteEvent::onRemoteTestDerivedArrayAttributeAttributeChanged
- ,&TestFreedesktopInterfaceStubAdapter::fireTestDerivedArrayAttributeAttributeChanged
- );
-
-
-
-
-void TestFreedesktopInterfaceDBusStubAdapterInternal::fireTestPredefinedTypeAttributeAttributeChanged(const uint32_t& value) {
- CommonAPI::DBus::DBusStubFreedesktopPropertiesSignalHelper<CommonAPI::DBus::DBusSerializableArguments<uint32_t>>
- ::sendPropertiesChangedSignal(
- *this,
- "TestPredefinedTypeAttribute",
- value
- );
-}
-void TestFreedesktopInterfaceDBusStubAdapterInternal::fireTestReadonlyAttributeAttributeChanged(const uint32_t& value) {
- CommonAPI::DBus::DBusStubFreedesktopPropertiesSignalHelper<CommonAPI::DBus::DBusSerializableArguments<uint32_t>>
- ::sendPropertiesChangedSignal(
- *this,
- "TestReadonlyAttribute",
- value
- );
-}
-void TestFreedesktopInterfaceDBusStubAdapterInternal::fireTestDerivedStructAttributeAttributeChanged(const DerivedTypeCollection::TestStructExtended& value) {
- CommonAPI::DBus::DBusStubFreedesktopPropertiesSignalHelper<CommonAPI::DBus::DBusSerializableArguments<DerivedTypeCollection::TestStructExtended>>
- ::sendPropertiesChangedSignal(
- *this,
- "TestDerivedStructAttribute",
- value
- );
-}
-void TestFreedesktopInterfaceDBusStubAdapterInternal::fireTestDerivedArrayAttributeAttributeChanged(const DerivedTypeCollection::TestArrayUInt64& value) {
- CommonAPI::DBus::DBusStubFreedesktopPropertiesSignalHelper<CommonAPI::DBus::DBusSerializableArguments<DerivedTypeCollection::TestArrayUInt64>>
- ::sendPropertiesChangedSignal(
- *this,
- "TestDerivedArrayAttribute",
- value
- );
-}
-
-
-
-const TestFreedesktopInterfaceDBusStubAdapterHelper::StubDispatcherTable& TestFreedesktopInterfaceDBusStubAdapterInternal::getStubDispatcherTable() {
- return stubDispatcherTable_;
-}
-
-const CommonAPI::DBus::StubAttributeTable& TestFreedesktopInterfaceDBusStubAdapterInternal::getStubAttributeTable() {
- return stubAttributeTable_;
-}
-
-TestFreedesktopInterfaceDBusStubAdapterInternal::TestFreedesktopInterfaceDBusStubAdapterInternal(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& dbusInterfaceName,
- const std::string& dbusBusName,
- const std::string& dbusObjectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stub):
- CommonAPI::DBus::DBusStubAdapter(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- false),
- TestFreedesktopInterfaceDBusStubAdapterHelper(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- 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 });
-}
-
-const bool TestFreedesktopInterfaceDBusStubAdapterInternal::hasFreedesktopProperties() {
- return true;
-}
-
-} // namespace tests
-} // namespace commonapi
diff --git a/src/test/commonapi/tests/TestFreedesktopInterfaceDBusStubAdapter.h b/src/test/commonapi/tests/TestFreedesktopInterfaceDBusStubAdapter.h
deleted file mode 100644
index 23c94bb..0000000
--- a/src/test/commonapi/tests/TestFreedesktopInterfaceDBusStubAdapter.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_H_
-#define COMMONAPI_TESTS_Test_Freedesktop_Interface_DBUS_STUB_ADAPTER_H_
-
-#include <commonapi/tests/TestFreedesktopInterfaceStub.h>
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <CommonAPI/DBus/DBusStubAdapterHelper.h>
-#include <CommonAPI/DBus/DBusStubAdapter.h>
-#include <CommonAPI/DBus/DBusFactory.h>
-#include <CommonAPI/DBus/DBusServicePublisher.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-
-typedef CommonAPI::DBus::DBusStubAdapterHelper<TestFreedesktopInterfaceStub> TestFreedesktopInterfaceDBusStubAdapterHelper;
-
-class TestFreedesktopInterfaceDBusStubAdapterInternal: public virtual TestFreedesktopInterfaceStubAdapter, public TestFreedesktopInterfaceDBusStubAdapterHelper {
- public:
- TestFreedesktopInterfaceDBusStubAdapterInternal(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& dbusInterfaceName,
- const std::string& dbusBusName,
- const std::string& dbusObjectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stub);
-
- ~TestFreedesktopInterfaceDBusStubAdapterInternal();
-
- virtual const bool hasFreedesktopProperties();
-
- void fireTestPredefinedTypeAttributeAttributeChanged(const uint32_t& value);
- void fireTestReadonlyAttributeAttributeChanged(const uint32_t& value);
- void fireTestDerivedStructAttributeAttributeChanged(const DerivedTypeCollection::TestStructExtended& value);
- void fireTestDerivedArrayAttributeAttributeChanged(const DerivedTypeCollection::TestArrayUInt64& value);
-
-
-
- const TestFreedesktopInterfaceDBusStubAdapterHelper::StubDispatcherTable& getStubDispatcherTable();
- const CommonAPI::DBus::StubAttributeTable& getStubAttributeTable();
-
- void deactivateManagedInstances();
-
-
-static CommonAPI::DBus::DBusGetAttributeStubDispatcher<
- TestFreedesktopInterfaceStub,
- CommonAPI::Version
- > getTestFreedesktopInterfaceInterfaceVersionStubDispatcher;
-
-static CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher<
- TestFreedesktopInterfaceStub,
- uint32_t
- > getTestPredefinedTypeAttributeAttributeStubDispatcher;
-static CommonAPI::DBus::DBusSetFreedesktopObservableAttributeStubDispatcher<
- TestFreedesktopInterfaceStub,
- uint32_t
- > setTestPredefinedTypeAttributeAttributeStubDispatcher;
-static CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher<
- TestFreedesktopInterfaceStub,
- uint32_t
- > getTestReadonlyAttributeAttributeStubDispatcher;
-static CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher<
- TestFreedesktopInterfaceStub,
- DerivedTypeCollection::TestStructExtended
- > getTestDerivedStructAttributeAttributeStubDispatcher;
-static CommonAPI::DBus::DBusSetFreedesktopObservableAttributeStubDispatcher<
- TestFreedesktopInterfaceStub,
- DerivedTypeCollection::TestStructExtended
- > setTestDerivedStructAttributeAttributeStubDispatcher;
-static CommonAPI::DBus::DBusGetFreedesktopAttributeStubDispatcher<
- TestFreedesktopInterfaceStub,
- DerivedTypeCollection::TestArrayUInt64
- > getTestDerivedArrayAttributeAttributeStubDispatcher;
-static CommonAPI::DBus::DBusSetFreedesktopObservableAttributeStubDispatcher<
- TestFreedesktopInterfaceStub,
- DerivedTypeCollection::TestArrayUInt64
- > 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 std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& dbusInterfaceName,
- const std::string& dbusBusName,
- const std::string& dbusObjectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stub) :
- CommonAPI::DBus::DBusStubAdapter(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- false),
- TestFreedesktopInterfaceDBusStubAdapterInternal(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- stub) { }
-};
-
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_Test_Freedesktop_Interface_DBUS_STUB_ADAPTER_H_
diff --git a/src/test/commonapi/tests/TestFreedesktopInterfaceProxy.h b/src/test/commonapi/tests/TestFreedesktopInterfaceProxy.h
deleted file mode 100644
index 0b4ce8d..0000000
--- a/src/test/commonapi/tests/TestFreedesktopInterfaceProxy.h
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_PROXY_H_
-#define COMMONAPI_TESTS_Test_Freedesktop_Interface_PROXY_H_
-
-#include "TestFreedesktopInterfaceProxyBase.h"
-
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <CommonAPI/AttributeExtension.h>
-#include <CommonAPI/Factory.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-
-template <typename ... _AttributeExtensions>
-class TestFreedesktopInterfaceProxy: virtual public TestFreedesktopInterface, virtual public TestFreedesktopInterfaceProxyBase
-, public _AttributeExtensions... {
-public:
- TestFreedesktopInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate);
- ~TestFreedesktopInterfaceProxy();
-
- typedef TestFreedesktopInterface InterfaceType;
-
-
- /**
- * Returns the wrapper class that provides access to the attribute TestPredefinedTypeAttribute.
- */
- virtual TestPredefinedTypeAttributeAttribute& getTestPredefinedTypeAttributeAttribute() {
- return delegate_->getTestPredefinedTypeAttributeAttribute();
- }
- /**
- * Returns the wrapper class that provides access to the attribute TestReadonlyAttribute.
- */
- virtual TestReadonlyAttributeAttribute& getTestReadonlyAttributeAttribute() {
- return delegate_->getTestReadonlyAttributeAttribute();
- }
- /**
- * Returns the wrapper class that provides access to the attribute TestDerivedStructAttribute.
- */
- virtual TestDerivedStructAttributeAttribute& getTestDerivedStructAttributeAttribute() {
- return delegate_->getTestDerivedStructAttributeAttribute();
- }
- /**
- * Returns the wrapper class that provides access to the attribute TestDerivedArrayAttribute.
- */
- virtual TestDerivedArrayAttributeAttribute& getTestDerivedArrayAttributeAttribute() {
- return delegate_->getTestDerivedArrayAttributeAttribute();
- }
-
-
-
-
- /**
- * Returns the CommonAPI address of the remote partner this proxy communicates with.
- */
- virtual std::string getAddress() const;
-
- /**
- * Returns the domain of the remote partner this proxy communicates with.
- */
- virtual const std::string& getDomain() const;
-
- /**
- * Returns the service ID of the remote partner this proxy communicates with.
- */
- virtual const std::string& getServiceId() const;
-
- /**
- * Returns the instance ID of the remote partner this proxy communicates with.
- */
- virtual const std::string& getInstanceId() const;
-
- /**
- * Returns true if the remote partner for this proxy is currently known to be available.
- */
- virtual bool isAvailable() const;
-
- /**
- * Returns true if the remote partner for this proxy is available.
- */
- virtual bool isAvailableBlocking() const;
-
- /**
- * Returns the wrapper class that is used to (de-)register for notifications about
- * the availability of the remote partner of this proxy.
- */
- virtual CommonAPI::ProxyStatusEvent& getProxyStatusEvent();
-
- /**
- * Returns the wrapper class that is used to access version information of the remote
- * partner of this proxy.
- */
- virtual CommonAPI::InterfaceVersionAttribute& getInterfaceVersionAttribute();
-
- private:
- std::shared_ptr<TestFreedesktopInterfaceProxyBase> delegate_;
-};
-
-#ifdef WIN32
- typedef TestFreedesktopInterfaceProxy<CommonAPI::WINDummyAttributeExtension<CommonAPI::WINDummyAttribute>> TestFreedesktopInterfaceProxyDefault;
-#else
- typedef TestFreedesktopInterfaceProxy<> TestFreedesktopInterfaceProxyDefault;
-#endif
-
-namespace TestFreedesktopInterfaceExtensions {
- template <template <typename > class _ExtensionType>
- class TestPredefinedTypeAttributeAttributeExtension {
- public:
- typedef _ExtensionType<TestFreedesktopInterfaceProxyBase::TestPredefinedTypeAttributeAttribute> extension_type;
-
- static_assert(std::is_base_of<typename CommonAPI::AttributeExtension<TestFreedesktopInterfaceProxyBase::TestPredefinedTypeAttributeAttribute>, extension_type>::value,
- "Not CommonAPI Attribute Extension!");
- #ifdef WIN32
- TestPredefinedTypeAttributeAttributeExtension() {}
- #endif
-
- TestPredefinedTypeAttributeAttributeExtension(TestFreedesktopInterfaceProxyBase& proxy): attributeExtension_(proxy.getTestPredefinedTypeAttributeAttribute()) {
- }
-
- inline extension_type& getTestPredefinedTypeAttributeAttributeExtension() {
- return attributeExtension_;
- }
-
- private:
- extension_type attributeExtension_;
- };
-
- template <template <typename > class _ExtensionType>
- class TestReadonlyAttributeAttributeExtension {
- public:
- typedef _ExtensionType<TestFreedesktopInterfaceProxyBase::TestReadonlyAttributeAttribute> extension_type;
-
- static_assert(std::is_base_of<typename CommonAPI::AttributeExtension<TestFreedesktopInterfaceProxyBase::TestReadonlyAttributeAttribute>, extension_type>::value,
- "Not CommonAPI Attribute Extension!");
- #ifdef WIN32
- TestReadonlyAttributeAttributeExtension() {}
- #endif
-
- TestReadonlyAttributeAttributeExtension(TestFreedesktopInterfaceProxyBase& proxy): attributeExtension_(proxy.getTestReadonlyAttributeAttribute()) {
- }
-
- inline extension_type& getTestReadonlyAttributeAttributeExtension() {
- return attributeExtension_;
- }
-
- private:
- extension_type attributeExtension_;
- };
-
- template <template <typename > class _ExtensionType>
- class TestDerivedStructAttributeAttributeExtension {
- public:
- typedef _ExtensionType<TestFreedesktopInterfaceProxyBase::TestDerivedStructAttributeAttribute> extension_type;
-
- static_assert(std::is_base_of<typename CommonAPI::AttributeExtension<TestFreedesktopInterfaceProxyBase::TestDerivedStructAttributeAttribute>, extension_type>::value,
- "Not CommonAPI Attribute Extension!");
- #ifdef WIN32
- TestDerivedStructAttributeAttributeExtension() {}
- #endif
-
- TestDerivedStructAttributeAttributeExtension(TestFreedesktopInterfaceProxyBase& proxy): attributeExtension_(proxy.getTestDerivedStructAttributeAttribute()) {
- }
-
- inline extension_type& getTestDerivedStructAttributeAttributeExtension() {
- return attributeExtension_;
- }
-
- private:
- extension_type attributeExtension_;
- };
-
- template <template <typename > class _ExtensionType>
- class TestDerivedArrayAttributeAttributeExtension {
- public:
- typedef _ExtensionType<TestFreedesktopInterfaceProxyBase::TestDerivedArrayAttributeAttribute> extension_type;
-
- static_assert(std::is_base_of<typename CommonAPI::AttributeExtension<TestFreedesktopInterfaceProxyBase::TestDerivedArrayAttributeAttribute>, extension_type>::value,
- "Not CommonAPI Attribute Extension!");
- #ifdef WIN32
- TestDerivedArrayAttributeAttributeExtension() {}
- #endif
-
- TestDerivedArrayAttributeAttributeExtension(TestFreedesktopInterfaceProxyBase& proxy): attributeExtension_(proxy.getTestDerivedArrayAttributeAttribute()) {
- }
-
- inline extension_type& getTestDerivedArrayAttributeAttributeExtension() {
- return attributeExtension_;
- }
-
- private:
- extension_type attributeExtension_;
- };
-
-} // namespace TestFreedesktopInterfaceExtensions
-
-//
-// TestFreedesktopInterfaceProxy Implementation
-//
-template <typename ... _AttributeExtensions>
-TestFreedesktopInterfaceProxy<_AttributeExtensions...>::TestFreedesktopInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate):
- _AttributeExtensions(*(std::dynamic_pointer_cast<TestFreedesktopInterfaceProxyBase>(delegate)))...,
- delegate_(std::dynamic_pointer_cast<TestFreedesktopInterfaceProxyBase>(delegate)) {
-}
-
-template <typename ... _AttributeExtensions>
-TestFreedesktopInterfaceProxy<_AttributeExtensions...>::~TestFreedesktopInterfaceProxy() {
-}
-
-
-template <typename ... _AttributeExtensions>
-std::string TestFreedesktopInterfaceProxy<_AttributeExtensions...>::getAddress() const {
- return delegate_->getAddress();
-}
-
-template <typename ... _AttributeExtensions>
-const std::string& TestFreedesktopInterfaceProxy<_AttributeExtensions...>::getDomain() const {
- return delegate_->getDomain();
-}
-
-template <typename ... _AttributeExtensions>
-const std::string& TestFreedesktopInterfaceProxy<_AttributeExtensions...>::getServiceId() const {
- return delegate_->getServiceId();
-}
-
-template <typename ... _AttributeExtensions>
-const std::string& TestFreedesktopInterfaceProxy<_AttributeExtensions...>::getInstanceId() const {
- return delegate_->getInstanceId();
-}
-
-template <typename ... _AttributeExtensions>
-bool TestFreedesktopInterfaceProxy<_AttributeExtensions...>::isAvailable() const {
- return delegate_->isAvailable();
-}
-
-template <typename ... _AttributeExtensions>
-bool TestFreedesktopInterfaceProxy<_AttributeExtensions...>::isAvailableBlocking() const {
- return delegate_->isAvailableBlocking();
-}
-
-template <typename ... _AttributeExtensions>
-CommonAPI::ProxyStatusEvent& TestFreedesktopInterfaceProxy<_AttributeExtensions...>::getProxyStatusEvent() {
- return delegate_->getProxyStatusEvent();
-}
-
-template <typename ... _AttributeExtensions>
-CommonAPI::InterfaceVersionAttribute& TestFreedesktopInterfaceProxy<_AttributeExtensions...>::getInterfaceVersionAttribute() {
- return delegate_->getInterfaceVersionAttribute();
-}
-
-
-} // namespace tests
-} // namespace commonapi
-
-namespace CommonAPI {
-template<template<typename > class _AttributeExtension>
-struct DefaultAttributeProxyFactoryHelper<commonapi::tests::TestFreedesktopInterfaceProxy,
- _AttributeExtension> {
- typedef typename commonapi::tests::TestFreedesktopInterfaceProxy<
- commonapi::tests::TestFreedesktopInterfaceExtensions::TestPredefinedTypeAttributeAttributeExtension<_AttributeExtension>,
- commonapi::tests::TestFreedesktopInterfaceExtensions::TestReadonlyAttributeAttributeExtension<_AttributeExtension>,
- commonapi::tests::TestFreedesktopInterfaceExtensions::TestDerivedStructAttributeAttributeExtension<_AttributeExtension>,
- commonapi::tests::TestFreedesktopInterfaceExtensions::TestDerivedArrayAttributeAttributeExtension<_AttributeExtension>
- > class_t;
-};
-}
-
-#endif // COMMONAPI_TESTS_Test_Freedesktop_Interface_PROXY_H_
diff --git a/src/test/commonapi/tests/TestFreedesktopInterfaceProxyBase.h b/src/test/commonapi/tests/TestFreedesktopInterfaceProxyBase.h
deleted file mode 100644
index 417a157..0000000
--- a/src/test/commonapi/tests/TestFreedesktopInterfaceProxyBase.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_PROXY_BASE_H_
-#define COMMONAPI_TESTS_Test_Freedesktop_Interface_PROXY_BASE_H_
-
-#include "TestFreedesktopInterface.h"
-
-
-#include <commonapi/tests/DerivedTypeCollection.h>
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <cstdint>
-#include <vector>
-
-#include <CommonAPI/Attribute.h>
-#include <CommonAPI/Proxy.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-
-class TestFreedesktopInterfaceProxyBase: virtual public CommonAPI::Proxy {
- public:
- typedef CommonAPI::ObservableAttribute<uint32_t> TestPredefinedTypeAttributeAttribute;
- typedef CommonAPI::ObservableReadonlyAttribute<uint32_t> TestReadonlyAttributeAttribute;
- typedef CommonAPI::ObservableAttribute<DerivedTypeCollection::TestStructExtended> TestDerivedStructAttributeAttribute;
- typedef CommonAPI::ObservableAttribute<DerivedTypeCollection::TestArrayUInt64> TestDerivedArrayAttributeAttribute;
-
-
- virtual TestPredefinedTypeAttributeAttribute& getTestPredefinedTypeAttributeAttribute() = 0;
- virtual TestReadonlyAttributeAttribute& getTestReadonlyAttributeAttribute() = 0;
- virtual TestDerivedStructAttributeAttribute& getTestDerivedStructAttributeAttribute() = 0;
- virtual TestDerivedArrayAttributeAttribute& getTestDerivedArrayAttributeAttribute() = 0;
-
-
-};
-
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_Test_Freedesktop_Interface_PROXY_BASE_H_
diff --git a/src/test/commonapi/tests/TestFreedesktopInterfaceStub.h b/src/test/commonapi/tests/TestFreedesktopInterfaceStub.h
deleted file mode 100644
index 623c012..0000000
--- a/src/test/commonapi/tests/TestFreedesktopInterfaceStub.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_STUB_H_
-#define COMMONAPI_TESTS_Test_Freedesktop_Interface_STUB_H_
-
-
-
-#include <commonapi/tests/DerivedTypeCollection.h>
-
-#include "TestFreedesktopInterface.h"
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <cstdint>
-#include <vector>
-
-#include <CommonAPI/Stub.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-
-/**
- * Receives messages from remote and handles all dispatching of deserialized calls
- * to a stub for the service TestFreedesktopInterface. Also provides means to send broadcasts
- * and attribute-changed-notifications of observable attributes as defined by this service.
- * An application developer should not need to bother with this class.
- */
-class TestFreedesktopInterfaceStubAdapter: virtual public CommonAPI::StubAdapter, public TestFreedesktopInterface {
- public:
- ///Notifies all remote listeners about a change of value of the attribute TestPredefinedTypeAttribute.
- virtual void fireTestPredefinedTypeAttributeAttributeChanged(const uint32_t& TestPredefinedTypeAttribute) = 0;
- ///Notifies all remote listeners about a change of value of the attribute TestReadonlyAttribute.
- virtual void fireTestReadonlyAttributeAttributeChanged(const uint32_t& TestReadonlyAttribute) = 0;
- ///Notifies all remote listeners about a change of value of the attribute TestDerivedStructAttribute.
- virtual void fireTestDerivedStructAttributeAttributeChanged(const DerivedTypeCollection::TestStructExtended& TestDerivedStructAttribute) = 0;
- ///Notifies all remote listeners about a change of value of the attribute TestDerivedArrayAttribute.
- virtual void fireTestDerivedArrayAttributeAttributeChanged(const DerivedTypeCollection::TestArrayUInt64& TestDerivedArrayAttribute) = 0;
-
-
-
- virtual void deactivateManagedInstances() = 0;
-protected:
- /**
- * Defines properties for storing the ClientIds of clients / proxies that have
- * subscribed to the selective broadcasts
- */
-};
-
-
-/**
- * Defines the necessary callbacks to handle remote set events related to the attributes
- * defined in the IDL description for TestFreedesktopInterface.
- * For each attribute two callbacks are defined:
- * - a verification callback that allows to verify the requested value and to prevent setting
- * e.g. an invalid value ("onRemoteSet<AttributeName>").
- * - an action callback to do local work after the attribute value has been changed
- * ("onRemote<AttributeName>Changed").
- *
- * This class and the one below are the ones an application developer needs to have
- * a look at if he wants to implement a service.
- */
-class TestFreedesktopInterfaceStubRemoteEvent {
- public:
- virtual ~TestFreedesktopInterfaceStubRemoteEvent() { }
-
- /// Verification callback for remote set requests on the attribute TestPredefinedTypeAttribute
- virtual bool onRemoteSetTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t TestPredefinedTypeAttribute) = 0;
- /// Action callback for remote set requests on the attribute TestPredefinedTypeAttribute
- virtual void onRemoteTestPredefinedTypeAttributeAttributeChanged() = 0;
-
-
- /// Verification callback for remote set requests on the attribute TestDerivedStructAttribute
- virtual bool onRemoteSetTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::TestStructExtended TestDerivedStructAttribute) = 0;
- /// Action callback for remote set requests on the attribute TestDerivedStructAttribute
- virtual void onRemoteTestDerivedStructAttributeAttributeChanged() = 0;
-
- /// Verification callback for remote set requests on the attribute TestDerivedArrayAttribute
- virtual bool onRemoteSetTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::TestArrayUInt64 TestDerivedArrayAttribute) = 0;
- /// Action callback for remote set requests on the attribute TestDerivedArrayAttribute
- virtual void onRemoteTestDerivedArrayAttributeAttributeChanged() = 0;
-
-};
-
-
-/**
- * Defines the interface that must be implemented by any class that should provide
- * the service TestFreedesktopInterface to remote clients.
- * This class and the one above are the ones an application developer needs to have
- * a look at if he wants to implement a service.
- */
-class TestFreedesktopInterfaceStub: public virtual CommonAPI::Stub<TestFreedesktopInterfaceStubAdapter, TestFreedesktopInterfaceStubRemoteEvent> {
-public:
- virtual ~TestFreedesktopInterfaceStub() { }
- virtual const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId) = 0;
-
- /// Provides getter access to the attribute TestPredefinedTypeAttribute
- virtual const uint32_t& getTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId) = 0;
- /// Provides getter access to the attribute TestReadonlyAttribute
- virtual const uint32_t& getTestReadonlyAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId) = 0;
- /// Provides getter access to the attribute TestDerivedStructAttribute
- virtual const DerivedTypeCollection::TestStructExtended& getTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId) = 0;
- /// Provides getter access to the attribute TestDerivedArrayAttribute
- virtual const DerivedTypeCollection::TestArrayUInt64& getTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId) = 0;
-
-
- using CommonAPI::Stub<TestFreedesktopInterfaceStubAdapter, TestFreedesktopInterfaceStubRemoteEvent>::initStubAdapter;
- typedef CommonAPI::Stub<TestFreedesktopInterfaceStubAdapter, TestFreedesktopInterfaceStubRemoteEvent>::StubAdapterType StubAdapterType;
- typedef CommonAPI::Stub<TestFreedesktopInterfaceStubAdapter, TestFreedesktopInterfaceStubRemoteEvent>::RemoteEventHandlerType RemoteEventHandlerType;
- typedef TestFreedesktopInterfaceStubRemoteEvent RemoteEventType;
- typedef TestFreedesktopInterface StubInterface;
-};
-
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_Test_Freedesktop_Interface_STUB_H_
diff --git a/src/test/commonapi/tests/TestFreedesktopInterfaceStubDefault.cpp b/src/test/commonapi/tests/TestFreedesktopInterfaceStubDefault.cpp
deleted file mode 100644
index 3de15da..0000000
--- a/src/test/commonapi/tests/TestFreedesktopInterfaceStubDefault.cpp
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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 <commonapi/tests/TestFreedesktopInterfaceStubDefault.h>
-
-namespace commonapi {
-namespace tests {
-
-TestFreedesktopInterfaceStubDefault::TestFreedesktopInterfaceStubDefault():
- remoteEventHandler_(this),
- interfaceVersion_(TestFreedesktopInterface::getInterfaceVersion()) {
-}
-
-const CommonAPI::Version& TestFreedesktopInterfaceStubDefault::getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId) {
- return interfaceVersion_;
-}
-
-TestFreedesktopInterfaceStubRemoteEvent* TestFreedesktopInterfaceStubDefault::initStubAdapter(const std::shared_ptr<TestFreedesktopInterfaceStubAdapter>& stubAdapter) {
- CommonAPI::Stub<TestFreedesktopInterfaceStubAdapter, TestFreedesktopInterfaceStubRemoteEvent>::stubAdapter_ = stubAdapter;
- return &remoteEventHandler_;
-}
-
-const uint32_t& TestFreedesktopInterfaceStubDefault::getTestPredefinedTypeAttributeAttribute() {
- return testPredefinedTypeAttributeAttributeValue_;
-}
-
-const uint32_t& TestFreedesktopInterfaceStubDefault::getTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId) {
- return getTestPredefinedTypeAttributeAttribute();
-}
-
-void TestFreedesktopInterfaceStubDefault::setTestPredefinedTypeAttributeAttribute(uint32_t value) {
- const bool valueChanged = trySetTestPredefinedTypeAttributeAttribute(std::move(value));
- if (valueChanged) {
- stubAdapter_->fireTestPredefinedTypeAttributeAttributeChanged(testPredefinedTypeAttributeAttributeValue_);
- }
-}
-
-bool TestFreedesktopInterfaceStubDefault::trySetTestPredefinedTypeAttributeAttribute(uint32_t value) {
- if (!validateTestPredefinedTypeAttributeAttributeRequestedValue(value))
- return false;
-
- const bool valueChanged = (testPredefinedTypeAttributeAttributeValue_ != value);
- testPredefinedTypeAttributeAttributeValue_ = std::move(value);
- return valueChanged;
-}
-
-bool TestFreedesktopInterfaceStubDefault::validateTestPredefinedTypeAttributeAttributeRequestedValue(const uint32_t& value) {
- return true;
-}
-
-void TestFreedesktopInterfaceStubDefault::setTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t value) {
- setTestPredefinedTypeAttributeAttribute(value);
-}
-
-void TestFreedesktopInterfaceStubDefault::onRemoteTestPredefinedTypeAttributeAttributeChanged() {
- // No operation in default
-}
-
-void TestFreedesktopInterfaceStubDefault::RemoteEventHandler::onRemoteTestPredefinedTypeAttributeAttributeChanged() {
- defaultStub_->onRemoteTestPredefinedTypeAttributeAttributeChanged();
-}
-
-bool TestFreedesktopInterfaceStubDefault::RemoteEventHandler::onRemoteSetTestPredefinedTypeAttributeAttribute(uint32_t value) {
- return defaultStub_->trySetTestPredefinedTypeAttributeAttribute(std::move(value));
-}
-
-bool TestFreedesktopInterfaceStubDefault::RemoteEventHandler::onRemoteSetTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t value) {
- return onRemoteSetTestPredefinedTypeAttributeAttribute(value);
-}
-
-const uint32_t& TestFreedesktopInterfaceStubDefault::getTestReadonlyAttributeAttribute() {
- return testReadonlyAttributeAttributeValue_;
-}
-
-const uint32_t& TestFreedesktopInterfaceStubDefault::getTestReadonlyAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId) {
- return getTestReadonlyAttributeAttribute();
-}
-
-void TestFreedesktopInterfaceStubDefault::setTestReadonlyAttributeAttribute(uint32_t value) {
- const bool valueChanged = trySetTestReadonlyAttributeAttribute(std::move(value));
- if (valueChanged) {
- stubAdapter_->fireTestReadonlyAttributeAttributeChanged(testReadonlyAttributeAttributeValue_);
- }
-}
-
-bool TestFreedesktopInterfaceStubDefault::trySetTestReadonlyAttributeAttribute(uint32_t value) {
- if (!validateTestReadonlyAttributeAttributeRequestedValue(value))
- return false;
-
- const bool valueChanged = (testReadonlyAttributeAttributeValue_ != value);
- testReadonlyAttributeAttributeValue_ = std::move(value);
- return valueChanged;
-}
-
-bool TestFreedesktopInterfaceStubDefault::validateTestReadonlyAttributeAttributeRequestedValue(const uint32_t& value) {
- return true;
-}
-
-
-const DerivedTypeCollection::TestStructExtended& TestFreedesktopInterfaceStubDefault::getTestDerivedStructAttributeAttribute() {
- return testDerivedStructAttributeAttributeValue_;
-}
-
-const DerivedTypeCollection::TestStructExtended& TestFreedesktopInterfaceStubDefault::getTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId) {
- return getTestDerivedStructAttributeAttribute();
-}
-
-void TestFreedesktopInterfaceStubDefault::setTestDerivedStructAttributeAttribute(DerivedTypeCollection::TestStructExtended value) {
- const bool valueChanged = trySetTestDerivedStructAttributeAttribute(std::move(value));
- if (valueChanged) {
- stubAdapter_->fireTestDerivedStructAttributeAttributeChanged(testDerivedStructAttributeAttributeValue_);
- }
-}
-
-bool TestFreedesktopInterfaceStubDefault::trySetTestDerivedStructAttributeAttribute(DerivedTypeCollection::TestStructExtended value) {
- if (!validateTestDerivedStructAttributeAttributeRequestedValue(value))
- return false;
-
- const bool valueChanged = (testDerivedStructAttributeAttributeValue_ != value);
- testDerivedStructAttributeAttributeValue_ = std::move(value);
- return valueChanged;
-}
-
-bool TestFreedesktopInterfaceStubDefault::validateTestDerivedStructAttributeAttributeRequestedValue(const DerivedTypeCollection::TestStructExtended& value) {
- return true;
-}
-
-void TestFreedesktopInterfaceStubDefault::setTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::TestStructExtended value) {
- setTestDerivedStructAttributeAttribute(value);
-}
-
-void TestFreedesktopInterfaceStubDefault::onRemoteTestDerivedStructAttributeAttributeChanged() {
- // No operation in default
-}
-
-void TestFreedesktopInterfaceStubDefault::RemoteEventHandler::onRemoteTestDerivedStructAttributeAttributeChanged() {
- defaultStub_->onRemoteTestDerivedStructAttributeAttributeChanged();
-}
-
-bool TestFreedesktopInterfaceStubDefault::RemoteEventHandler::onRemoteSetTestDerivedStructAttributeAttribute(DerivedTypeCollection::TestStructExtended value) {
- return defaultStub_->trySetTestDerivedStructAttributeAttribute(std::move(value));
-}
-
-bool TestFreedesktopInterfaceStubDefault::RemoteEventHandler::onRemoteSetTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::TestStructExtended value) {
- return onRemoteSetTestDerivedStructAttributeAttribute(value);
-}
-
-const DerivedTypeCollection::TestArrayUInt64& TestFreedesktopInterfaceStubDefault::getTestDerivedArrayAttributeAttribute() {
- return testDerivedArrayAttributeAttributeValue_;
-}
-
-const DerivedTypeCollection::TestArrayUInt64& TestFreedesktopInterfaceStubDefault::getTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId) {
- return getTestDerivedArrayAttributeAttribute();
-}
-
-void TestFreedesktopInterfaceStubDefault::setTestDerivedArrayAttributeAttribute(DerivedTypeCollection::TestArrayUInt64 value) {
- const bool valueChanged = trySetTestDerivedArrayAttributeAttribute(std::move(value));
- if (valueChanged) {
- stubAdapter_->fireTestDerivedArrayAttributeAttributeChanged(testDerivedArrayAttributeAttributeValue_);
- }
-}
-
-bool TestFreedesktopInterfaceStubDefault::trySetTestDerivedArrayAttributeAttribute(DerivedTypeCollection::TestArrayUInt64 value) {
- if (!validateTestDerivedArrayAttributeAttributeRequestedValue(value))
- return false;
-
- const bool valueChanged = (testDerivedArrayAttributeAttributeValue_ != value);
- testDerivedArrayAttributeAttributeValue_ = std::move(value);
- return valueChanged;
-}
-
-bool TestFreedesktopInterfaceStubDefault::validateTestDerivedArrayAttributeAttributeRequestedValue(const DerivedTypeCollection::TestArrayUInt64& value) {
- return true;
-}
-
-void TestFreedesktopInterfaceStubDefault::setTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::TestArrayUInt64 value) {
- setTestDerivedArrayAttributeAttribute(value);
-}
-
-void TestFreedesktopInterfaceStubDefault::onRemoteTestDerivedArrayAttributeAttributeChanged() {
- // No operation in default
-}
-
-void TestFreedesktopInterfaceStubDefault::RemoteEventHandler::onRemoteTestDerivedArrayAttributeAttributeChanged() {
- defaultStub_->onRemoteTestDerivedArrayAttributeAttributeChanged();
-}
-
-bool TestFreedesktopInterfaceStubDefault::RemoteEventHandler::onRemoteSetTestDerivedArrayAttributeAttribute(DerivedTypeCollection::TestArrayUInt64 value) {
- return defaultStub_->trySetTestDerivedArrayAttributeAttribute(std::move(value));
-}
-
-bool TestFreedesktopInterfaceStubDefault::RemoteEventHandler::onRemoteSetTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::TestArrayUInt64 value) {
- return onRemoteSetTestDerivedArrayAttributeAttribute(value);
-}
-
-
-
-
-
-TestFreedesktopInterfaceStubDefault::RemoteEventHandler::RemoteEventHandler(TestFreedesktopInterfaceStubDefault* defaultStub):
- defaultStub_(defaultStub) {
-}
-
-} // namespace tests
-} // namespace commonapi
diff --git a/src/test/commonapi/tests/TestFreedesktopInterfaceStubDefault.h b/src/test/commonapi/tests/TestFreedesktopInterfaceStubDefault.h
deleted file mode 100644
index 597e176..0000000
--- a/src/test/commonapi/tests/TestFreedesktopInterfaceStubDefault.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_STUB_DEFAULT_H_
-#define COMMONAPI_TESTS_Test_Freedesktop_Interface_STUB_DEFAULT_H_
-
-
-#include <commonapi/tests/TestFreedesktopInterfaceStub.h>
-#include <sstream>
-
-namespace commonapi {
-namespace tests {
-
-/**
- * Provides a default implementation for TestFreedesktopInterfaceStubRemoteEvent and
- * TestFreedesktopInterfaceStub. Method callbacks have an empty implementation,
- * remote set calls on attributes will always change the value of the attribute
- * to the one received.
- *
- * Override this stub if you only want to provide a subset of the functionality
- * that would be defined for this service, and/or if you do not need any non-default
- * behaviour.
- */
-class TestFreedesktopInterfaceStubDefault : public virtual TestFreedesktopInterfaceStub {
-public:
- TestFreedesktopInterfaceStubDefault();
-
- TestFreedesktopInterfaceStubRemoteEvent* initStubAdapter(const std::shared_ptr<TestFreedesktopInterfaceStubAdapter>& stubAdapter);
-
- const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId);
-
- virtual const uint32_t& getTestPredefinedTypeAttributeAttribute();
- virtual const uint32_t& getTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId);
- virtual void setTestPredefinedTypeAttributeAttribute(uint32_t value);
- virtual void setTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t value);
- virtual const uint32_t& getTestReadonlyAttributeAttribute();
- virtual const uint32_t& getTestReadonlyAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId);
- virtual void setTestReadonlyAttributeAttribute(uint32_t value);
- virtual const DerivedTypeCollection::TestStructExtended& getTestDerivedStructAttributeAttribute();
- virtual const DerivedTypeCollection::TestStructExtended& getTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId);
- virtual void setTestDerivedStructAttributeAttribute(DerivedTypeCollection::TestStructExtended value);
- virtual void setTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::TestStructExtended value);
- virtual const DerivedTypeCollection::TestArrayUInt64& getTestDerivedArrayAttributeAttribute();
- virtual const DerivedTypeCollection::TestArrayUInt64& getTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId);
- virtual void setTestDerivedArrayAttributeAttribute(DerivedTypeCollection::TestArrayUInt64 value);
- virtual void setTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::TestArrayUInt64 value);
-
-
-
-
-protected:
- virtual bool trySetTestPredefinedTypeAttributeAttribute(uint32_t value);
- virtual bool validateTestPredefinedTypeAttributeAttributeRequestedValue(const uint32_t& value);
- virtual void onRemoteTestPredefinedTypeAttributeAttributeChanged();
- virtual bool trySetTestReadonlyAttributeAttribute(uint32_t value);
- virtual bool validateTestReadonlyAttributeAttributeRequestedValue(const uint32_t& value);
- virtual bool trySetTestDerivedStructAttributeAttribute(DerivedTypeCollection::TestStructExtended value);
- virtual bool validateTestDerivedStructAttributeAttributeRequestedValue(const DerivedTypeCollection::TestStructExtended& value);
- virtual void onRemoteTestDerivedStructAttributeAttributeChanged();
- virtual bool trySetTestDerivedArrayAttributeAttribute(DerivedTypeCollection::TestArrayUInt64 value);
- virtual bool validateTestDerivedArrayAttributeAttributeRequestedValue(const DerivedTypeCollection::TestArrayUInt64& value);
- virtual void onRemoteTestDerivedArrayAttributeAttributeChanged();
- class RemoteEventHandler: public virtual TestFreedesktopInterfaceStubRemoteEvent {
- public:
- RemoteEventHandler(TestFreedesktopInterfaceStubDefault* defaultStub);
-
- virtual bool onRemoteSetTestPredefinedTypeAttributeAttribute(uint32_t value);
- virtual bool onRemoteSetTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t value);
- virtual void onRemoteTestPredefinedTypeAttributeAttributeChanged();
-
-
- virtual bool onRemoteSetTestDerivedStructAttributeAttribute(DerivedTypeCollection::TestStructExtended value);
- virtual bool onRemoteSetTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::TestStructExtended value);
- virtual void onRemoteTestDerivedStructAttributeAttributeChanged();
-
- virtual bool onRemoteSetTestDerivedArrayAttributeAttribute(DerivedTypeCollection::TestArrayUInt64 value);
- virtual bool onRemoteSetTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::TestArrayUInt64 value);
- virtual void onRemoteTestDerivedArrayAttributeAttributeChanged();
-
-
- private:
- TestFreedesktopInterfaceStubDefault* defaultStub_;
- };
-private:
- TestFreedesktopInterfaceStubDefault::RemoteEventHandler remoteEventHandler_;
-
- uint32_t testPredefinedTypeAttributeAttributeValue_;
- uint32_t testReadonlyAttributeAttributeValue_;
- DerivedTypeCollection::TestStructExtended testDerivedStructAttributeAttributeValue_;
- DerivedTypeCollection::TestArrayUInt64 testDerivedArrayAttributeAttributeValue_;
-
- CommonAPI::Version interfaceVersion_;
-};
-
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_Test_Freedesktop_Interface_STUB_DEFAULT_H_
diff --git a/src/test/commonapi/tests/TestInterface.h b/src/test/commonapi/tests/TestInterface.h
deleted file mode 100644
index 71c065d..0000000
--- a/src/test/commonapi/tests/TestInterface.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_
-
-
-
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <CommonAPI/types.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-
-class TestInterface {
- public:
- virtual ~TestInterface() { }
-
- static inline const char* getInterfaceId();
- static inline CommonAPI::Version getInterfaceVersion();
-};
-
-const char* TestInterface::getInterfaceId() {
- static const char* interfaceId = "commonapi.tests.TestInterface";
- return interfaceId;
-}
-
-CommonAPI::Version TestInterface::getInterfaceVersion() {
- return CommonAPI::Version(1, 0);
-}
-
-
-} // namespace tests
-} // namespace commonapi
-
-namespace CommonAPI {
-
-}
-
-
-namespace std {
- //hashes for types
-
- //hashes for error types
-}
-
-#endif // COMMONAPI_TESTS_Test_Interface_H_
diff --git a/src/test/commonapi/tests/TestInterfaceDBusProxy.cpp b/src/test/commonapi/tests/TestInterfaceDBusProxy.cpp
deleted file mode 100644
index bb0d482..0000000
--- a/src/test/commonapi/tests/TestInterfaceDBusProxy.cpp
+++ /dev/null
@@ -1,245 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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 "TestInterfaceDBusProxy.h"
-
-namespace commonapi {
-namespace tests {
-
-std::shared_ptr<CommonAPI::DBus::DBusProxy> createTestInterfaceDBusProxy(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection) {
- return std::make_shared<TestInterfaceDBusProxy>(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection);
-}
-
-INITIALIZER(registerTestInterfaceDBusProxy) {
- CommonAPI::DBus::DBusFactory::registerProxyFactoryMethod(TestInterface::getInterfaceId(),
- &createTestInterfaceDBusProxy);
-}
-
-TestInterfaceDBusProxy::TestInterfaceDBusProxy(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection):
- CommonAPI::DBus::DBusProxy(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyconnection)
-,testPredefinedTypeAttribute_(*this, "onTestPredefinedTypeAttributeAttributeChanged", "setTestPredefinedTypeAttributeAttribute", "u", "getTestPredefinedTypeAttributeAttribute"),
-testDerivedStructAttribute_(*this, "onTestDerivedStructAttributeAttributeChanged", "setTestDerivedStructAttributeAttribute", "(sqi)", "getTestDerivedStructAttributeAttribute"),
-testDerivedArrayAttribute_(*this, "onTestDerivedArrayAttributeAttributeChanged", "setTestDerivedArrayAttributeAttribute", "at", "getTestDerivedArrayAttributeAttribute")
-, testPredefinedTypeBroadcast_(*this, "TestPredefinedTypeBroadcast", "us"),
- testSelectiveBroadcastSelective_(*this, "TestSelectiveBroadcast", ""),
- testBroadcastWithOutArgsSelective_(*this, "TestBroadcastWithOutArgs", "us")
- {
- }
-
-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& callStatus) {
- CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>,
- CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
- *this,
- "testEmptyMethod",
- "",
- callStatus
- );
-}
-std::future<CommonAPI::CallStatus> TestInterfaceDBusProxy::testEmptyMethodAsync(TestEmptyMethodAsyncCallback callback) {
- return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<>,
- CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
- *this,
- "testEmptyMethod",
- "",
- std::move(callback));
-}
-void TestInterfaceDBusProxy::testVoidPredefinedTypeMethod(const uint32_t& uint32Value, const std::string& stringValue, CommonAPI::CallStatus& callStatus) {
- CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint32_t, std::string>,
- CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
- *this,
- "testVoidPredefinedTypeMethod",
- "us",
- uint32Value, stringValue,
- callStatus
- );
-}
-std::future<CommonAPI::CallStatus> TestInterfaceDBusProxy::testVoidPredefinedTypeMethodAsync(const uint32_t& uint32Value, const std::string& stringValue, TestVoidPredefinedTypeMethodAsyncCallback callback) {
- return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint32_t, std::string>,
- CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
- *this,
- "testVoidPredefinedTypeMethod",
- "us",
- uint32Value, stringValue,
- std::move(callback));
-}
-void TestInterfaceDBusProxy::testPredefinedTypeMethod(const uint32_t& uint32InValue, const std::string& stringInValue, CommonAPI::CallStatus& callStatus, uint32_t& uint32OutValue, std::string& stringOutValue) {
- CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint32_t, std::string>,
- CommonAPI::DBus::DBusSerializableArguments<uint32_t, std::string> >::callMethodWithReply(
- *this,
- "testPredefinedTypeMethod",
- "us",
- uint32InValue, stringInValue,
- callStatus
- , uint32OutValue, stringOutValue);
-}
-std::future<CommonAPI::CallStatus> TestInterfaceDBusProxy::testPredefinedTypeMethodAsync(const uint32_t& uint32InValue, const std::string& stringInValue, TestPredefinedTypeMethodAsyncCallback callback) {
- return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<uint32_t, std::string>,
- CommonAPI::DBus::DBusSerializableArguments<uint32_t, std::string> >::callMethodAsync(
- *this,
- "testPredefinedTypeMethod",
- "us",
- uint32InValue, stringInValue,
- std::move(callback));
-}
-void TestInterfaceDBusProxy::testVoidDerivedTypeMethod(const DerivedTypeCollection::TestEnumExtended2& testEnumExtended2Value, const DerivedTypeCollection::TestMap& testMapValue, CommonAPI::CallStatus& callStatus) {
- CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<DerivedTypeCollection::TestEnumExtended2, DerivedTypeCollection::TestMap>,
- CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
- *this,
- "testVoidDerivedTypeMethod",
- "ia{ua(sq)}",
- testEnumExtended2Value, testMapValue,
- callStatus
- );
-}
-std::future<CommonAPI::CallStatus> TestInterfaceDBusProxy::testVoidDerivedTypeMethodAsync(const DerivedTypeCollection::TestEnumExtended2& testEnumExtended2Value, const DerivedTypeCollection::TestMap& testMapValue, TestVoidDerivedTypeMethodAsyncCallback callback) {
- return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<DerivedTypeCollection::TestEnumExtended2, DerivedTypeCollection::TestMap>,
- CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
- *this,
- "testVoidDerivedTypeMethod",
- "ia{ua(sq)}",
- testEnumExtended2Value, testMapValue,
- std::move(callback));
-}
-void TestInterfaceDBusProxy::testDerivedTypeMethod(const DerivedTypeCollection::TestEnumExtended2& testEnumExtended2InValue, const DerivedTypeCollection::TestMap& testMapInValue, CommonAPI::CallStatus& callStatus, DerivedTypeCollection::TestEnumExtended2& testEnumExtended2OutValue, DerivedTypeCollection::TestMap& testMapOutValue) {
- CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<DerivedTypeCollection::TestEnumExtended2, DerivedTypeCollection::TestMap>,
- CommonAPI::DBus::DBusSerializableArguments<DerivedTypeCollection::TestEnumExtended2, DerivedTypeCollection::TestMap> >::callMethodWithReply(
- *this,
- "testDerivedTypeMethod",
- "ia{ua(sq)}",
- testEnumExtended2InValue, testMapInValue,
- callStatus
- , testEnumExtended2OutValue, testMapOutValue);
-}
-std::future<CommonAPI::CallStatus> TestInterfaceDBusProxy::testDerivedTypeMethodAsync(const DerivedTypeCollection::TestEnumExtended2& testEnumExtended2InValue, const DerivedTypeCollection::TestMap& testMapInValue, TestDerivedTypeMethodAsyncCallback callback) {
- return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<DerivedTypeCollection::TestEnumExtended2, DerivedTypeCollection::TestMap>,
- CommonAPI::DBus::DBusSerializableArguments<DerivedTypeCollection::TestEnumExtended2, DerivedTypeCollection::TestMap> >::callMethodAsync(
- *this,
- "testDerivedTypeMethod",
- "ia{ua(sq)}",
- testEnumExtended2InValue, testMapInValue,
- std::move(callback));
-}
-void TestInterfaceDBusProxy::TestArrayOfPolymorphicStructMethod(const std::vector<std::shared_ptr<DerivedTypeCollection::TestPolymorphicStruct>>& inArray, CommonAPI::CallStatus& callStatus) {
- CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::vector<std::shared_ptr<DerivedTypeCollection::TestPolymorphicStruct>>>,
- CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
- *this,
- "TestArrayOfPolymorphicStructMethod",
- "a(uv)",
- inArray,
- callStatus
- );
-}
-std::future<CommonAPI::CallStatus> TestInterfaceDBusProxy::TestArrayOfPolymorphicStructMethodAsync(const std::vector<std::shared_ptr<DerivedTypeCollection::TestPolymorphicStruct>>& inArray, TestArrayOfPolymorphicStructMethodAsyncCallback callback) {
- return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<std::vector<std::shared_ptr<DerivedTypeCollection::TestPolymorphicStruct>>>,
- CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
- *this,
- "TestArrayOfPolymorphicStructMethod",
- "a(uv)",
- inArray,
- std::move(callback));
-}
-void TestInterfaceDBusProxy::TestMapOfPolymorphicStructMethod(const DerivedTypeCollection::MapIntToPolymorphic& inMap, CommonAPI::CallStatus& callStatus) {
- CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<DerivedTypeCollection::MapIntToPolymorphic>,
- CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
- *this,
- "TestMapOfPolymorphicStructMethod",
- "a{y(uv)}",
- inMap,
- callStatus
- );
-}
-std::future<CommonAPI::CallStatus> TestInterfaceDBusProxy::TestMapOfPolymorphicStructMethodAsync(const DerivedTypeCollection::MapIntToPolymorphic& inMap, TestMapOfPolymorphicStructMethodAsyncCallback callback) {
- return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<DerivedTypeCollection::MapIntToPolymorphic>,
- CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
- *this,
- "TestMapOfPolymorphicStructMethod",
- "a{y(uv)}",
- inMap,
- std::move(callback));
-}
-void TestInterfaceDBusProxy::TestStructWithPolymorphicMemberMethod(const DerivedTypeCollection::StructWithPolymorphicMember& inStruct, CommonAPI::CallStatus& callStatus) {
- CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<DerivedTypeCollection::StructWithPolymorphicMember>,
- CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
- *this,
- "TestStructWithPolymorphicMemberMethod",
- "(u(uv))",
- inStruct,
- callStatus
- );
-}
-std::future<CommonAPI::CallStatus> TestInterfaceDBusProxy::TestStructWithPolymorphicMemberMethodAsync(const DerivedTypeCollection::StructWithPolymorphicMember& inStruct, TestStructWithPolymorphicMemberMethodAsyncCallback callback) {
- return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<DerivedTypeCollection::StructWithPolymorphicMember>,
- CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
- *this,
- "TestStructWithPolymorphicMemberMethod",
- "(u(uv))",
- inStruct,
- std::move(callback));
-}
-void TestInterfaceDBusProxy::TestStructWithEnumKeyMapMember(const DerivedTypeCollection::StructWithEnumKeyMap& inStruct, CommonAPI::CallStatus& callStatus) {
- CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<DerivedTypeCollection::StructWithEnumKeyMap>,
- CommonAPI::DBus::DBusSerializableArguments<> >::callMethodWithReply(
- *this,
- "TestStructWithEnumKeyMapMember",
- "(a{is})",
- inStruct,
- callStatus
- );
-}
-std::future<CommonAPI::CallStatus> TestInterfaceDBusProxy::TestStructWithEnumKeyMapMemberAsync(const DerivedTypeCollection::StructWithEnumKeyMap& inStruct, TestStructWithEnumKeyMapMemberAsyncCallback callback) {
- return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<DerivedTypeCollection::StructWithEnumKeyMap>,
- CommonAPI::DBus::DBusSerializableArguments<> >::callMethodAsync(
- *this,
- "TestStructWithEnumKeyMapMember",
- "(a{is})",
- inStruct,
- std::move(callback));
-}
-
-
-
-void TestInterfaceDBusProxy::getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const {
- ownVersionMajor = 1;
- ownVersionMinor = 0;
-}
-
-} // namespace tests
-} // namespace commonapi
diff --git a/src/test/commonapi/tests/TestInterfaceDBusProxy.h b/src/test/commonapi/tests/TestInterfaceDBusProxy.h
deleted file mode 100644
index 3535339..0000000
--- a/src/test/commonapi/tests/TestInterfaceDBusProxy.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_
-
-#include <commonapi/tests/TestInterfaceProxyBase.h>
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <CommonAPI/DBus/DBusFactory.h>
-#include <CommonAPI/DBus/DBusProxy.h>
-#include <CommonAPI/DBus/DBusAttribute.h>
-#include <CommonAPI/DBus/DBusEvent.h>
-#include <CommonAPI/types.h>
-#include <CommonAPI/DBus/DBusSelectiveEvent.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-#include <string>
-
-namespace commonapi {
-namespace tests {
-
-class TestInterfaceDBusProxy: virtual public TestInterfaceProxyBase, virtual public CommonAPI::DBus::DBusProxy {
- public:
- TestInterfaceDBusProxy(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection);
-
- 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& 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 TestArrayOfPolymorphicStructMethod(const std::vector<std::shared_ptr<DerivedTypeCollection::TestPolymorphicStruct>>& inArray, CommonAPI::CallStatus& callStatus);
- virtual std::future<CommonAPI::CallStatus> TestArrayOfPolymorphicStructMethodAsync(const std::vector<std::shared_ptr<DerivedTypeCollection::TestPolymorphicStruct>>& inArray, TestArrayOfPolymorphicStructMethodAsyncCallback callback);
- virtual void TestMapOfPolymorphicStructMethod(const DerivedTypeCollection::MapIntToPolymorphic& inMap, CommonAPI::CallStatus& callStatus);
- virtual std::future<CommonAPI::CallStatus> TestMapOfPolymorphicStructMethodAsync(const DerivedTypeCollection::MapIntToPolymorphic& inMap, TestMapOfPolymorphicStructMethodAsyncCallback callback);
- virtual void TestStructWithPolymorphicMemberMethod(const DerivedTypeCollection::StructWithPolymorphicMember& inStruct, CommonAPI::CallStatus& callStatus);
- virtual std::future<CommonAPI::CallStatus> TestStructWithPolymorphicMemberMethodAsync(const DerivedTypeCollection::StructWithPolymorphicMember& inStruct, TestStructWithPolymorphicMemberMethodAsyncCallback callback);
- virtual void TestStructWithEnumKeyMapMember(const DerivedTypeCollection::StructWithEnumKeyMap& inStruct, CommonAPI::CallStatus& callStatus);
- virtual std::future<CommonAPI::CallStatus> TestStructWithEnumKeyMapMemberAsync(const DerivedTypeCollection::StructWithEnumKeyMap& inStruct, TestStructWithEnumKeyMapMemberAsyncCallback callback);
-
-
- 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>> testDerivedStructAttribute_;
- CommonAPI::DBus::DBusObservableAttribute<CommonAPI::DBus::DBusAttribute<TestDerivedArrayAttributeAttribute>> testDerivedArrayAttribute_;
-
- CommonAPI::DBus::DBusEvent<TestPredefinedTypeBroadcastEvent> testPredefinedTypeBroadcast_;
- CommonAPI::DBus::DBusSelectiveEvent<TestSelectiveBroadcastSelectiveEvent> testSelectiveBroadcastSelective_;
- CommonAPI::DBus::DBusSelectiveEvent<TestBroadcastWithOutArgsSelectiveEvent> testBroadcastWithOutArgsSelective_;
-
-};
-
-
-
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_Test_Interface_DBUS_PROXY_H_
diff --git a/src/test/commonapi/tests/TestInterfaceDBusStubAdapter.cpp b/src/test/commonapi/tests/TestInterfaceDBusStubAdapter.cpp
deleted file mode 100644
index 9cd1cf9..0000000
--- a/src/test/commonapi/tests/TestInterfaceDBusStubAdapter.cpp
+++ /dev/null
@@ -1,469 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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 "TestInterfaceDBusStubAdapter.h"
-#include <commonapi/tests/TestInterface.h>
-
-namespace commonapi {
-namespace tests {
-
-std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> createTestInterfaceDBusStubAdapter(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stubBase) {
- return std::make_shared<TestInterfaceDBusStubAdapter>(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection, stubBase);
-}
-
-INITIALIZER(registerTestInterfaceDBusStubAdapter) {
- CommonAPI::DBus::DBusFactory::registerAdapterFactoryMethod(TestInterface::getInterfaceId(),
- &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<
- TestInterfaceStub,
- CommonAPI::Version
- > TestInterfaceDBusStubAdapterInternal::getTestInterfaceInterfaceVersionStubDispatcher(&TestInterfaceStub::getInterfaceVersion, "uu");
-
-CommonAPI::DBus::DBusGetAttributeStubDispatcher<
- TestInterfaceStub,
- uint32_t
- > TestInterfaceDBusStubAdapterInternal::getTestPredefinedTypeAttributeAttributeStubDispatcher(&TestInterfaceStub::getTestPredefinedTypeAttributeAttribute, "u");
-CommonAPI::DBus::DBusSetObservableAttributeStubDispatcher<
- TestInterfaceStub,
- uint32_t
- > TestInterfaceDBusStubAdapterInternal::setTestPredefinedTypeAttributeAttributeStubDispatcher(
- &TestInterfaceStub::getTestPredefinedTypeAttributeAttribute,
- &TestInterfaceStubRemoteEvent::onRemoteSetTestPredefinedTypeAttributeAttribute,
- &TestInterfaceStubRemoteEvent::onRemoteTestPredefinedTypeAttributeAttributeChanged
- ,&TestInterfaceStubAdapter::fireTestPredefinedTypeAttributeAttributeChanged
- ,"u"
- );
-CommonAPI::DBus::DBusGetAttributeStubDispatcher<
- TestInterfaceStub,
- DerivedTypeCollection::TestStructExtended
- > TestInterfaceDBusStubAdapterInternal::getTestDerivedStructAttributeAttributeStubDispatcher(&TestInterfaceStub::getTestDerivedStructAttributeAttribute, "(sqi)");
-CommonAPI::DBus::DBusSetObservableAttributeStubDispatcher<
- TestInterfaceStub,
- DerivedTypeCollection::TestStructExtended
- > TestInterfaceDBusStubAdapterInternal::setTestDerivedStructAttributeAttributeStubDispatcher(
- &TestInterfaceStub::getTestDerivedStructAttributeAttribute,
- &TestInterfaceStubRemoteEvent::onRemoteSetTestDerivedStructAttributeAttribute,
- &TestInterfaceStubRemoteEvent::onRemoteTestDerivedStructAttributeAttributeChanged
- ,&TestInterfaceStubAdapter::fireTestDerivedStructAttributeAttributeChanged
- ,"(sqi)"
- );
-CommonAPI::DBus::DBusGetAttributeStubDispatcher<
- TestInterfaceStub,
- DerivedTypeCollection::TestArrayUInt64
- > TestInterfaceDBusStubAdapterInternal::getTestDerivedArrayAttributeAttributeStubDispatcher(&TestInterfaceStub::getTestDerivedArrayAttributeAttribute, "at");
-CommonAPI::DBus::DBusSetObservableAttributeStubDispatcher<
- TestInterfaceStub,
- DerivedTypeCollection::TestArrayUInt64
- > TestInterfaceDBusStubAdapterInternal::setTestDerivedArrayAttributeAttributeStubDispatcher(
- &TestInterfaceStub::getTestDerivedArrayAttributeAttribute,
- &TestInterfaceStubRemoteEvent::onRemoteSetTestDerivedArrayAttributeAttribute,
- &TestInterfaceStubRemoteEvent::onRemoteTestDerivedArrayAttributeAttributeChanged
- ,&TestInterfaceStubAdapter::fireTestDerivedArrayAttributeAttributeChanged
- ,"at"
- );
-
-
-CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- TestInterfaceStub,
- std::tuple<>,
- std::tuple<>
- > TestInterfaceDBusStubAdapterInternal::testEmptyMethodStubDispatcher(&TestInterfaceStub::testEmptyMethod, "");
-CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- TestInterfaceStub,
- std::tuple<uint32_t, std::string>,
- std::tuple<>
- > TestInterfaceDBusStubAdapterInternal::testVoidPredefinedTypeMethodStubDispatcher(&TestInterfaceStub::testVoidPredefinedTypeMethod, "");
-CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- TestInterfaceStub,
- std::tuple<uint32_t, std::string>,
- std::tuple<uint32_t, std::string>
- > TestInterfaceDBusStubAdapterInternal::testPredefinedTypeMethodStubDispatcher(&TestInterfaceStub::testPredefinedTypeMethod, "us");
-CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- TestInterfaceStub,
- std::tuple<DerivedTypeCollection::TestEnumExtended2, DerivedTypeCollection::TestMap>,
- std::tuple<>
- > TestInterfaceDBusStubAdapterInternal::testVoidDerivedTypeMethodStubDispatcher(&TestInterfaceStub::testVoidDerivedTypeMethod, "");
-CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- TestInterfaceStub,
- std::tuple<DerivedTypeCollection::TestEnumExtended2, DerivedTypeCollection::TestMap>,
- std::tuple<DerivedTypeCollection::TestEnumExtended2, DerivedTypeCollection::TestMap>
- > TestInterfaceDBusStubAdapterInternal::testDerivedTypeMethodStubDispatcher(&TestInterfaceStub::testDerivedTypeMethod, "ia{ua(sq)}");
-CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- TestInterfaceStub,
- std::tuple<std::vector<std::shared_ptr<DerivedTypeCollection::TestPolymorphicStruct>>>,
- std::tuple<>
- > TestInterfaceDBusStubAdapterInternal::testArrayOfPolymorphicStructMethodStubDispatcher(&TestInterfaceStub::TestArrayOfPolymorphicStructMethod, "");
-CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- TestInterfaceStub,
- std::tuple<DerivedTypeCollection::MapIntToPolymorphic>,
- std::tuple<>
- > TestInterfaceDBusStubAdapterInternal::testMapOfPolymorphicStructMethodStubDispatcher(&TestInterfaceStub::TestMapOfPolymorphicStructMethod, "");
-CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- TestInterfaceStub,
- std::tuple<DerivedTypeCollection::StructWithPolymorphicMember>,
- std::tuple<>
- > TestInterfaceDBusStubAdapterInternal::testStructWithPolymorphicMemberMethodStubDispatcher(&TestInterfaceStub::TestStructWithPolymorphicMemberMethod, "");
-CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- TestInterfaceStub,
- std::tuple<DerivedTypeCollection::StructWithEnumKeyMap>,
- std::tuple<>
- > TestInterfaceDBusStubAdapterInternal::testStructWithEnumKeyMapMemberStubDispatcher(&TestInterfaceStub::TestStructWithEnumKeyMapMember, "");
-
-
-void TestInterfaceDBusStubAdapterInternal::fireTestPredefinedTypeAttributeAttributeChanged(const uint32_t& value) {
- CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<uint32_t>>
- ::sendSignal(
- *this,
- "onTestPredefinedTypeAttributeAttributeChanged",
- "u",
- value
- );
-}
-void TestInterfaceDBusStubAdapterInternal::fireTestDerivedStructAttributeAttributeChanged(const DerivedTypeCollection::TestStructExtended& value) {
- CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<DerivedTypeCollection::TestStructExtended>>
- ::sendSignal(
- *this,
- "onTestDerivedStructAttributeAttributeChanged",
- "(sqi)",
- value
- );
-}
-void TestInterfaceDBusStubAdapterInternal::fireTestDerivedArrayAttributeAttributeChanged(const DerivedTypeCollection::TestArrayUInt64& value) {
- CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<DerivedTypeCollection::TestArrayUInt64>>
- ::sendSignal(
- *this,
- "onTestDerivedArrayAttributeAttributeChanged",
- "at",
- value
- );
-}
-
-void TestInterfaceDBusStubAdapterInternal::fireTestPredefinedTypeBroadcastEvent(const uint32_t& uint32Value, const std::string& stringValue) {
- CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<uint32_t, std::string>>
- ::sendSignal(
- *this,
- "TestPredefinedTypeBroadcast",
- "us",
- uint32Value, stringValue
- );
-}
-CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher<
- TestInterfaceStub,
- TestInterfaceStubAdapter,
- std::tuple<>,
- std::tuple<bool>
- > TestInterfaceDBusStubAdapterInternal::subscribeTestSelectiveBroadcastSelectiveStubDispatcher(&TestInterfaceStubAdapter::subscribeForTestSelectiveBroadcastSelective, "b");
-
-CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher<
- TestInterfaceStub,
- TestInterfaceStubAdapter,
- std::tuple<>,
- std::tuple<>
- > TestInterfaceDBusStubAdapterInternal::unsubscribeTestSelectiveBroadcastSelectiveStubDispatcher(&TestInterfaceStubAdapter::unsubscribeFromTestSelectiveBroadcastSelective, "");
-
-void TestInterfaceDBusStubAdapterInternal::fireTestSelectiveBroadcastSelective(const std::shared_ptr<CommonAPI::ClientId> clientId) {
- std::shared_ptr<CommonAPI::DBus::DBusClientId> dbusClientId = std::dynamic_pointer_cast<CommonAPI::DBus::DBusClientId, CommonAPI::ClientId>(clientId);
-
- if(dbusClientId)
- {
- CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<>>
- ::sendSignal(
- dbusClientId->getDBusId(),
- *this,
- "TestSelectiveBroadcast",
- ""
- );
- }
-}
-
-void TestInterfaceDBusStubAdapterInternal::sendTestSelectiveBroadcastSelective(const std::shared_ptr<CommonAPI::ClientIdList> receivers) {
- std::shared_ptr<CommonAPI::ClientIdList> actualReceiverList;
- actualReceiverList = receivers;
-
- if(receivers == NULL)
- actualReceiverList = subscribersForTestSelectiveBroadcastSelective_;
-
- for (auto clientIdIterator = actualReceiverList->cbegin();
- clientIdIterator != actualReceiverList->cend();
- clientIdIterator++) {
- if(receivers == NULL || subscribersForTestSelectiveBroadcastSelective_->find(*clientIdIterator) != subscribersForTestSelectiveBroadcastSelective_->end()) {
- fireTestSelectiveBroadcastSelective(*clientIdIterator);
- }
- }
-}
-
-void TestInterfaceDBusStubAdapterInternal::subscribeForTestSelectiveBroadcastSelective(const std::shared_ptr<CommonAPI::ClientId> clientId, bool& success) {
- auto stub = stub_.lock();
- bool ok = stub->onTestSelectiveBroadcastSelectiveSubscriptionRequested(clientId);
- if (ok) {
- subscribersForTestSelectiveBroadcastSelective_->insert(clientId);
- stub->onTestSelectiveBroadcastSelectiveSubscriptionChanged(clientId, CommonAPI::SelectiveBroadcastSubscriptionEvent::SUBSCRIBED);
- success = true;
- } else {
- success = false;
- }
-}
-
-
-void TestInterfaceDBusStubAdapterInternal::unsubscribeFromTestSelectiveBroadcastSelective(const std::shared_ptr<CommonAPI::ClientId> clientId) {
- subscribersForTestSelectiveBroadcastSelective_->erase(clientId);
- auto stub = stub_.lock();
- stub->onTestSelectiveBroadcastSelectiveSubscriptionChanged(clientId, CommonAPI::SelectiveBroadcastSubscriptionEvent::UNSUBSCRIBED);
-}
-
-std::shared_ptr<CommonAPI::ClientIdList> const TestInterfaceDBusStubAdapterInternal::getSubscribersForTestSelectiveBroadcastSelective() {
- return subscribersForTestSelectiveBroadcastSelective_;
-}
-
-CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher<
- TestInterfaceStub,
- TestInterfaceStubAdapter,
- std::tuple<>,
- std::tuple<bool>
- > TestInterfaceDBusStubAdapterInternal::subscribeTestBroadcastWithOutArgsSelectiveStubDispatcher(&TestInterfaceStubAdapter::subscribeForTestBroadcastWithOutArgsSelective, "b");
-
-CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher<
- TestInterfaceStub,
- TestInterfaceStubAdapter,
- std::tuple<>,
- std::tuple<>
- > TestInterfaceDBusStubAdapterInternal::unsubscribeTestBroadcastWithOutArgsSelectiveStubDispatcher(&TestInterfaceStubAdapter::unsubscribeFromTestBroadcastWithOutArgsSelective, "");
-
-void TestInterfaceDBusStubAdapterInternal::fireTestBroadcastWithOutArgsSelective(const std::shared_ptr<CommonAPI::ClientId> clientId, const uint32_t& uint32Value, const std::string& stringValue) {
- std::shared_ptr<CommonAPI::DBus::DBusClientId> dbusClientId = std::dynamic_pointer_cast<CommonAPI::DBus::DBusClientId, CommonAPI::ClientId>(clientId);
-
- if(dbusClientId)
- {
- CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<uint32_t, std::string>>
- ::sendSignal(
- dbusClientId->getDBusId(),
- *this,
- "TestBroadcastWithOutArgs",
- "us",
- uint32Value, stringValue
- );
- }
-}
-
-void TestInterfaceDBusStubAdapterInternal::sendTestBroadcastWithOutArgsSelective(const uint32_t& uint32Value, const std::string& stringValue, const std::shared_ptr<CommonAPI::ClientIdList> receivers) {
- std::shared_ptr<CommonAPI::ClientIdList> actualReceiverList;
- actualReceiverList = receivers;
-
- if(receivers == NULL)
- actualReceiverList = subscribersForTestBroadcastWithOutArgsSelective_;
-
- for (auto clientIdIterator = actualReceiverList->cbegin();
- clientIdIterator != actualReceiverList->cend();
- clientIdIterator++) {
- if(receivers == NULL || subscribersForTestBroadcastWithOutArgsSelective_->find(*clientIdIterator) != subscribersForTestBroadcastWithOutArgsSelective_->end()) {
- fireTestBroadcastWithOutArgsSelective(*clientIdIterator, uint32Value, stringValue);
- }
- }
-}
-
-void TestInterfaceDBusStubAdapterInternal::subscribeForTestBroadcastWithOutArgsSelective(const std::shared_ptr<CommonAPI::ClientId> clientId, bool& success) {
- auto stub = stub_.lock();
- bool ok = stub->onTestBroadcastWithOutArgsSelectiveSubscriptionRequested(clientId);
- if (ok) {
- subscribersForTestBroadcastWithOutArgsSelective_->insert(clientId);
- stub->onTestBroadcastWithOutArgsSelectiveSubscriptionChanged(clientId, CommonAPI::SelectiveBroadcastSubscriptionEvent::SUBSCRIBED);
- success = true;
- } else {
- success = false;
- }
-}
-
-
-void TestInterfaceDBusStubAdapterInternal::unsubscribeFromTestBroadcastWithOutArgsSelective(const std::shared_ptr<CommonAPI::ClientId> clientId) {
- subscribersForTestBroadcastWithOutArgsSelective_->erase(clientId);
- auto stub = stub_.lock();
- 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 std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& dbusInterfaceName,
- const std::string& dbusBusName,
- const std::string& dbusObjectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stub):
- CommonAPI::DBus::DBusStubAdapter(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- false),
- TestInterfaceDBusStubAdapterHelper(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- 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 });
-}
-
-const bool TestInterfaceDBusStubAdapterInternal::hasFreedesktopProperties() {
- return false;
-}
-
-} // namespace tests
-} // namespace commonapi
diff --git a/src/test/commonapi/tests/TestInterfaceDBusStubAdapter.h b/src/test/commonapi/tests/TestInterfaceDBusStubAdapter.h
deleted file mode 100644
index 44c87e9..0000000
--- a/src/test/commonapi/tests/TestInterfaceDBusStubAdapter.h
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_
-
-#include <commonapi/tests/TestInterfaceStub.h>
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <CommonAPI/DBus/DBusStubAdapterHelper.h>
-#include <CommonAPI/DBus/DBusStubAdapter.h>
-#include <CommonAPI/DBus/DBusFactory.h>
-#include <CommonAPI/DBus/DBusServicePublisher.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-
-typedef CommonAPI::DBus::DBusStubAdapterHelper<TestInterfaceStub> TestInterfaceDBusStubAdapterHelper;
-
-class TestInterfaceDBusStubAdapterInternal: public virtual TestInterfaceStubAdapter, public TestInterfaceDBusStubAdapterHelper {
- public:
- TestInterfaceDBusStubAdapterInternal(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& dbusInterfaceName,
- const std::string& dbusBusName,
- const std::string& dbusObjectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stub);
-
- ~TestInterfaceDBusStubAdapterInternal();
-
- virtual const bool hasFreedesktopProperties();
-
- void fireTestPredefinedTypeAttributeAttributeChanged(const uint32_t& value);
- void fireTestDerivedStructAttributeAttributeChanged(const DerivedTypeCollection::TestStructExtended& value);
- void fireTestDerivedArrayAttributeAttributeChanged(const DerivedTypeCollection::TestArrayUInt64& value);
-
- void fireTestPredefinedTypeBroadcastEvent(const uint32_t& uint32Value, const std::string& stringValue);
- void fireTestSelectiveBroadcastSelective(const std::shared_ptr<CommonAPI::ClientId> clientId);
- void sendTestSelectiveBroadcastSelective(const std::shared_ptr<CommonAPI::ClientIdList> receivers = NULL);
- 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> clientId, 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 = NULL);
- 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<
- TestInterfaceStub,
- CommonAPI::Version
- > getTestInterfaceInterfaceVersionStubDispatcher;
-
-static CommonAPI::DBus::DBusGetAttributeStubDispatcher<
- TestInterfaceStub,
- uint32_t
- > getTestPredefinedTypeAttributeAttributeStubDispatcher;
-static CommonAPI::DBus::DBusSetObservableAttributeStubDispatcher<
- TestInterfaceStub,
- uint32_t
- > setTestPredefinedTypeAttributeAttributeStubDispatcher;
-static CommonAPI::DBus::DBusGetAttributeStubDispatcher<
- TestInterfaceStub,
- DerivedTypeCollection::TestStructExtended
- > getTestDerivedStructAttributeAttributeStubDispatcher;
-static CommonAPI::DBus::DBusSetObservableAttributeStubDispatcher<
- TestInterfaceStub,
- DerivedTypeCollection::TestStructExtended
- > setTestDerivedStructAttributeAttributeStubDispatcher;
-static CommonAPI::DBus::DBusGetAttributeStubDispatcher<
- TestInterfaceStub,
- DerivedTypeCollection::TestArrayUInt64
- > getTestDerivedArrayAttributeAttributeStubDispatcher;
-static CommonAPI::DBus::DBusSetObservableAttributeStubDispatcher<
- TestInterfaceStub,
- DerivedTypeCollection::TestArrayUInt64
- > setTestDerivedArrayAttributeAttributeStubDispatcher;
-
-
-static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- TestInterfaceStub,
- std::tuple<>,
- std::tuple<>
- > testEmptyMethodStubDispatcher;
-static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- TestInterfaceStub,
- std::tuple<uint32_t, std::string>,
- std::tuple<>
- > testVoidPredefinedTypeMethodStubDispatcher;
-static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- TestInterfaceStub,
- std::tuple<uint32_t, std::string>,
- std::tuple<uint32_t, std::string>
- > testPredefinedTypeMethodStubDispatcher;
-static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- TestInterfaceStub,
- std::tuple<DerivedTypeCollection::TestEnumExtended2, DerivedTypeCollection::TestMap>,
- std::tuple<>
- > testVoidDerivedTypeMethodStubDispatcher;
-static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- TestInterfaceStub,
- std::tuple<DerivedTypeCollection::TestEnumExtended2, DerivedTypeCollection::TestMap>,
- std::tuple<DerivedTypeCollection::TestEnumExtended2, DerivedTypeCollection::TestMap>
- > testDerivedTypeMethodStubDispatcher;
-static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- TestInterfaceStub,
- std::tuple<std::vector<std::shared_ptr<DerivedTypeCollection::TestPolymorphicStruct>>>,
- std::tuple<>
- > testArrayOfPolymorphicStructMethodStubDispatcher;
-static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- TestInterfaceStub,
- std::tuple<DerivedTypeCollection::MapIntToPolymorphic>,
- std::tuple<>
- > testMapOfPolymorphicStructMethodStubDispatcher;
-static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- TestInterfaceStub,
- std::tuple<DerivedTypeCollection::StructWithPolymorphicMember>,
- std::tuple<>
- > testStructWithPolymorphicMemberMethodStubDispatcher;
-static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- TestInterfaceStub,
- std::tuple<DerivedTypeCollection::StructWithEnumKeyMap>,
- std::tuple<>
- > testStructWithEnumKeyMapMemberStubDispatcher;
-
-
-static CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher<
- TestInterfaceStub,
- TestInterfaceStubAdapter,
- std::tuple<>,
- std::tuple<bool>
- > subscribeTestSelectiveBroadcastSelectiveStubDispatcher;
-
-static CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher<
- TestInterfaceStub,
- TestInterfaceStubAdapter,
- std::tuple<>,
- std::tuple<>
- > unsubscribeTestSelectiveBroadcastSelectiveStubDispatcher;
-static CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher<
- TestInterfaceStub,
- TestInterfaceStubAdapter,
- std::tuple<>,
- std::tuple<bool>
- > subscribeTestBroadcastWithOutArgsSelectiveStubDispatcher;
-
-static CommonAPI::DBus::DBusMethodWithReplyAdapterDispatcher<
- 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 std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& dbusInterfaceName,
- const std::string& dbusBusName,
- const std::string& dbusObjectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stub) :
- CommonAPI::DBus::DBusStubAdapter(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- false),
- TestInterfaceDBusStubAdapterInternal(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- stub) { }
-};
-
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_Test_Interface_DBUS_STUB_ADAPTER_H_
diff --git a/src/test/commonapi/tests/TestInterfaceProxy.h b/src/test/commonapi/tests/TestInterfaceProxy.h
deleted file mode 100644
index 60b5691..0000000
--- a/src/test/commonapi/tests/TestInterfaceProxy.h
+++ /dev/null
@@ -1,531 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_
-
-#include "TestInterfaceProxyBase.h"
-
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <CommonAPI/AttributeExtension.h>
-#include <CommonAPI/Factory.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-
-template <typename ... _AttributeExtensions>
-class TestInterfaceProxy: virtual public TestInterface, virtual public TestInterfaceProxyBase
-, public _AttributeExtensions... {
-public:
- TestInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate);
- ~TestInterfaceProxy();
-
- typedef TestInterface InterfaceType;
-
-
- /**
- * Returns the wrapper class that provides access to the attribute TestPredefinedTypeAttribute.
- */
- virtual TestPredefinedTypeAttributeAttribute& getTestPredefinedTypeAttributeAttribute() {
- return delegate_->getTestPredefinedTypeAttributeAttribute();
- }
- /**
- * Returns the wrapper class that provides access to the attribute TestDerivedStructAttribute.
- */
- virtual TestDerivedStructAttributeAttribute& getTestDerivedStructAttributeAttribute() {
- return delegate_->getTestDerivedStructAttributeAttribute();
- }
- /**
- * Returns the wrapper class that provides access to the attribute TestDerivedArrayAttribute.
- */
- virtual TestDerivedArrayAttributeAttribute& getTestDerivedArrayAttributeAttribute() {
- return delegate_->getTestDerivedArrayAttributeAttribute();
- }
-
- /**
- * Returns the wrapper class that provides access to the broadcast TestPredefinedTypeBroadcast.
- */
- virtual TestPredefinedTypeBroadcastEvent& getTestPredefinedTypeBroadcastEvent() {
- return delegate_->getTestPredefinedTypeBroadcastEvent();
- }
- /**
- * Returns the wrapper class that provides access to the broadcast TestSelectiveBroadcast.
- */
- virtual TestSelectiveBroadcastSelectiveEvent& getTestSelectiveBroadcastSelectiveEvent() {
- return delegate_->getTestSelectiveBroadcastSelectiveEvent();
- }
- /**
- * Returns the wrapper class that provides access to the broadcast TestBroadcastWithOutArgs.
- */
- virtual TestBroadcastWithOutArgsSelectiveEvent& getTestBroadcastWithOutArgsSelectiveEvent() {
- return delegate_->getTestBroadcastWithOutArgsSelectiveEvent();
- }
-
- /**
- * Calls testEmptyMethod with synchronous semantics.
- *
- * The CallStatus will be filled when the method returns and indicate either
- * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
- * will be set.
- */
- virtual void testEmptyMethod(CommonAPI::CallStatus& callStatus);
- /**
- * Calls testEmptyMethod with asynchronous semantics.
- *
- * The provided callback will be called when the reply to this call arrives or
- * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
- * or which type of error has occurred. In case of any error, ONLY the CallStatus
- * will have a defined value.
- * The std::future returned by this method will be fulfilled at arrival of the reply.
- * It will provide the same value for CallStatus as will be handed to the callback.
- */
- virtual std::future<CommonAPI::CallStatus> testEmptyMethodAsync(TestEmptyMethodAsyncCallback callback);
- /**
- * Calls testVoidPredefinedTypeMethod with synchronous semantics.
- *
- * All const parameters are input parameters to this method.
- * The CallStatus will be filled when the method returns and indicate either
- * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
- * will be set.
- */
- virtual void testVoidPredefinedTypeMethod(const uint32_t& uint32Value, const std::string& stringValue, CommonAPI::CallStatus& callStatus);
- /**
- * Calls testVoidPredefinedTypeMethod with asynchronous semantics.
- *
- * The provided callback will be called when the reply to this call arrives or
- * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
- * or which type of error has occurred. In case of any error, ONLY the CallStatus
- * will have a defined value.
- * The std::future returned by this method will be fulfilled at arrival of the reply.
- * It will provide the same value for CallStatus as will be handed to the callback.
- */
- virtual std::future<CommonAPI::CallStatus> testVoidPredefinedTypeMethodAsync(const uint32_t& uint32Value, const std::string& stringValue, TestVoidPredefinedTypeMethodAsyncCallback callback);
- /**
- * Calls testPredefinedTypeMethod with synchronous semantics.
- *
- * All const parameters are input parameters to this method.
- * All non-const parameters will be filled with the returned values.
- * The CallStatus will be filled when the method returns and indicate either
- * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
- * will be set.
- */
- virtual void testPredefinedTypeMethod(const uint32_t& uint32InValue, const std::string& stringInValue, CommonAPI::CallStatus& callStatus, uint32_t& uint32OutValue, std::string& stringOutValue);
- /**
- * Calls testPredefinedTypeMethod with asynchronous semantics.
- *
- * The provided callback will be called when the reply to this call arrives or
- * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
- * or which type of error has occurred. In case of any error, ONLY the CallStatus
- * will have a defined value.
- * The std::future returned by this method will be fulfilled at arrival of the reply.
- * It will provide the same value for CallStatus as will be handed to the callback.
- */
- virtual std::future<CommonAPI::CallStatus> testPredefinedTypeMethodAsync(const uint32_t& uint32InValue, const std::string& stringInValue, TestPredefinedTypeMethodAsyncCallback callback);
- /**
- * Calls testVoidDerivedTypeMethod with synchronous semantics.
- *
- * All const parameters are input parameters to this method.
- * The CallStatus will be filled when the method returns and indicate either
- * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
- * will be set.
- */
- virtual void testVoidDerivedTypeMethod(const DerivedTypeCollection::TestEnumExtended2& testEnumExtended2Value, const DerivedTypeCollection::TestMap& testMapValue, CommonAPI::CallStatus& callStatus);
- /**
- * Calls testVoidDerivedTypeMethod with asynchronous semantics.
- *
- * The provided callback will be called when the reply to this call arrives or
- * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
- * or which type of error has occurred. In case of any error, ONLY the CallStatus
- * will have a defined value.
- * The std::future returned by this method will be fulfilled at arrival of the reply.
- * It will provide the same value for CallStatus as will be handed to the callback.
- */
- virtual std::future<CommonAPI::CallStatus> testVoidDerivedTypeMethodAsync(const DerivedTypeCollection::TestEnumExtended2& testEnumExtended2Value, const DerivedTypeCollection::TestMap& testMapValue, TestVoidDerivedTypeMethodAsyncCallback callback);
- /**
- * Calls testDerivedTypeMethod with synchronous semantics.
- *
- * All const parameters are input parameters to this method.
- * All non-const parameters will be filled with the returned values.
- * The CallStatus will be filled when the method returns and indicate either
- * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
- * will be set.
- */
- virtual void testDerivedTypeMethod(const DerivedTypeCollection::TestEnumExtended2& testEnumExtended2InValue, const DerivedTypeCollection::TestMap& testMapInValue, CommonAPI::CallStatus& callStatus, DerivedTypeCollection::TestEnumExtended2& testEnumExtended2OutValue, DerivedTypeCollection::TestMap& testMapOutValue);
- /**
- * Calls testDerivedTypeMethod with asynchronous semantics.
- *
- * The provided callback will be called when the reply to this call arrives or
- * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
- * or which type of error has occurred. In case of any error, ONLY the CallStatus
- * will have a defined value.
- * The std::future returned by this method will be fulfilled at arrival of the reply.
- * It will provide the same value for CallStatus as will be handed to the callback.
- */
- virtual std::future<CommonAPI::CallStatus> testDerivedTypeMethodAsync(const DerivedTypeCollection::TestEnumExtended2& testEnumExtended2InValue, const DerivedTypeCollection::TestMap& testMapInValue, TestDerivedTypeMethodAsyncCallback callback);
- /**
- * Calls TestArrayOfPolymorphicStructMethod with synchronous semantics.
- *
- * All const parameters are input parameters to this method.
- * The CallStatus will be filled when the method returns and indicate either
- * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
- * will be set.
- */
- virtual void TestArrayOfPolymorphicStructMethod(const std::vector<std::shared_ptr<DerivedTypeCollection::TestPolymorphicStruct>>& inArray, CommonAPI::CallStatus& callStatus);
- /**
- * Calls TestArrayOfPolymorphicStructMethod with asynchronous semantics.
- *
- * The provided callback will be called when the reply to this call arrives or
- * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
- * or which type of error has occurred. In case of any error, ONLY the CallStatus
- * will have a defined value.
- * The std::future returned by this method will be fulfilled at arrival of the reply.
- * It will provide the same value for CallStatus as will be handed to the callback.
- */
- virtual std::future<CommonAPI::CallStatus> TestArrayOfPolymorphicStructMethodAsync(const std::vector<std::shared_ptr<DerivedTypeCollection::TestPolymorphicStruct>>& inArray, TestArrayOfPolymorphicStructMethodAsyncCallback callback);
- /**
- * Calls TestMapOfPolymorphicStructMethod with synchronous semantics.
- *
- * All const parameters are input parameters to this method.
- * The CallStatus will be filled when the method returns and indicate either
- * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
- * will be set.
- */
- virtual void TestMapOfPolymorphicStructMethod(const DerivedTypeCollection::MapIntToPolymorphic& inMap, CommonAPI::CallStatus& callStatus);
- /**
- * Calls TestMapOfPolymorphicStructMethod with asynchronous semantics.
- *
- * The provided callback will be called when the reply to this call arrives or
- * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
- * or which type of error has occurred. In case of any error, ONLY the CallStatus
- * will have a defined value.
- * The std::future returned by this method will be fulfilled at arrival of the reply.
- * It will provide the same value for CallStatus as will be handed to the callback.
- */
- virtual std::future<CommonAPI::CallStatus> TestMapOfPolymorphicStructMethodAsync(const DerivedTypeCollection::MapIntToPolymorphic& inMap, TestMapOfPolymorphicStructMethodAsyncCallback callback);
- /**
- * Calls TestStructWithPolymorphicMemberMethod with synchronous semantics.
- *
- * All const parameters are input parameters to this method.
- * The CallStatus will be filled when the method returns and indicate either
- * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
- * will be set.
- */
- virtual void TestStructWithPolymorphicMemberMethod(const DerivedTypeCollection::StructWithPolymorphicMember& inStruct, CommonAPI::CallStatus& callStatus);
- /**
- * Calls TestStructWithPolymorphicMemberMethod with asynchronous semantics.
- *
- * The provided callback will be called when the reply to this call arrives or
- * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
- * or which type of error has occurred. In case of any error, ONLY the CallStatus
- * will have a defined value.
- * The std::future returned by this method will be fulfilled at arrival of the reply.
- * It will provide the same value for CallStatus as will be handed to the callback.
- */
- virtual std::future<CommonAPI::CallStatus> TestStructWithPolymorphicMemberMethodAsync(const DerivedTypeCollection::StructWithPolymorphicMember& inStruct, TestStructWithPolymorphicMemberMethodAsyncCallback callback);
- /**
- * Calls TestStructWithEnumKeyMapMember with synchronous semantics.
- *
- * All const parameters are input parameters to this method.
- * The CallStatus will be filled when the method returns and indicate either
- * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
- * will be set.
- */
- virtual void TestStructWithEnumKeyMapMember(const DerivedTypeCollection::StructWithEnumKeyMap& inStruct, CommonAPI::CallStatus& callStatus);
- /**
- * Calls TestStructWithEnumKeyMapMember with asynchronous semantics.
- *
- * The provided callback will be called when the reply to this call arrives or
- * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
- * or which type of error has occurred. In case of any error, ONLY the CallStatus
- * will have a defined value.
- * The std::future returned by this method will be fulfilled at arrival of the reply.
- * It will provide the same value for CallStatus as will be handed to the callback.
- */
- virtual std::future<CommonAPI::CallStatus> TestStructWithEnumKeyMapMemberAsync(const DerivedTypeCollection::StructWithEnumKeyMap& inStruct, TestStructWithEnumKeyMapMemberAsyncCallback callback);
-
-
- /**
- * Returns the CommonAPI address of the remote partner this proxy communicates with.
- */
- virtual std::string getAddress() const;
-
- /**
- * Returns the domain of the remote partner this proxy communicates with.
- */
- virtual const std::string& getDomain() const;
-
- /**
- * Returns the service ID of the remote partner this proxy communicates with.
- */
- virtual const std::string& getServiceId() const;
-
- /**
- * Returns the instance ID of the remote partner this proxy communicates with.
- */
- virtual const std::string& getInstanceId() const;
-
- /**
- * Returns true if the remote partner for this proxy is currently known to be available.
- */
- virtual bool isAvailable() const;
-
- /**
- * Returns true if the remote partner for this proxy is available.
- */
- virtual bool isAvailableBlocking() const;
-
- /**
- * Returns the wrapper class that is used to (de-)register for notifications about
- * the availability of the remote partner of this proxy.
- */
- virtual CommonAPI::ProxyStatusEvent& getProxyStatusEvent();
-
- /**
- * Returns the wrapper class that is used to access version information of the remote
- * partner of this proxy.
- */
- virtual CommonAPI::InterfaceVersionAttribute& getInterfaceVersionAttribute();
-
- private:
- std::shared_ptr<TestInterfaceProxyBase> delegate_;
-};
-
-#ifdef WIN32
- typedef TestInterfaceProxy<CommonAPI::WINDummyAttributeExtension<CommonAPI::WINDummyAttribute>> TestInterfaceProxyDefault;
-#else
- typedef TestInterfaceProxy<> TestInterfaceProxyDefault;
-#endif
-
-namespace TestInterfaceExtensions {
- template <template <typename > class _ExtensionType>
- class TestPredefinedTypeAttributeAttributeExtension {
- public:
- typedef _ExtensionType<TestInterfaceProxyBase::TestPredefinedTypeAttributeAttribute> extension_type;
-
- static_assert(std::is_base_of<typename CommonAPI::AttributeExtension<TestInterfaceProxyBase::TestPredefinedTypeAttributeAttribute>, extension_type>::value,
- "Not CommonAPI Attribute Extension!");
- #ifdef WIN32
- TestPredefinedTypeAttributeAttributeExtension() {}
- #endif
-
- TestPredefinedTypeAttributeAttributeExtension(TestInterfaceProxyBase& proxy): attributeExtension_(proxy.getTestPredefinedTypeAttributeAttribute()) {
- }
-
- inline extension_type& getTestPredefinedTypeAttributeAttributeExtension() {
- return attributeExtension_;
- }
-
- private:
- extension_type attributeExtension_;
- };
-
- template <template <typename > class _ExtensionType>
- class TestDerivedStructAttributeAttributeExtension {
- public:
- typedef _ExtensionType<TestInterfaceProxyBase::TestDerivedStructAttributeAttribute> extension_type;
-
- static_assert(std::is_base_of<typename CommonAPI::AttributeExtension<TestInterfaceProxyBase::TestDerivedStructAttributeAttribute>, extension_type>::value,
- "Not CommonAPI Attribute Extension!");
- #ifdef WIN32
- TestDerivedStructAttributeAttributeExtension() {}
- #endif
-
- TestDerivedStructAttributeAttributeExtension(TestInterfaceProxyBase& proxy): attributeExtension_(proxy.getTestDerivedStructAttributeAttribute()) {
- }
-
- inline extension_type& getTestDerivedStructAttributeAttributeExtension() {
- return attributeExtension_;
- }
-
- private:
- extension_type attributeExtension_;
- };
-
- template <template <typename > class _ExtensionType>
- class TestDerivedArrayAttributeAttributeExtension {
- public:
- typedef _ExtensionType<TestInterfaceProxyBase::TestDerivedArrayAttributeAttribute> extension_type;
-
- static_assert(std::is_base_of<typename CommonAPI::AttributeExtension<TestInterfaceProxyBase::TestDerivedArrayAttributeAttribute>, extension_type>::value,
- "Not CommonAPI Attribute Extension!");
- #ifdef WIN32
- TestDerivedArrayAttributeAttributeExtension() {}
- #endif
-
- TestDerivedArrayAttributeAttributeExtension(TestInterfaceProxyBase& proxy): attributeExtension_(proxy.getTestDerivedArrayAttributeAttribute()) {
- }
-
- inline extension_type& getTestDerivedArrayAttributeAttributeExtension() {
- return attributeExtension_;
- }
-
- private:
- extension_type attributeExtension_;
- };
-
-} // namespace TestInterfaceExtensions
-
-//
-// TestInterfaceProxy Implementation
-//
-template <typename ... _AttributeExtensions>
-TestInterfaceProxy<_AttributeExtensions...>::TestInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate):
- _AttributeExtensions(*(std::dynamic_pointer_cast<TestInterfaceProxyBase>(delegate)))...,
- delegate_(std::dynamic_pointer_cast<TestInterfaceProxyBase>(delegate)) {
-}
-
-template <typename ... _AttributeExtensions>
-TestInterfaceProxy<_AttributeExtensions...>::~TestInterfaceProxy() {
-}
-
-template <typename ... _AttributeExtensions>
-void TestInterfaceProxy<_AttributeExtensions...>::testEmptyMethod(CommonAPI::CallStatus& callStatus) {
- delegate_->testEmptyMethod(callStatus);
-}
-
-template <typename ... _AttributeExtensions>
-std::future<CommonAPI::CallStatus> TestInterfaceProxy<_AttributeExtensions...>::testEmptyMethodAsync(TestEmptyMethodAsyncCallback callback) {
- return delegate_->testEmptyMethodAsync(callback);
-}
-template <typename ... _AttributeExtensions>
-void TestInterfaceProxy<_AttributeExtensions...>::testVoidPredefinedTypeMethod(const uint32_t& uint32Value, const std::string& stringValue, CommonAPI::CallStatus& callStatus) {
- delegate_->testVoidPredefinedTypeMethod(uint32Value, stringValue, callStatus);
-}
-
-template <typename ... _AttributeExtensions>
-std::future<CommonAPI::CallStatus> TestInterfaceProxy<_AttributeExtensions...>::testVoidPredefinedTypeMethodAsync(const uint32_t& uint32Value, const std::string& stringValue, TestVoidPredefinedTypeMethodAsyncCallback callback) {
- return delegate_->testVoidPredefinedTypeMethodAsync(uint32Value, stringValue, callback);
-}
-template <typename ... _AttributeExtensions>
-void TestInterfaceProxy<_AttributeExtensions...>::testPredefinedTypeMethod(const uint32_t& uint32InValue, const std::string& stringInValue, CommonAPI::CallStatus& callStatus, uint32_t& uint32OutValue, std::string& stringOutValue) {
- delegate_->testPredefinedTypeMethod(uint32InValue, stringInValue, callStatus, uint32OutValue, stringOutValue);
-}
-
-template <typename ... _AttributeExtensions>
-std::future<CommonAPI::CallStatus> TestInterfaceProxy<_AttributeExtensions...>::testPredefinedTypeMethodAsync(const uint32_t& uint32InValue, const std::string& stringInValue, TestPredefinedTypeMethodAsyncCallback callback) {
- return delegate_->testPredefinedTypeMethodAsync(uint32InValue, stringInValue, callback);
-}
-template <typename ... _AttributeExtensions>
-void TestInterfaceProxy<_AttributeExtensions...>::testVoidDerivedTypeMethod(const DerivedTypeCollection::TestEnumExtended2& testEnumExtended2Value, const DerivedTypeCollection::TestMap& testMapValue, CommonAPI::CallStatus& callStatus) {
- delegate_->testVoidDerivedTypeMethod(testEnumExtended2Value, testMapValue, callStatus);
-}
-
-template <typename ... _AttributeExtensions>
-std::future<CommonAPI::CallStatus> TestInterfaceProxy<_AttributeExtensions...>::testVoidDerivedTypeMethodAsync(const DerivedTypeCollection::TestEnumExtended2& testEnumExtended2Value, const DerivedTypeCollection::TestMap& testMapValue, TestVoidDerivedTypeMethodAsyncCallback callback) {
- return delegate_->testVoidDerivedTypeMethodAsync(testEnumExtended2Value, testMapValue, callback);
-}
-template <typename ... _AttributeExtensions>
-void TestInterfaceProxy<_AttributeExtensions...>::testDerivedTypeMethod(const DerivedTypeCollection::TestEnumExtended2& testEnumExtended2InValue, const DerivedTypeCollection::TestMap& testMapInValue, CommonAPI::CallStatus& callStatus, DerivedTypeCollection::TestEnumExtended2& testEnumExtended2OutValue, DerivedTypeCollection::TestMap& testMapOutValue) {
- delegate_->testDerivedTypeMethod(testEnumExtended2InValue, testMapInValue, callStatus, testEnumExtended2OutValue, testMapOutValue);
-}
-
-template <typename ... _AttributeExtensions>
-std::future<CommonAPI::CallStatus> TestInterfaceProxy<_AttributeExtensions...>::testDerivedTypeMethodAsync(const DerivedTypeCollection::TestEnumExtended2& testEnumExtended2InValue, const DerivedTypeCollection::TestMap& testMapInValue, TestDerivedTypeMethodAsyncCallback callback) {
- return delegate_->testDerivedTypeMethodAsync(testEnumExtended2InValue, testMapInValue, callback);
-}
-template <typename ... _AttributeExtensions>
-void TestInterfaceProxy<_AttributeExtensions...>::TestArrayOfPolymorphicStructMethod(const std::vector<std::shared_ptr<DerivedTypeCollection::TestPolymorphicStruct>>& inArray, CommonAPI::CallStatus& callStatus) {
- delegate_->TestArrayOfPolymorphicStructMethod(inArray, callStatus);
-}
-
-template <typename ... _AttributeExtensions>
-std::future<CommonAPI::CallStatus> TestInterfaceProxy<_AttributeExtensions...>::TestArrayOfPolymorphicStructMethodAsync(const std::vector<std::shared_ptr<DerivedTypeCollection::TestPolymorphicStruct>>& inArray, TestArrayOfPolymorphicStructMethodAsyncCallback callback) {
- return delegate_->TestArrayOfPolymorphicStructMethodAsync(inArray, callback);
-}
-template <typename ... _AttributeExtensions>
-void TestInterfaceProxy<_AttributeExtensions...>::TestMapOfPolymorphicStructMethod(const DerivedTypeCollection::MapIntToPolymorphic& inMap, CommonAPI::CallStatus& callStatus) {
- delegate_->TestMapOfPolymorphicStructMethod(inMap, callStatus);
-}
-
-template <typename ... _AttributeExtensions>
-std::future<CommonAPI::CallStatus> TestInterfaceProxy<_AttributeExtensions...>::TestMapOfPolymorphicStructMethodAsync(const DerivedTypeCollection::MapIntToPolymorphic& inMap, TestMapOfPolymorphicStructMethodAsyncCallback callback) {
- return delegate_->TestMapOfPolymorphicStructMethodAsync(inMap, callback);
-}
-template <typename ... _AttributeExtensions>
-void TestInterfaceProxy<_AttributeExtensions...>::TestStructWithPolymorphicMemberMethod(const DerivedTypeCollection::StructWithPolymorphicMember& inStruct, CommonAPI::CallStatus& callStatus) {
- delegate_->TestStructWithPolymorphicMemberMethod(inStruct, callStatus);
-}
-
-template <typename ... _AttributeExtensions>
-std::future<CommonAPI::CallStatus> TestInterfaceProxy<_AttributeExtensions...>::TestStructWithPolymorphicMemberMethodAsync(const DerivedTypeCollection::StructWithPolymorphicMember& inStruct, TestStructWithPolymorphicMemberMethodAsyncCallback callback) {
- return delegate_->TestStructWithPolymorphicMemberMethodAsync(inStruct, callback);
-}
-template <typename ... _AttributeExtensions>
-void TestInterfaceProxy<_AttributeExtensions...>::TestStructWithEnumKeyMapMember(const DerivedTypeCollection::StructWithEnumKeyMap& inStruct, CommonAPI::CallStatus& callStatus) {
- delegate_->TestStructWithEnumKeyMapMember(inStruct, callStatus);
-}
-
-template <typename ... _AttributeExtensions>
-std::future<CommonAPI::CallStatus> TestInterfaceProxy<_AttributeExtensions...>::TestStructWithEnumKeyMapMemberAsync(const DerivedTypeCollection::StructWithEnumKeyMap& inStruct, TestStructWithEnumKeyMapMemberAsyncCallback callback) {
- return delegate_->TestStructWithEnumKeyMapMemberAsync(inStruct, callback);
-}
-
-template <typename ... _AttributeExtensions>
-std::string TestInterfaceProxy<_AttributeExtensions...>::getAddress() const {
- return delegate_->getAddress();
-}
-
-template <typename ... _AttributeExtensions>
-const std::string& TestInterfaceProxy<_AttributeExtensions...>::getDomain() const {
- return delegate_->getDomain();
-}
-
-template <typename ... _AttributeExtensions>
-const std::string& TestInterfaceProxy<_AttributeExtensions...>::getServiceId() const {
- return delegate_->getServiceId();
-}
-
-template <typename ... _AttributeExtensions>
-const std::string& TestInterfaceProxy<_AttributeExtensions...>::getInstanceId() const {
- return delegate_->getInstanceId();
-}
-
-template <typename ... _AttributeExtensions>
-bool TestInterfaceProxy<_AttributeExtensions...>::isAvailable() const {
- return delegate_->isAvailable();
-}
-
-template <typename ... _AttributeExtensions>
-bool TestInterfaceProxy<_AttributeExtensions...>::isAvailableBlocking() const {
- return delegate_->isAvailableBlocking();
-}
-
-template <typename ... _AttributeExtensions>
-CommonAPI::ProxyStatusEvent& TestInterfaceProxy<_AttributeExtensions...>::getProxyStatusEvent() {
- return delegate_->getProxyStatusEvent();
-}
-
-template <typename ... _AttributeExtensions>
-CommonAPI::InterfaceVersionAttribute& TestInterfaceProxy<_AttributeExtensions...>::getInterfaceVersionAttribute() {
- return delegate_->getInterfaceVersionAttribute();
-}
-
-
-} // namespace tests
-} // namespace commonapi
-
-namespace CommonAPI {
-template<template<typename > class _AttributeExtension>
-struct DefaultAttributeProxyFactoryHelper<commonapi::tests::TestInterfaceProxy,
- _AttributeExtension> {
- typedef typename commonapi::tests::TestInterfaceProxy<
- commonapi::tests::TestInterfaceExtensions::TestPredefinedTypeAttributeAttributeExtension<_AttributeExtension>,
- commonapi::tests::TestInterfaceExtensions::TestDerivedStructAttributeAttributeExtension<_AttributeExtension>,
- commonapi::tests::TestInterfaceExtensions::TestDerivedArrayAttributeAttributeExtension<_AttributeExtension>
- > class_t;
-};
-}
-
-#endif // COMMONAPI_TESTS_Test_Interface_PROXY_H_
diff --git a/src/test/commonapi/tests/TestInterfaceProxyBase.h b/src/test/commonapi/tests/TestInterfaceProxyBase.h
deleted file mode 100644
index 7c31463..0000000
--- a/src/test/commonapi/tests/TestInterfaceProxyBase.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_
-
-#include "TestInterface.h"
-
-
-#include <commonapi/tests/DerivedTypeCollection.h>
-#include <commonapi/tests/PredefinedTypeCollection.h>
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <CommonAPI/InputStream.h>
-#include <CommonAPI/OutputStream.h>
-#include <CommonAPI/SerializableStruct.h>
-#include <cstdint>
-#include <unordered_map>
-#include <vector>
-
-#include <CommonAPI/Attribute.h>
-#include <CommonAPI/Event.h>
-#include <CommonAPI/SelectiveEvent.h>
-#include <CommonAPI/Proxy.h>
-#include <functional>
-#include <future>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-
-class TestInterfaceProxyBase: virtual public CommonAPI::Proxy {
- public:
- typedef CommonAPI::ObservableAttribute<uint32_t> TestPredefinedTypeAttributeAttribute;
- typedef CommonAPI::ObservableAttribute<DerivedTypeCollection::TestStructExtended> TestDerivedStructAttributeAttribute;
- typedef CommonAPI::ObservableAttribute<DerivedTypeCollection::TestArrayUInt64> TestDerivedArrayAttributeAttribute;
- typedef CommonAPI::Event<uint32_t, std::string> TestPredefinedTypeBroadcastEvent;
- typedef CommonAPI::SelectiveEvent<> TestSelectiveBroadcastSelectiveEvent;
- typedef CommonAPI::SelectiveEvent<uint32_t, std::string> TestBroadcastWithOutArgsSelectiveEvent;
-
- typedef std::function<void(const CommonAPI::CallStatus&)> TestEmptyMethodAsyncCallback;
- typedef std::function<void(const CommonAPI::CallStatus&)> TestVoidPredefinedTypeMethodAsyncCallback;
- typedef std::function<void(const CommonAPI::CallStatus&, const uint32_t&, const std::string&)> TestPredefinedTypeMethodAsyncCallback;
- typedef std::function<void(const CommonAPI::CallStatus&)> TestVoidDerivedTypeMethodAsyncCallback;
- typedef std::function<void(const CommonAPI::CallStatus&, const DerivedTypeCollection::TestEnumExtended2&, const DerivedTypeCollection::TestMap&)> TestDerivedTypeMethodAsyncCallback;
- typedef std::function<void(const CommonAPI::CallStatus&)> TestArrayOfPolymorphicStructMethodAsyncCallback;
- typedef std::function<void(const CommonAPI::CallStatus&)> TestMapOfPolymorphicStructMethodAsyncCallback;
- typedef std::function<void(const CommonAPI::CallStatus&)> TestStructWithPolymorphicMemberMethodAsyncCallback;
- typedef std::function<void(const CommonAPI::CallStatus&)> TestStructWithEnumKeyMapMemberAsyncCallback;
-
- virtual TestPredefinedTypeAttributeAttribute& getTestPredefinedTypeAttributeAttribute() = 0;
- virtual TestDerivedStructAttributeAttribute& getTestDerivedStructAttributeAttribute() = 0;
- virtual TestDerivedArrayAttributeAttribute& getTestDerivedArrayAttributeAttribute() = 0;
-
- virtual TestPredefinedTypeBroadcastEvent& getTestPredefinedTypeBroadcastEvent() = 0;
- virtual TestSelectiveBroadcastSelectiveEvent& getTestSelectiveBroadcastSelectiveEvent() = 0;
- virtual TestBroadcastWithOutArgsSelectiveEvent& getTestBroadcastWithOutArgsSelectiveEvent() = 0;
-
- virtual void testEmptyMethod(CommonAPI::CallStatus& callStatus) = 0;
- virtual std::future<CommonAPI::CallStatus> testEmptyMethodAsync(TestEmptyMethodAsyncCallback callback) = 0;
- virtual void testVoidPredefinedTypeMethod(const uint32_t& uint32Value, const std::string& stringValue, CommonAPI::CallStatus& callStatus) = 0;
- virtual std::future<CommonAPI::CallStatus> testVoidPredefinedTypeMethodAsync(const uint32_t& uint32Value, const std::string& stringValue, TestVoidPredefinedTypeMethodAsyncCallback callback) = 0;
- virtual void testPredefinedTypeMethod(const uint32_t& uint32InValue, const std::string& stringInValue, CommonAPI::CallStatus& callStatus, uint32_t& uint32OutValue, std::string& stringOutValue) = 0;
- virtual std::future<CommonAPI::CallStatus> testPredefinedTypeMethodAsync(const uint32_t& uint32InValue, const std::string& stringInValue, TestPredefinedTypeMethodAsyncCallback callback) = 0;
- virtual void testVoidDerivedTypeMethod(const DerivedTypeCollection::TestEnumExtended2& testEnumExtended2Value, const DerivedTypeCollection::TestMap& testMapValue, CommonAPI::CallStatus& callStatus) = 0;
- virtual std::future<CommonAPI::CallStatus> testVoidDerivedTypeMethodAsync(const DerivedTypeCollection::TestEnumExtended2& testEnumExtended2Value, const DerivedTypeCollection::TestMap& testMapValue, TestVoidDerivedTypeMethodAsyncCallback callback) = 0;
- virtual void testDerivedTypeMethod(const DerivedTypeCollection::TestEnumExtended2& testEnumExtended2InValue, const DerivedTypeCollection::TestMap& testMapInValue, CommonAPI::CallStatus& callStatus, DerivedTypeCollection::TestEnumExtended2& testEnumExtended2OutValue, DerivedTypeCollection::TestMap& testMapOutValue) = 0;
- virtual std::future<CommonAPI::CallStatus> testDerivedTypeMethodAsync(const DerivedTypeCollection::TestEnumExtended2& testEnumExtended2InValue, const DerivedTypeCollection::TestMap& testMapInValue, TestDerivedTypeMethodAsyncCallback callback) = 0;
- virtual void TestArrayOfPolymorphicStructMethod(const std::vector<std::shared_ptr<DerivedTypeCollection::TestPolymorphicStruct>>& inArray, CommonAPI::CallStatus& callStatus) = 0;
- virtual std::future<CommonAPI::CallStatus> TestArrayOfPolymorphicStructMethodAsync(const std::vector<std::shared_ptr<DerivedTypeCollection::TestPolymorphicStruct>>& inArray, TestArrayOfPolymorphicStructMethodAsyncCallback callback) = 0;
- virtual void TestMapOfPolymorphicStructMethod(const DerivedTypeCollection::MapIntToPolymorphic& inMap, CommonAPI::CallStatus& callStatus) = 0;
- virtual std::future<CommonAPI::CallStatus> TestMapOfPolymorphicStructMethodAsync(const DerivedTypeCollection::MapIntToPolymorphic& inMap, TestMapOfPolymorphicStructMethodAsyncCallback callback) = 0;
- virtual void TestStructWithPolymorphicMemberMethod(const DerivedTypeCollection::StructWithPolymorphicMember& inStruct, CommonAPI::CallStatus& callStatus) = 0;
- virtual std::future<CommonAPI::CallStatus> TestStructWithPolymorphicMemberMethodAsync(const DerivedTypeCollection::StructWithPolymorphicMember& inStruct, TestStructWithPolymorphicMemberMethodAsyncCallback callback) = 0;
- virtual void TestStructWithEnumKeyMapMember(const DerivedTypeCollection::StructWithEnumKeyMap& inStruct, CommonAPI::CallStatus& callStatus) = 0;
- virtual std::future<CommonAPI::CallStatus> TestStructWithEnumKeyMapMemberAsync(const DerivedTypeCollection::StructWithEnumKeyMap& inStruct, TestStructWithEnumKeyMapMemberAsyncCallback callback) = 0;
-};
-
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_Test_Interface_PROXY_BASE_H_
diff --git a/src/test/commonapi/tests/TestInterfaceStub.h b/src/test/commonapi/tests/TestInterfaceStub.h
deleted file mode 100644
index d45ad3b..0000000
--- a/src/test/commonapi/tests/TestInterfaceStub.h
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_
-
-
-
-#include <commonapi/tests/DerivedTypeCollection.h>
-#include <commonapi/tests/PredefinedTypeCollection.h>
-
-#include "TestInterface.h"
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <CommonAPI/InputStream.h>
-#include <CommonAPI/OutputStream.h>
-#include <CommonAPI/SerializableStruct.h>
-#include <cstdint>
-#include <unordered_map>
-#include <unordered_set>
-#include <vector>
-
-#include <CommonAPI/Stub.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-
-/**
- * Receives messages from remote and handles all dispatching of deserialized calls
- * to a stub for the service TestInterface. Also provides means to send broadcasts
- * and attribute-changed-notifications of observable attributes as defined by this service.
- * An application developer should not need to bother with this class.
- */
-class TestInterfaceStubAdapter: virtual public CommonAPI::StubAdapter, public TestInterface {
- public:
- ///Notifies all remote listeners about a change of value of the attribute TestPredefinedTypeAttribute.
- virtual void fireTestPredefinedTypeAttributeAttributeChanged(const uint32_t& TestPredefinedTypeAttribute) = 0;
- ///Notifies all remote listeners about a change of value of the attribute TestDerivedStructAttribute.
- virtual void fireTestDerivedStructAttributeAttributeChanged(const DerivedTypeCollection::TestStructExtended& TestDerivedStructAttribute) = 0;
- ///Notifies all remote listeners about a change of value of the attribute TestDerivedArrayAttribute.
- virtual void fireTestDerivedArrayAttributeAttributeChanged(const DerivedTypeCollection::TestArrayUInt64& TestDerivedArrayAttribute) = 0;
-
- /**
- * Sends a broadcast event for TestPredefinedTypeBroadcast. Should not be called directly.
- * Instead, the "fire<broadcastName>Event" methods of the stub should be used.
- */
- virtual void fireTestPredefinedTypeBroadcastEvent(const uint32_t& uint32Value, const std::string& stringValue) = 0;
- /**
- * Sends a selective broadcast event for TestSelectiveBroadcast. Should not be called directly.
- * Instead, the "fire<broadcastName>Event" methods of the stub should be used.
- */
- virtual void fireTestSelectiveBroadcastSelective(const std::shared_ptr<CommonAPI::ClientId> clientId) = 0;
- virtual void sendTestSelectiveBroadcastSelective(const std::shared_ptr<CommonAPI::ClientIdList> receivers = NULL) = 0;
- virtual void subscribeForTestSelectiveBroadcastSelective(const std::shared_ptr<CommonAPI::ClientId> clientId, bool& success) = 0;
- virtual void unsubscribeFromTestSelectiveBroadcastSelective(const std::shared_ptr<CommonAPI::ClientId> clientId) = 0;
- virtual std::shared_ptr<CommonAPI::ClientIdList> const getSubscribersForTestSelectiveBroadcastSelective() = 0;
- /**
- * Sends a selective broadcast event for TestBroadcastWithOutArgs. Should not be called directly.
- * Instead, the "fire<broadcastName>Event" methods of the stub should be used.
- */
- virtual void fireTestBroadcastWithOutArgsSelective(const std::shared_ptr<CommonAPI::ClientId> clientId, const uint32_t& uint32Value, const std::string& stringValue) = 0;
- virtual void sendTestBroadcastWithOutArgsSelective(const uint32_t& uint32Value, const std::string& stringValue, const std::shared_ptr<CommonAPI::ClientIdList> receivers = NULL) = 0;
- virtual void subscribeForTestBroadcastWithOutArgsSelective(const std::shared_ptr<CommonAPI::ClientId> clientId, bool& success) = 0;
- virtual void unsubscribeFromTestBroadcastWithOutArgsSelective(const std::shared_ptr<CommonAPI::ClientId> clientId) = 0;
- virtual std::shared_ptr<CommonAPI::ClientIdList> const getSubscribersForTestBroadcastWithOutArgsSelective() = 0;
-
-
- virtual void deactivateManagedInstances() = 0;
-protected:
- /**
- * Defines properties for storing the ClientIds of clients / proxies that have
- * subscribed to the selective broadcasts
- */
- std::shared_ptr<CommonAPI::ClientIdList> subscribersForTestSelectiveBroadcastSelective_;
- std::shared_ptr<CommonAPI::ClientIdList> subscribersForTestBroadcastWithOutArgsSelective_;
-};
-
-
-/**
- * Defines the necessary callbacks to handle remote set events related to the attributes
- * defined in the IDL description for TestInterface.
- * For each attribute two callbacks are defined:
- * - a verification callback that allows to verify the requested value and to prevent setting
- * e.g. an invalid value ("onRemoteSet<AttributeName>").
- * - an action callback to do local work after the attribute value has been changed
- * ("onRemote<AttributeName>Changed").
- *
- * This class and the one below are the ones an application developer needs to have
- * a look at if he wants to implement a service.
- */
-class TestInterfaceStubRemoteEvent {
- public:
- virtual ~TestInterfaceStubRemoteEvent() { }
-
- /// Verification callback for remote set requests on the attribute TestPredefinedTypeAttribute
- virtual bool onRemoteSetTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t TestPredefinedTypeAttribute) = 0;
- /// Action callback for remote set requests on the attribute TestPredefinedTypeAttribute
- virtual void onRemoteTestPredefinedTypeAttributeAttributeChanged() = 0;
-
- /// Verification callback for remote set requests on the attribute TestDerivedStructAttribute
- virtual bool onRemoteSetTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::TestStructExtended TestDerivedStructAttribute) = 0;
- /// Action callback for remote set requests on the attribute TestDerivedStructAttribute
- virtual void onRemoteTestDerivedStructAttributeAttributeChanged() = 0;
-
- /// Verification callback for remote set requests on the attribute TestDerivedArrayAttribute
- virtual bool onRemoteSetTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::TestArrayUInt64 TestDerivedArrayAttribute) = 0;
- /// Action callback for remote set requests on the attribute TestDerivedArrayAttribute
- virtual void onRemoteTestDerivedArrayAttributeAttributeChanged() = 0;
-
-};
-
-
-/**
- * Defines the interface that must be implemented by any class that should provide
- * the service TestInterface to remote clients.
- * This class and the one above are the ones an application developer needs to have
- * a look at if he wants to implement a service.
- */
-class TestInterfaceStub: public virtual CommonAPI::Stub<TestInterfaceStubAdapter, TestInterfaceStubRemoteEvent> {
-public:
- virtual ~TestInterfaceStub() { }
- virtual const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId) = 0;
-
- /// Provides getter access to the attribute TestPredefinedTypeAttribute
- virtual const uint32_t& getTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId) = 0;
- /// Provides getter access to the attribute TestDerivedStructAttribute
- virtual const DerivedTypeCollection::TestStructExtended& getTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId) = 0;
- /// Provides getter access to the attribute TestDerivedArrayAttribute
- virtual const DerivedTypeCollection::TestArrayUInt64& getTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId) = 0;
-
- /// This is the method that will be called on remote calls on the method testEmptyMethod.
- virtual void testEmptyMethod(const std::shared_ptr<CommonAPI::ClientId> clientId) = 0;
- /// This is the method that will be called on remote calls on the method testVoidPredefinedTypeMethod.
- virtual void testVoidPredefinedTypeMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t uint32Value, std::string stringValue) = 0;
- /// This is the method that will be called on remote calls on the method testPredefinedTypeMethod.
- virtual void testPredefinedTypeMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t uint32InValue, std::string stringInValue, uint32_t& uint32OutValue, std::string& stringOutValue) = 0;
- /// This is the method that will be called on remote calls on the method testVoidDerivedTypeMethod.
- virtual void testVoidDerivedTypeMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::TestEnumExtended2 testEnumExtended2Value, DerivedTypeCollection::TestMap testMapValue) = 0;
- /// This is the method that will be called on remote calls on the method testDerivedTypeMethod.
- virtual void testDerivedTypeMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::TestEnumExtended2 testEnumExtended2InValue, DerivedTypeCollection::TestMap testMapInValue, DerivedTypeCollection::TestEnumExtended2& testEnumExtended2OutValue, DerivedTypeCollection::TestMap& testMapOutValue) = 0;
- /// This is the method that will be called on remote calls on the method TestArrayOfPolymorphicStructMethod.
- virtual void TestArrayOfPolymorphicStructMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, std::vector<std::shared_ptr<DerivedTypeCollection::TestPolymorphicStruct>> inArray) = 0;
- /// This is the method that will be called on remote calls on the method TestMapOfPolymorphicStructMethod.
- virtual void TestMapOfPolymorphicStructMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::MapIntToPolymorphic inMap) = 0;
- /// This is the method that will be called on remote calls on the method TestStructWithPolymorphicMemberMethod.
- virtual void TestStructWithPolymorphicMemberMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::StructWithPolymorphicMember inStruct) = 0;
- /// This is the method that will be called on remote calls on the method TestStructWithEnumKeyMapMember.
- virtual void TestStructWithEnumKeyMapMember(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::StructWithEnumKeyMap inStruct) = 0;
- /// Sends a broadcast event for TestPredefinedTypeBroadcast.
- virtual void fireTestPredefinedTypeBroadcastEvent(const uint32_t& uint32Value, const std::string& stringValue) = 0;
- /**
- * Sends a selective broadcast event for TestSelectiveBroadcast to the given ClientIds.
- * The ClientIds must all be out of the set of subscribed clients.
- * If no ClientIds are given, the selective broadcast is sent to all subscribed clients.
- */
- virtual void fireTestSelectiveBroadcastSelective(const std::shared_ptr<CommonAPI::ClientIdList> receivers = NULL) = 0;
- /// retreives the list of all subscribed clients for TestSelectiveBroadcast
- virtual std::shared_ptr<CommonAPI::ClientIdList> const getSubscribersForTestSelectiveBroadcastSelective() = 0;
- /// Hook method for reacting on new subscriptions or removed subscriptions respectively for selective broadcasts.
- virtual void onTestSelectiveBroadcastSelectiveSubscriptionChanged(const std::shared_ptr<CommonAPI::ClientId> clientId, const CommonAPI::SelectiveBroadcastSubscriptionEvent event) = 0;
- /// Hook method for reacting accepting or denying new subscriptions
- virtual bool onTestSelectiveBroadcastSelectiveSubscriptionRequested(const std::shared_ptr<CommonAPI::ClientId> clientId) = 0;
- /**
- * Sends a selective broadcast event for TestBroadcastWithOutArgs to the given ClientIds.
- * The ClientIds must all be out of the set of subscribed clients.
- * If no ClientIds are given, the selective broadcast is sent to all subscribed clients.
- */
- virtual void fireTestBroadcastWithOutArgsSelective(const uint32_t& uint32Value, const std::string& stringValue, const std::shared_ptr<CommonAPI::ClientIdList> receivers = NULL) = 0;
- /// retreives the list of all subscribed clients for TestBroadcastWithOutArgs
- virtual std::shared_ptr<CommonAPI::ClientIdList> const getSubscribersForTestBroadcastWithOutArgsSelective() = 0;
- /// Hook method for reacting on new subscriptions or removed subscriptions respectively for selective broadcasts.
- virtual void onTestBroadcastWithOutArgsSelectiveSubscriptionChanged(const std::shared_ptr<CommonAPI::ClientId> clientId, const CommonAPI::SelectiveBroadcastSubscriptionEvent event) = 0;
- /// Hook method for reacting accepting or denying new subscriptions
- virtual bool onTestBroadcastWithOutArgsSelectiveSubscriptionRequested(const std::shared_ptr<CommonAPI::ClientId> clientId) = 0;
-
- using CommonAPI::Stub<TestInterfaceStubAdapter, TestInterfaceStubRemoteEvent>::initStubAdapter;
- typedef CommonAPI::Stub<TestInterfaceStubAdapter, TestInterfaceStubRemoteEvent>::StubAdapterType StubAdapterType;
- typedef CommonAPI::Stub<TestInterfaceStubAdapter, TestInterfaceStubRemoteEvent>::RemoteEventHandlerType RemoteEventHandlerType;
- typedef TestInterfaceStubRemoteEvent RemoteEventType;
- typedef TestInterface StubInterface;
-};
-
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_Test_Interface_STUB_H_
diff --git a/src/test/commonapi/tests/TestInterfaceStubDefault.cpp b/src/test/commonapi/tests/TestInterfaceStubDefault.cpp
deleted file mode 100644
index 764e1b8..0000000
--- a/src/test/commonapi/tests/TestInterfaceStubDefault.cpp
+++ /dev/null
@@ -1,285 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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 <commonapi/tests/TestInterfaceStubDefault.h>
-
-namespace commonapi {
-namespace tests {
-
-TestInterfaceStubDefault::TestInterfaceStubDefault():
- remoteEventHandler_(this),
- interfaceVersion_(TestInterface::getInterfaceVersion()) {
-}
-
-const CommonAPI::Version& TestInterfaceStubDefault::getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId) {
- return interfaceVersion_;
-}
-
-TestInterfaceStubRemoteEvent* TestInterfaceStubDefault::initStubAdapter(const std::shared_ptr<TestInterfaceStubAdapter>& stubAdapter) {
- CommonAPI::Stub<TestInterfaceStubAdapter, TestInterfaceStubRemoteEvent>::stubAdapter_ = stubAdapter;
- return &remoteEventHandler_;
-}
-
-const uint32_t& TestInterfaceStubDefault::getTestPredefinedTypeAttributeAttribute() {
- return testPredefinedTypeAttributeAttributeValue_;
-}
-
-const uint32_t& TestInterfaceStubDefault::getTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId) {
- return getTestPredefinedTypeAttributeAttribute();
-}
-
-void TestInterfaceStubDefault::setTestPredefinedTypeAttributeAttribute(uint32_t value) {
- const bool valueChanged = trySetTestPredefinedTypeAttributeAttribute(std::move(value));
- if (valueChanged && stubAdapter_ != NULL) {
- stubAdapter_->fireTestPredefinedTypeAttributeAttributeChanged(testPredefinedTypeAttributeAttributeValue_);
- }
-}
-
-bool TestInterfaceStubDefault::trySetTestPredefinedTypeAttributeAttribute(uint32_t value) {
- if (!validateTestPredefinedTypeAttributeAttributeRequestedValue(value))
- return false;
-
- const bool valueChanged = (testPredefinedTypeAttributeAttributeValue_ != value);
- testPredefinedTypeAttributeAttributeValue_ = std::move(value);
- return valueChanged;
-}
-
-bool TestInterfaceStubDefault::validateTestPredefinedTypeAttributeAttributeRequestedValue(const uint32_t& value) {
- return true;
-}
-
-void TestInterfaceStubDefault::setTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t value) {
- setTestPredefinedTypeAttributeAttribute(value);
-}
-
-void TestInterfaceStubDefault::onRemoteTestPredefinedTypeAttributeAttributeChanged() {
- // No operation in default
-}
-
-void TestInterfaceStubDefault::RemoteEventHandler::onRemoteTestPredefinedTypeAttributeAttributeChanged() {
- defaultStub_->onRemoteTestPredefinedTypeAttributeAttributeChanged();
-}
-
-bool TestInterfaceStubDefault::RemoteEventHandler::onRemoteSetTestPredefinedTypeAttributeAttribute(uint32_t value) {
- return defaultStub_->trySetTestPredefinedTypeAttributeAttribute(std::move(value));
-}
-
-bool TestInterfaceStubDefault::RemoteEventHandler::onRemoteSetTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t value) {
- return onRemoteSetTestPredefinedTypeAttributeAttribute(value);
-}
-
-const DerivedTypeCollection::TestStructExtended& TestInterfaceStubDefault::getTestDerivedStructAttributeAttribute() {
- return testDerivedStructAttributeAttributeValue_;
-}
-
-const DerivedTypeCollection::TestStructExtended& TestInterfaceStubDefault::getTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId) {
- return getTestDerivedStructAttributeAttribute();
-}
-
-void TestInterfaceStubDefault::setTestDerivedStructAttributeAttribute(DerivedTypeCollection::TestStructExtended value) {
- const bool valueChanged = trySetTestDerivedStructAttributeAttribute(std::move(value));
- if (valueChanged && stubAdapter_ != NULL) {
- stubAdapter_->fireTestDerivedStructAttributeAttributeChanged(testDerivedStructAttributeAttributeValue_);
- }
-}
-
-bool TestInterfaceStubDefault::trySetTestDerivedStructAttributeAttribute(DerivedTypeCollection::TestStructExtended value) {
- if (!validateTestDerivedStructAttributeAttributeRequestedValue(value))
- return false;
-
- const bool valueChanged = (testDerivedStructAttributeAttributeValue_ != value);
- testDerivedStructAttributeAttributeValue_ = std::move(value);
- return valueChanged;
-}
-
-bool TestInterfaceStubDefault::validateTestDerivedStructAttributeAttributeRequestedValue(const DerivedTypeCollection::TestStructExtended& value) {
- return true;
-}
-
-void TestInterfaceStubDefault::setTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::TestStructExtended value) {
- setTestDerivedStructAttributeAttribute(value);
-}
-
-void TestInterfaceStubDefault::onRemoteTestDerivedStructAttributeAttributeChanged() {
- // No operation in default
-}
-
-void TestInterfaceStubDefault::RemoteEventHandler::onRemoteTestDerivedStructAttributeAttributeChanged() {
- defaultStub_->onRemoteTestDerivedStructAttributeAttributeChanged();
-}
-
-bool TestInterfaceStubDefault::RemoteEventHandler::onRemoteSetTestDerivedStructAttributeAttribute(DerivedTypeCollection::TestStructExtended value) {
- return defaultStub_->trySetTestDerivedStructAttributeAttribute(std::move(value));
-}
-
-bool TestInterfaceStubDefault::RemoteEventHandler::onRemoteSetTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::TestStructExtended value) {
- return onRemoteSetTestDerivedStructAttributeAttribute(value);
-}
-
-const DerivedTypeCollection::TestArrayUInt64& TestInterfaceStubDefault::getTestDerivedArrayAttributeAttribute() {
- return testDerivedArrayAttributeAttributeValue_;
-}
-
-const DerivedTypeCollection::TestArrayUInt64& TestInterfaceStubDefault::getTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId) {
- return getTestDerivedArrayAttributeAttribute();
-}
-
-void TestInterfaceStubDefault::setTestDerivedArrayAttributeAttribute(DerivedTypeCollection::TestArrayUInt64 value) {
- const bool valueChanged = trySetTestDerivedArrayAttributeAttribute(std::move(value));
- if (valueChanged && stubAdapter_ != NULL) {
- stubAdapter_->fireTestDerivedArrayAttributeAttributeChanged(testDerivedArrayAttributeAttributeValue_);
- }
-}
-
-bool TestInterfaceStubDefault::trySetTestDerivedArrayAttributeAttribute(DerivedTypeCollection::TestArrayUInt64 value) {
- if (!validateTestDerivedArrayAttributeAttributeRequestedValue(value))
- return false;
-
- const bool valueChanged = (testDerivedArrayAttributeAttributeValue_ != value);
- testDerivedArrayAttributeAttributeValue_ = std::move(value);
- return valueChanged;
-}
-
-bool TestInterfaceStubDefault::validateTestDerivedArrayAttributeAttributeRequestedValue(const DerivedTypeCollection::TestArrayUInt64& value) {
- return true;
-}
-
-void TestInterfaceStubDefault::setTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::TestArrayUInt64 value) {
- setTestDerivedArrayAttributeAttribute(value);
-}
-
-void TestInterfaceStubDefault::onRemoteTestDerivedArrayAttributeAttributeChanged() {
- // No operation in default
-}
-
-void TestInterfaceStubDefault::RemoteEventHandler::onRemoteTestDerivedArrayAttributeAttributeChanged() {
- defaultStub_->onRemoteTestDerivedArrayAttributeAttributeChanged();
-}
-
-bool TestInterfaceStubDefault::RemoteEventHandler::onRemoteSetTestDerivedArrayAttributeAttribute(DerivedTypeCollection::TestArrayUInt64 value) {
- return defaultStub_->trySetTestDerivedArrayAttributeAttribute(std::move(value));
-}
-
-bool TestInterfaceStubDefault::RemoteEventHandler::onRemoteSetTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::TestArrayUInt64 value) {
- return onRemoteSetTestDerivedArrayAttributeAttribute(value);
-}
-
-
-void TestInterfaceStubDefault::testEmptyMethod(const std::shared_ptr<CommonAPI::ClientId> clientId) {
- // Call old style methods in default
- testEmptyMethod();
-}
-void TestInterfaceStubDefault::testEmptyMethod() {
- // No operation in default
-}
-
-void TestInterfaceStubDefault::testVoidPredefinedTypeMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t uint32Value, std::string stringValue) {
- // Call old style methods in default
- testVoidPredefinedTypeMethod(uint32Value, stringValue);
-}
-void TestInterfaceStubDefault::testVoidPredefinedTypeMethod(uint32_t uint32Value, std::string stringValue) {
- // No operation in default
-}
-
-void TestInterfaceStubDefault::testPredefinedTypeMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t uint32InValue, std::string stringInValue, uint32_t& uint32OutValue, std::string& stringOutValue) {
- // Call old style methods in default
- testPredefinedTypeMethod(uint32InValue, stringInValue, uint32OutValue, stringOutValue);
-}
-void TestInterfaceStubDefault::testPredefinedTypeMethod(uint32_t uint32InValue, std::string stringInValue, uint32_t& uint32OutValue, std::string& stringOutValue) {
- // No operation in default
-}
-
-void TestInterfaceStubDefault::testVoidDerivedTypeMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::TestEnumExtended2 testEnumExtended2Value, DerivedTypeCollection::TestMap testMapValue) {
- // Call old style methods in default
- testVoidDerivedTypeMethod(testEnumExtended2Value, testMapValue);
-}
-void TestInterfaceStubDefault::testVoidDerivedTypeMethod(DerivedTypeCollection::TestEnumExtended2 testEnumExtended2Value, DerivedTypeCollection::TestMap testMapValue) {
- // No operation in default
-}
-
-void TestInterfaceStubDefault::testDerivedTypeMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::TestEnumExtended2 testEnumExtended2InValue, DerivedTypeCollection::TestMap testMapInValue, DerivedTypeCollection::TestEnumExtended2& testEnumExtended2OutValue, DerivedTypeCollection::TestMap& testMapOutValue) {
- // Call old style methods in default
- testDerivedTypeMethod(testEnumExtended2InValue, testMapInValue, testEnumExtended2OutValue, testMapOutValue);
-}
-void TestInterfaceStubDefault::testDerivedTypeMethod(DerivedTypeCollection::TestEnumExtended2 testEnumExtended2InValue, DerivedTypeCollection::TestMap testMapInValue, DerivedTypeCollection::TestEnumExtended2& testEnumExtended2OutValue, DerivedTypeCollection::TestMap& testMapOutValue) {
- // No operation in default
-}
-
-void TestInterfaceStubDefault::TestArrayOfPolymorphicStructMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, std::vector<std::shared_ptr<DerivedTypeCollection::TestPolymorphicStruct>> inArray) {
- // Call old style methods in default
- TestArrayOfPolymorphicStructMethod(inArray);
-}
-void TestInterfaceStubDefault::TestArrayOfPolymorphicStructMethod(std::vector<std::shared_ptr<DerivedTypeCollection::TestPolymorphicStruct>> inArray) {
- // No operation in default
-}
-
-void TestInterfaceStubDefault::TestMapOfPolymorphicStructMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::MapIntToPolymorphic inMap) {
- // Call old style methods in default
- TestMapOfPolymorphicStructMethod(inMap);
-}
-void TestInterfaceStubDefault::TestMapOfPolymorphicStructMethod(DerivedTypeCollection::MapIntToPolymorphic inMap) {
- // No operation in default
-}
-
-void TestInterfaceStubDefault::TestStructWithPolymorphicMemberMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::StructWithPolymorphicMember inStruct) {
- // Call old style methods in default
- TestStructWithPolymorphicMemberMethod(inStruct);
-}
-void TestInterfaceStubDefault::TestStructWithPolymorphicMemberMethod(DerivedTypeCollection::StructWithPolymorphicMember inStruct) {
- // No operation in default
-}
-
-void TestInterfaceStubDefault::TestStructWithEnumKeyMapMember(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::StructWithEnumKeyMap inStruct) {
- // Call old style methods in default
- TestStructWithEnumKeyMapMember(inStruct);
-}
-void TestInterfaceStubDefault::TestStructWithEnumKeyMapMember(DerivedTypeCollection::StructWithEnumKeyMap inStruct) {
- // No operation in default
-}
-
-
-void TestInterfaceStubDefault::fireTestPredefinedTypeBroadcastEvent(const uint32_t& uint32Value, const std::string& stringValue) {
- stubAdapter_->fireTestPredefinedTypeBroadcastEvent(uint32Value, stringValue);
-}
-void TestInterfaceStubDefault::fireTestSelectiveBroadcastSelective(const std::shared_ptr<CommonAPI::ClientIdList> receivers) {
- stubAdapter_->sendTestSelectiveBroadcastSelective(receivers);
-}
-void TestInterfaceStubDefault::onTestSelectiveBroadcastSelectiveSubscriptionChanged(const std::shared_ptr<CommonAPI::ClientId> clientId, const CommonAPI::SelectiveBroadcastSubscriptionEvent event) {
- // No operation in default
-}
-bool TestInterfaceStubDefault::onTestSelectiveBroadcastSelectiveSubscriptionRequested(const std::shared_ptr<CommonAPI::ClientId> clientId) {
- // Accept in default
- return true;
-}
-std::shared_ptr<CommonAPI::ClientIdList> const TestInterfaceStubDefault::getSubscribersForTestSelectiveBroadcastSelective() {
- return(stubAdapter_->getSubscribersForTestSelectiveBroadcastSelective());
-}
-
-void TestInterfaceStubDefault::fireTestBroadcastWithOutArgsSelective(const uint32_t& uint32Value, const std::string& stringValue, const std::shared_ptr<CommonAPI::ClientIdList> receivers) {
- stubAdapter_->sendTestBroadcastWithOutArgsSelective(uint32Value, stringValue, receivers);
-}
-void TestInterfaceStubDefault::onTestBroadcastWithOutArgsSelectiveSubscriptionChanged(const std::shared_ptr<CommonAPI::ClientId> clientId, const CommonAPI::SelectiveBroadcastSubscriptionEvent event) {
- // No operation in default
-}
-bool TestInterfaceStubDefault::onTestBroadcastWithOutArgsSelectiveSubscriptionRequested(const std::shared_ptr<CommonAPI::ClientId> clientId) {
- // Accept in default
- return true;
-}
-std::shared_ptr<CommonAPI::ClientIdList> const TestInterfaceStubDefault::getSubscribersForTestBroadcastWithOutArgsSelective() {
- return(stubAdapter_->getSubscribersForTestBroadcastWithOutArgsSelective());
-}
-
-
-
-TestInterfaceStubDefault::RemoteEventHandler::RemoteEventHandler(TestInterfaceStubDefault* defaultStub):
- defaultStub_(defaultStub) {
-}
-
-} // namespace tests
-} // namespace commonapi
diff --git a/src/test/commonapi/tests/TestInterfaceStubDefault.h b/src/test/commonapi/tests/TestInterfaceStubDefault.h
deleted file mode 100644
index e24ecdb..0000000
--- a/src/test/commonapi/tests/TestInterfaceStubDefault.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_
-
-
-#include <commonapi/tests/TestInterfaceStub.h>
-#include <sstream>
-
-namespace commonapi {
-namespace tests {
-
-/**
- * Provides a default implementation for TestInterfaceStubRemoteEvent and
- * TestInterfaceStub. Method callbacks have an empty implementation,
- * remote set calls on attributes will always change the value of the attribute
- * to the one received.
- *
- * Override this stub if you only want to provide a subset of the functionality
- * that would be defined for this service, and/or if you do not need any non-default
- * behaviour.
- */
-class TestInterfaceStubDefault : public virtual TestInterfaceStub {
-public:
- TestInterfaceStubDefault();
-
- TestInterfaceStubRemoteEvent* initStubAdapter(const std::shared_ptr<TestInterfaceStubAdapter>& stubAdapter);
-
- const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId);
-
- virtual const uint32_t& getTestPredefinedTypeAttributeAttribute();
- virtual const uint32_t& getTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId);
- virtual void setTestPredefinedTypeAttributeAttribute(uint32_t value);
- virtual void setTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t value);
- virtual const DerivedTypeCollection::TestStructExtended& getTestDerivedStructAttributeAttribute();
- virtual const DerivedTypeCollection::TestStructExtended& getTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId);
- virtual void setTestDerivedStructAttributeAttribute(DerivedTypeCollection::TestStructExtended value);
- virtual void setTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::TestStructExtended value);
- virtual const DerivedTypeCollection::TestArrayUInt64& getTestDerivedArrayAttributeAttribute();
- virtual const DerivedTypeCollection::TestArrayUInt64& getTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId);
- virtual void setTestDerivedArrayAttributeAttribute(DerivedTypeCollection::TestArrayUInt64 value);
- virtual void setTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::TestArrayUInt64 value);
-
- virtual void testEmptyMethod(const std::shared_ptr<CommonAPI::ClientId> clientId);
- virtual void testEmptyMethod();
-
- virtual void testVoidPredefinedTypeMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t uint32Value, std::string stringValue);
- virtual void testVoidPredefinedTypeMethod(uint32_t uint32Value, std::string stringValue);
-
- virtual void testPredefinedTypeMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t uint32InValue, std::string stringInValue, uint32_t& uint32OutValue, std::string& stringOutValue);
- virtual void testPredefinedTypeMethod(uint32_t uint32InValue, std::string stringInValue, uint32_t& uint32OutValue, std::string& stringOutValue);
-
- virtual void testVoidDerivedTypeMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::TestEnumExtended2 testEnumExtended2Value, DerivedTypeCollection::TestMap testMapValue);
- virtual void testVoidDerivedTypeMethod(DerivedTypeCollection::TestEnumExtended2 testEnumExtended2Value, DerivedTypeCollection::TestMap testMapValue);
-
- virtual void testDerivedTypeMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::TestEnumExtended2 testEnumExtended2InValue, DerivedTypeCollection::TestMap testMapInValue, DerivedTypeCollection::TestEnumExtended2& testEnumExtended2OutValue, DerivedTypeCollection::TestMap& testMapOutValue);
- virtual void testDerivedTypeMethod(DerivedTypeCollection::TestEnumExtended2 testEnumExtended2InValue, DerivedTypeCollection::TestMap testMapInValue, DerivedTypeCollection::TestEnumExtended2& testEnumExtended2OutValue, DerivedTypeCollection::TestMap& testMapOutValue);
-
- virtual void TestArrayOfPolymorphicStructMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, std::vector<std::shared_ptr<DerivedTypeCollection::TestPolymorphicStruct>> inArray);
- virtual void TestArrayOfPolymorphicStructMethod(std::vector<std::shared_ptr<DerivedTypeCollection::TestPolymorphicStruct>> inArray);
-
- virtual void TestMapOfPolymorphicStructMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::MapIntToPolymorphic inMap);
- virtual void TestMapOfPolymorphicStructMethod(DerivedTypeCollection::MapIntToPolymorphic inMap);
-
- virtual void TestStructWithPolymorphicMemberMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::StructWithPolymorphicMember inStruct);
- virtual void TestStructWithPolymorphicMemberMethod(DerivedTypeCollection::StructWithPolymorphicMember inStruct);
-
- virtual void TestStructWithEnumKeyMapMember(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::StructWithEnumKeyMap inStruct);
- virtual void TestStructWithEnumKeyMapMember(DerivedTypeCollection::StructWithEnumKeyMap inStruct);
-
-
- virtual void fireTestPredefinedTypeBroadcastEvent(const uint32_t& uint32Value, const std::string& stringValue);
- virtual void fireTestSelectiveBroadcastSelective(const std::shared_ptr<CommonAPI::ClientIdList> receivers = NULL);
- virtual std::shared_ptr<CommonAPI::ClientIdList> const getSubscribersForTestSelectiveBroadcastSelective();
- /// Hook method for reacting on new subscriptions or removed subscriptions respectively for selective broadcasts.
- virtual void onTestSelectiveBroadcastSelectiveSubscriptionChanged(const std::shared_ptr<CommonAPI::ClientId> clientId, const CommonAPI::SelectiveBroadcastSubscriptionEvent event);
- /// Hook method for reacting accepting or denying new subscriptions
- virtual bool onTestSelectiveBroadcastSelectiveSubscriptionRequested(const std::shared_ptr<CommonAPI::ClientId> clientId);
- virtual void fireTestBroadcastWithOutArgsSelective(const uint32_t& uint32Value, const std::string& stringValue, const std::shared_ptr<CommonAPI::ClientIdList> receivers = NULL);
- virtual std::shared_ptr<CommonAPI::ClientIdList> const getSubscribersForTestBroadcastWithOutArgsSelective();
- /// Hook method for reacting on new subscriptions or removed subscriptions respectively for selective broadcasts.
- virtual void onTestBroadcastWithOutArgsSelectiveSubscriptionChanged(const std::shared_ptr<CommonAPI::ClientId> clientId, const CommonAPI::SelectiveBroadcastSubscriptionEvent event);
- /// Hook method for reacting accepting or denying new subscriptions
- virtual bool onTestBroadcastWithOutArgsSelectiveSubscriptionRequested(const std::shared_ptr<CommonAPI::ClientId> clientId);
-
-
-protected:
- virtual bool trySetTestPredefinedTypeAttributeAttribute(uint32_t value);
- virtual bool validateTestPredefinedTypeAttributeAttributeRequestedValue(const uint32_t& value);
- virtual void onRemoteTestPredefinedTypeAttributeAttributeChanged();
- virtual bool trySetTestDerivedStructAttributeAttribute(DerivedTypeCollection::TestStructExtended value);
- virtual bool validateTestDerivedStructAttributeAttributeRequestedValue(const DerivedTypeCollection::TestStructExtended& value);
- virtual void onRemoteTestDerivedStructAttributeAttributeChanged();
- virtual bool trySetTestDerivedArrayAttributeAttribute(DerivedTypeCollection::TestArrayUInt64 value);
- virtual bool validateTestDerivedArrayAttributeAttributeRequestedValue(const DerivedTypeCollection::TestArrayUInt64& value);
- virtual void onRemoteTestDerivedArrayAttributeAttributeChanged();
- class RemoteEventHandler: public virtual TestInterfaceStubRemoteEvent {
- public:
- RemoteEventHandler(TestInterfaceStubDefault* defaultStub);
-
- virtual bool onRemoteSetTestPredefinedTypeAttributeAttribute(uint32_t value);
- virtual bool onRemoteSetTestPredefinedTypeAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, uint32_t value);
- virtual void onRemoteTestPredefinedTypeAttributeAttributeChanged();
-
- virtual bool onRemoteSetTestDerivedStructAttributeAttribute(DerivedTypeCollection::TestStructExtended value);
- virtual bool onRemoteSetTestDerivedStructAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::TestStructExtended value);
- virtual void onRemoteTestDerivedStructAttributeAttributeChanged();
-
- virtual bool onRemoteSetTestDerivedArrayAttributeAttribute(DerivedTypeCollection::TestArrayUInt64 value);
- virtual bool onRemoteSetTestDerivedArrayAttributeAttribute(const std::shared_ptr<CommonAPI::ClientId> clientId, DerivedTypeCollection::TestArrayUInt64 value);
- virtual void onRemoteTestDerivedArrayAttributeAttributeChanged();
-
-
- private:
- TestInterfaceStubDefault* defaultStub_;
- };
-private:
- TestInterfaceStubDefault::RemoteEventHandler remoteEventHandler_;
-
- uint32_t testPredefinedTypeAttributeAttributeValue_;
- DerivedTypeCollection::TestStructExtended testDerivedStructAttributeAttributeValue_;
- DerivedTypeCollection::TestArrayUInt64 testDerivedArrayAttributeAttributeValue_;
-
- CommonAPI::Version interfaceVersion_;
-};
-
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_Test_Interface_STUB_DEFAULT_H_
diff --git a/src/test/commonapi/tests/managed/BranchInterface.h b/src/test/commonapi/tests/managed/BranchInterface.h
deleted file mode 100644
index dbf34b2..0000000
--- a/src/test/commonapi/tests/managed/BranchInterface.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_H_
-#define COMMONAPI_TESTS_MANAGED_Branch_Interface_H_
-
-
-
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <CommonAPI/InputStream.h>
-#include <CommonAPI/OutputStream.h>
-#include <CommonAPI/types.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-class BranchInterface {
- public:
- virtual ~BranchInterface() { }
-
- static inline const char* getInterfaceId();
- static inline CommonAPI::Version getInterfaceVersion();
- enum class testBranchMethodError: int32_t {
- OK,
- NOTOK
- };
-
- // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
- struct testBranchMethodErrorComparator;
-};
-
-const char* BranchInterface::getInterfaceId() {
- static const char* interfaceId = "commonapi.tests.managed.BranchInterface";
- return interfaceId;
-}
-
-CommonAPI::Version BranchInterface::getInterfaceVersion() {
- return CommonAPI::Version(1, 0);
-}
-
-inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, BranchInterface::testBranchMethodError& enumValue) {
- return inputStream.readEnumValue<int32_t>(enumValue);
-}
-
-inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const BranchInterface::testBranchMethodError& enumValue) {
- return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
-}
-
-struct BranchInterface::testBranchMethodErrorComparator {
- inline bool operator()(const testBranchMethodError& lhs, const testBranchMethodError& rhs) const {
- return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
- }
-};
-
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
-
-namespace CommonAPI {
-
-}
-
-
-namespace std {
- //hashes for types
-
- //hashes for error types
- //Hash for testBranchMethodError
- template<>
- struct hash<commonapi::tests::managed::BranchInterface::testBranchMethodError> {
- inline size_t operator()(const commonapi::tests::managed::BranchInterface::testBranchMethodError& testBranchMethodError) const {
- return static_cast<int32_t>(testBranchMethodError);
- }
- };
-}
-
-#endif // COMMONAPI_TESTS_MANAGED_Branch_Interface_H_
diff --git a/src/test/commonapi/tests/managed/BranchInterfaceDBusProxy.cpp b/src/test/commonapi/tests/managed/BranchInterfaceDBusProxy.cpp
deleted file mode 100644
index 4757c27..0000000
--- a/src/test/commonapi/tests/managed/BranchInterfaceDBusProxy.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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 "BranchInterfaceDBusProxy.h"
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-std::shared_ptr<CommonAPI::DBus::DBusProxy> createBranchInterfaceDBusProxy(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection) {
- return std::make_shared<BranchInterfaceDBusProxy>(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection);
-}
-
-INITIALIZER(registerBranchInterfaceDBusProxy) {
- CommonAPI::DBus::DBusFactory::registerProxyFactoryMethod(BranchInterface::getInterfaceId(),
- &createBranchInterfaceDBusProxy);
-}
-
-BranchInterfaceDBusProxy::BranchInterfaceDBusProxy(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection):
- CommonAPI::DBus::DBusProxy(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyconnection)
- {
- }
-
-
-
-void BranchInterfaceDBusProxy::testBranchMethod(const int32_t& inInt, const std::string& inString, CommonAPI::CallStatus& callStatus, BranchInterface::testBranchMethodError& methodError, int32_t& outInt, std::string& outString) {
- CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<int32_t, std::string>,
- CommonAPI::DBus::DBusSerializableArguments<BranchInterface::testBranchMethodError, int32_t, std::string> >::callMethodWithReply(
- *this,
- "testBranchMethod",
- "is",
- inInt, inString,
- callStatus,
- methodError
- , outInt, outString);
-}
-std::future<CommonAPI::CallStatus> BranchInterfaceDBusProxy::testBranchMethodAsync(const int32_t& inInt, const std::string& inString, TestBranchMethodAsyncCallback callback) {
- return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<int32_t, std::string>,
- CommonAPI::DBus::DBusSerializableArguments<BranchInterface::testBranchMethodError, int32_t, std::string> >::callMethodAsync(
- *this,
- "testBranchMethod",
- "is",
- inInt, inString,
- std::move(callback));
-}
-
-
-
-void BranchInterfaceDBusProxy::getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const {
- ownVersionMajor = 1;
- ownVersionMinor = 0;
-}
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
diff --git a/src/test/commonapi/tests/managed/BranchInterfaceDBusProxy.h b/src/test/commonapi/tests/managed/BranchInterfaceDBusProxy.h
deleted file mode 100644
index 455ab57..0000000
--- a/src/test/commonapi/tests/managed/BranchInterfaceDBusProxy.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_H_
-#define COMMONAPI_TESTS_MANAGED_Branch_Interface_DBUS_PROXY_H_
-
-#include <commonapi/tests/managed/BranchInterfaceProxyBase.h>
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <CommonAPI/DBus/DBusFactory.h>
-#include <CommonAPI/DBus/DBusProxy.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-#include <string>
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-class BranchInterfaceDBusProxy: virtual public BranchInterfaceProxyBase, virtual public CommonAPI::DBus::DBusProxy {
- public:
- BranchInterfaceDBusProxy(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection);
-
- virtual ~BranchInterfaceDBusProxy() { }
-
-
-
- virtual void testBranchMethod(const int32_t& inInt, const std::string& inString, CommonAPI::CallStatus& callStatus, BranchInterface::testBranchMethodError& methodError, int32_t& outInt, std::string& outString);
- virtual std::future<CommonAPI::CallStatus> testBranchMethodAsync(const int32_t& inInt, const std::string& inString, TestBranchMethodAsyncCallback callback);
-
-
- virtual void getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const;
-
- private:
-
-
-};
-
-
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_MANAGED_Branch_Interface_DBUS_PROXY_H_
diff --git a/src/test/commonapi/tests/managed/BranchInterfaceDBusStubAdapter.cpp b/src/test/commonapi/tests/managed/BranchInterfaceDBusStubAdapter.cpp
deleted file mode 100644
index d6ef6c8..0000000
--- a/src/test/commonapi/tests/managed/BranchInterfaceDBusStubAdapter.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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 "BranchInterfaceDBusStubAdapter.h"
-#include <commonapi/tests/managed/BranchInterface.h>
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> createBranchInterfaceDBusStubAdapter(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stubBase) {
- return std::make_shared<BranchInterfaceDBusStubAdapter>(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection, stubBase);
-}
-
-INITIALIZER(registerBranchInterfaceDBusStubAdapter) {
- CommonAPI::DBus::DBusFactory::registerAdapterFactoryMethod(BranchInterface::getInterfaceId(),
- &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=\"methodError\" type=\"i\" direction=\"out\" />\n"
- "<arg name=\"outInt\" type=\"i\" direction=\"out\" />\n"
- "<arg name=\"outString\" type=\"s\" direction=\"out\" />\n"
- "</method>\n"
-
- ;
- return introspectionData.c_str();
-}
-
-CommonAPI::DBus::DBusGetAttributeStubDispatcher<
- BranchInterfaceStub,
- CommonAPI::Version
- > BranchInterfaceDBusStubAdapterInternal::getBranchInterfaceInterfaceVersionStubDispatcher(&BranchInterfaceStub::getInterfaceVersion, "uu");
-
-
-
-CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- BranchInterfaceStub,
- std::tuple<int32_t, std::string>,
- std::tuple<BranchInterface::testBranchMethodError, int32_t, std::string>
- > BranchInterfaceDBusStubAdapterInternal::testBranchMethodStubDispatcher(&BranchInterfaceStub::testBranchMethod, "iis");
-
-
-
-
-
-const BranchInterfaceDBusStubAdapterHelper::StubDispatcherTable& BranchInterfaceDBusStubAdapterInternal::getStubDispatcherTable() {
- return stubDispatcherTable_;
-}
-
-const CommonAPI::DBus::StubAttributeTable& BranchInterfaceDBusStubAdapterInternal::getStubAttributeTable() {
- return stubAttributeTable_;
-}
-
-BranchInterfaceDBusStubAdapterInternal::BranchInterfaceDBusStubAdapterInternal(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& dbusInterfaceName,
- const std::string& dbusBusName,
- const std::string& dbusObjectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stub):
- CommonAPI::DBus::DBusStubAdapter(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- false),
- BranchInterfaceDBusStubAdapterHelper(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- std::dynamic_pointer_cast<BranchInterfaceStub>(stub),
- false),
- stubDispatcherTable_({
- { { "testBranchMethod", "is" }, &commonapi::tests::managed::BranchInterfaceDBusStubAdapterInternal::testBranchMethodStubDispatcher }
- }),
- stubAttributeTable_() {
-
- stubDispatcherTable_.insert({ { "getInterfaceVersion", "" }, &commonapi::tests::managed::BranchInterfaceDBusStubAdapterInternal::getBranchInterfaceInterfaceVersionStubDispatcher });
-}
-
-const bool BranchInterfaceDBusStubAdapterInternal::hasFreedesktopProperties() {
- return false;
-}
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
diff --git a/src/test/commonapi/tests/managed/BranchInterfaceDBusStubAdapter.h b/src/test/commonapi/tests/managed/BranchInterfaceDBusStubAdapter.h
deleted file mode 100644
index d0a1d24..0000000
--- a/src/test/commonapi/tests/managed/BranchInterfaceDBusStubAdapter.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_H_
-#define COMMONAPI_TESTS_MANAGED_Branch_Interface_DBUS_STUB_ADAPTER_H_
-
-#include <commonapi/tests/managed/BranchInterfaceStub.h>
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <CommonAPI/DBus/DBusStubAdapterHelper.h>
-#include <CommonAPI/DBus/DBusStubAdapter.h>
-#include <CommonAPI/DBus/DBusFactory.h>
-#include <CommonAPI/DBus/DBusServicePublisher.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-typedef CommonAPI::DBus::DBusStubAdapterHelper<BranchInterfaceStub> BranchInterfaceDBusStubAdapterHelper;
-
-class BranchInterfaceDBusStubAdapterInternal: public virtual BranchInterfaceStubAdapter, public BranchInterfaceDBusStubAdapterHelper {
- public:
- BranchInterfaceDBusStubAdapterInternal(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& dbusInterfaceName,
- const std::string& dbusBusName,
- const std::string& dbusObjectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stub);
-
- ~BranchInterfaceDBusStubAdapterInternal();
-
- virtual const bool hasFreedesktopProperties();
-
-
-
-
- const BranchInterfaceDBusStubAdapterHelper::StubDispatcherTable& getStubDispatcherTable();
- const CommonAPI::DBus::StubAttributeTable& getStubAttributeTable();
-
- void deactivateManagedInstances();
-
-
-static CommonAPI::DBus::DBusGetAttributeStubDispatcher<
- BranchInterfaceStub,
- CommonAPI::Version
- > getBranchInterfaceInterfaceVersionStubDispatcher;
-
-
-
-static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- BranchInterfaceStub,
- std::tuple<int32_t, std::string>,
- std::tuple<BranchInterface::testBranchMethodError, int32_t, std::string>
- > 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 std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& dbusInterfaceName,
- const std::string& dbusBusName,
- const std::string& dbusObjectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stub) :
- CommonAPI::DBus::DBusStubAdapter(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- false),
- BranchInterfaceDBusStubAdapterInternal(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- stub) { }
-};
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_MANAGED_Branch_Interface_DBUS_STUB_ADAPTER_H_
diff --git a/src/test/commonapi/tests/managed/BranchInterfaceProxy.h b/src/test/commonapi/tests/managed/BranchInterfaceProxy.h
deleted file mode 100644
index d91a5e8..0000000
--- a/src/test/commonapi/tests/managed/BranchInterfaceProxy.h
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
-* If a copy of the MPL was not distributed with this file, You can obtain one at
-* http://mozilla.org/MPL/2.0/.
-*/
-#ifndef COMMONAPI_TESTS_MANAGED_Branch_Interface_PROXY_H_
-#define COMMONAPI_TESTS_MANAGED_Branch_Interface_PROXY_H_
-
-#include "BranchInterfaceProxyBase.h"
-
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-template <typename ... _AttributeExtensions>
-class BranchInterfaceProxy: virtual public BranchInterface, virtual public BranchInterfaceProxyBase
-, public _AttributeExtensions... {
-public:
- BranchInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate);
- ~BranchInterfaceProxy();
-
- typedef BranchInterface InterfaceType;
-
-
-
-
- /**
- * Calls testBranchMethod with synchronous semantics.
- *
- * All const parameters are input parameters to this method.
- * All non-const parameters will be filled with the returned values.
- * The CallStatus will be filled when the method returns and indicate either
- * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
- * will be set.
- */
- virtual void testBranchMethod(const int32_t& inInt, const std::string& inString, CommonAPI::CallStatus& callStatus, BranchInterface::testBranchMethodError& methodError, int32_t& outInt, std::string& outString);
- /**
- * Calls testBranchMethod with asynchronous semantics.
- *
- * The provided callback will be called when the reply to this call arrives or
- * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
- * or which type of error has occurred. In case of any error, ONLY the CallStatus
- * will have a defined value.
- * The std::future returned by this method will be fulfilled at arrival of the reply.
- * It will provide the same value for CallStatus as will be handed to the callback.
- */
- virtual std::future<CommonAPI::CallStatus> testBranchMethodAsync(const int32_t& inInt, const std::string& inString, TestBranchMethodAsyncCallback callback);
-
-
- /**
- * Returns the CommonAPI address of the remote partner this proxy communicates with.
- */
- virtual std::string getAddress() const;
-
- /**
- * Returns the domain of the remote partner this proxy communicates with.
- */
- virtual const std::string& getDomain() const;
-
- /**
- * Returns the service ID of the remote partner this proxy communicates with.
- */
- virtual const std::string& getServiceId() const;
-
- /**
- * Returns the instance ID of the remote partner this proxy communicates with.
- */
- virtual const std::string& getInstanceId() const;
-
- /**
- * Returns true if the remote partner for this proxy is currently known to be available.
- */
- virtual bool isAvailable() const;
-
- /**
- * Returns true if the remote partner for this proxy is available.
- */
- virtual bool isAvailableBlocking() const;
-
- /**
- * Returns the wrapper class that is used to (de-)register for notifications about
- * the availability of the remote partner of this proxy.
- */
- virtual CommonAPI::ProxyStatusEvent& getProxyStatusEvent();
-
- /**
- * Returns the wrapper class that is used to access version information of the remote
- * partner of this proxy.
- */
- virtual CommonAPI::InterfaceVersionAttribute& getInterfaceVersionAttribute();
-
- private:
- std::shared_ptr<BranchInterfaceProxyBase> delegate_;
-};
-
-#ifdef WIN32
- typedef BranchInterfaceProxy<CommonAPI::WINDummyAttributeExtension<CommonAPI::WINDummyAttribute>> BranchInterfaceProxyDefault;
-#else
- typedef BranchInterfaceProxy<> BranchInterfaceProxyDefault;
-#endif
-
-
-//
-// BranchInterfaceProxy Implementation
-//
-template <typename ... _AttributeExtensions>
-BranchInterfaceProxy<_AttributeExtensions...>::BranchInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate):
- _AttributeExtensions(*(std::dynamic_pointer_cast<BranchInterfaceProxyBase>(delegate)))...,
- delegate_(std::dynamic_pointer_cast<BranchInterfaceProxyBase>(delegate)) {
-}
-
-template <typename ... _AttributeExtensions>
-BranchInterfaceProxy<_AttributeExtensions...>::~BranchInterfaceProxy() {
-}
-
-template <typename ... _AttributeExtensions>
-void BranchInterfaceProxy<_AttributeExtensions...>::testBranchMethod(const int32_t& inInt, const std::string& inString, CommonAPI::CallStatus& callStatus, BranchInterface::testBranchMethodError& methodError, int32_t& outInt, std::string& outString) {
- delegate_->testBranchMethod(inInt, inString, callStatus, methodError, outInt, outString);
-}
-
-template <typename ... _AttributeExtensions>
-std::future<CommonAPI::CallStatus> BranchInterfaceProxy<_AttributeExtensions...>::testBranchMethodAsync(const int32_t& inInt, const std::string& inString, TestBranchMethodAsyncCallback callback) {
- return delegate_->testBranchMethodAsync(inInt, inString, callback);
-}
-
-template <typename ... _AttributeExtensions>
-std::string BranchInterfaceProxy<_AttributeExtensions...>::getAddress() const {
- return delegate_->getAddress();
-}
-
-template <typename ... _AttributeExtensions>
-const std::string& BranchInterfaceProxy<_AttributeExtensions...>::getDomain() const {
- return delegate_->getDomain();
-}
-
-template <typename ... _AttributeExtensions>
-const std::string& BranchInterfaceProxy<_AttributeExtensions...>::getServiceId() const {
- return delegate_->getServiceId();
-}
-
-template <typename ... _AttributeExtensions>
-const std::string& BranchInterfaceProxy<_AttributeExtensions...>::getInstanceId() const {
- return delegate_->getInstanceId();
-}
-
-template <typename ... _AttributeExtensions>
-bool BranchInterfaceProxy<_AttributeExtensions...>::isAvailable() const {
- return delegate_->isAvailable();
-}
-
-template <typename ... _AttributeExtensions>
-bool BranchInterfaceProxy<_AttributeExtensions...>::isAvailableBlocking() const {
- return delegate_->isAvailableBlocking();
-}
-
-template <typename ... _AttributeExtensions>
-CommonAPI::ProxyStatusEvent& BranchInterfaceProxy<_AttributeExtensions...>::getProxyStatusEvent() {
- return delegate_->getProxyStatusEvent();
-}
-
-template <typename ... _AttributeExtensions>
-CommonAPI::InterfaceVersionAttribute& BranchInterfaceProxy<_AttributeExtensions...>::getInterfaceVersionAttribute() {
- return delegate_->getInterfaceVersionAttribute();
-}
-
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
-
-
-#endif // COMMONAPI_TESTS_MANAGED_Branch_Interface_PROXY_H_
diff --git a/src/test/commonapi/tests/managed/BranchInterfaceProxyBase.h b/src/test/commonapi/tests/managed/BranchInterfaceProxyBase.h
deleted file mode 100644
index 9ca826a..0000000
--- a/src/test/commonapi/tests/managed/BranchInterfaceProxyBase.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
-* If a copy of the MPL was not distributed with this file, You can obtain one at
-* http://mozilla.org/MPL/2.0/.
-*/
-#ifndef COMMONAPI_TESTS_MANAGED_Branch_Interface_PROXY_BASE_H_
-#define COMMONAPI_TESTS_MANAGED_Branch_Interface_PROXY_BASE_H_
-
-#include "BranchInterface.h"
-
-
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <vector>
-
-#include <CommonAPI/Proxy.h>
-#include <functional>
-#include <future>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-class BranchInterfaceProxyBase: virtual public CommonAPI::Proxy {
- public:
-
- typedef std::function<void(const CommonAPI::CallStatus&, const BranchInterface::testBranchMethodError&, const int32_t&, const std::string&)> TestBranchMethodAsyncCallback;
-
-
-
- virtual void testBranchMethod(const int32_t& inInt, const std::string& inString, CommonAPI::CallStatus& callStatus, BranchInterface::testBranchMethodError& methodError, int32_t& outInt, std::string& outString) = 0;
- virtual std::future<CommonAPI::CallStatus> testBranchMethodAsync(const int32_t& inInt, const std::string& inString, TestBranchMethodAsyncCallback callback) = 0;
-};
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_MANAGED_Branch_Interface_PROXY_BASE_H_
diff --git a/src/test/commonapi/tests/managed/BranchInterfaceStub.h b/src/test/commonapi/tests/managed/BranchInterfaceStub.h
deleted file mode 100644
index e94b775..0000000
--- a/src/test/commonapi/tests/managed/BranchInterfaceStub.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
-* If a copy of the MPL was not distributed with this file, You can obtain one at
-* http://mozilla.org/MPL/2.0/.
-*/
-#ifndef COMMONAPI_TESTS_MANAGED_Branch_Interface_STUB_H_
-#define COMMONAPI_TESTS_MANAGED_Branch_Interface_STUB_H_
-
-
-
-
-#include "BranchInterface.h"
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <vector>
-
-#include <CommonAPI/Stub.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-/**
- * Receives messages from remote and handles all dispatching of deserialized calls
- * to a stub for the service BranchInterface. Also provides means to send broadcasts
- * and attribute-changed-notifications of observable attributes as defined by this service.
- * An application developer should not need to bother with this class.
- */
-class BranchInterfaceStubAdapter: virtual public CommonAPI::StubAdapter, public BranchInterface {
- public:
-
-
-
- virtual void deactivateManagedInstances() = 0;
-protected:
- /**
- * Defines properties for storing the ClientIds of clients / proxies that have
- * subscribed to the selective broadcasts
- */
-};
-
-
-/**
- * Defines the necessary callbacks to handle remote set events related to the attributes
- * defined in the IDL description for BranchInterface.
- * For each attribute two callbacks are defined:
- * - a verification callback that allows to verify the requested value and to prevent setting
- * e.g. an invalid value ("onRemoteSet<AttributeName>").
- * - an action callback to do local work after the attribute value has been changed
- * ("onRemote<AttributeName>Changed").
- *
- * This class and the one below are the ones an application developer needs to have
- * a look at if he wants to implement a service.
- */
-class BranchInterfaceStubRemoteEvent {
- public:
- virtual ~BranchInterfaceStubRemoteEvent() { }
-
-};
-
-
-/**
- * Defines the interface that must be implemented by any class that should provide
- * the service BranchInterface to remote clients.
- * This class and the one above are the ones an application developer needs to have
- * a look at if he wants to implement a service.
- */
-class BranchInterfaceStub: public virtual CommonAPI::Stub<BranchInterfaceStubAdapter, BranchInterfaceStubRemoteEvent> {
-public:
- virtual ~BranchInterfaceStub() { }
- virtual const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId) = 0;
-
-
- /// This is the method that will be called on remote calls on the method testBranchMethod.
- virtual void testBranchMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, int32_t inInt, std::string inString, BranchInterface::testBranchMethodError& methodError, int32_t& outInt, std::string& outString) = 0;
-
- using CommonAPI::Stub<BranchInterfaceStubAdapter, BranchInterfaceStubRemoteEvent>::initStubAdapter;
- typedef CommonAPI::Stub<BranchInterfaceStubAdapter, BranchInterfaceStubRemoteEvent>::StubAdapterType StubAdapterType;
- typedef CommonAPI::Stub<BranchInterfaceStubAdapter, BranchInterfaceStubRemoteEvent>::RemoteEventHandlerType RemoteEventHandlerType;
- typedef BranchInterfaceStubRemoteEvent RemoteEventType;
- typedef BranchInterface StubInterface;
-};
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_MANAGED_Branch_Interface_STUB_H_
diff --git a/src/test/commonapi/tests/managed/BranchInterfaceStubDefault.cpp b/src/test/commonapi/tests/managed/BranchInterfaceStubDefault.cpp
deleted file mode 100644
index a539485..0000000
--- a/src/test/commonapi/tests/managed/BranchInterfaceStubDefault.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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 <commonapi/tests/managed/BranchInterfaceStubDefault.h>
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-BranchInterfaceStubDefault::BranchInterfaceStubDefault():
- remoteEventHandler_(this),
- interfaceVersion_(BranchInterface::getInterfaceVersion()) {
-}
-
-const CommonAPI::Version& BranchInterfaceStubDefault::getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId) {
- return interfaceVersion_;
-}
-
-BranchInterfaceStubRemoteEvent* BranchInterfaceStubDefault::initStubAdapter(const std::shared_ptr<BranchInterfaceStubAdapter>& stubAdapter) {
- CommonAPI::Stub<BranchInterfaceStubAdapter, BranchInterfaceStubRemoteEvent>::stubAdapter_ = stubAdapter;
- return &remoteEventHandler_;
-}
-
-
-void BranchInterfaceStubDefault::testBranchMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, int32_t inInt, std::string inString, BranchInterface::testBranchMethodError& methodError, int32_t& outInt, std::string& outString) {
- // Call old style methods in default
- testBranchMethod(inInt, inString, methodError, outInt, outString);
-}
-void BranchInterfaceStubDefault::testBranchMethod(int32_t inInt, std::string inString, BranchInterface::testBranchMethodError& methodError, int32_t& outInt, std::string& outString) {
- // No operation in default
-}
-
-
-
-
-BranchInterfaceStubDefault::RemoteEventHandler::RemoteEventHandler(BranchInterfaceStubDefault* defaultStub):
- defaultStub_(defaultStub) {
-}
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
diff --git a/src/test/commonapi/tests/managed/BranchInterfaceStubDefault.h b/src/test/commonapi/tests/managed/BranchInterfaceStubDefault.h
deleted file mode 100644
index bb1459b..0000000
--- a/src/test/commonapi/tests/managed/BranchInterfaceStubDefault.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
-* If a copy of the MPL was not distributed with this file, You can obtain one at
-* http://mozilla.org/MPL/2.0/.
-*/
-#ifndef COMMONAPI_TESTS_MANAGED_Branch_Interface_STUB_DEFAULT_H_
-#define COMMONAPI_TESTS_MANAGED_Branch_Interface_STUB_DEFAULT_H_
-
-
-#include <commonapi/tests/managed/BranchInterfaceStub.h>
-#include <sstream>
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-/**
- * Provides a default implementation for BranchInterfaceStubRemoteEvent and
- * BranchInterfaceStub. Method callbacks have an empty implementation,
- * remote set calls on attributes will always change the value of the attribute
- * to the one received.
- *
- * Override this stub if you only want to provide a subset of the functionality
- * that would be defined for this service, and/or if you do not need any non-default
- * behaviour.
- */
-class BranchInterfaceStubDefault : public virtual BranchInterfaceStub {
-public:
- BranchInterfaceStubDefault();
-
- BranchInterfaceStubRemoteEvent* initStubAdapter(const std::shared_ptr<BranchInterfaceStubAdapter>& stubAdapter);
-
- const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId);
-
-
- virtual void testBranchMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, int32_t inInt, std::string inString, BranchInterface::testBranchMethodError& methodError, int32_t& outInt, std::string& outString);
- virtual void testBranchMethod(int32_t inInt, std::string inString, BranchInterface::testBranchMethodError& methodError, int32_t& outInt, std::string& outString);
-
-
-
-
-protected:
- class RemoteEventHandler: public virtual BranchInterfaceStubRemoteEvent {
- public:
- RemoteEventHandler(BranchInterfaceStubDefault* defaultStub);
-
-
- private:
- BranchInterfaceStubDefault* defaultStub_;
- };
-private:
- BranchInterfaceStubDefault::RemoteEventHandler remoteEventHandler_;
-
-
- CommonAPI::Version interfaceVersion_;
-};
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_MANAGED_Branch_Interface_STUB_DEFAULT_H_
diff --git a/src/test/commonapi/tests/managed/LeafInterface.h b/src/test/commonapi/tests/managed/LeafInterface.h
deleted file mode 100644
index 389f805..0000000
--- a/src/test/commonapi/tests/managed/LeafInterface.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_H_
-#define COMMONAPI_TESTS_MANAGED_Leaf_Interface_H_
-
-
-
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <CommonAPI/InputStream.h>
-#include <CommonAPI/OutputStream.h>
-#include <CommonAPI/types.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-class LeafInterface {
- public:
- virtual ~LeafInterface() { }
-
- static inline const char* getInterfaceId();
- static inline CommonAPI::Version getInterfaceVersion();
- enum class testLeafMethodError: int32_t {
- OK,
- NOTOK
- };
-
- // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
- struct testLeafMethodErrorComparator;
-};
-
-const char* LeafInterface::getInterfaceId() {
- static const char* interfaceId = "commonapi.tests.managed.LeafInterface";
- return interfaceId;
-}
-
-CommonAPI::Version LeafInterface::getInterfaceVersion() {
- return CommonAPI::Version(1, 0);
-}
-
-inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, LeafInterface::testLeafMethodError& enumValue) {
- return inputStream.readEnumValue<int32_t>(enumValue);
-}
-
-inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const LeafInterface::testLeafMethodError& enumValue) {
- return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
-}
-
-struct LeafInterface::testLeafMethodErrorComparator {
- inline bool operator()(const testLeafMethodError& lhs, const testLeafMethodError& rhs) const {
- return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
- }
-};
-
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
-
-namespace CommonAPI {
-
-}
-
-
-namespace std {
- //hashes for types
-
- //hashes for error types
- //Hash for testLeafMethodError
- template<>
- struct hash<commonapi::tests::managed::LeafInterface::testLeafMethodError> {
- inline size_t operator()(const commonapi::tests::managed::LeafInterface::testLeafMethodError& testLeafMethodError) const {
- return static_cast<int32_t>(testLeafMethodError);
- }
- };
-}
-
-#endif // COMMONAPI_TESTS_MANAGED_Leaf_Interface_H_
diff --git a/src/test/commonapi/tests/managed/LeafInterfaceDBusProxy.cpp b/src/test/commonapi/tests/managed/LeafInterfaceDBusProxy.cpp
deleted file mode 100644
index 4616c17..0000000
--- a/src/test/commonapi/tests/managed/LeafInterfaceDBusProxy.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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 "LeafInterfaceDBusProxy.h"
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-std::shared_ptr<CommonAPI::DBus::DBusProxy> createLeafInterfaceDBusProxy(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection) {
- return std::make_shared<LeafInterfaceDBusProxy>(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection);
-}
-
-INITIALIZER(registerLeafInterfaceDBusProxy) {
- CommonAPI::DBus::DBusFactory::registerProxyFactoryMethod(LeafInterface::getInterfaceId(),
- &createLeafInterfaceDBusProxy);
-}
-
-LeafInterfaceDBusProxy::LeafInterfaceDBusProxy(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection):
- CommonAPI::DBus::DBusProxy(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyconnection)
- {
- }
-
-
-
-void LeafInterfaceDBusProxy::testLeafMethod(const int32_t& inInt, const std::string& inString, CommonAPI::CallStatus& callStatus, LeafInterface::testLeafMethodError& methodError, int32_t& outInt, std::string& outString) {
- CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<int32_t, std::string>,
- CommonAPI::DBus::DBusSerializableArguments<LeafInterface::testLeafMethodError, int32_t, std::string> >::callMethodWithReply(
- *this,
- "testLeafMethod",
- "is",
- inInt, inString,
- callStatus,
- methodError
- , outInt, outString);
-}
-std::future<CommonAPI::CallStatus> LeafInterfaceDBusProxy::testLeafMethodAsync(const int32_t& inInt, const std::string& inString, TestLeafMethodAsyncCallback callback) {
- return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<int32_t, std::string>,
- CommonAPI::DBus::DBusSerializableArguments<LeafInterface::testLeafMethodError, int32_t, std::string> >::callMethodAsync(
- *this,
- "testLeafMethod",
- "is",
- inInt, inString,
- std::move(callback));
-}
-
-
-
-void LeafInterfaceDBusProxy::getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const {
- ownVersionMajor = 1;
- ownVersionMinor = 0;
-}
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
diff --git a/src/test/commonapi/tests/managed/LeafInterfaceDBusProxy.h b/src/test/commonapi/tests/managed/LeafInterfaceDBusProxy.h
deleted file mode 100644
index ae3f94e..0000000
--- a/src/test/commonapi/tests/managed/LeafInterfaceDBusProxy.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_H_
-#define COMMONAPI_TESTS_MANAGED_Leaf_Interface_DBUS_PROXY_H_
-
-#include <commonapi/tests/managed/LeafInterfaceProxyBase.h>
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <CommonAPI/DBus/DBusFactory.h>
-#include <CommonAPI/DBus/DBusProxy.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-#include <string>
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-class LeafInterfaceDBusProxy: virtual public LeafInterfaceProxyBase, virtual public CommonAPI::DBus::DBusProxy {
- public:
- LeafInterfaceDBusProxy(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection);
-
- virtual ~LeafInterfaceDBusProxy() { }
-
-
-
- virtual void testLeafMethod(const int32_t& inInt, const std::string& inString, CommonAPI::CallStatus& callStatus, LeafInterface::testLeafMethodError& methodError, int32_t& outInt, std::string& outString);
- virtual std::future<CommonAPI::CallStatus> testLeafMethodAsync(const int32_t& inInt, const std::string& inString, TestLeafMethodAsyncCallback callback);
-
-
- virtual void getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const;
-
- private:
-
-
-};
-
-
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_MANAGED_Leaf_Interface_DBUS_PROXY_H_
diff --git a/src/test/commonapi/tests/managed/LeafInterfaceDBusStubAdapter.cpp b/src/test/commonapi/tests/managed/LeafInterfaceDBusStubAdapter.cpp
deleted file mode 100644
index 1224eeb..0000000
--- a/src/test/commonapi/tests/managed/LeafInterfaceDBusStubAdapter.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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 "LeafInterfaceDBusStubAdapter.h"
-#include <commonapi/tests/managed/LeafInterface.h>
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> createLeafInterfaceDBusStubAdapter(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stubBase) {
- return std::make_shared<LeafInterfaceDBusStubAdapter>(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection, stubBase);
-}
-
-INITIALIZER(registerLeafInterfaceDBusStubAdapter) {
- CommonAPI::DBus::DBusFactory::registerAdapterFactoryMethod(LeafInterface::getInterfaceId(),
- &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=\"methodError\" type=\"i\" direction=\"out\" />\n"
- "<arg name=\"outInt\" type=\"i\" direction=\"out\" />\n"
- "<arg name=\"outString\" type=\"s\" direction=\"out\" />\n"
- "</method>\n"
-
- ;
- return introspectionData.c_str();
-}
-
-CommonAPI::DBus::DBusGetAttributeStubDispatcher<
- LeafInterfaceStub,
- CommonAPI::Version
- > LeafInterfaceDBusStubAdapterInternal::getLeafInterfaceInterfaceVersionStubDispatcher(&LeafInterfaceStub::getInterfaceVersion, "uu");
-
-
-
-CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- LeafInterfaceStub,
- std::tuple<int32_t, std::string>,
- std::tuple<LeafInterface::testLeafMethodError, int32_t, std::string>
- > LeafInterfaceDBusStubAdapterInternal::testLeafMethodStubDispatcher(&LeafInterfaceStub::testLeafMethod, "iis");
-
-
-
-
-
-const LeafInterfaceDBusStubAdapterHelper::StubDispatcherTable& LeafInterfaceDBusStubAdapterInternal::getStubDispatcherTable() {
- return stubDispatcherTable_;
-}
-
-const CommonAPI::DBus::StubAttributeTable& LeafInterfaceDBusStubAdapterInternal::getStubAttributeTable() {
- return stubAttributeTable_;
-}
-
-LeafInterfaceDBusStubAdapterInternal::LeafInterfaceDBusStubAdapterInternal(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& dbusInterfaceName,
- const std::string& dbusBusName,
- const std::string& dbusObjectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stub):
- CommonAPI::DBus::DBusStubAdapter(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- false),
- LeafInterfaceDBusStubAdapterHelper(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- std::dynamic_pointer_cast<LeafInterfaceStub>(stub),
- false),
- stubDispatcherTable_({
- { { "testLeafMethod", "is" }, &commonapi::tests::managed::LeafInterfaceDBusStubAdapterInternal::testLeafMethodStubDispatcher }
- }),
- stubAttributeTable_() {
-
- stubDispatcherTable_.insert({ { "getInterfaceVersion", "" }, &commonapi::tests::managed::LeafInterfaceDBusStubAdapterInternal::getLeafInterfaceInterfaceVersionStubDispatcher });
-}
-
-const bool LeafInterfaceDBusStubAdapterInternal::hasFreedesktopProperties() {
- return false;
-}
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
diff --git a/src/test/commonapi/tests/managed/LeafInterfaceDBusStubAdapter.h b/src/test/commonapi/tests/managed/LeafInterfaceDBusStubAdapter.h
deleted file mode 100644
index 6930bda..0000000
--- a/src/test/commonapi/tests/managed/LeafInterfaceDBusStubAdapter.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_H_
-#define COMMONAPI_TESTS_MANAGED_Leaf_Interface_DBUS_STUB_ADAPTER_H_
-
-#include <commonapi/tests/managed/LeafInterfaceStub.h>
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <CommonAPI/DBus/DBusStubAdapterHelper.h>
-#include <CommonAPI/DBus/DBusStubAdapter.h>
-#include <CommonAPI/DBus/DBusFactory.h>
-#include <CommonAPI/DBus/DBusServicePublisher.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-typedef CommonAPI::DBus::DBusStubAdapterHelper<LeafInterfaceStub> LeafInterfaceDBusStubAdapterHelper;
-
-class LeafInterfaceDBusStubAdapterInternal: public virtual LeafInterfaceStubAdapter, public LeafInterfaceDBusStubAdapterHelper {
- public:
- LeafInterfaceDBusStubAdapterInternal(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& dbusInterfaceName,
- const std::string& dbusBusName,
- const std::string& dbusObjectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stub);
-
- ~LeafInterfaceDBusStubAdapterInternal();
-
- virtual const bool hasFreedesktopProperties();
-
-
-
-
- const LeafInterfaceDBusStubAdapterHelper::StubDispatcherTable& getStubDispatcherTable();
- const CommonAPI::DBus::StubAttributeTable& getStubAttributeTable();
-
- void deactivateManagedInstances();
-
-
-static CommonAPI::DBus::DBusGetAttributeStubDispatcher<
- LeafInterfaceStub,
- CommonAPI::Version
- > getLeafInterfaceInterfaceVersionStubDispatcher;
-
-
-
-static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- LeafInterfaceStub,
- std::tuple<int32_t, std::string>,
- std::tuple<LeafInterface::testLeafMethodError, int32_t, std::string>
- > 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 std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& dbusInterfaceName,
- const std::string& dbusBusName,
- const std::string& dbusObjectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stub) :
- CommonAPI::DBus::DBusStubAdapter(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- false),
- LeafInterfaceDBusStubAdapterInternal(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- stub) { }
-};
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_MANAGED_Leaf_Interface_DBUS_STUB_ADAPTER_H_
diff --git a/src/test/commonapi/tests/managed/LeafInterfaceProxy.h b/src/test/commonapi/tests/managed/LeafInterfaceProxy.h
deleted file mode 100644
index 4aa88a5..0000000
--- a/src/test/commonapi/tests/managed/LeafInterfaceProxy.h
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
-* If a copy of the MPL was not distributed with this file, You can obtain one at
-* http://mozilla.org/MPL/2.0/.
-*/
-#ifndef COMMONAPI_TESTS_MANAGED_Leaf_Interface_PROXY_H_
-#define COMMONAPI_TESTS_MANAGED_Leaf_Interface_PROXY_H_
-
-#include "LeafInterfaceProxyBase.h"
-
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-template <typename ... _AttributeExtensions>
-class LeafInterfaceProxy: virtual public LeafInterface, virtual public LeafInterfaceProxyBase
-, public _AttributeExtensions... {
-public:
- LeafInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate);
- ~LeafInterfaceProxy();
-
- typedef LeafInterface InterfaceType;
-
-
-
-
- /**
- * Calls testLeafMethod with synchronous semantics.
- *
- * All const parameters are input parameters to this method.
- * All non-const parameters will be filled with the returned values.
- * The CallStatus will be filled when the method returns and indicate either
- * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
- * will be set.
- */
- virtual void testLeafMethod(const int32_t& inInt, const std::string& inString, CommonAPI::CallStatus& callStatus, LeafInterface::testLeafMethodError& methodError, int32_t& outInt, std::string& outString);
- /**
- * Calls testLeafMethod with asynchronous semantics.
- *
- * The provided callback will be called when the reply to this call arrives or
- * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
- * or which type of error has occurred. In case of any error, ONLY the CallStatus
- * will have a defined value.
- * The std::future returned by this method will be fulfilled at arrival of the reply.
- * It will provide the same value for CallStatus as will be handed to the callback.
- */
- virtual std::future<CommonAPI::CallStatus> testLeafMethodAsync(const int32_t& inInt, const std::string& inString, TestLeafMethodAsyncCallback callback);
-
-
- /**
- * Returns the CommonAPI address of the remote partner this proxy communicates with.
- */
- virtual std::string getAddress() const;
-
- /**
- * Returns the domain of the remote partner this proxy communicates with.
- */
- virtual const std::string& getDomain() const;
-
- /**
- * Returns the service ID of the remote partner this proxy communicates with.
- */
- virtual const std::string& getServiceId() const;
-
- /**
- * Returns the instance ID of the remote partner this proxy communicates with.
- */
- virtual const std::string& getInstanceId() const;
-
- /**
- * Returns true if the remote partner for this proxy is currently known to be available.
- */
- virtual bool isAvailable() const;
-
- /**
- * Returns true if the remote partner for this proxy is available.
- */
- virtual bool isAvailableBlocking() const;
-
- /**
- * Returns the wrapper class that is used to (de-)register for notifications about
- * the availability of the remote partner of this proxy.
- */
- virtual CommonAPI::ProxyStatusEvent& getProxyStatusEvent();
-
- /**
- * Returns the wrapper class that is used to access version information of the remote
- * partner of this proxy.
- */
- virtual CommonAPI::InterfaceVersionAttribute& getInterfaceVersionAttribute();
-
- private:
- std::shared_ptr<LeafInterfaceProxyBase> delegate_;
-};
-
-#ifdef WIN32
- typedef LeafInterfaceProxy<CommonAPI::WINDummyAttributeExtension<CommonAPI::WINDummyAttribute>> LeafInterfaceProxyDefault;
-#else
- typedef LeafInterfaceProxy<> LeafInterfaceProxyDefault;
-#endif
-
-
-//
-// LeafInterfaceProxy Implementation
-//
-template <typename ... _AttributeExtensions>
-LeafInterfaceProxy<_AttributeExtensions...>::LeafInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate):
- _AttributeExtensions(*(std::dynamic_pointer_cast<LeafInterfaceProxyBase>(delegate)))...,
- delegate_(std::dynamic_pointer_cast<LeafInterfaceProxyBase>(delegate)) {
-}
-
-template <typename ... _AttributeExtensions>
-LeafInterfaceProxy<_AttributeExtensions...>::~LeafInterfaceProxy() {
-}
-
-template <typename ... _AttributeExtensions>
-void LeafInterfaceProxy<_AttributeExtensions...>::testLeafMethod(const int32_t& inInt, const std::string& inString, CommonAPI::CallStatus& callStatus, LeafInterface::testLeafMethodError& methodError, int32_t& outInt, std::string& outString) {
- delegate_->testLeafMethod(inInt, inString, callStatus, methodError, outInt, outString);
-}
-
-template <typename ... _AttributeExtensions>
-std::future<CommonAPI::CallStatus> LeafInterfaceProxy<_AttributeExtensions...>::testLeafMethodAsync(const int32_t& inInt, const std::string& inString, TestLeafMethodAsyncCallback callback) {
- return delegate_->testLeafMethodAsync(inInt, inString, callback);
-}
-
-template <typename ... _AttributeExtensions>
-std::string LeafInterfaceProxy<_AttributeExtensions...>::getAddress() const {
- return delegate_->getAddress();
-}
-
-template <typename ... _AttributeExtensions>
-const std::string& LeafInterfaceProxy<_AttributeExtensions...>::getDomain() const {
- return delegate_->getDomain();
-}
-
-template <typename ... _AttributeExtensions>
-const std::string& LeafInterfaceProxy<_AttributeExtensions...>::getServiceId() const {
- return delegate_->getServiceId();
-}
-
-template <typename ... _AttributeExtensions>
-const std::string& LeafInterfaceProxy<_AttributeExtensions...>::getInstanceId() const {
- return delegate_->getInstanceId();
-}
-
-template <typename ... _AttributeExtensions>
-bool LeafInterfaceProxy<_AttributeExtensions...>::isAvailable() const {
- return delegate_->isAvailable();
-}
-
-template <typename ... _AttributeExtensions>
-bool LeafInterfaceProxy<_AttributeExtensions...>::isAvailableBlocking() const {
- return delegate_->isAvailableBlocking();
-}
-
-template <typename ... _AttributeExtensions>
-CommonAPI::ProxyStatusEvent& LeafInterfaceProxy<_AttributeExtensions...>::getProxyStatusEvent() {
- return delegate_->getProxyStatusEvent();
-}
-
-template <typename ... _AttributeExtensions>
-CommonAPI::InterfaceVersionAttribute& LeafInterfaceProxy<_AttributeExtensions...>::getInterfaceVersionAttribute() {
- return delegate_->getInterfaceVersionAttribute();
-}
-
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
-
-
-#endif // COMMONAPI_TESTS_MANAGED_Leaf_Interface_PROXY_H_
diff --git a/src/test/commonapi/tests/managed/LeafInterfaceProxyBase.h b/src/test/commonapi/tests/managed/LeafInterfaceProxyBase.h
deleted file mode 100644
index 7dfc1e2..0000000
--- a/src/test/commonapi/tests/managed/LeafInterfaceProxyBase.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
-* If a copy of the MPL was not distributed with this file, You can obtain one at
-* http://mozilla.org/MPL/2.0/.
-*/
-#ifndef COMMONAPI_TESTS_MANAGED_Leaf_Interface_PROXY_BASE_H_
-#define COMMONAPI_TESTS_MANAGED_Leaf_Interface_PROXY_BASE_H_
-
-#include "LeafInterface.h"
-
-
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <vector>
-
-#include <CommonAPI/Proxy.h>
-#include <functional>
-#include <future>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-class LeafInterfaceProxyBase: virtual public CommonAPI::Proxy {
- public:
-
- typedef std::function<void(const CommonAPI::CallStatus&, const LeafInterface::testLeafMethodError&, const int32_t&, const std::string&)> TestLeafMethodAsyncCallback;
-
-
-
- virtual void testLeafMethod(const int32_t& inInt, const std::string& inString, CommonAPI::CallStatus& callStatus, LeafInterface::testLeafMethodError& methodError, int32_t& outInt, std::string& outString) = 0;
- virtual std::future<CommonAPI::CallStatus> testLeafMethodAsync(const int32_t& inInt, const std::string& inString, TestLeafMethodAsyncCallback callback) = 0;
-};
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_MANAGED_Leaf_Interface_PROXY_BASE_H_
diff --git a/src/test/commonapi/tests/managed/LeafInterfaceStub.h b/src/test/commonapi/tests/managed/LeafInterfaceStub.h
deleted file mode 100644
index e93cdf0..0000000
--- a/src/test/commonapi/tests/managed/LeafInterfaceStub.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
-* If a copy of the MPL was not distributed with this file, You can obtain one at
-* http://mozilla.org/MPL/2.0/.
-*/
-#ifndef COMMONAPI_TESTS_MANAGED_Leaf_Interface_STUB_H_
-#define COMMONAPI_TESTS_MANAGED_Leaf_Interface_STUB_H_
-
-
-
-
-#include "LeafInterface.h"
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <vector>
-
-#include <CommonAPI/Stub.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-/**
- * Receives messages from remote and handles all dispatching of deserialized calls
- * to a stub for the service LeafInterface. Also provides means to send broadcasts
- * and attribute-changed-notifications of observable attributes as defined by this service.
- * An application developer should not need to bother with this class.
- */
-class LeafInterfaceStubAdapter: virtual public CommonAPI::StubAdapter, public LeafInterface {
- public:
-
-
-
- virtual void deactivateManagedInstances() = 0;
-protected:
- /**
- * Defines properties for storing the ClientIds of clients / proxies that have
- * subscribed to the selective broadcasts
- */
-};
-
-
-/**
- * Defines the necessary callbacks to handle remote set events related to the attributes
- * defined in the IDL description for LeafInterface.
- * For each attribute two callbacks are defined:
- * - a verification callback that allows to verify the requested value and to prevent setting
- * e.g. an invalid value ("onRemoteSet<AttributeName>").
- * - an action callback to do local work after the attribute value has been changed
- * ("onRemote<AttributeName>Changed").
- *
- * This class and the one below are the ones an application developer needs to have
- * a look at if he wants to implement a service.
- */
-class LeafInterfaceStubRemoteEvent {
- public:
- virtual ~LeafInterfaceStubRemoteEvent() { }
-
-};
-
-
-/**
- * Defines the interface that must be implemented by any class that should provide
- * the service LeafInterface to remote clients.
- * This class and the one above are the ones an application developer needs to have
- * a look at if he wants to implement a service.
- */
-class LeafInterfaceStub: public virtual CommonAPI::Stub<LeafInterfaceStubAdapter, LeafInterfaceStubRemoteEvent> {
-public:
- virtual ~LeafInterfaceStub() { }
- virtual const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId) = 0;
-
-
- /// This is the method that will be called on remote calls on the method testLeafMethod.
- virtual void testLeafMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, int32_t inInt, std::string inString, LeafInterface::testLeafMethodError& methodError, int32_t& outInt, std::string& outString) = 0;
-
- using CommonAPI::Stub<LeafInterfaceStubAdapter, LeafInterfaceStubRemoteEvent>::initStubAdapter;
- typedef CommonAPI::Stub<LeafInterfaceStubAdapter, LeafInterfaceStubRemoteEvent>::StubAdapterType StubAdapterType;
- typedef CommonAPI::Stub<LeafInterfaceStubAdapter, LeafInterfaceStubRemoteEvent>::RemoteEventHandlerType RemoteEventHandlerType;
- typedef LeafInterfaceStubRemoteEvent RemoteEventType;
- typedef LeafInterface StubInterface;
-};
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_MANAGED_Leaf_Interface_STUB_H_
diff --git a/src/test/commonapi/tests/managed/LeafInterfaceStubDefault.cpp b/src/test/commonapi/tests/managed/LeafInterfaceStubDefault.cpp
deleted file mode 100644
index dd8ab62..0000000
--- a/src/test/commonapi/tests/managed/LeafInterfaceStubDefault.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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 <commonapi/tests/managed/LeafInterfaceStubDefault.h>
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-LeafInterfaceStubDefault::LeafInterfaceStubDefault():
- remoteEventHandler_(this),
- interfaceVersion_(LeafInterface::getInterfaceVersion()) {
-}
-
-const CommonAPI::Version& LeafInterfaceStubDefault::getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId) {
- return interfaceVersion_;
-}
-
-LeafInterfaceStubRemoteEvent* LeafInterfaceStubDefault::initStubAdapter(const std::shared_ptr<LeafInterfaceStubAdapter>& stubAdapter) {
- CommonAPI::Stub<LeafInterfaceStubAdapter, LeafInterfaceStubRemoteEvent>::stubAdapter_ = stubAdapter;
- return &remoteEventHandler_;
-}
-
-
-void LeafInterfaceStubDefault::testLeafMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, int32_t inInt, std::string inString, LeafInterface::testLeafMethodError& methodError, int32_t& outInt, std::string& outString) {
- // Call old style methods in default
- testLeafMethod(inInt, inString, methodError, outInt, outString);
-}
-void LeafInterfaceStubDefault::testLeafMethod(int32_t inInt, std::string inString, LeafInterface::testLeafMethodError& methodError, int32_t& outInt, std::string& outString) {
- // No operation in default
-}
-
-
-
-
-LeafInterfaceStubDefault::RemoteEventHandler::RemoteEventHandler(LeafInterfaceStubDefault* defaultStub):
- defaultStub_(defaultStub) {
-}
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
diff --git a/src/test/commonapi/tests/managed/LeafInterfaceStubDefault.h b/src/test/commonapi/tests/managed/LeafInterfaceStubDefault.h
deleted file mode 100644
index c0bd5b1..0000000
--- a/src/test/commonapi/tests/managed/LeafInterfaceStubDefault.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
-* If a copy of the MPL was not distributed with this file, You can obtain one at
-* http://mozilla.org/MPL/2.0/.
-*/
-#ifndef COMMONAPI_TESTS_MANAGED_Leaf_Interface_STUB_DEFAULT_H_
-#define COMMONAPI_TESTS_MANAGED_Leaf_Interface_STUB_DEFAULT_H_
-
-
-#include <commonapi/tests/managed/LeafInterfaceStub.h>
-#include <sstream>
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-/**
- * Provides a default implementation for LeafInterfaceStubRemoteEvent and
- * LeafInterfaceStub. Method callbacks have an empty implementation,
- * remote set calls on attributes will always change the value of the attribute
- * to the one received.
- *
- * Override this stub if you only want to provide a subset of the functionality
- * that would be defined for this service, and/or if you do not need any non-default
- * behaviour.
- */
-class LeafInterfaceStubDefault : public virtual LeafInterfaceStub {
-public:
- LeafInterfaceStubDefault();
-
- LeafInterfaceStubRemoteEvent* initStubAdapter(const std::shared_ptr<LeafInterfaceStubAdapter>& stubAdapter);
-
- const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId);
-
-
- virtual void testLeafMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, int32_t inInt, std::string inString, LeafInterface::testLeafMethodError& methodError, int32_t& outInt, std::string& outString);
- virtual void testLeafMethod(int32_t inInt, std::string inString, LeafInterface::testLeafMethodError& methodError, int32_t& outInt, std::string& outString);
-
-
-
-
-protected:
- class RemoteEventHandler: public virtual LeafInterfaceStubRemoteEvent {
- public:
- RemoteEventHandler(LeafInterfaceStubDefault* defaultStub);
-
-
- private:
- LeafInterfaceStubDefault* defaultStub_;
- };
-private:
- LeafInterfaceStubDefault::RemoteEventHandler remoteEventHandler_;
-
-
- CommonAPI::Version interfaceVersion_;
-};
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_MANAGED_Leaf_Interface_STUB_DEFAULT_H_
diff --git a/src/test/commonapi/tests/managed/RootInterface.h b/src/test/commonapi/tests/managed/RootInterface.h
deleted file mode 100644
index b1e9758..0000000
--- a/src/test/commonapi/tests/managed/RootInterface.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_H_
-#define COMMONAPI_TESTS_MANAGED_Root_Interface_H_
-
-
-#include <set>
-
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <CommonAPI/InputStream.h>
-#include <CommonAPI/OutputStream.h>
-#include <CommonAPI/types.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-class RootInterface {
- public:
- virtual ~RootInterface() { }
-
- static inline const char* getInterfaceId();
- static inline CommonAPI::Version getInterfaceVersion();
- enum class testRootMethodError: int32_t {
- OK,
- NOTOK
- };
-
- // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
- struct testRootMethodErrorComparator;
-};
-
-const char* RootInterface::getInterfaceId() {
- static const char* interfaceId = "commonapi.tests.managed.RootInterface";
- return interfaceId;
-}
-
-CommonAPI::Version RootInterface::getInterfaceVersion() {
- return CommonAPI::Version(1, 0);
-}
-
-inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, RootInterface::testRootMethodError& enumValue) {
- return inputStream.readEnumValue<int32_t>(enumValue);
-}
-
-inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const RootInterface::testRootMethodError& enumValue) {
- return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
-}
-
-struct RootInterface::testRootMethodErrorComparator {
- inline bool operator()(const testRootMethodError& lhs, const testRootMethodError& rhs) const {
- return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
- }
-};
-
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
-
-namespace CommonAPI {
-
-}
-
-
-namespace std {
- //hashes for types
-
- //hashes for error types
- //Hash for testRootMethodError
- template<>
- struct hash<commonapi::tests::managed::RootInterface::testRootMethodError> {
- inline size_t operator()(const commonapi::tests::managed::RootInterface::testRootMethodError& testRootMethodError) const {
- return static_cast<int32_t>(testRootMethodError);
- }
- };
-}
-
-#endif // COMMONAPI_TESTS_MANAGED_Root_Interface_H_
diff --git a/src/test/commonapi/tests/managed/RootInterfaceDBusProxy.cpp b/src/test/commonapi/tests/managed/RootInterfaceDBusProxy.cpp
deleted file mode 100644
index 1c4e8c8..0000000
--- a/src/test/commonapi/tests/managed/RootInterfaceDBusProxy.cpp
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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 "RootInterfaceDBusProxy.h"
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-std::shared_ptr<CommonAPI::DBus::DBusProxy> createRootInterfaceDBusProxy(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection) {
- return std::make_shared<RootInterfaceDBusProxy>(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection);
-}
-
-INITIALIZER(registerRootInterfaceDBusProxy) {
- CommonAPI::DBus::DBusFactory::registerProxyFactoryMethod(RootInterface::getInterfaceId(),
- &createRootInterfaceDBusProxy);
-}
-
-RootInterfaceDBusProxy::RootInterfaceDBusProxy(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection):
- CommonAPI::DBus::DBusProxy(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyconnection)
-, proxyManagerLeafInterface_(*this, "commonapi.tests.managed.LeafInterface", factory),
- proxyManagerBranchInterface_(*this, "commonapi.tests.managed.BranchInterface", factory)
- {
- }
-
-
-
-void RootInterfaceDBusProxy::testRootMethod(const int32_t& inInt, const std::string& inString, CommonAPI::CallStatus& callStatus, RootInterface::testRootMethodError& methodError, int32_t& outInt, std::string& outString) {
- CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<int32_t, std::string>,
- CommonAPI::DBus::DBusSerializableArguments<RootInterface::testRootMethodError, int32_t, std::string> >::callMethodWithReply(
- *this,
- "testRootMethod",
- "is",
- inInt, inString,
- callStatus,
- methodError
- , outInt, outString);
-}
-std::future<CommonAPI::CallStatus> RootInterfaceDBusProxy::testRootMethodAsync(const int32_t& inInt, const std::string& inString, TestRootMethodAsyncCallback callback) {
- return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<int32_t, std::string>,
- CommonAPI::DBus::DBusSerializableArguments<RootInterface::testRootMethodError, int32_t, std::string> >::callMethodAsync(
- *this,
- "testRootMethod",
- "is",
- inInt, inString,
- std::move(callback));
-}
-
-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
diff --git a/src/test/commonapi/tests/managed/RootInterfaceDBusProxy.h b/src/test/commonapi/tests/managed/RootInterfaceDBusProxy.h
deleted file mode 100644
index a97f47c..0000000
--- a/src/test/commonapi/tests/managed/RootInterfaceDBusProxy.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_H_
-#define COMMONAPI_TESTS_MANAGED_Root_Interface_DBUS_PROXY_H_
-
-#include <commonapi/tests/managed/RootInterfaceProxyBase.h>
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <CommonAPI/DBus/DBusFactory.h>
-#include <CommonAPI/DBus/DBusProxy.h>
-#include <CommonAPI/DBus/DBusProxyManager.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-#include <string>
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-class RootInterfaceDBusProxy: virtual public RootInterfaceProxyBase, virtual public CommonAPI::DBus::DBusProxy {
- public:
- RootInterfaceDBusProxy(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection);
-
- virtual ~RootInterfaceDBusProxy() { }
-
-
-
- virtual void testRootMethod(const int32_t& inInt, const std::string& inString, CommonAPI::CallStatus& callStatus, RootInterface::testRootMethodError& methodError, int32_t& outInt, std::string& outString);
- virtual std::future<CommonAPI::CallStatus> testRootMethodAsync(const int32_t& inInt, const std::string& inString, TestRootMethodAsyncCallback callback);
-
- 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
-
-#endif // COMMONAPI_TESTS_MANAGED_Root_Interface_DBUS_PROXY_H_
diff --git a/src/test/commonapi/tests/managed/RootInterfaceDBusStubAdapter.cpp b/src/test/commonapi/tests/managed/RootInterfaceDBusStubAdapter.cpp
deleted file mode 100644
index e5e8f7c..0000000
--- a/src/test/commonapi/tests/managed/RootInterfaceDBusStubAdapter.cpp
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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 "RootInterfaceDBusStubAdapter.h"
-#include <commonapi/tests/managed/RootInterface.h>
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> createRootInterfaceDBusStubAdapter(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stubBase) {
- return std::make_shared<RootInterfaceDBusStubAdapter>(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection, stubBase);
-}
-
-INITIALIZER(registerRootInterfaceDBusStubAdapter) {
- CommonAPI::DBus::DBusFactory::registerAdapterFactoryMethod(RootInterface::getInterfaceId(),
- &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=\"methodError\" type=\"i\" direction=\"out\" />\n"
- "<arg name=\"outInt\" type=\"i\" direction=\"out\" />\n"
- "<arg name=\"outString\" type=\"s\" direction=\"out\" />\n"
- "</method>\n"
-
- ;
- return introspectionData.c_str();
-}
-
-CommonAPI::DBus::DBusGetAttributeStubDispatcher<
- RootInterfaceStub,
- CommonAPI::Version
- > RootInterfaceDBusStubAdapterInternal::getRootInterfaceInterfaceVersionStubDispatcher(&RootInterfaceStub::getInterfaceVersion, "uu");
-
-
-
-CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- RootInterfaceStub,
- std::tuple<int32_t, std::string>,
- std::tuple<RootInterface::testRootMethodError, int32_t, std::string>
- > RootInterfaceDBusStubAdapterInternal::testRootMethodStubDispatcher(&RootInterfaceStub::testRootMethod, "iis");
-
-
-
-
-
-const RootInterfaceDBusStubAdapterHelper::StubDispatcherTable& RootInterfaceDBusStubAdapterInternal::getStubDispatcherTable() {
- return stubDispatcherTable_;
-}
-
-const CommonAPI::DBus::StubAttributeTable& RootInterfaceDBusStubAdapterInternal::getStubAttributeTable() {
- return stubAttributeTable_;
-}
-
- bool RootInterfaceDBusStubAdapterInternal::registerManagedStubLeafInterface(std::shared_ptr<LeafInterfaceStub> stub, const std::string& instance) {
- if (registeredLeafInterfaceInstances.find(instance) == registeredLeafInterfaceInstances.end()) {
- std::string commonApiAddress = "local:commonapi.tests.managed.LeafInterface:" + instance;
-
- std::string interfaceName;
- std::string connectionName;
- std::string objectPath;
-
- CommonAPI::DBus::DBusAddressTranslator::getInstance().searchForDBusAddress(
- commonApiAddress,
- interfaceName,
- connectionName,
- objectPath);
-
- if (objectPath.compare(0, dbusObjectPath_.length(), dbusObjectPath_) == 0) {
- auto dbusStubAdapter = factory_->createDBusStubAdapter(stub, "commonapi.tests.managed.LeafInterface",
- instance, "commonapi.tests.managed.LeafInterface", "local");
-
- bool success = CommonAPI::DBus::DBusServicePublisher::getInstance()->registerManagedService(dbusStubAdapter);
- if (success) {
- bool isServiceExportSuccessful = dbusConnection_->getDBusObjectManager()->exportManagedDBusStubAdapter(dbusObjectPath_, dbusStubAdapter);
- if (isServiceExportSuccessful) {
- registeredLeafInterfaceInstances.insert(instance);
- return true;
- } else {
- CommonAPI::DBus::DBusServicePublisher::getInstance()->unregisterManagedService(commonApiAddress);
- }
- }
- }
- }
- return false;
- }
-
- bool RootInterfaceDBusStubAdapterInternal::deregisterManagedStubLeafInterface(const std::string& instance) {
- std::string commonApiAddress = "local:commonapi.tests.managed.LeafInterface:" + instance;
- if (registeredLeafInterfaceInstances.find(instance) != registeredLeafInterfaceInstances.end()) {
- std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> dbusStubAdapter =
- CommonAPI::DBus::DBusServicePublisher::getInstance()->getRegisteredService(commonApiAddress);
- if (dbusStubAdapter != nullptr) {
- dbusConnection_->getDBusObjectManager()->unexportManagedDBusStubAdapter(dbusObjectPath_, dbusStubAdapter);
- CommonAPI::DBus::DBusServicePublisher::getInstance()->unregisterManagedService(commonApiAddress);
- registeredLeafInterfaceInstances.erase(instance);
- return true;
- }
- }
- return false;
- }
-
- std::set<std::string>& RootInterfaceDBusStubAdapterInternal::getLeafInterfaceInstances() {
- return registeredLeafInterfaceInstances;
- }
-
- bool RootInterfaceDBusStubAdapterInternal::registerManagedStubBranchInterface(std::shared_ptr<BranchInterfaceStub> stub, const std::string& instance) {
- if (registeredBranchInterfaceInstances.find(instance) == registeredBranchInterfaceInstances.end()) {
- std::string commonApiAddress = "local:commonapi.tests.managed.BranchInterface:" + instance;
-
- std::string interfaceName;
- std::string connectionName;
- std::string objectPath;
-
- CommonAPI::DBus::DBusAddressTranslator::getInstance().searchForDBusAddress(
- commonApiAddress,
- interfaceName,
- connectionName,
- objectPath);
-
- if (objectPath.compare(0, dbusObjectPath_.length(), dbusObjectPath_) == 0) {
- auto dbusStubAdapter = factory_->createDBusStubAdapter(stub, "commonapi.tests.managed.BranchInterface",
- instance, "commonapi.tests.managed.BranchInterface", "local");
-
- bool success = CommonAPI::DBus::DBusServicePublisher::getInstance()->registerManagedService(dbusStubAdapter);
- if (success) {
- bool isServiceExportSuccessful = dbusConnection_->getDBusObjectManager()->exportManagedDBusStubAdapter(dbusObjectPath_, dbusStubAdapter);
- if (isServiceExportSuccessful) {
- registeredBranchInterfaceInstances.insert(instance);
- return true;
- } else {
- CommonAPI::DBus::DBusServicePublisher::getInstance()->unregisterManagedService(commonApiAddress);
- }
- }
- }
- }
- return false;
- }
-
- bool RootInterfaceDBusStubAdapterInternal::deregisterManagedStubBranchInterface(const std::string& instance) {
- std::string commonApiAddress = "local:commonapi.tests.managed.BranchInterface:" + instance;
- if (registeredBranchInterfaceInstances.find(instance) != registeredBranchInterfaceInstances.end()) {
- std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> dbusStubAdapter =
- CommonAPI::DBus::DBusServicePublisher::getInstance()->getRegisteredService(commonApiAddress);
- if (dbusStubAdapter != nullptr) {
- dbusConnection_->getDBusObjectManager()->unexportManagedDBusStubAdapter(dbusObjectPath_, dbusStubAdapter);
- CommonAPI::DBus::DBusServicePublisher::getInstance()->unregisterManagedService(commonApiAddress);
- registeredBranchInterfaceInstances.erase(instance);
- return true;
- }
- }
- return false;
- }
-
- std::set<std::string>& RootInterfaceDBusStubAdapterInternal::getBranchInterfaceInstances() {
- return registeredBranchInterfaceInstances;
- }
-
-RootInterfaceDBusStubAdapterInternal::RootInterfaceDBusStubAdapterInternal(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& dbusInterfaceName,
- const std::string& dbusBusName,
- const std::string& dbusObjectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stub):
- CommonAPI::DBus::DBusStubAdapter(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- true),
- RootInterfaceDBusStubAdapterHelper(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- std::dynamic_pointer_cast<RootInterfaceStub>(stub),
- true),
- stubDispatcherTable_({
- { { "testRootMethod", "is" }, &commonapi::tests::managed::RootInterfaceDBusStubAdapterInternal::testRootMethodStubDispatcher }
- }),
- stubAttributeTable_() {
-
- stubDispatcherTable_.insert({ { "getInterfaceVersion", "" }, &commonapi::tests::managed::RootInterfaceDBusStubAdapterInternal::getRootInterfaceInterfaceVersionStubDispatcher });
-}
-
-const bool RootInterfaceDBusStubAdapterInternal::hasFreedesktopProperties() {
- return false;
-}
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
diff --git a/src/test/commonapi/tests/managed/RootInterfaceDBusStubAdapter.h b/src/test/commonapi/tests/managed/RootInterfaceDBusStubAdapter.h
deleted file mode 100644
index 95b8e7e..0000000
--- a/src/test/commonapi/tests/managed/RootInterfaceDBusStubAdapter.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_H_
-#define COMMONAPI_TESTS_MANAGED_Root_Interface_DBUS_STUB_ADAPTER_H_
-
-#include <commonapi/tests/managed/RootInterfaceStub.h>
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <CommonAPI/DBus/DBusStubAdapterHelper.h>
-#include <CommonAPI/DBus/DBusStubAdapter.h>
-#include <CommonAPI/DBus/DBusFactory.h>
-#include <CommonAPI/DBus/DBusServicePublisher.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-typedef CommonAPI::DBus::DBusStubAdapterHelper<RootInterfaceStub> RootInterfaceDBusStubAdapterHelper;
-
-class RootInterfaceDBusStubAdapterInternal: public virtual RootInterfaceStubAdapter, public RootInterfaceDBusStubAdapterHelper {
- public:
- RootInterfaceDBusStubAdapterInternal(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& dbusInterfaceName,
- const std::string& dbusBusName,
- const std::string& dbusObjectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stub);
-
- ~RootInterfaceDBusStubAdapterInternal();
-
- virtual const bool hasFreedesktopProperties();
-
-
-
- bool registerManagedStubLeafInterface(std::shared_ptr<LeafInterfaceStub>, const std::string&);
- bool deregisterManagedStubLeafInterface(const std::string&);
- std::set<std::string>& getLeafInterfaceInstances();
- bool registerManagedStubBranchInterface(std::shared_ptr<BranchInterfaceStub>, const std::string&);
- bool deregisterManagedStubBranchInterface(const std::string&);
- std::set<std::string>& getBranchInterfaceInstances();
-
- const RootInterfaceDBusStubAdapterHelper::StubDispatcherTable& getStubDispatcherTable();
- const CommonAPI::DBus::StubAttributeTable& getStubAttributeTable();
-
- void deactivateManagedInstances();
-
-
-static CommonAPI::DBus::DBusGetAttributeStubDispatcher<
- RootInterfaceStub,
- CommonAPI::Version
- > getRootInterfaceInterfaceVersionStubDispatcher;
-
-
-
-static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
- RootInterfaceStub,
- std::tuple<int32_t, std::string>,
- std::tuple<RootInterface::testRootMethodError, int32_t, std::string>
- > 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 std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& dbusInterfaceName,
- const std::string& dbusBusName,
- const std::string& dbusObjectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stub) :
- CommonAPI::DBus::DBusStubAdapter(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- true),
- RootInterfaceDBusStubAdapterInternal(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- stub) { }
-};
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_MANAGED_Root_Interface_DBUS_STUB_ADAPTER_H_
diff --git a/src/test/commonapi/tests/managed/RootInterfaceProxy.h b/src/test/commonapi/tests/managed/RootInterfaceProxy.h
deleted file mode 100644
index 7f01728..0000000
--- a/src/test/commonapi/tests/managed/RootInterfaceProxy.h
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
-* If a copy of the MPL was not distributed with this file, You can obtain one at
-* http://mozilla.org/MPL/2.0/.
-*/
-#ifndef COMMONAPI_TESTS_MANAGED_Root_Interface_PROXY_H_
-#define COMMONAPI_TESTS_MANAGED_Root_Interface_PROXY_H_
-
-#include "RootInterfaceProxyBase.h"
-
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-template <typename ... _AttributeExtensions>
-class RootInterfaceProxy: virtual public RootInterface, virtual public RootInterfaceProxyBase
-, public _AttributeExtensions... {
-public:
- RootInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate);
- ~RootInterfaceProxy();
-
- typedef RootInterface InterfaceType;
-
-
-
-
- /**
- * Calls testRootMethod with synchronous semantics.
- *
- * All const parameters are input parameters to this method.
- * All non-const parameters will be filled with the returned values.
- * The CallStatus will be filled when the method returns and indicate either
- * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
- * will be set.
- */
- virtual void testRootMethod(const int32_t& inInt, const std::string& inString, CommonAPI::CallStatus& callStatus, RootInterface::testRootMethodError& methodError, int32_t& outInt, std::string& outString);
- /**
- * Calls testRootMethod with asynchronous semantics.
- *
- * The provided callback will be called when the reply to this call arrives or
- * an error occurs during the call. The CallStatus will indicate either "SUCCESS"
- * or which type of error has occurred. In case of any error, ONLY the CallStatus
- * will have a defined value.
- * The std::future returned by this method will be fulfilled at arrival of the reply.
- * It will provide the same value for CallStatus as will be handed to the callback.
- */
- virtual std::future<CommonAPI::CallStatus> testRootMethodAsync(const int32_t& inInt, const std::string& inString, TestRootMethodAsyncCallback callback);
-
- virtual CommonAPI::ProxyManager& getProxyManagerLeafInterface();
- virtual CommonAPI::ProxyManager& getProxyManagerBranchInterface();
-
- /**
- * Returns the CommonAPI address of the remote partner this proxy communicates with.
- */
- virtual std::string getAddress() const;
-
- /**
- * Returns the domain of the remote partner this proxy communicates with.
- */
- virtual const std::string& getDomain() const;
-
- /**
- * Returns the service ID of the remote partner this proxy communicates with.
- */
- virtual const std::string& getServiceId() const;
-
- /**
- * Returns the instance ID of the remote partner this proxy communicates with.
- */
- virtual const std::string& getInstanceId() const;
-
- /**
- * Returns true if the remote partner for this proxy is currently known to be available.
- */
- virtual bool isAvailable() const;
-
- /**
- * Returns true if the remote partner for this proxy is available.
- */
- virtual bool isAvailableBlocking() const;
-
- /**
- * Returns the wrapper class that is used to (de-)register for notifications about
- * the availability of the remote partner of this proxy.
- */
- virtual CommonAPI::ProxyStatusEvent& getProxyStatusEvent();
-
- /**
- * Returns the wrapper class that is used to access version information of the remote
- * partner of this proxy.
- */
- virtual CommonAPI::InterfaceVersionAttribute& getInterfaceVersionAttribute();
-
- private:
- std::shared_ptr<RootInterfaceProxyBase> delegate_;
-};
-
-#ifdef WIN32
- typedef RootInterfaceProxy<CommonAPI::WINDummyAttributeExtension<CommonAPI::WINDummyAttribute>> RootInterfaceProxyDefault;
-#else
- typedef RootInterfaceProxy<> RootInterfaceProxyDefault;
-#endif
-
-
-//
-// RootInterfaceProxy Implementation
-//
-template <typename ... _AttributeExtensions>
-RootInterfaceProxy<_AttributeExtensions...>::RootInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate):
- _AttributeExtensions(*(std::dynamic_pointer_cast<RootInterfaceProxyBase>(delegate)))...,
- delegate_(std::dynamic_pointer_cast<RootInterfaceProxyBase>(delegate)) {
-}
-
-template <typename ... _AttributeExtensions>
-RootInterfaceProxy<_AttributeExtensions...>::~RootInterfaceProxy() {
-}
-
-template <typename ... _AttributeExtensions>
-void RootInterfaceProxy<_AttributeExtensions...>::testRootMethod(const int32_t& inInt, const std::string& inString, CommonAPI::CallStatus& callStatus, RootInterface::testRootMethodError& methodError, int32_t& outInt, std::string& outString) {
- delegate_->testRootMethod(inInt, inString, callStatus, methodError, outInt, outString);
-}
-
-template <typename ... _AttributeExtensions>
-std::future<CommonAPI::CallStatus> RootInterfaceProxy<_AttributeExtensions...>::testRootMethodAsync(const int32_t& inInt, const std::string& inString, TestRootMethodAsyncCallback callback) {
- return delegate_->testRootMethodAsync(inInt, inString, callback);
-}
-
-template <typename ... _AttributeExtensions>
-std::string RootInterfaceProxy<_AttributeExtensions...>::getAddress() const {
- return delegate_->getAddress();
-}
-
-template <typename ... _AttributeExtensions>
-const std::string& RootInterfaceProxy<_AttributeExtensions...>::getDomain() const {
- return delegate_->getDomain();
-}
-
-template <typename ... _AttributeExtensions>
-const std::string& RootInterfaceProxy<_AttributeExtensions...>::getServiceId() const {
- return delegate_->getServiceId();
-}
-
-template <typename ... _AttributeExtensions>
-const std::string& RootInterfaceProxy<_AttributeExtensions...>::getInstanceId() const {
- return delegate_->getInstanceId();
-}
-
-template <typename ... _AttributeExtensions>
-bool RootInterfaceProxy<_AttributeExtensions...>::isAvailable() const {
- return delegate_->isAvailable();
-}
-
-template <typename ... _AttributeExtensions>
-bool RootInterfaceProxy<_AttributeExtensions...>::isAvailableBlocking() const {
- return delegate_->isAvailableBlocking();
-}
-
-template <typename ... _AttributeExtensions>
-CommonAPI::ProxyStatusEvent& RootInterfaceProxy<_AttributeExtensions...>::getProxyStatusEvent() {
- return delegate_->getProxyStatusEvent();
-}
-
-template <typename ... _AttributeExtensions>
-CommonAPI::InterfaceVersionAttribute& RootInterfaceProxy<_AttributeExtensions...>::getInterfaceVersionAttribute() {
- return delegate_->getInterfaceVersionAttribute();
-}
-
-template <typename ... _AttributeExtensions>
-CommonAPI::ProxyManager& RootInterfaceProxy<_AttributeExtensions...>::getProxyManagerLeafInterface() {
- return delegate_->getProxyManagerLeafInterface();
-}
-template <typename ... _AttributeExtensions>
-CommonAPI::ProxyManager& RootInterfaceProxy<_AttributeExtensions...>::getProxyManagerBranchInterface() {
- return delegate_->getProxyManagerBranchInterface();
-}
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
-
-
-#endif // COMMONAPI_TESTS_MANAGED_Root_Interface_PROXY_H_
diff --git a/src/test/commonapi/tests/managed/RootInterfaceProxyBase.h b/src/test/commonapi/tests/managed/RootInterfaceProxyBase.h
deleted file mode 100644
index e3379e9..0000000
--- a/src/test/commonapi/tests/managed/RootInterfaceProxyBase.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
-* If a copy of the MPL was not distributed with this file, You can obtain one at
-* http://mozilla.org/MPL/2.0/.
-*/
-#ifndef COMMONAPI_TESTS_MANAGED_Root_Interface_PROXY_BASE_H_
-#define COMMONAPI_TESTS_MANAGED_Root_Interface_PROXY_BASE_H_
-
-#include "RootInterface.h"
-
-
-#include <commonapi/tests/managed/BranchInterfaceStub.h>
-#include <commonapi/tests/managed/LeafInterfaceStub.h>
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <vector>
-
-#include <CommonAPI/ProxyManager.h>
-#include <CommonAPI/Proxy.h>
-#include <functional>
-#include <future>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-class RootInterfaceProxyBase: virtual public CommonAPI::Proxy {
- public:
-
- typedef std::function<void(const CommonAPI::CallStatus&, const RootInterface::testRootMethodError&, const int32_t&, const std::string&)> TestRootMethodAsyncCallback;
-
-
-
- virtual void testRootMethod(const int32_t& inInt, const std::string& inString, CommonAPI::CallStatus& callStatus, RootInterface::testRootMethodError& methodError, int32_t& outInt, std::string& outString) = 0;
- virtual std::future<CommonAPI::CallStatus> testRootMethodAsync(const int32_t& inInt, const std::string& inString, TestRootMethodAsyncCallback callback) = 0;
- virtual CommonAPI::ProxyManager& getProxyManagerLeafInterface() = 0;
- virtual CommonAPI::ProxyManager& getProxyManagerBranchInterface() = 0;
-};
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_MANAGED_Root_Interface_PROXY_BASE_H_
diff --git a/src/test/commonapi/tests/managed/RootInterfaceStub.h b/src/test/commonapi/tests/managed/RootInterfaceStub.h
deleted file mode 100644
index de224f6..0000000
--- a/src/test/commonapi/tests/managed/RootInterfaceStub.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
-* If a copy of the MPL was not distributed with this file, You can obtain one at
-* http://mozilla.org/MPL/2.0/.
-*/
-#ifndef COMMONAPI_TESTS_MANAGED_Root_Interface_STUB_H_
-#define COMMONAPI_TESTS_MANAGED_Root_Interface_STUB_H_
-
-
-
-#include <commonapi/tests/managed/BranchInterfaceStub.h>
-#include <commonapi/tests/managed/LeafInterfaceStub.h>
-
-#include "RootInterface.h"
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <vector>
-
-#include <CommonAPI/Stub.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-/**
- * Receives messages from remote and handles all dispatching of deserialized calls
- * to a stub for the service RootInterface. Also provides means to send broadcasts
- * and attribute-changed-notifications of observable attributes as defined by this service.
- * An application developer should not need to bother with this class.
- */
-class RootInterfaceStubAdapter: virtual public CommonAPI::StubAdapter, public RootInterface {
- public:
-
-
- virtual bool registerManagedStubLeafInterface(std::shared_ptr<LeafInterfaceStub>, const std::string&) = 0;
- virtual bool deregisterManagedStubLeafInterface(const std::string&) = 0;
- virtual std::set<std::string>& getLeafInterfaceInstances() = 0;
- virtual bool registerManagedStubBranchInterface(std::shared_ptr<BranchInterfaceStub>, const std::string&) = 0;
- virtual bool deregisterManagedStubBranchInterface(const std::string&) = 0;
- virtual std::set<std::string>& getBranchInterfaceInstances() = 0;
-
- virtual void deactivateManagedInstances() = 0;
-protected:
- /**
- * Defines properties for storing the ClientIds of clients / proxies that have
- * subscribed to the selective broadcasts
- */
-};
-
-
-/**
- * Defines the necessary callbacks to handle remote set events related to the attributes
- * defined in the IDL description for RootInterface.
- * For each attribute two callbacks are defined:
- * - a verification callback that allows to verify the requested value and to prevent setting
- * e.g. an invalid value ("onRemoteSet<AttributeName>").
- * - an action callback to do local work after the attribute value has been changed
- * ("onRemote<AttributeName>Changed").
- *
- * This class and the one below are the ones an application developer needs to have
- * a look at if he wants to implement a service.
- */
-class RootInterfaceStubRemoteEvent {
- public:
- virtual ~RootInterfaceStubRemoteEvent() { }
-
-};
-
-
-/**
- * Defines the interface that must be implemented by any class that should provide
- * the service RootInterface to remote clients.
- * This class and the one above are the ones an application developer needs to have
- * a look at if he wants to implement a service.
- */
-class RootInterfaceStub: public virtual CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent> {
-public:
- virtual ~RootInterfaceStub() { }
- virtual const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId) = 0;
-
-
- /// This is the method that will be called on remote calls on the method testRootMethod.
- virtual void testRootMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, int32_t inInt, std::string inString, RootInterface::testRootMethodError& methodError, int32_t& outInt, std::string& outString) = 0;
-
- virtual bool registerManagedStubLeafInterface(std::shared_ptr<LeafInterfaceStub>, const std::string&) = 0;
- virtual bool deregisterManagedStubLeafInterface(const std::string&) = 0;
- virtual std::set<std::string>& getLeafInterfaceInstances() = 0;
- virtual bool registerManagedStubBranchInterface(std::shared_ptr<BranchInterfaceStub>, const std::string&) = 0;
- virtual bool deregisterManagedStubBranchInterface(const std::string&) = 0;
- virtual std::set<std::string>& getBranchInterfaceInstances() = 0;
- using CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::initStubAdapter;
- typedef CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::StubAdapterType StubAdapterType;
- typedef CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::RemoteEventHandlerType RemoteEventHandlerType;
- typedef RootInterfaceStubRemoteEvent RemoteEventType;
- typedef RootInterface StubInterface;
-};
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_MANAGED_Root_Interface_STUB_H_
diff --git a/src/test/commonapi/tests/managed/RootInterfaceStubDefault.cpp b/src/test/commonapi/tests/managed/RootInterfaceStubDefault.cpp
deleted file mode 100644
index 8866718..0000000
--- a/src/test/commonapi/tests/managed/RootInterfaceStubDefault.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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 <commonapi/tests/managed/RootInterfaceStubDefault.h>
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-RootInterfaceStubDefault::RootInterfaceStubDefault():
- remoteEventHandler_(this),
- autoInstanceCounter_(0),
- interfaceVersion_(RootInterface::getInterfaceVersion()) {
-}
-
-const CommonAPI::Version& RootInterfaceStubDefault::getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId) {
- return interfaceVersion_;
-}
-
-RootInterfaceStubRemoteEvent* RootInterfaceStubDefault::initStubAdapter(const std::shared_ptr<RootInterfaceStubAdapter>& stubAdapter) {
- CommonAPI::Stub<RootInterfaceStubAdapter, RootInterfaceStubRemoteEvent>::stubAdapter_ = stubAdapter;
- return &remoteEventHandler_;
-}
-
-
-void RootInterfaceStubDefault::testRootMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, int32_t inInt, std::string inString, RootInterface::testRootMethodError& methodError, int32_t& outInt, std::string& outString) {
- // Call old style methods in default
- testRootMethod(inInt, inString, methodError, outInt, outString);
-}
-void RootInterfaceStubDefault::testRootMethod(int32_t inInt, std::string inString, RootInterface::testRootMethodError& methodError, int32_t& outInt, std::string& outString) {
- // No operation in default
-}
-
-
-
-bool RootInterfaceStubDefault::registerManagedStubLeafInterfaceAutoInstance(std::shared_ptr<LeafInterfaceStub> stub) {
- autoInstanceCounter_++;
- std::stringstream ss;
- ss << stubAdapter_->getInstanceId() << ".i" << autoInstanceCounter_;
- std::string instance = ss.str();
- return stubAdapter_->registerManagedStubLeafInterface(stub, instance);
-}
-bool RootInterfaceStubDefault::registerManagedStubLeafInterface(std::shared_ptr<LeafInterfaceStub> stub, const std::string& instance) {
- return stubAdapter_->registerManagedStubLeafInterface(stub, instance);
-}
-bool RootInterfaceStubDefault::deregisterManagedStubLeafInterface(const std::string& instance) {
- return stubAdapter_->deregisterManagedStubLeafInterface(instance);
-}
-std::set<std::string>& RootInterfaceStubDefault::getLeafInterfaceInstances() {
- return stubAdapter_->getLeafInterfaceInstances();
-}
-bool RootInterfaceStubDefault::registerManagedStubBranchInterfaceAutoInstance(std::shared_ptr<BranchInterfaceStub> stub) {
- autoInstanceCounter_++;
- std::stringstream ss;
- ss << stubAdapter_->getInstanceId() << ".i" << autoInstanceCounter_;
- std::string instance = ss.str();
- return stubAdapter_->registerManagedStubBranchInterface(stub, instance);
-}
-bool RootInterfaceStubDefault::registerManagedStubBranchInterface(std::shared_ptr<BranchInterfaceStub> stub, const std::string& instance) {
- return stubAdapter_->registerManagedStubBranchInterface(stub, instance);
-}
-bool RootInterfaceStubDefault::deregisterManagedStubBranchInterface(const std::string& instance) {
- return stubAdapter_->deregisterManagedStubBranchInterface(instance);
-}
-std::set<std::string>& RootInterfaceStubDefault::getBranchInterfaceInstances() {
- return stubAdapter_->getBranchInterfaceInstances();
-}
-
-RootInterfaceStubDefault::RemoteEventHandler::RemoteEventHandler(RootInterfaceStubDefault* defaultStub):
- defaultStub_(defaultStub) {
-}
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
diff --git a/src/test/commonapi/tests/managed/RootInterfaceStubDefault.h b/src/test/commonapi/tests/managed/RootInterfaceStubDefault.h
deleted file mode 100644
index a68bde3..0000000
--- a/src/test/commonapi/tests/managed/RootInterfaceStubDefault.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
-* If a copy of the MPL was not distributed with this file, You can obtain one at
-* http://mozilla.org/MPL/2.0/.
-*/
-#ifndef COMMONAPI_TESTS_MANAGED_Root_Interface_STUB_DEFAULT_H_
-#define COMMONAPI_TESTS_MANAGED_Root_Interface_STUB_DEFAULT_H_
-
-
-#include <commonapi/tests/managed/RootInterfaceStub.h>
-#include <sstream>
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-/**
- * Provides a default implementation for RootInterfaceStubRemoteEvent and
- * RootInterfaceStub. Method callbacks have an empty implementation,
- * remote set calls on attributes will always change the value of the attribute
- * to the one received.
- *
- * Override this stub if you only want to provide a subset of the functionality
- * that would be defined for this service, and/or if you do not need any non-default
- * behaviour.
- */
-class RootInterfaceStubDefault : public virtual RootInterfaceStub {
-public:
- RootInterfaceStubDefault();
-
- RootInterfaceStubRemoteEvent* initStubAdapter(const std::shared_ptr<RootInterfaceStubAdapter>& stubAdapter);
-
- const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId);
-
-
- virtual void testRootMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, int32_t inInt, std::string inString, RootInterface::testRootMethodError& methodError, int32_t& outInt, std::string& outString);
- virtual void testRootMethod(int32_t inInt, std::string inString, RootInterface::testRootMethodError& methodError, int32_t& outInt, std::string& outString);
-
-
-
- bool registerManagedStubLeafInterfaceAutoInstance(std::shared_ptr<LeafInterfaceStub>);
- bool registerManagedStubLeafInterface(std::shared_ptr<LeafInterfaceStub>, const std::string&);
- bool deregisterManagedStubLeafInterface(const std::string&);
- std::set<std::string>& getLeafInterfaceInstances();
- bool registerManagedStubBranchInterfaceAutoInstance(std::shared_ptr<BranchInterfaceStub>);
- bool registerManagedStubBranchInterface(std::shared_ptr<BranchInterfaceStub>, const std::string&);
- bool deregisterManagedStubBranchInterface(const std::string&);
- std::set<std::string>& getBranchInterfaceInstances();
-
-protected:
- class RemoteEventHandler: public virtual RootInterfaceStubRemoteEvent {
- public:
- RemoteEventHandler(RootInterfaceStubDefault* defaultStub);
-
-
- private:
- RootInterfaceStubDefault* defaultStub_;
- };
-private:
- RootInterfaceStubDefault::RemoteEventHandler remoteEventHandler_;
- uint32_t autoInstanceCounter_;
-
-
- CommonAPI::Version interfaceVersion_;
-};
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_MANAGED_Root_Interface_STUB_DEFAULT_H_
diff --git a/src/test/commonapi/tests/managed/SecondRoot.h b/src/test/commonapi/tests/managed/SecondRoot.h
deleted file mode 100644
index 8111d91..0000000
--- a/src/test/commonapi/tests/managed/SecondRoot.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_H_
-#define COMMONAPI_TESTS_MANAGED_Second_Root_H_
-
-
-#include <set>
-
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <CommonAPI/types.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-class SecondRoot {
- public:
- virtual ~SecondRoot() { }
-
- static inline const char* getInterfaceId();
- static inline CommonAPI::Version getInterfaceVersion();
-};
-
-const char* SecondRoot::getInterfaceId() {
- static const char* interfaceId = "commonapi.tests.managed.SecondRoot";
- return interfaceId;
-}
-
-CommonAPI::Version SecondRoot::getInterfaceVersion() {
- return CommonAPI::Version(1, 0);
-}
-
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
-
-namespace CommonAPI {
-
-}
-
-
-namespace std {
- //hashes for types
-
- //hashes for error types
-}
-
-#endif // COMMONAPI_TESTS_MANAGED_Second_Root_H_
diff --git a/src/test/commonapi/tests/managed/SecondRootDBusProxy.cpp b/src/test/commonapi/tests/managed/SecondRootDBusProxy.cpp
deleted file mode 100644
index 25e0588..0000000
--- a/src/test/commonapi/tests/managed/SecondRootDBusProxy.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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 "SecondRootDBusProxy.h"
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-std::shared_ptr<CommonAPI::DBus::DBusProxy> createSecondRootDBusProxy(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection) {
- return std::make_shared<SecondRootDBusProxy>(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection);
-}
-
-INITIALIZER(registerSecondRootDBusProxy) {
- CommonAPI::DBus::DBusFactory::registerProxyFactoryMethod(SecondRoot::getInterfaceId(),
- &createSecondRootDBusProxy);
-}
-
-SecondRootDBusProxy::SecondRootDBusProxy(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection):
- CommonAPI::DBus::DBusProxy(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyconnection)
-, proxyManagerLeafInterface_(*this, "commonapi.tests.managed.LeafInterface", factory)
- {
- }
-
-
-
-
-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
diff --git a/src/test/commonapi/tests/managed/SecondRootDBusProxy.h b/src/test/commonapi/tests/managed/SecondRootDBusProxy.h
deleted file mode 100644
index 3d5dc51..0000000
--- a/src/test/commonapi/tests/managed/SecondRootDBusProxy.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_H_
-#define COMMONAPI_TESTS_MANAGED_Second_Root_DBUS_PROXY_H_
-
-#include <commonapi/tests/managed/SecondRootProxyBase.h>
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <CommonAPI/DBus/DBusFactory.h>
-#include <CommonAPI/DBus/DBusProxy.h>
-#include <CommonAPI/DBus/DBusProxyManager.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-#include <string>
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-class SecondRootDBusProxy: virtual public SecondRootProxyBase, virtual public CommonAPI::DBus::DBusProxy {
- public:
- SecondRootDBusProxy(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection);
-
- 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
-
-#endif // COMMONAPI_TESTS_MANAGED_Second_Root_DBUS_PROXY_H_
diff --git a/src/test/commonapi/tests/managed/SecondRootDBusStubAdapter.cpp b/src/test/commonapi/tests/managed/SecondRootDBusStubAdapter.cpp
deleted file mode 100644
index d96bcf8..0000000
--- a/src/test/commonapi/tests/managed/SecondRootDBusStubAdapter.cpp
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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 "SecondRootDBusStubAdapter.h"
-#include <commonapi/tests/managed/SecondRoot.h>
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> createSecondRootDBusStubAdapter(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& interfaceName,
- const std::string& busName,
- const std::string& objectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stubBase) {
- return std::make_shared<SecondRootDBusStubAdapter>(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection, stubBase);
-}
-
-INITIALIZER(registerSecondRootDBusStubAdapter) {
- CommonAPI::DBus::DBusFactory::registerAdapterFactoryMethod(SecondRoot::getInterfaceId(),
- &createSecondRootDBusStubAdapter);
-}
-
-
-
-SecondRootDBusStubAdapterInternal::~SecondRootDBusStubAdapterInternal() {
- deactivateManagedInstances();
- SecondRootDBusStubAdapterHelper::deinit();
-}
-
-void SecondRootDBusStubAdapterInternal::deactivateManagedInstances() {
- std::set<std::string>::iterator iter;
- std::set<std::string>::iterator iterNext;
-
- iter = registeredLeafInterfaceInstances.begin();
- while (iter != registeredLeafInterfaceInstances.end()) {
- iterNext = std::next(iter);
-
- if (deregisterManagedStubLeafInterface(*iter)) {
- iter = iterNext;
- }
- else {
- iter++;
- }
- }
-}
-
-const char* SecondRootDBusStubAdapterInternal::getMethodsDBusIntrospectionXmlData() const {
- static const std::string introspectionData =
- "<method name=\"getInterfaceVersion\">\n"
- "<arg name=\"value\" type=\"uu\" direction=\"out\" />"
- "</method>\n"
-
- ""
- ;
- return introspectionData.c_str();
-}
-
-CommonAPI::DBus::DBusGetAttributeStubDispatcher<
- SecondRootStub,
- CommonAPI::Version
- > SecondRootDBusStubAdapterInternal::getSecondRootInterfaceVersionStubDispatcher(&SecondRootStub::getInterfaceVersion, "uu");
-
-
-
-
-
-
-
-
-const SecondRootDBusStubAdapterHelper::StubDispatcherTable& SecondRootDBusStubAdapterInternal::getStubDispatcherTable() {
- return stubDispatcherTable_;
-}
-
-const CommonAPI::DBus::StubAttributeTable& SecondRootDBusStubAdapterInternal::getStubAttributeTable() {
- return stubAttributeTable_;
-}
-
- bool SecondRootDBusStubAdapterInternal::registerManagedStubLeafInterface(std::shared_ptr<LeafInterfaceStub> stub, const std::string& instance) {
- if (registeredLeafInterfaceInstances.find(instance) == registeredLeafInterfaceInstances.end()) {
- std::string commonApiAddress = "local:commonapi.tests.managed.LeafInterface:" + instance;
-
- std::string interfaceName;
- std::string connectionName;
- std::string objectPath;
-
- CommonAPI::DBus::DBusAddressTranslator::getInstance().searchForDBusAddress(
- commonApiAddress,
- interfaceName,
- connectionName,
- objectPath);
-
- if (objectPath.compare(0, dbusObjectPath_.length(), dbusObjectPath_) == 0) {
- auto dbusStubAdapter = factory_->createDBusStubAdapter(stub, "commonapi.tests.managed.LeafInterface",
- instance, "commonapi.tests.managed.LeafInterface", "local");
-
- bool success = CommonAPI::DBus::DBusServicePublisher::getInstance()->registerManagedService(dbusStubAdapter);
- if (success) {
- bool isServiceExportSuccessful = dbusConnection_->getDBusObjectManager()->exportManagedDBusStubAdapter(dbusObjectPath_, dbusStubAdapter);
- if (isServiceExportSuccessful) {
- registeredLeafInterfaceInstances.insert(instance);
- return true;
- } else {
- CommonAPI::DBus::DBusServicePublisher::getInstance()->unregisterManagedService(commonApiAddress);
- }
- }
- }
- }
- return false;
- }
-
- bool SecondRootDBusStubAdapterInternal::deregisterManagedStubLeafInterface(const std::string& instance) {
- std::string commonApiAddress = "local:commonapi.tests.managed.LeafInterface:" + instance;
- if (registeredLeafInterfaceInstances.find(instance) != registeredLeafInterfaceInstances.end()) {
- std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> dbusStubAdapter =
- CommonAPI::DBus::DBusServicePublisher::getInstance()->getRegisteredService(commonApiAddress);
- if (dbusStubAdapter != nullptr) {
- dbusConnection_->getDBusObjectManager()->unexportManagedDBusStubAdapter(dbusObjectPath_, dbusStubAdapter);
- CommonAPI::DBus::DBusServicePublisher::getInstance()->unregisterManagedService(commonApiAddress);
- registeredLeafInterfaceInstances.erase(instance);
- return true;
- }
- }
- return false;
- }
-
- std::set<std::string>& SecondRootDBusStubAdapterInternal::getLeafInterfaceInstances() {
- return registeredLeafInterfaceInstances;
- }
-
-SecondRootDBusStubAdapterInternal::SecondRootDBusStubAdapterInternal(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& dbusInterfaceName,
- const std::string& dbusBusName,
- const std::string& dbusObjectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stub):
- CommonAPI::DBus::DBusStubAdapter(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- true),
- SecondRootDBusStubAdapterHelper(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- std::dynamic_pointer_cast<SecondRootStub>(stub),
- true),
- stubDispatcherTable_({
- }),
- stubAttributeTable_() {
-
- stubDispatcherTable_.insert({ { "getInterfaceVersion", "" }, &commonapi::tests::managed::SecondRootDBusStubAdapterInternal::getSecondRootInterfaceVersionStubDispatcher });
-}
-
-const bool SecondRootDBusStubAdapterInternal::hasFreedesktopProperties() {
- return false;
-}
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
diff --git a/src/test/commonapi/tests/managed/SecondRootDBusStubAdapter.h b/src/test/commonapi/tests/managed/SecondRootDBusStubAdapter.h
deleted file mode 100644
index 604b552..0000000
--- a/src/test/commonapi/tests/managed/SecondRootDBusStubAdapter.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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_H_
-#define COMMONAPI_TESTS_MANAGED_Second_Root_DBUS_STUB_ADAPTER_H_
-
-#include <commonapi/tests/managed/SecondRootStub.h>
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-#include <CommonAPI/DBus/DBusStubAdapterHelper.h>
-#include <CommonAPI/DBus/DBusStubAdapter.h>
-#include <CommonAPI/DBus/DBusFactory.h>
-#include <CommonAPI/DBus/DBusServicePublisher.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-typedef CommonAPI::DBus::DBusStubAdapterHelper<SecondRootStub> SecondRootDBusStubAdapterHelper;
-
-class SecondRootDBusStubAdapterInternal: public virtual SecondRootStubAdapter, public SecondRootDBusStubAdapterHelper {
- public:
- SecondRootDBusStubAdapterInternal(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& dbusInterfaceName,
- const std::string& dbusBusName,
- const std::string& dbusObjectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stub);
-
- ~SecondRootDBusStubAdapterInternal();
-
- virtual const bool hasFreedesktopProperties();
-
-
-
- bool registerManagedStubLeafInterface(std::shared_ptr<LeafInterfaceStub>, const std::string&);
- bool deregisterManagedStubLeafInterface(const std::string&);
- std::set<std::string>& getLeafInterfaceInstances();
-
- const SecondRootDBusStubAdapterHelper::StubDispatcherTable& getStubDispatcherTable();
- const CommonAPI::DBus::StubAttributeTable& getStubAttributeTable();
-
- void deactivateManagedInstances();
-
-
-static CommonAPI::DBus::DBusGetAttributeStubDispatcher<
- SecondRootStub,
- CommonAPI::Version
- > getSecondRootInterfaceVersionStubDispatcher;
-
-
-
-
-
-
-
- protected:
- virtual const char* getMethodsDBusIntrospectionXmlData() const;
-
- private:
- std::set<std::string> registeredLeafInterfaceInstances;
- SecondRootDBusStubAdapterHelper::StubDispatcherTable stubDispatcherTable_;
- CommonAPI::DBus::StubAttributeTable stubAttributeTable_;
-};
-
-class SecondRootDBusStubAdapter: public SecondRootDBusStubAdapterInternal, public std::enable_shared_from_this<SecondRootDBusStubAdapter> {
-public:
- SecondRootDBusStubAdapter(
- const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
- const std::string& commonApiAddress,
- const std::string& dbusInterfaceName,
- const std::string& dbusBusName,
- const std::string& dbusObjectPath,
- const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
- const std::shared_ptr<CommonAPI::StubBase>& stub) :
- CommonAPI::DBus::DBusStubAdapter(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- true),
- SecondRootDBusStubAdapterInternal(
- factory,
- commonApiAddress,
- dbusInterfaceName,
- dbusBusName,
- dbusObjectPath,
- dbusConnection,
- stub) { }
-};
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_MANAGED_Second_Root_DBUS_STUB_ADAPTER_H_
diff --git a/src/test/commonapi/tests/managed/SecondRootProxy.h b/src/test/commonapi/tests/managed/SecondRootProxy.h
deleted file mode 100644
index 27eb126..0000000
--- a/src/test/commonapi/tests/managed/SecondRootProxy.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
-* If a copy of the MPL was not distributed with this file, You can obtain one at
-* http://mozilla.org/MPL/2.0/.
-*/
-#ifndef COMMONAPI_TESTS_MANAGED_Second_Root_PROXY_H_
-#define COMMONAPI_TESTS_MANAGED_Second_Root_PROXY_H_
-
-#include "SecondRootProxyBase.h"
-
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-template <typename ... _AttributeExtensions>
-class SecondRootProxy: virtual public SecondRoot, virtual public SecondRootProxyBase
-, public _AttributeExtensions... {
-public:
- SecondRootProxy(std::shared_ptr<CommonAPI::Proxy> delegate);
- ~SecondRootProxy();
-
- typedef SecondRoot InterfaceType;
-
-
-
-
-
- virtual CommonAPI::ProxyManager& getProxyManagerLeafInterface();
-
- /**
- * Returns the CommonAPI address of the remote partner this proxy communicates with.
- */
- virtual std::string getAddress() const;
-
- /**
- * Returns the domain of the remote partner this proxy communicates with.
- */
- virtual const std::string& getDomain() const;
-
- /**
- * Returns the service ID of the remote partner this proxy communicates with.
- */
- virtual const std::string& getServiceId() const;
-
- /**
- * Returns the instance ID of the remote partner this proxy communicates with.
- */
- virtual const std::string& getInstanceId() const;
-
- /**
- * Returns true if the remote partner for this proxy is currently known to be available.
- */
- virtual bool isAvailable() const;
-
- /**
- * Returns true if the remote partner for this proxy is available.
- */
- virtual bool isAvailableBlocking() const;
-
- /**
- * Returns the wrapper class that is used to (de-)register for notifications about
- * the availability of the remote partner of this proxy.
- */
- virtual CommonAPI::ProxyStatusEvent& getProxyStatusEvent();
-
- /**
- * Returns the wrapper class that is used to access version information of the remote
- * partner of this proxy.
- */
- virtual CommonAPI::InterfaceVersionAttribute& getInterfaceVersionAttribute();
-
- private:
- std::shared_ptr<SecondRootProxyBase> delegate_;
-};
-
-#ifdef WIN32
- typedef SecondRootProxy<CommonAPI::WINDummyAttributeExtension<CommonAPI::WINDummyAttribute>> SecondRootProxyDefault;
-#else
- typedef SecondRootProxy<> SecondRootProxyDefault;
-#endif
-
-
-//
-// SecondRootProxy Implementation
-//
-template <typename ... _AttributeExtensions>
-SecondRootProxy<_AttributeExtensions...>::SecondRootProxy(std::shared_ptr<CommonAPI::Proxy> delegate):
- _AttributeExtensions(*(std::dynamic_pointer_cast<SecondRootProxyBase>(delegate)))...,
- delegate_(std::dynamic_pointer_cast<SecondRootProxyBase>(delegate)) {
-}
-
-template <typename ... _AttributeExtensions>
-SecondRootProxy<_AttributeExtensions...>::~SecondRootProxy() {
-}
-
-
-template <typename ... _AttributeExtensions>
-std::string SecondRootProxy<_AttributeExtensions...>::getAddress() const {
- return delegate_->getAddress();
-}
-
-template <typename ... _AttributeExtensions>
-const std::string& SecondRootProxy<_AttributeExtensions...>::getDomain() const {
- return delegate_->getDomain();
-}
-
-template <typename ... _AttributeExtensions>
-const std::string& SecondRootProxy<_AttributeExtensions...>::getServiceId() const {
- return delegate_->getServiceId();
-}
-
-template <typename ... _AttributeExtensions>
-const std::string& SecondRootProxy<_AttributeExtensions...>::getInstanceId() const {
- return delegate_->getInstanceId();
-}
-
-template <typename ... _AttributeExtensions>
-bool SecondRootProxy<_AttributeExtensions...>::isAvailable() const {
- return delegate_->isAvailable();
-}
-
-template <typename ... _AttributeExtensions>
-bool SecondRootProxy<_AttributeExtensions...>::isAvailableBlocking() const {
- return delegate_->isAvailableBlocking();
-}
-
-template <typename ... _AttributeExtensions>
-CommonAPI::ProxyStatusEvent& SecondRootProxy<_AttributeExtensions...>::getProxyStatusEvent() {
- return delegate_->getProxyStatusEvent();
-}
-
-template <typename ... _AttributeExtensions>
-CommonAPI::InterfaceVersionAttribute& SecondRootProxy<_AttributeExtensions...>::getInterfaceVersionAttribute() {
- return delegate_->getInterfaceVersionAttribute();
-}
-
-template <typename ... _AttributeExtensions>
-CommonAPI::ProxyManager& SecondRootProxy<_AttributeExtensions...>::getProxyManagerLeafInterface() {
- return delegate_->getProxyManagerLeafInterface();
-}
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
-
-
-#endif // COMMONAPI_TESTS_MANAGED_Second_Root_PROXY_H_
diff --git a/src/test/commonapi/tests/managed/SecondRootProxyBase.h b/src/test/commonapi/tests/managed/SecondRootProxyBase.h
deleted file mode 100644
index c922dfd..0000000
--- a/src/test/commonapi/tests/managed/SecondRootProxyBase.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
-* If a copy of the MPL was not distributed with this file, You can obtain one at
-* http://mozilla.org/MPL/2.0/.
-*/
-#ifndef COMMONAPI_TESTS_MANAGED_Second_Root_PROXY_BASE_H_
-#define COMMONAPI_TESTS_MANAGED_Second_Root_PROXY_BASE_H_
-
-#include "SecondRoot.h"
-
-
-#include <commonapi/tests/managed/LeafInterfaceStub.h>
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-
-#include <CommonAPI/ProxyManager.h>
-#include <CommonAPI/Proxy.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-class SecondRootProxyBase: virtual public CommonAPI::Proxy {
- public:
-
-
-
-
- virtual CommonAPI::ProxyManager& getProxyManagerLeafInterface() = 0;
-};
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_MANAGED_Second_Root_PROXY_BASE_H_
diff --git a/src/test/commonapi/tests/managed/SecondRootStub.h b/src/test/commonapi/tests/managed/SecondRootStub.h
deleted file mode 100644
index 3eeb974..0000000
--- a/src/test/commonapi/tests/managed/SecondRootStub.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
-* If a copy of the MPL was not distributed with this file, You can obtain one at
-* http://mozilla.org/MPL/2.0/.
-*/
-#ifndef COMMONAPI_TESTS_MANAGED_Second_Root_STUB_H_
-#define COMMONAPI_TESTS_MANAGED_Second_Root_STUB_H_
-
-
-
-#include <commonapi/tests/managed/LeafInterfaceStub.h>
-
-#include "SecondRoot.h"
-
-#if !defined (COMMONAPI_INTERNAL_COMPILATION)
-#define COMMONAPI_INTERNAL_COMPILATION
-#endif
-
-
-#include <CommonAPI/Stub.h>
-
-#undef COMMONAPI_INTERNAL_COMPILATION
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-/**
- * Receives messages from remote and handles all dispatching of deserialized calls
- * to a stub for the service SecondRoot. Also provides means to send broadcasts
- * and attribute-changed-notifications of observable attributes as defined by this service.
- * An application developer should not need to bother with this class.
- */
-class SecondRootStubAdapter: virtual public CommonAPI::StubAdapter, public SecondRoot {
- public:
-
-
- virtual bool registerManagedStubLeafInterface(std::shared_ptr<LeafInterfaceStub>, const std::string&) = 0;
- virtual bool deregisterManagedStubLeafInterface(const std::string&) = 0;
- virtual std::set<std::string>& getLeafInterfaceInstances() = 0;
-
- virtual void deactivateManagedInstances() = 0;
-protected:
- /**
- * Defines properties for storing the ClientIds of clients / proxies that have
- * subscribed to the selective broadcasts
- */
-};
-
-
-/**
- * Defines the necessary callbacks to handle remote set events related to the attributes
- * defined in the IDL description for SecondRoot.
- * For each attribute two callbacks are defined:
- * - a verification callback that allows to verify the requested value and to prevent setting
- * e.g. an invalid value ("onRemoteSet<AttributeName>").
- * - an action callback to do local work after the attribute value has been changed
- * ("onRemote<AttributeName>Changed").
- *
- * This class and the one below are the ones an application developer needs to have
- * a look at if he wants to implement a service.
- */
-class SecondRootStubRemoteEvent {
- public:
- virtual ~SecondRootStubRemoteEvent() { }
-
-};
-
-
-/**
- * Defines the interface that must be implemented by any class that should provide
- * the service SecondRoot to remote clients.
- * This class and the one above are the ones an application developer needs to have
- * a look at if he wants to implement a service.
- */
-class SecondRootStub: public virtual CommonAPI::Stub<SecondRootStubAdapter, SecondRootStubRemoteEvent> {
-public:
- virtual ~SecondRootStub() { }
- virtual const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId) = 0;
-
-
-
- virtual bool registerManagedStubLeafInterface(std::shared_ptr<LeafInterfaceStub>, const std::string&) = 0;
- virtual bool deregisterManagedStubLeafInterface(const std::string&) = 0;
- virtual std::set<std::string>& getLeafInterfaceInstances() = 0;
- using CommonAPI::Stub<SecondRootStubAdapter, SecondRootStubRemoteEvent>::initStubAdapter;
- typedef CommonAPI::Stub<SecondRootStubAdapter, SecondRootStubRemoteEvent>::StubAdapterType StubAdapterType;
- typedef CommonAPI::Stub<SecondRootStubAdapter, SecondRootStubRemoteEvent>::RemoteEventHandlerType RemoteEventHandlerType;
- typedef SecondRootStubRemoteEvent RemoteEventType;
- typedef SecondRoot StubInterface;
-};
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_MANAGED_Second_Root_STUB_H_
diff --git a/src/test/commonapi/tests/managed/SecondRootStubDefault.cpp b/src/test/commonapi/tests/managed/SecondRootStubDefault.cpp
deleted file mode 100644
index 5199fdb..0000000
--- a/src/test/commonapi/tests/managed/SecondRootStubDefault.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* 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 <commonapi/tests/managed/SecondRootStubDefault.h>
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-SecondRootStubDefault::SecondRootStubDefault():
- remoteEventHandler_(this),
- autoInstanceCounter_(0),
- interfaceVersion_(SecondRoot::getInterfaceVersion()) {
-}
-
-const CommonAPI::Version& SecondRootStubDefault::getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId) {
- return interfaceVersion_;
-}
-
-SecondRootStubRemoteEvent* SecondRootStubDefault::initStubAdapter(const std::shared_ptr<SecondRootStubAdapter>& stubAdapter) {
- CommonAPI::Stub<SecondRootStubAdapter, SecondRootStubRemoteEvent>::stubAdapter_ = stubAdapter;
- return &remoteEventHandler_;
-}
-
-
-
-
-bool SecondRootStubDefault::registerManagedStubLeafInterfaceAutoInstance(std::shared_ptr<LeafInterfaceStub> stub) {
- autoInstanceCounter_++;
- std::stringstream ss;
- ss << stubAdapter_->getInstanceId() << ".i" << autoInstanceCounter_;
- std::string instance = ss.str();
- return stubAdapter_->registerManagedStubLeafInterface(stub, instance);
-}
-bool SecondRootStubDefault::registerManagedStubLeafInterface(std::shared_ptr<LeafInterfaceStub> stub, const std::string& instance) {
- return stubAdapter_->registerManagedStubLeafInterface(stub, instance);
-}
-bool SecondRootStubDefault::deregisterManagedStubLeafInterface(const std::string& instance) {
- return stubAdapter_->deregisterManagedStubLeafInterface(instance);
-}
-std::set<std::string>& SecondRootStubDefault::getLeafInterfaceInstances() {
- return stubAdapter_->getLeafInterfaceInstances();
-}
-
-SecondRootStubDefault::RemoteEventHandler::RemoteEventHandler(SecondRootStubDefault* defaultStub):
- defaultStub_(defaultStub) {
-}
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
diff --git a/src/test/commonapi/tests/managed/SecondRootStubDefault.h b/src/test/commonapi/tests/managed/SecondRootStubDefault.h
deleted file mode 100644
index bf5025e..0000000
--- a/src/test/commonapi/tests/managed/SecondRootStubDefault.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
-* This file was generated by the CommonAPI Generators.
-* Used org.genivi.commonapi.core 2.1.5.qualifier.
-* Used org.franca.core 0.8.10.201309262002.
-*
-* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
-* If a copy of the MPL was not distributed with this file, You can obtain one at
-* http://mozilla.org/MPL/2.0/.
-*/
-#ifndef COMMONAPI_TESTS_MANAGED_Second_Root_STUB_DEFAULT_H_
-#define COMMONAPI_TESTS_MANAGED_Second_Root_STUB_DEFAULT_H_
-
-
-#include <commonapi/tests/managed/SecondRootStub.h>
-#include <sstream>
-
-namespace commonapi {
-namespace tests {
-namespace managed {
-
-/**
- * Provides a default implementation for SecondRootStubRemoteEvent and
- * SecondRootStub. Method callbacks have an empty implementation,
- * remote set calls on attributes will always change the value of the attribute
- * to the one received.
- *
- * Override this stub if you only want to provide a subset of the functionality
- * that would be defined for this service, and/or if you do not need any non-default
- * behaviour.
- */
-class SecondRootStubDefault : public virtual SecondRootStub {
-public:
- SecondRootStubDefault();
-
- SecondRootStubRemoteEvent* initStubAdapter(const std::shared_ptr<SecondRootStubAdapter>& stubAdapter);
-
- const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId);
-
-
-
-
- bool registerManagedStubLeafInterfaceAutoInstance(std::shared_ptr<LeafInterfaceStub>);
- bool registerManagedStubLeafInterface(std::shared_ptr<LeafInterfaceStub>, const std::string&);
- bool deregisterManagedStubLeafInterface(const std::string&);
- std::set<std::string>& getLeafInterfaceInstances();
-
-protected:
- class RemoteEventHandler: public virtual SecondRootStubRemoteEvent {
- public:
- RemoteEventHandler(SecondRootStubDefault* defaultStub);
-
-
- private:
- SecondRootStubDefault* defaultStub_;
- };
-private:
- SecondRootStubDefault::RemoteEventHandler remoteEventHandler_;
- uint32_t autoInstanceCounter_;
-
-
- CommonAPI::Version interfaceVersion_;
-};
-
-} // namespace managed
-} // namespace tests
-} // namespace commonapi
-
-#endif // COMMONAPI_TESTS_MANAGED_Second_Root_STUB_DEFAULT_H_