[empathy] add empathy_tp_call_get_connection_manager
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [empathy] add empathy_tp_call_get_connection_manager
- Date: Mon, 16 Nov 2009 11:58:58 +0000 (UTC)
commit 3fa2b952c259dc6b44ce3f7e1e599e6ce9350b59
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Mon Nov 9 12:03:53 2009 +0000
add empathy_tp_call_get_connection_manager
libempathy/empathy-tp-call.c | 21 +++++++++++++++++++++
libempathy/empathy-tp-call.h | 2 ++
2 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/libempathy/empathy-tp-call.c b/libempathy/empathy-tp-call.c
index cb9e35c..6d0941c 100644
--- a/libempathy/empathy-tp-call.c
+++ b/libempathy/empathy-tp-call.c
@@ -773,3 +773,24 @@ empathy_tp_call_is_sending_video (EmpathyTpCall *call)
return priv->video->direction & TP_MEDIA_STREAM_DIRECTION_SEND ?
TRUE : FALSE;
}
+
+const gchar *
+empathy_tp_call_get_connection_manager (EmpathyTpCall *self)
+{
+ EmpathyTpCallPriv *priv = GET_PRIV (self);
+ TpConnection *conn;
+ TpAccount *account;
+
+ if (priv->channel == NULL)
+ return NULL;
+
+ conn = tp_channel_borrow_connection (priv->channel);
+ if (conn == NULL)
+ return NULL;
+
+ account = empathy_get_account_for_connection (conn);
+ if (account == NULL)
+ return NULL;
+
+ return tp_account_get_connection_manager (account);
+}
diff --git a/libempathy/empathy-tp-call.h b/libempathy/empathy-tp-call.h
index a00fe3e..476b10a 100644
--- a/libempathy/empathy-tp-call.h
+++ b/libempathy/empathy-tp-call.h
@@ -88,6 +88,8 @@ gboolean empathy_tp_call_has_dtmf (EmpathyTpCall *call);
gboolean empathy_tp_call_is_receiving_video (EmpathyTpCall *call);
gboolean empathy_tp_call_is_sending_video (EmpathyTpCall *call);
+const gchar * empathy_tp_call_get_connection_manager (EmpathyTpCall *self);
+
G_END_DECLS
#endif /* __EMPATHY_TP_CALL_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]