diff options
author | Cosimo Cecchi <cosimo.cecchi@collabora.co.uk> | 2009-02-05 22:26:08 +0800 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2009-06-01 23:46:04 +0800 |
commit | aab63c16b9ded12295e0fa354757c77b002a6fbd (patch) | |
tree | 52df9e21c9a22fd360aaaf0ebd0cb9702ad48751 | |
parent | 0ff13177916385b78b069c851b1b9442c57dbbb2 (diff) | |
download | gsoc2013-empathy-aab63c16b9ded12295e0fa354757c77b002a6fbd.tar gsoc2013-empathy-aab63c16b9ded12295e0fa354757c77b002a6fbd.tar.gz gsoc2013-empathy-aab63c16b9ded12295e0fa354757c77b002a6fbd.tar.bz2 gsoc2013-empathy-aab63c16b9ded12295e0fa354757c77b002a6fbd.tar.lz gsoc2013-empathy-aab63c16b9ded12295e0fa354757c77b002a6fbd.tar.xz gsoc2013-empathy-aab63c16b9ded12295e0fa354757c77b002a6fbd.tar.zst gsoc2013-empathy-aab63c16b9ded12295e0fa354757c77b002a6fbd.zip |
Implement empathy_ft_factory_claim_channel and make naming uniform.
-rw-r--r-- | libempathy/empathy-ft-factory.c | 23 | ||||
-rw-r--r-- | libempathy/empathy-ft-factory.h | 4 |
2 files changed, 20 insertions, 7 deletions
diff --git a/libempathy/empathy-ft-factory.c b/libempathy/empathy-ft-factory.c index 038e592ec..c76ff2d61 100644 --- a/libempathy/empathy-ft-factory.c +++ b/libempathy/empathy-ft-factory.c @@ -124,15 +124,15 @@ empathy_ft_factory_dup_singleton (void) void empathy_ft_factory_new_transfer (EmpathyFTFactory *factory, EmpathyContact *contact, - GFile *file) + GFile *source) { EmpathyFTHandler *handler; g_return_if_fail (EMPATHY_IS_FT_FACTORY (factory)); g_return_if_fail (EMPATHY_IS_CONTACT (contact)); - g_return_if_fail (G_IS_FILE (file)); + g_return_if_fail (G_IS_FILE (source)); - handler = empathy_ft_handler_new_outgoing (contact, file); + handler = empathy_ft_handler_new_outgoing (contact, source); g_signal_emit (factory, signals[NEW_FT_HANDLER], 0, handler, TRUE); g_object_unref (handler); @@ -140,11 +140,24 @@ empathy_ft_factory_new_transfer (EmpathyFTFactory *factory, void empathy_ft_factory_claim_channel (EmpathyFTFactory *factory, - EmpathyDispatchOperation *operation) + EmpathyDispatchOperation *operation, + GFile *destination) { + EmpathyFTHandler *handler; + EmpathyTpFile *tp_file; + g_return_if_fail (EMPATHY_IS_FT_FACTORY (factory)); g_return_if_fail (EMPATHY_IS_DISPATCH_OPERATION (operation)); + g_return_if_fail (G_IS_FILE (destination)); + + tp_file = EMPATHY_TP_FILE + (empathy_dispatch_operation_get_channel_wrapper (operation)); + handler = empathy_ft_handler_new_incoming (tp_file, destination); - /* TODO */ + empathy_dispatch_operation_claim (operation); + + g_signal_emit (factory, signals[NEW_FT_HANDLER], 0, handler, FALSE); + + g_object_unref (handler); } diff --git a/libempathy/empathy-ft-factory.h b/libempathy/empathy-ft-factory.h index d838499f6..745d1520e 100644 --- a/libempathy/empathy-ft-factory.h +++ b/libempathy/empathy-ft-factory.h @@ -58,9 +58,9 @@ GType empathy_ft_factory_get_type (void); /* public methods */ EmpathyFTFactory* empathy_ft_factory_dup_singleton (void); void empathy_ft_factory_new_transfer (EmpathyFTFactory *factory, - EmpathyContact *contact, GFile *file); + EmpathyContact *contact, GFile *source); void empathy_ft_factory_claim_channel (EmpathyFTFactory *factory, - EmpathyDispatchOperation *operation); + EmpathyDispatchOperation *operation, GFile *destination); G_END_DECLS |