CamelPOP3Store cleanups.
authorMatthew Barnes <mbarnes@redhat.com>
Tue, 19 Jul 2011 20:02:58 +0000 (15:02 -0500)
committerMatthew Barnes <mbarnes@redhat.com>
Thu, 21 Jul 2011 15:46:28 +0000 (10:46 -0500)
camel/providers/pop3/camel-pop3-store.c
camel/providers/pop3/camel-pop3-store.h

index a2a0ca8..3a194e0 100644 (file)
 #include <ws2tcpip.h>
 #endif
 
+#define CAMEL_POP3_STORE_GET_PRIVATE(obj) \
+       (G_TYPE_INSTANCE_GET_PRIVATE \
+       ((obj), CAMEL_TYPE_POP3_STORE, CamelPOP3StorePrivate))
+
 /* Specified in RFC 1939 */
 #define POP3_PORT  110
 #define POP3S_PORT 995
 /* defines the length of the server error message we can display in the error dialog */
 #define POP3_ERROR_SIZE_LIMIT 60
 
+struct _CamelPOP3StorePrivate {
+       gint placeholder;
+};
+
 enum {
        PROP_0,
        PROP_DEFAULT_PORT,
@@ -816,6 +824,8 @@ camel_pop3_store_class_init (CamelPOP3StoreClass *class)
        CamelServiceClass *service_class;
        CamelStoreClass *store_class;
 
+       g_type_class_add_private (class, sizeof (CamelPOP3StorePrivate));
+
        object_class = G_OBJECT_CLASS (class);
        object_class->set_property = pop3_store_set_property;
        object_class->get_property = pop3_store_get_property;
@@ -863,6 +873,7 @@ camel_network_service_init (CamelNetworkServiceInterface *interface)
 static void
 camel_pop3_store_init (CamelPOP3Store *pop3_store)
 {
+       pop3_store->priv = CAMEL_POP3_STORE_GET_PRIVATE (pop3_store);
 }
 
 /**
index bc16917..02bb7ff 100644 (file)
@@ -53,9 +53,11 @@ G_BEGIN_DECLS
 
 typedef struct _CamelPOP3Store CamelPOP3Store;
 typedef struct _CamelPOP3StoreClass CamelPOP3StoreClass;
+typedef struct _CamelPOP3StorePrivate CamelPOP3StorePrivate;
 
 struct _CamelPOP3Store {
        CamelStore parent;
+       CamelPOP3StorePrivate *priv;
 
        CamelPOP3Engine *engine; /* pop processing engine */
 
@@ -70,15 +72,18 @@ struct _CamelPOP3StoreClass {
        CamelStoreClass parent_class;
 };
 
-GType camel_pop3_store_get_type (void);
-
-/* public methods */
-void camel_pop3_store_expunge (CamelPOP3Store *store, GError **error);
-
-/* support functions */
-enum { CAMEL_POP3_OK, CAMEL_POP3_ERR, CAMEL_POP3_FAIL };
-gint camel_pop3_command (CamelPOP3Store *store, gchar **ret, GError **error, gchar *fmt, ...);
-gchar *camel_pop3_command_get_additional_data (CamelPOP3Store *store, gint total, GError **error);
+GType          camel_pop3_store_get_type       (void);
+void           camel_pop3_store_expunge        (CamelPOP3Store *store,
+                                                GError **error);
+gint           camel_pop3_command              (CamelPOP3Store *store,
+                                                gchar **ret,
+                                                GError **error,
+                                                gchar *fmt,
+                                                ...);
+gchar *                camel_pop3_command_get_additional_data
+                                               (CamelPOP3Store *store,
+                                                gint total,
+                                                GError **error);
 
 G_END_DECLS