Embedded Wireless Framework
ewf_adapter_api_mqtt_basic.h
Go to the documentation of this file.
1 /************************************************************************/
9 #ifndef __ewf_adapter_mqtt_basic__h__included__
10 #define __ewf_adapter_mqtt_basic__h__included__
11 
12 #include "ewf.h"
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 /************************************************************************/
34 typedef ewf_result(*ewf_adapter_mqtt_basic_state_callback)(ewf_adapter* adapter_ptr, const char* state_cstr, const char* param_cstr);
35 
51 typedef ewf_result(*ewf_adapter_mqtt_basic_message_callback)(ewf_adapter* adapter_ptr, const char* topic_cstr, const char* payload_cstr);
52 
55 {
58 
59  ewf_result(*urc_callback)(ewf_interface* interface_ptr, uint8_t* buffer_ptr, uint32_t buffer_length);
60 
61  ewf_result(*control)(ewf_adapter* adapter_ptr, const char* command_cstr, uint8_t* buffer_ptr, uint32_t* buffer_length_ptr);
62 
63  ewf_result(*connect)(ewf_adapter* adapter_ptr, char const* server_cstr, uint32_t port, char const* clientid_cstr, char const* username_cstr, char const* password_cstr);
64  ewf_result(*disconnect)(ewf_adapter* adapter_ptr);
65 
66  ewf_result(*subscribe)(ewf_adapter* adapter_ptr, char const* topic_cstr);
67  ewf_result(*unsubscribe)(ewf_adapter* adapter_ptr, char const* topic_cstr);
68 
69  ewf_result(*publish)(ewf_adapter* adapter_ptr, const char* topic_cstr, const char* message_cstr);
70 
71  ewf_result(*message_get)(ewf_adapter* adapter_ptr, const char* topic_cstr, char* message_buffer_ptr);
72 
74 
75 ewf_result ewf_adapter_mqtt_basic_control(ewf_adapter* adapter_ptr, const char* command_cstr, uint8_t* buffer_ptr, uint32_t* buffer_length_ptr);
76 
77 ewf_result ewf_adapter_mqtt_basic_connect(ewf_adapter* adapter_ptr, char const* server_cstr, uint32_t port, char const* clientid_cstrs, char const* username_cstr, char const* password_cstr);
78 ewf_result ewf_adapter_mqtt_basic_disconnect(ewf_adapter* adapter_ptr);
79 
80 ewf_result ewf_adapter_mqtt_basic_subscribe(ewf_adapter* adapter_ptr, char const* topic_cstr);
81 ewf_result ewf_adapter_mqtt_basic_unsubscribe(ewf_adapter* adapter_ptr, char const* topic_cstr);
82 
83 ewf_result ewf_adapter_mqtt_basic_publish(ewf_adapter* adapter_ptr, const char* topic_cstr, const char* message_cstr);
84 
85 ewf_result ewf_adapter_mqtt_basic_message_get(ewf_adapter* adapter_ptr, const char* topic_cstr, char* message_buffer_ptr);
86 
87 ewf_result ewf_adapter_mqtt_basic_state_callback_set(ewf_adapter * adapter_ptr, ewf_adapter_mqtt_basic_state_callback callback);
88 ewf_result ewf_adapter_mqtt_basic_message_callback_set(ewf_adapter * adapter_ptr, ewf_adapter_mqtt_basic_message_callback callback);
89 
90 /************************************************************************/
94 #ifdef __cplusplus
95 }
96 #endif
97 
98 #endif /* __ewf_adapter_mqtt_basic__h__included__ */
The Embedded Wireless Framework.
struct _ewf_adapter_api_mqtt_basic ewf_adapter_api_mqtt_basic
ewf_result(* ewf_adapter_mqtt_basic_message_callback)(ewf_adapter *adapter_ptr, const char *topic_cstr, const char *payload_cstr)
A function pointer type for MQTT basic API message callbacks.
Definition: ewf_adapter_api_mqtt_basic.h:51
ewf_result(* ewf_adapter_mqtt_basic_state_callback)(ewf_adapter *adapter_ptr, const char *state_cstr, const char *param_cstr)
A function pointer type for MQTT basic API state callbacks.
Definition: ewf_adapter_api_mqtt_basic.h:34
enum _ewf_result ewf_result
Success and error result codes specific to the EWF API.
Definition: ewf_adapter_api_mqtt_basic.h:55
The EWF network adapter control structure definition.
Definition: ewf_adapter.h:50
The interface structure definition.
Definition: ewf_interface.h:66