aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap/camel-imap-folder.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-06-28 06:44:19 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-06-28 06:44:19 +0800
commit8b6fb870d7c9015ead885c4bbc8d6bc272d3f88b (patch)
treed4c126134503398810c04cebd975ef07ea358653 /camel/providers/imap/camel-imap-folder.c
parentf704f45bbf6561376cb41236d3fa205689718c58 (diff)
downloadgsoc2013-evolution-8b6fb870d7c9015ead885c4bbc8d6bc272d3f88b.tar
gsoc2013-evolution-8b6fb870d7c9015ead885c4bbc8d6bc272d3f88b.tar.gz
gsoc2013-evolution-8b6fb870d7c9015ead885c4bbc8d6bc272d3f88b.tar.bz2
gsoc2013-evolution-8b6fb870d7c9015ead885c4bbc8d6bc272d3f88b.tar.lz
gsoc2013-evolution-8b6fb870d7c9015ead885c4bbc8d6bc272d3f88b.tar.xz
gsoc2013-evolution-8b6fb870d7c9015ead885c4bbc8d6bc272d3f88b.tar.zst
gsoc2013-evolution-8b6fb870d7c9015ead885c4bbc8d6bc272d3f88b.zip
Move the CAPABILITY command here so we don't have to keep checking each
2000-06-27 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-store.c (imap_connect): Move the CAPABILITY command here so we don't have to keep checking each time we open a folder. (camel_imap_command_extended): If we are doing an EXAMINE, don't bother doing a SELECT first. * providers/imap/camel-imap-folder.c (imap_init): Update so folder->has_search_capability depends on the parent IMAP store (since this is really dependant on the IMAP implementation and not the folder) svn path=/trunk/; revision=3767
Diffstat (limited to 'camel/providers/imap/camel-imap-folder.c')
-rw-r--r--camel/providers/imap/camel-imap-folder.c32
1 files changed, 5 insertions, 27 deletions
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index 51bab59eb4..6ab0fff9df 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*- */
-/* camel-imap-folder.c : Abstract class for an email folder */
+/* camel-imap-folder.c: Abstract class for an email folder */
/*
* Authors: Jeffrey Stedfast <fejj@helixcode.com>
@@ -198,7 +198,7 @@ imap_finalize (GtkObject *object)
CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (object);
CamelMessageInfo *info;
gint i, max;
-
+
GTK_OBJECT_CLASS (parent_class)->finalize (object);
g_return_if_fail (imap_folder->summary != NULL);
@@ -238,30 +238,7 @@ imap_init (CamelFolder *folder, CamelStore *parent_store, CamelFolder *parent_fo
folder->can_hold_messages = TRUE;
folder->can_hold_folders = TRUE;
folder->has_summary_capability = TRUE;
-
- /* now lets find out if we can do searches... */
- status = camel_imap_command_extended (CAMEL_IMAP_STORE (folder->parent_store), folder,
- &result, "CAPABILITY");
-
- /* ugh, I forgot that CAPABILITY doesn't have a response code */
- if (status != CAMEL_IMAP_OK) {
- CamelService *service = CAMEL_SERVICE (folder->parent_store);
-
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- "Could not get capabilities on IMAP server %s: %s.",
- service->url->host,
- status == CAMEL_IMAP_ERR ? result :
- "Unknown error");
- }
-
- if (strstrcase (result, "SEARCH"))
- folder->has_search_capability = TRUE;
- else
- folder->has_search_capability = FALSE;
-
- g_free (result);
-
- fprintf (stderr, "IMAP provider does%shave SEARCH support\n", folder->has_search_capability ? " " : "n't ");
+ folder->has_search_capability = CAMEL_IMAP_STORE (store)->has_search_capability;
/* some IMAP daemons support user-flags *
* I would not, however, rely on this feature as *
@@ -508,7 +485,8 @@ imap_append_message (CamelFolder *folder, CamelMimeMessage *message, CamelExcept
folder_path = g_strdup_printf ("%s/%s", url->path, folder->full_name);
else
folder_path = g_strdup (folder->full_name);
-
+
+ /* FIXME: len isn't really correct I don't think, we need to filter and possibly other things */
status = camel_imap_command (CAMEL_IMAP_STORE (folder->parent_store),
folder, &result,
"APPEND %s (\\Seen) {%d}\r\n%s",