[evolution-data-server] CamelIMAPXStream: Add a private structure.



commit 63c6829df67c90bc4f666fb3159bde1bdbe4dcf3
Author: Matthew Barnes <mbarnes redhat com>
Date:   Wed Aug 29 09:56:53 2012 -0400

    CamelIMAPXStream: Add a private structure.

 camel/camel-imapx-stream.c              |   12 ++++++++++++
 camel/camel-imapx-stream.h              |    2 ++
 docs/reference/camel/camel-sections.txt |    1 +
 3 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/camel/camel-imapx-stream.c b/camel/camel-imapx-stream.c
index 7ffcf3c..e0a5dd4 100644
--- a/camel/camel-imapx-stream.c
+++ b/camel/camel-imapx-stream.c
@@ -36,9 +36,17 @@
 #include "camel-imapx-utils.h"
 #include "camel-imapx-stream.h"
 
+#define CAMEL_IMAPX_STREAM_GET_PRIVATE(obj) \
+	(G_TYPE_INSTANCE_GET_PRIVATE \
+	((obj), CAMEL_TYPE_IMAPX_STREAM, CamelIMAPXStreamPrivate))
+
 #define t(...) camel_imapx_debug(token, __VA_ARGS__)
 #define io(...) camel_imapx_debug(io, __VA_ARGS__)
 
+struct _CamelIMAPXStreamPrivate {
+	gint placeholder;
+};
+
 G_DEFINE_TYPE (CamelIMAPXStream, camel_imapx_stream, CAMEL_TYPE_STREAM)
 
 static gint
@@ -192,6 +200,8 @@ camel_imapx_stream_class_init (CamelIMAPXStreamClass *class)
 	GObjectClass *object_class;
 	CamelStreamClass *stream_class;
 
+	g_type_class_add_private (class, sizeof (CamelIMAPXStreamPrivate));
+
 	object_class = G_OBJECT_CLASS (class);
 	object_class->dispose = imapx_stream_dispose;
 	object_class->finalize = imapx_stream_finalize;
@@ -207,6 +217,8 @@ camel_imapx_stream_class_init (CamelIMAPXStreamClass *class)
 static void
 camel_imapx_stream_init (CamelIMAPXStream *is)
 {
+	is->priv = CAMEL_IMAPX_STREAM_GET_PRIVATE (is);
+
 	/* +1 is room for appending a 0 if we need to for a token */
 	is->bufsize = 4096;
 	is->ptr = is->end = is->buf = g_malloc (is->bufsize + 1);
diff --git a/camel/camel-imapx-stream.h b/camel/camel-imapx-stream.h
index ec9a533..2c534e3 100644
--- a/camel/camel-imapx-stream.h
+++ b/camel/camel-imapx-stream.h
@@ -55,6 +55,7 @@ G_BEGIN_DECLS
 
 typedef struct _CamelIMAPXStream CamelIMAPXStream;
 typedef struct _CamelIMAPXStreamClass CamelIMAPXStreamClass;
+typedef struct _CamelIMAPXStreamPrivate CamelIMAPXStreamPrivate;
 
 typedef enum {
 	IMAPX_TOK_PROTOCOL = -2,
@@ -67,6 +68,7 @@ typedef enum {
 
 struct _CamelIMAPXStream {
 	CamelStream parent;
+	CamelIMAPXStreamPrivate *priv;
 
 	CamelStream *source;
 	gchar tagprefix; /* For debugging output */
diff --git a/docs/reference/camel/camel-sections.txt b/docs/reference/camel/camel-sections.txt
index 16f62a4..c9b3dcf 100644
--- a/docs/reference/camel/camel-sections.txt
+++ b/docs/reference/camel/camel-sections.txt
@@ -1000,6 +1000,7 @@ CAMEL_IS_IMAPX_STREAM_CLASS
 CAMEL_IMAPX_STREAM_GET_CLASS
 CamelIMAPXStreamClass
 <SUBSECTION Private>
+CamelIMAPXStreamPrivate
 camel_imapx_stream_get_type
 </SECTION>
 



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