[evolution-data-server] Deprecate e_book_backend_is_opening().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Deprecate e_book_backend_is_opening().
- Date: Fri, 25 Jan 2013 21:16:29 +0000 (UTC)
commit e0be86e6780dcae09328772685d4dc9230a89c66
Author: Matthew Barnes <mbarnes redhat com>
Date: Fri Jan 25 16:08:51 2013 -0500
Deprecate e_book_backend_is_opening().
This always returns FALSE now.
addressbook/libedata-book/e-book-backend.c | 38 +++----------------
addressbook/libedata-book/e-book-backend.h | 2 +-
.../libedata-book/libedata-book-sections.txt | 2 +-
3 files changed, 8 insertions(+), 34 deletions(-)
---
diff --git a/addressbook/libedata-book/e-book-backend.c b/addressbook/libedata-book/e-book-backend.c
index f65f999..331a4cc 100644
--- a/addressbook/libedata-book/e-book-backend.c
+++ b/addressbook/libedata-book/e-book-backend.c
@@ -26,7 +26,7 @@ struct _EBookBackendPrivate {
GMutex clients_mutex;
GList *clients;
- gboolean opening, opened, removed;
+ gboolean opened, removed;
gboolean writable;
GMutex views_mutex;
@@ -499,9 +499,6 @@ e_book_backend_open (EBookBackend *backend,
g_return_if_fail (E_IS_BOOK_BACKEND (backend));
g_return_if_fail (E_IS_DATA_BOOK (book));
- /* This should never be called while we're opening. */
- g_return_if_fail (!e_book_backend_is_opening (backend));
-
g_mutex_lock (&backend->priv->clients_mutex);
if (e_book_backend_is_opened (backend)) {
@@ -518,7 +515,6 @@ e_book_backend_open (EBookBackend *backend,
e_book_backend_respond_opened (backend, book, opid, NULL);
} else {
- backend->priv->opening = TRUE;
g_mutex_unlock (&backend->priv->clients_mutex);
g_return_if_fail (E_BOOK_BACKEND_GET_CLASS (backend)->open != NULL);
@@ -552,9 +548,6 @@ e_book_backend_refresh (EBookBackend *backend,
g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_BOOK_BACKEND (backend));
- /* This should never be called while we're opening. */
- g_return_if_fail (!e_book_backend_is_opening (backend));
-
if (!E_BOOK_BACKEND_GET_CLASS (backend)->refresh)
e_data_book_respond_refresh (book, opid, e_data_book_create_error (E_DATA_BOOK_STATUS_NOT_SUPPORTED, NULL));
else if (!e_book_backend_is_opened (backend))
@@ -589,9 +582,6 @@ e_book_backend_create_contacts (EBookBackend *backend,
g_return_if_fail (vcards);
g_return_if_fail (E_BOOK_BACKEND_GET_CLASS (backend)->create_contacts);
- /* This should never be called while we're opening. */
- g_return_if_fail (!e_book_backend_is_opening (backend));
-
if (!e_book_backend_is_opened (backend))
e_data_book_respond_create_contacts (book, opid, EDB_NOT_OPENED_ERROR, NULL);
else
@@ -622,9 +612,6 @@ e_book_backend_remove_contacts (EBookBackend *backend,
g_return_if_fail (id_list);
g_return_if_fail (E_BOOK_BACKEND_GET_CLASS (backend)->remove_contacts);
- /* This should never be called while we're opening. */
- g_return_if_fail (!e_book_backend_is_opening (backend));
-
if (!e_book_backend_is_opened (backend))
e_data_book_respond_remove_contacts (book, opid, EDB_NOT_OPENED_ERROR, NULL);
else
@@ -657,9 +644,6 @@ e_book_backend_modify_contacts (EBookBackend *backend,
g_return_if_fail (vcards);
g_return_if_fail (E_BOOK_BACKEND_GET_CLASS (backend)->modify_contacts);
- /* This should never be called while we're opening. */
- g_return_if_fail (!e_book_backend_is_opening (backend));
-
if (!e_book_backend_is_opened (backend))
e_data_book_respond_modify_contacts (book, opid, EDB_NOT_OPENED_ERROR, NULL);
else
@@ -690,9 +674,6 @@ e_book_backend_get_contact (EBookBackend *backend,
g_return_if_fail (id);
g_return_if_fail (E_BOOK_BACKEND_GET_CLASS (backend)->get_contact);
- /* This should never be called while we're opening. */
- g_return_if_fail (!e_book_backend_is_opening (backend));
-
if (!e_book_backend_is_opened (backend))
e_data_book_respond_get_contact (book, opid, EDB_NOT_OPENED_ERROR, NULL);
else
@@ -723,9 +704,6 @@ e_book_backend_get_contact_list (EBookBackend *backend,
g_return_if_fail (query);
g_return_if_fail (E_BOOK_BACKEND_GET_CLASS (backend)->get_contact_list);
- /* This should never be called while we're opening. */
- g_return_if_fail (!e_book_backend_is_opening (backend));
-
if (!e_book_backend_is_opened (backend))
e_data_book_respond_get_contact_list (book, opid, EDB_NOT_OPENED_ERROR, NULL);
else
@@ -758,9 +736,6 @@ e_book_backend_get_contact_list_uids (EBookBackend *backend,
g_return_if_fail (query);
g_return_if_fail (E_BOOK_BACKEND_GET_CLASS (backend)->get_contact_list_uids);
- /* This should never be called while we're opening. */
- g_return_if_fail (!e_book_backend_is_opening (backend));
-
if (!e_book_backend_is_opened (backend))
e_data_book_respond_get_contact_list_uids (book, opid, EDB_NOT_OPENED_ERROR, NULL);
else
@@ -898,9 +873,6 @@ e_book_backend_remove_client (EBookBackend *backend,
g_mutex_lock (&backend->priv->clients_mutex);
backend->priv->clients = g_list_remove (backend->priv->clients, book);
- if (backend->priv->clients == NULL)
- backend->priv->opening = FALSE;
-
g_mutex_unlock (&backend->priv->clients_mutex);
g_object_unref (backend);
@@ -1075,7 +1047,10 @@ e_book_backend_is_opened (EBookBackend *backend)
* every operation except of cancel and authenticate_user while
* it is being opening.
*
- * Returns: %TRUE if opening phase is in the effect, %FALSE otherwise.
+ * Returns: %FALSE always
+ *
+ * Deprecated: 3.8: This function is no longer relevant,
+ * and always returns %FALSE.
*
* Since: 3.2
**/
@@ -1084,7 +1059,7 @@ e_book_backend_is_opening (EBookBackend *backend)
{
g_return_val_if_fail (E_IS_BOOK_BACKEND (backend), FALSE);
- return backend->priv->opening;
+ return FALSE;
}
/**
@@ -1360,7 +1335,6 @@ e_book_backend_notify_opened (EBookBackend *backend,
priv = backend->priv;
g_mutex_lock (&priv->clients_mutex);
- priv->opening = FALSE;
priv->opened = error == NULL;
for (clients = priv->clients; clients != NULL; clients = g_list_next (clients))
diff --git a/addressbook/libedata-book/e-book-backend.h b/addressbook/libedata-book/e-book-backend.h
index e956a80..573b2d7 100644
--- a/addressbook/libedata-book/e-book-backend.h
+++ b/addressbook/libedata-book/e-book-backend.h
@@ -214,7 +214,6 @@ void e_book_backend_remove_client (EBookBackend *backend,
EDataBook *book);
gboolean e_book_backend_is_opened (EBookBackend *backend);
-gboolean e_book_backend_is_opening (EBookBackend *backend);
gboolean e_book_backend_is_readonly (EBookBackend *backend);
gboolean e_book_backend_is_removed (EBookBackend *backend);
@@ -347,6 +346,7 @@ void e_book_backend_respond_opened (EBookBackend *backend,
**/
#define BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS "supported-auth-methods"
+gboolean e_book_backend_is_opening (EBookBackend *backend);
void e_book_backend_foreach_view (EBookBackend *backend,
gboolean (*callback) (EDataBookView *view,
gpointer user_data),
diff --git a/docs/reference/addressbook/libedata-book/libedata-book-sections.txt b/docs/reference/addressbook/libedata-book/libedata-book-sections.txt
index 988b43e..e607ef5 100644
--- a/docs/reference/addressbook/libedata-book/libedata-book-sections.txt
+++ b/docs/reference/addressbook/libedata-book/libedata-book-sections.txt
@@ -17,7 +17,6 @@ e_book_backend_set_writable
e_book_backend_add_client
e_book_backend_remove_client
e_book_backend_is_opened
-e_book_backend_is_opening
e_book_backend_is_readonly
e_book_backend_is_removed
e_book_backend_get_backend_property
@@ -50,6 +49,7 @@ e_book_backend_respond_opened
CLIENT_BACKEND_PROPERTY_OPENED
CLIENT_BACKEND_PROPERTY_OPENING
BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS
+e_book_backend_is_opening
e_book_backend_foreach_view
<SUBSECTION Standard>
E_BOOK_BACKEND
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]