GMutex clients_mutex;
GList *clients;
- gboolean opening, opened, removed;
+ gboolean opened, removed;
gboolean writable;
GMutex views_mutex;
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)) {
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);
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))
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
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
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
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
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
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
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);
* 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
**/
{
g_return_val_if_fail (E_IS_BOOK_BACKEND (backend), FALSE);
- return backend->priv->opening;
+ return FALSE;
}
/**
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))