aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap/camel-imap-store.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-07-29 01:41:15 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-07-29 01:41:15 +0800
commit42ea927055d4462b9f396092e2791a4db34ce6ec (patch)
tree0976fd9c6b733e261ffc01c7ae201380ba85d873 /camel/providers/imap/camel-imap-store.c
parentf0e2a902fabd26df037e567ba17adb6060247aff (diff)
downloadgsoc2013-evolution-42ea927055d4462b9f396092e2791a4db34ce6ec.tar
gsoc2013-evolution-42ea927055d4462b9f396092e2791a4db34ce6ec.tar.gz
gsoc2013-evolution-42ea927055d4462b9f396092e2791a4db34ce6ec.tar.bz2
gsoc2013-evolution-42ea927055d4462b9f396092e2791a4db34ce6ec.tar.lz
gsoc2013-evolution-42ea927055d4462b9f396092e2791a4db34ce6ec.tar.xz
gsoc2013-evolution-42ea927055d4462b9f396092e2791a4db34ce6ec.tar.zst
gsoc2013-evolution-42ea927055d4462b9f396092e2791a4db34ce6ec.zip
Get message count when STATUS is not available. (imap_init):
2000-07-28 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_get_message_count_internal): Get message count when STATUS is not available. (imap_init): folder->has_search_capability is required for IMAP so should always be set to TRUE (is currently being set to FALSE as I've not yet implemented SEARCH support). (camel_imap_folder_changed): Seem to have fixed my optimization hack 2000-07-28 Jon K Hellan <hellan@acm.org> * providers/imap/camel-imap-store.h (CamelImapServerLevel): New enum. (CamelImapStore): Added server_level and has_status_capability members. * providers/imap/camel-imap-store.c (imap_connect): Detect IMAP4REV1, IMAP4 and STATUS in capability response. * providers/imap/camel-imap-folder.c (imap_get_message_count_internal): Use STATUS only if server supports it. TODO: Get message count when STATUS not supported. (imap_get_message, imap_get_summary_internal, imap_get_message_info_internal): Handle IMAP4 as well. (imap_protocol_get_summary_specifier): New function: Make a data item specifier for the header lines we need, appropriate to the server level. svn path=/trunk/; revision=4406
Diffstat (limited to 'camel/providers/imap/camel-imap-store.c')
-rw-r--r--camel/providers/imap/camel-imap-store.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index 29baae5b48..22a730e933 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -351,16 +351,24 @@ imap_connect (CamelService *service, CamelException *ex)
status != CAMEL_IMAP_FAIL && result ? result :
"Unknown error");
}
+
+ /* FIXME: parse for capabilities here. */
+ d(fprintf (stderr, "%s\n", result));
+
+ if (e_strstrcase (result, "IMAP4REV1"))
+ store->server_level = IMAP_LEVEL_IMAP4REV1;
+ else if (e_strstrcase (result, "IMAP4"))
+ store->server_level = IMAP_LEVEL_IMAP4;
+ else
+ store->server_level = IMAP_LEVEL_UNKNOWN;
- if (e_strstrcase (result, "SEARCH"))
- store->has_search_capability = TRUE;
+ if ((store->server_level >= IMAP_LEVEL_IMAP4REV1) || (e_strstrcase (result, "STATUS")))
+ store->has_status_capability = TRUE;
else
- store->has_search_capability = FALSE;
+ store->has_status_capability = FALSE;
g_free (result);
- d(fprintf (stderr, "IMAP provider does%shave SEARCH support\n", store->has_search_capability ? " " : "n't "));
-
/* We now need to find out which directory separator this daemon uses */
status = camel_imap_command_extended (store, NULL, &result, "LIST \"\" \"\"");