From: Matthew Barnes Date: Sun, 7 Oct 2012 15:26:19 +0000 (-0400) Subject: Rename e_book_backend_start_book_view(). X-Git-Tag: upstream/3.7.4~380 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=56a9157afac7144defb698d4f897eeebb333b7ab;p=platform%2Fupstream%2Fevolution-data-server.git Rename e_book_backend_start_book_view(). Rename to e_book_backend_start_view() [cf. e_cal_backend_start_view()]. Also rename the EBookBackend.start_book_view() method to start_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 79cb96b..dc51a2a 100644 --- a/addressbook/backends/file/e-book-backend-file.c +++ b/addressbook/backends/file/e-book-backend-file.c @@ -1666,8 +1666,8 @@ book_view_thread (gpointer data) } static void -e_book_backend_file_start_book_view (EBookBackend *backend, - EDataBookView *book_view) +e_book_backend_file_start_view (EBookBackend *backend, + EDataBookView *book_view) { FileBackendSearchClosure *closure = init_closure (book_view, E_BOOK_BACKEND_FILE (backend)); @@ -1677,7 +1677,7 @@ e_book_backend_file_start_book_view (EBookBackend *backend, e_flag_wait (closure->running); /* at this point we know the book view thread is actually running */ - d (printf ("returning from start_book_view\n")); + d (printf ("returning from start_view\n")); } static void @@ -2362,7 +2362,7 @@ e_book_backend_file_class_init (EBookBackendFileClass *class) backend_class = E_BOOK_BACKEND_CLASS (class); /* Set the virtual methods. */ - backend_class->start_book_view = e_book_backend_file_start_book_view; + backend_class->start_view = e_book_backend_file_start_view; backend_class->stop_book_view = e_book_backend_file_stop_book_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 a1c6c5e..c74f188 100644 --- a/addressbook/backends/google/e-book-backend-google.c +++ b/addressbook/backends/google/e-book-backend-google.c @@ -1789,8 +1789,8 @@ e_book_backend_google_get_contact_list_uids (EBookBackend *backend, } static void -e_book_backend_google_start_book_view (EBookBackend *backend, - EDataBookView *bookview) +e_book_backend_google_start_view (EBookBackend *backend, + EDataBookView *bookview) { EBookBackendGooglePrivate *priv; GList *cached_contacts; @@ -2247,7 +2247,7 @@ e_book_backend_google_class_init (EBookBackendGoogleClass *class) /* Set the virtual methods. */ backend_class->open = e_book_backend_google_open; backend_class->get_backend_property = e_book_backend_google_get_backend_property; - backend_class->start_book_view = e_book_backend_google_start_book_view; + backend_class->start_view = e_book_backend_google_start_view; backend_class->stop_book_view = e_book_backend_google_stop_book_view; backend_class->create_contacts = e_book_backend_google_create_contacts; backend_class->remove_contacts = e_book_backend_google_remove_contacts; diff --git a/addressbook/backends/ldap/e-book-backend-ldap.c b/addressbook/backends/ldap/e-book-backend-ldap.c index eba4ebe..0839791 100644 --- a/addressbook/backends/ldap/e-book-backend-ldap.c +++ b/addressbook/backends/ldap/e-book-backend-ldap.c @@ -4939,12 +4939,12 @@ e_book_backend_ldap_search (EBookBackendLDAP *bl, } static void -e_book_backend_ldap_start_book_view (EBookBackend *backend, - EDataBookView *view) +e_book_backend_ldap_start_view (EBookBackend *backend, + EDataBookView *view) { EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (backend); - d (printf ("start_book_view (%p)\n", view)); + d (printf ("start_view (%p)\n", view)); e_book_backend_ldap_search (bl, NULL /* XXX ugh */, view); } @@ -5358,7 +5358,7 @@ start_views (EBookBackend *backend) struct call_data cd; cd.backend = backend; - cd.func = e_book_backend_ldap_start_book_view; + cd.func = e_book_backend_ldap_start_view; e_book_backend_foreach_view (backend, call_cb, &cd); } @@ -5736,7 +5736,7 @@ e_book_backend_ldap_class_init (EBookBackendLDAPClass *class) parent_class->get_contact = e_book_backend_ldap_get_contact; 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_book_view = e_book_backend_ldap_start_book_view; + parent_class->start_view = e_book_backend_ldap_start_view; parent_class->stop_book_view = e_book_backend_ldap_stop_book_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 4da4959..c08cb16 100644 --- a/addressbook/backends/vcf/e-book-backend-vcf.c +++ b/addressbook/backends/vcf/e-book-backend-vcf.c @@ -534,8 +534,8 @@ book_view_thread (gpointer data) } static void -e_book_backend_vcf_start_book_view (EBookBackend *backend, - EDataBookView *book_view) +e_book_backend_vcf_start_view (EBookBackend *backend, + EDataBookView *book_view) { VCFBackendSearchClosure *closure = init_closure (book_view, E_BOOK_BACKEND_VCF (backend)); @@ -545,7 +545,7 @@ e_book_backend_vcf_start_book_view (EBookBackend *backend, e_flag_wait (closure->running); /* at this point we know the book view thread is actually running */ - d (printf ("returning from start_book_view\n")); + d (printf ("returning from start_view\n")); } @@ -743,7 +743,7 @@ e_book_backend_vcf_class_init (EBookBackendVCFClass *class) backend_class = E_BOOK_BACKEND_CLASS (class); /* Set the virtual methods. */ - backend_class->start_book_view = e_book_backend_vcf_start_book_view; + backend_class->start_view = e_book_backend_vcf_start_view; backend_class->stop_book_view = e_book_backend_vcf_stop_book_view; sync_class->open_sync = e_book_backend_vcf_open; diff --git a/addressbook/backends/webdav/e-book-backend-webdav.c b/addressbook/backends/webdav/e-book-backend-webdav.c index 29067d7..ef1c8b1 100644 --- a/addressbook/backends/webdav/e-book-backend-webdav.c +++ b/addressbook/backends/webdav/e-book-backend-webdav.c @@ -1064,8 +1064,8 @@ book_view_thread (gpointer data) } static void -e_book_backend_webdav_start_book_view (EBookBackend *backend, - EDataBookView *book_view) +e_book_backend_webdav_start_view (EBookBackend *backend, + EDataBookView *book_view) { EBookBackendWebdav *webdav = E_BOOK_BACKEND_WEBDAV (backend); EBookBackendWebdavPrivate *priv = webdav->priv; @@ -1476,7 +1476,7 @@ e_book_backend_webdav_class_init (EBookBackendWebdavClass *class) backend_class->get_contact = e_book_backend_webdav_get_contact; 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_book_view = e_book_backend_webdav_start_book_view; + backend_class->start_view = e_book_backend_webdav_start_view; backend_class->stop_book_view = e_book_backend_webdav_stop_book_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 d51a6f1..7a2e85d 100644 --- a/addressbook/libedata-book/e-book-backend.c +++ b/addressbook/libedata-book/e-book-backend.c @@ -685,7 +685,7 @@ e_book_backend_get_contact_list_uids (EBookBackend *backend, } /** - * e_book_backend_start_book_view: + * e_book_backend_start_view: * @backend: an #EBookBackend * @view: the #EDataBookView to start * @@ -693,14 +693,18 @@ e_book_backend_get_contact_list_uids (EBookBackend *backend, * matching contacts. **/ void -e_book_backend_start_book_view (EBookBackend *backend, - EDataBookView *view) +e_book_backend_start_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)->start_book_view); - (* E_BOOK_BACKEND_GET_CLASS (backend)->start_book_view) (backend, view); + class = E_BOOK_BACKEND_GET_CLASS (backend); + g_return_if_fail (class->start_view); + + class->start_view (backend, view); } /** diff --git a/addressbook/libedata-book/e-book-backend.h b/addressbook/libedata-book/e-book-backend.h index e72dc0d..f9347c4 100644 --- a/addressbook/libedata-book/e-book-backend.h +++ b/addressbook/libedata-book/e-book-backend.h @@ -212,7 +212,7 @@ struct _EBookBackendClass { GCancellable *cancellable, const gchar *query); - void (*start_book_view) (EBookBackend *backend, + void (*start_view) (EBookBackend *backend, EDataBookView *book_view); void (*stop_book_view) (EBookBackend *backend, EDataBookView *book_view); @@ -297,7 +297,7 @@ void e_book_backend_get_contact_list_uids GCancellable *cancellable, const gchar *query); -void e_book_backend_start_book_view (EBookBackend *backend, +void e_book_backend_start_view (EBookBackend *backend, EDataBookView *view); void e_book_backend_stop_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 0e1d474..744ffd1 100644 --- a/addressbook/libedata-book/e-data-book-view.c +++ b/addressbook/libedata-book/e-data-book-view.c @@ -645,7 +645,7 @@ bookview_start_thread (gpointer data) EDataBookView *book_view = data; if (book_view->priv->running) - e_book_backend_start_book_view (book_view->priv->backend, book_view); + e_book_backend_start_view (book_view->priv->backend, book_view); g_object_unref (book_view); return NULL; diff --git a/docs/reference/addressbook/libedata-book/libedata-book-sections.txt b/docs/reference/addressbook/libedata-book/libedata-book-sections.txt index ceac2b8..0bad6f6 100644 --- a/docs/reference/addressbook/libedata-book/libedata-book-sections.txt +++ b/docs/reference/addressbook/libedata-book/libedata-book-sections.txt @@ -31,7 +31,7 @@ e_book_backend_modify_contacts e_book_backend_get_contact e_book_backend_get_contact_list e_book_backend_get_contact_list_uids -e_book_backend_start_book_view +e_book_backend_start_view e_book_backend_stop_book_view e_book_backend_add_book_view e_book_backend_remove_book_view