]> git.0d.be Git - empathy.git/commitdiff
Add empathy_tp_chat_get_connection() to direct access the channel's connection.
authorXavier Claessens <xclaesse@gmail.com>
Sat, 14 Feb 2009 15:22:30 +0000 (16:22 +0100)
committerXavier Claessens <xclaesse@gmail.com>
Wed, 22 Apr 2009 10:17:01 +0000 (12:17 +0200)
libempathy/empathy-tp-chat.c
libempathy/empathy-tp-chat.h

index 3ecc3dc6dd2c2a8e4477f3b1f5338d6148de4d1a..b9b731384f5fa7be91dd3e6d8fec7e18feac003d 100644 (file)
@@ -1231,6 +1231,16 @@ empathy_tp_chat_get_channel (EmpathyTpChat *chat)
        return priv->channel;
 }
 
+TpConnection *
+empathy_tp_chat_get_connection (EmpathyTpChat *chat)
+{
+       EmpathyTpChatPriv *priv = GET_PRIV (chat);
+
+       g_return_val_if_fail (EMPATHY_IS_TP_CHAT (chat), NULL);
+
+       return tp_channel_borrow_connection (priv->channel);
+}
+
 gboolean
 empathy_tp_chat_is_ready (EmpathyTpChat *chat)
 {
index 2645bec56ce17def140e20a1da300f9577c75748..fadc5f636ea06db8cb7f14d844d159df686ac6f1 100644 (file)
@@ -58,6 +58,7 @@ void           empathy_tp_chat_close                (EmpathyTpChat      *chat);
 const gchar *  empathy_tp_chat_get_id               (EmpathyTpChat      *chat);
 EmpathyContact*empathy_tp_chat_get_remote_contact   (EmpathyTpChat      *chat);
 TpChannel *    empathy_tp_chat_get_channel          (EmpathyTpChat      *chat);
+TpConnection * empathy_tp_chat_get_connection       (EmpathyTpChat      *chat);
 gboolean       empathy_tp_chat_is_ready             (EmpathyTpChat      *chat);
 void           empathy_tp_chat_send                 (EmpathyTpChat      *chat,
                                                     EmpathyMessage     *message);