[evolution-data-server/openismus-work] Added 'requested_fields' parameter to helper functions in ebook-test-utils.c



commit c9a2a4c9c9787901ef58a0bf4330b001130a79d4
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Sun Jun 12 18:52:12 2011 +0900

    Added 'requested_fields' parameter to helper functions in ebook-test-utils.c
    
    Added the new 'requested_fields' to ebook_test_utils_book_get_book_view()
    and ebook_test_utils_book_async_get_book_view() and updated
    test-ebook-get-book-view.c to pass NULL.

 addressbook/tests/ebook/ebook-test-utils.c         |    6 ++++--
 addressbook/tests/ebook/ebook-test-utils.h         |    2 ++
 addressbook/tests/ebook/test-ebook-get-book-view.c |    4 ++--
 3 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/addressbook/tests/ebook/ebook-test-utils.c b/addressbook/tests/ebook/ebook-test-utils.c
index 12045fe..76e2195 100644
--- a/addressbook/tests/ebook/ebook-test-utils.c
+++ b/addressbook/tests/ebook/ebook-test-utils.c
@@ -732,11 +732,12 @@ ebook_test_utils_book_async_remove (EBook       *book,
 void
 ebook_test_utils_book_get_book_view (EBook       *book,
                                      EBookQuery  *query,
+				     GList       *requested_fields,
                                      EBookView  **view)
 {
         GError *error = NULL;
 
-        if (!e_book_get_book_view (book, query, NULL, -1, view, &error)) {
+        if (!e_book_get_book_view (book, query, requested_fields, -1, view, &error)) {
                 const gchar *uri;
 
                 uri = e_book_get_uri (book);
@@ -769,6 +770,7 @@ get_book_view_cb (EBook            *book,
 void
 ebook_test_utils_book_async_get_book_view (EBook       *book,
                                            EBookQuery  *query,
+					   GList       *requested_fields,
                                            GSourceFunc  callback,
                                            gpointer     user_data)
 {
@@ -777,7 +779,7 @@ ebook_test_utils_book_async_get_book_view (EBook       *book,
         closure = g_new0 (EBookTestClosure, 1);
         closure->cb = callback;
         closure->user_data = user_data;
-        if (!e_book_get_book_view_async (book, query, NULL, -1, (EBookBookViewAsyncCallback) get_book_view_cb, closure)) {
+        if (!e_book_get_book_view_async (book, query, requested_fields, -1, (EBookBookViewAsyncCallback) get_book_view_cb, closure)) {
                 g_warning ("failed to set up book view retrieval");
                 exit(1);
         }
diff --git a/addressbook/tests/ebook/ebook-test-utils.h b/addressbook/tests/ebook/ebook-test-utils.h
index 789e21d..13e128b 100644
--- a/addressbook/tests/ebook/ebook-test-utils.h
+++ b/addressbook/tests/ebook/ebook-test-utils.h
@@ -148,10 +148,12 @@ ebook_test_utils_book_async_remove (EBook          *book,
 void
 ebook_test_utils_book_get_book_view (EBook       *book,
                                      EBookQuery  *query,
+				     GList       *requested_fields,
                                      EBookView  **view);
 void
 ebook_test_utils_book_async_get_book_view (EBook       *book,
                                            EBookQuery  *query,
+					   GList       *requested_fields,
                                            GSourceFunc  callback,
                                            gpointer     user_data);
 
diff --git a/addressbook/tests/ebook/test-ebook-get-book-view.c b/addressbook/tests/ebook/test-ebook-get-book-view.c
index e4a3277..f8e6a20 100644
--- a/addressbook/tests/ebook/test-ebook-get-book-view.c
+++ b/addressbook/tests/ebook/test-ebook-get-book-view.c
@@ -101,7 +101,7 @@ main (gint argc, gchar **argv)
 	 */
 	setup_book (&book);
 	query = e_book_query_any_field_contains ("");
-	ebook_test_utils_book_get_book_view (book, query, &view);
+	ebook_test_utils_book_get_book_view (book, query, NULL, &view);
 	setup_and_start_view (view);
 
 	test_print ("successfully set up the book view\n");
@@ -119,7 +119,7 @@ main (gint argc, gchar **argv)
 	query = e_book_query_any_field_contains ("");
 
 	loop = g_main_loop_new (NULL, TRUE);
-	ebook_test_utils_book_async_get_book_view (book, query,
+	ebook_test_utils_book_async_get_book_view (book, query, NULL,
 			(GSourceFunc) get_book_view_cb, loop);
 
 	g_main_loop_run (loop);



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