Mon, 18 Oct 2021 02:44:32 -0500
Close the Debug Window on shutdown
Otherwise, it tries to read prefs after that subsystem is shut down.
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
1 | /* |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
2 | * Purple - Internet Messaging Library |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
| 5212 | 4 | * |
| 15884 | 5 | * Purple is the legal property of its developers, whose names are too numerous |
| 8046 | 6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 7 | * source distribution. | |
|
6483
d12ecdf8e489
[gaim-migrate @ 6997]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
8 | * |
| 5212 | 9 | * This program is free software; you can redistribute it and/or modify |
| 10 | * it under the terms of the GNU General Public License as published by | |
| 11 | * the Free Software Foundation; either version 2 of the License, or | |
| 12 | * (at your option) any later version. | |
| 13 | * | |
| 14 | * This program is distributed in the hope that it will be useful, | |
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 17 | * GNU General Public License for more details. | |
| 18 | * | |
| 19 | * You should have received a copy of the GNU General Public License | |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
20 | * along with this program; if not, see <https://www.gnu.org/licenses/>. |
| 5212 | 21 | */ |
|
35487
494f09f7f331
Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents:
35486
diff
changeset
|
22 | |
|
40474
1341be8e3402
Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents:
40245
diff
changeset
|
23 | #if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION) |
|
1341be8e3402
Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents:
40245
diff
changeset
|
24 | # error "only <purple.h> may be included directly" |
|
1341be8e3402
Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents:
40245
diff
changeset
|
25 | #endif |
|
1341be8e3402
Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents:
40245
diff
changeset
|
26 | |
|
39659
e4dfb99b0cef
Fix libpurple header guards using reserved names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39532
diff
changeset
|
27 | #ifndef PURPLE_DEBUG_H |
|
e4dfb99b0cef
Fix libpurple header guards using reserved names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39532
diff
changeset
|
28 | #define PURPLE_DEBUG_H |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
29 | |
|
35440
467bb21b82a1
Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents:
35397
diff
changeset
|
30 | /** |
|
467bb21b82a1
Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents:
35397
diff
changeset
|
31 | * SECTION:debug |
|
467bb21b82a1
Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents:
35397
diff
changeset
|
32 | * @section_id: libpurple-debug |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
33 | * @short_description: Developer Logging API |
|
35440
467bb21b82a1
Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents:
35397
diff
changeset
|
34 | * @title: Debug API |
|
467bb21b82a1
Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents:
35397
diff
changeset
|
35 | */ |
|
467bb21b82a1
Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents:
35397
diff
changeset
|
36 | |
|
10307
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
37 | #include <glib.h> |
| 35572 | 38 | #include <glib-object.h> |
| 39 | ||
| 5212 | 40 | #include <stdarg.h> |
| 41 | ||
|
38643
cb7fbf08fcb7
Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38560
diff
changeset
|
42 | G_BEGIN_DECLS |
| 35572 | 43 | |
|
40524
a3b1cde8d2d8
Add documentation for all PURPLE_TYPE_ functions as well as PURPLE_TUNE_ constants
Gary Kramlich <grim@reaperworld.com>
parents:
40474
diff
changeset
|
44 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
45 | * PurpleDebugLevel: |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
46 | * @PURPLE_DEBUG_ALL: All debug levels. |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
47 | * @PURPLE_DEBUG_MISC: General chatter. |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
48 | * @PURPLE_DEBUG_INFO: General operation Information. |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
49 | * @PURPLE_DEBUG_WARNING: Warnings. |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
50 | * @PURPLE_DEBUG_ERROR: Errors. |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
51 | * @PURPLE_DEBUG_FATAL: Fatal errors. |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
52 | * |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
53 | * Available debug levels. |
| 5212 | 54 | */ |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
55 | typedef enum { |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
56 | PURPLE_DEBUG_ALL = 0, |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
57 | PURPLE_DEBUG_MISC, |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
58 | PURPLE_DEBUG_INFO, |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
59 | PURPLE_DEBUG_WARNING, |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
60 | PURPLE_DEBUG_ERROR, |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
61 | PURPLE_DEBUG_FATAL |
| 5212 | 62 | |
| 15884 | 63 | } PurpleDebugLevel; |
| 5212 | 64 | |
|
40950
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
40874
diff
changeset
|
65 | #include "purpledebugui.h" |
| 5212 | 66 | |
| 67 | /** | |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
68 | * purple_debug: |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
69 | * @level: The debug level. |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
35024
diff
changeset
|
70 | * @category: The category (or %NULL). |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
71 | * @format: The format string. |
|
38560
3007790519bf
libpurple: Add some trivial parameter documentation strings
Mike Ruprecht <cmaiku@gmail.com>
parents:
37113
diff
changeset
|
72 | * @...: The parameters to insert into the format string. |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
73 | * |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
74 | * Outputs debug information. |
| 5212 | 75 | */ |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
76 | void purple_debug(PurpleDebugLevel level, const gchar *category, const gchar *format, ...) G_GNUC_PRINTF(3, 4); |
| 5212 | 77 | |
|
6721
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
78 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
79 | * purple_debug_misc: |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
80 | * @category: The category or %NULL. |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
81 | * @format: The format string. |
|
38560
3007790519bf
libpurple: Add some trivial parameter documentation strings
Mike Ruprecht <cmaiku@gmail.com>
parents:
37113
diff
changeset
|
82 | * @...: The parameters to insert into the format string. |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
83 | * |
|
6721
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
84 | * Outputs misc. level debug information. |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
85 | * |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
86 | * This is a wrapper for purple_debug(), and uses #PURPLE_DEBUG_MISC as the |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
87 | * level. |
|
6721
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
88 | * |
| 35471 | 89 | * See purple_debug(). |
|
6721
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
90 | */ |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
91 | void purple_debug_misc(const gchar *category, const gchar *format, ...) G_GNUC_PRINTF(2, 3); |
|
6721
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
92 | |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
93 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
94 | * purple_debug_info: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
95 | * @category: The category (or %NULL). |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
96 | * @format: The format string. |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
97 | * @...: The parameters to insert into the format string. |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
98 | * |
|
6721
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
99 | * Outputs info level debug information. |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
100 | * |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
101 | * 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
|
102 | * the level. |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
103 | * |
| 35471 | 104 | * See purple_debug(). |
|
6721
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
105 | */ |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
106 | void purple_debug_info(const gchar *category, const gchar *format, ...) G_GNUC_PRINTF(2, 3); |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
107 | |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
108 | /** |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
109 | * purple_debug_warning: |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
110 | * @category: The category or %NULL. |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
111 | * @format: The format string. |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
112 | * @...: The parameters to insert into the format string. |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
113 | * |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
114 | * Outputs warning level debug information. |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
115 | * |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
116 | * This is a wrapper for purple_debug(), and uses #PURPLE_DEBUG_WARNING as the |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
117 | * level. |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
118 | * |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
119 | * See purple_debug(). |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
120 | */ |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
121 | void purple_debug_warning(const gchar *category, const gchar *format, ...) G_GNUC_PRINTF(2, 3); |
|
6721
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
122 | |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
123 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
124 | * purple_debug_error: |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
125 | * @category: The category or %NULL. |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
126 | * @format: The format string. |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
127 | * @...: The parameters to insert into the format string. |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
128 | * |
|
6721
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
129 | * Outputs error level debug information. |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
130 | * |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
131 | * This is a wrapper for purple_debug(), and uses #PURPLE_DEBUG_ERROR as the |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
132 | * level. |
|
6721
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
133 | * |
| 35471 | 134 | * See purple_debug(). |
|
6721
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
135 | */ |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
136 | void purple_debug_error(const gchar *category, const gchar *format, ...) G_GNUC_PRINTF(2, 3); |
|
6721
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
137 | |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
138 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
139 | * purple_debug_fatal: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
140 | * @category: The category (or %NULL). |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
141 | * @format: The format string. |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
142 | * @...: The parameters to insert into the format string. |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
143 | * |
|
6721
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
144 | * Outputs fatal error level debug information. |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
145 | * |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
146 | * This is a wrapper for purple_debug(), and uses #PURPLE_DEBUG_ERROR as the |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
147 | * level. |
|
6721
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
148 | * |
| 35471 | 149 | * See purple_debug(). |
|
6721
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
150 | */ |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
151 | void purple_debug_fatal(const gchar *category, const gchar *format, ...) G_GNUC_PRINTF(2, 3); |
|
6721
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
152 | |
|
10307
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
153 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
154 | * purple_debug_set_enabled: |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
155 | * @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
|
156 | * |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
157 | * Enable or disable printing debug output to the console. |
|
10307
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
158 | */ |
| 15884 | 159 | void purple_debug_set_enabled(gboolean enabled); |
|
10307
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
160 | |
|
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
161 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
162 | * purple_debug_is_enabled: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
163 | * |
|
10307
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
164 | * Check if console debug output is enabled. |
|
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
165 | * |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
166 | * 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
|
167 | */ |
| 15884 | 168 | gboolean purple_debug_is_enabled(void); |
|
10307
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
169 | |
|
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 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
171 | * purple_debug_set_verbose: |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
172 | * @verbose: %TRUE to enable verbose debugging or %FALSE to disable it. |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
173 | * |
|
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 | * Enable or disable verbose debugging. This ordinarily should only be called |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
175 | * by purple_debug_init(), but there are cases where this can be useful for |
|
27542
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 | */ |
|
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22621
diff
changeset
|
178 | 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
|
179 | |
|
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22621
diff
changeset
|
180 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
181 | * purple_debug_is_verbose: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
182 | * |
|
27542
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22621
diff
changeset
|
183 | * 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
|
184 | * |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
185 | * 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
|
186 | */ |
|
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22621
diff
changeset
|
187 | 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
|
188 | |
|
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22621
diff
changeset
|
189 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
190 | * purple_debug_set_unsafe: |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
191 | * @unsafe: %TRUE to enable debug logging of messages that could potentially |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
192 | * contain passwords and other sensitive information. %FALSE to |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
193 | * disable it. |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
194 | * |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
195 | * Enable or disable unsafe debugging. This ordinarily should only be called by |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
196 | * purple_debug_init(), but there are cases where this can be useful for |
|
27542
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22621
diff
changeset
|
197 | * plugins. |
|
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22621
diff
changeset
|
198 | */ |
|
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22621
diff
changeset
|
199 | 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
|
200 | |
|
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22621
diff
changeset
|
201 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
202 | * purple_debug_is_unsafe: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
203 | * |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
204 | * 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
|
205 | * |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
206 | * Returns: %TRUE if the debug logging of all messages is enabled, %FALSE if |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
207 | * messages that could potentially contain passwords and other |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
208 | * 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
|
209 | */ |
|
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22621
diff
changeset
|
210 | 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
|
211 | |
|
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
|
212 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
213 | * purple_debug_set_colored: |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
214 | * @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
|
215 | * |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
216 | * Enable or disable colored output for bash console. |
|
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
|
217 | */ |
|
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
|
218 | 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
|
219 | |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
220 | /****************************************************************************** |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
221 | * UI Registration Functions |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
222 | *****************************************************************************/ |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5212
diff
changeset
|
223 | |
| 5212 | 224 | /** |
|
38643
cb7fbf08fcb7
Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38560
diff
changeset
|
225 | * purple_debug_set_ui: |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
226 | * @ui: The UI operations structure. |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
227 | * |
| 5212 | 228 | * Sets the UI operations structure to be used when outputting debug |
| 229 | * information. | |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
230 | * |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
231 | * Since: 3.0.0 |
| 5212 | 232 | */ |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
233 | void purple_debug_set_ui(PurpleDebugUi *ui); |
| 5212 | 234 | |
| 235 | /** | |
|
38643
cb7fbf08fcb7
Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38560
diff
changeset
|
236 | * purple_debug_get_ui: |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
237 | * |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
238 | * Get the #PurpleDebugUi instance used for outputting debug information. |
| 5212 | 239 | * |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
240 | * Returns: (transfer none): The #PurpleDebugUi instance in use. |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
241 | * |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
242 | * Since: 3.0.0 |
| 5212 | 243 | */ |
|
38643
cb7fbf08fcb7
Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38560
diff
changeset
|
244 | PurpleDebugUi *purple_debug_get_ui(void); |
| 5212 | 245 | |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
246 | /****************************************************************************** |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
247 | * Debug Subsystem |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40524
diff
changeset
|
248 | *****************************************************************************/ |
|
10307
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
249 | |
|
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
250 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
251 | * purple_debug_init: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
252 | * |
|
10307
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
253 | * Initializes the debug subsystem. |
|
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
254 | */ |
| 15884 | 255 | void purple_debug_init(void); |
|
10307
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
256 | |
|
32787
7072f190d6ad
Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32438
diff
changeset
|
257 | G_END_DECLS |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5212
diff
changeset
|
258 | |
|
39659
e4dfb99b0cef
Fix libpurple header guards using reserved names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39532
diff
changeset
|
259 | #endif /* PURPLE_DEBUG_H */ |