aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-contact-manager.c
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimo.cecchi@collabora.co.uk>2009-08-01 16:32:39 +0800
committerCosimo Cecchi <cosimo.cecchi@collabora.co.uk>2009-08-01 16:32:39 +0800
commit3e8f25168aadd741ecc0fe8da4d1847eece5ff83 (patch)
tree69b2fc8984c98b9cad38d2ca5e8563da2b9aad8a /libempathy/empathy-contact-manager.c
parent41e5b31c1918f40c3ba47bff2dc9ab682fe0391f (diff)
parent87070d25c5f2d9a0ecba73e8ce913eca7f183c79 (diff)
downloadgsoc2013-empathy-3e8f25168aadd741ecc0fe8da4d1847eece5ff83.tar
gsoc2013-empathy-3e8f25168aadd741ecc0fe8da4d1847eece5ff83.tar.gz
gsoc2013-empathy-3e8f25168aadd741ecc0fe8da4d1847eece5ff83.tar.bz2
gsoc2013-empathy-3e8f25168aadd741ecc0fe8da4d1847eece5ff83.tar.lz
gsoc2013-empathy-3e8f25168aadd741ecc0fe8da4d1847eece5ff83.tar.xz
gsoc2013-empathy-3e8f25168aadd741ecc0fe8da4d1847eece5ff83.tar.zst
gsoc2013-empathy-3e8f25168aadd741ecc0fe8da4d1847eece5ff83.zip
Merge branch 'sjoerd-mc5' into mc5
Conflicts: libempathy-gtk/empathy-account-widget.c libempathy-gtk/empathy-protocol-chooser.c
Diffstat (limited to 'libempathy/empathy-contact-manager.c')
-rw-r--r--libempathy/empathy-contact-manager.c34
1 files changed, 28 insertions, 6 deletions
diff --git a/libempathy/empathy-contact-manager.c b/libempathy/empathy-contact-manager.c
index 7af2bd349..302fad3c5 100644
--- a/libempathy/empathy-contact-manager.c
+++ b/libempathy/empathy-contact-manager.c
@@ -204,6 +204,23 @@ contact_manager_constructor (GType type,
return retval;
}
+/**
+ * empathy_contact_manager_initialized:
+ *
+ * Reports whether or not the singleton has already been created.
+ *
+ * There can be instances where you want to access the #EmpathyContactManager
+ * only if it has been set up for this process.
+ *
+ * Returns: %TRUE if the #EmpathyContactManager singleton has previously
+ * been initialized.
+ */
+gboolean
+empathy_contact_manager_initialized (void)
+{
+ return (manager_singleton != NULL);
+}
+
static void
empathy_contact_manager_class_init (EmpathyContactManagerClass *klass)
{
@@ -527,19 +544,24 @@ contact_manager_iface_init (EmpathyContactListIface *iface)
iface->remove_group = contact_manager_remove_group;
}
-gboolean
-empathy_contact_manager_can_add (EmpathyContactManager *manager,
- TpConnection *connection)
+EmpathyContactListFlags
+empathy_contact_manager_get_flags_for_connection (
+ EmpathyContactManager *manager,
+ TpConnection *connection)
{
EmpathyContactManagerPriv *priv = GET_PRIV (manager);
- EmpathyTpContactList *list;
+ EmpathyContactList *list;
+ EmpathyContactListFlags flags;
g_return_val_if_fail (EMPATHY_IS_CONTACT_MANAGER (manager), FALSE);
+ g_return_val_if_fail (connection != NULL, FALSE);
list = g_hash_table_lookup (priv->lists, connection);
- if (list == NULL)
+ if (list == NULL) {
return FALSE;
+ }
+ flags = empathy_contact_list_get_flags (list);
- return empathy_tp_contact_list_can_add (list);
+ return flags;
}