Mercurial > pidgin.yaz
annotate plugins/events.c @ 988:9523b772e546
[gaim-migrate @ 998]
progress meters for signing in. UI should be changed but at least there's something there now
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Fri, 13 Oct 2000 19:56:11 +0000 |
parents | 9d61f3d01046 |
children | ece2d1543b20 |
rev | line source |
---|---|
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 | |
779
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
14 void evt_signon(void *data) |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
15 { |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
16 printf("event_signon\n"); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
17 } |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
18 |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
19 void evt_signoff(void *data) |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
20 { |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
21 printf("event_signoff\n"); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
22 } |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
23 |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
24 void evt_away(void *data) |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
25 { |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
26 printf("event_away\n"); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
27 } |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
28 |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
29 void evt_back(void *data) |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
30 { |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
31 printf("event_back\n"); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
32 } |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
33 |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
34 void evt_im_recv(char **who, char **what, void *data) |
534 | 35 { |
779
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
36 printf("event_im_recv: %s %s\n", *who, *what); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
37 } |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
38 |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
39 void evt_im_send(char *who, char **what, void *data) |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
40 { |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
41 printf("event_im_send: %s %s\n", who, *what); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
42 } |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
43 |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
44 void evt_buddy_signon(char *who, void *data) |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
45 { |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
46 printf("event_buddy_signon: %s\n", who); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
47 } |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
48 |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
49 void evt_buddy_signoff(char *who, void *data) |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
50 { |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
51 printf("event_buddy_signoff: %s\n", who); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
52 } |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
53 |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
54 void evt_buddy_away(char *who, void *data) |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
55 { |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
56 printf("event_buddy_away: %s\n", who); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
57 } |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
58 |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
59 void evt_buddy_back(char *who, void *data) |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
60 { |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
61 printf("event_buddy_back: %s\n", who); |
534 | 62 } |
63 | |
779
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
64 void evt_blist_update(void *data) |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
65 { |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
66 printf("event_blist_update\n"); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
67 } |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
68 |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
69 void evt_chat_invited(char *who, char *room, char *message, void *data) |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
70 { |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
71 printf("event_chat_invited: %s %s %s\n", who, room, message); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
72 } |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
73 |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
74 void evt_chat_join(char *room, void *data) |
534 | 75 { |
779
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
76 printf("event_chat_join: %s\n", room); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
77 } |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
78 |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
79 void evt_chat_leave(char *room, void *data) |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
80 { |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
81 printf("event_chat_leave: %s\n", room); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
82 } |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
83 |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
84 void evt_chat_buddy_join(char *room, char *who, void *data) |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
85 { |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
86 printf("event_chat_buddy_join: %s %s\n", room, who); |
534 | 87 } |
88 | |
779
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
89 void evt_chat_buddy_leave(char *room, char *who, void *data) |
534 | 90 { |
779
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
91 printf("event_chat_buddy_leave: %s %s\n", room, who); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
92 } |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
93 |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
94 void evt_chat_recv(char *room, char *who, char *text, void *data) |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
95 { |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
96 printf("event_chat_recv: %s %s %s\n", room, who, text); |
534 | 97 } |
98 | |
779
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
99 void evt_chat_send(char *room, char **what, void *data) |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
100 { |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
101 printf("event_chat_send: %s %s\n", room, *what); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
102 } |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
103 |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
104 void evt_warned(char *who, int level, void *data) |
534 | 105 { |
779
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
106 printf("event_warned: %s %d\n", who, level); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
107 } |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
108 |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
109 void evt_error(int error, void *data) |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
110 { |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
111 printf("event_error: %d\n", error); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
112 } |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
113 |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
114 void evt_quit(void *data) |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
115 { |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
116 printf("event_quit\n"); |
534 | 117 } |
118 | |
808
9d61f3d01046
[gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
779
diff
changeset
|
119 void evt_new_conversation(char *who, void *data) |
9d61f3d01046
[gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
779
diff
changeset
|
120 { |
9d61f3d01046
[gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
779
diff
changeset
|
121 printf("event_new_conversation: %s\n", who); |
9d61f3d01046
[gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
779
diff
changeset
|
122 } |
9d61f3d01046
[gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
779
diff
changeset
|
123 |
534 | 124 int gaim_plugin_init(void *h) |
125 { | |
779
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
126 gaim_signal_connect(h, event_signon, evt_signon, NULL); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
127 gaim_signal_connect(h, event_signoff, evt_signoff, NULL); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
128 gaim_signal_connect(h, event_away, evt_away, NULL); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
129 gaim_signal_connect(h, event_back, evt_back, NULL); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
130 gaim_signal_connect(h, event_im_recv, evt_im_recv, NULL); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
131 gaim_signal_connect(h, event_im_send, evt_im_send, NULL); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
132 gaim_signal_connect(h, event_buddy_signon, evt_buddy_signon, NULL); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
133 gaim_signal_connect(h, event_buddy_signoff, evt_buddy_signoff, NULL); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
134 gaim_signal_connect(h, event_buddy_away, evt_buddy_away, NULL); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
135 gaim_signal_connect(h, event_buddy_back, evt_buddy_back, NULL); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
136 gaim_signal_connect(h, event_blist_update, evt_blist_update, NULL); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
137 gaim_signal_connect(h, event_chat_invited, evt_chat_invited, NULL); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
138 gaim_signal_connect(h, event_chat_join, evt_chat_join, NULL); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
139 gaim_signal_connect(h, event_chat_leave, evt_chat_leave, NULL); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
140 gaim_signal_connect(h, event_chat_buddy_join, evt_chat_buddy_join, NULL); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
141 gaim_signal_connect(h, event_chat_buddy_leave, evt_chat_buddy_leave, NULL); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
142 gaim_signal_connect(h, event_chat_recv, evt_chat_recv, NULL); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
143 gaim_signal_connect(h, event_chat_send, evt_chat_send, NULL); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
144 gaim_signal_connect(h, event_warned, evt_warned, NULL); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
145 gaim_signal_connect(h, event_error, evt_error, NULL); |
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
146 gaim_signal_connect(h, event_quit, evt_quit, NULL); |
808
9d61f3d01046
[gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
779
diff
changeset
|
147 gaim_signal_connect(h, event_new_conversation, evt_new_conversation, NULL); |
779
1823a4af82d3
[gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
534
diff
changeset
|
148 return 0; |
534 | 149 } |
150 | |
151 char *name() | |
152 { | |
153 return "Event Test"; | |
154 } | |
155 | |
156 char *description() | |
157 { | |
158 return "Test to see that all events are working properly."; | |
159 } |