Mercurial > pidgin
annotate src/prpl.h @ 1410:6b083d580184
[gaim-migrate @ 1420]
Fixed hanging trees
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Tue, 16 Jan 2001 02:06:46 +0000 |
parents | bf041349b11e |
children | de21a6790603 |
rev | line source |
---|---|
981 | 1 /* |
2 * gaim | |
3 * | |
4 * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net> | |
5 * | |
6 * This program is free software; you can redistribute it and/or modify | |
7 * it under the terms of the GNU General Public License as published by | |
8 * the Free Software Foundation; either version 2 of the License, or | |
9 * (at your option) any later version. | |
10 * | |
11 * This program is distributed in the hope that it will be useful, | |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 * GNU General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU General Public License | |
17 * along with this program; if not, write to the Free Software | |
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
19 * | |
20 */ | |
21 | |
22 #ifndef _GAIMPRPL_H_ | |
23 #define _GAIMPRPL_H_ | |
24 | |
25 #include "multi.h" | |
26 | |
27 #define PROTO_TOC 0 | |
28 #define PROTO_OSCAR 1 | |
29 #define PROTO_YAHOO 2 | |
30 #define PROTO_ICQ 3 | |
31 #define PROTO_MSN 4 | |
32 #define PROTO_IRC 5 | |
33 #define PROTO_FTP 6 | |
1003
f8f7f3ed2edb
[gaim-migrate @ 1013]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1000
diff
changeset
|
34 #define PROTO_VGATE 7 |
1083
12478dd1e9d7
[gaim-migrate @ 1093]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1075
diff
changeset
|
35 #define PROTO_JABBER 8 |
1318
4d4fef0928ce
[gaim-migrate @ 1328]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1083
diff
changeset
|
36 #define PROTO_NAPSTER 9 |
981 | 37 |
1370
776bb4c6c0b8
[gaim-migrate @ 1380]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1355
diff
changeset
|
38 #define OPT_PROTO_HTML 0x00000001 |
776bb4c6c0b8
[gaim-migrate @ 1380]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1355
diff
changeset
|
39 /* there should be more here eventually... These should all be stuff that other |
776bb4c6c0b8
[gaim-migrate @ 1380]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1355
diff
changeset
|
40 * plugins can't do (for example, TOC and Oscar and Jabber can do HTML in messages, |
776bb4c6c0b8
[gaim-migrate @ 1380]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1355
diff
changeset
|
41 * but IRC etc can't, so TOC/Oscar/Jabber have _HTML set but not IRC. */ |
776bb4c6c0b8
[gaim-migrate @ 1380]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1355
diff
changeset
|
42 |
1401
bf041349b11e
[gaim-migrate @ 1411]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1370
diff
changeset
|
43 #define GAIM_AWAY_CUSTOM "Custom" |
bf041349b11e
[gaim-migrate @ 1411]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1370
diff
changeset
|
44 |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
981
diff
changeset
|
45 typedef void (*proto_init)(struct prpl *); |
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
981
diff
changeset
|
46 |
981 | 47 struct prpl { |
48 int protocol; | |
1370
776bb4c6c0b8
[gaim-migrate @ 1380]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1355
diff
changeset
|
49 int options; |
981 | 50 char *(* name)(); |
51 | |
1032
643a4d81c18a
[gaim-migrate @ 1042]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1030
diff
changeset
|
52 /* returns the XPM associated with the given user class */ |
1030
38452403563b
[gaim-migrate @ 1040]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1003
diff
changeset
|
53 char **(* list_icon)(int); |
1401
bf041349b11e
[gaim-migrate @ 1411]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1370
diff
changeset
|
54 GList *(* away_states)(); |
1333
b332d8f46b84
[gaim-migrate @ 1343]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1318
diff
changeset
|
55 |
b332d8f46b84
[gaim-migrate @ 1343]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1318
diff
changeset
|
56 /* when UI plugins come, these will have to be reconciled by returning |
b332d8f46b84
[gaim-migrate @ 1343]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1318
diff
changeset
|
57 * structs indicating what kinds of information they want displayed. */ |
1032
643a4d81c18a
[gaim-migrate @ 1042]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1030
diff
changeset
|
58 void (* action_menu)(GtkWidget *, struct gaim_connection *, char *); |
1075
2fe18b2d6105
[gaim-migrate @ 1085]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1064
diff
changeset
|
59 void (* user_opts)(GtkWidget *, struct aim_user *); |
1333
b332d8f46b84
[gaim-migrate @ 1343]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1318
diff
changeset
|
60 void (* draw_new_user)(GtkWidget *); |
b332d8f46b84
[gaim-migrate @ 1343]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1318
diff
changeset
|
61 void (* do_new_user)(); |
1030
38452403563b
[gaim-migrate @ 1040]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1003
diff
changeset
|
62 |
1333
b332d8f46b84
[gaim-migrate @ 1343]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1318
diff
changeset
|
63 /* all the server-related functions */ |
981 | 64 void (* login) (struct aim_user *); |
65 void (* close) (struct gaim_connection *); | |
66 void (* send_im) (struct gaim_connection *, char *who, char *message, int away); | |
67 void (* set_info) (struct gaim_connection *, char *info); | |
68 void (* get_info) (struct gaim_connection *, char *who); | |
1401
bf041349b11e
[gaim-migrate @ 1411]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1370
diff
changeset
|
69 void (* set_away) (struct gaim_connection *, char *state, char *message); |
981 | 70 void (* get_away_msg) (struct gaim_connection *, char *who); |
71 void (* set_dir) (struct gaim_connection *, char *first, | |
72 char *middle, | |
73 char *last, | |
74 char *maiden, | |
75 char *city, | |
76 char *state, | |
77 char *country, | |
78 int web); | |
79 void (* get_dir) (struct gaim_connection *, char *who); | |
80 void (* dir_search) (struct gaim_connection *, char *first, | |
81 char *middle, | |
82 char *last, | |
83 char *maiden, | |
84 char *city, | |
85 char *state, | |
86 char *country, | |
87 char *email); | |
88 void (* set_idle) (struct gaim_connection *, int idletime); | |
89 void (* change_passwd) (struct gaim_connection *, char *old, char *new); | |
90 void (* add_buddy) (struct gaim_connection *, char *name); | |
91 void (* add_buddies) (struct gaim_connection *, GList *buddies); | |
92 void (* remove_buddy) (struct gaim_connection *, char *name); | |
93 void (* add_permit) (struct gaim_connection *, char *name); | |
94 void (* add_deny) (struct gaim_connection *, char *name); | |
1038
daad2440a642
[gaim-migrate @ 1048]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1032
diff
changeset
|
95 void (* rem_permit) (struct gaim_connection *, char *name); |
daad2440a642
[gaim-migrate @ 1048]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1032
diff
changeset
|
96 void (* rem_deny) (struct gaim_connection *, char *name); |
daad2440a642
[gaim-migrate @ 1048]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1032
diff
changeset
|
97 void (* set_permit_deny)(struct gaim_connection *); |
981 | 98 void (* warn) (struct gaim_connection *, char *who, int anonymous); |
99 void (* accept_chat) (struct gaim_connection *, int id); | |
100 void (* join_chat) (struct gaim_connection *, int id, char *name); | |
101 void (* chat_invite) (struct gaim_connection *, int id, char *who, char *message); | |
102 void (* chat_leave) (struct gaim_connection *, int id); | |
103 void (* chat_whisper) (struct gaim_connection *, int id, char *who, char *message); | |
104 void (* chat_send) (struct gaim_connection *, int id, char *message); | |
105 void (* keepalive) (struct gaim_connection *); | |
106 }; | |
107 | |
108 extern GSList *protocols; | |
109 | |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
981
diff
changeset
|
110 /* this is mostly just for aim.c, when it initializes the protocols */ |
981 | 111 void static_proto_init(); |
112 | |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
981
diff
changeset
|
113 /* this is what should actually load the protocol. pass it the protocol's initializer */ |
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
981
diff
changeset
|
114 void load_protocol(proto_init); |
1047
ece2d1543b20
[gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1038
diff
changeset
|
115 void unload_protocol(struct prpl *); |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
981
diff
changeset
|
116 |
981 | 117 struct prpl *find_prpl(int); |
118 | |
1333
b332d8f46b84
[gaim-migrate @ 1343]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1318
diff
changeset
|
119 void register_user(gpointer, gpointer); |
1355
04874e92af24
[gaim-migrate @ 1365]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1333
diff
changeset
|
120 void prepare_regbox_for_next(); |
1333
b332d8f46b84
[gaim-migrate @ 1343]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1318
diff
changeset
|
121 |
1064
b0b40b5faede
[gaim-migrate @ 1074]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1047
diff
changeset
|
122 void do_ask_dialog(const char *, void *, void *, void *); |
981 | 123 #endif |