]> andersk Git - libfaim.git/blob - src/stats.c
- Sun Oct 14 19:45:54 PDT 2001
[libfaim.git] / src / stats.c
1
2 #define FAIM_INTERNAL
3 #include <aim.h>
4
5 static int reportinterval(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs)
6 {
7         fu16_t interval;
8         aim_rxcallback_t userfunc;
9
10         interval = aimbs_get16(bs);
11
12         if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype)))
13                 return userfunc(sess, rx, interval);
14
15         return 0;
16 }
17
18 static int snachandler(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs)
19 {
20
21         if (snac->subtype == 0x0002)
22                 return reportinterval(sess, mod, rx, snac, bs);
23
24         return 0;
25 }
26
27 faim_internal int stats_modfirst(aim_session_t *sess, aim_module_t *mod)
28 {
29
30         mod->family = 0x000b;
31         mod->version = 0x0000;
32         mod->flags = 0;
33         strncpy(mod->name, "stats", sizeof(mod->name));
34         mod->snachandler = snachandler;
35
36         return 0;
37 }
This page took 0.037943 seconds and 5 git commands to generate.