increased version number to 2.1.5 and regenerated code for test fidl
[profile/ivi/common-api-dbus-runtime.git] / src / test / commonapi / tests / managed / SecondRootStubDefault.cpp
1 /*
2 * This file was generated by the CommonAPI Generators.
3 * Used org.genivi.commonapi.core 2.1.5.qualifier.
4 * Used org.franca.core 0.8.10.201309262002.
5 *
6 * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
7 * If a copy of the MPL was not distributed with this file, You can obtain one at
8 * http://mozilla.org/MPL/2.0/.
9 */
10 #include <commonapi/tests/managed/SecondRootStubDefault.h>
11
12 namespace commonapi {
13 namespace tests {
14 namespace managed {
15
16 SecondRootStubDefault::SecondRootStubDefault():
17         autoInstanceCounter_(0),
18         remoteEventHandler_(this),
19         interfaceVersion_(SecondRoot::getInterfaceVersion()) {
20 }
21
22 const CommonAPI::Version& SecondRootStubDefault::getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId) {
23     return interfaceVersion_;
24 }
25
26 SecondRootStubRemoteEvent* SecondRootStubDefault::initStubAdapter(const std::shared_ptr<SecondRootStubAdapter>& stubAdapter) {
27     CommonAPI::Stub<SecondRootStubAdapter, SecondRootStubRemoteEvent>::stubAdapter_ = stubAdapter;
28     return &remoteEventHandler_;
29 }
30
31
32
33
34 bool SecondRootStubDefault::registerManagedStubLeafInterfaceAutoInstance(std::shared_ptr<LeafInterfaceStub> stub) {
35     autoInstanceCounter_++;
36     std::stringstream ss;
37     ss << stubAdapter_->getInstanceId() << ".i" << autoInstanceCounter_;
38     std::string instance = ss.str();
39     return stubAdapter_->registerManagedStubLeafInterface(stub, instance);
40 }
41 bool SecondRootStubDefault::registerManagedStubLeafInterface(std::shared_ptr<LeafInterfaceStub> stub, const std::string& instance) {
42     return stubAdapter_->registerManagedStubLeafInterface(stub, instance);
43 }
44 bool SecondRootStubDefault::deregisterManagedStubLeafInterface(const std::string& instance) {
45     return stubAdapter_->deregisterManagedStubLeafInterface(instance);
46 }
47 std::set<std::string>& SecondRootStubDefault::getLeafInterfaceInstances() {
48     return stubAdapter_->getLeafInterfaceInstances();
49 }
50
51 SecondRootStubDefault::RemoteEventHandler::RemoteEventHandler(SecondRootStubDefault* defaultStub):
52         defaultStub_(defaultStub) {
53 }
54
55 } // namespace managed
56 } // namespace tests
57 } // namespace commonapi