[empathy] add empathy_tp_call_has_initial_video



commit 33999734f01e9f8d3a85532904bb04dcb3271f0b
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Mon Dec 14 17:32:24 2009 +0000

    add empathy_tp_call_has_initial_video

 libempathy/empathy-tp-call.c |   22 ++++++++++++++++++++++
 libempathy/empathy-tp-call.h |    2 ++
 2 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/libempathy/empathy-tp-call.c b/libempathy/empathy-tp-call.c
index 6d0941c..9d52075 100644
--- a/libempathy/empathy-tp-call.c
+++ b/libempathy/empathy-tp-call.c
@@ -794,3 +794,25 @@ empathy_tp_call_get_connection_manager (EmpathyTpCall *self)
 
   return tp_account_get_connection_manager (account);
 }
+
+gboolean
+empathy_tp_call_has_initial_video (EmpathyTpCall *self)
+{
+  EmpathyTpCallPriv *priv = GET_PRIV (self);
+  GHashTable *props;
+  gboolean initial_video;
+  gboolean valid;
+
+  if (priv->channel == NULL)
+    return FALSE;
+
+  g_object_get (priv->channel, "channel-properties", &props, NULL);
+
+  initial_video = tp_asv_get_boolean (props,
+    TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA ".InitialVideo", &valid);
+  if (!valid)
+    initial_video = FALSE;
+
+  g_hash_table_unref (props);
+  return initial_video;
+}
diff --git a/libempathy/empathy-tp-call.h b/libempathy/empathy-tp-call.h
index 476b10a..c5607d8 100644
--- a/libempathy/empathy-tp-call.h
+++ b/libempathy/empathy-tp-call.h
@@ -90,6 +90,8 @@ gboolean empathy_tp_call_is_sending_video (EmpathyTpCall *call);
 
 const gchar * empathy_tp_call_get_connection_manager (EmpathyTpCall *self);
 
+gboolean empathy_tp_call_has_initial_video (EmpathyTpCall *self);
+
 G_END_DECLS
 
 #endif /* __EMPATHY_TP_CALL_H__ */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]