Jack2  1.9.8
JackError.h
1 /*
2  Copyright (C) 2001 Paul Davis
3  Copyright (C) 2004-2008 Grame
4  Copyright (C) 2008 Nedko Arnaudov
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU Lesser General Public License as published by
8  the Free Software Foundation; either version 2.1 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 
20 */
21 
22 #ifndef __JackError__
23 #define __JackError__
24 
25 #include <string.h>
26 #include <errno.h>
27 #include "JackCompilerDeps.h"
28 
29 #ifdef __cplusplus
30 extern "C"
31 {
32 #endif
33 
34 #define LOG_LEVEL_INFO 1
35 #define LOG_LEVEL_ERROR 2
36 
37  SERVER_EXPORT void jack_error(const char *fmt, ...);
38 
39  SERVER_EXPORT void jack_info(const char *fmt, ...);
40 
41  // like jack_info() but only if verbose mode is enabled
42  SERVER_EXPORT void jack_log(const char *fmt, ...);
43 
44  SERVER_EXPORT extern void (*jack_error_callback)(const char *desc);
45  SERVER_EXPORT extern void (*jack_info_callback)(const char *desc);
46 
47  SERVER_EXPORT extern void default_jack_error_callback(const char *desc);
48  SERVER_EXPORT extern void default_jack_info_callback(const char *desc);
49 
50  SERVER_EXPORT extern void silent_jack_error_callback(const char *desc);
51  SERVER_EXPORT extern void silent_jack_info_callback(const char *desc);
52 
53  typedef void (* jack_log_function_t)(int level, const char *message);
54 
55  void jack_log_function(int level, const char *message);
56 
57  SERVER_EXPORT int set_threaded_log_function();
58 
59 #ifdef __cplusplus
60 }
61 #endif
62 
63 #endif