diff options
| author | Matthew Barnes <mbarnes@redhat.com> | 2012-08-29 09:56:53 -0400 |
|---|---|---|
| committer | Matthew Barnes <mbarnes@redhat.com> | 2012-08-30 16:39:31 -0400 |
| commit | 63c6829df67c90bc4f666fb3159bde1bdbe4dcf3 (patch) | |
| tree | ee331e1780fe7c206ae48927a76ee228eab2f9fb /camel | |
| parent | 67fd9ecf95ef9484beddbbdeca807d08f3c50103 (diff) | |
| download | evolution-data-server-63c6829df67c90bc4f666fb3159bde1bdbe4dcf3.tar.gz | |
CamelIMAPXStream: Add a private structure.
Diffstat (limited to 'camel')
| -rw-r--r-- | camel/camel-imapx-stream.c | 12 | ||||
| -rw-r--r-- | camel/camel-imapx-stream.h | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/camel/camel-imapx-stream.c b/camel/camel-imapx-stream.c index 7ffcf3c1f..e0a5dd487 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 ec9a533c7..2c534e369 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 */ |
