Thu, 07 Apr 2005 14:41:18 +0000
[gaim-migrate @ 12429]
" You can't pass NULL as errormsg as the documentation
implies. If you do, it segfaults. Perhaps that should be
allowable, but as the code stands, it's not. The
documentation should be updated in HEAD and oldstatus
to reflect this. Attached is a patch to that effect." --rlaager
committer: Luke Schierer <lschiere@pidgin.im>
| 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
0325b164a7eb
[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" | |
| 31 | #include "signals.h" | |
| 9954 | 32 | #include "version.h" |
| 6485 | 33 | |
| 34 | /************************************************************************** | |
| 35 | * Account subsystem signal callbacks | |
| 36 | **************************************************************************/ | |
| 37 | static void | |
| 38 | account_connecting_cb(GaimAccount *account, void *data) | |
| 39 | { | |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
40 | gaim_debug_misc("signals test", "account-connecting (%s)\n", |
|
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
41 | gaim_account_get_username(account)); |
| 6485 | 42 | } |
| 43 | ||
| 44 | static void | |
| 45 | account_away_cb(GaimAccount *account, const char *state, | |
| 46 | const char *message, void *data) | |
| 47 | { | |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
48 | gaim_debug_misc("signals test", "account-away (%s, %s, %s)\n", |
|
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
49 | gaim_account_get_username(account), state, message); |
| 6485 | 50 | } |
| 51 | ||
| 52 | static void | |
| 53 | account_setting_info_cb(GaimAccount *account, const char *info, void *data) | |
| 54 | { | |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
55 | gaim_debug_misc("signals test", "account-setting-info (%s, %s)\n", |
|
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
56 | gaim_account_get_username(account), info); |
| 6485 | 57 | } |
| 58 | ||
| 59 | static void | |
| 60 | account_set_info_cb(GaimAccount *account, const char *info, void *data) | |
| 61 | { | |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
62 | gaim_debug_misc("signals test", "account-set-info (%s, %s)\n", |
|
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
63 | gaim_account_get_username(account), info); |
| 6485 | 64 | } |
| 65 | ||
| 66 | static void | |
| 67 | account_warned_cb(GaimAccount *account, const char *warner, int level, | |
| 68 | void *data) | |
| 69 | { | |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
70 | gaim_debug_misc("signals test", "account-warned (%s, %s, %d)\n", |
|
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
71 | gaim_account_get_username(account), warner, level); |
| 6485 | 72 | } |
| 73 | ||
| 74 | /************************************************************************** | |
| 75 | * Buddy List subsystem signal callbacks | |
| 76 | **************************************************************************/ | |
| 77 | static void | |
|
7009
a5de8e4108fd
[gaim-migrate @ 7568]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
78 | buddy_away_cb(GaimBuddy *buddy, void *data) |
| 6485 | 79 | { |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
80 | gaim_debug_misc("signals test", "buddy-away (%s)\n", buddy->name); |
| 6485 | 81 | } |
| 82 | ||
| 83 | static void | |
|
7009
a5de8e4108fd
[gaim-migrate @ 7568]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
84 | buddy_back_cb(GaimBuddy *buddy, void *data) |
| 6485 | 85 | { |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
86 | gaim_debug_misc("signals test", "buddy-back (%s)\n", buddy->name); |
| 6485 | 87 | } |
| 88 | ||
| 89 | static void | |
|
7009
a5de8e4108fd
[gaim-migrate @ 7568]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
90 | buddy_idle_cb(GaimBuddy *buddy, void *data) |
| 6485 | 91 | { |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
92 | gaim_debug_misc("signals test", "buddy-idle (%s)\n", buddy->name); |
| 6485 | 93 | } |
| 94 | ||
| 95 | static void | |
|
7009
a5de8e4108fd
[gaim-migrate @ 7568]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
96 | buddy_unidle_cb(GaimBuddy *buddy, void *data) |
| 6485 | 97 | { |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
98 | gaim_debug_misc("signals test", "buddy-unidle (%s)\n", buddy->name); |
| 6485 | 99 | } |
| 100 | ||
| 101 | static void | |
|
7009
a5de8e4108fd
[gaim-migrate @ 7568]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
102 | buddy_signed_on_cb(GaimBuddy *buddy, void *data) |
| 6485 | 103 | { |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
104 | gaim_debug_misc("signals test", "buddy-signed-on (%s)\n", buddy->name); |
| 6485 | 105 | } |
| 106 | ||
| 107 | static void | |
|
7009
a5de8e4108fd
[gaim-migrate @ 7568]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
108 | buddy_signed_off_cb(GaimBuddy *buddy, void *data) |
| 6485 | 109 | { |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
110 | gaim_debug_misc("signals test", "buddy-signed-off (%s)\n", buddy->name); |
| 6485 | 111 | } |
| 112 | ||
| 8999 | 113 | static void |
| 9051 | 114 | blist_node_extended_menu_cb(GaimBlistNode *node, void *data) |
| 8999 | 115 | { |
| 9051 | 116 | GaimContact *p = (GaimContact *)node; |
| 117 | GaimBuddy *b = (GaimBuddy *)node; | |
| 118 | GaimChat *c = (GaimChat *)node; | |
| 119 | GaimGroup *g = (GaimGroup *)node; | |
| 8999 | 120 | |
| 9051 | 121 | if (GAIM_BLIST_NODE_IS_CONTACT(node)) |
| 122 | gaim_debug_misc("signals test", "blist-node-extended-menu (Contact: %s)\n", p->alias); | |
| 123 | else if (GAIM_BLIST_NODE_IS_BUDDY(node)) | |
| 124 | gaim_debug_misc("signals test", "blist-node-extended-menu (Buddy: %s)\n", b->name); | |
| 125 | else if (GAIM_BLIST_NODE_IS_CHAT(node)) | |
| 126 | gaim_debug_misc("signals test", "blist-node-extended-menu (Chat: %s)\n", c->alias); | |
| 127 | else if (GAIM_BLIST_NODE_IS_GROUP(node)) | |
| 128 | gaim_debug_misc("signals test", "blist-node-extended-menu (Group: %s)\n", g->name); | |
| 129 | else | |
| 130 | gaim_debug_misc("signals test", "blist-node-extended-menu (UNKNOWN: %d)\n", node->type); | |
| 131 | ||
| 8999 | 132 | } |
| 133 | ||
| 134 | ||
| 6485 | 135 | /************************************************************************** |
| 136 | * Connection subsystem signal callbacks | |
| 137 | **************************************************************************/ | |
| 138 | static void | |
| 139 | signing_on_cb(GaimConnection *gc, void *data) | |
| 140 | { | |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
141 | gaim_debug_misc("signals test", "signing-on (%s)\n", |
|
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
142 | gaim_account_get_username(gaim_connection_get_account(gc))); |
| 6485 | 143 | } |
| 144 | ||
| 145 | static void | |
| 146 | signed_on_cb(GaimConnection *gc, void *data) | |
| 147 | { | |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
148 | gaim_debug_misc("signals test", "signed-on (%s)\n", |
|
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
149 | gaim_account_get_username(gaim_connection_get_account(gc))); |
| 6485 | 150 | } |
| 151 | ||
| 152 | static void | |
| 153 | signing_off_cb(GaimConnection *gc, void *data) | |
| 154 | { | |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
155 | gaim_debug_misc("signals test", "signing-off (%s)\n", |
|
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
156 | gaim_account_get_username(gaim_connection_get_account(gc))); |
| 6485 | 157 | } |
| 158 | ||
| 159 | static void | |
| 160 | signed_off_cb(GaimConnection *gc, void *data) | |
| 161 | { | |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
162 | gaim_debug_misc("signals test", "signed-off (%s)\n", |
|
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
163 | gaim_account_get_username(gaim_connection_get_account(gc))); |
| 6485 | 164 | } |
| 165 | ||
| 166 | /************************************************************************** | |
| 167 | * Conversation subsystem signal callbacks | |
| 168 | **************************************************************************/ | |
| 169 | static gboolean | |
| 7503 | 170 | displaying_im_msg_cb(GaimAccount *account, GaimConversation *conv, |
| 171 | char **buffer, void *data) | |
| 6485 | 172 | { |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
173 | gaim_debug_misc("signals test", "displaying-im-msg (%s, %s)\n", |
|
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
174 | gaim_conversation_get_name(conv), *buffer); |
| 6485 | 175 | |
| 176 | return FALSE; | |
| 177 | } | |
| 178 | ||
| 179 | static void | |
| 9051 | 180 | displayed_im_msg_cb(GaimAccount *account, GaimConversation *conv, const char *buffer, void *data) |
| 6485 | 181 | { |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
182 | gaim_debug_misc("signals test", "displayed-im-msg (%s, %s)\n", |
|
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
183 | gaim_conversation_get_name(conv), buffer); |
| 6485 | 184 | } |
| 185 | ||
| 9051 | 186 | static gboolean |
| 187 | writing_im_msg_cb(GaimAccount *account, GaimConversation *conv, char **buffer, void *data) | |
| 188 | { | |
| 189 | gaim_debug_misc("signals test", "writing-im-msg (%s, %s, %s)\n", | |
| 190 | gaim_account_get_username(account), gaim_conversation_get_name(conv), *buffer); | |
| 191 | ||
| 192 | return FALSE; | |
| 193 | ||
| 194 | } | |
| 195 | ||
| 196 | static void | |
| 197 | wrote_im_msg_cb(GaimAccount *account, GaimConversation *conv, const char *buffer, void *data) | |
| 198 | { | |
| 199 | gaim_debug_misc("signals test", "wrote-im-msg (%s, %s, %s)\n", | |
| 200 | gaim_account_get_username(account), gaim_conversation_get_name(conv), buffer); | |
| 201 | } | |
| 202 | ||
| 7503 | 203 | static void |
| 6509 | 204 | sending_im_msg_cb(GaimAccount *account, char *recipient, char **buffer, void *data) |
| 6485 | 205 | { |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
206 | gaim_debug_misc("signals test", "sending-im-msg (%s, %s, %s)\n", |
|
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
207 | gaim_account_get_username(account), recipient, *buffer); |
| 6485 | 208 | |
| 209 | } | |
| 210 | ||
| 211 | static void | |
| 6509 | 212 | sent_im_msg_cb(GaimAccount *account, const char *recipient, const char *buffer, void *data) |
| 6485 | 213 | { |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
214 | gaim_debug_misc("signals test", "sent-im-msg (%s, %s, %s)\n", |
|
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
215 | gaim_account_get_username(account), recipient, buffer); |
| 6485 | 216 | } |
| 217 | ||
| 218 | static gboolean | |
| 8999 | 219 | receiving_im_msg_cb(GaimAccount *account, char **sender, char **buffer, |
|
10104
081392879815
[gaim-migrate @ 11131]
Nathan Fredrickson <nathan@silverorange.com>
parents:
9954
diff
changeset
|
220 | GaimConversation *conv, int *flags, void *data) |
| 6485 | 221 | { |
|
10104
081392879815
[gaim-migrate @ 11131]
Nathan Fredrickson <nathan@silverorange.com>
parents:
9954
diff
changeset
|
222 | gaim_debug_misc("signals test", "receiving-im-msg (%s, %s, %s, %s, %d)\n", |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
223 | gaim_account_get_username(account), *sender, *buffer, |
|
10104
081392879815
[gaim-migrate @ 11131]
Nathan Fredrickson <nathan@silverorange.com>
parents:
9954
diff
changeset
|
224 | gaim_conversation_get_name(conv), *flags); |
| 6485 | 225 | |
| 226 | return FALSE; | |
| 227 | } | |
| 228 | ||
| 8999 | 229 | static void |
| 230 | received_im_msg_cb(GaimAccount *account, char *sender, char *buffer, | |
|
10104
081392879815
[gaim-migrate @ 11131]
Nathan Fredrickson <nathan@silverorange.com>
parents:
9954
diff
changeset
|
231 | GaimConversation *conv, int flags, void *data) |
| 8999 | 232 | { |
|
10104
081392879815
[gaim-migrate @ 11131]
Nathan Fredrickson <nathan@silverorange.com>
parents:
9954
diff
changeset
|
233 | gaim_debug_misc("signals test", "received-im-msg (%s, %s, %s, %s, %d)\n", |
| 8999 | 234 | gaim_account_get_username(account), sender, buffer, |
|
10104
081392879815
[gaim-migrate @ 11131]
Nathan Fredrickson <nathan@silverorange.com>
parents:
9954
diff
changeset
|
235 | gaim_conversation_get_name(conv), flags); |
| 8999 | 236 | } |
| 237 | ||
| 6485 | 238 | static gboolean |
| 7503 | 239 | displaying_chat_msg_cb(GaimAccount *account, GaimConversation *conv, |
| 240 | char **buffer, void *data) | |
| 6485 | 241 | { |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
242 | gaim_debug_misc("signals test", "displaying-chat-msg (%s, %s)\n", |
|
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
243 | gaim_conversation_get_name(conv), *buffer); |
| 6485 | 244 | |
|
6486
18da8fdbc85b
[gaim-migrate @ 7000]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
245 | return FALSE; |
| 6485 | 246 | } |
| 247 | ||
| 248 | static void | |
| 9051 | 249 | displayed_chat_msg_cb(GaimAccount *account, GaimConversation *conv, const char *buffer, void *data) |
| 6485 | 250 | { |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
251 | gaim_debug_misc("signals test", "displayed-chat-msg (%s, %s)\n", |
|
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
252 | gaim_conversation_get_name(conv), buffer); |
| 6485 | 253 | } |
| 254 | ||
| 255 | static gboolean | |
| 9051 | 256 | writing_chat_msg_cb(GaimAccount *account, GaimConversation *conv, |
| 257 | char **buffer, void *data) | |
| 258 | { | |
| 259 | gaim_debug_misc("signals test", "writing-chat-msg (%s, %s)\n", | |
| 260 | gaim_conversation_get_name(conv), *buffer); | |
| 261 | ||
| 262 | return FALSE; | |
| 263 | } | |
| 264 | ||
| 265 | static void | |
| 266 | wrote_chat_msg_cb(GaimAccount *account, GaimConversation *conv, const char *buffer, void *data) | |
| 267 | { | |
| 268 | gaim_debug_misc("signals test", "wrote-chat-msg (%s, %s)\n", | |
| 269 | gaim_conversation_get_name(conv), buffer); | |
| 270 | } | |
| 271 | ||
| 272 | static gboolean | |
| 6509 | 273 | sending_chat_msg_cb(GaimAccount *account, char **buffer, int id, void *data) |
| 6485 | 274 | { |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
275 | gaim_debug_misc("signals test", "sending-chat-msg (%s, %s, %d)\n", |
|
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
276 | gaim_account_get_username(account), *buffer, id); |
| 6485 | 277 | |
| 278 | return FALSE; | |
| 279 | } | |
| 280 | ||
| 281 | static void | |
| 6509 | 282 | sent_chat_msg_cb(GaimAccount *account, const char *buffer, int id, void *data) |
| 6485 | 283 | { |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
284 | gaim_debug_misc("signals test", "sent-chat-msg (%s, %s, %d)\n", |
|
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
285 | gaim_account_get_username(account), buffer, id); |
| 6485 | 286 | } |
| 287 | ||
| 288 | static gboolean | |
| 8999 | 289 | receiving_chat_msg_cb(GaimAccount *account, char **sender, char **buffer, |
|
10104
081392879815
[gaim-migrate @ 11131]
Nathan Fredrickson <nathan@silverorange.com>
parents:
9954
diff
changeset
|
290 | GaimConversation *chat, int *flags, void *data) |
| 6485 | 291 | { |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
292 | gaim_debug_misc("signals test", |
|
10104
081392879815
[gaim-migrate @ 11131]
Nathan Fredrickson <nathan@silverorange.com>
parents:
9954
diff
changeset
|
293 | "receiving-chat-msg (%s, %s, %s, %s, %d)\n", |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
294 | gaim_account_get_username(account), *sender, *buffer, |
|
10104
081392879815
[gaim-migrate @ 11131]
Nathan Fredrickson <nathan@silverorange.com>
parents:
9954
diff
changeset
|
295 | gaim_conversation_get_name(chat), *flags); |
| 6485 | 296 | |
| 297 | return FALSE; | |
| 298 | } | |
| 299 | ||
| 300 | static void | |
| 8999 | 301 | received_chat_msg_cb(GaimAccount *account, char *sender, char *buffer, |
|
10104
081392879815
[gaim-migrate @ 11131]
Nathan Fredrickson <nathan@silverorange.com>
parents:
9954
diff
changeset
|
302 | GaimConversation *chat, int flags, void *data) |
| 8999 | 303 | { |
| 304 | gaim_debug_misc("signals test", | |
|
10104
081392879815
[gaim-migrate @ 11131]
Nathan Fredrickson <nathan@silverorange.com>
parents:
9954
diff
changeset
|
305 | "received-chat-msg (%s, %s, %s, %s, %d)\n", |
| 8999 | 306 | gaim_account_get_username(account), sender, buffer, |
|
10104
081392879815
[gaim-migrate @ 11131]
Nathan Fredrickson <nathan@silverorange.com>
parents:
9954
diff
changeset
|
307 | gaim_conversation_get_name(chat), flags); |
| 8999 | 308 | } |
| 309 | ||
| 310 | static void | |
| 6485 | 311 | conversation_switching_cb(GaimConversation *old_conv, |
| 312 | GaimConversation *new_conv, void *data) | |
| 313 | { | |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
314 | gaim_debug_misc("signals test", "conversation-switching (%s, %s)\n", |
|
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
315 | gaim_conversation_get_name(old_conv), |
|
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
316 | gaim_conversation_get_name(new_conv)); |
| 6485 | 317 | } |
| 318 | ||
| 319 | static void | |
| 320 | conversation_switched_cb(GaimConversation *old_conv, | |
| 321 | GaimConversation *new_conv, void *data) | |
| 322 | { | |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
323 | gaim_debug_misc("signals test", "conversation-switched (%s, %s)\n", |
|
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
324 | gaim_conversation_get_name(old_conv), |
|
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
325 | gaim_conversation_get_name(new_conv)); |
| 6485 | 326 | } |
| 327 | ||
| 328 | static void | |
| 329 | conversation_created_cb(GaimConversation *conv, void *data) | |
| 330 | { | |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
331 | gaim_debug_misc("signals test", "conversation-created (%s)\n", |
|
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
332 | gaim_conversation_get_name(conv)); |
| 6485 | 333 | } |
| 334 | ||
| 335 | static void | |
| 336 | deleting_conversation_cb(GaimConversation *conv, void *data) | |
| 337 | { | |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
338 | gaim_debug_misc("signals test", "deleting-conversation (%s)\n", |
|
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
339 | gaim_conversation_get_name(conv)); |
| 6485 | 340 | } |
| 341 | ||
| 342 | static void | |
| 343 | buddy_typing_cb(GaimConversation *conv, void *data) | |
| 344 | { | |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
345 | gaim_debug_misc("signals test", "buddy-typing (%s)\n", |
|
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
346 | gaim_conversation_get_name(conv)); |
| 6485 | 347 | } |
| 348 | ||
| 9587 | 349 | static gboolean |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9517
diff
changeset
|
350 | chat_buddy_joining_cb(GaimConversation *conv, const char *user, |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9517
diff
changeset
|
351 | GaimConvChatBuddyFlags flags, void *data) |
| 6485 | 352 | { |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9517
diff
changeset
|
353 | gaim_debug_misc("signals test", "chat-buddy-joining (%s, %s, %d)\n", |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9517
diff
changeset
|
354 | gaim_conversation_get_name(conv), user, flags); |
| 9587 | 355 | |
| 356 | return FALSE; | |
| 6485 | 357 | } |
| 358 | ||
| 359 | static void | |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9517
diff
changeset
|
360 | chat_buddy_joined_cb(GaimConversation *conv, const char *user, |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9517
diff
changeset
|
361 | GaimConvChatBuddyFlags flags, void *data) |
| 6485 | 362 | { |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9517
diff
changeset
|
363 | gaim_debug_misc("signals test", "chat-buddy-joined (%s, %s, %d)\n", |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9517
diff
changeset
|
364 | gaim_conversation_get_name(conv), user, flags); |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9517
diff
changeset
|
365 | } |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9517
diff
changeset
|
366 | |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9517
diff
changeset
|
367 | static void |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9517
diff
changeset
|
368 | chat_buddy_flags_cb(GaimConversation *conv, const char *user, |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9517
diff
changeset
|
369 | GaimConvChatBuddyFlags oldflags, GaimConvChatBuddyFlags newflags, void *data) |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9517
diff
changeset
|
370 | { |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9517
diff
changeset
|
371 | gaim_debug_misc("signals test", "chat-buddy-flags (%s, %s, %d, %d)\n", |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9517
diff
changeset
|
372 | gaim_conversation_get_name(conv), user, oldflags, newflags); |
| 6485 | 373 | } |
| 374 | ||
| 9587 | 375 | static gboolean |
| 6485 | 376 | chat_buddy_leaving_cb(GaimConversation *conv, const char *user, |
| 377 | const char *reason, void *data) | |
| 378 | { | |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
379 | gaim_debug_misc("signals test", "chat-buddy-leaving (%s, %s, %s)\n", |
|
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
380 | gaim_conversation_get_name(conv), user, reason); |
| 9587 | 381 | |
| 382 | return FALSE; | |
| 6485 | 383 | } |
| 384 | ||
| 385 | static void | |
| 386 | chat_buddy_left_cb(GaimConversation *conv, const char *user, | |
| 387 | const char *reason, void *data) | |
| 388 | { | |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
389 | gaim_debug_misc("signals test", "chat-buddy-left (%s, %s, %s)\n", |
|
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
390 | gaim_conversation_get_name(conv), user, reason); |
| 6485 | 391 | } |
| 392 | ||
| 393 | static void | |
| 394 | chat_inviting_user_cb(GaimConversation *conv, const char *name, | |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9517
diff
changeset
|
395 | char **reason, void *data) |
| 6485 | 396 | { |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
397 | gaim_debug_misc("signals test", "chat-inviting-user (%s, %s, %s)\n", |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9517
diff
changeset
|
398 | gaim_conversation_get_name(conv), name, *reason); |
| 6485 | 399 | } |
| 400 | ||
| 401 | static void | |
| 402 | chat_invited_user_cb(GaimConversation *conv, const char *name, | |
| 403 | const char *reason, void *data) | |
| 404 | { | |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
405 | gaim_debug_misc("signals test", "chat-invited-user (%s, %s, %s)\n", |
|
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
406 | gaim_conversation_get_name(conv), name, reason); |
| 6485 | 407 | } |
| 408 | ||
| 409 | static void | |
| 410 | chat_invited_cb(GaimAccount *account, const char *inviter, | |
| 9514 | 411 | const char *room_name, const char *message, |
| 412 | const GHashTable *components, void *data) | |
| 6485 | 413 | { |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
414 | gaim_debug_misc("signals test", "chat-invited (%s, %s, %s, %s)\n", |
|
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
415 | gaim_account_get_username(account), inviter, |
|
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
416 | room_name, message); |
| 6485 | 417 | } |
| 418 | ||
| 419 | static void | |
| 420 | chat_joined_cb(GaimConversation *conv, void *data) | |
| 421 | { | |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
422 | gaim_debug_misc("signals test", "chat-joined (%s)\n", |
|
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
423 | gaim_conversation_get_name(conv)); |
| 6485 | 424 | } |
| 425 | ||
| 426 | static void | |
| 427 | chat_left_cb(GaimConversation *conv, void *data) | |
| 428 | { | |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
429 | gaim_debug_misc("signals test", "chat-left (%s)\n", |
|
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
430 | gaim_conversation_get_name(conv)); |
| 6485 | 431 | } |
| 432 | ||
| 9517 | 433 | static void |
| 434 | chat_topic_changed_cb(GaimConversation *conv, const char *who, | |
| 435 | const char *topic, void *data) | |
| 436 | { | |
| 437 | gaim_debug_misc("signals test", | |
| 438 | "chat-topic-changed (%s topic changed to: \"%s\" by %s)\n", | |
| 439 | gaim_conversation_get_name(conv), topic, | |
| 440 | (who) ? who : "unknown"); | |
| 441 | } | |
| 6485 | 442 | /************************************************************************** |
|
10684
0325b164a7eb
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
443 | * Ciphers signal callbacks |
|
0325b164a7eb
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
444 | **************************************************************************/ |
|
0325b164a7eb
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
445 | static void |
|
0325b164a7eb
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
446 | cipher_added_cb(GaimCipher *cipher, void *data) { |
|
0325b164a7eb
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
447 | gaim_debug_misc("signals test", "cipher %s added\n", |
|
0325b164a7eb
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
448 | gaim_cipher_get_name(cipher)); |
|
0325b164a7eb
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
449 | } |
|
0325b164a7eb
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
450 | |
|
0325b164a7eb
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
451 | static void |
|
0325b164a7eb
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
452 | cipher_removed_cb(GaimCipher *cipher, void *data) { |
|
0325b164a7eb
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
453 | gaim_debug_misc("signals test", "cipher %s removed\n", |
|
0325b164a7eb
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
454 | gaim_cipher_get_name(cipher)); |
|
0325b164a7eb
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
455 | } |
|
0325b164a7eb
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
456 | |
|
0325b164a7eb
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
457 | /************************************************************************** |
| 6485 | 458 | * Core signal callbacks |
| 459 | **************************************************************************/ | |
| 460 | static void | |
| 461 | quitting_cb(void *data) | |
| 462 | { | |
|
7517
cda1bf7428a7
[gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents:
7516
diff
changeset
|
463 | gaim_debug_misc("signals test", "quitting ()\n"); |
| 6485 | 464 | } |
| 465 | ||
| 466 | /************************************************************************** | |
| 467 | * Plugin stuff | |
| 468 | **************************************************************************/ | |
| 469 | static gboolean | |
| 470 | plugin_load(GaimPlugin *plugin) | |
| 471 | { | |
| 472 | void *core_handle = gaim_get_core(); | |
| 473 | void *blist_handle = gaim_blist_get_handle(); | |
| 474 | void *conn_handle = gaim_connections_get_handle(); | |
| 475 | void *conv_handle = gaim_conversations_get_handle(); | |
| 476 | void *accounts_handle = gaim_accounts_get_handle(); | |
|
10684
0325b164a7eb
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
477 | void *ciphers_handle = gaim_ciphers_get_handle(); |
| 6485 | 478 | |
| 479 | /* Accounts subsystem signals */ | |
| 480 | gaim_signal_connect(accounts_handle, "account-connecting", | |
| 481 | plugin, GAIM_CALLBACK(account_connecting_cb), NULL); | |
| 482 | gaim_signal_connect(accounts_handle, "account-away", | |
| 483 | plugin, GAIM_CALLBACK(account_away_cb), NULL); | |
| 484 | gaim_signal_connect(accounts_handle, "account-setting-info", | |
| 485 | plugin, GAIM_CALLBACK(account_setting_info_cb), NULL); | |
| 486 | gaim_signal_connect(accounts_handle, "account-set-info", | |
| 487 | plugin, GAIM_CALLBACK(account_set_info_cb), NULL); | |
| 488 | gaim_signal_connect(accounts_handle, "account-warned", | |
| 489 | plugin, GAIM_CALLBACK(account_warned_cb), NULL); | |
| 490 | ||
| 491 | /* Buddy List subsystem signals */ | |
| 492 | gaim_signal_connect(blist_handle, "buddy-away", | |
| 493 | plugin, GAIM_CALLBACK(buddy_away_cb), NULL); | |
| 494 | gaim_signal_connect(blist_handle, "buddy-back", | |
| 495 | plugin, GAIM_CALLBACK(buddy_back_cb), NULL); | |
| 496 | gaim_signal_connect(blist_handle, "buddy-idle", | |
| 497 | plugin, GAIM_CALLBACK(buddy_idle_cb), NULL); | |
| 498 | gaim_signal_connect(blist_handle, "buddy-unidle", | |
| 499 | plugin, GAIM_CALLBACK(buddy_unidle_cb), NULL); | |
| 500 | gaim_signal_connect(blist_handle, "buddy-signed-on", | |
| 501 | plugin, GAIM_CALLBACK(buddy_signed_on_cb), NULL); | |
| 502 | gaim_signal_connect(blist_handle, "buddy-signed-off", | |
| 503 | plugin, GAIM_CALLBACK(buddy_signed_off_cb), NULL); | |
| 9051 | 504 | gaim_signal_connect(blist_handle, "blist-node-extended-menu", |
| 505 | plugin, GAIM_CALLBACK(blist_node_extended_menu_cb), NULL); | |
| 6485 | 506 | |
| 507 | /* Connection subsystem signals */ | |
| 508 | gaim_signal_connect(conn_handle, "signing-on", | |
| 509 | plugin, GAIM_CALLBACK(signing_on_cb), NULL); | |
| 510 | gaim_signal_connect(conn_handle, "signed-on", | |
| 511 | plugin, GAIM_CALLBACK(signed_on_cb), NULL); | |
| 512 | gaim_signal_connect(conn_handle, "signing-off", | |
| 513 | plugin, GAIM_CALLBACK(signing_off_cb), NULL); | |
| 514 | gaim_signal_connect(conn_handle, "signed-off", | |
| 515 | plugin, GAIM_CALLBACK(signed_off_cb), NULL); | |
| 516 | ||
| 517 | /* Conversations subsystem signals */ | |
| 518 | gaim_signal_connect(conv_handle, "displaying-im-msg", | |
| 519 | plugin, GAIM_CALLBACK(displaying_im_msg_cb), NULL); | |
|
6489
4281626455d8
[gaim-migrate @ 7003]
Robert McQueen <robot101@debian.org>
parents:
6486
diff
changeset
|
520 | gaim_signal_connect(conv_handle, "displayed-im-msg", |
| 6485 | 521 | plugin, GAIM_CALLBACK(displayed_im_msg_cb), NULL); |
| 9051 | 522 | gaim_signal_connect(conv_handle, "writing-im-msg", |
| 523 | plugin, GAIM_CALLBACK(writing_im_msg_cb), NULL); | |
| 524 | gaim_signal_connect(conv_handle, "wrote-im-msg", | |
| 525 | plugin, GAIM_CALLBACK(wrote_im_msg_cb), NULL); | |
| 6485 | 526 | gaim_signal_connect(conv_handle, "sending-im-msg", |
| 527 | plugin, GAIM_CALLBACK(sending_im_msg_cb), NULL); | |
| 528 | gaim_signal_connect(conv_handle, "sent-im-msg", | |
| 529 | plugin, GAIM_CALLBACK(sent_im_msg_cb), NULL); | |
| 8999 | 530 | gaim_signal_connect(conv_handle, "receiving-im-msg", |
| 531 | plugin, GAIM_CALLBACK(receiving_im_msg_cb), NULL); | |
| 6485 | 532 | gaim_signal_connect(conv_handle, "received-im-msg", |
| 533 | plugin, GAIM_CALLBACK(received_im_msg_cb), NULL); | |
| 534 | gaim_signal_connect(conv_handle, "displaying-chat-msg", | |
| 535 | plugin, GAIM_CALLBACK(displaying_chat_msg_cb), NULL); | |
| 536 | gaim_signal_connect(conv_handle, "displayed-chat-msg", | |
| 537 | plugin, GAIM_CALLBACK(displayed_chat_msg_cb), NULL); | |
| 9051 | 538 | gaim_signal_connect(conv_handle, "writing-chat-msg", |
| 539 | plugin, GAIM_CALLBACK(writing_chat_msg_cb), NULL); | |
| 540 | gaim_signal_connect(conv_handle, "wrote-chat-msg", | |
| 541 | plugin, GAIM_CALLBACK(wrote_chat_msg_cb), NULL); | |
| 6485 | 542 | gaim_signal_connect(conv_handle, "sending-chat-msg", |
| 543 | plugin, GAIM_CALLBACK(sending_chat_msg_cb), NULL); | |
| 544 | gaim_signal_connect(conv_handle, "sent-chat-msg", | |
| 545 | plugin, GAIM_CALLBACK(sent_chat_msg_cb), NULL); | |
| 8999 | 546 | gaim_signal_connect(conv_handle, "receiving-chat-msg", |
| 547 | plugin, GAIM_CALLBACK(receiving_chat_msg_cb), NULL); | |
| 6485 | 548 | gaim_signal_connect(conv_handle, "received-chat-msg", |
| 549 | plugin, GAIM_CALLBACK(received_chat_msg_cb), NULL); | |
| 550 | gaim_signal_connect(conv_handle, "conversation-switching", | |
| 551 | plugin, GAIM_CALLBACK(conversation_switching_cb), NULL); | |
| 552 | gaim_signal_connect(conv_handle, "conversation-switched", | |
| 553 | plugin, GAIM_CALLBACK(conversation_switched_cb), NULL); | |
| 554 | gaim_signal_connect(conv_handle, "conversation-created", | |
| 555 | plugin, GAIM_CALLBACK(conversation_created_cb), NULL); | |
| 556 | gaim_signal_connect(conv_handle, "deleting-conversation", | |
| 557 | plugin, GAIM_CALLBACK(deleting_conversation_cb), NULL); | |
| 558 | gaim_signal_connect(conv_handle, "buddy-typing", | |
| 559 | plugin, GAIM_CALLBACK(buddy_typing_cb), NULL); | |
| 560 | gaim_signal_connect(conv_handle, "chat-buddy-joining", | |
| 561 | plugin, GAIM_CALLBACK(chat_buddy_joining_cb), NULL); | |
| 562 | gaim_signal_connect(conv_handle, "chat-buddy-joined", | |
| 563 | plugin, GAIM_CALLBACK(chat_buddy_joined_cb), NULL); | |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9517
diff
changeset
|
564 | gaim_signal_connect(conv_handle, "chat-buddy-flags", |
|
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9517
diff
changeset
|
565 | plugin, GAIM_CALLBACK(chat_buddy_flags_cb), NULL); |
| 6485 | 566 | gaim_signal_connect(conv_handle, "chat-buddy-leaving", |
| 567 | plugin, GAIM_CALLBACK(chat_buddy_leaving_cb), NULL); | |
| 568 | gaim_signal_connect(conv_handle, "chat-buddy-left", | |
| 569 | plugin, GAIM_CALLBACK(chat_buddy_left_cb), NULL); | |
| 570 | gaim_signal_connect(conv_handle, "chat-inviting-user", | |
| 571 | plugin, GAIM_CALLBACK(chat_inviting_user_cb), NULL); | |
| 572 | gaim_signal_connect(conv_handle, "chat-invited-user", | |
| 573 | plugin, GAIM_CALLBACK(chat_invited_user_cb), NULL); | |
| 574 | gaim_signal_connect(conv_handle, "chat-invited", | |
| 575 | plugin, GAIM_CALLBACK(chat_invited_cb), NULL); | |
| 576 | gaim_signal_connect(conv_handle, "chat-joined", | |
| 577 | plugin, GAIM_CALLBACK(chat_joined_cb), NULL); | |
| 578 | gaim_signal_connect(conv_handle, "chat-left", | |
| 579 | plugin, GAIM_CALLBACK(chat_left_cb), NULL); | |
| 9517 | 580 | gaim_signal_connect(conv_handle, "chat-topic-changed", |
| 581 | plugin, GAIM_CALLBACK(chat_topic_changed_cb), NULL); | |
| 6485 | 582 | |
|
10684
0325b164a7eb
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
583 | /* Ciphers signals */ |
|
0325b164a7eb
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
584 | gaim_signal_connect(ciphers_handle, "cipher-added", |
|
0325b164a7eb
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
585 | plugin, GAIM_CALLBACK(cipher_added_cb), NULL); |
|
0325b164a7eb
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
586 | gaim_signal_connect(ciphers_handle, "cipher-removed", |
|
0325b164a7eb
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
587 | plugin, GAIM_CALLBACK(cipher_removed_cb), NULL); |
|
0325b164a7eb
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10104
diff
changeset
|
588 | |
| 6485 | 589 | /* Core signals */ |
| 590 | gaim_signal_connect(core_handle, "quitting", | |
| 591 | plugin, GAIM_CALLBACK(quitting_cb), NULL); | |
| 592 | ||
| 593 | return TRUE; | |
| 594 | } | |
| 595 | ||
| 596 | static GaimPluginInfo info = | |
| 597 | { | |
| 9954 | 598 | GAIM_PLUGIN_MAGIC, |
| 599 | GAIM_MAJOR_VERSION, | |
| 600 | GAIM_MINOR_VERSION, | |
| 6485 | 601 | GAIM_PLUGIN_STANDARD, /**< type */ |
| 602 | NULL, /**< ui_requirement */ | |
| 603 | 0, /**< flags */ | |
| 604 | NULL, /**< dependencies */ | |
| 605 | GAIM_PRIORITY_DEFAULT, /**< priority */ | |
| 606 | ||
| 607 | SIGNAL_TEST_PLUGIN_ID, /**< id */ | |
| 608 | N_("Signals Test"), /**< name */ | |
| 609 | VERSION, /**< version */ | |
| 610 | /** summary */ | |
| 611 | N_("Test to see that all signals are working properly."), | |
| 612 | /** description */ | |
| 613 | N_("Test to see that all signals are working properly."), | |
| 614 | "Christian Hammond <chipx86@gnupdate.org>", /**< author */ | |
| 615 | GAIM_WEBSITE, /**< homepage */ | |
| 616 | ||
| 617 | plugin_load, /**< load */ | |
| 618 | NULL, /**< unload */ | |
| 619 | NULL, /**< destroy */ | |
| 620 | ||
| 621 | NULL, /**< ui_info */ | |
| 8993 | 622 | NULL, /**< extra_info */ |
| 623 | NULL, | |
| 624 | NULL | |
| 6485 | 625 | }; |
| 626 | ||
| 627 | static void | |
| 628 | init_plugin(GaimPlugin *plugin) | |
| 629 | { | |
| 630 | } | |
| 631 | ||
| 632 | GAIM_INIT_PLUGIN(signalstest, init_plugin, info) |