35
35
#undef _GM_CONTACTS_H_INSIDE__
39
gmcontact_enum_categories (const GmContact * contact)
41
GSList * categorylist = NULL;
42
gchar ** split_categories = { NULL };
43
gchar ** split_categories_iter = { NULL };
45
g_return_val_if_fail (contact != NULL, NULL);
47
if (!contact->categories)
50
if (g_ascii_strcasecmp (contact->categories, "") == 0)
54
g_strsplit_set (contact->categories,
58
for (split_categories_iter = split_categories;
59
*split_categories_iter != NULL;
60
split_categories_iter++) {
61
if (g_ascii_strcasecmp (*split_categories_iter,"") != 0)
63
g_slist_append (categorylist, g_strdup (*split_categories_iter));
66
g_strfreev (split_categories);
73
gmcontact_is_in_category (const GmContact * contact,
74
const gchar * category)
76
GSList * categorylist = NULL;
77
GSList * categorylist_iter = NULL;
79
g_return_val_if_fail (contact != NULL, FALSE);
81
categorylist = gmcontact_enum_categories (contact);
86
for (categorylist_iter = categorylist;
87
categorylist_iter != NULL;
88
categorylist_iter = g_slist_next (categorylist_iter))
90
if (g_ascii_strcasecmp ((const gchar*) categorylist_iter->data,
93
g_slist_free (categorylist);
98
g_slist_free (categorylist);
40
104
gnomemeeting_addressbook_get_contacts (GmAddressbook *addressbook,