You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.2 KiB
33 lines
1.2 KiB
/*
|
|
* Copyright (C) Hisilicon Technologies Co., Ltd. 2019-2021. All rights reserved.
|
|
* Description: adp ini head
|
|
* Author: Hisilicon
|
|
* Create: 2019-11-01
|
|
*/
|
|
|
|
#ifndef __ADP_INI_EXT_H__
|
|
#define __ADP_INI_EXT_H__
|
|
|
|
#include <stdio.h>
|
|
#include <limits.h>
|
|
#include "td_type.h"
|
|
|
|
#define INI_BUFSIZE 512
|
|
#define SECTION_MAX_LENGTH 64
|
|
|
|
typedef struct {
|
|
td_char file[PATH_MAX];
|
|
td_char section[SECTION_MAX_LENGTH];
|
|
} ini_data_section;
|
|
|
|
td_s32 adp_ini_get_bool(const ini_data_section *ini_data, const td_char key[SECTION_MAX_LENGTH], td_bool *value);
|
|
td_s32 adp_ini_get_long(const ini_data_section *ini_data, const td_char key[SECTION_MAX_LENGTH], long *value);
|
|
td_s32 adp_ini_get_string(const ini_data_section *ini_data, const td_char key[SECTION_MAX_LENGTH],
|
|
td_char *buffer, td_s32 size);
|
|
td_s32 adp_ini_get_float(const ini_data_section *ini_data, const td_char key[SECTION_MAX_LENGTH], float *value);
|
|
td_s32 adp_ini_get_s32(const ini_data_section *ini_data, const td_char key[SECTION_MAX_LENGTH], td_s32 *value);
|
|
td_s32 adp_ini_get_u32(const ini_data_section *ini_data, const td_char key[SECTION_MAX_LENGTH], td_u32 *value);
|
|
td_s32 adp_ini_get_u16(const ini_data_section *ini_data, const td_char key[SECTION_MAX_LENGTH], td_u16 *value);
|
|
|
|
#endif /* __ADP_INI_EXT_H__ */
|