The Cayenne MQTT mbed Library provides functions to easily connect to the Cayenne IoT project builder.

Fork of Cayenne-MQTT-mbed by myDevicesIoT

Branch:
feature/multivalue
Revision:
22:0dbabcc6e7b2
Parent:
0:09ef59d2d0f7
--- a/src/MQTTCommon/MQTTPublish.h	Tue Nov 08 18:48:37 2016 -0700
+++ b/src/MQTTCommon/MQTTPublish.h	Wed Jan 25 10:34:16 2017 -0700
@@ -25,14 +25,14 @@
   #define DLLExport
 #endif
 
-DLLExport int MQTTSerialize_publish(unsigned char* buf, int buflen, unsigned char dup, int qos, unsigned char retained, unsigned short packetid,
-		MQTTString topicName, unsigned char* payload, int payloadlen);
+DLLExport int MQTTSerialize_publish(unsigned char* buf, size_t buflen, unsigned char dup, int qos, unsigned char retained, unsigned short packetid,
+		MQTTString topicName, unsigned char* payload, size_t payloadlen);
 
 DLLExport int MQTTDeserialize_publish(unsigned char* dup, int* qos, unsigned char* retained, unsigned short* packetid, MQTTString* topicName,
-		unsigned char** payload, int* payloadlen, unsigned char* buf, int len);
+		unsigned char** payload, size_t* payloadlen, unsigned char* buf, size_t len);
 
-DLLExport int MQTTSerialize_puback(unsigned char* buf, int buflen, unsigned short packetid);
-DLLExport int MQTTSerialize_pubrel(unsigned char* buf, int buflen, unsigned char dup, unsigned short packetid);
-DLLExport int MQTTSerialize_pubcomp(unsigned char* buf, int buflen, unsigned short packetid);
+DLLExport int MQTTSerialize_puback(unsigned char* buf, size_t buflen, unsigned short packetid);
+DLLExport int MQTTSerialize_pubrel(unsigned char* buf, size_t buflen, unsigned char dup, unsigned short packetid);
+DLLExport int MQTTSerialize_pubcomp(unsigned char* buf, size_t buflen, unsigned short packetid);
 
 #endif /* MQTTPUBLISH_H_ */