1 /*
2  * Copyright (C) 2015-2017 Alibaba Group Holding Limited
3  */
4 
5 #include <stdlib.h>
6 #include "ota_hal_trans.h"
7 #include "aiot_mqtt_api.h"
8 
9 /*MQTT API*/
ota_hal_mqtt_publish(void * mqtt_client,char * topic,int qos,void * data,int len)10 int ota_hal_mqtt_publish(void *mqtt_client, char *topic, int qos, void *data, int len)
11 {
12     return aiot_mqtt_pub(mqtt_client, topic, data, len, qos);
13 }
14 
ota_hal_mqtt_subscribe(void * mqtt_client,char * topic,void * cb,void * ctx)15 int ota_hal_mqtt_subscribe(void *mqtt_client, char *topic, void* cb, void *ctx)
16 {
17     return aiot_mqtt_sub(mqtt_client, topic, cb, 0, ctx);
18 }
19