#include <stdlib.h>
#include <telepathy-glib/util.h>
+#include <telepathy-glib/interfaces.h>
#include <telepathy-farsight/channel.h>
#include <telepathy-farsight/stream.h>
SINK_PAD_ADDED,
REQUEST_RESOURCE,
CLOSED,
+ STREAM_CLOSED,
LAST_SIGNAL
};
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);
}
/**
return ret;
}
+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)
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);
empathy_dispatch_operation_get_channel_wrapper (operation));
g_object_ref (priv->call);
+ g_object_notify (G_OBJECT (self), "tp-call");
empathy_call_handler_start_tpfs (self);