annotate plugins/events.c @ 625:ea41ca1658b5

[gaim-migrate @ 635] close chat, close dialogs. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Mon, 07 Aug 2000 01:59:27 +0000
parents d7cdcd9e28f4
children 1823a4af82d3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
534
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1 /* tester.c
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
2 *
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
3 * test every callback, print to stdout
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
4 *
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
5 * by EWarmenhoven
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
6 *
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
7 * GPL and all that jazz
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
8 *
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
9 */
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
10
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
11 #define GAIM_PLUGINS
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
12 #include "gaim.h"
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
13
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
14 void one_arg(void *m)
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
15 {
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
16 printf("%d\n", m);
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
17 }
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
18
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
19 void two_arg(char *n, void *m)
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
20 {
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
21 printf("%d\n", m);
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
22 }
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
23
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
24 void three_arg(char *n, char *o, void *m)
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
25 {
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
26 printf("%d\n", m);
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
27 }
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
28
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
29 void four_arg(char *n, char *o, char *p, void *m)
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
30 {
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
31 printf("%d\n", m);
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
32 }
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
33
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
34 int gaim_plugin_init(void *h)
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
35 {
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
36 gaim_signal_connect(h, event_signon, one_arg, (void *)0);
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
37 gaim_signal_connect(h, event_signoff, one_arg, (void *)1);
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
38 gaim_signal_connect(h, event_away, one_arg, (void *)2);
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
39 gaim_signal_connect(h, event_back, one_arg, (void *)3);
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
40 gaim_signal_connect(h, event_im_recv, three_arg, (void *)4);
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
41 gaim_signal_connect(h, event_im_send, three_arg, (void *)5);
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
42 gaim_signal_connect(h, event_buddy_signon, two_arg, (void *)6);
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
43 gaim_signal_connect(h, event_buddy_signoff, two_arg, (void *)7);
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
44 gaim_signal_connect(h, event_buddy_away, two_arg, (void *)8);
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
45 gaim_signal_connect(h, event_buddy_back, two_arg, (void *)9);
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
46 gaim_signal_connect(h, event_blist_update, one_arg, (void *)10);
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
47 gaim_signal_connect(h, event_chat_invited, four_arg, (void *)11);
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
48 gaim_signal_connect(h, event_chat_join, two_arg, (void *)12);
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
49 gaim_signal_connect(h, event_chat_leave, two_arg, (void *)13);
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
50 gaim_signal_connect(h, event_chat_buddy_join, three_arg, (void *)14);
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
51 gaim_signal_connect(h, event_chat_buddy_leave, three_arg, (void *)15);
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
52 gaim_signal_connect(h, event_chat_recv, four_arg, (void *)16);
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
53 gaim_signal_connect(h, event_chat_send, three_arg, (void *)17);
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
54 gaim_signal_connect(h, event_warned, three_arg, (void *)18);
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
55 gaim_signal_connect(h, event_error, two_arg, (void *)19);
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
56 gaim_signal_connect(h, event_quit, one_arg, (void *)20);
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
57 }
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
58
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
59 char *name()
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
60 {
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
61 return "Event Test";
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
62 }
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
63
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
64 char *description()
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
65 {
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
66 return "Test to see that all events are working properly.";
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
67 }