MQTTPacket library (clone of https://os.mbed.com/teams/mqtt/code/MQTTPacket/)
Embed:
(wiki syntax)
Show/hide line numbers
MQTTPublish.h
00001 /******************************************************************************* 00002 * Copyright (c) 2014 IBM Corp. 00003 * 00004 * All rights reserved. This program and the accompanying materials 00005 * are made available under the terms of the Eclipse Public License v1.0 00006 * and Eclipse Distribution License v1.0 which accompany this distribution. 00007 * 00008 * The Eclipse Public License is available at 00009 * http://www.eclipse.org/legal/epl-v10.html 00010 * and the Eclipse Distribution License is available at 00011 * http://www.eclipse.org/org/documents/edl-v10.php. 00012 * 00013 * Contributors: 00014 * Ian Craggs - initial API and implementation and/or initial documentation 00015 *******************************************************************************/ 00016 00017 #ifndef MQTTPUBLISH_H_ 00018 #define MQTTPUBLISH_H_ 00019 00020 int MQTTSerialize_publish(unsigned char* buf, int buflen, unsigned char dup, int qos, unsigned char retained, unsigned short packetid, 00021 MQTTString topicName, unsigned char* payload, int payloadlen); 00022 00023 int MQTTDeserialize_publish(unsigned char* dup, int* qos, unsigned char* retained, unsigned short* packetid, MQTTString* topicName, 00024 unsigned char** payload, int* payloadlen, unsigned char* buf, int len); 00025 00026 int MQTTSerialize_puback(unsigned char* buf, int buflen, unsigned short packetid); 00027 int MQTTSerialize_pubrel(unsigned char* buf, int buflen, unsigned char dup, unsigned short packetid); 00028 int MQTTSerialize_pubcomp(unsigned char* buf, int buflen, unsigned short packetid); 00029 00030 #endif /* MQTTPUBLISH_H_ */
Generated on Thu Jul 14 2022 11:12:53 by 1.7.2