debug.h

Go to the documentation of this file.
00001
00006 /* purple
00007  *
00008  * Purple is the legal property of its developers, whose names are too numerous
00009  * to list here.  Please refer to the COPYRIGHT file distributed with this
00010  * source distribution.
00011  *
00012  * This program is free software; you can redistribute it and/or modify
00013  * it under the terms of the GNU General Public License as published by
00014  * the Free Software Foundation; either version 2 of the License, or
00015  * (at your option) any later version.
00016  *
00017  * This program is distributed in the hope that it will be useful,
00018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  * GNU General Public License for more details.
00021  *
00022  * You should have received a copy of the GNU General Public License
00023  * along with this program; if not, write to the Free Software
00024  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
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
00189 void purple_debug_set_unsafe(gboolean unsafe);
00190
00200 gboolean purple_debug_is_unsafe(void);
00201
00204 /**************************************************************************/
00206 /**************************************************************************/
00215 void purple_debug_set_ui_ops(PurpleDebugUiOps *ops);
00216
00223 PurpleDebugUiOps *purple_debug_get_ui_ops(void);
00224
00227 /**************************************************************************/
00229 /**************************************************************************/
00235 void purple_debug_init(void);
00236
00239 #ifdef __cplusplus
00240 }
00241 #endif
00242 
00243 #endif /* _PURPLE_DEBUG_H_ */
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!