[empathy] add empathy_tp_chat_get_self_contact()
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] add empathy_tp_chat_get_self_contact()
- Date: Wed, 6 Apr 2011 09:49:59 +0000 (UTC)
commit ae37cca09e8af88c08d2ed16400c1860fd173f7c
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Wed Apr 6 11:37:28 2011 +0200
add empathy_tp_chat_get_self_contact()
https://bugzilla.gnome.org/show_bug.cgi?id=622118
libempathy/empathy-tp-chat.c | 10 ++++++++++
libempathy/empathy-tp-chat.h | 2 ++
2 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index 6d29807..1b2fe46 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -1940,3 +1940,13 @@ empathy_tp_chat_get_chat_state (EmpathyTpChat *chat,
return tp_channel_get_chat_state (priv->channel,
empathy_contact_get_handle (contact));
}
+
+EmpathyContact *
+empathy_tp_chat_get_self_contact (EmpathyTpChat *self)
+{
+ EmpathyTpChatPriv *priv = GET_PRIV (self);
+
+ g_return_val_if_fail (EMPATHY_IS_TP_CHAT (self), NULL);
+
+ return priv->user;
+}
diff --git a/libempathy/empathy-tp-chat.h b/libempathy/empathy-tp-chat.h
index 7c83bec..f7998e0 100644
--- a/libempathy/empathy-tp-chat.h
+++ b/libempathy/empathy-tp-chat.h
@@ -110,6 +110,8 @@ TpChannelChatState
empathy_tp_chat_get_chat_state (EmpathyTpChat *chat,
EmpathyContact *contact);
+EmpathyContact * empathy_tp_chat_get_self_contact (EmpathyTpChat *self);
+
G_END_DECLS
#endif /* __EMPATHY_TP_CHAT_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]