diff options
author | Jeffrey Stedfast <fejj@novell.com> | 2004-06-30 05:22:09 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-06-30 05:22:09 +0800 |
commit | 7f4c97c9043af8108c41278814cd4d8745ec85dc (patch) | |
tree | 3c34bc1cd89002e7eaebcc080cdaa2a78f2a6562 /camel/providers/imap4/camel-imap4-command.c | |
parent | cdb302574791aea913b7a14dfb186511d1b787b0 (diff) | |
download | gsoc2013-evolution-7f4c97c9043af8108c41278814cd4d8745ec85dc.tar gsoc2013-evolution-7f4c97c9043af8108c41278814cd4d8745ec85dc.tar.gz gsoc2013-evolution-7f4c97c9043af8108c41278814cd4d8745ec85dc.tar.bz2 gsoc2013-evolution-7f4c97c9043af8108c41278814cd4d8745ec85dc.tar.lz gsoc2013-evolution-7f4c97c9043af8108c41278814cd4d8745ec85dc.tar.xz gsoc2013-evolution-7f4c97c9043af8108c41278814cd4d8745ec85dc.tar.zst gsoc2013-evolution-7f4c97c9043af8108c41278814cd4d8745ec85dc.zip |
Aded a new %formatter 'V' which takes a string vector (needed for SEARCH).
2004-06-29 Jeffrey Stedfast <fejj@novell.com>
* providers/imap4/camel-imap4-command.c
(camel_imap4_command_newv): Aded a new %formatter 'V' which takes
a string vector (needed for SEARCH).
* providers/imap4/camel-imap4-search.[c,h]: New source files
implementing search functionality.
* providers/imap4/camel-imap4-folder.c (imap4_sync_flag): Use the
new public version of imap4_get_uid_set().
(imap4_transfer_messages_to): Same.
(camel_imap4_folder_new): Create a search context.
(camel_imap4_folder_finalize): Unref the search context.
(camel_imap4_folder_class_init): Override the search methods.
(imap4_search_by_expression): New.
(imap4_search_by_uids): New.
(imap4_search_free): New.
* providers/imap4/camel-imap4-utils.c (camel_imap4_get_uid_set):
Moved here from camel-imap4-folder.c
svn path=/trunk/; revision=26551
Diffstat (limited to 'camel/providers/imap4/camel-imap4-command.c')
-rw-r--r-- | camel/providers/imap4/camel-imap4-command.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/camel/providers/imap4/camel-imap4-command.c b/camel/providers/imap4/camel-imap4-command.c index dc3d43c5d4..9b6061dbd4 100644 --- a/camel/providers/imap4/camel-imap4-command.c +++ b/camel/providers/imap4/camel-imap4-command.c @@ -197,6 +197,7 @@ camel_imap4_command_newv (CamelIMAP4Engine *engine, CamelIMAP4Folder *imap4_fold if (ch == '%') { CamelIMAP4Literal *literal; CamelIMAP4Folder *folder; + char *function, **strv; unsigned int u; char *string; size_t len; @@ -263,6 +264,24 @@ camel_imap4_command_newv (CamelIMAP4Engine *engine, CamelIMAP4Folder *imap4_fold g_string_truncate (str, 0); break; + case 'V': + /* a string vector of arguments which may need to be quoted or made into literals */ + function = str->str + str->len - 2; + while (*function != ' ') + function--; + function++; + + function = g_strdup (function); + + strv = va_arg (args, char **); + for (d = 0; strv[d]; d++) { + if (d > 0) + g_string_append (str, function); + imap4_command_append_string (engine, &tail, str, strv[d]); + } + + g_free (function); + break; case 'S': /* string which may need to be quoted or made into a literal */ string = va_arg (args, char *); |