aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/mh
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/mh
parent46d07e9e465e336a5c39d8c27c846cb380fbc6fb (diff)
downloadgsoc2013-evolution-e9dc30dbf0c018bbc845f253bfe0b26baddbeaf2.tar
gsoc2013-evolution-e9dc30dbf0c018bbc845f253bfe0b26baddbeaf2.tar.gz
gsoc2013-evolution-e9dc30dbf0c018bbc845f253bfe0b26baddbeaf2.tar.bz2
gsoc2013-evolution-e9dc30dbf0c018bbc845f253bfe0b26baddbeaf2.tar.lz
gsoc2013-evolution-e9dc30dbf0c018bbc845f253bfe0b26baddbeaf2.tar.xz
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/mh')
-rw-r--r--camel/providers/mh/camel-mh-folder.c12
-rw-r--r--camel/providers/mh/camel-mh-store.c17
2 files changed, 17 insertions, 12 deletions
diff --git a/camel/providers/mh/camel-mh-folder.c b/camel/providers/mh/camel-mh-folder.c
index ec434bbcf0..c8b0503e95 100644
--- a/camel/providers/mh/camel-mh-folder.c
+++ b/camel/providers/mh/camel-mh-folder.c
@@ -58,7 +58,6 @@ static gint mh_get_message_count(CamelFolder * folder);
static gint mh_get_unread_message_count(CamelFolder * folder);
static void mh_append_message(CamelFolder * folder, CamelMimeMessage * message, const CamelMessageInfo *info, CamelException * ex);
static GPtrArray *mh_get_uids(CamelFolder * folder);
-static GPtrArray *mh_get_subfolder_info(CamelFolder * folder);
static GPtrArray *mh_get_summary(CamelFolder * folder);
static CamelMimeMessage *mh_get_message(CamelFolder * folder, const gchar * uid, CamelException * ex);
@@ -93,8 +92,6 @@ static void camel_mh_folder_class_init(CamelObjectClass * camel_mh_folder_class)
camel_folder_class->append_message = mh_append_message;
camel_folder_class->get_uids = mh_get_uids;
camel_folder_class->free_uids = camel_folder_free_deep;
- camel_folder_class->get_subfolder_info = mh_get_subfolder_info;
- camel_folder_class->free_subfolder_info = camel_folder_free_deep;
camel_folder_class->get_summary = mh_get_summary;
camel_folder_class->free_summary = camel_folder_free_nop;
camel_folder_class->expunge = mh_expunge;
@@ -119,8 +116,6 @@ static void mh_init(gpointer object, gpointer klass)
CamelFolder *folder = object;
CamelMhFolder *mh_folder = object;
- folder->can_hold_messages = TRUE;
- folder->can_hold_folders = TRUE;
folder->has_summary_capability = TRUE;
folder->has_search_capability = TRUE;
@@ -356,13 +351,6 @@ static GPtrArray *mh_get_uids(CamelFolder * folder)
return array;
}
-static GPtrArray *mh_get_subfolder_info(CamelFolder * folder)
-{
- /* FIXME: scan for sub-folders */
- /* No subfolders. */
- return g_ptr_array_new();
-}
-
static CamelMimeMessage *mh_get_message(CamelFolder * folder, const gchar * uid, CamelException * ex)
{
CamelMhFolder *mh_folder = CAMEL_MH_FOLDER(folder);
diff --git a/camel/providers/mh/camel-mh-store.c b/camel/providers/mh/camel-mh-store.c
index e45a5b72e2..32b01eefa1 100644
--- a/camel/providers/mh/camel-mh-store.c
+++ b/camel/providers/mh/camel-mh-store.c
@@ -45,6 +45,9 @@ static CamelFolder *get_folder(CamelStore * store, const char *folder_name, gboo
static void delete_folder(CamelStore * store, const char *folder_name, CamelException * ex);
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_mh_store_class_init(CamelObjectClass * camel_mh_store_class)
{
@@ -58,6 +61,8 @@ static void camel_mh_store_class_init(CamelObjectClass * camel_mh_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 camel_mh_store_init(CamelObject * object)
@@ -207,3 +212,15 @@ static char *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;
+}