From: Xavier Claessens Date: Sat, 14 Feb 2009 15:22:30 +0000 (+0100) Subject: Add empathy_tp_chat_get_connection() to direct access the channel's connection. X-Git-Url: https://git.0d.be/?p=empathy.git;a=commitdiff_plain;h=20075065ac090531ca887c900bf8b0cb367a0336;ds=sidebyside Add empathy_tp_chat_get_connection() to direct access the channel's connection. --- diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c index 3ecc3dc6..b9b73138 100644 --- a/libempathy/empathy-tp-chat.c +++ b/libempathy/empathy-tp-chat.c @@ -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) { diff --git a/libempathy/empathy-tp-chat.h b/libempathy/empathy-tp-chat.h index 2645bec5..fadc5f63 100644 --- a/libempathy/empathy-tp-chat.h +++ b/libempathy/empathy-tp-chat.h @@ -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);