aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorTravis Reitter <travis.reitter@collabora.co.uk>2010-10-13 13:45:53 +0800
committerTravis Reitter <travis.reitter@collabora.co.uk>2010-10-16 05:14:45 +0800
commita4cd05f5f8aeb4067652e4806f0e125b221d8ad1 (patch)
tree777a41c69dff847e47ad3d29797fa9c50b1825e9 /libempathy
parent4f39984ad575e8ee643e3cf52ad519386c23009e (diff)
downloadgsoc2013-empathy-a4cd05f5f8aeb4067652e4806f0e125b221d8ad1.tar
gsoc2013-empathy-a4cd05f5f8aeb4067652e4806f0e125b221d8ad1.tar.gz
gsoc2013-empathy-a4cd05f5f8aeb4067652e4806f0e125b221d8ad1.tar.bz2
gsoc2013-empathy-a4cd05f5f8aeb4067652e4806f0e125b221d8ad1.tar.lz
gsoc2013-empathy-a4cd05f5f8aeb4067652e4806f0e125b221d8ad1.tar.xz
gsoc2013-empathy-a4cd05f5f8aeb4067652e4806f0e125b221d8ad1.tar.zst
gsoc2013-empathy-a4cd05f5f8aeb4067652e4806f0e125b221d8ad1.zip
Use Folks to check if a TpConnection can alias and group personas.
Helps bgo#625969.
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-utils.c28
-rw-r--r--libempathy/empathy-utils.h2
2 files changed, 30 insertions, 0 deletions
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
index e6dc34303..6bbd53f86 100644
--- a/libempathy/empathy-utils.c
+++ b/libempathy/empathy-utils.c
@@ -822,6 +822,34 @@ empathy_connection_can_add_personas (TpConnection *connection)
FOLKS_MAYBE_BOOL_TRUE);
}
+gboolean
+empathy_connection_can_alias_personas (TpConnection *connection)
+{
+ FolksPersonaStore *persona_store;
+
+ g_return_val_if_fail (TP_IS_CONNECTION (connection), FALSE);
+
+ persona_store = FOLKS_PERSONA_STORE (
+ empathy_get_persona_store_for_connection (connection));
+
+ return (folks_persona_store_get_can_alias_personas (persona_store) ==
+ FOLKS_MAYBE_BOOL_TRUE);
+}
+
+gboolean
+empathy_connection_can_group_personas (TpConnection *connection)
+{
+ FolksPersonaStore *persona_store;
+
+ g_return_val_if_fail (TP_IS_CONNECTION (connection), FALSE);
+
+ persona_store = FOLKS_PERSONA_STORE (
+ empathy_get_persona_store_for_connection (connection));
+
+ return (folks_persona_store_get_can_group_personas (persona_store) ==
+ FOLKS_MAYBE_BOOL_TRUE);
+}
+
gchar *
empathy_get_x509_certificate_hostname (gnutls_x509_crt_t cert)
{
diff --git a/libempathy/empathy-utils.h b/libempathy/empathy-utils.h
index 7b9f897fb..3c89962c1 100644
--- a/libempathy/empathy-utils.h
+++ b/libempathy/empathy-utils.h
@@ -102,6 +102,8 @@ EmpathyContact * empathy_contact_dup_from_folks_individual (FolksIndividual *ind
TpChannelGroupChangeReason tp_channel_group_change_reason_from_folks_groups_change_reason (FolksGroupableChangeReason reason);
TpfPersonaStore * empathy_get_persona_store_for_connection (TpConnection *connection);
gboolean empathy_connection_can_add_personas (TpConnection *connection);
+gboolean empathy_connection_can_alias_personas (TpConnection *connection);
+gboolean empathy_connection_can_group_personas (TpConnection *connection);
gchar * empathy_get_x509_certificate_hostname (gnutls_x509_crt_t cert);