debug.h

Go to the documentation of this file.
00001 
00025 #ifndef _PURPLE_DEBUG_H_
00026 #define _PURPLE_DEBUG_H_
00027 
00028 #include <glib.h>
00029 #include <stdarg.h>
00030 
00034 typedef enum
00035 {
00036     PURPLE_DEBUG_ALL = 0,  
00037     PURPLE_DEBUG_MISC,     
00038     PURPLE_DEBUG_INFO,     
00039     PURPLE_DEBUG_WARNING,  
00040     PURPLE_DEBUG_ERROR,    
00041     PURPLE_DEBUG_FATAL     
00043 } PurpleDebugLevel;
00044 
00048 typedef struct
00049 {
00050     void (*print)(PurpleDebugLevel level, const char *category,
00051                   const char *arg_s);
00052     gboolean (*is_enabled)(PurpleDebugLevel level,
00053             const char *category);
00054 
00055     void (*_purple_reserved1)(void);
00056     void (*_purple_reserved2)(void);
00057     void (*_purple_reserved3)(void);
00058     void (*_purple_reserved4)(void);
00059 } PurpleDebugUiOps;
00060 
00061 #ifdef __cplusplus
00062 extern "C" {
00063 #endif
00064 
00065 /**************************************************************************/
00067 /**************************************************************************/
00075 void purple_debug(PurpleDebugLevel level, const char *category,
00076                 const char *format, ...);
00077 
00089 void purple_debug_misc(const char *category, const char *format, ...);
00090 
00102 void purple_debug_info(const char *category, const char *format, ...);
00103 
00115 void purple_debug_warning(const char *category, const char *format, ...);
00116 
00128 void purple_debug_error(const char *category, const char *format, ...);
00129 
00141 void purple_debug_fatal(const char *category, const char *format, ...);
00142 
00148 void purple_debug_set_enabled(gboolean enabled);
00149 
00155 gboolean purple_debug_is_enabled(void);
00156 
00159 /**************************************************************************/
00161 /**************************************************************************/
00170 void purple_debug_set_ui_ops(PurpleDebugUiOps *ops);
00171 
00178 PurpleDebugUiOps *purple_debug_get_ui_ops(void);
00179 
00182 /**************************************************************************/
00184 /**************************************************************************/
00190 void purple_debug_init(void);
00191 
00194 #ifdef __cplusplus
00195 }
00196 #endif
00197 
00198 #endif /* _PURPLE_DEBUG_H_ */