From 9193a985af25894f53f1b01ad68f87e9f5049039 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Thu, 21 Feb 2002 04:34:28 +0000 Subject: track change to signature, and (for now) just change all the return 2002-02-20 Chris Toshok * backend/pas/pas-backend-file.c (pas_backend_file_load_uri): track change to signature, and (for now) just change all the return FALSE's to _RepositoryOffline (what FALSE used to map to in pas_book_factory_process_request), and change TRUE to _Success. * backend/pas/pas-backend-ldap.c (pas_backend_ldap_load_uri): track change to signature, and differentiate between pas_backend_ldap_connect failing (RepositoryOffline), and ldap_url_parse failing (OtherError). * backend/pas/pas-book-factory.c (pas_book_factory_process_request): since pas_backend_load_uri returns status now, use it to nodify the BookListener if there's a failure. * backend/pas/pas-backend.c (pas_backend_load_uri): track change to signature. * backend/pas/pas-backend.h: change return type of pas_backend_load_uri to GNOME_Evolution_Addressbook_BookListener_CallStatus to allow differentiation between failure types. * backend/ebook/e-book-listener.c (e_book_listener_convert_status): handle _AUTHENTICATION_FAILED. * backend/ebook/e-book-types.h (EBookStatus): add _AUTHENTICATION_FAILED. svn path=/trunk/; revision=15779 --- addressbook/backend/pas/pas-backend-file.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'addressbook/backend/pas/pas-backend-file.c') diff --git a/addressbook/backend/pas/pas-backend-file.c b/addressbook/backend/pas/pas-backend-file.c index 57f9462bb8..7d6499578d 100644 --- a/addressbook/backend/pas/pas-backend-file.c +++ b/addressbook/backend/pas/pas-backend-file.c @@ -58,6 +58,7 @@ struct _PASBackendFilePrivate { DB *file_db; EList *book_views; gboolean writable; + GHashTable *address_lists; }; struct _PASBackendFileCursorPrivate { @@ -702,10 +703,12 @@ pas_backend_file_process_modify_card (PASBackend *backend, pas_book_view_notify_add_1 (view->book_view, req->vcard); else /* if (old_match) */ pas_book_view_notify_remove (view->book_view, id); + pas_book_view_notify_complete (view->book_view); bonobo_object_release_unref(bonobo_object_corba_objref(BONOBO_OBJECT(view->book_view)), &ev); } + gtk_object_unref(GTK_OBJECT(iterator)); pas_book_respond_modify ( @@ -1236,7 +1239,7 @@ ORG:Ximian, Inc.;\n\ NOTE:Welcome to the Ximian Addressbook.\n\ END:VCARD" -static gboolean +static GNOME_Evolution_Addressbook_BookListener_CallStatus pas_backend_file_load_uri (PASBackend *backend, const char *uri) { @@ -1255,18 +1258,18 @@ pas_backend_file_load_uri (PASBackend *backend, minor != 1 || patch != 17) { g_warning ("Wrong version of libdb."); - return FALSE; + return GNOME_Evolution_Addressbook_BookListener_OtherError; } filename = pas_backend_file_extract_path_from_uri (uri); db_error = e_db3_utils_maybe_recover (filename); if (db_error != 0) - return FALSE; + return GNOME_Evolution_Addressbook_BookListener_OtherError; db_error = db_create (&db, NULL, 0); if (db_error != 0) - return FALSE; + return GNOME_Evolution_Addressbook_BookListener_OtherError; db_error = db->open (db, filename, NULL, DB_HASH, 0, 0666); @@ -1274,7 +1277,7 @@ pas_backend_file_load_uri (PASBackend *backend, db_error = e_db3_utils_upgrade_format (filename); if (db_error != 0) - return FALSE; + return GNOME_Evolution_Addressbook_BookListener_OtherError; db_error = db->open (db, filename, NULL, DB_HASH, 0, 0666); } @@ -1312,7 +1315,7 @@ pas_backend_file_load_uri (PASBackend *backend, if (db_error != 0) { bf->priv->file_db = NULL; - return FALSE; + return GNOME_Evolution_Addressbook_BookListener_OtherError; } bf->priv->writable = writable; @@ -1323,7 +1326,7 @@ pas_backend_file_load_uri (PASBackend *backend, db->close (db, 0); bf->priv->file_db = NULL; bf->priv->writable = FALSE; - return FALSE; + return GNOME_Evolution_Addressbook_BookListener_OtherError; } g_free(bf->priv->uri); @@ -1332,7 +1335,7 @@ pas_backend_file_load_uri (PASBackend *backend, g_free (bf->priv->filename); bf->priv->filename = filename; - return TRUE; + return GNOME_Evolution_Addressbook_BookListener_Success; } /* Get_uri handler for the addressbook file backend */ -- cgit v1.2.3