ex

Fork of mbed-os-example-mbed5-blinky by mbed-os-examples

Committer:
TMBOY
Date:
Tue Jul 18 16:54:45 2017 +0800
Revision:
47:9e361da97763
?

Who changed what in which revision?

UserRevisionLine numberNew contents of line
TMBOY 47:9e361da97763 1 // Copyright 2017 Baidu Inc. All Rights Reserved.
TMBOY 47:9e361da97763 2 // Author: Su Hao (suhao@baidu.com)
TMBOY 47:9e361da97763 3 //
TMBOY 47:9e361da97763 4 // Description: Baidu CA configuration.
TMBOY 47:9e361da97763 5
TMBOY 47:9e361da97763 6 #ifndef BAIDU_IOT_TINYDU_IOT_OS_SRC_IOT_BAIDU_CA_SOURCE_BAIDU_CA_CONF_H
TMBOY 47:9e361da97763 7 #define BAIDU_IOT_TINYDU_IOT_OS_SRC_IOT_BAIDU_CA_SOURCE_BAIDU_CA_CONF_H
TMBOY 47:9e361da97763 8
TMBOY 47:9e361da97763 9 #include "baidu_ca_types.h"
TMBOY 47:9e361da97763 10
TMBOY 47:9e361da97763 11 typedef void* bca_conf_handler;
TMBOY 47:9e361da97763 12
TMBOY 47:9e361da97763 13 /*
TMBOY 47:9e361da97763 14 * Create the configuation from buffer
TMBOY 47:9e361da97763 15 *
TMBOY 47:9e361da97763 16 * @Param data, in, the configuation stream
TMBOY 47:9e361da97763 17 * @Param size, in, the data size
TMBOY 47:9e361da97763 18 * @Return bca_conf_handler, the handler for operating the configuation
TMBOY 47:9e361da97763 19 */
TMBOY 47:9e361da97763 20 BCA_INT bca_conf_handler bca_conf_create(const void* data, bca_size_t size);
TMBOY 47:9e361da97763 21
TMBOY 47:9e361da97763 22 /*
TMBOY 47:9e361da97763 23 * Get the string from the configuration by the key
TMBOY 47:9e361da97763 24 *
TMBOY 47:9e361da97763 25 * @Param hdlr, in, the handler for configuation
TMBOY 47:9e361da97763 26 * @Param key, in, the key of the item
TMBOY 47:9e361da97763 27 * @Return const char *, the string value of the key
TMBOY 47:9e361da97763 28 */
TMBOY 47:9e361da97763 29 BCA_INT const char* bca_conf_get_string(bca_conf_handler hdlr, const char* key);
TMBOY 47:9e361da97763 30
TMBOY 47:9e361da97763 31 /*
TMBOY 47:9e361da97763 32 * Get the unsigned short from the configuration by the key
TMBOY 47:9e361da97763 33 *
TMBOY 47:9e361da97763 34 * @Param hdlr, in, the handler for configuation
TMBOY 47:9e361da97763 35 * @Param key, in, the key of the item
TMBOY 47:9e361da97763 36 * @Return bca_u16_t, the unsigned short value of the key
TMBOY 47:9e361da97763 37 */
TMBOY 47:9e361da97763 38 BCA_INT bca_u16_t bca_conf_get_ushort(bca_conf_handler hdlr, const char* key);
TMBOY 47:9e361da97763 39
TMBOY 47:9e361da97763 40 /*
TMBOY 47:9e361da97763 41 * Get the unsigned int from the configuration by the key
TMBOY 47:9e361da97763 42 *
TMBOY 47:9e361da97763 43 * @Param hdlr, in, the handler for configuation
TMBOY 47:9e361da97763 44 * @Param key, in, the key of the item
TMBOY 47:9e361da97763 45 * @Return bca_u32_t, the unsigned int value of the key
TMBOY 47:9e361da97763 46 */
TMBOY 47:9e361da97763 47 BCA_INT bca_u32_t bca_conf_get_uint(bca_conf_handler hdlr, const char* key);
TMBOY 47:9e361da97763 48
TMBOY 47:9e361da97763 49 /*
TMBOY 47:9e361da97763 50 * Get the string from the configuration by the key
TMBOY 47:9e361da97763 51 *
TMBOY 47:9e361da97763 52 * @Param hdlr, in, the handler for configuation
TMBOY 47:9e361da97763 53 */
TMBOY 47:9e361da97763 54 BCA_INT void bca_conf_destroy(bca_conf_handler hdlr);
TMBOY 47:9e361da97763 55
TMBOY 47:9e361da97763 56 #endif // BAIDU_IOT_TINYDU_IOT_OS_SRC_IOT_BAIDU_CA_SOURCE_BAIDU_CA_CONF_H