--- mqtt/inc/Attic/aitmqtt.h 2011/11/07 13:34:06 1.1.1.1.2.1 +++ mqtt/inc/Attic/aitmqtt.h 2011/11/07 14:01:58 1.1.1.1.2.3 @@ -2,6 +2,8 @@ #define __AITMQTT_H +#define MQTT_DATA_MAX 268435455 + struct mqtthdr { unsigned char mqtt_retain : 1, mqtt_qos : 2, @@ -86,9 +88,16 @@ inline unsigned int mqtt_encodeLen(unsigned int num); /* * mqtt_decodeLen() Decode length from MQTT packet * @len = length + * @n = sizeof bytes, if !=NULL * return: -1 error, >-1 length of message */ -inline unsigned int mqtt_decodeLen(unsigned int len); +inline unsigned int mqtt_decodeLen(unsigned int len, char *n); +/* + * mqtt_sizeLen Return sizeof len field + * @len = length + * return: -1 error, >-1 sizeof len in bytes + */ +inline char mqtt_sizeLen(unsigned int len); #endif