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