Mercurial > pidgin.yaz
annotate src/protocols/oscar/aim_internal.h @ 3952:07283934dedd
[gaim-migrate @ 4133]
Ok, big commit with little functionality change.
Most of it is me shuffling crap around because I'm one of them neat freaks. Lots of general code
cleanup too. I'm trying to move to that whole "one-family-per-file" thing.
The details...
I added libfaim support for aim's new search family, 0x000f. I only tested this briefly, so if
anyone uses it for anything, be aware that it could be buggy. I'll add oscar support sometime.
Advantages of this family are... when you search for someone, you get the directory info for that
person. So like, first name, middle name, last name, maiden name, city, state, country, zip,
address, interests, nickname, and maybe some other stuff. Basically all the info that they've set in
their directory info thing. Info. Oh, and I'm calling it "new search" because seach was already
taken, and cookie monster ate my right brain.
The reason I didn't add support to oscar.c... the new search family requires making a connection to
another server. While moving stuff around I realized that I didn't really like how new connections
are made. It's kind of sloppy. I'm thinking it would be nice to have an outgoing queue for each
type of connection, and then let the client queue messages as much as they want. Then, if libfaim
sees that there is a message for a certain type of connection, and there is no open connection of
that type, it will connect, and then flush the queue when the connection is made. This seems a lot
cleaner, but it also seems like a pain in the ass. I should do ssi for icq first, anyway :-)
Also, I think it would be neat if there was an ICBM file that handled channels 1 through 4. Then
im.c and chat.c could pass the ICBM part to the icbm stuff and it could get parsed there. im.c is
really huge right now.
I applied a patch from Graham Booker that paves the way for unicode in direct IMs. Thanks Graham.
Now we just need Paco-Paco to git a little free time and write a patch for this.
http://sourceforge.net/tracker/index.php?func=detail&aid=633589&group_id=235&atid=300235
I applied 2 patches from Will Mahan dealing with file transfer/oft/rendezous/whatever. Here's some
info on them, from The Man himself:
Patch 1
"Currently the Rendezvous code is rather messy; this
patch attempts to bring it up to speed with the rest of
the Oscar prpl. Its changes include:
* Rewrite several ft.c functions to use bstreams.
Apparently the code in question was written before
bstreams were implemented.
* Handle incoming Rendezvous packets through the
rxqueue like FLAP packets, rather than handling them as
a special case as soon as they are received. This
takes advantage of the bstream cleanup to unify some
code and simplify the aim_frame_t struct.
* Change some names used to try to clarify the
distinction between OFT, which refers specifically to
file transfer, and Rendezvous, which encompasses OFT as
well as other types of client-to-client connections."
Patch 2
"* Add some comments I inadvertently left out of my last patch.
* Fix a double-free that occurs when connections time out.
* Correct a bug causing filenames to be truncated by 4 characters on
some clients.
* Preserve directory structure when sending multiple files.
* Handle (throw away) resource forks sent by Mac clients."
I also changed all indents to tabs in ft.c.
And split all the bstream stuff from rxqueue.c and put it in bstream.c. It really is a separate
thing. Especially since it can be used for outgoing connections.
Also, I was going to look over the whole patch tonight to make sure it's all good, but it's like 6000
lines, so, uh, I'll do it later.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 13 Nov 2002 07:01:37 +0000 |
parents | b32474e522fa |
children | 2532f1192da3 |
rev | line source |
---|---|
2086 | 1 /* |
2 * aim_internal.h -- prototypes/structs for the guts of libfaim | |
3 * | |
4 */ | |
5 | |
6 #ifdef FAIM_INTERNAL | |
7 #ifndef __AIM_INTERNAL_H__ | |
8 #define __AIM_INTERNAL_H__ 1 | |
9 | |
10 typedef struct { | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
11 fu16_t family; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
12 fu16_t subtype; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
13 fu16_t flags; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
14 fu32_t id; |
2086 | 15 } aim_modsnac_t; |
16 | |
17 #define AIM_MODULENAME_MAXLEN 16 | |
18 #define AIM_MODFLAG_MULTIFAMILY 0x0001 | |
19 typedef struct aim_module_s { | |
2672 | 20 fu16_t family; |
21 fu16_t version; | |
22 fu16_t toolid; | |
23 fu16_t toolversion; | |
24 fu16_t flags; | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
25 char name[AIM_MODULENAME_MAXLEN+1]; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
26 int (*snachandler)(aim_session_t *sess, struct aim_module_s *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs); |
3752 | 27 int (*snacdestructor)(aim_session_t *sess, aim_conn_t *conn, aim_modsnac_t *snac, void *data); |
28 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
29 void (*shutdown)(aim_session_t *sess, struct aim_module_s *mod); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
30 void *priv; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
31 struct aim_module_s *next; |
2086 | 32 } aim_module_t; |
33 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
34 faim_internal int aim__registermodule(aim_session_t *sess, int (*modfirst)(aim_session_t *, aim_module_t *)); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
35 faim_internal void aim__shutdownmodules(aim_session_t *sess); |
2672 | 36 faim_internal aim_module_t *aim__findmodulebygroup(aim_session_t *sess, fu16_t group); |
37 faim_internal aim_module_t *aim__findmodule(aim_session_t *sess, const char *name); | |
2086 | 38 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
39 faim_internal int buddylist_modfirst(aim_session_t *sess, aim_module_t *mod); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
40 faim_internal int admin_modfirst(aim_session_t *sess, aim_module_t *mod); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
41 faim_internal int bos_modfirst(aim_session_t *sess, aim_module_t *mod); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
42 faim_internal int search_modfirst(aim_session_t *sess, aim_module_t *mod); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
43 faim_internal int stats_modfirst(aim_session_t *sess, aim_module_t *mod); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
44 faim_internal int auth_modfirst(aim_session_t *sess, aim_module_t *mod); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
45 faim_internal int msg_modfirst(aim_session_t *sess, aim_module_t *mod); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
46 faim_internal int misc_modfirst(aim_session_t *sess, aim_module_t *mod); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
47 faim_internal int chatnav_modfirst(aim_session_t *sess, aim_module_t *mod); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
48 faim_internal int chat_modfirst(aim_session_t *sess, aim_module_t *mod); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
49 faim_internal int locate_modfirst(aim_session_t *sess, aim_module_t *mod); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
50 faim_internal int general_modfirst(aim_session_t *sess, aim_module_t *mod); |
2672 | 51 faim_internal int ssi_modfirst(aim_session_t *sess, aim_module_t *mod); |
52 faim_internal int invite_modfirst(aim_session_t *sess, aim_module_t *mod); | |
53 faim_internal int translate_modfirst(aim_session_t *sess, aim_module_t *mod); | |
54 faim_internal int popups_modfirst(aim_session_t *sess, aim_module_t *mod); | |
55 faim_internal int adverts_modfirst(aim_session_t *sess, aim_module_t *mod); | |
2703
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2675
diff
changeset
|
56 faim_internal int icq_modfirst(aim_session_t *sess, aim_module_t *mod); |
3694 | 57 faim_internal int email_modfirst(aim_session_t *sess, aim_module_t *mod); |
3952 | 58 faim_internal int newsearch_modfirst(aim_session_t *sess, aim_module_t *mod); |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
59 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
60 faim_internal int aim_genericreq_n(aim_session_t *, aim_conn_t *conn, fu16_t family, fu16_t subtype); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
61 faim_internal int aim_genericreq_n_snacid(aim_session_t *, aim_conn_t *conn, fu16_t family, fu16_t subtype); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
62 faim_internal int aim_genericreq_l(aim_session_t *, aim_conn_t *conn, fu16_t family, fu16_t subtype, fu32_t *); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
63 faim_internal int aim_genericreq_s(aim_session_t *, aim_conn_t *conn, fu16_t family, fu16_t subtype, fu16_t *); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
64 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
65 #define AIMBS_CURPOSPAIR(x) ((x)->data + (x)->offset), ((x)->len - (x)->offset) |
2086 | 66 |
3952 | 67 /* bstream.c */ |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
68 faim_internal int aim_bstream_init(aim_bstream_t *bs, fu8_t *data, int len); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
69 faim_internal int aim_bstream_empty(aim_bstream_t *bs); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
70 faim_internal int aim_bstream_curpos(aim_bstream_t *bs); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
71 faim_internal int aim_bstream_setpos(aim_bstream_t *bs, int off); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
72 faim_internal void aim_bstream_rewind(aim_bstream_t *bs); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
73 faim_internal int aim_bstream_advance(aim_bstream_t *bs, int n); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
74 faim_internal fu8_t aimbs_get8(aim_bstream_t *bs); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
75 faim_internal fu16_t aimbs_get16(aim_bstream_t *bs); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
76 faim_internal fu32_t aimbs_get32(aim_bstream_t *bs); |
2706
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2703
diff
changeset
|
77 faim_internal fu8_t aimbs_getle8(aim_bstream_t *bs); |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2703
diff
changeset
|
78 faim_internal fu16_t aimbs_getle16(aim_bstream_t *bs); |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2703
diff
changeset
|
79 faim_internal fu32_t aimbs_getle32(aim_bstream_t *bs); |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
80 faim_internal int aimbs_put8(aim_bstream_t *bs, fu8_t v); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
81 faim_internal int aimbs_put16(aim_bstream_t *bs, fu16_t v); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
82 faim_internal int aimbs_put32(aim_bstream_t *bs, fu32_t v); |
2706
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2703
diff
changeset
|
83 faim_internal int aimbs_putle8(aim_bstream_t *bs, fu8_t v); |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2703
diff
changeset
|
84 faim_internal int aimbs_putle16(aim_bstream_t *bs, fu16_t v); |
e841b14b5b89
[gaim-migrate @ 2719]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2703
diff
changeset
|
85 faim_internal int aimbs_putle32(aim_bstream_t *bs, fu32_t v); |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
86 faim_internal int aimbs_getrawbuf(aim_bstream_t *bs, fu8_t *buf, int len); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
87 faim_internal fu8_t *aimbs_getraw(aim_bstream_t *bs, int len); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
88 faim_internal char *aimbs_getstr(aim_bstream_t *bs, int len); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
89 faim_internal int aimbs_putraw(aim_bstream_t *bs, const fu8_t *v, int len); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
90 faim_internal int aimbs_putbs(aim_bstream_t *bs, aim_bstream_t *srcbs, int len); |
2086 | 91 |
3952 | 92 /* conn.c */ |
93 faim_internal aim_conn_t *aim_cloneconn(aim_session_t *sess, aim_conn_t *src); | |
94 | |
95 /* ft.c */ | |
96 faim_internal int aim_rxdispatch_rendezvous(aim_session_t *sess, aim_frame_t *fr); | |
2086 | 97 |
3952 | 98 /* rxhandlers.c */ |
99 faim_internal aim_rxcallback_t aim_callhandler(aim_session_t *sess, aim_conn_t *conn, u_short family, u_short type); | |
100 faim_internal int aim_callhandler_noparam(aim_session_t *sess, aim_conn_t *conn, fu16_t family, fu16_t type, aim_frame_t *ptr); | |
101 faim_internal int aim_parse_unknown(aim_session_t *, aim_frame_t *, ...); | |
102 faim_internal void aim_clonehandlers(aim_session_t *sess, aim_conn_t *dest, aim_conn_t *src); | |
103 | |
104 /* rxqueue.c */ | |
105 faim_internal int aim_recv(int fd, void *buf, size_t count); | |
106 faim_internal int aim_bstream_recv(aim_bstream_t *bs, int fd, size_t count); | |
107 faim_internal void aim_rxqueue_cleanbyconn(aim_session_t *sess, aim_conn_t *conn); | |
108 faim_internal void aim_frame_destroy(aim_frame_t *); | |
109 | |
110 /* txqueue.c */ | |
111 faim_internal aim_frame_t *aim_tx_new(aim_session_t *sess, aim_conn_t *conn, fu8_t framing, fu16_t chan, int datalen); | |
112 faim_internal int aim_tx_enqueue(aim_session_t *, aim_frame_t *); | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
113 faim_internal flap_seqnum_t aim_get_next_txseqnum(aim_conn_t *); |
3952 | 114 faim_internal int aim_tx_sendframe(aim_session_t *sess, aim_frame_t *cur); |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
115 faim_internal void aim_tx_cleanqueue(aim_session_t *, aim_conn_t *); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
116 |
3952 | 117 /* XXX - What is this? faim_internal int aim_tx_printqueue(aim_session_t *); */ |
2086 | 118 |
119 /* | |
120 * Generic SNAC structure. Rarely if ever used. | |
121 */ | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
122 typedef struct aim_snac_s { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
123 aim_snacid_t id; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
124 fu16_t family; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
125 fu16_t type; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
126 fu16_t flags; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
127 void *data; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
128 time_t issuetime; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
129 struct aim_snac_s *next; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
130 } aim_snac_t; |
2086 | 131 |
3752 | 132 struct aim_snac_destructor { |
133 aim_conn_t *conn; | |
134 void *data; | |
135 }; | |
136 | |
3952 | 137 /* snac.c */ |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
138 faim_internal void aim_initsnachash(aim_session_t *sess); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
139 faim_internal aim_snacid_t aim_newsnac(aim_session_t *, aim_snac_t *newsnac); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
140 faim_internal aim_snacid_t aim_cachesnac(aim_session_t *sess, const fu16_t family, const fu16_t type, const fu16_t flags, const void *data, const int datalen); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
141 faim_internal aim_snac_t *aim_remsnac(aim_session_t *, aim_snacid_t id); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
142 faim_internal void aim_cleansnacs(aim_session_t *, int maxage); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
143 faim_internal int aim_putsnac(aim_bstream_t *, fu16_t family, fu16_t type, fu16_t flags, aim_snacid_t id); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
144 |
2821
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2734
diff
changeset
|
145 /* Stored in ->priv of the service request SNAC for chats. */ |
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2734
diff
changeset
|
146 struct chatsnacinfo { |
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2734
diff
changeset
|
147 fu16_t exchange; |
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2734
diff
changeset
|
148 char name[128]; |
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2734
diff
changeset
|
149 fu16_t instance; |
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2734
diff
changeset
|
150 }; |
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2734
diff
changeset
|
151 |
2086 | 152 /* these are used by aim_*_clientready */ |
153 #define AIM_TOOL_JAVA 0x0001 | |
154 #define AIM_TOOL_MAC 0x0002 | |
155 #define AIM_TOOL_WIN16 0x0003 | |
156 #define AIM_TOOL_WIN32 0x0004 | |
157 #define AIM_TOOL_MAC68K 0x0005 | |
158 #define AIM_TOOL_MACPPC 0x0006 | |
159 #define AIM_TOOL_NEWWIN 0x0010 | |
160 struct aim_tool_version { | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
161 fu16_t group; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
162 fu16_t version; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
163 fu16_t tool; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
164 fu16_t toolversion; |
2086 | 165 }; |
166 | |
2270
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
167 /* |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
168 * In SNACland, the terms 'family' and 'group' are synonymous -- the former |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
169 * is my term, the latter is AOL's. |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
170 */ |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
171 struct snacgroup { |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
172 fu16_t group; |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
173 struct snacgroup *next; |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
174 }; |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
175 |
2734
9fc65bb80596
[gaim-migrate @ 2747]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2717
diff
changeset
|
176 #ifdef FAIM_NEED_CONN_INTERNAL |
2675 | 177 struct snacpair { |
178 fu16_t group; | |
179 fu16_t subtype; | |
180 struct snacpair *next; | |
181 }; | |
182 | |
183 struct rateclass { | |
184 fu16_t classid; | |
185 fu32_t windowsize; | |
186 fu32_t clear; | |
187 fu32_t alert; | |
188 fu32_t limit; | |
189 fu32_t disconnect; | |
190 fu32_t current; | |
191 fu32_t max; | |
192 fu8_t unknown[5]; /* only present in versions >= 3 */ | |
193 struct snacpair *members; | |
194 struct rateclass *next; | |
195 }; | |
2734
9fc65bb80596
[gaim-migrate @ 2747]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2717
diff
changeset
|
196 #endif /* FAIM_NEED_CONN_INTERNAL */ |
2675 | 197 |
2270
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
198 /* |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
199 * This is inside every connection. But it is a void * to anything |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
200 * outside of libfaim. It should remain that way. It's called data |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
201 * abstraction. Maybe you've heard of it. (Probably not if you're a |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
202 * libfaim user.) |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
203 * |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
204 */ |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
205 typedef struct aim_conn_inside_s { |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
206 struct snacgroup *groups; |
2675 | 207 struct rateclass *rates; |
2270
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
208 } aim_conn_inside_t; |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
209 |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
210 faim_internal void aim_conn_addgroup(aim_conn_t *conn, fu16_t group); |
d82efea341ef
[gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2246
diff
changeset
|
211 |
2866
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
212 faim_internal fu32_t aim_getcap(aim_session_t *sess, aim_bstream_t *bs, int len); |
6d62d4520460
[gaim-migrate @ 2879]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2821
diff
changeset
|
213 faim_internal int aim_putcap(aim_bstream_t *bs, fu32_t caps); |
2086 | 214 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
215 faim_internal int aim_cachecookie(aim_session_t *sess, aim_msgcookie_t *cookie); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
216 faim_internal aim_msgcookie_t *aim_uncachecookie(aim_session_t *sess, fu8_t *cookie, int type); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
217 faim_internal aim_msgcookie_t *aim_mkcookie(fu8_t *, int, void *); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
218 faim_internal aim_msgcookie_t *aim_checkcookie(aim_session_t *, const unsigned char *, const int); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
219 faim_internal int aim_freecookie(aim_session_t *sess, aim_msgcookie_t *cookie); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
220 faim_internal int aim_msgcookie_gettype(int reqclass); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
221 faim_internal int aim_cookie_free(aim_session_t *sess, aim_msgcookie_t *cookie); |
2086 | 222 |
2421
95b4ec08abec
[gaim-migrate @ 2434]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2270
diff
changeset
|
223 faim_internal int aim_extractuserinfo(aim_session_t *sess, aim_bstream_t *bs, aim_userinfo_t *); |
95b4ec08abec
[gaim-migrate @ 2434]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2270
diff
changeset
|
224 faim_internal int aim_putuserinfo(aim_bstream_t *bs, aim_userinfo_t *info); |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
225 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
226 faim_internal int aim_chat_readroominfo(aim_bstream_t *bs, struct aim_chat_roominfo *outinfo); |
2086 | 227 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
228 faim_internal void faimdprintf(aim_session_t *sess, int dlevel, const char *format, ...); |
2086 | 229 |
2717
03bf072c6238
[gaim-migrate @ 2730]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2706
diff
changeset
|
230 faim_internal int aim_request_directim(aim_session_t *sess, const char *destsn, fu8_t *ip, fu16_t port, fu8_t *ckret); |
03bf072c6238
[gaim-migrate @ 2730]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2706
diff
changeset
|
231 faim_internal int aim_request_sendfile(aim_session_t *sess, const char *sn, const char *filename, fu16_t numfiles, fu32_t totsize, fu8_t *ip, fu16_t port, fu8_t *ckret); |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
232 faim_internal void aim_conn_close_rend(aim_session_t *sess, aim_conn_t *conn); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
233 faim_internal void aim_conn_kill_rend(aim_session_t *sess, aim_conn_t *conn); |
2086 | 234 |
2821
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2734
diff
changeset
|
235 faim_internal void aim_conn_kill_chat(aim_session_t *sess, aim_conn_t *conn); |
9467e4ee81be
[gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2734
diff
changeset
|
236 |
2675 | 237 /* These are all handled internally now. */ |
238 faim_internal int aim_setversions(aim_session_t *sess, aim_conn_t *conn); | |
239 faim_internal int aim_reqrates(aim_session_t *, aim_conn_t *); | |
2703
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2675
diff
changeset
|
240 faim_internal int aim_rates_addparam(aim_session_t *, aim_conn_t *); |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2675
diff
changeset
|
241 faim_internal int aim_rates_delparam(aim_session_t *, aim_conn_t *); |
2086 | 242 |
243 #ifndef FAIM_INTERNAL_INSANE | |
244 #define printf() printf called inside libfaim | |
245 #define sprintf() unbounded sprintf used inside libfaim | |
246 #endif | |
247 | |
248 #endif /* __AIM_INTERNAL_H__ */ | |
249 #endif /* FAIM_INTERNAL */ |