[evolution-data-server/openismus-work-master: 9/10] EDataBook: Use the new op_dispatch() function in direct access.



commit 81e8dd9363d3ddd17ce810a4dad3e05781276878
Author: Tristan Van Berkom <tristanvb openismus com>
Date:   Fri Feb 1 22:21:16 2013 +0900

    EDataBook: Use the new op_dispatch() function in direct access.

 addressbook/libedata-book/e-data-book.c |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/addressbook/libedata-book/e-data-book.c b/addressbook/libedata-book/e-data-book.c
index 8f9885a..e124914 100644
--- a/addressbook/libedata-book/e-data-book.c
+++ b/addressbook/libedata-book/e-data-book.c
@@ -2301,7 +2301,7 @@ e_data_book_open_sync (EDataBook *book,
 
 	op = op_direct_new (OP_OPEN, book, cancellable, NULL, NULL, e_data_book_open_sync, TRUE, &data);
 
-	e_operation_pool_push (ops_pool, op);
+	op_dispatch (book, op);
 
 	direct_operation_wait (data);
 	result = e_data_book_open_finish (book, G_ASYNC_RESULT (data->result), error);
@@ -2357,6 +2357,8 @@ e_data_book_close (EDataBook *book,
 	g_return_if_fail (E_IS_DATA_BOOK (book));
 
 	op = op_direct_new (OP_CLOSE, book, cancellable, callback, user_data, e_data_book_close, FALSE, NULL);
+
+	/* This operation is never queued. */
 	e_operation_pool_push (ops_pool, op);
 }
 
@@ -2388,6 +2390,8 @@ e_data_book_close_sync (EDataBook *book,
 	g_return_val_if_fail (E_IS_DATA_BOOK (book), FALSE);
 
 	op = op_direct_new (OP_CLOSE, book, cancellable, NULL, NULL, e_data_book_close_sync, TRUE, &data);
+
+	/* This operation is never queued. */
 	e_operation_pool_push (ops_pool, op);
 
 	direct_operation_wait (data);
@@ -2412,7 +2416,7 @@ e_data_book_get_contact (EDataBook *book,
 	op = op_direct_new (OP_GET_CONTACT, book, cancellable, callback, user_data, e_data_book_get_contact, FALSE, NULL);
 	op->d.uid = g_strdup (uid);
 
-	e_operation_pool_push (ops_pool, op);
+	op_dispatch (book, op);
 }
 
 gboolean
@@ -2456,7 +2460,7 @@ e_data_book_get_contact_sync (EDataBook *book,
 	op = op_direct_new (OP_GET_CONTACT, book, cancellable, NULL, NULL, e_data_book_get_contact_sync, TRUE, &data);
 	op->d.uid = g_strdup (uid);
 
-	e_operation_pool_push (ops_pool, op);
+	op_dispatch (book, op);
 
 	direct_operation_wait (data);
 	result = e_data_book_get_contact_finish (book, G_ASYNC_RESULT (data->result), contact, error);
@@ -2479,7 +2483,7 @@ e_data_book_get_contacts (EDataBook *book,
 	op = op_direct_new (OP_GET_CONTACTS, book, cancellable, callback, user_data, e_data_book_get_contacts, FALSE, NULL);
 	op->d.query = g_strdup (sexp);
 
-	e_operation_pool_push (ops_pool, op);
+	op_dispatch (book, op);
 }
 
 gboolean
@@ -2525,7 +2529,7 @@ e_data_book_get_contacts_sync (EDataBook *book,
 	op = op_direct_new (OP_GET_CONTACTS, book, cancellable, NULL, NULL, e_data_book_get_contacts_sync, TRUE, &data);
 	op->d.query = g_strdup (sexp);
 
-	e_operation_pool_push (ops_pool, op);
+	op_dispatch (book, op);
 
 	direct_operation_wait (data);
 	result = e_data_book_get_contacts_finish (book, G_ASYNC_RESULT (data->result), contacts, error);
@@ -2548,7 +2552,7 @@ e_data_book_get_contacts_uids (EDataBook *book,
 	op = op_direct_new (OP_GET_CONTACTS_UIDS, book, cancellable, callback, user_data, e_data_book_get_contacts_uids, FALSE, NULL);
 	op->d.query = g_strdup (sexp);
 
-	e_operation_pool_push (ops_pool, op);
+	op_dispatch (book, op);
 }
 
 gboolean
@@ -2594,7 +2598,7 @@ e_data_book_get_contacts_uids_sync (EDataBook *book,
 	op = op_direct_new (OP_GET_CONTACTS_UIDS, book, cancellable, NULL, NULL, e_data_book_get_contacts_uids_sync, TRUE, &data);
 	op->d.query = g_strdup (sexp);
 
-	e_operation_pool_push (ops_pool, op);
+	op_dispatch (book, op);
 
 	direct_operation_wait (data);
 	result = e_data_book_get_contacts_uids_finish (book, G_ASYNC_RESULT (data->result), contacts_uids, error);



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