From c6fc4e27a953c5213cff8400ec8e40f6f051e914 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Mon, 25 Mar 2002 12:11:44 +0000 Subject: When we add a new name, up all of the cache limits, because we're probably 2002-03-25 Not Zed * camel-text-index.c (text_index_add_name): When we add a new name, up all of the cache limits, because we're probably going to be adding more. (text_index_sync): Drop the cache limits back down again, we dont need them when looking words up. ** MERGE camel_index branch. * camel-text-index.[ch]: Added files i forgot to add (eep nearly lost all this work!) * camel-block-file.c (sync_nolock): Fix an infinite loop in syncing. svn path=/trunk/; revision=16242 --- camel/providers/local/camel-mh-summary.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'camel/providers/local/camel-mh-summary.c') diff --git a/camel/providers/local/camel-mh-summary.c b/camel/providers/local/camel-mh-summary.c index 06c5715d0d..530baa3caf 100644 --- a/camel/providers/local/camel-mh-summary.c +++ b/camel/providers/local/camel-mh-summary.c @@ -22,14 +22,16 @@ #include #endif +#include #include +#include + #include #include #include #include #include -#include #include #include @@ -118,7 +120,7 @@ camel_mh_summary_finalise(CamelObject *obj) * * Return value: A new #CamelMhSummary object. **/ -CamelMhSummary *camel_mh_summary_new (const char *filename, const char *mhdir, ibex *index) +CamelMhSummary *camel_mh_summary_new (const char *filename, const char *mhdir, CamelIndex *index) { CamelMhSummary *o = (CamelMhSummary *)camel_object_new(camel_mh_summary_get_type ()); @@ -171,7 +173,7 @@ static int camel_mh_summary_add(CamelLocalSummary *cls, const char *name, int fo mp = camel_mime_parser_new(); camel_mime_parser_scan_from(mp, FALSE); camel_mime_parser_init_with_fd(mp, fd); - if (cls->index && (forceindex || !ibex_contains_name(cls->index, (char *)name))) { + if (cls->index && (forceindex || !camel_index_has_name(cls->index, name))) { d(printf("forcing indexing of message content\n")); camel_folder_summary_set_index((CamelFolderSummary *)mhs, cls->index); } else { @@ -191,7 +193,7 @@ remove_summary(char *key, CamelMessageInfo *info, CamelLocalSummary *cls) { d(printf("removing message %s from summary\n", key)); if (cls->index) - ibex_unindex(cls->index, (char *)camel_message_info_uid(info)); + camel_index_delete_name(cls->index, camel_message_info_uid(info)); camel_folder_summary_remove((CamelFolderSummary *)cls, info); camel_folder_summary_info_free((CamelFolderSummary *)cls, info); } @@ -239,7 +241,7 @@ mh_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changeinfo, Came } if (c==0) { info = camel_folder_summary_uid((CamelFolderSummary *)cls, d->d_name); - if (info == NULL || (cls->index && (!ibex_contains_name(cls->index, d->d_name)))) { + if (info == NULL || (cls->index && (!camel_index_has_name(cls->index, d->d_name)))) { /* need to add this file to the summary */ if (info != NULL) { g_hash_table_remove(left, camel_message_info_uid(info)); @@ -368,7 +370,7 @@ mh_summary_sync(CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInfo /* FIXME: put this in folder_summary::remove()? */ if (cls->index) - ibex_unindex(cls->index, (char *)uid); + camel_index_delete_name(cls->index, (char *)uid); camel_folder_change_info_remove_uid(changes, uid); camel_folder_summary_remove((CamelFolderSummary *)cls, info); -- cgit