annotate src/protocols/oscar/aim_internal.h @ 12626:6a2e376b0a34

[gaim-migrate @ 14962] let the world know committer: Tailor Script <tailor@pidgin.im>
author Christopher O'Brien <siege@pidgin.im>
date Thu, 22 Dec 2005 17:38:38 +0000
parents 9a0a6e74aafd
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1 /*
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
2 * aim_internal.h -- prototypes/structs for the guts of libfaim
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
3 *
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
4 */
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
5
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
6 #ifdef FAIM_INTERNAL
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
7 #ifndef __AIM_INTERNAL_H__
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
8 #define __AIM_INTERNAL_H__ 1
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
9
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
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
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
15 } aim_modsnac_t;
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
16
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
17 #define AIM_MODULENAME_MAXLEN 16
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
18 #define AIM_MODFLAG_MULTIFAMILY 0x0001
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
19 typedef struct aim_module_s {
2672
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents: 2421
diff changeset
20 fu16_t family;
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents: 2421
diff changeset
21 fu16_t version;
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents: 2421
diff changeset
22 fu16_t toolid;
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents: 2421
diff changeset
23 fu16_t toolversion;
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents: 2421
diff changeset
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
b32474e522fa [gaim-migrate @ 3890]
Luke Schierer <lschiere@pidgin.im>
parents: 3694
diff changeset
27
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2086
diff changeset
28 void (*shutdown)(aim_session_t *sess, struct aim_module_s *mod);
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2086
diff changeset
29 void *priv;
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2086
diff changeset
30 struct aim_module_s *next;
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
31 } aim_module_t;
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
32
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2086
diff changeset
33 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
34 faim_internal void aim__shutdownmodules(aim_session_t *sess);
2672
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents: 2421
diff changeset
35 faim_internal aim_module_t *aim__findmodulebygroup(aim_session_t *sess, fu16_t group);
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents: 2421
diff changeset
36 faim_internal aim_module_t *aim__findmodule(aim_session_t *sess, const char *name);
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
37
4804
9810ce8e7a96 [gaim-migrate @ 5124]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
38 faim_internal int admin_modfirst(aim_session_t *sess, aim_module_t *mod);
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 bos_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 search_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 stats_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 auth_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 msg_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 misc_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 chatnav_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 chat_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 locate_modfirst(aim_session_t *sess, aim_module_t *mod);
7474
2bdacd38528c [gaim-migrate @ 8087]
Mark Doliner <mark@kingant.net>
parents: 7334
diff changeset
49 faim_internal int service_modfirst(aim_session_t *sess, aim_module_t *mod);
2672
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents: 2421
diff changeset
50 faim_internal int invite_modfirst(aim_session_t *sess, aim_module_t *mod);
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents: 2421
diff changeset
51 faim_internal int translate_modfirst(aim_session_t *sess, aim_module_t *mod);
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents: 2421
diff changeset
52 faim_internal int popups_modfirst(aim_session_t *sess, aim_module_t *mod);
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents: 2421
diff changeset
53 faim_internal int adverts_modfirst(aim_session_t *sess, aim_module_t *mod);
6879
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents: 5927
diff changeset
54 faim_internal int odir_modfirst(aim_session_t *sess, aim_module_t *mod);
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents: 5927
diff changeset
55 faim_internal int bart_modfirst(aim_session_t *sess, aim_module_t *mod);
4804
9810ce8e7a96 [gaim-migrate @ 5124]
Mark Doliner <mark@kingant.net>
parents: 4617
diff changeset
56 faim_internal int ssi_modfirst(aim_session_t *sess, aim_module_t *mod);
2703
441b84ab7f4e [gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2675
diff changeset
57 faim_internal int icq_modfirst(aim_session_t *sess, aim_module_t *mod);
3694
e941bfbacf7c [gaim-migrate @ 3824]
Mark Doliner <mark@kingant.net>
parents: 3630
diff changeset
58 faim_internal int email_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
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
66
3952
07283934dedd [gaim-migrate @ 4133]
Mark Doliner <mark@kingant.net>
parents: 3752
diff changeset
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);
7631
ea2d07ad05a9 [gaim-migrate @ 8255]
Nathan Walp <nwalp@pidgin.im>
parents: 7474
diff changeset
71 faim_internal int aim_bstream_setpos(aim_bstream_t *bs, unsigned int off);
2246
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);
10990
8d74ae785a46 [gaim-migrate @ 12828]
Mark Doliner <mark@kingant.net>
parents: 10344
diff changeset
80 faim_internal int aimbs_getrawbuf(aim_bstream_t *bs, fu8_t *buf, int len);
8d74ae785a46 [gaim-migrate @ 12828]
Mark Doliner <mark@kingant.net>
parents: 10344
diff changeset
81 faim_internal fu8_t *aimbs_getraw(aim_bstream_t *bs, int len);
8d74ae785a46 [gaim-migrate @ 12828]
Mark Doliner <mark@kingant.net>
parents: 10344
diff changeset
82 faim_internal char *aimbs_getstr(aim_bstream_t *bs, int len);
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2086
diff changeset
83 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
84 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
85 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
86 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
87 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
88 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
89 faim_internal int aimbs_putraw(aim_bstream_t *bs, const fu8_t *v, int len);
10990
8d74ae785a46 [gaim-migrate @ 12828]
Mark Doliner <mark@kingant.net>
parents: 10344
diff changeset
90 faim_internal int aimbs_putstr(aim_bstream_t *bs, const char *str);
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2086
diff changeset
91 faim_internal int aimbs_putbs(aim_bstream_t *bs, aim_bstream_t *srcbs, int len);
11285
bcd7bd6a42dd [gaim-migrate @ 13482]
Mark Doliner <mark@kingant.net>
parents: 11253
diff changeset
92 faim_internal int aimbs_putcaps(aim_bstream_t *bs, fu32_t caps);
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
93
3952
07283934dedd [gaim-migrate @ 4133]
Mark Doliner <mark@kingant.net>
parents: 3752
diff changeset
94 /* conn.c */
07283934dedd [gaim-migrate @ 4133]
Mark Doliner <mark@kingant.net>
parents: 3752
diff changeset
95 faim_internal aim_conn_t *aim_cloneconn(aim_session_t *sess, aim_conn_t *src);
07283934dedd [gaim-migrate @ 4133]
Mark Doliner <mark@kingant.net>
parents: 3752
diff changeset
96
07283934dedd [gaim-migrate @ 4133]
Mark Doliner <mark@kingant.net>
parents: 3752
diff changeset
97 /* ft.c */
07283934dedd [gaim-migrate @ 4133]
Mark Doliner <mark@kingant.net>
parents: 3752
diff changeset
98 faim_internal int aim_rxdispatch_rendezvous(aim_session_t *sess, aim_frame_t *fr);
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
99
3952
07283934dedd [gaim-migrate @ 4133]
Mark Doliner <mark@kingant.net>
parents: 3752
diff changeset
100 /* rxhandlers.c */
5927
04dc7fe68889 [gaim-migrate @ 6367]
Mark Doliner <mark@kingant.net>
parents: 5836
diff changeset
101 faim_internal aim_rxcallback_t aim_callhandler(aim_session_t *sess, aim_conn_t *conn, fu16_t family, fu16_t type);
3952
07283934dedd [gaim-migrate @ 4133]
Mark Doliner <mark@kingant.net>
parents: 3752
diff changeset
102 faim_internal int aim_callhandler_noparam(aim_session_t *sess, aim_conn_t *conn, fu16_t family, fu16_t type, aim_frame_t *ptr);
07283934dedd [gaim-migrate @ 4133]
Mark Doliner <mark@kingant.net>
parents: 3752
diff changeset
103 faim_internal int aim_parse_unknown(aim_session_t *, aim_frame_t *, ...);
07283934dedd [gaim-migrate @ 4133]
Mark Doliner <mark@kingant.net>
parents: 3752
diff changeset
104 faim_internal void aim_clonehandlers(aim_session_t *sess, aim_conn_t *dest, aim_conn_t *src);
07283934dedd [gaim-migrate @ 4133]
Mark Doliner <mark@kingant.net>
parents: 3752
diff changeset
105
07283934dedd [gaim-migrate @ 4133]
Mark Doliner <mark@kingant.net>
parents: 3752
diff changeset
106 /* rxqueue.c */
07283934dedd [gaim-migrate @ 4133]
Mark Doliner <mark@kingant.net>
parents: 3752
diff changeset
107 faim_internal int aim_recv(int fd, void *buf, size_t count);
07283934dedd [gaim-migrate @ 4133]
Mark Doliner <mark@kingant.net>
parents: 3752
diff changeset
108 faim_internal int aim_bstream_recv(aim_bstream_t *bs, int fd, size_t count);
07283934dedd [gaim-migrate @ 4133]
Mark Doliner <mark@kingant.net>
parents: 3752
diff changeset
109 faim_internal void aim_rxqueue_cleanbyconn(aim_session_t *sess, aim_conn_t *conn);
07283934dedd [gaim-migrate @ 4133]
Mark Doliner <mark@kingant.net>
parents: 3752
diff changeset
110 faim_internal void aim_frame_destroy(aim_frame_t *);
07283934dedd [gaim-migrate @ 4133]
Mark Doliner <mark@kingant.net>
parents: 3752
diff changeset
111
07283934dedd [gaim-migrate @ 4133]
Mark Doliner <mark@kingant.net>
parents: 3752
diff changeset
112 /* txqueue.c */
07283934dedd [gaim-migrate @ 4133]
Mark Doliner <mark@kingant.net>
parents: 3752
diff changeset
113 faim_internal aim_frame_t *aim_tx_new(aim_session_t *sess, aim_conn_t *conn, fu8_t framing, fu16_t chan, int datalen);
07283934dedd [gaim-migrate @ 4133]
Mark Doliner <mark@kingant.net>
parents: 3752
diff changeset
114 faim_internal int aim_tx_enqueue(aim_session_t *, aim_frame_t *);
12428
9a0a6e74aafd [gaim-migrate @ 14735]
Richard Laager <rlaager@wiktel.com>
parents: 11285
diff changeset
115 faim_internal int aim_bstream_send(aim_bstream_t *bs, aim_conn_t *conn, size_t count);
3952
07283934dedd [gaim-migrate @ 4133]
Mark Doliner <mark@kingant.net>
parents: 3752
diff changeset
116 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
117 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
118
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
119 /*
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
120 * Generic SNAC structure. Rarely if ever used.
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
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
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
131
3952
07283934dedd [gaim-migrate @ 4133]
Mark Doliner <mark@kingant.net>
parents: 3752
diff changeset
132 /* snac.c */
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2086
diff changeset
133 faim_internal void aim_initsnachash(aim_session_t *sess);
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2086
diff changeset
134 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
135 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
136 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
137 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
138
2821
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2734
diff changeset
139 /* Stored in ->priv of the service request SNAC for chats. */
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2734
diff changeset
140 struct chatsnacinfo {
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2734
diff changeset
141 fu16_t exchange;
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2734
diff changeset
142 char name[128];
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2734
diff changeset
143 fu16_t instance;
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2734
diff changeset
144 };
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2734
diff changeset
145
11285
bcd7bd6a42dd [gaim-migrate @ 13482]
Mark Doliner <mark@kingant.net>
parents: 11253
diff changeset
146 /*
2270
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
147 * In SNACland, the terms 'family' and 'group' are synonymous -- the former
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
148 * is my term, the latter is AOL's.
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
149 */
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
150 struct snacgroup {
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
151 fu16_t group;
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
152 struct snacgroup *next;
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
153 };
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
154
2734
9fc65bb80596 [gaim-migrate @ 2747]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2717
diff changeset
155 #ifdef FAIM_NEED_CONN_INTERNAL
2675
e759254b29bb [gaim-migrate @ 2688]
Adam Fritzler <mid@auk.cx>
parents: 2672
diff changeset
156 struct snacpair {
e759254b29bb [gaim-migrate @ 2688]
Adam Fritzler <mid@auk.cx>
parents: 2672
diff changeset
157 fu16_t group;
e759254b29bb [gaim-migrate @ 2688]
Adam Fritzler <mid@auk.cx>
parents: 2672
diff changeset
158 fu16_t subtype;
e759254b29bb [gaim-migrate @ 2688]
Adam Fritzler <mid@auk.cx>
parents: 2672
diff changeset
159 struct snacpair *next;
e759254b29bb [gaim-migrate @ 2688]
Adam Fritzler <mid@auk.cx>
parents: 2672
diff changeset
160 };
e759254b29bb [gaim-migrate @ 2688]
Adam Fritzler <mid@auk.cx>
parents: 2672
diff changeset
161
e759254b29bb [gaim-migrate @ 2688]
Adam Fritzler <mid@auk.cx>
parents: 2672
diff changeset
162 struct rateclass {
e759254b29bb [gaim-migrate @ 2688]
Adam Fritzler <mid@auk.cx>
parents: 2672
diff changeset
163 fu16_t classid;
e759254b29bb [gaim-migrate @ 2688]
Adam Fritzler <mid@auk.cx>
parents: 2672
diff changeset
164 fu32_t windowsize;
e759254b29bb [gaim-migrate @ 2688]
Adam Fritzler <mid@auk.cx>
parents: 2672
diff changeset
165 fu32_t clear;
e759254b29bb [gaim-migrate @ 2688]
Adam Fritzler <mid@auk.cx>
parents: 2672
diff changeset
166 fu32_t alert;
e759254b29bb [gaim-migrate @ 2688]
Adam Fritzler <mid@auk.cx>
parents: 2672
diff changeset
167 fu32_t limit;
e759254b29bb [gaim-migrate @ 2688]
Adam Fritzler <mid@auk.cx>
parents: 2672
diff changeset
168 fu32_t disconnect;
e759254b29bb [gaim-migrate @ 2688]
Adam Fritzler <mid@auk.cx>
parents: 2672
diff changeset
169 fu32_t current;
e759254b29bb [gaim-migrate @ 2688]
Adam Fritzler <mid@auk.cx>
parents: 2672
diff changeset
170 fu32_t max;
e759254b29bb [gaim-migrate @ 2688]
Adam Fritzler <mid@auk.cx>
parents: 2672
diff changeset
171 fu8_t unknown[5]; /* only present in versions >= 3 */
e759254b29bb [gaim-migrate @ 2688]
Adam Fritzler <mid@auk.cx>
parents: 2672
diff changeset
172 struct snacpair *members;
e759254b29bb [gaim-migrate @ 2688]
Adam Fritzler <mid@auk.cx>
parents: 2672
diff changeset
173 struct rateclass *next;
e759254b29bb [gaim-migrate @ 2688]
Adam Fritzler <mid@auk.cx>
parents: 2672
diff changeset
174 };
2734
9fc65bb80596 [gaim-migrate @ 2747]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2717
diff changeset
175 #endif /* FAIM_NEED_CONN_INTERNAL */
2675
e759254b29bb [gaim-migrate @ 2688]
Adam Fritzler <mid@auk.cx>
parents: 2672
diff changeset
176
2270
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
177 /*
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
178 * 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
179 * outside of libfaim. It should remain that way. It's called data
11253
7d31d61e6438 [gaim-migrate @ 13422]
Mark Doliner <mark@kingant.net>
parents: 10990
diff changeset
180 * abstraction. Maybe you've heard of it. (Probably not if you're a
2270
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
181 * libfaim user.)
11253
7d31d61e6438 [gaim-migrate @ 13422]
Mark Doliner <mark@kingant.net>
parents: 10990
diff changeset
182 *
2270
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
183 */
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
184 typedef struct aim_conn_inside_s {
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
185 struct snacgroup *groups;
2675
e759254b29bb [gaim-migrate @ 2688]
Adam Fritzler <mid@auk.cx>
parents: 2672
diff changeset
186 struct rateclass *rates;
2270
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
187 } aim_conn_inside_t;
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
188
d82efea341ef [gaim-migrate @ 2280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2246
diff changeset
189 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
190
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2086
diff changeset
191 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
192 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
193 faim_internal aim_msgcookie_t *aim_mkcookie(fu8_t *, int, void *);
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2086
diff changeset
194 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
195 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
196 faim_internal int aim_msgcookie_gettype(int reqclass);
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2086
diff changeset
197 faim_internal int aim_cookie_free(aim_session_t *sess, aim_msgcookie_t *cookie);
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
198
7011
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
199 /* 0x0002 - locate.c */
4375bf2d9020 [gaim-migrate @ 7574]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
200 faim_internal void aim_locate_requestuserinfo(aim_session_t *sess, const char *sn);
7334
83e8faa7f6d5 [gaim-migrate @ 7922]
Mark Doliner <mark@kingant.net>
parents: 7011
diff changeset
201 faim_internal fu32_t aim_locate_getcaps(aim_session_t *sess, aim_bstream_t *bs, int len);
83e8faa7f6d5 [gaim-migrate @ 7922]
Mark Doliner <mark@kingant.net>
parents: 7011
diff changeset
202 faim_internal fu32_t aim_locate_getcaps_short(aim_session_t *sess, aim_bstream_t *bs, int len);
5836
09f7f23dc83a [gaim-migrate @ 6267]
Mark Doliner <mark@kingant.net>
parents: 4804
diff changeset
203 faim_internal void aim_info_free(aim_userinfo_t *);
09f7f23dc83a [gaim-migrate @ 6267]
Mark Doliner <mark@kingant.net>
parents: 4804
diff changeset
204 faim_internal int aim_info_extract(aim_session_t *sess, aim_bstream_t *bs, aim_userinfo_t *);
2421
95b4ec08abec [gaim-migrate @ 2434]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2270
diff changeset
205 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
206
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2086
diff changeset
207 faim_internal int aim_chat_readroominfo(aim_bstream_t *bs, struct aim_chat_roominfo *outinfo);
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
208
2821
9467e4ee81be [gaim-migrate @ 2834]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2734
diff changeset
209 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
210
2675
e759254b29bb [gaim-migrate @ 2688]
Adam Fritzler <mid@auk.cx>
parents: 2672
diff changeset
211 /* These are all handled internally now. */
e759254b29bb [gaim-migrate @ 2688]
Adam Fritzler <mid@auk.cx>
parents: 2672
diff changeset
212 faim_internal int aim_setversions(aim_session_t *sess, aim_conn_t *conn);
e759254b29bb [gaim-migrate @ 2688]
Adam Fritzler <mid@auk.cx>
parents: 2672
diff changeset
213 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
214 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
215 faim_internal int aim_rates_delparam(aim_session_t *, aim_conn_t *);
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
216
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
217 #endif /* __AIM_INTERNAL_H__ */
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
218 #endif /* FAIM_INTERNAL */