3.7. ParametersΒΆ
Abstract parameters utilities.
It is mainly used to give generic parameters to modules.
Functionsstruct parameters * parameters_open(const char * file)Opaque structures. Load the parameters from a file. The file must follow the ini file format.
struct parameters * parameters_create()Create an empty parameter list.
void parameters_free(struct parameters * params)Release a paramerter list.
int parameters_open_section(struct parameters * params, const char * section)Select a section in the parameter list.
int parameters_close_section(struct parameters * params)Close the section.
const char * parameters_get_string(struct parameters * params, const char * key, const char * def)Get the parameter value as a string.
Get the parameter value as a boolean.
int parameters_get_integer(struct parameters * params, const char * key, int def)Get the parameter value as an integer.
bool parameters_set_string(struct parameters * params, const char * key, const char * value)Set or add a string parameter.
Set or add a boolean parameter.
bool parameters_set_integer(struct parameters * params, const char * key, int value)Set or add a integer parameter.