pidgin  2.14.10
debug.h
Go to the documentation of this file.
1 
6 /* purple
7  *
8  * Purple is the legal property of its developers, whose names are too numerous
9  * to list here. Please refer to the COPYRIGHT file distributed with this
10  * source distribution.
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
25  */
26 #ifndef _PURPLE_DEBUG_H_
27 #define _PURPLE_DEBUG_H_
28 
29 #include <glib.h>
30 #include <stdarg.h>
31 
35 typedef enum
36 {
45 
49 typedef struct
50 {
51  void (*print)(PurpleDebugLevel level, const char *category,
52  const char *arg_s);
53  gboolean (*is_enabled)(PurpleDebugLevel level,
54  const char *category);
55 
56  void (*_purple_reserved1)(void);
57  void (*_purple_reserved2)(void);
58  void (*_purple_reserved3)(void);
59  void (*_purple_reserved4)(void);
61 
62 #ifdef __cplusplus
63 extern "C" {
64 #endif
65 
66 /**************************************************************************/
68 /**************************************************************************/
76 void purple_debug(PurpleDebugLevel level, const char *category,
77  const char *format, ...) G_GNUC_PRINTF(3, 4);
78 
90 void purple_debug_misc(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3);
91 
103 void purple_debug_info(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3);
104 
116 void purple_debug_warning(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3);
117 
129 void purple_debug_error(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3);
130 
142 void purple_debug_fatal(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3);
143 
149 void purple_debug_set_enabled(gboolean enabled);
150 
156 gboolean purple_debug_is_enabled(void);
157 
167 void purple_debug_set_verbose(gboolean verbose);
168 
176 gboolean purple_debug_is_verbose(void);
177 
189 void purple_debug_set_unsafe(gboolean unsafe);
190 
200 gboolean purple_debug_is_unsafe(void);
201 
204 /**************************************************************************/
206 /**************************************************************************/
216 
224 
227 /**************************************************************************/
229 /**************************************************************************/
235 void purple_debug_init(void);
236 
239 #ifdef __cplusplus
240 }
241 #endif
242 
243 #endif /* _PURPLE_DEBUG_H_ */
void void void void void void void purple_debug_set_enabled(gboolean enabled)
Enable or disable printing debug output to the console.
void void void purple_debug_info(const char *category, const char *format,...) G_GNUC_PRINTF(2
Outputs info level debug information.
void purple_debug_set_unsafe(gboolean unsafe)
Enable or disable unsafe debugging.
void purple_debug_set_verbose(gboolean verbose)
Enable or disable verbose debugging.
gboolean purple_debug_is_enabled(void)
Check if console debug output is enabled.
void void void void purple_debug_warning(const char *category, const char *format,...) G_GNUC_PRINTF(2
Outputs warning level debug information.
void void void void void void purple_debug_fatal(const char *category, const char *format,...) G_GNUC_PRINTF(2
Outputs fatal error level debug information.
void void purple_debug_misc(const char *category, const char *format,...) G_GNUC_PRINTF(2
Outputs misc.
void void void void void purple_debug_error(const char *category, const char *format,...) G_GNUC_PRINTF(2
Outputs error level debug information.
PurpleDebugUiOps * purple_debug_get_ui_ops(void)
Returns the UI operations structure used when outputting debug information.
gboolean purple_debug_is_unsafe(void)
Check if unsafe debugging is enabled.
PurpleDebugLevel
Debug levels.
Definition: debug.h:36
@ PURPLE_DEBUG_ERROR
Errors.
Definition: debug.h:41
@ PURPLE_DEBUG_WARNING
Warnings.
Definition: debug.h:40
@ PURPLE_DEBUG_FATAL
Fatal errors.
Definition: debug.h:42
@ PURPLE_DEBUG_ALL
All debug levels.
Definition: debug.h:37
@ PURPLE_DEBUG_MISC
General chatter.
Definition: debug.h:38
@ PURPLE_DEBUG_INFO
General operation Information.
Definition: debug.h:39
void purple_debug(PurpleDebugLevel level, const char *category, const char *format,...) G_GNUC_PRINTF(3
Outputs debug information.
void purple_debug_set_ui_ops(PurpleDebugUiOps *ops)
Sets the UI operations structure to be used when outputting debug information.
gboolean purple_debug_is_verbose(void)
Check if verbose logging is enabled.
void purple_debug_init(void)
Initializes the debug subsystem.
Debug UI operations.
Definition: debug.h:50