Mercurial > pidgin
annotate plugins/signals-test.c @ 11356:0b746a52238d
[gaim-migrate @ 13578]
DBus service directory detection broke the build process on systems without DBus. Fixed.
committer: Tailor Script <tailor@pidgin.im>
author | Piotr Zielinski <zielaj> |
---|---|
date | Sun, 28 Aug 2005 21:43:47 +0000 |
parents | 920a37a4c1be |
children | 201617d49573 |
rev | line source |
---|---|
6485 | 1 /* |
2 * Signals test plugin. | |
3 * | |
4 * Copyright (C) 2003 Christian Hammond. | |
5 * | |
6 * This program is free software; you can redistribute it and/or | |
7 * modify it under the terms of the GNU General Public License as | |
8 * published by the Free Software Foundation; either version 2 of the | |
9 * License, or (at your option) any later version. | |
10 * | |
11 * This program is distributed in the hope that it will be useful, but | |
12 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 * General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU General Public License | |
17 * along with this program; if not, write to the Free Software | |
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
19 * 02111-1307, USA. | |
20 */ | |
21 #define SIGNAL_TEST_PLUGIN_ID "core-signals-test" | |
22 | |
23 #include <stdio.h> | |
24 | |
25 #include "internal.h" | |
10684
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
26 #include "cipher.h" |
6485 | 27 #include "connection.h" |
28 #include "conversation.h" | |
29 #include "core.h" | |
30 #include "debug.h" | |
11281
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
31 #include "ft.h" |
6485 | 32 #include "signals.h" |
9954 | 33 #include "version.h" |
6485 | 34 |
35 /************************************************************************** | |
36 * Account subsystem signal callbacks | |
37 **************************************************************************/ | |
38 static void | |
39 account_connecting_cb(GaimAccount *account, void *data) | |
40 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
41 gaim_debug_misc("signals test", "account-connecting (%s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
42 gaim_account_get_username(account)); |
6485 | 43 } |
44 | |
45 static void | |
46 account_away_cb(GaimAccount *account, const char *state, | |
47 const char *message, void *data) | |
48 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
49 gaim_debug_misc("signals test", "account-away (%s, %s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
50 gaim_account_get_username(account), state, message); |
6485 | 51 } |
52 | |
53 static void | |
54 account_setting_info_cb(GaimAccount *account, const char *info, void *data) | |
55 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
56 gaim_debug_misc("signals test", "account-setting-info (%s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
57 gaim_account_get_username(account), info); |
6485 | 58 } |
59 | |
60 static void | |
61 account_set_info_cb(GaimAccount *account, const char *info, void *data) | |
62 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
63 gaim_debug_misc("signals test", "account-set-info (%s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
64 gaim_account_get_username(account), info); |
6485 | 65 } |
66 | |
67 static void | |
68 account_warned_cb(GaimAccount *account, const char *warner, int level, | |
69 void *data) | |
70 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
71 gaim_debug_misc("signals test", "account-warned (%s, %s, %d)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
72 gaim_account_get_username(account), warner, level); |
6485 | 73 } |
74 | |
75 /************************************************************************** | |
10934 | 76 * Buddy Icons signal callbacks |
77 **************************************************************************/ | |
78 static void | |
79 buddy_icon_cached_cb(GaimBuddyIcon *icon, GaimBuddy *buddy, | |
80 const char *filename, const char *old_icon) | |
81 { | |
82 gaim_debug_misc("signals test", "buddy icon cached (%s, %s, %s)\n", | |
83 gaim_buddy_get_name(buddy), filename, old_icon); | |
84 } | |
85 | |
86 /************************************************************************** | |
6485 | 87 * Buddy List subsystem signal callbacks |
88 **************************************************************************/ | |
89 static void | |
7009
d77e99c55b40
[gaim-migrate @ 7568]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
90 buddy_away_cb(GaimBuddy *buddy, void *data) |
6485 | 91 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
92 gaim_debug_misc("signals test", "buddy-away (%s)\n", buddy->name); |
6485 | 93 } |
94 | |
95 static void | |
7009
d77e99c55b40
[gaim-migrate @ 7568]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
96 buddy_back_cb(GaimBuddy *buddy, void *data) |
6485 | 97 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
98 gaim_debug_misc("signals test", "buddy-back (%s)\n", buddy->name); |
6485 | 99 } |
100 | |
101 static void | |
7009
d77e99c55b40
[gaim-migrate @ 7568]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
102 buddy_idle_cb(GaimBuddy *buddy, void *data) |
6485 | 103 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
104 gaim_debug_misc("signals test", "buddy-idle (%s)\n", buddy->name); |
6485 | 105 } |
106 | |
107 static void | |
7009
d77e99c55b40
[gaim-migrate @ 7568]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
108 buddy_unidle_cb(GaimBuddy *buddy, void *data) |
6485 | 109 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
110 gaim_debug_misc("signals test", "buddy-unidle (%s)\n", buddy->name); |
6485 | 111 } |
112 | |
113 static void | |
7009
d77e99c55b40
[gaim-migrate @ 7568]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
114 buddy_signed_on_cb(GaimBuddy *buddy, void *data) |
6485 | 115 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
116 gaim_debug_misc("signals test", "buddy-signed-on (%s)\n", buddy->name); |
6485 | 117 } |
118 | |
119 static void | |
7009
d77e99c55b40
[gaim-migrate @ 7568]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
120 buddy_signed_off_cb(GaimBuddy *buddy, void *data) |
6485 | 121 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
122 gaim_debug_misc("signals test", "buddy-signed-off (%s)\n", buddy->name); |
6485 | 123 } |
124 | |
8999 | 125 static void |
9051 | 126 blist_node_extended_menu_cb(GaimBlistNode *node, void *data) |
8999 | 127 { |
9051 | 128 GaimContact *p = (GaimContact *)node; |
129 GaimBuddy *b = (GaimBuddy *)node; | |
130 GaimChat *c = (GaimChat *)node; | |
131 GaimGroup *g = (GaimGroup *)node; | |
8999 | 132 |
9051 | 133 if (GAIM_BLIST_NODE_IS_CONTACT(node)) |
134 gaim_debug_misc("signals test", "blist-node-extended-menu (Contact: %s)\n", p->alias); | |
135 else if (GAIM_BLIST_NODE_IS_BUDDY(node)) | |
136 gaim_debug_misc("signals test", "blist-node-extended-menu (Buddy: %s)\n", b->name); | |
137 else if (GAIM_BLIST_NODE_IS_CHAT(node)) | |
138 gaim_debug_misc("signals test", "blist-node-extended-menu (Chat: %s)\n", c->alias); | |
139 else if (GAIM_BLIST_NODE_IS_GROUP(node)) | |
140 gaim_debug_misc("signals test", "blist-node-extended-menu (Group: %s)\n", g->name); | |
141 else | |
142 gaim_debug_misc("signals test", "blist-node-extended-menu (UNKNOWN: %d)\n", node->type); | |
143 | |
8999 | 144 } |
145 | |
146 | |
6485 | 147 /************************************************************************** |
148 * Connection subsystem signal callbacks | |
149 **************************************************************************/ | |
150 static void | |
151 signing_on_cb(GaimConnection *gc, void *data) | |
152 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
153 gaim_debug_misc("signals test", "signing-on (%s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
154 gaim_account_get_username(gaim_connection_get_account(gc))); |
6485 | 155 } |
156 | |
157 static void | |
158 signed_on_cb(GaimConnection *gc, void *data) | |
159 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
160 gaim_debug_misc("signals test", "signed-on (%s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
161 gaim_account_get_username(gaim_connection_get_account(gc))); |
6485 | 162 } |
163 | |
164 static void | |
165 signing_off_cb(GaimConnection *gc, void *data) | |
166 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
167 gaim_debug_misc("signals test", "signing-off (%s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
168 gaim_account_get_username(gaim_connection_get_account(gc))); |
6485 | 169 } |
170 | |
171 static void | |
172 signed_off_cb(GaimConnection *gc, void *data) | |
173 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
174 gaim_debug_misc("signals test", "signed-off (%s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
175 gaim_account_get_username(gaim_connection_get_account(gc))); |
6485 | 176 } |
177 | |
178 /************************************************************************** | |
179 * Conversation subsystem signal callbacks | |
180 **************************************************************************/ | |
181 static gboolean | |
7503 | 182 displaying_im_msg_cb(GaimAccount *account, GaimConversation *conv, |
183 char **buffer, void *data) | |
6485 | 184 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
185 gaim_debug_misc("signals test", "displaying-im-msg (%s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
186 gaim_conversation_get_name(conv), *buffer); |
6485 | 187 |
188 return FALSE; | |
189 } | |
190 | |
191 static void | |
9051 | 192 displayed_im_msg_cb(GaimAccount *account, GaimConversation *conv, const char *buffer, void *data) |
6485 | 193 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
194 gaim_debug_misc("signals test", "displayed-im-msg (%s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
195 gaim_conversation_get_name(conv), buffer); |
6485 | 196 } |
197 | |
9051 | 198 static gboolean |
199 writing_im_msg_cb(GaimAccount *account, GaimConversation *conv, char **buffer, void *data) | |
200 { | |
201 gaim_debug_misc("signals test", "writing-im-msg (%s, %s, %s)\n", | |
202 gaim_account_get_username(account), gaim_conversation_get_name(conv), *buffer); | |
203 | |
204 return FALSE; | |
205 | |
206 } | |
207 | |
208 static void | |
209 wrote_im_msg_cb(GaimAccount *account, GaimConversation *conv, const char *buffer, void *data) | |
210 { | |
211 gaim_debug_misc("signals test", "wrote-im-msg (%s, %s, %s)\n", | |
212 gaim_account_get_username(account), gaim_conversation_get_name(conv), buffer); | |
213 } | |
214 | |
7503 | 215 static void |
6509 | 216 sending_im_msg_cb(GaimAccount *account, char *recipient, char **buffer, void *data) |
6485 | 217 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
218 gaim_debug_misc("signals test", "sending-im-msg (%s, %s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
219 gaim_account_get_username(account), recipient, *buffer); |
6485 | 220 |
221 } | |
222 | |
223 static void | |
6509 | 224 sent_im_msg_cb(GaimAccount *account, const char *recipient, const char *buffer, void *data) |
6485 | 225 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
226 gaim_debug_misc("signals test", "sent-im-msg (%s, %s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
227 gaim_account_get_username(account), recipient, buffer); |
6485 | 228 } |
229 | |
230 static gboolean | |
8999 | 231 receiving_im_msg_cb(GaimAccount *account, char **sender, char **buffer, |
10104 | 232 GaimConversation *conv, int *flags, void *data) |
6485 | 233 { |
10104 | 234 gaim_debug_misc("signals test", "receiving-im-msg (%s, %s, %s, %s, %d)\n", |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
235 gaim_account_get_username(account), *sender, *buffer, |
10104 | 236 gaim_conversation_get_name(conv), *flags); |
6485 | 237 |
238 return FALSE; | |
239 } | |
240 | |
8999 | 241 static void |
242 received_im_msg_cb(GaimAccount *account, char *sender, char *buffer, | |
10104 | 243 GaimConversation *conv, int flags, void *data) |
8999 | 244 { |
10104 | 245 gaim_debug_misc("signals test", "received-im-msg (%s, %s, %s, %s, %d)\n", |
8999 | 246 gaim_account_get_username(account), sender, buffer, |
10104 | 247 gaim_conversation_get_name(conv), flags); |
8999 | 248 } |
249 | |
6485 | 250 static gboolean |
7503 | 251 displaying_chat_msg_cb(GaimAccount *account, GaimConversation *conv, |
252 char **buffer, void *data) | |
6485 | 253 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
254 gaim_debug_misc("signals test", "displaying-chat-msg (%s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
255 gaim_conversation_get_name(conv), *buffer); |
6485 | 256 |
6486
fab81e4b885c
[gaim-migrate @ 7000]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
257 return FALSE; |
6485 | 258 } |
259 | |
260 static void | |
9051 | 261 displayed_chat_msg_cb(GaimAccount *account, GaimConversation *conv, const char *buffer, void *data) |
6485 | 262 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
263 gaim_debug_misc("signals test", "displayed-chat-msg (%s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
264 gaim_conversation_get_name(conv), buffer); |
6485 | 265 } |
266 | |
267 static gboolean | |
9051 | 268 writing_chat_msg_cb(GaimAccount *account, GaimConversation *conv, |
269 char **buffer, void *data) | |
270 { | |
271 gaim_debug_misc("signals test", "writing-chat-msg (%s, %s)\n", | |
272 gaim_conversation_get_name(conv), *buffer); | |
273 | |
274 return FALSE; | |
275 } | |
276 | |
277 static void | |
278 wrote_chat_msg_cb(GaimAccount *account, GaimConversation *conv, const char *buffer, void *data) | |
279 { | |
280 gaim_debug_misc("signals test", "wrote-chat-msg (%s, %s)\n", | |
281 gaim_conversation_get_name(conv), buffer); | |
282 } | |
283 | |
284 static gboolean | |
6509 | 285 sending_chat_msg_cb(GaimAccount *account, char **buffer, int id, void *data) |
6485 | 286 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
287 gaim_debug_misc("signals test", "sending-chat-msg (%s, %s, %d)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
288 gaim_account_get_username(account), *buffer, id); |
6485 | 289 |
290 return FALSE; | |
291 } | |
292 | |
293 static void | |
6509 | 294 sent_chat_msg_cb(GaimAccount *account, const char *buffer, int id, void *data) |
6485 | 295 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
296 gaim_debug_misc("signals test", "sent-chat-msg (%s, %s, %d)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
297 gaim_account_get_username(account), buffer, id); |
6485 | 298 } |
299 | |
300 static gboolean | |
8999 | 301 receiving_chat_msg_cb(GaimAccount *account, char **sender, char **buffer, |
10104 | 302 GaimConversation *chat, int *flags, void *data) |
6485 | 303 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
304 gaim_debug_misc("signals test", |
10104 | 305 "receiving-chat-msg (%s, %s, %s, %s, %d)\n", |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
306 gaim_account_get_username(account), *sender, *buffer, |
10104 | 307 gaim_conversation_get_name(chat), *flags); |
6485 | 308 |
309 return FALSE; | |
310 } | |
311 | |
312 static void | |
8999 | 313 received_chat_msg_cb(GaimAccount *account, char *sender, char *buffer, |
10104 | 314 GaimConversation *chat, int flags, void *data) |
8999 | 315 { |
316 gaim_debug_misc("signals test", | |
10104 | 317 "received-chat-msg (%s, %s, %s, %s, %d)\n", |
8999 | 318 gaim_account_get_username(account), sender, buffer, |
10104 | 319 gaim_conversation_get_name(chat), flags); |
8999 | 320 } |
321 | |
322 static void | |
6485 | 323 conversation_switching_cb(GaimConversation *old_conv, |
324 GaimConversation *new_conv, void *data) | |
325 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
326 gaim_debug_misc("signals test", "conversation-switching (%s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
327 gaim_conversation_get_name(old_conv), |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
328 gaim_conversation_get_name(new_conv)); |
6485 | 329 } |
330 | |
331 static void | |
332 conversation_switched_cb(GaimConversation *old_conv, | |
333 GaimConversation *new_conv, void *data) | |
334 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
335 gaim_debug_misc("signals test", "conversation-switched (%s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
336 gaim_conversation_get_name(old_conv), |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
337 gaim_conversation_get_name(new_conv)); |
6485 | 338 } |
339 | |
340 static void | |
341 conversation_created_cb(GaimConversation *conv, void *data) | |
342 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
343 gaim_debug_misc("signals test", "conversation-created (%s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
344 gaim_conversation_get_name(conv)); |
6485 | 345 } |
346 | |
347 static void | |
348 deleting_conversation_cb(GaimConversation *conv, void *data) | |
349 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
350 gaim_debug_misc("signals test", "deleting-conversation (%s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
351 gaim_conversation_get_name(conv)); |
6485 | 352 } |
353 | |
354 static void | |
355 buddy_typing_cb(GaimConversation *conv, void *data) | |
356 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
357 gaim_debug_misc("signals test", "buddy-typing (%s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
358 gaim_conversation_get_name(conv)); |
6485 | 359 } |
360 | |
9587 | 361 static gboolean |
9554 | 362 chat_buddy_joining_cb(GaimConversation *conv, const char *user, |
363 GaimConvChatBuddyFlags flags, void *data) | |
6485 | 364 { |
9554 | 365 gaim_debug_misc("signals test", "chat-buddy-joining (%s, %s, %d)\n", |
366 gaim_conversation_get_name(conv), user, flags); | |
9587 | 367 |
368 return FALSE; | |
6485 | 369 } |
370 | |
371 static void | |
9554 | 372 chat_buddy_joined_cb(GaimConversation *conv, const char *user, |
373 GaimConvChatBuddyFlags flags, void *data) | |
6485 | 374 { |
9554 | 375 gaim_debug_misc("signals test", "chat-buddy-joined (%s, %s, %d)\n", |
376 gaim_conversation_get_name(conv), user, flags); | |
377 } | |
378 | |
379 static void | |
380 chat_buddy_flags_cb(GaimConversation *conv, const char *user, | |
381 GaimConvChatBuddyFlags oldflags, GaimConvChatBuddyFlags newflags, void *data) | |
382 { | |
383 gaim_debug_misc("signals test", "chat-buddy-flags (%s, %s, %d, %d)\n", | |
384 gaim_conversation_get_name(conv), user, oldflags, newflags); | |
6485 | 385 } |
386 | |
9587 | 387 static gboolean |
6485 | 388 chat_buddy_leaving_cb(GaimConversation *conv, const char *user, |
389 const char *reason, void *data) | |
390 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
391 gaim_debug_misc("signals test", "chat-buddy-leaving (%s, %s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
392 gaim_conversation_get_name(conv), user, reason); |
9587 | 393 |
394 return FALSE; | |
6485 | 395 } |
396 | |
397 static void | |
398 chat_buddy_left_cb(GaimConversation *conv, const char *user, | |
399 const char *reason, void *data) | |
400 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
401 gaim_debug_misc("signals test", "chat-buddy-left (%s, %s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
402 gaim_conversation_get_name(conv), user, reason); |
6485 | 403 } |
404 | |
405 static void | |
406 chat_inviting_user_cb(GaimConversation *conv, const char *name, | |
9554 | 407 char **reason, void *data) |
6485 | 408 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
409 gaim_debug_misc("signals test", "chat-inviting-user (%s, %s, %s)\n", |
9554 | 410 gaim_conversation_get_name(conv), name, *reason); |
6485 | 411 } |
412 | |
413 static void | |
414 chat_invited_user_cb(GaimConversation *conv, const char *name, | |
415 const char *reason, void *data) | |
416 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
417 gaim_debug_misc("signals test", "chat-invited-user (%s, %s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
418 gaim_conversation_get_name(conv), name, reason); |
6485 | 419 } |
420 | |
11064
e4459e8ccfb5
[gaim-migrate @ 13035]
Richard Laager <rlaager@wiktel.com>
parents:
11033
diff
changeset
|
421 static gint |
6485 | 422 chat_invited_cb(GaimAccount *account, const char *inviter, |
9514 | 423 const char *room_name, const char *message, |
424 const GHashTable *components, void *data) | |
6485 | 425 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
426 gaim_debug_misc("signals test", "chat-invited (%s, %s, %s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
427 gaim_account_get_username(account), inviter, |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
428 room_name, message); |
11064
e4459e8ccfb5
[gaim-migrate @ 13035]
Richard Laager <rlaager@wiktel.com>
parents:
11033
diff
changeset
|
429 |
e4459e8ccfb5
[gaim-migrate @ 13035]
Richard Laager <rlaager@wiktel.com>
parents:
11033
diff
changeset
|
430 return 0; |
6485 | 431 } |
432 | |
433 static void | |
434 chat_joined_cb(GaimConversation *conv, void *data) | |
435 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
436 gaim_debug_misc("signals test", "chat-joined (%s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
437 gaim_conversation_get_name(conv)); |
6485 | 438 } |
439 | |
440 static void | |
441 chat_left_cb(GaimConversation *conv, void *data) | |
442 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
443 gaim_debug_misc("signals test", "chat-left (%s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
444 gaim_conversation_get_name(conv)); |
6485 | 445 } |
446 | |
9517 | 447 static void |
448 chat_topic_changed_cb(GaimConversation *conv, const char *who, | |
449 const char *topic, void *data) | |
450 { | |
451 gaim_debug_misc("signals test", | |
452 "chat-topic-changed (%s topic changed to: \"%s\" by %s)\n", | |
453 gaim_conversation_get_name(conv), topic, | |
454 (who) ? who : "unknown"); | |
455 } | |
6485 | 456 /************************************************************************** |
10684
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
457 * Ciphers signal callbacks |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
458 **************************************************************************/ |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
459 static void |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
460 cipher_added_cb(GaimCipher *cipher, void *data) { |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
461 gaim_debug_misc("signals test", "cipher %s added\n", |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
462 gaim_cipher_get_name(cipher)); |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
463 } |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
464 |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
465 static void |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
466 cipher_removed_cb(GaimCipher *cipher, void *data) { |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
467 gaim_debug_misc("signals test", "cipher %s removed\n", |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
468 gaim_cipher_get_name(cipher)); |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
469 } |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
470 |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
471 /************************************************************************** |
6485 | 472 * Core signal callbacks |
473 **************************************************************************/ | |
474 static void | |
475 quitting_cb(void *data) | |
476 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
477 gaim_debug_misc("signals test", "quitting ()\n"); |
6485 | 478 } |
479 | |
480 /************************************************************************** | |
11281
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
481 * File transfer signal callbacks |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
482 **************************************************************************/ |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
483 static void |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
484 ft_recv_accept_cb(GaimXfer *xfer, gpointer data) { |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
485 gaim_debug_misc("signals test", "file receive accepted\n"); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
486 } |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
487 |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
488 static void |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
489 ft_send_accept_cb(GaimXfer *xfer, gpointer data) { |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
490 gaim_debug_misc("signals test", "file send accepted\n"); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
491 } |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
492 |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
493 static void |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
494 ft_recv_start_cb(GaimXfer *xfer, gpointer data) { |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
495 gaim_debug_misc("signals test", "file receive started\n"); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
496 } |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
497 |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
498 static void |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
499 ft_send_start_cb(GaimXfer *xfer, gpointer data) { |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
500 gaim_debug_misc("signals test", "file send started\n"); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
501 } |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
502 |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
503 static void |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
504 ft_recv_cancel_cb(GaimXfer *xfer, gpointer data) { |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
505 gaim_debug_misc("signals test", "file receive canceled\n"); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
506 } |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
507 |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
508 static void |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
509 ft_send_cancel_cb(GaimXfer *xfer, gpointer data) { |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
510 gaim_debug_misc("signals test", "file send canceled\n"); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
511 } |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
512 |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
513 static void |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
514 ft_recv_complete_cb(GaimXfer *xfer, gpointer data) { |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
515 gaim_debug_misc("signals test", "file receive completed\n"); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
516 } |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
517 |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
518 static void |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
519 ft_send_complete_cb(GaimXfer *xfer, gpointer data) { |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
520 gaim_debug_misc("signals test", "file send completed\n"); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
521 } |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
522 |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
523 /************************************************************************** |
6485 | 524 * Plugin stuff |
525 **************************************************************************/ | |
526 static gboolean | |
527 plugin_load(GaimPlugin *plugin) | |
528 { | |
529 void *core_handle = gaim_get_core(); | |
530 void *blist_handle = gaim_blist_get_handle(); | |
531 void *conn_handle = gaim_connections_get_handle(); | |
532 void *conv_handle = gaim_conversations_get_handle(); | |
533 void *accounts_handle = gaim_accounts_get_handle(); | |
10684
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
534 void *ciphers_handle = gaim_ciphers_get_handle(); |
10934 | 535 void *buddy_icons_handle = gaim_buddy_icons_get_handle(); |
11281
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
536 void *ft_handle = gaim_xfers_get_handle(); |
6485 | 537 |
538 /* Accounts subsystem signals */ | |
539 gaim_signal_connect(accounts_handle, "account-connecting", | |
540 plugin, GAIM_CALLBACK(account_connecting_cb), NULL); | |
541 gaim_signal_connect(accounts_handle, "account-away", | |
542 plugin, GAIM_CALLBACK(account_away_cb), NULL); | |
543 gaim_signal_connect(accounts_handle, "account-setting-info", | |
544 plugin, GAIM_CALLBACK(account_setting_info_cb), NULL); | |
545 gaim_signal_connect(accounts_handle, "account-set-info", | |
546 plugin, GAIM_CALLBACK(account_set_info_cb), NULL); | |
547 gaim_signal_connect(accounts_handle, "account-warned", | |
548 plugin, GAIM_CALLBACK(account_warned_cb), NULL); | |
549 | |
10934 | 550 /* Buddy Icon subsystem signals */ |
551 gaim_signal_connect(buddy_icons_handle, "buddy-icon-cached", | |
552 plugin, GAIM_CALLBACK(buddy_icon_cached_cb), NULL); | |
553 | |
6485 | 554 /* Buddy List subsystem signals */ |
555 gaim_signal_connect(blist_handle, "buddy-away", | |
556 plugin, GAIM_CALLBACK(buddy_away_cb), NULL); | |
557 gaim_signal_connect(blist_handle, "buddy-back", | |
558 plugin, GAIM_CALLBACK(buddy_back_cb), NULL); | |
559 gaim_signal_connect(blist_handle, "buddy-idle", | |
560 plugin, GAIM_CALLBACK(buddy_idle_cb), NULL); | |
561 gaim_signal_connect(blist_handle, "buddy-unidle", | |
562 plugin, GAIM_CALLBACK(buddy_unidle_cb), NULL); | |
563 gaim_signal_connect(blist_handle, "buddy-signed-on", | |
564 plugin, GAIM_CALLBACK(buddy_signed_on_cb), NULL); | |
565 gaim_signal_connect(blist_handle, "buddy-signed-off", | |
566 plugin, GAIM_CALLBACK(buddy_signed_off_cb), NULL); | |
9051 | 567 gaim_signal_connect(blist_handle, "blist-node-extended-menu", |
568 plugin, GAIM_CALLBACK(blist_node_extended_menu_cb), NULL); | |
6485 | 569 |
570 /* Connection subsystem signals */ | |
571 gaim_signal_connect(conn_handle, "signing-on", | |
572 plugin, GAIM_CALLBACK(signing_on_cb), NULL); | |
573 gaim_signal_connect(conn_handle, "signed-on", | |
574 plugin, GAIM_CALLBACK(signed_on_cb), NULL); | |
575 gaim_signal_connect(conn_handle, "signing-off", | |
576 plugin, GAIM_CALLBACK(signing_off_cb), NULL); | |
577 gaim_signal_connect(conn_handle, "signed-off", | |
578 plugin, GAIM_CALLBACK(signed_off_cb), NULL); | |
579 | |
580 /* Conversations subsystem signals */ | |
581 gaim_signal_connect(conv_handle, "displaying-im-msg", | |
582 plugin, GAIM_CALLBACK(displaying_im_msg_cb), NULL); | |
6489 | 583 gaim_signal_connect(conv_handle, "displayed-im-msg", |
6485 | 584 plugin, GAIM_CALLBACK(displayed_im_msg_cb), NULL); |
9051 | 585 gaim_signal_connect(conv_handle, "writing-im-msg", |
586 plugin, GAIM_CALLBACK(writing_im_msg_cb), NULL); | |
587 gaim_signal_connect(conv_handle, "wrote-im-msg", | |
588 plugin, GAIM_CALLBACK(wrote_im_msg_cb), NULL); | |
6485 | 589 gaim_signal_connect(conv_handle, "sending-im-msg", |
590 plugin, GAIM_CALLBACK(sending_im_msg_cb), NULL); | |
591 gaim_signal_connect(conv_handle, "sent-im-msg", | |
592 plugin, GAIM_CALLBACK(sent_im_msg_cb), NULL); | |
8999 | 593 gaim_signal_connect(conv_handle, "receiving-im-msg", |
594 plugin, GAIM_CALLBACK(receiving_im_msg_cb), NULL); | |
6485 | 595 gaim_signal_connect(conv_handle, "received-im-msg", |
596 plugin, GAIM_CALLBACK(received_im_msg_cb), NULL); | |
597 gaim_signal_connect(conv_handle, "displaying-chat-msg", | |
598 plugin, GAIM_CALLBACK(displaying_chat_msg_cb), NULL); | |
599 gaim_signal_connect(conv_handle, "displayed-chat-msg", | |
600 plugin, GAIM_CALLBACK(displayed_chat_msg_cb), NULL); | |
9051 | 601 gaim_signal_connect(conv_handle, "writing-chat-msg", |
602 plugin, GAIM_CALLBACK(writing_chat_msg_cb), NULL); | |
603 gaim_signal_connect(conv_handle, "wrote-chat-msg", | |
604 plugin, GAIM_CALLBACK(wrote_chat_msg_cb), NULL); | |
6485 | 605 gaim_signal_connect(conv_handle, "sending-chat-msg", |
606 plugin, GAIM_CALLBACK(sending_chat_msg_cb), NULL); | |
607 gaim_signal_connect(conv_handle, "sent-chat-msg", | |
608 plugin, GAIM_CALLBACK(sent_chat_msg_cb), NULL); | |
8999 | 609 gaim_signal_connect(conv_handle, "receiving-chat-msg", |
610 plugin, GAIM_CALLBACK(receiving_chat_msg_cb), NULL); | |
6485 | 611 gaim_signal_connect(conv_handle, "received-chat-msg", |
612 plugin, GAIM_CALLBACK(received_chat_msg_cb), NULL); | |
613 gaim_signal_connect(conv_handle, "conversation-switching", | |
614 plugin, GAIM_CALLBACK(conversation_switching_cb), NULL); | |
615 gaim_signal_connect(conv_handle, "conversation-switched", | |
616 plugin, GAIM_CALLBACK(conversation_switched_cb), NULL); | |
617 gaim_signal_connect(conv_handle, "conversation-created", | |
618 plugin, GAIM_CALLBACK(conversation_created_cb), NULL); | |
619 gaim_signal_connect(conv_handle, "deleting-conversation", | |
620 plugin, GAIM_CALLBACK(deleting_conversation_cb), NULL); | |
621 gaim_signal_connect(conv_handle, "buddy-typing", | |
622 plugin, GAIM_CALLBACK(buddy_typing_cb), NULL); | |
623 gaim_signal_connect(conv_handle, "chat-buddy-joining", | |
624 plugin, GAIM_CALLBACK(chat_buddy_joining_cb), NULL); | |
625 gaim_signal_connect(conv_handle, "chat-buddy-joined", | |
626 plugin, GAIM_CALLBACK(chat_buddy_joined_cb), NULL); | |
9554 | 627 gaim_signal_connect(conv_handle, "chat-buddy-flags", |
628 plugin, GAIM_CALLBACK(chat_buddy_flags_cb), NULL); | |
6485 | 629 gaim_signal_connect(conv_handle, "chat-buddy-leaving", |
630 plugin, GAIM_CALLBACK(chat_buddy_leaving_cb), NULL); | |
631 gaim_signal_connect(conv_handle, "chat-buddy-left", | |
632 plugin, GAIM_CALLBACK(chat_buddy_left_cb), NULL); | |
633 gaim_signal_connect(conv_handle, "chat-inviting-user", | |
634 plugin, GAIM_CALLBACK(chat_inviting_user_cb), NULL); | |
635 gaim_signal_connect(conv_handle, "chat-invited-user", | |
636 plugin, GAIM_CALLBACK(chat_invited_user_cb), NULL); | |
637 gaim_signal_connect(conv_handle, "chat-invited", | |
638 plugin, GAIM_CALLBACK(chat_invited_cb), NULL); | |
639 gaim_signal_connect(conv_handle, "chat-joined", | |
640 plugin, GAIM_CALLBACK(chat_joined_cb), NULL); | |
641 gaim_signal_connect(conv_handle, "chat-left", | |
642 plugin, GAIM_CALLBACK(chat_left_cb), NULL); | |
9517 | 643 gaim_signal_connect(conv_handle, "chat-topic-changed", |
644 plugin, GAIM_CALLBACK(chat_topic_changed_cb), NULL); | |
6485 | 645 |
10684
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
646 /* Ciphers signals */ |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
647 gaim_signal_connect(ciphers_handle, "cipher-added", |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
648 plugin, GAIM_CALLBACK(cipher_added_cb), NULL); |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
649 gaim_signal_connect(ciphers_handle, "cipher-removed", |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
650 plugin, GAIM_CALLBACK(cipher_removed_cb), NULL); |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
651 |
6485 | 652 /* Core signals */ |
653 gaim_signal_connect(core_handle, "quitting", | |
654 plugin, GAIM_CALLBACK(quitting_cb), NULL); | |
655 | |
11281
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
656 /* file transfer signals */ |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
657 gaim_signal_connect(ft_handle, "file-recv-accept", |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
658 plugin, GAIM_CALLBACK(ft_recv_accept_cb), NULL); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
659 gaim_signal_connect(ft_handle, "file-recv-start", |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
660 plugin, GAIM_CALLBACK(ft_recv_start_cb), NULL); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
661 gaim_signal_connect(ft_handle, "file-recv-cancel", |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
662 plugin, GAIM_CALLBACK(ft_recv_cancel_cb), NULL); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
663 gaim_signal_connect(ft_handle, "file-recv-complete", |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
664 plugin, GAIM_CALLBACK(ft_recv_complete_cb), NULL); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
665 gaim_signal_connect(ft_handle, "file-send-accept", |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
666 plugin, GAIM_CALLBACK(ft_send_accept_cb), NULL); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
667 gaim_signal_connect(ft_handle, "file-send-start", |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
668 plugin, GAIM_CALLBACK(ft_send_start_cb), NULL); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
669 gaim_signal_connect(ft_handle, "file-send-cancel", |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
670 plugin, GAIM_CALLBACK(ft_send_cancel_cb), NULL); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
671 gaim_signal_connect(ft_handle, "file-send-complete", |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
672 plugin, GAIM_CALLBACK(ft_send_complete_cb), NULL); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
673 |
6485 | 674 return TRUE; |
675 } | |
676 | |
677 static GaimPluginInfo info = | |
678 { | |
9954 | 679 GAIM_PLUGIN_MAGIC, |
680 GAIM_MAJOR_VERSION, | |
681 GAIM_MINOR_VERSION, | |
6485 | 682 GAIM_PLUGIN_STANDARD, /**< type */ |
683 NULL, /**< ui_requirement */ | |
684 0, /**< flags */ | |
685 NULL, /**< dependencies */ | |
686 GAIM_PRIORITY_DEFAULT, /**< priority */ | |
687 | |
688 SIGNAL_TEST_PLUGIN_ID, /**< id */ | |
689 N_("Signals Test"), /**< name */ | |
690 VERSION, /**< version */ | |
691 /** summary */ | |
692 N_("Test to see that all signals are working properly."), | |
693 /** description */ | |
694 N_("Test to see that all signals are working properly."), | |
695 "Christian Hammond <chipx86@gnupdate.org>", /**< author */ | |
696 GAIM_WEBSITE, /**< homepage */ | |
697 | |
698 plugin_load, /**< load */ | |
11256
bb0d7b719af2
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11064
diff
changeset
|
699 NULL, /**< unload */ |
6485 | 700 NULL, /**< destroy */ |
701 | |
702 NULL, /**< ui_info */ | |
8993 | 703 NULL, /**< extra_info */ |
704 NULL, | |
705 NULL | |
6485 | 706 }; |
707 | |
708 static void | |
709 init_plugin(GaimPlugin *plugin) | |
710 { | |
711 } | |
712 | |
713 GAIM_INIT_PLUGIN(signalstest, init_plugin, info) |