[evolution-kolab] EBookBackendKolab: Implement the new backend API.



commit 68214800cfc5e852c9bc22f45d076a6b6fbcf7b4
Author: Matthew Barnes <mbarnes redhat com>
Date:   Wed Apr 3 16:29:09 2013 -0400

    EBookBackendKolab: Implement the new backend API.

 src/addressbook/e-book-backend-kolab.c     |  250 ++++++++++++----------------
 src/addressbook/e-book-backend-kolab.h     |    4 +-
 src/addressbook/kolab-util-contact-cache.c |   14 +-
 src/addressbook/kolab-util-contact-cache.h |   10 +-
 src/addressbook/kolab-util-contact.c       |    2 +-
 src/addressbook/kolab-util-contact.h       |    2 +-
 6 files changed, 121 insertions(+), 161 deletions(-)
---
diff --git a/src/addressbook/e-book-backend-kolab.c b/src/addressbook/e-book-backend-kolab.c
index 5534dee..165e398 100644
--- a/src/addressbook/e-book-backend-kolab.c
+++ b/src/addressbook/e-book-backend-kolab.c
@@ -74,17 +74,7 @@ struct _EBookBackendKolabPrivate
 #define E_BOOK_BACKEND_KOLAB_PRIVATE(o)  (G_TYPE_INSTANCE_GET_PRIVATE ((o), E_TYPE_BOOK_BACKEND_KOLAB, 
EBookBackendKolabPrivate))
 
 
-G_DEFINE_TYPE (EBookBackendKolab, e_book_backend_kolab, E_TYPE_BOOK_BACKEND_SYNC)
-
-/*----------------------------------------------------------------------------*/
-/* forward declarations */
-
-static void
-book_backend_kolab_open (EBookBackendSync *backend,
-                         EDataBook *book,
-                         GCancellable *cancellable,
-                         gboolean only_if_exists,
-                         GError **error);
+G_DEFINE_TYPE (EBookBackendKolab, e_book_backend_kolab, E_TYPE_BOOK_BACKEND)
 
 /*----------------------------------------------------------------------------*/
 /* internal statics */
@@ -224,12 +214,10 @@ book_backend_kolab_notify_opened (EBookBackendKolab *self,
 /*----------------------------------------------------------------------------*/
 /* class functions */
 
-static void
-book_backend_kolab_open (EBookBackendSync *backend,
-                         EDataBook *book,
-                         GCancellable *cancellable,
-                         gboolean only_if_exists,
-                         GError **error)
+static gboolean
+book_backend_kolab_open_sync (EBookBackend *backend,
+                              GCancellable *cancellable,
+                              GError **error)
 {
        EBookBackendKolab *self = NULL;
        EBookBackendKolabPrivate *priv = NULL;
@@ -243,10 +231,6 @@ book_backend_kolab_open (EBookBackendSync *backend,
        gboolean ok = FALSE;
        GError *tmp_err = NULL;
 
-       g_return_if_fail (error == NULL || *error == NULL);
-       /* cancellable may be NULL */
-       (void)only_if_exists; /* FIXME */
-
        self = E_BOOK_BACKEND_KOLAB (backend);
        priv = E_BOOK_BACKEND_KOLAB_PRIVATE (self);
 
@@ -326,7 +310,7 @@ book_backend_kolab_open (EBookBackendSync *backend,
        if (tmp_err != NULL) {
                kolab_util_contact_err_to_edb_err (error, tmp_err, __func__, __LINE__);
                g_error_free (tmp_err);
-               return;
+               return FALSE;
        }
 
        /* all good, notify that we're open for business */
@@ -334,56 +318,53 @@ book_backend_kolab_open (EBookBackendSync *backend,
        if (! ok) {
                kolab_util_contact_err_to_edb_err (error, tmp_err, __func__, __LINE__);
                g_error_free (tmp_err);
+               return FALSE;
        }
+
+       return TRUE;
 }
 
-static void
-book_backend_kolab_refresh (EBookBackendSync *backend,
-                            EDataBook *book,
-                            GCancellable *cancellable,
-                            GError **error)
+static gboolean
+book_backend_kolab_refresh_sync (EBookBackend *backend,
+                                 GCancellable *cancellable,
+                                 GError **error)
 {
 #if 0
        EBookBackendKolab *self = NULL;
        EBookBackendKolabPrivate *priv = NULL;
-#endif
-       g_return_if_fail (error == NULL || *error == NULL);
-       /* cancellable may be NULL */
-#if 0
+
        self = E_BOOK_BACKEND_KOLAB (backend);
        priv = E_BOOK_BACKEND_KOLAB_PRIVATE (self);
 #endif
        g_warning ("%s: FIXME implement me", __func__);
+
+       return TRUE;
 }
 
-static void
-book_backend_kolab_create_contacts (EBookBackendSync *backend,
-                                    EDataBook *book,
-                                    GCancellable *cancellable,
-                                    const GSList *vcards,
-                                    GSList **added_contacts,
-                                    GError **error)
+static gboolean
+book_backend_kolab_create_contacts_sync (EBookBackend *backend,
+                                         const gchar * const *vcards,
+                                         GQueue *out_contacts,
+                                         GCancellable *cancellable,
+                                         GError **error)
 {
        EBookBackendKolab *self = NULL;
        EBookBackendKolabPrivate *priv = NULL;
        EContact *econtact = NULL;
-       const GSList *it = NULL;
-       const gchar *vcard = NULL;
        gboolean ok = FALSE;
+       guint ii, length;
        GError *tmp_err = NULL;
 
-       g_return_if_fail (error == NULL || *error == NULL);
-       /* cancellable may be NULL */
-
        self = E_BOOK_BACKEND_KOLAB (backend);
        priv = E_BOOK_BACKEND_KOLAB_PRIVATE (self);
 
-       for (it = vcards; it != NULL; it = g_slist_next (it)) {
-               vcard = (const gchar *) it->data;
-               econtact = e_contact_new_from_vcard (vcard);
+       length = g_strv_length ((gchar **) vcards);
+
+       for (ii = 0; ii < length; ii++) {
+               econtact = e_contact_new_from_vcard (vcards[ii]);
                if (econtact == NULL) {
                        g_warning ("%s()[%u] error creating contact from vcard:\n%s",
-                                  __func__, __LINE__, vcard);
+                                  __func__, __LINE__, vcards[ii]);
                        tmp_err = e_data_book_create_error (E_DATA_BOOK_STATUS_OTHER_ERROR, NULL);
                        goto exit;
                }
@@ -405,7 +386,7 @@ book_backend_kolab_create_contacts (EBookBackendSync *backend,
                if (! ok)
                        goto exit;
 
-               *added_contacts = g_slist_append (*added_contacts, econtact);
+               g_queue_push_tail (out_contacts, econtact);
        }
 
  exit:
@@ -415,36 +396,35 @@ book_backend_kolab_create_contacts (EBookBackendSync *backend,
                        g_object_unref (econtact);
                kolab_util_contact_err_to_edb_err (error, tmp_err, __func__, __LINE__);
                g_error_free (tmp_err);
+               return FALSE;
        }
+
+       return TRUE;
 }
 
-static void
-book_backend_kolab_remove_contacts (EBookBackendSync *backend,
-                                    EDataBook *book,
-                                    GCancellable *cancellable,
-                                    const GSList *id_list,
-                                    GSList **removed_ids,
-                                    GError **error)
+static gboolean
+book_backend_kolab_remove_contacts_sync (EBookBackend *backend,
+                                         const gchar * const *uids,
+                                         GCancellable *cancellable,
+                                         GError **error)
 {
        EBookBackendKolab *self = NULL;
        EBookBackendKolabPrivate *priv = NULL;
-       const GSList *it = NULL;
        const gchar *foldername;
        gboolean ok = FALSE;
+       guint ii, length;
        GError *tmp_err = NULL;
 
-       g_return_if_fail (error == NULL || *error == NULL);
-       /* cancellable may be NULL */
-
        self = E_BOOK_BACKEND_KOLAB (backend);
        priv = E_BOOK_BACKEND_KOLAB_PRIVATE (self);
 
        foldername = kolab_util_backend_get_foldername (E_BACKEND (backend));
 
-       for (it = id_list; it != NULL; it = g_slist_next (it)) {
-               const gchar *uid = it->data;
+       length = g_strv_length ((gchar **) uids);
+
+       for (ii = 0; ii < length; ii++) {
                ok = kolab_mail_access_delete_by_uid (priv->book_koma,
-                                                     uid,
+                                                     uids[ii],
                                                      foldername,
                                                      cancellable,
                                                      &tmp_err);
@@ -456,45 +436,42 @@ book_backend_kolab_remove_contacts (EBookBackendSync *backend,
                        g_error_free (tmp_err);
                        tmp_err = NULL;
                }
-
-               *removed_ids = g_slist_append (*removed_ids, g_strdup(uid));
        }
 
  exit:
        if (tmp_err != NULL) {
                kolab_util_contact_err_to_edb_err (error, tmp_err, __func__, __LINE__);
                g_error_free (tmp_err);
+               return FALSE;
        }
+
+       return TRUE;
 }
 
-static void
-book_backend_kolab_modify_contacts (EBookBackendSync *backend,
-                                    EDataBook *book,
-                                    GCancellable *cancellable,
-                                    const GSList *vcards,
-                                    GSList **modified_contacts,
-                                    GError **error)
+static gboolean
+book_backend_kolab_modify_contacts_sync (EBookBackend *backend,
+                                         const gchar * const *vcards,
+                                         GQueue *out_contacts,
+                                         GCancellable *cancellable,
+                                         GError **error)
 {
        EBookBackendKolab *self = NULL;
        EBookBackendKolabPrivate *priv = NULL;
        EContact *econtact = NULL;
-       const GSList *it = NULL;
-       const gchar *vcard = NULL;
        gboolean ok = FALSE;
+       guint ii, length;
        GError *tmp_err = NULL;
 
-       g_return_if_fail (error == NULL || *error == NULL);
-       /* cancellable may be NULL */
-
        self = E_BOOK_BACKEND_KOLAB (backend);
        priv = E_BOOK_BACKEND_KOLAB_PRIVATE (self);
 
-       for (it = vcards; it != NULL; it = g_slist_next (vcards)) {
-               vcard = (const gchar *) it->data;
-               econtact = e_contact_new_from_vcard (vcard);
+       length = g_strv_length ((gchar **) vcards);
+
+       for (ii = 0; ii < length; ii++) {
+               econtact = e_contact_new_from_vcard (vcards[ii]);
                if (econtact == NULL) {
                        g_warning ("%s()[%u] error creating contact from vcard:\n%s",
-                                  __func__, __LINE__, vcard);
+                                  __func__, __LINE__, vcards[ii]);
                        tmp_err = e_data_book_create_error (E_DATA_BOOK_STATUS_OTHER_ERROR, NULL);
                        goto exit;
                }
@@ -507,8 +484,7 @@ book_backend_kolab_modify_contacts (EBookBackendSync *backend,
                if (! ok)
                        goto exit;
 
-               *modified_contacts = g_slist_append (*modified_contacts,
-                                                    econtact);
+               g_queue_push_tail (out_contacts, econtact);
        }
 
  exit:
@@ -517,25 +493,23 @@ book_backend_kolab_modify_contacts (EBookBackendSync *backend,
                        g_object_unref (econtact);
                kolab_util_contact_err_to_edb_err (error, tmp_err, __func__, __LINE__);
                g_error_free (tmp_err);
+               return FALSE;
        }
+
+       return TRUE;
 }
 
-static void
-book_backend_kolab_get_contact (EBookBackendSync *backend,
-                                EDataBook *book,
-                                GCancellable *cancellable,
-                                const gchar *id,
-                                gchar **vcard,
-                                GError **error)
+static EContact *
+book_backend_kolab_get_contact_sync (EBookBackend *backend,
+                                     const gchar *uid,
+                                     GCancellable *cancellable,
+                                     GError **error)
 {
        EBookBackendKolab *self = NULL;
        EBookBackendKolabPrivate *priv = NULL;
        EContact *econtact = NULL;
        GError *tmp_err = NULL;
 
-       g_return_if_fail (error == NULL || *error == NULL);
-       /* cancellable may be NULL */
-
        self = E_BOOK_BACKEND_KOLAB (backend);
        priv = E_BOOK_BACKEND_KOLAB_PRIVATE (self);
 
@@ -543,28 +517,25 @@ book_backend_kolab_get_contact (EBookBackendSync *backend,
 
        econtact = kolab_util_contact_cache_get_object (backend,
                                                        priv->book_koma,
-                                                       id,
+                                                       uid,
                                                        FALSE,
                                                        cancellable,
                                                        &tmp_err);
        if (tmp_err != NULL) {
                kolab_util_contact_err_to_edb_err (error, tmp_err, __func__, __LINE__);
                g_error_free (tmp_err);
-               return;
+               return NULL;
        }
 
-       *vcard = e_vcard_to_string (E_VCARD (econtact),
-                                   EVC_FORMAT_VCARD_30);
-       g_object_unref (econtact);
+       return econtact;
 }
 
-static void
-book_backend_kolab_get_contact_list (EBookBackendSync *backend,
-                                     EDataBook *book,
-                                     GCancellable *cancellable,
-                                     const gchar *query,
-                                     GSList **contacts,
-                                     GError **error)
+static gboolean
+book_backend_kolab_get_contact_list_sync (EBookBackend *backend,
+                                          const gchar *query,
+                                          GQueue *out_contacts,
+                                          GCancellable *cancellable,
+                                          GError **error)
 {
        EBookBackendKolab *self = NULL;
        EBookBackendKolabPrivate *priv = NULL;
@@ -573,9 +544,6 @@ book_backend_kolab_get_contact_list (EBookBackendSync *backend,
        gboolean ok = FALSE;
        GError *tmp_err = NULL;
 
-       g_return_if_fail (error == NULL || *error == NULL);
-       /* cancellable may be NULL */
-
        self = E_BOOK_BACKEND_KOLAB (backend);
        priv = E_BOOK_BACKEND_KOLAB_PRIVATE (self);
 
@@ -591,7 +559,7 @@ book_backend_kolab_get_contact_list (EBookBackendSync *backend,
        if (! ok) {
                kolab_util_contact_err_to_edb_err (error, tmp_err, __func__, __LINE__);
                g_error_free (tmp_err);
-               return;
+               return FALSE;
        }
 
        /* Fetch information from BackendCache */;
@@ -603,27 +571,23 @@ book_backend_kolab_get_contact_list (EBookBackendSync *backend,
        if (tmp_err != NULL) {
                kolab_util_contact_err_to_edb_err (error, tmp_err, __func__, __LINE__);
                g_error_free (tmp_err);
-               return;
+               return FALSE;
        }
 
-       for (it = econtact_list; it != NULL; it = g_list_next (it)) {
-               EContact *econtact = it->data;
-               gchar *vcard = e_vcard_to_string (E_VCARD (econtact),
-                                                 EVC_FORMAT_VCARD_30);
-               *contacts = g_slist_append (*contacts, vcard);
-               g_object_unref (econtact);
-       }
+       for (it = econtact_list; it != NULL; it = g_list_next (it))
+               g_queue_push_tail (out_contacts, it->data);
 
        g_list_free (econtact_list);
+
+       return TRUE;
 }
 
-static void
-book_backend_kolab_get_contact_list_uids (EBookBackendSync *backend,
-                                          EDataBook *book,
-                                          GCancellable *cancellable,
-                                          const gchar *query,
-                                          GSList **contacts_uids,
-                                          GError **error)
+static gboolean
+book_backend_kolab_get_contact_list_uids_sync (EBookBackend *backend,
+                                               const gchar *query,
+                                               GQueue *out_uids,
+                                               GCancellable *cancellable,
+                                               GError **error)
 {
        EBookBackendKolab *self = NULL;
        EBookBackendKolabPrivate *priv = NULL;
@@ -632,14 +596,11 @@ book_backend_kolab_get_contact_list_uids (EBookBackendSync *backend,
        gboolean ok = FALSE;
        GError *tmp_err = NULL;
 
-       g_return_if_fail (error == NULL || *error == NULL);
-       /* cancellable may be NULL */
-
        self = E_BOOK_BACKEND_KOLAB (backend);
        priv = E_BOOK_BACKEND_KOLAB_PRIVATE (self);
 
        /* TODO This function currently works the same way as
-        *      e_book_backend_kolab_get_contact_list, since
+        *      e_book_backend_kolab_get_contact_list_sync, since
         *      we need to update the local cache information
         *      when querying UIDs from KolabMailAccess.
         *
@@ -660,7 +621,7 @@ book_backend_kolab_get_contact_list_uids (EBookBackendSync *backend,
        if (! ok) {
                kolab_util_contact_err_to_edb_err (error, tmp_err, __func__, __LINE__);
                g_error_free (tmp_err);
-               return;
+               return FALSE;
        }
 
        /* Fetch information from BackendCache */;
@@ -672,18 +633,20 @@ book_backend_kolab_get_contact_list_uids (EBookBackendSync *backend,
        if (tmp_err != NULL) {
                kolab_util_contact_err_to_edb_err (error, tmp_err, __func__, __LINE__);
                g_error_free (tmp_err);
-               return;
+               return FALSE;
        }
 
        for (it = econtact_list; it != NULL; it = g_list_next (it)) {
                EContact *econtact = it->data;
                gchar *uid = e_contact_get (econtact,
                                            E_CONTACT_UID);
-               *contacts_uids = g_slist_append (*contacts_uids, uid);
+               g_queue_push_tail (out_uids, uid);
                g_object_unref (econtact);
        }
 
        g_list_free (econtact_list);
+
+       return TRUE;
 }
 
 static gchar *
@@ -714,7 +677,7 @@ book_backend_kolab_get_backend_property (EBookBackend *backend,
 #if 0  /* FIXME Delete this once kolab_mail_access_try_password_sync()
         *       works.  There may be code here that can be reused. */
 static void
-book_backend_kolab_authenticate_user (EBookBackendSync *backend,
+book_backend_kolab_authenticate_user (EBookBackend *backend,
                                       GCancellable *cancellable,
                                       ECredentials *credentials,
                                       GError **error)
@@ -909,7 +872,7 @@ book_backend_kolab_start_view (EBookBackend *backend,
        }
 
        /* First update the BackendCache to the current situation. */
-       ok = kolab_util_contact_cache_update_on_query (E_BOOK_BACKEND_SYNC (backend),
+       ok = kolab_util_contact_cache_update_on_query (backend,
                                                       priv->book_koma,
                                                       query,
                                                       NULL, /* FIXME GCancellable */
@@ -917,7 +880,7 @@ book_backend_kolab_start_view (EBookBackend *backend,
        if (! ok)
                goto exit;
 
-       econtact_list = kolab_util_contact_cache_get_contacts (E_BOOK_BACKEND_SYNC (backend),
+       econtact_list = kolab_util_contact_cache_get_contacts (backend,
                                                               priv->book_koma,
                                                               query,
                                                               NULL, /* FIXME GCancellable */
@@ -1019,7 +982,6 @@ e_book_backend_kolab_class_init (EBookBackendKolabClass *klass)
 {
        GObjectClass* object_class = G_OBJECT_CLASS (klass);
        EBookBackendClass *backend_class = E_BOOK_BACKEND_CLASS (klass);
-       EBookBackendSyncClass *sync_class = E_BOOK_BACKEND_SYNC_CLASS (klass);
 
        g_debug ("%s()[%u] called.", __func__, __LINE__);
 
@@ -1028,21 +990,19 @@ e_book_backend_kolab_class_init (EBookBackendKolabClass *klass)
        object_class->dispose = e_book_backend_kolab_dispose;
        object_class->finalize = e_book_backend_kolab_finalize;
 
-       /* Backend parent class methods methods not covered in the sync backend part */
+       /* Backend parent class methods */
        backend_class->get_backend_property = book_backend_kolab_get_backend_property;
+       backend_class->open_sync = book_backend_kolab_open_sync;
+       backend_class->refresh_sync = book_backend_kolab_refresh_sync;
+       backend_class->create_contacts_sync = book_backend_kolab_create_contacts_sync;
+       backend_class->remove_contacts_sync = book_backend_kolab_remove_contacts_sync;
+       backend_class->modify_contacts_sync = book_backend_kolab_modify_contacts_sync;
+       backend_class->get_contact_sync = book_backend_kolab_get_contact_sync;
+       backend_class->get_contact_list_sync = book_backend_kolab_get_contact_list_sync;
+       backend_class->get_contact_list_uids_sync = book_backend_kolab_get_contact_list_uids_sync;
        backend_class->start_view = book_backend_kolab_start_view;
        backend_class->stop_view = book_backend_kolab_stop_view;
 
-       /* Sync backend class functions */
-       sync_class->open_sync = book_backend_kolab_open;
-       sync_class->refresh_sync = book_backend_kolab_refresh;
-       sync_class->create_contacts_sync = book_backend_kolab_create_contacts;
-       sync_class->remove_contacts_sync = book_backend_kolab_remove_contacts;
-       sync_class->modify_contacts_sync = book_backend_kolab_modify_contacts;
-       sync_class->get_contact_sync = book_backend_kolab_get_contact;
-       sync_class->get_contact_list_sync = book_backend_kolab_get_contact_list;
-       sync_class->get_contact_list_uids_sync = book_backend_kolab_get_contact_list_uids;
-
        /* Register relevant ESourceExtension types. */
        REGISTER_TYPE (E_TYPE_SOURCE_KOLAB_FOLDER);
 
diff --git a/src/addressbook/e-book-backend-kolab.h b/src/addressbook/e-book-backend-kolab.h
index 18ad3c9..a5db3a7 100644
--- a/src/addressbook/e-book-backend-kolab.h
+++ b/src/addressbook/e-book-backend-kolab.h
@@ -62,12 +62,12 @@ G_BEGIN_DECLS
 
 typedef struct _EBookBackendKolab EBookBackendKolab;
 struct _EBookBackendKolab {
-       EBookBackendSync parent_object;
+       EBookBackend parent_object;
 };
 
 typedef struct _EBookBackendKolabClass EBookBackendKolabClass;
 struct _EBookBackendKolabClass {
-       EBookBackendSyncClass parent_class;
+       EBookBackendClass parent_class;
 };
 
 GType
diff --git a/src/addressbook/kolab-util-contact-cache.c b/src/addressbook/kolab-util-contact-cache.c
index 679107a..fac9a8f 100644
--- a/src/addressbook/kolab-util-contact-cache.c
+++ b/src/addressbook/kolab-util-contact-cache.c
@@ -35,7 +35,7 @@
 /*----------------------------------------------------------------------------*/
 
 EContact*
-kolab_util_contact_cache_get_object (EBookBackendSync *backend,
+kolab_util_contact_cache_get_object (EBookBackend *backend,
                                      KolabMailAccess *koma,
                                      const gchar *uid,
                                      gboolean bulk,
@@ -84,7 +84,7 @@ kolab_util_contact_cache_get_object (EBookBackendSync *backend,
 } /* kolab_util_contact_cache_get_object () */
 
 gboolean
-kolab_util_contact_cache_update_object (EBookBackendSync *backend,
+kolab_util_contact_cache_update_object (EBookBackend *backend,
                                         KolabMailAccess *koma,
                                         const gchar *uid,
                                         gboolean bulk,
@@ -114,7 +114,7 @@ kolab_util_contact_cache_update_object (EBookBackendSync *backend,
 
 /**
  * kolab_util_contact_cache_assure_uid_on_econtact:
- * @backend: an #EBookBackendSync
+ * @backend: an #EBookBackend
  * @koma: A KolabMailAccess instance.
  * @econtact: An EContact.
  * @bulk: Whether or not this is a mass operation.
@@ -126,7 +126,7 @@ kolab_util_contact_cache_update_object (EBookBackendSync *backend,
  * Returns: On Success TRUE is returned.
  */
 gboolean
-kolab_util_contact_cache_assure_uid_on_econtact (EBookBackendSync *backend,
+kolab_util_contact_cache_assure_uid_on_econtact (EBookBackend *backend,
                                                  KolabMailAccess *koma,
                                                  EContact *econtact,
                                                  gboolean bulk,
@@ -180,7 +180,7 @@ kolab_util_contact_cache_assure_uid_on_econtact (EBookBackendSync *backend,
 
 /**
  * kolab_util_contact_cache_update_on_query:
- * @backend: an #EBookBackendSync
+ * @backend: an #EBookBackend
  * @koma: A KolabMailAccess object.
  * @query: The query string associated with the update operation.
  * @cancellable: A cancellation stack.
@@ -192,7 +192,7 @@ kolab_util_contact_cache_assure_uid_on_econtact (EBookBackendSync *backend,
  * Returns: TRUE on success.
  */
 gboolean
-kolab_util_contact_cache_update_on_query (EBookBackendSync *backend,
+kolab_util_contact_cache_update_on_query (EBookBackend *backend,
                                           KolabMailAccess *koma,
                                           const gchar *query,
                                           GCancellable *cancellable,
@@ -231,7 +231,7 @@ kolab_util_contact_cache_update_on_query (EBookBackendSync *backend,
 }
 
 GList*
-kolab_util_contact_cache_get_contacts (EBookBackendSync *backend,
+kolab_util_contact_cache_get_contacts (EBookBackend *backend,
                                        KolabMailAccess *koma,
                                        const gchar *query,
                                        GCancellable *cancellable,
diff --git a/src/addressbook/kolab-util-contact-cache.h b/src/addressbook/kolab-util-contact-cache.h
index 248ed03..e8aea41 100644
--- a/src/addressbook/kolab-util-contact-cache.h
+++ b/src/addressbook/kolab-util-contact-cache.h
@@ -40,7 +40,7 @@
 /*----------------------------------------------------------------------------*/
 
 gboolean
-kolab_util_contact_cache_assure_uid_on_econtact (EBookBackendSync *backend,
+kolab_util_contact_cache_assure_uid_on_econtact (EBookBackend *backend,
                                                  KolabMailAccess *koma,
                                                  EContact *econtact,
                                                  gboolean bulk,
@@ -48,14 +48,14 @@ kolab_util_contact_cache_assure_uid_on_econtact (EBookBackendSync *backend,
                                                  GError **error);
 
 EContact*
-kolab_util_contact_cache_get_object (EBookBackendSync *backend,
+kolab_util_contact_cache_get_object (EBookBackend *backend,
                                      KolabMailAccess *koma,
                                      const gchar *uid,
                                      gboolean bulk,
                                      GCancellable *cancellable,
                                      GError **error);
 gboolean
-kolab_util_contact_cache_update_object (EBookBackendSync *backend,
+kolab_util_contact_cache_update_object (EBookBackend *backend,
                                         KolabMailAccess *koma,
                                         const gchar *uid,
                                         gboolean bulk,
@@ -63,14 +63,14 @@ kolab_util_contact_cache_update_object (EBookBackendSync *backend,
                                         GError **error);
 
 gboolean
-kolab_util_contact_cache_update_on_query (EBookBackendSync *backend,
+kolab_util_contact_cache_update_on_query (EBookBackend *backend,
                                           KolabMailAccess *koma,
                                           const gchar *query,
                                           GCancellable *cancellable,
                                           GError **error);
 
 GList*
-kolab_util_contact_cache_get_contacts (EBookBackendSync *backend,
+kolab_util_contact_cache_get_contacts (EBookBackend *backend,
                                        KolabMailAccess *koma,
                                        const gchar *query,
                                        GCancellable *cancellable,
diff --git a/src/addressbook/kolab-util-contact.c b/src/addressbook/kolab-util-contact.c
index 9106940..3a0d529 100644
--- a/src/addressbook/kolab-util-contact.c
+++ b/src/addressbook/kolab-util-contact.c
@@ -124,7 +124,7 @@ kolab_util_contact_gen_uid_if_none (EContact **contact)
 
 gboolean
 kolab_util_contact_store (EContact *econtact,
-                          EBookBackendSync *backend,
+                          EBookBackend *backend,
                           KolabMailAccess *koma,
                           GCancellable *cancellable,
                           GError **error)
diff --git a/src/addressbook/kolab-util-contact.h b/src/addressbook/kolab-util-contact.h
index 7187781..2e7b982 100644
--- a/src/addressbook/kolab-util-contact.h
+++ b/src/addressbook/kolab-util-contact.h
@@ -53,7 +53,7 @@ kolab_util_contact_gen_uid_if_none (EContact **contact);
 
 gboolean
 kolab_util_contact_store (EContact *econtact,
-                          EBookBackendSync *backend,
+                          EBookBackend *backend,
                           KolabMailAccess *koma,
                           GCancellable *cancellable,
                           GError **error);


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