Jack2 1.9.6
|
00001 /* 00002 Copyright (C) 2001 Paul Davis 00003 Copyright (C) 2004-2008 Grame 00004 Copyright (C) 2008 Nedko Arnaudov 00005 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU Lesser General Public License as published by 00008 the Free Software Foundation; either version 2.1 of the License, or 00009 (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU Lesser General Public License for more details. 00015 00016 You should have received a copy of the GNU Lesser General Public License 00017 along with this program; if not, write to the Free Software 00018 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00019 00020 */ 00021 00022 #ifndef __JackError__ 00023 #define __JackError__ 00024 00025 #include <string.h> 00026 #include <errno.h> 00027 #include "JackCompilerDeps.h" 00028 #include "types.h" 00029 00030 #ifdef __cplusplus 00031 extern "C" 00032 { 00033 #endif 00034 00035 #define LOG_LEVEL_INFO 1 00036 #define LOG_LEVEL_ERROR 2 00037 00038 SERVER_EXPORT void jack_error(const char *fmt, ...); 00039 00040 SERVER_EXPORT void jack_info(const char *fmt, ...); 00041 00042 // like jack_info() but only if verbose mode is enabled 00043 SERVER_EXPORT void jack_log(const char *fmt, ...); 00044 00045 SERVER_EXPORT extern void (*jack_error_callback)(const char *desc); 00046 SERVER_EXPORT extern void (*jack_info_callback)(const char *desc); 00047 00048 SERVER_EXPORT extern void default_jack_error_callback(const char *desc); 00049 SERVER_EXPORT extern void default_jack_info_callback(const char *desc); 00050 00051 SERVER_EXPORT extern void silent_jack_error_callback(const char *desc); 00052 SERVER_EXPORT extern void silent_jack_info_callback(const char *desc); 00053 00054 typedef void (* jack_log_function_t)(int level, const char *message); 00055 00056 void jack_log_function(int level, const char *message); 00057 00058 SERVER_EXPORT int set_threaded_log_function(); 00059 00060 #ifdef __cplusplus 00061 } 00062 #endif 00063 00064 #endif