[empathy] Add empathy_tp_chat_get_connection() to direct access the channel's connection.
- From: Xavier Claessens <xclaesse src gnome org>
- To: svn-commits-list gnome org
- Subject: [empathy] Add empathy_tp_chat_get_connection() to direct access the channel's connection.
- Date: Wed, 22 Apr 2009 06:23:05 -0400 (EDT)
commit 20075065ac090531ca887c900bf8b0cb367a0336
Author: Xavier Claessens <xclaesse gmail com>
Date: Sat Feb 14 16:22:30 2009 +0100
Add empathy_tp_chat_get_connection() to direct access the channel's connection.
---
libempathy/empathy-tp-chat.c | 10 ++++++++++
libempathy/empathy-tp-chat.h | 1 +
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index 3ecc3dc..b9b7313 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 2645bec..fadc5f6 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]