]> git.0d.be Git - empathy.git/commitdiff
Add a function to explicitly close File channels
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>
Fri, 9 Jan 2009 16:12:47 +0000 (16:12 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Fri, 9 Jan 2009 16:12:47 +0000 (16:12 +0000)
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
svn path=/trunk/; revision=2140

libempathy/empathy-tp-file.c
libempathy/empathy-tp-file.h

index ada0a435475426350a7f86ca6b78c93e59e43e9b..25f93713c1e9af6cae1ea1ce427dc57b8978fa76 100644 (file)
@@ -913,12 +913,19 @@ empathy_tp_file_cancel (EmpathyTpFile *tp_file)
 {
   g_return_if_fail (EMPATHY_IS_TP_FILE (tp_file));
 
-  tp_cli_channel_call_close (tp_file->priv->channel, -1, NULL, NULL, NULL, NULL);
+  tp_cli_channel_call_close (tp_file->priv->channel, -1,
+    NULL, NULL, NULL, NULL);
 
   if (tp_file->priv->cancellable != NULL)
     g_cancellable_cancel (tp_file->priv->cancellable);
 }
 
+void
+empathy_tp_file_close (EmpathyTpFile *tp_file)
+{
+  empathy_tp_file_cancel (tp_file);
+}
+
 static void
 empathy_tp_file_class_init (EmpathyTpFileClass *klass)
 {
index 7beb3a151bf2f3a1cbe12e26aa2901d741ce00f6..ad25eb275caca6e670b4cc502472d73a30b8b362 100644 (file)
@@ -70,6 +70,7 @@ TpChannel *empathy_tp_file_get_channel (EmpathyTpFile *tp_file);
 void empathy_tp_file_accept (EmpathyTpFile *tp_file, guint64 offset,
   GFile *gfile, GError **error);
 void empathy_tp_file_cancel (EmpathyTpFile *tp_file);
+void empathy_tp_file_close (EmpathyTpFile *tp_file);
 void empathy_tp_file_offer (EmpathyTpFile *tp_file, GFile *gfile,
   GError **error);