2703
|
1 /*
|
|
2 * Encapsulated ICQ.
|
|
3 *
|
|
4 */
|
|
5
|
|
6 #define FAIM_INTERNAL
|
|
7 #include <aim.h>
|
|
8
|
|
9 /*
|
|
10 * Response to 15/2, contains an ICQ packet.
|
|
11 */
|
|
12 static int icqresponse(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs)
|
|
13 {
|
|
14 int ret = 0;
|
|
15 aim_rxcallback_t userfunc;
|
|
16
|
|
17 if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype)))
|
|
18 ret = userfunc(sess, rx);
|
|
19
|
|
20 return ret;
|
|
21 }
|
|
22
|
|
23 static int snachandler(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs)
|
|
24 {
|
|
25
|
|
26 if (snac->subtype == 0x0003)
|
|
27 return icqresponse(sess, mod, rx, snac, bs);
|
|
28
|
|
29 return 0;
|
|
30 }
|
|
31
|
|
32 faim_internal int icq_modfirst(aim_session_t *sess, aim_module_t *mod)
|
|
33 {
|
|
34
|
|
35 mod->family = 0x0015;
|
|
36 mod->version = 0x0001;
|
|
37 mod->toolid = 0x0110;
|
|
38 mod->toolversion = 0x047b;
|
|
39 mod->flags = 0;
|
|
40 strncpy(mod->name, "icq", sizeof(mod->name));
|
|
41 mod->snachandler = snachandler;
|
|
42
|
|
43 return 0;
|
|
44 }
|
|
45
|
|
46
|