From 825607ce45c9aa7a07044318369f2e6bc245e756 Mon Sep 17 00:00:00 2001 From: Jonny Lamb Date: Fri, 21 Nov 2008 16:15:17 +0000 Subject: Implemented empathy_file_cancel. (Jonny Lamb) Signed-off-by: Jonny Lamb svn path=/trunk/; revision=1760 --- libempathy/empathy-file.c | 12 ++++++++++++ libempathy/empathy-file.h | 1 + 2 files changed, 13 insertions(+) (limited to 'libempathy') 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 @@ -893,6 +893,18 @@ empathy_file_get_remaining_time (EmpathyFile *file) return (gint) (remaining_time + 0.5); } +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 -- cgit v1.2.3