Mercurial > pidgin.yaz
comparison plugins/signals-test.c @ 11281:920a37a4c1be
[gaim-migrate @ 13478]
Patch from Sadrul Habib Chowdhury, with a bit of hacking from me, to add file transfer signals
committer: Tailor Script <tailor@pidgin.im>
author | Gary Kramlich <grim@reaperworld.com> |
---|---|
date | Tue, 16 Aug 2005 20:44:27 +0000 |
parents | bb0d7b719af2 |
children | 201617d49573 |
comparison
equal
deleted
inserted
replaced
11280:65658ff2deb8 | 11281:920a37a4c1be |
---|---|
26 #include "cipher.h" | 26 #include "cipher.h" |
27 #include "connection.h" | 27 #include "connection.h" |
28 #include "conversation.h" | 28 #include "conversation.h" |
29 #include "core.h" | 29 #include "core.h" |
30 #include "debug.h" | 30 #include "debug.h" |
31 #include "ft.h" | |
31 #include "signals.h" | 32 #include "signals.h" |
32 #include "version.h" | 33 #include "version.h" |
33 | 34 |
34 /************************************************************************** | 35 /************************************************************************** |
35 * Account subsystem signal callbacks | 36 * Account subsystem signal callbacks |
475 { | 476 { |
476 gaim_debug_misc("signals test", "quitting ()\n"); | 477 gaim_debug_misc("signals test", "quitting ()\n"); |
477 } | 478 } |
478 | 479 |
479 /************************************************************************** | 480 /************************************************************************** |
481 * File transfer signal callbacks | |
482 **************************************************************************/ | |
483 static void | |
484 ft_recv_accept_cb(GaimXfer *xfer, gpointer data) { | |
485 gaim_debug_misc("signals test", "file receive accepted\n"); | |
486 } | |
487 | |
488 static void | |
489 ft_send_accept_cb(GaimXfer *xfer, gpointer data) { | |
490 gaim_debug_misc("signals test", "file send accepted\n"); | |
491 } | |
492 | |
493 static void | |
494 ft_recv_start_cb(GaimXfer *xfer, gpointer data) { | |
495 gaim_debug_misc("signals test", "file receive started\n"); | |
496 } | |
497 | |
498 static void | |
499 ft_send_start_cb(GaimXfer *xfer, gpointer data) { | |
500 gaim_debug_misc("signals test", "file send started\n"); | |
501 } | |
502 | |
503 static void | |
504 ft_recv_cancel_cb(GaimXfer *xfer, gpointer data) { | |
505 gaim_debug_misc("signals test", "file receive canceled\n"); | |
506 } | |
507 | |
508 static void | |
509 ft_send_cancel_cb(GaimXfer *xfer, gpointer data) { | |
510 gaim_debug_misc("signals test", "file send canceled\n"); | |
511 } | |
512 | |
513 static void | |
514 ft_recv_complete_cb(GaimXfer *xfer, gpointer data) { | |
515 gaim_debug_misc("signals test", "file receive completed\n"); | |
516 } | |
517 | |
518 static void | |
519 ft_send_complete_cb(GaimXfer *xfer, gpointer data) { | |
520 gaim_debug_misc("signals test", "file send completed\n"); | |
521 } | |
522 | |
523 /************************************************************************** | |
480 * Plugin stuff | 524 * Plugin stuff |
481 **************************************************************************/ | 525 **************************************************************************/ |
482 static gboolean | 526 static gboolean |
483 plugin_load(GaimPlugin *plugin) | 527 plugin_load(GaimPlugin *plugin) |
484 { | 528 { |
487 void *conn_handle = gaim_connections_get_handle(); | 531 void *conn_handle = gaim_connections_get_handle(); |
488 void *conv_handle = gaim_conversations_get_handle(); | 532 void *conv_handle = gaim_conversations_get_handle(); |
489 void *accounts_handle = gaim_accounts_get_handle(); | 533 void *accounts_handle = gaim_accounts_get_handle(); |
490 void *ciphers_handle = gaim_ciphers_get_handle(); | 534 void *ciphers_handle = gaim_ciphers_get_handle(); |
491 void *buddy_icons_handle = gaim_buddy_icons_get_handle(); | 535 void *buddy_icons_handle = gaim_buddy_icons_get_handle(); |
536 void *ft_handle = gaim_xfers_get_handle(); | |
492 | 537 |
493 /* Accounts subsystem signals */ | 538 /* Accounts subsystem signals */ |
494 gaim_signal_connect(accounts_handle, "account-connecting", | 539 gaim_signal_connect(accounts_handle, "account-connecting", |
495 plugin, GAIM_CALLBACK(account_connecting_cb), NULL); | 540 plugin, GAIM_CALLBACK(account_connecting_cb), NULL); |
496 gaim_signal_connect(accounts_handle, "account-away", | 541 gaim_signal_connect(accounts_handle, "account-away", |
606 | 651 |
607 /* Core signals */ | 652 /* Core signals */ |
608 gaim_signal_connect(core_handle, "quitting", | 653 gaim_signal_connect(core_handle, "quitting", |
609 plugin, GAIM_CALLBACK(quitting_cb), NULL); | 654 plugin, GAIM_CALLBACK(quitting_cb), NULL); |
610 | 655 |
656 /* file transfer signals */ | |
657 gaim_signal_connect(ft_handle, "file-recv-accept", | |
658 plugin, GAIM_CALLBACK(ft_recv_accept_cb), NULL); | |
659 gaim_signal_connect(ft_handle, "file-recv-start", | |
660 plugin, GAIM_CALLBACK(ft_recv_start_cb), NULL); | |
661 gaim_signal_connect(ft_handle, "file-recv-cancel", | |
662 plugin, GAIM_CALLBACK(ft_recv_cancel_cb), NULL); | |
663 gaim_signal_connect(ft_handle, "file-recv-complete", | |
664 plugin, GAIM_CALLBACK(ft_recv_complete_cb), NULL); | |
665 gaim_signal_connect(ft_handle, "file-send-accept", | |
666 plugin, GAIM_CALLBACK(ft_send_accept_cb), NULL); | |
667 gaim_signal_connect(ft_handle, "file-send-start", | |
668 plugin, GAIM_CALLBACK(ft_send_start_cb), NULL); | |
669 gaim_signal_connect(ft_handle, "file-send-cancel", | |
670 plugin, GAIM_CALLBACK(ft_send_cancel_cb), NULL); | |
671 gaim_signal_connect(ft_handle, "file-send-complete", | |
672 plugin, GAIM_CALLBACK(ft_send_complete_cb), NULL); | |
673 | |
611 return TRUE; | 674 return TRUE; |
612 } | 675 } |
613 | 676 |
614 static GaimPluginInfo info = | 677 static GaimPluginInfo info = |
615 { | 678 { |