diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2008-12-12 17:40:21 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2008-12-12 17:40:21 +0800 |
commit | a5bbfafd202f1d2e2019650481075c798cab9bfd (patch) | |
tree | 9836b9ac3c1f40265eb17fade7f558057f62ccf6 | |
parent | 0b68efef3a59d0d9c64d51462cdb199055d8da81 (diff) | |
download | gsoc2013-empathy-a5bbfafd202f1d2e2019650481075c798cab9bfd.tar gsoc2013-empathy-a5bbfafd202f1d2e2019650481075c798cab9bfd.tar.gz gsoc2013-empathy-a5bbfafd202f1d2e2019650481075c798cab9bfd.tar.bz2 gsoc2013-empathy-a5bbfafd202f1d2e2019650481075c798cab9bfd.tar.lz gsoc2013-empathy-a5bbfafd202f1d2e2019650481075c798cab9bfd.tar.xz gsoc2013-empathy-a5bbfafd202f1d2e2019650481075c798cab9bfd.tar.zst gsoc2013-empathy-a5bbfafd202f1d2e2019650481075c798cab9bfd.zip |
add empathy_contact_manager_can_add (Guillaume Desmottes)
svn path=/trunk/; revision=1962
-rw-r--r-- | libempathy/empathy-contact-manager.c | 15 | ||||
-rw-r--r-- | libempathy/empathy-contact-manager.h | 2 |
2 files changed, 17 insertions, 0 deletions
diff --git a/libempathy/empathy-contact-manager.c b/libempathy/empathy-contact-manager.c index 48ac1598b..200f9ea37 100644 --- a/libempathy/empathy-contact-manager.c +++ b/libempathy/empathy-contact-manager.c @@ -507,3 +507,18 @@ contact_manager_iface_init (EmpathyContactListIface *iface) iface->remove_group = contact_manager_remove_group; } +gboolean +empathy_contact_manager_can_add (EmpathyContactManager *manager, + McAccount *account) +{ + EmpathyContactManagerPriv *priv = GET_PRIV (manager); + EmpathyTpContactList *list; + + g_return_val_if_fail (EMPATHY_IS_CONTACT_MANAGER (manager), FALSE); + + list = g_hash_table_lookup (priv->lists, account); + if (list == NULL) + return FALSE; + + return empathy_tp_contact_list_can_add (list); +} diff --git a/libempathy/empathy-contact-manager.h b/libempathy/empathy-contact-manager.h index b744b44e4..80118a014 100644 --- a/libempathy/empathy-contact-manager.h +++ b/libempathy/empathy-contact-manager.h @@ -55,6 +55,8 @@ GType empathy_contact_manager_get_type (void) G_GNUC_CONST; EmpathyContactManager *empathy_contact_manager_new (void); EmpathyTpContactList * empathy_contact_manager_get_list (EmpathyContactManager *manager, McAccount *account); +gboolean empathy_contact_manager_can_add (EmpathyContactManager *manager, + McAccount *account); G_END_DECLS |