barnowl_perlaimdebianowlrelease-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change
on this file since 987cf3f was
e374dee,
checked in by James M. Kretchmar <kretch@mit.edu>, 21 years ago
|
*** empty log message ***
|
-
Property mode set to
100644
|
File size:
938 bytes
|
Rev | Line | |
---|
[862371b] | 1 | /* |
---|
| 2 | * Family 0x000b - Statistics. |
---|
| 3 | * |
---|
| 4 | */ |
---|
[5e53c4a] | 5 | |
---|
| 6 | #define FAIM_INTERNAL |
---|
| 7 | #include <aim.h> |
---|
| 8 | |
---|
| 9 | static int reportinterval(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) |
---|
| 10 | { |
---|
[e374dee] | 11 | int ret = 0; |
---|
[5e53c4a] | 12 | aim_rxcallback_t userfunc; |
---|
[e374dee] | 13 | fu16_t interval; |
---|
[5e53c4a] | 14 | |
---|
| 15 | interval = aimbs_get16(bs); |
---|
| 16 | |
---|
| 17 | if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) |
---|
[e374dee] | 18 | ret = userfunc(sess, rx, interval); |
---|
[5e53c4a] | 19 | |
---|
[e374dee] | 20 | return ret; |
---|
[5e53c4a] | 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 == 0x0002) |
---|
| 27 | return reportinterval(sess, mod, rx, snac, bs); |
---|
| 28 | |
---|
| 29 | return 0; |
---|
| 30 | } |
---|
| 31 | |
---|
| 32 | faim_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.