diff options
author | Cosimo Cecchi <cosimo.cecchi@collabora.co.uk> | 2009-02-17 19:03:58 +0800 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2009-06-01 23:46:05 +0800 |
commit | 92778cc0fa77a252763dee87ed1f95f9c7e95cb1 (patch) | |
tree | 72912595c76168526d34caa82537395f7ed42171 /libempathy/empathy-ft-factory.c | |
parent | 98284c362f9bea1558a0b0c89f8f8d6a93c63074 (diff) | |
download | gsoc2013-empathy-92778cc0fa77a252763dee87ed1f95f9c7e95cb1.tar gsoc2013-empathy-92778cc0fa77a252763dee87ed1f95f9c7e95cb1.tar.gz gsoc2013-empathy-92778cc0fa77a252763dee87ed1f95f9c7e95cb1.tar.bz2 gsoc2013-empathy-92778cc0fa77a252763dee87ed1f95f9c7e95cb1.tar.lz gsoc2013-empathy-92778cc0fa77a252763dee87ed1f95f9c7e95cb1.tar.xz gsoc2013-empathy-92778cc0fa77a252763dee87ed1f95f9c7e95cb1.tar.zst gsoc2013-empathy-92778cc0fa77a252763dee87ed1f95f9c7e95cb1.zip |
W.I.P. for heavy lifting on EmpathyTpFile.
Diffstat (limited to 'libempathy/empathy-ft-factory.c')
-rw-r--r-- | libempathy/empathy-ft-factory.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/libempathy/empathy-ft-factory.c b/libempathy/empathy-ft-factory.c index c76ff2d61..5f62f99e7 100644 --- a/libempathy/empathy-ft-factory.c +++ b/libempathy/empathy-ft-factory.c @@ -113,6 +113,22 @@ empathy_ft_factory_init (EmpathyFTFactory *self) self->priv = priv; } +static void +ft_handler_incoming_ready_cb (EmpathyFTHandler *handler, + GError *error, + gpointer user_data) +{ + EmpathyFTFactory *factory = user_data; + + if (error != NULL) + { + /* TODO: error handling */ + return; + } + + g_signal_emit (factory, signals[NEW_FT_HANDLER], 0, handler, FALSE); +} + /* public methods */ EmpathyFTFactory* @@ -143,7 +159,6 @@ empathy_ft_factory_claim_channel (EmpathyFTFactory *factory, EmpathyDispatchOperation *operation, GFile *destination) { - EmpathyFTHandler *handler; EmpathyTpFile *tp_file; g_return_if_fail (EMPATHY_IS_FT_FACTORY (factory)); @@ -152,12 +167,9 @@ empathy_ft_factory_claim_channel (EmpathyFTFactory *factory, tp_file = EMPATHY_TP_FILE (empathy_dispatch_operation_get_channel_wrapper (operation)); - handler = empathy_ft_handler_new_incoming (tp_file, destination); + empathy_ft_handler_new_incoming (tp_file, destination, + ft_handler_incoming_ready_cb, factory); empathy_dispatch_operation_claim (operation); - - g_signal_emit (factory, signals[NEW_FT_HANDLER], 0, handler, FALSE); - - g_object_unref (handler); } |