Mercurial > pidgin
annotate libpurple/debug.h @ 32792:670296a688dc
merge of '19d8fa4275ceeb945882502e55b5c9581d1646da'
and '4efee4948f792833531b79dfc45a885b483cb09d'
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 06 May 2012 06:05:11 +0000 |
parents | 3f503c81de76 |
children | 02a2e8183b1d |
rev | line source |
---|---|
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
2 * @file debug.h Debug API |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
3 * @ingroup core |
20074
6bf32c9e15a7
remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@gmail.com>
parents:
19681
diff
changeset
|
4 */ |
6bf32c9e15a7
remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@gmail.com>
parents:
19681
diff
changeset
|
5 |
6bf32c9e15a7
remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@gmail.com>
parents:
19681
diff
changeset
|
6 /* purple |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
7 * |
15822 | 8 * Purple is the legal property of its developers, whose names are too numerous |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
9 * to list here. Please refer to the COPYRIGHT file distributed with this |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
10 * source distribution. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
11 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
12 * This program is free software; you can redistribute it and/or modify |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
13 * it under the terms of the GNU General Public License as published by |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
14 * the Free Software Foundation; either version 2 of the License, or |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
15 * (at your option) any later version. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
16 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
17 * This program is distributed in the hope that it will be useful, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
20 * GNU General Public License for more details. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
21 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
22 * You should have received a copy of the GNU General Public License |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
23 * along with this program; if not, write to the Free Software |
19681
44b4e8bd759b
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
16664
diff
changeset
|
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
25 */ |
15822 | 26 #ifndef _PURPLE_DEBUG_H_ |
27 #define _PURPLE_DEBUG_H_ | |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
28 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
29 #include <glib.h> |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
30 #include <stdarg.h> |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
31 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
32 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
33 * Debug levels. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
34 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
35 typedef enum |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
36 { |
15822 | 37 PURPLE_DEBUG_ALL = 0, /**< All debug levels. */ |
38 PURPLE_DEBUG_MISC, /**< General chatter. */ | |
39 PURPLE_DEBUG_INFO, /**< General operation Information. */ | |
40 PURPLE_DEBUG_WARNING, /**< Warnings. */ | |
41 PURPLE_DEBUG_ERROR, /**< Errors. */ | |
42 PURPLE_DEBUG_FATAL /**< Fatal errors. */ | |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
43 |
15822 | 44 } PurpleDebugLevel; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
45 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
46 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
47 * Debug UI operations. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
48 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
49 typedef struct |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
50 { |
15822 | 51 void (*print)(PurpleDebugLevel level, const char *category, |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
52 const char *arg_s); |
15985
6dc5dc83a61b
Add a whimpy ui op to the debug API that returns TRUE if debugging
Mark Doliner <mark@kingant.net>
parents:
15822
diff
changeset
|
53 gboolean (*is_enabled)(PurpleDebugLevel level, |
6dc5dc83a61b
Add a whimpy ui op to the debug API that returns TRUE if debugging
Mark Doliner <mark@kingant.net>
parents:
15822
diff
changeset
|
54 const char *category); |
16664
516f14bef90e
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15985
diff
changeset
|
55 |
516f14bef90e
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15985
diff
changeset
|
56 void (*_purple_reserved1)(void); |
516f14bef90e
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15985
diff
changeset
|
57 void (*_purple_reserved2)(void); |
516f14bef90e
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15985
diff
changeset
|
58 void (*_purple_reserved3)(void); |
516f14bef90e
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15985
diff
changeset
|
59 void (*_purple_reserved4)(void); |
15822 | 60 } PurpleDebugUiOps; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
61 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
62 #ifdef __cplusplus |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
63 extern "C" { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
64 #endif |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
65 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
66 /**************************************************************************/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
67 /** @name Debug API */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
68 /**************************************************************************/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
69 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
70 * Outputs debug information. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
71 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
72 * @param level The debug level. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
73 * @param category The category (or @c NULL). |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
74 * @param format The format string. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
75 */ |
15822 | 76 void purple_debug(PurpleDebugLevel level, const char *category, |
22485
9511acb88e58
Set G_GNUC_PRINTF(2, 3) on our debug functions. This sets the 'format'
Mark Doliner <mark@kingant.net>
parents:
20074
diff
changeset
|
77 const char *format, ...) G_GNUC_PRINTF(3, 4); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
78 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
79 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
80 * Outputs misc. level debug information. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
81 * |
15822 | 82 * This is a wrapper for purple_debug(), and uses PURPLE_DEBUG_MISC as |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
83 * the level. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
84 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
85 * @param category The category (or @c NULL). |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
86 * @param format The format string. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
87 * |
15822 | 88 * @see purple_debug() |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
89 */ |
22485
9511acb88e58
Set G_GNUC_PRINTF(2, 3) on our debug functions. This sets the 'format'
Mark Doliner <mark@kingant.net>
parents:
20074
diff
changeset
|
90 void purple_debug_misc(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
91 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
92 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
93 * Outputs info level debug information. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
94 * |
15822 | 95 * This is a wrapper for purple_debug(), and uses PURPLE_DEBUG_INFO as |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
96 * the level. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
97 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
98 * @param category The category (or @c NULL). |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
99 * @param format The format string. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
100 * |
15822 | 101 * @see purple_debug() |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
102 */ |
22485
9511acb88e58
Set G_GNUC_PRINTF(2, 3) on our debug functions. This sets the 'format'
Mark Doliner <mark@kingant.net>
parents:
20074
diff
changeset
|
103 void purple_debug_info(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
104 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
105 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
106 * Outputs warning level debug information. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
107 * |
15822 | 108 * This is a wrapper for purple_debug(), and uses PURPLE_DEBUG_WARNING as |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
109 * the level. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
110 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
111 * @param category The category (or @c NULL). |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
112 * @param format The format string. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
113 * |
15822 | 114 * @see purple_debug() |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
115 */ |
22485
9511acb88e58
Set G_GNUC_PRINTF(2, 3) on our debug functions. This sets the 'format'
Mark Doliner <mark@kingant.net>
parents:
20074
diff
changeset
|
116 void purple_debug_warning(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
117 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
118 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
119 * Outputs error level debug information. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
120 * |
15822 | 121 * This is a wrapper for purple_debug(), and uses PURPLE_DEBUG_ERROR as |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
122 * the level. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
123 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
124 * @param category The category (or @c NULL). |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
125 * @param format The format string. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
126 * |
15822 | 127 * @see purple_debug() |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
128 */ |
22485
9511acb88e58
Set G_GNUC_PRINTF(2, 3) on our debug functions. This sets the 'format'
Mark Doliner <mark@kingant.net>
parents:
20074
diff
changeset
|
129 void purple_debug_error(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
130 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
131 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
132 * Outputs fatal error level debug information. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
133 * |
15822 | 134 * This is a wrapper for purple_debug(), and uses PURPLE_DEBUG_ERROR as |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
135 * the level. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
136 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
137 * @param category The category (or @c NULL). |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
138 * @param format The format string. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
139 * |
15822 | 140 * @see purple_debug() |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
141 */ |
22485
9511acb88e58
Set G_GNUC_PRINTF(2, 3) on our debug functions. This sets the 'format'
Mark Doliner <mark@kingant.net>
parents:
20074
diff
changeset
|
142 void purple_debug_fatal(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
143 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
144 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
145 * Enable or disable printing debug output to the console. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
146 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
147 * @param enabled TRUE to enable debug output or FALSE to disable it. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
148 */ |
15822 | 149 void purple_debug_set_enabled(gboolean enabled); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
150 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
151 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
152 * Check if console debug output is enabled. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
153 * |
27297
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
154 * @return TRUE if debugging is enabled, FALSE if it is not. |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
155 */ |
15822 | 156 gboolean purple_debug_is_enabled(void); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
157 |
27297
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
158 /** |
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
159 * Enable or disable verbose debugging. This ordinarily should only be called |
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
160 * by #purple_debug_init, but there are cases where this can be useful for |
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
161 * plugins. |
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
162 * |
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
163 * @param verbose TRUE to enable verbose debugging or FALSE to disable it. |
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
164 * |
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
165 * @since 2.6.0 |
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
166 */ |
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
167 void purple_debug_set_verbose(gboolean verbose); |
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
168 |
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
169 /** |
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
170 * Check if verbose logging is enabled. |
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
171 * |
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
172 * @return TRUE if verbose debugging is enabled, FALSE if it is not. |
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
173 * |
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
174 * @since 2.6.0 |
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
175 */ |
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
176 gboolean purple_debug_is_verbose(void); |
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
177 |
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
178 /** |
30331
3f503c81de76
Correct and clarify some documentation
Mark Doliner <mark@kingant.net>
parents:
27297
diff
changeset
|
179 * Enable or disable unsafe debugging. This ordinarily should only be called |
27297
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
180 * by #purple_debug_init, but there are cases where this can be useful for |
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
181 * plugins. |
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
182 * |
30331
3f503c81de76
Correct and clarify some documentation
Mark Doliner <mark@kingant.net>
parents:
27297
diff
changeset
|
183 * @param unsafe TRUE to enable debug logging of messages that could |
3f503c81de76
Correct and clarify some documentation
Mark Doliner <mark@kingant.net>
parents:
27297
diff
changeset
|
184 * potentially contain passwords and other sensitive information. |
3f503c81de76
Correct and clarify some documentation
Mark Doliner <mark@kingant.net>
parents:
27297
diff
changeset
|
185 * FALSE to disable it. |
27297
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
186 * |
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
187 * @since 2.6.0 |
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
188 */ |
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
189 void purple_debug_set_unsafe(gboolean unsafe); |
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
190 |
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
191 /** |
30331
3f503c81de76
Correct and clarify some documentation
Mark Doliner <mark@kingant.net>
parents:
27297
diff
changeset
|
192 * Check if unsafe debugging is enabled. Defaults to FALSE. |
27297
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
193 * |
30331
3f503c81de76
Correct and clarify some documentation
Mark Doliner <mark@kingant.net>
parents:
27297
diff
changeset
|
194 * @return TRUE if the debug logging of all messages is enabled, FALSE |
3f503c81de76
Correct and clarify some documentation
Mark Doliner <mark@kingant.net>
parents:
27297
diff
changeset
|
195 * if messages that could potentially contain passwords and other |
3f503c81de76
Correct and clarify some documentation
Mark Doliner <mark@kingant.net>
parents:
27297
diff
changeset
|
196 * sensitive information are not logged. |
27297
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
197 * |
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
198 * @since 2.6.0 |
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
199 */ |
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
200 gboolean purple_debug_is_unsafe(void); |
a22ef93d6aec
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22485
diff
changeset
|
201 |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
202 /*@}*/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
203 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
204 /**************************************************************************/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
205 /** @name UI Registration Functions */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
206 /**************************************************************************/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
207 /*@{*/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
208 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
209 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
210 * Sets the UI operations structure to be used when outputting debug |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
211 * information. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
212 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
213 * @param ops The UI operations structure. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
214 */ |
15822 | 215 void purple_debug_set_ui_ops(PurpleDebugUiOps *ops); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
216 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
217 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
218 * Returns the UI operations structure used when outputting debug |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
219 * information. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
220 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
221 * @return The UI operations structure in use. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
222 */ |
15822 | 223 PurpleDebugUiOps *purple_debug_get_ui_ops(void); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
224 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
225 /*@}*/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
226 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
227 /**************************************************************************/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
228 /** @name Debug Subsystem */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
229 /**************************************************************************/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
230 /*@{*/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
231 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
232 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
233 * Initializes the debug subsystem. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
234 */ |
15822 | 235 void purple_debug_init(void); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
236 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
237 /*@}*/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
238 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
239 #ifdef __cplusplus |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
240 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
241 #endif |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
242 |
15822 | 243 #endif /* _PURPLE_DEBUG_H_ */ |