Mercurial > pidgin.yaz
annotate plugins/signals-test.c @ 11862:f8cd06753755
[gaim-migrate @ 14153]
Make "make distcheck" work, which also makes the perl plugin loader loadable
when installed to a non-standard prefix (it still can't find Gaim.pm though)
Add some extra warning CFLAGS if a) --enable-debug was used and b) your
compiler supports them.
Plug a couple of leaks
The gaimrc plugin's GtkTreeView expander_size setting now works (but doesn't
seem to instant-apply - should it?)
staticify some functions that don't need to be exposed
probably something else I forgot about
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Thu, 27 Oct 2005 20:43:43 +0000 |
parents | 6fa0a37127fd |
children | 0b8b7e59cb4b |
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" |
11628 | 34 #include "status.h" |
6485 | 35 |
36 /************************************************************************** | |
37 * Account subsystem signal callbacks | |
38 **************************************************************************/ | |
39 static void | |
40 account_connecting_cb(GaimAccount *account, void *data) | |
41 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
42 gaim_debug_misc("signals test", "account-connecting (%s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
43 gaim_account_get_username(account)); |
6485 | 44 } |
45 | |
46 static void | |
47 account_setting_info_cb(GaimAccount *account, const char *info, void *data) | |
48 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
49 gaim_debug_misc("signals test", "account-setting-info (%s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
50 gaim_account_get_username(account), info); |
6485 | 51 } |
52 | |
53 static void | |
54 account_set_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-set-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 | |
11628 | 60 static void |
61 account_status_changed(GaimAccount *account, GaimStatus *old, GaimStatus *new, | |
62 gpointer data) | |
63 { | |
64 gaim_debug_misc("signals test", "account-status-changed (%s, %s, %s)\n", | |
65 gaim_account_get_username(account), | |
66 gaim_status_get_name(old), | |
67 gaim_status_get_name(new)); | |
68 } | |
69 | |
6485 | 70 /************************************************************************** |
10934 | 71 * Buddy Icons signal callbacks |
72 **************************************************************************/ | |
73 static void | |
74 buddy_icon_cached_cb(GaimBuddyIcon *icon, GaimBuddy *buddy, | |
75 const char *filename, const char *old_icon) | |
76 { | |
77 gaim_debug_misc("signals test", "buddy icon cached (%s, %s, %s)\n", | |
78 gaim_buddy_get_name(buddy), filename, old_icon); | |
79 } | |
80 | |
81 /************************************************************************** | |
6485 | 82 * Buddy List subsystem signal callbacks |
83 **************************************************************************/ | |
84 static void | |
7009
d77e99c55b40
[gaim-migrate @ 7568]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
85 buddy_away_cb(GaimBuddy *buddy, void *data) |
6485 | 86 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
87 gaim_debug_misc("signals test", "buddy-away (%s)\n", buddy->name); |
6485 | 88 } |
89 | |
90 static void | |
7009
d77e99c55b40
[gaim-migrate @ 7568]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
91 buddy_back_cb(GaimBuddy *buddy, void *data) |
6485 | 92 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
93 gaim_debug_misc("signals test", "buddy-back (%s)\n", buddy->name); |
6485 | 94 } |
95 | |
96 static void | |
7009
d77e99c55b40
[gaim-migrate @ 7568]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
97 buddy_idle_cb(GaimBuddy *buddy, void *data) |
6485 | 98 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
99 gaim_debug_misc("signals test", "buddy-idle (%s)\n", buddy->name); |
6485 | 100 } |
101 | |
102 static void | |
7009
d77e99c55b40
[gaim-migrate @ 7568]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
103 buddy_unidle_cb(GaimBuddy *buddy, void *data) |
6485 | 104 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
105 gaim_debug_misc("signals test", "buddy-unidle (%s)\n", buddy->name); |
6485 | 106 } |
107 | |
108 static void | |
7009
d77e99c55b40
[gaim-migrate @ 7568]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
109 buddy_signed_on_cb(GaimBuddy *buddy, void *data) |
6485 | 110 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
111 gaim_debug_misc("signals test", "buddy-signed-on (%s)\n", buddy->name); |
6485 | 112 } |
113 | |
114 static void | |
7009
d77e99c55b40
[gaim-migrate @ 7568]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
115 buddy_signed_off_cb(GaimBuddy *buddy, void *data) |
6485 | 116 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
117 gaim_debug_misc("signals test", "buddy-signed-off (%s)\n", buddy->name); |
6485 | 118 } |
119 | |
8999 | 120 static void |
11454
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
121 buddy_added_cb(GaimBuddy *buddy, void *data) |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
122 { |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
123 gaim_debug_misc("signals test", "buddy_added_cb (%s)\n", gaim_buddy_get_name(buddy)); |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
124 } |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
125 |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
126 static void |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
127 buddy_removed_cb(GaimBuddy *buddy, void *data) |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
128 { |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
129 gaim_debug_misc("signals test", "buddy_removed_cb (%s)\n", gaim_buddy_get_name(buddy)); |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
130 } |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
131 |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
132 static void |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
133 blist_node_aliased(GaimBlistNode *node, const char *old_alias) |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
134 { |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
135 GaimContact *p = (GaimContact *)node; |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
136 GaimBuddy *b = (GaimBuddy *)node; |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
137 GaimChat *c = (GaimChat *)node; |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
138 GaimGroup *g = (GaimGroup *)node; |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
139 |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
140 if (GAIM_BLIST_NODE_IS_CONTACT(node)) |
11748 | 141 gaim_debug_misc("signals test", "blist-node-aliased (Contact: %s, %s)\n", p->alias, old_alias); |
11454
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
142 else if (GAIM_BLIST_NODE_IS_BUDDY(node)) |
11748 | 143 gaim_debug_misc("signals test", "blist-node-aliased (Buddy: %s, %s)\n", b->name, old_alias); |
11454
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
144 else if (GAIM_BLIST_NODE_IS_CHAT(node)) |
11748 | 145 gaim_debug_misc("signals test", "blist-node-aliased (Chat: %s, %s)\n", c->alias, old_alias); |
11454
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
146 else if (GAIM_BLIST_NODE_IS_GROUP(node)) |
11748 | 147 gaim_debug_misc("signals test", "blist-node-aliased (Group: %s, %s)\n", g->name, old_alias); |
11454
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
148 else |
11748 | 149 gaim_debug_misc("signals test", "blist-node-aliased (UNKNOWN: %d, %s)\n", node->type, old_alias); |
11454
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
150 |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
151 } |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
152 |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
153 static void |
9051 | 154 blist_node_extended_menu_cb(GaimBlistNode *node, void *data) |
8999 | 155 { |
9051 | 156 GaimContact *p = (GaimContact *)node; |
157 GaimBuddy *b = (GaimBuddy *)node; | |
158 GaimChat *c = (GaimChat *)node; | |
159 GaimGroup *g = (GaimGroup *)node; | |
8999 | 160 |
9051 | 161 if (GAIM_BLIST_NODE_IS_CONTACT(node)) |
162 gaim_debug_misc("signals test", "blist-node-extended-menu (Contact: %s)\n", p->alias); | |
163 else if (GAIM_BLIST_NODE_IS_BUDDY(node)) | |
164 gaim_debug_misc("signals test", "blist-node-extended-menu (Buddy: %s)\n", b->name); | |
165 else if (GAIM_BLIST_NODE_IS_CHAT(node)) | |
166 gaim_debug_misc("signals test", "blist-node-extended-menu (Chat: %s)\n", c->alias); | |
167 else if (GAIM_BLIST_NODE_IS_GROUP(node)) | |
168 gaim_debug_misc("signals test", "blist-node-extended-menu (Group: %s)\n", g->name); | |
169 else | |
170 gaim_debug_misc("signals test", "blist-node-extended-menu (UNKNOWN: %d)\n", node->type); | |
171 | |
8999 | 172 } |
173 | |
174 | |
6485 | 175 /************************************************************************** |
176 * Connection subsystem signal callbacks | |
177 **************************************************************************/ | |
178 static void | |
179 signing_on_cb(GaimConnection *gc, void *data) | |
180 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
181 gaim_debug_misc("signals test", "signing-on (%s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
182 gaim_account_get_username(gaim_connection_get_account(gc))); |
6485 | 183 } |
184 | |
185 static void | |
186 signed_on_cb(GaimConnection *gc, void *data) | |
187 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
188 gaim_debug_misc("signals test", "signed-on (%s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
189 gaim_account_get_username(gaim_connection_get_account(gc))); |
6485 | 190 } |
191 | |
192 static void | |
193 signing_off_cb(GaimConnection *gc, void *data) | |
194 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
195 gaim_debug_misc("signals test", "signing-off (%s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
196 gaim_account_get_username(gaim_connection_get_account(gc))); |
6485 | 197 } |
198 | |
199 static void | |
200 signed_off_cb(GaimConnection *gc, void *data) | |
201 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
202 gaim_debug_misc("signals test", "signed-off (%s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
203 gaim_account_get_username(gaim_connection_get_account(gc))); |
6485 | 204 } |
205 | |
206 /************************************************************************** | |
207 * Conversation subsystem signal callbacks | |
208 **************************************************************************/ | |
209 static gboolean | |
7503 | 210 displaying_im_msg_cb(GaimAccount *account, GaimConversation *conv, |
211 char **buffer, void *data) | |
6485 | 212 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
213 gaim_debug_misc("signals test", "displaying-im-msg (%s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
214 gaim_conversation_get_name(conv), *buffer); |
6485 | 215 |
216 return FALSE; | |
217 } | |
218 | |
219 static void | |
9051 | 220 displayed_im_msg_cb(GaimAccount *account, GaimConversation *conv, const char *buffer, void *data) |
6485 | 221 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
222 gaim_debug_misc("signals test", "displayed-im-msg (%s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
223 gaim_conversation_get_name(conv), buffer); |
6485 | 224 } |
225 | |
9051 | 226 static gboolean |
227 writing_im_msg_cb(GaimAccount *account, GaimConversation *conv, char **buffer, void *data) | |
228 { | |
229 gaim_debug_misc("signals test", "writing-im-msg (%s, %s, %s)\n", | |
230 gaim_account_get_username(account), gaim_conversation_get_name(conv), *buffer); | |
231 | |
232 return FALSE; | |
233 | |
234 } | |
235 | |
236 static void | |
237 wrote_im_msg_cb(GaimAccount *account, GaimConversation *conv, const char *buffer, void *data) | |
238 { | |
239 gaim_debug_misc("signals test", "wrote-im-msg (%s, %s, %s)\n", | |
240 gaim_account_get_username(account), gaim_conversation_get_name(conv), buffer); | |
241 } | |
242 | |
7503 | 243 static void |
6509 | 244 sending_im_msg_cb(GaimAccount *account, char *recipient, char **buffer, void *data) |
6485 | 245 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
246 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
|
247 gaim_account_get_username(account), recipient, *buffer); |
6485 | 248 |
249 } | |
250 | |
251 static void | |
6509 | 252 sent_im_msg_cb(GaimAccount *account, const char *recipient, const 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", "sent-im-msg (%s, %s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
255 gaim_account_get_username(account), recipient, buffer); |
6485 | 256 } |
257 | |
258 static gboolean | |
8999 | 259 receiving_im_msg_cb(GaimAccount *account, char **sender, char **buffer, |
10104 | 260 GaimConversation *conv, int *flags, void *data) |
6485 | 261 { |
10104 | 262 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
|
263 gaim_account_get_username(account), *sender, *buffer, |
10104 | 264 gaim_conversation_get_name(conv), *flags); |
6485 | 265 |
266 return FALSE; | |
267 } | |
268 | |
8999 | 269 static void |
270 received_im_msg_cb(GaimAccount *account, char *sender, char *buffer, | |
10104 | 271 GaimConversation *conv, int flags, void *data) |
8999 | 272 { |
10104 | 273 gaim_debug_misc("signals test", "received-im-msg (%s, %s, %s, %s, %d)\n", |
8999 | 274 gaim_account_get_username(account), sender, buffer, |
10104 | 275 gaim_conversation_get_name(conv), flags); |
8999 | 276 } |
277 | |
6485 | 278 static gboolean |
7503 | 279 displaying_chat_msg_cb(GaimAccount *account, GaimConversation *conv, |
280 char **buffer, void *data) | |
6485 | 281 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
282 gaim_debug_misc("signals test", "displaying-chat-msg (%s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
283 gaim_conversation_get_name(conv), *buffer); |
6485 | 284 |
6486
fab81e4b885c
[gaim-migrate @ 7000]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
285 return FALSE; |
6485 | 286 } |
287 | |
288 static void | |
9051 | 289 displayed_chat_msg_cb(GaimAccount *account, GaimConversation *conv, const char *buffer, void *data) |
6485 | 290 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
291 gaim_debug_misc("signals test", "displayed-chat-msg (%s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
292 gaim_conversation_get_name(conv), buffer); |
6485 | 293 } |
294 | |
295 static gboolean | |
9051 | 296 writing_chat_msg_cb(GaimAccount *account, GaimConversation *conv, |
297 char **buffer, void *data) | |
298 { | |
299 gaim_debug_misc("signals test", "writing-chat-msg (%s, %s)\n", | |
300 gaim_conversation_get_name(conv), *buffer); | |
301 | |
302 return FALSE; | |
303 } | |
304 | |
305 static void | |
306 wrote_chat_msg_cb(GaimAccount *account, GaimConversation *conv, const char *buffer, void *data) | |
307 { | |
308 gaim_debug_misc("signals test", "wrote-chat-msg (%s, %s)\n", | |
309 gaim_conversation_get_name(conv), buffer); | |
310 } | |
311 | |
312 static gboolean | |
6509 | 313 sending_chat_msg_cb(GaimAccount *account, char **buffer, int id, void *data) |
6485 | 314 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
315 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
|
316 gaim_account_get_username(account), *buffer, id); |
6485 | 317 |
318 return FALSE; | |
319 } | |
320 | |
321 static void | |
6509 | 322 sent_chat_msg_cb(GaimAccount *account, const char *buffer, int id, void *data) |
6485 | 323 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
324 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
|
325 gaim_account_get_username(account), buffer, id); |
6485 | 326 } |
327 | |
328 static gboolean | |
8999 | 329 receiving_chat_msg_cb(GaimAccount *account, char **sender, char **buffer, |
10104 | 330 GaimConversation *chat, int *flags, void *data) |
6485 | 331 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
332 gaim_debug_misc("signals test", |
10104 | 333 "receiving-chat-msg (%s, %s, %s, %s, %d)\n", |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
334 gaim_account_get_username(account), *sender, *buffer, |
10104 | 335 gaim_conversation_get_name(chat), *flags); |
6485 | 336 |
337 return FALSE; | |
338 } | |
339 | |
340 static void | |
8999 | 341 received_chat_msg_cb(GaimAccount *account, char *sender, char *buffer, |
10104 | 342 GaimConversation *chat, int flags, void *data) |
8999 | 343 { |
344 gaim_debug_misc("signals test", | |
10104 | 345 "received-chat-msg (%s, %s, %s, %s, %d)\n", |
8999 | 346 gaim_account_get_username(account), sender, buffer, |
10104 | 347 gaim_conversation_get_name(chat), flags); |
8999 | 348 } |
349 | |
350 static void | |
6485 | 351 conversation_switching_cb(GaimConversation *old_conv, |
352 GaimConversation *new_conv, void *data) | |
353 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
354 gaim_debug_misc("signals test", "conversation-switching (%s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
355 gaim_conversation_get_name(old_conv), |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
356 gaim_conversation_get_name(new_conv)); |
6485 | 357 } |
358 | |
359 static void | |
360 conversation_switched_cb(GaimConversation *old_conv, | |
361 GaimConversation *new_conv, void *data) | |
362 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
363 gaim_debug_misc("signals test", "conversation-switched (%s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
364 gaim_conversation_get_name(old_conv), |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
365 gaim_conversation_get_name(new_conv)); |
6485 | 366 } |
367 | |
368 static void | |
369 conversation_created_cb(GaimConversation *conv, void *data) | |
370 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
371 gaim_debug_misc("signals test", "conversation-created (%s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
372 gaim_conversation_get_name(conv)); |
6485 | 373 } |
374 | |
375 static void | |
376 deleting_conversation_cb(GaimConversation *conv, void *data) | |
377 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
378 gaim_debug_misc("signals test", "deleting-conversation (%s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
379 gaim_conversation_get_name(conv)); |
6485 | 380 } |
381 | |
382 static void | |
11706
bcc49c25ef90
[gaim-migrate @ 13997]
Richard Laager <rlaager@wiktel.com>
parents:
11628
diff
changeset
|
383 buddy_typing_cb(GaimAccount *account, const char *name, void *data) |
6485 | 384 { |
11706
bcc49c25ef90
[gaim-migrate @ 13997]
Richard Laager <rlaager@wiktel.com>
parents:
11628
diff
changeset
|
385 gaim_debug_misc("signals test", "buddy-typing (%s, %s)\n", |
bcc49c25ef90
[gaim-migrate @ 13997]
Richard Laager <rlaager@wiktel.com>
parents:
11628
diff
changeset
|
386 gaim_account_get_username(account), name); |
bcc49c25ef90
[gaim-migrate @ 13997]
Richard Laager <rlaager@wiktel.com>
parents:
11628
diff
changeset
|
387 } |
bcc49c25ef90
[gaim-migrate @ 13997]
Richard Laager <rlaager@wiktel.com>
parents:
11628
diff
changeset
|
388 |
bcc49c25ef90
[gaim-migrate @ 13997]
Richard Laager <rlaager@wiktel.com>
parents:
11628
diff
changeset
|
389 static void |
bcc49c25ef90
[gaim-migrate @ 13997]
Richard Laager <rlaager@wiktel.com>
parents:
11628
diff
changeset
|
390 buddy_typing_stopped_cb(GaimAccount *account, const char *name, void *data) |
bcc49c25ef90
[gaim-migrate @ 13997]
Richard Laager <rlaager@wiktel.com>
parents:
11628
diff
changeset
|
391 { |
bcc49c25ef90
[gaim-migrate @ 13997]
Richard Laager <rlaager@wiktel.com>
parents:
11628
diff
changeset
|
392 gaim_debug_misc("signals test", "buddy-typing-stopped (%s, %s)\n", |
bcc49c25ef90
[gaim-migrate @ 13997]
Richard Laager <rlaager@wiktel.com>
parents:
11628
diff
changeset
|
393 gaim_account_get_username(account), name); |
6485 | 394 } |
395 | |
9587 | 396 static gboolean |
9554 | 397 chat_buddy_joining_cb(GaimConversation *conv, const char *user, |
398 GaimConvChatBuddyFlags flags, void *data) | |
6485 | 399 { |
9554 | 400 gaim_debug_misc("signals test", "chat-buddy-joining (%s, %s, %d)\n", |
401 gaim_conversation_get_name(conv), user, flags); | |
9587 | 402 |
403 return FALSE; | |
6485 | 404 } |
405 | |
406 static void | |
9554 | 407 chat_buddy_joined_cb(GaimConversation *conv, const char *user, |
408 GaimConvChatBuddyFlags flags, void *data) | |
6485 | 409 { |
9554 | 410 gaim_debug_misc("signals test", "chat-buddy-joined (%s, %s, %d)\n", |
411 gaim_conversation_get_name(conv), user, flags); | |
412 } | |
413 | |
414 static void | |
415 chat_buddy_flags_cb(GaimConversation *conv, const char *user, | |
416 GaimConvChatBuddyFlags oldflags, GaimConvChatBuddyFlags newflags, void *data) | |
417 { | |
418 gaim_debug_misc("signals test", "chat-buddy-flags (%s, %s, %d, %d)\n", | |
419 gaim_conversation_get_name(conv), user, oldflags, newflags); | |
6485 | 420 } |
421 | |
9587 | 422 static gboolean |
6485 | 423 chat_buddy_leaving_cb(GaimConversation *conv, const char *user, |
424 const char *reason, void *data) | |
425 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
426 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
|
427 gaim_conversation_get_name(conv), user, reason); |
9587 | 428 |
429 return FALSE; | |
6485 | 430 } |
431 | |
432 static void | |
433 chat_buddy_left_cb(GaimConversation *conv, const char *user, | |
434 const char *reason, void *data) | |
435 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
436 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
|
437 gaim_conversation_get_name(conv), user, reason); |
6485 | 438 } |
439 | |
440 static void | |
441 chat_inviting_user_cb(GaimConversation *conv, const char *name, | |
9554 | 442 char **reason, void *data) |
6485 | 443 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
444 gaim_debug_misc("signals test", "chat-inviting-user (%s, %s, %s)\n", |
9554 | 445 gaim_conversation_get_name(conv), name, *reason); |
6485 | 446 } |
447 | |
448 static void | |
449 chat_invited_user_cb(GaimConversation *conv, const char *name, | |
450 const char *reason, void *data) | |
451 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
452 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
|
453 gaim_conversation_get_name(conv), name, reason); |
6485 | 454 } |
455 | |
11064
e4459e8ccfb5
[gaim-migrate @ 13035]
Richard Laager <rlaager@wiktel.com>
parents:
11033
diff
changeset
|
456 static gint |
6485 | 457 chat_invited_cb(GaimAccount *account, const char *inviter, |
9514 | 458 const char *room_name, const char *message, |
459 const GHashTable *components, void *data) | |
6485 | 460 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
461 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
|
462 gaim_account_get_username(account), inviter, |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
463 room_name, message); |
11064
e4459e8ccfb5
[gaim-migrate @ 13035]
Richard Laager <rlaager@wiktel.com>
parents:
11033
diff
changeset
|
464 |
e4459e8ccfb5
[gaim-migrate @ 13035]
Richard Laager <rlaager@wiktel.com>
parents:
11033
diff
changeset
|
465 return 0; |
6485 | 466 } |
467 | |
468 static void | |
469 chat_joined_cb(GaimConversation *conv, void *data) | |
470 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
471 gaim_debug_misc("signals test", "chat-joined (%s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
472 gaim_conversation_get_name(conv)); |
6485 | 473 } |
474 | |
475 static void | |
476 chat_left_cb(GaimConversation *conv, void *data) | |
477 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
478 gaim_debug_misc("signals test", "chat-left (%s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
479 gaim_conversation_get_name(conv)); |
6485 | 480 } |
481 | |
9517 | 482 static void |
483 chat_topic_changed_cb(GaimConversation *conv, const char *who, | |
484 const char *topic, void *data) | |
485 { | |
486 gaim_debug_misc("signals test", | |
487 "chat-topic-changed (%s topic changed to: \"%s\" by %s)\n", | |
488 gaim_conversation_get_name(conv), topic, | |
489 (who) ? who : "unknown"); | |
490 } | |
6485 | 491 /************************************************************************** |
10684
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
492 * Ciphers signal callbacks |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
493 **************************************************************************/ |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
494 static void |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
495 cipher_added_cb(GaimCipher *cipher, void *data) { |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
496 gaim_debug_misc("signals test", "cipher %s added\n", |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
497 gaim_cipher_get_name(cipher)); |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
498 } |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
499 |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
500 static void |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
501 cipher_removed_cb(GaimCipher *cipher, void *data) { |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
502 gaim_debug_misc("signals test", "cipher %s removed\n", |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
503 gaim_cipher_get_name(cipher)); |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
504 } |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
505 |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
506 /************************************************************************** |
6485 | 507 * Core signal callbacks |
508 **************************************************************************/ | |
509 static void | |
510 quitting_cb(void *data) | |
511 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
512 gaim_debug_misc("signals test", "quitting ()\n"); |
6485 | 513 } |
514 | |
515 /************************************************************************** | |
11281
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
516 * File transfer signal callbacks |
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_recv_accept_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 receive accepted\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 static void |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
524 ft_send_accept_cb(GaimXfer *xfer, gpointer data) { |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
525 gaim_debug_misc("signals test", "file send accepted\n"); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
526 } |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
527 |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
528 static void |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
529 ft_recv_start_cb(GaimXfer *xfer, gpointer data) { |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
530 gaim_debug_misc("signals test", "file receive started\n"); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
531 } |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
532 |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
533 static void |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
534 ft_send_start_cb(GaimXfer *xfer, gpointer data) { |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
535 gaim_debug_misc("signals test", "file send started\n"); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
536 } |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
537 |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
538 static void |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
539 ft_recv_cancel_cb(GaimXfer *xfer, gpointer data) { |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
540 gaim_debug_misc("signals test", "file receive canceled\n"); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
541 } |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
542 |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
543 static void |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
544 ft_send_cancel_cb(GaimXfer *xfer, gpointer data) { |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
545 gaim_debug_misc("signals test", "file send canceled\n"); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
546 } |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
547 |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
548 static void |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
549 ft_recv_complete_cb(GaimXfer *xfer, gpointer data) { |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
550 gaim_debug_misc("signals test", "file receive completed\n"); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
551 } |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
552 |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
553 static void |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
554 ft_send_complete_cb(GaimXfer *xfer, gpointer data) { |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
555 gaim_debug_misc("signals test", "file send completed\n"); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
556 } |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
557 |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
558 /************************************************************************** |
6485 | 559 * Plugin stuff |
560 **************************************************************************/ | |
561 static gboolean | |
562 plugin_load(GaimPlugin *plugin) | |
563 { | |
564 void *core_handle = gaim_get_core(); | |
565 void *blist_handle = gaim_blist_get_handle(); | |
566 void *conn_handle = gaim_connections_get_handle(); | |
567 void *conv_handle = gaim_conversations_get_handle(); | |
568 void *accounts_handle = gaim_accounts_get_handle(); | |
10684
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
569 void *ciphers_handle = gaim_ciphers_get_handle(); |
10934 | 570 void *buddy_icons_handle = gaim_buddy_icons_get_handle(); |
11281
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
571 void *ft_handle = gaim_xfers_get_handle(); |
6485 | 572 |
573 /* Accounts subsystem signals */ | |
574 gaim_signal_connect(accounts_handle, "account-connecting", | |
575 plugin, GAIM_CALLBACK(account_connecting_cb), NULL); | |
576 gaim_signal_connect(accounts_handle, "account-setting-info", | |
577 plugin, GAIM_CALLBACK(account_setting_info_cb), NULL); | |
578 gaim_signal_connect(accounts_handle, "account-set-info", | |
579 plugin, GAIM_CALLBACK(account_set_info_cb), NULL); | |
11628 | 580 gaim_signal_connect(accounts_handle, "account-status-changed", |
581 plugin, GAIM_CALLBACK(account_status_changed), NULL); | |
6485 | 582 |
10934 | 583 /* Buddy Icon subsystem signals */ |
584 gaim_signal_connect(buddy_icons_handle, "buddy-icon-cached", | |
585 plugin, GAIM_CALLBACK(buddy_icon_cached_cb), NULL); | |
586 | |
6485 | 587 /* Buddy List subsystem signals */ |
588 gaim_signal_connect(blist_handle, "buddy-away", | |
589 plugin, GAIM_CALLBACK(buddy_away_cb), NULL); | |
590 gaim_signal_connect(blist_handle, "buddy-back", | |
591 plugin, GAIM_CALLBACK(buddy_back_cb), NULL); | |
592 gaim_signal_connect(blist_handle, "buddy-idle", | |
593 plugin, GAIM_CALLBACK(buddy_idle_cb), NULL); | |
594 gaim_signal_connect(blist_handle, "buddy-unidle", | |
595 plugin, GAIM_CALLBACK(buddy_unidle_cb), NULL); | |
596 gaim_signal_connect(blist_handle, "buddy-signed-on", | |
597 plugin, GAIM_CALLBACK(buddy_signed_on_cb), NULL); | |
598 gaim_signal_connect(blist_handle, "buddy-signed-off", | |
599 plugin, GAIM_CALLBACK(buddy_signed_off_cb), NULL); | |
11454
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
600 gaim_signal_connect(blist_handle, "buddy-added", |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
601 plugin, GAIM_CALLBACK(buddy_added_cb), NULL); |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
602 gaim_signal_connect(blist_handle, "blist-removed", |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
603 plugin, GAIM_CALLBACK(buddy_removed_cb), NULL); |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
604 gaim_signal_connect(blist_handle, "blist-node-aliased", |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
605 plugin, GAIM_CALLBACK(blist_node_aliased), NULL); |
9051 | 606 gaim_signal_connect(blist_handle, "blist-node-extended-menu", |
607 plugin, GAIM_CALLBACK(blist_node_extended_menu_cb), NULL); | |
6485 | 608 |
609 /* Connection subsystem signals */ | |
610 gaim_signal_connect(conn_handle, "signing-on", | |
611 plugin, GAIM_CALLBACK(signing_on_cb), NULL); | |
612 gaim_signal_connect(conn_handle, "signed-on", | |
613 plugin, GAIM_CALLBACK(signed_on_cb), NULL); | |
614 gaim_signal_connect(conn_handle, "signing-off", | |
615 plugin, GAIM_CALLBACK(signing_off_cb), NULL); | |
616 gaim_signal_connect(conn_handle, "signed-off", | |
617 plugin, GAIM_CALLBACK(signed_off_cb), NULL); | |
618 | |
619 /* Conversations subsystem signals */ | |
620 gaim_signal_connect(conv_handle, "displaying-im-msg", | |
621 plugin, GAIM_CALLBACK(displaying_im_msg_cb), NULL); | |
6489 | 622 gaim_signal_connect(conv_handle, "displayed-im-msg", |
6485 | 623 plugin, GAIM_CALLBACK(displayed_im_msg_cb), NULL); |
9051 | 624 gaim_signal_connect(conv_handle, "writing-im-msg", |
625 plugin, GAIM_CALLBACK(writing_im_msg_cb), NULL); | |
626 gaim_signal_connect(conv_handle, "wrote-im-msg", | |
627 plugin, GAIM_CALLBACK(wrote_im_msg_cb), NULL); | |
6485 | 628 gaim_signal_connect(conv_handle, "sending-im-msg", |
629 plugin, GAIM_CALLBACK(sending_im_msg_cb), NULL); | |
630 gaim_signal_connect(conv_handle, "sent-im-msg", | |
631 plugin, GAIM_CALLBACK(sent_im_msg_cb), NULL); | |
8999 | 632 gaim_signal_connect(conv_handle, "receiving-im-msg", |
633 plugin, GAIM_CALLBACK(receiving_im_msg_cb), NULL); | |
6485 | 634 gaim_signal_connect(conv_handle, "received-im-msg", |
635 plugin, GAIM_CALLBACK(received_im_msg_cb), NULL); | |
636 gaim_signal_connect(conv_handle, "displaying-chat-msg", | |
637 plugin, GAIM_CALLBACK(displaying_chat_msg_cb), NULL); | |
638 gaim_signal_connect(conv_handle, "displayed-chat-msg", | |
639 plugin, GAIM_CALLBACK(displayed_chat_msg_cb), NULL); | |
9051 | 640 gaim_signal_connect(conv_handle, "writing-chat-msg", |
641 plugin, GAIM_CALLBACK(writing_chat_msg_cb), NULL); | |
642 gaim_signal_connect(conv_handle, "wrote-chat-msg", | |
643 plugin, GAIM_CALLBACK(wrote_chat_msg_cb), NULL); | |
6485 | 644 gaim_signal_connect(conv_handle, "sending-chat-msg", |
645 plugin, GAIM_CALLBACK(sending_chat_msg_cb), NULL); | |
646 gaim_signal_connect(conv_handle, "sent-chat-msg", | |
647 plugin, GAIM_CALLBACK(sent_chat_msg_cb), NULL); | |
8999 | 648 gaim_signal_connect(conv_handle, "receiving-chat-msg", |
649 plugin, GAIM_CALLBACK(receiving_chat_msg_cb), NULL); | |
6485 | 650 gaim_signal_connect(conv_handle, "received-chat-msg", |
651 plugin, GAIM_CALLBACK(received_chat_msg_cb), NULL); | |
652 gaim_signal_connect(conv_handle, "conversation-switching", | |
653 plugin, GAIM_CALLBACK(conversation_switching_cb), NULL); | |
654 gaim_signal_connect(conv_handle, "conversation-switched", | |
655 plugin, GAIM_CALLBACK(conversation_switched_cb), NULL); | |
656 gaim_signal_connect(conv_handle, "conversation-created", | |
657 plugin, GAIM_CALLBACK(conversation_created_cb), NULL); | |
658 gaim_signal_connect(conv_handle, "deleting-conversation", | |
659 plugin, GAIM_CALLBACK(deleting_conversation_cb), NULL); | |
660 gaim_signal_connect(conv_handle, "buddy-typing", | |
661 plugin, GAIM_CALLBACK(buddy_typing_cb), NULL); | |
11706
bcc49c25ef90
[gaim-migrate @ 13997]
Richard Laager <rlaager@wiktel.com>
parents:
11628
diff
changeset
|
662 gaim_signal_connect(conv_handle, "buddy-typing-stopped", |
bcc49c25ef90
[gaim-migrate @ 13997]
Richard Laager <rlaager@wiktel.com>
parents:
11628
diff
changeset
|
663 plugin, GAIM_CALLBACK(buddy_typing_stopped_cb), NULL); |
6485 | 664 gaim_signal_connect(conv_handle, "chat-buddy-joining", |
665 plugin, GAIM_CALLBACK(chat_buddy_joining_cb), NULL); | |
666 gaim_signal_connect(conv_handle, "chat-buddy-joined", | |
667 plugin, GAIM_CALLBACK(chat_buddy_joined_cb), NULL); | |
9554 | 668 gaim_signal_connect(conv_handle, "chat-buddy-flags", |
669 plugin, GAIM_CALLBACK(chat_buddy_flags_cb), NULL); | |
6485 | 670 gaim_signal_connect(conv_handle, "chat-buddy-leaving", |
671 plugin, GAIM_CALLBACK(chat_buddy_leaving_cb), NULL); | |
672 gaim_signal_connect(conv_handle, "chat-buddy-left", | |
673 plugin, GAIM_CALLBACK(chat_buddy_left_cb), NULL); | |
674 gaim_signal_connect(conv_handle, "chat-inviting-user", | |
675 plugin, GAIM_CALLBACK(chat_inviting_user_cb), NULL); | |
676 gaim_signal_connect(conv_handle, "chat-invited-user", | |
677 plugin, GAIM_CALLBACK(chat_invited_user_cb), NULL); | |
678 gaim_signal_connect(conv_handle, "chat-invited", | |
679 plugin, GAIM_CALLBACK(chat_invited_cb), NULL); | |
680 gaim_signal_connect(conv_handle, "chat-joined", | |
681 plugin, GAIM_CALLBACK(chat_joined_cb), NULL); | |
682 gaim_signal_connect(conv_handle, "chat-left", | |
683 plugin, GAIM_CALLBACK(chat_left_cb), NULL); | |
9517 | 684 gaim_signal_connect(conv_handle, "chat-topic-changed", |
685 plugin, GAIM_CALLBACK(chat_topic_changed_cb), NULL); | |
6485 | 686 |
10684
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
687 /* Ciphers signals */ |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
688 gaim_signal_connect(ciphers_handle, "cipher-added", |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
689 plugin, GAIM_CALLBACK(cipher_added_cb), NULL); |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
690 gaim_signal_connect(ciphers_handle, "cipher-removed", |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
691 plugin, GAIM_CALLBACK(cipher_removed_cb), NULL); |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
692 |
6485 | 693 /* Core signals */ |
694 gaim_signal_connect(core_handle, "quitting", | |
695 plugin, GAIM_CALLBACK(quitting_cb), NULL); | |
696 | |
11281
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
697 /* file transfer signals */ |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
698 gaim_signal_connect(ft_handle, "file-recv-accept", |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
699 plugin, GAIM_CALLBACK(ft_recv_accept_cb), NULL); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
700 gaim_signal_connect(ft_handle, "file-recv-start", |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
701 plugin, GAIM_CALLBACK(ft_recv_start_cb), NULL); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
702 gaim_signal_connect(ft_handle, "file-recv-cancel", |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
703 plugin, GAIM_CALLBACK(ft_recv_cancel_cb), NULL); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
704 gaim_signal_connect(ft_handle, "file-recv-complete", |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
705 plugin, GAIM_CALLBACK(ft_recv_complete_cb), NULL); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
706 gaim_signal_connect(ft_handle, "file-send-accept", |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
707 plugin, GAIM_CALLBACK(ft_send_accept_cb), NULL); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
708 gaim_signal_connect(ft_handle, "file-send-start", |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
709 plugin, GAIM_CALLBACK(ft_send_start_cb), NULL); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
710 gaim_signal_connect(ft_handle, "file-send-cancel", |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
711 plugin, GAIM_CALLBACK(ft_send_cancel_cb), NULL); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
712 gaim_signal_connect(ft_handle, "file-send-complete", |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
713 plugin, GAIM_CALLBACK(ft_send_complete_cb), NULL); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
714 |
6485 | 715 return TRUE; |
716 } | |
717 | |
718 static GaimPluginInfo info = | |
719 { | |
9954 | 720 GAIM_PLUGIN_MAGIC, |
721 GAIM_MAJOR_VERSION, | |
722 GAIM_MINOR_VERSION, | |
6485 | 723 GAIM_PLUGIN_STANDARD, /**< type */ |
724 NULL, /**< ui_requirement */ | |
725 0, /**< flags */ | |
726 NULL, /**< dependencies */ | |
727 GAIM_PRIORITY_DEFAULT, /**< priority */ | |
728 | |
729 SIGNAL_TEST_PLUGIN_ID, /**< id */ | |
730 N_("Signals Test"), /**< name */ | |
731 VERSION, /**< version */ | |
732 /** summary */ | |
733 N_("Test to see that all signals are working properly."), | |
734 /** description */ | |
735 N_("Test to see that all signals are working properly."), | |
736 "Christian Hammond <chipx86@gnupdate.org>", /**< author */ | |
737 GAIM_WEBSITE, /**< homepage */ | |
738 | |
739 plugin_load, /**< load */ | |
11256
bb0d7b719af2
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11064
diff
changeset
|
740 NULL, /**< unload */ |
6485 | 741 NULL, /**< destroy */ |
742 | |
743 NULL, /**< ui_info */ | |
8993 | 744 NULL, /**< extra_info */ |
745 NULL, | |
746 NULL | |
6485 | 747 }; |
748 | |
749 static void | |
750 init_plugin(GaimPlugin *plugin) | |
751 { | |
752 } | |
753 | |
754 GAIM_INIT_PLUGIN(signalstest, init_plugin, info) |