An AirVantage layer for MQTT

Dependencies:   niMQTT picojson

Dependents:   AV_MQTT_example

Revision:
6:b251f6276497
Parent:
0:37b9835622f9
Child:
7:da5d90052cec
diff -r cf6e5a36006f -r b251f6276497 AV_MQTT.h
--- a/AV_MQTT.h	Mon Aug 12 15:33:01 2013 +0000
+++ b/AV_MQTT.h	Tue Aug 13 12:31:37 2013 +0000
@@ -2,16 +2,17 @@
 #define AV_MQTT_H
 
 #include "niMQTT.h"
+#include "picojson.h"
 
-class AV_MQTT {
+class AV_MQTT: public niMQTT {
     public:
-        AV_MQTT(char *server, void (*callback)(char *, char*), char *username="", char *password="",  char *id="mbed", int port=1883, bool debug=false);
+        AV_MQTT(char *server, void (*callback)(const char *, const char*), char *username="", char *password="", char *id="mbed", int port=1883, bool debug=false);
         void pub(char *key, char *value);
-
-    private:
-        niMQTT client;
+        void publish_received();
+    
+    protected:
         char *topic;
-        bool debug;
+        void call_callback(const char *topic, const char *message);
 };
 
-#endif
+#endif
\ No newline at end of file