summaryrefslogtreecommitdiff
path: root/src/test/commonapi/tests/TestFreedesktopDerivedInterfaceStubDefault.cpp
diff options
context:
space:
mode:
authorStefan Laner <laner@itestra.de>2014-03-13 14:15:28 +0100
committerJohannes Langlotz <Johannes.Langlotz@partner.bmw.de>2014-03-24 16:46:50 +0100
commit845303b00a5ca98a83ccfd5be82075fc546b1e89 (patch)
tree0c876298d22474f17c821f5b6afe756d1a3b97ce /src/test/commonapi/tests/TestFreedesktopDerivedInterfaceStubDefault.cpp
parentb0a9c1d6c6ab78f722a74098080b32881c764784 (diff)
downloadgenivi-common-api-dbus-runtime-845303b00a5ca98a83ccfd5be82075fc546b1e89.tar.gz
Implemented stub support for org.freedesktop.DBus.Properties
Change-Id: I75abc2e75643ff8da51795787970d55cf4e470c2
Diffstat (limited to 'src/test/commonapi/tests/TestFreedesktopDerivedInterfaceStubDefault.cpp')
-rw-r--r--src/test/commonapi/tests/TestFreedesktopDerivedInterfaceStubDefault.cpp88
1 files changed, 88 insertions, 0 deletions
diff --git a/src/test/commonapi/tests/TestFreedesktopDerivedInterfaceStubDefault.cpp b/src/test/commonapi/tests/TestFreedesktopDerivedInterfaceStubDefault.cpp
new file mode 100644
index 0000000..44ef5a0
--- /dev/null
+++ b/src/test/commonapi/tests/TestFreedesktopDerivedInterfaceStubDefault.cpp
@@ -0,0 +1,88 @@
+/*
+* 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