summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Laner <laner@itestra.de>2013-11-28 18:41:45 +0100
committerPhilip Rauwolf <rauwolf@itestra.de>2013-11-29 16:20:47 +0100
commit8b93559fdcd3bf76526287bba288fbc8b6a77050 (patch)
treea9782ca85716886b95de597cf7f44b8e46796089
parente0af53f2058965dd83a3585b9000f947d9f36cd7 (diff)
downloadgenivi-common-api-dbus-runtime-8b93559fdcd3bf76526287bba288fbc8b6a77050.tar.gz
Fixed bug that prevents proxy connections from being destroyed because
of a circular dependency between DBusConnection and DBusServiceRegistry. Also removed bug that prevented ServiceRegistry-callbacks from being deregistered correctly. Extended tests, some formatting issues, fixed one spelling error. Change-Id: I6cf2148375f4c086e60f0ad642415056bd808759
-rw-r--r--src/CommonAPI/DBus/DBusConnection.cpp30
-rw-r--r--src/CommonAPI/DBus/DBusConnection.h8
-rw-r--r--src/CommonAPI/DBus/DBusProxy.cpp7
-rw-r--r--src/CommonAPI/DBus/DBusProxy.h5
-rw-r--r--src/CommonAPI/DBus/DBusProxyConnection.h12
-rw-r--r--src/CommonAPI/DBus/DBusSelectiveEvent.h5
-rw-r--r--src/CommonAPI/DBus/DBusServiceRegistry.cpp43
-rw-r--r--src/test/DBusProxyTest.cpp56
-rw-r--r--src/test/commonapi/tests/managed/LeafInterfaceProxy.h9
-rw-r--r--src/test/commonapi/tests/managed/LeafInterfaceProxyBase.h3
-rw-r--r--src/test/commonapi/tests/managed/LeafInterfaceStub.h9
-rw-r--r--src/test/commonapi/tests/managed/LeafInterfaceStubDefault.cpp2
-rw-r--r--src/test/commonapi/tests/managed/LeafInterfaceStubDefault.h6
13 files changed, 97 insertions, 98 deletions
diff --git a/src/CommonAPI/DBus/DBusConnection.cpp b/src/CommonAPI/DBus/DBusConnection.cpp
index 6736834..1d95989 100644
--- a/src/CommonAPI/DBus/DBusConnection.cpp
+++ b/src/CommonAPI/DBus/DBusConnection.cpp
@@ -668,10 +668,11 @@ DBusProxyConnection::DBusSignalHandlerToken DBusConnection::subscribeForSelectiv
return (subscriptionToken);
}
-void DBusConnection::unsubsribeFromSelectiveBroadcast(const std::string& eventName,
+void DBusConnection::unsubscribeFromSelectiveBroadcast(const std::string& eventName,
DBusProxyConnection::DBusSignalHandlerToken subscription,
- DBusProxy* callingProxy) {
- bool lastListenerOnConnectionRemoved = removeSignalMemberHandler(subscription);
+ DBusProxy* callingProxy,
+ const DBusSignalHandler* dbusSignalHandler) {
+ bool lastListenerOnConnectionRemoved = removeSignalMemberHandler(subscription, dbusSignalHandler);
if (lastListenerOnConnectionRemoved) {
// send unsubscribe message to stub
@@ -706,17 +707,19 @@ DBusProxyConnection::DBusSignalHandlerToken DBusConnection::addSignalMemberHandl
return dbusSignalHandlerPath;
}
-bool DBusConnection::removeSignalMemberHandler(const DBusSignalHandlerToken& dbusSignalHandlerToken) {
+bool DBusConnection::removeSignalMemberHandler(const DBusSignalHandlerToken& dbusSignalHandlerToken,
+ const DBusSignalHandler* dbusSignalHandler) {
bool lastHandlerRemoved = false;
std::lock_guard<std::mutex> dbusSignalLock(signalGuard_);
auto equalRangeIteratorPair = dbusSignalHandlerTable_.equal_range(dbusSignalHandlerToken);
if (equalRangeIteratorPair.first != equalRangeIteratorPair.second) {
// advance to the next element
- equalRangeIteratorPair.first++;
+ auto iteratorToNextElement = equalRangeIteratorPair.first;
+ iteratorToNextElement++;
// check if the first element was the only element
- const bool isLastSignalMemberHandler = equalRangeIteratorPair.first == equalRangeIteratorPair.second;
+ const bool isLastSignalMemberHandler = iteratorToNextElement == equalRangeIteratorPair.second;
if (isLastSignalMemberHandler) {
const std::string& objectPath = std::get<0>(dbusSignalHandlerToken);
@@ -727,7 +730,20 @@ bool DBusConnection::removeSignalMemberHandler(const DBusSignalHandlerToken& dbu
lastHandlerRemoved = true;
}
- dbusSignalHandlerTable_.erase(equalRangeIteratorPair.first, equalRangeIteratorPair.first);
+ if(dbusSignalHandler == NULL) {
+ // remove all handlers
+ dbusSignalHandlerTable_.erase(dbusSignalHandlerToken);
+ } else {
+ // just remove specific handler
+ while(equalRangeIteratorPair.first != equalRangeIteratorPair.second) {
+ if(equalRangeIteratorPair.first->second == dbusSignalHandler) {
+ equalRangeIteratorPair.first = dbusSignalHandlerTable_.erase(equalRangeIteratorPair.first);
+ }
+ else {
+ equalRangeIteratorPair.first++;
+ }
+ }
+ }
}
return lastHandlerRemoved;
diff --git a/src/CommonAPI/DBus/DBusConnection.h b/src/CommonAPI/DBus/DBusConnection.h
index b86fd1e..54b94d1 100644
--- a/src/CommonAPI/DBus/DBusConnection.h
+++ b/src/CommonAPI/DBus/DBusConnection.h
@@ -112,14 +112,16 @@ class DBusConnection: public DBusProxyConnection, public std::enable_shared_from
DBusSignalHandler* dbusSignalHandler,
DBusProxy* callingProxy);
- void unsubsribeFromSelectiveBroadcast(const std::string& eventName,
+ void unsubscribeFromSelectiveBroadcast(const std::string& eventName,
DBusProxyConnection::DBusSignalHandlerToken subscription,
- DBusProxy* callingProxy);
+ DBusProxy* callingProxy,
+ const DBusSignalHandler* dbusSignalHandler);
void registerObjectPath(const std::string& objectPath);
void unregisterObjectPath(const std::string& objectPath);
- bool removeSignalMemberHandler(const DBusSignalHandlerToken& dbusSignalHandlerToken);
+ bool removeSignalMemberHandler(const DBusSignalHandlerToken& dbusSignalHandlerToken,
+ const DBusSignalHandler* dbusSignalHandler = NULL);
bool readWriteDispatch(int timeoutMilliseconds = -1);
virtual const std::shared_ptr<DBusServiceRegistry> getDBusServiceRegistry();
diff --git a/src/CommonAPI/DBus/DBusProxy.cpp b/src/CommonAPI/DBus/DBusProxy.cpp
index 0962788..24e39a1 100644
--- a/src/CommonAPI/DBus/DBusProxy.cpp
+++ b/src/CommonAPI/DBus/DBusProxy.cpp
@@ -139,9 +139,10 @@ DBusProxyConnection::DBusSignalHandlerToken DBusProxy::subscribeForSelectiveBroa
this);
}
-void DBusProxy::unsubsribeFromSelectiveBroadcast(const std::string& eventName,
- DBusProxyConnection::DBusSignalHandlerToken subscription) {
- getDBusConnection()->unsubsribeFromSelectiveBroadcast(eventName, subscription, this);
+void DBusProxy::unsubscribeFromSelectiveBroadcast(const std::string& eventName,
+ DBusProxyConnection::DBusSignalHandlerToken subscription,
+ const DBusProxyConnection::DBusSignalHandler* dbusSignalHandler) {
+ getDBusConnection()->unsubscribeFromSelectiveBroadcast(eventName, subscription, this, dbusSignalHandler);
}
} // namespace DBus
diff --git a/src/CommonAPI/DBus/DBusProxy.h b/src/CommonAPI/DBus/DBusProxy.h
index 3ee3f68..81b97ea 100644
--- a/src/CommonAPI/DBus/DBusProxy.h
+++ b/src/CommonAPI/DBus/DBusProxy.h
@@ -70,8 +70,9 @@ class DBusProxy: public DBusProxyBase {
const std::string& interfaceMemberName,
const std::string& interfaceMemberSignature,
DBusProxyConnection::DBusSignalHandler* dbusSignalHandler);
- void unsubsribeFromSelectiveBroadcast(const std::string& eventName,
- DBusProxyConnection::DBusSignalHandlerToken subscription);
+ void unsubscribeFromSelectiveBroadcast(const std::string& eventName,
+ DBusProxyConnection::DBusSignalHandlerToken subscription,
+ const DBusProxyConnection::DBusSignalHandler* dbusSignalHandler);
void init();
private:
diff --git a/src/CommonAPI/DBus/DBusProxyConnection.h b/src/CommonAPI/DBus/DBusProxyConnection.h
index 4f17512..d7c88d8 100644
--- a/src/CommonAPI/DBus/DBusProxyConnection.h
+++ b/src/CommonAPI/DBus/DBusProxyConnection.h
@@ -64,8 +64,7 @@ class DBusProxyConnection {
typedef Event<AvailabilityStatus> ConnectionStatusEvent;
- virtual ~DBusProxyConnection() {
- }
+ virtual ~DBusProxyConnection() { }
virtual bool isConnected() const = 0;
@@ -101,10 +100,13 @@ class DBusProxyConnection {
DBusSignalHandler* dbusSignalHandler,
DBusProxy* callingProxy) = 0;
- virtual void unsubsribeFromSelectiveBroadcast(const std::string& eventName,
+ virtual void unsubscribeFromSelectiveBroadcast(const std::string& eventName,
DBusProxyConnection::DBusSignalHandlerToken subscription,
- DBusProxy* callingProxy) = 0;
- virtual bool removeSignalMemberHandler(const DBusSignalHandlerToken& dbusSignalHandlerToken) = 0;
+ DBusProxy* callingProxy,
+ const DBusSignalHandler* dbusSignalHandler) = 0;
+
+ virtual bool removeSignalMemberHandler(const DBusSignalHandlerToken& dbusSignalHandlerToken,
+ const DBusSignalHandler* dbusSignalHandler = NULL) = 0;
virtual bool addObjectManagerSignalMemberHandler(const std::string& dbusBusName,
DBusSignalHandler* dbusSignalHandler) = 0;
diff --git a/src/CommonAPI/DBus/DBusSelectiveEvent.h b/src/CommonAPI/DBus/DBusSelectiveEvent.h
index e3f2484..313ad9c 100644
--- a/src/CommonAPI/DBus/DBusSelectiveEvent.h
+++ b/src/CommonAPI/DBus/DBusSelectiveEvent.h
@@ -85,7 +85,10 @@ public:
protected:
virtual void onLastListenerRemoved(const CancellableListener&) {
- associatedDbusProxy_.unsubsribeFromSelectiveBroadcast(DBusEventBase::eventName_, DBusEventBase::subscription_);
+ associatedDbusProxy_.unsubscribeFromSelectiveBroadcast(
+ DBusEventBase::eventName_,
+ DBusEventBase::subscription_,
+ this);
}
private:
diff --git a/src/CommonAPI/DBus/DBusServiceRegistry.cpp b/src/CommonAPI/DBus/DBusServiceRegistry.cpp
index 98c5896..e5952de 100644
--- a/src/CommonAPI/DBus/DBusServiceRegistry.cpp
+++ b/src/CommonAPI/DBus/DBusServiceRegistry.cpp
@@ -10,7 +10,6 @@
#include "DBusProxyAsyncCallbackHandler.h"
#include "DBusUtils.h"
-#include <iostream>
#include <iterator>
namespace CommonAPI {
@@ -36,7 +35,13 @@ DBusServiceRegistry::~DBusServiceRegistry() {
// fulfill all open promises
std::promise<DBusRecordState> promiseOnResolve = std::move(dbusServiceListenersRecord.promiseOnResolve);
- promiseOnResolve.set_value(DBusRecordState::NOT_AVAILABLE);
+
+ try {
+ std::future<DBusRecordState> futureOnResolve = promiseOnResolve.get_future();
+ if(!futureOnResolve.valid()) {
+ promiseOnResolve.set_value(DBusRecordState::NOT_AVAILABLE);
+ }
+ } catch (std::future_error& e) { }
if (dbusServiceListenersRecord.uniqueBusNameState == DBusRecordState::RESOLVED) {
onDBusServiceNotAvailable(dbusServiceListenersRecord);
@@ -58,7 +63,7 @@ DBusServiceRegistry::~DBusServiceRegistry() {
void DBusServiceRegistry::init() {
dbusDaemonProxyStatusEventSubscription_ =
dbusDaemonProxy_->getProxyStatusEvent().subscribeCancellableListener(
- std::bind(&DBusServiceRegistry::onDBusDaemonProxyStatusEvent, shared_from_this(), std::placeholders::_1));
+ std::bind(&DBusServiceRegistry::onDBusDaemonProxyStatusEvent, this, std::placeholders::_1));
dbusDaemonProxyNameOwnerChangedEventSubscription_ =
dbusDaemonProxy_->getNameOwnerChangedEvent().subscribeCancellableListener(
@@ -128,7 +133,6 @@ DBusServiceRegistry::DBusServiceSubscription DBusServiceRegistry::subscribeAvail
}
}
-
if (availabilityStatus != AvailabilityStatus::UNKNOWN) {
notificationThread_ = std::this_thread::get_id();
SubscriptionStatus subscriptionStatus = serviceListener(availabilityStatus);
@@ -518,28 +522,7 @@ SubscriptionStatus DBusServiceRegistry::onSignalDBusMessage(const DBusMessage& d
auto& dbusUniqueNameRecord = dbusServiceUniqueNameIterator->second;
- //auto dbusObjectPathIterator = dbusUniqueNameRecord.dbusObjectPathsCache.find(dbusObjectPath);
- //const bool isDBusObjectPathFound = (dbusObjectPathIterator != dbusUniqueNameRecord.dbusObjectPathsCache.end());
-
- /*
- if (!isDBusObjectPathFound) {
- return SubscriptionStatus::RETAIN;
- }
- */
-
DBusObjectPathCache& dbusObjectPathRecord = dbusUniqueNameRecord.dbusObjectPathsCache[dbusObjectPath];
-/*
- if (isDBusObjectPathFound) {
- dbusObjectPathRecord = &dbusObjectPathIterator->second;
- }
- else
- {
- DBusObjectPathCache dbusObjectPathRecord;
- auto insertionResult = dbusUniqueNameRecord.dbusObjectPathsCache.insert(std::make_pair(dbusObjectPath, std::move(dbusObjectPath)));
- auto objectPathCacheIterator = insertionResult.first;
- dbusObjectPathRecord = &(objectPathCacheIterator->second);
- }
-*/
if (dbusObjectPathRecord.state != DBusRecordState::RESOLVED) {
return SubscriptionStatus::RETAIN;
@@ -873,7 +856,7 @@ void DBusServiceRegistry::parseIntrospectionData(const std::string& xmlData,
parseIntrospectionNode(rootNode, rootObjectPath, rootObjectPath, dbusServiceUniqueName);
- DBusUniqueNameRecord& dbusUniqueNameRecord = dbusUniqueNamesMap_[dbusServiceUniqueName];
+ dbusUniqueNamesMap_[dbusServiceUniqueName];
dbusServicesMutex_.unlock();
}
@@ -982,7 +965,7 @@ void DBusServiceRegistry::onDBusServiceNotAvailable(DBusServiceListenersRecord&
const DBusUniqueNamesMapIterator dbusUniqueNameRecordIterator = dbusUniqueNamesMap_.find(dbusServiceListenersRecord.uniqueBusName);
// fulfill all open promises on object path resolution
- if(dbusUniqueNameRecordIterator != dbusUniqueNamesMap_.end()) {
+ if (dbusUniqueNameRecordIterator != dbusUniqueNamesMap_.end()) {
DBusUniqueNameRecord& dbusUniqueNameRecord = dbusUniqueNameRecordIterator->second;
for (auto dbusObjectPathsCacheIterator = dbusUniqueNameRecord.dbusObjectPathsCache.begin();
dbusObjectPathsCacheIterator != dbusUniqueNameRecord.dbusObjectPathsCache.end();
@@ -998,7 +981,6 @@ void DBusServiceRegistry::onDBusServiceNotAvailable(DBusServiceListenersRecord&
promiseOnResolve.set_value(DBusRecordState::NOT_AVAILABLE);
}
} catch (std::future_error& e) { }
-
}
removeUniqueName(dbusUniqueNameRecordIterator);
@@ -1134,6 +1116,11 @@ void DBusServiceRegistry::notifyDBusInterfaceNameListeners(DBusInterfaceNameList
}
void DBusServiceRegistry::removeUniqueName(const DBusUniqueNamesMapIterator& dbusUniqueNamesIterator) {
+ const bool isSubscriptionCancelled = dbusDaemonProxy_->getDBusConnection()->removeObjectManagerSignalMemberHandler(
+ dbusUniqueNamesIterator->first,
+ this);
+ assert(isSubscriptionCancelled);
+
for (auto dbusServiceNamesIterator = dbusUniqueNamesIterator->second.ownedBusNames.begin();
dbusServiceNamesIterator != dbusUniqueNamesIterator->second.ownedBusNames.end();
dbusServiceNamesIterator++) {
diff --git a/src/test/DBusProxyTest.cpp b/src/test/DBusProxyTest.cpp
index 0a27459..95948d0 100644
--- a/src/test/DBusProxyTest.cpp
+++ b/src/test/DBusProxyTest.cpp
@@ -57,12 +57,7 @@ static const std::string objectPathExtended = "/CommonAPI/DBus/tests/DBusProxyTe
class ProxyTest: public ::testing::Test {
protected:
-
void SetUp() {
-
- isTestStubAdapterRegistered_ = false;
- isExtendedStubAdapterRegistered_ = false;
-
runtime_ = std::dynamic_pointer_cast<CommonAPI::DBus::DBusRuntime>(CommonAPI::Runtime::load());
serviceFactory_ = std::dynamic_pointer_cast<CommonAPI::DBus::DBusFactory>(runtime_->createFactory());
@@ -84,18 +79,12 @@ protected:
std::shared_ptr<CommonAPI::DBus::DBusFactory> serviceFactory_;
virtual void TearDown() {
- if(isTestStubAdapterRegistered_) {
- deregisterTestStub();
- }
- if(isExtendedStubAdapterRegistered_) {
- deregisterExtendedStub();
- }
usleep(300000);
}
void registerTestStub() {
stubDefault_ = std::make_shared<commonapi::tests::TestInterfaceStubDefault>();
- isTestStubAdapterRegistered_ = runtime_->getServicePublisher()->registerService<commonapi::tests::TestInterfaceStub>(stubDefault_, commonApiAddress, serviceFactory_);
+ bool isTestStubAdapterRegistered_ = runtime_->getServicePublisher()->registerService<commonapi::tests::TestInterfaceStub>(stubDefault_, commonApiAddress, serviceFactory_);
ASSERT_TRUE(isTestStubAdapterRegistered_);
usleep(500000);
@@ -104,7 +93,7 @@ protected:
void registerExtendedStub() {
stubExtended_ = std::make_shared<commonapi::tests::ExtendedInterfaceStubDefault>();
- isExtendedStubAdapterRegistered_ = runtime_->getServicePublisher()->registerService<commonapi::tests::ExtendedInterfaceStub>(stubExtended_, commonApiAddressExtended, serviceFactory_);
+ bool isExtendedStubAdapterRegistered_ = runtime_->getServicePublisher()->registerService<commonapi::tests::ExtendedInterfaceStub>(stubExtended_, commonApiAddressExtended, serviceFactory_);
ASSERT_TRUE(isExtendedStubAdapterRegistered_);
usleep(500000);
@@ -265,7 +254,7 @@ TEST_F(ProxyTest, isServiceInstanceAlive) {
EXPECT_TRUE(isInstanceAlive);
- //deregisterTestStub();
+ deregisterTestStub();
}
TEST_F(ProxyTest, IsAvailableBlocking) {
@@ -278,7 +267,7 @@ TEST_F(ProxyTest, IsAvailableBlocking) {
EXPECT_TRUE(proxy_->isAvailableBlocking());
- //deregisterTestStub();
+ deregisterTestStub();
}
TEST_F(ProxyTest, HasNecessaryAttributesAndEvents) {
@@ -318,10 +307,10 @@ TEST_F(ProxyTest, CallMethodFromExtendedInterface) {
// give the proxy time to become available
for (uint32_t i = 0; !extendedProxy->isAvailable() && i < 500; ++i) {
- usleep(2 * 1000);
+ usleep(20 * 1000);
}
- ASSERT_TRUE(extendedProxy->isAvailable());
+ EXPECT_TRUE(extendedProxy->isAvailable());
uint32_t inInt;
bool wasCalled = false;
@@ -333,9 +322,8 @@ TEST_F(ProxyTest, CallMethodFromExtendedInterface) {
});
usleep(500000);
- ASSERT_TRUE(wasCalled);
- //deregisterExtendedStub();
- //usleep(500000);
+ EXPECT_TRUE(wasCalled);
+ deregisterExtendedStub();
}
TEST_F(ProxyTest, CallMethodFromParentInterface) {
@@ -344,9 +332,9 @@ TEST_F(ProxyTest, CallMethodFromParentInterface) {
auto extendedProxy = serviceFactory_->buildProxy<commonapi::tests::ExtendedInterfaceProxy>(commonApiAddressExtended);
for (uint32_t i = 0; !extendedProxy->isAvailable() && i < 500; ++i) {
- usleep(2 * 1000);
+ usleep(20 * 1000);
}
- ASSERT_TRUE(extendedProxy->isAvailable());
+ EXPECT_TRUE(extendedProxy->isAvailable());
bool wasCalled = false;
extendedProxy->testEmptyMethodAsync(
@@ -354,10 +342,10 @@ TEST_F(ProxyTest, CallMethodFromParentInterface) {
ASSERT_EQ(callStatus, CommonAPI::CallStatus::SUCCESS);
wasCalled = true;
});
- for (uint32_t i = 0; !wasCalled && i < 500; ++i) {
- usleep(2 * 1000);
- }
- ASSERT_TRUE(wasCalled);
+ usleep(500000);
+ EXPECT_TRUE(wasCalled);
+
+ deregisterExtendedStub();
}
TEST_F(ProxyTest, ProxyCanFetchVersionAttributeFromInheritedInterfaceStub) {
@@ -365,10 +353,10 @@ TEST_F(ProxyTest, ProxyCanFetchVersionAttributeFromInheritedInterfaceStub) {
auto extendedProxy = serviceFactory_->buildProxy<commonapi::tests::TestInterfaceProxy>(commonApiAddressExtended);
- for (uint32_t i = 0; !extendedProxy->isAvailable() && i < 500; ++i) {
- usleep(2 * 1000);
+ for (uint32_t i = 0; !extendedProxy->isAvailable() && i < 800; ++i) {
+ usleep(20 * 1000);
}
- ASSERT_TRUE(extendedProxy->isAvailable());
+ EXPECT_TRUE(extendedProxy->isAvailable());
CommonAPI::InterfaceVersionAttribute& versionAttribute = extendedProxy->getInterfaceVersionAttribute();
@@ -378,15 +366,17 @@ TEST_F(ProxyTest, ProxyCanFetchVersionAttributeFromInheritedInterfaceStub) {
bool wasCalled = false;
std::future<CommonAPI::CallStatus> futureVersion = versionAttribute.getValueAsync([&](const CommonAPI::CallStatus& callStatus, CommonAPI::Version version) {
- ASSERT_EQ(callStatus, CommonAPI::CallStatus::SUCCESS);
- ASSERT_TRUE(version.Major > 0 || version.Minor > 0);
+ EXPECT_EQ(callStatus, CommonAPI::CallStatus::SUCCESS);
+ EXPECT_TRUE(version.Major > 0 || version.Minor > 0);
wasCalled = true;
});
futureVersion.wait();
-// usleep(100000);
+ usleep(100000);
+
+ EXPECT_TRUE(wasCalled);
- ASSERT_TRUE(wasCalled);
+ deregisterExtendedStub();
}
int main(int argc, char** argv) {
diff --git a/src/test/commonapi/tests/managed/LeafInterfaceProxy.h b/src/test/commonapi/tests/managed/LeafInterfaceProxy.h
index 7275950..94e25d4 100644
--- a/src/test/commonapi/tests/managed/LeafInterfaceProxy.h
+++ b/src/test/commonapi/tests/managed/LeafInterfaceProxy.h
@@ -1,5 +1,5 @@
/*
-* This file was generated by the CommonAPI Generators.
+* This file was generated by the CommonAPI Generators.
* Used org.genivi.commonapi.core 2.1.4.qualifier.
* Used org.franca.core 0.8.10.201309262002.
*
@@ -30,9 +30,9 @@ class LeafInterfaceProxy: virtual public LeafInterface, virtual public LeafInter
public:
LeafInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate);
~LeafInterfaceProxy();
-
+
typedef LeafInterface InterfaceType;
-
+
@@ -57,7 +57,7 @@ public:
* 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.
@@ -169,7 +169,6 @@ CommonAPI::InterfaceVersionAttribute& LeafInterfaceProxy<_AttributeExtensions...
return delegate_->getInterfaceVersionAttribute();
}
-
} // namespace managed
} // namespace tests
diff --git a/src/test/commonapi/tests/managed/LeafInterfaceProxyBase.h b/src/test/commonapi/tests/managed/LeafInterfaceProxyBase.h
index 16df4d7..8654dc1 100644
--- a/src/test/commonapi/tests/managed/LeafInterfaceProxyBase.h
+++ b/src/test/commonapi/tests/managed/LeafInterfaceProxyBase.h
@@ -1,5 +1,5 @@
/*
-* This file was generated by the CommonAPI Generators.
+* This file was generated by the CommonAPI Generators.
* Used org.genivi.commonapi.core 2.1.4.qualifier.
* Used org.franca.core 0.8.10.201309262002.
*
@@ -14,7 +14,6 @@
-
#if !defined (COMMONAPI_INTERNAL_COMPILATION)
#define COMMONAPI_INTERNAL_COMPILATION
#endif
diff --git a/src/test/commonapi/tests/managed/LeafInterfaceStub.h b/src/test/commonapi/tests/managed/LeafInterfaceStub.h
index 921e78f..ef40342 100644
--- a/src/test/commonapi/tests/managed/LeafInterfaceStub.h
+++ b/src/test/commonapi/tests/managed/LeafInterfaceStub.h
@@ -1,5 +1,5 @@
/*
-* This file was generated by the CommonAPI Generators.
+* This file was generated by the CommonAPI Generators.
* Used org.genivi.commonapi.core 2.1.4.qualifier.
* Used org.franca.core 0.8.10.201309262002.
*
@@ -38,10 +38,9 @@ namespace managed {
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
@@ -83,7 +82,7 @@ public:
/// 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;
diff --git a/src/test/commonapi/tests/managed/LeafInterfaceStubDefault.cpp b/src/test/commonapi/tests/managed/LeafInterfaceStubDefault.cpp
index fe18ffc..bce3940 100644
--- a/src/test/commonapi/tests/managed/LeafInterfaceStubDefault.cpp
+++ b/src/test/commonapi/tests/managed/LeafInterfaceStubDefault.cpp
@@ -1,5 +1,5 @@
/*
-* This file was generated by the CommonAPI Generators.
+* This file was generated by the CommonAPI Generators.
* Used org.genivi.commonapi.core 2.1.4.qualifier.
* Used org.franca.core 0.8.10.201309262002.
*
diff --git a/src/test/commonapi/tests/managed/LeafInterfaceStubDefault.h b/src/test/commonapi/tests/managed/LeafInterfaceStubDefault.h
index a13cada..d004da0 100644
--- a/src/test/commonapi/tests/managed/LeafInterfaceStubDefault.h
+++ b/src/test/commonapi/tests/managed/LeafInterfaceStubDefault.h
@@ -1,5 +1,5 @@
/*
-* This file was generated by the CommonAPI Generators.
+* This file was generated by the CommonAPI Generators.
* Used org.genivi.commonapi.core 2.1.4.qualifier.
* Used org.franca.core 0.8.10.201309262002.
*
@@ -33,7 +33,7 @@ public:
LeafInterfaceStubDefault();
LeafInterfaceStubRemoteEvent* initStubAdapter(const std::shared_ptr<LeafInterfaceStubAdapter>& stubAdapter);
-
+
const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId);
@@ -41,7 +41,7 @@ public:
virtual void testLeafMethod(int32_t inInt, std::string inString, LeafInterface::testLeafMethodError& methodError, int32_t& outInt, std::string& outString);
-
+
protected:
private: