source: libfaim/stats.c @ f4d0975

barnowl_perlaimdebianowlrelease-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since f4d0975 was 862371b, checked in by James M. Kretchmar <kretch@mit.edu>, 21 years ago
*** empty log message ***
  • Property mode set to 100644
File size: 923 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        fu16_t interval;
12        aim_rxcallback_t userfunc;
13
14        interval = aimbs_get16(bs);
15
16        if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype)))
17                return userfunc(sess, rx, interval);
18
19        return 0;
20}
21
22static int snachandler(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs)
23{
24
25        if (snac->subtype == 0x0002)
26                return reportinterval(sess, mod, rx, snac, bs);
27
28        return 0;
29}
30
31faim_internal int stats_modfirst(aim_session_t *sess, aim_module_t *mod)
32{
33
34        mod->family = 0x000b;
35        mod->version = 0x0001;
36        mod->toolid = 0x0104;
37        mod->toolversion = 0x0001;
38        mod->flags = 0;
39        strncpy(mod->name, "stats", sizeof(mod->name));
40        mod->snachandler = snachandler;
41
42        return 0;
43}
Note: See TracBrowser for help on using the repository browser.