/* * This file was generated by the CommonAPI Generators. * Used org.genivi.commonapi.core 3.1.2.v201506150834. * 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 #include namespace v1_0 { namespace commonapi { namespace tests { TestFreedesktopDerivedInterfaceStubDefault::TestFreedesktopDerivedInterfaceStubDefault(): remoteEventHandler_(this), interfaceVersion_(TestFreedesktopDerivedInterface::getInterfaceVersion()) { } const CommonAPI::Version& TestFreedesktopDerivedInterfaceStubDefault::getInterfaceVersion(std::shared_ptr _client) { return interfaceVersion_; } TestFreedesktopDerivedInterfaceStubRemoteEvent* TestFreedesktopDerivedInterfaceStubDefault::initStubAdapter(const std::shared_ptr &_adapter) { TestFreedesktopInterfaceStubDefault::initStubAdapter(_adapter); CommonAPI::Stub::stubAdapter_ = _adapter; return &remoteEventHandler_; } const uint32_t& TestFreedesktopDerivedInterfaceStubDefault::getTestAttributedFromDerivedInterfaceAttribute() { return testAttributedFromDerivedInterfaceAttributeValue_; } const uint32_t& TestFreedesktopDerivedInterfaceStubDefault::getTestAttributedFromDerivedInterfaceAttribute(const std::shared_ptr _client) { return getTestAttributedFromDerivedInterfaceAttribute(); } void TestFreedesktopDerivedInterfaceStubDefault::setTestAttributedFromDerivedInterfaceAttribute(uint32_t _value) { const bool valueChanged = trySetTestAttributedFromDerivedInterfaceAttribute(std::move(_value)); if (valueChanged && stubAdapter_ != NULL) { CommonAPI::Stub::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 _client, uint32_t _value) { setTestAttributedFromDerivedInterfaceAttribute(_value); } void TestFreedesktopDerivedInterfaceStubDefault::onRemoteTestAttributedFromDerivedInterfaceAttributeChanged() { // No operation in default } void TestFreedesktopDerivedInterfaceStubDefault::RemoteEventHandler::onRemoteTestAttributedFromDerivedInterfaceAttributeChanged() { assert(defaultStub_ !=NULL); defaultStub_->onRemoteTestAttributedFromDerivedInterfaceAttributeChanged(); } bool TestFreedesktopDerivedInterfaceStubDefault::RemoteEventHandler::onRemoteSetTestAttributedFromDerivedInterfaceAttribute(uint32_t _value) { assert(defaultStub_ !=NULL); return defaultStub_->trySetTestAttributedFromDerivedInterfaceAttribute(std::move(_value)); } bool TestFreedesktopDerivedInterfaceStubDefault::RemoteEventHandler::onRemoteSetTestAttributedFromDerivedInterfaceAttribute(const std::shared_ptr _client, uint32_t _value) { return onRemoteSetTestAttributedFromDerivedInterfaceAttribute(_value); } TestFreedesktopDerivedInterfaceStubDefault::RemoteEventHandler::RemoteEventHandler(TestFreedesktopDerivedInterfaceStubDefault *_defaultStub) : TestFreedesktopInterfaceStubDefault::RemoteEventHandler(_defaultStub), defaultStub_(_defaultStub) { } } // namespace tests } // namespace commonapi } // namespace v1_0