summaryrefslogtreecommitdiffstats
path: root/common/ini/ini_config.h
diff options
context:
space:
mode:
authorDmitri Pal <dpal@redhat.com>2009-04-10 11:30:59 -0400
committerSimo Sorce <ssorce@redhat.com>2009-04-10 16:59:24 -0400
commit24967bd826ad5437a11b1431c8289b1881b52a17 (patch)
tree2bd20ac84fcba597abc0e492e23ccebb3940b340 /common/ini/ini_config.h
parentbaf568c235c4f8e6e733c47bc0c76bf84b55b9b0 (diff)
downloadsssd-24967bd826ad5437a11b1431c8289b1881b52a17.tar.gz
sssd-24967bd826ad5437a11b1431c8289b1881b52a17.tar.xz
sssd-24967bd826ad5437a11b1431c8289b1881b52a17.zip
Added functions to create list of sections and attributes.
Diffstat (limited to 'common/ini/ini_config.h')
-rw-r--r--common/ini/ini_config.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/common/ini/ini_config.h b/common/ini/ini_config.h
index 2a9aa52a8..95cd52416 100644
--- a/common/ini/ini_config.h
+++ b/common/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 */