aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/mbox
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-10-03 03:08:20 +0800
committerDan Winship <danw@src.gnome.org>2000-10-03 03:08:20 +0800
commite9dc30dbf0c018bbc845f253bfe0b26baddbeaf2 (patch)
treee70ca64851c0167f959a9e6c0c38179cd0de102b /camel/providers/mbox
parent46d07e9e465e336a5c39d8c27c846cb380fbc6fb (diff)
downloadgsoc2013-evolution-e9dc30dbf0c018bbc845f253bfe0b26baddbeaf2.tar.gz
gsoc2013-evolution-e9dc30dbf0c018bbc845f253bfe0b26baddbeaf2.tar.zst
gsoc2013-evolution-e9dc30dbf0c018bbc845f253bfe0b26baddbeaf2.zip
Remove camel_folder_{get,free}_subfolder_info, as we want to be able to
* camel-folder.[ch]: Remove camel_folder_{get,free}_subfolder_info, as we want to be able to scan the whole subfolder tree without having to open any folders, so this needs to be in CamelStore. Remove can_hold_folders and can_hold_messages flags; things that don't hold messages are no longer considered CamelFolders. * camel-folder-summary.[ch]: Remove CamelFolderInfo stuff. * camel-store.[ch]: Add camel_store_{get,free}_folder_info, as well as camel_store_free_folder_info_full and ..._nop for default implementations, and camel_folder_info_free and camel_folder_info_build as convenience functions. Turn CamelFolderInfo into a tree structure and also add an "url" member. * providers/*/camel-*-folder.c: Remove subfolder_info and can_hold stuff. * providers/*/camel-*-store.c: Add folder_info stuff. * providers/imap/camel-imap-folder.c (imap_summary_free): Free the summary elements with camel_message_info_free, not camel_folder_info_free. Oops. * providers/imap/camel-imap-utils.c: const poison svn path=/trunk/; revision=5663
Diffstat (limited to 'camel/providers/mbox')
-rw-r--r--camel/providers/mbox/camel-mbox-folder.c12
-rw-r--r--camel/providers/mbox/camel-mbox-store.c24
2 files changed, 20 insertions, 16 deletions
diff --git a/camel/providers/mbox/camel-mbox-folder.c b/camel/providers/mbox/camel-mbox-folder.c
index 7aaf9d8593..163de6784f 100644
--- a/camel/providers/mbox/camel-mbox-folder.c
+++ b/camel/providers/mbox/camel-mbox-folder.c
@@ -64,7 +64,6 @@ static void mbox_append_message(CamelFolder *folder, CamelMimeMessage * message,
CamelException *ex);
static GPtrArray *mbox_get_uids(CamelFolder *folder);
-static GPtrArray *mbox_get_subfolder_info(CamelFolder *folder);
static GPtrArray *mbox_get_summary(CamelFolder *folder);
static CamelMimeMessage *mbox_get_message(CamelFolder *folder, const gchar * uid, CamelException *ex);
@@ -102,8 +101,6 @@ camel_mbox_folder_class_init(CamelMboxFolderClass * camel_mbox_folder_class)
camel_folder_class->append_message = mbox_append_message;
camel_folder_class->get_uids = mbox_get_uids;
camel_folder_class->free_uids = camel_folder_free_deep;
- camel_folder_class->get_subfolder_info = mbox_get_subfolder_info;
- camel_folder_class->free_subfolder_info = camel_folder_free_shallow;
camel_folder_class->get_summary = mbox_get_summary;
camel_folder_class->free_summary = camel_folder_free_nop;
camel_folder_class->expunge = mbox_expunge;
@@ -129,8 +126,6 @@ mbox_init(gpointer object, gpointer klass)
CamelFolder *folder = object;
CamelMboxFolder *mbox_folder = object;
- folder->can_hold_messages = TRUE;
- folder->can_hold_folders = TRUE;
folder->has_summary_capability = TRUE;
folder->has_search_capability = TRUE;
@@ -438,13 +433,6 @@ mbox_get_uids(CamelFolder *folder)
return array;
}
-static GPtrArray *
-mbox_get_subfolder_info(CamelFolder *folder)
-{
- /* No subfolders. */
- return g_ptr_array_new();
-}
-
static CamelMimeMessage *
mbox_get_message(CamelFolder *folder, const gchar * uid, CamelException *ex)
{
diff --git a/camel/providers/mbox/camel-mbox-store.c b/camel/providers/mbox/camel-mbox-store.c
index 0a6c7c2ce1..8bf77c9774 100644
--- a/camel/providers/mbox/camel-mbox-store.c
+++ b/camel/providers/mbox/camel-mbox-store.c
@@ -47,6 +47,9 @@ static void delete_folder (CamelStore *store, const char *folder_name,
static void rename_folder(CamelStore *store, const char *old_name, const char *new_name, CamelException *ex);
static char *get_folder_name (CamelStore *store, const char *folder_name,
CamelException *ex);
+static CamelFolderInfo *get_folder_info (CamelStore *store, const char *top,
+ gboolean fast, gboolean recursive,
+ CamelException *ex);
static void
camel_mbox_store_class_init (CamelMboxStoreClass *camel_mbox_store_class)
@@ -61,6 +64,8 @@ camel_mbox_store_class_init (CamelMboxStoreClass *camel_mbox_store_class)
camel_store_class->delete_folder = delete_folder;
camel_store_class->rename_folder = rename_folder;
camel_store_class->get_folder_name = get_folder_name;
+ camel_store_class->get_folder_info = get_folder_info;
+ camel_store_class->free_folder_info = camel_store_free_folder_info_full;
}
static void
@@ -117,8 +122,8 @@ get_folder (CamelStore *store, const char *folder_name, gboolean create,
if (errno != ENOENT) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- "Could not open folder `%s':"
- "\n%s", folder_name,
+ "Could not open file `%s':"
+ "\n%s", name,
g_strerror (errno));
g_free (name);
return NULL;
@@ -135,8 +140,8 @@ get_folder (CamelStore *store, const char *folder_name, gboolean create,
g_free (name);
if (fd == -1) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- "Could not create folder `%s':"
- "\n%s", folder_name,
+ "Could not create file `%s':"
+ "\n%s", name,
g_strerror (errno));
return NULL;
}
@@ -277,3 +282,14 @@ get_name (CamelService *service, gboolean brief)
else
return g_strdup_printf ("Local mail file %s", service->url->path);
}
+
+static CamelFolderInfo *
+get_folder_info (CamelStore *store, const char *top,
+ gboolean fast, gboolean recursive,
+ CamelException *ex)
+{
+ /* FIXME: This is broken, but it corresponds to what was
+ * there before.
+ */
+ return NULL;
+}