Basic C library for MQTT packet serialization and deserialization

Dependents:   MQTT MQTT MQTT MQTT ... more

Fork of MQTTPacket by MQTT

This library is part of the EclipseTM Paho project; specifically the embedded client.

A basic MQTT library in C for packet serialization and deserialization

Revision:
4:c502573c6016
Parent:
2:bc3bc0e3b764
Child:
5:eea71419676a
--- a/MQTTPacket.h	Thu Apr 10 22:54:14 2014 +0000
+++ b/MQTTPacket.h	Fri Apr 11 23:44:15 2014 +0100
@@ -81,6 +81,7 @@
 #include "MQTTSubscribe.h"
 #include "MQTTUnsubscribe.h"
 
+int MQTTSerialize_ack(char* buf, int buflen, int type, int dup, int packetid);
 int MQTTDeserialize_ack(int* type, int* dup, int* packetid, char* buf, int buflen);
 
 int MQTTPacket_len(int rem_len);
@@ -94,11 +95,9 @@
 void writeChar(char** pptr, char c);
 void writeInt(char** pptr, int anInt);
 int readMQTTLenString(MQTTString* mqttstring, char** pptr, char* enddata);
-void writeCString(char** pptr, char* string);
+void writeCString(char** pptr, const char* string);
 void writeMQTTString(char** pptr, MQTTString mqttstring);
 
-int MQTTPacket_read(char* buf, int buflen, int (*getfn)(char*, int));
-
 #ifdef __cplusplus /* If this is a C++ compiler, use C linkage */
 }
 #endif