]> git.0d.be Git - empathy.git/commitdiff
add empathy_tp_call_get_connection_manager
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 9 Nov 2009 12:03:53 +0000 (12:03 +0000)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 16 Nov 2009 11:58:25 +0000 (11:58 +0000)
libempathy/empathy-tp-call.c
libempathy/empathy-tp-call.h

index cb9e35cde21e9b80f1aae3572ba56e94d44529d4..6d0941c396d47115cb8b78b9b942576dfc2c644c 100644 (file)
@@ -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);
+}
index a00fe3e40ac290fa13242d5805844e591712f319..476b10a0de786689ccf5b536b0865c9dee471922 100644 (file)
@@ -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__ */