debug.h
Go to the documentation of this file.00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef _PURPLE_DEBUG_H_
00027 #define _PURPLE_DEBUG_H_
00028
00029 #include <glib.h>
00030 #include <stdarg.h>
00031
00035 typedef enum
00036 {
00037 PURPLE_DEBUG_ALL = 0,
00038 PURPLE_DEBUG_MISC,
00039 PURPLE_DEBUG_INFO,
00040 PURPLE_DEBUG_WARNING,
00041 PURPLE_DEBUG_ERROR,
00042 PURPLE_DEBUG_FATAL
00044 } PurpleDebugLevel;
00045
00049 typedef struct
00050 {
00051 void (*print)(PurpleDebugLevel level, const char *category,
00052 const char *arg_s);
00053 gboolean (*is_enabled)(PurpleDebugLevel level,
00054 const char *category);
00055
00056 void (*_purple_reserved1)(void);
00057 void (*_purple_reserved2)(void);
00058 void (*_purple_reserved3)(void);
00059 void (*_purple_reserved4)(void);
00060 } PurpleDebugUiOps;
00061
00062 #ifdef __cplusplus
00063 extern "C" {
00064 #endif
00065
00066
00068
00076 void purple_debug(PurpleDebugLevel level, const char *category,
00077 const char *format, ...) G_GNUC_PRINTF(3, 4);
00078
00090 void purple_debug_misc(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3);
00091
00103 void purple_debug_info(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3);
00104
00116 void purple_debug_warning(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3);
00117
00129 void purple_debug_error(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3);
00130
00142 void purple_debug_fatal(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3);
00143
00149 void purple_debug_set_enabled(gboolean enabled);
00150
00156 gboolean purple_debug_is_enabled(void);
00157
00167 void purple_debug_set_verbose(gboolean verbose);
00168
00176 gboolean purple_debug_is_verbose(void);
00177
00187 void purple_debug_set_unsafe(gboolean unsafe);
00188
00196 gboolean purple_debug_is_unsafe(void);
00197
00200
00202
00211 void purple_debug_set_ui_ops(PurpleDebugUiOps *ops);
00212
00219 PurpleDebugUiOps *purple_debug_get_ui_ops(void);
00220
00223
00225
00231 void purple_debug_init(void);
00232
00235 #ifdef __cplusplus
00236 }
00237 #endif
00238
00239 #endif