/home/users/builder/rpm/BUILD/alsa-lib-1.0.13/include/global.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_GLOBAL_H_
00029 #define __ALSA_GLOBAL_H_
00030 
00031 /* for timeval and timespec */
00032 #include <time.h>
00033 
00034 #ifdef __cplusplus
00035 extern "C" {
00036 #endif
00037 
00047 const char *snd_asoundlib_version(void);
00048 
00049 #ifndef ATTRIBUTE_UNUSED
00050 
00051 #define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
00052 #endif
00053 
00054 #ifdef PIC /* dynamic build */
00055 
00057 #define __SND_DLSYM_VERSION(name, version) _ ## name ## version
00058 
00062 #define SND_DLSYM_BUILD_VERSION(name, version) char __SND_DLSYM_VERSION(name, version);
00063 
00064 #else /* static build */
00065 
00066 struct snd_dlsym_link {
00067         struct snd_dlsym_link *next;
00068         const char *dlsym_name;
00069         const void *dlsym_ptr;
00070 };
00071 
00072 extern struct snd_dlsym_link *snd_dlsym_start;
00073 
00075 #define __SND_DLSYM_VERSION(prefix, name, version) _ ## prefix ## name ## version
00076 
00080 #define SND_DLSYM_BUILD_VERSION(name, version) \
00081   static struct snd_dlsym_link __SND_DLSYM_VERSION(snd_dlsym_, name, version); \
00082   void __SND_DLSYM_VERSION(snd_dlsym_constructor_, name, version) (void) __attribute__ ((constructor)); \
00083   void __SND_DLSYM_VERSION(snd_dlsym_constructor_, name, version) (void) { \
00084     __SND_DLSYM_VERSION(snd_dlsym_, name, version).next = snd_dlsym_start; \
00085     __SND_DLSYM_VERSION(snd_dlsym_, name, version).dlsym_name = # name; \
00086     __SND_DLSYM_VERSION(snd_dlsym_, name, version).dlsym_ptr = (void *)&name; \
00087     snd_dlsym_start = &__SND_DLSYM_VERSION(snd_dlsym_, name, version); \
00088   }
00089 
00090 #endif
00091 
00092 #ifndef __STRING
00093 
00094 #define __STRING(x)     #x
00095 #endif
00096 
00098 #define SND_DLSYM_VERSION(version) __STRING(version)
00099 
00100 void *snd_dlopen(const char *file, int mode);
00101 void *snd_dlsym(void *handle, const char *name, const char *version);
00102 int snd_dlclose(void *handle);
00103 
00104 
00111 typedef struct _snd_async_handler snd_async_handler_t;
00112 
00118 typedef void (*snd_async_callback_t)(snd_async_handler_t *handler);
00119 
00120 int snd_async_add_handler(snd_async_handler_t **handler, int fd, 
00121                           snd_async_callback_t callback, void *private_data);
00122 int snd_async_del_handler(snd_async_handler_t *handler);
00123 int snd_async_handler_get_fd(snd_async_handler_t *handler);
00124 int snd_async_handler_get_signo(snd_async_handler_t *handler);
00125 void *snd_async_handler_get_callback_private(snd_async_handler_t *handler);
00126 
00127 struct snd_shm_area *snd_shm_area_create(int shmid, void *ptr);
00128 struct snd_shm_area *snd_shm_area_share(struct snd_shm_area *area);
00129 int snd_shm_area_destroy(struct snd_shm_area *area);
00130 
00131 int snd_user_file(const char *file, char **result);
00132 
00134 typedef struct timeval snd_timestamp_t;
00136 typedef struct timespec snd_htimestamp_t;
00137 
00140 #ifdef __cplusplus
00141 }
00142 #endif
00143 
00144 #endif /* __ALSA_GLOBAL_H */

Generated on Sun Apr 1 18:36:41 2007 for ALSA project - the C library reference by  doxygen 1.5.1