From 33999734f01e9f8d3a85532904bb04dcb3271f0b Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 14 Dec 2009 17:32:24 +0000 Subject: add empathy_tp_call_has_initial_video --- libempathy/empathy-tp-call.c | 22 ++++++++++++++++++++++ libempathy/empathy-tp-call.h | 2 ++ 2 files changed, 24 insertions(+) (limited to 'libempathy') diff --git a/libempathy/empathy-tp-call.c b/libempathy/empathy-tp-call.c index 6d0941c39..9d52075ff 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 476b10a0d..c5607d8d7 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__ */ -- cgit v1.2.3