From ab042f29975fee8764feed04e0f393859457b400 Mon Sep 17 00:00:00 2001 From: Flavio Santes Date: Thu, 15 Dec 2016 23:15:58 -0600 Subject: [PATCH] net/mqtt: Add missing function prototypes Some public function prototypes are missing, so this commit adds them to the mqtt.h header. Change-Id: I57a50ce346f086f55e499bfc8c815fd161a52f7b Signed-off-by: Flavio Santes --- include/net/mqtt.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/include/net/mqtt.h b/include/net/mqtt.h index 0685a40b290..14214e61016 100644 --- a/include/net/mqtt.h +++ b/include/net/mqtt.h @@ -196,6 +196,14 @@ struct mqtt_ctx { uint8_t connected:1; }; +/** + * @brief mqtt_init Initializes the MQTT context structure + * @param ctx MQTT context structure + * @param app_type See enum mqtt_app + * @return 0, always. + */ +int mqtt_init(struct mqtt_ctx *ctx, enum mqtt_app app_type); + /** * @brief mqtt_tx_connect Sends the MQTT CONNECT message * @param [in] ctx MQTT context structure @@ -386,4 +394,13 @@ int mqtt_rx_pingresp(struct mqtt_ctx *ctx, struct net_buf *rx); */ int mqtt_rx_suback(struct mqtt_ctx *ctx, struct net_buf *rx); +/** + * @brief mqtt_rx_unsuback Parses the MQTT UNSUBACK message + * @param [in] ctx MQTT context structure + * @param [in] rx RX buffer from the IP stack + * @return 0 on success + * @return -EINVAL on error + */ +int mqtt_rx_unsuback(struct mqtt_ctx *ctx, struct net_buf *rx); + #endif