Thu, 02 Nov 2000 22:29:51 +0000
[gaim-migrate @ 1061]
user_info only in aim_user (saves 2k per connection); mem leak fixes in dialogs.c and multi.c; and proto_opt in aim_user (so prpls can have their own saved information per user). no way to draw protocol option selection window thingy yet, so prpls will either have to do that on their own or something. i don't know. we'll figure it out.
| 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
be33487bc33d
[gaim-migrate @ 1013]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
1000
diff
changeset
|
34 | #define PROTO_VGATE 7 |
| 981 | 35 | |
|
1000
66436e94d53f
[gaim-migrate @ 1010]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
981
diff
changeset
|
36 | typedef void (*proto_init)(struct prpl *); |
|
66436e94d53f
[gaim-migrate @ 1010]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
981
diff
changeset
|
37 | |
| 981 | 38 | struct prpl { |
| 39 | int protocol; | |
| 40 | char *(* name)(); | |
| 41 | ||
|
1032
c16107c10195
[gaim-migrate @ 1042]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
1030
diff
changeset
|
42 | /* returns the XPM associated with the given user class */ |
|
1030
b9fa9eadc0a4
[gaim-migrate @ 1040]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
1003
diff
changeset
|
43 | char **(* list_icon)(int); |
|
1032
c16107c10195
[gaim-migrate @ 1042]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
1030
diff
changeset
|
44 | /* returns a GtkMenu * for use in the buddy list */ |
|
c16107c10195
[gaim-migrate @ 1042]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
1030
diff
changeset
|
45 | void (* action_menu)(GtkWidget *, struct gaim_connection *, char *); |
|
1030
b9fa9eadc0a4
[gaim-migrate @ 1040]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
1003
diff
changeset
|
46 | |
| 981 | 47 | void (* login) (struct aim_user *); |
| 48 | void (* close) (struct gaim_connection *); | |
| 49 | void (* send_im) (struct gaim_connection *, char *who, char *message, int away); | |
| 50 | void (* set_info) (struct gaim_connection *, char *info); | |
| 51 | void (* get_info) (struct gaim_connection *, char *who); | |
| 52 | void (* set_away) (struct gaim_connection *, char *message); | |
| 53 | void (* get_away_msg) (struct gaim_connection *, char *who); | |
| 54 | void (* set_dir) (struct gaim_connection *, char *first, | |
| 55 | char *middle, | |
| 56 | char *last, | |
| 57 | char *maiden, | |
| 58 | char *city, | |
| 59 | char *state, | |
| 60 | char *country, | |
| 61 | int web); | |
| 62 | void (* get_dir) (struct gaim_connection *, char *who); | |
| 63 | void (* dir_search) (struct gaim_connection *, char *first, | |
| 64 | char *middle, | |
| 65 | char *last, | |
| 66 | char *maiden, | |
| 67 | char *city, | |
| 68 | char *state, | |
| 69 | char *country, | |
| 70 | char *email); | |
| 71 | void (* set_idle) (struct gaim_connection *, int idletime); | |
| 72 | void (* change_passwd) (struct gaim_connection *, char *old, char *new); | |
| 73 | void (* add_buddy) (struct gaim_connection *, char *name); | |
| 74 | void (* add_buddies) (struct gaim_connection *, GList *buddies); | |
| 75 | void (* remove_buddy) (struct gaim_connection *, char *name); | |
| 76 | void (* add_permit) (struct gaim_connection *, char *name); | |
| 77 | void (* add_deny) (struct gaim_connection *, char *name); | |
|
1038
850b893e1ac9
[gaim-migrate @ 1048]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
1032
diff
changeset
|
78 | void (* rem_permit) (struct gaim_connection *, char *name); |
|
850b893e1ac9
[gaim-migrate @ 1048]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
1032
diff
changeset
|
79 | void (* rem_deny) (struct gaim_connection *, char *name); |
|
850b893e1ac9
[gaim-migrate @ 1048]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
1032
diff
changeset
|
80 | void (* set_permit_deny)(struct gaim_connection *); |
| 981 | 81 | void (* warn) (struct gaim_connection *, char *who, int anonymous); |
| 82 | void (* accept_chat) (struct gaim_connection *, int id); | |
| 83 | void (* join_chat) (struct gaim_connection *, int id, char *name); | |
| 84 | void (* chat_invite) (struct gaim_connection *, int id, char *who, char *message); | |
| 85 | void (* chat_leave) (struct gaim_connection *, int id); | |
| 86 | void (* chat_whisper) (struct gaim_connection *, int id, char *who, char *message); | |
| 87 | void (* chat_send) (struct gaim_connection *, int id, char *message); | |
| 88 | ||
| 89 | void (* keepalive) (struct gaim_connection *); | |
| 90 | }; | |
| 91 | ||
| 92 | extern GSList *protocols; | |
| 93 | ||
|
1000
66436e94d53f
[gaim-migrate @ 1010]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
981
diff
changeset
|
94 | /* this is mostly just for aim.c, when it initializes the protocols */ |
| 981 | 95 | void static_proto_init(); |
| 96 | ||
|
1000
66436e94d53f
[gaim-migrate @ 1010]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
981
diff
changeset
|
97 | /* this is what should actually load the protocol. pass it the protocol's initializer */ |
|
66436e94d53f
[gaim-migrate @ 1010]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
981
diff
changeset
|
98 | void load_protocol(proto_init); |
|
1047
783f8520d9a0
[gaim-migrate @ 1057]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
1038
diff
changeset
|
99 | void unload_protocol(struct prpl *); |
|
1000
66436e94d53f
[gaim-migrate @ 1010]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
981
diff
changeset
|
100 | |
| 981 | 101 | struct prpl *find_prpl(int); |
| 102 | ||
| 103 | #endif |