[evolution-data-server] Deprecate e_book_backend_sync_set_backend_property().



commit 02aba2fccee8dc80b4ae7570fd1e6a2f6b9daf35
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sat Jan 26 09:19:30 2013 -0500

    Deprecate e_book_backend_sync_set_backend_property().
    
    No longer used.

 addressbook/libedata-book/e-book-backend-sync.c    |   22 +++++++++----------
 addressbook/libedata-book/e-book-backend-sync.h    |   20 +++++++++++------
 .../libedata-book/libedata-book-sections.txt       |    3 +-
 po/POTFILES.in                                     |    1 +
 4 files changed, 26 insertions(+), 20 deletions(-)
---
diff --git a/addressbook/libedata-book/e-book-backend-sync.c b/addressbook/libedata-book/e-book-backend-sync.c
index f9730e6..7054ea2 100644
--- a/addressbook/libedata-book/e-book-backend-sync.c
+++ b/addressbook/libedata-book/e-book-backend-sync.c
@@ -10,6 +10,7 @@
 #include <config.h>
 #endif
 
+#include <glib/gi18n-lib.h>
 #include <libedataserver/libedataserver.h>
 
 #include "e-book-backend-sync.h"
@@ -160,6 +161,9 @@ e_book_backend_sync_get_backend_property (EBookBackendSync *backend,
  * set in this case.
  *
  * Since: 3.2
+ *
+ * Deprecated: 3.8: This function always returns %FALSE and sets an
+ *                  %E_DATA_BOOK_STATUS_NOT_SUPPORTED error.
  **/
 gboolean
 e_book_backend_sync_set_backend_property (EBookBackendSync *backend,
@@ -169,13 +173,12 @@ e_book_backend_sync_set_backend_property (EBookBackendSync *backend,
                                           const gchar *prop_value,
                                           GError **error)
 {
-	e_return_data_book_error_val_if_fail (E_IS_BOOK_BACKEND_SYNC (backend), E_DATA_BOOK_STATUS_INVALID_ARG);
-	e_return_data_book_error_val_if_fail (E_IS_DATA_BOOK (book), E_DATA_BOOK_STATUS_INVALID_ARG);
-	e_return_data_book_error_val_if_fail (prop_name, E_DATA_BOOK_STATUS_INVALID_ARG);
-	e_return_data_book_error_val_if_fail (prop_value, E_DATA_BOOK_STATUS_INVALID_ARG);
-	e_return_data_book_error_val_if_fail (E_BOOK_BACKEND_SYNC_GET_CLASS (backend)->set_backend_property_sync, E_DATA_BOOK_STATUS_NOT_SUPPORTED);
+	g_set_error_literal (
+		error, E_DATA_BOOK_ERROR,
+		E_DATA_BOOK_STATUS_NOT_SUPPORTED,
+		_("Clients cannot set backend properties"));
 
-	return (* E_BOOK_BACKEND_SYNC_GET_CLASS (backend)->set_backend_property_sync) (backend, book, cancellable, prop_name, prop_value, error);
+	return FALSE;
 }
 
 /**
@@ -415,12 +418,7 @@ book_backend_set_backend_property (EBookBackend *backend,
                                    const gchar *prop_name,
                                    const gchar *prop_value)
 {
-	GError *error = NULL;
-
-	if (e_book_backend_sync_set_backend_property (E_BOOK_BACKEND_SYNC (backend), book, cancellable, prop_name, prop_value, &error))
-		e_data_book_respond_set_backend_property (book, opid, error);
-	else
-		(* E_BOOK_BACKEND_CLASS (e_book_backend_sync_parent_class)->set_backend_property) (backend, book, opid, cancellable, prop_name, prop_value);
+	/* Do nothing. */
 }
 
 static void
diff --git a/addressbook/libedata-book/e-book-backend-sync.h b/addressbook/libedata-book/e-book-backend-sync.h
index 9d55333..566566d 100644
--- a/addressbook/libedata-book/e-book-backend-sync.h
+++ b/addressbook/libedata-book/e-book-backend-sync.h
@@ -61,6 +61,8 @@ struct _EBookBackendSyncClass {
 						 const gchar *prop_name,
 						 gchar **prop_value,
 						 GError **error);
+
+	/* This method is deprecated. */
 	gboolean	(*set_backend_property_sync)
 						(EBookBackendSync *backend,
 						 EDataBook *book,
@@ -68,6 +70,7 @@ struct _EBookBackendSyncClass {
 						 const gchar *prop_name,
 						 const gchar *prop_value,
 						 GError **error);
+
 	void		(*create_contacts_sync)	(EBookBackendSync *backend,
 						 EDataBook *book,
 						 GCancellable *cancellable,
@@ -128,13 +131,6 @@ gboolean	e_book_backend_sync_get_backend_property
 						 const gchar *prop_name,
 						 gchar **prop_value,
 						 GError **error);
-gboolean	e_book_backend_sync_set_backend_property
-						(EBookBackendSync *backend,
-						 EDataBook *book,
-						 GCancellable *cancellable,
-						 const gchar *prop_name,
-						 const gchar *prop_value,
-						 GError **error);
 void		e_book_backend_sync_create_contacts
 						(EBookBackendSync *backend,
 						 EDataBook *book,
@@ -177,6 +173,16 @@ void		e_book_backend_sync_get_contact_list_uids
 						 GSList **contacts_uids,
 						 GError **error);
 
+#ifndef EDS_DISABLE_DEPRECATED
+gboolean	e_book_backend_sync_set_backend_property
+						(EBookBackendSync *backend,
+						 EDataBook *book,
+						 GCancellable *cancellable,
+						 const gchar *prop_name,
+						 const gchar *prop_value,
+						 GError **error);
+#endif /* EDS_DISABLE_DEPRECATED */
+
 G_END_DECLS
 
 #endif /* E_BOOK_BACKEND_SYNC_H */
diff --git a/docs/reference/addressbook/libedata-book/libedata-book-sections.txt b/docs/reference/addressbook/libedata-book/libedata-book-sections.txt
index 6eed98b..ce9c1bc 100644
--- a/docs/reference/addressbook/libedata-book/libedata-book-sections.txt
+++ b/docs/reference/addressbook/libedata-book/libedata-book-sections.txt
@@ -236,13 +236,14 @@ e_book_backend_sync_construct
 e_book_backend_sync_open
 e_book_backend_sync_refresh
 e_book_backend_sync_get_backend_property
-e_book_backend_sync_set_backend_property
 e_book_backend_sync_create_contacts
 e_book_backend_sync_remove_contacts
 e_book_backend_sync_modify_contacts
 e_book_backend_sync_get_contact
 e_book_backend_sync_get_contact_list
 e_book_backend_sync_get_contact_list_uids
+<SUBSECTION Deprecated>
+e_book_backend_sync_set_backend_property
 <SUBSECTION Standard>
 E_BOOK_BACKEND_SYNC
 E_IS_BOOK_BACKEND_SYNC
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 540afc0..b6eb633 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -14,6 +14,7 @@ addressbook/libebook/e-contact.c
 addressbook/libebook/e-destination.c
 addressbook/libebook/e-phone-number.c
 addressbook/libedata-book/e-book-backend.c
+addressbook/libedata-book/e-book-backend-sync.c
 addressbook/libedata-book/e-book-backend-sqlitedb.c
 addressbook/libedata-book/e-data-book.c
 addressbook/libedata-book/e-data-book-factory.c



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]