aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap/camel-imap-utils.h
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-01-03 06:07:44 +0800
committerDan Winship <danw@src.gnome.org>2001-01-03 06:07:44 +0800
commitb1a4da002f0414ceb1c8f579edba47c600762a9c (patch)
tree5e6d7f9807ab82ecfe4c74a789ba05ccda3d2063 /camel/providers/imap/camel-imap-utils.h
parenta8b13bc0443aa150a3c007ea5e6bc48cc8ebbc51 (diff)
downloadgsoc2013-evolution-b1a4da002f0414ceb1c8f579edba47c600762a9c.tar
gsoc2013-evolution-b1a4da002f0414ceb1c8f579edba47c600762a9c.tar.gz
gsoc2013-evolution-b1a4da002f0414ceb1c8f579edba47c600762a9c.tar.bz2
gsoc2013-evolution-b1a4da002f0414ceb1c8f579edba47c600762a9c.tar.lz
gsoc2013-evolution-b1a4da002f0414ceb1c8f579edba47c600762a9c.tar.xz
gsoc2013-evolution-b1a4da002f0414ceb1c8f579edba47c600762a9c.tar.zst
gsoc2013-evolution-b1a4da002f0414ceb1c8f579edba47c600762a9c.zip
IMAP randomness.
* providers/imap/camel-imap-stream.[ch]: Remove. To be replaced. * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Remove camel-imap-stream.h * providers/imap/camel-imap-utils.c (imap_parse_flag_list): Take a char ** instead of char *, to return the position at the end of parsing like the string parsing functions. (imap_parse_string_generic): New function to parse a string, nstring, or astring. (imap_parse_nstring, imap_parse_astring): Now macros (imap_parse_string): Added * providers/imap/camel-imap-folder.h: Remove the "exists" field from CamelImapFolder. * providers/imap/camel-imap-folder.c: Remove unused include of camel-imap-stream.h. (camel_imap_folder_init): Remove no-longer-relevant summary initialization. (camel_imap_folder_new): Update for imap_parse_flag_list change, exists removal, and imap_rescan. (imap_rescan): New function that does most of the work of the old imap_refresh_info, but taking "exists" as an argument instead of getting it from the folder. Also calls camel_imap_folder_changed to do the summary updating and signalling, rather than duplicating that code. (imap_refresh_info): Just call imap_rescan (using the size of the folder summary as "exists"). (imap_update_summary): Update for imap_parse_flag_list change (camel_imap_folder_changed): Update for "exists" change. svn path=/trunk/; revision=7216
Diffstat (limited to 'camel/providers/imap/camel-imap-utils.h')
-rw-r--r--camel/providers/imap/camel-imap-utils.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/camel/providers/imap/camel-imap-utils.h b/camel/providers/imap/camel-imap-utils.h
index 015ad91e16..d6df958ac9 100644
--- a/camel/providers/imap/camel-imap-utils.h
+++ b/camel/providers/imap/camel-imap-utils.h
@@ -28,7 +28,7 @@ extern "C" {
#pragma }
#endif /* __cplusplus }*/
-#include <glib.h>
+#include "camel-folder-summary.h"
char *imap_next_word (const char *buf);
@@ -39,10 +39,16 @@ char *imap_next_word (const char *buf);
gboolean imap_parse_list_response (const char *buf, int *flags, char *sep, char **folder);
char *imap_create_flag_list (guint32 flags);
-guint32 imap_parse_flag_list (const char *flag_list);
-
-char *imap_parse_nstring (char **str_p, int *len);
-char *imap_parse_astring (char **str_p, int *len);
+guint32 imap_parse_flag_list (char **flag_list);
+
+enum { IMAP_STRING, IMAP_NSTRING, IMAP_ASTRING };
+char *imap_parse_string_generic (char **str_p, int *len, int type);
+#define imap_parse_string(str_p, len_p) \
+ imap_parse_string_generic (str_p, len_p, IMAP_STRING)
+#define imap_parse_nstring(str_p, len_p) \
+ imap_parse_string_generic (str_p, len_p, IMAP_NSTRING)
+#define imap_parse_astring(str_p, len_p) \
+ imap_parse_string_generic (str_p, len_p, IMAP_ASTRING)
char *imap_quote_string (const char *str);