fixed some compiler errors. disabled qscript agent
[profile/ivi/automotive-message-broker.git] / plugins / gpsnmea / gpsnmea.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 GPSNMEAPLUGIN_H
20 #define GPSNMEAPLUGIN_H
21
22 #include <abstractsource.h>
23 #include <string>
24
25 #include "abstractio.hpp"
26
27 using namespace std;
28
29 class Location;
30
31 class GpsNmeaSource: public AbstractSource
32 {
33
34 public:
35         GpsNmeaSource(AbstractRoutingEngine* re, map<string, string> config);
36         ~GpsNmeaSource();
37         
38         const string uuid();
39         void getPropertyAsync(AsyncPropertyReply *reply);
40         void getRangePropertyAsync(AsyncRangePropertyReply *reply);
41         AsyncPropertyReply * setProperty(AsyncSetPropertyRequest request);
42         void subscribeToPropertyChanges(VehicleProperty::Property property);
43         void unsubscribeToPropertyChanges(VehicleProperty::Property property);
44         PropertyList supported();
45
46         int supportedOperations();
47         
48         void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, string uuid) {}
49         void supportedChanged(PropertyList) {}
50         
51         PropertyInfo getPropertyInfo(VehicleProperty::Property property)
52         {
53                 if(propertyInfoMap.find(property) != propertyInfoMap.end())
54                         return propertyInfoMap[property];
55
56                 return PropertyInfo::invalid();
57         }
58
59         void canHasData();
60         
61 private:
62
63         void addPropertySupport(VehicleProperty::Property property, Zone::Type zone);
64
65         std::map<VehicleProperty::Property, PropertyInfo> propertyInfoMap;
66
67         PropertyList mRequests;
68         PropertyList mSupported;
69
70         AbstractIo* device;
71         Location *location;
72
73         std::string mUuid;
74 };
75
76 #endif // EXAMPLEPLUGIN_H