Addition of test plugin to test Map and List types, and Map and List fromVariant...
[profile/ivi/automotive-message-broker.git] / plugins / testplugin / testplugin.h
1
2 /*
3 Copyright (C) 2012 Intel Corporation
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
18 */
19
20
21 #ifndef OBD2SOURCE_H
22 #define OBD2SOURCE_H
23
24
25
26 #include <abstractsource.h>
27 #include <string>
28 #include <sstream>
29 #include <sys/types.h>
30 #include <sys/stat.h>
31 #include <fcntl.h>
32 #include <termios.h>
33 #include <glib.h>
34
35
36
37
38 class TestPlugin : public AbstractSource
39 {
40
41 public:
42         TestPlugin(AbstractRoutingEngine* re, map<string, string> config);
43         ~TestPlugin();
44         string uuid();
45         int portHandle;
46         void getPropertyAsync(AsyncPropertyReply *reply);
47         void getRangePropertyAsync(AsyncRangePropertyReply *reply){}
48         AsyncPropertyReply * setProperty(AsyncSetPropertyRequest request);
49         void subscribeToPropertyChanges(VehicleProperty::Property property);
50         void unsubscribeToPropertyChanges(VehicleProperty::Property property);
51         PropertyList supported();
52
53         int supportedOperations();
54
55         void setSupported(PropertyList list);
56         void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, string uuid) {}
57         void supportedChanged(PropertyList) {}
58         void setConfiguration(map<string, string> config);
59         //void randomizeProperties();
60         void updateProperty(VehicleProperty::Property property,AbstractPropertyType *value);
61
62 private:
63         PropertyList m_supportedProperties;
64 };
65
66 #endif // OBD2SOURCE_H