Typedefs | |
typedef u_config_list_s | u_config_list_t |
Functions | |
void | u_config_print (u_config_t *c, int lev) |
Print configuration to stdout . | |
int | u_config_add_child (u_config_t *c, const char *key, u_config_t **pc) |
u_config_t * | u_config_get_child_n (u_config_t *c, const char *key, int n) |
u_config_t * | u_config_get_child (u_config_t *c, const char *key) |
int | u_config_get_subkey_nth (u_config_t *c, const char *subkey, int n, u_config_t **pc) |
int | u_config_get_subkey (u_config_t *c, const char *subkey, u_config_t **pc) |
int | u_config_add_key (u_config_t *c, const char *key, const char *val) |
int | u_config_set_key (u_config_t *c, const char *key, const char *val) |
int | u_config_load_from (u_config_t *c, u_config_gets_t cb, void *arg, int overwrite) |
int | u_config_load (u_config_t *c, int fd, int overwrite) |
Load a configuration file. | |
int | u_config_load_from_file (const char *file, u_config_t **pc) |
Create a configuration object reading from a config file. | |
int | u_config_create (u_config_t **pc) |
Create a config object. | |
int | u_config_free (u_config_t *c) |
Free a config object and all its children. | |
const char * | u_config_get_key (u_config_t *c) |
Return the key of a config object. | |
const char * | u_config_get_value (u_config_t *c) |
Return the value of a config object. | |
const char * | u_config_get_subkey_value (u_config_t *c, const char *subkey) |
Return the value of a subkey. | |
int | u_config_get_subkey_value_i (u_config_t *c, const char *subkey, int def, int *out) |
Return the value of an integer subkey. | |
int | u_config_get_subkey_value_b (u_config_t *c, const char *subkey, int def, int *out) |
Return the value of an bool subkey. |
|
Create a config object. Use u_config_set_key(...) to set its key/value pairs.
Definition at line 483 of file config.c. References u_config_free(), and u_zalloc(). Referenced by u_config_add_child(), and u_config_load_from_file(). |
|
Free a config object and all its children.
Definition at line 524 of file config.c. References u_config_free(). Referenced by u_config_create(), u_config_free(), and u_config_load_from_file(). |
|
Return the key string of a config object.
|
|
Return the value of the child config object whose key is
Definition at line 593 of file config.c. References u_config_get_subkey(), and u_config_get_value(). Referenced by u_config_get_subkey_value_b(), and u_config_get_subkey_value_i(). |
|
Return the bool value of the child config object whose key is Recognized bool values are (case insensitive) yes/no, 1/0, enable/disable.
Definition at line 655 of file config.c. References u_config_get_subkey_value(). |
|
Return the integer value (atoi is used for conversion) of the child config object whose key is
Definition at line 617 of file config.c. References u_config_get_subkey_value(). |
|
Return the value string of a config object.
Definition at line 574 of file config.c. Referenced by u_config_get_subkey_value(). |
|
Fill a config object with key/value pairs loaded from the configuration file linked to the descriptor
Definition at line 422 of file config.c. Referenced by u_config_load_from_file(). |
|
Create a configuration object reading from a config file
Definition at line 450 of file config.c. References u_config_create(), u_config_free(), and u_config_load(). |
|
Print a configuration object and its children to
Definition at line 57 of file config.c. References u_config_print(). Referenced by u_config_print(). |