22 #ifndef FOSSCONFIG_H_INCLUDE 23 #define FOSSCONFIG_H_INCLUDE 29 #define RETRIEVE_ERROR 2 66 char*
trim(
char* ptext);
char * fo_config_get_list(fo_conf *conf, char *group, char *key, int idx, GError **error)
char * trim(char *ptext)
Trimming whitespace.
int fo_config_list_length(fo_conf *conf, char *group, char *key, GError **error)
Gets the length of the list associated with a particular list key.
char ** group_set
Array of groups.
void fo_config_join(fo_conf *dst, fo_conf *src, GError **error)
Takes all groups and key from a fo_conf and adds them to another.
GTree * key_sets
Tree of sets of keys.
GTree * group_map
Tree of groups in conf file.
int fo_config_is_list(fo_conf *conf, char *group, char *key, GError **error)
Checks if a particular value is a list or just a normal value.
void fo_config_free(fo_conf *conf)
Frees the memory associated with the internal configuration data structures.
char ** fo_config_key_set(fo_conf *conf, char *group, int *length)
Gets the set of key names for a particular group.
char * fo_config_get(fo_conf *conf, const char *group, const char *key, GError **error)
Gets an element based on its group name and key name. If the group or key is not found, the error object is set and NULL is returned.
fo_conf * conf
The loaded configuration data.
Required group is missing.
Requested group is invalid.
char ** fo_config_group_set(fo_conf *conf, int *length)
Gets the set of group names.
Requested key is invalid.
int n_groups
Number of groups.
fo_conf * fo_config_load(char *fname, GError **error)
Load the configuration information from the provided file.
int fo_config_has_key(fo_conf *conf, char *group, char *key)
Checks if the a specific group in the currently parsed configuration file has a specific key...
int fo_config_has_group(fo_conf *conf, char *group)
Checks if the currently parsed configuration file has a specific group.