summaryrefslogtreecommitdiff
path: root/telepathy-glib/contact.c
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.co.uk>2012-02-08 14:37:01 +0100
committerXavier Claessens <xavier.claessens@collabora.co.uk>2012-04-16 20:43:31 +0200
commit299785c6addba3d40c35a4caa9cf479b2905bf92 (patch)
treef29d1c164d094ac500198d3dd285500fd26f31d1 /telepathy-glib/contact.c
parent7b7fad6ef2d9211489891c66d497b4b720d1b53c (diff)
downloadtelepathy-glib-299785c6addba3d40c35a4caa9cf479b2905bf92.tar.gz
Add tp_contact_get_account()
Diffstat (limited to 'telepathy-glib/contact.c')
-rw-r--r--telepathy-glib/contact.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/telepathy-glib/contact.c b/telepathy-glib/contact.c
index da74b1593..367cb4066 100644
--- a/telepathy-glib/contact.c
+++ b/telepathy-glib/contact.c
@@ -259,6 +259,27 @@ struct _TpContactPrivate {
/**
+ * tp_contact_get_account:
+ * @self: a contact
+ *
+ * Return the #TpAccount of @self's #TpContact:connection.
+ * See tp_connection_get_account() for details.
+ *
+ * Returns: (transfer none): a borrowed reference to @self's account
+ * (it must be referenced with g_object_ref if it must remain valid
+ * longer than the contact)
+ *
+ * Since: 0.UNRELEASED
+ */
+TpAccount *
+tp_contact_get_account (TpContact *self)
+{
+ g_return_val_if_fail (TP_IS_CONTACT (self), NULL);
+
+ return tp_connection_get_account (self->priv->connection);
+}
+
+/**
* tp_contact_get_connection:
* @self: a contact
*
@@ -278,7 +299,6 @@ tp_contact_get_connection (TpContact *self)
return self->priv->connection;
}
-
/**
* tp_contact_get_handle:
* @self: a contact