Correct JackInfoShutdownCallback prototype, two new JackClientProcessFailure and...
[jack2.git] / common / JackError.h
blob403c55ae29ed176649a5da2f86edf795ca81bef7
1 /*
2 Copyright (C) 2001 Paul Davis
3 Copyright (C) 2004-2008 Grame
4 Copyright (C) 2008 Nedko Arnaudov
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
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 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 #ifndef __JackError__
24 #define __JackError__
26 #include <string.h>
27 #include <errno.h>
28 #include "JackCompilerDeps.h"
29 #include "types.h"
31 #ifdef __cplusplus
32 extern "C"
34 #endif
36 #define LOG_LEVEL_INFO 1
37 #define LOG_LEVEL_ERROR 2
39 SERVER_EXPORT void jack_error(const char *fmt, ...);
41 SERVER_EXPORT void jack_info(const char *fmt, ...);
43 // like jack_info() but only if verbose mode is enabled
44 SERVER_EXPORT void jack_log(const char *fmt, ...);
46 SERVER_EXPORT extern void (*jack_error_callback)(const char *desc);
47 SERVER_EXPORT extern void (*jack_info_callback)(const char *desc);
49 SERVER_EXPORT extern void default_jack_error_callback(const char *desc);
50 SERVER_EXPORT extern void default_jack_info_callback(const char *desc);
52 SERVER_EXPORT extern void silent_jack_error_callback(const char *desc);
53 SERVER_EXPORT extern void silent_jack_info_callback(const char *desc);
55 typedef void (* jack_log_function_t)(int level, const char *message);
57 void change_thread_log_function(jack_log_function_t log_function);
58 void jack_log_function(int level, const char *message);
60 SERVER_EXPORT void set_threaded_log_function();
62 #ifdef __cplusplus
64 #endif
66 #endif