aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-12-12 17:40:18 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-12-12 17:40:18 +0800
commit0b68efef3a59d0d9c64d51462cdb199055d8da81 (patch)
treef1667f4b11a65d5c229400592f52d3013dbf898d /libempathy
parenta278a9f7441876f7f7015097bd954bb24fb712bb (diff)
downloadgsoc2013-empathy-0b68efef3a59d0d9c64d51462cdb199055d8da81.tar
gsoc2013-empathy-0b68efef3a59d0d9c64d51462cdb199055d8da81.tar.gz
gsoc2013-empathy-0b68efef3a59d0d9c64d51462cdb199055d8da81.tar.bz2
gsoc2013-empathy-0b68efef3a59d0d9c64d51462cdb199055d8da81.tar.lz
gsoc2013-empathy-0b68efef3a59d0d9c64d51462cdb199055d8da81.tar.xz
gsoc2013-empathy-0b68efef3a59d0d9c64d51462cdb199055d8da81.tar.zst
gsoc2013-empathy-0b68efef3a59d0d9c64d51462cdb199055d8da81.zip
add empathy_tp_contact_list_can_add (Guillaume Desmottes)
svn path=/trunk/; revision=1961
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-tp-contact-list.c16
-rw-r--r--libempathy/empathy-tp-contact-list.h1
2 files changed, 17 insertions, 0 deletions
diff --git a/libempathy/empathy-tp-contact-list.c b/libempathy/empathy-tp-contact-list.c
index 4f1534bd0..2013c60cf 100644
--- a/libempathy/empathy-tp-contact-list.c
+++ b/libempathy/empathy-tp-contact-list.c
@@ -1103,3 +1103,19 @@ tp_contact_list_iface_init (EmpathyContactListIface *iface)
iface->remove_group = tp_contact_list_remove_group;
}
+gboolean
+empathy_tp_contact_list_can_add (EmpathyTpContactList *list)
+{
+ EmpathyTpContactListPriv *priv;
+ TpChannelGroupFlags flags;
+
+ g_return_val_if_fail (EMPATHY_IS_TP_CONTACT_LIST (list), FALSE);
+
+ priv = GET_PRIV (list);
+
+ if (priv->subscribe == NULL)
+ return FALSE;
+
+ flags = empathy_tp_group_get_flags (priv->subscribe);
+ return (flags & TP_CHANNEL_GROUP_FLAG_CAN_ADD) != 0;
+}
diff --git a/libempathy/empathy-tp-contact-list.h b/libempathy/empathy-tp-contact-list.h
index 863711e18..c6e173a93 100644
--- a/libempathy/empathy-tp-contact-list.h
+++ b/libempathy/empathy-tp-contact-list.h
@@ -51,6 +51,7 @@ struct _EmpathyTpContactListClass {
GType empathy_tp_contact_list_get_type (void) G_GNUC_CONST;
EmpathyTpContactList * empathy_tp_contact_list_new (McAccount *account);
McAccount * empathy_tp_contact_list_get_account (EmpathyTpContactList *list);
+gboolean empathy_tp_contact_list_can_add (EmpathyTpContactList *list);
G_END_DECLS