check
[oweals/gnunet.git] / src / include / gnunet_configuration_lib.h
index 61ebd35fb8c9670b367d2afd4a43c4f139bbf1e1..87aa8eacc7161363c527e77f93dc2ef198389b74 100644 (file)
@@ -76,7 +76,7 @@ void GNUNET_CONFIGURATION_destroy (struct GNUNET_CONFIGURATION_Handle *cfg);
  * to overwrite the defaults.
  *
  * @param cfg configuration to update
- * @param filename name of the configuration file
+ * @param filename name of the configuration file, NULL to load defaults
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
 int GNUNET_CONFIGURATION_load (struct GNUNET_CONFIGURATION_Handle *cfg,
@@ -141,6 +141,16 @@ typedef void (*GNUNET_CONFIGURATION_Iterator)(void *cls,
                                              const char *value);
 
 
+/**
+ * Function to iterate over section.
+ *
+ * @param cls closure
+ * @param section name of the section
+ */
+typedef void (*GNUNET_CONFIGURATION_Section_Iterator)(void *cls,
+                                             const char *section);
+
+
 /**
  * Iterate over all options in the configuration.
  *
@@ -153,6 +163,17 @@ void GNUNET_CONFIGURATION_iterate (const struct GNUNET_CONFIGURATION_Handle *cfg
                                   void *iter_cls);
 
 
+/**
+ * Iterate over all sections in the configuration.
+ *
+ * @param cfg configuration to inspect
+ * @param iter function to call on each section
+ * @param iter_cls closure for iter
+ */
+void GNUNET_CONFIGURATION_iterate_sections (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                                            GNUNET_CONFIGURATION_Section_Iterator iter,
+                                            void *iter_cls);
+
 /**
  * Get a configuration value that should be a number.
  *