source: protocols/oscar/stats.c @ 9186d15

Last change on this file since 9186d15 was b7d3cc34, checked in by Wilmer van der Gaast <wilmer@…>, at 2005-11-06T18:23:18Z

Initial repository (0.99 release tree)

  • Property mode set to 100644
File size: 847 bytes
Line 
1
2#include <aim.h>
3
4static int reportinterval(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs)
5{
6        guint16 interval;
7        aim_rxcallback_t userfunc;
8
9        interval = aimbs_get16(bs);
10
11        if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype)))
12                return userfunc(sess, rx, interval);
13
14        return 0;
15}
16
17static int snachandler(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs)
18{
19
20        if (snac->subtype == 0x0002)
21                return reportinterval(sess, mod, rx, snac, bs);
22
23        return 0;
24}
25
26int stats_modfirst(aim_session_t *sess, aim_module_t *mod)
27{
28
29        mod->family = 0x000b;
30        mod->version = 0x0001;
31        mod->toolid = 0x0104;
32        mod->toolversion = 0x0001;
33        mod->flags = 0;
34        strncpy(mod->name, "stats", sizeof(mod->name));
35        mod->snachandler = snachandler;
36
37        return 0;
38}
Note: See TracBrowser for help on using the repository browser.