37 #ifndef LWIP_HDR_APPS_MQTT_CLIENT_H
38 #define LWIP_HDR_APPS_MQTT_CLIENT_H
51 #if LWIP_ALTCP && LWIP_ALTCP_TLS
52 struct altcp_tls_config;
57 #define MQTT_PORT LWIP_IANA_PORT_MQTT
60 #define MQTT_TLS_PORT LWIP_IANA_PORT_SECURE_MQTT
86 #if LWIP_ALTCP && LWIP_ALTCP_TLS
88 struct altcp_tls_config *tls_config;
193 #define mqtt_subscribe(client, topic, qos, cb, arg) mqtt_sub_unsub(client, topic, qos, cb, arg, 1)
196 #define mqtt_unsubscribe(client, topic, cb, arg) mqtt_sub_unsub(client, topic, 0, cb, arg, 0)
uint32_t u32_t
Definition: arch.h:129
uint8_t u8_t
Definition: arch.h:125
uint16_t u16_t
Definition: arch.h:127
s8_t err_t
Definition: err.h:96
void(* mqtt_incoming_publish_cb_t)(void *arg, const char *topic, u32_t tot_len)
Definition: mqtt.h:161
void(* mqtt_connection_cb_t)(mqtt_client_t *client, void *arg, mqtt_connection_status_t status)
Definition: mqtt.h:126
mqtt_connection_status_t
Definition: mqtt.h:96
void(* mqtt_request_cb_t)(void *arg, err_t err)
Definition: mqtt.h:173
void(* mqtt_incoming_data_cb_t)(void *arg, const u8_t *data, u16_t len, u8_t flags)
Definition: mqtt.h:149
@ MQTT_CONNECT_ACCEPTED
Definition: mqtt.h:98
@ MQTT_CONNECT_REFUSED_IDENTIFIER
Definition: mqtt.h:102
@ MQTT_CONNECT_REFUSED_USERNAME_PASS
Definition: mqtt.h:106
@ MQTT_CONNECT_DISCONNECTED
Definition: mqtt.h:110
@ MQTT_CONNECT_REFUSED_PROTOCOL_VERSION
Definition: mqtt.h:100
@ MQTT_CONNECT_TIMEOUT
Definition: mqtt.h:112
@ MQTT_CONNECT_REFUSED_SERVER
Definition: mqtt.h:104
@ MQTT_CONNECT_REFUSED_NOT_AUTHORIZED_
Definition: mqtt.h:108
@ MQTT_DATA_FLAG_LAST
Definition: mqtt.h:134
ip6_addr_t ip_addr_t
Definition: ip_addr.h:318
void mqtt_set_inpub_callback(mqtt_client_t *client, mqtt_incoming_publish_cb_t, mqtt_incoming_data_cb_t data_cb, void *arg)
void mqtt_disconnect(mqtt_client_t *client)
u8_t mqtt_client_is_connected(mqtt_client_t *client)
void mqtt_client_free(mqtt_client_t *client)
err_t mqtt_client_connect(mqtt_client_t *client, const ip_addr_t *ipaddr, u16_t port, mqtt_connection_cb_t cb, void *arg, const struct mqtt_connect_client_info_t *client_info)
err_t mqtt_publish(mqtt_client_t *client, const char *topic, const void *payload, u16_t payload_length, u8_t qos, u8_t retain, mqtt_request_cb_t cb, void *arg)
mqtt_client_t * mqtt_client_new(void)
err_t mqtt_sub_unsub(mqtt_client_t *client, const char *topic, u8_t qos, mqtt_request_cb_t cb, void *arg, u8_t sub)
Definition: mqtt_priv.h:71
u8_t will_qos
Definition: mqtt.h:83
const char * will_topic
Definition: mqtt.h:79
u8_t will_retain
Definition: mqtt.h:85
const char * client_pass
Definition: mqtt.h:74
const char * will_msg
Definition: mqtt.h:81
u16_t keep_alive
Definition: mqtt.h:76
const char * client_id
Definition: mqtt.h:70
const char * client_user
Definition: mqtt.h:72