libini_config
0.4.0
|
Functions | |
char ** | ini_get_section_list (struct ini_cfgobj *ini_config, int *size, int *error) |
Get list of sections. More... | |
void | ini_free_section_list (char **section_list) |
Free list of sections. More... | |
char ** | ini_get_attribute_list (struct ini_cfgobj *ini_config, const char *section, int *size, int *error) |
Get list of attributes. More... | |
void | ini_free_attribute_list (char **attr_list) |
Free list of attributes. More... | |
Functions in this section allow getting the lists of sections in the configuration file and keys in a section as arrays of strings.
char** ini_get_section_list | ( | struct ini_cfgobj * | ini_config, |
int * | size, | ||
int * | error | ||
) |
Get list of sections.
Get list of sections from the configuration object as an array of strings. Function allocates memory for the array of the sections. Use ini_free_section_list() to free allocated memory.
[in] | ini_config | Configuration object. |
[out] | size | If not NULL parameter will receive number of sections in the configuration. |
[out] | error | If not NULL parameter will receive the error code. 0 - Success. EINVAL - Invalid parameter. ENOMEM - No memory. |
void ini_free_section_list | ( | char ** | section_list | ) |
Free list of sections.
The section array created by ini_get_section_list() should be freed using this function.
[in] | section_list | Array of strings returned by ini_get_section_list() function. |
char** ini_get_attribute_list | ( | struct ini_cfgobj * | ini_config, |
const char * | section, | ||
int * | size, | ||
int * | error | ||
) |
Get list of attributes.
Get list of attributes in a section as an array of strings. Function allocates memory for the array of attributes. Use ini_free_attribute_list() to free allocated memory.
[in] | ini_config | Configuration object. |
[in] | section | Section name. |
[out] | size | If not NULL parameter will receive number of attributes in the section. |
[out] | error | If not NULL parameter will receive the error code. 0 - Success. EINVAL - Invalid parameter. ENOMEM - No memory. |
void ini_free_attribute_list | ( | char ** | attr_list | ) |
Free list of attributes.
The attribute array created by ini_get_attribute_list() should be freed using this function.
[in] | attr_list | Array of strings returned by ini_get_attribute_list() function. |