[evolution-data-server/camel-gobject] Adding GObject macros.



commit 96b2ff5335235b0b27ef3225d9541d2dde069a38
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sat Apr 18 11:01:16 2009 -0400

    Adding GObject macros.
---
 camel/camel-tcp-stream-raw.h                    |   37 +++++++++++++------
 camel/camel-tcp-stream-ssl.h                    |   38 ++++++++++++++------
 camel/camel-types.h                             |    2 -
 camel/camel-vee-folder.h                        |   26 +++++++++++---
 camel/camel-vee-store.h                         |   23 ++++++++++--
 camel/camel-vee-summary.h                       |   21 +++++++++--
 camel/camel-vtrash-folder.h                     |   29 ++++++++++++----
 camel/providers/imap/Makefile.am                |    1 -
 camel/providers/imap/camel-imap-command.h       |    4 ++-
 camel/providers/imap/camel-imap-folder.c        |    2 +-
 camel/providers/imap/camel-imap-folder.h        |   33 ++++++++++++-----
 camel/providers/imap/camel-imap-message-cache.h |   37 +++++++++++++------
 camel/providers/imap/camel-imap-search.c        |    2 +-
 camel/providers/imap/camel-imap-search.h        |   23 ++++++++++--
 camel/providers/imap/camel-imap-store-summary.h |   23 ++++++++++--
 camel/providers/imap/camel-imap-store.h         |   43 +++++++++++++++-------
 camel/providers/imap/camel-imap-summary.h       |   25 ++++++++++---
 camel/providers/imap/camel-imap-types.h         |   39 --------------------
 camel/providers/imap/camel-imap-utils.h         |    4 +-
 camel/providers/imap/camel-imap-wrapper.h       |   24 ++++++++++---
 camel/providers/pop3/camel-pop3-engine.h        |   23 ++++++++++--
 camel/providers/pop3/camel-pop3-folder.h        |   43 +++++++++++++++-------
 camel/providers/pop3/camel-pop3-stream.h        |   23 ++++++++++--
 23 files changed, 359 insertions(+), 166 deletions(-)

diff --git a/camel/camel-tcp-stream-raw.h b/camel/camel-tcp-stream-raw.h
index 8344c23..df94f37 100644
--- a/camel/camel-tcp-stream-raw.h
+++ b/camel/camel-tcp-stream-raw.h
@@ -26,16 +26,32 @@
 
 #include <camel/camel-tcp-stream.h>
 
-#define CAMEL_TCP_STREAM_RAW_TYPE     (camel_tcp_stream_raw_get_type ())
-#define CAMEL_TCP_STREAM_RAW(obj)     (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_TCP_STREAM_RAW_TYPE, CamelTcpStreamRaw))
-#define CAMEL_TCP_STREAM_RAW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_TCP_STREAM_RAW_TYPE, CamelTcpStreamRawClass))
-#define CAMEL_IS_TCP_STREAM_RAW(o)    (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_TCP_STREAM_RAW_TYPE))
+/* Standard GObject macros */
+#define CAMEL_TYPE_TCP_STREAM_RAW \
+	(camel_tcp_stream_raw_get_type ())
+#define CAMEL_TCP_STREAM_RAW(obj) \
+	(G_TYPE_CHECK_INSTANCE_CAST \
+	((obj), CAMEL_TYPE_TCP_STREAM_RAW, CamelTcpStreamRaw))
+#define CAMEL_TCP_STREAM_RAW_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_CAST \
+	((cls), CAMEL_TYPE_TCP_STREAM_RAW, CamelTcpStreamRawClass))
+#define CAMEL_IS_TCP_STREAM_RAW(obj) \
+	(G_TYPE_CHECK_INSTANCE_TYPE \
+	((obj), CAMEL_TYPE_TCP_STREAM_RAW))
+#define CAMEL_IS_TCP_STREAM_RAW_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_TYPE \
+	((cls), CAMEL_TYPE_TCP_STREAM_RAW))
+#define CAMEL_TCP_STREAM_RAW_GET_CLASS(obj) \
+	(G_TYPE_INSTANCE_GET_CLASS \
+	((obj), CAMEL_TYPE_TCP_STREAM_RAW, CAmelTcpStreamRawClass))
 
 G_BEGIN_DECLS
 
-struct _CamelTcpStreamRaw
-{
-	CamelTcpStream parent_object;
+typedef struct _CamelTcpStreamRaw CamelTcpStreamRaw;
+typedef struct _CamelTcpStreamRawClass CamelTcpStreamRawClass;
+
+struct _CamelTcpStreamRaw {
+	CamelTcpStream parent;
 	
 	int sockfd;
 #ifdef G_OS_WIN32
@@ -43,12 +59,9 @@ struct _CamelTcpStreamRaw
 #endif
 };
 
-typedef struct {
+struct _CamelTcpStreamRawClass {
 	CamelTcpStreamClass parent_class;
-	
-	/* virtual functions */
-	
-} CamelTcpStreamRawClass;
+};
 
 /* Standard Camel function */
 GType camel_tcp_stream_raw_get_type (void);
diff --git a/camel/camel-tcp-stream-ssl.h b/camel/camel-tcp-stream-ssl.h
index 13dd224..8ddc6f9 100644
--- a/camel/camel-tcp-stream-ssl.h
+++ b/camel/camel-tcp-stream-ssl.h
@@ -26,10 +26,24 @@
 
 #include <camel/camel-tcp-stream.h>
 
-#define CAMEL_TCP_STREAM_SSL_TYPE     (camel_tcp_stream_ssl_get_type ())
-#define CAMEL_TCP_STREAM_SSL(obj)     (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_TCP_STREAM_SSL_TYPE, CamelTcpStreamSSL))
-#define CAMEL_TCP_STREAM_SSL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_TCP_STREAM_SSL_TYPE, CamelTcpStreamSSLClass))
-#define CAMEL_IS_TCP_STREAM_SSL(o)    (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_TCP_STREAM_SSL_TYPE))
+/* Standard GObject macros */
+#define CAMEL_TYPE_TCP_STREAM_SSL \
+	(camel_tcp_stream_ssl_get_type ())
+#define CAMEL_TCP_STREAM_SSL(obj) \
+	(G_TYPE_CHECK_INSTANCE_CAST \
+	((obj), CAMEL_TYPE_TCP_STREAM_SSL, CamelTcpStreamSSL))
+#define CAMEL_TCP_STREAM_SSL_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_CAST \
+	((cls), CAMEL_TYPE_TCP_STREAM_SSL, CamelTcpStreamSSLClass))
+#define CAMEL_IS_TCP_STREAM_SSL(obj) \
+	(G_TYPE_CHECK_INSTANCE_TYPE \
+	((obj), CAMEL_TYPE_TCP_STREAM_SSL))
+#define CAMEL_IS_TCP_STREAM_SSL_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_TYPE \
+	((cls), CAMEL_TYPE_TCP_STREAM_SSL))
+#define CAMEL_TCP_STREAM_SSL_GET_CLASS(obj) \
+	(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)
@@ -39,18 +53,18 @@ G_BEGIN_DECLS
 
 struct _CamelSession;
 
+typedef struct _CamelTcpStreamSSL CamelTcpStreamSSL;
+typedef struct _CamelTcpStreamSSLClass CamelTcpStreamSSLClass;
+typedef struct _CamelTcpStreamSSLPrivate CamelTcpStreamSSLPrivate;
+
 struct _CamelTcpStreamSSL {
-	CamelTcpStream parent_object;
-	
-	struct _CamelTcpStreamSSLPrivate *priv;
+	CamelTcpStream parent;
+	CamelTcpStreamSSLPrivate *priv;
 };
 
-typedef struct {
+struct _CamelTcpStreamSSLClass {
 	CamelTcpStreamClass parent_class;
-	
-	/* virtual functions */
-	
-} CamelTcpStreamSSLClass;
+};
 
 /* Standard Camel function */
 GType camel_tcp_stream_ssl_get_type (void);
diff --git a/camel/camel-types.h b/camel/camel-types.h
index 1c210fb..5a301a0 100644
--- a/camel/camel-types.h
+++ b/camel/camel-types.h
@@ -68,8 +68,6 @@ typedef struct _CamelStreamFilter CamelStreamFilter;
 typedef struct _CamelStreamFs CamelStreamFs;
 typedef struct _CamelStreamMem CamelStreamMem;
 typedef struct _CamelTcpStream CamelTcpStream;
-typedef struct _CamelTcpStreamRaw CamelTcpStreamRaw;
-typedef struct _CamelTcpStreamSSL CamelTcpStreamSSL;
 typedef struct _CamelTcpStreamOpenSSL CamelTcpStreamOpenSSL;
 typedef struct _CamelHttpStream CamelHttpStream;
 typedef struct _CamelTransport CamelTransport;
diff --git a/camel/camel-vee-folder.h b/camel/camel-vee-folder.h
index f173db2..bbbaa5c 100644
--- a/camel/camel-vee-folder.h
+++ b/camel/camel-vee-folder.h
@@ -27,19 +27,35 @@
 #include <camel/camel-folder.h>
 #include <camel/camel-vee-summary.h>
 
-#define CAMEL_VEE_FOLDER(obj)         G_TYPE_CHECK_INSTANCE_CAST (obj, camel_vee_folder_get_type (), CamelVeeFolder)
-#define CAMEL_VEE_FOLDER_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_vee_folder_get_type (), CamelVeeFolderClass)
-#define CAMEL_IS_VEE_FOLDER(obj)      G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_vee_folder_get_type ())
+/* Standard GObject macros */
+#define CAMEL_TYPE_VEE_FOLDER \
+	(camel_vee_folder_get_type ())
+#define CAMEL_VEE_FOLDER(obj) \
+	(G_TYPE_CHECK_INSTANCE_CAST \
+	((obj), CAMEL_TYPE_VEE_FOLDER, CamelVeeFolder))
+#define CAMEL_VEE_FOLDER_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_CAST \
+	((cls), CAMEL_TYPE_VEE_FOLDER, CamelVeeFolderClass))
+#define CAMEL_IS_VEE_FOLDER(obj) \
+	(G_TYPE_CHECK_INSTANCE_TYPE \
+	((obj), CAMEL_TYPE_VEE_FOLDER))
+#define CAMEL_IS_VEE_FOLDER_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_TYPE \
+	((cls), CAMEL_TYPE_VEE_FOLDER))
+#define CAMEL_VEE_FOLDER_GET_CLASS(obj) \
+	(G_TYPE_INSTANCE_GET_CLASS \
+	((obj), CAMEL_TYPE_VEE_FOLDER, CamelVeeFolderClass))
 
 G_BEGIN_DECLS
 
-typedef struct _CamelVeeFolder      CamelVeeFolder;
+typedef struct _CamelVeeFolder CamelVeeFolder;
 typedef struct _CamelVeeFolderClass CamelVeeFolderClass;
+typedef struct _CamelVeeFolderPrivate CamelVeeFolderPrivate;
 
 struct _CamelVeeFolder {
 	CamelFolder parent;
 
-	struct _CamelVeeFolderPrivate *priv;
+	CamelVeeFolderPrivate *priv;
 
 	char *expression;	/* query expression */
 
diff --git a/camel/camel-vee-store.h b/camel/camel-vee-store.h
index 79a2b6f..9663bb2 100644
--- a/camel/camel-vee-store.h
+++ b/camel/camel-vee-store.h
@@ -26,13 +26,28 @@
 #include <glib.h>
 #include <camel/camel-store.h>
 
-#define CAMEL_VEE_STORE(obj)         G_TYPE_CHECK_INSTANCE_CAST (obj, camel_vee_store_get_type (), CamelVeeStore)
-#define CAMEL_VEE_STORE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_vee_store_get_type (), CamelVeeStoreClass)
-#define CAMEL_IS_VEE_STORE(obj)      G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_vee_store_get_type ())
+/* Standard GObject macros */
+#define CAMEL_TYPE_VEE_STORE \
+	(camel_vee_store_get_type ())
+#define CAMEL_VEE_STORE(obj) \
+	(G_TYPE_CHECK_INSTANCE_CAST \
+	((obj), CAMEL_TYPE_VEE_STORE, CamelVeeStore))
+#define CAMEL_VEE_STORE_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_CAST \
+	((cls), CAMEL_TYPE_VEE_STORE, CamelVeeStoreClass))
+#define CAMEL_IS_VEE_STORE(obj) \
+	(G_TYPE_CHECK_INSTANCE_TYPE \
+	((obj), CAMEL_TYPE_VEE_STORE))
+#define CAMEL_IS_VEE_STORE_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_TYPE \
+	((cls), CAMEL_TYPE_VEE_STORE))
+#define CAMEL_VEE_STORE_GET_CLASS(obj) \
+	(G_TYPE_INSTANCE_GET_CLASS \
+	((obj), CAMEL_TYPE_VEE_STORE, CamelVeeStoreClass))
 
 G_BEGIN_DECLS
 
-typedef struct _CamelVeeStore      CamelVeeStore;
+typedef struct _CamelVeeStore CamelVeeStore;
 typedef struct _CamelVeeStoreClass CamelVeeStoreClass;
 
 /* open mode for folder, vee folder auto-update */
diff --git a/camel/camel-vee-summary.h b/camel/camel-vee-summary.h
index ed8d413..d30c521 100644
--- a/camel/camel-vee-summary.h
+++ b/camel/camel-vee-summary.h
@@ -26,9 +26,24 @@
 #include <camel/camel-folder-summary.h>
 #include <camel/camel-exception.h>
 
-#define CAMEL_VEE_SUMMARY(obj)         G_TYPE_CHECK_INSTANCE_CAST (obj, camel_vee_summary_get_type (), CamelVeeSummary)
-#define CAMEL_VEE_SUMMARY_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_vee_summary_get_type (), CamelVeeSummaryClass)
-#define CAMEL_IS_VEE_SUMMARY(obj)      G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_vee_summary_get_type ())
+/* Standard GObject macros */
+#define CAMEL_TYPE_VEE_SUMMARY \
+	(camel_vee_summary_get_type ())
+#define CAMEL_VEE_SUMMARY(obj) \
+	(G_TYPE_CHECK_INSTANCE_CAST \
+	((obj), CAMEL_TYPE_VEE_SUMMARY, CamelVeeSummary))
+#define CAMEL_VEE_SUMMARY_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_CAST \
+	((cls), CAMEL_TYPE_VEE_SUMMARY, CamelVeeSummaryClass))
+#define CAMEL_IS_VEE_SUMMARY(obj) \
+	(G_TYPE_CHECK_INSTANCE_TYPE \
+	((obj), CAMEL_TYPE_VEE_SUMMARY))
+#define CAMEL_IS_VEE_SUMMARY_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_TYPE \
+	((cls), CAMEL_TYPE_VEE_SUMMARY))
+#define CAMEL_VEE_SUMMARY_GET_CLASS(obj) \
+	(G_TYPE_INSTANCE_GET_CLASS \
+	((obj), CAMEL_TYPE_VEE_SUMMARY, CamelVeeSummaryClass))
 
 G_BEGIN_DECLS
 
diff --git a/camel/camel-vtrash-folder.h b/camel/camel-vtrash-folder.h
index 9cdbfd6..56ef1f5 100644
--- a/camel/camel-vtrash-folder.h
+++ b/camel/camel-vtrash-folder.h
@@ -27,18 +27,33 @@
 #include <camel/camel-folder.h>
 #include <camel/camel-vee-folder.h>
 
-#define CAMEL_VTRASH_FOLDER(obj)         G_TYPE_CHECK_INSTANCE_CAST (obj, camel_vtrash_folder_get_type (), CamelVTrashFolder)
-#define CAMEL_VTRASH_FOLDER_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_vtrash_folder_get_type (), CamelVTrashFolderClass)
-#define CAMEL_IS_VTRASH_FOLDER(obj)      G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_vtrash_folder_get_type ())
+/* Standard GObject macros */
+#define CAMEL_TYPE_VTRASH_FOLDER \
+	(camel_vtrash_folder_get_type ())
+#define CAMEL_VTRASH_FOLDER(obj) \
+	(G_TYPE_CHECK_INSTANCE_CAST \
+	((obj), CAMEL_TYPE_VTRASH_FOLDER, CamelVTrashFolder))
+#define CAMEL_VTRASH_FOLDER_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_CAST \
+	((cls), CAMEL_TYPE_VTRASH_FOLDER, CamelVTrashFolderClass))
+#define CAMEL_IS_VTRASH_FOLDER(obj) \
+	(G_TYPE_CHECK_INSTANCE_TYPE \
+	((obj), CAMEL_TYPE_VTRASH_FOLDER))
+#define CAMEL_IS_VTRASH_FOLDER_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_TYPE \
+	((cls), CAMEL_TYPE_VTRASH_FOLDER))
+#define CAMEL_VTRASH_FOLDER_GET_CLASS(obj) \
+	(G_TYPE_INSTANCE_GET_CLASS \
+	((obj), CAMEL_TYPE_VTRASH_FOLDER, CamelVTrashFolderClass))
+
+#define CAMEL_VTRASH_NAME	".#evolution/Trash"
+#define CAMEL_VJUNK_NAME	".#evolution/Junk"
 
 G_BEGIN_DECLS
 
-typedef struct _CamelVTrashFolder      CamelVTrashFolder;
+typedef struct _CamelVTrashFolder CamelVTrashFolder;
 typedef struct _CamelVTrashFolderClass CamelVTrashFolderClass;
 
-#define CAMEL_VTRASH_NAME ".#evolution/Trash"
-#define CAMEL_VJUNK_NAME ".#evolution/Junk"
-
 typedef enum {
 	CAMEL_VTRASH_FOLDER_TRASH,
 	CAMEL_VTRASH_FOLDER_JUNK,
diff --git a/camel/providers/imap/Makefile.am b/camel/providers/imap/Makefile.am
index 26639bf..c9392bf 100644
--- a/camel/providers/imap/Makefile.am
+++ b/camel/providers/imap/Makefile.am
@@ -36,7 +36,6 @@ noinst_HEADERS =			\
 	camel-imap-store-summary.h		\
 	camel-imap-summary.h			\
 	camel-imap-journal.h			\
-	camel-imap-types.h			\
 	camel-imap-utils.h			\
 	camel-imap-wrapper.h                    \
 	camel-imap-private.h
diff --git a/camel/providers/imap/camel-imap-command.h b/camel/providers/imap/camel-imap-command.h
index 77a5937..123ae10 100644
--- a/camel/providers/imap/camel-imap-command.h
+++ b/camel/providers/imap/camel-imap-command.h
@@ -28,10 +28,12 @@
 #define CAMEL_IMAP_COMMAND_H 1
 
 #include <glib.h>
-#include "camel-imap-types.h"
+#include <camel-imap-store.h>
 
 G_BEGIN_DECLS
 
+typedef struct _CamelImapResponse CamelImapResponse;
+
 typedef enum {
 	CAMEL_IMAP_RESPONSE_ERROR,
 	CAMEL_IMAP_RESPONSE_CONTINUATION,
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index 7e82fa0..d6b9bf3 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -248,7 +248,7 @@ camel_imap_folder_new (CamelStore *parent, const char *folder_name,
 		return NULL;
 	}
 
-	folder = g_object_type (CAMEL_TYPE_IMAP_FOLDER, NULL);
+	folder = g_object_new (CAMEL_TYPE_IMAP_FOLDER, NULL);
 	short_name = strrchr (folder_name, '/');
 	if (short_name)
 		short_name++;
diff --git a/camel/providers/imap/camel-imap-folder.h b/camel/providers/imap/camel-imap-folder.h
index a32fc64..bcec884 100644
--- a/camel/providers/imap/camel-imap-folder.h
+++ b/camel/providers/imap/camel-imap-folder.h
@@ -27,15 +27,31 @@
 #ifndef CAMEL_IMAP_FOLDER_H
 #define CAMEL_IMAP_FOLDER_H 1
 
-#include "camel-imap-types.h"
 #include <camel/camel-offline-folder.h>
 #include <camel/camel-folder-search.h>
 #include <camel/camel-offline-journal.h>
 
-#define CAMEL_IMAP_FOLDER_TYPE     (camel_imap_folder_get_type ())
-#define CAMEL_IMAP_FOLDER(obj)     (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_IMAP_FOLDER_TYPE, CamelImapFolder))
-#define CAMEL_IMAP_FOLDER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_IMAP_FOLDER_TYPE, CamelImapFolderClass))
-#define CAMEL_IS_IMAP_FOLDER(o)    (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_IMAP_FOLDER_TYPE))
+#include <camel-imap-command.h>
+#include <camel-imap-message-cache.h>
+
+/* Standard GObject macros */
+#define CAMEL_TYPE_IMAP_FOLDER \
+	(camel_imap_folder_get_type ())
+#define CAMEL_IMAP_FOLDER(obj) \
+	(G_TYPE_CHECK_INSTANCE_CAST \
+	((obj), CAMEL_TYPE_IMAP_FOLDER, CamelImapFolder))
+#define CAMEL_IMAP_FOLDER_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_CAST \
+	((cls), CAMEL_TYPE_IMAP_FOLDER, CamelImapFolderClass))
+#define CAMEL_IS_IMAP_FOLDER(obj) \
+	(G_TYPE_CHECK_INSTANCE_TYPE \
+	((obj), CAMEL_TYPE_IMAP_FOLDER))
+#define CAMEL_IS_IMAP_FOLDER_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_TYPE \
+	((cls), CAMEL_TYPE_IMAP_FOLDER))
+#define CAMEL_IMAP_FOLDER_GET_CLASS(obj) \
+	(G_TYPE_INSTANCE_GET_CLASS \
+	((obj), CAMEL_TYPE_IMAP_FOLDER, CamelImapFolderClass))
 
 G_BEGIN_DECLS
 
@@ -50,11 +66,12 @@ enum {
 	CAMEL_IMAP_FOLDER_CHECK_FOLDER = CAMEL_IMAP_FOLDER_ARG_CHECK_FOLDER | CAMEL_ARG_BOO,
 };
 
+typedef struct _CamelImapFolder CamelImapFolder;
 typedef struct _CamelImapFolderClass CamelImapFolderClass;
 typedef struct _CamelImapFolderPrivate CamelImapFolderPrivate;
 
 struct _CamelImapFolder {
-	CamelOfflineFolder parent_object;
+	CamelOfflineFolder parent;
 
 	CamelImapFolderPrivate *priv;
 
@@ -70,12 +87,8 @@ struct _CamelImapFolder {
 
 struct _CamelImapFolderClass {
 	CamelOfflineFolderClass parent_class;
-
-	/* Virtual methods */	
-	
 };
 
-
 /* public methods */
 CamelFolder *camel_imap_folder_new (CamelStore *parent,
 				    const char *folder_name,
diff --git a/camel/providers/imap/camel-imap-message-cache.h b/camel/providers/imap/camel-imap-message-cache.h
index 9475b28..eb68646 100644
--- a/camel/providers/imap/camel-imap-message-cache.h
+++ b/camel/providers/imap/camel-imap-message-cache.h
@@ -26,19 +26,35 @@
 #ifndef CAMEL_IMAP_MESSAGE_CACHE_H
 #define CAMEL_IMAP_MESSAGE_CACHE_H 1
 
-#include "camel-imap-types.h"
-#include "camel-folder.h"
+#include <camel/camel-folder.h>
 #include <camel/camel-folder-search.h>
 
-#define CAMEL_IMAP_MESSAGE_CACHE_TYPE     (camel_imap_message_cache_get_type ())
-#define CAMEL_IMAP_MESSAGE_CACHE(obj)     (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_IMAP_MESSAGE_CACHE_TYPE, CamelImapFolder))
-#define CAMEL_IMAP_MESSAGE_CACHE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_IMAP_MESSAGE_CACHE_TYPE, CamelImapFolderClass))
-#define CAMEL_IS_IMAP_MESSAGE_CACHE(o)    (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_IMAP_MESSAGE_CACHE_TYPE))
+/* Standard GObject macros */
+#define CAMEL_TYPE_IMAP_MESSAGE_CACHE \
+	(camel_imap_message_cache_get_type ())
+#define CAMEL_IMAP_MESSAGE_CACHE(obj) \
+	(G_TYPE_CHECK_INSTANCE_CAST \
+	((obj), CAMEL_TYPE_IMAP_MESSAGE_CACHE, CamelImapFolder))
+#define CAMEL_IMAP_MESSAGE_CACHE_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_CAST \
+	((cls), CAMEL_TYPE_IMAP_MESSAGE_CACHE, CamelImapFolderClass))
+#define CAMEL_IS_IMAP_MESSAGE_CACHE(obj) \
+	(G_TYPE_CHECK_INSTANCE_TYPE \
+	((obj), CAMEL_TYPE_IMAP_MESSAGE_CACHE))
+#define CAMEL_IS_IMAP_MESSAGE_CACHE_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_TYPE \
+	((cls), CAMEL_TYPE_IMAP_MESSAGE_CACHE))
+#define CAMEL_IMAP_MESSAGE_CACHE_GET_CLASS(obj) \
+	(G_TYPE_INSTANCE_GET_CLASS \
+	((obj), CAMEL_TYPE_IMAP_MESSAGE_CACHE, CamelImapFolderClass))
 
 G_BEGIN_DECLS
 
+typedef struct _CamelImapMessageCache CamelImapMessageCache;
+typedef struct _CamelImapMessageCacheClass CamelImapMessageCacheClass;
+
 struct _CamelImapMessageCache {
-	CamelObject parent_object;
+	CamelObject parent;
 
 	char *path;
         /* parts contains two sorts of objects.
@@ -53,12 +69,9 @@ struct _CamelImapMessageCache {
 };
 
 
-typedef struct {
+struct _CamelImapMessageCacheClass {
 	CamelFolderClass parent_class;
-
-	/* Virtual methods */	
-	
-} CamelImapMessageCacheClass;
+};
 
 
 /* public methods */
diff --git a/camel/providers/imap/camel-imap-search.c b/camel/providers/imap/camel-imap-search.c
index 83ef46a..42200ee 100644
--- a/camel/providers/imap/camel-imap-search.c
+++ b/camel/providers/imap/camel-imap-search.c
@@ -140,7 +140,7 @@ camel_imap_search_get_type (void)
 	
 	if (camel_imap_search_type == G_TYPE_INVALID) {
 		camel_imap_search_type = camel_type_register (
-			CAMEL_FOLDER_SEARCH_TYPE, "CamelImapSearch",
+			CAMEL_TYPE_FOLDER_SEARCH, "CamelImapSearch",
 			sizeof (CamelImapSearch),
 			sizeof (CamelImapSearchClass),
 			(CamelObjectClassInitFunc) camel_imap_search_class_init, NULL,
diff --git a/camel/providers/imap/camel-imap-search.h b/camel/providers/imap/camel-imap-search.h
index 0b76036..3ac97ff 100644
--- a/camel/providers/imap/camel-imap-search.h
+++ b/camel/providers/imap/camel-imap-search.h
@@ -30,13 +30,28 @@
 #include <camel/camel-list-utils.h>
 #include <camel/camel-data-cache.h>
 
-#define CAMEL_IMAP_SEARCH_TYPE         (camel_imap_search_get_type ())
-#define CAMEL_IMAP_SEARCH(obj)         G_TYPE_CHECK_INSTANCE_CAST (obj, camel_imap_search_get_type (), CamelImapSearch)
-#define CAMEL_IMAP_SEARCH_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_imap_search_get_type (), CamelImapSearchClass)
-#define CAMEL_IS_IMAP_SEARCH(obj)      G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_imap_search_get_type ())
+/* Standard GObject class */
+#define CAMEL_TYPE_IMAP_SEARCH \
+	(camel_imap_search_get_type ())
+#define CAMEL_IMAP_SEARCH(obj) \
+	(G_TYPE_CHECK_INSTANCE_CAST \
+	((obj), CAMEL_TYPE_IMAP_SEARCH, CamelImapSearch))
+#define CAMEL_IMAP_SEARCH_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_CAST \
+	((cls), CAMEL_TYPE_IMAP_SEARCH, CamelImapSearchClass))
+#define CAMEL_IS_IMAP_SEARCH(obj) \
+	(G_TYPE_CHECK_INSTANCE_TYPE \
+	((obj), CAMEL_TYPE_IMAP_SEARCH))
+#define CAMEL_IS_IMAP_SEARCH_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_TYPE \
+	((cls), CAMEL_TYPE_IMAP_SEARCH))
+#define CAMEL_IMAP_SEARCH_GET_CLASS(obj) \
+	(G_TYPE_INSTANCE_GET_CLASS \
+	((obj), CAMEL_TYPE_IMAP_SEARCH, CamelImapSearchClass))
 
 G_BEGIN_DECLS
 
+typedef struct _CamelImapSearch CamelImapSearch;
 typedef struct _CamelImapSearchClass CamelImapSearchClass;
 
 struct _CamelImapSearch {
diff --git a/camel/providers/imap/camel-imap-store-summary.h b/camel/providers/imap/camel-imap-store-summary.h
index 4c4d08a..e2ecfe3 100644
--- a/camel/providers/imap/camel-imap-store-summary.h
+++ b/camel/providers/imap/camel-imap-store-summary.h
@@ -26,13 +26,28 @@
 #include <camel/camel-object.h>
 #include <camel/camel-store-summary.h>
 
-#define CAMEL_IMAP_STORE_SUMMARY(obj)         G_TYPE_CHECK_INSTANCE_CAST (obj, camel_imap_store_summary_get_type (), CamelImapStoreSummary)
-#define CAMEL_IMAP_STORE_SUMMARY_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_imap_store_summary_get_type (), CamelImapStoreSummaryClass)
-#define CAMEL_IS_IMAP_STORE_SUMMARY(obj)      G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_imap_store_summary_get_type ())
+/* Standard GObject macros */
+#define CAMEL_TYPE_IMAP_STORE_SUMMARY \
+	(camel_imap_store_summary_get_type ())
+#define CAMEL_IMAP_STORE_SUMMARY(obj) \
+	(G_TYPE_CHECK_INSTANCE_CAST \
+	((obj), CAMEL_TYPE_IMAP_STORE_SUMMARY, CamelImapStoreSummary))
+#define CAMEL_IMAP_STORE_SUMMARY_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_CAST \
+	((cls), CAMEL_TYPE_IMAP_STORE_SUMMARY, CamelImapStoreSummaryClass))
+#define CAMEL_IS_IMAP_STORE_SUMMARY(obj) \
+	(G_TYPE_CHECK_INSTANCE_TYPE \
+	((obj), CAMEL_TYPE_IMAP_STORE_SUMMARY))
+#define CAMEL_IS_IMAP_STORE_SUMMARY_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_TYPE \
+	((cls), CAMEL_TYPE_IMAP_STORE_SUMMARY))
+#define CAMEL_IMAP_STORE_SUMMARY_GET_CLASS(obj) \
+	(G_TYPE_INSTANCE_GET_CLASS \
+	((obj), CAMEL_TYPE_IMAP_STORE_SUMMARY, CamelImapStoreSummaryClass))
 
 G_BEGIN_DECLS
 
-typedef struct _CamelImapStoreSummary      CamelImapStoreSummary;
+typedef struct _CamelImapStoreSummary CamelImapStoreSummary;
 typedef struct _CamelImapStoreSummaryClass CamelImapStoreSummaryClass;
 
 typedef struct _CamelImapStoreInfo CamelImapStoreInfo;
diff --git a/camel/providers/imap/camel-imap-store.h b/camel/providers/imap/camel-imap-store.h
index 4e00faf..3140943 100644
--- a/camel/providers/imap/camel-imap-store.h
+++ b/camel/providers/imap/camel-imap-store.h
@@ -25,15 +25,17 @@
 #ifndef CAMEL_IMAP_STORE_H
 #define CAMEL_IMAP_STORE_H 1
 
-#include "camel-imap-types.h"
+#include <sys/time.h>
 #include <camel/camel-msgport.h>
 #include <camel/camel-offline-store.h>
-#include <sys/time.h>
-
-#ifdef ENABLE_THREADS
 
 G_BEGIN_DECLS
 
+typedef struct _CamelImapStore CamelImapStore;
+typedef struct _CamelImapStoreClass CamelImapStoreClass;
+
+#ifdef ENABLE_THREADS
+
 typedef struct _CamelImapMsg CamelImapMsg;
 
 struct _CamelImapMsg {
@@ -48,14 +50,28 @@ CamelImapMsg *camel_imap_msg_new(void (*receive)(CamelImapStore *store, struct _
 				 size_t size);
 void camel_imap_msg_queue(CamelImapStore *store, CamelImapMsg *msg);
 
-G_END_DECLS
-
 #endif
 
-#define CAMEL_IMAP_STORE_TYPE     (camel_imap_store_get_type ())
-#define CAMEL_IMAP_STORE(obj)     (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_IMAP_STORE_TYPE, CamelImapStore))
-#define CAMEL_IMAP_STORE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_IMAP_STORE_TYPE, CamelImapStoreClass))
-#define CAMEL_IS_IMAP_STORE(o)    (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_IMAP_STORE_TYPE))
+G_END_DECLS
+
+/* Standard GObject macros */
+#define CAMEL_TYPE_IMAP_STORE \
+	(camel_imap_store_get_type ())
+#define CAMEL_IMAP_STORE(obj) \
+	(G_TYPE_CHECK_INSTANCE_CAST \
+	((obj), CAMEL_TYPE_IMAP_STORE, CamelImapStore))
+#define CAMEL_IMAP_STORE_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_CAST \
+	((cls), CAMEL_TYPE_IMAP_STORE, CamelImapStoreClass))
+#define CAMEL_IS_IMAP_STORE(obj) \
+	(G_TYPE_CHECK_INSTANCE_TYPE \
+	((obj), CAMEL_TYPE_IMAP_STORE))
+#define CAMEL_IS_IMAP_STORE_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_TYPE \
+	((cls), CAMEL_TYPE_IMAP_STORE))
+#define CAMEL_IMAP_STORE_GET_CLASS(obj) \
+	(G_TYPE_INSTANCE_GET_CLASS \
+	((obj), CAMEL_TYPE_IMAP_STORE, CamelImapStoreClass))
 
 G_BEGIN_DECLS
 
@@ -115,7 +131,7 @@ typedef enum {
 #define IMAP_FETCH_MINIMAL_HEADERS 3
 
 struct _CamelImapStore {
-	CamelOfflineStore parent_object;	
+	CamelOfflineStore parent;
 	
 	CamelStream *istream;
 	CamelStream *ostream;
@@ -149,10 +165,9 @@ struct _CamelImapStore {
 	char *custom_headers;
 };
 
-typedef struct {
+struct _CamelImapStoreClass {
 	CamelOfflineStoreClass parent_class;
-
-} CamelImapStoreClass;
+};
 
 
 /* Standard Camel function */
diff --git a/camel/providers/imap/camel-imap-summary.h b/camel/providers/imap/camel-imap-summary.h
index ed08ad0..9780cc9 100644
--- a/camel/providers/imap/camel-imap-summary.h
+++ b/camel/providers/imap/camel-imap-summary.h
@@ -23,13 +23,27 @@
 #ifndef CAMEL_IMAP_SUMMARY_H
 #define CAMEL_IMAP_SUMMARY_H
 
-#include "camel-imap-types.h"
-#include <camel/camel-folder-summary.h>
 #include <camel/camel-exception.h>
+#include <camel/camel-folder-summary.h>
 
-#define CAMEL_IMAP_SUMMARY(obj)         G_TYPE_CHECK_INSTANCE_CAST (obj, camel_imap_summary_get_type (), CamelImapSummary)
-#define CAMEL_IMAP_SUMMARY_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_imap_summary_get_type (), CamelImapSummaryClass)
-#define CAMEL_IS_IMAP_SUMMARY(obj)      G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_imap_summary_get_type ())
+/* Standard GObject macros */
+#define CAMEL_TYPE_IMAP_SUMMARY \
+	(camel_imap_summary_get_type ())
+#define CAMEL_IMAP_SUMMARY(obj) \
+	(G_TYPE_CHECK_INSTANCE_CAST \
+	((obj), CAMEL_TYPE_IMAP_SUMMARY, CamelImapSummary))
+#define CAMEL_IMAP_SUMMARY_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_CAST \
+	((cls), CAMEL_TYPE_IMAP_SUMMARY, CamelImapSummaryClass))
+#define CAMEL_IS_IMAP_SUMMARY(obj) \
+	(G_TYPE_CHECK_INSTANCE_TYPE \
+	((obj), CAMEL_TYPE_IMAP_SUMMARY))
+#define CAMEL_IS_IMAP_SUMMARY_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_TYPE \
+	((cls), CAMEL_TYPE_IMAP_SUMMARY))
+#define CAMEL_IMAP_SUMMARY_GET_CLASS(obj) \
+	(G_TYPE_INSTANCE_GET_CLASS \
+	((obj), CAMEL_TYPE_IMAP_SUMMARY, CamelImapSummaryClass))
 
 #define CAMEL_IMAP_SERVER_FLAGS (CAMEL_MESSAGE_ANSWERED | \
 				 CAMEL_MESSAGE_DELETED | \
@@ -43,6 +57,7 @@ enum {
 	CAMEL_IMAP_MESSAGE_RECENT = 1<<17,
 };
 
+typedef struct _CamelImapSummary CamelImapSummary;
 typedef struct _CamelImapSummaryClass CamelImapSummaryClass;
 
 typedef struct _CamelImapMessageContentInfo {
diff --git a/camel/providers/imap/camel-imap-types.h b/camel/providers/imap/camel-imap-types.h
deleted file mode 100644
index 309014c..0000000
--- a/camel/providers/imap/camel-imap-types.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-imap-types.h: IMAP types */
-
-/* 
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of version 2 of the GNU Lesser General Public 
- * License as published by the Free Software Foundation.
- *
- * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
-
-#ifndef CAMEL_IMAP_TYPES_H
-#define CAMEL_IMAP_TYPES_H 1
-
-#include "camel-types.h"
-
-G_BEGIN_DECLS
-
-typedef struct _CamelImapFolder       CamelImapFolder;
-typedef struct _CamelImapMessageCache CamelImapMessageCache;
-typedef struct _CamelImapResponse     CamelImapResponse;
-typedef struct _CamelImapSearch       CamelImapSearch;
-typedef struct _CamelImapStore        CamelImapStore;
-typedef struct _CamelImapSummary      CamelImapSummary;
-typedef struct _CamelImapWrapper      CamelImapWrapper;
-
-G_END_DECLS
-
-#endif /* CAMEL_IMAP_TYPES_H */
diff --git a/camel/providers/imap/camel-imap-utils.h b/camel/providers/imap/camel-imap-utils.h
index 0636e28..357ca39 100644
--- a/camel/providers/imap/camel-imap-utils.h
+++ b/camel/providers/imap/camel-imap-utils.h
@@ -24,9 +24,9 @@
 #define CAMEL_IMAP_UTILS_H 1
 
 #include <sys/types.h>
+#include <camel/camel-folder-summary.h>
 
-#include "camel-folder-summary.h"
-#include "camel-imap-types.h"
+#include <camel-imap-store.h>
 
 G_BEGIN_DECLS
 
diff --git a/camel/providers/imap/camel-imap-wrapper.h b/camel/providers/imap/camel-imap-wrapper.h
index c182181..3451eaf 100644
--- a/camel/providers/imap/camel-imap-wrapper.h
+++ b/camel/providers/imap/camel-imap-wrapper.h
@@ -24,15 +24,29 @@
 #define CAMEL_IMAP_WRAPPER_H 1
 
 #include <camel/camel-data-wrapper.h>
-#include "camel-imap-types.h"
 
-#define CAMEL_IMAP_WRAPPER_TYPE     (camel_imap_wrapper_get_type ())
-#define CAMEL_IMAP_WRAPPER(obj)     (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_IMAP_WRAPPER_TYPE, CamelImapWrapper))
-#define CAMEL_IMAP_WRAPPER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_IMAP_WRAPPER_TYPE, CamelImapWrapperClass))
-#define CAMEL_IS_IMAP_WRAPPER(o)    (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_IMAP_WRAPPER_TYPE))
+/* Standard GObject macros */
+#define CAMEL_TYPE_IMAP_WRAPPER \
+	(camel_imap_wrapper_get_type ())
+#define CAMEL_IMAP_WRAPPER(obj) \
+	(G_TYPE_CHECK_INSTANCE_CAST \
+	((obj), CAMEL_TYPE_IMAP_WRAPPER, CamelImapWrapper))
+#define CAMEL_IMAP_WRAPPER_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_CAST \
+	((cls), CAMEL_TYPE_IMAP_WRAPPER, CamelImapWrapperClass))
+#define CAMEL_IS_IMAP_WRAPPER(obj) \
+	(G_TYPE_CHECK_INSTANCE_TYPE \
+	((obj), CAMEL_TYPE_IMAP_WRAPPER))
+#define CAMEL_IS_IMAP_WRAPPER_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_TYPE \
+	((cls), CAMEL_TYPE_IMAP_WRAPPER))
+#define CAMEL_IMAP_WRAPPER_GET_CLASS(obj) \
+	(G_TYPE_INSTANCE_GET_CLASS \
+	((obj), CAMEL_TYPE_IMAP_WRAPPER, CamelImapWrapperClass))
 
 G_BEGIN_DECLS
 
+typedef struct _CamelImapWrapper CamelImapWrapper;
 typedef struct _CamelImapWrapperClass CamelImapWrapperClass;
 typedef struct _CamelImapWrapperPrivate CamelImapWrapperPrivate;
 
diff --git a/camel/providers/pop3/camel-pop3-engine.h b/camel/providers/pop3/camel-pop3-engine.h
index d144245..a964c87 100644
--- a/camel/providers/pop3/camel-pop3-engine.h
+++ b/camel/providers/pop3/camel-pop3-engine.h
@@ -25,14 +25,29 @@
 #include <camel/camel-list-utils.h>
 #include "camel-pop3-stream.h"
 
-#define CAMEL_POP3_ENGINE(obj)         G_TYPE_CHECK_INSTANCE_CAST (obj, camel_pop3_engine_get_type (), CamelPOP3Engine)
-#define CAMEL_POP3_ENGINE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_pop3_engine_get_type (), CamelPOP3EngineClass)
-#define CAMEL_IS_POP3_ENGINE(obj)      G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_pop3_engine_get_type ())
+/* Standard GObject macros */
+#define CAMEL_TYPE_POP3_ENGINE \
+	(camel_pop3_engine_get_type ())
+#define CAMEL_POP3_ENGINE(obj) \
+	(G_TYPE_CHECK_INSTANCE_CAST \
+	((obj), CAMEL_TYPE_POP3_ENGINE, CamelPOP3Engine))
+#define CAMEL_POP3_ENGINE_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_CAST \
+	((cls), CAMEL_TYPE_POP3_ENGINE, CamelPOP3EngineClass))
+#define CAMEL_IS_POP3_ENGINE(obj) \
+	(G_TYPE_CHECK_INSTANCE_TYPE \
+	((obj), CAMEL_TYPE_POP3_ENGINE))
+#define CAMEL_IS_POP3_ENGINE_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_TYPE \
+	((cls), CAMEL_TYPE_POP3_ENGINE))
+#define CAMEL_POP3_ENGINE_GET_CLASS(obj) \
+	(G_TYPE_INSTANCE_GET_CLASS \
+	((obj), CAMEL_TYPE_POP3_ENGINE, CamelPOP3EngineClass))
 
 G_BEGIN_DECLS
 
-typedef struct _CamelPOP3EngineClass CamelPOP3EngineClass;
 typedef struct _CamelPOP3Engine CamelPOP3Engine;
+typedef struct _CamelPOP3EngineClass CamelPOP3EngineClass;
 typedef struct _CamelPOP3Command CamelPOP3Command;
 
 /* pop 3 connection states, actually since we're given a connected socket, we always start in auth state */
diff --git a/camel/providers/pop3/camel-pop3-folder.h b/camel/providers/pop3/camel-pop3-folder.h
index 82e81d9..294e7d7 100644
--- a/camel/providers/pop3/camel-pop3-folder.h
+++ b/camel/providers/pop3/camel-pop3-folder.h
@@ -28,14 +28,32 @@
 
 #include "camel-folder.h"
 
-#define CAMEL_POP3_FOLDER_TYPE     (camel_pop3_folder_get_type ())
-#define CAMEL_POP3_FOLDER(obj)     (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_POP3_FOLDER_TYPE, CamelPOP3Folder))
-#define CAMEL_POP3_FOLDER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_POP3_FOLDER_TYPE, CamelPOP3FolderClass))
-#define CAMEL_IS_POP3_FOLDER(o)    (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_POP3_FOLDER_TYPE))
+/* Standard GObject macros */
+#define CAMEL_TYPE_POP3_FOLDER \
+	(camel_pop3_folder_get_type ())
+#define CAMEL_POP3_FOLDER(obj) \
+	(G_TYPE_CHECK_INSTANCE_CAST \
+	((obj), CAMEL_TYPE_POP3_FOLDER, CamelPOP3Folder))
+#define CAMEL_POP3_FOLDER_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_CAST \
+	((cls), CAMEL_TYPE_POP3_FOLDER, CamelPOP3FolderClass))
+#define CAMEL_IS_POP3_FOLDER(obj) \
+	(G_TYPE_CHECK_INSTANCE_TYPE \
+	((obj), CAMEL_TYPE_POP3_FOLDER))
+#define CAMEL_IS_POP3_FOLDER_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_TYPE \
+	((cls), CAMEL_TYPE_POP3_FOLDER))
+#define CAMEL_IS_POP3_FOLDER_GET_CLASS(obj) \
+	(G_TYPE_INSTANCE_GET_CLASS \
+	((obj), CAMEL_TYPE_POP3_FOLDER, CamelPOP3FolderClass))
 
 G_BEGIN_DECLS
 
-typedef struct {
+typedef struct _CamelPOP3Folder CamelPOP3Folder;
+typedef struct _CamelPOP3FolderClass CamelPOP3FolderClass;
+typedef struct _CamelPOP3FolderInfo CamelPOP3FolderInfo;
+
+struct _CamelPOP3FolderInfo {
 	guint32 id;
 	guint32 size;
 	guint32 flags;
@@ -44,22 +62,19 @@ typedef struct {
 	int err;
 	struct _CamelPOP3Command *cmd;
 	struct _CamelStream *stream;
-} CamelPOP3FolderInfo;
+};
 
-typedef struct {
-	CamelFolder parent_object;
+struct _CamelPOP3Folder {
+	CamelFolder parent;
 
 	GPtrArray *uids;
 	GHashTable *uids_uid;	/* messageinfo by uid */
 	GHashTable *uids_id;	/* messageinfo by id */
-} CamelPOP3Folder;
+};
 
-typedef struct {
+struct _CamelPOP3FolderClass {
 	CamelFolderClass parent_class;
-
-	/* Virtual methods */	
-	
-} CamelPOP3FolderClass;
+};
 
 /* public methods */
 CamelFolder *camel_pop3_folder_new (CamelStore *parent, CamelException *ex);
diff --git a/camel/providers/pop3/camel-pop3-stream.h b/camel/providers/pop3/camel-pop3-stream.h
index 8e12108..96f727e 100644
--- a/camel/providers/pop3/camel-pop3-stream.h
+++ b/camel/providers/pop3/camel-pop3-stream.h
@@ -26,14 +26,29 @@
 
 #include <camel/camel-stream.h>
 
-#define CAMEL_POP3_STREAM(obj)         G_TYPE_CHECK_INSTANCE_CAST (obj, camel_pop3_stream_get_type (), CamelPOP3Stream)
-#define CAMEL_POP3_STREAM_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_pop3_stream_get_type (), CamelPOP3StreamClass)
-#define CAMEL_IS_POP3_STREAM(obj)      G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_pop3_stream_get_type ())
+/* Standard GObject macros */
+#define CAMEL_TYPE_POP3_STREAM \
+	(camel_pop3_stream_get_type ())
+#define CAMEL_POP3_STREAM(obj) \
+	(G_TYPE_CHECK_INSTANCE_CAST \
+	((obj), CAMEL_TYPE_POP3_STREAM, CamelPOP3Stream))
+#define CAMEL_POP3_STREAM_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_CAST \
+	((cls), CAMEL_TYPE_POP3_STREAM, CamelPOP3StreamClass))
+#define CAMEL_IS_POP3_STREAM(obj) \
+	(G_TYPE_CHECK_INSTANCE_TYPE \
+	((obj), CAMEL_TYPE_POP3_STREAM))
+#define CAMEL_IS_POP3_STREAM_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_TYPE \
+	((cls), CAMEL_TYPE_POP3_STREAM))
+#define CAMEL_POP3_STREAM_GET_CLASS(obj) \
+	(G_TYPE_INSTANCE_GET_CLASS \
+	((obj), CAMEL_TYPE_POP3_STREAM, CamelPOP3StreamClass))
 
 G_BEGIN_DECLS
 
-typedef struct _CamelPOP3StreamClass CamelPOP3StreamClass;
 typedef struct _CamelPOP3Stream CamelPOP3Stream;
+typedef struct _CamelPOP3StreamClass CamelPOP3StreamClass;
 
 typedef enum {
 	CAMEL_POP3_STREAM_LINE,



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