3 SND_CONFIG_TYPE_INTEGER,
5 SND_CONFIG_TYPE_STRING,
6 SND_CONFIG_TYPE_COMPOUND,
9 typedef struct snd_config snd_config_t;
13 snd_config_type_t type;
19 struct list_head fields;
23 struct list_head list;
28 int snd_config_load(snd_config_t **config, FILE *fp);
29 int snd_config_save(snd_config_t *config, FILE *fp);
31 int snd_config_search(snd_config_t *config, char *key, snd_config_t **result);
33 int snd_config_add(snd_config_t *config, snd_config_t *leaf);
34 int snd_config_delete(snd_config_t *config);
36 int snd_config_make(snd_config_t **config, char *key,
37 snd_config_type_t type);
39 int snd_config_integer_set(snd_config_t *config, long value);
40 int snd_config_real_set(snd_config_t *config, double value);
41 int snd_config_string_set(snd_config_t *config, char *value);
42 int snd_config_integer_get(snd_config_t *config, long *value);
43 int snd_config_real_get(snd_config_t *config, double *value);
44 int snd_config_string_get(snd_config_t *config, char **value);
46 /* One argument: long, double or char* */
47 int snd_config_set(snd_config_t *config, ...);
48 int snd_config_get(snd_config_t *config, void *);
50 typedef struct list_head *snd_config_iterator_t;
52 #define snd_config_foreach(iterator, node) \
53 assert((node)->type == SND_CONFIG_TYPE_COMPOUND); \
54 for (iterator = (node)->u.compound.fields.next; iterator != &(node)->u.compound.fields; iterator = iterator->next)
56 #define snd_config_entry(iterator) list_entry(iterator, snd_config_t, list)