534
|
1 /* tester.c
|
|
2 *
|
|
3 * test every callback, print to stdout
|
|
4 *
|
|
5 * by EWarmenhoven
|
|
6 *
|
|
7 * GPL and all that jazz
|
|
8 *
|
|
9 */
|
|
10
|
|
11 #define GAIM_PLUGINS
|
|
12 #include "gaim.h"
|
|
13
|
|
14 void one_arg(void *m)
|
|
15 {
|
|
16 printf("%d\n", m);
|
|
17 }
|
|
18
|
|
19 void two_arg(char *n, void *m)
|
|
20 {
|
|
21 printf("%d\n", m);
|
|
22 }
|
|
23
|
|
24 void three_arg(char *n, char *o, void *m)
|
|
25 {
|
|
26 printf("%d\n", m);
|
|
27 }
|
|
28
|
|
29 void four_arg(char *n, char *o, char *p, void *m)
|
|
30 {
|
|
31 printf("%d\n", m);
|
|
32 }
|
|
33
|
|
34 int gaim_plugin_init(void *h)
|
|
35 {
|
|
36 gaim_signal_connect(h, event_signon, one_arg, (void *)0);
|
|
37 gaim_signal_connect(h, event_signoff, one_arg, (void *)1);
|
|
38 gaim_signal_connect(h, event_away, one_arg, (void *)2);
|
|
39 gaim_signal_connect(h, event_back, one_arg, (void *)3);
|
|
40 gaim_signal_connect(h, event_im_recv, three_arg, (void *)4);
|
|
41 gaim_signal_connect(h, event_im_send, three_arg, (void *)5);
|
|
42 gaim_signal_connect(h, event_buddy_signon, two_arg, (void *)6);
|
|
43 gaim_signal_connect(h, event_buddy_signoff, two_arg, (void *)7);
|
|
44 gaim_signal_connect(h, event_buddy_away, two_arg, (void *)8);
|
|
45 gaim_signal_connect(h, event_buddy_back, two_arg, (void *)9);
|
|
46 gaim_signal_connect(h, event_blist_update, one_arg, (void *)10);
|
|
47 gaim_signal_connect(h, event_chat_invited, four_arg, (void *)11);
|
|
48 gaim_signal_connect(h, event_chat_join, two_arg, (void *)12);
|
|
49 gaim_signal_connect(h, event_chat_leave, two_arg, (void *)13);
|
|
50 gaim_signal_connect(h, event_chat_buddy_join, three_arg, (void *)14);
|
|
51 gaim_signal_connect(h, event_chat_buddy_leave, three_arg, (void *)15);
|
|
52 gaim_signal_connect(h, event_chat_recv, four_arg, (void *)16);
|
|
53 gaim_signal_connect(h, event_chat_send, three_arg, (void *)17);
|
|
54 gaim_signal_connect(h, event_warned, three_arg, (void *)18);
|
|
55 gaim_signal_connect(h, event_error, two_arg, (void *)19);
|
|
56 gaim_signal_connect(h, event_quit, one_arg, (void *)20);
|
|
57 }
|
|
58
|
|
59 char *name()
|
|
60 {
|
|
61 return "Event Test";
|
|
62 }
|
|
63
|
|
64 char *description()
|
|
65 {
|
|
66 return "Test to see that all events are working properly.";
|
|
67 }
|