From aab63c16b9ded12295e0fa354757c77b002a6fbd Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Thu, 5 Feb 2009 15:26:08 +0100 Subject: Implement empathy_ft_factory_claim_channel and make naming uniform. --- libempathy/empathy-ft-factory.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'libempathy/empathy-ft-factory.c') 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); } -- cgit v1.2.3