From: Matthew Barnes Date: Sun, 7 Oct 2012 15:38:32 +0000 (-0400) Subject: Rename e_book_backend_stop_book_view(). X-Git-Tag: upstream/3.7.4~379 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a74a20c2d67488e27d26b47faabb2d84450c3210;p=platform%2Fupstream%2Fevolution-data-server.git Rename e_book_backend_stop_book_view(). Rename to e_book_backend_stop_view() [cf. e_cal_backend_stop_view()]. Also rename the EBookBackend.stop_book_view() method to stop_view() and adapt the built-in address book backends. --- diff --git a/addressbook/backends/file/e-book-backend-file.c b/addressbook/backends/file/e-book-backend-file.c index dc51a2a..1786dcc 100644 --- a/addressbook/backends/file/e-book-backend-file.c +++ b/addressbook/backends/file/e-book-backend-file.c @@ -1681,8 +1681,8 @@ e_book_backend_file_start_view (EBookBackend *backend, } static void -e_book_backend_file_stop_book_view (EBookBackend *backend, - EDataBookView *book_view) +e_book_backend_file_stop_view (EBookBackend *backend, + EDataBookView *book_view) { FileBackendSearchClosure *closure = get_closure (book_view); gboolean need_join; @@ -2363,7 +2363,7 @@ e_book_backend_file_class_init (EBookBackendFileClass *class) /* Set the virtual methods. */ backend_class->start_view = e_book_backend_file_start_view; - backend_class->stop_book_view = e_book_backend_file_stop_book_view; + backend_class->stop_view = e_book_backend_file_stop_view; backend_class->sync = e_book_backend_file_sync; backend_class->notify_update = e_book_backend_file_notify_update; diff --git a/addressbook/backends/google/e-book-backend-google.c b/addressbook/backends/google/e-book-backend-google.c index c74f188..03d49fa 100644 --- a/addressbook/backends/google/e-book-backend-google.c +++ b/addressbook/backends/google/e-book-backend-google.c @@ -1827,8 +1827,8 @@ e_book_backend_google_start_view (EBookBackend *backend, } static void -e_book_backend_google_stop_book_view (EBookBackend *backend, - EDataBookView *bookview) +e_book_backend_google_stop_view (EBookBackend *backend, + EDataBookView *bookview) { EBookBackendGooglePrivate *priv; GList *view; @@ -2248,7 +2248,7 @@ e_book_backend_google_class_init (EBookBackendGoogleClass *class) backend_class->open = e_book_backend_google_open; backend_class->get_backend_property = e_book_backend_google_get_backend_property; backend_class->start_view = e_book_backend_google_start_view; - backend_class->stop_book_view = e_book_backend_google_stop_book_view; + backend_class->stop_view = e_book_backend_google_stop_view; backend_class->create_contacts = e_book_backend_google_create_contacts; backend_class->remove_contacts = e_book_backend_google_remove_contacts; backend_class->modify_contacts = e_book_backend_google_modify_contacts; diff --git a/addressbook/backends/ldap/e-book-backend-ldap.c b/addressbook/backends/ldap/e-book-backend-ldap.c index 0839791..1f90794 100644 --- a/addressbook/backends/ldap/e-book-backend-ldap.c +++ b/addressbook/backends/ldap/e-book-backend-ldap.c @@ -4426,7 +4426,7 @@ typedef struct { LDAPOp op; EDataBookView *view; - /* used to detect problems with start/stop_book_view racing */ + /* used to detect problems with start/stop_view racing */ gboolean aborted; /* used by search_handler to only send the status messages once */ gboolean notified_receiving_results; @@ -4950,12 +4950,12 @@ e_book_backend_ldap_start_view (EBookBackend *backend, } static void -e_book_backend_ldap_stop_book_view (EBookBackend *backend, - EDataBookView *view) +e_book_backend_ldap_stop_view (EBookBackend *backend, + EDataBookView *view) { LDAPSearchOp *op; - d (printf ("stop_book_view (%p)\n", view)); + d (printf ("stop_view (%p)\n", view)); op = g_object_get_data (G_OBJECT (view), "EBookBackendLDAP.BookView::search_op"); if (op) { @@ -5347,7 +5347,7 @@ stop_views (EBookBackend *backend) struct call_data cd; cd.backend = backend; - cd.func = e_book_backend_ldap_stop_book_view; + cd.func = e_book_backend_ldap_stop_view; e_book_backend_foreach_view (backend, call_cb, &cd); } @@ -5737,7 +5737,7 @@ e_book_backend_ldap_class_init (EBookBackendLDAPClass *class) parent_class->get_contact_list = e_book_backend_ldap_get_contact_list; parent_class->get_contact_list_uids = e_book_backend_ldap_get_contact_list_uids; parent_class->start_view = e_book_backend_ldap_start_view; - parent_class->stop_book_view = e_book_backend_ldap_stop_book_view; + parent_class->stop_view = e_book_backend_ldap_stop_view; object_class->finalize = e_book_backend_ldap_finalize; diff --git a/addressbook/backends/vcf/e-book-backend-vcf.c b/addressbook/backends/vcf/e-book-backend-vcf.c index c08cb16..9d6baf8 100644 --- a/addressbook/backends/vcf/e-book-backend-vcf.c +++ b/addressbook/backends/vcf/e-book-backend-vcf.c @@ -550,8 +550,8 @@ e_book_backend_vcf_start_view (EBookBackend *backend, } static void -e_book_backend_vcf_stop_book_view (EBookBackend *backend, - EDataBookView *book_view) +e_book_backend_vcf_stop_view (EBookBackend *backend, + EDataBookView *book_view) { VCFBackendSearchClosure *closure = get_closure (book_view); gboolean need_join; @@ -744,7 +744,7 @@ e_book_backend_vcf_class_init (EBookBackendVCFClass *class) /* Set the virtual methods. */ backend_class->start_view = e_book_backend_vcf_start_view; - backend_class->stop_book_view = e_book_backend_vcf_stop_book_view; + backend_class->stop_view = e_book_backend_vcf_stop_view; sync_class->open_sync = e_book_backend_vcf_open; sync_class->get_backend_property_sync = e_book_backend_vcf_get_backend_property; diff --git a/addressbook/backends/webdav/e-book-backend-webdav.c b/addressbook/backends/webdav/e-book-backend-webdav.c index ef1c8b1..5e9cdaf 100644 --- a/addressbook/backends/webdav/e-book-backend-webdav.c +++ b/addressbook/backends/webdav/e-book-backend-webdav.c @@ -1096,8 +1096,8 @@ e_book_backend_webdav_start_view (EBookBackend *backend, } static void -e_book_backend_webdav_stop_book_view (EBookBackend *backend, - EDataBookView *book_view) +e_book_backend_webdav_stop_view (EBookBackend *backend, + EDataBookView *book_view) { WebdavBackendSearchClosure *closure; gboolean need_join; @@ -1477,7 +1477,7 @@ e_book_backend_webdav_class_init (EBookBackendWebdavClass *class) backend_class->get_contact_list = e_book_backend_webdav_get_contact_list; backend_class->get_contact_list_uids = e_book_backend_webdav_get_contact_list_uids; backend_class->start_view = e_book_backend_webdav_start_view; - backend_class->stop_book_view = e_book_backend_webdav_stop_book_view; + backend_class->stop_view = e_book_backend_webdav_stop_view; object_class->dispose = e_book_backend_webdav_dispose; } diff --git a/addressbook/libedata-book/e-book-backend.c b/addressbook/libedata-book/e-book-backend.c index 7a2e85d..eefded1 100644 --- a/addressbook/libedata-book/e-book-backend.c +++ b/addressbook/libedata-book/e-book-backend.c @@ -708,21 +708,25 @@ e_book_backend_start_view (EBookBackend *backend, } /** - * e_book_backend_stop_book_view: + * e_book_backend_stop_view: * @backend: an #EBookBackend * @view: the #EDataBookView to stop * * Stops running the query specified by @view, emitting no more signals. **/ void -e_book_backend_stop_book_view (EBookBackend *backend, - EDataBookView *view) +e_book_backend_stop_view (EBookBackend *backend, + EDataBookView *view) { + EBookBackendClass *class; + g_return_if_fail (E_IS_BOOK_BACKEND (backend)); g_return_if_fail (E_IS_DATA_BOOK_VIEW (view)); - g_return_if_fail (E_BOOK_BACKEND_GET_CLASS (backend)->stop_book_view); - (* E_BOOK_BACKEND_GET_CLASS (backend)->stop_book_view) (backend, view); + class = E_BOOK_BACKEND_GET_CLASS (backend); + g_return_if_fail (class->stop_view != NULL); + + class->stop_view (backend, view); } /** diff --git a/addressbook/libedata-book/e-book-backend.h b/addressbook/libedata-book/e-book-backend.h index f9347c4..05ca167 100644 --- a/addressbook/libedata-book/e-book-backend.h +++ b/addressbook/libedata-book/e-book-backend.h @@ -214,7 +214,7 @@ struct _EBookBackendClass { void (*start_view) (EBookBackend *backend, EDataBookView *book_view); - void (*stop_book_view) (EBookBackend *backend, + void (*stop_view) (EBookBackend *backend, EDataBookView *book_view); void (*notify_update) (EBookBackend *backend, @@ -299,7 +299,7 @@ void e_book_backend_get_contact_list_uids void e_book_backend_start_view (EBookBackend *backend, EDataBookView *view); -void e_book_backend_stop_book_view (EBookBackend *backend, +void e_book_backend_stop_view (EBookBackend *backend, EDataBookView *view); void e_book_backend_add_book_view (EBookBackend *backend, EDataBookView *view); diff --git a/addressbook/libedata-book/e-data-book-view.c b/addressbook/libedata-book/e-data-book-view.c index 744ffd1..3855e7b 100644 --- a/addressbook/libedata-book/e-data-book-view.c +++ b/addressbook/libedata-book/e-data-book-view.c @@ -154,7 +154,7 @@ book_destroyed_cb (gpointer data, /* If the view is running stop it here. */ if (priv->running) { - e_book_backend_stop_book_view (priv->backend, view); + e_book_backend_stop_view (priv->backend, view); priv->running = FALSE; priv->complete = FALSE; } @@ -675,7 +675,7 @@ bookview_stop_thread (gpointer data) EDataBookView *book_view = data; if (!book_view->priv->running) - e_book_backend_stop_book_view (book_view->priv->backend, book_view); + e_book_backend_stop_view (book_view->priv->backend, book_view); g_object_unref (book_view); return NULL; @@ -719,7 +719,7 @@ impl_DataBookView_dispose (EGdbusBookView *object, { e_gdbus_book_view_complete_dispose (object, invocation, NULL); - e_book_backend_stop_book_view (book_view->priv->backend, book_view); + e_book_backend_stop_view (book_view->priv->backend, book_view); book_view->priv->running = FALSE; e_book_backend_remove_book_view (book_view->priv->backend, book_view); diff --git a/docs/reference/addressbook/libedata-book/libedata-book-sections.txt b/docs/reference/addressbook/libedata-book/libedata-book-sections.txt index 0bad6f6..f304f38 100644 --- a/docs/reference/addressbook/libedata-book/libedata-book-sections.txt +++ b/docs/reference/addressbook/libedata-book/libedata-book-sections.txt @@ -32,7 +32,7 @@ e_book_backend_get_contact e_book_backend_get_contact_list e_book_backend_get_contact_list_uids e_book_backend_start_view -e_book_backend_stop_book_view +e_book_backend_stop_view e_book_backend_add_book_view e_book_backend_remove_book_view e_book_backend_foreach_view