summaryrefslogtreecommitdiff
path: root/plugins/dbus/vehicleinfo.h
blob: 16d9a30463486ee2a944f458edd03c963f020539 (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
#ifndef _VEHICLEINFO_H_
#define _VEHICLEINFO_H_


#include "dbusplugin.h"
#include "abstractdbusinterface.h"
#include "abstractroutingengine.h"

/** @interface VehicleId : VehiclePropertyType **/
class VehicleId: public DBusSink
{
public:
	VehicleId(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
		:DBusSink("VehicleId", re, connection, map<string, string>())
	{
		wantPropertyVariant(VehicleProperty::WMI, "WMI", VariantType::Read);
		wantPropertyVariant(VehicleProperty::VIN, "VIN", VariantType::Read);
	}
};

/** @interface Size : VehiclePropertyType **/
class SizeProperty: public DBusSink
{
public:
	SizeProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
		:DBusSink("Size", re, connection, map<string, string>())
	{
		/** @attributeName Width
		 *  @type unsigned long
		 *  @access readonly
		 *  @attributeComment \brief MUST return width of vehicle in mm
		 **/
		wantPropertyVariant(VehicleProperty::VehicleWidth, "Width", VariantType::Read);

		/** @attributeName Height
		 *  @type unsigned long
		 *  @access readonly
		 *  @attributeComment \brief MUST return height of vehicle in mm
		 **/
		wantPropertyVariant(VehicleProperty::VehicleHeight, "Height", VariantType::Read);

		/** @attributeName Length
		 *  @type unsigned long
		 *  @access readonly
		 *  @attributeComment \brief MUST return length of vehicle in mm
		 **/
		wantPropertyVariant(VehicleProperty::VehicleLength, "Length", VariantType::Read);


	}
};

/** @interface FuelInfo : VehiclePropertyType **/
class FuelInfoProperty: public DBusSink
{
public:
	FuelInfoProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
		:DBusSink("FuelInfo", re, connection, map<string, string>())
	{
		wantPropertyVariant(VehicleProperty::FuelType, "Type", VariantType::Read);
		wantPropertyVariant(VehicleProperty::FuelPositionSide, "RefuelPosition", VariantType::Read);
	}
};

/** @interface VehicleType : VehiclePropertyType **/
class VehicleTypeProperty: public DBusSink
{
public:
	VehicleTypeProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
		:DBusSink("VehicleType", re, connection, map<string, string>())
	{
		wantPropertyVariant(VehicleProperty::VehicleType, "Type", VariantType::Read);
	}
};

/** @interface Doors : VehiclePropertyType **/
class DoorsProperty: public DBusSink
{
public:
	DoorsProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
		:DBusSink("Doors", re, connection, map<string, string>())
	{
		wantPropertyVariant(VehicleProperty::DoorsPerRow, "DoorsPerRow", VariantType::Read);
	}
};

/** @interface WheelInformation : VehiclePropertyType **/
class WheelInformationProperty: public DBusSink
{
public:
	WheelInformationProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
		:DBusSink("WheelInformation", re, connection, map<string, string>())
	{
		wantPropertyVariant(VehicleProperty::FrontWheelRadius, "FrontWheelRadius", VariantType::Read);
		wantPropertyVariant(VehicleProperty::RearWheelRadius, "RearWheelRadius", VariantType::Read);
		wantPropertyVariant(VehicleProperty::WheelTrack, "WheelTrack", VariantType::Read);
		wantPropertyVariant(VehicleProperty::AntilockBrakingSystem, "AntilockBrakingSystem", VariantType::Read);
	}
};

#endif