| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
#ifndef __ALSA_CONF_H |
| 29 |
#define __ALSA_CONF_H |
| 30 |
|
| 31 |
#ifdef __cplusplus |
| 32 |
extern "C" { |
| 33 |
#endif |
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
#define SND_CONFIG_DLSYM_VERSION_EVALUATE _dlsym_config_evaluate_001 |
| 44 |
|
| 45 |
#define SND_CONFIG_DLSYM_VERSION_HOOK _dlsym_config_hook_001 |
| 46 |
|
| 47 |
|
| 48 |
typedef enum _snd_config_type { |
| 49 |
|
| 50 |
SND_CONFIG_TYPE_INTEGER, |
| 51 |
|
| 52 |
SND_CONFIG_TYPE_INTEGER64, |
| 53 |
|
| 54 |
SND_CONFIG_TYPE_REAL, |
| 55 |
|
| 56 |
SND_CONFIG_TYPE_STRING, |
| 57 |
|
| 58 |
SND_CONFIG_TYPE_POINTER, |
| 59 |
|
| 60 |
SND_CONFIG_TYPE_COMPOUND = 1024 |
| 61 |
} snd_config_type_t; |
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
typedef struct _snd_config snd_config_t; |
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
typedef struct _snd_config_iterator *snd_config_iterator_t; |
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
typedef struct _snd_config_update snd_config_update_t; |
| 84 |
|
| 85 |
extern snd_config_t *snd_config; |
| 86 |
|
| 87 |
int snd_config_top(snd_config_t **config); |
| 88 |
|
| 89 |
int snd_config_load(snd_config_t *config, snd_input_t *in); |
| 90 |
int snd_config_load_override(snd_config_t *config, snd_input_t *in); |
| 91 |
int snd_config_save(snd_config_t *config, snd_output_t *out); |
| 92 |
int snd_config_update(void); |
| 93 |
int snd_config_update_r(snd_config_t **top, snd_config_update_t **update, const char *path); |
| 94 |
int snd_config_update_free(snd_config_update_t *update); |
| 95 |
int snd_config_update_free_global(void); |
| 96 |
|
| 97 |
int snd_config_update_ref(snd_config_t **top); |
| 98 |
void snd_config_ref(snd_config_t *top); |
| 99 |
void snd_config_unref(snd_config_t *top); |
| 100 |
|
| 101 |
int snd_config_search(snd_config_t *config, const char *key, |
| 102 |
snd_config_t **result); |
| 103 |
int snd_config_searchv(snd_config_t *config, |
| 104 |
snd_config_t **result, ...); |
| 105 |
int snd_config_search_definition(snd_config_t *config, |
| 106 |
const char *base, const char *key, |
| 107 |
snd_config_t **result); |
| 108 |
|
| 109 |
int snd_config_expand(snd_config_t *config, snd_config_t *root, |
| 110 |
const char *args, snd_config_t *private_data, |
| 111 |
snd_config_t **result); |
| 112 |
int snd_config_evaluate(snd_config_t *config, snd_config_t *root, |
| 113 |
snd_config_t *private_data, snd_config_t **result); |
| 114 |
|
| 115 |
int snd_config_add(snd_config_t *config, snd_config_t *leaf); |
| 116 |
int snd_config_delete(snd_config_t *config); |
| 117 |
int snd_config_delete_compound_members(const snd_config_t *config); |
| 118 |
int snd_config_copy(snd_config_t **dst, snd_config_t *src); |
| 119 |
|
| 120 |
int snd_config_make(snd_config_t **config, const char *key, |
| 121 |
snd_config_type_t type); |
| 122 |
int snd_config_make_integer(snd_config_t **config, const char *key); |
| 123 |
int snd_config_make_integer64(snd_config_t **config, const char *key); |
| 124 |
int snd_config_make_real(snd_config_t **config, const char *key); |
| 125 |
int snd_config_make_string(snd_config_t **config, const char *key); |
| 126 |
int snd_config_make_pointer(snd_config_t **config, const char *key); |
| 127 |
int snd_config_make_compound(snd_config_t **config, const char *key, int join); |
| 128 |
|
| 129 |
int snd_config_imake_integer(snd_config_t **config, const char *key, const long value); |
| 130 |
int snd_config_imake_integer64(snd_config_t **config, const char *key, const long long value); |
| 131 |
int snd_config_imake_real(snd_config_t **config, const char *key, const double value); |
| 132 |
int snd_config_imake_string(snd_config_t **config, const char *key, const char *ascii); |
| 133 |
int snd_config_imake_safe_string(snd_config_t **config, const char *key, const char *ascii); |
| 134 |
int snd_config_imake_pointer(snd_config_t **config, const char *key, const void *ptr); |
| 135 |
|
| 136 |
snd_config_type_t snd_config_get_type(const snd_config_t *config); |
| 137 |
|
| 138 |
int snd_config_set_id(snd_config_t *config, const char *id); |
| 139 |
int snd_config_set_integer(snd_config_t *config, long value); |
| 140 |
int snd_config_set_integer64(snd_config_t *config, long long value); |
| 141 |
int snd_config_set_real(snd_config_t *config, double value); |
| 142 |
int snd_config_set_string(snd_config_t *config, const char *value); |
| 143 |
int snd_config_set_ascii(snd_config_t *config, const char *ascii); |
| 144 |
int snd_config_set_pointer(snd_config_t *config, const void *ptr); |
| 145 |
int snd_config_get_id(const snd_config_t *config, const char **value); |
| 146 |
int snd_config_get_integer(const snd_config_t *config, long *value); |
| 147 |
int snd_config_get_integer64(const snd_config_t *config, long long *value); |
| 148 |
int snd_config_get_real(const snd_config_t *config, double *value); |
| 149 |
int snd_config_get_ireal(const snd_config_t *config, double *value); |
| 150 |
int snd_config_get_string(const snd_config_t *config, const char **value); |
| 151 |
int snd_config_get_ascii(const snd_config_t *config, char **value); |
| 152 |
int snd_config_get_pointer(const snd_config_t *config, const void **value); |
| 153 |
int snd_config_test_id(const snd_config_t *config, const char *id); |
| 154 |
|
| 155 |
snd_config_iterator_t snd_config_iterator_first(const snd_config_t *node); |
| 156 |
snd_config_iterator_t snd_config_iterator_next(const snd_config_iterator_t iterator); |
| 157 |
snd_config_iterator_t snd_config_iterator_end(const snd_config_t *node); |
| 158 |
snd_config_t *snd_config_iterator_entry(const snd_config_iterator_t iterator); |
| 159 |
|
| 160 |
|
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
|
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
|
| 176 |
|
| 177 |
#define snd_config_for_each(pos, next, node) \ |
| 178 |
for (pos = snd_config_iterator_first(node), next = snd_config_iterator_next(pos); pos != snd_config_iterator_end(node); pos = next, next = snd_config_iterator_next(pos)) |
| 179 |
|
| 180 |
|
| 181 |
|
| 182 |
int snd_config_get_bool_ascii(const char *ascii); |
| 183 |
int snd_config_get_bool(const snd_config_t *conf); |
| 184 |
int snd_config_get_ctl_iface_ascii(const char *ascii); |
| 185 |
int snd_config_get_ctl_iface(const snd_config_t *conf); |
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
|
| 190 |
|
| 191 |
|
| 192 |
typedef struct snd_devname snd_devname_t; |
| 193 |
|
| 194 |
|
| 195 |
|
| 196 |
|
| 197 |
struct snd_devname { |
| 198 |
char *name; |
| 199 |
char *comment; |
| 200 |
snd_devname_t *next; |
| 201 |
}; |
| 202 |
|
| 203 |
int snd_names_list(const char *iface, snd_devname_t **list); |
| 204 |
void snd_names_list_free(snd_devname_t *list); |
| 205 |
|
| 206 |
|
| 207 |
|
| 208 |
#ifdef __cplusplus |
| 209 |
} |
| 210 |
#endif |
| 211 |
|
| 212 |
#endif |