finch/gntlog.h

Sun, 13 Apr 2008 16:54:33 +0000

author
Sadrul Habib Chowdhury <sadrul@pidgin.im>
date
Sun, 13 Apr 2008 16:54:33 +0000
changeset 22804
3a3bc5f12e52
parent 22376
25a17b6b69c2
child 23063
9458eafda32c
permissions
-rw-r--r--

Do not crash from commands in a disconnected chat. Fixes #5208

22376
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
1 /**
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
2 * @file gntlog.h GNT Log viewer
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
3 * @ingroup finch
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
4 * @see @ref gntlog-signals
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
5 */
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
6
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
7 /* finch
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
8 *
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
9 * Finch is the legal property of its developers, whose names are too numerous
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
10 * to list here. Please refer to the COPYRIGHT file distributed with this
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
11 * source distribution.
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
12 *
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
13 * This program is free software; you can redistribute it and/or modify
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
14 * it under the terms of the GNU General Public License as published by
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
15 * the Free Software Foundation; either version 2 of the License, or
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
16 * (at your option) any later version.
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
17 *
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
18 * This program is distributed in the hope that it will be useful,
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
21 * GNU General Public License for more details.
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
22 *
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
23 * You should have received a copy of the GNU General Public License
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
24 * along with this program; if not, write to the Free Software
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
25 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
26 */
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
27 #ifndef _FINCHLOG_H_
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
28 #define _FINCHLOG_H_
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
29
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
30 #include "log.h"
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
31 #include "account.h"
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
32 #include "gntwidget.h"
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
33
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
34 typedef struct _FinchLogViewer FinchLogViewer;
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
35
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
36 /**
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
37 * A GNT Log Viewer. You can look at logs with it.
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
38 */
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
39 struct _FinchLogViewer {
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
40 GList *logs; /**< The list of logs viewed in this viewer */
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
41
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
42 GntWidget *window; /**< The viewer's window */
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
43 GntWidget *tree; /**< The tree representing said treestore */
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
44 GntWidget *text; /**< The text to display said logs */
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
45 GntWidget *entry; /**< The search entry, in which search terms
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
46 * are entered */
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
47 GntWidget *label;
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
48 PurpleLogReadFlags flags; /**< The most recently used log flags */
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
49 char *search; /**< The string currently being searched for */
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
50 };
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
51
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
52
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
53
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
54 void finch_log_show(PurpleLogType type, const char *screenname, PurpleAccount *account);
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
55 void finch_log_show_contact(PurpleContact *contact);
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
56
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
57 void finch_syslog_show(void);
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
58
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
59 /**************************************************************************/
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
60 /** @name GNT Log Subsystem */
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
61 /**************************************************************************/
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
62 /*@{*/
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
63
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
64 /**
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
65 * Initializes the GNT log subsystem.
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
66 */
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
67 void finch_log_init(void);
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
68
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
69 /**
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
70 * Returns the GNT log subsystem handle.
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
71 *
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
72 * @return The GNT log subsystem handle.
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
73 */
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
74 void *finch_log_get_handle(void);
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
75
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
76 /**
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
77 * Uninitializes the GNT log subsystem.
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
78 */
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
79 void finch_log_uninit(void);
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
80
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
81 /*@}*/
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
82
25a17b6b69c2 Add a finch log viewer. This is largely copied from Pidgin.
Richard Nelson <wabz@pidgin.im>
parents:
diff changeset
83 #endif

mercurial