TuyaOS
结构体 | 宏定义 | 类型定义 | 函数
tuya_iot_internal_api.h 文件参考
#include "tuya_cloud_types.h"
#include "ty_cJSON.h"
#include "tuya_cloud_com_defs.h"
tuya_iot_internal_api.h 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

结构体

struct  IOT_TY_DB_RW_S
 

宏定义

#define VT_BOOL   5
 
#define VT_BYTE   1
 
#define VT_CHAR   0
 
#define VT_INT   4
 
#define VT_RAW   7
 
#define VT_SHORT   2
 
#define VT_STRING   6
 
#define VT_USHORT   3
 

类型定义

typedef OPERATE_RET(* IOT_HTTP_GET_FILE_DATA_CB) (IN PVOID_T priv_data, IN CONST UINT_T total_len, IN CONST UINT_T offset, IN CONST BYTE_T *data, IN CONST UINT_T len, OUT UINT_T *remain_len)
 
typedef OPERATE_RET(* iot_mqc_protocol_handler_cb) (IN ty_cJSON *root_json)
 
typedef VOID(* iot_mqc_publish_result_cb) (IN CONST OPERATE_RET op_ret, IN CONST VOID *prv_data)
 
typedef PVOID_T IOT_RAW_HTTP_S
 
typedef OPERATE_RET(* iot_special_dp_cb) (IN CONST UINT16_T dpid, IN CONST ty_cJSON *dp_obj)
 
typedef BYTE_T IOT_VAR_TP_T
 
typedef VOID(* PRE_GW_UG_INFORM_CB) (INOUT BOOL_T *handled, IN CONST FW_UG_S *fw)
 

函数

OPERATE_RET iot_gw_update_versions (VOID)
 iot_gw_update_versions 更多...
 
OPERATE_RET iot_gw_user_token_bind (IN CHAR_T *token)
 iot_gw_user_token_bind 更多...
 
OPERATE_RET iot_httpc_common_post (IN CONST CHAR_T *api_name, IN CONST CHAR_T *api_ver, IN CONST CHAR_T *uuid, IN CONST CHAR_T *devid, IN CHAR_T *post_data, IN CONST CHAR_T *p_head_other, OUT ty_cJSON **pp_result)
 iot_httpc_common_post 更多...
 
OPERATE_RET iot_httpc_common_post_no_remalloc (IN CONST CHAR_T *api_name, IN CONST CHAR_T *api_ver, IN CONST CHAR_T *uuid, IN CONST CHAR_T *devid, IN CHAR_T *post_data, IN UINT_T data_total_len, IN CONST CHAR_T *p_head_other, OUT ty_cJSON **pp_result)
 iot_httpc_common_post_no_remalloc @desc http api 更多...
 
OPERATE_RET iot_httpc_common_post_simple (IN CONST CHAR_T *api_name, IN CONST CHAR_T *api_ver, IN CHAR_T *post_data, IN CONST CHAR_T *p_head_other, OUT ty_cJSON **pp_result)
 iot_httpc_common_post_simple 更多...
 
OPERATE_RET iot_httpc_download_file (IN CONST CHAR_T *url, IN CONST UINT_T mlk_buf_len, IN CONST IOT_HTTP_GET_FILE_DATA_CB gfd_cb, IN PVOID_T priv_data, IN CONST UINT_T total_len, INOUT BYTE_T file_hmac[32])
 iot_httpc_download_file 更多...
 
OPERATE_RET iot_httpc_raw_close (IN IOT_RAW_HTTP_S p_raw_http)
 iot_httpc_raw_close 更多...
 
OPERATE_RET iot_httpc_raw_get (IN CONST CHAR_T *p_url, INOUT IOT_RAW_HTTP_S *pp_raw_http, IN UINT_T offset, IN UINT_T total_len)
 iot_httpc_raw_get 更多...
 
OPERATE_RET iot_httpc_raw_post (IN CONST CHAR_T *p_url, IN CONST UINT_T data_total_len, INOUT IOT_RAW_HTTP_S *pp_raw_http)
 iot_httpc_raw_post 更多...
 
OPERATE_RET iot_httpc_raw_put (IN CONST CHAR_T *p_url, IN CONST UINT_T data_total_len, INOUT IOT_RAW_HTTP_S *pp_raw_http)
 iot_httpc_raw_put 更多...
 
INT_T iot_httpc_raw_read_content (IN IOT_RAW_HTTP_S p_raw_http, IN BYTE_T *buf, IN CONST UINT_T buf_len)
 iot_httpc_raw_read_content 更多...
 
OPERATE_RET iot_httpc_raw_read_resp_header (INOUT IOT_RAW_HTTP_S p_raw_http, OUT INT_T *p_status_code, OUT BOOL_T *p_chunked, OUT UINT_T *p_content_len)
 iot_httpc_raw_read_resp_header 更多...
 
INT_T iot_httpc_raw_write_content (IN IOT_RAW_HTTP_S p_raw_http, IN CONST BYTE_T *buf, IN CONST UINT_T buf_len, BOOL_T chunked)
 iot_httpc_raw_write_content 更多...
 
OPERATE_RET iot_mqc_app_register_cb (UINT_T mq_pro, iot_mqc_protocol_handler_cb handler)
 iot_mqc_app_register_cb @desc 注册mqtt事件回调函数 更多...
 
OPERATE_RET iot_mqc_send_custom_msg (IN CONST UINT_T protocol, IN CONST CHAR_T *data, IN CONST BYTE_T qos, IN CONST UINT_T to_lmt, IN CONST iot_mqc_publish_result_cb cb, IN VOID *prv_data)
 iot_mqc_send_custom_msg 更多...
 
OPERATE_RET iot_put_cloud_config (IN CONST CHAR_T *data)
 iot_put_cloud_config @desc the project switches to the release, reporting configuration 更多...
 
VOID iot_register_pre_gw_ug_cb (IN PRE_GW_UG_INFORM_CB pre_ug_cb)
 iot_register_pre_gw_ug_cb 更多...
 
OPERATE_RET iot_special_dp_register_cb (IN iot_special_dp_cb handler)
 iot_special_dp_register_cb 更多...
 
INT_T iot_tls_register_x509_crt_der (VOID *p_ctx, UCHAR_T *p_der, UINT_T der_len)
 iot_tls_register_x509_crt_der @desc Parse one or more PEM certificates from a buffer and add them to the chained list 更多...
 
OPERATE_RET iot_wd_common_delete (IN CONST CHAR_T *key)
 iot_wd_common_delete @desc wd delete 更多...
 
OPERATE_RET iot_wd_common_free_data (IN BYTE_T *data)
 iot_wd_common_free_data @desc wd free 更多...
 
OPERATE_RET iot_wd_common_read (IN CONST CHAR_T *key, OUT BYTE_T **value, OUT UINT_T *p_len)
 iot_wd_common_read @desc wd read 更多...
 
OPERATE_RET iot_wd_common_write (IN CONST CHAR_T *key, IN CONST BYTE_T *value, IN CONST UINT_T len)
 iot_wd_common_write @desc wd write 更多...
 
OPERATE_RET iot_wd_gw_desc_if_read (OUT VOID *di)
 iot_wd_gw_desc_if_read @desc wd read gateway information 更多...
 
OPERATE_RET iot_wd_gw_write_country_code (CHAR_T *country_code)
 iot_wd_gw_write_country_code @desc wd write country code 更多...
 
OPERATE_RET iot_wd_utils_deserialize (IN CONST CHAR_T *in, INOUT IOT_TY_DB_RW_S *rw, IN CONST UINT_T rw_cnt)
 iot_wd_utils_deserialize 更多...
 
OPERATE_RET iot_wd_utils_free_outbuf (IN CHAR_T *out_buf)
 iot_wd_utils_free_outbuf 更多...
 
OPERATE_RET iot_wd_utils_serialize (IN CONST IOT_TY_DB_RW_S *rw, IN CONST UINT_T rw_cnt, OUT CHAR_T **out, OUT UINT_T *out_len)
 iot_wd_utils_serialize 更多...
 
BOOL_T tuya_iot_compare_two_string (IN CONST CHAR_T *cString1, IN CONST CHAR_T *cString2)
 tuya_iot_compare_two_string 更多...
 
CHAR_T * tuya_iot_get_json_safety_string (IN CONST CHAR_T *json)
 tuya_iot_get_json_safety_string @desc will change the (") to the (\") in json file 更多...
 
OPERATE_RET tuya_iot_put_cloud_config (IN CONST CHAR_T *data)
 tuya_iot_put_cloud_config 更多...
 

详细描述

作者
tuya
版本
1.0.0
日期
2021-01-12

函数说明

◆ iot_gw_update_versions()

OPERATE_RET iot_gw_update_versions ( VOID  )

iot_gw_update_versions

返回
OPERATE_RET

◆ iot_gw_user_token_bind()

OPERATE_RET iot_gw_user_token_bind ( IN CHAR_T *  token)

iot_gw_user_token_bind

参数
[in]token
返回
OPERATE_RET

◆ iot_httpc_common_post()

OPERATE_RET iot_httpc_common_post ( IN CONST CHAR_T *  api_name,
IN CONST CHAR_T *  api_ver,
IN CONST CHAR_T *  uuid,
IN CONST CHAR_T *  devid,
IN CHAR_T *  post_data,
IN CONST CHAR_T *  p_head_other,
OUT ty_cJSON **  pp_result 
)

iot_httpc_common_post

参数
[in]api_name
[in]api_ver
[in]uuid
[in]devid
[in]post_data
[in]p_head_other
[out]pp_result
返回
OPERATE_RET

◆ iot_httpc_common_post_no_remalloc()

OPERATE_RET iot_httpc_common_post_no_remalloc ( IN CONST CHAR_T *  api_name,
IN CONST CHAR_T *  api_ver,
IN CONST CHAR_T *  uuid,
IN CONST CHAR_T *  devid,
IN CHAR_T *  post_data,
IN UINT_T  data_total_len,
IN CONST CHAR_T *  p_head_other,
OUT ty_cJSON **  pp_result 
)

iot_httpc_common_post_no_remalloc @desc http api

参数
[in]api_name
[in]api_ver
[in]uuid
[in]devid
[in]post_data
[in]data_total_len
[in]p_head_other
[out]pp_result
返回
OPERATE_RET

◆ iot_httpc_common_post_simple()

OPERATE_RET iot_httpc_common_post_simple ( IN CONST CHAR_T *  api_name,
IN CONST CHAR_T *  api_ver,
IN CHAR_T *  post_data,
IN CONST CHAR_T *  p_head_other,
OUT ty_cJSON **  pp_result 
)

iot_httpc_common_post_simple

参数
[in]api_name
[in]api_ver
[in]post_data
[in]p_head_other
[out]pp_result
返回
OPERATE_RET

◆ iot_httpc_download_file()

OPERATE_RET iot_httpc_download_file ( IN CONST CHAR_T *  url,
IN CONST UINT_T  mlk_buf_len,
IN CONST IOT_HTTP_GET_FILE_DATA_CB  gfd_cb,
IN PVOID_T  priv_data,
IN CONST UINT_T  total_len,
INOUT BYTE_T  file_hmac[32] 
)

iot_httpc_download_file

参数
[in]url
[in]mlk_buf_len
[in]gfd_cb
[in]priv_data
[in]total_len
[in/out]file_hmac[32]
返回
OPERATE_RET

◆ iot_httpc_raw_close()

OPERATE_RET iot_httpc_raw_close ( IN IOT_RAW_HTTP_S  p_raw_http)

iot_httpc_raw_close

参数
[in]p_raw_http
返回
OPERATE_RET

◆ iot_httpc_raw_get()

OPERATE_RET iot_httpc_raw_get ( IN CONST CHAR_T *  p_url,
INOUT IOT_RAW_HTTP_S *  pp_raw_http,
IN UINT_T  offset,
IN UINT_T  total_len 
)

iot_httpc_raw_get

参数
[in]p_url
[out]pp_raw_http
[in]offset
[in]total_len
返回
OPERATE_RET

◆ iot_httpc_raw_post()

OPERATE_RET iot_httpc_raw_post ( IN CONST CHAR_T *  p_url,
IN CONST UINT_T  data_total_len,
INOUT IOT_RAW_HTTP_S *  pp_raw_http 
)

iot_httpc_raw_post

参数
[in]p_url
[in]data_total_len
[in/out]pp_raw_http
返回
OPERATE_RET

◆ iot_httpc_raw_put()

OPERATE_RET iot_httpc_raw_put ( IN CONST CHAR_T *  p_url,
IN CONST UINT_T  data_total_len,
INOUT IOT_RAW_HTTP_S *  pp_raw_http 
)

iot_httpc_raw_put

参数
[in]p_url
[in]data_total_len
[out]pp_raw_http
返回
OPERATE_RET

◆ iot_httpc_raw_read_content()

INT_T iot_httpc_raw_read_content ( IN IOT_RAW_HTTP_S  p_raw_http,
IN BYTE_T *  buf,
IN CONST UINT_T  buf_len 
)

iot_httpc_raw_read_content

参数
[in]p_raw_http
[in]buf
[in]buf_len
返回
result

◆ iot_httpc_raw_read_resp_header()

OPERATE_RET iot_httpc_raw_read_resp_header ( INOUT IOT_RAW_HTTP_S  p_raw_http,
OUT INT_T *  p_status_code,
OUT BOOL_T *  p_chunked,
OUT UINT_T *  p_content_len 
)

iot_httpc_raw_read_resp_header

参数
[in/out]p_raw_http
[out]p_status_code
[out]p_chunked
[out]p_content_len
返回
OPERATE_RET

◆ iot_httpc_raw_write_content()

INT_T iot_httpc_raw_write_content ( IN IOT_RAW_HTTP_S  p_raw_http,
IN CONST BYTE_T *  buf,
IN CONST UINT_T  buf_len,
BOOL_T  chunked 
)

iot_httpc_raw_write_content

参数
[in]p_raw_http
[in]buf
[in]buf_len
[in]chunked
返回
result

◆ iot_mqc_app_register_cb()

OPERATE_RET iot_mqc_app_register_cb ( UINT_T  mq_pro,
iot_mqc_protocol_handler_cb  handler 
)

iot_mqc_app_register_cb @desc 注册mqtt事件回调函数

参数
[in]mq_pro
[in]handler
返回
OPERATE_RET

◆ iot_mqc_send_custom_msg()

OPERATE_RET iot_mqc_send_custom_msg ( IN CONST UINT_T  protocol,
IN CONST CHAR_T *  data,
IN CONST BYTE_T  qos,
IN CONST UINT_T  to_lmt,
IN CONST iot_mqc_publish_result_cb  cb,
IN VOID *  prv_data 
)

iot_mqc_send_custom_msg

参数
[in]protocol
[in]data
[in]qos
[in]to_lmt
[in]cb
[in]prv_data
返回
OPERATE_RET

◆ iot_put_cloud_config()

OPERATE_RET iot_put_cloud_config ( IN CONST CHAR_T *  data)

iot_put_cloud_config @desc the project switches to the release, reporting configuration

参数
[in]data
返回
OPERATE_RET

◆ iot_register_pre_gw_ug_cb()

VOID iot_register_pre_gw_ug_cb ( IN PRE_GW_UG_INFORM_CB  pre_ug_cb)

iot_register_pre_gw_ug_cb

参数
pre_ug_cb
返回
none

◆ iot_special_dp_register_cb()

OPERATE_RET iot_special_dp_register_cb ( IN iot_special_dp_cb  handler)

iot_special_dp_register_cb

参数
[in]handler
返回
OPERATE_RET

◆ iot_tls_register_x509_crt_der()

INT_T iot_tls_register_x509_crt_der ( VOID *  p_ctx,
UCHAR_T *  p_der,
UINT_T  der_len 
)

iot_tls_register_x509_crt_der @desc Parse one or more PEM certificates from a buffer and add them to the chained list

参数
[in]p_ctx
[in]p_der
[in]der_len
返回
result

◆ iot_wd_common_delete()

OPERATE_RET iot_wd_common_delete ( IN CONST CHAR_T *  key)

iot_wd_common_delete @desc wd delete

参数
[in]key
返回
OPERATE_RET

◆ iot_wd_common_free_data()

OPERATE_RET iot_wd_common_free_data ( IN BYTE_T *  data)

iot_wd_common_free_data @desc wd free

参数
[in]data
返回
OPERATE_RET

◆ iot_wd_common_read()

OPERATE_RET iot_wd_common_read ( IN CONST CHAR_T *  key,
OUT BYTE_T **  value,
OUT UINT_T *  p_len 
)

iot_wd_common_read @desc wd read

参数
[in]key
[out]value
[out]p_len
返回
OPERATE_RET

◆ iot_wd_common_write()

OPERATE_RET iot_wd_common_write ( IN CONST CHAR_T *  key,
IN CONST BYTE_T *  value,
IN CONST UINT_T  len 
)

iot_wd_common_write @desc wd write

参数
[in]key
[in]value
[in]len
返回
OPERATE_RET

◆ iot_wd_gw_desc_if_read()

OPERATE_RET iot_wd_gw_desc_if_read ( OUT VOID *  di)

iot_wd_gw_desc_if_read @desc wd read gateway information

参数
[out]di
返回
OPERATE_RET

◆ iot_wd_gw_write_country_code()

OPERATE_RET iot_wd_gw_write_country_code ( CHAR_T *  country_code)

iot_wd_gw_write_country_code @desc wd write country code

参数
[in]country_code
返回
OPERATE_RET

◆ iot_wd_utils_deserialize()

OPERATE_RET iot_wd_utils_deserialize ( IN CONST CHAR_T *  in,
INOUT IOT_TY_DB_RW_S rw,
IN CONST UINT_T  rw_cnt 
)

iot_wd_utils_deserialize

参数
[in]in
[in]rw
[in]rw_cnt
返回
OPERATE_RET

◆ iot_wd_utils_free_outbuf()

OPERATE_RET iot_wd_utils_free_outbuf ( IN CHAR_T *  out_buf)

iot_wd_utils_free_outbuf

参数
[out]out_buf
返回
OPERATE_RET

◆ iot_wd_utils_serialize()

OPERATE_RET iot_wd_utils_serialize ( IN CONST IOT_TY_DB_RW_S rw,
IN CONST UINT_T  rw_cnt,
OUT CHAR_T **  out,
OUT UINT_T *  out_len 
)

iot_wd_utils_serialize

参数
[in]rw
[in]rw_cnt
[out]out
[out]out_len
返回
OPERATE_RET

◆ tuya_iot_compare_two_string()

BOOL_T tuya_iot_compare_two_string ( IN CONST CHAR_T *  cString1,
IN CONST CHAR_T *  cString2 
)

tuya_iot_compare_two_string

参数
cString1
cString2
返回
参数
[in]cString1
[in]cString2
返回

◆ tuya_iot_get_json_safety_string()

CHAR_T * tuya_iot_get_json_safety_string ( IN CONST CHAR_T *  json)

tuya_iot_get_json_safety_string @desc will change the (") to the (\") in json file

参数
[in]json
返回
注解
user shoule free memory

◆ tuya_iot_put_cloud_config()

OPERATE_RET tuya_iot_put_cloud_config ( IN CONST CHAR_T *  data)

tuya_iot_put_cloud_config

参数
[in]data
返回
OPERATE_RET