diff options
| -rw-r--r-- | camel/providers/imap4/ChangeLog | 5 | ||||
| -rw-r--r-- | camel/providers/imap4/camel-imap4-search.c | 7 | ||||
| -rw-r--r-- | camel/providers/imap4/camel-imap4-search.h | 14 |
3 files changed, 25 insertions, 1 deletions
diff --git a/camel/providers/imap4/ChangeLog b/camel/providers/imap4/ChangeLog index 725de4aaf..3da610806 100644 --- a/camel/providers/imap4/ChangeLog +++ b/camel/providers/imap4/ChangeLog @@ -1,3 +1,8 @@ +2005-02-10 Jeffrey Stedfast <fejj@novell.com> + + * camel-imap4-search.c (imap4_body_contains): If we're in offline + mode, let the parent implementation perform the search. + 2005-02-04 Not Zed <NotZed@Ximian.com> * camel-imap4-store.c (imap4_build_folder_info): always get the diff --git a/camel/providers/imap4/camel-imap4-search.c b/camel/providers/imap4/camel-imap4-search.c index 7102e2fa0..fbfbe0276 100644 --- a/camel/providers/imap4/camel-imap4-search.c +++ b/camel/providers/imap4/camel-imap4-search.c @@ -29,6 +29,8 @@ #include <string.h> #include <ctype.h> +#include <camel/camel-offline-store.h> + #include "camel-imap4-command.h" #include "camel-imap4-engine.h" #include "camel-imap4-stream.h" @@ -123,7 +125,7 @@ untagged_search (CamelIMAP4Engine *engine, CamelIMAP4Command *ic, guint32 index, sprintf (uid, "%u", token->v.number); if ((info = camel_folder_summary_uid (summary, uid))) { g_ptr_array_add (matches, (char *) camel_message_info_uid (info)); - camel_message_info_free(info); + camel_message_info_free (info); } } @@ -153,6 +155,9 @@ imap4_body_contains (struct _ESExp *f, int argc, struct _ESExpResult **argv, Cam size_t used; char *set; + if (((CamelOfflineStore *) engine->service)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL) + return parent_class->body_contains (f, argc, argv, search); + summary_set = search->summary_set ? search->summary_set : search->summary; /* check the simple cases */ diff --git a/camel/providers/imap4/camel-imap4-search.h b/camel/providers/imap4/camel-imap4-search.h index 5165367cf..f9e9b29ee 100644 --- a/camel/providers/imap4/camel-imap4-search.h +++ b/camel/providers/imap4/camel-imap4-search.h @@ -1,6 +1,7 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* * Authors: Jeffrey Stedfast <fejj@novell.com> + * Michael Zucchi <notzed@novell.com> * * Copyright 2004 Novell, Inc. (www.novell.com) * @@ -24,6 +25,9 @@ #ifndef __CAMEL_IMAP4_SEARCH_H__ #define __CAMEL_IMAP4_SEARCH_H__ +#include <libedataserver/e-msgport.h> + +#include <camel/camel-data-cache.h> #include <camel/camel-folder-search.h> #ifdef __cplusplus @@ -45,6 +49,16 @@ struct _CamelIMAP4Search { CamelFolderSearch parent_object; struct _CamelIMAP4Engine *engine; + + guint32 lastuid; /* current 'last uid' for the folder */ + guint32 validity; /* validity of the current folder */ + + CamelDataCache *cache; /* disk-cache for searches */ + + /* cache of body search matches */ + EDList matches; + GHashTable *matches_hash; + unsigned int matches_count; }; struct _CamelIMAP4SearchClass { |
