summaryrefslogtreecommitdiff
path: root/src/test/src-gen/dbus/v1_0/commonapi/tests/TestFreedesktopInterfaceDBusStubAdapter.cpp
blob: 2f1258cd9fdae157756b32be87f9d3c3de8ba99f (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
/*
* 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 <v1_0/commonapi/tests/TestFreedesktopInterface.hpp>
#include <v1_0/commonapi/tests/TestFreedesktopInterfaceDBusStubAdapter.hpp>

namespace v1_0 {
namespace commonapi {
namespace tests {

std::shared_ptr<CommonAPI::DBus::DBusStubAdapter> createTestFreedesktopInterfaceDBusStubAdapter(
                   const CommonAPI::DBus::DBusAddress &_address,
                   const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection,
                   const std::shared_ptr<CommonAPI::StubBase> &_stub) {
    return std::make_shared<TestFreedesktopInterfaceDBusStubAdapter>(_address, _connection, _stub);
}

INITIALIZER(registerTestFreedesktopInterfaceDBusStubAdapter) {
    CommonAPI::DBus::Factory::get()->registerStubAdapterCreateMethod(
    	TestFreedesktopInterface::getInterface(), &createTestFreedesktopInterfaceDBusStubAdapter);
}

TestFreedesktopInterfaceDBusStubAdapterInternal::~TestFreedesktopInterfaceDBusStubAdapterInternal() {
    deactivateManagedInstances();
    TestFreedesktopInterfaceDBusStubAdapterHelper::deinit();
}

void TestFreedesktopInterfaceDBusStubAdapterInternal::deactivateManagedInstances() {

}

const char* TestFreedesktopInterfaceDBusStubAdapterInternal::getMethodsDBusIntrospectionXmlData() const {
    static const std::string introspectionData =
        "<method name=\"getInterfaceVersion\">\n"
            "<arg name=\"value\" type=\"uu\" direction=\"out\" />"
        "</method>\n"
        "<method name=\"getTestPredefinedTypeAttributeAttribute\">\n"
            "<arg name=\"value\" type=\"u\" direction=\"out\" />"
        "</method>\n"
        "<method name=\"setTestPredefinedTypeAttributeAttribute\">\n"
            "<arg name=\"requestedValue\" type=\"u\" direction=\"in\" />\n"
            "<arg name=\"setValue\" type=\"u\" direction=\"out\" />\n"
        "</method>\n"
        "<signal name=\"onTestPredefinedTypeAttributeAttributeChanged\">\n"
            "<arg name=\"changedValue\" type=\"u\" />\n"
        "</signal>\n"
        "<method name=\"getTestReadonlyAttributeAttribute\">\n"
            "<arg name=\"value\" type=\"u\" direction=\"out\" />"
        "</method>\n"
        "<signal name=\"onTestReadonlyAttributeAttributeChanged\">\n"
            "<arg name=\"changedValue\" type=\"u\" />\n"
        "</signal>\n"
        "<method name=\"getTestDerivedStructAttributeAttribute\">\n"
            "<arg name=\"value\" type=\"(sqi)\" direction=\"out\" />"
        "</method>\n"
        "<method name=\"setTestDerivedStructAttributeAttribute\">\n"
            "<arg name=\"requestedValue\" type=\"(sqi)\" direction=\"in\" />\n"
            "<arg name=\"setValue\" type=\"(sqi)\" direction=\"out\" />\n"
        "</method>\n"
        "<signal name=\"onTestDerivedStructAttributeAttributeChanged\">\n"
            "<arg name=\"changedValue\" type=\"(sqi)\" />\n"
        "</signal>\n"
        "<method name=\"getTestDerivedArrayAttributeAttribute\">\n"
            "<arg name=\"value\" type=\"at\" direction=\"out\" />"
        "</method>\n"
        "<method name=\"setTestDerivedArrayAttributeAttribute\">\n"
            "<arg name=\"requestedValue\" type=\"at\" direction=\"in\" />\n"
            "<arg name=\"setValue\" type=\"at\" direction=\"out\" />\n"
        "</method>\n"
        "<signal name=\"onTestDerivedArrayAttributeAttributeChanged\">\n"
            "<arg name=\"changedValue\" type=\"at\" />\n"
        "</signal>\n"

    ;
    return introspectionData.c_str();
}

CommonAPI::DBus::DBusGetAttributeStubDispatcher<
        TestFreedesktopInterfaceStub,
        CommonAPI::Version
        > TestFreedesktopInterfaceDBusStubAdapterInternal::getTestFreedesktopInterfaceInterfaceVersionStubDispatcher(&TestFreedesktopInterfaceStub::getInterfaceVersion, "uu");

CommonAPI::DBus::DBusGetAttributeStubDispatcher<
        TestFreedesktopInterfaceStub,
        uint32_t
        > TestFreedesktopInterfaceDBusStubAdapterInternal::getTestPredefinedTypeAttributeAttributeStubDispatcher(&TestFreedesktopInterfaceStub::getTestPredefinedTypeAttributeAttribute, "u");
CommonAPI::DBus::DBusSetObservableAttributeStubDispatcher<
        TestFreedesktopInterfaceStub,
        uint32_t
        > TestFreedesktopInterfaceDBusStubAdapterInternal::setTestPredefinedTypeAttributeAttributeStubDispatcher(
                &TestFreedesktopInterfaceStub::getTestPredefinedTypeAttributeAttribute,
                &TestFreedesktopInterfaceStubRemoteEvent::onRemoteSetTestPredefinedTypeAttributeAttribute,
                &TestFreedesktopInterfaceStubRemoteEvent::onRemoteTestPredefinedTypeAttributeAttributeChanged
                ,&TestFreedesktopInterfaceStubAdapter::fireTestPredefinedTypeAttributeAttributeChanged
                ,"u"
                );
CommonAPI::DBus::DBusGetAttributeStubDispatcher<
        TestFreedesktopInterfaceStub,
        uint32_t
        > TestFreedesktopInterfaceDBusStubAdapterInternal::getTestReadonlyAttributeAttributeStubDispatcher(&TestFreedesktopInterfaceStub::getTestReadonlyAttributeAttribute, "u");
CommonAPI::DBus::DBusGetAttributeStubDispatcher<
        TestFreedesktopInterfaceStub,
        ::commonapi::tests::DerivedTypeCollection::TestStructExtended
        > TestFreedesktopInterfaceDBusStubAdapterInternal::getTestDerivedStructAttributeAttributeStubDispatcher(&TestFreedesktopInterfaceStub::getTestDerivedStructAttributeAttribute, "(sqi)");
CommonAPI::DBus::DBusSetObservableAttributeStubDispatcher<
        TestFreedesktopInterfaceStub,
        ::commonapi::tests::DerivedTypeCollection::TestStructExtended
        > TestFreedesktopInterfaceDBusStubAdapterInternal::setTestDerivedStructAttributeAttributeStubDispatcher(
                &TestFreedesktopInterfaceStub::getTestDerivedStructAttributeAttribute,
                &TestFreedesktopInterfaceStubRemoteEvent::onRemoteSetTestDerivedStructAttributeAttribute,
                &TestFreedesktopInterfaceStubRemoteEvent::onRemoteTestDerivedStructAttributeAttributeChanged
                ,&TestFreedesktopInterfaceStubAdapter::fireTestDerivedStructAttributeAttributeChanged
                ,"(sqi)"
                );
CommonAPI::DBus::DBusGetAttributeStubDispatcher<
        TestFreedesktopInterfaceStub,
        ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64
        > TestFreedesktopInterfaceDBusStubAdapterInternal::getTestDerivedArrayAttributeAttributeStubDispatcher(&TestFreedesktopInterfaceStub::getTestDerivedArrayAttributeAttribute, "at");
CommonAPI::DBus::DBusSetObservableAttributeStubDispatcher<
        TestFreedesktopInterfaceStub,
        ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64
        > TestFreedesktopInterfaceDBusStubAdapterInternal::setTestDerivedArrayAttributeAttributeStubDispatcher(
                &TestFreedesktopInterfaceStub::getTestDerivedArrayAttributeAttribute,
                &TestFreedesktopInterfaceStubRemoteEvent::onRemoteSetTestDerivedArrayAttributeAttribute,
                &TestFreedesktopInterfaceStubRemoteEvent::onRemoteTestDerivedArrayAttributeAttributeChanged
                ,&TestFreedesktopInterfaceStubAdapter::fireTestDerivedArrayAttributeAttributeChanged
                ,"at"
                );




void TestFreedesktopInterfaceDBusStubAdapterInternal::fireTestPredefinedTypeAttributeAttributeChanged(const uint32_t& value) {
    CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<uint32_t>>
        ::sendSignal(
            *this,
            "onTestPredefinedTypeAttributeAttributeChanged",
            "u",
            value
    );
}
void TestFreedesktopInterfaceDBusStubAdapterInternal::fireTestReadonlyAttributeAttributeChanged(const uint32_t& value) {
    CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<uint32_t>>
        ::sendSignal(
            *this,
            "onTestReadonlyAttributeAttributeChanged",
            "u",
            value
    );
}
void TestFreedesktopInterfaceDBusStubAdapterInternal::fireTestDerivedStructAttributeAttributeChanged(const ::commonapi::tests::DerivedTypeCollection::TestStructExtended& value) {
    CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<::commonapi::tests::DerivedTypeCollection::TestStructExtended>>
        ::sendSignal(
            *this,
            "onTestDerivedStructAttributeAttributeChanged",
            "(sqi)",
            value
    );
}
void TestFreedesktopInterfaceDBusStubAdapterInternal::fireTestDerivedArrayAttributeAttributeChanged(const ::commonapi::tests::DerivedTypeCollection::TestArrayUInt64& value) {
    CommonAPI::DBus::DBusStubSignalHelper<CommonAPI::DBus::DBusSerializableArguments<::commonapi::tests::DerivedTypeCollection::TestArrayUInt64>>
        ::sendSignal(
            *this,
            "onTestDerivedArrayAttributeAttributeChanged",
            "at",
            value
    );
}



const TestFreedesktopInterfaceDBusStubAdapterHelper::StubDispatcherTable& TestFreedesktopInterfaceDBusStubAdapterInternal::getStubDispatcherTable() {
    return stubDispatcherTable_;
}

const CommonAPI::DBus::StubAttributeTable& TestFreedesktopInterfaceDBusStubAdapterInternal::getStubAttributeTable() {
    return stubAttributeTable_;
}

TestFreedesktopInterfaceDBusStubAdapterInternal::TestFreedesktopInterfaceDBusStubAdapterInternal(
        const CommonAPI::DBus::DBusAddress &_address,
        const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection> &_connection,
        const std::shared_ptr<CommonAPI::StubBase> &_stub)
	: CommonAPI::DBus::DBusStubAdapter(_address, _connection,false),
      TestFreedesktopInterfaceDBusStubAdapterHelper(_address, _connection, std::dynamic_pointer_cast<TestFreedesktopInterfaceStub>(_stub), false),
      stubDispatcherTable_({
            { { "getTestPredefinedTypeAttributeAttribute", "" }, &commonapi::tests::TestFreedesktopInterfaceDBusStubAdapterInternal::getTestPredefinedTypeAttributeAttributeStubDispatcher }
            , { { "setTestPredefinedTypeAttributeAttribute", "u" }, &commonapi::tests::TestFreedesktopInterfaceDBusStubAdapterInternal::setTestPredefinedTypeAttributeAttributeStubDispatcher },
            { { "getTestReadonlyAttributeAttribute", "" }, &commonapi::tests::TestFreedesktopInterfaceDBusStubAdapterInternal::getTestReadonlyAttributeAttributeStubDispatcher },
            { { "getTestDerivedStructAttributeAttribute", "" }, &commonapi::tests::TestFreedesktopInterfaceDBusStubAdapterInternal::getTestDerivedStructAttributeAttributeStubDispatcher }
            , { { "setTestDerivedStructAttributeAttribute", "(sqi)" }, &commonapi::tests::TestFreedesktopInterfaceDBusStubAdapterInternal::setTestDerivedStructAttributeAttributeStubDispatcher },
            { { "getTestDerivedArrayAttributeAttribute", "" }, &commonapi::tests::TestFreedesktopInterfaceDBusStubAdapterInternal::getTestDerivedArrayAttributeAttributeStubDispatcher }
            , { { "setTestDerivedArrayAttributeAttribute", "at" }, &commonapi::tests::TestFreedesktopInterfaceDBusStubAdapterInternal::setTestDerivedArrayAttributeAttributeStubDispatcher }
            }),
        stubAttributeTable_() {

    stubDispatcherTable_.insert({ { "getInterfaceVersion", "" }, &commonapi::tests::TestFreedesktopInterfaceDBusStubAdapterInternal::getTestFreedesktopInterfaceInterfaceVersionStubDispatcher });
}

const bool TestFreedesktopInterfaceDBusStubAdapterInternal::hasFreedesktopProperties() {
    return false;
}

} // namespace tests
} // namespace commonapi
} // namespace v1_0