annotate src/core.h @ 5139:d0182ae31ab8

[gaim-migrate @ 5503] Okay, some code cleanups! Yay! Oh yeah, and a fix for sound and logs not being saved. The problem was, when switching conversation tabs, the menu items would update to reflect the settings of the new conversation. When doing that, the callback was being called, and the settings in the conversation were being inversed. Fun. Now they're set to whatever the menu item's state is, which is the Correct Way To Do Things (CWTDT) (C) (R) (TM) committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Wed, 16 Apr 2003 00:59:07 +0000
parents 381da05cb5ed
children fefad67de2c7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5034
4691c5936c01 [gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents: 5032
diff changeset
1 /**
4691c5936c01 [gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents: 5032
diff changeset
2 * @file core.h Gaim Core
4691c5936c01 [gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents: 5032
diff changeset
3 * @defgroup core Gaim Core
4691c5936c01 [gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents: 5032
diff changeset
4 *
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
5 * gaim
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
6 *
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
7 * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
8 *
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
12 * (at your option) any later version.
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
13 *
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
17 * GNU General Public License for more details.
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
18 *
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
20 * along with this program; if not, write to the Free Software
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
22 */
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
23
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
24 #ifndef _CORE_H_
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
25 #define _CORE_H_
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
26
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
27 #ifdef HAVE_CONFIG_H
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
28 #include <config.h>
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
29 #endif
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
30
3517
6b0cb60162f4 [gaim-migrate @ 3590]
Sean Egan <seanegan@gmail.com>
parents: 3510
diff changeset
31 #include <sys/types.h>
3370
eb7b398051f2 [gaim-migrate @ 3389]
Sean Egan <seanegan@gmail.com>
parents: 3367
diff changeset
32 #ifdef HAVE_ICONV
3367
3b00d97d59aa [gaim-migrate @ 3386]
Sean Egan <seanegan@gmail.com>
parents: 3205
diff changeset
33 #include <iconv.h>
3370
eb7b398051f2 [gaim-migrate @ 3389]
Sean Egan <seanegan@gmail.com>
parents: 3367
diff changeset
34 #endif
eb7b398051f2 [gaim-migrate @ 3389]
Sean Egan <seanegan@gmail.com>
parents: 3367
diff changeset
35
eb7b398051f2 [gaim-migrate @ 3389]
Sean Egan <seanegan@gmail.com>
parents: 3367
diff changeset
36 #ifdef HAVE_LANGINFO_CODESET
3367
3b00d97d59aa [gaim-migrate @ 3386]
Sean Egan <seanegan@gmail.com>
parents: 3205
diff changeset
37 #include <langinfo.h>
3370
eb7b398051f2 [gaim-migrate @ 3389]
Sean Egan <seanegan@gmail.com>
parents: 3367
diff changeset
38 #endif
eb7b398051f2 [gaim-migrate @ 3389]
Sean Egan <seanegan@gmail.com>
parents: 3367
diff changeset
39
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
40 #include <stdio.h>
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
41 #include <time.h>
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
42 #include <glib.h>
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
43 #ifdef GAIM_PLUGINS
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
44 #include <gmodule.h>
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
45 #endif
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
46
4491
3196d9044a45 [gaim-migrate @ 4766]
Nathan Walp <nwalp@pidgin.im>
parents: 4359
diff changeset
47 struct gaim_account;
4359
5fb47ec9bfe4 [gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents: 4349
diff changeset
48 struct group;
5fb47ec9bfe4 [gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents: 4349
diff changeset
49 struct buddy;
5fb47ec9bfe4 [gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents: 4349
diff changeset
50
5fb47ec9bfe4 [gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents: 4349
diff changeset
51
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
52 #include "multi.h"
4359
5fb47ec9bfe4 [gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents: 4349
diff changeset
53 #include "conversation.h"
4514
7521e29658bc [gaim-migrate @ 4792]
Christian Hammond <chipx86@chipx86.com>
parents: 4491
diff changeset
54 #include "ft.h"
4687
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents: 4634
diff changeset
55 #include "privacy.h"
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
56
2501
227cc42ffa6e [gaim-migrate @ 2514]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2447
diff changeset
57 /* Really user states are controlled by the PRPLs now. We just use this for event_away */
227cc42ffa6e [gaim-migrate @ 2514]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2447
diff changeset
58 #define UC_UNAVAILABLE 1
2435
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
59
3205
332df87cf3d6 [gaim-migrate @ 3222]
Sean Egan <seanegan@gmail.com>
parents: 3136
diff changeset
60 /* This is far too long to be practical, but MSN users are probably used to long aliases */
332df87cf3d6 [gaim-migrate @ 3222]
Sean Egan <seanegan@gmail.com>
parents: 3136
diff changeset
61 #define SELF_ALIAS_LEN 400
332df87cf3d6 [gaim-migrate @ 3222]
Sean Egan <seanegan@gmail.com>
parents: 3136
diff changeset
62
4491
3196d9044a45 [gaim-migrate @ 4766]
Nathan Walp <nwalp@pidgin.im>
parents: 4359
diff changeset
63 struct gaim_account {
2442
895e2469cb3a [gaim-migrate @ 2455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2440
diff changeset
64 char username[64];
3205
332df87cf3d6 [gaim-migrate @ 3222]
Sean Egan <seanegan@gmail.com>
parents: 3136
diff changeset
65 char alias[SELF_ALIAS_LEN];
2442
895e2469cb3a [gaim-migrate @ 2455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2440
diff changeset
66 char password[32];
895e2469cb3a [gaim-migrate @ 2455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2440
diff changeset
67 char user_info[2048];
895e2469cb3a [gaim-migrate @ 2455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2440
diff changeset
68 int options;
895e2469cb3a [gaim-migrate @ 2455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2440
diff changeset
69 int protocol;
895e2469cb3a [gaim-migrate @ 2455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2440
diff changeset
70 /* prpls can use this to save information about the user,
895e2469cb3a [gaim-migrate @ 2455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2440
diff changeset
71 * like which server to connect to, etc */
895e2469cb3a [gaim-migrate @ 2455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2440
diff changeset
72 char proto_opt[7][256];
895e2469cb3a [gaim-migrate @ 2455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2440
diff changeset
73
895e2469cb3a [gaim-migrate @ 2455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2440
diff changeset
74 /* buddy icon file */
895e2469cb3a [gaim-migrate @ 2455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2440
diff changeset
75 char iconfile[256];
895e2469cb3a [gaim-migrate @ 2455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2440
diff changeset
76
4634
d19872836812 [gaim-migrate @ 4941]
Nathan Walp <nwalp@pidgin.im>
parents: 4514
diff changeset
77 struct gaim_proxy_info *gpi;
d19872836812 [gaim-migrate @ 4941]
Nathan Walp <nwalp@pidgin.im>
parents: 4514
diff changeset
78
2442
895e2469cb3a [gaim-migrate @ 2455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2440
diff changeset
79 struct gaim_connection *gc;
3510
e23909729192 [gaim-migrate @ 3576]
Sean Egan <seanegan@gmail.com>
parents: 3484
diff changeset
80 gboolean connecting;
4349
0c68d402f59f [gaim-migrate @ 4614]
Nathan Walp <nwalp@pidgin.im>
parents: 4298
diff changeset
81
0c68d402f59f [gaim-migrate @ 4614]
Nathan Walp <nwalp@pidgin.im>
parents: 4298
diff changeset
82 GSList *permit;
0c68d402f59f [gaim-migrate @ 4614]
Nathan Walp <nwalp@pidgin.im>
parents: 4298
diff changeset
83 GSList *deny;
0c68d402f59f [gaim-migrate @ 4614]
Nathan Walp <nwalp@pidgin.im>
parents: 4298
diff changeset
84 int permdeny;
2442
895e2469cb3a [gaim-migrate @ 2455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2440
diff changeset
85 };
4349
0c68d402f59f [gaim-migrate @ 4614]
Nathan Walp <nwalp@pidgin.im>
parents: 4298
diff changeset
86
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
87 enum gaim_event {
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
88 event_signon = 0,
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
89 event_signoff,
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
90 event_away,
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
91 event_back,
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
92 event_im_recv,
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
93 event_im_send,
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
94 event_buddy_signon,
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
95 event_buddy_signoff,
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
96 event_buddy_away,
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
97 event_buddy_back,
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
98 event_buddy_idle,
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
99 event_buddy_unidle,
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
100 event_blist_update,
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
101 event_chat_invited,
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
102 event_chat_join,
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
103 event_chat_leave,
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
104 event_chat_buddy_join,
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
105 event_chat_buddy_leave,
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
106 event_chat_recv,
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
107 event_chat_send,
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
108 event_warned,
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
109 event_error,
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
110 event_quit,
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
111 event_new_conversation,
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
112 event_set_info,
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
113 event_draw_menu,
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
114 event_im_displayed_sent,
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
115 event_im_displayed_rcvd,
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
116 event_chat_send_invite,
2993
7239a392486c [gaim-migrate @ 3006]
Rob Flynn <gaim@robflynn.com>
parents: 2920
diff changeset
117 event_got_typing,
3461
c11960537fee [gaim-migrate @ 3510]
Sean Egan <seanegan@gmail.com>
parents: 3370
diff changeset
118 event_del_conversation,
3510
e23909729192 [gaim-migrate @ 3576]
Sean Egan <seanegan@gmail.com>
parents: 3484
diff changeset
119 event_connecting,
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
120 /* any others? it's easy to add... */
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
121 };
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
122
2440
8306c042bac7 [gaim-migrate @ 2453]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2438
diff changeset
123 struct UI {
8306c042bac7 [gaim-migrate @ 2453]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2438
diff changeset
124 GIOChannel *channel;
8306c042bac7 [gaim-migrate @ 2453]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2438
diff changeset
125 guint inpa;
8306c042bac7 [gaim-migrate @ 2453]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2438
diff changeset
126 };
8306c042bac7 [gaim-migrate @ 2453]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2438
diff changeset
127
3551
cd938f18f3f8 [gaim-migrate @ 3626]
Sean Egan <seanegan@gmail.com>
parents: 3517
diff changeset
128 #define USE_PLUGINS GAIM_PLUGINS || USE_PERL
cd938f18f3f8 [gaim-migrate @ 3626]
Sean Egan <seanegan@gmail.com>
parents: 3517
diff changeset
129 #define PLUGIN_API_VERSION 1
cd938f18f3f8 [gaim-migrate @ 3626]
Sean Egan <seanegan@gmail.com>
parents: 3517
diff changeset
130 enum gaim_plugin_type {
cd938f18f3f8 [gaim-migrate @ 3626]
Sean Egan <seanegan@gmail.com>
parents: 3517
diff changeset
131 perl_script,
cd938f18f3f8 [gaim-migrate @ 3626]
Sean Egan <seanegan@gmail.com>
parents: 3517
diff changeset
132 plugin
cd938f18f3f8 [gaim-migrate @ 3626]
Sean Egan <seanegan@gmail.com>
parents: 3517
diff changeset
133 };
cd938f18f3f8 [gaim-migrate @ 3626]
Sean Egan <seanegan@gmail.com>
parents: 3517
diff changeset
134
cd938f18f3f8 [gaim-migrate @ 3626]
Sean Egan <seanegan@gmail.com>
parents: 3517
diff changeset
135 struct gaim_plugin_description {
cd938f18f3f8 [gaim-migrate @ 3626]
Sean Egan <seanegan@gmail.com>
parents: 3517
diff changeset
136 int api_version;
cd938f18f3f8 [gaim-migrate @ 3626]
Sean Egan <seanegan@gmail.com>
parents: 3517
diff changeset
137 gchar *name;
cd938f18f3f8 [gaim-migrate @ 3626]
Sean Egan <seanegan@gmail.com>
parents: 3517
diff changeset
138 gchar *version;
cd938f18f3f8 [gaim-migrate @ 3626]
Sean Egan <seanegan@gmail.com>
parents: 3517
diff changeset
139 gchar *description;
cd938f18f3f8 [gaim-migrate @ 3626]
Sean Egan <seanegan@gmail.com>
parents: 3517
diff changeset
140 gchar *authors;
cd938f18f3f8 [gaim-migrate @ 3626]
Sean Egan <seanegan@gmail.com>
parents: 3517
diff changeset
141 gchar *url;
cd938f18f3f8 [gaim-migrate @ 3626]
Sean Egan <seanegan@gmail.com>
parents: 3517
diff changeset
142 gchar *iconfile;
cd938f18f3f8 [gaim-migrate @ 3626]
Sean Egan <seanegan@gmail.com>
parents: 3517
diff changeset
143 };
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
144
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
145 struct gaim_plugin {
3551
cd938f18f3f8 [gaim-migrate @ 3626]
Sean Egan <seanegan@gmail.com>
parents: 3517
diff changeset
146 enum gaim_plugin_type type;
cd938f18f3f8 [gaim-migrate @ 3626]
Sean Egan <seanegan@gmail.com>
parents: 3517
diff changeset
147 void *handle;
cd938f18f3f8 [gaim-migrate @ 3626]
Sean Egan <seanegan@gmail.com>
parents: 3517
diff changeset
148 gchar path[128];
cd938f18f3f8 [gaim-migrate @ 3626]
Sean Egan <seanegan@gmail.com>
parents: 3517
diff changeset
149 struct gaim_plugin_description desc;
3563
e120097bbd72 [gaim-migrate @ 3658]
Sean Egan <seanegan@gmail.com>
parents: 3551
diff changeset
150 gchar error[128];
3565
154c4a9d9b6d [gaim-migrate @ 3660]
Sean Egan <seanegan@gmail.com>
parents: 3563
diff changeset
151 void *iter;
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
152 };
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
153
3551
cd938f18f3f8 [gaim-migrate @ 3626]
Sean Egan <seanegan@gmail.com>
parents: 3517
diff changeset
154 #ifdef GAIM_PLUGINS
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
155 struct gaim_callback {
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
156 GModule *handle;
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
157 enum gaim_event event;
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
158 void *function;
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
159 void *data;
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
160 };
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
161 #endif
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
162
2440
8306c042bac7 [gaim-migrate @ 2453]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2438
diff changeset
163 /* Globals in core.c */
8306c042bac7 [gaim-migrate @ 2453]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2438
diff changeset
164 extern GSList *uis;
3484
5d1dff030d8b [gaim-migrate @ 3538]
Sean Egan <seanegan@gmail.com>
parents: 3478
diff changeset
165 extern int gaim_session;
2440
8306c042bac7 [gaim-migrate @ 2453]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2438
diff changeset
166
8306c042bac7 [gaim-migrate @ 2453]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2438
diff changeset
167 /* Globals in plugins.c */
8306c042bac7 [gaim-migrate @ 2453]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2438
diff changeset
168 extern GList *plugins;
3551
cd938f18f3f8 [gaim-migrate @ 3626]
Sean Egan <seanegan@gmail.com>
parents: 3517
diff changeset
169 extern GList *probed_plugins;
2440
8306c042bac7 [gaim-migrate @ 2453]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2438
diff changeset
170 extern GList *callbacks;
8306c042bac7 [gaim-migrate @ 2453]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2438
diff changeset
171
2435
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
172 /* Functions in core.c */
2440
8306c042bac7 [gaim-migrate @ 2453]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2438
diff changeset
173 extern gint UI_write(struct UI *, guchar *, int);
2447
6bdeb91abe4e [gaim-migrate @ 2460]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2443
diff changeset
174 extern void UI_build_write(struct UI *, guchar, guchar, ...);
2440
8306c042bac7 [gaim-migrate @ 2453]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2438
diff changeset
175 extern void UI_broadcast(guchar *data, int);
2447
6bdeb91abe4e [gaim-migrate @ 2460]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2443
diff changeset
176 extern void UI_build_broadcast(guchar, guchar, ...);
2435
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
177 /* Don't ever use these; when gaim-core is done these will be
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
178 * merged into the core's main() and won't be called directly */
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
179 extern int core_main();
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
180 extern void core_quit();
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
181
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
182 /* Functions in gaimrc.c */
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
183 extern void load_prefs();
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4770
diff changeset
184 extern void load_pounces();
2435
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
185 extern void save_prefs();
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
186
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
187 /* Functions in perl.c */
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
188 #ifdef USE_PERL
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
189 extern void perl_end();
3517
6b0cb60162f4 [gaim-migrate @ 3590]
Sean Egan <seanegan@gmail.com>
parents: 3510
diff changeset
190 extern int perl_event(enum gaim_event, void *, void *, void *, void *, void *);
2435
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
191 extern int perl_load_file(char *);
3551
cd938f18f3f8 [gaim-migrate @ 3626]
Sean Egan <seanegan@gmail.com>
parents: 3517
diff changeset
192 extern void perl_unload_file(struct gaim_plugin *);
2435
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
193 extern void unload_perl_scripts();
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
194 extern void list_perl_scripts();
4298
cddb50734169 [gaim-migrate @ 4552]
Sean Egan <seanegan@gmail.com>
parents: 4227
diff changeset
195 extern struct gaim_plugin *probe_perl(char *);
2435
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
196 #endif
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
197
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
198 /* Functions in plugins.c */
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
199 #ifdef GAIM_PLUGINS
3466
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3461
diff changeset
200 extern struct gaim_plugin *load_plugin(const char *);
2435
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
201 extern void unload_plugin(struct gaim_plugin *);
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
202 extern struct gaim_plugin *reload_plugin(struct gaim_plugin *);
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
203 extern void gaim_signal_connect(GModule *, enum gaim_event, void *, void *);
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
204 extern void gaim_signal_disconnect(GModule *, enum gaim_event, void *);
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
205 extern void gaim_plugin_unload(GModule *);
2440
8306c042bac7 [gaim-migrate @ 2453]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2438
diff changeset
206 extern void remove_all_plugins();
2435
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
207 #endif
3551
cd938f18f3f8 [gaim-migrate @ 3626]
Sean Egan <seanegan@gmail.com>
parents: 3517
diff changeset
208 extern void gaim_probe_plugins();
3517
6b0cb60162f4 [gaim-migrate @ 3590]
Sean Egan <seanegan@gmail.com>
parents: 3510
diff changeset
209 extern int plugin_event(enum gaim_event, ...);
2511
a83b4a5ffcd6 [gaim-migrate @ 2524]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2501
diff changeset
210 extern char *event_name(enum gaim_event);
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
211
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
212 /* Functions in server.c */
4732
c15e0699acae [gaim-migrate @ 5047]
Nathan Walp <nwalp@pidgin.im>
parents: 4687
diff changeset
213 extern void serv_got_update(struct gaim_connection *, char *, int, int, time_t, time_t, int);
5136
381da05cb5ed [gaim-migrate @ 5500]
Nathan Walp <nwalp@pidgin.im>
parents: 5034
diff changeset
214 extern void serv_got_im(struct gaim_connection *, const char *, const char *, guint32, time_t, gint);
3768
f53370197bb9 [gaim-migrate @ 3907]
Sean Egan <seanegan@gmail.com>
parents: 3565
diff changeset
215 extern void serv_got_typing(struct gaim_connection *, char *, int, int);
2993
7239a392486c [gaim-migrate @ 3006]
Rob Flynn <gaim@robflynn.com>
parents: 2920
diff changeset
216 extern void serv_got_typing_stopped(struct gaim_connection *, char *);
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
217 extern void serv_got_eviled(struct gaim_connection *, char *, int);
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
218 extern void serv_got_chat_invite(struct gaim_connection *, char *, char *, char *, GList *);
4359
5fb47ec9bfe4 [gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents: 4349
diff changeset
219 extern struct gaim_conversation *serv_got_joined_chat(struct gaim_connection *, int, char *);
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
220 extern void serv_got_chat_left(struct gaim_connection *, int);
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
221 extern void serv_got_chat_in(struct gaim_connection *, int, char *, int, char *, time_t);
4227
a614423c648f [gaim-migrate @ 4471]
Mark Doliner <mark@kingant.net>
parents: 3768
diff changeset
222 extern void serv_got_alias(struct gaim_connection *, char *, char *);
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
223 extern void serv_finish_login();
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
224
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
225 #endif /* _CORE_H_ */