aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2009-02-14 23:22:30 +0800
committerXavier Claessens <xclaesse@gmail.com>2009-04-22 18:17:01 +0800
commit20075065ac090531ca887c900bf8b0cb367a0336 (patch)
tree8739f50754a868a3f59138673a5ba338f8ae177a
parent7ee856ccfac6af1d7dbdcef6a84520753079893d (diff)
downloadgsoc2013-empathy-20075065ac090531ca887c900bf8b0cb367a0336.tar
gsoc2013-empathy-20075065ac090531ca887c900bf8b0cb367a0336.tar.gz
gsoc2013-empathy-20075065ac090531ca887c900bf8b0cb367a0336.tar.bz2
gsoc2013-empathy-20075065ac090531ca887c900bf8b0cb367a0336.tar.lz
gsoc2013-empathy-20075065ac090531ca887c900bf8b0cb367a0336.tar.xz
gsoc2013-empathy-20075065ac090531ca887c900bf8b0cb367a0336.tar.zst
gsoc2013-empathy-20075065ac090531ca887c900bf8b0cb367a0336.zip
Add empathy_tp_chat_get_connection() to direct access the channel's connection.
-rw-r--r--libempathy/empathy-tp-chat.c10
-rw-r--r--libempathy/empathy-tp-chat.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index 3ecc3dc6d..b9b731384 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 2645bec56..fadc5f636 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);