1 #ifndef _INFRA_DEFS_H_ 2 #define _INFRA_DEFS_H_ 3 4 #include "linkkit/infra/infra_types.h" 5 6 #ifdef __cplusplus 7 extern "C" { 8 #endif 9 10 #define IOTX_SDK_VERSION "3.0.1" 11 #define IOTX_ALINK_VERSION "20" 12 #define IOTX_FIRMWARE_VERSION_LEN (32) 13 #define IOTX_PRODUCT_KEY_LEN (20) 14 #define IOTX_DEVICE_NAME_LEN (32) 15 #define IOTX_DEVICE_SECRET_LEN (64) 16 #define IOTX_DEVICE_ID_LEN (64) 17 #define IOTX_PRODUCT_SECRET_LEN (64) 18 #define IOTX_PARTNER_ID_LEN (64) 19 #define IOTX_MODULE_ID_LEN (64) 20 #define IOTX_NETWORK_IF_LEN (160) 21 #define IOTX_FIRMWARE_VER_LEN (32) 22 #define IOTX_URI_MAX_LEN (135) 23 #define IOTX_DOMAIN_MAX_LEN (64) 24 #define IOTX_CUSTOMIZE_INFO_LEN (80) 25 26 #define DEV_SIGN_SOURCE_MAXLEN (200) 27 #define DEV_SIGN_HOSTNAME_MAXLEN (64) 28 #define DEV_SIGN_CLIENT_ID_MAXLEN (200) 29 #define DEV_SIGN_USERNAME_MAXLEN (64) 30 #define DEV_SIGN_PASSWORD_MAXLEN (65) 31 32 #ifndef _IN_ 33 #define _IN_ 34 #endif 35 36 #ifndef _OU_ 37 #define _OU_ 38 #endif 39 40 #ifndef _IN_OPT_ 41 #define _IN_OPT_ 42 #endif 43 44 #define NETWORK_ADDR_LEN (16) 45 #define HAL_MAC_LEN (17 + 1) /* MAC地址的长度 */ 46 #define STR_SHORT_LEN (32) 47 #ifndef ETH_ALEN 48 #define ETH_ALEN (6) 49 #endif 50 #define HAL_MAX_SSID_LEN \ 51 (32 + 1) /* ssid: 32 octets at most, include the NULL-terminated */ 52 #define HAL_MAX_PASSWD_LEN (64 + 1) /* password: 8-63 ascii */ 53 #define WLAN_CONNECTION_TIMEOUT_MS (30 * 1000) 54 55 typedef enum IOT_RETURN_CODES { 56 ERROR_DEVICE_NOT_EXIST = -311, 57 ERROR_NET_TIMEOUT = -310, 58 ERROR_CERT_VERIFY_FAIL = -309, 59 ERROR_NET_SETOPT_TIMEOUT = -308, 60 ERROR_NET_SOCKET = -307, 61 ERROR_NET_CONNECT = -306, 62 ERROR_NET_BIND = -305, 63 ERROR_NET_LISTEN = -304, 64 ERROR_NET_RECV = -303, 65 ERROR_NET_SEND = -302, 66 ERROR_NET_CONN = -301, 67 ERROR_NET_UNKNOWN_HOST = -300, 68 69 MQTT_SUBHANDLE_LIST_LEN_TOO_SHORT = -47, 70 MQTT_OFFLINE_LIST_LEN_TOO_SHORT = -46, 71 MQTT_TOPIC_LEN_TOO_SHORT = -45, 72 MQTT_CONNECT_BLOCK = -44, 73 MQTT_SUB_INFO_NOT_FOUND_ERROR = -43, 74 MQTT_PUSH_TO_LIST_ERROR = -42, 75 MQTT_TOPIC_FORMAT_ERROR = -41, 76 NETWORK_RECONNECT_TIMED_OUT_ERROR = 77 -40, /** Returned when the Network is disconnected and the reconnect 78 attempt has timed out */ 79 MQTT_CONNACK_UNKNOWN_ERROR = -39, /** Connect request failed with the server 80 returning an unknown error */ 81 MQTT_CONANCK_UNACCEPTABLE_PROTOCOL_VERSION_ERROR = 82 -38, /** Connect request failed with the server returning an 83 unacceptable protocol version error */ 84 MQTT_CONNACK_IDENTIFIER_REJECTED_ERROR = 85 -37, /** Connect request failed with the server returning an identifier 86 rejected error */ 87 MQTT_CONNACK_SERVER_UNAVAILABLE_ERROR = 88 -36, /** Connect request failed with the server returning an unavailable 89 error */ 90 MQTT_CONNACK_BAD_USERDATA_ERROR = 91 -35, /** Connect request failed with the server returning a bad userdata 92 error */ 93 MQTT_CONNACK_NOT_AUTHORIZED_ERROR = 94 -34, /** Connect request failed with the server failing to authenticate 95 the request */ 96 MQTT_CONNECT_ERROR = -33, 97 MQTT_CREATE_THREAD_ERROR = -32, 98 MQTT_PING_PACKET_ERROR = -31, 99 MQTT_CONNECT_PACKET_ERROR = -30, 100 MQTT_CONNECT_ACK_PACKET_ERROR = -29, 101 MQTT_NETWORK_CONNECT_ERROR = -28, 102 MQTT_STATE_ERROR = -27, 103 MQTT_SUBSCRIBE_PACKET_ERROR = -26, 104 MQTT_SUBSCRIBE_ACK_PACKET_ERROR = -25, 105 MQTT_SUBSCRIBE_ACK_FAILURE = -24, 106 MQTT_SUBSCRIBE_QOS_ERROR = -23, 107 MQTT_UNSUBSCRIBE_PACKET_ERROR = -22, 108 MQTT_PUBLISH_PACKET_ERROR = -21, 109 MQTT_PUBLISH_QOS_ERROR = -20, 110 MQTT_PUBLISH_ACK_PACKET_ERROR = -19, 111 MQTT_PUBLISH_COMP_PACKET_ERROR = -18, 112 MQTT_PUBLISH_REC_PACKET_ERROR = -17, 113 MQTT_PUBLISH_REL_PACKET_ERROR = -16, 114 MQTT_UNSUBSCRIBE_ACK_PACKET_ERROR = -15, 115 MQTT_NETWORK_ERROR = -14, 116 MQTT_PUBLISH_ACK_TYPE_ERROR = -13, 117 118 ERROR_SHADOW_NO_METHOD = -2008, 119 ERROR_SHADOW_UNDEF_TYPE = -2007, 120 ERROR_SHADOW_UPDATE_TIMEOUT = -2006, 121 ERROR_SHADOW_UPDATE_NACK = -2005, /**< Negative ACK */ 122 ERROR_SHADOW_NO_ATTRIBUTE = -2004, 123 ERROR_SHADOW_ATTR_NO_EXIST = -2003, /**< NO such attribute */ 124 ERROR_SHADOW_ATTR_EXIST = -2002, /**< attribute already exists */ 125 ERROR_SHADOW_WAIT_LIST_OVERFLOW = -2001, 126 ERROR_SHADOW_INVALID_STATE = -2000, 127 128 ERROR_SUBDEV_NULL_VALUE = -1501, /**< Indicating NULL value*/ 129 ERROR_SUBDEV_NOT_NULL_VALUE = -1500, /**< Indicating value not NULL*/ 130 ERROR_SUBDEV_STRING_NULL_VALUE = 131 -1499, /**< Indicating NULL value or empty string */ 132 ERROR_SUBDEV_INVALID_GATEWAY_HANDLE = 133 -1498, /**< Indicating gateway handle is null or invalid*/ 134 ERROR_SUBDEV_SESSION_NOT_FOUND = -1497, /**< Cannot find device session*/ 135 ERROR_SUBDEV_RRPC_CB_NOT_NULL = 136 -1496, /**< RRPC callback function has been set,needn't to set again*/ 137 ERROR_SUBDEV_REPLY_TYPE_NOT_DEF = -1495, /**< Reply type not defined*/ 138 ERROR_SUBDEV_GET_JSON_VAL = -1494, /**< Get value from reply payload fail*/ 139 ERROR_SUBDEV_DATA_LEN_OVERFLOW = 140 -1493, /**< Length of 'data' value from reply palyoad is large than 141 limit(1024)*/ 142 ERROR_SUBDEV_MSG_LEN = -1492, /**< Indicating msg len is not correct*/ 143 ERROR_SUBDEV_REPLY_PROC = 144 -1491, /**< Error occur when process publish reply */ 145 ERROR_SUBDEV_REPLY_TOPIC_NOT_MATCH = 146 -1490, /**< Indicating that topic received is unknown*/ 147 ERROR_SUBDEV_REPLY_VAL_CHECK = -1489, /**< Indicating that value get from 148 reply checked fail with local*/ 149 ERROR_SUBDEV_REGISTER_TYPE_NOT_DEF = -1488, /**< Register type not support*/ 150 ERROR_SUBDEV_PACKET_SPLICE_FAIL = -1487, /**< Splice packet error*/ 151 ERROR_SUBDEV_MQTT_PUBLISH_FAIL = -1486, /**< MQTT publish fail*/ 152 ERROR_SUBDEV_REPLY_PARSE_FAIL = -1485, /**< Parse reply fail*/ 153 ERROR_SUBDEV_CREATE_SESSION_FAIL = -1484, /**< Create session fail*/ 154 ERROR_SUBDEV_INVALID_CLEAN_SESSION_TYPE = 155 -1483, /**< Clean session not support*/ 156 ERROR_SUBDEV_HAS_BEEN_LOGIN = -1482, /**< Device has been login*/ 157 ERROR_SUBDEV_SUB_UNSUB_FAIL = -1481, /**< subscribe or unsubscribe fail*/ 158 ERROR_SUBDEV_SESSION_STATE_FAIL = 159 -1480, /**< Session state is error,may not login*/ 160 ERROR_SUBDEV_MEMORY_NOT_ENOUGH = -1479, /**< Set memory too small*/ 161 162 ERROR_REPLY_TIMEOUT = -6099, /**< recieve reply timeout*/ 163 ERROR_DEVICE_NOT_FOUND = -6100, /**< device not found*/ 164 ERROR_TOO_LARGE_PAGE_SIZE = -6101, /**< page size must less than 200*/ 165 ERROR_DEVICE_COUNT_FAULT = -6102, /**< device count query service fault*/ 166 ERROR_DEVICE_DETAIL_FAULT = -6103, /**< device detail query service fault*/ 167 ERROR_TOO_LARGE_LIST_SIZE = -6104, /**< list size must less than 200*/ 168 ERROR_LIST_SIZE_CANNOT_BE_ZERO = -6105, /**< list size must greater than 0*/ 169 ERROR_TOO_LARGE_MAP_SIZE = -6106, /**< map size must less than 200*/ 170 ERROR_MAP_SIZE_CANNOT_BE_ZERO = -6107, /**< map size must greater than 0*/ 171 ERROR_DEVICE_STATUS_FAULT = -6108, /**< device status query service fault*/ 172 ERROR_DEVICE_INFO_FAULT = -6109, /**< device info query service fault*/ 173 ERROR_SET_THING_PROPERTIES_ERROR = -6150, /**< set thing properties error*/ 174 ERROR_INVOKE_THING_SERVICE_ERROR = -6151, /**< invoke thing service error*/ 175 ERROR_SCRIPT_REL_NOT_EXIST = -6200, /**< script relation not exist*/ 176 ERROR_SCRIPT_CONVERT_DATA_IS_NULL = 177 -6201, /**< script convert data is null*/ 178 ERROR_DEVICE_PRODUCT_NOT_EXIST = -6202, /**< product not exist*/ 179 ERROR_TOPIC_NOT_EXIST = -6203, /**< topic not exist*/ 180 ERROR_DEVICE_IS_DISABLED = -6204, /**< device is disabled*/ 181 ERROR_IOT_MESSAGE_ERROR = -6205, /**< iot message service error*/ 182 ERROR_PRODUCT_PROPERTY_NOT_EXIST = -6206, /**< product property not exist*/ 183 ERROR_DATA_FORMAT_ERROR = -6207, /**< device data format is error*/ 184 ERROR_THING_STATUS_PROHIBITED = -6208, /**< thing status is prohibited*/ 185 ERROR_THING_STATUS_NOT_ACTIVE = -6209, /**< thing status not active*/ 186 /** 187 * 188 * -6250 ~ -6299 189 */ 190 ERROR_PRODUCT_NOT_FOUND = -6250, /**< product not found*/ 191 ERROR_DEVICE_EXISTS = -6251, /**< device has existed*/ 192 ERROR_JUDGE_DEVICE_EXISTS_ERROR = -6252, /**< judge device exists error*/ 193 ERROR_ADD_DEVICE_FAILED = -6253, /**< add device failed*/ 194 ERROR_UPDATE_DEVICE_FAILED = -6254, /**< update device failed*/ 195 ERROR_INSERT_DGR_FAILED = -6255, /**< insert device group relation failed*/ 196 ERROR_SYN_DEVICE_FAILED = -6256, /**< device synchronization failed*/ 197 ERROR_PRODUCT_DOMAIN_ILLEGAL = -6257, /**< product domain illegal*/ 198 ERROR_TENANID_ILLEGAL = -6258, /**< tenantId illegal*/ 199 ERROR_PRODUCT_REGION_ILLEGAL = -6259, /**< product region illegal*/ 200 ERROR_PRODUCT_NETTYPE_ILLEGAL = -6260, /**< product nettype illegal*/ 201 ERROR_INSERT_DEVICE_APPLY_DETAIL_FAILED = 202 -6261, /**< insert device apply detail failed*/ 203 ERROR_UPDATE_DEVICE_APPLY_STATUS_FAILED = 204 -6262, /**< update device apply status failed*/ 205 ERROR_DELERE_DGR_FAILED = -6263, /**< delete device group relation status*/ 206 ERROR_DELETE_DEVICE_FAILED = -6264, /**< delete device failed*/ 207 ERROR_QUERY_DEVICE_DETAIL_FAILED = -6265, /**< query device detail failed*/ 208 ERROR_QUERY_DEVICE_COUNT_FAILED = -6266, /**< query device count failed*/ 209 ERROR_QUERY_ACTIVE_DEVICE_COUNT_FAILED = 210 -6267, /**< query active device count failed*/ 211 ERROR_INSERT_AGR_FAILED = -6268, /**< insert apply group relation failed*/ 212 ERROR_QUERY_DEVICE_APPLY_FAILED = -6269, /**< query device apply failed*/ 213 ERROR_QUERY_PRODUCT_FAILED = -6270, /**< query product failed*/ 214 ERROR_DEVICE_APPLY_NOT_FOUND = -6271, /**< device apply not found*/ 215 ERROR_RELEASE_TRIAD_FAILED = -6272, /**< release triad failed*/ 216 ERROR_UPDATE_DAD_STATUS_FAILED = 217 -6273, /**< update device apply detail status failed*/ 218 ERROR_REG_LORA_DEVICE_FAILED = -6274, /**< register lora device failed*/ 219 ERROR_SYN_APPLY_DEVICE_FAILED = 220 -6275, /**< device apply synchronization failed*/ 221 ERROR_QUERY_DGR_FAILED = -6276, /**< query device group relation failed*/ 222 ERROR_JUDGE_DGR_FAILED = -6277, /**< judge device group relation failed*/ 223 ERROR_QUERY_AGR_FAILED = -6278, /**< query apply group relation failed*/ 224 ERROR_JUDGE_AGR_FAILED = -6279, /**< judge apply group relation failed*/ 225 ERROR_DEVICENAME_NOT_MEET_SPECS = -6280, /**< devicename not meet specs*/ 226 ERROR_DELETE_APPLY_DEVICE_FAILED = -6281, /**< delete apply device failed*/ 227 ERROR_GEN_DEVICEID_FAILED = -6282, /**< gennerate deviceId failed*/ 228 ERROR_APPLY_ILLEGAL = -6283, /**< apply illegal*/ 229 ERROR_LORA_DEVICE_METHOD_ERROR = 230 -6284, /**< lora device cannot created by num*/ 231 ERROR_APPLY_NOT_READY = -6285, /**< apply not ready*/ 232 233 /** 234 * dsl 235 * -6300 ~ -6349 236 */ 237 ERROR_DSL_PARSE_METHOD_NOT_EXIST = -6300, /**< dsl parse: method not exist*/ 238 ERROR_DSL_PARSE_PARAMS_FORMAT_ERROR = 239 -6301, /**< dsl parse: params format must be JSONObject/JSONArray*/ 240 ERROR_DSL_PARSE_PARAMS_VALUE_EMPTY = 241 -6302, /**< dsl parse: params value empty*/ 242 ERROR_DSL_PARSE_PARAMS_NUMBER_ERROR = 243 -6303, /**< dsl parse: params number error*/ 244 ERROR_DSL_PARSE_PARAMS_NOT_EXIST = -6304, /**< dsl parse: params not exist*/ 245 ERROR_DSL_PARSE_PARAMS_TYPE_ERROR = 246 -6305, /**< dsl parse: params type error*/ 247 ERROR_DSL_PARSE_INT_SPECS_ERROR = -6306, /**< dsl parse: int specs error*/ 248 ERROR_DSL_PARSE_FLOAT_SPECS_ERROR = 249 -6307, /**< dsl parse: float specs error*/ 250 ERROR_DSL_PARSE_BOOL_SPECS_ERROR = -6308, /**< dsl parse: bool specs error*/ 251 ERROR_DSL_PARSE_ENUM_SPECS_ERROR = -6309, /**< dsl parse: enum specs error*/ 252 ERROR_DSL_PARSE_STRING_SPECS_ERROR = 253 -6310, /**< dsl parse: string specs error*/ 254 ERROR_DSL_PARSE_DATE_SPECS_ERROR = -6311, /**< dsl parse: date specs error*/ 255 ERROR_DSL_PARSE_STRUCT_SPECS_ERROR = 256 -6312, /**< dsl parse: struct specs error*/ 257 ERROR_DSL_SERVICE_NOT_AVAILABLE = -6313, /**< dsl service not available*/ 258 ERROR_DSL_PARSE_DATA_TYPE_PARSE_ERROR = 259 -6314, /**< dsl parse: data type parse error*/ 260 ERROR_DATA_NOT_SATISFY_DSL = -6315, /**< dsl parse: data not satisfy dsl*/ 261 ERROR_DSL_PARSE_SPECS_NUMBER_FORMAT_ERROR = 262 -6316, /**< dsl parse: specs number format error*/ 263 ERROR_DSL_PARSE_TEMPLATE_ERROR = -6317, /**< dsl parse: template error*/ 264 ERROR_DSL_EXCEPTION = -6318, /**< dsl exception*/ 265 ERROR_DSL_PARSE_EVENT_CALL_TYPE_ERROR = 266 -6319, /**< dsl parse: event call type error*/ 267 ERROR_DSL_PARSE_NO_PROPERTY = 268 -6320, /**< dsl parse: no property exist in product*/ 269 ERROR_DSL_PARSE_IDENTIFIER_IS_NULL = 270 -6321, /**< dsl parse: template property/params idetifier is null*/ 271 ERROR_DSL_DEVICE_NOT_EXIST_IN_PRODUCT = 272 -6321, /**< dsl: device not exist in product*/ 273 ERROR_DSL_PARSE_DOUBLE_SPECS_ERROR = 274 -6322, /**< dsl parse: double specs error*/ 275 276 /** 277 * 278 * -6350 ~ -6399 279 */ 280 ERROR_EVENT_PUT_ERROR = -6350, /**< thing event put error*/ 281 ERROR_SERVICE_PUT_ERROR = -6351, /**< thing service put error*/ 282 ERROR_DEVICE_GET_EVENT_FAULT = -6352, /**< thing event get error*/ 283 ERROR_PRODUCT_KEY_ELEMENT_ALREADY_EXIST = 284 -6353, /**< product key element already exist*/ 285 286 /** 287 * 288 * -6400 ~ -6449 289 */ 290 ERROR_TOPO_RELATION_COUNT_EXCEED = -6400, /**< topo relation count exceed*/ 291 ERROR_TOPO_RELATION_NOT_EXIST = -6401, /**< topo relation not exist*/ 292 ERROR_TOPO_RELATION_CANNOT_ADD_BYSELF = 293 -6402, /**< topo relation cannot add by self*/ 294 295 /** 296 * alink 297 * -6450 ~ -6469 298 */ 299 ERROR_ALINK_METHOD_NOT_EXIST = -6450, /**< alink method not exist*/ 300 301 /** 302 * 303 * -6550 ~ -6599 304 */ 305 ERROR_DEVICE_GROUP_NOT_FOUND = -6550, /**< device group not found*/ 306 307 /** 308 * @brief dev_sign 309 * 310 * -1100 ~ -1200 311 * 312 */ 313 ERROR_DEV_SIGN_CUSTOM_DOMAIN_IS_NULL = -1105, 314 ERROR_DEV_SIGN_SOURCE_TOO_SHORT = -1104, 315 ERROR_DEV_SIGN_PASSWORD_TOO_SHORT = -1103, 316 ERROR_DEV_SIGN_USERNAME_TOO_SHORT = -1102, 317 ERROR_DEV_SIGN_CLIENT_ID_TOO_SHORT = -1101, 318 ERROR_DEV_SIGN_HOST_NAME_TOO_SHORT = -1100, 319 320 ERROR_NO_MEM = -1016, 321 ERROR_CERTIFICATE_EXPIRED = -1015, 322 ERROR_MALLOC = -1014, 323 ERROR_NO_ENOUGH_MEM = -1013, /**< Writes more than size value. */ 324 325 ERROR_NO_SUPPORT = -12, 326 ERROR_NO_PERSISTENCE = -11, 327 ERROR_HTTP_BREAK = -10, 328 ERROR_NULL_VALUE = -9, 329 ERROR_HTTP_CONN = -8, /**< Connection failed. */ 330 ERROR_HTTP_PARSE = -7, /**< A URL parse error occurred. */ 331 ERROR_HTTP_UNRESOLVED_DNS = -6, /**< Could not resolve the hostname. */ 332 ERROR_HTTP_PRTCL = -5, /**< A protocol error occurred. */ 333 ERROR_HTTP = -4, /**< An unknown error occurred. */ 334 ERROR_HTTP_CLOSED = -3, /**< Connection was closed by a remote host. */ 335 NULL_VALUE_ERROR = -2, 336 337 FAIL_RETURN = -1, /**< generic error. */ 338 SUCCESS_RETURN = 0, 339 340 /* @value > 0, reserved for other usage */ 341 342 } iotx_err_t; 343 344 typedef struct _iotx_dev_meta_info { 345 char product_key[IOTX_PRODUCT_KEY_LEN + 1]; 346 char product_secret[IOTX_PRODUCT_SECRET_LEN + 1]; 347 char device_name[IOTX_DEVICE_NAME_LEN + 1]; 348 char device_secret[IOTX_DEVICE_SECRET_LEN + 1]; 349 } iotx_dev_meta_info_t; 350 351 typedef struct { 352 const char *topic; 353 void *callback; 354 } iotx_user_subscribe_context; 355 356 typedef struct { 357 const char *region; 358 uint16_t port; 359 } iotx_region_item_t; 360 361 typedef enum { 362 IOTX_CLOUD_REGION_SHANGHAI, /* Shanghai */ 363 IOTX_CLOUD_REGION_SINGAPORE, /* Singapore */ 364 IOTX_CLOUD_REGION_JAPAN, /* Japan */ 365 IOTX_CLOUD_REGION_USA_WEST, /* America */ 366 IOTX_CLOUD_REGION_GERMANY, /* Germany */ 367 IOTX_CLOUD_REGION_CUSTOM, /* Custom setting */ 368 IOTX_CLOUD_DOMAIN_MAX /* Maximum number of domain */ 369 } iotx_mqtt_region_types_t; 370 371 #define IOTX_MQTT_DOMAIN_NUMBER (6) 372 extern const char *g_infra_mqtt_domain[IOTX_MQTT_DOMAIN_NUMBER]; 373 374 typedef enum { 375 IOTX_HTTP_REGION_SHANGHAI, /* Shanghai */ 376 IOTX_HTTP_REGION_SINGAPORE, /* Singapore */ 377 IOTX_HTTP_REGION_JAPAN, /* Japan */ 378 IOTX_HTTP_REGION_AMERICA, /* America */ 379 IOTX_HTTP_REGION_GERMANY, /* Germany */ 380 IOTX_HTTP_REGION_CUSTOM, /* Custom setting */ 381 IOTX_HTTP_REGION_MAX /* Maximum number of domain */ 382 } iotx_http_region_types_t; 383 384 /** 385 * @brief contains iot_ioctl context 386 * 387 */ 388 typedef struct { 389 int domain_type; 390 int dynamic_register; 391 char cloud_custom_domain[IOTX_DOMAIN_MAX_LEN + 1]; 392 uint16_t mqtt_port_num; 393 char http_custom_domain[IOTX_DOMAIN_MAX_LEN + 1]; 394 char mqtt_customzie_info[IOTX_CUSTOMIZE_INFO_LEN + 1]; 395 } sdk_impl_ctx_t; 396 397 typedef struct { 398 char hostname[DEV_SIGN_HOSTNAME_MAXLEN]; 399 uint16_t port; 400 char clientid[DEV_SIGN_CLIENT_ID_MAXLEN]; 401 char username[DEV_SIGN_USERNAME_MAXLEN]; 402 char password[DEV_SIGN_PASSWORD_MAXLEN]; 403 } iotx_sign_mqtt_t; 404 405 #define IOTX_HTTP_DOMAIN_NUMBER (6) 406 extern const char *g_infra_http_domain[IOTX_HTTP_DOMAIN_NUMBER]; 407 408 extern int iotx_facility_json_print(const char *str, int level, ...); 409 #ifdef __cplusplus 410 } 411 #endif 412 #endif 413