4fec8c7b35d5f398115ca574eb4fcf4eeccfad1f
[profile/ivi/automotive-message-broker.git] / plugins / dbus / drivingsafety.h
1 #ifndef DRIVINGSAFETY_H_
2 #define DRIVINGSAFETY_H_
3
4 #include "dbusplugin.h"
5 #include "abstractdbusinterface.h"
6 #include "abstractroutingengine.h"
7
8 class AntilockBrakingSystemProperty: public DBusSink
9 {
10 public:
11         AntilockBrakingSystemProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
12                 :DBusSink("AntilockBrakingSystem", re, connection, map<string, string>())
13         {
14                 /// TODO: Deprecated.  Remove in 0.14
15                 wantPropertyVariant(VehicleProperty::AntilockBrakingSystem, "AntilockBrakingSystem", AbstractProperty::Read);
16                 wantPropertyVariant(VehicleProperty::AntilockBrakingSystem, "Engaged", AbstractProperty::Read);
17                 wantPropertyVariant(VehicleProperty::AntilockBrakingSystemEnabled, "Enabled", AbstractProperty::Read);
18         }
19 };
20
21 class TractionControlSystemProperty: public DBusSink
22 {
23 public:
24         TractionControlSystemProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
25                 :DBusSink("TractionControlSystem", re, connection, map<string, string>())
26         {
27                 /// TODO: Deprecated.  Remove in 0.14
28                 wantPropertyVariant(VehicleProperty::TractionControlSystem, "TractionControlSystem", AbstractProperty::Read);
29                 wantPropertyVariant(VehicleProperty::TractionControlSystemEnabled, "Enabled", AbstractProperty::Read);
30                 wantPropertyVariant(VehicleProperty::TractionControlSystem, "Engaged", AbstractProperty::Read);
31         }
32 };
33
34
35 class VehicleTopSpeedLimitProperty: public DBusSink
36 {
37 public:
38         VehicleTopSpeedLimitProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
39                 :DBusSink("VehicleTopSpeedLimit", re, connection, map<string, string>())
40         {
41                 /// TODO: Deprecated.  Remove in 0.14
42                 wantPropertyVariant(VehicleProperty::VehicleTopSpeedLimit, "VehicleTopSpeedLimit", AbstractProperty::Read);
43                 wantPropertyVariant(VehicleProperty::VehicleTopSpeedLimit, "Speed", AbstractProperty::Read);
44         }
45 };
46
47 class AirbagStatusProperty: public DBusSink
48 {
49 public:
50         AirbagStatusProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
51                 :DBusSink("AirbagStatus", re, connection, map<string, string>())
52         {
53                 /// TODO: Deprecated in 0.14
54                 wantPropertyVariant(VehicleProperty::AirbagStatus, "AirbagStatus", AbstractProperty::Read);
55                 wantPropertyVariant(VehicleProperty::AirbagActivated, "AirbagActivated", AbstractProperty::Read);
56                 wantPropertyVariant(VehicleProperty::AirbagDeployed, "AirbagDeployed", AbstractProperty::Read);
57         }
58 };
59
60 /// TODO: deprecated. remove in 0.14
61 class DoorStatusProperty: public DBusSink
62 {
63 public:
64         DoorStatusProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
65                 :DBusSink("DoorStatus", re, connection, map<string, string>())
66         {
67
68                 wantPropertyVariant(VehicleProperty::DoorStatus, "DoorStatus", AbstractProperty::Read);
69
70                 wantPropertyVariant(VehicleProperty::DoorLockStatus, "DoorLockStatus", AbstractProperty::Read);
71
72                 ///TODO: Deprecated in 0.14
73                 wantPropertyVariant(VehicleProperty::ChildLockStatus, "ChildLockStatus", AbstractProperty::Read);
74         }
75 };
76
77 class DoorProperty: public DBusSink
78 {
79 public:
80         DoorProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
81                 :DBusSink("Door", re, connection, map<string, string>())
82         {
83
84                 wantPropertyVariant(VehicleProperty::DoorStatusW3C, "Status", AbstractProperty::Read);
85
86                 wantPropertyVariant(VehicleProperty::DoorLockStatus, "Lock", AbstractProperty::ReadWrite);
87
88                 ///TODO: Deprecated in 0.14
89                 wantPropertyVariant(VehicleProperty::ChildLockStatus, "ChildLock", AbstractProperty::Read);
90         }
91 };
92
93 /// TODO: Deprecated in 0.14
94 class SeatBeltStatusProperty: public DBusSink
95 {
96 public:
97         SeatBeltStatusProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
98                 :DBusSink("SeatBelt", re, connection, map<string, string>())
99         {
100                 wantPropertyVariant(VehicleProperty::SeatBeltStatus, "Status", AbstractProperty::Read);
101         }
102 };
103
104 /// TODO: Deprecated in 0.14
105 class OccupantStatusProperty: public DBusSink
106 {
107 public:
108         OccupantStatusProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
109                 :DBusSink("OccupantStatus", re, connection, map<string, string>())
110         {
111                 wantPropertyVariant(VehicleProperty::OccupantStatus, "OccupantStatus", AbstractProperty::Read);
112         }
113 };
114
115 class ObstacleDistanceProperty: public DBusSink
116 {
117 public:
118         ObstacleDistanceProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
119                 :DBusSink("ObstacleDistance", re, connection, map<string, string>())
120         {
121                 wantPropertyVariant(VehicleProperty::ObstacleDistance, "ObstacleDistance", AbstractProperty::Read);
122         }
123 };
124
125 class ElectronicStabilityControl: public DBusSink
126 {
127 public:
128         ElectronicStabilityControl(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
129                 :DBusSink("ElectronicStabilityControl", re, connection, map<string, string>())
130         {
131                 wantPropertyVariant(VehicleProperty::ElectronicStabilityControlEnabled, "Enabled", AbstractProperty::Read);
132                 wantPropertyVariant(VehicleProperty::ElectronicStabilityControlEngaged, "Engaged", AbstractProperty::Read);
133         }
134 };
135
136 class ChildSafetyLock: public DBusSink
137 {
138 public:
139         ChildSafetyLock(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
140                 :DBusSink("ChildSafetyLock", re, connection, map<string, string>())
141         {
142                 wantPropertyVariant(VehicleProperty::ChildLockStatus, "Lock", AbstractProperty::ReadWrite);
143         }
144 };
145
146 class SeatProperty: public DBusSink
147 {
148 public:
149         SeatProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
150                 :DBusSink("Seat", re, connection, map<string, string>())
151         {
152                 wantPropertyVariant(VehicleProperty::OccupantStatusW3C, "Occupant", AbstractProperty::ReadWrite);
153                 wantPropertyVariant(VehicleProperty::SeatBeltStatus, "SeatBelt", AbstractProperty::ReadWrite);
154                 wantPropertyVariant(VehicleProperty::OccupantName, "OccupantName", AbstractProperty::ReadWrite);
155                 wantPropertyVariant(VehicleProperty::OccupantIdentificationType, "IdentificationType", AbstractProperty::ReadWrite);
156         }
157 };
158
159 #endif
160