diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2004-10-21 01:45:29 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-10-21 01:45:29 +0800 |
commit | cce201b06e98e85dba8a1bb3a2848d7537c0aeda (patch) | |
tree | c4bb05706033152a9db29af272541c5a1ec89113 /camel/providers/imap4/camel-imap4-utils.c | |
parent | d6952df96e7a87221f1117d640ac548626185687 (diff) | |
download | gsoc2013-evolution-cce201b06e98e85dba8a1bb3a2848d7537c0aeda.tar gsoc2013-evolution-cce201b06e98e85dba8a1bb3a2848d7537c0aeda.tar.gz gsoc2013-evolution-cce201b06e98e85dba8a1bb3a2848d7537c0aeda.tar.bz2 gsoc2013-evolution-cce201b06e98e85dba8a1bb3a2848d7537c0aeda.tar.lz gsoc2013-evolution-cce201b06e98e85dba8a1bb3a2848d7537c0aeda.tar.xz gsoc2013-evolution-cce201b06e98e85dba8a1bb3a2848d7537c0aeda.tar.zst gsoc2013-evolution-cce201b06e98e85dba8a1bb3a2848d7537c0aeda.zip |
Removed an already-fixed FIXME comment. (imap4_summary_fetch_flags): Same.
2004-10-19 Jeffrey Stedfast <fejj@ximian.com>
* providers/imap4/camel-imap4-summary.c (imap4_summary_fetch_all):
Removed an already-fixed FIXME comment.
(imap4_summary_fetch_flags): Same.
* providers/imap4/camel-imap4-folder.c (imap4_get_path_delim):
Removed. Use camel_imap4_get_path_delim() instead.
(camel_imap4_folder_new): Updated.
(imap4_sync): If we aren't online, we're done. nothing to do.
(imap4_refresh_info): Same.
(imap4_append_message): Same but set an exception.
(imap4_transfer_messages_to): Same.
* providers/imap4/camel-imap4-utils.c
(camel_imap4_get_path_delim): Moved here from camel-imap4-store.c
* providers/imap4/camel-imap4-store.c (imap4_try_authenticate):
Change the service string for the sasl mechanism to"imap" rather
than "imap4".
(imap4_get_path_delim): Removed.
(imap4_create_folder): Updated.
(imap4_folder_utf7_name): Same.
svn path=/trunk/; revision=27651
Diffstat (limited to 'camel/providers/imap4/camel-imap4-utils.c')
-rw-r--r-- | camel/providers/imap4/camel-imap4-utils.c | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/camel/providers/imap4/camel-imap4-utils.c b/camel/providers/imap4/camel-imap4-utils.c index 55c6431dc7..1c8dc0c1ef 100644 --- a/camel/providers/imap4/camel-imap4-utils.c +++ b/camel/providers/imap4/camel-imap4-utils.c @@ -75,6 +75,58 @@ camel_imap4_merge_flags (guint32 original, guint32 local, guint32 server) } +char +camel_imap4_get_path_delim (CamelIMAP4Engine *engine, const char *full_name) +{ + CamelIMAP4Namespace *namespace; + const char *slash; + size_t len; + char *top; + + if ((slash = strchr (full_name, '/'))) + len = (slash - full_name); + else + len = strlen (full_name); + + top = g_alloca (len + 1); + memcpy (top, full_name, len); + top[len] = '\0'; + + if (!g_ascii_strcasecmp (top, "INBOX")) + top = "INBOX"; + + retry: + namespace = engine->namespaces.personal; + while (namespace != NULL) { + if (!strcmp (namespace->path, top)) + return namespace->sep; + namespace = namespace->next; + } + + namespace = engine->namespaces.other; + while (namespace != NULL) { + if (!strcmp (namespace->path, top)) + return namespace->sep; + namespace = namespace->next; + } + + namespace = engine->namespaces.shared; + while (namespace != NULL) { + if (!strcmp (namespace->path, top)) + return namespace->sep; + namespace = namespace->next; + } + + if (top[0] != '\0') { + /* look for a default namespace? */ + top[0] = '\0'; + goto retry; + } + + return '/'; +} + + struct _uidset_range { struct _uidset_range *next; guint32 first, last; |