[evolution-data-server] Collect Camel flags into enum types.



commit c8a573cd05919503d7a4947cd3219e5b7bd600c9
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sun Oct 3 21:00:36 2010 -0400

    Collect Camel flags into enum types.
    
    Camel has many struct members and function parameters named 'flags'.
    Using a plain integer type for these can lead to confusion about which
    flag definitions are expected.
    
    This collects flag values into enumeration types, and changes the
    struct member or function parameter type from a plain integer type
    to the proper enumeration type.
    
    TODO: Collect enum types into a camel-enums.h file and let GObject
          generate GTypes for each of them so they can be used properly
          in GObject properties, GtkTreeModel columns, etc.

 camel/camel-block-file.h                           |   14 +-
 camel/camel-certdb.h                               |    8 +-
 camel/camel-disco-store.c                          |    4 +-
 camel/camel-disco-store.h                          |   12 +-
 camel/camel-folder-summary.c                       |    8 +-
 camel/camel-folder-summary.h                       |   13 +-
 camel/camel-folder.c                               |   20 +-
 camel/camel-folder.h                               |   43 +-
 camel/camel-provider.h                             |  138 +++---
 camel/camel-store.c                                |   18 +-
 camel/camel-store.h                                |  229 +++++----
 camel/camel-tcp-stream-ssl.c                       |   20 +-
 camel/camel-tcp-stream-ssl.h                       |   29 +-
 camel/camel-url.c                                  |    2 +-
 camel/camel-url.h                                  |   13 +-
 camel/camel-vee-store.c                            |    4 +-
 camel/providers/groupwise/camel-groupwise-folder.c |    4 +-
 camel/providers/groupwise/camel-groupwise-store.c  |    4 +-
 camel/providers/imap/camel-imap-folder.c           |    4 +-
 camel/providers/imap/camel-imap-store.c            |   12 +-
 camel/providers/imap/camel-imap-utils.c            |    2 +-
 camel/providers/imap/camel-imap-utils.h            |    2 +-
 camel/providers/imapx/camel-imapx-store.c          |    4 +-
 camel/providers/local/camel-local-store.c          |    8 +-
 camel/providers/local/camel-maildir-store.c        |    4 +-
 camel/providers/local/camel-mbox-store.c           |    4 +-
 camel/providers/local/camel-mh-store.c             |    4 +-
 camel/providers/local/camel-spool-store.c          |    4 +-
 camel/providers/nntp/camel-nntp-store.c            |    8 +-
 camel/providers/pop3/camel-pop3-folder.c           |    4 +-
 camel/providers/pop3/camel-pop3-store.c            |    4 +-
 docs/reference/camel/camel-sections.txt            |   96 +----
 docs/reference/camel/tmpl/camel-block-file.sgml    |   36 +-
 docs/reference/camel/tmpl/camel-certdb.sgml        |    7 +
 docs/reference/camel/tmpl/camel-folder.sgml        |   62 +--
 docs/reference/camel/tmpl/camel-provider.sgml      |  241 ++--------
 docs/reference/camel/tmpl/camel-store.sgml         |  280 ++---------
 .../reference/camel/tmpl/camel-tcp-stream-ssl.sgml |   20 +-
 docs/reference/camel/tmpl/camel-unused.sgml        |  486 ++++++++++++++++++++
 docs/reference/camel/tmpl/camel-url.sgml           |   20 +-
 40 files changed, 978 insertions(+), 917 deletions(-)
---
diff --git a/camel/camel-block-file.h b/camel/camel-block-file.h
index 86d470c..24867d2 100644
--- a/camel/camel-block-file.h
+++ b/camel/camel-block-file.h
@@ -78,13 +78,17 @@ typedef struct _CamelBlockFile CamelBlockFile;
 typedef struct _CamelBlockFileClass CamelBlockFileClass;
 typedef struct _CamelBlockFilePrivate CamelBlockFilePrivate;
 
-#define CAMEL_BLOCK_FILE_SYNC (1 << 0)
+typedef enum {
+	CAMEL_BLOCK_FILE_SYNC = 1 << 0
+} CamelBlockFileFlags;
 
 #define CAMEL_BLOCK_SIZE (1024)
 #define CAMEL_BLOCK_SIZE_BITS (10) /* # bits to contain block_size bytes */
 
-#define CAMEL_BLOCK_DIRTY (1 << 0)
-#define CAMEL_BLOCK_DETACHED (1 << 1)
+typedef enum {
+	CAMEL_BLOCK_DIRTY    = 1 << 0,
+	CAMEL_BLOCK_DETACHED = 1 << 1
+} CamelBlockFlags;
 
 struct _CamelBlockRoot {
 	gchar version[8];	/* version number */
@@ -103,7 +107,7 @@ struct _CamelBlock {
 	struct _CamelBlock *prev;
 
 	camel_block_t id;
-	guint32 flags;
+	CamelBlockFlags flags;
 	guint32 refcount;
 	guint32 align00;
 
@@ -116,7 +120,7 @@ struct _CamelBlockFile {
 
 	gchar version[8];
 	gchar *path;
-	gint flags;
+	CamelBlockFileFlags flags;
 
 	gint fd;
 	gsize block_size;
diff --git a/camel/camel-certdb.h b/camel/camel-certdb.h
index 982a052..521a22f 100644
--- a/camel/camel-certdb.h
+++ b/camel/camel-certdb.h
@@ -55,9 +55,9 @@ typedef struct _CamelCertDB CamelCertDB;
 typedef struct _CamelCertDBClass CamelCertDBClass;
 typedef struct _CamelCertDBPrivate CamelCertDBPrivate;
 
-enum {
-	CAMEL_CERTDB_DIRTY  = (1 << 0)
-};
+typedef enum {
+	CAMEL_CERTDB_DIRTY = 1 << 0
+} CamelCertDBFlags;
 
 enum {
 	CAMEL_CERT_STRING_ISSUER,
@@ -105,7 +105,7 @@ struct _CamelCertDB {
 	gchar *filename;
 	guint32 version;
 	guint32 saved_certs;
-	guint32 flags;
+	CamelCertDBFlags flags;
 
 	guint32 cert_size;
 
diff --git a/camel/camel-disco-store.c b/camel/camel-disco-store.c
index d43eead..fd085f4 100644
--- a/camel/camel-disco-store.c
+++ b/camel/camel-disco-store.c
@@ -160,7 +160,7 @@ disco_store_disconnect_sync (CamelService *service,
 static CamelFolder *
 disco_store_get_folder_sync (CamelStore *store,
                              const gchar *name,
-                             guint32 flags,
+                             CamelStoreGetFolderFlags flags,
                              GCancellable *cancellable,
                              GError **error)
 {
@@ -199,7 +199,7 @@ disco_store_get_folder_sync (CamelStore *store,
 static CamelFolderInfo *
 disco_store_get_folder_info_sync (CamelStore *store,
                                   const gchar *top,
-                                  guint32 flags,
+                                  CamelStoreGetFolderInfoFlags flags,
                                   GCancellable *cancellable,
                                   GError **error)
 {
diff --git a/camel/camel-disco-store.h b/camel/camel-disco-store.h
index fa17bcd..566ae86 100644
--- a/camel/camel-disco-store.h
+++ b/camel/camel-disco-store.h
@@ -98,17 +98,17 @@ struct _CamelDiscoStoreClass {
 
 	CamelFolder *	(*get_folder_online)	(CamelStore *store,
 						 const gchar *name,
-						 guint32 flags,
+						 CamelStoreGetFolderFlags flags,
 						 GCancellable *cancellable,
 						 GError **error);
 	CamelFolder *	(*get_folder_offline)	(CamelStore *store,
 						 const gchar *name,
-						 guint32 flags,
+						 CamelStoreGetFolderFlags flags,
 						 GCancellable *cancellable,
 						 GError **error);
 	CamelFolder *	(*get_folder_resyncing)	(CamelStore *store,
 						 const gchar *name,
-						 guint32 flags,
+						 CamelStoreGetFolderFlags flags,
 						 GCancellable *cancellable,
 						 GError **error);
 
@@ -116,21 +116,21 @@ struct _CamelDiscoStoreClass {
 			(*get_folder_info_online)
 						(CamelStore *store,
 						 const gchar *top,
-						 guint32 flags,
+						 CamelStoreGetFolderInfoFlags flags,
 						 GCancellable *cancellable,
 						 GError **error);
 	CamelFolderInfo *
 			(*get_folder_info_offline)
 						(CamelStore *store,
 						 const gchar *top,
-						 guint32 flags,
+						 CamelStoreGetFolderInfoFlags flags,
 						 GCancellable *cancellable,
 						 GError **error);
 	CamelFolderInfo *
 			(*get_folder_info_resyncing)
 						(CamelStore *store,
 						 const gchar *top,
-						 guint32 flags,
+						 CamelStoreGetFolderInfoFlags flags,
 						 GCancellable *cancellable,
 						 GError **error);
 };
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c
index 1382fd5..1591669 100644
--- a/camel/camel-folder-summary.c
+++ b/camel/camel-folder-summary.c
@@ -3591,7 +3591,7 @@ message_info_migrate (CamelFolderSummary *s, FILE *in)
 	io(printf("Loading message info\n"));
 
 	camel_file_util_decode_string (in, &uid);
-	camel_file_util_decode_uint32 (in, &mi->flags);
+	camel_file_util_decode_uint32 (in, (guint32 *) &mi->flags);
 	camel_file_util_decode_uint32 (in, &mi->size);
 	camel_file_util_decode_time_t (in, &mi->date_sent);
 	camel_file_util_decode_time_t (in, &mi->date_received);
@@ -4384,7 +4384,7 @@ static struct flag_names_t {
  *
  * Returns: the integer value of the system flag string
  **/
-guint32
+CamelMessageFlags
 camel_system_flag (const gchar *name)
 {
 	struct flag_names_t *flag;
@@ -4408,7 +4408,7 @@ camel_system_flag (const gchar *name)
  * Returns: %TRUE if the named flag is set or %FALSE otherwise
  **/
 gboolean
-camel_system_flag_get (guint32 flags, const gchar *name)
+camel_system_flag_get (CamelMessageFlags flags, const gchar *name)
 {
 	g_return_val_if_fail (name != NULL, FALSE);
 
@@ -4670,7 +4670,7 @@ camel_folder_summary_update_flag_cache (CamelFolderSummary *s, const gchar *uid,
  * Returns: %TRUE if any of the flags changed or %FALSE otherwise
  **/
 gboolean
-camel_message_info_set_flags (CamelMessageInfo *mi, guint32 flags, guint32 set)
+camel_message_info_set_flags (CamelMessageInfo *mi, CamelMessageFlags flags, guint32 set)
 {
 	if (mi->summary)
 		return CAMEL_FOLDER_SUMMARY_GET_CLASS (mi->summary)->info_set_flags (mi, flags, set);
diff --git a/camel/camel-folder-summary.h b/camel/camel-folder-summary.h
index ef79679..0f36749 100644
--- a/camel/camel-folder-summary.h
+++ b/camel/camel-folder-summary.h
@@ -196,7 +196,7 @@ struct _CamelMessageInfoBase {
 	const gchar *cc;
 	const gchar *mlist;
 
-	guint32 flags;
+	CamelMessageFlags flags;
 	guint32 size;
 
 	time_t date_sent;
@@ -215,7 +215,7 @@ struct _CamelMessageInfoBase {
 	gchar *bodystructure;
 };
 
-typedef enum _CamelFolderSummaryFlags {
+typedef enum {
 	CAMEL_SUMMARY_DIRTY = 1 << 0
 } CamelFolderSummaryFlags;
 
@@ -238,7 +238,7 @@ struct _CamelFolderSummary {
 
 	/* header info */
 	guint32 version;	/* version of file loaded/loading */
-	guint32 flags;		/* flags */
+	CamelFolderSummaryFlags flags;
 	guint32 nextuid;	/* next uid? */
 	time_t time;		/* timestamp for this summary (for implementors to use) */
 	guint32 saved_count;	/* how many were saved/loaded */
@@ -422,8 +422,9 @@ gboolean	camel_flag_list_copy (CamelFlag **to, CamelFlag **from);
 gint		camel_flag_list_size (CamelFlag **list);
 void		camel_flag_list_free (CamelFlag **list);
 
-guint32         camel_system_flag (const gchar *name);
-gboolean        camel_system_flag_get (guint32 flags, const gchar *name);
+CamelMessageFlags
+		camel_system_flag (const gchar *name);
+gboolean	camel_system_flag_get (CamelMessageFlags flags, const gchar *name);
 
 /* message tag operations */
 const gchar	*camel_tag_get (CamelTag **list, const gchar *name);
@@ -498,7 +499,7 @@ time_t camel_message_info_time (const CamelMessageInfo *mi, gint id);
 gboolean camel_message_info_user_flag (const CamelMessageInfo *mi, const gchar *id);
 const gchar *camel_message_info_user_tag (const CamelMessageInfo *mi, const gchar *id);
 
-gboolean camel_message_info_set_flags (CamelMessageInfo *mi, guint32 flags, guint32 set);
+gboolean camel_message_info_set_flags (CamelMessageInfo *mi, CamelMessageFlags flags, guint32 set);
 gboolean camel_message_info_set_user_flag (CamelMessageInfo *mi, const gchar *id, gboolean state);
 gboolean camel_message_info_set_user_tag (CamelMessageInfo *mi, const gchar *id, const gchar *val);
 
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
index 74e15ca..00b7aaf 100644
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@ -529,18 +529,18 @@ folder_get_message_count (CamelFolder *folder)
 	return camel_folder_summary_count (folder->summary);
 }
 
-static guint32
+static CamelMessageFlags
 folder_get_permanent_flags (CamelFolder *folder)
 {
 	return folder->permanent_flags;
 }
 
-static guint32
+static CamelMessageFlags
 folder_get_message_flags (CamelFolder *folder,
                           const gchar *uid)
 {
 	CamelMessageInfo *info;
-	guint32 flags;
+	CamelMessageFlags flags;
 
 	g_return_val_if_fail (folder->summary != NULL, 0);
 
@@ -557,8 +557,8 @@ folder_get_message_flags (CamelFolder *folder,
 static gboolean
 folder_set_message_flags (CamelFolder *folder,
                           const gchar *uid,
-                          guint32 flags,
-                          guint32 set)
+                          CamelMessageFlags flags,
+                          CamelMessageFlags set)
 {
 	CamelMessageInfo *info;
 	gint res;
@@ -1386,7 +1386,7 @@ folder_changed (CamelFolder *folder,
 	camel_folder_unlock (folder, CAMEL_FOLDER_CHANGE_LOCK);
 
 	if (session->junk_plugin && info->uid_changed->len) {
-		guint32 flags;
+		CamelMessageFlags flags;
 
 		for (i = 0; i < info->uid_changed->len; i++) {
 			flags = camel_folder_get_message_flags (folder, info->uid_changed->pdata[i]);
@@ -1870,7 +1870,7 @@ camel_folder_get_deleted_message_count (CamelFolder *folder)
  * stored on a message between sessions. If it includes
  * #CAMEL_FLAG_USER, then user-defined flags will be remembered.
  **/
-guint32
+CamelMessageFlags
 camel_folder_get_permanent_flags (CamelFolder *folder)
 {
 	CamelFolderClass *class;
@@ -1893,7 +1893,7 @@ camel_folder_get_permanent_flags (CamelFolder *folder)
  * Returns: the #CamelMessageFlags that are set on the indicated
  * message.
  **/
-guint32
+CamelMessageFlags
 camel_folder_get_message_flags (CamelFolder *folder,
                                 const gchar *uid)
 {
@@ -1930,8 +1930,8 @@ camel_folder_get_message_flags (CamelFolder *folder,
 gboolean
 camel_folder_set_message_flags (CamelFolder *folder,
                                 const gchar *uid,
-                                guint32 flags,
-                                guint32 set)
+                                CamelMessageFlags flags,
+                                CamelMessageFlags set)
 {
 	CamelFolderClass *class;
 
diff --git a/camel/camel-folder.h b/camel/camel-folder.h
index 2b8ea81..01abda3 100644
--- a/camel/camel-folder.h
+++ b/camel/camel-folder.h
@@ -119,39 +119,43 @@ struct _CamelFolderQuotaInfo {
 	struct _CamelFolderQuotaInfo *next;
 };
 
+typedef enum {
+	CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY = 1 << 0,
+	CAMEL_FOLDER_HAS_SEARCH_CAPABILITY  = 1 << 1,
+	CAMEL_FOLDER_FILTER_RECENT          = 1 << 2,
+	CAMEL_FOLDER_HAS_BEEN_DELETED       = 1 << 3,
+	CAMEL_FOLDER_IS_TRASH               = 1 << 4,
+	CAMEL_FOLDER_IS_JUNK                = 1 << 5,
+	CAMEL_FOLDER_FILTER_JUNK            = 1 << 6
+} CamelFolderFlags;
+
 struct _CamelFolder {
 	CamelObject parent;
 	CamelFolderPrivate *priv;
 
 	CamelFolderSummary *summary;
 
-	guint32 folder_flags;
-	guint32 permanent_flags;
+	CamelFolderFlags folder_flags;
+	CamelMessageFlags permanent_flags;
 
 	/* Future ABI expansion */
 	gpointer later[4];
 };
 
-#define CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY (1 << 0)
-#define CAMEL_FOLDER_HAS_SEARCH_CAPABILITY  (1 << 1)
-#define CAMEL_FOLDER_FILTER_RECENT          (1 << 2)
-#define CAMEL_FOLDER_HAS_BEEN_DELETED       (1 << 3)
-#define CAMEL_FOLDER_IS_TRASH               (1 << 4)
-#define CAMEL_FOLDER_IS_JUNK                (1 << 5)
-#define CAMEL_FOLDER_FILTER_JUNK	    (1 << 6)
-
 struct _CamelFolderClass {
 	CamelObjectClass parent_class;
 
 	/* Non-Blocking Methods */
 	gint		(*get_message_count)	(CamelFolder *folder);
-	guint32		(*get_permanent_flags)	(CamelFolder *folder);
-	guint32		(*get_message_flags)	(CamelFolder *folder,
+	CamelMessageFlags
+			(*get_permanent_flags)	(CamelFolder *folder);
+	CamelMessageFlags
+			(*get_message_flags)	(CamelFolder *folder,
 						 const gchar *uid);
 	gboolean	(*set_message_flags)	(CamelFolder *folder,
 						 const gchar *uid,
-						 guint32 flags,
-						 guint32 set);
+						 CamelMessageFlags flags,
+						 CamelMessageFlags set);
 	gboolean	(*get_message_user_flag)(CamelFolder *folder,
 						 const gchar *uid,
 						 const gchar *name);
@@ -343,14 +347,17 @@ void		camel_folder_set_full_name	(CamelFolder *folder,
 const gchar *	camel_folder_get_description	(CamelFolder *folder);
 void		camel_folder_set_description	(CamelFolder *folder,
 						 const gchar *description);
-guint32		camel_folder_get_permanent_flags (CamelFolder *folder);
+CamelMessageFlags
+		camel_folder_get_permanent_flags
+						(CamelFolder *folder);
 #ifndef CAMEL_DISABLE_DEPRECATED
-guint32		camel_folder_get_message_flags	(CamelFolder *folder,
+CamelMessageFlags
+		camel_folder_get_message_flags	(CamelFolder *folder,
 						 const gchar *uid);
 gboolean	camel_folder_set_message_flags	(CamelFolder *folder,
 						 const gchar *uid,
-						 guint32 flags,
-						 guint32 set);
+						 CamelMessageFlags flags,
+						 CamelMessageFlags set);
 gboolean	camel_folder_get_message_user_flag
 						(CamelFolder *folder,
 						 const gchar *uid,
diff --git a/camel/camel-provider.h b/camel/camel-provider.h
index 84b3ab0..330bd9b 100644
--- a/camel/camel-provider.h
+++ b/camel/camel-provider.h
@@ -47,41 +47,40 @@ typedef enum {
 
 extern gchar *camel_provider_type_name[CAMEL_NUM_PROVIDER_TYPES];
 
-/* Provider flags:
- *
- * _IS_REMOTE   the provider works with remote data
- * _IS_LOCAL    it can be used as a backend for local folder
- *                tree folders. (*Not* just the opposite of _IS_REMOTE)
- * _IS_SOURCE   mail arrives there, so it should be offered as an
- *                option in the mail config dialog.
- * _IS_STORAGE  mail is stored there. it will appear in the folder tree.
- * _IS_EXTERNAL it appears in the folder tree but is not created by
- *                the mail component.
- * _HAS_LICENSE  the provider configuration first needs the license to
- *		   be accepted.
+/* CamelProviderFlags;
+ * @CAMEL_PROVIDER_IS_REMOTE:
+ *   Provider works with remote data.
+ * @CAMEL_PROVIDER_IS_LOCAL:
+ *   Provider can be used as a backend for local folder tree folders.
+ *   (Not just the opposite of #CAMEL_PROVIDER_IS_REMOTE.)
+ * @CAMEL_PROVIDER_IS_SOURCE:
+ *   Mail arrives there, so it should be offered as an option in the
+ *   mail config dialog.
+ * @CAMEL_PROVIDER_IS_STORAGE:
+ *   Mail is stored there.  It will appear in the folder tree.
+ * @CAMEL_PROVIDER_IS_EXTERNAL:
+ *   Provider appears in the folder tree but is not created by the
+ *   mail component.
+ * @CAMEL_PROVIDER_HAS_LICENSE:
+ *   Provider configuration first needs the license to be accepted.
+ *   (No longer used.)
+ * @CAMEL_PROVIDER_ALLOW_REAL_TRASH_FOLDER:
+ *   Provider may use a real trash folder instead of a virtual folder.
+ * @CAMEL_PROVIDER_ALLOW_REAL_JUNK_FOLDER:
+ *   Provider may use a real junk folder instead of a virtual folder.
  */
-#define CAMEL_PROVIDER_IS_REMOTE	(1 << 0)
-#define CAMEL_PROVIDER_IS_LOCAL		(1 << 1)
-#define CAMEL_PROVIDER_IS_EXTERNAL	(1 << 2)
-#define CAMEL_PROVIDER_IS_SOURCE	(1 << 3)
-#define CAMEL_PROVIDER_IS_STORAGE	(1 << 4)
-#define CAMEL_PROVIDER_SUPPORTS_SSL	(1 << 5)
-#define CAMEL_PROVIDER_HAS_LICENSE      (1 << 6)
-#define CAMEL_PROVIDER_DISABLE_SENT_FOLDER (1 << 7)
-
-/**
- * CAMEL_PROVIDER_ALLOW_REAL_TRASH_FOLDER:
- *
- * Since: 2.32
- **/
-#define CAMEL_PROVIDER_ALLOW_REAL_TRASH_FOLDER (1 << 8)
-
-/**
- * CAMEL_PROVIDER_ALLOW_REAL_JUNK_FOLDER:
- *
- * Since: 2.32
- **/
-#define CAMEL_PROVIDER_ALLOW_REAL_JUNK_FOLDER  (1 << 9)
+typedef enum {
+	CAMEL_PROVIDER_IS_REMOTE		= 1 << 0,
+	CAMEL_PROVIDER_IS_LOCAL			= 1 << 1,
+	CAMEL_PROVIDER_IS_EXTERNAL		= 1 << 2,
+	CAMEL_PROVIDER_IS_SOURCE		= 1 << 3,
+	CAMEL_PROVIDER_IS_STORAGE		= 1 << 4,
+	CAMEL_PROVIDER_SUPPORTS_SSL		= 1 << 5,
+	CAMEL_PROVIDER_HAS_LICENSE		= 1 << 6,
+	CAMEL_PROVIDER_DISABLE_SENT_FOLDER	= 1 << 7,
+	CAMEL_PROVIDER_ALLOW_REAL_TRASH_FOLDER	= 1 << 8,
+	CAMEL_PROVIDER_ALLOW_REAL_JUNK_FOLDER	= 1 << 9
+} CamelProviderFlags;
 
 /* Flags for url_flags. "ALLOW" means the config dialog will let the
  * user configure it. "NEED" implies "ALLOW" but means the user must
@@ -102,35 +101,40 @@ extern gchar *camel_provider_type_name[CAMEL_NUM_PROVIDER_TYPES];
 #define CAMEL_URL_PART_HIDDEN	(CAMEL_URL_PART_NEED + 8)
 
 /* Use these macros to test a provider's url_flags */
-#define CAMEL_PROVIDER_ALLOWS(prov, flags) (prov->url_flags & (flags | (flags << CAMEL_URL_PART_NEED) | (flags << CAMEL_URL_PART_HIDDEN)))
-#define CAMEL_PROVIDER_NEEDS(prov, flags) (prov->url_flags & (flags << CAMEL_URL_PART_NEED))
-#define CAMEL_PROVIDER_HIDDEN(prov, flags) (prov->url_flags & (flags << CAMEL_URL_PART_HIDDEN))
+#define CAMEL_PROVIDER_ALLOWS(prov, flags) \
+	(prov->url_flags & (flags | (flags << CAMEL_URL_PART_NEED) | (flags << CAMEL_URL_PART_HIDDEN)))
+#define CAMEL_PROVIDER_NEEDS(prov, flags) \
+	(prov->url_flags & (flags << CAMEL_URL_PART_NEED))
+#define CAMEL_PROVIDER_HIDDEN(prov, flags) \
+	(prov->url_flags & (flags << CAMEL_URL_PART_HIDDEN))
 
 /* Providers use these macros to actually define their url_flags */
-#define CAMEL_URL_ALLOW_USER	 (CAMEL_URL_PART_USER)
-#define CAMEL_URL_ALLOW_AUTH	 (CAMEL_URL_PART_AUTH)
-#define CAMEL_URL_ALLOW_PASSWORD (CAMEL_URL_PART_PASSWORD)
-#define CAMEL_URL_ALLOW_HOST	 (CAMEL_URL_PART_HOST)
-#define CAMEL_URL_ALLOW_PORT	 (CAMEL_URL_PART_PORT)
-#define CAMEL_URL_ALLOW_PATH	 (CAMEL_URL_PART_PATH)
-
-#define CAMEL_URL_NEED_USER	 (CAMEL_URL_PART_USER << CAMEL_URL_PART_NEED)
-#define CAMEL_URL_NEED_AUTH	 (CAMEL_URL_PART_AUTH << CAMEL_URL_PART_NEED)
-#define CAMEL_URL_NEED_PASSWORD	 (CAMEL_URL_PART_PASSWORD << CAMEL_URL_PART_NEED)
-#define CAMEL_URL_NEED_HOST	 (CAMEL_URL_PART_HOST << CAMEL_URL_PART_NEED)
-#define CAMEL_URL_NEED_PORT	 (CAMEL_URL_PART_PORT << CAMEL_URL_PART_NEED)
-#define CAMEL_URL_NEED_PATH	 (CAMEL_URL_PART_PATH << CAMEL_URL_PART_NEED)
-#define CAMEL_URL_NEED_PATH_DIR  (CAMEL_URL_PART_PATH_DIR << CAMEL_URL_PART_NEED)
-
-#define CAMEL_URL_HIDDEN_USER	 (CAMEL_URL_PART_USER << CAMEL_URL_PART_HIDDEN)
-#define CAMEL_URL_HIDDEN_AUTH	 (CAMEL_URL_PART_AUTH << CAMEL_URL_PART_HIDDEN)
-#define CAMEL_URL_HIDDEN_PASSWORD	 (CAMEL_URL_PART_PASSWORD << CAMEL_URL_PART_HIDDEN)
-#define CAMEL_URL_HIDDEN_HOST	 (CAMEL_URL_PART_HOST << CAMEL_URL_PART_HIDDEN)
-#define CAMEL_URL_HIDDEN_PORT	 (CAMEL_URL_PART_PORT << CAMEL_URL_PART_HIDDEN)
-#define CAMEL_URL_HIDDEN_PATH	 (CAMEL_URL_PART_PATH << CAMEL_URL_PART_HIDDEN)
-
-#define CAMEL_URL_FRAGMENT_IS_PATH  (1 << 30) /* url uses fragment for folder name path, not path */
-#define CAMEL_URL_PATH_IS_ABSOLUTE (1 << 31)
+typedef enum {
+	CAMEL_URL_ALLOW_USER       = CAMEL_URL_PART_USER,
+	CAMEL_URL_ALLOW_AUTH       = CAMEL_URL_PART_AUTH,
+	CAMEL_URL_ALLOW_PASSWORD   = CAMEL_URL_PART_PASSWORD,
+	CAMEL_URL_ALLOW_HOST       = CAMEL_URL_PART_HOST,
+	CAMEL_URL_ALLOW_PORT       = CAMEL_URL_PART_PORT,
+	CAMEL_URL_ALLOW_PATH       = CAMEL_URL_PART_PATH,
+
+	CAMEL_URL_NEED_USER        = CAMEL_URL_PART_USER << CAMEL_URL_PART_NEED,
+	CAMEL_URL_NEED_AUTH        = CAMEL_URL_PART_AUTH << CAMEL_URL_PART_NEED,
+	CAMEL_URL_NEED_PASSWORD    = CAMEL_URL_PART_PASSWORD << CAMEL_URL_PART_NEED,
+	CAMEL_URL_NEED_HOST        = CAMEL_URL_PART_HOST << CAMEL_URL_PART_NEED,
+	CAMEL_URL_NEED_PORT        = CAMEL_URL_PART_PORT << CAMEL_URL_PART_NEED,
+	CAMEL_URL_NEED_PATH        = CAMEL_URL_PART_PATH << CAMEL_URL_PART_NEED,
+	CAMEL_URL_NEED_PATH_DIR    = CAMEL_URL_PART_PATH_DIR << CAMEL_URL_PART_NEED,
+
+	CAMEL_URL_HIDDEN_USER      = CAMEL_URL_PART_USER << CAMEL_URL_PART_HIDDEN,
+	CAMEL_URL_HIDDEN_AUTH      = CAMEL_URL_PART_AUTH << CAMEL_URL_PART_HIDDEN,
+	CAMEL_URL_HIDDEN_PASSWORD  = CAMEL_URL_PART_PASSWORD << CAMEL_URL_PART_HIDDEN,
+	CAMEL_URL_HIDDEN_HOST      = CAMEL_URL_PART_HOST << CAMEL_URL_PART_HIDDEN,
+	CAMEL_URL_HIDDEN_PORT      = CAMEL_URL_PART_PORT << CAMEL_URL_PART_HIDDEN,
+	CAMEL_URL_HIDDEN_PATH      = CAMEL_URL_PART_PATH << CAMEL_URL_PART_HIDDEN,
+
+	CAMEL_URL_FRAGMENT_IS_PATH = 1 << 30, /* url uses fragment for folder name path, not path */
+	CAMEL_URL_PATH_IS_ABSOLUTE = 1 << 31,
+} CamelProviderURLFlags;
 
 #define CAMEL_PROVIDER_IS_STORE_AND_TRANSPORT(prov) (prov->object_types[CAMEL_PROVIDER_STORE] && prov->object_types[CAMEL_PROVIDER_TRANSPORT])
 
@@ -154,9 +158,12 @@ typedef struct {
 } CamelProviderConfEntry;
 
 /* Some defaults */
-#define CAMEL_PROVIDER_CONF_DEFAULT_USERNAME  { CAMEL_PROVIDER_CONF_LABEL, "username", NULL, N_("User_name:"), NULL }
-#define CAMEL_PROVIDER_CONF_DEFAULT_HOSTNAME  { CAMEL_PROVIDER_CONF_LABEL, "hostname", NULL, N_("_Host:"), NULL }
-#define CAMEL_PROVIDER_CONF_DEFAULT_PATH      { CAMEL_PROVIDER_CONF_ENTRY, "path", NULL, N_("_Path:"), "" }
+#define CAMEL_PROVIDER_CONF_DEFAULT_USERNAME \
+	{ CAMEL_PROVIDER_CONF_LABEL, "username", NULL, N_("User_name:"), NULL }
+#define CAMEL_PROVIDER_CONF_DEFAULT_HOSTNAME \
+	{ CAMEL_PROVIDER_CONF_LABEL, "hostname", NULL, N_("_Host:"), NULL }
+#define CAMEL_PROVIDER_CONF_DEFAULT_PATH \
+	{ CAMEL_PROVIDER_CONF_ENTRY, "path", NULL, N_("_Path:"), "" }
 
 typedef gint (*CamelProviderAutoDetectFunc) (CamelURL *url, GHashTable **auto_detected, GError **error);
 
@@ -182,7 +189,8 @@ typedef struct {
 	const gchar *domain;
 
 	/* Flags describing the provider, flags describing its URLs */
-	gint flags, url_flags;
+	CamelProviderFlags flags;
+	CamelProviderURLFlags url_flags;
 
 	/* The ConfEntry and AutoDetect functions will probably be
 	 * DEPRECATED in a future release */
diff --git a/camel/camel-store.c b/camel/camel-store.c
index bee8041..87eae4c 100644
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@ -444,7 +444,7 @@ store_get_folder_thread (GSimpleAsyncResult *simple,
 static void
 store_get_folder (CamelStore *store,
                   const gchar *folder_name,
-                  guint32 flags,
+                  CamelStoreGetFolderFlags flags,
                   gint io_priority,
                   GCancellable *cancellable,
                   GAsyncReadyCallback callback,
@@ -513,7 +513,7 @@ store_get_folder_info_thread (GSimpleAsyncResult *simple,
 static void
 store_get_folder_info (CamelStore *store,
                        const gchar *top,
-                       guint32 flags,
+                       CamelStoreGetFolderInfoFlags flags,
                        gint io_priority,
                        GCancellable *cancellable,
                        GAsyncReadyCallback callback,
@@ -1570,7 +1570,7 @@ add_special_info (CamelStore *store,
                   const gchar *name,
                   const gchar *translated,
                   gboolean unread_count,
-                  guint32 flags)
+                  CamelFolderInfoFlags flags)
 {
 	CamelFolderInfo *fi, *vinfo, *parent;
 	gchar *uri, *path;
@@ -2116,7 +2116,7 @@ camel_store_unlock (CamelStore *store,
 CamelFolder *
 camel_store_get_folder_sync (CamelStore *store,
                              const gchar *folder_name,
-                             guint32 flags,
+                             CamelStoreGetFolderFlags flags,
                              GCancellable *cancellable,
                              GError **error)
 {
@@ -2224,7 +2224,7 @@ camel_store_get_folder_sync (CamelStore *store,
 void
 camel_store_get_folder (CamelStore *store,
                         const gchar *folder_name,
-                        guint32 flags,
+                        CamelStoreGetFolderFlags flags,
                         gint io_priority,
                         GCancellable *cancellable,
                         GAsyncReadyCallback callback,
@@ -2308,7 +2308,7 @@ camel_store_get_folder_finish (CamelStore *store,
 CamelFolderInfo *
 camel_store_get_folder_info_sync (CamelStore *store,
                                   const gchar *top,
-                                  guint32 flags,
+                                  CamelStoreGetFolderInfoFlags flags,
                                   GCancellable *cancellable,
                                   GError **error)
 {
@@ -2369,7 +2369,7 @@ camel_store_get_folder_info_sync (CamelStore *store,
 void
 camel_store_get_folder_info (CamelStore *store,
                              const gchar *top,
-                             guint32 flags,
+                             CamelStoreGetFolderInfoFlags flags,
                              gint io_priority,
                              GCancellable *cancellable,
                              GAsyncReadyCallback callback,
@@ -3083,9 +3083,11 @@ camel_store_rename_folder_sync (CamelStore *store,
 	/* If it worked, update all open folders/unlock them */
 	if (folders) {
 		if (success) {
-			guint32 flags = CAMEL_STORE_FOLDER_INFO_RECURSIVE;
+			CamelStoreGetFolderInfoFlags flags;
 			CamelFolderInfo *folder_info;
 
+			flags = CAMEL_STORE_FOLDER_INFO_RECURSIVE;
+
 			for (i=0;i<folders->len;i++) {
 				const gchar *full_name;
 				gchar *new;
diff --git a/camel/camel-store.h b/camel/camel-store.h
index be7ee90..49cfe4f 100644
--- a/camel/camel-store.h
+++ b/camel/camel-store.h
@@ -85,6 +85,72 @@ typedef enum {
 	CAMEL_STORE_FOLDER_LOCK
 } CamelStoreLock;
 
+#define CAMEL_FOLDER_TYPE_MASK (7 << 10)
+#define CAMEL_FOLDER_TYPE_BIT (10)
+
+/**
+ * CamelFolderInfoFlags:
+ * @CAMEL_FOLDER_NOSELECT:
+ *    The folder cannot contain messages.
+ * @CAMEL_FOLDER_NOINFERIORS:
+ *    The folder cannot have child folders.
+ * @CAMEL_FOLDER_CHILDREN:
+ *    The folder has children (not yet fully implemented).
+ * @CAMEL_FOLDER_NOCHILDREN:
+ *    The folder does not have children (not yet fully implemented).
+ * @CAMEL_FOLDER_SUBSCRIBED:
+ *    The folder is subscribed.
+ * @CAMEL_FOLDER_VIRTUAL:
+ *    The folder is virtual.  Messages cannot be copied or moved to
+ *    virtual folders since they are only queries of other folders.
+ * @CAMEL_FOLDER_SYSTEM:
+ *    The folder is a built-in "system" folder.  System folders
+ *    cannot be renamed or deleted.
+ * @CAMEL_FOLDER_VTRASH:
+ *    The folder is a virtual trash folder.  It cannot be copied to,
+ *    and can only be moved to if in an existing folder.
+ * @CAMEL_FOLDER_SHARED_TO_ME:
+ *    A folder being shared by someone else.
+ * @CAMEL_FOLDER_SHARED_BY_ME:
+ *    A folder being shared by the user.
+ * @CAMEL_FOLDER_TYPE_NORMAL:
+ *    The folder is a normal folder.
+ * @CAMEL_FOLDER_TYPE_INBOX:
+ *    The folder is an inbox folder.
+ * @CAMEL_FOLDER_TYPE_OUTBOX:
+ *    The folder is an outbox folder.
+ * @CAMEL_FOLDER_TYPE_TRASH:
+ *    The folder shows deleted messages.
+ * @CAMEL_FOLDER_TYPE_JUNK:
+ *    The folder shows junk messages.
+ * @CAMEL_FOLDER_TYPE_SENT:
+ *    The folder shows sent messages.
+ *
+ * These flags are abstractions.  It's up to the CamelProvider to give
+ * them suitable interpretations.  Use #CAMEL_FOLDER_TYPE_MASK to isolate
+ * the folder's type.
+ **/
+typedef enum {
+	CAMEL_FOLDER_NOSELECT     = 1 << 0,
+	CAMEL_FOLDER_NOINFERIORS  = 1 << 1,
+	CAMEL_FOLDER_CHILDREN     = 1 << 2,
+	CAMEL_FOLDER_NOCHILDREN   = 1 << 3,
+	CAMEL_FOLDER_SUBSCRIBED   = 1 << 4,
+	CAMEL_FOLDER_VIRTUAL      = 1 << 5,
+	CAMEL_FOLDER_SYSTEM       = 1 << 6,
+	CAMEL_FOLDER_VTRASH       = 1 << 7,
+	CAMEL_FOLDER_SHARED_TO_ME = 1 << 8,
+	CAMEL_FOLDER_SHARED_BY_ME = 1 << 9,
+	CAMEL_FOLDER_TYPE_NORMAL  = 0 << CAMEL_FOLDER_TYPE_BIT,
+	CAMEL_FOLDER_TYPE_INBOX   = 1 << CAMEL_FOLDER_TYPE_BIT,
+	CAMEL_FOLDER_TYPE_OUTBOX  = 2 << CAMEL_FOLDER_TYPE_BIT,
+	CAMEL_FOLDER_TYPE_TRASH   = 3 << CAMEL_FOLDER_TYPE_BIT,
+	CAMEL_FOLDER_TYPE_JUNK    = 4 << CAMEL_FOLDER_TYPE_BIT,
+	CAMEL_FOLDER_TYPE_SENT    = 5 << CAMEL_FOLDER_TYPE_BIT
+} CamelFolderInfoFlags;
+
+/* next bit is 1 << 13 */
+
 typedef struct _CamelFolderInfo {
 	struct _CamelFolderInfo *next;
 	struct _CamelFolderInfo *parent;
@@ -94,78 +160,28 @@ typedef struct _CamelFolderInfo {
 	gchar *name;
 	gchar *full_name;
 
-	guint32 flags;
+	CamelFolderInfoFlags flags;
 	gint32 unread;
 	gint32 total;
 } CamelFolderInfo;
 
-/* Note: these are abstractions (duh), its upto the provider to make them make sense */
-
-/* a folder which can't contain messages */
-#define CAMEL_FOLDER_NOSELECT (1 << 0)
-/* a folder which cannot have children */
-#define CAMEL_FOLDER_NOINFERIORS (1 << 1)
-/* a folder which has children (not yet fully implemented) */
-#define CAMEL_FOLDER_CHILDREN (1 << 2)
-/* a folder which does not have any children (not yet fully implemented) */
-#define CAMEL_FOLDER_NOCHILDREN (1 << 3)
-/* a folder which is subscribed */
-#define CAMEL_FOLDER_SUBSCRIBED (1 << 4)
-/* a virtual folder, cannot copy/move messages here */
-#define CAMEL_FOLDER_VIRTUAL (1 << 5)
-/* a system folder, cannot be renamed/deleted */
-#define CAMEL_FOLDER_SYSTEM (1 << 6)
-/* a virtual folder that can't be copied to, and can only be moved to if in an existing folder */
-#define CAMEL_FOLDER_VTRASH (1 << 7)
-/* a shared folder i'm accessing */
-#define CAMEL_FOLDER_SHARED_TO_ME (1 << 8)
-/* a folder that i'm sharing */
-#define CAMEL_FOLDER_SHARED_BY_ME (1 << 9)
-
-/* use 3 bits as a hint for a folder type */
-#define CAMEL_FOLDER_TYPE_MASK (7 << 10)
-#define CAMEL_FOLDER_TYPE_BIT (10)
-/* a normal folder */
-#define CAMEL_FOLDER_TYPE_NORMAL (0 << 10)
-/* an inbox folder */
-#define CAMEL_FOLDER_TYPE_INBOX (1 << 10)
-/* an outbox folder */
-#define CAMEL_FOLDER_TYPE_OUTBOX (2 << 10)
-/* a rubbish folder */
-#define CAMEL_FOLDER_TYPE_TRASH (3 << 10)
-/* a spam folder */
-#define CAMEL_FOLDER_TYPE_JUNK (4 << 10)
-/* a sent-items folder */
-#define CAMEL_FOLDER_TYPE_SENT (5 << 10)
-
-/* next bit is 1 << 13 */
-
-/* store premissions */
-#define CAMEL_STORE_READ  (1 << 0)
-#define CAMEL_STORE_WRITE (1 << 1)
-
 /* Flags for store flags */
-#define CAMEL_STORE_SUBSCRIPTIONS	(1 << 0)
-#define CAMEL_STORE_VTRASH		(1 << 1)
-#define CAMEL_STORE_FILTER_INBOX	(1 << 2)
-#define CAMEL_STORE_VJUNK		(1 << 3)
-#define CAMEL_STORE_PROXY		(1 << 4)
-
-/**
- * CAMEL_STORE_IS_MIGRATING:
- *
- * Since: 2.26
- **/
-#define CAMEL_STORE_IS_MIGRATING (1 << 5)
-
-#define CAMEL_STORE_ASYNC		(1 << 6)
+typedef enum {
+	CAMEL_STORE_SUBSCRIPTIONS    = 1 << 0,
+	CAMEL_STORE_VTRASH           = 1 << 1,
+	CAMEL_STORE_FILTER_INBOX     = 1 << 2,
+	CAMEL_STORE_VJUNK            = 1 << 3,
+	CAMEL_STORE_PROXY            = 1 << 4,
+	CAMEL_STORE_IS_MIGRATING     = 1 << 5,
+	CAMEL_STORE_ASYNC            = 1 << 6,
+	CAMEL_STORE_REAL_JUNK_FOLDER = 1 << 7,
+} CamelStoreFlags;
 
-/**
- * CAMEL_STORE_REAL_JUNK_FOLDER:
- *
- * Since: 2.32
- **/
-#define CAMEL_STORE_REAL_JUNK_FOLDER	(1 << 7)
+/* store premissions */
+typedef enum {
+	CAMEL_STORE_READ  = 1 << 0,
+	CAMEL_STORE_WRITE = 1 << 1
+} CamelStorePermissionFlags;
 
 struct _CamelDB;
 
@@ -173,6 +189,41 @@ typedef struct _CamelStore CamelStore;
 typedef struct _CamelStoreClass CamelStoreClass;
 typedef struct _CamelStorePrivate CamelStorePrivate;
 
+/* open mode for folder */
+typedef enum {
+	CAMEL_STORE_FOLDER_CREATE     = 1 << 0,
+	CAMEL_STORE_FOLDER_EXCL       = 1 << 1,
+	CAMEL_STORE_FOLDER_BODY_INDEX = 1 << 2,
+	CAMEL_STORE_FOLDER_PRIVATE    = 1 << 3  /* a private folder that
+                                                   should not show up in
+                                                   unmatched, folder
+                                                   info's, etc. */
+} CamelStoreGetFolderFlags;
+
+#define CAMEL_STORE_FOLDER_CREATE_EXCL \
+	(CAMEL_STORE_FOLDER_CREATE | CAMEL_STORE_FOLDER_EXCL)
+
+/**
+ * CamelStoreGetFolderInfoFlags:
+ * @CAMEL_STORE_FOLDER_INFO_FAST:
+ * @CAMEL_STORE_FOLDER_INFO_RECURSIVE:
+ * @CAMEL_STORE_FOLDER_INFO_SUBSCRIBED:
+ * @CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL:
+ *   Do not include virtual trash or junk folders.
+ * @CAMEL_STORE_FOLDER_INFO_SUBSCRIPTION_LIST:
+ *   Fetch only the subscription list. Clients should use this
+ *   flag for requesting the list of folders available for
+ *   subscription. Used in Exchange / IMAP connectors for public
+ *   folder fetching.
+ **/
+typedef enum {
+	CAMEL_STORE_FOLDER_INFO_FAST              = 1 << 0,
+	CAMEL_STORE_FOLDER_INFO_RECURSIVE         = 1 << 1,
+	CAMEL_STORE_FOLDER_INFO_SUBSCRIBED        = 1 << 2,
+	CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL        = 1 << 3,
+	CAMEL_STORE_FOLDER_INFO_SUBSCRIPTION_LIST = 1 << 4
+} CamelStoreGetFolderInfoFlags;
+
 struct _CamelStore {
 	CamelService parent;
 	CamelStorePrivate *priv;
@@ -181,39 +232,13 @@ struct _CamelStore {
 	struct _CamelDB *cdb_r;
 	struct _CamelDB *cdb_w;
 
-	guint32 flags;
-	guint32 mode;
+	CamelStoreFlags flags;
+	CamelStorePermissionFlags mode;
 
 	/* Future ABI expansion */
 	gpointer later[4];
 };
 
-/* open mode for folder */
-#define CAMEL_STORE_FOLDER_CREATE (1 << 0)
-#define CAMEL_STORE_FOLDER_EXCL (1 << 1)
-#define CAMEL_STORE_FOLDER_BODY_INDEX (1 << 2)
-#define CAMEL_STORE_FOLDER_PRIVATE (1 << 3) /* a private folder, that shouldn't show up in unmatched/folder info's, etc */
-
-#define CAMEL_STORE_FOLDER_CREATE_EXCL (CAMEL_STORE_FOLDER_CREATE | CAMEL_STORE_FOLDER_EXCL)
-
-#ifndef CAMEL_DISABLE_DEPRECATED
-#define CAMEL_STORE_FOLDER_INFO_FAST       (1 << 0)
-#endif /* CAMEL_DISABLE_DEPRECATED */
-#define CAMEL_STORE_FOLDER_INFO_RECURSIVE  (1 << 1)
-#define CAMEL_STORE_FOLDER_INFO_SUBSCRIBED (1 << 2)
-#define CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL (1 << 3)  /* don't include vTrash/vJunk folders */
-/**
- * CAMEL_STORE_FOLDER_INFO_SUBSCRIPTION_LIST:
- *
- * Fetch only the subscription list. Clients should use this
- * flag for requesting the list of folders available for
- * subscription. Used in Exchange / IMAP connectors for public
- * folder fetching.
- *
- * Since: 2.28
- **/
-#define CAMEL_STORE_FOLDER_INFO_SUBSCRIPTION_LIST (1 << 4)
-
 struct _CamelStoreClass {
 	CamelServiceClass parent_class;
 
@@ -232,13 +257,13 @@ struct _CamelStoreClass {
 	/* Synchronous I/O Methods */
 	CamelFolder *	(*get_folder_sync)	(CamelStore *store,
 						 const gchar *folder_name,
-						 guint32 flags,
+						 CamelStoreGetFolderFlags flags,
 						 GCancellable *cancellable,
 						 GError **error);
 	CamelFolderInfo *
 			(*get_folder_info_sync)	(CamelStore *store,
 						 const gchar *top,
-						 guint32 flags,
+						 CamelStoreGetFolderInfoFlags flags,
 						 GCancellable *cancellable,
 						 GError **error);
 	CamelFolder *	(*get_inbox_folder_sync)
@@ -288,7 +313,7 @@ struct _CamelStoreClass {
 	/* Asyncrhonous I/O Methods (all have defaults) */
 	void		(*get_folder)		(CamelStore *store,
 						 const gchar *folder_name,
-						 guint32 flags,
+						 CamelStoreGetFolderFlags flags,
 						 gint io_priority,
 						 GCancellable *cancellable,
 						 GAsyncReadyCallback callback,
@@ -298,7 +323,7 @@ struct _CamelStoreClass {
 						 GError **error);
 	void		(*get_folder_info)	(CamelStore *store,
 						 const gchar *top,
-						 guint32 flags,
+						 CamelStoreGetFolderInfoFlags flags,
 						 gint io_priority,
 						 GCancellable *cancellable,
 						 GAsyncReadyCallback callback,
@@ -470,12 +495,12 @@ void		camel_store_unlock		(CamelStore *store,
 
 CamelFolder *	camel_store_get_folder_sync	(CamelStore *store,
 						 const gchar *folder_name,
-						 guint32 flags,
+						 CamelStoreGetFolderFlags flags,
 						 GCancellable *cancellable,
 						 GError **error);
 void		camel_store_get_folder		(CamelStore *store,
 						 const gchar *folder_name,
-						 guint32 flags,
+						 CamelStoreGetFolderFlags flags,
 						 gint io_priority,
 						 GCancellable *cancellable,
 						 GAsyncReadyCallback callback,
@@ -487,12 +512,12 @@ CamelFolderInfo *
 		camel_store_get_folder_info_sync
 						(CamelStore *store,
 						 const gchar *top,
-						 guint32 flags,
+						 CamelStoreGetFolderInfoFlags flags,
 						 GCancellable *cancellable,
 						 GError **error);
 void		camel_store_get_folder_info	(CamelStore *store,
 						 const gchar *top,
-						 guint32 flags,
+						 CamelStoreGetFolderInfoFlags flags,
 						 gint io_priority,
 						 GCancellable *cancellable,
 						 GAsyncReadyCallback callback,
diff --git a/camel/camel-tcp-stream-ssl.c b/camel/camel-tcp-stream-ssl.c
index 057630f..58c3b8d 100644
--- a/camel/camel-tcp-stream-ssl.c
+++ b/camel/camel-tcp-stream-ssl.c
@@ -78,7 +78,7 @@ struct _CamelTcpStreamSSLPrivate {
 	CamelSession *session;
 	gchar *expected_host;
 	gboolean ssl_mode;
-	guint32 flags;
+	CamelTcpStreamSSLFlags flags;
 };
 
 G_DEFINE_TYPE (CamelTcpStreamSSL, camel_tcp_stream_ssl, CAMEL_TYPE_TCP_STREAM_RAW)
@@ -773,10 +773,7 @@ camel_tcp_stream_ssl_init (CamelTcpStreamSSL *stream)
  * camel_tcp_stream_ssl_new:
  * @session: an active #CamelSession object
  * @expected_host: host that the stream is expected to connect with
- * @flags: a bitwise combination of any of
- * #CAMEL_TCP_STREAM_SSL_ENABLE_SSL2,
- * #CAMEL_TCP_STREAM_SSL_ENABLE_SSL3 or
- * #CAMEL_TCP_STREAM_SSL_ENABLE_TLS
+ * @flags: a bitwise combination of #CamelTcpStreamSSLFlags
  *
  * Since the SSL certificate authenticator may need to prompt the
  * user, a #CamelSession is needed. @expected_host is needed as a
@@ -785,7 +782,9 @@ camel_tcp_stream_ssl_init (CamelTcpStreamSSL *stream)
  * Returns: a new #CamelTcpStreamSSL stream preset in SSL mode
  **/
 CamelStream *
-camel_tcp_stream_ssl_new (CamelSession *session, const gchar *expected_host, guint32 flags)
+camel_tcp_stream_ssl_new (CamelSession *session,
+                          const gchar *expected_host,
+                          CamelTcpStreamSSLFlags flags)
 {
 	CamelTcpStreamSSL *stream;
 
@@ -805,10 +804,7 @@ camel_tcp_stream_ssl_new (CamelSession *session, const gchar *expected_host, gui
  * camel_tcp_stream_ssl_new_raw:
  * @session: an active #CamelSession object
  * @expected_host: host that the stream is expected to connect with
- * @flags: a bitwise combination of any of
- * #CAMEL_TCP_STREAM_SSL_ENABLE_SSL2,
- * #CAMEL_TCP_STREAM_SSL_ENABLE_SSL3 or
- * #CAMEL_TCP_STREAM_SSL_ENABLE_TLS
+ * @flags: a bitwise combination of #CamelTcpStreamSSLFlags
  *
  * Since the SSL certificate authenticator may need to prompt the
  * user, a CamelSession is needed. @expected_host is needed as a
@@ -817,7 +813,9 @@ camel_tcp_stream_ssl_new (CamelSession *session, const gchar *expected_host, gui
  * Returns: a new #CamelTcpStreamSSL stream not yet toggled into SSL mode
  **/
 CamelStream *
-camel_tcp_stream_ssl_new_raw (CamelSession *session, const gchar *expected_host, guint32 flags)
+camel_tcp_stream_ssl_new_raw (CamelSession *session,
+                              const gchar *expected_host,
+                              CamelTcpStreamSSLFlags flags)
 {
 	CamelTcpStreamSSL *stream;
 
diff --git a/camel/camel-tcp-stream-ssl.h b/camel/camel-tcp-stream-ssl.h
index 49c2b33..daf3586 100644
--- a/camel/camel-tcp-stream-ssl.h
+++ b/camel/camel-tcp-stream-ssl.h
@@ -29,6 +29,7 @@
 
 #ifdef CAMEL_HAVE_SSL
 
+#include <camel/camel-session.h>
 #include <camel/camel-tcp-stream-raw.h>
 
 /* Standard GObject macros */
@@ -50,14 +51,8 @@
 	(G_TYPE_INSTANCE_GET_CLASS \
 	((obj), CAMEL_TYPE_TCP_STREAM_SSL, CamelTcpStreamSSLClass))
 
-#define CAMEL_TCP_STREAM_SSL_ENABLE_SSL2   (1 << 0)
-#define CAMEL_TCP_STREAM_SSL_ENABLE_SSL3   (1 << 1)
-#define CAMEL_TCP_STREAM_SSL_ENABLE_TLS    (1 << 2)
-
 G_BEGIN_DECLS
 
-struct _CamelSession;
-
 typedef struct _CamelTcpStreamSSL CamelTcpStreamSSL;
 typedef struct _CamelTcpStreamSSLClass CamelTcpStreamSSLClass;
 typedef struct _CamelTcpStreamSSLPrivate CamelTcpStreamSSLPrivate;
@@ -71,14 +66,20 @@ struct _CamelTcpStreamSSLClass {
 	CamelTcpStreamRawClass parent_class;
 };
 
-GType camel_tcp_stream_ssl_get_type (void);
-
-/* public methods */
-CamelStream *camel_tcp_stream_ssl_new (struct _CamelSession *session, const gchar *expected_host, guint32 flags);
-
-CamelStream *camel_tcp_stream_ssl_new_raw (struct _CamelSession *session, const gchar *expected_host, guint32 flags);
-
-gint camel_tcp_stream_ssl_enable_ssl (CamelTcpStreamSSL *ssl);
+typedef enum {
+	CAMEL_TCP_STREAM_SSL_ENABLE_SSL2 = 1 << 0,
+	CAMEL_TCP_STREAM_SSL_ENABLE_SSL3 = 1 << 1,
+	CAMEL_TCP_STREAM_SSL_ENABLE_TLS  = 1 << 2
+} CamelTcpStreamSSLFlags;
+
+GType		camel_tcp_stream_ssl_get_type	(void);
+CamelStream *	camel_tcp_stream_ssl_new	(CamelSession *session,
+						 const gchar *expected_host,
+						 CamelTcpStreamSSLFlags flags);
+CamelStream *	camel_tcp_stream_ssl_new_raw	(CamelSession *session,
+						 const gchar *expected_host,
+						 CamelTcpStreamSSLFlags flags);
+gint		camel_tcp_stream_ssl_enable_ssl	(CamelTcpStreamSSL *ssl);
 
 G_END_DECLS
 
diff --git a/camel/camel-url.c b/camel/camel-url.c
index 8b351a5..34b52ec 100644
--- a/camel/camel-url.c
+++ b/camel/camel-url.c
@@ -327,7 +327,7 @@ camel_url_new (const gchar *url_string,
  * Returns: a string representing @url, which the caller must free
  **/
 gchar *
-camel_url_to_string (CamelURL *url, guint32 flags)
+camel_url_to_string (CamelURL *url, CamelURLFlags flags)
 {
 	GString *str;
 	gchar *return_result;
diff --git a/camel/camel-url.h b/camel/camel-url.h
index c593970..3f2fae6 100644
--- a/camel/camel-url.h
+++ b/camel/camel-url.h
@@ -48,15 +48,18 @@ typedef struct _CamelURL {
 	gchar  *fragment;
 } CamelURL;
 
-#define CAMEL_URL_HIDE_PASSWORD	(1 << 0)
-#define CAMEL_URL_HIDE_PARAMS	(1 << 1)
-#define CAMEL_URL_HIDE_AUTH	(1 << 2)
+typedef enum {
+	CAMEL_URL_HIDE_PASSWORD = 1 << 0,
+	CAMEL_URL_HIDE_PARAMS   = 1 << 1,
+	CAMEL_URL_HIDE_AUTH     = 1 << 2
+} CamelURLFlags;
 
-#define CAMEL_URL_HIDE_ALL (CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS | CAMEL_URL_HIDE_AUTH)
+#define CAMEL_URL_HIDE_ALL \
+	(CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS | CAMEL_URL_HIDE_AUTH)
 
 CamelURL *camel_url_new_with_base (CamelURL *base, const gchar *url_string);
 CamelURL *camel_url_new (const gchar *url_string, GError **error);
-gchar *camel_url_to_string (CamelURL *url, guint32 flags);
+gchar *camel_url_to_string (CamelURL *url, CamelURLFlags flags);
 void camel_url_free (CamelURL *url);
 
 gchar *camel_url_encode (const gchar *part, const gchar *escape_extra);
diff --git a/camel/camel-vee-store.c b/camel/camel-vee-store.c
index fd04cee..7220da1 100644
--- a/camel/camel-vee-store.c
+++ b/camel/camel-vee-store.c
@@ -156,7 +156,7 @@ vee_store_get_name (CamelService *service,
 static CamelFolder *
 vee_store_get_folder_sync (CamelStore *store,
                            const gchar *folder_name,
-                           guint32 flags,
+                           CamelStoreGetFolderFlags flags,
                            GCancellable *cancellable,
                            GError **error)
 {
@@ -199,7 +199,7 @@ vee_store_get_folder_sync (CamelStore *store,
 static CamelFolderInfo *
 vee_store_get_folder_info_sync (CamelStore *store,
                                 const gchar *top,
-                                guint32 flags,
+                                CamelStoreGetFolderInfoFlags flags,
                                 GCancellable *cancellable,
                                 GError **error)
 {
diff --git a/camel/providers/groupwise/camel-groupwise-folder.c b/camel/providers/groupwise/camel-groupwise-folder.c
index 622c57b..517fae2 100644
--- a/camel/providers/groupwise/camel-groupwise-folder.c
+++ b/camel/providers/groupwise/camel-groupwise-folder.c
@@ -649,8 +649,8 @@ sync_flags (CamelFolder *folder, GList *uids)
 static gboolean
 groupwise_set_message_flags (CamelFolder *folder,
                              const gchar *uid,
-                             guint32 flags,
-                             guint32 set)
+                             CamelMessageFlags flags,
+                             CamelMessageFlags set)
 {
 	CamelMessageInfo *info;
 	gint res;
diff --git a/camel/providers/groupwise/camel-groupwise-store.c b/camel/providers/groupwise/camel-groupwise-store.c
index 0a8d5ff..93d45f7 100644
--- a/camel/providers/groupwise/camel-groupwise-store.c
+++ b/camel/providers/groupwise/camel-groupwise-store.c
@@ -573,7 +573,7 @@ groupwise_get_folder_from_disk (CamelStore *store,
 static CamelFolder *
 groupwise_store_get_folder_sync (CamelStore *store,
                                  const gchar *folder_name,
-                                 guint32 flags,
+                                 CamelStoreGetFolderFlags flags,
                                  GCancellable *cancellable,
                                  GError **error)
 {
@@ -1137,7 +1137,7 @@ groupwise_get_folder_info_offline (CamelStore *store, const gchar *top,
 static CamelFolderInfo *
 groupwise_store_get_folder_info_sync (CamelStore *store,
                                       const gchar *top,
-                                      guint32 flags,
+                                      CamelStoreGetFolderInfoFlags flags,
                                       GCancellable *cancellable,
                                       GError **error)
 {
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index 6517e80..2dea47a 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -494,7 +494,7 @@ camel_imap_folder_selected (CamelFolder *folder,
 	CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
 	CamelImapSummary *imap_summary = CAMEL_IMAP_SUMMARY (folder->summary);
 	gulong exists = 0, validity = 0, val, uid;
-	guint32 perm_flags = 0;
+	CamelMessageFlags perm_flags = 0;
 	GData *fetch_data;
 	gint i, count;
 	gchar *resp, *old_uid;
@@ -4406,7 +4406,7 @@ parse_fetch_response (CamelImapFolder *imap_folder, gchar *response)
 		response++;
 
 		if (!g_ascii_strncasecmp (response, "FLAGS ", 6)) {
-			guint32 flags;
+			CamelMessageFlags flags;
 			gchar *custom_flags = NULL;
 
 			response += 6;
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index 1307cef..2b8ad4e 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -87,8 +87,8 @@ static void imap_forget_folder (CamelImapStore *imap_store, const gchar *folder_
 static void imap_set_server_level (CamelImapStore *store);
 
 static gboolean imap_can_refresh_folder (CamelStore *store, CamelFolderInfo *info, GError **error);
-static CamelFolder * imap_store_get_folder_sync (CamelStore *store, const gchar *folder_name, guint32 flags, GCancellable *cancellable, GError **error);
-static CamelFolderInfo * imap_store_get_folder_info_sync (CamelStore *store, const gchar *top, guint32 flags, GCancellable *cancellable, GError **error);
+static CamelFolder * imap_store_get_folder_sync (CamelStore *store, const gchar *folder_name, CamelStoreGetFolderFlags flags, GCancellable *cancellable, GError **error);
+static CamelFolderInfo * imap_store_get_folder_info_sync (CamelStore *store, const gchar *top, CamelStoreGetFolderInfoFlags flags, GCancellable *cancellable, GError **error);
 static CamelFolder * get_folder_offline (CamelStore *store, const gchar *folder_name, guint32 flags, GError **error);
 static CamelFolderInfo * get_folder_info_offline (CamelStore *store, const gchar *top, guint32 flags, GError **error);
 
@@ -1746,7 +1746,7 @@ get_folder_status (CamelImapStore *imap_store, const gchar *folder_name, const g
 static CamelFolder *
 imap_store_get_folder_sync (CamelStore *store,
                             const gchar *folder_name,
-                            guint32 flags,
+                            CamelStoreGetFolderFlags flags,
                             GCancellable *cancellable,
                             GError **error)
 {
@@ -2733,9 +2733,9 @@ static CamelSessionThreadOps refresh_ops = {
 static CamelFolderInfo *
 imap_store_get_folder_info_sync (CamelStore *store,
                                  const gchar *top,
-                                 guint32 flags,
-                                GCancellable *cancellable,
-                                GError **error)
+                                 CamelStoreGetFolderInfoFlags flags,
+                                 GCancellable *cancellable,
+                                 GError **error)
 {
 	CamelImapStore *imap_store = CAMEL_IMAP_STORE (store);
 	CamelFolderInfo *tree = NULL;
diff --git a/camel/providers/imap/camel-imap-utils.c b/camel/providers/imap/camel-imap-utils.c
index eee2e0b..e8a5adb 100644
--- a/camel/providers/imap/camel-imap-utils.c
+++ b/camel/providers/imap/camel-imap-utils.c
@@ -541,7 +541,7 @@ imap_create_flag_list (guint32 flags, CamelMessageInfo *info, guint32 permanent_
 }
 
 gboolean
-imap_parse_flag_list (gchar **flag_list_p, guint32 *flags_out, gchar **custom_flags_out)
+imap_parse_flag_list (gchar **flag_list_p, CamelMessageFlags *flags_out, gchar **custom_flags_out)
 {
 	gchar *flag_list = *flag_list_p;
 	guint32 flags = 0;
diff --git a/camel/providers/imap/camel-imap-utils.h b/camel/providers/imap/camel-imap-utils.h
index d81c205..7d7f89a 100644
--- a/camel/providers/imap/camel-imap-utils.h
+++ b/camel/providers/imap/camel-imap-utils.h
@@ -53,7 +53,7 @@ gboolean imap_parse_list_response  (CamelImapStore *store, const gchar *buf, gin
 gchar   **imap_parse_folder_name    (CamelImapStore *store, const gchar *folder_name);
 
 gchar    *imap_create_flag_list     (guint32 flags, CamelMessageInfo *info, guint32 permanent_flags);
-gboolean imap_parse_flag_list      (gchar **flag_list_p, guint32 *flags_out, gchar **custom_flags_out);
+gboolean imap_parse_flag_list      (gchar **flag_list_p, CamelMessageFlags *flags_out, gchar **custom_flags_out);
 
 enum { IMAP_STRING, IMAP_NSTRING, IMAP_ASTRING };
 
diff --git a/camel/providers/imapx/camel-imapx-store.c b/camel/providers/imapx/camel-imapx-store.c
index 957829d..f67372f 100644
--- a/camel/providers/imapx/camel-imapx-store.c
+++ b/camel/providers/imapx/camel-imapx-store.c
@@ -1122,7 +1122,7 @@ imapx_folder_is_subscribed (CamelStore *store,
 static CamelFolder *
 imapx_store_get_folder_sync (CamelStore *store,
                              const gchar *folder_name,
-                             guint32 flags,
+                             CamelStoreGetFolderFlags flags,
                              GCancellable *cancellable,
                              GError **error)
 {
@@ -1143,7 +1143,7 @@ imapx_store_get_folder_sync (CamelStore *store,
 static CamelFolderInfo *
 imapx_store_get_folder_info_sync (CamelStore *store,
                                   const gchar *top,
-                                  guint32 flags,
+                                  CamelStoreGetFolderInfoFlags flags,
                                   GCancellable *cancellable,
                                   GError **error)
 {
diff --git a/camel/providers/local/camel-local-store.c b/camel/providers/local/camel-local-store.c
index cff3340..2984b04 100644
--- a/camel/providers/local/camel-local-store.c
+++ b/camel/providers/local/camel-local-store.c
@@ -38,12 +38,12 @@
 #define d(x)
 
 static gboolean construct (CamelService *service, CamelSession *session, CamelProvider *provider, CamelURL *url, GError **error);
-static CamelFolder *local_store_get_folder_sync (CamelStore *store, const gchar *folder_name, guint32 flags, GCancellable *cancellable, GError **error);
+static CamelFolder *local_store_get_folder_sync (CamelStore *store, const gchar *folder_name, CamelStoreGetFolderFlags flags, GCancellable *cancellable, GError **error);
 static gchar *get_name (CamelService *service, gboolean brief);
 static CamelFolder *local_store_get_inbox_folder_sync (CamelStore *store, GCancellable *cancellable, GError **error);
 static CamelFolder *local_store_get_junk_folder_sync (CamelStore *store, GCancellable *cancellable, GError **error);
 static CamelFolder *local_store_get_trash_folder_sync (CamelStore *store, GCancellable *cancellable, GError **error);
-static CamelFolderInfo *local_store_get_folder_info_sync (CamelStore *store, const gchar *top, guint32 flags, GCancellable *cancellable, GError **error);
+static CamelFolderInfo *local_store_get_folder_info_sync (CamelStore *store, const gchar *top, CamelStoreGetFolderInfoFlags flags, GCancellable *cancellable, GError **error);
 static gboolean local_store_delete_folder_sync (CamelStore *store, const gchar *folder_name, GCancellable *cancellable, GError **error);
 static gboolean local_store_rename_folder_sync (CamelStore *store, const gchar *old, const gchar *new, GCancellable *cancellable, GError **error);
 static CamelFolderInfo *local_store_create_folder_sync (CamelStore *store, const gchar *parent_name, const gchar *folder_name, GCancellable *cancellable, GError **error);
@@ -134,7 +134,7 @@ camel_local_store_get_toplevel_dir (CamelLocalStore *store)
 static CamelFolder *
 local_store_get_folder_sync (CamelStore *store,
                              const gchar *folder_name,
-                             guint32 flags,
+                             CamelStoreGetFolderFlags flags,
                              GCancellable *cancellable,
                              GError **error)
 {
@@ -263,7 +263,7 @@ get_name (CamelService *service, gboolean brief)
 static CamelFolderInfo *
 local_store_get_folder_info_sync (CamelStore *store,
                                   const gchar *top,
-                                  guint32 flags,
+                                  CamelStoreGetFolderInfoFlags flags,
                                   GCancellable *cancellable,
                                   GError **error)
 {
diff --git a/camel/providers/local/camel-maildir-store.c b/camel/providers/local/camel-maildir-store.c
index f440850..ae4291d 100644
--- a/camel/providers/local/camel-maildir-store.c
+++ b/camel/providers/local/camel-maildir-store.c
@@ -296,7 +296,7 @@ maildir_store_compare_folder_name (gconstpointer a,
 static CamelFolder *
 maildir_store_get_folder_sync (CamelStore *store,
                                const gchar *folder_name,
-                               guint32 flags,
+                               CamelStoreGetFolderFlags flags,
                                GCancellable *cancellable,
                                GError **error)
 {
@@ -399,7 +399,7 @@ fail:
 static CamelFolderInfo *
 maildir_store_get_folder_info_sync (CamelStore *store,
                                     const gchar *top,
-                                    guint32 flags,
+                                    CamelStoreGetFolderInfoFlags flags,
                                     GCancellable *cancellable,
                                     GError **error)
 {
diff --git a/camel/providers/local/camel-mbox-store.c b/camel/providers/local/camel-mbox-store.c
index cb4a35f..e56f075 100644
--- a/camel/providers/local/camel-mbox-store.c
+++ b/camel/providers/local/camel-mbox-store.c
@@ -315,7 +315,7 @@ xrename (CamelStore *store, const gchar *old_name, const gchar *new_name, const
 static CamelFolder *
 mbox_store_get_folder_sync (CamelStore *store,
                             const gchar *folder_name,
-                            guint32 flags,
+                            CamelStoreGetFolderFlags flags,
                             GCancellable *cancellable,
                             GError **error)
 {
@@ -418,7 +418,7 @@ mbox_store_get_folder_sync (CamelStore *store,
 static CamelFolderInfo *
 mbox_store_get_folder_info_sync (CamelStore *store,
                                  const gchar *top,
-                                 guint32 flags,
+                                 CamelStoreGetFolderInfoFlags flags,
                                  GCancellable *cancellable,
                                  GError **error)
 {
diff --git a/camel/providers/local/camel-mh-store.c b/camel/providers/local/camel-mh-store.c
index 3dac19e..9291f90 100644
--- a/camel/providers/local/camel-mh-store.c
+++ b/camel/providers/local/camel-mh-store.c
@@ -435,7 +435,7 @@ mh_folder_store_construct (CamelService *service,
 static CamelFolder *
 mh_store_get_folder_sync (CamelStore *store,
                           const gchar *folder_name,
-                          guint32 flags,
+                          CamelStoreGetFolderFlags flags,
                           GCancellable *cancellable,
                           GError **error)
 {
@@ -510,7 +510,7 @@ mh_store_get_folder_sync (CamelStore *store,
 static CamelFolderInfo *
 mh_store_get_folder_info_sync (CamelStore *store,
                                const gchar *top,
-                               guint32 flags,
+                               CamelStoreGetFolderInfoFlags flags,
                                GCancellable *cancellable,
                                GError **error)
 {
diff --git a/camel/providers/local/camel-spool-store.c b/camel/providers/local/camel-spool-store.c
index 7b6028a..b30a21e 100644
--- a/camel/providers/local/camel-spool-store.c
+++ b/camel/providers/local/camel-spool-store.c
@@ -372,7 +372,7 @@ spool_store_free_folder_info (CamelStore *store,
 static CamelFolder *
 spool_store_get_folder_sync (CamelStore *store,
                              const gchar *folder_name,
-                             guint32 flags,
+                             CamelStoreGetFolderFlags flags,
                              GCancellable *cancellable,
                              GError **error)
 {
@@ -436,7 +436,7 @@ spool_store_get_folder_sync (CamelStore *store,
 static CamelFolderInfo *
 spool_store_get_folder_info_sync (CamelStore *store,
                                   const gchar *top,
-                                  guint32 flags,
+                                  CamelStoreGetFolderInfoFlags flags,
                                   GCancellable *cancellable,
                                   GError **error)
 {
diff --git a/camel/providers/nntp/camel-nntp-store.c b/camel/providers/nntp/camel-nntp-store.c
index db98c9a..0dd5edd 100644
--- a/camel/providers/nntp/camel-nntp-store.c
+++ b/camel/providers/nntp/camel-nntp-store.c
@@ -985,7 +985,7 @@ nntp_get_date (CamelNNTPStore *nntp_store,
 static CamelFolderInfo *
 nntp_store_get_folder_info_all (CamelNNTPStore *nntp_store,
                                 const gchar *top,
-                                guint32 flags,
+                                CamelStoreGetFolderInfoFlags flags,
                                 gboolean online,
                                 GCancellable *cancellable,
                                 GError **error)
@@ -1077,7 +1077,7 @@ nntp_store_get_folder_info_all (CamelNNTPStore *nntp_store,
 static CamelFolderInfo *
 nntp_get_folder_info (CamelStore *store,
                       const gchar *top,
-                      guint32 flags,
+                      CamelStoreGetFolderInfoFlags flags,
                       gboolean online,
                       GCancellable *cancellable,
                       GError **error)
@@ -1104,7 +1104,7 @@ nntp_get_folder_info (CamelStore *store,
 static CamelFolderInfo *
 nntp_get_folder_info_online (CamelStore *store,
                              const gchar *top,
-                             guint32 flags,
+                             CamelStoreGetFolderInfoFlags flags,
                              GCancellable *cancellable,
                              GError **error)
 {
@@ -1115,7 +1115,7 @@ nntp_get_folder_info_online (CamelStore *store,
 static CamelFolderInfo *
 nntp_get_folder_info_offline (CamelStore *store,
                               const gchar *top,
-                              guint32 flags,
+                              CamelStoreGetFolderInfoFlags flags,
                               GCancellable *cancellable,
                               GError **error)
 {
diff --git a/camel/providers/pop3/camel-pop3-folder.c b/camel/providers/pop3/camel-pop3-folder.c
index 6a133df..abcb299 100644
--- a/camel/providers/pop3/camel-pop3-folder.c
+++ b/camel/providers/pop3/camel-pop3-folder.c
@@ -285,8 +285,8 @@ pop3_folder_get_filename (CamelFolder *folder,
 static gboolean
 pop3_folder_set_message_flags (CamelFolder *folder,
                                const gchar *uid,
-                               guint32 flags,
-                               guint32 set)
+                               CamelMessageFlags flags,
+                               CamelMessageFlags set)
 {
 	CamelPOP3Folder *pop3_folder = CAMEL_POP3_FOLDER (folder);
 	CamelPOP3FolderInfo *fi;
diff --git a/camel/providers/pop3/camel-pop3-store.c b/camel/providers/pop3/camel-pop3-store.c
index 2c9c6b1..d8ef07d 100644
--- a/camel/providers/pop3/camel-pop3-store.c
+++ b/camel/providers/pop3/camel-pop3-store.c
@@ -705,7 +705,7 @@ pop3_store_can_refresh_folder (CamelStore *store,
 static CamelFolder *
 pop3_store_get_folder_sync (CamelStore *store,
                             const gchar *folder_name,
-                            guint32 flags,
+                            CamelStoreGetFolderFlags flags,
                             GCancellable *cancellable,
                             GError **error)
 {
@@ -723,7 +723,7 @@ pop3_store_get_folder_sync (CamelStore *store,
 static CamelFolderInfo *
 pop3_store_get_folder_info_sync (CamelStore *store,
                                  const gchar *top,
-                                 guint32 flags,
+                                 CamelStoreGetFolderInfoFlags flags,
                                  GCancellable *cancellable,
                                  GError **error)
 {
diff --git a/docs/reference/camel/camel-sections.txt b/docs/reference/camel/camel-sections.txt
index 1652a1b..c80f936 100644
--- a/docs/reference/camel/camel-sections.txt
+++ b/docs/reference/camel/camel-sections.txt
@@ -31,14 +31,13 @@ camel_address_get_type
 <TITLE>CamelKeyFile</TITLE>
 camel_block_t
 camel_key_t
+CamelBlockFileFlags
+CamelBlockFlags
 CamelBlockRoot
 CamelBlock
 CamelBlockFile
-CAMEL_BLOCK_FILE_SYNC
 CAMEL_BLOCK_SIZE
 CAMEL_BLOCK_SIZE_BITS
-CAMEL_BLOCK_DIRTY
-CAMEL_BLOCK_DETACHED
 camel_block_file_new
 camel_block_file_rename
 camel_block_file_delete
@@ -82,6 +81,7 @@ camel_key_file_get_type
 <SECTION>
 <FILE>camel-certdb</FILE>
 <TITLE>CamelCertDB</TITLE>
+CamelCertDBFlags
 CamelCertDB
 CamelCertTrust
 CamelCert
@@ -422,18 +422,12 @@ camel_filter_driver_get_type
 <SECTION>
 <FILE>camel-folder</FILE>
 <TITLE>CamelFolder</TITLE>
+CamelFolderFlags
 CamelFolder
 CAMEL_FOLDER_ERROR
 CamelFolderError
 CamelFolderChangeInfo
 CamelFolderQuotaInfo
-CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY
-CAMEL_FOLDER_HAS_SEARCH_CAPABILITY
-CAMEL_FOLDER_FILTER_RECENT
-CAMEL_FOLDER_HAS_BEEN_DELETED
-CAMEL_FOLDER_IS_TRASH
-CAMEL_FOLDER_IS_JUNK
-CAMEL_FOLDER_FILTER_JUNK
 camel_folder_set_lock_async
 camel_folder_get_parent_store
 camel_folder_get_name
@@ -1654,15 +1648,7 @@ CamelOperationPrivate
 <FILE>camel-provider</FILE>
 CamelProvider
 CamelProviderType
-CAMEL_PROVIDER_IS_LOCAL
-CAMEL_PROVIDER_IS_EXTERNAL
-CAMEL_PROVIDER_IS_SOURCE
-CAMEL_PROVIDER_IS_STORAGE
-CAMEL_PROVIDER_SUPPORTS_SSL
-CAMEL_PROVIDER_HAS_LICENSE
-CAMEL_PROVIDER_DISABLE_SENT_FOLDER
-CAMEL_PROVIDER_ALLOW_REAL_TRASH_FOLDER
-CAMEL_PROVIDER_ALLOW_REAL_JUNK_FOLDER
+CamelProviderFlags
 CAMEL_URL_PART_USER
 CAMEL_URL_PART_AUTH
 CAMEL_URL_PART_PASSWORD
@@ -1675,27 +1661,7 @@ CAMEL_URL_PART_HIDDEN
 CAMEL_PROVIDER_ALLOWS
 CAMEL_PROVIDER_NEEDS
 CAMEL_PROVIDER_HIDDEN
-CAMEL_URL_ALLOW_USER
-CAMEL_URL_ALLOW_AUTH
-CAMEL_URL_ALLOW_PASSWORD
-CAMEL_URL_ALLOW_HOST
-CAMEL_URL_ALLOW_PORT
-CAMEL_URL_ALLOW_PATH
-CAMEL_URL_NEED_USER
-CAMEL_URL_NEED_AUTH
-CAMEL_URL_NEED_PASSWORD
-CAMEL_URL_NEED_HOST
-CAMEL_URL_NEED_PORT
-CAMEL_URL_NEED_PATH
-CAMEL_URL_NEED_PATH_DIR
-CAMEL_URL_HIDDEN_USER
-CAMEL_URL_HIDDEN_AUTH
-CAMEL_URL_HIDDEN_PASSWORD
-CAMEL_URL_HIDDEN_HOST
-CAMEL_URL_HIDDEN_PORT
-CAMEL_URL_HIDDEN_PATH
-CAMEL_URL_FRAGMENT_IS_PATH
-CAMEL_URL_PATH_IS_ABSOLUTE
+CamelProviderURLFlags
 CAMEL_PROVIDER_IS_STORE_AND_TRANSPORT
 CamelProviderConfType
 CamelProviderConfEntry
@@ -2107,45 +2073,15 @@ camel_store_summary_get_type
 CamelStore
 CAMEL_STORE_ERROR
 CamelStoreError
-CamelFolderInfo
-CAMEL_FOLDER_NOSELECT
-CAMEL_FOLDER_NOINFERIORS
-CAMEL_FOLDER_CHILDREN
-CAMEL_FOLDER_NOCHILDREN
-CAMEL_FOLDER_SUBSCRIBED
-CAMEL_FOLDER_VIRTUAL
-CAMEL_FOLDER_SYSTEM
-CAMEL_FOLDER_VTRASH
-CAMEL_FOLDER_SHARED_TO_ME
-CAMEL_FOLDER_SHARED_BY_ME
 CAMEL_FOLDER_TYPE_MASK
 CAMEL_FOLDER_TYPE_BIT
-CAMEL_FOLDER_TYPE_NORMAL
-CAMEL_FOLDER_TYPE_INBOX
-CAMEL_FOLDER_TYPE_OUTBOX
-CAMEL_FOLDER_TYPE_TRASH
-CAMEL_FOLDER_TYPE_JUNK
-CAMEL_FOLDER_TYPE_SENT
-CAMEL_STORE_READ
-CAMEL_STORE_WRITE
-CAMEL_STORE_SUBSCRIPTIONS
-CAMEL_STORE_VTRASH
-CAMEL_STORE_FILTER_INBOX
-CAMEL_STORE_VJUNK
-CAMEL_STORE_PROXY
-CAMEL_STORE_IS_MIGRATING
-CAMEL_STORE_ASYNC
-CAMEL_STORE_REAL_JUNK_FOLDER
-CAMEL_STORE_FOLDER_CREATE
-CAMEL_STORE_FOLDER_EXCL
-CAMEL_STORE_FOLDER_BODY_INDEX
-CAMEL_STORE_FOLDER_PRIVATE
+CamelFolderInfoFlags
+CamelFolderInfo
+CamelStoreFlags
+CamelStorePermissionFlags
+CamelStoreGetFolderFlags
 CAMEL_STORE_FOLDER_CREATE_EXCL
-CAMEL_STORE_FOLDER_INFO_FAST
-CAMEL_STORE_FOLDER_INFO_RECURSIVE
-CAMEL_STORE_FOLDER_INFO_SUBSCRIBED
-CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL
-CAMEL_STORE_FOLDER_INFO_SUBSCRIPTION_LIST
+CamelStoreGetFolderInfoFlags
 camel_store_folder_created
 camel_store_folder_deleted
 camel_store_folder_opened
@@ -2413,9 +2349,7 @@ camel_proxy_error_quark
 <FILE>camel-tcp-stream-ssl</FILE>
 <TITLE>CamelTcpStreamSSL</TITLE>
 CamelTcpStreamSSL
-CAMEL_TCP_STREAM_SSL_ENABLE_SSL2
-CAMEL_TCP_STREAM_SSL_ENABLE_SSL3
-CAMEL_TCP_STREAM_SSL_ENABLE_TLS
+CamelTcpStreamSSLFlags
 camel_tcp_stream_ssl_new
 camel_tcp_stream_ssl_new_raw
 camel_tcp_stream_ssl_enable_ssl
@@ -2962,9 +2896,7 @@ camel_url_scanner_scan
 <SECTION>
 <FILE>camel-url</FILE>
 CamelURL
-CAMEL_URL_HIDE_PASSWORD
-CAMEL_URL_HIDE_PARAMS
-CAMEL_URL_HIDE_AUTH
+CamelURLFlags
 CAMEL_URL_HIDE_ALL
 camel_url_new_with_base
 camel_url_new
diff --git a/docs/reference/camel/tmpl/camel-block-file.sgml b/docs/reference/camel/tmpl/camel-block-file.sgml
index 334dfb8..02f72d6 100644
--- a/docs/reference/camel/tmpl/camel-block-file.sgml
+++ b/docs/reference/camel/tmpl/camel-block-file.sgml
@@ -32,6 +32,21 @@ CamelKeyFile
 </para>
 
 
+<!-- ##### ENUM CamelBlockFileFlags ##### -->
+<para>
+
+</para>
+
+ CAMEL_BLOCK_FILE_SYNC: 
+
+<!-- ##### ENUM CamelBlockFlags ##### -->
+<para>
+
+</para>
+
+ CAMEL_BLOCK_DIRTY: 
+ CAMEL_BLOCK_DETACHED: 
+
 <!-- ##### STRUCT CamelBlockRoot ##### -->
 <para>
 
@@ -62,13 +77,6 @@ CamelKeyFile
 </para>
 
 
-<!-- ##### MACRO CAMEL_BLOCK_FILE_SYNC ##### -->
-<para>
-
-</para>
-
-
-
 <!-- ##### MACRO CAMEL_BLOCK_SIZE ##### -->
 <para>
 
@@ -83,20 +91,6 @@ CamelKeyFile
 
 
 
-<!-- ##### MACRO CAMEL_BLOCK_DIRTY ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_BLOCK_DETACHED ##### -->
-<para>
-
-</para>
-
-
-
 <!-- ##### FUNCTION camel_block_file_new ##### -->
 <para>
 
diff --git a/docs/reference/camel/tmpl/camel-certdb.sgml b/docs/reference/camel/tmpl/camel-certdb.sgml
index 3f9a2ed..536bce8 100644
--- a/docs/reference/camel/tmpl/camel-certdb.sgml
+++ b/docs/reference/camel/tmpl/camel-certdb.sgml
@@ -20,6 +20,13 @@ CamelCertDB
 <!-- ##### SECTION Image ##### -->
 
 
+<!-- ##### ENUM CamelCertDBFlags ##### -->
+<para>
+
+</para>
+
+ CAMEL_CERTDB_DIRTY: 
+
 <!-- ##### STRUCT CamelCertDB ##### -->
 <para>
 
diff --git a/docs/reference/camel/tmpl/camel-folder.sgml b/docs/reference/camel/tmpl/camel-folder.sgml
index 1e7a868..bd7c5ba 100644
--- a/docs/reference/camel/tmpl/camel-folder.sgml
+++ b/docs/reference/camel/tmpl/camel-folder.sgml
@@ -20,6 +20,19 @@ CamelFolder
 <!-- ##### SECTION Image ##### -->
 
 
+<!-- ##### ENUM CamelFolderFlags ##### -->
+<para>
+
+</para>
+
+ CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY: 
+ CAMEL_FOLDER_HAS_SEARCH_CAPABILITY: 
+ CAMEL_FOLDER_FILTER_RECENT: 
+ CAMEL_FOLDER_HAS_BEEN_DELETED: 
+ CAMEL_FOLDER_IS_TRASH: 
+ CAMEL_FOLDER_IS_JUNK: 
+ CAMEL_FOLDER_FILTER_JUNK: 
+
 <!-- ##### STRUCT CamelFolder ##### -->
 <para>
 
@@ -111,55 +124,6 @@ CamelFolder
 @total: 
 @next: 
 
-<!-- ##### MACRO CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_FOLDER_HAS_SEARCH_CAPABILITY ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_FOLDER_FILTER_RECENT ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_FOLDER_HAS_BEEN_DELETED ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_FOLDER_IS_TRASH ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_FOLDER_IS_JUNK ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_FOLDER_FILTER_JUNK ##### -->
-<para>
-
-</para>
-
-
-
 <!-- ##### FUNCTION camel_folder_set_lock_async ##### -->
 <para>
 
diff --git a/docs/reference/camel/tmpl/camel-provider.sgml b/docs/reference/camel/tmpl/camel-provider.sgml
index 7c071c9..7a0962c 100644
--- a/docs/reference/camel/tmpl/camel-provider.sgml
+++ b/docs/reference/camel/tmpl/camel-provider.sgml
@@ -52,68 +52,21 @@ camel-provider
 @CAMEL_PROVIDER_TRANSPORT: 
 @CAMEL_NUM_PROVIDER_TYPES: 
 
-<!-- ##### MACRO CAMEL_PROVIDER_IS_LOCAL ##### -->
+<!-- ##### ENUM CamelProviderFlags ##### -->
 <para>
 
 </para>
 
-
-
-<!-- ##### MACRO CAMEL_PROVIDER_IS_EXTERNAL ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_PROVIDER_IS_SOURCE ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_PROVIDER_IS_STORAGE ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_PROVIDER_SUPPORTS_SSL ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_PROVIDER_HAS_LICENSE ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_PROVIDER_DISABLE_SENT_FOLDER ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_PROVIDER_ALLOW_REAL_TRASH_FOLDER ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_PROVIDER_ALLOW_REAL_JUNK_FOLDER ##### -->
-<para>
-
-</para>
-
-
+ CAMEL_PROVIDER_IS_REMOTE: 
+ CAMEL_PROVIDER_IS_LOCAL: 
+ CAMEL_PROVIDER_IS_EXTERNAL: 
+ CAMEL_PROVIDER_IS_SOURCE: 
+ CAMEL_PROVIDER_IS_STORAGE: 
+ CAMEL_PROVIDER_SUPPORTS_SSL: 
+ CAMEL_PROVIDER_HAS_LICENSE: 
+ CAMEL_PROVIDER_DISABLE_SENT_FOLDER: 
+ CAMEL_PROVIDER_ALLOW_REAL_TRASH_FOLDER: 
+ CAMEL_PROVIDER_ALLOW_REAL_JUNK_FOLDER: 
 
 <!-- ##### MACRO CAMEL_URL_PART_USER ##### -->
 <para>
@@ -205,152 +158,32 @@ camel-provider
 @flags: 
 
 
-<!-- ##### MACRO CAMEL_URL_ALLOW_USER ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_URL_ALLOW_AUTH ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_URL_ALLOW_PASSWORD ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_URL_ALLOW_HOST ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_URL_ALLOW_PORT ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_URL_ALLOW_PATH ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_URL_NEED_USER ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_URL_NEED_AUTH ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_URL_NEED_PASSWORD ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_URL_NEED_HOST ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_URL_NEED_PORT ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_URL_NEED_PATH ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_URL_NEED_PATH_DIR ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_URL_HIDDEN_USER ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_URL_HIDDEN_AUTH ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_URL_HIDDEN_PASSWORD ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_URL_HIDDEN_HOST ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_URL_HIDDEN_PORT ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_URL_HIDDEN_PATH ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_URL_FRAGMENT_IS_PATH ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_URL_PATH_IS_ABSOLUTE ##### -->
-<para>
-
-</para>
-
-
+<!-- ##### ENUM CamelProviderURLFlags ##### -->
+<para>
+
+</para>
+
+ CAMEL_URL_ALLOW_USER: 
+ CAMEL_URL_ALLOW_AUTH: 
+ CAMEL_URL_ALLOW_PASSWORD: 
+ CAMEL_URL_ALLOW_HOST: 
+ CAMEL_URL_ALLOW_PORT: 
+ CAMEL_URL_ALLOW_PATH: 
+ CAMEL_URL_NEED_USER: 
+ CAMEL_URL_NEED_AUTH: 
+ CAMEL_URL_NEED_PASSWORD: 
+ CAMEL_URL_NEED_HOST: 
+ CAMEL_URL_NEED_PORT: 
+ CAMEL_URL_NEED_PATH: 
+ CAMEL_URL_NEED_PATH_DIR: 
+ CAMEL_URL_HIDDEN_USER: 
+ CAMEL_URL_HIDDEN_AUTH: 
+ CAMEL_URL_HIDDEN_PASSWORD: 
+ CAMEL_URL_HIDDEN_HOST: 
+ CAMEL_URL_HIDDEN_PORT: 
+ CAMEL_URL_HIDDEN_PATH: 
+ CAMEL_URL_FRAGMENT_IS_PATH: 
+ CAMEL_URL_PATH_IS_ABSOLUTE: 
 
 <!-- ##### MACRO CAMEL_PROVIDER_IS_STORE_AND_TRANSPORT ##### -->
 <para>
diff --git a/docs/reference/camel/tmpl/camel-store.sgml b/docs/reference/camel/tmpl/camel-store.sgml
index e202298..744d0bd 100644
--- a/docs/reference/camel/tmpl/camel-store.sgml
+++ b/docs/reference/camel/tmpl/camel-store.sgml
@@ -90,91 +90,6 @@ CamelStore
 @CAMEL_STORE_ERROR_INVALID: 
 @CAMEL_STORE_ERROR_NO_FOLDER: 
 
-<!-- ##### STRUCT CamelFolderInfo ##### -->
-<para>
-
-</para>
-
- next: 
- parent: 
- child: 
- uri: 
- name: 
- full_name: 
- flags: 
- unread: 
- total: 
-
-<!-- ##### MACRO CAMEL_FOLDER_NOSELECT ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_FOLDER_NOINFERIORS ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_FOLDER_CHILDREN ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_FOLDER_NOCHILDREN ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_FOLDER_SUBSCRIBED ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_FOLDER_VIRTUAL ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_FOLDER_SYSTEM ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_FOLDER_VTRASH ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_FOLDER_SHARED_TO_ME ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_FOLDER_SHARED_BY_ME ##### -->
-<para>
-
-</para>
-
-
-
 <!-- ##### MACRO CAMEL_FOLDER_TYPE_MASK ##### -->
 <para>
 
@@ -189,145 +104,74 @@ CamelStore
 
 
 
-<!-- ##### MACRO CAMEL_FOLDER_TYPE_NORMAL ##### -->
+<!-- ##### ENUM CamelFolderInfoFlags ##### -->
 <para>
 
 </para>
 
+ CAMEL_FOLDER_NOSELECT: 
+ CAMEL_FOLDER_NOINFERIORS: 
+ CAMEL_FOLDER_CHILDREN: 
+ CAMEL_FOLDER_NOCHILDREN: 
+ CAMEL_FOLDER_SUBSCRIBED: 
+ CAMEL_FOLDER_VIRTUAL: 
+ CAMEL_FOLDER_SYSTEM: 
+ CAMEL_FOLDER_VTRASH: 
+ CAMEL_FOLDER_SHARED_TO_ME: 
+ CAMEL_FOLDER_SHARED_BY_ME: 
+ CAMEL_FOLDER_TYPE_NORMAL: 
+ CAMEL_FOLDER_TYPE_INBOX: 
+ CAMEL_FOLDER_TYPE_OUTBOX: 
+ CAMEL_FOLDER_TYPE_TRASH: 
+ CAMEL_FOLDER_TYPE_JUNK: 
+ CAMEL_FOLDER_TYPE_SENT: 
 
-
-<!-- ##### MACRO CAMEL_FOLDER_TYPE_INBOX ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_FOLDER_TYPE_OUTBOX ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_FOLDER_TYPE_TRASH ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_FOLDER_TYPE_JUNK ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_FOLDER_TYPE_SENT ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_STORE_READ ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_STORE_WRITE ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_STORE_SUBSCRIPTIONS ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_STORE_VTRASH ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_STORE_FILTER_INBOX ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_STORE_VJUNK ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_STORE_PROXY ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_STORE_IS_MIGRATING ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_STORE_ASYNC ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_STORE_REAL_JUNK_FOLDER ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_STORE_FOLDER_CREATE ##### -->
+<!-- ##### STRUCT CamelFolderInfo ##### -->
 <para>
 
 </para>
 
+ next: 
+ parent: 
+ child: 
+ uri: 
+ name: 
+ full_name: 
+ flags: 
+ unread: 
+ total: 
 
-
-<!-- ##### MACRO CAMEL_STORE_FOLDER_EXCL ##### -->
+<!-- ##### ENUM CamelStoreFlags ##### -->
 <para>
 
 </para>
 
+ CAMEL_STORE_SUBSCRIPTIONS: 
+ CAMEL_STORE_VTRASH: 
+ CAMEL_STORE_FILTER_INBOX: 
+ CAMEL_STORE_VJUNK: 
+ CAMEL_STORE_PROXY: 
+ CAMEL_STORE_IS_MIGRATING: 
+ CAMEL_STORE_ASYNC: 
+ CAMEL_STORE_REAL_JUNK_FOLDER: 
 
-
-<!-- ##### MACRO CAMEL_STORE_FOLDER_BODY_INDEX ##### -->
+<!-- ##### ENUM CamelStorePermissionFlags ##### -->
 <para>
 
 </para>
 
+ CAMEL_STORE_READ: 
+ CAMEL_STORE_WRITE: 
 
-
-<!-- ##### MACRO CAMEL_STORE_FOLDER_PRIVATE ##### -->
+<!-- ##### ENUM CamelStoreGetFolderFlags ##### -->
 <para>
 
 </para>
 
-
+ CAMEL_STORE_FOLDER_CREATE: 
+ CAMEL_STORE_FOLDER_EXCL: 
+ CAMEL_STORE_FOLDER_BODY_INDEX: 
+ CAMEL_STORE_FOLDER_PRIVATE: 
 
 <!-- ##### MACRO CAMEL_STORE_FOLDER_CREATE_EXCL ##### -->
 <para>
@@ -336,40 +180,16 @@ CamelStore
 
 
 
-<!-- ##### MACRO CAMEL_STORE_FOLDER_INFO_FAST ##### -->
+<!-- ##### ENUM CamelStoreGetFolderInfoFlags ##### -->
 <para>
 
 </para>
 
-
-
-<!-- ##### MACRO CAMEL_STORE_FOLDER_INFO_RECURSIVE ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_STORE_FOLDER_INFO_SUBSCRIBED ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_STORE_FOLDER_INFO_SUBSCRIPTION_LIST ##### -->
-<para>
-
-</para>
-
-
+ CAMEL_STORE_FOLDER_INFO_FAST: 
+ CAMEL_STORE_FOLDER_INFO_RECURSIVE: 
+ CAMEL_STORE_FOLDER_INFO_SUBSCRIBED: 
+ CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL: 
+ CAMEL_STORE_FOLDER_INFO_SUBSCRIPTION_LIST: 
 
 <!-- ##### FUNCTION camel_store_folder_created ##### -->
 <para>
diff --git a/docs/reference/camel/tmpl/camel-tcp-stream-ssl.sgml b/docs/reference/camel/tmpl/camel-tcp-stream-ssl.sgml
index 57f53cd..5f8945e 100644
--- a/docs/reference/camel/tmpl/camel-tcp-stream-ssl.sgml
+++ b/docs/reference/camel/tmpl/camel-tcp-stream-ssl.sgml
@@ -28,26 +28,14 @@ CamelTcpStreamSSL
 @parent_object: 
 @priv: 
 
-<!-- ##### MACRO CAMEL_TCP_STREAM_SSL_ENABLE_SSL2 ##### -->
+<!-- ##### ENUM CamelTcpStreamSSLFlags ##### -->
 <para>
 
 </para>
 
-
-
-<!-- ##### MACRO CAMEL_TCP_STREAM_SSL_ENABLE_SSL3 ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_TCP_STREAM_SSL_ENABLE_TLS ##### -->
-<para>
-
-</para>
-
-
+ CAMEL_TCP_STREAM_SSL_ENABLE_SSL2: 
+ CAMEL_TCP_STREAM_SSL_ENABLE_SSL3: 
+ CAMEL_TCP_STREAM_SSL_ENABLE_TLS: 
 
 <!-- ##### FUNCTION camel_tcp_stream_ssl_new ##### -->
 <para>
diff --git a/docs/reference/camel/tmpl/camel-unused.sgml b/docs/reference/camel/tmpl/camel-unused.sgml
index cadb274..dd83b6c 100644
--- a/docs/reference/camel/tmpl/camel-unused.sgml
+++ b/docs/reference/camel/tmpl/camel-unused.sgml
@@ -2288,6 +2288,24 @@ streams
 </para>
 
 
+<!-- ##### MACRO CAMEL_BLOCK_DETACHED ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_BLOCK_DIRTY ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_BLOCK_FILE_SYNC ##### -->
+<para>
+
+</para>
+
+
 <!-- ##### MACRO CAMEL_CHECK_CAST ##### -->
 <para>
 
@@ -2328,6 +2346,144 @@ streams
 </para>
 
 
+<!-- ##### MACRO CAMEL_FOLDER_CHILDREN ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_FOLDER_FILTER_JUNK ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_FOLDER_FILTER_RECENT ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_FOLDER_HAS_BEEN_DELETED ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_FOLDER_HAS_SEARCH_CAPABILITY ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_FOLDER_IS_JUNK ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_FOLDER_IS_TRASH ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_FOLDER_NOCHILDREN ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_FOLDER_NOINFERIORS ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_FOLDER_NOSELECT ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_FOLDER_SHARED_BY_ME ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_FOLDER_SHARED_TO_ME ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_FOLDER_SUBSCRIBED ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_FOLDER_SYSTEM ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_FOLDER_TYPE_INBOX ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_FOLDER_TYPE_JUNK ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_FOLDER_TYPE_NORMAL ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_FOLDER_TYPE_OUTBOX ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_FOLDER_TYPE_SENT ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_FOLDER_TYPE_TRASH ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_FOLDER_VIRTUAL ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_FOLDER_VTRASH ##### -->
+<para>
+
+</para>
+
+
 <!-- ##### MACRO CAMEL_GROUPWISE_FOLDER_LOCK ##### -->
 <para>
 
@@ -2618,6 +2774,60 @@ streams
 </para>
 
 
+<!-- ##### MACRO CAMEL_PROVIDER_ALLOW_REAL_JUNK_FOLDER ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_PROVIDER_ALLOW_REAL_TRASH_FOLDER ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_PROVIDER_DISABLE_SENT_FOLDER ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_PROVIDER_HAS_LICENSE ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_PROVIDER_IS_EXTERNAL ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_PROVIDER_IS_LOCAL ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_PROVIDER_IS_SOURCE ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_PROVIDER_IS_STORAGE ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_PROVIDER_SUPPORTS_SSL ##### -->
+<para>
+
+</para>
+
+
 <!-- ##### MACRO CAMEL_SERVICE_AUTH ##### -->
 <para>
 
@@ -2678,6 +2888,282 @@ streams
 </para>
 
 
+<!-- ##### MACRO CAMEL_STORE_ASYNC ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_STORE_FILTER_INBOX ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_STORE_FOLDER_BODY_INDEX ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_STORE_FOLDER_CREATE ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_STORE_FOLDER_EXCL ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_STORE_FOLDER_INFO_FAST ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_STORE_FOLDER_INFO_RECURSIVE ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_STORE_FOLDER_INFO_SUBSCRIBED ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_STORE_FOLDER_INFO_SUBSCRIPTION_LIST ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_STORE_FOLDER_PRIVATE ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_STORE_IS_MIGRATING ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_STORE_PROXY ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_STORE_READ ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_STORE_REAL_JUNK_FOLDER ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_STORE_SUBSCRIPTIONS ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_STORE_VJUNK ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_STORE_VTRASH ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_STORE_WRITE ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_TCP_STREAM_SSL_ENABLE_SSL2 ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_TCP_STREAM_SSL_ENABLE_SSL3 ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_TCP_STREAM_SSL_ENABLE_TLS ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_URL_ALLOW_AUTH ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_URL_ALLOW_HOST ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_URL_ALLOW_PASSWORD ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_URL_ALLOW_PATH ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_URL_ALLOW_PORT ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_URL_ALLOW_USER ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_URL_FRAGMENT_IS_PATH ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_URL_HIDDEN_AUTH ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_URL_HIDDEN_HOST ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_URL_HIDDEN_PASSWORD ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_URL_HIDDEN_PATH ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_URL_HIDDEN_PORT ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_URL_HIDDEN_USER ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_URL_HIDE_AUTH ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_URL_HIDE_PARAMS ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_URL_HIDE_PASSWORD ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_URL_NEED_AUTH ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_URL_NEED_HOST ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_URL_NEED_PASSWORD ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_URL_NEED_PATH ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_URL_NEED_PATH_DIR ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_URL_NEED_PORT ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_URL_NEED_USER ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO CAMEL_URL_PATH_IS_ABSOLUTE ##### -->
+<para>
+
+</para>
+
+
 <!-- ##### STRUCT CamelArg ##### -->
 <para>
 
diff --git a/docs/reference/camel/tmpl/camel-url.sgml b/docs/reference/camel/tmpl/camel-url.sgml
index f69c781..e9cbb52 100644
--- a/docs/reference/camel/tmpl/camel-url.sgml
+++ b/docs/reference/camel/tmpl/camel-url.sgml
@@ -36,26 +36,14 @@ camel-url
 @query: 
 @fragment: 
 
-<!-- ##### MACRO CAMEL_URL_HIDE_PASSWORD ##### -->
+<!-- ##### ENUM CamelURLFlags ##### -->
 <para>
 
 </para>
 
-
-
-<!-- ##### MACRO CAMEL_URL_HIDE_PARAMS ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO CAMEL_URL_HIDE_AUTH ##### -->
-<para>
-
-</para>
-
-
+ CAMEL_URL_HIDE_PASSWORD: 
+ CAMEL_URL_HIDE_PARAMS: 
+ CAMEL_URL_HIDE_AUTH: 
 
 <!-- ##### MACRO CAMEL_URL_HIDE_ALL ##### -->
 <para>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]