Embedded Wireless Framework
Data Structures | Typedefs | Enumerations | Functions
ewf_adapter_api_mqtt.h File Reference

The Embedded Wireless Framework adapter MQTT API. More...

#include "ewf.h"

Go to the source code of this file.

Data Structures

struct  ewf_socket_mqtt
 The MQTT socket structure definition. More...
 
struct  _ewf_adapter_mqtt_message
 The MQTT Message structure definition. More...
 
struct  _ewf_adapter_api_mqtt
 

Typedefs

typedef struct ewf_socket_mqtt ewf_socket_mqtt
 
typedef enum _ewf_adapter_mqtt_qos ewf_adapter_mqtt_qos
 
typedef struct _ewf_adapter_mqtt_message ewf_adapter_mqtt_message
 
typedef ewf_result(* ewf_adapter_mqtt_state_callback) (ewf_socket_mqtt *socket_ptr, const char *state_cstr, const char *param_cstr)
 A function pointer type for MQTT basic API state callbacks. More...
 
typedef ewf_result(* ewf_adapter_mqtt_message_callback) (ewf_socket_mqtt *socket_ptr, const char *topic_str, ewf_adapter_mqtt_message *message_ptr)
 A function pointer type for MQTT message callbacks. More...
 
typedef struct _ewf_adapter_api_mqtt ewf_adapter_api_mqtt
 

Enumerations

enum  _ewf_adapter_mqtt_qos { ewf_adapter_mqtt_qos_0 = 0 , ewf_adapter_mqtt_qos_1 = 1 , ewf_adapter_mqtt_qos_2 = 2 , ewf_adapter_mqtt_qos_error = -1 }
 The MQTT QoS enumeration definition.
 

Functions

ewf_result ewf_adapter_mqtt_open (ewf_adapter *adapter_ptr, ewf_socket_mqtt *socket_ptr)
 Open an MQTT socket. More...
 
ewf_result ewf_adapter_mqtt_close (ewf_socket_mqtt *socket_ptr)
 Close an MQTT socket. More...
 
ewf_result ewf_adapter_mqtt_set_tls_configuration (ewf_socket_mqtt *socket_ptr, uint32_t tls_configuration_id)
 Set the TLS context for the socket. More...
 
ewf_result ewf_adapter_mqtt_connect (ewf_socket_mqtt *socket_ptr, const char *server_str, uint32_t port, const char *clientid_str, const char *username_str, const char *password_str)
 Connect to an MQTT server. More...
 
ewf_result ewf_adapter_mqtt_disconnect (ewf_socket_mqtt *socket_ptr)
 Disconnect from an MQTT server. More...
 
ewf_result ewf_adapter_mqtt_publish_string (ewf_socket_mqtt *socket_ptr, const char *topic_str, const char *message_str)
 Publish a message to to a topic. More...
 
ewf_result ewf_adapter_mqtt_publish_buffer (ewf_socket_mqtt *socket_ptr, const char *topic_str, const uint8_t *message_ptr, uint32_t message_size)
 Publish a message to to a topic. More...
 
ewf_result ewf_adapter_mqtt_publish_message (ewf_socket_mqtt *socket_ptr, const char *topic_str, const ewf_adapter_mqtt_message *message_ptr)
 Publish a message to to a topic. More...
 
ewf_result ewf_adapter_mqtt_subscribe (ewf_socket_mqtt *socket_ptr, const char *topic_str, ewf_adapter_mqtt_qos qos)
 Subscribe to a topic. More...
 
ewf_result ewf_adapter_mqtt_subscribe_with_result (ewf_socket_mqtt *socket_ptr, const char *topic_str, ewf_adapter_mqtt_qos *qos_ptr)
 Subscribe to a topic. More...
 
ewf_result ewf_adapter_mqtt_unsubscribe (ewf_socket_mqtt *socket_ptr, const char *topic_str)
 Unsubscribe from a topic. More...
 
ewf_result ewf_adapter_mqtt_state_callback_set (ewf_socket_mqtt *socket_ptr, ewf_adapter_mqtt_state_callback callback)
 Register a callback for state changes. More...
 
ewf_result ewf_adapter_mqtt_message_callback_set (ewf_socket_mqtt *socket_ptr, ewf_adapter_mqtt_message_callback callback)
 Register a callback for subscribed messages. More...
 

Detailed Description

The Embedded Wireless Framework adapter MQTT API.

Version
Preview