[evolution-data-server] Deprecate e_cal_backend_is_opening().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Deprecate e_cal_backend_is_opening().
- Date: Fri, 25 Jan 2013 21:16:34 +0000 (UTC)
commit 5d141dc75be057a63ca884a6541d3a120927f165
Author: Matthew Barnes <mbarnes redhat com>
Date: Fri Jan 25 16:12:51 2013 -0500
Deprecate e_cal_backend_is_opening().
This always returns FALSE now.
calendar/libedata-cal/e-cal-backend.c | 56 ++-----------------
calendar/libedata-cal/e-cal-backend.h | 2 +-
.../libedata-cal/libedata-cal-sections.txt | 2 +-
3 files changed, 8 insertions(+), 52 deletions(-)
---
diff --git a/calendar/libedata-cal/e-cal-backend.c b/calendar/libedata-cal/e-cal-backend.c
index abc5aae..53d574b 100644
--- a/calendar/libedata-cal/e-cal-backend.c
+++ b/calendar/libedata-cal/e-cal-backend.c
@@ -42,7 +42,7 @@ struct _ECalBackendPrivate {
/* The kind of components for this backend */
icalcomponent_kind kind;
- gboolean opening, opened, removed;
+ gboolean opened, removed;
gboolean writable;
gchar *cache_dir;
@@ -678,16 +678,19 @@ e_cal_backend_is_opened (ECalBackend *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
*
* Since: 3.2
+ *
+ * Deprecated: 3.8: This function is no longer relevant,
+ * and always returns %FALSE.
**/
gboolean
e_cal_backend_is_opening (ECalBackend *backend)
{
g_return_val_if_fail (E_IS_CAL_BACKEND (backend), FALSE);
- return backend->priv->opening;
+ return FALSE;
}
/**
@@ -936,9 +939,6 @@ e_cal_backend_remove_client_private (ECalBackend *backend,
g_mutex_lock (&backend->priv->clients_mutex);
backend->priv->clients = g_list_remove (backend->priv->clients, cal);
- if (backend->priv->clients == NULL)
- backend->priv->opening = FALSE;
-
g_mutex_unlock (&backend->priv->clients_mutex);
g_object_unref (backend);
@@ -1164,9 +1164,6 @@ e_cal_backend_open (ECalBackend *backend,
g_return_if_fail (E_IS_CAL_BACKEND (backend));
g_return_if_fail (E_CAL_BACKEND_GET_CLASS (backend)->open != NULL);
- /* This should never be called while we're opening. */
- g_return_if_fail (!e_cal_backend_is_opening (backend));
-
g_mutex_lock (&backend->priv->clients_mutex);
if (e_cal_backend_is_opened (backend)) {
@@ -1183,7 +1180,6 @@ e_cal_backend_open (ECalBackend *backend,
e_cal_backend_respond_opened (backend, cal, opid, NULL);
} else {
- backend->priv->opening = TRUE;
g_mutex_unlock (&backend->priv->clients_mutex);
(* E_CAL_BACKEND_GET_CLASS (backend)->open) (backend, cal, opid, cancellable, only_if_exists);
@@ -1215,9 +1211,6 @@ e_cal_backend_refresh (ECalBackend *backend,
g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_CAL_BACKEND (backend));
- /* This should never be called while we're opening. */
- g_return_if_fail (!e_cal_backend_is_opening (backend));
-
if (!E_CAL_BACKEND_GET_CLASS (backend)->refresh)
e_data_cal_respond_refresh (cal, opid, EDC_ERROR (UnsupportedMethod));
else if (!e_cal_backend_is_opened (backend))
@@ -1252,9 +1245,6 @@ e_cal_backend_get_object (ECalBackend *backend,
g_return_if_fail (uid != NULL);
g_return_if_fail (E_CAL_BACKEND_GET_CLASS (backend)->get_object != NULL);
- /* This should never be called while we're opening. */
- g_return_if_fail (!e_cal_backend_is_opening (backend));
-
if (!e_cal_backend_is_opened (backend))
e_data_cal_respond_get_object (cal, opid, EDC_NOT_OPENED_ERROR, NULL);
else
@@ -1283,9 +1273,6 @@ e_cal_backend_get_object_list (ECalBackend *backend,
g_return_if_fail (E_IS_CAL_BACKEND (backend));
g_return_if_fail (E_CAL_BACKEND_GET_CLASS (backend)->get_object_list != NULL);
- /* This should never be called while we're opening. */
- g_return_if_fail (!e_cal_backend_is_opening (backend));
-
if (!e_cal_backend_is_opened (backend))
e_data_cal_respond_get_object_list (cal, opid, EDC_NOT_OPENED_ERROR, NULL);
else
@@ -1321,9 +1308,6 @@ e_cal_backend_get_free_busy (ECalBackend *backend,
g_return_if_fail (start <= end);
g_return_if_fail (E_CAL_BACKEND_GET_CLASS (backend)->get_free_busy != NULL);
- /* This should never be called while we're opening. */
- g_return_if_fail (!e_cal_backend_is_opening (backend));
-
if (!e_cal_backend_is_opened (backend))
e_data_cal_respond_get_free_busy (cal, opid, EDC_NOT_OPENED_ERROR);
else
@@ -1354,9 +1338,6 @@ e_cal_backend_create_objects (ECalBackend *backend,
g_return_if_fail (E_IS_CAL_BACKEND (backend));
g_return_if_fail (calobjs != NULL);
- /* This should never be called while we're opening. */
- g_return_if_fail (!e_cal_backend_is_opening (backend));
-
if (!E_CAL_BACKEND_GET_CLASS (backend)->create_objects)
e_data_cal_respond_create_objects (cal, opid, EDC_ERROR (UnsupportedMethod), NULL, NULL);
else if (!e_cal_backend_is_opened (backend))
@@ -1391,9 +1372,6 @@ e_cal_backend_modify_objects (ECalBackend *backend,
g_return_if_fail (E_IS_CAL_BACKEND (backend));
g_return_if_fail (calobjs != NULL);
- /* This should never be called while we're opening. */
- g_return_if_fail (!e_cal_backend_is_opening (backend));
-
if (!E_CAL_BACKEND_GET_CLASS (backend)->modify_objects)
e_data_cal_respond_modify_objects (cal, opid, EDC_ERROR (UnsupportedMethod), NULL, NULL);
else if (!e_cal_backend_is_opened (backend))
@@ -1430,9 +1408,6 @@ e_cal_backend_remove_objects (ECalBackend *backend,
g_return_if_fail (ids != NULL);
g_return_if_fail (E_CAL_BACKEND_GET_CLASS (backend)->remove_objects != NULL);
- /* This should never be called while we're opening. */
- g_return_if_fail (!e_cal_backend_is_opening (backend));
-
if (!e_cal_backend_is_opened (backend))
e_data_cal_respond_remove_objects (cal, opid, EDC_NOT_OPENED_ERROR, NULL, NULL, NULL);
else
@@ -1462,9 +1437,6 @@ e_cal_backend_receive_objects (ECalBackend *backend,
g_return_if_fail (calobj != NULL);
g_return_if_fail (E_CAL_BACKEND_GET_CLASS (backend)->receive_objects != NULL);
- /* This should never be called while we're opening. */
- g_return_if_fail (!e_cal_backend_is_opening (backend));
-
if (!e_cal_backend_is_opened (backend))
e_data_cal_respond_receive_objects (cal, opid, EDC_NOT_OPENED_ERROR);
else
@@ -1494,9 +1466,6 @@ e_cal_backend_send_objects (ECalBackend *backend,
g_return_if_fail (calobj != NULL);
g_return_if_fail (E_CAL_BACKEND_GET_CLASS (backend)->send_objects != NULL);
- /* This should never be called while we're opening. */
- g_return_if_fail (!e_cal_backend_is_opening (backend));
-
if (!e_cal_backend_is_opened (backend))
e_data_cal_respond_send_objects (cal, opid, EDC_NOT_OPENED_ERROR, NULL, NULL);
else
@@ -1531,9 +1500,6 @@ e_cal_backend_get_attachment_uris (ECalBackend *backend,
g_return_if_fail (uid != NULL);
g_return_if_fail (E_CAL_BACKEND_GET_CLASS (backend)->get_attachment_uris != NULL);
- /* This should never be called while we're opening. */
- g_return_if_fail (!e_cal_backend_is_opening (backend));
-
if (!e_cal_backend_is_opened (backend))
e_data_cal_respond_get_attachment_uris (cal, opid, EDC_NOT_OPENED_ERROR, NULL);
else
@@ -1568,9 +1534,6 @@ e_cal_backend_discard_alarm (ECalBackend *backend,
g_return_if_fail (uid != NULL);
g_return_if_fail (auid != NULL);
- /* This should never be called while we're opening. */
- g_return_if_fail (!e_cal_backend_is_opening (backend));
-
if (!E_CAL_BACKEND_GET_CLASS (backend)->discard_alarm)
e_data_cal_respond_discard_alarm (cal, opid, e_data_cal_create_error (NotSupported, NULL));
else if (!e_cal_backend_is_opened (backend))
@@ -1604,9 +1567,6 @@ e_cal_backend_get_timezone (ECalBackend *backend,
g_return_if_fail (tzid != NULL);
g_return_if_fail (E_CAL_BACKEND_GET_CLASS (backend)->get_timezone != NULL);
- /* This should never be called while we're opening. */
- g_return_if_fail (!e_cal_backend_is_opening (backend));
-
if (!e_cal_backend_is_opened (backend))
e_data_cal_respond_get_timezone (cal, opid, EDC_NOT_OPENED_ERROR, NULL);
else
@@ -1635,9 +1595,6 @@ e_cal_backend_add_timezone (ECalBackend *backend,
g_return_if_fail (tzobject != NULL);
g_return_if_fail (E_CAL_BACKEND_GET_CLASS (backend)->add_timezone != NULL);
- /* This should never be called while we're opening. */
- g_return_if_fail (!e_cal_backend_is_opening (backend));
-
if (!e_cal_backend_is_opened (backend))
e_data_cal_respond_add_timezone (cal, opid, EDC_NOT_OPENED_ERROR);
else
@@ -1979,7 +1936,6 @@ e_cal_backend_notify_opened (ECalBackend *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/calendar/libedata-cal/e-cal-backend.h b/calendar/libedata-cal/e-cal-backend.h
index 9072554..6f53cb2 100644
--- a/calendar/libedata-cal/e-cal-backend.h
+++ b/calendar/libedata-cal/e-cal-backend.h
@@ -248,7 +248,6 @@ gboolean e_cal_backend_get_writable (ECalBackend *backend);
void e_cal_backend_set_writable (ECalBackend *backend,
gboolean writable);
gboolean e_cal_backend_is_opened (ECalBackend *backend);
-gboolean e_cal_backend_is_opening (ECalBackend *backend);
gboolean e_cal_backend_is_readonly (ECalBackend *backend);
gboolean e_cal_backend_is_removed (ECalBackend *backend);
@@ -436,6 +435,7 @@ void e_cal_backend_respond_opened (ECalBackend *backend,
**/
#define CLIENT_BACKEND_PROPERTY_OPENING "opening"
+gboolean e_cal_backend_is_opening (ECalBackend *backend);
void e_cal_backend_foreach_view (ECalBackend *backend,
gboolean (*callback) (EDataCalView *view,
gpointer user_data),
diff --git a/docs/reference/calendar/libedata-cal/libedata-cal-sections.txt b/docs/reference/calendar/libedata-cal/libedata-cal-sections.txt
index 47e5fb9..eb57340 100644
--- a/docs/reference/calendar/libedata-cal/libedata-cal-sections.txt
+++ b/docs/reference/calendar/libedata-cal/libedata-cal-sections.txt
@@ -15,7 +15,6 @@ e_cal_backend_get_registry
e_cal_backend_get_writable
e_cal_backend_set_writable
e_cal_backend_is_opened
-e_cal_backend_is_opening
e_cal_backend_is_readonly
e_cal_backend_is_removed
e_cal_backend_get_cache_dir
@@ -59,6 +58,7 @@ e_cal_backend_respond_opened
<SUBSECTION Deprecated>
CLIENT_BACKEND_PROPERTY_OPENED
CLIENT_BACKEND_PROPERTY_OPENING
+e_cal_backend_is_opening
e_cal_backend_foreach_view
<SUBSECTION Standard>
E_CAL_BACKEND
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]