project_files/frontlib/model/cfg.h
changeset 7224 5143861c83bd
parent 7175 038e3415100a
child 7230 240620f46dd7
--- a/project_files/frontlib/model/cfg.h	Mon Jun 11 00:06:22 2012 +0200
+++ b/project_files/frontlib/model/cfg.h	Tue Jun 12 11:25:05 2012 +0200
@@ -44,11 +44,32 @@
     bool *mods;
 } flib_cfg;
 
+/**
+ * Read the meta-configuration from the relevant .ini files (e.g. which settings exist,
+ * what are their defaults etc.)
+ *
+ * Returns the meta-configuration or NULL. Destroy the meta-configuration with
+ * flib_cfg_meta_destroy.
+ */
 flib_cfg_meta *flib_cfg_meta_from_ini(const char *settingpath, const char *modpath);
 void flib_cfg_meta_destroy(flib_cfg_meta *metainfo);
 
+/**
+ * Create a new configuration with default settings.
+ * Returns NULL on error.
+ */
 flib_cfg *flib_cfg_create(const flib_cfg_meta *meta, const char *schemeName);
+
+/**
+ * Load a configuration from the ini file.
+ * Returns NULL on error.
+ */
 flib_cfg *flib_cfg_from_ini(const flib_cfg_meta *meta, const char *filename);
+
+/**
+ * Store the configuration to an ini file.
+ * Returns NULL on error.
+ */
 int flib_cfg_to_ini(const flib_cfg_meta *meta, const char *filename, const flib_cfg *config);
 void flib_cfg_destroy(flib_cfg* cfg);