| /vendor/hisilicon/hispark_pegasus/demo/iottencent_demo/ |
| H A D | iot_main.c | 63 const char *topic; member 78 /* Tencent iot cloud topic */ 85 static int MsgRcvCallBack(char *context, char *topic, int topicLen, MQTTClient_message *message) in MsgRcvCallBack() argument 93 topiLen = strlen(topic); in MsgRcvCallBack() 103 (void)memcpy_s(buf, bufSize, topic, topiLen); in MsgRcvCallBack() 105 msg->topic = buf; in MsgRcvCallBack() 111 IOT_LOG_DEBUG("RCVMSG:QOS:%d TOPIC:%s PAYLOAD:%s\r\n", msg->qos, msg->topic, msg->payload); in MsgRcvCallBack() 119 MQTTClient_free(topic); in MsgRcvCallBack() 140 ret = MQTTClient_publishMessage(client, msg->topic, &pubMsg, &gIoTAppCb.tocken); in MqttProcessQueueMsg() 149 gIoTAppCb.msgCallBack(msg->qos, msg->topic, ms in MqttProcessQueueMsg() 282 IotSendMsg(int qos, const char *topic, const char *payload) IotSendMsg() argument [all...] |
| H A D | iot_main.h | 19 typedef void (*fnMsgCallBack)(int qos, const char *topic, const char *payload); 34 * @param topic: the iot mqtt topic 42 int IotSendMsg(int qos, const char *topic, const char *payload);
|
| H A D | iot_profile.c | 161 // < use this function to make a topic to publish 317 char *topic; in IoTProfilePropertyReport() local 323 topic = MakeTopic(CN_PROFILE_TOPICFMT_TOPIC, deviceID, NULL); in IoTProfilePropertyReport() 324 if (topic == NULL) { in IoTProfilePropertyReport() 328 if ((topic != NULL) && (msg != NULL)) { in IoTProfilePropertyReport() 329 ret = IotSendMsg(0, topic, msg); in IoTProfilePropertyReport() 332 hi_free(0, topic); in IoTProfilePropertyReport()
|
| /vendor/hisilicon/hispark_pegasus/demo/mqtt_demo/ |
| H A D | iot_main.c | 63 const char *topic; member 78 /* Tencent iot cloud topic */ 85 static int MsgRcvCallBack(char *context, char *topic, int topicLen, MQTTClient_message *message) in MsgRcvCallBack() argument 93 topiLen = strlen(topic); in MsgRcvCallBack() 103 (void)memcpy_s(buf, bufSize, topic, topiLen); in MsgRcvCallBack() 105 msg->topic = buf; in MsgRcvCallBack() 111 IOT_LOG_DEBUG("RCVMSG:QOS:%d TOPIC:%s PAYLOAD:%s\r\n", msg->qos, msg->topic, msg->payload); in MsgRcvCallBack() 119 MQTTClient_free(topic); in MsgRcvCallBack() 140 ret = MQTTClient_publishMessage(client, msg->topic, &pubMsg, &gIoTAppCb.tocken); in MqttProcessQueueMsg() 149 gIoTAppCb.msgCallBack(msg->qos, msg->topic, ms in MqttProcessQueueMsg() 282 IotSendMsg(int qos, const char *topic, const char *payload) IotSendMsg() argument [all...] |
| H A D | iot_main.h | 19 typedef void (*fnMsgCallBack)(int qos, const char *topic, const char *payload); 34 * @param topic: the iot mqtt topic 42 int IotSendMsg(int qos, const char *topic, const char *payload);
|
| H A D | iot_profile.c | 161 // < use this function to make a topic to publish 317 char *topic; in IoTProfilePropertyReport() local 323 topic = MakeTopic(CN_PROFILE_TOPICFMT_TOPIC, deviceID, NULL); in IoTProfilePropertyReport() 324 if (topic == NULL) { in IoTProfilePropertyReport() 328 if ((topic != NULL) && (msg != NULL)) { in IoTProfilePropertyReport() 329 ret = IotSendMsg(0, topic, msg); in IoTProfilePropertyReport() 332 hi_free(0, topic); in IoTProfilePropertyReport()
|
| /vendor/hisilicon/hispark_pegasus/demo/coap_demo/ |
| H A D | iot_main.c | 59 const char *topic; member 84 static int MsgRcvCallBack(unsigned char *context, char *topic, int topicLen, MQTTClient_message *message) in MsgRcvCallBack() argument 93 topicLength = strlen(topic); in MsgRcvCallBack() 103 ret = memcpy_s(buf, bufSize, topic, topicLength); in MsgRcvCallBack() 108 msg->topic = buf; in MsgRcvCallBack() 117 IOT_LOG_DEBUG("RCVMSG:QOS:%d TOPIC:%s PAYLOAD:%s\r\n", msg->qos, msg->topic, msg->payload); in MsgRcvCallBack() 125 MQTTClient_free(topic); in MsgRcvCallBack() 145 ret = MQTTClient_publishMessage(client, msg->topic, &pubmsg, &g_ioTAppCb.tocken); in IoTMsgProcess() 154 g_ioTAppCb.msgCallBack(msg->qos, msg->topic, msg->payload); in IoTMsgProcess() 220 IOT_LOG_ERROR("Subscribe the default topic faile in MqttProcess() 314 IotSendMsg(int qos, const char *topic, const char *payload) IotSendMsg() argument [all...] |
| H A D | iot_profile.c | 160 // use this function to make a topic to publish 240 const char *topic; in IoTProfileCmdResp() local 247 topic = MakeTopic(CN_PROFILE_TOPICFMT_CMDRESP, deviceID, payload->requestID); in IoTProfileCmdResp() 248 if (topic == NULL) { in IoTProfileCmdResp() 252 if ((topic != NULL) && (msg != NULL)) { in IoTProfileCmdResp() 253 ret = IotSendMsg(0, topic, msg); in IoTProfileCmdResp() 256 hi_free(0, topic); in IoTProfileCmdResp() 292 char *topic; in IoTProfilePropertyReport() local 298 topic = MakeTopic(CN_PROFILE_TOPICFMT_PROPERTYREPORT, deviceID, NULL); in IoTProfilePropertyReport() 299 if (topic in IoTProfilePropertyReport() [all...] |
| H A D | app_demo_iot.c | 34 static void DemoMsgRcvCallBack(int qos, const char *topic, const char *payload) in DemoMsgRcvCallBack() argument 39 IOT_LOG_DEBUG("RCVMSG:QOS:%d TOPIC:%s PAYLOAD:%s\r\n", qos, topic, payload); in DemoMsgRcvCallBack() 41 tmp = strstr(topic, CN_COMMAND_INDEX); in DemoMsgRcvCallBack()
|
| H A D | iot_main.h | 19 typedef void (*FnMsgCallBack)(int qos, const char *topic, const char *payload); 37 * @param topic: the iot mqtt topic 43 int IotSendMsg(int qos, const char *topic, const char *payload);
|
| /vendor/hisilicon/hispark_pegasus/demo/oc_demo/ |
| H A D | iot_main.c | 60 const char *topic; member 85 static int MsgRcvCallBack(unsigned char *context, char *topic, int topicLen, MQTTClient_message *message) in MsgRcvCallBack() argument 93 topicLength = strlen(topic); in MsgRcvCallBack() 103 (void)memcpy_s(buf, bufSize, topic, topicLength); in MsgRcvCallBack() 105 msg->topic = buf; in MsgRcvCallBack() 111 IOT_LOG_DEBUG("RCVMSG:QOS:%d TOPIC:%s PAYLOAD:%s\r\n", msg->qos, msg->topic, msg->payload); in MsgRcvCallBack() 119 MQTTClient_free(topic); in MsgRcvCallBack() 139 ret = MQTTClient_publishMessage(client, msg->topic, &pubmsg, &g_ioTAppCb.tocken); in IoTMsgProcess() 148 g_ioTAppCb.msgCallBack(msg->qos, msg->topic, msg->payload); in IoTMsgProcess() 213 IOT_LOG_ERROR("Subscribe the default topic faile in MqttProcess() 303 IotSendMsg(int qos, const char *topic, const char *payload) IotSendMsg() argument [all...] |
| H A D | iot_profile.c | 154 // use this function to make a topic to publish 240 const char *topic; in IoTProfileCmdResp() local 247 topic = MakeTopic(CN_PROFILE_TOPICFMT_CMDRESP, deviceID, payload->requestID); in IoTProfileCmdResp() 248 if (topic == NULL) { in IoTProfileCmdResp() 252 if ((topic != NULL) && (msg != NULL)) { in IoTProfileCmdResp() 253 ret = IotSendMsg(0, topic, msg); in IoTProfileCmdResp() 256 hi_free(0, topic); in IoTProfileCmdResp() 292 char *topic; in IoTProfilePropertyReport() local 298 topic = MakeTopic(CN_PROFILE_TOPICFMT_PROPERTYREPORT, deviceID, NULL); in IoTProfilePropertyReport() 299 if (topic in IoTProfilePropertyReport() [all...] |
| H A D | iot_main.h | 19 typedef void (*FnMsgCallBack)(int qos, const char *topic, const char *payload); 37 * @param topic: the iot mqtt topic 43 int IotSendMsg(int qos, const char *topic, const char *payload);
|
| /third_party/libwebsockets/lib/secure-streams/protocols/ |
| H A D | ss-mqtt.c | 37 if (h->u.mqtt.sub_info.topic) { in secstream_mqtt_cleanup() 39 if (h->u.mqtt.sub_info.topic[i].name) { in secstream_mqtt_cleanup() 40 lws_free((void*)h->u.mqtt.sub_info.topic[i].name); in secstream_mqtt_cleanup() 41 h->u.mqtt.sub_info.topic[i].name = NULL; in secstream_mqtt_cleanup() 44 lws_free(h->u.mqtt.sub_info.topic); in secstream_mqtt_cleanup() 45 h->u.mqtt.sub_info.topic = NULL; in secstream_mqtt_cleanup() 81 " topic with no output\n", in secstream_mqtt_subscribe() 90 "topic", in secstream_mqtt_subscribe() 101 lwsl_err("%s, failed to expand MQTT subscribe topic\n", in secstream_mqtt_subscribe() 121 h->u.mqtt.sub_info.topic in secstream_mqtt_subscribe() 145 secstream_mqtt_publish(struct lws *wsi, uint8_t *buf, size_t buf_len, uint32_t payload_len, const char* topic, lws_mqtt_qos_levels_t qos, uint8_t retain, uint8_t dup, int f) secstream_mqtt_publish() argument 350 secstream_mqtt_is_shadow_matched(struct lws *wsi, const char *topic) secstream_mqtt_is_shadow_matched() argument [all...] |
| /third_party/lwip/src/include/lwip/apps/ |
| H A D | mqtt.h | 77 /** will topic, set to NULL if will is not to be used, 140 * arrives to a subscribed topic @see mqtt_subscribe 155 * arrives to a subscribed topic @see mqtt_subscribe 158 * @param topic Zero terminated Topic text string, topic may not be referenced after callback return 161 typedef void (*mqtt_incoming_publish_cb_t)(void *arg, const char *topic, u32_t tot_len); 189 err_t mqtt_sub_unsub(mqtt_client_t *client, const char *topic, u8_t qos, mqtt_request_cb_t cb, void *arg, u8_t sub); 192 *Subscribe to topic */ 193 #define mqtt_subscribe(client, topic, qos, cb, arg) mqtt_sub_unsub(client, topic, qo [all...] |
| /third_party/libwebsockets/lib/roles/mqtt/client/ |
| H A D | client-mqtt-handshake.c | 63 if (c->conn_flags & LMQCFT_WILL_FLAG && c->will.topic) { in lws_mqtt_client_send_connect() 64 len = len + (unsigned int)c->will.topic->len + 2; in lws_mqtt_client_send_connect() 85 * 4. Payload - Client ID, Will topic & message, in lws_mqtt_client_send_connect() 108 if (lws_mqtt_str_is_not_empty(c->will.topic)) { in lws_mqtt_client_send_connect() 109 lws_ser_wu16be(p, c->will.topic->len); in lws_mqtt_client_send_connect() 111 memcpy(p, c->will.topic->buf, c->will.topic->len); in lws_mqtt_client_send_connect() 112 p += c->will.topic->len; in lws_mqtt_client_send_connect()
|
| H A D | client-mqtt.c | 136 if (cp->will_param.topic && in lws_create_client_mqtt_object() 137 *cp->will_param.topic) { in lws_create_client_mqtt_object() 138 c->will.topic = lws_mqtt_str_create_cstr_dup( in lws_create_client_mqtt_object() 139 cp->will_param.topic, 0); in lws_create_client_mqtt_object() 140 if (!c->will.topic) in lws_create_client_mqtt_object() 178 lws_mqtt_str_free(&c->will.topic); in lws_create_client_mqtt_object()
|
| /third_party/libwebsockets/lib/roles/mqtt/ |
| H A D | mqtt.c | 274 lws_mqtt_validate_topic(const char *topic, size_t topiclen, uint8_t awsiot) in lws_mqtt_validate_topic() argument 277 const char *sub = topic; in lws_mqtt_validate_topic() 284 if (topic[0] == '$') { in lws_mqtt_validate_topic() 291 if (topic[0] == '$') in lws_mqtt_validate_topic() 297 /* topic == "+foo" || "a/+foo" ? */ in lws_mqtt_validate_topic() 301 /* topic == "foo+" or "foo+/a" ? */ in lws_mqtt_validate_topic() 307 /* topic == "foo#" ? */ in lws_mqtt_validate_topic() 311 /* topic == "#foo" ? */ in lws_mqtt_validate_topic() 330 lws_mqtt_create_sub(struct _lws_mqtt_related *mqtt, const char *topic) in lws_mqtt_create_sub() argument 333 size_t topiclen = strlen(topic); in lws_mqtt_create_sub() [all...] |
| /device/soc/hisilicon/hi3861v100/sdk_liteos/third_party/paho.mqtt.c/include/mqtt/ |
| H A D | MQTTClient.h | 164 * Return code: The topic has been truncated (the topic string includes 165 * embedded NULL characters). String functions will not access the full topic. 166 * Use the topic length value to access the full topic. 264 * message topic is not part of this structure (see MQTTClient_publishMessage(), 300 * transmitted to new subscribers to a topic that matches the message topic. 341 * @param topicName The topic associated with the received message. 342 * @param topicLen The length of the topic i [all...] |
| /third_party/libwebsockets/minimal-examples/mqtt-client/minimal-mqtt-client/ |
| H A D | minimal-mqtt-client.c | 24 STATE_SUBSCRIBE, /* subscribe to the topic */ 48 .topic = "good/bye", 65 .topic = &topics[0], 216 pub_param.topic = "test/topic"; in callback_mqtt() 217 pub_param.topic_len = (uint16_t)strlen(pub_param.topic); in callback_mqtt() 287 lwsl_hexdump_notice(pub->topic, pub->topic_len); in callback_mqtt()
|
| /third_party/lwip/src/apps/mqtt/ |
| H A D | mqtt.c | 43 * - Fix restriction of a single topic in each (UN)SUBSCRIBE message (protocol has support for multiple topics) 717 /* Should have topic and pkt id*/ in mqtt_message_received() 718 u8_t *topic; in mqtt_message_received() local 731 LWIP_DEBUGF(MQTT_DEBUG_WARN,( "mqtt_message_received: Received short PUBLISH packet (topic)\n")); in mqtt_message_received() 735 topic = var_hdr_payload + 2; in mqtt_message_received() 739 LWIP_DEBUGF(MQTT_DEBUG_WARN, ("mqtt_message_received: Receive buffer can not fit topic + pkt_id\n")); in mqtt_message_received() 754 /* Take backup of byte after topic */ in mqtt_message_received() 755 bkp = topic[topic_len]; in mqtt_message_received() 757 topic[topic_len] = 0; in mqtt_message_received() 762 LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_incomming_publish: Received message with QoS %d at topic in mqtt_message_received() 1096 mqtt_publish(mqtt_client_t *client, const char *topic, const void *payload, u16_t payload_length, u8_t qos, u8_t retain, mqtt_request_cb_t cb, void *arg) mqtt_publish() argument 1172 mqtt_sub_unsub(mqtt_client_t *client, const char *topic, u8_t qos, mqtt_request_cb_t cb, void *arg, u8_t sub) mqtt_sub_unsub() argument [all...] |
| /third_party/libwebsockets/include/libwebsockets/ |
| H A D | lws-mqtt.h | 105 const char *topic; member 112 const char *topic; member 127 char *topic; /* Topic Name */ member 156 lws_mqtt_topic_elem_t *topic; /* Array of topic elements */ member 351 * \param sub: which topic(s) we want to subscribe to 367 * \param sub: which topic(s) we want to unsubscribe from
|
| /third_party/libwebsockets/minimal-examples/mqtt-client/minimal-mqtt-client-multi/ |
| H A D | minimal-mqtt-client-multi.c | 32 STATE_SUBSCRIBE, /* subscribe to the topic */ 60 .topic = "good/bye", 75 .topic = &topics[0], 273 pss->pub_param.topic = pss->state == STATE_PUBLISH_QOS0 ? in callback_mqtt() 275 pss->pub_param.topic_len = (uint16_t)strlen(pss->pub_param.topic); in callback_mqtt() 354 (int)(item - &items[0]), pub->topic, (int)pub->payload_pos, in callback_mqtt()
|
| /third_party/ffmpeg/fftools/ |
| H A D | opt_common.c | 576 char *topic, *par; in show_help() local 579 topic = av_strdup(arg ? arg : ""); in show_help() 580 if (!topic) in show_help() 582 par = strchr(topic, '='); in show_help() 586 if (!*topic) { in show_help() 587 show_help_default(topic, par); in show_help() 588 } else if (!strcmp(topic, "decoder")) { in show_help() 590 } else if (!strcmp(topic, "encoder")) { in show_help() 592 } else if (!strcmp(topic, "demuxer")) { in show_help() 594 } else if (!strcmp(topic, "muxe in show_help() [all...] |
| /third_party/curl/lib/ |
| H A D | mqtt.c | 419 char **topic, size_t *topiclen) in mqtt_get_topic() 424 result = Curl_urldecode(path + 1, 0, topic, topiclen, REJECT_NADA); in mqtt_get_topic() 426 failf(data, "Too long MQTT topic"); in mqtt_get_topic() 431 failf(data, "No MQTT topic found. Forgot to URL encode it?"); in mqtt_get_topic() 439 char *topic = NULL; in mqtt_subscribe() local 447 result = mqtt_get_topic(data, &topic, &topiclen); in mqtt_subscribe() 453 packetlen = topiclen + 5; /* packetid + topic (has a two byte length field) in mqtt_subscribe() 454 + 2 bytes topic length + QoS byte */ in mqtt_subscribe() 470 memcpy(&packet[5 + n], topic, topiclen); in mqtt_subscribe() 476 free(topic); in mqtt_subscribe() 418 mqtt_get_topic(struct Curl_easy *data, char **topic, size_t *topiclen) mqtt_get_topic() argument 518 char *topic = NULL; mqtt_publish() local [all...] |