From 65eb577ecd2ce45f78f8df4da3386e2ac1f3c2c1 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Fri, 9 Feb 2001 16:43:22 +0000 Subject: Rewrite a bunch. Replace the existing folder cache stuff with much simpler * camel-store.c: Rewrite a bunch. Replace the existing folder cache stuff with much simpler code that still handles all the existing cases. Now the folder hash table is always created by the base class, using hash and compare functions provided by the class implementation. (If they are set to NULL, CamelStore won't cache folders.) lookup_folder, cache_folder, and uncache_folder are no longer class methods, and get_name is gone completely. (camel_store_get_inbox): Renamed from camel_store_get_default_folder, since that wasn't being used, and this is what we actually need. (camel_store_get_root_folder): Removed, since it's not needed for anything given get_folder_info. * camel-remote-store.c: * providers/local/camel-local-store.c: * providers/local/camel-mbox-store.c: * providers/local/camel-mh-store.c: * providers/local/camel-maildir-store.c: * providers/nntp/camel-nntp-store.c: * providers/pop3/camel-pop3-store.c: * providers/vee/camel-vee-store.c: Minor updates for CamelStore changes * providers/imap/camel-imap-store.c (camel_imap_store_class_init): Update for CamelStore changes. (hash_folder_name, compare_folder_name): treat INBOX case-insensitively, otherwise use g_str_hash and g_str_equal. * camel-service.c (camel_service_construct): Remove camel_service_new and create camel_service_construct (as a class method) in its place. * camel-session.c (camel_session_get_service): Use camel_object_new and camel_service_construct to replace camel_service_new. * providers/local/camel-local-store.c (construct): Append a '/' to the URL path if it doesn't end with one svn path=/trunk/; revision=8145 --- camel/camel-remote-store.c | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'camel/camel-remote-store.c') diff --git a/camel/camel-remote-store.c b/camel/camel-remote-store.c index d1352300b7..52f1908f05 100644 --- a/camel/camel-remote-store.c +++ b/camel/camel-remote-store.c @@ -65,9 +65,6 @@ static gboolean remote_disconnect (CamelService *service, gboolean clean, C static GList *remote_query_auth_types(CamelService *service, gboolean connect, CamelException *ex); static void remote_free_auth_types (CamelService *service, GList *authtypes); static char *remote_get_name (CamelService *service, gboolean brief); -static char *remote_get_folder_name (CamelStore *store, - const char *folder_name, - CamelException *ex); static gint remote_send_string (CamelRemoteStore *store, CamelException *ex, char *fmt, va_list ap); static gint remote_send_stream (CamelRemoteStore *store, CamelStream *stream, @@ -81,8 +78,6 @@ camel_remote_store_class_init (CamelRemoteStoreClass *camel_remote_store_class) /* virtual method overload */ CamelServiceClass *camel_service_class = CAMEL_SERVICE_CLASS (camel_remote_store_class); - CamelStoreClass *camel_store_class = - CAMEL_STORE_CLASS (camel_remote_store_class); store_class = CAMEL_STORE_CLASS (camel_type_get_global_classfuncs (camel_store_get_type ())); @@ -93,8 +88,6 @@ camel_remote_store_class_init (CamelRemoteStoreClass *camel_remote_store_class) camel_service_class->free_auth_types = remote_free_auth_types; camel_service_class->get_name = remote_get_name; - camel_store_class->get_folder_name = remote_get_folder_name; - camel_remote_store_class->send_string = remote_send_string; camel_remote_store_class->send_stream = remote_send_stream; camel_remote_store_class->recv_line = remote_recv_line; @@ -386,12 +379,6 @@ remote_disconnect (CamelService *service, gboolean clean, CamelException *ex) return TRUE; } -static gchar * -remote_get_folder_name (CamelStore *store, const char *folder_name, CamelException *ex) -{ - return g_strdup (folder_name); -} - static gint remote_send_string (CamelRemoteStore *store, CamelException *ex, char *fmt, va_list ap) { -- cgit