Webserver+3d print

Dependents:   Nucleo

Committer:
Sergunb
Date:
Sat Feb 04 18:15:49 2017 +0000
Revision:
0:8918a71cdbe9
nothing else

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Sergunb 0:8918a71cdbe9 1 /**
Sergunb 0:8918a71cdbe9 2 * @file mqtt_client_packet.h
Sergunb 0:8918a71cdbe9 3 * @brief MQTT packet parsing and formatting
Sergunb 0:8918a71cdbe9 4 *
Sergunb 0:8918a71cdbe9 5 * @section License
Sergunb 0:8918a71cdbe9 6 *
Sergunb 0:8918a71cdbe9 7 * Copyright (C) 2010-2017 Oryx Embedded SARL. All rights reserved.
Sergunb 0:8918a71cdbe9 8 *
Sergunb 0:8918a71cdbe9 9 * This file is part of CycloneTCP Open.
Sergunb 0:8918a71cdbe9 10 *
Sergunb 0:8918a71cdbe9 11 * This program is free software; you can redistribute it and/or
Sergunb 0:8918a71cdbe9 12 * modify it under the terms of the GNU General Public License
Sergunb 0:8918a71cdbe9 13 * as published by the Free Software Foundation; either version 2
Sergunb 0:8918a71cdbe9 14 * of the License, or (at your option) any later version.
Sergunb 0:8918a71cdbe9 15 *
Sergunb 0:8918a71cdbe9 16 * This program is distributed in the hope that it will be useful,
Sergunb 0:8918a71cdbe9 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Sergunb 0:8918a71cdbe9 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Sergunb 0:8918a71cdbe9 19 * GNU General Public License for more details.
Sergunb 0:8918a71cdbe9 20 *
Sergunb 0:8918a71cdbe9 21 * You should have received a copy of the GNU General Public License
Sergunb 0:8918a71cdbe9 22 * along with this program; if not, write to the Free Software Foundation,
Sergunb 0:8918a71cdbe9 23 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Sergunb 0:8918a71cdbe9 24 *
Sergunb 0:8918a71cdbe9 25 * @author Oryx Embedded SARL (www.oryx-embedded.com)
Sergunb 0:8918a71cdbe9 26 * @version 1.7.6
Sergunb 0:8918a71cdbe9 27 **/
Sergunb 0:8918a71cdbe9 28
Sergunb 0:8918a71cdbe9 29 #ifndef _MQTT_CLIENT_PACKET_H
Sergunb 0:8918a71cdbe9 30 #define _MQTT_CLIENT_PACKET_H
Sergunb 0:8918a71cdbe9 31
Sergunb 0:8918a71cdbe9 32 //Dependencies
Sergunb 0:8918a71cdbe9 33 #include "core/net.h"
Sergunb 0:8918a71cdbe9 34 #include "mqtt/mqtt_client.h"
Sergunb 0:8918a71cdbe9 35
Sergunb 0:8918a71cdbe9 36 //MQTT client related functions
Sergunb 0:8918a71cdbe9 37 error_t mqttClientReceivePacket(MqttClientContext *context);
Sergunb 0:8918a71cdbe9 38 error_t mqttClientProcessPacket(MqttClientContext *context);
Sergunb 0:8918a71cdbe9 39
Sergunb 0:8918a71cdbe9 40 error_t mqttClientProcessConnAck(MqttClientContext *context,
Sergunb 0:8918a71cdbe9 41 bool_t dup, MqttQosLevel qos, bool_t retain, size_t remainingLen);
Sergunb 0:8918a71cdbe9 42
Sergunb 0:8918a71cdbe9 43 error_t mqttClientProcessPubAck(MqttClientContext *context,
Sergunb 0:8918a71cdbe9 44 bool_t dup, MqttQosLevel qos, bool_t retain, size_t remainingLen);
Sergunb 0:8918a71cdbe9 45
Sergunb 0:8918a71cdbe9 46 error_t mqttClientProcessPublish(MqttClientContext *context,
Sergunb 0:8918a71cdbe9 47 bool_t dup, MqttQosLevel qos, bool_t retain, size_t remainingLen);
Sergunb 0:8918a71cdbe9 48
Sergunb 0:8918a71cdbe9 49 error_t mqttClientProcessPubRec(MqttClientContext *context,
Sergunb 0:8918a71cdbe9 50 bool_t dup, MqttQosLevel qos, bool_t retain, size_t remainingLen);
Sergunb 0:8918a71cdbe9 51
Sergunb 0:8918a71cdbe9 52 error_t mqttClientProcessPubRel(MqttClientContext *context,
Sergunb 0:8918a71cdbe9 53 bool_t dup, MqttQosLevel qos, bool_t retain, size_t remainingLen);
Sergunb 0:8918a71cdbe9 54
Sergunb 0:8918a71cdbe9 55 error_t mqttClientProcessPubComp(MqttClientContext *context,
Sergunb 0:8918a71cdbe9 56 bool_t dup, MqttQosLevel qos, bool_t retain, size_t remainingLen);
Sergunb 0:8918a71cdbe9 57
Sergunb 0:8918a71cdbe9 58 error_t mqttClientProcessSubAck(MqttClientContext *context,
Sergunb 0:8918a71cdbe9 59 bool_t dup, MqttQosLevel qos, bool_t retain, size_t remainingLen);
Sergunb 0:8918a71cdbe9 60
Sergunb 0:8918a71cdbe9 61 error_t mqttClientProcessUnsubAck(MqttClientContext *context,
Sergunb 0:8918a71cdbe9 62 bool_t dup, MqttQosLevel qos, bool_t retain, size_t remainingLen);
Sergunb 0:8918a71cdbe9 63
Sergunb 0:8918a71cdbe9 64 error_t mqttClientProcessPingResp(MqttClientContext *context,
Sergunb 0:8918a71cdbe9 65 bool_t dup, MqttQosLevel qos, bool_t retain, size_t remainingLen);
Sergunb 0:8918a71cdbe9 66
Sergunb 0:8918a71cdbe9 67 error_t mqttClientFormatConnect(MqttClientContext *context,
Sergunb 0:8918a71cdbe9 68 bool_t cleanSession);
Sergunb 0:8918a71cdbe9 69
Sergunb 0:8918a71cdbe9 70 error_t mqttClientFormatPublish(MqttClientContext *context, const char_t *topic,
Sergunb 0:8918a71cdbe9 71 const void *message, size_t length, MqttQosLevel qos, bool_t retain);
Sergunb 0:8918a71cdbe9 72
Sergunb 0:8918a71cdbe9 73 error_t mqttClientFormatPubAck(MqttClientContext *context, uint16_t packetId);
Sergunb 0:8918a71cdbe9 74 error_t mqttClientFormatPubRec(MqttClientContext *context, uint16_t packetId);
Sergunb 0:8918a71cdbe9 75 error_t mqttClientFormatPubRel(MqttClientContext *context, uint16_t packetId);
Sergunb 0:8918a71cdbe9 76 error_t mqttClientFormatPubComp(MqttClientContext *context, uint16_t packetId);
Sergunb 0:8918a71cdbe9 77
Sergunb 0:8918a71cdbe9 78 error_t mqttClientFormatSubscribe(MqttClientContext *context,
Sergunb 0:8918a71cdbe9 79 const char_t *topic, MqttQosLevel qos);
Sergunb 0:8918a71cdbe9 80
Sergunb 0:8918a71cdbe9 81 error_t mqttClientFormatUnsubscribe(MqttClientContext *context,
Sergunb 0:8918a71cdbe9 82 const char_t *topic);
Sergunb 0:8918a71cdbe9 83
Sergunb 0:8918a71cdbe9 84 error_t mqttClientFormatPingReq(MqttClientContext *context);
Sergunb 0:8918a71cdbe9 85 error_t mqttClientFormatDisconnect(MqttClientContext *context);
Sergunb 0:8918a71cdbe9 86
Sergunb 0:8918a71cdbe9 87 #endif
Sergunb 0:8918a71cdbe9 88