- * This is a helper function to commit a EContact to Address_Book application.
- *
- * @param contact Contact of type #EContact
- * @return void
- */
-static void
-commit_contact(EContact * contact, gboolean is_new)
-{
- g_return_if_fail (contact);
- g_return_if_fail (book);
-
- if (!contact || !book)
- return;
-
- if (OSSO_ABOOK_IS_CONTACT (contact)) {
- osso_abook_contact_commit(OSSO_ABOOK_CONTACT(contact), is_new, book, NULL);
- } else {
- GError *err = NULL;
- if (is_new) {
- if (!e_book_add_contact (book, contact, &err)) {
- g_warning ("Failed to add contact: %s", err->message);
- g_error_free (err);
- }
- } else {
- if (!e_book_commit_contact (book, contact, &err)) {
- g_warning ("Failed to commit contact: %s", err->message);
- g_error_free (err);
- }
- }
- }
-}
-
-/**