Merging Contacts

Merging Contacts — Functionality for merging contacts.

Synopsis

void                (*OssoABookMergeWithCb)             (const char *uid,
                                                         gpointer user_data);
OssoABookContact*   osso_abook_merge_contacts           (GList *contacts,
                                                         GtkWindow *parent);
void                osso_abook_merge_with_dialog        (OssoABookContact *contact,
                                                         OssoABookContactModel *model,
                                                         GtkWindow *parent,
                                                         OssoABookMergeWithCb cb,
                                                         gpointer user_data);
void                osso_abook_merge_with_many_dialog   (OssoABookContact *contact,
                                                         OssoABookContactModel *model,
                                                         GtkWindow *parent,
                                                         OssoABookMergeWithCb cb,
                                                         gpointer user_data);

Description

Functions that merge contacts together and deal with conflict resolution by presenting the user a dialog.

Details

OssoABookMergeWithCb ()

void                (*OssoABookMergeWithCb)             (const char *uid,
                                                         gpointer user_data);

The type of callback used with osso_abook_merge_with_dialog()

uid : the uid of the newly-merged contact
user_data : the data registered with osso_abook_merge_with_dialog()

osso_abook_merge_contacts ()

OssoABookContact*   osso_abook_merge_contacts           (GList *contacts,
                                                         GtkWindow *parent);

Merge all of the contacts provided into a single contact. If there are any conflicts in the name, then a dialog is shown so that the user can set the final name.

contacts : a GList of OssoABookContact objects
parent : an optional parent GtkWindow
Returns : a new OssoABookContact.

osso_abook_merge_with_dialog ()

void                osso_abook_merge_with_dialog        (OssoABookContact *contact,
                                                         OssoABookContactModel *model,
                                                         GtkWindow *parent,
                                                         OssoABookMergeWithCb cb,
                                                         gpointer user_data);

This function presents a contact chooser to the user from which they can select another contact to merge with contact. If there are conflicts, a dialog will be shown so the user can resolve them.

When the merge is complete, cb will be called with the new uid for the merged contact.

contact : the contact to be merged
contact_model : an optional OssoABookContactModel from which to present a list of potential contacts to merge with
parent : an optional parent GtkWindow
cb : A function to be called when the merge is complete
user_data : data to be passed to cb

osso_abook_merge_with_many_dialog ()

void                osso_abook_merge_with_many_dialog   (OssoABookContact *contact,
                                                         OssoABookContactModel *model,
                                                         GtkWindow *parent,
                                                         OssoABookMergeWithCb cb,
                                                         gpointer user_data);

This function presents a contact chooser to the user from which they can select other contacts to merge with contact. If there are conflicts, a dialog will be shown so the user can resolve them.

When the merge is complete, cb will be called with the new uid for the merged contact.

contact : the contact to be merged
contact_model : an optional OssoABookContactModel from which to present a list of potential contacts to merge with
parent : an optional parent GtkWindow
cb : A function to be called when the merge is complete
user_data : data to be passed to cb