| 224 { |
224 { |
| 225 purple_debug_misc("signals test", "signed-off (%s)\n", |
225 purple_debug_misc("signals test", "signed-off (%s)\n", |
| 226 purple_account_get_username(purple_connection_get_account(gc))); |
226 purple_account_get_username(purple_connection_get_account(gc))); |
| 227 } |
227 } |
| 228 |
228 |
| |
229 static void |
| |
230 connection_error_cb(PurpleConnection *gc, |
| |
231 PurpleConnectionError err, |
| |
232 const gchar *desc, |
| |
233 void *data) |
| |
234 { |
| |
235 const gchar *username = |
| |
236 purple_account_get_username(purple_connection_get_account(gc)); |
| |
237 purple_debug_misc("signals test", "connection-error (%s, %u, %s)\n", |
| |
238 username, err, desc); |
| |
239 } |
| |
240 |
| 229 /************************************************************************** |
241 /************************************************************************** |
| 230 * Conversation subsystem signal callbacks |
242 * Conversation subsystem signal callbacks |
| 231 **************************************************************************/ |
243 **************************************************************************/ |
| 232 static gboolean |
244 static gboolean |
| 233 writing_im_msg_cb(PurpleAccount *account, const char *who, char **buffer, |
245 writing_im_msg_cb(PurpleAccount *account, const char *who, char **buffer, |
| 624 plugin, PURPLE_CALLBACK(signed_on_cb), NULL); |
636 plugin, PURPLE_CALLBACK(signed_on_cb), NULL); |
| 625 purple_signal_connect(conn_handle, "signing-off", |
637 purple_signal_connect(conn_handle, "signing-off", |
| 626 plugin, PURPLE_CALLBACK(signing_off_cb), NULL); |
638 plugin, PURPLE_CALLBACK(signing_off_cb), NULL); |
| 627 purple_signal_connect(conn_handle, "signed-off", |
639 purple_signal_connect(conn_handle, "signed-off", |
| 628 plugin, PURPLE_CALLBACK(signed_off_cb), NULL); |
640 plugin, PURPLE_CALLBACK(signed_off_cb), NULL); |
| |
641 purple_signal_connect(conn_handle, "connection-error", |
| |
642 plugin, PURPLE_CALLBACK(connection_error_cb), NULL); |
| 629 |
643 |
| 630 /* Conversations subsystem signals */ |
644 /* Conversations subsystem signals */ |
| 631 purple_signal_connect(conv_handle, "writing-im-msg", |
645 purple_signal_connect(conv_handle, "writing-im-msg", |
| 632 plugin, PURPLE_CALLBACK(writing_im_msg_cb), NULL); |
646 plugin, PURPLE_CALLBACK(writing_im_msg_cb), NULL); |
| 633 purple_signal_connect(conv_handle, "wrote-im-msg", |
647 purple_signal_connect(conv_handle, "wrote-im-msg", |