aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-04-06 17:37:28 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-04-06 17:49:48 +0800
commitae37cca09e8af88c08d2ed16400c1860fd173f7c (patch)
treefbafc6d007d3849c771590d6c78a6b5cab04ee30 /libempathy
parent048f70b95b6845759d64196b18ebe8ff7d4aba2b (diff)
downloadgsoc2013-empathy-ae37cca09e8af88c08d2ed16400c1860fd173f7c.tar
gsoc2013-empathy-ae37cca09e8af88c08d2ed16400c1860fd173f7c.tar.gz
gsoc2013-empathy-ae37cca09e8af88c08d2ed16400c1860fd173f7c.tar.bz2
gsoc2013-empathy-ae37cca09e8af88c08d2ed16400c1860fd173f7c.tar.lz
gsoc2013-empathy-ae37cca09e8af88c08d2ed16400c1860fd173f7c.tar.xz
gsoc2013-empathy-ae37cca09e8af88c08d2ed16400c1860fd173f7c.tar.zst
gsoc2013-empathy-ae37cca09e8af88c08d2ed16400c1860fd173f7c.zip
add empathy_tp_chat_get_self_contact()
https://bugzilla.gnome.org/show_bug.cgi?id=622118
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-tp-chat.c10
-rw-r--r--libempathy/empathy-tp-chat.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index 6d29807e4..1b2fe46b7 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 7c83bec77..f7998e06f 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__ */