V.06 11/3

Dependencies:   FT6206 SDFileSystem SPI_TFT_ILI9341 TFT_fonts

Fork of ATT_AWS_IoT_demo by attiot

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers MQTTPublish.h Source File

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  *    Xiang Rong - 442039 Add makefile to Embedded C client
00016  *******************************************************************************/
00017 
00018 #ifndef MQTTPUBLISH_H_
00019 #define MQTTPUBLISH_H_
00020 
00021 #if !defined(DLLImport)
00022   #define DLLImport 
00023 #endif
00024 #if !defined(DLLExport)
00025   #define DLLExport
00026 #endif
00027 
00028 #include "MQTTMessage.h"
00029 
00030 DLLExport MQTTReturnCode MQTTSerialize_publish(unsigned char *buf, size_t buflen, uint8_t dup,
00031                                                QoS qos, uint8_t retained, uint16_t packetid,
00032                                                MQTTString topicName, unsigned char *payload, size_t payloadlen,
00033                                                uint32_t *serialized_len);
00034 
00035 DLLExport MQTTReturnCode MQTTDeserialize_publish(unsigned char *dup, QoS *qos,
00036                                                  unsigned char *retained, uint16_t *packetid,
00037                                                  MQTTString* topicName, unsigned char **payload,
00038                                                  uint32_t *payloadlen, unsigned char *buf, size_t buflen);
00039 
00040 DLLExport MQTTReturnCode MQTTSerialize_puback(unsigned char* buf, size_t buflen,
00041                                               uint16_t packetid, uint32_t *serialized_len);
00042 DLLExport MQTTReturnCode MQTTSerialize_pubrel(unsigned char *buf, size_t buflen,
00043                                               unsigned char dup, uint16_t packetid,
00044                                               uint32_t *serialized_len);
00045 DLLExport MQTTReturnCode MQTTSerialize_pubcomp(unsigned char *buf, size_t buflen,
00046                                                uint16_t packetid, uint32_t *serialized_len);
00047 
00048 #endif /* MQTTPUBLISH_H_ */
00049 
00050