00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __JackError__
00024 #define __JackError__
00025
00026 #include <string.h>
00027 #include <errno.h>
00028 #include "JackCompilerDeps.h"
00029 #include "types.h"
00030
00031 #ifdef __cplusplus
00032 extern "C"
00033 {
00034 #endif
00035
00036 #define LOG_LEVEL_INFO 1
00037 #define LOG_LEVEL_ERROR 2
00038
00039 SERVER_EXPORT void jack_error(const char *fmt, ...);
00040
00041 SERVER_EXPORT void jack_info(const char *fmt, ...);
00042
00043
00044 SERVER_EXPORT void jack_log(const char *fmt, ...);
00045
00046 SERVER_EXPORT extern void (*jack_error_callback)(const char *desc);
00047 SERVER_EXPORT extern void (*jack_info_callback)(const char *desc);
00048
00049 SERVER_EXPORT extern void default_jack_error_callback(const char *desc);
00050 SERVER_EXPORT extern void default_jack_info_callback(const char *desc);
00051
00052 SERVER_EXPORT extern void silent_jack_error_callback(const char *desc);
00053 SERVER_EXPORT extern void silent_jack_info_callback(const char *desc);
00054
00055 typedef void (* jack_log_function_t)(int level, const char *message);
00056
00057 void change_thread_log_function(jack_log_function_t log_function);
00058 void jack_log_function(int level, const char *message);
00059
00060 SERVER_EXPORT void set_threaded_log_function();
00061
00062 #ifdef __cplusplus
00063 }
00064 #endif
00065
00066 #endif