libpurple/log.h

Mon, 18 Oct 2021 01:36:58 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Mon, 18 Oct 2021 01:36:58 -0500
changeset 41105
02c3569bc32b
parent 40827
ea25e596b1d4
permissions
-rw-r--r--

Add gi-docgen as a subproject so we can convert the documentation to it

Testing Done:
Just compiled and verified that our `.wrap` file didn't get overwritten by a `wrap-file` from gplugin.

Reviewed at https://reviews.imfreedom.org/r/1055/

20147
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
1 /* purple
5872
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
2 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
3 * Purple is the legal property of its developers, whose names are too numerous
8046
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 7586
diff changeset
4 * to list here. Please refer to the COPYRIGHT file distributed with this
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 7586
diff changeset
5 * source distribution.
7440
e0d8f6bc36c2 [gaim-migrate @ 8045]
Nathan Walp <nwalp@pidgin.im>
parents: 7431
diff changeset
6 *
5872
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
10 * (at your option) any later version.
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
11 *
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 * GNU General Public License for more details.
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 *
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 * 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: 18412
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
5872
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20 */
35487
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35486
diff changeset
21
40474
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 40188
diff changeset
22 #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: 40188
diff changeset
23 # 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: 40188
diff changeset
24 #endif
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 40188
diff changeset
25
39659
e4dfb99b0cef Fix libpurple header guards using reserved names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38716
diff changeset
26 #ifndef PURPLE_LOG_H
e4dfb99b0cef Fix libpurple header guards using reserved names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38716
diff changeset
27 #define PURPLE_LOG_H
35440
467bb21b82a1 Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents: 35419
diff changeset
28 /**
467bb21b82a1 Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents: 35419
diff changeset
29 * SECTION:log
467bb21b82a1 Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents: 35419
diff changeset
30 * @section_id: libpurple-log
467bb21b82a1 Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents: 35419
diff changeset
31 * @short_description: <filename>log.h</filename>
467bb21b82a1 Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents: 35419
diff changeset
32 * @title: Logging API
467bb21b82a1 Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents: 35419
diff changeset
33 * @see_also: <link linkend="chapter-signals-log">Log signals</link>
467bb21b82a1 Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents: 35419
diff changeset
34 */
467bb21b82a1 Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents: 35419
diff changeset
35
7431
f3eaace13491 [gaim-migrate @ 8036]
Sean Egan <seanegan@pidgin.im>
parents: 6695
diff changeset
36 #include <stdio.h>
5872
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
37
34792
09228ea79272 Added GBoxed to certificate, certificate pool, xfer, log
Ankit Vani <a@nevitus.org>
parents: 34620
diff changeset
38 #define PURPLE_TYPE_LOG (purple_log_get_type())
5872
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
39
7431
f3eaace13491 [gaim-migrate @ 8036]
Sean Egan <seanegan@pidgin.im>
parents: 6695
diff changeset
40 /********************************************************
f3eaace13491 [gaim-migrate @ 8036]
Sean Egan <seanegan@pidgin.im>
parents: 6695
diff changeset
41 * DATA STRUCTURES **************************************
f3eaace13491 [gaim-migrate @ 8036]
Sean Egan <seanegan@pidgin.im>
parents: 6695
diff changeset
42 ********************************************************/
f3eaace13491 [gaim-migrate @ 8036]
Sean Egan <seanegan@pidgin.im>
parents: 6695
diff changeset
43
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
44 typedef struct _PurpleLog PurpleLog;
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
45 typedef struct _PurpleLogLogger PurpleLogLogger;
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
46 typedef struct _PurpleLogCommonLoggerData PurpleLogCommonLoggerData;
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
47 typedef struct _PurpleLogSet PurpleLogSet;
7431
f3eaace13491 [gaim-migrate @ 8036]
Sean Egan <seanegan@pidgin.im>
parents: 6695
diff changeset
48
40827
ea25e596b1d4 Clean up some random gtk-doc warnings in libpurple's documentation
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
49 /**
ea25e596b1d4 Clean up some random gtk-doc warnings in libpurple's documentation
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
50 * PurpleLogType:
ea25e596b1d4 Clean up some random gtk-doc warnings in libpurple's documentation
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
51 * @PURPLE_LOG_IM: Indicates an IM conversation.
ea25e596b1d4 Clean up some random gtk-doc warnings in libpurple's documentation
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
52 * @PURPLE_LOG_CHAT: Indicates a chat.
ea25e596b1d4 Clean up some random gtk-doc warnings in libpurple's documentation
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
53 * @PURPLE_LOG_SYSTEM: Indicates a server log.
ea25e596b1d4 Clean up some random gtk-doc warnings in libpurple's documentation
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
54 *
ea25e596b1d4 Clean up some random gtk-doc warnings in libpurple's documentation
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
55 * The individual types of logs.
ea25e596b1d4 Clean up some random gtk-doc warnings in libpurple's documentation
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
56 */
7431
f3eaace13491 [gaim-migrate @ 8036]
Sean Egan <seanegan@pidgin.im>
parents: 6695
diff changeset
57 typedef enum {
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
58 PURPLE_LOG_IM,
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
59 PURPLE_LOG_CHAT,
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
60 PURPLE_LOG_SYSTEM
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
61 } PurpleLogType;
7431
f3eaace13491 [gaim-migrate @ 8036]
Sean Egan <seanegan@pidgin.im>
parents: 6695
diff changeset
62
40827
ea25e596b1d4 Clean up some random gtk-doc warnings in libpurple's documentation
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
63 /**
ea25e596b1d4 Clean up some random gtk-doc warnings in libpurple's documentation
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
64 * PurpleLogReadFlags:
ea25e596b1d4 Clean up some random gtk-doc warnings in libpurple's documentation
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
65 * @PURPLE_LOG_READ_NO_NEWLINE: Defines that newlines should be ignored.
ea25e596b1d4 Clean up some random gtk-doc warnings in libpurple's documentation
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
66 *
ea25e596b1d4 Clean up some random gtk-doc warnings in libpurple's documentation
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
67 * Flags that should be used when reading a log.
ea25e596b1d4 Clean up some random gtk-doc warnings in libpurple's documentation
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
68 */
7431
f3eaace13491 [gaim-migrate @ 8036]
Sean Egan <seanegan@pidgin.im>
parents: 6695
diff changeset
69 typedef enum {
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
70 PURPLE_LOG_READ_NO_NEWLINE = 1
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
71 } PurpleLogReadFlags;
7431
f3eaace13491 [gaim-migrate @ 8036]
Sean Egan <seanegan@pidgin.im>
parents: 6695
diff changeset
72
f3eaace13491 [gaim-migrate @ 8036]
Sean Egan <seanegan@pidgin.im>
parents: 6695
diff changeset
73 #include "account.h"
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
74 #include "conversations.h"
7431
f3eaace13491 [gaim-migrate @ 8036]
Sean Egan <seanegan@pidgin.im>
parents: 6695
diff changeset
75
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
76 typedef void (*PurpleLogSetCallback) (GHashTable *sets, PurpleLogSet *set);
11177
534ca3ae0bfc [gaim-migrate @ 13285]
Richard Laager <rlaager@pidgin.im>
parents: 11035
diff changeset
77
7431
f3eaace13491 [gaim-migrate @ 8036]
Sean Egan <seanegan@pidgin.im>
parents: 6695
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 * PurpleLogLogger:
35470
8ee08a41f2f3 Convert some other doxygen-type comments
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
80 * @name: The logger's name
8ee08a41f2f3 Convert some other doxygen-type comments
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
81 * @id: An identifier to refer to this logger
8ee08a41f2f3 Convert some other doxygen-type comments
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
82 * @create: This gets called when the log is first created. I don't think
8ee08a41f2f3 Convert some other doxygen-type comments
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
83 * this is actually needed.
8ee08a41f2f3 Convert some other doxygen-type comments
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
84 * @write: This is used to write to the log file
8ee08a41f2f3 Convert some other doxygen-type comments
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
85 * @finalize: Called when the log is destroyed
8ee08a41f2f3 Convert some other doxygen-type comments
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
86 * @list: This function returns a sorted #GList of available PurpleLogs
8ee08a41f2f3 Convert some other doxygen-type comments
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
87 * @read: Given one of the logs returned by the logger's list function,
39859
6c17d9f1fc06 Remove a reference to GtkWebView
Gary Kramlich <grim@reaperworld.com>
parents: 39738
diff changeset
88 * this returns the contents of the log
35470
8ee08a41f2f3 Convert some other doxygen-type comments
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
89 * @size: Given one of the logs returned by the logger's list function,
8ee08a41f2f3 Convert some other doxygen-type comments
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
90 * this returns the size of the log in bytes
8ee08a41f2f3 Convert some other doxygen-type comments
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
91 * @total_size: Returns the total size of all the logs. If this is undefined a
8ee08a41f2f3 Convert some other doxygen-type comments
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
92 * default implementation is used
8ee08a41f2f3 Convert some other doxygen-type comments
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
93 * @list_syslog: This function returns a sorted #GList of available system
8ee08a41f2f3 Convert some other doxygen-type comments
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
94 * #PurpleLog's
8ee08a41f2f3 Convert some other doxygen-type comments
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
95 * @get_log_sets: Adds #PurpleLogSet's to a #GHashTable. By passing the data in
8ee08a41f2f3 Convert some other doxygen-type comments
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
96 * the #PurpleLogSet's to list, the caller can get every
8ee08a41f2f3 Convert some other doxygen-type comments
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
97 * available #PurpleLog from the logger. Loggers using
8ee08a41f2f3 Convert some other doxygen-type comments
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
98 * purple_log_common_writer() (or otherwise storing their logs in
8ee08a41f2f3 Convert some other doxygen-type comments
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
99 * the same directory structure as the stock loggers) do not
8ee08a41f2f3 Convert some other doxygen-type comments
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
100 * need to implement this function.
8ee08a41f2f3 Convert some other doxygen-type comments
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
101 * <sbr/>Loggers which implement this function must create a
8ee08a41f2f3 Convert some other doxygen-type comments
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
102 * #PurpleLogSet, then call @cb with @sets and the newly created
8ee08a41f2f3 Convert some other doxygen-type comments
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
103 * #PurpleLogSet.
8ee08a41f2f3 Convert some other doxygen-type comments
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
104 * @remove: Attempts to delete the specified log, indicating success or
8ee08a41f2f3 Convert some other doxygen-type comments
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
105 * failure
8ee08a41f2f3 Convert some other doxygen-type comments
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
106 * @is_deletable: Tests whether a log is deletable
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
107 *
7431
f3eaace13491 [gaim-migrate @ 8036]
Sean Egan <seanegan@pidgin.im>
parents: 6695
diff changeset
108 * A log logger.
f3eaace13491 [gaim-migrate @ 8036]
Sean Egan <seanegan@pidgin.im>
parents: 6695
diff changeset
109 *
35470
8ee08a41f2f3 Convert some other doxygen-type comments
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
110 * This struct gets filled out and is included in the PurpleLog. It contains
8ee08a41f2f3 Convert some other doxygen-type comments
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
111 * everything needed to write and read from logs.
7431
f3eaace13491 [gaim-migrate @ 8036]
Sean Egan <seanegan@pidgin.im>
parents: 6695
diff changeset
112 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
113 struct _PurpleLogLogger {
35470
8ee08a41f2f3 Convert some other doxygen-type comments
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
114 char *name;
8ee08a41f2f3 Convert some other doxygen-type comments
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
115 char *id;
7440
e0d8f6bc36c2 [gaim-migrate @ 8045]
Nathan Walp <nwalp@pidgin.im>
parents: 7431
diff changeset
116
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
117 void (*create)(PurpleLog *log);
7440
e0d8f6bc36c2 [gaim-migrate @ 8045]
Nathan Walp <nwalp@pidgin.im>
parents: 7431
diff changeset
118
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
119 gsize (*write)(PurpleLog *log,
34620
e49aa67344e1 Renamed PurpleConversationMessageFlags back to PurpleMessageFlags.
Ankit Vani <a@nevitus.org>
parents: 34605
diff changeset
120 PurpleMessageFlags type,
7431
f3eaace13491 [gaim-migrate @ 8036]
Sean Egan <seanegan@pidgin.im>
parents: 6695
diff changeset
121 const char *from,
38621
1412d6b993e9 Use GDateTime in purple_log_write.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38620
diff changeset
122 GDateTime *time,
7431
f3eaace13491 [gaim-migrate @ 8036]
Sean Egan <seanegan@pidgin.im>
parents: 6695
diff changeset
123 const char *message);
f3eaace13491 [gaim-migrate @ 8036]
Sean Egan <seanegan@pidgin.im>
parents: 6695
diff changeset
124
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
125 void (*finalize)(PurpleLog *log);
7440
e0d8f6bc36c2 [gaim-migrate @ 8045]
Nathan Walp <nwalp@pidgin.im>
parents: 7431
diff changeset
126
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
127 GList *(*list)(PurpleLogType type, const char *name, PurpleAccount *account);
7440
e0d8f6bc36c2 [gaim-migrate @ 8045]
Nathan Walp <nwalp@pidgin.im>
parents: 7431
diff changeset
128
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
129 char *(*read)(PurpleLog *log, PurpleLogReadFlags *flags);
10231
047177cee39f [gaim-migrate @ 11366]
Andrew Hart <arhart@users.sourceforge.net>
parents: 10171
diff changeset
130
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
131 int (*size)(PurpleLog *log);
8096
306a66d5171a [gaim-migrate @ 8795]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
132
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
133 int (*total_size)(PurpleLogType type, const char *name, PurpleAccount *account);
8573
3f37bd7005c8 [gaim-migrate @ 9321]
Ka-Hing Cheung <khc@pidgin.im>
parents: 8096
diff changeset
134
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
135 GList *(*list_syslog)(PurpleAccount *account);
11025
41b6449f7dff [gaim-migrate @ 12899]
Richard Laager <rlaager@pidgin.im>
parents: 10822
diff changeset
136
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
137 void (*get_log_sets)(PurpleLogSetCallback cb, GHashTable *sets);
15584
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
138
16116
bccaa68c86ad "delete" is a reserved word in C++, rename the "delete" member of
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 15884
diff changeset
139 gboolean (*remove)(PurpleLog *log);
15584
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
140
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
141 gboolean (*is_deletable)(PurpleLog *log);
16743
1ce5ffe12e2a Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 16116
diff changeset
142
35024
eb3afb7643ce Added /*< private >*/ for padding members, clean them up and add missing ones
Ankit Vani <a@nevitus.org>
parents: 34792
diff changeset
143 /*< private >*/
16743
1ce5ffe12e2a Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 16116
diff changeset
144 void (*_purple_reserved1)(void);
1ce5ffe12e2a Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 16116
diff changeset
145 void (*_purple_reserved2)(void);
1ce5ffe12e2a Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 16116
diff changeset
146 void (*_purple_reserved3)(void);
1ce5ffe12e2a Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 16116
diff changeset
147 void (*_purple_reserved4)(void);
5872
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
148 };
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
149
7431
f3eaace13491 [gaim-migrate @ 8036]
Sean Egan <seanegan@pidgin.im>
parents: 6695
diff changeset
150 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
151 * PurpleLog:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
152 * @type: The type of log this is
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
153 * @name: The name of this log
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
154 * @account: The account this log is taking place on
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
155 * @conv: The conversation being logged
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
156 * @time: The time this conversation started, converted to the local
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
157 * timezone
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
158 * @logger: The logging mechanism this log is to use
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
159 * @logger_data: Data used by the log logger
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
160 *
7431
f3eaace13491 [gaim-migrate @ 8036]
Sean Egan <seanegan@pidgin.im>
parents: 6695
diff changeset
161 * A log. Not the wooden type.
f3eaace13491 [gaim-migrate @ 8036]
Sean Egan <seanegan@pidgin.im>
parents: 6695
diff changeset
162 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
163 struct _PurpleLog {
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
164 PurpleLogType type;
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
165 char *name;
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
166 PurpleAccount *account;
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
167 PurpleConversation *conv;
38620
b02941b9fa9a Change purple_log_new to use GDateTime.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 37094
diff changeset
168 GDateTime *time;
13120
c25222322810 [gaim-migrate @ 15481]
Richard Laager <rlaager@pidgin.im>
parents: 13059
diff changeset
169
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
170 PurpleLogLogger *logger;
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
171 void *logger_data;
13624
c6577def4e2a [gaim-migrate @ 16009]
Richard Laager <rlaager@pidgin.im>
parents: 13389
diff changeset
172
c6577def4e2a [gaim-migrate @ 16009]
Richard Laager <rlaager@pidgin.im>
parents: 13389
diff changeset
173 /* IMPORTANT: Some code in log.c allocates these without zeroing them.
c6577def4e2a [gaim-migrate @ 16009]
Richard Laager <rlaager@pidgin.im>
parents: 13389
diff changeset
174 * IMPORTANT: Update that code if you add members here. */
5872
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
175 };
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
176
10822
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
177 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
178 * PurpleLogCommonLoggerData:
40827
ea25e596b1d4 Clean up some random gtk-doc warnings in libpurple's documentation
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
179 * @path: The path to the file.
ea25e596b1d4 Clean up some random gtk-doc warnings in libpurple's documentation
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
180 * @file: The pointer to the open file handle.
ea25e596b1d4 Clean up some random gtk-doc warnings in libpurple's documentation
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
181 * @extra_data: User supplied data.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
182 *
10822
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
183 * A common logger_data struct containing a file handle and path, as well
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
184 * as a pointer to something else for additional data.
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
185 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
186 struct _PurpleLogCommonLoggerData {
10822
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
187 char *path;
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
188 FILE *file;
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
189 void *extra_data;
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
190 };
7431
f3eaace13491 [gaim-migrate @ 8036]
Sean Egan <seanegan@pidgin.im>
parents: 6695
diff changeset
191
11025
41b6449f7dff [gaim-migrate @ 12899]
Richard Laager <rlaager@pidgin.im>
parents: 10822
diff changeset
192 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
193 * PurpleLogSet:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
194 * @type: The type of logs available
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
195 * @name: The name of the logs available
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
196 * @account: The account the available logs took place on. This will be
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
197 * %NULL if the account no longer exists. (Depending on a
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
198 * logger's implementation of list, it may not be possible to
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
199 * load such logs.)
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
200 * @buddy: Is this (account, name) a buddy on the buddy list?
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
201 * @normalized_name: The normalized version of @name. It must be set, and may
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
202 * be set to the same pointer value as @name.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
203 *
11025
41b6449f7dff [gaim-migrate @ 12899]
Richard Laager <rlaager@pidgin.im>
parents: 10822
diff changeset
204 * Describes available logs.
41b6449f7dff [gaim-migrate @ 12899]
Richard Laager <rlaager@pidgin.im>
parents: 10822
diff changeset
205 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
206 * By passing the elements of this struct to purple_log_get_logs(), the caller
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
207 * can get all available PurpleLogs.
11025
41b6449f7dff [gaim-migrate @ 12899]
Richard Laager <rlaager@pidgin.im>
parents: 10822
diff changeset
208 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
209 struct _PurpleLogSet {
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
210 PurpleLogType type;
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
211 char *name;
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
212 PurpleAccount *account;
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
213 gboolean buddy;
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
214 char *normalized_name;
13624
c6577def4e2a [gaim-migrate @ 16009]
Richard Laager <rlaager@pidgin.im>
parents: 13389
diff changeset
215
c6577def4e2a [gaim-migrate @ 16009]
Richard Laager <rlaager@pidgin.im>
parents: 13389
diff changeset
216 /* IMPORTANT: Some code in log.c allocates these without zeroing them.
c6577def4e2a [gaim-migrate @ 16009]
Richard Laager <rlaager@pidgin.im>
parents: 13389
diff changeset
217 * IMPORTANT: Update that code if you add members here. */
11025
41b6449f7dff [gaim-migrate @ 12899]
Richard Laager <rlaager@pidgin.im>
parents: 10822
diff changeset
218 };
41b6449f7dff [gaim-migrate @ 12899]
Richard Laager <rlaager@pidgin.im>
parents: 10822
diff changeset
219
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32438
diff changeset
220 G_BEGIN_DECLS
5944
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5934
diff changeset
221
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
222 /***************************************/
35472
474e26199560 Removed @name
Ankit Vani <a@nevitus.org>
parents: 35470
diff changeset
223 /* Log Functions */
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
224 /***************************************/
7440
e0d8f6bc36c2 [gaim-migrate @ 8045]
Nathan Walp <nwalp@pidgin.im>
parents: 7431
diff changeset
225
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
226 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
227 * purple_log_get_type:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
228 *
35462
901dfa763f15 Fix some gtk-doc warnings till proxy.c
Ankit Vani <a@nevitus.org>
parents: 35440
diff changeset
229 * Returns: The #GType for the #PurpleLog boxed structure.
901dfa763f15 Fix some gtk-doc warnings till proxy.c
Ankit Vani <a@nevitus.org>
parents: 35440
diff changeset
230 */
901dfa763f15 Fix some gtk-doc warnings till proxy.c
Ankit Vani <a@nevitus.org>
parents: 35440
diff changeset
231 /* TODO Boxing of PurpleLog is a temporary solution to having a GType for
34792
09228ea79272 Added GBoxed to certificate, certificate pool, xfer, log
Ankit Vani <a@nevitus.org>
parents: 34620
diff changeset
232 * logs. This should rather be a GObject instead of a GBoxed.
09228ea79272 Added GBoxed to certificate, certificate pool, xfer, log
Ankit Vani <a@nevitus.org>
parents: 34620
diff changeset
233 */
09228ea79272 Added GBoxed to certificate, certificate pool, xfer, log
Ankit Vani <a@nevitus.org>
parents: 34620
diff changeset
234 GType purple_log_get_type(void);
09228ea79272 Added GBoxed to certificate, certificate pool, xfer, log
Ankit Vani <a@nevitus.org>
parents: 34620
diff changeset
235
09228ea79272 Added GBoxed to certificate, certificate pool, xfer, log
Ankit Vani <a@nevitus.org>
parents: 34620
diff changeset
236 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
237 * purple_log_new:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
238 * @type: The type of log this is.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
239 * @name: The name of this conversation (buddy name, chat name,
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
240 * etc.)
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
241 * @account: The account the conversation is occurring on
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
242 * @conv: The conversation being logged
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
243 * @time: The time this conversation started
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
244 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
245 * Creates a new log
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
246 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
247 * Returns: The new log
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
248 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
249 PurpleLog *purple_log_new(PurpleLogType type, const char *name, PurpleAccount *account,
38620
b02941b9fa9a Change purple_log_new to use GDateTime.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 37094
diff changeset
250 PurpleConversation *conv, GDateTime *time);
7431
f3eaace13491 [gaim-migrate @ 8036]
Sean Egan <seanegan@pidgin.im>
parents: 6695
diff changeset
251
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
252 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
253 * purple_log_free:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
254 * @log: The log to destroy
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
255 *
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
256 * Frees a log
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
257 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
258 void purple_log_free(PurpleLog *log);
7440
e0d8f6bc36c2 [gaim-migrate @ 8045]
Nathan Walp <nwalp@pidgin.im>
parents: 7431
diff changeset
259
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
260 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
261 * purple_log_write:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
262 * @log: The log to write to
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
263 * @type: The type of message being logged
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
264 * @from: Whom this message is coming from, or %NULL for
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
265 * system messages
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
266 * @time: A timestamp in UNIX time
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
267 * @message: The message to log
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
268 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
269 * Writes to a log file. Assumes you have checked preferences already.
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
270 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
271 void purple_log_write(PurpleLog *log,
34620
e49aa67344e1 Renamed PurpleConversationMessageFlags back to PurpleMessageFlags.
Ankit Vani <a@nevitus.org>
parents: 34605
diff changeset
272 PurpleMessageFlags type,
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
273 const char *from,
38621
1412d6b993e9 Use GDateTime in purple_log_write.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38620
diff changeset
274 GDateTime *time,
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
275 const char *message);
7431
f3eaace13491 [gaim-migrate @ 8036]
Sean Egan <seanegan@pidgin.im>
parents: 6695
diff changeset
276
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
277 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
278 * purple_log_read:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
279 * @log: The log to read from
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
280 * @flags: The returned logging flags.
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
281 *
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
282 * Reads from a log
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
283 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
284 * Returns: The contents of this log in Purple Markup.
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
285 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
286 char *purple_log_read(PurpleLog *log, PurpleLogReadFlags *flags);
7431
f3eaace13491 [gaim-migrate @ 8036]
Sean Egan <seanegan@pidgin.im>
parents: 6695
diff changeset
287
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
288 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
289 * purple_log_get_logs:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
290 * @type: The type of the log
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
291 * @name: The name of the log
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
292 * @account: The account
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
293 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
294 * Returns a list of all available logs
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
295 *
39738
14d425a528ad Add missing transfer annotations.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39659
diff changeset
296 * Returns: (element-type PurpleLog) (transfer full): A sorted list of logs.
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
297 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
298 GList *purple_log_get_logs(PurpleLogType type, const char *name, PurpleAccount *account);
7440
e0d8f6bc36c2 [gaim-migrate @ 8045]
Nathan Walp <nwalp@pidgin.im>
parents: 7431
diff changeset
299
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
300 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
301 * purple_log_get_log_sets:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
302 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
303 * Returns a GHashTable of PurpleLogSets.
11025
41b6449f7dff [gaim-migrate @ 12899]
Richard Laager <rlaager@pidgin.im>
parents: 10822
diff changeset
304 *
41b6449f7dff [gaim-migrate @ 12899]
Richard Laager <rlaager@pidgin.im>
parents: 10822
diff changeset
305 * A "log set" here means the information necessary to gather the
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
306 * PurpleLogs for a given buddy/chat. This information would be passed
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
307 * to purple_log_list to get a list of PurpleLogs.
11025
41b6449f7dff [gaim-migrate @ 12899]
Richard Laager <rlaager@pidgin.im>
parents: 10822
diff changeset
308 *
41b6449f7dff [gaim-migrate @ 12899]
Richard Laager <rlaager@pidgin.im>
parents: 10822
diff changeset
309 * The primary use of this function is to get a list of everyone the
41b6449f7dff [gaim-migrate @ 12899]
Richard Laager <rlaager@pidgin.im>
parents: 10822
diff changeset
310 * user has ever talked to (assuming he or she uses logging).
41b6449f7dff [gaim-migrate @ 12899]
Richard Laager <rlaager@pidgin.im>
parents: 10822
diff changeset
311 *
11177
534ca3ae0bfc [gaim-migrate @ 13285]
Richard Laager <rlaager@pidgin.im>
parents: 11035
diff changeset
312 * The GHashTable that's returned will free all log sets in it when
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
313 * destroyed. If a PurpleLogSet is removed from the GHashTable, it
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
314 * must be freed with purple_log_set_free().
11177
534ca3ae0bfc [gaim-migrate @ 13285]
Richard Laager <rlaager@pidgin.im>
parents: 11035
diff changeset
315 *
39738
14d425a528ad Add missing transfer annotations.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39659
diff changeset
316 * Returns: (element-type PurpleLogSet PurpleLogSet) (transfer full): All
14d425a528ad Add missing transfer annotations.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39659
diff changeset
317 * available unique log sets.
11025
41b6449f7dff [gaim-migrate @ 12899]
Richard Laager <rlaager@pidgin.im>
parents: 10822
diff changeset
318 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
319 GHashTable *purple_log_get_log_sets(void);
11025
41b6449f7dff [gaim-migrate @ 12899]
Richard Laager <rlaager@pidgin.im>
parents: 10822
diff changeset
320
41b6449f7dff [gaim-migrate @ 12899]
Richard Laager <rlaager@pidgin.im>
parents: 10822
diff changeset
321 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
322 * purple_log_get_system_logs:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
323 * @account: The account
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
324 *
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
325 * Returns a list of all available system logs
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
326 *
39738
14d425a528ad Add missing transfer annotations.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39659
diff changeset
327 * Returns: (element-type PurpleLog) (transfer full): A sorted list of logs.
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
328 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
329 GList *purple_log_get_system_logs(PurpleAccount *account);
8573
3f37bd7005c8 [gaim-migrate @ 9321]
Ka-Hing Cheung <khc@pidgin.im>
parents: 8096
diff changeset
330
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
331 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
332 * purple_log_get_size:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
333 * @log: The log
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
334 *
10822
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
335 * Returns the size of a log
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
336 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
337 * Returns: The size of the log, in bytes
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
338 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
339 int purple_log_get_size(PurpleLog *log);
5872
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
340
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
341 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
342 * purple_log_get_total_size:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
343 * @type: The type of the log
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
344 * @name: The name of the log
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
345 * @account: The account
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
346 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
347 * Returns the size, in bytes, of all available logs in this conversation
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
348 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
349 * Returns: The size in bytes
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
350 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
351 int purple_log_get_total_size(PurpleLogType type, const char *name, PurpleAccount *account);
8573
3f37bd7005c8 [gaim-migrate @ 9321]
Ka-Hing Cheung <khc@pidgin.im>
parents: 8096
diff changeset
352
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
353 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
354 * purple_log_get_activity_score:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
355 * @type: The type of the log
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
356 * @name: The name of the log
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
357 * @account: The account
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
358 *
25883
059b74032730 A patch from Chris Connett to change the log size sorting method to weight
Richard Laager <rlaager@pidgin.im>
parents: 20889
diff changeset
359 * Returns the activity score of a log, based on total size in bytes,
059b74032730 A patch from Chris Connett to change the log size sorting method to weight
Richard Laager <rlaager@pidgin.im>
parents: 20889
diff changeset
360 * which is then decayed based on age
059b74032730 A patch from Chris Connett to change the log size sorting method to weight
Richard Laager <rlaager@pidgin.im>
parents: 20889
diff changeset
361 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
362 * Returns: The activity score
25883
059b74032730 A patch from Chris Connett to change the log size sorting method to weight
Richard Laager <rlaager@pidgin.im>
parents: 20889
diff changeset
363 */
059b74032730 A patch from Chris Connett to change the log size sorting method to weight
Richard Laager <rlaager@pidgin.im>
parents: 20889
diff changeset
364 int purple_log_get_activity_score(PurpleLogType type, const char *name, PurpleAccount *account);
059b74032730 A patch from Chris Connett to change the log size sorting method to weight
Richard Laager <rlaager@pidgin.im>
parents: 20889
diff changeset
365
059b74032730 A patch from Chris Connett to change the log size sorting method to weight
Richard Laager <rlaager@pidgin.im>
parents: 20889
diff changeset
366 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
367 * purple_log_is_deletable:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
368 * @log: The log
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
369 *
15584
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
370 * Tests whether a log is deletable
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
371 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
372 * A return value of %FALSE indicates that purple_log_delete() will fail on this
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
373 * log, unless something changes between the two calls. A return value of %TRUE,
15584
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
374 * however, does not guarantee the log can be deleted.
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
375 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
376 * Returns: A boolean indicating if the log is deletable
15584
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
377 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
378 gboolean purple_log_is_deletable(PurpleLog *log);
15584
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
379
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
380 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
381 * purple_log_delete:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
382 * @log: The log
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
383 *
15584
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
384 * Deletes a log
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
385 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
386 * Returns: A boolean indicating success or failure
15584
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
387 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
388 gboolean purple_log_delete(PurpleLog *log);
15584
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
389
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
390 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
391 * purple_log_get_log_dir:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
392 * @type: The type of the log.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
393 * @name: The name of the log.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
394 * @account: The account.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
395 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
396 * Returns the default logger directory Purple uses for a given account
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
397 * and username. This would be where Purple stores logs created by
10822
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
398 * the built-in text or HTML loggers.
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
399 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
400 * Returns: The default logger directory for Purple.
10822
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
401 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
402 char *purple_log_get_log_dir(PurpleLogType type, const char *name, PurpleAccount *account);
10822
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
403
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
404 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
405 * purple_log_compare:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
406 * @y: A PurpleLog
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
407 * @z: Another PurpleLog
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
408 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
409 * Implements GCompareFunc for PurpleLogs
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
410 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
411 * Returns: A value as specified by GCompareFunc
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
412 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
413 gint purple_log_compare(gconstpointer y, gconstpointer z);
11025
41b6449f7dff [gaim-migrate @ 12899]
Richard Laager <rlaager@pidgin.im>
parents: 10822
diff changeset
414
41b6449f7dff [gaim-migrate @ 12899]
Richard Laager <rlaager@pidgin.im>
parents: 10822
diff changeset
415 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
416 * purple_log_set_compare:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
417 * @y: A PurpleLogSet
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
418 * @z: Another PurpleLogSet
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
419 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
420 * Implements GCompareFunc for PurpleLogSets
11025
41b6449f7dff [gaim-migrate @ 12899]
Richard Laager <rlaager@pidgin.im>
parents: 10822
diff changeset
421 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
422 * Returns: A value as specified by GCompareFunc
11025
41b6449f7dff [gaim-migrate @ 12899]
Richard Laager <rlaager@pidgin.im>
parents: 10822
diff changeset
423 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
424 gint purple_log_set_compare(gconstpointer y, gconstpointer z);
11025
41b6449f7dff [gaim-migrate @ 12899]
Richard Laager <rlaager@pidgin.im>
parents: 10822
diff changeset
425
11177
534ca3ae0bfc [gaim-migrate @ 13285]
Richard Laager <rlaager@pidgin.im>
parents: 11035
diff changeset
426 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
427 * purple_log_set_free:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
428 * @set: The log set to destroy
11177
534ca3ae0bfc [gaim-migrate @ 13285]
Richard Laager <rlaager@pidgin.im>
parents: 11035
diff changeset
429 *
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
430 * Frees a log set
11177
534ca3ae0bfc [gaim-migrate @ 13285]
Richard Laager <rlaager@pidgin.im>
parents: 11035
diff changeset
431 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
432 void purple_log_set_free(PurpleLogSet *set);
11177
534ca3ae0bfc [gaim-migrate @ 13285]
Richard Laager <rlaager@pidgin.im>
parents: 11035
diff changeset
433
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
434 /******************************************/
35472
474e26199560 Removed @name
Ankit Vani <a@nevitus.org>
parents: 35470
diff changeset
435 /* Common Logger Functions */
10822
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
436 /******************************************/
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
437
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
438 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
439 * purple_log_common_writer:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
440 * @log: The log to write to.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
441 * @ext: The file extension to give to this log file.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
442 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
443 * Opens a new log file in the standard Purple log location
10822
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
444 * with the given file extension, named for the current time,
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
445 * for writing. If a log file is already open, the existing
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
446 * file handle is retained. The log's logger_data value is
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
447 * set to a PurpleLogCommonLoggerData struct containing the log
10822
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
448 * file handle and log path.
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
449 *
15584
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
450 * This function is intended to be used as a "common"
35419
d0aecd9a8104 Get rid of <tt>
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
451 * implementation of a logger's <literal>write</literal> function.
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
452 * It should only be passed to purple_log_logger_new() and never
15584
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
453 * called directly.
10822
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
454 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
455 void purple_log_common_writer(PurpleLog *log, const char *ext);
10822
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
456
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
457 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
458 * purple_log_common_lister:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
459 * @type: The type of the logs being listed.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
460 * @name: The name of the log.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
461 * @account: The account of the log.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
462 * @ext: The file extension this log format uses.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
463 * @logger: A reference to the logger struct for this log.
10822
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
464 *
38716
b9bed228745a Add many libpurple element-type annotations.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38621
diff changeset
465 * Returns a sorted list of logs of the requested type.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
466 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
467 * This function should only be used with logs that are written
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
468 * with purple_log_common_writer(). It's intended to be used as
35419
d0aecd9a8104 Get rid of <tt>
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
469 * a "common" implementation of a logger's <literal>list</literal> function.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
470 * It should only be passed to purple_log_logger_new() and never
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
471 * called directly.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
472 *
39738
14d425a528ad Add missing transfer annotations.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39659
diff changeset
473 * Returns: (element-type PurpleLog) (transfer full): A sorted list of logs
14d425a528ad Add missing transfer annotations.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39659
diff changeset
474 * matching the parameters.
10822
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
475 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
476 GList *purple_log_common_lister(PurpleLogType type, const char *name,
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
477 PurpleAccount *account, const char *ext,
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
478 PurpleLogLogger *logger);
10822
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
479
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
480 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
481 * purple_log_common_total_sizer:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
482 * @type: The type of the logs being sized.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
483 * @name: The name of the logs to size
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
484 * (e.g. the username or chat name).
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
485 * @account: The account of the log.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
486 * @ext: The file extension this log format uses.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
487 *
13389
27cf7d84dfd1 [gaim-migrate @ 15761]
Richard Laager <rlaager@pidgin.im>
parents: 13120
diff changeset
488 * Returns the total size of all the logs for a given user, with
15584
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
489 * a given extension.
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
490 *
13389
27cf7d84dfd1 [gaim-migrate @ 15761]
Richard Laager <rlaager@pidgin.im>
parents: 13120
diff changeset
491 * This function should only be used with logs that are written
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
492 * with purple_log_common_writer(). It's intended to be used as
35419
d0aecd9a8104 Get rid of <tt>
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
493 * a "common" implementation of a logger's <literal>total_size</literal>
d0aecd9a8104 Get rid of <tt>
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
494 * function. It should only be passed to purple_log_logger_new() and never
15584
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
495 * called directly.
13389
27cf7d84dfd1 [gaim-migrate @ 15761]
Richard Laager <rlaager@pidgin.im>
parents: 13120
diff changeset
496 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
497 * Returns: The size of all the logs with the specified extension
13389
27cf7d84dfd1 [gaim-migrate @ 15761]
Richard Laager <rlaager@pidgin.im>
parents: 13120
diff changeset
498 * for the specified user.
27cf7d84dfd1 [gaim-migrate @ 15761]
Richard Laager <rlaager@pidgin.im>
parents: 13120
diff changeset
499 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
500 int purple_log_common_total_sizer(PurpleLogType type, const char *name,
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
501 PurpleAccount *account, const char *ext);
13389
27cf7d84dfd1 [gaim-migrate @ 15761]
Richard Laager <rlaager@pidgin.im>
parents: 13120
diff changeset
502
27cf7d84dfd1 [gaim-migrate @ 15761]
Richard Laager <rlaager@pidgin.im>
parents: 13120
diff changeset
503 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
504 * purple_log_common_sizer:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
505 * @log: The PurpleLog to size.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
506 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
507 * Returns the size of a given PurpleLog.
15584
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
508 *
10822
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
509 * This function should only be used with logs that are written
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
510 * with purple_log_common_writer(). It's intended to be used as
35419
d0aecd9a8104 Get rid of <tt>
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
511 * a "common" implementation of a logger's <literal>size</literal> function.
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
512 * It should only be passed to purple_log_logger_new() and never
15584
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
513 * called directly.
10822
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
514 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
515 * Returns: An integer indicating the size of the log in bytes.
10822
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
516 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
517 int purple_log_common_sizer(PurpleLog *log);
15584
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
518
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
519 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
520 * purple_log_common_deleter:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
521 * @log: The PurpleLog to delete.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
522 *
15584
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
523 * Deletes a log
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
524 *
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
525 * This function should only be used with logs that are written
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
526 * with purple_log_common_writer(). It's intended to be used as
35419
d0aecd9a8104 Get rid of <tt>
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
527 * a "common" implementation of a logger's <literal>delete</literal> function.
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
528 * It should only be passed to purple_log_logger_new() and never
15584
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
529 * called directly.
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
530 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
531 * Returns: A boolean indicating success or failure.
15584
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
532 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
533 gboolean purple_log_common_deleter(PurpleLog *log);
15584
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
534
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
535 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
536 * purple_log_common_is_deletable:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
537 * @log: The PurpleLog to check.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
538 *
15584
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
539 * Checks to see if a log is deletable
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
540 *
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
541 * This function should only be used with logs that are written
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
542 * with purple_log_common_writer(). It's intended to be used as
35419
d0aecd9a8104 Get rid of <tt>
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
543 * a "common" implementation of a logger's <literal>is_deletable</literal>
d0aecd9a8104 Get rid of <tt>
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
544 * function. It should only be passed to purple_log_logger_new() and never
15584
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
545 * called directly.
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
546 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
547 * Returns: A boolean indicating if the log is deletable.
15584
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
548 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
549 gboolean purple_log_common_is_deletable(PurpleLog *log);
15584
f4d9ac6f94b8 This is the core code to support log deletion. It's untested.
Richard Laager <rlaager@pidgin.im>
parents: 15435
diff changeset
550
10822
142911801a14 [gaim-migrate @ 12484]
Kevin Stange <kstange@pidgin.im>
parents: 10812
diff changeset
551 /******************************************/
35472
474e26199560 Removed @name
Ankit Vani <a@nevitus.org>
parents: 35470
diff changeset
552 /* Logger Functions */
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
553 /******************************************/
7440
e0d8f6bc36c2 [gaim-migrate @ 8045]
Nathan Walp <nwalp@pidgin.im>
parents: 7431
diff changeset
554
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
555 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
556 * purple_log_logger_new:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
557 * @id: The logger's id.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
558 * @name: The logger's name.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
559 * @functions: The number of functions being passed. The following
35419
d0aecd9a8104 Get rid of <tt>
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
560 * functions are currently available (in order):
d0aecd9a8104 Get rid of <tt>
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
561 * <literal>create</literal>, <literal>write</literal>,
d0aecd9a8104 Get rid of <tt>
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
562 * <literal>finalize</literal>, <literal>list</literal>,
d0aecd9a8104 Get rid of <tt>
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
563 * <literal>read</literal>, <literal>size</literal>,
d0aecd9a8104 Get rid of <tt>
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
564 * <literal>total_size</literal>, <literal>list_syslog</literal>,
d0aecd9a8104 Get rid of <tt>
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
565 * <literal>get_log_sets</literal>, <literal>remove</literal>,
d0aecd9a8104 Get rid of <tt>
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
566 * <literal>is_deletable</literal>.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
567 * For details on these functions, see PurpleLogLogger.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
568 * Functions may not be skipped. For example, passing
35419
d0aecd9a8104 Get rid of <tt>
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
569 * <literal>create</literal> and <literal>write</literal> is
d0aecd9a8104 Get rid of <tt>
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
570 * acceptable (for a total of two functions). Passing
d0aecd9a8104 Get rid of <tt>
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
571 * <literal>create</literal> and <literal>finalize</literal>,
d0aecd9a8104 Get rid of <tt>
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
572 * however, is not. To accomplish that, the caller must pass
d0aecd9a8104 Get rid of <tt>
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
573 * <literal>create</literal>, %NULL (a placeholder for
d0aecd9a8104 Get rid of <tt>
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
574 * <literal>write</literal>), and <literal>finalize</literal>
d0aecd9a8104 Get rid of <tt>
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
575 * (for a total of 3 functions).
40827
ea25e596b1d4 Clean up some random gtk-doc warnings in libpurple's documentation
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
576 * @...: The functions used to log.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
577 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
578 * Creates a new logger
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
579 *
40188
80e78796edb2 Revert (skip) annotations
qarkai <qarkai@gmail.com>
parents: 40186
diff changeset
580 * Returns: (transfer full): The new logger.
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
581 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
582 PurpleLogLogger *purple_log_logger_new(const char *id, const char *name, int functions, ...);
11025
41b6449f7dff [gaim-migrate @ 12899]
Richard Laager <rlaager@pidgin.im>
parents: 10822
diff changeset
583
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
584 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
585 * purple_log_logger_free:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
586 * @logger: The logger to free
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
587 *
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
588 * Frees a logger
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
589 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
590 void purple_log_logger_free(PurpleLogLogger *logger);
7440
e0d8f6bc36c2 [gaim-migrate @ 8045]
Nathan Walp <nwalp@pidgin.im>
parents: 7431
diff changeset
591
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
592 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
593 * purple_log_logger_add:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
594 * @logger: The new logger to add
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
595 *
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
596 * Adds a new logger
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
597 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
598 void purple_log_logger_add (PurpleLogLogger *logger);
7431
f3eaace13491 [gaim-migrate @ 8036]
Sean Egan <seanegan@pidgin.im>
parents: 6695
diff changeset
599
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
600 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
601 * purple_log_logger_remove:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
602 * @logger: The logger to remove
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
603 *
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
604 * Removes a logger
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
605 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
606 void purple_log_logger_remove (PurpleLogLogger *logger);
7431
f3eaace13491 [gaim-migrate @ 8036]
Sean Egan <seanegan@pidgin.im>
parents: 6695
diff changeset
607
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
608 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
609 * purple_log_logger_set:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
610 * @logger: The logger to set
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
611 *
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
612 * Sets the current logger
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
613 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
614 void purple_log_logger_set (PurpleLogLogger *logger);
7440
e0d8f6bc36c2 [gaim-migrate @ 8045]
Nathan Walp <nwalp@pidgin.im>
parents: 7431
diff changeset
615
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
616 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
617 * purple_log_logger_get:
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
618 *
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
619 * Returns the current logger
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
620 *
39738
14d425a528ad Add missing transfer annotations.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39659
diff changeset
621 * Returns: (transfer none): The current logger.
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
622 */
39738
14d425a528ad Add missing transfer annotations.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39659
diff changeset
623 PurpleLogLogger *purple_log_logger_get(void);
7440
e0d8f6bc36c2 [gaim-migrate @ 8045]
Nathan Walp <nwalp@pidgin.im>
parents: 7431
diff changeset
624
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
625 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
626 * purple_log_logger_get_options:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
627 *
11025
41b6449f7dff [gaim-migrate @ 12899]
Richard Laager <rlaager@pidgin.im>
parents: 10822
diff changeset
628 * Returns a GList containing the IDs and names of the registered
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
629 * loggers.
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
630 *
38716
b9bed228745a Add many libpurple element-type annotations.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38621
diff changeset
631 * Returns: (element-type utf8) (transfer container): The list of IDs and names.
10566
b681d2b3dec5 [gaim-migrate @ 11949]
Etan Reisner <deryni@pidgin.im>
parents: 10348
diff changeset
632 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
633 GList *purple_log_logger_get_options(void);
7431
f3eaace13491 [gaim-migrate @ 8036]
Sean Egan <seanegan@pidgin.im>
parents: 6695
diff changeset
634
12737
e1300804318e [gaim-migrate @ 15082]
Richard Laager <rlaager@pidgin.im>
parents: 11503
diff changeset
635 /**************************************************************************/
35472
474e26199560 Removed @name
Ankit Vani <a@nevitus.org>
parents: 35470
diff changeset
636 /* Log Subsystem */
12737
e1300804318e [gaim-migrate @ 15082]
Richard Laager <rlaager@pidgin.im>
parents: 11503
diff changeset
637 /**************************************************************************/
e1300804318e [gaim-migrate @ 15082]
Richard Laager <rlaager@pidgin.im>
parents: 11503
diff changeset
638
11025
41b6449f7dff [gaim-migrate @ 12899]
Richard Laager <rlaager@pidgin.im>
parents: 10822
diff changeset
639 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
640 * purple_log_init:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
641 *
11025
41b6449f7dff [gaim-migrate @ 12899]
Richard Laager <rlaager@pidgin.im>
parents: 10822
diff changeset
642 * Initializes the log subsystem.
41b6449f7dff [gaim-migrate @ 12899]
Richard Laager <rlaager@pidgin.im>
parents: 10822
diff changeset
643 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
644 void purple_log_init(void);
12737
e1300804318e [gaim-migrate @ 15082]
Richard Laager <rlaager@pidgin.im>
parents: 11503
diff changeset
645
e1300804318e [gaim-migrate @ 15082]
Richard Laager <rlaager@pidgin.im>
parents: 11503
diff changeset
646 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
647 * purple_log_get_handle:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
648 *
12737
e1300804318e [gaim-migrate @ 15082]
Richard Laager <rlaager@pidgin.im>
parents: 11503
diff changeset
649 * Returns the log subsystem handle.
e1300804318e [gaim-migrate @ 15082]
Richard Laager <rlaager@pidgin.im>
parents: 11503
diff changeset
650 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
651 * Returns: The log subsystem handle.
12737
e1300804318e [gaim-migrate @ 15082]
Richard Laager <rlaager@pidgin.im>
parents: 11503
diff changeset
652 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
653 void *purple_log_get_handle(void);
12737
e1300804318e [gaim-migrate @ 15082]
Richard Laager <rlaager@pidgin.im>
parents: 11503
diff changeset
654
e1300804318e [gaim-migrate @ 15082]
Richard Laager <rlaager@pidgin.im>
parents: 11503
diff changeset
655 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
656 * purple_log_uninit:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
657 *
12737
e1300804318e [gaim-migrate @ 15082]
Richard Laager <rlaager@pidgin.im>
parents: 11503
diff changeset
658 * Uninitializes the log subsystem.
e1300804318e [gaim-migrate @ 15082]
Richard Laager <rlaager@pidgin.im>
parents: 11503
diff changeset
659 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15584
diff changeset
660 void purple_log_uninit(void);
12737
e1300804318e [gaim-migrate @ 15082]
Richard Laager <rlaager@pidgin.im>
parents: 11503
diff changeset
661
5872
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
662
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32438
diff changeset
663 G_END_DECLS
7440
e0d8f6bc36c2 [gaim-migrate @ 8045]
Nathan Walp <nwalp@pidgin.im>
parents: 7431
diff changeset
664
39659
e4dfb99b0cef Fix libpurple header guards using reserved names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38716
diff changeset
665 #endif /* PURPLE_LOG_H */

mercurial