Deprecate e_book_backend_sync_set_backend_property().
authorMatthew Barnes <mbarnes@redhat.com>
Sat, 26 Jan 2013 14:19:30 +0000 (09:19 -0500)
committerMatthew Barnes <mbarnes@redhat.com>
Sat, 26 Jan 2013 14:54:54 +0000 (09:54 -0500)
No longer used.

addressbook/libedata-book/e-book-backend-sync.c
addressbook/libedata-book/e-book-backend-sync.h
docs/reference/addressbook/libedata-book/libedata-book-sections.txt
po/POTFILES.in

index f9730e6..7054ea2 100644 (file)
@@ -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
index 9d55333..566566d 100644 (file)
@@ -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 */
index 6eed98b..ce9c1bc 100644 (file)
@@ -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
index 540afc0..b6eb633 100644 (file)
@@ -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