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/ExtendedInterfaceDBusStubAdapter.cpp1
-rw-r--r--src/test/commonapi/tests/TestInterfaceDBusStubAdapter.cpp17
-rw-r--r--src/test/commonapi/tests/managed/BranchInterfaceDBusStubAdapter.cpp1
-rw-r--r--src/test/commonapi/tests/managed/LeafInterfaceDBusStubAdapter.cpp1
-rw-r--r--src/test/commonapi/tests/managed/RootInterfaceDBusStubAdapter.cpp1
-rw-r--r--src/test/commonapi/tests/managed/SecondRootDBusStubAdapter.cpp1
6 files changed, 10 insertions, 12 deletions
diff --git a/src/test/commonapi/tests/ExtendedInterfaceDBusStubAdapter.cpp b/src/test/commonapi/tests/ExtendedInterfaceDBusStubAdapter.cpp
index 83b7042..95b89a1 100644
--- a/src/test/commonapi/tests/ExtendedInterfaceDBusStubAdapter.cpp
+++ b/src/test/commonapi/tests/ExtendedInterfaceDBusStubAdapter.cpp
@@ -34,7 +34,6 @@ __attribute__((constructor)) void registerExtendedInterfaceDBusStubAdapter(void)
ExtendedInterfaceDBusStubAdapterInternal::~ExtendedInterfaceDBusStubAdapterInternal() {
deactivateManagedInstances();
ExtendedInterfaceDBusStubAdapterHelper::deinit();
- ExtendedInterfaceDBusStubAdapterHelper::stub_.reset();
}
void ExtendedInterfaceDBusStubAdapterInternal::deactivateManagedInstances() {
diff --git a/src/test/commonapi/tests/TestInterfaceDBusStubAdapter.cpp b/src/test/commonapi/tests/TestInterfaceDBusStubAdapter.cpp
index f371d5a..9678322 100644
--- a/src/test/commonapi/tests/TestInterfaceDBusStubAdapter.cpp
+++ b/src/test/commonapi/tests/TestInterfaceDBusStubAdapter.cpp
@@ -34,7 +34,6 @@ __attribute__((constructor)) void registerTestInterfaceDBusStubAdapter(void) {
TestInterfaceDBusStubAdapterInternal::~TestInterfaceDBusStubAdapterInternal() {
deactivateManagedInstances();
TestInterfaceDBusStubAdapterHelper::deinit();
- TestInterfaceDBusStubAdapterHelper::stub_.reset();
}
void TestInterfaceDBusStubAdapterInternal::deactivateManagedInstances() {
@@ -302,10 +301,11 @@ void TestInterfaceDBusStubAdapterInternal::sendTestSelectiveBroadcastSelective(c
}
void TestInterfaceDBusStubAdapterInternal::subscribeForTestSelectiveBroadcastSelective(const std::shared_ptr<CommonAPI::ClientId> clientId, bool& success) {
- bool ok = stub_->onTestSelectiveBroadcastSelectiveSubscriptionRequested(clientId);
+ auto stub = stub_.lock();
+ bool ok = stub->onTestSelectiveBroadcastSelectiveSubscriptionRequested(clientId);
if (ok) {
subscribersForTestSelectiveBroadcastSelective_->insert(clientId);
- stub_->onTestSelectiveBroadcastSelectiveSubscriptionChanged(clientId, CommonAPI::SelectiveBroadcastSubscriptionEvent::SUBSCRIBED);
+ stub->onTestSelectiveBroadcastSelectiveSubscriptionChanged(clientId, CommonAPI::SelectiveBroadcastSubscriptionEvent::SUBSCRIBED);
success = true;
} else {
success = false;
@@ -315,7 +315,8 @@ void TestInterfaceDBusStubAdapterInternal::subscribeForTestSelectiveBroadcastSel
void TestInterfaceDBusStubAdapterInternal::unsubscribeFromTestSelectiveBroadcastSelective(const std::shared_ptr<CommonAPI::ClientId> clientId) {
subscribersForTestSelectiveBroadcastSelective_->erase(clientId);
- stub_->onTestSelectiveBroadcastSelectiveSubscriptionChanged(clientId, CommonAPI::SelectiveBroadcastSubscriptionEvent::UNSUBSCRIBED);
+ auto stub = stub_.lock();
+ stub->onTestSelectiveBroadcastSelectiveSubscriptionChanged(clientId, CommonAPI::SelectiveBroadcastSubscriptionEvent::UNSUBSCRIBED);
}
std::shared_ptr<CommonAPI::ClientIdList> const TestInterfaceDBusStubAdapterInternal::getSubscribersForTestSelectiveBroadcastSelective() {
@@ -370,10 +371,11 @@ void TestInterfaceDBusStubAdapterInternal::sendTestBroadcastWithOutArgsSelective
}
void TestInterfaceDBusStubAdapterInternal::subscribeForTestBroadcastWithOutArgsSelective(const std::shared_ptr<CommonAPI::ClientId> clientId, bool& success) {
- bool ok = stub_->onTestBroadcastWithOutArgsSelectiveSubscriptionRequested(clientId);
+ auto stub = stub_.lock();
+ bool ok = stub->onTestBroadcastWithOutArgsSelectiveSubscriptionRequested(clientId);
if (ok) {
subscribersForTestBroadcastWithOutArgsSelective_->insert(clientId);
- stub_->onTestBroadcastWithOutArgsSelectiveSubscriptionChanged(clientId, CommonAPI::SelectiveBroadcastSubscriptionEvent::SUBSCRIBED);
+ stub->onTestBroadcastWithOutArgsSelectiveSubscriptionChanged(clientId, CommonAPI::SelectiveBroadcastSubscriptionEvent::SUBSCRIBED);
success = true;
} else {
success = false;
@@ -383,7 +385,8 @@ void TestInterfaceDBusStubAdapterInternal::subscribeForTestBroadcastWithOutArgsS
void TestInterfaceDBusStubAdapterInternal::unsubscribeFromTestBroadcastWithOutArgsSelective(const std::shared_ptr<CommonAPI::ClientId> clientId) {
subscribersForTestBroadcastWithOutArgsSelective_->erase(clientId);
- stub_->onTestBroadcastWithOutArgsSelectiveSubscriptionChanged(clientId, CommonAPI::SelectiveBroadcastSubscriptionEvent::UNSUBSCRIBED);
+ auto stub = stub_.lock();
+ stub->onTestBroadcastWithOutArgsSelectiveSubscriptionChanged(clientId, CommonAPI::SelectiveBroadcastSubscriptionEvent::UNSUBSCRIBED);
}
std::shared_ptr<CommonAPI::ClientIdList> const TestInterfaceDBusStubAdapterInternal::getSubscribersForTestBroadcastWithOutArgsSelective() {
diff --git a/src/test/commonapi/tests/managed/BranchInterfaceDBusStubAdapter.cpp b/src/test/commonapi/tests/managed/BranchInterfaceDBusStubAdapter.cpp
index 3c14d6b..50047b5 100644
--- a/src/test/commonapi/tests/managed/BranchInterfaceDBusStubAdapter.cpp
+++ b/src/test/commonapi/tests/managed/BranchInterfaceDBusStubAdapter.cpp
@@ -35,7 +35,6 @@ __attribute__((constructor)) void registerBranchInterfaceDBusStubAdapter(void) {
BranchInterfaceDBusStubAdapterInternal::~BranchInterfaceDBusStubAdapterInternal() {
deactivateManagedInstances();
BranchInterfaceDBusStubAdapterHelper::deinit();
- BranchInterfaceDBusStubAdapterHelper::stub_.reset();
}
void BranchInterfaceDBusStubAdapterInternal::deactivateManagedInstances() {
diff --git a/src/test/commonapi/tests/managed/LeafInterfaceDBusStubAdapter.cpp b/src/test/commonapi/tests/managed/LeafInterfaceDBusStubAdapter.cpp
index 21441a3..91565fb 100644
--- a/src/test/commonapi/tests/managed/LeafInterfaceDBusStubAdapter.cpp
+++ b/src/test/commonapi/tests/managed/LeafInterfaceDBusStubAdapter.cpp
@@ -35,7 +35,6 @@ __attribute__((constructor)) void registerLeafInterfaceDBusStubAdapter(void) {
LeafInterfaceDBusStubAdapterInternal::~LeafInterfaceDBusStubAdapterInternal() {
deactivateManagedInstances();
LeafInterfaceDBusStubAdapterHelper::deinit();
- LeafInterfaceDBusStubAdapterHelper::stub_.reset();
}
void LeafInterfaceDBusStubAdapterInternal::deactivateManagedInstances() {
diff --git a/src/test/commonapi/tests/managed/RootInterfaceDBusStubAdapter.cpp b/src/test/commonapi/tests/managed/RootInterfaceDBusStubAdapter.cpp
index 0ae8c1f..38335f3 100644
--- a/src/test/commonapi/tests/managed/RootInterfaceDBusStubAdapter.cpp
+++ b/src/test/commonapi/tests/managed/RootInterfaceDBusStubAdapter.cpp
@@ -35,7 +35,6 @@ __attribute__((constructor)) void registerRootInterfaceDBusStubAdapter(void) {
RootInterfaceDBusStubAdapterInternal::~RootInterfaceDBusStubAdapterInternal() {
deactivateManagedInstances();
RootInterfaceDBusStubAdapterHelper::deinit();
- RootInterfaceDBusStubAdapterHelper::stub_.reset();
}
void RootInterfaceDBusStubAdapterInternal::deactivateManagedInstances() {
diff --git a/src/test/commonapi/tests/managed/SecondRootDBusStubAdapter.cpp b/src/test/commonapi/tests/managed/SecondRootDBusStubAdapter.cpp
index a6c7c6d..57c12b1 100644
--- a/src/test/commonapi/tests/managed/SecondRootDBusStubAdapter.cpp
+++ b/src/test/commonapi/tests/managed/SecondRootDBusStubAdapter.cpp
@@ -35,7 +35,6 @@ __attribute__((constructor)) void registerSecondRootDBusStubAdapter(void) {
SecondRootDBusStubAdapterInternal::~SecondRootDBusStubAdapterInternal() {
deactivateManagedInstances();
SecondRootDBusStubAdapterHelper::deinit();
- SecondRootDBusStubAdapterHelper::stub_.reset();
}
void SecondRootDBusStubAdapterInternal::deactivateManagedInstances() {