annotate src/core.h @ 5259:750e4801819f

[gaim-migrate @ 5631] i didn't mean to commit that committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Tue, 29 Apr 2003 00:23:19 +0000
parents 890b29f00b68
children ad445074d239
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
5211
0241d6b6702d [gaim-migrate @ 5581]
Christian Hammond <chipx86@chipx86.com>
parents: 5205
diff changeset
52 #include "debug.h"
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
53 #include "multi.h"
4359
5fb47ec9bfe4 [gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents: 4349
diff changeset
54 #include "conversation.h"
4514
7521e29658bc [gaim-migrate @ 4792]
Christian Hammond <chipx86@chipx86.com>
parents: 4491
diff changeset
55 #include "ft.h"
4687
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents: 4634
diff changeset
56 #include "privacy.h"
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5136
diff changeset
57 #include "plugin.h"
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5136
diff changeset
58 #include "event.h"
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
59
2501
227cc42ffa6e [gaim-migrate @ 2514]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2447
diff changeset
60 /* 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
61 #define UC_UNAVAILABLE 1
2435
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
62
3205
332df87cf3d6 [gaim-migrate @ 3222]
Sean Egan <seanegan@gmail.com>
parents: 3136
diff changeset
63 /* 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
64 #define SELF_ALIAS_LEN 400
332df87cf3d6 [gaim-migrate @ 3222]
Sean Egan <seanegan@gmail.com>
parents: 3136
diff changeset
65
4491
3196d9044a45 [gaim-migrate @ 4766]
Nathan Walp <nwalp@pidgin.im>
parents: 4359
diff changeset
66 struct gaim_account {
2442
895e2469cb3a [gaim-migrate @ 2455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2440
diff changeset
67 char username[64];
3205
332df87cf3d6 [gaim-migrate @ 3222]
Sean Egan <seanegan@gmail.com>
parents: 3136
diff changeset
68 char alias[SELF_ALIAS_LEN];
2442
895e2469cb3a [gaim-migrate @ 2455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2440
diff changeset
69 char password[32];
895e2469cb3a [gaim-migrate @ 2455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2440
diff changeset
70 char user_info[2048];
895e2469cb3a [gaim-migrate @ 2455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2440
diff changeset
71 int options;
895e2469cb3a [gaim-migrate @ 2455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2440
diff changeset
72 int protocol;
895e2469cb3a [gaim-migrate @ 2455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2440
diff changeset
73 /* prpls can use this to save information about the user,
895e2469cb3a [gaim-migrate @ 2455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2440
diff changeset
74 * like which server to connect to, etc */
895e2469cb3a [gaim-migrate @ 2455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2440
diff changeset
75 char proto_opt[7][256];
895e2469cb3a [gaim-migrate @ 2455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2440
diff changeset
76
895e2469cb3a [gaim-migrate @ 2455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2440
diff changeset
77 /* buddy icon file */
895e2469cb3a [gaim-migrate @ 2455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2440
diff changeset
78 char iconfile[256];
895e2469cb3a [gaim-migrate @ 2455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2440
diff changeset
79
4634
d19872836812 [gaim-migrate @ 4941]
Nathan Walp <nwalp@pidgin.im>
parents: 4514
diff changeset
80 struct gaim_proxy_info *gpi;
d19872836812 [gaim-migrate @ 4941]
Nathan Walp <nwalp@pidgin.im>
parents: 4514
diff changeset
81
2442
895e2469cb3a [gaim-migrate @ 2455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2440
diff changeset
82 struct gaim_connection *gc;
3510
e23909729192 [gaim-migrate @ 3576]
Sean Egan <seanegan@gmail.com>
parents: 3484
diff changeset
83 gboolean connecting;
4349
0c68d402f59f [gaim-migrate @ 4614]
Nathan Walp <nwalp@pidgin.im>
parents: 4298
diff changeset
84
0c68d402f59f [gaim-migrate @ 4614]
Nathan Walp <nwalp@pidgin.im>
parents: 4298
diff changeset
85 GSList *permit;
0c68d402f59f [gaim-migrate @ 4614]
Nathan Walp <nwalp@pidgin.im>
parents: 4298
diff changeset
86 GSList *deny;
0c68d402f59f [gaim-migrate @ 4614]
Nathan Walp <nwalp@pidgin.im>
parents: 4298
diff changeset
87 int permdeny;
2442
895e2469cb3a [gaim-migrate @ 2455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2440
diff changeset
88 };
4349
0c68d402f59f [gaim-migrate @ 4614]
Nathan Walp <nwalp@pidgin.im>
parents: 4298
diff changeset
89
2440
8306c042bac7 [gaim-migrate @ 2453]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2438
diff changeset
90 struct UI {
8306c042bac7 [gaim-migrate @ 2453]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2438
diff changeset
91 GIOChannel *channel;
8306c042bac7 [gaim-migrate @ 2453]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2438
diff changeset
92 guint inpa;
8306c042bac7 [gaim-migrate @ 2453]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2438
diff changeset
93 };
8306c042bac7 [gaim-migrate @ 2453]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2438
diff changeset
94
8306c042bac7 [gaim-migrate @ 2453]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2438
diff changeset
95 /* Globals in core.c */
8306c042bac7 [gaim-migrate @ 2453]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2438
diff changeset
96 extern GSList *uis;
3484
5d1dff030d8b [gaim-migrate @ 3538]
Sean Egan <seanegan@gmail.com>
parents: 3478
diff changeset
97 extern int gaim_session;
2440
8306c042bac7 [gaim-migrate @ 2453]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2438
diff changeset
98
2435
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
99 /* Functions in core.c */
2440
8306c042bac7 [gaim-migrate @ 2453]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2438
diff changeset
100 extern gint UI_write(struct UI *, guchar *, int);
2447
6bdeb91abe4e [gaim-migrate @ 2460]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2443
diff changeset
101 extern void UI_build_write(struct UI *, guchar, guchar, ...);
2440
8306c042bac7 [gaim-migrate @ 2453]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2438
diff changeset
102 extern void UI_broadcast(guchar *data, int);
2447
6bdeb91abe4e [gaim-migrate @ 2460]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2443
diff changeset
103 extern void UI_build_broadcast(guchar, guchar, ...);
2435
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
104 /* 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
105 * 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
106 extern int core_main();
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
107 extern void core_quit();
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
108
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
109 /* Functions in gaimrc.c */
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
110 extern void load_prefs();
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4770
diff changeset
111 extern void load_pounces();
2435
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
112 extern void save_prefs();
b4f2a53c0ee5 [gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
113
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
114 /* Functions in server.c */
4732
c15e0699acae [gaim-migrate @ 5047]
Nathan Walp <nwalp@pidgin.im>
parents: 4687
diff changeset
115 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
116 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
117 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
118 extern void serv_got_typing_stopped(struct gaim_connection *, char *);
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
119 extern void serv_got_eviled(struct gaim_connection *, char *, int);
5234
890b29f00b68 [gaim-migrate @ 5604]
Nathan Walp <nwalp@pidgin.im>
parents: 5211
diff changeset
120 extern void serv_got_chat_invite(struct gaim_connection *, char *, char *, char *, GHashTable *);
4359
5fb47ec9bfe4 [gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents: 4349
diff changeset
121 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
122 extern void serv_got_chat_left(struct gaim_connection *, int);
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
123 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
124 extern void serv_got_alias(struct gaim_connection *, char *, char *);
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
125 extern void serv_finish_login();
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
126
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
127 #endif /* _CORE_H_ */