00001
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef __ALSA_ERROR_H
00029 #define __ALSA_ERROR_H
00030
00031 #ifdef __cplusplus
00032 extern "C" {
00033 #endif
00034
00041 #define SND_ERROR_BEGIN 500000
00042 #define SND_ERROR_INCOMPATIBLE_VERSION (SND_ERROR_BEGIN+0)
00044 const char *snd_strerror(int errnum);
00045
00058 typedef void (*snd_lib_error_handler_t)(const char *file, int line, const char *function, int err, const char *fmt, ...) ;
00059 extern snd_lib_error_handler_t snd_lib_error;
00060 extern int snd_lib_error_set_handler(snd_lib_error_handler_t handler);
00061
00062 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 95)
00063 #define SNDERR(...) snd_lib_error(__FILE__, __LINE__, __FUNCTION__, 0, __VA_ARGS__)
00064 #define SYSERR(...) snd_lib_error(__FILE__, __LINE__, __FUNCTION__, errno, __VA_ARGS__)
00065 #else
00066 #define SNDERR(args...) snd_lib_error(__FILE__, __LINE__, __FUNCTION__, 0, ##args)
00067 #define SYSERR(args...) snd_lib_error(__FILE__, __LINE__, __FUNCTION__, errno, ##args)
00068 #endif
00069
00072 #ifdef __cplusplus
00073 }
00074 #endif
00075
00076 #endif
00077