26 EC_CONFIG_TYPE_NONE = 0,
29 EC_CONFIG_TYPE_UINT64,
30 EC_CONFIG_TYPE_STRING,
40 EC_CONFIG_F_MANDATORY = 1 << 0,
int ec_config_list_del(struct ec_config *list, struct ec_config *config)
Remove an element from a list.
ec_config_flags
Flags related to a configuration schema.
struct ec_config * ec_config_dup(const struct ec_config *config)
Duplicate a configuration.
int ec_config_schema_validate(const struct ec_config_schema *schema)
Validate a configuration schema array.
struct ec_config * ec_config_list(void)
Create a list configuration value.
enum ec_config_type ec_config_schema_type(const struct ec_config_schema *schema_elt)
Get the type of a schema entry.
int ec_config_cmp(const struct ec_config *config1, const struct ec_config *config2)
Compare two configurations.
struct ec_config * ec_config_node(struct ec_node *node)
Create a node configuration value.
int ec_config_dict_del(struct ec_config *dict, const char *key)
Remove an element from a hash table configuration.
const struct ec_config_schema * ec_config_schema_sub(const struct ec_config_schema *schema_elt)
Get the subschema of a schema entry.
void ec_config_schema_dump(FILE *out, const struct ec_config_schema *schema, const char *name)
Dump a configuration schema array.
void ec_config_free(struct ec_config *config)
Free a configuration.
ssize_t ec_config_count(const struct ec_config *config)
Count the number of elements in a list or dict.
const char * ec_config_reserved_keys[]
Array of reserved key names.
const struct ec_config_schema * ec_config_schema_lookup(const struct ec_config_schema *schema, const char *key)
Find a schema entry matching the key.
ec_config_type
The type identifier for a config value.
void ec_config_dump(FILE *out, const struct ec_config *config)
Dump a configuration.
int ec_config_dict_set(struct ec_config *dict, const char *key, struct ec_config *value)
Set a value in a hash table configuration.
struct ec_config * ec_config_dict_get(const struct ec_config *config, const char *key)
Get configuration value.
struct ec_config * ec_config_dict(void)
Create a hash table configuration value.
int ec_config_list_add(struct ec_config *list, struct ec_config *value)
Add a config object into a list.
int ec_config_validate(const struct ec_config *dict, const struct ec_config_schema *schema)
Validate a configuration.
struct ec_config * ec_config_list_next(struct ec_config *list, struct ec_config *config)
Get next element in list.
struct ec_config * ec_config_list_first(struct ec_config *list)
Get the first element of a list.
struct ec_config * ec_config_i64(int64_t i64)
Create a signed integer configuration value.
struct ec_config * ec_config_bool(bool boolean)
Create a boolean configuration value.
enum ec_config_type ec_config_get_type(const struct ec_config *config)
Get the type of the configuration.
struct ec_config * ec_config_u64(uint64_t u64)
Create an unsigned configuration value.
struct ec_config * ec_config_string(const char *string)
Create a string configuration value.
bool ec_config_key_is_reserved(const char *name)
Check if a key name is reserved in a config dict.
struct ec_dict * ec_dict(void)
Create a hash table.
struct ec_node * ec_node(const char *typename, const char *id)
Create a new node from its type name.
Structure describing the format of a configuration value.
enum ec_config_flags flags
Flags, see ec_config_flags.
Structure storing the configuration data.