MQTTPacket fixes
Fork of MQTTPacket by
MQTTFormat.h@23:0cfb74c5a621, 2017-10-03 (annotated)
- Committer:
- icraggs
- Date:
- Tue Oct 03 17:02:36 2017 +0000
- Revision:
- 23:0cfb74c5a621
Latest level of Paho code including PUBREL packet (QoS) fix.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
icraggs | 23:0cfb74c5a621 | 1 | /******************************************************************************* |
icraggs | 23:0cfb74c5a621 | 2 | * Copyright (c) 2014 IBM Corp. |
icraggs | 23:0cfb74c5a621 | 3 | * |
icraggs | 23:0cfb74c5a621 | 4 | * All rights reserved. This program and the accompanying materials |
icraggs | 23:0cfb74c5a621 | 5 | * are made available under the terms of the Eclipse Public License v1.0 |
icraggs | 23:0cfb74c5a621 | 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. |
icraggs | 23:0cfb74c5a621 | 7 | * |
icraggs | 23:0cfb74c5a621 | 8 | * The Eclipse Public License is available at |
icraggs | 23:0cfb74c5a621 | 9 | * http://www.eclipse.org/legal/epl-v10.html |
icraggs | 23:0cfb74c5a621 | 10 | * and the Eclipse Distribution License is available at |
icraggs | 23:0cfb74c5a621 | 11 | * http://www.eclipse.org/org/documents/edl-v10.php. |
icraggs | 23:0cfb74c5a621 | 12 | * |
icraggs | 23:0cfb74c5a621 | 13 | * Contributors: |
icraggs | 23:0cfb74c5a621 | 14 | * Ian Craggs - initial API and implementation and/or initial documentation |
icraggs | 23:0cfb74c5a621 | 15 | *******************************************************************************/ |
icraggs | 23:0cfb74c5a621 | 16 | |
icraggs | 23:0cfb74c5a621 | 17 | #if !defined(MQTTFORMAT_H) |
icraggs | 23:0cfb74c5a621 | 18 | #define MQTTFORMAT_H |
icraggs | 23:0cfb74c5a621 | 19 | |
icraggs | 23:0cfb74c5a621 | 20 | #define MQTT_CLIENT |
icraggs | 23:0cfb74c5a621 | 21 | #define MQTT_SERVER |
icraggs | 23:0cfb74c5a621 | 22 | |
icraggs | 23:0cfb74c5a621 | 23 | #include "StackTrace.h" |
icraggs | 23:0cfb74c5a621 | 24 | #include "MQTTPacket.h" |
icraggs | 23:0cfb74c5a621 | 25 | |
icraggs | 23:0cfb74c5a621 | 26 | const char* MQTTPacket_getName(unsigned short packetid); |
icraggs | 23:0cfb74c5a621 | 27 | int MQTTStringFormat_connect(char* strbuf, int strbuflen, MQTTPacket_connectData* data); |
icraggs | 23:0cfb74c5a621 | 28 | int MQTTStringFormat_connack(char* strbuf, int strbuflen, unsigned char connack_rc, unsigned char sessionPresent); |
icraggs | 23:0cfb74c5a621 | 29 | int MQTTStringFormat_publish(char* strbuf, int strbuflen, unsigned char dup, int qos, unsigned char retained, |
icraggs | 23:0cfb74c5a621 | 30 | unsigned short packetid, MQTTString topicName, unsigned char* payload, int payloadlen); |
icraggs | 23:0cfb74c5a621 | 31 | int MQTTStringFormat_ack(char* strbuf, int strbuflen, unsigned char packettype, unsigned char dup, unsigned short packetid); |
icraggs | 23:0cfb74c5a621 | 32 | int MQTTStringFormat_subscribe(char* strbuf, int strbuflen, unsigned char dup, unsigned short packetid, int count, |
icraggs | 23:0cfb74c5a621 | 33 | MQTTString topicFilters[], int requestedQoSs[]); |
icraggs | 23:0cfb74c5a621 | 34 | int MQTTStringFormat_suback(char* strbuf, int strbuflen, unsigned short packetid, int count, int* grantedQoSs); |
icraggs | 23:0cfb74c5a621 | 35 | int MQTTStringFormat_unsubscribe(char* strbuf, int strbuflen, unsigned char dup, unsigned short packetid, |
icraggs | 23:0cfb74c5a621 | 36 | int count, MQTTString topicFilters[]); |
icraggs | 23:0cfb74c5a621 | 37 | char* MQTTFormat_toClientString(char* strbuf, int strbuflen, unsigned char* buf, int buflen); |
icraggs | 23:0cfb74c5a621 | 38 | char* MQTTFormat_toServerString(char* strbuf, int strbuflen, unsigned char* buf, int buflen); |
icraggs | 23:0cfb74c5a621 | 39 | |
icraggs | 23:0cfb74c5a621 | 40 | #endif |