Soletta™ Framework
|
MQTT callback handlers. More...
#include <sol-mqtt.h>
Data Fields | |
uint16_t | api_version |
Should always be set to SOL_MQTT_HANDLERS_API_VERSION. More... | |
void(* | connect )(void *data, struct sol_mqtt *mqtt) |
On connect callback. More... | |
void(* | disconnect )(void *data, struct sol_mqtt *mqtt) |
On disconnect callback. More... | |
void(* | message )(void *data, struct sol_mqtt *mqtt, const struct sol_mqtt_message *message) |
On message callback. More... | |
void(* | publish )(void *data, struct sol_mqtt *mqtt) |
On publish callback. More... | |
void(* | subscribe )(void *data, struct sol_mqtt *mqtt) |
On subscribe callback. More... | |
void(* | unsubscribe )(void *data, struct sol_mqtt *mqtt) |
On unsubscribe callback. More... | |
MQTT callback handlers.
uint16_t sol_mqtt_handlers::api_version |
Should always be set to SOL_MQTT_HANDLERS_API_VERSION.
void(* sol_mqtt_handlers::connect)(void *data, struct sol_mqtt *mqtt) |
On connect callback.
data | User provided data |
mqtt | MQTT Object |
Callback called when a connect request has been processed
void(* sol_mqtt_handlers::disconnect)(void *data, struct sol_mqtt *mqtt) |
On disconnect callback.
data | User provided data |
mqtt | MQTT Object |
Callback called when the client has disconnected from the broker.
void(* sol_mqtt_handlers::message)(void *data, struct sol_mqtt *mqtt, const struct sol_mqtt_message *message) |
On message callback.
data | User provided data |
mqtt | MQTT Object |
message | Message received from the broker |
Callback called when a message is received from the broker. This does not include PING messages, only messages incoming due to publish request from other clients or the broker itself.
The memory associated to the message object will be freed after the callback returns.
void(* sol_mqtt_handlers::publish)(void *data, struct sol_mqtt *mqtt) |
On publish callback.
data | User provided data |
mqtt | MQTT Object |
Callback called when a publish request has been processed.
void(* sol_mqtt_handlers::subscribe)(void *data, struct sol_mqtt *mqtt) |
On subscribe callback.
data | User provided data |
mqtt | MQTT Object |
Callback called when a subscribe request has been processed.
void(* sol_mqtt_handlers::unsubscribe)(void *data, struct sol_mqtt *mqtt) |
On unsubscribe callback.
data | User provided data |
mqtt | MQTT Object |
Callback called when a unsubscribe request has been processed.