Mercurial > pidgin.yaz
annotate plugins/signals-test.c @ 11454:201617d49573
[gaim-migrate @ 13693]
This commit includes a number of changes:
1. Aliases are now used consistently in chats. If the prpl uses unique screen names for chats (e.g. Jabber), then aliases are not used at all.
2. The chat list is now colorized to match the colors used in the chat itself.
3. Buddies are bolded in the chat user list.
4. Buddies are sorted above non-buddies in the chat user list.
5. The chat user list is ellipsized when possible (i.e. on GTK+ 2.6.0 or above).
6. I've accepted patch #1178248, by Matt Amato to add "buddy-added" and "buddy-removed" signals. These were used in my implementation of #3 and #4, to update the GUI when users are added or removed from the buddy list.
7. I've added a "blist-node-aliased" signal that is emitted when a buddy, contact, or chat is aliased.
8. Since it was hard to separate and I need it at some point, I'm letting it slip in... I've changed GaimConversation.log to be a GList named logs. This way, we can have multiple logs for a single conversation. This will be necessary to implement unnamed chat logging in some reasonable fasion (see my notes in the TODO file).
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Tue, 06 Sep 2005 03:04:07 +0000 |
parents | 920a37a4c1be |
children | 4d2d3104c92f |
rev | line source |
---|---|
6485 | 1 /* |
2 * Signals test plugin. | |
3 * | |
4 * Copyright (C) 2003 Christian Hammond. | |
5 * | |
6 * This program is free software; you can redistribute it and/or | |
7 * modify it under the terms of the GNU General Public License as | |
8 * published by the Free Software Foundation; either version 2 of the | |
9 * License, or (at your option) any later version. | |
10 * | |
11 * This program is distributed in the hope that it will be useful, but | |
12 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 * General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU General Public License | |
17 * along with this program; if not, write to the Free Software | |
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
19 * 02111-1307, USA. | |
20 */ | |
21 #define SIGNAL_TEST_PLUGIN_ID "core-signals-test" | |
22 | |
23 #include <stdio.h> | |
24 | |
25 #include "internal.h" | |
10684
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
26 #include "cipher.h" |
6485 | 27 #include "connection.h" |
28 #include "conversation.h" | |
29 #include "core.h" | |
30 #include "debug.h" | |
11281
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
31 #include "ft.h" |
6485 | 32 #include "signals.h" |
9954 | 33 #include "version.h" |
6485 | 34 |
35 /************************************************************************** | |
36 * Account subsystem signal callbacks | |
37 **************************************************************************/ | |
38 static void | |
39 account_connecting_cb(GaimAccount *account, void *data) | |
40 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
41 gaim_debug_misc("signals test", "account-connecting (%s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
42 gaim_account_get_username(account)); |
6485 | 43 } |
44 | |
45 static void | |
46 account_away_cb(GaimAccount *account, const char *state, | |
47 const char *message, void *data) | |
48 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
49 gaim_debug_misc("signals test", "account-away (%s, %s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
50 gaim_account_get_username(account), state, message); |
6485 | 51 } |
52 | |
53 static void | |
54 account_setting_info_cb(GaimAccount *account, const char *info, void *data) | |
55 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
56 gaim_debug_misc("signals test", "account-setting-info (%s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
57 gaim_account_get_username(account), info); |
6485 | 58 } |
59 | |
60 static void | |
61 account_set_info_cb(GaimAccount *account, const char *info, void *data) | |
62 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
63 gaim_debug_misc("signals test", "account-set-info (%s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
64 gaim_account_get_username(account), info); |
6485 | 65 } |
66 | |
67 static void | |
68 account_warned_cb(GaimAccount *account, const char *warner, int level, | |
69 void *data) | |
70 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
71 gaim_debug_misc("signals test", "account-warned (%s, %s, %d)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
72 gaim_account_get_username(account), warner, level); |
6485 | 73 } |
74 | |
75 /************************************************************************** | |
10934 | 76 * Buddy Icons signal callbacks |
77 **************************************************************************/ | |
78 static void | |
79 buddy_icon_cached_cb(GaimBuddyIcon *icon, GaimBuddy *buddy, | |
80 const char *filename, const char *old_icon) | |
81 { | |
82 gaim_debug_misc("signals test", "buddy icon cached (%s, %s, %s)\n", | |
83 gaim_buddy_get_name(buddy), filename, old_icon); | |
84 } | |
85 | |
86 /************************************************************************** | |
6485 | 87 * Buddy List subsystem signal callbacks |
88 **************************************************************************/ | |
89 static void | |
7009
d77e99c55b40
[gaim-migrate @ 7568]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
90 buddy_away_cb(GaimBuddy *buddy, void *data) |
6485 | 91 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
92 gaim_debug_misc("signals test", "buddy-away (%s)\n", buddy->name); |
6485 | 93 } |
94 | |
95 static void | |
7009
d77e99c55b40
[gaim-migrate @ 7568]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
96 buddy_back_cb(GaimBuddy *buddy, void *data) |
6485 | 97 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
98 gaim_debug_misc("signals test", "buddy-back (%s)\n", buddy->name); |
6485 | 99 } |
100 | |
101 static void | |
7009
d77e99c55b40
[gaim-migrate @ 7568]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
102 buddy_idle_cb(GaimBuddy *buddy, void *data) |
6485 | 103 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
104 gaim_debug_misc("signals test", "buddy-idle (%s)\n", buddy->name); |
6485 | 105 } |
106 | |
107 static void | |
7009
d77e99c55b40
[gaim-migrate @ 7568]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
108 buddy_unidle_cb(GaimBuddy *buddy, void *data) |
6485 | 109 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
110 gaim_debug_misc("signals test", "buddy-unidle (%s)\n", buddy->name); |
6485 | 111 } |
112 | |
113 static void | |
7009
d77e99c55b40
[gaim-migrate @ 7568]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
114 buddy_signed_on_cb(GaimBuddy *buddy, void *data) |
6485 | 115 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
116 gaim_debug_misc("signals test", "buddy-signed-on (%s)\n", buddy->name); |
6485 | 117 } |
118 | |
119 static void | |
7009
d77e99c55b40
[gaim-migrate @ 7568]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
120 buddy_signed_off_cb(GaimBuddy *buddy, void *data) |
6485 | 121 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
122 gaim_debug_misc("signals test", "buddy-signed-off (%s)\n", buddy->name); |
6485 | 123 } |
124 | |
8999 | 125 static void |
11454
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
126 buddy_added_cb(GaimBuddy *buddy, void *data) |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
127 { |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
128 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
|
129 } |
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 static void |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
132 buddy_removed_cb(GaimBuddy *buddy, void *data) |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
133 { |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
134 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
|
135 } |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
136 |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
137 static void |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
138 blist_node_aliased(GaimBlistNode *node, const char *old_alias) |
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 GaimContact *p = (GaimContact *)node; |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
141 GaimBuddy *b = (GaimBuddy *)node; |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
142 GaimChat *c = (GaimChat *)node; |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
143 GaimGroup *g = (GaimGroup *)node; |
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 if (GAIM_BLIST_NODE_IS_CONTACT(node)) |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
146 gaim_debug_misc("signals test", "blist-node-extended-menu (Contact: %s, %s)\n", p->alias, old_alias); |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
147 else if (GAIM_BLIST_NODE_IS_BUDDY(node)) |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
148 gaim_debug_misc("signals test", "blist-node-extended-menu (Buddy: %s, %s)\n", b->name, old_alias); |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
149 else if (GAIM_BLIST_NODE_IS_CHAT(node)) |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
150 gaim_debug_misc("signals test", "blist-node-extended-menu (Chat: %s, %s)\n", c->alias, old_alias); |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
151 else if (GAIM_BLIST_NODE_IS_GROUP(node)) |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
152 gaim_debug_misc("signals test", "blist-node-extended-menu (Group: %s, %s)\n", g->name, old_alias); |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
153 else |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
154 gaim_debug_misc("signals test", "blist-node-extended-menu (UNKNOWN: %d, %s)\n", node->type, old_alias); |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
155 |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
156 } |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
157 |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11281
diff
changeset
|
158 static void |
9051 | 159 blist_node_extended_menu_cb(GaimBlistNode *node, void *data) |
8999 | 160 { |
9051 | 161 GaimContact *p = (GaimContact *)node; |
162 GaimBuddy *b = (GaimBuddy *)node; | |
163 GaimChat *c = (GaimChat *)node; | |
164 GaimGroup *g = (GaimGroup *)node; | |
8999 | 165 |
9051 | 166 if (GAIM_BLIST_NODE_IS_CONTACT(node)) |
167 gaim_debug_misc("signals test", "blist-node-extended-menu (Contact: %s)\n", p->alias); | |
168 else if (GAIM_BLIST_NODE_IS_BUDDY(node)) | |
169 gaim_debug_misc("signals test", "blist-node-extended-menu (Buddy: %s)\n", b->name); | |
170 else if (GAIM_BLIST_NODE_IS_CHAT(node)) | |
171 gaim_debug_misc("signals test", "blist-node-extended-menu (Chat: %s)\n", c->alias); | |
172 else if (GAIM_BLIST_NODE_IS_GROUP(node)) | |
173 gaim_debug_misc("signals test", "blist-node-extended-menu (Group: %s)\n", g->name); | |
174 else | |
175 gaim_debug_misc("signals test", "blist-node-extended-menu (UNKNOWN: %d)\n", node->type); | |
176 | |
8999 | 177 } |
178 | |
179 | |
6485 | 180 /************************************************************************** |
181 * Connection subsystem signal callbacks | |
182 **************************************************************************/ | |
183 static void | |
184 signing_on_cb(GaimConnection *gc, void *data) | |
185 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
186 gaim_debug_misc("signals test", "signing-on (%s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
187 gaim_account_get_username(gaim_connection_get_account(gc))); |
6485 | 188 } |
189 | |
190 static void | |
191 signed_on_cb(GaimConnection *gc, void *data) | |
192 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
193 gaim_debug_misc("signals test", "signed-on (%s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
194 gaim_account_get_username(gaim_connection_get_account(gc))); |
6485 | 195 } |
196 | |
197 static void | |
198 signing_off_cb(GaimConnection *gc, void *data) | |
199 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
200 gaim_debug_misc("signals test", "signing-off (%s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
201 gaim_account_get_username(gaim_connection_get_account(gc))); |
6485 | 202 } |
203 | |
204 static void | |
205 signed_off_cb(GaimConnection *gc, void *data) | |
206 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
207 gaim_debug_misc("signals test", "signed-off (%s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
208 gaim_account_get_username(gaim_connection_get_account(gc))); |
6485 | 209 } |
210 | |
211 /************************************************************************** | |
212 * Conversation subsystem signal callbacks | |
213 **************************************************************************/ | |
214 static gboolean | |
7503 | 215 displaying_im_msg_cb(GaimAccount *account, GaimConversation *conv, |
216 char **buffer, void *data) | |
6485 | 217 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
218 gaim_debug_misc("signals test", "displaying-im-msg (%s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
219 gaim_conversation_get_name(conv), *buffer); |
6485 | 220 |
221 return FALSE; | |
222 } | |
223 | |
224 static void | |
9051 | 225 displayed_im_msg_cb(GaimAccount *account, GaimConversation *conv, const char *buffer, void *data) |
6485 | 226 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
227 gaim_debug_misc("signals test", "displayed-im-msg (%s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
228 gaim_conversation_get_name(conv), buffer); |
6485 | 229 } |
230 | |
9051 | 231 static gboolean |
232 writing_im_msg_cb(GaimAccount *account, GaimConversation *conv, char **buffer, void *data) | |
233 { | |
234 gaim_debug_misc("signals test", "writing-im-msg (%s, %s, %s)\n", | |
235 gaim_account_get_username(account), gaim_conversation_get_name(conv), *buffer); | |
236 | |
237 return FALSE; | |
238 | |
239 } | |
240 | |
241 static void | |
242 wrote_im_msg_cb(GaimAccount *account, GaimConversation *conv, const char *buffer, void *data) | |
243 { | |
244 gaim_debug_misc("signals test", "wrote-im-msg (%s, %s, %s)\n", | |
245 gaim_account_get_username(account), gaim_conversation_get_name(conv), buffer); | |
246 } | |
247 | |
7503 | 248 static void |
6509 | 249 sending_im_msg_cb(GaimAccount *account, char *recipient, char **buffer, void *data) |
6485 | 250 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
251 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
|
252 gaim_account_get_username(account), recipient, *buffer); |
6485 | 253 |
254 } | |
255 | |
256 static void | |
6509 | 257 sent_im_msg_cb(GaimAccount *account, const char *recipient, const char *buffer, void *data) |
6485 | 258 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
259 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
|
260 gaim_account_get_username(account), recipient, buffer); |
6485 | 261 } |
262 | |
263 static gboolean | |
8999 | 264 receiving_im_msg_cb(GaimAccount *account, char **sender, char **buffer, |
10104 | 265 GaimConversation *conv, int *flags, void *data) |
6485 | 266 { |
10104 | 267 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
|
268 gaim_account_get_username(account), *sender, *buffer, |
10104 | 269 gaim_conversation_get_name(conv), *flags); |
6485 | 270 |
271 return FALSE; | |
272 } | |
273 | |
8999 | 274 static void |
275 received_im_msg_cb(GaimAccount *account, char *sender, char *buffer, | |
10104 | 276 GaimConversation *conv, int flags, void *data) |
8999 | 277 { |
10104 | 278 gaim_debug_misc("signals test", "received-im-msg (%s, %s, %s, %s, %d)\n", |
8999 | 279 gaim_account_get_username(account), sender, buffer, |
10104 | 280 gaim_conversation_get_name(conv), flags); |
8999 | 281 } |
282 | |
6485 | 283 static gboolean |
7503 | 284 displaying_chat_msg_cb(GaimAccount *account, GaimConversation *conv, |
285 char **buffer, void *data) | |
6485 | 286 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
287 gaim_debug_misc("signals test", "displaying-chat-msg (%s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
288 gaim_conversation_get_name(conv), *buffer); |
6485 | 289 |
6486
fab81e4b885c
[gaim-migrate @ 7000]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
290 return FALSE; |
6485 | 291 } |
292 | |
293 static void | |
9051 | 294 displayed_chat_msg_cb(GaimAccount *account, GaimConversation *conv, const char *buffer, void *data) |
6485 | 295 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
296 gaim_debug_misc("signals test", "displayed-chat-msg (%s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
297 gaim_conversation_get_name(conv), buffer); |
6485 | 298 } |
299 | |
300 static gboolean | |
9051 | 301 writing_chat_msg_cb(GaimAccount *account, GaimConversation *conv, |
302 char **buffer, void *data) | |
303 { | |
304 gaim_debug_misc("signals test", "writing-chat-msg (%s, %s)\n", | |
305 gaim_conversation_get_name(conv), *buffer); | |
306 | |
307 return FALSE; | |
308 } | |
309 | |
310 static void | |
311 wrote_chat_msg_cb(GaimAccount *account, GaimConversation *conv, const char *buffer, void *data) | |
312 { | |
313 gaim_debug_misc("signals test", "wrote-chat-msg (%s, %s)\n", | |
314 gaim_conversation_get_name(conv), buffer); | |
315 } | |
316 | |
317 static gboolean | |
6509 | 318 sending_chat_msg_cb(GaimAccount *account, char **buffer, int id, void *data) |
6485 | 319 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
320 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
|
321 gaim_account_get_username(account), *buffer, id); |
6485 | 322 |
323 return FALSE; | |
324 } | |
325 | |
326 static void | |
6509 | 327 sent_chat_msg_cb(GaimAccount *account, const char *buffer, int id, void *data) |
6485 | 328 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
329 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
|
330 gaim_account_get_username(account), buffer, id); |
6485 | 331 } |
332 | |
333 static gboolean | |
8999 | 334 receiving_chat_msg_cb(GaimAccount *account, char **sender, char **buffer, |
10104 | 335 GaimConversation *chat, int *flags, void *data) |
6485 | 336 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
337 gaim_debug_misc("signals test", |
10104 | 338 "receiving-chat-msg (%s, %s, %s, %s, %d)\n", |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
339 gaim_account_get_username(account), *sender, *buffer, |
10104 | 340 gaim_conversation_get_name(chat), *flags); |
6485 | 341 |
342 return FALSE; | |
343 } | |
344 | |
345 static void | |
8999 | 346 received_chat_msg_cb(GaimAccount *account, char *sender, char *buffer, |
10104 | 347 GaimConversation *chat, int flags, void *data) |
8999 | 348 { |
349 gaim_debug_misc("signals test", | |
10104 | 350 "received-chat-msg (%s, %s, %s, %s, %d)\n", |
8999 | 351 gaim_account_get_username(account), sender, buffer, |
10104 | 352 gaim_conversation_get_name(chat), flags); |
8999 | 353 } |
354 | |
355 static void | |
6485 | 356 conversation_switching_cb(GaimConversation *old_conv, |
357 GaimConversation *new_conv, void *data) | |
358 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
359 gaim_debug_misc("signals test", "conversation-switching (%s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
360 gaim_conversation_get_name(old_conv), |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
361 gaim_conversation_get_name(new_conv)); |
6485 | 362 } |
363 | |
364 static void | |
365 conversation_switched_cb(GaimConversation *old_conv, | |
366 GaimConversation *new_conv, void *data) | |
367 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
368 gaim_debug_misc("signals test", "conversation-switched (%s, %s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
369 gaim_conversation_get_name(old_conv), |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
370 gaim_conversation_get_name(new_conv)); |
6485 | 371 } |
372 | |
373 static void | |
374 conversation_created_cb(GaimConversation *conv, void *data) | |
375 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
376 gaim_debug_misc("signals test", "conversation-created (%s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
377 gaim_conversation_get_name(conv)); |
6485 | 378 } |
379 | |
380 static void | |
381 deleting_conversation_cb(GaimConversation *conv, void *data) | |
382 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
383 gaim_debug_misc("signals test", "deleting-conversation (%s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
384 gaim_conversation_get_name(conv)); |
6485 | 385 } |
386 | |
387 static void | |
388 buddy_typing_cb(GaimConversation *conv, void *data) | |
389 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
390 gaim_debug_misc("signals test", "buddy-typing (%s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
391 gaim_conversation_get_name(conv)); |
6485 | 392 } |
393 | |
9587 | 394 static gboolean |
9554 | 395 chat_buddy_joining_cb(GaimConversation *conv, const char *user, |
396 GaimConvChatBuddyFlags flags, void *data) | |
6485 | 397 { |
9554 | 398 gaim_debug_misc("signals test", "chat-buddy-joining (%s, %s, %d)\n", |
399 gaim_conversation_get_name(conv), user, flags); | |
9587 | 400 |
401 return FALSE; | |
6485 | 402 } |
403 | |
404 static void | |
9554 | 405 chat_buddy_joined_cb(GaimConversation *conv, const char *user, |
406 GaimConvChatBuddyFlags flags, void *data) | |
6485 | 407 { |
9554 | 408 gaim_debug_misc("signals test", "chat-buddy-joined (%s, %s, %d)\n", |
409 gaim_conversation_get_name(conv), user, flags); | |
410 } | |
411 | |
412 static void | |
413 chat_buddy_flags_cb(GaimConversation *conv, const char *user, | |
414 GaimConvChatBuddyFlags oldflags, GaimConvChatBuddyFlags newflags, void *data) | |
415 { | |
416 gaim_debug_misc("signals test", "chat-buddy-flags (%s, %s, %d, %d)\n", | |
417 gaim_conversation_get_name(conv), user, oldflags, newflags); | |
6485 | 418 } |
419 | |
9587 | 420 static gboolean |
6485 | 421 chat_buddy_leaving_cb(GaimConversation *conv, const char *user, |
422 const char *reason, void *data) | |
423 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
424 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
|
425 gaim_conversation_get_name(conv), user, reason); |
9587 | 426 |
427 return FALSE; | |
6485 | 428 } |
429 | |
430 static void | |
431 chat_buddy_left_cb(GaimConversation *conv, const char *user, | |
432 const char *reason, void *data) | |
433 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
434 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
|
435 gaim_conversation_get_name(conv), user, reason); |
6485 | 436 } |
437 | |
438 static void | |
439 chat_inviting_user_cb(GaimConversation *conv, const char *name, | |
9554 | 440 char **reason, void *data) |
6485 | 441 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
442 gaim_debug_misc("signals test", "chat-inviting-user (%s, %s, %s)\n", |
9554 | 443 gaim_conversation_get_name(conv), name, *reason); |
6485 | 444 } |
445 | |
446 static void | |
447 chat_invited_user_cb(GaimConversation *conv, const char *name, | |
448 const char *reason, void *data) | |
449 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
450 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
|
451 gaim_conversation_get_name(conv), name, reason); |
6485 | 452 } |
453 | |
11064
e4459e8ccfb5
[gaim-migrate @ 13035]
Richard Laager <rlaager@wiktel.com>
parents:
11033
diff
changeset
|
454 static gint |
6485 | 455 chat_invited_cb(GaimAccount *account, const char *inviter, |
9514 | 456 const char *room_name, const char *message, |
457 const GHashTable *components, void *data) | |
6485 | 458 { |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
459 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
|
460 gaim_account_get_username(account), inviter, |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
461 room_name, message); |
11064
e4459e8ccfb5
[gaim-migrate @ 13035]
Richard Laager <rlaager@wiktel.com>
parents:
11033
diff
changeset
|
462 |
e4459e8ccfb5
[gaim-migrate @ 13035]
Richard Laager <rlaager@wiktel.com>
parents:
11033
diff
changeset
|
463 return 0; |
6485 | 464 } |
465 | |
466 static void | |
467 chat_joined_cb(GaimConversation *conv, void *data) | |
468 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
469 gaim_debug_misc("signals test", "chat-joined (%s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
470 gaim_conversation_get_name(conv)); |
6485 | 471 } |
472 | |
473 static void | |
474 chat_left_cb(GaimConversation *conv, void *data) | |
475 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
476 gaim_debug_misc("signals test", "chat-left (%s)\n", |
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
477 gaim_conversation_get_name(conv)); |
6485 | 478 } |
479 | |
9517 | 480 static void |
481 chat_topic_changed_cb(GaimConversation *conv, const char *who, | |
482 const char *topic, void *data) | |
483 { | |
484 gaim_debug_misc("signals test", | |
485 "chat-topic-changed (%s topic changed to: \"%s\" by %s)\n", | |
486 gaim_conversation_get_name(conv), topic, | |
487 (who) ? who : "unknown"); | |
488 } | |
6485 | 489 /************************************************************************** |
10684
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
490 * Ciphers signal callbacks |
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_added_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 added\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 static void |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
499 cipher_removed_cb(GaimCipher *cipher, void *data) { |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
500 gaim_debug_misc("signals test", "cipher %s removed\n", |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
501 gaim_cipher_get_name(cipher)); |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
502 } |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
503 |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
504 /************************************************************************** |
6485 | 505 * Core signal callbacks |
506 **************************************************************************/ | |
507 static void | |
508 quitting_cb(void *data) | |
509 { | |
7517
767d3db53e17
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
510 gaim_debug_misc("signals test", "quitting ()\n"); |
6485 | 511 } |
512 | |
513 /************************************************************************** | |
11281
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
514 * File transfer signal callbacks |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
515 **************************************************************************/ |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
516 static void |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
517 ft_recv_accept_cb(GaimXfer *xfer, gpointer data) { |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
518 gaim_debug_misc("signals test", "file receive accepted\n"); |
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 |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
521 static void |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
522 ft_send_accept_cb(GaimXfer *xfer, gpointer data) { |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
523 gaim_debug_misc("signals test", "file send accepted\n"); |
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 |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
526 static void |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
527 ft_recv_start_cb(GaimXfer *xfer, gpointer data) { |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
528 gaim_debug_misc("signals test", "file receive started\n"); |
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 |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
531 static void |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
532 ft_send_start_cb(GaimXfer *xfer, gpointer data) { |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
533 gaim_debug_misc("signals test", "file send started\n"); |
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 |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
536 static void |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
537 ft_recv_cancel_cb(GaimXfer *xfer, gpointer data) { |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
538 gaim_debug_misc("signals test", "file receive canceled\n"); |
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 |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
541 static void |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
542 ft_send_cancel_cb(GaimXfer *xfer, gpointer data) { |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
543 gaim_debug_misc("signals test", "file send canceled\n"); |
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 |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
546 static void |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
547 ft_recv_complete_cb(GaimXfer *xfer, gpointer data) { |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
548 gaim_debug_misc("signals test", "file receive completed\n"); |
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 |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
551 static void |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
552 ft_send_complete_cb(GaimXfer *xfer, gpointer data) { |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
553 gaim_debug_misc("signals test", "file send completed\n"); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
554 } |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
555 |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
556 /************************************************************************** |
6485 | 557 * Plugin stuff |
558 **************************************************************************/ | |
559 static gboolean | |
560 plugin_load(GaimPlugin *plugin) | |
561 { | |
562 void *core_handle = gaim_get_core(); | |
563 void *blist_handle = gaim_blist_get_handle(); | |
564 void *conn_handle = gaim_connections_get_handle(); | |
565 void *conv_handle = gaim_conversations_get_handle(); | |
566 void *accounts_handle = gaim_accounts_get_handle(); | |
10684
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
567 void *ciphers_handle = gaim_ciphers_get_handle(); |
10934 | 568 void *buddy_icons_handle = gaim_buddy_icons_get_handle(); |
11281
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
569 void *ft_handle = gaim_xfers_get_handle(); |
6485 | 570 |
571 /* Accounts subsystem signals */ | |
572 gaim_signal_connect(accounts_handle, "account-connecting", | |
573 plugin, GAIM_CALLBACK(account_connecting_cb), NULL); | |
574 gaim_signal_connect(accounts_handle, "account-away", | |
575 plugin, GAIM_CALLBACK(account_away_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); | |
580 gaim_signal_connect(accounts_handle, "account-warned", | |
581 plugin, GAIM_CALLBACK(account_warned_cb), NULL); | |
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); | |
662 gaim_signal_connect(conv_handle, "chat-buddy-joining", | |
663 plugin, GAIM_CALLBACK(chat_buddy_joining_cb), NULL); | |
664 gaim_signal_connect(conv_handle, "chat-buddy-joined", | |
665 plugin, GAIM_CALLBACK(chat_buddy_joined_cb), NULL); | |
9554 | 666 gaim_signal_connect(conv_handle, "chat-buddy-flags", |
667 plugin, GAIM_CALLBACK(chat_buddy_flags_cb), NULL); | |
6485 | 668 gaim_signal_connect(conv_handle, "chat-buddy-leaving", |
669 plugin, GAIM_CALLBACK(chat_buddy_leaving_cb), NULL); | |
670 gaim_signal_connect(conv_handle, "chat-buddy-left", | |
671 plugin, GAIM_CALLBACK(chat_buddy_left_cb), NULL); | |
672 gaim_signal_connect(conv_handle, "chat-inviting-user", | |
673 plugin, GAIM_CALLBACK(chat_inviting_user_cb), NULL); | |
674 gaim_signal_connect(conv_handle, "chat-invited-user", | |
675 plugin, GAIM_CALLBACK(chat_invited_user_cb), NULL); | |
676 gaim_signal_connect(conv_handle, "chat-invited", | |
677 plugin, GAIM_CALLBACK(chat_invited_cb), NULL); | |
678 gaim_signal_connect(conv_handle, "chat-joined", | |
679 plugin, GAIM_CALLBACK(chat_joined_cb), NULL); | |
680 gaim_signal_connect(conv_handle, "chat-left", | |
681 plugin, GAIM_CALLBACK(chat_left_cb), NULL); | |
9517 | 682 gaim_signal_connect(conv_handle, "chat-topic-changed", |
683 plugin, GAIM_CALLBACK(chat_topic_changed_cb), NULL); | |
6485 | 684 |
10684
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
685 /* Ciphers signals */ |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
686 gaim_signal_connect(ciphers_handle, "cipher-added", |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
687 plugin, GAIM_CALLBACK(cipher_added_cb), NULL); |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
688 gaim_signal_connect(ciphers_handle, "cipher-removed", |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
689 plugin, GAIM_CALLBACK(cipher_removed_cb), NULL); |
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
690 |
6485 | 691 /* Core signals */ |
692 gaim_signal_connect(core_handle, "quitting", | |
693 plugin, GAIM_CALLBACK(quitting_cb), NULL); | |
694 | |
11281
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
695 /* file transfer signals */ |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
696 gaim_signal_connect(ft_handle, "file-recv-accept", |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
697 plugin, GAIM_CALLBACK(ft_recv_accept_cb), NULL); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
698 gaim_signal_connect(ft_handle, "file-recv-start", |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
699 plugin, GAIM_CALLBACK(ft_recv_start_cb), NULL); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
700 gaim_signal_connect(ft_handle, "file-recv-cancel", |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
701 plugin, GAIM_CALLBACK(ft_recv_cancel_cb), NULL); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
702 gaim_signal_connect(ft_handle, "file-recv-complete", |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
703 plugin, GAIM_CALLBACK(ft_recv_complete_cb), NULL); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
704 gaim_signal_connect(ft_handle, "file-send-accept", |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
705 plugin, GAIM_CALLBACK(ft_send_accept_cb), NULL); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
706 gaim_signal_connect(ft_handle, "file-send-start", |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
707 plugin, GAIM_CALLBACK(ft_send_start_cb), NULL); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
708 gaim_signal_connect(ft_handle, "file-send-cancel", |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
709 plugin, GAIM_CALLBACK(ft_send_cancel_cb), NULL); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
710 gaim_signal_connect(ft_handle, "file-send-complete", |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
711 plugin, GAIM_CALLBACK(ft_send_complete_cb), NULL); |
920a37a4c1be
[gaim-migrate @ 13478]
Gary Kramlich <grim@reaperworld.com>
parents:
11256
diff
changeset
|
712 |
6485 | 713 return TRUE; |
714 } | |
715 | |
716 static GaimPluginInfo info = | |
717 { | |
9954 | 718 GAIM_PLUGIN_MAGIC, |
719 GAIM_MAJOR_VERSION, | |
720 GAIM_MINOR_VERSION, | |
6485 | 721 GAIM_PLUGIN_STANDARD, /**< type */ |
722 NULL, /**< ui_requirement */ | |
723 0, /**< flags */ | |
724 NULL, /**< dependencies */ | |
725 GAIM_PRIORITY_DEFAULT, /**< priority */ | |
726 | |
727 SIGNAL_TEST_PLUGIN_ID, /**< id */ | |
728 N_("Signals Test"), /**< name */ | |
729 VERSION, /**< version */ | |
730 /** summary */ | |
731 N_("Test to see that all signals are working properly."), | |
732 /** description */ | |
733 N_("Test to see that all signals are working properly."), | |
734 "Christian Hammond <chipx86@gnupdate.org>", /**< author */ | |
735 GAIM_WEBSITE, /**< homepage */ | |
736 | |
737 plugin_load, /**< load */ | |
11256
bb0d7b719af2
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11064
diff
changeset
|
738 NULL, /**< unload */ |
6485 | 739 NULL, /**< destroy */ |
740 | |
741 NULL, /**< ui_info */ | |
8993 | 742 NULL, /**< extra_info */ |
743 NULL, | |
744 NULL | |
6485 | 745 }; |
746 | |
747 static void | |
748 init_plugin(GaimPlugin *plugin) | |
749 { | |
750 } | |
751 | |
752 GAIM_INIT_PLUGIN(signalstest, init_plugin, info) |