Merge pull request #69 from fredcadete/master
[profile/ivi/automotive-message-broker.git] / plugins / testplugin / testplugin.h
index 6a638ad..a678196 100644 (file)
@@ -18,10 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */
 
 
-#ifndef OBD2SOURCE_H
-#define OBD2SOURCE_H
-
-
+#ifndef TESTSOURCE_H
+#define TESTSOURCE_H
 
 #include <abstractsource.h>
 #include <string>
@@ -32,16 +30,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 #include <termios.h>
 #include <glib.h>
 
-
-
-
 class TestPlugin : public AbstractSource
 {
 
 public:
        TestPlugin(AbstractRoutingEngine* re, map<string, string> config);
        ~TestPlugin();
-       string uuid();
+       const string uuid();
        int portHandle;
        void getPropertyAsync(AsyncPropertyReply *reply);
        void getRangePropertyAsync(AsyncRangePropertyReply *reply){}
@@ -52,15 +47,27 @@ public:
 
        int supportedOperations();
 
-       void setSupported(PropertyList list);
-       void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, string uuid) {}
-       void supportedChanged(PropertyList) {}
+       void supportedChanged(const PropertyList &) {}
        void setConfiguration(map<string, string> config);
        //void randomizeProperties();
-       void updateProperty(VehicleProperty::Property property,AbstractPropertyType *value);
+       void updateProperty(VehicleProperty::Property property, AbstractPropertyType *value);
+
+       PropertyInfo getPropertyInfo(const VehicleProperty::Property & property);
+       void propertyChanged(AbstractPropertyType *value);
 
 private:
+       bool testCoreSetSupported();
+       bool testCoreUpdateSupported();
+       bool testSetAndGet();
+       bool testSubscription();
+
        PropertyList m_supportedProperties;
+       int subscriptionsToSupportedCounter;
+       int subscriptionsToUnsupportedCounter;
+       int unsubscriptionsToSupportedCounter;
+       int unsubscriptionsToUnsupportedCounter;
+       int propertyChanges;
+       int supportedPropertyChanges;
 };
 
 #endif // OBD2SOURCE_H