book_util_diff_categories


Description:


[ Version ( since = "3.48" ) ]
public void book_util_diff_categories (Contact? old_contact, Contact? new_contact, out HashTable<unowned string,int> out_added, out HashTable<unowned string,int> out_removed)

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 GenericSet, 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 GenericSet-s should be freed with g_hash_table_unref, when no longer needed.

Parameters:

old_contact

an old Contact, or null

new_contact

a new Contact, or null

out_added

a GenericSet with added categories

out_removed

a GenericSet with removed categories


Namespace: E