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