aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-call-handler.c21
-rw-r--r--libempathy/empathy-call-handler.h3
2 files changed, 22 insertions, 2 deletions
diff --git a/libempathy/empathy-call-handler.c b/libempathy/empathy-call-handler.c
index 8d70885b4..90df179bc 100644
--- a/libempathy/empathy-call-handler.c
+++ b/libempathy/empathy-call-handler.c
@@ -1,6 +1,6 @@
/*
* empathy-call-handler.c - Source for EmpathyCallHandler
- * Copyright (C) 2008 Collabora Ltd.
+ * Copyright (C) 2008-2009 Collabora Ltd.
* @author Sjoerd Simons <sjoerd.simons@collabora.co.uk>
*
* This library is free software; you can redistribute it and/or
@@ -577,3 +577,22 @@ empathy_call_handler_start_call (EmpathyCallHandler *handler)
g_object_unref (dispatcher);
}
+/**
+ * empathy_call_handler_stop_call:
+ * @handler: an #EmpathyCallHandler
+ *
+ * Closes the #EmpathyCallHandler's call and frees its resources.
+ */
+void
+empathy_call_handler_stop_call (EmpathyCallHandler *handler)
+{
+ EmpathyCallHandlerPriv *priv = GET_PRIV (handler);
+
+ if (priv->call != NULL)
+ {
+ empathy_tp_call_close (priv->call);
+ g_object_unref (priv->call);
+ }
+
+ priv->call = NULL;
+} \ No newline at end of file
diff --git a/libempathy/empathy-call-handler.h b/libempathy/empathy-call-handler.h
index 9a039f06a..112a3139a 100644
--- a/libempathy/empathy-call-handler.h
+++ b/libempathy/empathy-call-handler.h
@@ -1,6 +1,6 @@
/*
* empathy-call-handler.h - Header for EmpathyCallHandler
- * Copyright (C) 2008 Collabora Ltd.
+ * Copyright (C) 2008-2009 Collabora Ltd.
* @author Sjoerd Simons <sjoerd.simons@collabora.co.uk>
*
* This library is free software; you can redistribute it and/or
@@ -71,6 +71,7 @@ EmpathyCallHandler * empathy_call_handler_new_for_channel (
EmpathyTpCall *call);
void empathy_call_handler_start_call (EmpathyCallHandler *handler);
+void empathy_call_handler_stop_call (EmpathyCallHandler *handler);
void empathy_call_handler_bus_message (EmpathyCallHandler *handler,
GstBus *bus, GstMessage *message);