3 Copyright (C) 2012 Intel Corporation
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.
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.
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
24 #include <abstractsource.h>
27 #include <sys/types.h>
33 class TestPlugin : public AbstractSource
37 TestPlugin(AbstractRoutingEngine* re, map<string, string> config);
41 void getPropertyAsync(AsyncPropertyReply *reply);
42 void getRangePropertyAsync(AsyncRangePropertyReply *reply){}
43 AsyncPropertyReply * setProperty(AsyncSetPropertyRequest request);
44 void subscribeToPropertyChanges(VehicleProperty::Property property);
45 void unsubscribeToPropertyChanges(VehicleProperty::Property property);
46 PropertyList supported();
48 int supportedOperations();
50 void supportedChanged(const PropertyList &) {}
51 void setConfiguration(map<string, string> config);
52 //void randomizeProperties();
53 void updateProperty(VehicleProperty::Property property, AbstractPropertyType *value);
55 PropertyInfo getPropertyInfo(const VehicleProperty::Property & property);
56 void propertyChanged(AbstractPropertyType *value);
59 bool testCoreSetSupported();
60 bool testCoreUpdateSupported();
62 bool testSubscription();
64 PropertyList m_supportedProperties;
65 int subscriptionsToSupportedCounter;
66 int subscriptionsToUnsupportedCounter;
67 int unsubscriptionsToSupportedCounter;
68 int unsubscriptionsToUnsupportedCounter;
70 int supportedPropertyChanges;
73 #endif // OBD2SOURCE_H