aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/mbox
diff options
context:
space:
mode:
authorPeter Williams <peterw@src.gnome.org>2000-08-30 05:28:46 +0800
committerPeter Williams <peterw@src.gnome.org>2000-08-30 05:28:46 +0800
commitda570c66609a9baea34d4899c4ca7e1f8329d471 (patch)
tree78f82074f39463fc8db0cfb92728d57fe9c2ac84 /camel/providers/mbox
parentba2eaa68b17882b0fec2eac160f674d29598795f (diff)
downloadgsoc2013-evolution-da570c66609a9baea34d4899c4ca7e1f8329d471.tar
gsoc2013-evolution-da570c66609a9baea34d4899c4ca7e1f8329d471.tar.gz
gsoc2013-evolution-da570c66609a9baea34d4899c4ca7e1f8329d471.tar.bz2
gsoc2013-evolution-da570c66609a9baea34d4899c4ca7e1f8329d471.tar.lz
gsoc2013-evolution-da570c66609a9baea34d4899c4ca7e1f8329d471.tar.xz
gsoc2013-evolution-da570c66609a9baea34d4899c4ca7e1f8329d471.tar.zst
gsoc2013-evolution-da570c66609a9baea34d4899c4ca7e1f8329d471.zip
CamelRemoteStore: a new generic store for stores that connect to servers. Prepare for the ability to cancel operations (much better exception handling). Clean up IMAP like nobody's business
svn path=/trunk/; revision=5103
Diffstat (limited to 'camel/providers/mbox')
-rw-r--r--camel/providers/mbox/camel-mbox-folder.c14
-rw-r--r--camel/providers/mbox/camel-mbox-store.c3
2 files changed, 12 insertions, 5 deletions
diff --git a/camel/providers/mbox/camel-mbox-folder.c b/camel/providers/mbox/camel-mbox-folder.c
index 00499c1f75..f924d1d4ab 100644
--- a/camel/providers/mbox/camel-mbox-folder.c
+++ b/camel/providers/mbox/camel-mbox-folder.c
@@ -58,9 +58,8 @@ static CamelFolderClass *parent_class = NULL;
static void mbox_init(CamelFolder *folder, CamelStore * parent_store,
CamelFolder *parent_folder, const gchar * name,
-
gchar * separator, gboolean path_begins_with_sep, CamelException *ex);
-
+static void mbox_refresh_info (CamelFolder *folder, CamelException *ex);
static void mbox_sync(CamelFolder *folder, gboolean expunge, CamelException *ex);
static gint mbox_get_message_count(CamelFolder *folder);
static gint mbox_get_unread_message_count(CamelFolder *folder);
@@ -100,6 +99,7 @@ camel_mbox_folder_class_init(CamelMboxFolderClass * camel_mbox_folder_class)
/* virtual method overload */
camel_folder_class->init = mbox_init;
+ camel_folder_class->refresh_info = mbox_refresh_info;
camel_folder_class->sync = mbox_sync;
camel_folder_class->get_message_count = mbox_get_message_count;
camel_folder_class->get_unread_message_count = mbox_get_unread_message_count;
@@ -167,8 +167,6 @@ mbox_init(CamelFolder *folder, CamelStore * parent_store,
CamelMboxFolder *mbox_folder = (CamelMboxFolder *) folder;
const gchar *root_dir_path;
gchar *real_name;
- int forceindex;
- struct stat st;
/* call parent method */
parent_class->init(folder, parent_store, parent_folder, name, separator, path_begins_with_sep, ex);
@@ -202,6 +200,14 @@ mbox_init(CamelFolder *folder, CamelStore * parent_store,
mbox_folder->summary_file_path = g_strdup_printf("%s/%s-ev-summary", root_dir_path, real_name);
mbox_folder->folder_dir_path = g_strdup_printf("%s/%s.sdb", root_dir_path, real_name);
mbox_folder->index_file_path = g_strdup_printf("%s/%s.ibex", root_dir_path, real_name);
+}
+
+static void
+mbox_refresh_info (CamelFolder *folder, CamelException *ex)
+{
+ CamelMboxFolder *mbox_folder = (CamelMboxFolder *) folder;
+ struct stat st;
+ int forceindex;
/* if we have no index file, force it */
forceindex = stat(mbox_folder->index_file_path, &st) == -1;
diff --git a/camel/providers/mbox/camel-mbox-store.c b/camel/providers/mbox/camel-mbox-store.c
index ed56e84407..05e5af406b 100644
--- a/camel/providers/mbox/camel-mbox-store.c
+++ b/camel/providers/mbox/camel-mbox-store.c
@@ -155,7 +155,8 @@ get_folder (CamelStore *store, const char *folder_name, gboolean create,
CF_CLASS (new_folder)->init (new_folder, store, NULL,
folder_name, "/", TRUE, ex);
-
+ CF_CLASS (new_folder)->refresh_info (new_folder, ex);
+
return new_folder;
}