Initial import to Git
[profile/ivi/common-api-dbus-runtime.git] / CommonAPI-DBus / src / test / commonapi / tests / TestInterfaceStub.h
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 #ifndef COMMONAPI_TESTS_TEST_INTERFACE_STUB_H_
5 #define COMMONAPI_TESTS_TEST_INTERFACE_STUB_H_
6
7 #include <unordered_map>
8 #include <cstdint>
9 #include "DerivedTypeCollection.h"
10 #include <CommonAPI/InputStream.h>
11 #include <vector>
12 #include <CommonAPI/OutputStream.h>
13 #include "TestInterface.h"
14 #include <CommonAPI/Stub.h>
15
16 namespace commonapi {
17 namespace tests {
18
19 class TestInterfaceStubAdapter: virtual public CommonAPI::StubAdapter, public TestInterface {
20  public:
21     virtual void fireTestPredefinedTypeAttributeAttributeChanged(const uint32_t& TestPredefinedTypeAttribute) = 0;
22     virtual void fireTestDerivedStructAttributeAttributeChanged(const DerivedTypeCollection::TestStructExtended& TestDerivedStructAttribute) = 0;
23     virtual void fireTestDerivedArrayAttributeAttributeChanged(const DerivedTypeCollection::TestArrayUInt64& TestDerivedArrayAttribute) = 0;
24
25     virtual void fireTestPredefinedTypeBroadcastEvent(const uint32_t& uint32Value, const std::string& stringValue) = 0;
26 };
27
28
29 class TestInterfaceStubRemoteEvent {
30  public:
31     virtual ~TestInterfaceStubRemoteEvent() { }
32
33     virtual bool onRemoteSetTestPredefinedTypeAttributeAttribute(uint32_t TestPredefinedTypeAttribute) = 0;
34     virtual void onRemoteTestPredefinedTypeAttributeAttributeChanged() = 0;
35
36     virtual bool onRemoteSetTestDerivedStructAttributeAttribute(DerivedTypeCollection::TestStructExtended TestDerivedStructAttribute) = 0;
37     virtual void onRemoteTestDerivedStructAttributeAttributeChanged() = 0;
38
39     virtual bool onRemoteSetTestDerivedArrayAttributeAttribute(DerivedTypeCollection::TestArrayUInt64 TestDerivedArrayAttribute) = 0;
40     virtual void onRemoteTestDerivedArrayAttributeAttributeChanged() = 0;
41
42 };
43
44
45 class TestInterfaceStub : public CommonAPI::Stub<TestInterfaceStubAdapter , TestInterfaceStubRemoteEvent> {
46  public:
47     virtual const uint32_t& getTestPredefinedTypeAttributeAttribute() = 0;
48     virtual const DerivedTypeCollection::TestStructExtended& getTestDerivedStructAttributeAttribute() = 0;
49     virtual const DerivedTypeCollection::TestArrayUInt64& getTestDerivedArrayAttributeAttribute() = 0;
50
51     virtual void testVoidPredefinedTypeMethod(uint32_t uint32Value, std::string stringValue) = 0;
52
53     virtual void testPredefinedTypeMethod(uint32_t uint32InValue, std::string stringInValue, uint32_t& uint32OutValue, std::string& stringOutValue) = 0;
54
55     virtual void testVoidDerivedTypeMethod(DerivedTypeCollection::TestEnumExtended2 testEnumExtended2Value, DerivedTypeCollection::TestMap testMapValue) = 0;
56
57     virtual void testDerivedTypeMethod(DerivedTypeCollection::TestEnumExtended2 testEnumExtended2InValue, DerivedTypeCollection::TestMap testMapInValue, DerivedTypeCollection::TestEnumExtended2& testEnumExtended2OutValue, DerivedTypeCollection::TestMap& testMapOutValue) = 0;
58
59 };
60
61 } // namespace tests
62 } // namespace commonapi
63
64 #endif // COMMONAPI_TESTS_TEST_INTERFACE_STUB_H_