source: protocols/oscar/stats.c @ 0b9daac

Last change on this file since 0b9daac was 0b9daac, checked in by dequis <dx@…>, at 2015-02-20T23:16:08Z

Reorganize include files to avoid conflicts with other libs

  • Change all header includes to be relative to the project root
  • Remove -I${includedir} from bitlbee.pc Cflags
  • Install lib and protocols headers to their own directories. So now it is:

/usr/include/bitlbee/*.h
/usr/include/bitlbee/lib/*.h
/usr/include/bitlbee/protocols/*.h

This breaks backwards compatibility of third party plugins, but now
they don't have to do ambiguous includes like #include <proxy.h>

This also fixes trac ticket 1170 - conflicts when libproxy and liboauth
are installed at the same time bitlbee is built, which the macports
project ran into several times.

  • Property mode set to 100644
File size: 883 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,
5                          aim_bstream_t *bs)
6{
7        guint16 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
16        return 0;
17}
18
19static int snachandler(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs)
20{
21
22        if (snac->subtype == 0x0002) {
23                return reportinterval(sess, mod, rx, snac, bs);
24        }
25
26        return 0;
27}
28
29int stats_modfirst(aim_session_t *sess, aim_module_t *mod)
30{
31
32        mod->family = 0x000b;
33        mod->version = 0x0001;
34        mod->toolid = 0x0104;
35        mod->toolversion = 0x0001;
36        mod->flags = 0;
37        strncpy(mod->name, "stats", sizeof(mod->name));
38        mod->snachandler = snachandler;
39
40        return 0;
41}
Note: See TracBrowser for help on using the repository browser.