summaryrefslogtreecommitdiff
path: root/src/test/fake/legacy/service/LegacyInterfaceStubDefault.cpp
blob: 184ce1eeb43d529de042481a0b0234d157b96bbc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
* 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 <fake/legacy/service/LegacyInterfaceStubDefault.h>

namespace fake {
namespace legacy {
namespace service {

LegacyInterfaceStubDefault::LegacyInterfaceStubDefault():
        remoteEventHandler_(this),
        interfaceVersion_(LegacyInterface::getInterfaceVersion()) {
}

const CommonAPI::Version& LegacyInterfaceStubDefault::getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId) {
    return interfaceVersion_;
}

LegacyInterfaceStubRemoteEvent* LegacyInterfaceStubDefault::initStubAdapter(const std::shared_ptr<LegacyInterfaceStubAdapter>& stubAdapter) {
    CommonAPI::Stub<LegacyInterfaceStubAdapter, LegacyInterfaceStubRemoteEvent>::stubAdapter_ = stubAdapter;
    return &remoteEventHandler_;
}


void LegacyInterfaceStubDefault::TestMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, int32_t input, int32_t& val1, int32_t& val2) {
    // Call old style methods in default 
    TestMethod(input, val1, val2);
}
void LegacyInterfaceStubDefault::TestMethod(int32_t input, int32_t& val1, int32_t& val2) {
    // No operation in default
}

void LegacyInterfaceStubDefault::OtherTestMethod(const std::shared_ptr<CommonAPI::ClientId> clientId, std::string& greeting, int32_t& identifier) {
    // Call old style methods in default 
    OtherTestMethod(greeting, identifier);
}
void LegacyInterfaceStubDefault::OtherTestMethod(std::string& greeting, int32_t& identifier) {
    // No operation in default
}

void LegacyInterfaceStubDefault::finish(const std::shared_ptr<CommonAPI::ClientId> clientId) {
    // Call old style methods in default 
    finish();
}
void LegacyInterfaceStubDefault::finish() {
    // No operation in default
}




LegacyInterfaceStubDefault::RemoteEventHandler::RemoteEventHandler(LegacyInterfaceStubDefault* defaultStub):
        defaultStub_(defaultStub) {
}

} // namespace service
} // namespace legacy
} // namespace fake