libpurple/debug.h

Mon, 09 Sep 2013 14:47:22 +0200

author
Tomasz Wasilczyk <twasilczyk@pidgin.im>
date
Mon, 09 Sep 2013 14:47:22 +0200
changeset 34328
d0b5e37899e1
parent 34296
d31a4f3b547e
child 35024
eb3afb7643ce
permissions
-rw-r--r--

Request API: allow action_count = 0

5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1 /**
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
2 * @file debug.h Debug API
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
3 * @ingroup core
20147
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
4 */
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
5
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
6 /* purple
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
7 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
8 * Purple is the legal property of its developers, whose names are too numerous
8046
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 7035
diff changeset
9 * to list here. Please refer to the COPYRIGHT file distributed with this
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 7035
diff changeset
10 * source distribution.
6483
d12ecdf8e489 [gaim-migrate @ 6997]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
11 *
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
12 * This program is free software; you can redistribute it and/or modify
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
13 * it under the terms of the GNU General Public License as published by
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14 * the Free Software Foundation; either version 2 of the License, or
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 * (at your option) any later version.
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 *
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 * This program is distributed in the hope that it will be useful,
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20 * GNU General Public License for more details.
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
21 *
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
22 * You should have received a copy of the GNU General Public License
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
23 * along with this program; if not, write to the Free Software
19859
71d37b57eff2 The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 16743
diff changeset
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
25 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
26 #ifndef _PURPLE_DEBUG_H_
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
27 #define _PURPLE_DEBUG_H_
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
28
10307
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
29 #include <glib.h>
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
30 #include <stdarg.h>
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
31
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
32 /**
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
33 * Debug levels.
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
34 */
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
35 typedef enum
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
36 {
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
37 PURPLE_DEBUG_ALL = 0, /**< All debug levels. */
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
38 PURPLE_DEBUG_MISC, /**< General chatter. */
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
39 PURPLE_DEBUG_INFO, /**< General operation Information. */
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
40 PURPLE_DEBUG_WARNING, /**< Warnings. */
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
41 PURPLE_DEBUG_ERROR, /**< Errors. */
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
42 PURPLE_DEBUG_FATAL /**< Fatal errors. */
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
43
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
44 } PurpleDebugLevel;
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
45
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
46 /**
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
47 * Debug UI operations.
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
48 */
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
49 typedef struct
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
50 {
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
51 void (*print)(PurpleDebugLevel level, const char *category,
13988
a178d3dcbb7f [gaim-migrate @ 16445]
Mark Doliner <markdoliner@pidgin.im>
parents: 12323
diff changeset
52 const char *arg_s);
16044
257072807aa8 Add a whimpy ui op to the debug API that returns TRUE if debugging
Mark Doliner <markdoliner@pidgin.im>
parents: 15884
diff changeset
53 gboolean (*is_enabled)(PurpleDebugLevel level,
257072807aa8 Add a whimpy ui op to the debug API that returns TRUE if debugging
Mark Doliner <markdoliner@pidgin.im>
parents: 15884
diff changeset
54 const char *category);
16743
1ce5ffe12e2a Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 16044
diff changeset
55
1ce5ffe12e2a Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 16044
diff changeset
56 void (*_purple_reserved1)(void);
1ce5ffe12e2a Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 16044
diff changeset
57 void (*_purple_reserved2)(void);
1ce5ffe12e2a Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 16044
diff changeset
58 void (*_purple_reserved3)(void);
1ce5ffe12e2a Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 16044
diff changeset
59 void (*_purple_reserved4)(void);
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
60 } PurpleDebugUiOps;
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
61
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32438
diff changeset
62 G_BEGIN_DECLS
5944
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5212
diff changeset
63
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5212
diff changeset
64 /**************************************************************************/
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5212
diff changeset
65 /** @name Debug API */
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5212
diff changeset
66 /**************************************************************************/
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
67 /**
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
68 * Outputs debug information.
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
69 *
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
70 * @param level The debug level.
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
71 * @param category The category (or @c NULL).
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
72 * @param format The format string.
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
73 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
74 void purple_debug(PurpleDebugLevel level, const char *category,
22621
552a6fb4de03 Set G_GNUC_PRINTF(2, 3) on our debug functions. This sets the 'format'
Mark Doliner <markdoliner@pidgin.im>
parents: 20147
diff changeset
75 const char *format, ...) G_GNUC_PRINTF(3, 4);
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
76
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
77 /**
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
78 * Outputs misc. level debug information.
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
79 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
80 * This is a wrapper for purple_debug(), and uses PURPLE_DEBUG_MISC as
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
81 * the level.
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
82 *
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
83 * @param category The category (or @c NULL).
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
84 * @param format The format string.
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
85 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
86 * @see purple_debug()
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
87 */
22621
552a6fb4de03 Set G_GNUC_PRINTF(2, 3) on our debug functions. This sets the 'format'
Mark Doliner <markdoliner@pidgin.im>
parents: 20147
diff changeset
88 void purple_debug_misc(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3);
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
89
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
90 /**
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
91 * Outputs info level debug information.
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
92 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
93 * This is a wrapper for purple_debug(), and uses PURPLE_DEBUG_INFO as
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
94 * the level.
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
95 *
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
96 * @param category The category (or @c NULL).
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
97 * @param format The format string.
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
98 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
99 * @see purple_debug()
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
100 */
22621
552a6fb4de03 Set G_GNUC_PRINTF(2, 3) on our debug functions. This sets the 'format'
Mark Doliner <markdoliner@pidgin.im>
parents: 20147
diff changeset
101 void purple_debug_info(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3);
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
102
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
103 /**
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
104 * Outputs warning level debug information.
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
105 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
106 * This is a wrapper for purple_debug(), and uses PURPLE_DEBUG_WARNING as
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
107 * the level.
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
108 *
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
109 * @param category The category (or @c NULL).
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
110 * @param format The format string.
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
111 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
112 * @see purple_debug()
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
113 */
22621
552a6fb4de03 Set G_GNUC_PRINTF(2, 3) on our debug functions. This sets the 'format'
Mark Doliner <markdoliner@pidgin.im>
parents: 20147
diff changeset
114 void purple_debug_warning(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3);
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
115
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
116 /**
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
117 * Outputs error level debug information.
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
118 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
119 * This is a wrapper for purple_debug(), and uses PURPLE_DEBUG_ERROR as
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
120 * the level.
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
121 *
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
122 * @param category The category (or @c NULL).
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
123 * @param format The format string.
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
124 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
125 * @see purple_debug()
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
126 */
22621
552a6fb4de03 Set G_GNUC_PRINTF(2, 3) on our debug functions. This sets the 'format'
Mark Doliner <markdoliner@pidgin.im>
parents: 20147
diff changeset
127 void purple_debug_error(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3);
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
128
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
129 /**
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
130 * Outputs fatal error level debug information.
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
131 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
132 * This is a wrapper for purple_debug(), and uses PURPLE_DEBUG_ERROR as
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
133 * the level.
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
134 *
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
135 * @param category The category (or @c NULL).
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
136 * @param format The format string.
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
137 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
138 * @see purple_debug()
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
139 */
22621
552a6fb4de03 Set G_GNUC_PRINTF(2, 3) on our debug functions. This sets the 'format'
Mark Doliner <markdoliner@pidgin.im>
parents: 20147
diff changeset
140 void purple_debug_fatal(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3);
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
141
10307
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
142 /**
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
143 * Enable or disable printing debug output to the console.
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
144 *
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
145 * @param enabled TRUE to enable debug output or FALSE to disable it.
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
146 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
147 void purple_debug_set_enabled(gboolean enabled);
10307
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
148
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
149 /**
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
150 * Check if console debug output is enabled.
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
151 *
27542
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
152 * @return TRUE if debugging is enabled, FALSE if it is not.
10307
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
153 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
154 gboolean purple_debug_is_enabled(void);
10307
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
155
27542
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
156 /**
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
157 * Enable or disable verbose debugging. This ordinarily should only be called
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
158 * by #purple_debug_init, but there are cases where this can be useful for
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
159 * plugins.
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
160 *
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
161 * @param verbose TRUE to enable verbose debugging or FALSE to disable it.
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
162 */
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
163 void purple_debug_set_verbose(gboolean verbose);
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
164
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
165 /**
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
166 * Check if verbose logging is enabled.
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
167 *
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
168 * @return TRUE if verbose debugging is enabled, FALSE if it is not.
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
169 */
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
170 gboolean purple_debug_is_verbose(void);
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
171
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
172 /**
30596
50b5850e76d9 Correct and clarify some documentation
Mark Doliner <markdoliner@pidgin.im>
parents: 27542
diff changeset
173 * Enable or disable unsafe debugging. This ordinarily should only be called
27542
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
174 * by #purple_debug_init, but there are cases where this can be useful for
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
175 * plugins.
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
176 *
30596
50b5850e76d9 Correct and clarify some documentation
Mark Doliner <markdoliner@pidgin.im>
parents: 27542
diff changeset
177 * @param unsafe TRUE to enable debug logging of messages that could
50b5850e76d9 Correct and clarify some documentation
Mark Doliner <markdoliner@pidgin.im>
parents: 27542
diff changeset
178 * potentially contain passwords and other sensitive information.
50b5850e76d9 Correct and clarify some documentation
Mark Doliner <markdoliner@pidgin.im>
parents: 27542
diff changeset
179 * FALSE to disable it.
27542
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
180 */
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
181 void purple_debug_set_unsafe(gboolean unsafe);
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
182
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
183 /**
30596
50b5850e76d9 Correct and clarify some documentation
Mark Doliner <markdoliner@pidgin.im>
parents: 27542
diff changeset
184 * Check if unsafe debugging is enabled. Defaults to FALSE.
27542
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
185 *
30596
50b5850e76d9 Correct and clarify some documentation
Mark Doliner <markdoliner@pidgin.im>
parents: 27542
diff changeset
186 * @return TRUE if the debug logging of all messages is enabled, FALSE
50b5850e76d9 Correct and clarify some documentation
Mark Doliner <markdoliner@pidgin.im>
parents: 27542
diff changeset
187 * if messages that could potentially contain passwords and other
50b5850e76d9 Correct and clarify some documentation
Mark Doliner <markdoliner@pidgin.im>
parents: 27542
diff changeset
188 * sensitive information are not logged.
27542
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
189 */
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
190 gboolean purple_debug_is_unsafe(void);
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
191
34296
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32787
diff changeset
192 /**
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32787
diff changeset
193 * Enable or disable colored output for bash console.
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32787
diff changeset
194 *
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32787
diff changeset
195 * @param colored TRUE to enable colored output, FALSE to disable it.
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32787
diff changeset
196 */
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32787
diff changeset
197 void purple_debug_set_colored(gboolean colored);
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32787
diff changeset
198
5944
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5212
diff changeset
199 /*@}*/
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5212
diff changeset
200
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5212
diff changeset
201 /**************************************************************************/
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5212
diff changeset
202 /** @name UI Registration Functions */
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5212
diff changeset
203 /**************************************************************************/
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5212
diff changeset
204 /*@{*/
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5212
diff changeset
205
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
206 /**
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
207 * Sets the UI operations structure to be used when outputting debug
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
208 * information.
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
209 *
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
210 * @param ops The UI operations structure.
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
211 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
212 void purple_debug_set_ui_ops(PurpleDebugUiOps *ops);
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
213
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
214 /**
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
215 * Returns the UI operations structure used when outputting debug
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
216 * information.
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
217 *
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
218 * @return The UI operations structure in use.
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
219 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
220 PurpleDebugUiOps *purple_debug_get_ui_ops(void);
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
221
5944
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5212
diff changeset
222 /*@}*/
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5212
diff changeset
223
10307
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
224 /**************************************************************************/
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
225 /** @name Debug Subsystem */
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
226 /**************************************************************************/
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
227 /*@{*/
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
228
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
229 /**
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
230 * Initializes the debug subsystem.
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
231 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
232 void purple_debug_init(void);
10307
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
233
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
234 /*@}*/
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
235
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32438
diff changeset
236 G_END_DECLS
5944
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5212
diff changeset
237
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
238 #endif /* _PURPLE_DEBUG_H_ */

mercurial