aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2008-11-22 00:15:17 +0800
committerxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2008-11-22 00:15:17 +0800
commitbba8b2d445580c59b7612da7999b0b688c6676cf (patch)
treec08cc9e205f2d5d578d30633b28763e31a376ff7
parentb04592ec6b697418e0216c84e975e5dd57a472f2 (diff)
downloadgsoc2013-empathy-bba8b2d445580c59b7612da7999b0b688c6676cf.tar
gsoc2013-empathy-bba8b2d445580c59b7612da7999b0b688c6676cf.tar.gz
gsoc2013-empathy-bba8b2d445580c59b7612da7999b0b688c6676cf.tar.bz2
gsoc2013-empathy-bba8b2d445580c59b7612da7999b0b688c6676cf.tar.lz
gsoc2013-empathy-bba8b2d445580c59b7612da7999b0b688c6676cf.tar.xz
gsoc2013-empathy-bba8b2d445580c59b7612da7999b0b688c6676cf.tar.zst
gsoc2013-empathy-bba8b2d445580c59b7612da7999b0b688c6676cf.zip
Implemented empathy_file_cancel. (Jonny Lamb)
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk> git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1760 4ee84921-47dd-4033-b63a-18d7a039a3e4
-rw-r--r--libempathy/empathy-file.c12
-rw-r--r--libempathy/empathy-file.h1
2 files changed, 13 insertions, 0 deletions
diff --git a/libempathy/empathy-file.c b/libempathy/empathy-file.c
index c3e028a7a..0c0d0dd51 100644
--- a/libempathy/empathy-file.c
+++ b/libempathy/empathy-file.c
@@ -894,6 +894,18 @@ empathy_file_get_remaining_time (EmpathyFile *file)
}
void
+empathy_file_cancel (EmpathyFile *file)
+{
+ EmpathyFilePriv *priv;
+
+ priv = GET_PRIV (file);
+
+ g_cancellable_cancel (priv->cancellable);
+
+ tp_cli_channel_run_close (priv->channel, -1, NULL, NULL);
+}
+
+void
empathy_file_set_input_stream (EmpathyFile *file,
GInputStream *in_stream)
{
diff --git a/libempathy/empathy-file.h b/libempathy/empathy-file.h
index 15c968a83..06153a67a 100644
--- a/libempathy/empathy-file.h
+++ b/libempathy/empathy-file.h
@@ -84,6 +84,7 @@ void empathy_file_set_output_stream (Em
GOutputStream *uri);
void empathy_file_set_filename (EmpathyFile *file,
const gchar *filename);
+void empathy_file_cancel (EmpathyFile *file);
G_END_DECLS