aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-tp-call.c
diff options
context:
space:
mode:
authorJonathan Tellier <jonathan.tellier@gmail.com>2009-05-21 01:49:02 +0800
committerjtellier <jonathan.tellier@collabora.co.uk>2009-06-12 20:59:10 +0800
commit62ed123c83ff2de84622abe1e2cb972a409c43ae (patch)
tree5b98ebb58a945c9b16539942cb225bf047f74b70 /libempathy/empathy-tp-call.c
parentefd01a1ef0a6be5552cc370e0870c9106fdc2908 (diff)
downloadgsoc2013-empathy-62ed123c83ff2de84622abe1e2cb972a409c43ae.tar
gsoc2013-empathy-62ed123c83ff2de84622abe1e2cb972a409c43ae.tar.gz
gsoc2013-empathy-62ed123c83ff2de84622abe1e2cb972a409c43ae.tar.bz2
gsoc2013-empathy-62ed123c83ff2de84622abe1e2cb972a409c43ae.tar.lz
gsoc2013-empathy-62ed123c83ff2de84622abe1e2cb972a409c43ae.tar.xz
gsoc2013-empathy-62ed123c83ff2de84622abe1e2cb972a409c43ae.tar.zst
gsoc2013-empathy-62ed123c83ff2de84622abe1e2cb972a409c43ae.zip
When no video is received or sent we show contacts' avatars instead of showing
black widgets.
Diffstat (limited to 'libempathy/empathy-tp-call.c')
-rw-r--r--libempathy/empathy-tp-call.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/libempathy/empathy-tp-call.c b/libempathy/empathy-tp-call.c
index 2971e0ffc..bf3fe778c 100644
--- a/libempathy/empathy-tp-call.c
+++ b/libempathy/empathy-tp-call.c
@@ -672,3 +672,40 @@ empathy_tp_call_has_dtmf (EmpathyTpCall *call)
TP_IFACE_QUARK_CHANNEL_INTERFACE_DTMF);
}
+/**
+ * empathy_tp_call_is_receiving_video:
+ * @call: the call
+ *
+ * Indicates if the call is receiving video or not.
+ *
+ * Returns: %TRUE if the call is currently receiving video, %FALSE otherwise.
+ */
+gboolean
+empathy_tp_call_is_receiving_video (EmpathyTpCall *call)
+{
+ EmpathyTpCallPriv *priv = GET_PRIV (call);
+
+ g_return_val_if_fail (EMPATHY_IS_TP_CALL (call), FALSE);
+
+ return priv->video->direction == TP_MEDIA_STREAM_DIRECTION_RECEIVE ||
+ priv->video->direction == TP_MEDIA_STREAM_DIRECTION_BIDIRECTIONAL;
+}
+
+/**
+ * empathy_tp_call_is_sending_video:
+ * @call: the call
+ *
+ * Indicates if the call is sending video or not.
+ *
+ * Returns: %TRUE if the call is currently sending video, %FALSE otherwise.
+ */
+gboolean
+empathy_tp_call_is_sending_video (EmpathyTpCall *call)
+{
+ EmpathyTpCallPriv *priv = GET_PRIV (call);
+
+ g_return_val_if_fail (EMPATHY_IS_TP_CALL (call), FALSE);
+
+ return priv->video->direction == TP_MEDIA_STREAM_DIRECTION_SEND ||
+ priv->video->direction == TP_MEDIA_STREAM_DIRECTION_BIDIRECTIONAL;
+}