diff options
author | NotZed <NotZed@HelixCode.com> | 2000-03-24 03:57:31 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2000-03-24 03:57:31 +0800 |
commit | 6a766351410912acde101b6fa01488338efca5c8 (patch) | |
tree | c07e09a90d70b9438999f698c3d82682fbe7d857 /camel/camel-folder.c | |
parent | d2e39f53aef475f9747aae84dcb22baf26c72b78 (diff) | |
download | gsoc2013-evolution-6a766351410912acde101b6fa01488338efca5c8.tar.gz gsoc2013-evolution-6a766351410912acde101b6fa01488338efca5c8.tar.zst gsoc2013-evolution-6a766351410912acde101b6fa01488338efca5c8.zip |
Added async search api.
2000-03-22 NotZed <NotZed@HelixCode.com>
* camel-folder.[ch]: Added async search api.
* providers/mbox/camel-mbox-search.c
(camel_mbox_folder_search_by_expression): Changed to use an
asynchronous interface.
(camel_mbox_folder_search_cancel): Cancel function for async
interface.
svn path=/trunk/; revision=2155
Diffstat (limited to 'camel/camel-folder.c')
-rw-r--r-- | camel/camel-folder.c | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/camel/camel-folder.c b/camel/camel-folder.c index d272d42a22..f26921526f 100644 --- a/camel/camel-folder.c +++ b/camel/camel-folder.c @@ -1399,14 +1399,32 @@ camel_folder_has_search_capability (CamelFolder *folder) return folder->has_search_capability; } -GList *camel_folder_search_by_expression (CamelFolder *folder, - const char *expression, - CamelException *ex) +int camel_folder_search_by_expression (CamelFolder *folder, + const char *expression, + CamelSearchFunc *func, + void *data, + CamelException *ex) { g_assert (folder != NULL); - g_return_val_if_fail (folder->has_search_capability, NULL); + g_return_val_if_fail (folder->has_search_capability, -1); - return CF_CLASS (folder)->search_by_expression (folder, expression, ex); + return CF_CLASS (folder)->search_by_expression (folder, expression, func, data, ex); +} + +gboolean camel_folder_search_complete(CamelFolder *folder, int searchid, gboolean wait, CamelException *ex) +{ + g_assert (folder != NULL); + g_return_if_fail (folder->has_search_capability); + + return CF_CLASS (folder)->search_complete (folder, searchid, wait, ex); +} + +void camel_folder_search_cancel(CamelFolder *folder, int searchid, CamelException *ex) +{ + g_assert (folder != NULL); + g_return_if_fail (folder->has_search_capability); + + return CF_CLASS (folder)->search_cancel (folder, searchid, ex); } /* **** */ |