43typedef enum xtc_cfg_kind {
52typedef int (*xtc_cfg_validator_fn)(
const void *new_val,
void *user);
53typedef void (*xtc_cfg_changed_fn)(
const char *name,
const void *old_val,
54 const void *new_val,
void *user);
57typedef struct xtc_cfg_spec {
59 const char *short_desc;
80 const char *
const *enum_labels;
84 xtc_cfg_validator_fn validator;
85 xtc_cfg_changed_fn on_change;
114int xtc_cfg_unregister(
const char *name);
116int xtc_cfg_get_bool(
const char *name,
int *out);
117int xtc_cfg_get_int(
const char *name,
int *out);
118int xtc_cfg_get_int64(
const char *name, int64_t *out);
119int xtc_cfg_get_double(
const char *name,
double *out);
120int xtc_cfg_get_string(
const char *name,
const char **out);
121int xtc_cfg_get_enum(
const char *name,
int *out);
123int xtc_cfg_set_bool(
const char *name,
int v);
124int xtc_cfg_set_int(
const char *name,
int v);
125int xtc_cfg_set_int64(
const char *name, int64_t v);
126int xtc_cfg_set_double(
const char *name,
double v);
127int xtc_cfg_set_string(
const char *name,
const char *v);
128int xtc_cfg_set_enum(
const char *name,
int v);
130int xtc_cfg_count(
void);
131int xtc_cfg_kind(
const char *name, xtc_cfg_kind_t *out);
139int xtc_cfg_load_file(
const char *path);
146int xtc_cfg_reload(
void);