Lines Matching refs:topic
9 static int _mqtt_publish(iotx_cm_ext_params_t *params, const char *topic,
11 static int _mqtt_sub(iotx_cm_ext_params_t *params, const char *topic,
14 static int _mqtt_unsub(const char *topic);
196 char *topic = NULL; in iotx_cloud_conn_mqtt_event_handle() local
208 topic = cm_malloc(topic_info->topic_len + 1); in iotx_cloud_conn_mqtt_event_handle()
209 if (topic == NULL) { in iotx_cloud_conn_mqtt_event_handle()
213 memset(topic, 0, topic_info->topic_len + 1); in iotx_cloud_conn_mqtt_event_handle()
214 memcpy(topic, topic_info->ptopic, topic_info->topic_len); in iotx_cloud_conn_mqtt_event_handle()
216 topic_handle_func(_mqtt_conncection->fd, topic, topic_info->payload, in iotx_cloud_conn_mqtt_event_handle()
219 cm_free(topic); in iotx_cloud_conn_mqtt_event_handle()
298 static int _mqtt_publish(iotx_cm_ext_params_t *ext, const char *topic, in _mqtt_publish() argument
310 return IOT_MQTT_Publish_Simple(_mqtt_conncection->context, topic, qos, in _mqtt_publish()
323 static int _mqtt_sub(iotx_cm_ext_params_t *ext, const char *topic, in _mqtt_sub() argument
331 if (_mqtt_conncection == NULL || topic == NULL || in _mqtt_sub()
347 ret = IOT_MQTT_Subscribe_Sync(_mqtt_conncection->context, topic, qos, in _mqtt_sub()
351 ret = IOT_MQTT_Subscribe(_mqtt_conncection->context, topic, qos, in _mqtt_sub()
359 static int _mqtt_unsub(const char *topic) in _mqtt_unsub() argument
367 ret = IOT_MQTT_Unsubscribe(_mqtt_conncection->context, topic); in _mqtt_unsub()