diff options
Diffstat (limited to 'src/contact.c')
-rw-r--r-- | src/contact.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/contact.c b/src/contact.c index 009478a0..bab3d89c 100644 --- a/src/contact.c +++ b/src/contact.c @@ -101,6 +101,20 @@ p_contact_set_groups(const PContact contact, GSList *groups) contact->groups = groups; } +gboolean +p_contact_in_group(const PContact contact, const char * const group) +{ + GSList *groups = contact->groups; + while (groups != NULL) { + if (strcmp(groups->data, group) == 0) { + return TRUE; + } + groups = g_slist_next(groups); + } + + return FALSE; +} + GSList * p_contact_groups(const PContact contact) { |