Resolve some bugs for windows VC++ & regenretate test sources
authorJohannes Schanda <schanda@itestra.de>
Wed, 9 Oct 2013 14:34:14 +0000 (16:34 +0200)
committerJohannes Schanda <schanda@itestra.de>
Wed, 9 Oct 2013 14:34:14 +0000 (16:34 +0200)
- Chnage inlcudes where needed
- Regenerate test sources
- move some typedefs
- fix a potential error when claiming names for new services

19 files changed:
src/CommonAPI/DBus/DBusFactory.cpp
src/CommonAPI/DBus/DBusFactory.h
src/CommonAPI/DBus/DBusRuntime.cpp
src/CommonAPI/DBus/DBusRuntime.h
src/CommonAPI/DBus/DBusStubAdapterHelper.h
src/test/DBusConnectionTest.cpp
src/test/commonapi/tests/DerivedTypeCollection.cpp
src/test/commonapi/tests/DerivedTypeCollection.h
src/test/commonapi/tests/PredefinedTypeCollection.h
src/test/commonapi/tests/TestInterface.h
src/test/commonapi/tests/TestInterfaceDBusProxy.cpp
src/test/commonapi/tests/TestInterfaceDBusProxy.h
src/test/commonapi/tests/TestInterfaceDBusStubAdapter.cpp
src/test/commonapi/tests/TestInterfaceDBusStubAdapter.h
src/test/commonapi/tests/TestInterfaceProxy.h
src/test/commonapi/tests/TestInterfaceProxyBase.h
src/test/commonapi/tests/TestInterfaceStub.h
src/test/commonapi/tests/TestInterfaceStubDefault.cpp
src/test/commonapi/tests/TestInterfaceStubDefault.h

index c75a393..0aa9558 100644 (file)
@@ -125,15 +125,8 @@ bool DBusFactory::registerAdapter(std::shared_ptr<StubBase> stubBase,
 
     DBusAddressTranslator::getInstance().searchForDBusAddress(commonApiAddress, interfaceName, connectionName, objectPath);
 
-    if(acquiredConnectionName_ == "") {
-        bool isServiceNameAcquired = dbusConnection_->requestServiceNameAndBlock(connectionName);
-        if(!isServiceNameAcquired) {
-            return false;
-        }
-        acquiredConnectionName_ = connectionName;
-    } else if (acquiredConnectionName_ != connectionName) {
-        return false;
-    }
+    bool status = false;
+
 
     if(!registeredAdapterFactoryFunctions_) {
         registeredAdapterFactoryFunctions_ = new std::unordered_map<std::string, DBusAdapterFactoryFunction> {};
@@ -145,13 +138,27 @@ bool DBusFactory::registerAdapter(std::shared_ptr<StubBase> stubBase,
         if(!dbusStubAdapter) {
             return false;
         }
-        if(registeredServices_.insert( {std::move(commonApiAddress), dbusStubAdapter} ).second) {
+        if(registeredServices_.insert( {commonApiAddress, dbusStubAdapter} ).second) {
             dbusStubAdapter->init();
-            return true;
+            status = true;
         }
     }
 
-       return false;
+    if (acquiredConnectionName_ == "") {
+        bool isServiceNameAcquired = dbusConnection_->requestServiceNameAndBlock(connectionName);
+        if (!isServiceNameAcquired) {
+            registeredServices_.find(commonApiAddress)->second->deinit();
+            registeredServices_.erase(commonApiAddress);
+            return false;
+        }
+        acquiredConnectionName_ = connectionName;
+    } else if (acquiredConnectionName_ != connectionName) {
+        registeredServices_.find(commonApiAddress)->second->deinit();
+        registeredServices_.erase(commonApiAddress);
+        return false;
+    }
+
+       return status;
 }
 
 bool DBusFactory::unregisterService(const std::string& participantId, const std::string& serviceName, const std::string& domain) {
index 2b1a813..4951a96 100644 (file)
@@ -11,7 +11,7 @@
 
 #include <CommonAPI/Factory.h>
 
-#include "CommonAPI/DBus/DBusStubAdapter.h"
+#include "DBusStubAdapter.h"
 #include "DBusConnection.h"
 #include "DBusProxy.h"
 
index a6d92db..6be703c 100644 (file)
@@ -28,5 +28,12 @@ std::shared_ptr<Factory> DBusRuntime::createFactory(std::shared_ptr<MainLoopCont
     return factory;
 }
 
+
+extern "C" {
+
+CommonAPI::MiddlewareInfo middlewareInfo = CommonAPI::DBus::DBusRuntime::middlewareInfo_;
+
+}
+
 } // namespace DBus
 } // namespace CommonAPI
index 3784f91..367c7c4 100644 (file)
@@ -26,11 +26,4 @@ class DBusRuntime: public Runtime, public std::enable_shared_from_this<DBusRunti
 } // namespace DBus
 } // namespace CommonAPI
 
-
-extern "C" {
-
-CommonAPI::MiddlewareInfo middlewareInfo = CommonAPI::DBus::DBusRuntime::middlewareInfo_;
-
-}
-
 #endif // COMMONAPI_DBUS_DBUS_RUNTIME_H_
index ee627a3..d076a71 100644 (file)
@@ -67,10 +67,10 @@ class DBusStubAdapterHelper: public DBusStubAdapter, public std::enable_shared_f
         return remoteEventHandler_;
     }
 
+       // interfaceMemberName, interfaceMemberSignature
+       typedef std::pair<const char*, const char*> DBusInterfaceMemberPath;
+       typedef std::unordered_map<DBusInterfaceMemberPath, StubDispatcher*> StubDispatcherTable;
  protected:
-    // interfaceMemberName, interfaceMemberSignature
-    typedef std::pair<const char*, const char*> DBusInterfaceMemberPath;
-    typedef std::unordered_map<DBusInterfaceMemberPath, StubDispatcher*> StubDispatcherTable;
 
     virtual bool onInterfaceDBusMessage(const DBusMessage& dbusMessage) {
         const char* interfaceMemberName = dbusMessage.getMemberName();
@@ -151,7 +151,7 @@ class DBusMethodStubDispatcher<_StubClass, _In<_InArgs...> >: public DBusStubAda
     }
 
  private:
-    template <int... _InArgIndices, int... _OutArgIndices>
+    template <int... _InArgIndices>
     inline bool handleDBusMessage(const DBusMessage& dbusMessage,
                                                          const std::shared_ptr<_StubClass>& stub,
                                   DBusStubAdapterHelperType& dbusStubAdapterHelper,
index 19a02a8..cb74d29 100644 (file)
@@ -152,6 +152,7 @@ void notifyThunk(DBusPendingCall*, void* data) {
 }
 
 TEST_F(DBusConnectionTest, LibdbusConnectionsMayCommitSuicide) {
+    dbus_threads_init_default();
        const ::DBusBusType libdbusType = ::DBusBusType::DBUS_BUS_SESSION;
        ::DBusError libdbusError;
        dbus_error_init(&libdbusError);
index 14b083e..985ae38 100644 (file)
@@ -1,6 +1,12 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+/*
+* This file was generated by the CommonAPI Generators.
+*
+This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
+If a copy of the MPL was not distributed with this file, You can obtain one at
+http://mozilla.org/MPL/2.0/.
+
+Test workspace
+*/
 #include "DerivedTypeCollection.h"
 
 namespace commonapi {
index 26409d6..dbe1afb 100644 (file)
@@ -1,8 +1,14 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-#ifndef COMMONAPI_TESTS_DERIVED_TYPE_COLLECTION_H_
-#define COMMONAPI_TESTS_DERIVED_TYPE_COLLECTION_H_
+/*
+* This file was generated by the CommonAPI Generators.
+*
+This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
+If a copy of the MPL was not distributed with this file, You can obtain one at
+http://mozilla.org/MPL/2.0/.
+
+Test workspace
+*/
+#ifndef COMMONAPI_TESTS_Derived_Type_Collection_H_
+#define COMMONAPI_TESTS_Derived_Type_Collection_H_
 
 #include <CommonAPI/InputStream.h>
 #include <CommonAPI/OutputStream.h>
@@ -39,10 +45,10 @@ namespace DerivedTypeCollection {
     typedef std::unordered_map<uint32_t, TestArrayTestStruct> TestMap;
     
     enum class TestEnum: int32_t {
-        E_UNKNOWN = 0,
-        E_OK = 1,
-        E_OUT_OF_RANGE = 2,
-        E_NOT_USED = 3
+        E_UNKNOWN = 0x0,
+        E_OK = 0x1,
+        E_OUT_OF_RANGE = 0x2,
+        E_NOT_USED = 0x3
     };
     
     // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
@@ -54,7 +60,7 @@ namespace DerivedTypeCollection {
         E_OUT_OF_RANGE = TestEnum::E_OUT_OF_RANGE,
         E_NOT_USED = TestEnum::E_NOT_USED
         ,
-        E_NEW = 4
+        E_NEW = 0x4
     };
     
     // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
@@ -68,7 +74,7 @@ namespace DerivedTypeCollection {
         
         E_NEW = TestEnumExtended::E_NEW
         ,
-        E_NEW2 = 5
+        E_NEW2 = 0x5
     };
     
     // XXX Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
@@ -92,7 +98,7 @@ namespace DerivedTypeCollection {
     typedef std::unordered_map<TestEnum, std::string> TestEnumMap;
     
     enum class TestEnumMissingValue: int32_t {
-        E1 = 10,
+        E1 = 0xa,
         E2,
         E3 = 2
     };
@@ -136,31 +142,31 @@ struct TestEnumExtended2Comparator {
 };
 
 
-inline bool operator==(const TestEnumExtended2& lhs, const TestEnum& rhs) {
+inline bool operator==(const TestEnumExtended2& lhs, const DerivedTypeCollection::TestEnum& rhs) {
     return static_cast<int32_t>(lhs) == static_cast<int32_t>(rhs);
 }
-inline bool operator==(const TestEnum& lhs, const TestEnumExtended2& rhs) {
+inline bool operator==(const DerivedTypeCollection::TestEnum& lhs, const TestEnumExtended2& rhs) {
     return static_cast<int32_t>(lhs) == static_cast<int32_t>(rhs);
-}
-inline bool operator!=(const TestEnumExtended2& lhs, const TestEnum& rhs) {
+} 
+inline bool operator!=(const TestEnumExtended2& lhs, const DerivedTypeCollection::TestEnum& rhs) {
     return static_cast<int32_t>(lhs) != static_cast<int32_t>(rhs);
 }
-inline bool operator!=(const TestEnum& lhs, const TestEnumExtended2& rhs) {
+inline bool operator!=(const DerivedTypeCollection::TestEnum& lhs, const TestEnumExtended2& rhs) {
     return static_cast<int32_t>(lhs) != static_cast<int32_t>(rhs);
-}
+} 
 
-inline bool operator==(const TestEnumExtended2& lhs, const TestEnumExtended& rhs) {
+inline bool operator==(const TestEnumExtended2& lhs, const DerivedTypeCollection::TestEnumExtended& rhs) {
     return static_cast<int32_t>(lhs) == static_cast<int32_t>(rhs);
 }
-inline bool operator==(const TestEnumExtended& lhs, const TestEnumExtended2& rhs) {
+inline bool operator==(const DerivedTypeCollection::TestEnumExtended& lhs, const TestEnumExtended2& rhs) {
     return static_cast<int32_t>(lhs) == static_cast<int32_t>(rhs);
-}
-inline bool operator!=(const TestEnumExtended2& lhs, const TestEnumExtended& rhs) {
+} 
+inline bool operator!=(const TestEnumExtended2& lhs, const DerivedTypeCollection::TestEnumExtended& rhs) {
     return static_cast<int32_t>(lhs) != static_cast<int32_t>(rhs);
 }
-inline bool operator!=(const TestEnumExtended& lhs, const TestEnumExtended2& rhs) {
+inline bool operator!=(const DerivedTypeCollection::TestEnumExtended& lhs, const TestEnumExtended2& rhs) {
     return static_cast<int32_t>(lhs) != static_cast<int32_t>(rhs);
-}
+} 
 inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, TestEnumMissingValue& enumValue) {
     return inputStream.readEnumValue<int32_t>(enumValue);
 }
@@ -190,18 +196,18 @@ struct TestEnumExtendedComparator {
 };
 
 
-inline bool operator==(const TestEnumExtended& lhs, const TestEnum& rhs) {
+inline bool operator==(const TestEnumExtended& lhs, const DerivedTypeCollection::TestEnum& rhs) {
     return static_cast<int32_t>(lhs) == static_cast<int32_t>(rhs);
 }
-inline bool operator==(const TestEnum& lhs, const TestEnumExtended& rhs) {
+inline bool operator==(const DerivedTypeCollection::TestEnum& lhs, const TestEnumExtended& rhs) {
     return static_cast<int32_t>(lhs) == static_cast<int32_t>(rhs);
-}
-inline bool operator!=(const TestEnumExtended& lhs, const TestEnum& rhs) {
+} 
+inline bool operator!=(const TestEnumExtended& lhs, const DerivedTypeCollection::TestEnum& rhs) {
     return static_cast<int32_t>(lhs) != static_cast<int32_t>(rhs);
 }
-inline bool operator!=(const TestEnum& lhs, const TestEnumExtended& rhs) {
+inline bool operator!=(const DerivedTypeCollection::TestEnum& lhs, const TestEnumExtended& rhs) {
     return static_cast<int32_t>(lhs) != static_cast<int32_t>(rhs);
-}
+} 
 bool operator==(const TestStruct& lhs, const TestStruct& rhs);
 inline bool operator!=(const TestStruct& lhs, const TestStruct& rhs) {
     return !(lhs == rhs);
@@ -305,24 +311,28 @@ 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 {
@@ -331,4 +341,4 @@ namespace std {
     };
 }
 
-#endif // COMMONAPI_TESTS_DERIVED_TYPE_COLLECTION_H_
+#endif // COMMONAPI_TESTS_Derived_Type_Collection_H_
index f1d3cc2..31e4733 100644 (file)
@@ -1,8 +1,14 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-#ifndef COMMONAPI_TESTS_PREDEFINED_TYPE_COLLECTION_H_
-#define COMMONAPI_TESTS_PREDEFINED_TYPE_COLLECTION_H_
+/*
+* This file was generated by the CommonAPI Generators.
+*
+This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
+If a copy of the MPL was not distributed with this file, You can obtain one at
+http://mozilla.org/MPL/2.0/.
+
+Test workspace
+*/
+#ifndef COMMONAPI_TESTS_Predefined_Type_Collection_H_
+#define COMMONAPI_TESTS_Predefined_Type_Collection_H_
 
 #include <CommonAPI/ByteBuffer.h>
 #include <CommonAPI/types.h>
@@ -61,4 +67,4 @@ namespace CommonAPI {
 namespace std {
 }
 
-#endif // COMMONAPI_TESTS_PREDEFINED_TYPE_COLLECTION_H_
+#endif // COMMONAPI_TESTS_Predefined_Type_Collection_H_
index fe0121e..86311e0 100644 (file)
@@ -1,8 +1,14 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-#ifndef COMMONAPI_TESTS_TEST_INTERFACE_H_
-#define COMMONAPI_TESTS_TEST_INTERFACE_H_
+/*
+* This file was generated by the CommonAPI Generators.
+*
+This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
+If a copy of the MPL was not distributed with this file, You can obtain one at
+http://mozilla.org/MPL/2.0/.
+
+Test workspace
+*/
+#ifndef COMMONAPI_TESTS_Test_Interface_H_
+#define COMMONAPI_TESTS_Test_Interface_H_
 
 #include <CommonAPI/types.h>
 
@@ -35,6 +41,9 @@ namespace CommonAPI {
 
 
 namespace std {
+    //hashes for types
+    
+    //hashes for error types
 }
 
-#endif // COMMONAPI_TESTS_TEST_INTERFACE_H_
+#endif // COMMONAPI_TESTS_Test_Interface_H_
index f5460d1..9012719 100644 (file)
@@ -1,6 +1,12 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+/*
+* This file was generated by the CommonAPI Generators.
+*
+This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
+If a copy of the MPL was not distributed with this file, You can obtain one at
+http://mozilla.org/MPL/2.0/.
+
+Test workspace
+*/
 #include "TestInterfaceDBusProxy.h"
 
 namespace commonapi {
index 1ec27be..51ee3df 100644 (file)
@@ -1,8 +1,14 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-#ifndef COMMONAPI_TESTS_TEST_INTERFACE_DBUS_PROXY_H_
-#define COMMONAPI_TESTS_TEST_INTERFACE_DBUS_PROXY_H_
+/*
+* This file was generated by the CommonAPI Generators.
+*
+This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
+If a copy of the MPL was not distributed with this file, You can obtain one at
+http://mozilla.org/MPL/2.0/.
+
+Test workspace
+*/
+#ifndef COMMONAPI_TESTS_Test_Interface_DBUS_PROXY_H_
+#define COMMONAPI_TESTS_Test_Interface_DBUS_PROXY_H_
 
 #include <commonapi/tests/TestInterfaceProxyBase.h>
 #include <CommonAPI/DBus/DBusFactory.h>
@@ -24,7 +30,7 @@ class TestInterfaceDBusProxy: virtual public TestInterfaceProxyBase, virtual pub
                     const std::string& objectPath,
                     const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection);
 
-    virtual ~TestInterfaceDBusProxy() {}
+    virtual ~TestInterfaceDBusProxy() { }
 
     virtual TestPredefinedTypeAttributeAttribute& getTestPredefinedTypeAttributeAttribute();
     virtual TestDerivedStructAttributeAttribute& getTestDerivedStructAttributeAttribute();
@@ -32,17 +38,22 @@ class TestInterfaceDBusProxy: virtual public TestInterfaceProxyBase, virtual pub
 
     virtual TestPredefinedTypeBroadcastEvent& getTestPredefinedTypeBroadcastEvent();
 
+
     virtual void testEmptyMethod(CommonAPI::CallStatus& callStatus);
     virtual std::future<CommonAPI::CallStatus> testEmptyMethodAsync(TestEmptyMethodAsyncCallback callback);
+
     virtual void testVoidPredefinedTypeMethod(const uint32_t& uint32Value, const std::string& stringValue, CommonAPI::CallStatus& callStatus);
     virtual std::future<CommonAPI::CallStatus> testVoidPredefinedTypeMethodAsync(const uint32_t& uint32Value, const std::string& stringValue, TestVoidPredefinedTypeMethodAsyncCallback callback);
+
     virtual void testPredefinedTypeMethod(const uint32_t& uint32InValue, const std::string& stringInValue, CommonAPI::CallStatus& callStatus, uint32_t& uint32OutValue, std::string& stringOutValue);
     virtual std::future<CommonAPI::CallStatus> testPredefinedTypeMethodAsync(const uint32_t& uint32InValue, const std::string& stringInValue, TestPredefinedTypeMethodAsyncCallback callback);
+
     virtual void testVoidDerivedTypeMethod(const DerivedTypeCollection::TestEnumExtended2& testEnumExtended2Value, const DerivedTypeCollection::TestMap& testMapValue, CommonAPI::CallStatus& callStatus);
     virtual std::future<CommonAPI::CallStatus> testVoidDerivedTypeMethodAsync(const DerivedTypeCollection::TestEnumExtended2& testEnumExtended2Value, const DerivedTypeCollection::TestMap& testMapValue, TestVoidDerivedTypeMethodAsyncCallback callback);
+
     virtual void testDerivedTypeMethod(const DerivedTypeCollection::TestEnumExtended2& testEnumExtended2InValue, const DerivedTypeCollection::TestMap& testMapInValue, CommonAPI::CallStatus& callStatus, DerivedTypeCollection::TestEnumExtended2& testEnumExtended2OutValue, DerivedTypeCollection::TestMap& testMapOutValue);
     virtual std::future<CommonAPI::CallStatus> testDerivedTypeMethodAsync(const DerivedTypeCollection::TestEnumExtended2& testEnumExtended2InValue, const DerivedTypeCollection::TestMap& testMapInValue, TestDerivedTypeMethodAsyncCallback callback);
-
+    
     virtual void getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const;
 
  private:
@@ -56,4 +67,4 @@ class TestInterfaceDBusProxy: virtual public TestInterfaceProxyBase, virtual pub
 } // namespace tests
 } // namespace commonapi
 
-#endif // COMMONAPI_TESTS_TEST_INTERFACE_DBUS_PROXY_H_
+#endif // COMMONAPI_TESTS_Test_Interface_DBUS_PROXY_H_
index 9145d2c..97f434c 100644 (file)
@@ -1,6 +1,12 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+/*
+* This file was generated by the CommonAPI Generators.
+*
+This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
+If a copy of the MPL was not distributed with this file, You can obtain one at
+http://mozilla.org/MPL/2.0/.
+
+Test workspace
+*/
 #include "TestInterfaceDBusStubAdapter.h"
 #include <commonapi/tests/TestInterface.h>
 
@@ -168,22 +174,6 @@ static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher<
     > testDerivedTypeMethodStubDispatcher(&TestInterfaceStub::testDerivedTypeMethod, "ia{ua(sq)}");
 
 
-template<>
-const TestInterfaceDBusStubAdapterHelper::StubDispatcherTable TestInterfaceDBusStubAdapterHelper::stubDispatcherTable_ = {
-    { { "getTestPredefinedTypeAttributeAttribute", "" }, &commonapi::tests::getTestPredefinedTypeAttributeAttributeStubDispatcher }
-    , { { "setTestPredefinedTypeAttributeAttribute", "u" }, &commonapi::tests::setTestPredefinedTypeAttributeAttributeStubDispatcher },
-    { { "getTestDerivedStructAttributeAttribute", "" }, &commonapi::tests::getTestDerivedStructAttributeAttributeStubDispatcher }
-    , { { "setTestDerivedStructAttributeAttribute", "(sqi)" }, &commonapi::tests::setTestDerivedStructAttributeAttributeStubDispatcher },
-    { { "getTestDerivedArrayAttributeAttribute", "" }, &commonapi::tests::getTestDerivedArrayAttributeAttributeStubDispatcher }
-    , { { "setTestDerivedArrayAttributeAttribute", "at" }, &commonapi::tests::setTestDerivedArrayAttributeAttributeStubDispatcher }
-    ,
-    { { "testEmptyMethod", "" }, &commonapi::tests::testEmptyMethodStubDispatcher },
-    { { "testVoidPredefinedTypeMethod", "us" }, &commonapi::tests::testVoidPredefinedTypeMethodStubDispatcher },
-    { { "testPredefinedTypeMethod", "us" }, &commonapi::tests::testPredefinedTypeMethodStubDispatcher },
-    { { "testVoidDerivedTypeMethod", "ia{ua(sq)}" }, &commonapi::tests::testVoidDerivedTypeMethodStubDispatcher },
-    { { "testDerivedTypeMethod", "ia{ua(sq)}" }, &commonapi::tests::testDerivedTypeMethodStubDispatcher }
-};
-
 void TestInterfaceDBusStubAdapter::fireTestPredefinedTypeAttributeAttributeChanged(const uint32_t& value) {
        CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<uint32_t>>
         ::sendSignal(
@@ -224,3 +214,19 @@ void TestInterfaceDBusStubAdapter::fireTestPredefinedTypeBroadcastEvent(const ui
 
 } // namespace tests
 } // namespace commonapi
+
+template<>
+const commonapi::tests::TestInterfaceDBusStubAdapterHelper::StubDispatcherTable commonapi::tests::TestInterfaceDBusStubAdapterHelper::stubDispatcherTable_ = {
+    { { "getTestPredefinedTypeAttributeAttribute", "" }, &commonapi::tests::getTestPredefinedTypeAttributeAttributeStubDispatcher }
+    , { { "setTestPredefinedTypeAttributeAttribute", "u" }, &commonapi::tests::setTestPredefinedTypeAttributeAttributeStubDispatcher },
+    { { "getTestDerivedStructAttributeAttribute", "" }, &commonapi::tests::getTestDerivedStructAttributeAttributeStubDispatcher }
+    , { { "setTestDerivedStructAttributeAttribute", "(sqi)" }, &commonapi::tests::setTestDerivedStructAttributeAttributeStubDispatcher },
+    { { "getTestDerivedArrayAttributeAttribute", "" }, &commonapi::tests::getTestDerivedArrayAttributeAttributeStubDispatcher }
+    , { { "setTestDerivedArrayAttributeAttribute", "at" }, &commonapi::tests::setTestDerivedArrayAttributeAttributeStubDispatcher }
+    ,
+    { { "testEmptyMethod", "" }, &commonapi::tests::testEmptyMethodStubDispatcher },
+    { { "testVoidPredefinedTypeMethod", "us" }, &commonapi::tests::testVoidPredefinedTypeMethodStubDispatcher },
+    { { "testPredefinedTypeMethod", "us" }, &commonapi::tests::testPredefinedTypeMethodStubDispatcher },
+    { { "testVoidDerivedTypeMethod", "ia{ua(sq)}" }, &commonapi::tests::testVoidDerivedTypeMethodStubDispatcher },
+    { { "testDerivedTypeMethod", "ia{ua(sq)}" }, &commonapi::tests::testDerivedTypeMethodStubDispatcher }
+};
index 651a22b..d018fac 100644 (file)
@@ -1,8 +1,14 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-#ifndef COMMONAPI_TESTS_TEST_INTERFACE_DBUS_STUB_ADAPTER_H_
-#define COMMONAPI_TESTS_TEST_INTERFACE_DBUS_STUB_ADAPTER_H_
+/*
+* This file was generated by the CommonAPI Generators.
+*
+This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
+If a copy of the MPL was not distributed with this file, You can obtain one at
+http://mozilla.org/MPL/2.0/.
+
+Test workspace
+*/
+#ifndef COMMONAPI_TESTS_Test_Interface_DBUS_STUB_ADAPTER_H_
+#define COMMONAPI_TESTS_Test_Interface_DBUS_STUB_ADAPTER_H_
 
 #include <commonapi/tests/TestInterfaceStub.h>
 
@@ -37,4 +43,4 @@ class TestInterfaceDBusStubAdapter: public TestInterfaceStubAdapter, public Test
 } // namespace tests
 } // namespace commonapi
 
-#endif // COMMONAPI_TESTS_TEST_INTERFACE_DBUS_STUB_ADAPTER_H_
+#endif // COMMONAPI_TESTS_Test_Interface_DBUS_STUB_ADAPTER_H_
index 88dfde1..9652f33 100644 (file)
@@ -1,8 +1,14 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-#ifndef COMMONAPI_TESTS_TEST_INTERFACE_PROXY_H_
-#define COMMONAPI_TESTS_TEST_INTERFACE_PROXY_H_
+/*
+* This file was generated by the CommonAPI Generators.
+*
+This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
+If a copy of the MPL was not distributed with this file, You can obtain one at
+http://mozilla.org/MPL/2.0/.
+
+Test workspace
+*/
+#ifndef COMMONAPI_TESTS_Test_Interface_PROXY_H_
+#define COMMONAPI_TESTS_Test_Interface_PROXY_H_
 
 #include "TestInterfaceProxyBase.h"
 #include <CommonAPI/AttributeExtension.h>
@@ -18,14 +24,26 @@ class TestInterfaceProxy: virtual public TestInterface, virtual public TestInter
     ~TestInterfaceProxy();
 
     /// Returns the wrapper class that provides access to the attribute TestPredefinedTypeAttribute.
-    virtual TestPredefinedTypeAttributeAttribute& getTestPredefinedTypeAttributeAttribute();
+    virtual TestPredefinedTypeAttributeAttribute& getTestPredefinedTypeAttributeAttribute() {
+        return delegate_->getTestPredefinedTypeAttributeAttribute();
+    }
+
     /// Returns the wrapper class that provides access to the attribute TestDerivedStructAttribute.
-    virtual TestDerivedStructAttributeAttribute& getTestDerivedStructAttributeAttribute();
+    virtual TestDerivedStructAttributeAttribute& getTestDerivedStructAttributeAttribute() {
+        return delegate_->getTestDerivedStructAttributeAttribute();
+    }
+
     /// Returns the wrapper class that provides access to the attribute TestDerivedArrayAttribute.
-    virtual TestDerivedArrayAttributeAttribute& getTestDerivedArrayAttributeAttribute();
+    virtual TestDerivedArrayAttributeAttribute& getTestDerivedArrayAttributeAttribute() {
+        return delegate_->getTestDerivedArrayAttributeAttribute();
+    }
+
 
     /// Returns the wrapper class that provides access to the broadcast TestPredefinedTypeBroadcast.
-    virtual TestPredefinedTypeBroadcastEvent& getTestPredefinedTypeBroadcastEvent();
+    virtual TestPredefinedTypeBroadcastEvent& getTestPredefinedTypeBroadcastEvent() {
+        return delegate_->getTestPredefinedTypeBroadcastEvent();
+    }
+
 
 
     /**
@@ -230,8 +248,11 @@ namespace TestInterfaceExtensions {
 //
 template <typename ... _AttributeExtensions>
 TestInterfaceProxy<_AttributeExtensions...>::TestInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate):
-        delegate_(std::dynamic_pointer_cast<TestInterfaceProxyBase>(delegate)),
-        _AttributeExtensions(*(std::dynamic_pointer_cast<TestInterfaceProxyBase>(delegate)))... {
+        delegate_(std::dynamic_pointer_cast<TestInterfaceProxyBase>(delegate))
+#ifndef _WIN32
+        , _AttributeExtensions(*(std::dynamic_pointer_cast<TestInterfaceProxyBase>(delegate)))...
+#endif
+{
 }
 
 template <typename ... _AttributeExtensions>
@@ -239,28 +260,6 @@ TestInterfaceProxy<_AttributeExtensions...>::~TestInterfaceProxy() {
 }
 
 template <typename ... _AttributeExtensions>
-typename TestInterfaceProxy<_AttributeExtensions...>::TestPredefinedTypeAttributeAttribute& TestInterfaceProxy<_AttributeExtensions...>::getTestPredefinedTypeAttributeAttribute() {
-    return delegate_->getTestPredefinedTypeAttributeAttribute();
-}
-
-template <typename ... _AttributeExtensions>
-typename TestInterfaceProxy<_AttributeExtensions...>::TestDerivedStructAttributeAttribute& TestInterfaceProxy<_AttributeExtensions...>::getTestDerivedStructAttributeAttribute() {
-    return delegate_->getTestDerivedStructAttributeAttribute();
-}
-
-template <typename ... _AttributeExtensions>
-typename TestInterfaceProxy<_AttributeExtensions...>::TestDerivedArrayAttributeAttribute& TestInterfaceProxy<_AttributeExtensions...>::getTestDerivedArrayAttributeAttribute() {
-    return delegate_->getTestDerivedArrayAttributeAttribute();
-}
-
-
-template <typename ... _AttributeExtensions>
-typename TestInterfaceProxy<_AttributeExtensions...>::TestPredefinedTypeBroadcastEvent& TestInterfaceProxy<_AttributeExtensions...>::getTestPredefinedTypeBroadcastEvent() {
-    return delegate_->getTestPredefinedTypeBroadcastEvent();
-}
-
-
-template <typename ... _AttributeExtensions>
 void TestInterfaceProxy<_AttributeExtensions...>::testEmptyMethod(CommonAPI::CallStatus& callStatus) {
     delegate_->testEmptyMethod(callStatus);
 }
@@ -362,4 +361,4 @@ struct DefaultAttributeProxyFactoryHelper<commonapi::tests::TestInterfaceProxy,
 }
 
 
-#endif // COMMONAPI_TESTS_TEST_INTERFACE_PROXY_H_
+#endif // COMMONAPI_TESTS_Test_Interface_PROXY_H_
index 6ae5263..01257af 100644 (file)
@@ -1,8 +1,14 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-#ifndef COMMONAPI_TESTS_TEST_INTERFACE_PROXY_BASE_H_
-#define COMMONAPI_TESTS_TEST_INTERFACE_PROXY_BASE_H_
+/*
+* This file was generated by the CommonAPI Generators.
+*
+This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
+If a copy of the MPL was not distributed with this file, You can obtain one at
+http://mozilla.org/MPL/2.0/.
+
+Test workspace
+*/
+#ifndef COMMONAPI_TESTS_Test_Interface_PROXY_BASE_H_
+#define COMMONAPI_TESTS_Test_Interface_PROXY_BASE_H_
 
 #include "TestInterface.h"
 #include <unordered_map>
@@ -16,6 +22,7 @@
 #include <CommonAPI/Proxy.h>
 #include <functional>
 #include <future>
+#include <vector>
 
 namespace commonapi {
 namespace tests {
@@ -55,8 +62,7 @@ class TestInterfaceProxyBase: virtual public CommonAPI::Proxy {
     virtual std::future<CommonAPI::CallStatus> testDerivedTypeMethodAsync(const DerivedTypeCollection::TestEnumExtended2& testEnumExtended2InValue, const DerivedTypeCollection::TestMap& testMapInValue, TestDerivedTypeMethodAsyncCallback callback) = 0;
 };
 
-
 } // namespace tests
 } // namespace commonapi
 
-#endif // COMMONAPI_TESTS_TEST_INTERFACE_PROXY_BASE_H_
+#endif // COMMONAPI_TESTS_Test_Interface_PROXY_BASE_H_
index 6d078ed..52aa842 100644 (file)
@@ -1,8 +1,14 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-#ifndef COMMONAPI_TESTS_TEST_INTERFACE_STUB_H_
-#define COMMONAPI_TESTS_TEST_INTERFACE_STUB_H_
+/*
+* This file was generated by the CommonAPI Generators.
+*
+This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
+If a copy of the MPL was not distributed with this file, You can obtain one at
+http://mozilla.org/MPL/2.0/.
+
+Test workspace
+*/
+#ifndef COMMONAPI_TESTS_Test_Interface_STUB_H_
+#define COMMONAPI_TESTS_Test_Interface_STUB_H_
 
 #include <unordered_map>
 #include <cstdint>
@@ -13,6 +19,8 @@
 #include "TestInterface.h"
 #include <CommonAPI/Stub.h>
 
+#include <vector>
+
 namespace commonapi {
 namespace tests {
 
@@ -108,4 +116,4 @@ class TestInterfaceStub : public CommonAPI::Stub<TestInterfaceStubAdapter , Test
 } // namespace tests
 } // namespace commonapi
 
-#endif // COMMONAPI_TESTS_TEST_INTERFACE_STUB_H_
+#endif // COMMONAPI_TESTS_Test_Interface_STUB_H_
index d852c0c..b562076 100644 (file)
@@ -1,6 +1,12 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+/*
+* This file was generated by the CommonAPI Generators.
+*
+This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
+If a copy of the MPL was not distributed with this file, You can obtain one at
+http://mozilla.org/MPL/2.0/.
+
+Test workspace
+*/
 #include <commonapi/tests/TestInterfaceStubDefault.h>
 
 namespace commonapi {
index 3f0aeff..e8b3228 100644 (file)
@@ -1,8 +1,14 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-#ifndef COMMONAPI_TESTS_TEST_INTERFACE_STUB_DEFAULT_H_
-#define COMMONAPI_TESTS_TEST_INTERFACE_STUB_DEFAULT_H_
+/*
+* This file was generated by the CommonAPI Generators.
+*
+This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
+If a copy of the MPL was not distributed with this file, You can obtain one at
+http://mozilla.org/MPL/2.0/.
+
+Test workspace
+*/
+#ifndef COMMONAPI_TESTS_Test_Interface_STUB_DEFAULT_H_
+#define COMMONAPI_TESTS_Test_Interface_STUB_DEFAULT_H_
 
 #include <commonapi/tests/TestInterfaceStub.h>
 
@@ -92,4 +98,4 @@ class TestInterfaceStubDefault : public TestInterfaceStub {
 } // namespace tests
 } // namespace commonapi
 
-#endif // COMMONAPI_TESTS_TEST_INTERFACE_STUB_DEFAULT_H_
+#endif // COMMONAPI_TESTS_Test_Interface_STUB_DEFAULT_H_