[evolution-data-server] Deprecate e_cal_backend_sync_set_backend_property().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Deprecate e_cal_backend_sync_set_backend_property().
- Date: Sat, 26 Jan 2013 15:19:58 +0000 (UTC)
commit c040098595f850f8f3137bd30c9155394ec7498c
Author: Matthew Barnes <mbarnes redhat com>
Date: Sat Jan 26 10:17:54 2013 -0500
Deprecate e_cal_backend_sync_set_backend_property().
No longer used.
calendar/libedata-cal/e-cal-backend-sync.c | 25 ++++++++------------
calendar/libedata-cal/e-cal-backend-sync.h | 20 ++++++++++-----
.../libedata-cal/libedata-cal-sections.txt | 3 +-
po/POTFILES.in | 1 +
4 files changed, 26 insertions(+), 23 deletions(-)
---
diff --git a/calendar/libedata-cal/e-cal-backend-sync.c b/calendar/libedata-cal/e-cal-backend-sync.c
index 8066cae..da3bbd6 100644
--- a/calendar/libedata-cal/e-cal-backend-sync.c
+++ b/calendar/libedata-cal/e-cal-backend-sync.c
@@ -6,10 +6,11 @@
* Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
*/
-#ifdef CONFIG_H
+#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
+#include <glib/gi18n-lib.h>
#include <libedataserver/libedataserver.h>
#include "e-cal-backend-sync.h"
@@ -164,6 +165,9 @@ e_cal_backend_sync_get_backend_property (ECalBackendSync *backend,
* set in this case.
*
* Since: 3.2
+ *
+ * Deprecated: 3.8: This function always returns %FALSE and sets an
+ * %UnsupportedMethod error.
**/
gboolean
e_cal_backend_sync_set_backend_property (ECalBackendSync *backend,
@@ -173,15 +177,11 @@ e_cal_backend_sync_set_backend_property (ECalBackendSync *backend,
const gchar *prop_value,
GError **error)
{
- gboolean res = FALSE;
-
- e_return_data_cal_error_val_if_fail (backend && E_IS_CAL_BACKEND_SYNC (backend), InvalidArg);
- e_return_data_cal_error_val_if_fail (prop_name, InvalidArg);
- e_return_data_cal_error_val_if_fail (prop_value, InvalidArg);
+ g_set_error_literal (
+ error, E_DATA_CAL_ERROR, UnsupportedMethod,
+ _("Clients cannot set backend properties"));
- LOCK_WRAPPER_RET_VAL (set_backend_property_sync, (backend, cal, cancellable, prop_name, prop_value, error));
-
- return res;
+ return FALSE;
}
/**
@@ -600,12 +600,7 @@ cal_backend_set_backend_property (ECalBackend *backend,
const gchar *prop_name,
const gchar *prop_value)
{
- GError *error = NULL;
-
- if (e_cal_backend_sync_set_backend_property (E_CAL_BACKEND_SYNC (backend), cal, cancellable, prop_name, prop_value, &error))
- e_data_cal_respond_set_backend_property (cal, opid, error);
- else
- (* E_CAL_BACKEND_CLASS (e_cal_backend_sync_parent_class)->set_backend_property) (backend, cal, opid, cancellable, prop_name, prop_value);
+ /* Do nothing. */
}
static void
diff --git a/calendar/libedata-cal/e-cal-backend-sync.h b/calendar/libedata-cal/e-cal-backend-sync.h
index f2d22ce..e1a153c 100644
--- a/calendar/libedata-cal/e-cal-backend-sync.h
+++ b/calendar/libedata-cal/e-cal-backend-sync.h
@@ -61,6 +61,8 @@ struct _ECalBackendSyncClass {
const gchar *prop_name,
gchar **prop_value,
GError **error);
+
+ /* This method is deprecated. */
gboolean (*set_backend_property_sync)
(ECalBackendSync *backend,
EDataCal *cal,
@@ -68,6 +70,7 @@ struct _ECalBackendSyncClass {
const gchar *prop_name,
const gchar *prop_value,
GError **error);
+
void (*get_object_sync) (ECalBackendSync *backend,
EDataCal *cal,
GCancellable *cancellable,
@@ -171,13 +174,6 @@ gboolean e_cal_backend_sync_get_backend_property
const gchar *prop_name,
gchar **prop_value,
GError **error);
-gboolean e_cal_backend_sync_set_backend_property
- (ECalBackendSync *backend,
- EDataCal *cal,
- GCancellable *cancellable,
- const gchar *prop_name,
- const gchar *prop_value,
- GError **error);
void e_cal_backend_sync_get_object (ECalBackendSync *backend,
EDataCal *cal,
GCancellable *cancellable,
@@ -268,6 +264,16 @@ void e_cal_backend_sync_add_timezone (ECalBackendSync *backend,
const gchar *tzobject,
GError **error);
+#ifndef EDS_DISABLE_DEPRECATED
+gboolean e_cal_backend_sync_set_backend_property
+ (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *prop_name,
+ const gchar *prop_value,
+ GError **error);
+#endif /* EDS_DISABLE_DEPRECATED */
+
G_END_DECLS
#endif /* E_CAL_BACKEND_SYNC_H */
diff --git a/docs/reference/calendar/libedata-cal/libedata-cal-sections.txt b/docs/reference/calendar/libedata-cal/libedata-cal-sections.txt
index ae67146..3e4c909 100644
--- a/docs/reference/calendar/libedata-cal/libedata-cal-sections.txt
+++ b/docs/reference/calendar/libedata-cal/libedata-cal-sections.txt
@@ -197,7 +197,6 @@ e_cal_backend_sync_set_lock
e_cal_backend_sync_open
e_cal_backend_sync_refresh
e_cal_backend_sync_get_backend_property
-e_cal_backend_sync_set_backend_property
e_cal_backend_sync_get_object
e_cal_backend_sync_get_object_list
e_cal_backend_sync_get_free_busy
@@ -210,6 +209,8 @@ e_cal_backend_sync_get_attachment_uris
e_cal_backend_sync_discard_alarm
e_cal_backend_sync_get_timezone
e_cal_backend_sync_add_timezone
+<SUBSECTION Deprecated>
+e_cal_backend_sync_set_backend_property
<SUBSECTION Standard>
E_CAL_BACKEND_SYNC
E_IS_CAL_BACKEND_SYNC
diff --git a/po/POTFILES.in b/po/POTFILES.in
index b6eb633..1297dbd 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -31,6 +31,7 @@ calendar/libecal/e-cal-recur.c
calendar/libecal/e-cal-util.c
calendar/libedata-cal/e-cal-backend.c
calendar/libedata-cal/e-cal-backend-sexp.c
+calendar/libedata-cal/e-cal-backend-sync.c
calendar/libedata-cal/e-cal-backend-util.c
calendar/libedata-cal/e-data-cal.c
calendar/libedata-cal/e-data-cal-factory.c
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]