Added group add and group remove to /roster command

This commit is contained in:
James Booth
2013-06-02 02:48:20 +01:00
parent b450fa3ef7
commit 9dd5456f88
7 changed files with 222 additions and 3 deletions

View File

@@ -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)
{