ambd: remove redundant code in core
[profile/ivi/automotive-message-broker.git] / lib / propertyinfo.hpp
1 #ifndef PROPERTYINFO_H_
2 #define PROPERTYINFO_H_
3
4 #include "abstractpropertytype.h"
5
6 class PropertyInfo
7 {
8 public:
9
10
11         /** PropertyInfo
12          *
13          **/
14         PropertyInfo(): mUpdateFrequency(0), mIsValid(false) {}
15
16         /** PropertyInfo
17          * @arg updateFrequency
18          * @arg zonesList
19          */
20         PropertyInfo(uint updateFreq, Zone::ZoneList zonesList)
21                 :mUpdateFrequency(updateFreq), mZones(zonesList), mIsValid(true)
22         {
23
24         }
25
26
27         /** updateFrequency
28          * Maximum times per second a property is expected to update.
29          *
30          **/
31         uint updateFrequency()
32         {
33                 return mUpdateFrequency;
34         }
35
36         /** zones
37          * Number of different zones supported by this property.
38          *
39          */
40         Zone::ZoneList zones()
41         {
42                 return mZones;
43         }
44
45         /** isValid
46          * returns whether this PropertyInfo is valid
47          *
48          * default when you construct a PropertyInfo is false
49          **/
50         bool isValid()
51         {
52                 return mIsValid;
53         }
54
55
56         /** invalid()
57          * returns instance of PropertyInfo that isn't valid
58          **/
59         static PropertyInfo invalid()
60         {
61                 return PropertyInfo();
62         }
63
64 private:
65
66         uint mUpdateFrequency;
67         Zone::ZoneList mZones;
68         bool mIsValid;
69 };
70
71
72 #endif