[dbus] add overload 'value' for custom dbus property types
[profile/ivi/automotive-message-broker.git] / plugins / dbus / vehicleinfo.h
1 #ifndef _VEHICLEINFO_H_
2 #define _VEHICLEINFO_H_
3
4
5 #include "dbusplugin.h"
6 #include "abstractdbusinterface.h"
7 #include "abstractroutingengine.h"
8
9 /** @interface VehicleId : VehiclePropertyType **/
10 class VehicleId: public DBusSink
11 {
12 public:
13         VehicleId(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
14                 :DBusSink("VehicleId", re, connection, map<string, string>())
15         {
16                 wantPropertyVariant(VehicleProperty::WMI, "WMI", VariantType::Read);
17                 wantPropertyVariant(VehicleProperty::VIN, "VIN", VariantType::Read);
18         }
19 };
20
21 /** @interface Size : VehiclePropertyType **/
22 class SizeProperty: public DBusSink
23 {
24 public:
25         SizeProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
26                 :DBusSink("Size", re, connection, map<string, string>())
27         {
28                 /** @attributeName Width
29                  *  @type unsigned long
30                  *  @access readonly
31                  *  @attributeComment \brief MUST return width of vehicle in mm
32                  **/
33                 wantPropertyVariant(VehicleProperty::VehicleWidth, "Width", VariantType::Read);
34
35                 /** @attributeName Height
36                  *  @type unsigned long
37                  *  @access readonly
38                  *  @attributeComment \brief MUST return height of vehicle in mm
39                  **/
40                 wantPropertyVariant(VehicleProperty::VehicleHeight, "Height", VariantType::Read);
41
42                 /** @attributeName Length
43                  *  @type unsigned long
44                  *  @access readonly
45                  *  @attributeComment \brief MUST return length of vehicle in mm
46                  **/
47                 wantPropertyVariant(VehicleProperty::VehicleLength, "Length", VariantType::Read);
48
49
50         }
51 };
52
53 /** @interface FuelInfo : VehiclePropertyType **/
54 class FuelInfoProperty: public DBusSink
55 {
56 public:
57         FuelInfoProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
58                 :DBusSink("FuelInfo", re, connection, map<string, string>())
59         {
60                 wantPropertyVariant(VehicleProperty::FuelType, "Type", VariantType::Read);
61                 wantPropertyVariant(VehicleProperty::FuelPositionSide, "RefuelPosition", VariantType::Read);
62         }
63 };
64
65 /** @interface VehicleType : VehiclePropertyType **/
66 class VehicleTypeProperty: public DBusSink
67 {
68 public:
69         VehicleTypeProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
70                 :DBusSink("VehicleType", re, connection, map<string, string>())
71         {
72                 wantPropertyVariant(VehicleProperty::VehicleType, "Type", VariantType::Read);
73         }
74 };
75
76 /** @interface Doors : VehiclePropertyType **/
77 class DoorsProperty: public DBusSink
78 {
79 public:
80         DoorsProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
81                 :DBusSink("Doors", re, connection, map<string, string>())
82         {
83                 wantPropertyVariant(VehicleProperty::DoorsPerRow, "DoorsPerRow", VariantType::Read);
84         }
85 };
86
87 /** @interface WheelInformation : VehiclePropertyType **/
88 class WheelInformationProperty: public DBusSink
89 {
90 public:
91         WheelInformationProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
92                 :DBusSink("WheelInformation", re, connection, map<string, string>())
93         {
94                 wantPropertyVariant(VehicleProperty::FrontWheelRadius, "FrontWheelRadius", VariantType::Read);
95                 wantPropertyVariant(VehicleProperty::RearWheelRadius, "RearWheelRadius", VariantType::Read);
96                 wantPropertyVariant(VehicleProperty::WheelTrack, "WheelTrack", VariantType::Read);
97                 wantPropertyVariant(VehicleProperty::AntilockBrakingSystem, "AntilockBrakingSystem", VariantType::Read);
98         }
99 };
100
101 #endif