[evolution-kolab/ek-wip-porting-imapx: 7/12] CamelKolabIMAPXFolder: added metadata new/free functions
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab/ek-wip-porting-imapx: 7/12] CamelKolabIMAPXFolder: added metadata new/free functions
- Date: Wed, 30 Nov 2011 11:27:27 +0000 (UTC)
commit 0ef08942e46cb4521b6cdf4a2570c35fc939b179
Author: Christian Hilberg <hilberg kernelconcepts de>
Date: Wed Nov 30 11:31:41 2011 +0100
CamelKolabIMAPXFolder: added metadata new/free functions
* added functions for creating / freeing
CamelKolabImapxFolderMetadata objects
* include the CamelIMAPXFolder extension header
* fixed the camel_kolab_imapx_folder_get_uidvalidity()
function
src/camel/camel-kolab-imapx-folder.c | 37 +++++++++++++++++++++++++++------
src/camel/camel-kolab-imapx-folder.h | 15 ++++++++++++-
2 files changed, 44 insertions(+), 8 deletions(-)
---
diff --git a/src/camel/camel-kolab-imapx-folder.c b/src/camel/camel-kolab-imapx-folder.c
index 5158b4a..8895f49 100644
--- a/src/camel/camel-kolab-imapx-folder.c
+++ b/src/camel/camel-kolab-imapx-folder.c
@@ -25,12 +25,38 @@
/*----------------------------------------------------------------------------*/
-#include <camel/providers/imapx/camel-imapx-folder.h>
-
+#include "providers/imapx/camel-imapx-folder-extn.h"
#include "camel-kolab-imapx-folder.h"
/*----------------------------------------------------------------------------*/
+CamelKolabImapxFolderMetadata*
+camel_kolab_imapx_folder_metadata_new (void)
+{
+ CamelKolabImapxFolderMetadata *kfmd = NULL;
+ kfmd = g_new0 (CamelKolabImapxFolderMetadata, 1);
+ kfmd->folder_type = KOLAB_FOLDER_TYPE_INVAL;
+ return kfmd;
+}
+
+gboolean
+camel_kolab_imapx_folder_metadata_free (CamelKolabImapxFolderMetadata *kfmd)
+{
+ if (kfmd == NULL)
+ return TRUE;
+ g_free (kfmd);
+ return TRUE;
+}
+
+void
+camel_kolab_imapx_folder_metadata_gdestroy (gpointer data)
+{
+ CamelKolabImapxFolderMetadata *kfmd = (CamelKolabImapxFolderMetadata *)data;
+ (void)camel_kolab_imapx_folder_metadata_free (kfmd);
+}
+
+/*----------------------------------------------------------------------------*/
+
guint64
camel_kolab_imapx_folder_get_uidvalidity (CamelFolder *folder,
GError **err)
@@ -41,8 +67,8 @@ camel_kolab_imapx_folder_get_uidvalidity (CamelFolder *folder,
g_assert (CAMEL_IS_FOLDER (folder));
g_return_val_if_fail (err == NULL || *err == NULL, 0);
- uidvalidity = __KOLAB_camel_imapx_folder_get_uidvalidity (folder,
- &tmp_err);
+ uidvalidity = camel_imapx_folder_extn_get_uidvalidity (folder,
+ &tmp_err);
if (tmp_err != NULL) {
g_propagate_error (err, tmp_err);
return 0;
@@ -52,6 +78,3 @@ camel_kolab_imapx_folder_get_uidvalidity (CamelFolder *folder,
}
/*----------------------------------------------------------------------------*/
-
-
-/*----------------------------------------------------------------------------*/
diff --git a/src/camel/camel-kolab-imapx-folder.h b/src/camel/camel-kolab-imapx-folder.h
index 8a21ce2..6858b5d 100644
--- a/src/camel/camel-kolab-imapx-folder.h
+++ b/src/camel/camel-kolab-imapx-folder.h
@@ -31,10 +31,23 @@
/*----------------------------------------------------------------------------*/
#include <glib.h>
-#include <camel/camel-folder.h>
+#include <camel/camel.h>
+
+#include <libekolabutil/kolab-util-folder.h>
/*----------------------------------------------------------------------------*/
+typedef struct _CamelKolabImapxFolderMetadata {
+ /* folder name kept as key in CamelKolabImapxMetadata kolab_metadata */
+ KolabFolderTypeID folder_type;
+} CamelKolabImapxFolderMetadata;
+
+/*----------------------------------------------------------------------------*/
+
+CamelKolabImapxFolderMetadata *camel_kolab_imapx_folder_metadata_new (void);
+gboolean camel_kolab_imapx_folder_metadata_free (CamelKolabImapxFolderMetadata *kfmd);
+void camel_kolab_imapx_folder_metadata_gdestroy (gpointer data);
+
guint64 camel_kolab_imapx_folder_get_uidvalidity (CamelFolder *folder, GError **err);
/*----------------------------------------------------------------------------*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]