aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.co.uk>2009-09-02 03:12:25 +0800
committerOlivier CrĂȘte <olivier.crete@collabora.co.uk>2009-09-02 05:14:43 +0800
commitb7c5ae7a1ae29b6acedfffde3d4319d3cfe15bc9 (patch)
treecb4c59c853c1b7531f9d29ca8fd1e2d85d4c6c7e /libempathy
parentcd494555f232b36409361f4a35cdd8b35cd9ed63 (diff)
downloadgsoc2013-empathy-b7c5ae7a1ae29b6acedfffde3d4319d3cfe15bc9.tar.gz
gsoc2013-empathy-b7c5ae7a1ae29b6acedfffde3d4319d3cfe15bc9.tar.zst
gsoc2013-empathy-b7c5ae7a1ae29b6acedfffde3d4319d3cfe15bc9.zip
Add stream-closed signal to EmpathyCallHandler for when a stream is closed
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-call-handler.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/libempathy/empathy-call-handler.c b/libempathy/empathy-call-handler.c
index 1c6e53c6c..0c2a84a05 100644
--- a/libempathy/empathy-call-handler.c
+++ b/libempathy/empathy-call-handler.c
@@ -42,6 +42,7 @@ enum {
SINK_PAD_ADDED,
REQUEST_RESOURCE,
CLOSED,
+ STREAM_CLOSED,
LAST_SIGNAL
};
@@ -254,6 +255,12 @@ empathy_call_handler_class_init (EmpathyCallHandlerClass *klass)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE,
0);
+
+ signals[STREAM_CLOSED] =
+ g_signal_new ("stream-closed", G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST, 0, NULL, NULL,
+ g_cclosure_marshal_VOID__OBJECT,
+ G_TYPE_NONE, 1, TF_TYPE_STREAM);
}
/**
@@ -351,6 +358,13 @@ empathy_call_handler_tf_stream_request_resource_cb (TfStream *stream,
}
static void
+empathy_call_handler_tf_stream_closed_cb (TfStream *stream,
+ EmpathyCallHandler *handler)
+{
+ g_signal_emit (handler, signals[STREAM_CLOSED], 0, stream);
+}
+
+static void
empathy_call_handler_tf_channel_stream_created_cb (TfChannel *tfchannel,
TfStream *stream, EmpathyCallHandler *handler)
{
@@ -362,6 +376,8 @@ empathy_call_handler_tf_channel_stream_created_cb (TfChannel *tfchannel,
g_signal_connect (stream, "request-resource",
G_CALLBACK (empathy_call_handler_tf_stream_request_resource_cb),
handler);
+ g_signal_connect (stream, "closed",
+ G_CALLBACK (empathy_call_handler_tf_stream_closed_cb), handler);
g_object_get (stream, "media-type", &media_type,
"sink-pad", &spad, NULL);