ALSA project - the C library reference: /builddir/build/BUILD/alsa-lib-1.1.0/include/conf.h Source File

- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

- File List
- Globals

# /builddir/build/BUILD/alsa-lib-1.1.0/include/conf.h

Go to the documentation of this file.

    00001
    00011 /*
    00012  *   This library is free software; you can redistribute it and/or modify
    00013  *   it under the terms of the GNU Lesser General Public License as
    00014  *   published by the Free Software Foundation; either version 2.1 of
    00015  *   the License, or (at your option) any later version.
    00016  *
    00017  *   This program is distributed in the hope that it will be useful,
    00018  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
    00019  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00020  *   GNU Lesser General Public License for more details.
    00021  *
    00022  *   You should have received a copy of the GNU Lesser General Public
    00023  *   License along with this library; if not, write to the Free Software
    00024  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
    00025  *
    00026  */
    00027
    00028 #ifndef __ALSA_CONF_H
    00029 #define __ALSA_CONF_H
    00030
    00031 #ifdef __cplusplus
    00032 extern "C" {
    00033 #endif
    00034
    00043 #define SND_CONFIG_DLSYM_VERSION_EVALUATE       _dlsym_config_evaluate_001
    00044
    00045 #define SND_CONFIG_DLSYM_VERSION_HOOK           _dlsym_config_hook_001
    00046
    00048 typedef enum _snd_config_type {
    00050         SND_CONFIG_TYPE_INTEGER,
    00052         SND_CONFIG_TYPE_INTEGER64,
    00054         SND_CONFIG_TYPE_REAL,
    00056         SND_CONFIG_TYPE_STRING,
    00058         SND_CONFIG_TYPE_POINTER,
    00060         SND_CONFIG_TYPE_COMPOUND = 1024
    00061 } snd_config_type_t;
    00062
    00069 typedef struct _snd_config snd_config_t;
    00077 typedef struct _snd_config_iterator *snd_config_iterator_t;
    00083 typedef struct _snd_config_update snd_config_update_t;
    00084
    00085 extern snd_config_t *snd_config;
    00086
    00087 int snd_config_top(snd_config_t **config);
    00088
    00089 int snd_config_load(snd_config_t *config, snd_input_t *in);
    00090 int snd_config_load_override(snd_config_t *config, snd_input_t *in);
    00091 int snd_config_save(snd_config_t *config, snd_output_t *out);
    00092 int snd_config_update(void);
    00093 int snd_config_update_r(snd_config_t **top, snd_config_update_t **update, const char *path);
    00094 int snd_config_update_free(snd_config_update_t *update);
    00095 int snd_config_update_free_global(void);
    00096
    00097 int snd_config_search(snd_config_t *config, const char *key,
    00098                       snd_config_t **result);
    00099 int snd_config_searchv(snd_config_t *config,
    00100                        snd_config_t **result, ...);
    00101 int snd_config_search_definition(snd_config_t *config,
    00102                                  const char *base, const char *key,
    00103                                  snd_config_t **result);
    00104
    00105 int snd_config_expand(snd_config_t *config, snd_config_t *root,
    00106                       const char *args, snd_config_t *private_data,
    00107                       snd_config_t **result);
    00108 int snd_config_evaluate(snd_config_t *config, snd_config_t *root,
    00109                         snd_config_t *private_data, snd_config_t **result);
    00110
    00111 int snd_config_add(snd_config_t *config, snd_config_t *leaf);
    00112 int snd_config_delete(snd_config_t *config);
    00113 int snd_config_delete_compound_members(const snd_config_t *config);
    00114 int snd_config_copy(snd_config_t **dst, snd_config_t *src);
    00115
    00116 int snd_config_make(snd_config_t **config, const char *key,
    00117                     snd_config_type_t type);
    00118 int snd_config_make_integer(snd_config_t **config, const char *key);
    00119 int snd_config_make_integer64(snd_config_t **config, const char *key);
    00120 int snd_config_make_real(snd_config_t **config, const char *key);
    00121 int snd_config_make_string(snd_config_t **config, const char *key);
    00122 int snd_config_make_pointer(snd_config_t **config, const char *key);
    00123 int snd_config_make_compound(snd_config_t **config, const char *key, int join);
    00124
    00125 int snd_config_imake_integer(snd_config_t **config, const char *key, const long value);
    00126 int snd_config_imake_integer64(snd_config_t **config, const char *key, const long long value);
    00127 int snd_config_imake_real(snd_config_t **config, const char *key, const double value);
    00128 int snd_config_imake_string(snd_config_t **config, const char *key, const char *ascii);
    00129 int snd_config_imake_safe_string(snd_config_t **config, const char *key, const char *ascii);
    00130 int snd_config_imake_pointer(snd_config_t **config, const char *key, const void *ptr);
    00131
    00132 snd_config_type_t snd_config_get_type(const snd_config_t *config);
    00133
    00134 int snd_config_set_id(snd_config_t *config, const char *id);
    00135 int snd_config_set_integer(snd_config_t *config, long value);
    00136 int snd_config_set_integer64(snd_config_t *config, long long value);
    00137 int snd_config_set_real(snd_config_t *config, double value);
    00138 int snd_config_set_string(snd_config_t *config, const char *value);
    00139 int snd_config_set_ascii(snd_config_t *config, const char *ascii);
    00140 int snd_config_set_pointer(snd_config_t *config, const void *ptr);
    00141 int snd_config_get_id(const snd_config_t *config, const char **value);
    00142 int snd_config_get_integer(const snd_config_t *config, long *value);
    00143 int snd_config_get_integer64(const snd_config_t *config, long long *value);
    00144 int snd_config_get_real(const snd_config_t *config, double *value);
    00145 int snd_config_get_ireal(const snd_config_t *config, double *value);
    00146 int snd_config_get_string(const snd_config_t *config, const char **value);
    00147 int snd_config_get_ascii(const snd_config_t *config, char **value);
    00148 int snd_config_get_pointer(const snd_config_t *config, const void **value);
    00149 int snd_config_test_id(const snd_config_t *config, const char *id);
    00150
    00151 snd_config_iterator_t snd_config_iterator_first(const snd_config_t *node);
    00152 snd_config_iterator_t snd_config_iterator_next(const snd_config_iterator_t iterator);
    00153 snd_config_iterator_t snd_config_iterator_end(const snd_config_t *node);
    00154 snd_config_t *snd_config_iterator_entry(const snd_config_iterator_t iterator);
    00155
    00173 #define snd_config_for_each(pos, next, node) \
    00174         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))
    00175
    00176 /* Misc functions */
    00177
    00178 int snd_config_get_bool_ascii(const char *ascii);
    00179 int snd_config_get_bool(const snd_config_t *conf);
    00180 int snd_config_get_ctl_iface_ascii(const char *ascii);
    00181 int snd_config_get_ctl_iface(const snd_config_t *conf);
    00182
    00183 /* Names functions */
    00184
    00188 typedef struct snd_devname snd_devname_t;
    00189
    00193 struct snd_devname {
    00194         char *name;
    00195         char *comment;
    00196         snd_devname_t *next;
    00197 };
    00198
    00199 int snd_names_list(const char *iface, snd_devname_t **list);
    00200 void snd_names_list_free(snd_devname_t *list);
    00201
    00204 #ifdef __cplusplus
    00205 }
    00206 #endif
    00207
    00208 #endif /* __ALSA_CONF_H */

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines