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 / RootInterfaceDBusProxy.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 "RootInterfaceDBusProxy.h"
11
12 namespace commonapi {
13 namespace tests {
14 namespace managed {
15
16 std::shared_ptr<CommonAPI::DBus::DBusProxy> createRootInterfaceDBusProxy(
17                     const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
18                     const std::string& commonApiAddress,
19                     const std::string& interfaceName,
20                     const std::string& busName,
21                     const std::string& objectPath,
22                     const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyConnection) {
23     return std::make_shared<RootInterfaceDBusProxy>(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection);
24 }
25
26 __attribute__((constructor)) void registerRootInterfaceDBusProxy(void) {
27     CommonAPI::DBus::DBusFactory::registerProxyFactoryMethod(RootInterface::getInterfaceId(),
28        &createRootInterfaceDBusProxy);
29 }
30
31 RootInterfaceDBusProxy::RootInterfaceDBusProxy(
32                     const std::shared_ptr<CommonAPI::DBus::DBusFactory>& factory,
33                     const std::string& commonApiAddress,
34                     const std::string& interfaceName,
35                     const std::string& busName,
36                     const std::string& objectPath,
37                     const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection):
38         CommonAPI::DBus::DBusProxy(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyconnection)
39 ,        proxyManagerLeafInterface_(*this, "commonapi.tests.managed.LeafInterface", factory),
40         proxyManagerBranchInterface_(*this, "commonapi.tests.managed.BranchInterface", factory)
41     {
42     }
43
44
45
46 void RootInterfaceDBusProxy::testRootMethod(const int32_t& inInt, const std::string& inString, CommonAPI::CallStatus& callStatus, RootInterface::testRootMethodError& methodError, int32_t& outInt, std::string& outString) {
47     CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<int32_t, std::string>,
48                                      CommonAPI::DBus::DBusSerializableArguments<RootInterface::testRootMethodError, int32_t, std::string> >::callMethodWithReply(
49         *this,
50         "testRootMethod",
51         "is",
52         inInt, inString,
53         callStatus,
54         methodError
55         , outInt, outString);
56 }
57 std::future<CommonAPI::CallStatus> RootInterfaceDBusProxy::testRootMethodAsync(const int32_t& inInt, const std::string& inString, TestRootMethodAsyncCallback callback) {
58     return CommonAPI::DBus::DBusProxyHelper<CommonAPI::DBus::DBusSerializableArguments<int32_t, std::string>,
59                                      CommonAPI::DBus::DBusSerializableArguments<RootInterface::testRootMethodError, int32_t, std::string> >::callMethodAsync(
60         *this,
61         "testRootMethod",
62         "is",
63         inInt, inString, 
64         std::move(callback));
65 }
66
67 CommonAPI::ProxyManager& RootInterfaceDBusProxy::getProxyManagerLeafInterface() {
68     return proxyManagerLeafInterface_;
69 }
70 CommonAPI::ProxyManager& RootInterfaceDBusProxy::getProxyManagerBranchInterface() {
71     return proxyManagerBranchInterface_;
72 }
73
74
75 void RootInterfaceDBusProxy::getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const {
76     ownVersionMajor = 1;
77     ownVersionMinor = 0;
78 }
79
80 } // namespace managed
81 } // namespace tests
82 } // namespace commonapi