1 #include "linkkit/infra/infra_types.h" 2 #include "linkkit/infra/infra_defs.h" 3 #include "linkkit/wrappers/wrappers_defs.h" 4 #include "linkkit/wrappers/wrappers.h" 5 #include "linkkit/mqtt_api.h" 6 7 /* mqtt protocol wrapper */ 8 void *wrapper_mqtt_init(iotx_mqtt_param_t *mqtt_params); 9 int wrapper_mqtt_connect(void *client); 10 int wrapper_mqtt_yield(void *client, int timeout_ms); 11 int wrapper_mqtt_check_state(void *client); 12 int wrapper_mqtt_subscribe(void *client, const char *topicFilter, 13 iotx_mqtt_qos_t qos, 14 iotx_mqtt_event_handle_func_fpt topic_handle_func, 15 void *pcontext); 16 int wrapper_mqtt_subscribe_sync( 17 void *client, const char *topic_filter, iotx_mqtt_qos_t qos, 18 iotx_mqtt_event_handle_func_fpt topic_handle_func, void *pcontext, 19 int timeout_ms); 20 int wrapper_mqtt_unsubscribe(void *client, const char *topicFilter); 21 int wrapper_mqtt_publish(void *client, const char *topicName, 22 iotx_mqtt_topic_info_pt topic_msg); 23 int wrapper_mqtt_release(void **pclient); 24 int wrapper_mqtt_nwk_event_handler(void *client, iotx_mqtt_nwk_event_t event, 25 iotx_mqtt_nwk_param_t *param); 26