Function
EBookContactsbook_util_diff_categories
since: 3.48
Declaration [src]
void
e_book_util_diff_categories (
EContact* old_contact,
EContact* new_contact,
GHashTable** out_added,
GHashTable** out_removed
)
Description [src]
Compares list of categories on the old_contact with the list of categories
on the new_contact and fills out_added categories and out_removed categories
accordingly, as if the old_contact is replaced with the new_contact. When either
of the contacts is NULL, it’s considered as having no categories set.
Rather than returning empty GHashTable, the return argument is set to NULL
when there are no added/removed categories.
The key of the hash table is the category string, the value is an integer (1). There is used the hash table only for speed.
The returned GHashTable-s should be freed with g_hash_table_unref(),
when no longer needed.
Available since: 3.48
Parameters
old_contact-
Type:
EContactAn old
EContact, orNULL.The argument can be NULL.The data is owned by the caller of the function. new_contact-
Type:
EContactA new
EContact, orNULL.The argument can be NULL.The data is owned by the caller of the function. out_added-
Type:
GHashTableA
GHashTablewith added categories.The argument will be set by the function. The caller of the function takes ownership of the returned data container, but not the data inside it. out_removed-
Type:
GHashTableA
GHashTablewith removed categories.The argument will be set by the function. The caller of the function takes ownership of the returned data container, but not the data inside it.