[empathy: 5/148] Set more meaningful names for EmpathyFTHandler public methods.
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: svn-commits-list gnome org
- Subject: [empathy: 5/148] Set more meaningful names for EmpathyFTHandler public methods.
- Date: Mon, 1 Jun 2009 12:08:00 -0400 (EDT)
commit 0390c52061551390ea77877700c18e7ae57afc08
Author: Cosimo Cecchi <cosimo cecchi collabora co uk>
Date: Thu Feb 5 15:16:41 2009 +0100
Set more meaningful names for EmpathyFTHandler public methods.
---
libempathy/empathy-ft-handler.c | 15 +++++++++------
libempathy/empathy-ft-handler.h | 7 ++++---
2 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/libempathy/empathy-ft-handler.c b/libempathy/empathy-ft-handler.c
index bc5490a..292df0d 100644
--- a/libempathy/empathy-ft-handler.c
+++ b/libempathy/empathy-ft-handler.c
@@ -593,23 +593,24 @@ ft_handler_contact_ready_cb (EmpathyContact *contact,
/* public methods */
EmpathyFTHandler*
-empathy_ft_handler_new (EmpathyContact *contact,
- GFile *file)
+empathy_ft_handler_new_outgoing (EmpathyContact *contact,
+ GFile *source)
{
g_return_val_if_fail (EMPATHY_IS_CONTACT (contact), NULL);
g_return_val_if_fail (G_IS_FILE (file), NULL);
return g_object_new (EMPATHY_TYPE_FT_HANDLER,
- "contact", contact, "gfile", file, NULL);
+ "contact", contact, "gfile", source, NULL);
}
EmpathyFTHandler *
-empathy_ft_handler_new_for_channel (EmpathyTpFile *file)
+empathy_ft_handler_new_incoming (EmpathyTpFile *tp_file,
+ GFile *destination)
{
g_return_val_if_fail (EMPATHY_IS_TP_FILE (file), NULL);
return g_object_new (EMPATHY_TYPE_FT_HANDLER,
- "tp-file", file, NULL);
+ "tp-file", tp_file, "gfile", destination, NULL);
}
void
@@ -617,6 +618,7 @@ empathy_ft_handler_start_transfer (EmpathyFTHandler *handler)
{
RequestData *data;
EmpathyFTHandlerPriv *priv;
+ GError *error = NULL;
g_return_if_fail (EMPATHY_IS_FT_HANDLER (handler));
@@ -631,6 +633,7 @@ empathy_ft_handler_start_transfer (EmpathyFTHandler *handler)
}
else
{
- /* TODO: */
+ /* TODO: add support for resume. */
+ empathy_tp_file_accept (priv->tpfile, 0, priv->gfile, &error);
}
}
diff --git a/libempathy/empathy-ft-handler.h b/libempathy/empathy-ft-handler.h
index a76db10..57dcc0c 100644
--- a/libempathy/empathy-ft-handler.h
+++ b/libempathy/empathy-ft-handler.h
@@ -56,9 +56,10 @@ typedef struct {
GType empathy_ft_handler_get_type (void);
/* public methods */
-EmpathyFTHandler * empathy_ft_handler_new (EmpathyContact *contact,
- GFile *file);
-EmpathyFTHandler * empathy_ft_handler_new_for_channel (EmpathyTpFile *file);
+EmpathyFTHandler * empathy_ft_handler_new_outgoing (EmpathyContact *contact,
+ GFile *source);
+EmpathyFTHandler * empathy_ft_handler_new_incoming (EmpathyTpFile *tp_file,
+ GFile *destination);
void empathy_ft_handler_start_transfer (EmpathyFTHandler *handler);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]