aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/mbox/camel-mbox-folder.c
diff options
context:
space:
mode:
authorNotZed <notzed@zedzone.helixcode.com>2000-02-14 13:39:02 +0800
committerMichael Zucci <zucchi@src.gnome.org>2000-02-14 13:39:02 +0800
commitaeaa2ed70043e607e1da431d8f33726590f4c83b (patch)
tree6b017340f52b51b3eb55c0c847089ec5ca505263 /camel/providers/mbox/camel-mbox-folder.c
parentddcfc699c72ee253307f2939492eb469beba3834 (diff)
downloadgsoc2013-evolution-aeaa2ed70043e607e1da431d8f33726590f4c83b.tar
gsoc2013-evolution-aeaa2ed70043e607e1da431d8f33726590f4c83b.tar.gz
gsoc2013-evolution-aeaa2ed70043e607e1da431d8f33726590f4c83b.tar.bz2
gsoc2013-evolution-aeaa2ed70043e607e1da431d8f33726590f4c83b.tar.lz
gsoc2013-evolution-aeaa2ed70043e607e1da431d8f33726590f4c83b.tar.xz
gsoc2013-evolution-aeaa2ed70043e607e1da431d8f33726590f4c83b.tar.zst
gsoc2013-evolution-aeaa2ed70043e607e1da431d8f33726590f4c83b.zip
New file, implements the search api for mbox folders.
2000-02-13 NotZed <notzed@zedzone.helixcode.com> * providers/mbox/camel-mbox-search.c: New file, implements the search api for mbox folders. * providers/mbox/Makefile.am: Link with ibex. * camel-folder.c (camel_folder_has_search_capability): Api additions. (camel_folder_search_by_expression): Ditto. 2000-02-12 NotZed <notzed@zedzone.helixcode.com> * providers/mbox/camel-mbox-folder.c (_set_name): Setup index filename as well. (_init_with_store): Init index filename. Hmm, none of these names ever seem to get free'd (FIXME?) * providers/mbox/camel-mbox-folder.h: Add index file name. 2000-02-12 NotZed <notzed@helixcode.com> * camel-folder.h: Add folder search functions. ** Created ChangeLog just for camel ** - refer to ../ChangeLog for changes prior to this date. svn path=/trunk/; revision=1772
Diffstat (limited to 'camel/providers/mbox/camel-mbox-folder.c')
-rw-r--r--camel/providers/mbox/camel-mbox-folder.c38
1 files changed, 13 insertions, 25 deletions
diff --git a/camel/providers/mbox/camel-mbox-folder.c b/camel/providers/mbox/camel-mbox-folder.c
index 53da87b746..09c08d967a 100644
--- a/camel/providers/mbox/camel-mbox-folder.c
+++ b/camel/providers/mbox/camel-mbox-folder.c
@@ -45,6 +45,7 @@
#include "camel-mbox-utils.h"
#include "md5-utils.h"
#include "gmime-utils.h"
+#include "camel-mbox-search.h"
#include "camel-exception.h"
@@ -78,6 +79,7 @@ static void _copy_message_to (CamelFolder *folder, CamelMimeMessage *message, Ca
static const gchar *_get_message_uid (CamelFolder *folder, CamelMimeMessage *message, CamelException *ex);
#endif
+static CamelFolderSummary *search_by_expression(CamelFolder *folder, const char *expression, CamelException *ex);
static void _finalize (GtkObject *object);
@@ -112,6 +114,8 @@ camel_mbox_folder_class_init (CamelMboxFolderClass *camel_mbox_folder_class)
#endif
camel_folder_class->get_message_by_uid = _get_message_by_uid;
+ camel_folder_class->search_by_expression = search_by_expression;
+
gtk_object_class->finalize = _finalize;
}
@@ -190,6 +194,7 @@ _init_with_store (CamelFolder *folder, CamelStore *parent_store, CamelException
mbox_folder->folder_file_path = NULL;
mbox_folder->summary_file_path = NULL;
mbox_folder->folder_dir_path = NULL;
+ mbox_folder->index_file_path = NULL;
mbox_folder->internal_summary = NULL;
mbox_folder->uid_array = NULL;
@@ -352,6 +357,7 @@ _set_name (CamelFolder *folder, const gchar *name, CamelException *ex)
g_free (mbox_folder->folder_file_path);
g_free (mbox_folder->folder_dir_path);
+ g_free (mbox_folder->index_file_path);
separator = camel_store_get_separator (folder->parent_store, ex);
root_dir_path = camel_mbox_store_get_toplevel_dir (CAMEL_MBOX_STORE(folder->parent_store), ex);
@@ -363,8 +369,8 @@ _set_name (CamelFolder *folder, const gchar *name, CamelException *ex)
mbox_folder->folder_file_path = g_strdup_printf ("%s%c%s", root_dir_path, separator, folder->full_name);
mbox_folder->summary_file_path = g_strdup_printf ("%s%c%s-ev-summary", root_dir_path, separator, folder->full_name);
mbox_folder->folder_dir_path = g_strdup_printf ("%s%c%s.sdb", root_dir_path, separator, folder->full_name);
-
-
+ mbox_folder->index_file_path = g_strdup_printf ("%s%c%s.ibex", root_dir_path, separator, folder->full_name);
+
CAMEL_LOG_FULL_DEBUG ("CamelMboxFolder::set_name mbox_folder->folder_file_path is %s\n",
mbox_folder->folder_file_path);
CAMEL_LOG_FULL_DEBUG ("CamelMboxFolder::set_name mbox_folder->folder_dir_path is %s\n",
@@ -1118,26 +1124,8 @@ _get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *ex)
return message;
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+static CamelFolderSummary *
+search_by_expression(CamelFolder *folder, const char *expression, CamelException *ex)
+{
+ return camel_mbox_folder_search_by_expression(folder, expression);
+}