[evolution-data-server/openismus-work-master: 89/134] Changes for Review: EBookClient API adaptations.



commit 44badd993d6245071577119ff587b957fe4c5a78
Author: Tristan Van Berkom <tristanvb openismus com>
Date:   Sat Oct 5 02:03:21 2013 +0200

    Changes for Review: EBookClient API adaptations.

 addressbook/libebook/e-book-client.c |   21 +++++++++++----------
 addressbook/libebook/e-book-client.h |    4 ++--
 2 files changed, 13 insertions(+), 12 deletions(-)
---
diff --git a/addressbook/libebook/e-book-client.c b/addressbook/libebook/e-book-client.c
index 6cc5b05..972f900 100644
--- a/addressbook/libebook/e-book-client.c
+++ b/addressbook/libebook/e-book-client.c
@@ -71,7 +71,7 @@ struct _AsyncContext {
        GSList *object_list;
        GSList *string_list;
        EContactField *sort_fields;
-       EBookSortType *sort_types;
+       EBookCursorSortType *sort_types;
        guint n_sort_fields;
        gchar *sexp;
        gchar *uid;
@@ -3732,9 +3732,9 @@ sort_param_to_strv (gpointer param,
 
                        array[i] = e_contact_field_name (fields[i]);
                } else {
-                       EBookSortType *types = (EBookSortType *)param;
+                       EBookCursorSortType *types = (EBookCursorSortType *)param;
 
-                       array[i] = e_enum_to_string (E_TYPE_BOOK_SORT_TYPE,
+                       array[i] = e_enum_to_string (E_TYPE_BOOK_CURSOR_SORT_TYPE,
                                                     types[i]);
                }
        }
@@ -3777,7 +3777,8 @@ book_client_get_cursor_in_dbus_thread (GSimpleAsyncResult *simple,
                                                          async_context->sexp,
                                                          &local_error)) {
                                e_book_backend_delete_cursor (client->priv->direct_backend,
-                                                             cursor);
+                                                             cursor,
+                                                             NULL);
                                cursor = NULL;
                        }
                }
@@ -3869,7 +3870,7 @@ static void
 e_book_client_get_cursor_with_context (EBookClient *client,
                                       const gchar *sexp,
                                       EContactField *sort_fields,
-                                      EBookSortType *sort_types,
+                                      EBookCursorSortType *sort_types,
                                       guint n_fields,
                                       GMainContext *context,
                                       GCancellable *cancellable,
@@ -3887,7 +3888,7 @@ e_book_client_get_cursor_with_context (EBookClient *client,
        async_context = g_slice_new0 (AsyncContext);
        async_context->sexp = g_strdup (sexp);
        async_context->sort_fields = g_memdup (sort_fields, sizeof (EContactField) * n_fields);
-       async_context->sort_types = g_memdup (sort_types, sizeof (EBookSortType) * n_fields);
+       async_context->sort_types = g_memdup (sort_types, sizeof (EBookCursorSortType) * n_fields);
        async_context->n_sort_fields = n_fields;
        async_context->context = g_main_context_ref (context);
 
@@ -3912,7 +3913,7 @@ e_book_client_get_cursor_with_context (EBookClient *client,
  * @client: an #EBookClient
  * @sexp: an S-expression representing the query
  * @sort_fields: an array of #EContactFields to sort the cursor with
- * @sort_types: an array of #EBookSortTypes to complement @sort_fields
+ * @sort_types: an array of #EBookCursorSortTypes to complement @sort_fields
  * @n_fields: the length of the input @sort_fields and @sort_types arrays
  * @cancellable: a #GCancellable; can be %NULL
  * @callback: callback to call when a result is ready
@@ -3931,7 +3932,7 @@ void
 e_book_client_get_cursor (EBookClient *client,
                          const gchar *sexp,
                          EContactField *sort_fields,
-                         EBookSortType *sort_types,
+                         EBookCursorSortType *sort_types,
                          guint n_fields,
                          GCancellable *cancellable,
                          GAsyncReadyCallback callback,
@@ -4001,7 +4002,7 @@ e_book_client_get_cursor_finish (EBookClient *client,
  * @client: an #EBookClient
  * @sexp: an S-expression representing the query
  * @sort_fields: an array of #EContactFields to sort the cursor with
- * @sort_types: an array of #EBookSortTypes to complement @sort_fields
+ * @sort_types: an array of #EBookCursorSortTypes to complement @sort_fields
  * @n_fields: the length of the input @sort_fields and @sort_types arrays
  * @out_cursor: (out): return location for an #EBookClientCursor
  * @cancellable: a #GCancellable; can be %NULL
@@ -4022,7 +4023,7 @@ gboolean
 e_book_client_get_cursor_sync (EBookClient *client,
                               const gchar *sexp,
                               EContactField *sort_fields,
-                              EBookSortType *sort_types,
+                              EBookCursorSortType *sort_types,
                               guint n_fields,
                               EBookClientCursor **out_cursor,
                               GCancellable *cancellable,
diff --git a/addressbook/libebook/e-book-client.h b/addressbook/libebook/e-book-client.h
index 4b2d7a0..586213f 100644
--- a/addressbook/libebook/e-book-client.h
+++ b/addressbook/libebook/e-book-client.h
@@ -287,7 +287,7 @@ gboolean    e_book_client_get_view_sync     (EBookClient *client,
 void           e_book_client_get_cursor        (EBookClient *client,
                                                 const gchar *sexp,
                                                 EContactField *sort_fields,
-                                                EBookSortType *sort_types,
+                                                EBookCursorSortType *sort_types,
                                                 guint n_fields,
                                                 GCancellable *cancellable,
                                                 GAsyncReadyCallback callback,
@@ -299,7 +299,7 @@ gboolean    e_book_client_get_cursor_finish (EBookClient *client,
 gboolean       e_book_client_get_cursor_sync   (EBookClient *client,
                                                 const gchar *sexp,
                                                 EContactField *sort_fields,
-                                                EBookSortType *sort_types,
+                                                EBookCursorSortType *sort_types,
                                                 guint n_fields,
                                                 EBookClientCursor **out_cursor,
                                                 GCancellable *cancellable,


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