/AliOS-Things-master/components/linksdk/core/ |
A D | aiot_mqtt_api.c | 44 mqtt_handle->event_handler((void *)mqtt_handle, &event, mqtt_handle->userdata); in _core_mqtt_event_notify() 76 mqtt_handle->event_handler((void *)mqtt_handle, &event, mqtt_handle->userdata); in _core_mqtt_disconnect_event_notify() 102 mqtt_handle->sysdep->core_sysdep_free(mqtt_handle->username); in _core_mqtt_sign_clean() 1035 mqtt_handle->recv_handler((void *)mqtt_handle, &packet, mqtt_handle->userdata); in _core_mqtt_connack_handle() 1816 mqtt_handle->recv_handler((void *)mqtt_handle, &packet, mqtt_handle->userdata); in _core_mqtt_pingresp_handler() 2109 mqtt_handle->recv_handler((void *)mqtt_handle, &packet, mqtt_handle->userdata); in _core_mqtt_pub_handler() 2163 mqtt_handle->recv_handler((void *)mqtt_handle, &packet, mqtt_handle->userdata); in _core_mqtt_puback_handler() 2190 mqtt_handle->recv_handler((void *)mqtt_handle, &packet, mqtt_handle->userdata); in _core_mqtt_server_disconnect_handler() 2251 mqtt_handle->recv_handler((void *)mqtt_handle, &packet, mqtt_handle->userdata); in _core_mqtt_subunsuback_handler() 2298 mqtt_handle->recv_handler((void *)mqtt_handle, &packet, mqtt_handle->userdata); in _core_mqtt_subunsuback_handler() [all …]
|
/AliOS-Things-master/solutions/linksdk_gateway_demo/ |
A D | subdev_basic_demo.c | 178 void *mqtt_handle = NULL; in demo_mqtt_start() local 198 mqtt_handle = aiot_mqtt_init(); in demo_mqtt_start() 199 if (mqtt_handle == NULL) { in demo_mqtt_start() 234 aiot_mqtt_deinit(&mqtt_handle); in demo_mqtt_start() 245 aiot_mqtt_deinit(&mqtt_handle); in demo_mqtt_start() 260 *handle = mqtt_handle; in demo_mqtt_start() 268 void *mqtt_handle = NULL; in demo_mqtt_stop() local 270 mqtt_handle = *handle; in demo_mqtt_stop() 343 demo_mqtt_stop(&mqtt_handle); in demo_main() 354 demo_mqtt_stop(&mqtt_handle); in demo_main() [all …]
|
/AliOS-Things-master/components/py_engine/modules/mqtt/ |
A D | module_mqtt_client.c | 165 void *mqtt_handle = NULL; in mqtt_client_start() local 192 mqtt_handle = aiot_mqtt_init(); in mqtt_client_start() 194 if (mqtt_handle == NULL) { in mqtt_client_start() 196 aos_free(mqtt_handle); in mqtt_client_start() 235 aiot_mqtt_deinit(&mqtt_handle); in mqtt_client_start() 251 aiot_mqtt_deinit(&mqtt_handle); in mqtt_client_start() 266 aiot_mqtt_deinit(&mqtt_handle); in mqtt_client_start() 272 *handle = mqtt_handle; in mqtt_client_start() 281 void *mqtt_handle = NULL; in mqtt_client_stop() local 283 mqtt_handle = *handle; in mqtt_client_stop() [all …]
|
/AliOS-Things-master/components/amp/engine/duktape_engine/addons/network/mqtt/ |
A D | module_mqtt_client.c | 144 void *mqtt_handle = NULL; in mqtt_client_start() local 168 mqtt_handle = aiot_mqtt_init(); in mqtt_client_start() 170 if (mqtt_handle == NULL) { in mqtt_client_start() 172 aos_free(mqtt_handle); in mqtt_client_start() 209 aiot_mqtt_deinit(&mqtt_handle); in mqtt_client_start() 222 aiot_mqtt_deinit(&mqtt_handle); in mqtt_client_start() 235 aiot_mqtt_deinit(&mqtt_handle); in mqtt_client_start() 241 *handle = mqtt_handle; in mqtt_client_start() 250 void *mqtt_handle = NULL; in mqtt_client_stop() local 252 mqtt_handle = *handle; in mqtt_client_stop() [all …]
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/network/mqtt/ |
A D | module_mqtt_client.c | 180 void *mqtt_handle = NULL; in mqtt_client_start() local 204 mqtt_handle = aiot_mqtt_init(); in mqtt_client_start() 205 if (mqtt_handle == NULL) { in mqtt_client_start() 207 amp_free(mqtt_handle); in mqtt_client_start() 211 aos_mqtt_handle->mqtt_handle = mqtt_handle; in mqtt_client_start() 243 aiot_mqtt_deinit(&mqtt_handle); in mqtt_client_start() 251 *handle = mqtt_handle; in mqtt_client_start() 257 aiot_mqtt_deinit(&mqtt_handle); in mqtt_client_start() 270 aiot_mqtt_deinit(&mqtt_handle); in mqtt_client_start() 283 void *mqtt_handle = NULL; in mqtt_client_stop() local [all …]
|
/AliOS-Things-master/components/amp/engine/duktape_engine/addons/advanced/aiot/ |
A D | module_aiot_mqtt.c | 210 void *mqtt_handle = NULL; in aiot_mqtt_client_start() local 244 mqtt_handle = aiot_mqtt_init(); in aiot_mqtt_client_start() 246 if (mqtt_handle == NULL) { in aiot_mqtt_client_start() 248 aos_free(mqtt_handle); in aiot_mqtt_client_start() 285 aiot_mqtt_deinit(&mqtt_handle); in aiot_mqtt_client_start() 298 aiot_mqtt_deinit(&mqtt_handle); in aiot_mqtt_client_start() 311 aiot_mqtt_deinit(&mqtt_handle); in aiot_mqtt_client_start() 317 *handle = mqtt_handle; in aiot_mqtt_client_start() 337 void *mqtt_handle = NULL; in aiot_mqtt_client_stop() local 339 mqtt_handle = *handle; in aiot_mqtt_client_stop() [all …]
|
A D | module_aiot.h | 144 void *mqtt_handle; member 153 void *mqtt_handle; member 216 int32_t amp_app_devinfo_report(void *mqtt_handle);
|
/AliOS-Things-master/components/py_engine/modules/aliyunIoT/ |
A D | module_aiot_mqtt.c | 251 void *mqtt_handle = NULL; in pyamp_aiot_mqtt_client_start() local 293 mqtt_handle = aiot_mqtt_init(); in pyamp_aiot_mqtt_client_start() 295 if (mqtt_handle == NULL) { in pyamp_aiot_mqtt_client_start() 297 aos_free(mqtt_handle); in pyamp_aiot_mqtt_client_start() 339 aiot_mqtt_deinit(&mqtt_handle); in pyamp_aiot_mqtt_client_start() 355 aiot_mqtt_deinit(&mqtt_handle); in pyamp_aiot_mqtt_client_start() 371 aiot_mqtt_deinit(&mqtt_handle); in pyamp_aiot_mqtt_client_start() 377 *handle = mqtt_handle; in pyamp_aiot_mqtt_client_start() 396 void *mqtt_handle = NULL; in pyamp_aiot_mqtt_client_stop() local 398 mqtt_handle = *handle; in pyamp_aiot_mqtt_client_stop() [all …]
|
A D | modlinkkit.c | 24 void *mqtt_handle = NULL; variable 454 mqtt_handle = aiot_mqtt_init(); in linkkit_init() 455 if (mqtt_handle == NULL) { in linkkit_init() 466 aiot_mqtt_setopt(mqtt_handle, AIOT_MQTTOPT_PRODUCT_KEY, in linkkit_init() 493 res = aiot_mqtt_connect(mqtt_handle); in linkkit_init() 496 aiot_mqtt_deinit(&mqtt_handle); in linkkit_init() 502 res = uagent_mqtt_client_set(mqtt_handle); in linkkit_init() 517 mqtt_handle, 4096); in linkkit_init() 607 int res = aiot_mqtt_disconnect(mqtt_handle); in linkkit_close() 609 aiot_mqtt_deinit(&mqtt_handle); in linkkit_close() [all …]
|
A D | module_aiot.h | 154 void *mqtt_handle; member 163 void *mqtt_handle; member 227 int32_t pyamp_amp_app_devinfo_report(void *mqtt_handle);
|
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/advanced/aiot/ |
A D | module_aiot_mqtt.c | 231 void *mqtt_handle = NULL; in aiot_mqtt_client_start() local 265 mqtt_handle = aiot_mqtt_init(); in aiot_mqtt_client_start() 266 if (mqtt_handle == NULL) { in aiot_mqtt_client_start() 268 amp_free(mqtt_handle); in aiot_mqtt_client_start() 271 *handle = mqtt_handle; in aiot_mqtt_client_start() 306 aiot_mqtt_deinit(&mqtt_handle); in aiot_mqtt_client_start() 319 aiot_mqtt_deinit(&mqtt_handle); in aiot_mqtt_client_start() 332 aiot_mqtt_deinit(&mqtt_handle); in aiot_mqtt_client_start() 356 void *mqtt_handle = NULL; in aiot_mqtt_client_stop() local 359 mqtt_handle = *handle; in aiot_mqtt_client_stop() [all …]
|
/AliOS-Things-master/solutions/rfid_demo/ |
A D | rfid_demo.c | 289 void *mqtt_handle = NULL; in demo_main() local 314 mqtt_handle = aiot_mqtt_init(); in demo_main() 315 if (mqtt_handle == NULL) { in demo_main() 322 aiot_mqtt_setopt(mqtt_handle, AIOT_MQTTOPT_HOST, (void *)host); in demo_main() 324 aiot_mqtt_setopt(mqtt_handle, AIOT_MQTTOPT_PORT, (void *)&port); in demo_main() 343 aiot_dm_setopt(g_dm_handle, AIOT_DMOPT_MQTT_HANDLE, mqtt_handle); in demo_main() 348 res = aiot_mqtt_connect(mqtt_handle); in demo_main() 351 aiot_mqtt_deinit(&mqtt_handle); in demo_main() 384 res = aiot_mqtt_disconnect(mqtt_handle); in demo_main() 386 aiot_mqtt_deinit(&mqtt_handle); in demo_main() [all …]
|
/AliOS-Things-master/solutions/flower_demo/ |
A D | data_model_basic_demo.c | 313 void *mqtt_handle = NULL; in demo_main() local 338 mqtt_handle = aiot_mqtt_init(); in demo_main() 339 if (mqtt_handle == NULL) { in demo_main() 346 aiot_mqtt_setopt(mqtt_handle, AIOT_MQTTOPT_HOST, (void *)host); in demo_main() 348 aiot_mqtt_setopt(mqtt_handle, AIOT_MQTTOPT_PORT, (void *)&port); in demo_main() 368 aiot_dm_setopt(dm_handle, AIOT_DMOPT_MQTT_HANDLE, mqtt_handle); in demo_main() 373 res = aiot_mqtt_connect(mqtt_handle); in demo_main() 376 aiot_mqtt_deinit(&mqtt_handle); in demo_main() 406 res = aiot_mqtt_disconnect(mqtt_handle); in demo_main() 408 aiot_mqtt_deinit(&mqtt_handle); in demo_main() [all …]
|
/AliOS-Things-master/solutions/linksdk_demo/ |
A D | data_model_basic_demo.c | 307 void *mqtt_handle = NULL; in demo_main() local 332 mqtt_handle = aiot_mqtt_init(); in demo_main() 333 if (mqtt_handle == NULL) { in demo_main() 340 aiot_mqtt_setopt(mqtt_handle, AIOT_MQTTOPT_HOST, (void *)host); in demo_main() 342 aiot_mqtt_setopt(mqtt_handle, AIOT_MQTTOPT_PORT, (void *)&port); in demo_main() 361 aiot_dm_setopt(dm_handle, AIOT_DMOPT_MQTT_HANDLE, mqtt_handle); in demo_main() 366 res = aiot_mqtt_connect(mqtt_handle); in demo_main() 369 aiot_mqtt_deinit(&mqtt_handle); in demo_main() 402 res = aiot_mqtt_disconnect(mqtt_handle); in demo_main() 404 aiot_mqtt_deinit(&mqtt_handle); in demo_main() [all …]
|
/AliOS-Things-master/solutions/ota_demo/ |
A D | otaappdemo.c | 289 void *mqtt_handle = NULL; in mqtt_main() local 314 mqtt_handle = aiot_mqtt_init(); in mqtt_main() 315 if (mqtt_handle == NULL) { in mqtt_main() 321 aiot_mqtt_setopt(mqtt_handle, AIOT_MQTTOPT_HOST, (void *)host); in mqtt_main() 337 res = aiot_mqtt_connect(mqtt_handle); in mqtt_main() 340 aiot_mqtt_deinit(&mqtt_handle); in mqtt_main() 350 aiot_mqtt_deinit(&mqtt_handle); in mqtt_main() 360 aiot_mqtt_deinit(&mqtt_handle); in mqtt_main() 369 res = aiot_mqtt_disconnect(mqtt_handle); in mqtt_main() 371 aiot_mqtt_deinit(&mqtt_handle); in mqtt_main() [all …]
|
/AliOS-Things-master/solutions/ucloud_ai_demo/ |
A D | linkkit_event.c | 330 void *mqtt_handle = NULL; in linkkit_main() local 355 mqtt_handle = aiot_mqtt_init(); in linkkit_main() 356 if (mqtt_handle == NULL) { in linkkit_main() 363 aiot_mqtt_setopt(mqtt_handle, AIOT_MQTTOPT_HOST, (void *)host); in linkkit_main() 365 aiot_mqtt_setopt(mqtt_handle, AIOT_MQTTOPT_PORT, (void *)&port); in linkkit_main() 384 aiot_dm_setopt(g_dm_handle, AIOT_DMOPT_MQTT_HANDLE, mqtt_handle); in linkkit_main() 389 res = aiot_mqtt_connect(mqtt_handle); in linkkit_main() 392 aiot_mqtt_deinit(&mqtt_handle); in linkkit_main() 425 res = aiot_mqtt_disconnect(mqtt_handle); in linkkit_main() 427 aiot_mqtt_deinit(&mqtt_handle); in linkkit_main() [all …]
|
/AliOS-Things-master/solutions/auto_demo/ |
A D | data_model_basic_demo.c | 333 void *mqtt_handle = NULL; in demo_main() local 358 mqtt_handle = aiot_mqtt_init(); in demo_main() 359 if (mqtt_handle == NULL) { in demo_main() 366 aiot_mqtt_setopt(mqtt_handle, AIOT_MQTTOPT_HOST, (void *)host); in demo_main() 368 aiot_mqtt_setopt(mqtt_handle, AIOT_MQTTOPT_PORT, (void *)&port); in demo_main() 387 aiot_dm_setopt(dm_handle, AIOT_DMOPT_MQTT_HANDLE, mqtt_handle); in demo_main() 392 res = aiot_mqtt_connect(mqtt_handle); in demo_main() 395 aiot_mqtt_deinit(&mqtt_handle); in demo_main() 428 res = aiot_mqtt_disconnect(mqtt_handle); in demo_main() 430 aiot_mqtt_deinit(&mqtt_handle); in demo_main() [all …]
|
/AliOS-Things-master/components/py_engine/external/app_mgr/ |
A D | app_message.h | 30 int32_t pyamp_internal_service_subscribe(void *mqtt_handle); 32 int32_t pyamp_internal_service_publish(void *mqtt_handle); 34 int32_t amp_das_service(void *mqtt_handle); 36 int32_t pyamp_ntp_service(void *mqtt_handle); 38 int32_t pyamp_location_service(void *mqtt_handle); 40 int32_t pyamp_devinfo_report_service(void *mqtt_handle);
|
A D | app_message.c | 138 static int32_t topic_subscribe(void *mqtt_handle, const char *fmt, void *callback) in topic_subscribe() argument 160 res = aiot_mqtt_sub(mqtt_handle, topic, callback, 0, NULL); in topic_subscribe() 204 int32_t pyamp_internal_service_subscribe(void *mqtt_handle) in pyamp_internal_service_subscribe() argument 227 int32_t pyamp_internal_service_publish(void *mqtt_handle) in pyamp_internal_service_publish() argument 244 res = topic_publish(mqtt_handle, verify_fmt, payload); in pyamp_internal_service_publish() 257 int32_t amp_das_service(void *mqtt_handle) 268 res = aiot_das_setopt(das_handle, AIOT_DASOPT_MQTT_HANDLE, mqtt_handle); 323 int32_t pyamp_ntp_service(void *mqtt_handle) in pyamp_ntp_service() argument 393 int32_t pyamp_location_service(void *mqtt_handle) in pyamp_location_service() argument 446 aiot_dm_setopt(dm_handle, AIOT_DMOPT_MQTT_HANDLE, mqtt_handle); in pyamp_location_service() [all …]
|
/AliOS-Things-master/solutions/audio_demo/ |
A D | data_model_basic_demo.c | 399 void *mqtt_handle = NULL; in demo_main() local 424 mqtt_handle = aiot_mqtt_init(); in demo_main() 425 if (mqtt_handle == NULL) { in demo_main() 432 aiot_mqtt_setopt(mqtt_handle, AIOT_MQTTOPT_HOST, (void *)host); in demo_main() 434 aiot_mqtt_setopt(mqtt_handle, AIOT_MQTTOPT_PORT, (void *)&port); in demo_main() 453 aiot_dm_setopt(dm_handle, AIOT_DMOPT_MQTT_HANDLE, mqtt_handle); in demo_main() 458 res = aiot_mqtt_connect(mqtt_handle); in demo_main() 461 aiot_mqtt_deinit(&mqtt_handle); in demo_main() 494 res = aiot_mqtt_disconnect(mqtt_handle); in demo_main() 496 aiot_mqtt_deinit(&mqtt_handle); in demo_main() [all …]
|
/AliOS-Things-master/components/linksdk/components/dynreg-mqtt/ |
A D | aiot_dynregmq_api.c | 276 if (dynregmq_handle->mqtt_handle != NULL) { in aiot_dynregmq_deinit() 277 aiot_mqtt_deinit(&dynregmq_handle->mqtt_handle); in aiot_dynregmq_deinit() 352 if (dynregmq_handle->mqtt_handle != NULL) { in aiot_dynregmq_send_request() 353 aiot_mqtt_deinit(&dynregmq_handle->mqtt_handle); in aiot_dynregmq_send_request() 356 dynregmq_handle->mqtt_handle = aiot_mqtt_init(); in aiot_dynregmq_send_request() 357 if (dynregmq_handle->mqtt_handle == NULL) { in aiot_dynregmq_send_request() 418 aiot_mqtt_deinit(&dynregmq_handle->mqtt_handle); in aiot_dynregmq_send_request() 428 res = aiot_mqtt_connect(dynregmq_handle->mqtt_handle); in aiot_dynregmq_send_request() 430 aiot_mqtt_deinit(&dynregmq_handle->mqtt_handle); in aiot_dynregmq_send_request() 452 if (dynregmq_handle->mqtt_handle == NULL) { in aiot_dynregmq_recv() [all …]
|
/AliOS-Things-master/components/ble_netconfig/ |
A D | blecfg_linksdk.c | 570 void *mqtt_handle = NULL; in BleCfg_linksdk_main() local 590 mqtt_handle = aiot_mqtt_init(); in BleCfg_linksdk_main() 591 if (mqtt_handle == NULL) { in BleCfg_linksdk_main() 598 aiot_mqtt_setopt(mqtt_handle, AIOT_MQTTOPT_HOST, (void *)host); in BleCfg_linksdk_main() 619 aiot_dm_setopt(dm_handle, AIOT_DMOPT_MQTT_HANDLE, mqtt_handle); in BleCfg_linksdk_main() 623 res = aiot_mqtt_connect(mqtt_handle); in BleCfg_linksdk_main() 626 aiot_mqtt_deinit(&mqtt_handle); in BleCfg_linksdk_main() 650 BleCfg_led_update(mqtt_handle); in BleCfg_linksdk_main() 662 res = aiot_mqtt_disconnect(mqtt_handle); in BleCfg_linksdk_main() 664 aiot_mqtt_deinit(&mqtt_handle); in BleCfg_linksdk_main() [all …]
|
/AliOS-Things-master/components/linksdk/components/logpost/ |
A D | aiot_logpost_api.c | 71 if (NULL == logpost_handle || NULL == logpost_handle->mqtt_handle) { in _logpost_get_config() 74 if (NULL == (pk = core_mqtt_get_product_key(logpost_handle->mqtt_handle))) { in _logpost_get_config() 77 if (NULL == (dn = core_mqtt_get_device_name(logpost_handle->mqtt_handle))) { in _logpost_get_config() 121 core_mqtt_get_nwkstats(handle->mqtt_handle, &nwkstats_info); in _logpost_send_nwkstats_rtt() 157 core_mqtt_get_nwkstats(handle->mqtt_handle, &nwkstats_info); in _logpost_send_nwkstats_conn() 219 logpost_handle->mqtt_handle = NULL; in _logpost_process_handler() 291 logpost_handle->mqtt_handle = data; in aiot_logpost_setopt() 367 if (NULL == logpost_handle->mqtt_handle) { in aiot_logpost_send() 370 if (NULL == (pk = core_mqtt_get_product_key(logpost_handle->mqtt_handle))) { in aiot_logpost_send() 373 if (NULL == (dn = core_mqtt_get_device_name(logpost_handle->mqtt_handle))) { in aiot_logpost_send() [all …]
|
/AliOS-Things-master/components/linksdk/components/ntp/ |
A D | aiot_ntp_api.c | 106 …[] = { core_mqtt_get_product_key(ntp_handle->mqtt_handle), core_mqtt_get_device_name(ntp_handle->m… in _ntp_operate_topic_map() 121 res = aiot_mqtt_setopt(ntp_handle->mqtt_handle, option, &map); in _ntp_operate_topic_map() 134 ntp_handle->mqtt_handle = NULL; in _ntp_core_mqtt_process_handler() 154 return core_mqtt_setopt(ntp_handle->mqtt_handle, option, &process_data); in _ntp_core_mqtt_operate_process_handler() 205 ntp_handle->mqtt_handle = data; in aiot_ntp_setopt() 297 if (ntp_handle->mqtt_handle == NULL) { in aiot_ntp_send_request() 308 …[] = { core_mqtt_get_product_key(ntp_handle->mqtt_handle), core_mqtt_get_device_name(ntp_handle->m… in aiot_ntp_send_request() 331 …res = aiot_mqtt_pub(ntp_handle->mqtt_handle, topic, (uint8_t *)payload, (uint32_t)strlen(payload),… in aiot_ntp_send_request()
|
/AliOS-Things-master/components/linksdk/components/ota/ |
A D | aiot_ota_api.c | 42 ota_handle->mqtt_handle = NULL; in _ota_core_mqtt_process_handler() 141 ota_handle->mqtt_handle = data; in aiot_ota_setopt() 345 core_mqtt_handle_t *mqtt_handle = ota_handle->mqtt_handle; in aiot_ota_report_version() local 346 if (NULL == mqtt_handle) { in aiot_ota_report_version() 349 product_key = mqtt_handle->product_key; in aiot_ota_report_version() 350 device_name = mqtt_handle->device_name; in aiot_ota_report_version() 390 core_mqtt_handle_t *mqtt_handle = ota_handle->mqtt_handle; in aiot_ota_report_version_ext() local 391 if (NULL == mqtt_handle) { in aiot_ota_report_version_ext() 679 task_desc.mqtt_handle = ota_handle->mqtt_handle; in _ota_mqtt_process() 1055 dst_task_desc->mqtt_handle = src_task_desc->mqtt_handle; in _download_deep_copy_task_desc() [all …]
|