source: libfaim/stats.c @ 601733d

barnowl_perlaimdebianowlrelease-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since 601733d was e374dee, checked in by James M. Kretchmar <kretch@mit.edu>, 17 years ago
*** empty log message ***
  • Property mode set to 100644
File size: 938 bytes
Line 
1/*
2 * Family 0x000b - Statistics.
3 *
4 */
5
6#define FAIM_INTERNAL
7#include <aim.h>
8
9static int reportinterval(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs)
10{
11        int ret = 0;
12        aim_rxcallback_t userfunc;
13        fu16_t interval;
14
15        interval = aimbs_get16(bs);
16
17        if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype)))
18                ret = userfunc(sess, rx, interval);
19
20        return ret;
21}
22
23static 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 == 0x0002)
27                return reportinterval(sess, mod, rx, snac, bs);
28
29        return 0;
30}
31
32faim_internal int stats_modfirst(aim_session_t *sess, aim_module_t *mod)
33{
34
35        mod->family = 0x000b;
36        mod->version = 0x0001;
37        mod->toolid = 0x0104;
38        mod->toolversion = 0x0001;
39        mod->flags = 0;
40        strncpy(mod->name, "stats", sizeof(mod->name));
41        mod->snachandler = snachandler;
42
43        return 0;
44}
Note: See TracBrowser for help on using the repository browser.