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/. */
5 #ifndef DEMO_POSITIONING_H_
6 #define DEMO_POSITIONING_H_
9 #include <common-api-dbus/dbus-serializable-struct.h>
18 struct TestStruct: public common::api::dbus::SerializableStruct {
19 TestStruct() = default;
20 TestStruct(const uint32_t& fromIntValue, const double& fromDoubleValue);
22 virtual common::api::dbus::DBusInputMessageStream& readFromDBusInputMessageStream(
23 common::api::dbus::DBusInputMessageStream& inputMessageStream);
25 virtual common::api::dbus::DBusOutputMessageStream& writeToDBusOutputMessageStream(
26 common::api::dbus::DBusOutputMessageStream& outputMessageStream) const;
33 struct TestStructExtended: public TestStruct {
34 TestStructExtended() = default;
36 TestStructExtended(const uint32_t& fromIntValue, const double& fromDoubleValue, const std::string& fromStringValue);
38 virtual common::api::dbus::DBusInputMessageStream& readFromDBusInputMessageStream(
39 common::api::dbus::DBusInputMessageStream& inputMessageStream);
41 virtual common::api::dbus::DBusOutputMessageStream& writeToDBusOutputMessageStream(
42 common::api::dbus::DBusOutputMessageStream& outputMessageStream) const;
44 std::string stringValue;
48 typedef std::vector<TestStruct> TestStructArray;
49 typedef std::vector<TestStructExtended> TestStructExtendedArray;
57 struct Alignment<common::api::test::TestStruct>: SizeConstant<8> { };
60 struct Alignment<common::api::test::TestStructExtended>: SizeConstant<8> { };
66 #endif /* DEMO_POSITIONING_H_ */