diff options
| author | Dmitri Pal <dpal@redhat.com> | 2009-04-10 11:30:59 -0400 |
|---|---|---|
| committer | Simo Sorce <ssorce@redhat.com> | 2009-04-10 16:59:24 -0400 |
| commit | 15221b649ccff0a7b70592b604c8bdef905afd76 (patch) | |
| tree | f7b5ee74fba4bfcef7db19220be5e6fbe3583b6b /ini/ini_config.h | |
| parent | 7a4629f520bb3da6e349909f90489cac16745b0e (diff) | |
| download | ding-libs-15221b649ccff0a7b70592b604c8bdef905afd76.tar.gz ding-libs-15221b649ccff0a7b70592b604c8bdef905afd76.tar.xz ding-libs-15221b649ccff0a7b70592b604c8bdef905afd76.zip | |
Added functions to create list of sections and attributes.
Diffstat (limited to 'ini/ini_config.h')
| -rw-r--r-- | ini/ini_config.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ini/ini_config.h b/ini/ini_config.h index 2a9aa52..95cd524 100644 --- a/ini/ini_config.h +++ b/ini/ini_config.h @@ -96,6 +96,22 @@ void print_file_parsing_errors(FILE *file, /* File to void print_config_parsing_errors(FILE *file, /* File to send errors to */ struct collection_item *error_list); /* Collection of collections of errors */ +/* Get list of sections from the config collection as an array of strings. + * Function allocates memory for the array of the sections. + */ +char **get_section_list(struct collection_item *ini_config, int *size, int *error); + +/* The section array should be freed using this function */ +void free_section_list(char **section_list); + +/* Get list of attributes in a section as an array of strings. + * Function allocates memory for the array of attributes. + */ +char **get_attribute_list(struct collection_item *ini_config, const char *section, int *size, int *error); + +/* The attribute array should be freed using this function */ +void free_attribute_list(char **attr_list); + /* Get a configuration item form the configuration */ int get_config_item(const char *section, /* Section. If NULL assumed default */ const char *name, /* Name of the property to look up */ |
