aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-store.h
diff options
context:
space:
mode:
authorDan Winship <danw@helixcode.com>2000-04-07 04:10:05 +0800
committerDan Winship <danw@src.gnome.org>2000-04-07 04:10:05 +0800
commitf3f2afef4c3c60fa1ba472ef93e8e8516e7027bb (patch)
treea1bb7f65da6d7b02e755f7b4b088e8b2c20e0458 /camel/camel-store.h
parent1a6692a89d5e2ea02e777c010aa410b5ec5a48f3 (diff)
downloadgsoc2013-evolution-f3f2afef4c3c60fa1ba472ef93e8e8516e7027bb.tar.gz
gsoc2013-evolution-f3f2afef4c3c60fa1ba472ef93e8e8516e7027bb.tar.zst
gsoc2013-evolution-f3f2afef4c3c60fa1ba472ef93e8e8516e7027bb.zip
Reorganize the folder-fetching methods and implement a folder cache so
2000-04-06 Dan Winship <danw@helixcode.com> * camel-store.[ch]: Reorganize the folder-fetching methods and implement a folder cache so that multiple requests for the same folder will yield the same CamelFolder object (as long as it remains active). Includes some code to remove no-longer-active folders from the cache, but it doesn't get used since nothing is ever unref'ed in Camel right now... * providers/mbox/camel-mbox-store.c: * providers/pop3/camel-pop3-store.c: update for CamelStore changes. * camel-folder.[ch]: Remove the (unused) CamelException argument from camel_folder_get_name and camel_folder_get_full_name. (camel_folder_set_name): make this go away since changing a folder's name after it has been created could result in it conflicting with a separately-issued folder. svn path=/trunk/; revision=2314
Diffstat (limited to 'camel/camel-store.h')
-rw-r--r--camel/camel-store.h39
1 files changed, 29 insertions, 10 deletions
diff --git a/camel/camel-store.h b/camel/camel-store.h
index af5aa959a6..d66e6344b5 100644
--- a/camel/camel-store.h
+++ b/camel/camel-store.h
@@ -46,32 +46,51 @@ extern "C" {
struct _CamelStore
{
- CamelService parent_object;
-
+ CamelService parent_object;
+
+ GHashTable *folders;
+
};
typedef struct {
CamelServiceClass parent_class;
-
- CamelFolder * (*get_folder) (CamelStore *store,
- const gchar *folder_name,
+
+ CamelFolder * (*get_folder) (CamelStore *store,
+ const char *folder_name,
+ CamelException *ex);
+
+ char * (*get_folder_name) (CamelStore *store,
+ const char *folder_name,
CamelException *ex);
- CamelFolder * (*get_root_folder) (CamelStore *store,
+ char * (*get_root_folder_name) (CamelStore *store,
CamelException *ex);
- CamelFolder * (*get_default_folder) (CamelStore *store,
+ char * (*get_default_folder_name) (CamelStore *store,
CamelException *ex);
-} CamelStoreClass;
+ CamelFolder * (*lookup_folder) (CamelStore *store,
+ const char *folder_name);
+ void (*cache_folder) (CamelStore *store,
+ const char *folder_name,
+ CamelFolder *folder);
+ void (*uncache_folder) (CamelStore *store,
+ CamelFolder *folder);
+} CamelStoreClass;
-/* public methods */
/* Standard Gtk function */
GtkType camel_store_get_type (void);
-CamelFolder * camel_store_get_folder (CamelStore *store, const gchar *folder_name, CamelException *ex);
+/* public methods */
+CamelFolder * camel_store_get_folder (CamelStore *store,
+ const char *folder_name,
+ CamelException *ex);
+CamelFolder * camel_store_get_root_folder (CamelStore *store,
+ CamelException *ex);
+CamelFolder * camel_store_get_default_folder (CamelStore *store,
+ CamelException *ex);
#ifdef __cplusplus
}