aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2008-11-22 00:15:17 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-11-22 00:15:17 +0800
commit825607ce45c9aa7a07044318369f2e6bc245e756 (patch)
treec08cc9e205f2d5d578d30633b28763e31a376ff7 /libempathy
parentcc593f89c7e0651c69c28f6a1a15114a2ea7ac80 (diff)
downloadgsoc2013-empathy-825607ce45c9aa7a07044318369f2e6bc245e756.tar
gsoc2013-empathy-825607ce45c9aa7a07044318369f2e6bc245e756.tar.gz
gsoc2013-empathy-825607ce45c9aa7a07044318369f2e6bc245e756.tar.bz2
gsoc2013-empathy-825607ce45c9aa7a07044318369f2e6bc245e756.tar.lz
gsoc2013-empathy-825607ce45c9aa7a07044318369f2e6bc245e756.tar.xz
gsoc2013-empathy-825607ce45c9aa7a07044318369f2e6bc245e756.tar.zst
gsoc2013-empathy-825607ce45c9aa7a07044318369f2e6bc245e756.zip
Implemented empathy_file_cancel. (Jonny Lamb)
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk> svn path=/trunk/; revision=1760
Diffstat (limited to 'libempathy')
-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