[evolution-kolab/ek-wip-porting] CamelKolabIMAPXFolder: added new() API function skeleton



commit 4f1b869829c9b534cd12bf1bf34dfdaa02282f4c
Author: Christian Hilberg <hilberg kernelconcepts de>
Date:   Mon Jan 16 19:11:05 2012 +0100

    CamelKolabIMAPXFolder: added new() API function skeleton
    
    * added API function skeleton to create a new instance
      of this class
    * needs actual implementation

 src/camel/camel-kolab-imapx-folder.c |   26 +++++++++++++++++++++++++-
 src/camel/camel-kolab-imapx-folder.h |   10 ++++++++++
 2 files changed, 35 insertions(+), 1 deletions(-)
---
diff --git a/src/camel/camel-kolab-imapx-folder.c b/src/camel/camel-kolab-imapx-folder.c
index 8f82a39..6c84b4d 100644
--- a/src/camel/camel-kolab-imapx-folder.c
+++ b/src/camel/camel-kolab-imapx-folder.c
@@ -29,6 +29,7 @@
 #include <config.h>
 #endif
 
+#include "camel-kolab-imapx-store.h"
 #include "camel-kolab-imapx-folder.h"
 
 /*----------------------------------------------------------------------------*/
@@ -98,7 +99,6 @@ static void
 camel_kolab_imapx_folder_class_init (CamelKolabIMAPXFolderClass *klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-	CamelIMAPXExtdFolderClass *parent_class = CAMEL_IMAPX_EXTD_FOLDER_CLASS (klass);
 
 	/* g_type_class_add_private (klass, sizeof (CamelKolabIMAPXFolderPrivate)); */
 
@@ -109,6 +109,30 @@ camel_kolab_imapx_folder_class_init (CamelKolabIMAPXFolderClass *klass)
 /*----------------------------------------------------------------------------*/
 /* API functions */
 
+CamelKolabIMAPXFolder*
+camel_kolab_imapx_folder_new (CamelKolabIMAPXStore *store,
+                             const gchar *folderdir,
+                             const gchar *foldername,
+                             GError **err)
+{
+	CamelKolabIMAPXFolder *folder = NULL;
+
+	g_assert (CAMEL_IS_KOLAB_IMAPX_STORE (store));
+	g_assert (folderdir != NULL);
+	g_assert (foldername != NULL);
+	g_return_val_if_fail (err == NULL || *err == NULL, NULL);
+
+	/* FIXME implement me
+	 *
+	 * We'll need to dupe camel_imapx_folder_new() here
+	 * and create our extd types
+	 *
+	 */
+	g_error ("%s: FIXME implement me", __func__);
+
+	return folder;
+}
+
 guint64
 camel_kolab_imapx_folder_get_uidvalidity (CamelKolabIMAPXFolder *self,
                                           GError **err)
diff --git a/src/camel/camel-kolab-imapx-folder.h b/src/camel/camel-kolab-imapx-folder.h
index 5439393..d212650 100644
--- a/src/camel/camel-kolab-imapx-folder.h
+++ b/src/camel/camel-kolab-imapx-folder.h
@@ -38,6 +38,10 @@
 #include <libekolabutil/kolab-util-folder.h>
 
 /*----------------------------------------------------------------------------*/
+
+struct _CamelKolabIMAPXStore;
+
+/*----------------------------------------------------------------------------*/
 /* Folder metadata */
 
 typedef struct _CamelKolabImapxFolderMetadata CamelKolabImapxFolderMetadata;
@@ -92,6 +96,12 @@ struct _CamelKolabIMAPXFolderClass {
 GType
 camel_kolab_imapx_folder_get_type (void);
 
+CamelKolabIMAPXFolder*
+camel_kolab_imapx_folder_new (struct _CamelKolabIMAPXStore *store,
+                              const gchar *folder_dir,
+                              const gchar *foldername,
+                              GError **err);
+
 guint64
 camel_kolab_imapx_folder_get_uidvalidity (CamelKolabIMAPXFolder *self,
                                           GError **err);



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