21 #ifndef SL_LOGGER_CONFIG_H
22 #define SL_LOGGER_CONFIG_H
79 int config_handler(
void *user,
const char *section,
const char *name,
const char *value);
bool new_config(ini_config *c)
Initialise a new ini_config instance.
void destroy_config(ini_config *c)
Destroy ini_config instance.
void print_config(ini_config *c)
Print ini_config instance to stdout.
int config_parse_bool(const char *b)
Parse string to boolean.
char * config_qstrdup(const char *c)
Duplicate string, stripping optional leading/trailing quote marks.
config_kv * config_get_option(const ini_config *in, const char *sn, const char *kn)
Find configuration option by section and key names.
int config_handler(void *user, const char *section, const char *name, const char *value)
Populate ini_config instance with values from file.
config_section * config_get_section(const ini_config *in, const char *sn)
Find configuration section by name.
config_kv * config_get_key(const config_section *cs, const char *kn)
Find configugration key within specific section, by name.
Represent a key=value pair.
char * value
Configuration item value.
char * key
Configuration item key.
Configuration file section.
int numopts
Number of *opts in use.
config_kv * opts
Key=value pairs belonging to this section.
char * name
Section [tag].
size_t optsize
Allocated size of *opts.
Representation of a parsed .ini file.
config_section * sects
Array of sections.
int numsects
Number of sections defined.
size_t sectsize
Allocated size of *sects.