[evolution-kolab: 7/13] libekolabutil: new function for getting uidvalidity from CamelIMAPXFolder



commit 499649c6f69822f7a5842cc53a8e704807115726
Author: Christian Hilberg <hilberg kernelconcepts de>
Date:   Fri May 25 17:01:09 2012 +0200

    libekolabutil: new function for getting uidvalidity from CamelIMAPXFolder
    
    * this function originates from the CamelIMAPXExtdFolder
    * it was the only extension CamelIMAPXExtdFolder provided
      over CamelIMAPXFolder, so the former GObject was removed
      and the extension function moved to the util lib

 src/libekolabutil/kolab-util-camel.c |   15 ++++++++++++++-
 src/libekolabutil/kolab-util-camel.h |    8 +++++++-
 2 files changed, 21 insertions(+), 2 deletions(-)
---
diff --git a/src/libekolabutil/kolab-util-camel.c b/src/libekolabutil/kolab-util-camel.c
index 2e539a3..131bcf4 100644
--- a/src/libekolabutil/kolab-util-camel.c
+++ b/src/libekolabutil/kolab-util-camel.c
@@ -31,7 +31,6 @@
 
 #include <libedataserver/e-data-server-util.h>
 
-#include "camel-system-headers.h"
 #include "kolab-util-error.h"
 #include "kolab-util-glib.h"
 #include "kolab-util-camel.h"
@@ -105,4 +104,18 @@ kolab_util_camel_get_storage_path (CamelService *service,
 	return store_path;
 }
 
+guint64
+kolab_util_camel_imapx_folder_get_uidvalidity (CamelIMAPXFolder *folder)
+{
+	CamelIMAPXFolder *ifolder = NULL;
+	guint64 uidvalidity = 0;
+
+	ifolder = CAMEL_IMAPX_FOLDER (folder);
+
+	/* TODO check whether we need to hold folder lock here */
+	uidvalidity = ifolder->uidvalidity_on_server;
+
+	return uidvalidity;
+}
+
 /*----------------------------------------------------------------------------*/
diff --git a/src/libekolabutil/kolab-util-camel.h b/src/libekolabutil/kolab-util-camel.h
index 8b66301..f5790ba 100644
--- a/src/libekolabutil/kolab-util-camel.h
+++ b/src/libekolabutil/kolab-util-camel.h
@@ -58,7 +58,13 @@ gboolean kolab_util_camel_shutdown (GError **err);
 /*----------------------------------------------------------------------------*/
 /* Camel helper functions */
 
-gchar* kolab_util_camel_get_storage_path (CamelService *service, CamelSession *session, GError **err);
+gchar*
+kolab_util_camel_get_storage_path (CamelService *service,
+                                   CamelSession *session,
+                                   GError **err);
+
+guint64
+kolab_util_camel_imapx_folder_get_uidvalidity (CamelIMAPXFolder *folder);
 
 /*----------------------------------------------------------------------------*/
 



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