libpurple/debug.h

Fri, 31 Jan 2014 19:42:12 +0530

author
Ankit Vani <a@nevitus.org>
date
Fri, 31 Jan 2014 19:42:12 +0530
branch
soc.2013.gobjectification.plugins
changeset 37039
7d964cdccbb5
parent 37035
e85ed7f4d6e3
child 37040
91119588bc3a
permissions
-rw-r--r--

Merged gtkdoc-conversion branch

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
35024
eb3afb7643ce Added /*< private >*/ for padding members, clean them up and add missing ones
Ankit Vani <a@nevitus.org>
parents: 34296
diff changeset
56 /*< private >*/
16743
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_reserved1)(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_reserved2)(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_reserved3)(void);
1ce5ffe12e2a Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 16044
diff changeset
60 void (*_purple_reserved4)(void);
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
61 } PurpleDebugUiOps;
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
62
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32438
diff changeset
63 G_BEGIN_DECLS
5944
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 /**************************************************************************/
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5212
diff changeset
66 /** @name Debug API */
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5212
diff changeset
67 /**************************************************************************/
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
68 /**
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
69 * Outputs debug information.
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
70 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
71 * @level: The debug level.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
72 * @category: The category (or %NULL).
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
73 * @format: The format string.
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
74 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
75 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
76 const char *format, ...) G_GNUC_PRINTF(3, 4);
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
77
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
78 /**
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
79 * Outputs misc. level debug information.
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
80 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
81 * 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
82 * the level.
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
83 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
84 * @category: The category (or %NULL).
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
85 * @format: The format string.
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
86 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
87 * @see purple_debug()
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
88 */
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
89 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
90
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
91 /**
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
92 * Outputs info level debug information.
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
93 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
94 * 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
95 * the level.
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
96 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
97 * @category: The category (or %NULL).
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
98 * @format: The format string.
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
99 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
100 * @see purple_debug()
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
101 */
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
102 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
103
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
104 /**
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
105 * Outputs warning level debug information.
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
106 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
107 * 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
108 * the level.
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
109 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
110 * @category: The category (or %NULL).
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
111 * @format: The format string.
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
112 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
113 * @see purple_debug()
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
114 */
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
115 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
116
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
117 /**
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
118 * Outputs error level debug information.
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
119 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
120 * 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
121 * the level.
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
122 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
123 * @category: The category (or %NULL).
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
124 * @format: The format string.
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
125 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
126 * @see purple_debug()
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
127 */
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
128 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
129
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
130 /**
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
131 * Outputs fatal error level debug information.
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
132 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
133 * 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
134 * the level.
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
135 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
136 * @category: The category (or %NULL).
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
137 * @format: The format string.
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
138 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
139 * @see purple_debug()
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
140 */
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
141 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
142
10307
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
143 /**
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
144 * Enable or disable printing debug output to the console.
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
145 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
146 * @enabled: TRUE to enable debug output or FALSE to disable it.
10307
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
147 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
148 void purple_debug_set_enabled(gboolean enabled);
10307
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 /**
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
151 * Check if console debug output is enabled.
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
152 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
153 * Returns: TRUE if debugging is enabled, FALSE if it is not.
10307
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
154 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
155 gboolean purple_debug_is_enabled(void);
10307
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
156
27542
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
157 /**
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
158 * 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
159 * 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
160 * plugins.
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
161 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
162 * @verbose: TRUE to enable verbose debugging or 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
163 */
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
164 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
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 /**
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
167 * 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
168 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
169 * Returns: TRUE if verbose debugging is enabled, FALSE if it is not.
27542
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
170 */
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
171 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
172
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
173 /**
30596
50b5850e76d9 Correct and clarify some documentation
Mark Doliner <markdoliner@pidgin.im>
parents: 27542
diff changeset
174 * 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
175 * 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
176 * plugins.
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
177 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
178 * @unsafe: TRUE to enable debug logging of messages that could
30596
50b5850e76d9 Correct and clarify some documentation
Mark Doliner <markdoliner@pidgin.im>
parents: 27542
diff changeset
179 * potentially contain passwords and other sensitive information.
50b5850e76d9 Correct and clarify some documentation
Mark Doliner <markdoliner@pidgin.im>
parents: 27542
diff changeset
180 * 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
181 */
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
182 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
183
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
184 /**
30596
50b5850e76d9 Correct and clarify some documentation
Mark Doliner <markdoliner@pidgin.im>
parents: 27542
diff changeset
185 * 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
186 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
187 * Returns: TRUE if the debug logging of all messages is enabled, FALSE
30596
50b5850e76d9 Correct and clarify some documentation
Mark Doliner <markdoliner@pidgin.im>
parents: 27542
diff changeset
188 * if messages that could potentially contain passwords and other
50b5850e76d9 Correct and clarify some documentation
Mark Doliner <markdoliner@pidgin.im>
parents: 27542
diff changeset
189 * 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
190 */
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22621
diff changeset
191 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
192
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
193 /**
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 * 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
195 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
196 * @colored: TRUE to enable colored output, FALSE to disable it.
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
197 */
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 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
199
5944
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 /**************************************************************************/
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5212
diff changeset
203 /** @name UI Registration Functions */
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 /*@{*/
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5212
diff changeset
206
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
207 /**
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
208 * Sets the UI operations structure to be used when outputting debug
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
209 * information.
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
210 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
211 * @ops: The UI operations structure.
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
212 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
213 void purple_debug_set_ui_ops(PurpleDebugUiOps *ops);
5212
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 /**
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
216 * Returns the UI operations structure used when outputting debug
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
217 * information.
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
218 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
219 * Returns: The UI operations structure in use.
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
220 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
221 PurpleDebugUiOps *purple_debug_get_ui_ops(void);
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
222
5944
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5212
diff changeset
223 /*@}*/
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5212
diff changeset
224
10307
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
225 /**************************************************************************/
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
226 /** @name Debug Subsystem */
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 /**
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
231 * Initializes the debug subsystem.
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
232 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
233 void purple_debug_init(void);
10307
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 /*@}*/
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
236
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32438
diff changeset
237 G_END_DECLS
5944
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5212
diff changeset
238
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
239 #endif /* _PURPLE_DEBUG_H_ */

mercurial