reverted varianttype
[profile/ivi/automotive-message-broker.git] / plugins / dbus / runningstatus.h
1 /*
2         Copyright (C) 2012  Intel Corporation
3
4         This library is free software; you can redistribute it and/or
5         modify it under the terms of the GNU Lesser General Public
6         License as published by the Free Software Foundation; either
7         version 2.1 of the License, or (at your option) any later version.
8
9         This library is distributed in the hope that it will be useful,
10         but WITHOUT ANY WARRANTY; without even the implied warranty of
11         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12         Lesser General Public License for more details.
13
14         You should have received a copy of the GNU Lesser General Public
15         License along with this library; if not, write to the Free Software
16         Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
17 */
18
19 #ifndef _PROPERTIES_H_H_H_
20 #define _PROPERTIES_H_H_H_
21
22 #include "dbusplugin.h"
23 #include "abstractdbusinterface.h"
24 #include "abstractroutingengine.h"
25
26 /** @interface VehicleSpeed : VehiclePropertyType **/
27 class VehicleSpeedProperty: public DBusSink
28 {
29 public:
30         VehicleSpeedProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
31                 :DBusSink("VehicleSpeed", re, connection, map<string, string>())
32         {
33                 wantPropertyVariant(VehicleProperty::VehicleSpeed, "Speed",  VariantType::Read);
34         }
35 };
36
37 /** @interface EngineSpeed : VehiclePropertyType **/
38 class EngineSpeedProperty: public DBusSink
39 {
40 public:
41         EngineSpeedProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
42                 :DBusSink("EngineSpeed", re, connection, map<string, string>())
43         {
44                 wantPropertyVariant(VehicleProperty::EngineSpeed, "Speed", VariantType::Read);
45         }
46 };
47
48 /** @interface VehiclePowerMode : VehiclePropertyType **/
49 class VehiclePowerModeProperty: public DBusSink
50 {
51 public:
52         VehiclePowerModeProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
53                 :DBusSink("VehiclePowerMode", re, connection, map<string, string>())
54         {
55                 wantPropertyVariant(VehicleProperty::VehiclePowerMode, "VehiclePowerMode",VariantType::Read);
56         }
57 };
58
59 /** @interface TripMeter : VehiclePropertyType **/
60 class TripMeterProperty: public DBusSink
61 {
62 public:
63         TripMeterProperty(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
64         :DBusSink("TripMeter", re, connection, map<string, string>())
65         {
66                 wantPropertyVariant(VehicleProperty::TripMeters, "TripMeters", VariantType::ReadWrite);
67         }
68 };
69
70 /** @interface Acceleration : VehiclePropertyType **/
71 class AccelerationProperty: public DBusSink
72 {
73 public:
74         AccelerationProperty(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
75         :DBusSink("Acceleration", re, connection, map<string, string>())
76         {
77                 wantPropertyVariant(VehicleProperty::AccelerationX, "X", VariantType::Read);
78                 wantPropertyVariant(VehicleProperty::AccelerationY, "Y", VariantType::Read);
79                 wantPropertyVariant(VehicleProperty::AccelerationZ, "Z", VariantType::Read);
80         }
81 };
82
83 /** @interface Transmission : VehiclePropertyType **/
84 class TransmissionProperty: public DBusSink
85 {
86 public:
87         TransmissionProperty(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
88         :DBusSink("Transmission", re, connection, map<string, string>())
89         {
90                 wantPropertyVariant(VehicleProperty::TransmissionShiftPosition, "ShiftPosition", VariantType::Read);
91                 wantPropertyVariant(VehicleProperty::TransmissionGearPosition, "GearPosition", VariantType::Read);
92                 wantPropertyVariant(VehicleProperty::TransmissionGearPosition, "Gear", VariantType::Read);
93                 wantPropertyVariant(VehicleProperty::TransmissionModeW3C, "Mode", VariantType::Read);
94                 wantPropertyVariant(VehicleProperty::TransmissionGearType, "Type", VariantType::Read);
95         }
96 };
97
98 /** @interface CruiseControlStatus : VehiclePropertyType **/
99 class CruiseControlProperty: public DBusSink
100 {
101 public:
102         CruiseControlProperty(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
103         :DBusSink("CruiseControlStatus", re, connection, map<string, string>())
104         {
105                 wantPropertyVariant(VehicleProperty::CruiseControlSpeed, "Speed", VariantType::Read);
106                 wantPropertyVariant(VehicleProperty::CruiseControlActive, "Status", VariantType::Read);
107         }
108 };
109
110 /** @interface WheelBrake : VehiclePropertyType **/
111 class BrakeOperation: public DBusSink
112 {
113 public:
114         BrakeOperation(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
115                 :DBusSink("BrakeOperation", re, connection, map<string, string>())
116         {
117                 wantPropertyVariant(VehicleProperty::WheelBrake, "BrakePedalDepressed", VariantType::Read);
118         }
119 };
120
121 /** @interface LightStatus : VehiclePropertyType **/
122 class LightStatusProperty: public DBusSink
123 {
124 public:
125         LightStatusProperty(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
126                 :DBusSink("LightStatus", re, connection, map<string, string>())
127         {
128                 wantPropertyVariant(VehicleProperty::LightHead, "Head", VariantType::ReadWrite);
129                 wantPropertyVariant(VehicleProperty::LightRightTurn, "RightTurn", VariantType::ReadWrite);
130                 wantPropertyVariant(VehicleProperty::LightLeftTurn, "LeftTurn", VariantType::ReadWrite);
131                 wantPropertyVariant(VehicleProperty::LightBrake, "Brake", VariantType::ReadWrite);
132                 wantPropertyVariant(VehicleProperty::LightFog, "Fog", VariantType::ReadWrite);
133                 wantPropertyVariant(VehicleProperty::LightHazard, "Hazard", VariantType::ReadWrite);
134                 wantPropertyVariant(VehicleProperty::LightParking, "Parking", VariantType::ReadWrite);
135                 wantPropertyVariant(VehicleProperty::LightHighBeam, "HighBeam", VariantType::ReadWrite);
136                 wantPropertyVariant(VehicleProperty::LightAutomatic, "AutomaticHeadlights", VariantType::ReadWrite);
137                 wantPropertyVariant(VehicleProperty::LightDynamicHighBeam, "DynamicHighBeam", VariantType::ReadWrite);
138         }
139 };
140
141 class InteriorLightStatusProperty: public DBusSink
142 {
143 public:
144         InteriorLightStatusProperty(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
145                 :DBusSink("InteriorLightStatus", re, connection, map<string, string>())
146         {
147                 wantPropertyVariant(VehicleProperty::InteriorLightStatus, "Status", VariantType::ReadWrite);
148         }
149 };
150
151 /** @interface Horn : VehiclePropertyType **/
152 class HornProperty: public DBusSink
153 {
154 public:
155         HornProperty(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
156                 :DBusSink("Horn", re, connection, map<string, string>())
157         {
158                 wantPropertyVariant(VehicleProperty::Horn, "Status", VariantType::Read);
159         }
160 };
161
162 /** @interface Fuel : VehiclePropertyType **/
163 class FuelProperty: public DBusSink
164 {
165 public:
166         FuelProperty(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
167                 :DBusSink("Fuel", re, connection, map<string, string>())
168         {
169                 wantPropertyVariant(VehicleProperty::FuelLevel, "Level", VariantType::Read);
170                 wantPropertyVariant(VehicleProperty::FuelRange, "Range", VariantType::Read);
171                 wantPropertyVariant(VehicleProperty::FuelConsumption, "InstantConsumption", VariantType::Read);
172                 wantPropertyVariant(VehicleProperty::FuelEconomy, "InstantEconomy", VariantType::Read);
173                 wantPropertyVariant(VehicleProperty::FuelAverageEconomy, "AverageEconomy", VariantType::ReadWrite);
174                 wantPropertyVariant(VehicleProperty::FuelAverageConsumption, "AverageConsumption", VariantType::ReadWrite);
175                 wantPropertyVariant(VehicleProperty::FuelConsumptionSinceRestart, "FuelConsumedSinceRestart", VariantType::ReadWrite);
176                 wantPropertyVariant(VehicleProperty::FuelTimeSinceRestart, "TimeSinceRestart", VariantType::ReadWrite);
177         }
178 };
179
180 /** @interface EngineOil : VehiclePropertyType **/
181 class EngineOilProperty: public DBusSink
182 {
183 public:
184         EngineOilProperty(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
185                         :DBusSink("EngineOil", re, connection, map<string, string>())
186         {
187                 wantPropertyVariant(VehicleProperty::EngineOilRemaining, "Level", VariantType::Read);
188                 wantPropertyVariant(VehicleProperty::EngineOilTemperature, "Temperature", VariantType::Read);
189                 wantPropertyVariant(VehicleProperty::EngineOilPressure, "Pressure", VariantType::Read);
190                 wantPropertyVariant(VehicleProperty::EngineOilChangeIndicator, "Change", VariantType::Read);
191                 wantPropertyVariant(VehicleProperty::EngineOilLifeRemaining, "LifeRemaining", VariantType::Read);
192         }
193 };
194
195 /** @interface Location : VehiclePropertyType **/
196 class LocationProperty: public DBusSink
197 {
198 public:
199         LocationProperty(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
200                         :DBusSink("Location", re, connection, map<string, string>())
201         {
202                 wantPropertyVariant(VehicleProperty::Latitude, "Latitude", VariantType::Read);
203                 wantPropertyVariant(VehicleProperty::Longitude, "Longitude", VariantType::Read);
204                 wantPropertyVariant(VehicleProperty::Altitude, "Altitude", VariantType::Read);
205                 wantPropertyVariant(VehicleProperty::Direction, "Direction", VariantType::Read);
206
207         }
208 };
209
210 class SteeringWheel: public DBusSink
211 {
212 public:
213         SteeringWheel(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
214                         :DBusSink("SteeringWheel", re, connection, map<string, string>())
215         {
216                 wantPropertyVariant(VehicleProperty::SteeringWheelAngleW3C, "Angle", VariantType::Read);
217         }
218 };
219
220 class ThrottlePosition: public DBusSink
221 {
222 public:
223         ThrottlePosition(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
224                         :DBusSink("ThrottlePosition", re, connection, map<string, string>())
225         {
226                 wantPropertyVariant(VehicleProperty::ThrottlePosition, "Value", VariantType::Read);
227         }
228 };
229
230 class NightMode: public DBusSink
231 {
232 public:
233         NightMode(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
234                         :DBusSink("NightMode", re, connection, map<string, string>())
235         {
236                 wantPropertyVariant(VehicleProperty::NightMode, "NightMode", VariantType::Read);
237                 wantPropertyVariant(VehicleProperty::NightMode, "Mode", VariantType::Read);
238         }
239 };
240
241 class DrivingMode: public DBusSink
242 {
243 public:
244         DrivingMode(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
245                         :DBusSink("DrivingMode", re, connection, map<string, string>())
246         {
247                 wantPropertyVariant(VehicleProperty::DrivingMode, "DrivingMode", VariantType::Read);
248                 wantPropertyVariant(VehicleProperty::DrivingModeW3C, "Mode", VariantType::Read);
249         }
250 };
251
252 class PowertrainTorque: public DBusSink
253 {
254 public:
255         PowertrainTorque(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
256                         :DBusSink("PowertrainTorque", re, connection, map<string, string>())
257         {
258                 wantPropertyVariant(VehicleProperty::PowertrainTorque, "Value", VariantType::Read);
259         }
260 };
261
262 class AcceleratorPedalPosition: public DBusSink
263 {
264 public:
265         AcceleratorPedalPosition(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
266                         :DBusSink("AcceleratorPedalPosition", re, connection, map<string, string>())
267         {
268                 wantPropertyVariant(VehicleProperty::AcceleratorPedalPosition, "Value", VariantType::Read);
269         }
270 };
271
272 class Chime: public DBusSink
273 {
274 public:
275         Chime(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
276                         :DBusSink("Chime", re, connection, map<string, string>())
277         {
278                 wantPropertyVariant(VehicleProperty::Chime, "Status", VariantType::Read);
279         }
280 };
281
282 class WheelTick: public DBusSink
283 {
284 public:
285         WheelTick(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
286                         :DBusSink("WheelTick", re, connection, map<string, string>())
287         {
288                 wantPropertyVariant(VehicleProperty::WheelTick, "Value", VariantType::Read);
289         }
290 };
291
292 class IgnitionTime: public DBusSink
293 {
294 public:
295         IgnitionTime(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
296                         :DBusSink("IgnitionTime", re, connection, map<string, string>())
297         {
298                 wantPropertyVariant(VehicleProperty::IgnitionTimeOn, "IgnitionTimeOn", VariantType::Read);
299                 wantPropertyVariant(VehicleProperty::IgnitionTimeOff, "IgnitionTimeOff", VariantType::Read);
300         }
301 };
302
303 class YawRate: public DBusSink
304 {
305 public:
306         YawRate(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
307                         :DBusSink("YawRate", re, connection, map<string, string>())
308         {
309                 wantPropertyVariant(VehicleProperty::YawRate, "Value", VariantType::Read);
310         }
311 };
312
313 class ButtonEvent: public DBusSink
314 {
315 public:
316         ButtonEvent(VehicleProperty::Property, AbstractRoutingEngine *re, GDBusConnection *connection)
317                         :DBusSink("ButtonEvent", re, connection, map<string, string>())
318         {
319                 wantPropertyVariant(VehicleProperty::YawRate, "Value", VariantType::Read);
320         }
321 };
322
323 #endif