[evolution-data-server] Generate GTypes for various Camel enums.



commit 3e0c1fc668e1d44029d04506ef49a0d852710491
Author: Matthew Barnes <mbarnes redhat com>
Date:   Tue Jul 19 12:53:47 2011 -0500

    Generate GTypes for various Camel enums.
    
    Kind of picking and choosing at this point.  Some enum types must be
    renamed to use CamelCase before they can be added to camel-enums.h,
    other enum types don't even have a type name.

 camel/Makefile.am                                  |   15 +-
 camel/camel-enums.h                                |  302 ++++++++++++++++++++
 camel/camel-folder.h                               |   11 +-
 camel/camel-junk-filter.h                          |    7 +-
 camel/camel-mime-filter-basic.h                    |   10 +-
 camel/camel-mime-filter-crlf.h                     |   11 +-
 camel/camel-mime-filter-gzip.h                     |    6 +-
 camel/camel-mime-filter-yenc.h                     |    6 +-
 camel/camel-mime-utils.h                           |   13 +-
 camel/camel-multipart-signed.h                     |    9 -
 camel/camel-provider.h                             |   53 +----
 camel/camel-sasl-anonymous.h                       |    7 +-
 camel/camel-service.h                              |    8 +-
 camel/camel-session.h                              |    7 +-
 camel/camel-store-summary.h                        |   21 +--
 camel/camel-store.h                                |  106 +-------
 camel/camel-stream-vfs.h                           |   18 +--
 camel/camel-tcp-stream-ssl.h                       |    7 +-
 camel/camel.h                                      |    2 +
 camel/glib-gen.mak                                 |   42 +++
 docs/reference/camel/Makefile.am                   |    1 +
 .../camel/tmpl/camel-mime-filter-basic.sgml        |    1 +
 glib-gen.mak                                       |   14 +-
 23 files changed, 384 insertions(+), 293 deletions(-)
---
diff --git a/camel/Makefile.am b/camel/Makefile.am
index f5b6ad3..53b602e 100644
--- a/camel/Makefile.am
+++ b/camel/Makefile.am
@@ -31,6 +31,13 @@ camellibexec_PROGRAMS =	$(LOCK_HELPER) camel-index-control-1.2
 
 lib_LTLIBRARIES = libcamel-1.2.la libcamel-provider-1.2.la
 
+include $(top_srcdir)/camel/glib-gen.mak
+glib_enum_headers=camel-enums.h
+glib_enum_define=CAMEL
+glib_enum_prefix=camel
+
+ENUM_GENERATED = camel-enumtypes.h camel-enumtypes.c
+
 libcamel_provider_1_2_la_CPPFLAGS = \
 	$(AM_CPPFLAGS)						\
 	-I$(top_srcdir) 					\
@@ -158,6 +165,7 @@ libcamel_1_2_la_CPPFLAGS = \
 	$(CAMEL_CFLAGS)
 
 libcamel_1_2_la_SOURCES = 			\
+	$(ENUM_GENERATED)			\
 	$(MARSHAL_GENERATED)			\
 	camel-address.c				\
 	camel-block-file.c			\
@@ -236,6 +244,8 @@ libcamelinclude_HEADERS =			\
 	camel-data-wrapper.h			\
 	camel-db.h				\
 	camel-debug.h				\
+	camel-enums.h				\
+	camel-enumtypes.h			\
 	camel-file-utils.h			\
 	camel-iconv.h				\
 	camel-index.h				\
@@ -388,7 +398,10 @@ noinst_HEADERS =				\
 	camel-charset-map-private.h		\
 	camel-win32.h				
 
-BUILT_SOURCES = camel-mime-tables.c $(MARSHAL_GENERATED)
+BUILT_SOURCES =					\
+	camel-mime-tables.c			\
+	$(ENUM_GENERATED)			\
+	$(MARSHAL_GENERATED)
 
 EXTRA_DIST =					\
 	$(pkgconfig_in_files)	 		\
diff --git a/camel/camel-enums.h b/camel/camel-enums.h
new file mode 100644
index 0000000..b082fe8
--- /dev/null
+++ b/camel/camel-enums.h
@@ -0,0 +1,302 @@
+/*
+ * camel-enums.h
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+#if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
+#error "Only <camel/camel.h> can be included directly."
+#endif
+
+#ifndef CAMEL_ENUMS_H
+#define CAMEL_ENUMS_H
+
+typedef enum { /*< flags >*/
+	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;
+
+#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 { /*< flags >*/
+	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;
+
+#define CAMEL_FOLDER_TYPE_MASK (63 << CAMEL_FOLDER_TYPE_BIT)
+
+typedef enum {
+	CAMEL_JUNK_STATUS_INCONCLUSIVE,
+	CAMEL_JUNK_STATUS_MESSAGE_IS_JUNK,
+	CAMEL_JUNK_STATUS_MESSAGE_IS_NOT_JUNK
+} CamelJunkStatus;
+
+typedef enum {
+	CAMEL_MIME_FILTER_BASIC_INVALID,
+	CAMEL_MIME_FILTER_BASIC_BASE64_ENC,
+	CAMEL_MIME_FILTER_BASIC_BASE64_DEC,
+	CAMEL_MIME_FILTER_BASIC_QP_ENC,
+	CAMEL_MIME_FILTER_BASIC_QP_DEC,
+	CAMEL_MIME_FILTER_BASIC_UU_ENC,
+	CAMEL_MIME_FILTER_BASIC_UU_DEC
+} CamelMimeFilterBasicType;
+
+typedef enum {
+	CAMEL_MIME_FILTER_CRLF_ENCODE,
+	CAMEL_MIME_FILTER_CRLF_DECODE
+} CamelMimeFilterCRLFDirection;
+
+typedef enum {
+	CAMEL_MIME_FILTER_CRLF_MODE_CRLF_DOTS,
+	CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY
+} CamelMimeFilterCRLFMode;
+
+typedef enum {
+	CAMEL_MIME_FILTER_GZIP_MODE_ZIP,
+	CAMEL_MIME_FILTER_GZIP_MODE_UNZIP
+} CamelMimeFilterGZipMode;
+
+typedef enum {
+	CAMEL_MIME_FILTER_YENC_DIRECTION_ENCODE,
+	CAMEL_MIME_FILTER_YENC_DIRECTION_DECODE
+} CamelMimeFilterYencDirection;
+
+typedef enum {
+	CAMEL_PROVIDER_CONF_END,
+	CAMEL_PROVIDER_CONF_SECTION_START,
+	CAMEL_PROVIDER_CONF_SECTION_END,
+	CAMEL_PROVIDER_CONF_CHECKBOX,
+	CAMEL_PROVIDER_CONF_CHECKSPIN,
+	CAMEL_PROVIDER_CONF_ENTRY,
+	CAMEL_PROVIDER_CONF_LABEL,
+	CAMEL_PROVIDER_CONF_HIDDEN,
+	CAMEL_PROVIDER_CONF_OPTIONS
+} CamelProviderConfType;
+
+/* 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.
+ */
+typedef enum { /*< flags >*/
+	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;
+
+typedef enum {
+	CAMEL_PROVIDER_STORE,
+	CAMEL_PROVIDER_TRANSPORT,
+	CAMEL_NUM_PROVIDER_TYPES  /*< skip >*/
+} CamelProviderType;
+
+typedef enum {
+	CAMEL_SASL_ANON_TRACE_EMAIL,
+	CAMEL_SASL_ANON_TRACE_OPAQUE,
+	CAMEL_SASL_ANON_TRACE_EMPTY
+} CamelSaslAnonTraceType;
+
+typedef enum {
+	CAMEL_SERVICE_DISCONNECTED,
+	CAMEL_SERVICE_CONNECTING,
+	CAMEL_SERVICE_CONNECTED,
+	CAMEL_SERVICE_DISCONNECTING
+} CamelServiceConnectionStatus;
+
+typedef enum {
+	CAMEL_SESSION_ALERT_INFO,
+	CAMEL_SESSION_ALERT_WARNING,
+	CAMEL_SESSION_ALERT_ERROR
+} CamelSessionAlertType;
+
+typedef enum { /*< flags >*/
+	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;
+
+/**
+ * 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 { /*< flags >*/
+	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;
+
+/* FIXME: this needs to track the CAMEL_FOLDER_* flags in camel-store.h */
+typedef enum { /*< flags >*/
+	CAMEL_STORE_INFO_FOLDER_NOSELECT      = 1 << 0,
+	CAMEL_STORE_INFO_FOLDER_NOINFERIORS   = 1 << 1,
+	CAMEL_STORE_INFO_FOLDER_CHILDREN      = 1 << 2,
+	CAMEL_STORE_INFO_FOLDER_NOCHILDREN    = 1 << 3,
+	CAMEL_STORE_INFO_FOLDER_SUBSCRIBED    = 1 << 4,
+	CAMEL_STORE_INFO_FOLDER_VIRTUAL       = 1 << 5,
+	CAMEL_STORE_INFO_FOLDER_SYSTEM        = 1 << 6,
+	CAMEL_STORE_INFO_FOLDER_VTRASH        = 1 << 7,
+	CAMEL_STORE_INFO_FOLDER_SHARED_BY_ME  = 1 << 8,
+	CAMEL_STORE_INFO_FOLDER_SHARED_TO_ME  = 1 << 9,
+
+	/* not in camle-store.h yet */
+	CAMEL_STORE_INFO_FOLDER_READONLY      = 1 << 13,
+	CAMEL_STORE_INFO_FOLDER_CHECK_FOR_NEW = 1 << 14,
+
+	CAMEL_STORE_INFO_FOLDER_FLAGGED       = 1 << 31
+} CamelStoreInfoFlags;
+
+typedef enum { /*< flags >*/
+	CAMEL_STORE_READ  = 1 << 0,
+	CAMEL_STORE_WRITE = 1 << 1
+} CamelStorePermissionFlags;
+
+typedef enum { /*< flags >*/
+	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;
+
+/* Note: If you change this, make sure you change the
+ *       'encodings' array in camel-mime-part.c. */
+typedef enum {
+	CAMEL_TRANSFER_ENCODING_DEFAULT,
+	CAMEL_TRANSFER_ENCODING_7BIT,
+	CAMEL_TRANSFER_ENCODING_8BIT,
+	CAMEL_TRANSFER_ENCODING_BASE64,
+	CAMEL_TRANSFER_ENCODING_QUOTEDPRINTABLE,
+	CAMEL_TRANSFER_ENCODING_BINARY,
+	CAMEL_TRANSFER_ENCODING_UUENCODE,
+	CAMEL_TRANSFER_NUM_ENCODINGS
+} CamelTransferEncoding;
+
+/**
+ * CamelStreamVFSOpenMethod:
+ * CAMEL_STREAM_VFS_CREATE:
+ *	Writable, creates new file or replaces old file.
+ * CAMEL_STREAM_VFS_APPEND:
+ *	Writable, creates new file or appends at the end of the old file.
+ * CAMEL_STREAM_VFS_READ:
+ *	Readable, opens existing file for reading.
+ *
+ * Since: 2.24
+ **/
+typedef enum {
+	CAMEL_STREAM_VFS_CREATE,
+	CAMEL_STREAM_VFS_APPEND,
+	CAMEL_STREAM_VFS_READ
+} CamelStreamVFSOpenMethod;
+
+#endif /* CAMEL_ENUMS_H */
diff --git a/camel/camel-folder.h b/camel/camel-folder.h
index 983ba49..896475e 100644
--- a/camel/camel-folder.h
+++ b/camel/camel-folder.h
@@ -29,6 +29,7 @@
 #ifndef CAMEL_FOLDER_H
 #define CAMEL_FOLDER_H
 
+#include <camel/camel-enums.h>
 #include <camel/camel-folder-summary.h>
 
 /* Standard GObject macros */
@@ -119,16 +120,6 @@ 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;
diff --git a/camel/camel-junk-filter.h b/camel/camel-junk-filter.h
index 4338f83..bdfce1e 100644
--- a/camel/camel-junk-filter.h
+++ b/camel/camel-junk-filter.h
@@ -23,6 +23,7 @@
 #ifndef CAMEL_JUNK_FILTER_H
 #define CAMEL_JUNK_FILTER_H
 
+#include <camel/camel-enums.h>
 #include <camel/camel-mime-message.h>
 
 /* Standard GObject macros */
@@ -49,12 +50,6 @@ G_BEGIN_DECLS
 typedef struct _CamelJunkFilter CamelJunkFilter;
 typedef struct _CamelJunkFilterInterface CamelJunkFilterInterface;
 
-typedef enum {
-	CAMEL_JUNK_STATUS_INCONCLUSIVE,
-	CAMEL_JUNK_STATUS_MESSAGE_IS_JUNK,
-	CAMEL_JUNK_STATUS_MESSAGE_IS_NOT_JUNK
-} CamelJunkStatus;
-
 struct _CamelJunkFilterInterface {
 	GTypeInterface parent_interface;
 
diff --git a/camel/camel-mime-filter-basic.h b/camel/camel-mime-filter-basic.h
index 1f9de84..bd75de2 100644
--- a/camel/camel-mime-filter-basic.h
+++ b/camel/camel-mime-filter-basic.h
@@ -26,6 +26,7 @@
 #ifndef CAMEL_MIME_FILTER_BASIC_H
 #define CAMEL_MIME_FILTER_BASIC_H
 
+#include <camel/camel-enums.h>
 #include <camel/camel-mime-filter.h>
 
 /* Standard GObject macros */
@@ -53,15 +54,6 @@ typedef struct _CamelMimeFilterBasic CamelMimeFilterBasic;
 typedef struct _CamelMimeFilterBasicClass CamelMimeFilterBasicClass;
 typedef struct _CamelMimeFilterBasicPrivate CamelMimeFilterBasicPrivate;
 
-typedef enum {
-	CAMEL_MIME_FILTER_BASIC_BASE64_ENC = 1,
-	CAMEL_MIME_FILTER_BASIC_BASE64_DEC,
-	CAMEL_MIME_FILTER_BASIC_QP_ENC,
-	CAMEL_MIME_FILTER_BASIC_QP_DEC,
-	CAMEL_MIME_FILTER_BASIC_UU_ENC,
-	CAMEL_MIME_FILTER_BASIC_UU_DEC
-} CamelMimeFilterBasicType;
-
 struct _CamelMimeFilterBasic {
 	CamelMimeFilter parent;
 	CamelMimeFilterBasicPrivate *priv;
diff --git a/camel/camel-mime-filter-crlf.h b/camel/camel-mime-filter-crlf.h
index 810aab7..e7c6816 100644
--- a/camel/camel-mime-filter-crlf.h
+++ b/camel/camel-mime-filter-crlf.h
@@ -27,6 +27,7 @@
 #ifndef CAMEL_MIME_FILTER_CRLF_H
 #define CAMEL_MIME_FILTER_CRLF_H
 
+#include <camel/camel-enums.h>
 #include <camel/camel-mime-filter.h>
 
 /* Standard GObject macros */
@@ -54,16 +55,6 @@ typedef struct _CamelMimeFilterCRLF CamelMimeFilterCRLF;
 typedef struct _CamelMimeFilterCRLFClass CamelMimeFilterCRLFClass;
 typedef struct _CamelMimeFilterCRLFPrivate CamelMimeFilterCRLFPrivate;
 
-typedef enum {
-	CAMEL_MIME_FILTER_CRLF_ENCODE,
-	CAMEL_MIME_FILTER_CRLF_DECODE
-} CamelMimeFilterCRLFDirection;
-
-typedef enum {
-	CAMEL_MIME_FILTER_CRLF_MODE_CRLF_DOTS,
-	CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY
-} CamelMimeFilterCRLFMode;
-
 struct _CamelMimeFilterCRLF {
 	CamelMimeFilter parent;
 	CamelMimeFilterCRLFPrivate *priv;
diff --git a/camel/camel-mime-filter-gzip.h b/camel/camel-mime-filter-gzip.h
index d7ded75..911ce20 100644
--- a/camel/camel-mime-filter-gzip.h
+++ b/camel/camel-mime-filter-gzip.h
@@ -27,6 +27,7 @@
 #ifndef CAMEL_MIME_FILTER_GZIP_H
 #define CAMEL_MIME_FILTER_GZIP_H
 
+#include <camel/camel-enums.h>
 #include <camel/camel-mime-filter.h>
 
 /* Standard GObject macros */
@@ -54,11 +55,6 @@ typedef struct _CamelMimeFilterGZip CamelMimeFilterGZip;
 typedef struct _CamelMimeFilterGZipClass CamelMimeFilterGZipClass;
 typedef struct _CamelMimeFilterGZipPrivate CamelMimeFilterGZipPrivate;
 
-typedef enum {
-	CAMEL_MIME_FILTER_GZIP_MODE_ZIP,
-	CAMEL_MIME_FILTER_GZIP_MODE_UNZIP
-} CamelMimeFilterGZipMode;
-
 struct _CamelMimeFilterGZip {
 	CamelMimeFilter parent;
 	CamelMimeFilterGZipPrivate *priv;
diff --git a/camel/camel-mime-filter-yenc.h b/camel/camel-mime-filter-yenc.h
index 495d45b..deee419 100644
--- a/camel/camel-mime-filter-yenc.h
+++ b/camel/camel-mime-filter-yenc.h
@@ -27,6 +27,7 @@
 #ifndef CAMEL_MIME_FILTER_YENC_H
 #define CAMEL_MIME_FILTER_YENC_H
 
+#include <camel/camel-enums.h>
 #include <camel/camel-mime-filter.h>
 
 /* Standard GObject macros */
@@ -54,11 +55,6 @@ typedef struct _CamelMimeFilterYenc CamelMimeFilterYenc;
 typedef struct _CamelMimeFilterYencClass CamelMimeFilterYencClass;
 typedef struct _CamelMimeFilterYencPrivate CamelMimeFilterYencPrivate;
 
-typedef enum {
-	CAMEL_MIME_FILTER_YENC_DIRECTION_ENCODE,
-	CAMEL_MIME_FILTER_YENC_DIRECTION_DECODE
-} CamelMimeFilterYencDirection;
-
 #define CAMEL_MIME_YDECODE_STATE_INIT     (0)
 #define CAMEL_MIME_YENCODE_STATE_INIT     (0)
 
diff --git a/camel/camel-mime-utils.h b/camel/camel-mime-utils.h
index 0922ff8..96ff158 100644
--- a/camel/camel-mime-utils.h
+++ b/camel/camel-mime-utils.h
@@ -29,6 +29,7 @@
 
 #include <time.h>
 #include <glib.h>
+#include <camel/camel-enums.h>
 
 /* maximum recommended size of a line from camel_header_fold() */
 #define CAMEL_FOLD_SIZE (77)
@@ -42,18 +43,6 @@
 
 G_BEGIN_DECLS
 
-/* note, if you change this, make sure you change the 'encodings' array in camel-mime-part.c */
-typedef enum _CamelTransferEncoding {
-	CAMEL_TRANSFER_ENCODING_DEFAULT,
-	CAMEL_TRANSFER_ENCODING_7BIT,
-	CAMEL_TRANSFER_ENCODING_8BIT,
-	CAMEL_TRANSFER_ENCODING_BASE64,
-	CAMEL_TRANSFER_ENCODING_QUOTEDPRINTABLE,
-	CAMEL_TRANSFER_ENCODING_BINARY,
-	CAMEL_TRANSFER_ENCODING_UUENCODE,
-	CAMEL_TRANSFER_NUM_ENCODINGS
-} CamelTransferEncoding;
-
 /* a list of references for this message */
 struct _camel_header_references {
 	struct _camel_header_references *next;
diff --git a/camel/camel-multipart-signed.h b/camel/camel-multipart-signed.h
index 5ceee44..3e85d73 100644
--- a/camel/camel-multipart-signed.h
+++ b/camel/camel-multipart-signed.h
@@ -54,15 +54,6 @@
 
 G_BEGIN_DECLS
 
-/*
-enum {
-	CAMEL_MULTIPART_EMPTY,
-	CAMEL_MULTIPART_CONST,
-	CAMEL_MULTIPART_SIGN,
-	CAMEL_MULTIPART_ENCR,
-};
-*/
-
 /* 'handy' enums for getting the internal parts of the multipart */
 enum {
 	CAMEL_MULTIPART_SIGNED_CONTENT,
diff --git a/camel/camel-provider.h b/camel/camel-provider.h
index cd11cf6..68653a1 100644
--- a/camel/camel-provider.h
+++ b/camel/camel-provider.h
@@ -31,6 +31,7 @@
 #ifndef CAMEL_PROVIDER_H
 #define CAMEL_PROVIDER_H
 
+#include <camel/camel-enums.h>
 #include <camel/camel-object.h>
 #include <camel/camel-object-bag.h>
 #include <camel/camel-url.h>
@@ -39,49 +40,8 @@
 
 G_BEGIN_DECLS
 
-typedef enum {
-	CAMEL_PROVIDER_STORE,
-	CAMEL_PROVIDER_TRANSPORT,
-	CAMEL_NUM_PROVIDER_TYPES
-} CamelProviderType;
-
 extern gchar *camel_provider_type_name[CAMEL_NUM_PROVIDER_TYPES];
 
-/* 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.
- */
-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
  * configure it. Service code can assume that any url part for which
@@ -139,17 +99,6 @@ typedef enum {
 #define CAMEL_PROVIDER_IS_STORE_AND_TRANSPORT(prov) (prov->object_types[CAMEL_PROVIDER_STORE] && prov->object_types[CAMEL_PROVIDER_TRANSPORT])
 
 /* Generic extra config stuff */
-typedef enum {
-	CAMEL_PROVIDER_CONF_END,
-	CAMEL_PROVIDER_CONF_SECTION_START,
-	CAMEL_PROVIDER_CONF_SECTION_END,
-	CAMEL_PROVIDER_CONF_CHECKBOX,
-	CAMEL_PROVIDER_CONF_CHECKSPIN,
-	CAMEL_PROVIDER_CONF_ENTRY,
-	CAMEL_PROVIDER_CONF_LABEL,
-	CAMEL_PROVIDER_CONF_HIDDEN,
-	CAMEL_PROVIDER_CONF_OPTIONS
-} CamelProviderConfType;
 
 typedef struct {
 	CamelProviderConfType type;
diff --git a/camel/camel-sasl-anonymous.h b/camel/camel-sasl-anonymous.h
index 239c353..ce71a8c 100644
--- a/camel/camel-sasl-anonymous.h
+++ b/camel/camel-sasl-anonymous.h
@@ -27,6 +27,7 @@
 #ifndef CAMEL_SASL_ANONYMOUS_H
 #define CAMEL_SASL_ANONYMOUS_H
 
+#include <camel/camel-enums.h>
 #include <camel/camel-sasl.h>
 
 /* Standard GObject macros */
@@ -53,12 +54,6 @@ G_BEGIN_DECLS
 typedef struct _CamelSaslAnonymous CamelSaslAnonymous;
 typedef struct _CamelSaslAnonymousClass CamelSaslAnonymousClass;
 
-typedef enum {
-	CAMEL_SASL_ANON_TRACE_EMAIL,
-	CAMEL_SASL_ANON_TRACE_OPAQUE,
-	CAMEL_SASL_ANON_TRACE_EMPTY
-} CamelSaslAnonTraceType;
-
 struct _CamelSaslAnonymous {
 	CamelSasl parent;
 
diff --git a/camel/camel-service.h b/camel/camel-service.h
index 84f3bf5..1d8fd69 100644
--- a/camel/camel-service.h
+++ b/camel/camel-service.h
@@ -29,6 +29,7 @@
 #ifndef CAMEL_SERVICE_H
 #define CAMEL_SERVICE_H
 
+#include <camel/camel-enums.h>
 #include <camel/camel-object.h>
 #include <camel/camel-url.h>
 #include <camel/camel-provider.h>
@@ -82,13 +83,6 @@ typedef enum {
 	CAMEL_SERVICE_ERROR_NOT_CONNECTED
 } CamelServiceError;
 
-typedef enum {
-	CAMEL_SERVICE_DISCONNECTED,
-	CAMEL_SERVICE_CONNECTING,
-	CAMEL_SERVICE_CONNECTED,
-	CAMEL_SERVICE_DISCONNECTING
-} CamelServiceConnectionStatus;
-
 /**
  * CamelServiceLock:
  *
diff --git a/camel/camel-session.h b/camel/camel-session.h
index 59bd411..8e01fc8 100644
--- a/camel/camel-session.h
+++ b/camel/camel-session.h
@@ -30,6 +30,7 @@
 #ifndef CAMEL_SESSION_H
 #define CAMEL_SESSION_H
 
+#include <camel/camel-enums.h>
 #include <camel/camel-filter-driver.h>
 #include <camel/camel-junk-filter.h>
 #include <camel/camel-msgport.h>
@@ -61,12 +62,6 @@ typedef struct _CamelSession CamelSession;
 typedef struct _CamelSessionClass CamelSessionClass;
 typedef struct _CamelSessionPrivate CamelSessionPrivate;
 
-typedef enum {
-	CAMEL_SESSION_ALERT_INFO,
-	CAMEL_SESSION_ALERT_WARNING,
-	CAMEL_SESSION_ALERT_ERROR
-} CamelSessionAlertType;
-
 enum {
 	CAMEL_SESSION_PASSWORD_REPROMPT = 1 << 0,
 	CAMEL_SESSION_PASSWORD_SECRET = 1 << 2,
diff --git a/camel/camel-store-summary.h b/camel/camel-store-summary.h
index adf4488..d0ddb20 100644
--- a/camel/camel-store-summary.h
+++ b/camel/camel-store-summary.h
@@ -28,6 +28,7 @@
 
 #include <stdio.h>
 
+#include <camel/camel-enums.h>
 #include <camel/camel-mime-parser.h>
 #include <camel/camel-object.h>
 #include <camel/camel-url.h>
@@ -59,26 +60,6 @@ typedef struct _CamelStoreSummaryPrivate CamelStoreSummaryPrivate;
 
 typedef struct _CamelStoreInfo CamelStoreInfo;
 
-/* FIXME: this needs to track the CAMEL_FOLDER_* flags in camel-store.h */
-typedef enum _CamelStoreInfoFlags {
-	CAMEL_STORE_INFO_FOLDER_NOSELECT = 1 << 0,
-	CAMEL_STORE_INFO_FOLDER_NOINFERIORS = 1 << 1,
-	CAMEL_STORE_INFO_FOLDER_CHILDREN = 1 << 2,
-	CAMEL_STORE_INFO_FOLDER_NOCHILDREN = 1 << 3,
-	CAMEL_STORE_INFO_FOLDER_SUBSCRIBED = 1 << 4,
-	CAMEL_STORE_INFO_FOLDER_VIRTUAL = 1 << 5,
-	CAMEL_STORE_INFO_FOLDER_SYSTEM = 1 << 6,
-	CAMEL_STORE_INFO_FOLDER_VTRASH = 1 << 7,
-	CAMEL_STORE_INFO_FOLDER_SHARED_BY_ME = 1 << 8,
-	CAMEL_STORE_INFO_FOLDER_SHARED_TO_ME = 1 << 9,
-
-	/* not in camle-store.h yet */
-	CAMEL_STORE_INFO_FOLDER_READONLY = 1 << 13,
-	CAMEL_STORE_INFO_FOLDER_CHECK_FOR_NEW = 1 << 14,
-
-	CAMEL_STORE_INFO_FOLDER_FLAGGED = 1 << 31
-} CamelStoreInfoFlags;
-
 #define CAMEL_STORE_INFO_FOLDER_UNKNOWN (~0)
 
 enum {
diff --git a/camel/camel-store.h b/camel/camel-store.h
index 8b3309a..1e86c8d 100644
--- a/camel/camel-store.h
+++ b/camel/camel-store.h
@@ -34,6 +34,7 @@
 /* for mode_t */
 #include <sys/types.h>
 
+#include <camel/camel-enums.h>
 #include <camel/camel-folder.h>
 #include <camel/camel-service.h>
 
@@ -85,72 +86,6 @@ 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;
@@ -164,24 +99,6 @@ typedef struct _CamelFolderInfo {
 	gint32 total;
 } CamelFolderInfo;
 
-/* Flags for store flags */
-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;
-
-/* store premissions */
-typedef enum {
-	CAMEL_STORE_READ  = 1 << 0,
-	CAMEL_STORE_WRITE = 1 << 1
-} CamelStorePermissionFlags;
-
 struct _CamelDB;
 
 typedef struct _CamelStore CamelStore;
@@ -202,27 +119,6 @@ typedef enum {
 #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;
diff --git a/camel/camel-stream-vfs.h b/camel/camel-stream-vfs.h
index e086241..58ef53f 100644
--- a/camel/camel-stream-vfs.h
+++ b/camel/camel-stream-vfs.h
@@ -29,6 +29,7 @@
 #ifndef CAMEL_STREAM_VFS_H
 #define CAMEL_STREAM_VFS_H
 
+#include <camel/camel-enums.h>
 #include <camel/camel-stream.h>
 
 /* Standard GObject macros */
@@ -67,23 +68,6 @@ struct _CamelStreamVFSClass {
 
 GType camel_stream_vfs_get_type (void);
 
-/**
- * CamelStreamVFSOpenMethod:
- * CAMEL_STREAM_VFS_CREATE:
- *	Writable, creates new file or replaces old file.
- * CAMEL_STREAM_VFS_APPEND:
- *	Writable, creates new file or appends at the end of the old file.
- * CAMEL_STREAM_VFS_READ:
- *	Readable, opens existing file for reading.
- *
- * Since: 2.24
- **/
-typedef enum {
-	CAMEL_STREAM_VFS_CREATE,
-	CAMEL_STREAM_VFS_APPEND,
-	CAMEL_STREAM_VFS_READ
-} CamelStreamVFSOpenMethod;
-
 /* public methods */
 CamelStream * camel_stream_vfs_new_with_uri            (const gchar *uri, CamelStreamVFSOpenMethod mode);
 CamelStream * camel_stream_vfs_new_with_stream         (GObject *stream);
diff --git a/camel/camel-tcp-stream-ssl.h b/camel/camel-tcp-stream-ssl.h
index 59041e9..b53e899 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-enums.h>
 #include <camel/camel-session.h>
 #include <camel/camel-tcp-stream-raw.h>
 
@@ -66,12 +67,6 @@ struct _CamelTcpStreamSSLClass {
 	CamelTcpStreamRawClass parent_class;
 };
 
-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,
diff --git a/camel/camel.h b/camel/camel.h
index 903ede9..c0395bb 100644
--- a/camel/camel.h
+++ b/camel/camel.h
@@ -38,6 +38,8 @@
 #include <camel/camel-disco-diary.h>
 #include <camel/camel-disco-folder.h>
 #include <camel/camel-disco-store.h>
+#include <camel/camel-enums.h>
+#include <camel/camel-enumtypes.h>
 #include <camel/camel-file-utils.h>
 #include <camel/camel-filter-driver.h>
 #include <camel/camel-filter-search.h>
diff --git a/camel/glib-gen.mak b/camel/glib-gen.mak
new file mode 100644
index 0000000..2deb0ed
--- /dev/null
+++ b/camel/glib-gen.mak
@@ -0,0 +1,42 @@
+# these are the variables your Makefile.am should set
+# the example is based on the colorbalance interface
+
+#glib_enum_headers=$(colorbalance_headers)
+#glib_enum_define=GST_COLOR_BALANCE
+#glib_enum_prefix=gst_color_balance
+
+# these are all the rules generating the relevant files
+%-marshal.h: %-marshal.list
+	$(AM_V_GEN) glib-genmarshal --header --prefix=$(glib_enum_prefix)_marshal $^ > $*-marshal.h.tmp && \
+	mv $*-marshal.h.tmp $*-marshal.h
+
+%-marshal.c: %-marshal.list
+	$(AM_V_GEN) echo "#include \"$*-marshal.h\"" >> $*-marshal.c.tmp && \
+	glib-genmarshal --body --prefix=$(glib_enum_prefix)_marshal $^ >> $*-marshal.c.tmp && \
+	mv $*-marshal.c.tmp $*-marshal.c
+
+%-enumtypes.h: $(glib_enum_headers)
+	$(AM_V_GEN) glib-mkenums \
+	--fhead "#ifndef __$(glib_enum_define)_ENUM_TYPES_H__\n#define __$(glib_enum_define)_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
+	--fprod "/* enumerations from \"@filename \" */\n" \
+	--vhead "GType @enum_name _get_type (void);\n#define CAMEL_TYPE_ ENUMSHORT@ (@enum_name _get_type())\n"         \
+	--ftail "G_END_DECLS\n\n#endif /* __$(glib_enum_define)_ENUM_TYPES_H__ */" \
+	$^ > $@
+
+%-enumtypes.c: $(glib_enum_headers)
+	@if test "x$(glib_enum_headers)" == "x"; then echo "ERROR: glib_enum_headers is empty, please fix Makefile"; exit 1; fi
+	$(AM_V_GEN) glib-mkenums \
+	--fhead "#include <$*.h>\n#include \"$*-enumtypes.h\"" \
+	--fprod "\n/* enumerations from \"@filename \" */" \
+	--vhead "GType\n enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) {\n    static const G Type@Value values[] = {"     \
+	--vprod "      { @valuenum@, \"@VALUENAME \", \"@valuenick \" }," \
+	--vtail "      { 0, NULL, NULL }\n    };\n    etype = g_ type@_register_static (\"@EnumName \", values);\n  }\n  return etype;\n}\n" \
+	$^ > $@
+
+# a hack rule to make sure .Plo files exist because they get include'd
+# from Makefile's
+.deps/%-marshal.Plo:
+	touch $@
+
+.deps/%-enumtypes.Plo:
+	touch $@
diff --git a/docs/reference/camel/Makefile.am b/docs/reference/camel/Makefile.am
index 989400a..43c3fd2 100644
--- a/docs/reference/camel/Makefile.am
+++ b/docs/reference/camel/Makefile.am
@@ -44,6 +44,7 @@ CFILE_GLOB=$(top_srcdir)/camel/*.c
 IGNORE_HFILES = 			\
 	broken-date-parser.h		\
 	camel-charset-map-private.h	\
+	camel-enumtypes.h		\
 	camel-groupwise-private.h	\
 	camel-i18n.h			\
 	camel-imap-private.h		\
diff --git a/docs/reference/camel/tmpl/camel-mime-filter-basic.sgml b/docs/reference/camel/tmpl/camel-mime-filter-basic.sgml
index f382da3..22d9b65 100644
--- a/docs/reference/camel/tmpl/camel-mime-filter-basic.sgml
+++ b/docs/reference/camel/tmpl/camel-mime-filter-basic.sgml
@@ -31,6 +31,7 @@ CamelMimeFilterBasic
 
 </para>
 
+ CAMEL_MIME_FILTER_BASIC_INVALID: 
 @CAMEL_MIME_FILTER_BASIC_BASE64_ENC: 
 @CAMEL_MIME_FILTER_BASIC_BASE64_DEC: 
 @CAMEL_MIME_FILTER_BASIC_QP_ENC: 
diff --git a/glib-gen.mak b/glib-gen.mak
index 7aae596..3e2cd7b 100644
--- a/glib-gen.mak
+++ b/glib-gen.mak
@@ -7,16 +7,16 @@
 
 # these are all the rules generating the relevant files
 %-marshal.h: %-marshal.list
-	glib-genmarshal --header --prefix=$(glib_enum_prefix)_marshal $^ > $*-marshal.h.tmp
+	$(AM_V_GEN) glib-genmarshal --header --prefix=$(glib_enum_prefix)_marshal $^ > $*-marshal.h.tmp && \
 	mv $*-marshal.h.tmp $*-marshal.h
 
 %-marshal.c: %-marshal.list
-	echo "#include \"$*-marshal.h\"" >> $*-marshal.c.tmp
-	glib-genmarshal --body --prefix=$(glib_enum_prefix)_marshal $^ >> $*-marshal.c.tmp
+	$(AM_V_GEN) echo "#include \"$*-marshal.h\"" >> $*-marshal.c.tmp && \
+	glib-genmarshal --body --prefix=$(glib_enum_prefix)_marshal $^ >> $*-marshal.c.tmp && \
 	mv $*-marshal.c.tmp $*-marshal.c
 
 %-enumtypes.h: $(glib_enum_headers)
-	glib-mkenums \
+	$(AM_V_GEN) glib-mkenums \
 	--fhead "#ifndef __$(glib_enum_define)_ENUM_TYPES_H__\n#define __$(glib_enum_define)_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
 	--fprod "/* enumerations from \"@filename \" */\n" \
 	--vhead "GType @enum_name _get_type (void);\n#define E_TYPE_ ENUMSHORT@ (@enum_name _get_type())\n"         \
@@ -24,12 +24,12 @@
 	$^ > $@
 
 %-enumtypes.c: $(glib_enum_headers)
-	@if test "x$(glib_enum_headers)" == "x"; then echo "ERROR: glib_enum_headers is empty, please fix Makefile"; exit 1; fi
-	glib-mkenums \
+	@if test "x$(glib_enum_headers)" == "x"; then echo "ERROR: glib_enum_headers is empty, please fix Makefile"; exit 1; fi && \
+	$(AM_V_GEN) glib-mkenums \
 	--fhead "#include <$*.h>\n#include \"$*-enumtypes.h\"" \
 	--fprod "\n/* enumerations from \"@filename \" */" \
 	--vhead "GType\n enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) {\n    static const G Type@Value values[] = {"     \
-	--vprod "      { @VALUENAME@, \"@VALUENAME \", \"@VALUENAME \" }," \
+	--vprod "      { @valuenum@, \"@VALUENAME \", \"@valuenick \" }," \
 	--vtail "      { 0, NULL, NULL }\n    };\n    etype = g_ type@_register_static (\"@EnumName \", values);\n  }\n  return etype;\n}\n" \
 	$^ > $@
 



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