Initial import to Git
[profile/ivi/common-api-dbus-runtime.git] / src / test / commonapi / tests / TestInterfaceDBusStubAdapter.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_DBUS_STUB_ADAPTER_H_
5 #define COMMONAPI_TESTS_TEST_INTERFACE_DBUS_STUB_ADAPTER_H_
6
7 #include "TestInterfaceStub.h"
8
9 #include <CommonAPI/DBus/DBusStubAdapterHelper.h>
10 #include <CommonAPI/DBus/DBusFactory.h>
11
12 namespace commonapi {
13 namespace tests {
14
15 typedef CommonAPI::DBus::DBusStubAdapterHelper<TestInterfaceStub> TestInterfaceDBusStubAdapterHelper;
16
17 class TestInterfaceDBusStubAdapter: public TestInterfaceStubAdapter, public TestInterfaceDBusStubAdapterHelper {
18  public:
19     TestInterfaceDBusStubAdapter(
20             const std::string& dbusBusName,
21             const std::string& dbusObjectPath,
22             const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection,
23             const std::shared_ptr<CommonAPI::StubBase>& stub);
24     
25     void fireTestPredefinedTypeAttributeAttributeChanged(const uint32_t& value);
26     void fireTestDerivedStructAttributeAttributeChanged(const DerivedTypeCollection::TestStructExtended& value);
27     void fireTestDerivedArrayAttributeAttributeChanged(const DerivedTypeCollection::TestArrayUInt64& value);
28
29     void fireTestPredefinedTypeBroadcastEvent(const uint32_t& uint32Value, const std::string& stringValue);
30
31  protected:
32     virtual const char* getMethodsDBusIntrospectionXmlData() const;
33 };
34
35 } // namespace tests
36 } // namespace commonapi
37
38 #endif // COMMONAPI_TESTS_TEST_INTERFACE_DBUS_STUB_ADAPTER_H_