aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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