[evolution-kolab] CamelIMAPXExtdStore: implemented ACL setter



commit e5bfb27f9ee6808d9e5fb24e09ae0ab591ebab1c
Author: Christian Hilberg <hilberg kernelconcepts de>
Date:   Tue Oct 16 15:35:46 2012 +0200

    CamelIMAPXExtdStore: implemented ACL setter
    
    * added implementation for ACL setting
    * wraps a single call into the extended
      IMAPX server

 src/libekolab/camel-imapx-extd-store.c |   25 ++++++++++++++++++++++---
 src/libekolab/camel-imapx-extd-store.h |    1 +
 2 files changed, 23 insertions(+), 3 deletions(-)
---
diff --git a/src/libekolab/camel-imapx-extd-store.c b/src/libekolab/camel-imapx-extd-store.c
index 594d955..282eb9c 100644
--- a/src/libekolab/camel-imapx-extd-store.c
+++ b/src/libekolab/camel-imapx-extd-store.c
@@ -620,16 +620,35 @@ imapx_extd_store_set_acl (CamelIMAPXExtdStore *self,
                           GCancellable *cancellable,
                           GError **err)
 {
+	CamelIMAPXServer *is = NULL;
+	GError *tmp_err = NULL;
+	gboolean ok = FALSE;
+
 	g_assert (CAMEL_IS_IMAPX_EXTD_STORE (self));
 	g_assert (foldername != NULL);
 	/* entries may be NULL */
 	/* cancellable may be NULL */
 	g_return_val_if_fail (err == NULL || *err == NULL, FALSE);
 
-	/* FIXME implement me */
-	g_warning ("%s()[%u] FIXME implement me", __func__, __LINE__);
+	is = imapx_extd_store_get_server (CAMEL_IMAPX_STORE (self),
+	                                  NULL,
+	                                  cancellable,
+	                                  &tmp_err);
+	if (is == NULL)
+		goto exit;
+
+	ok = camel_imapx_extd_server_set_acl (is,
+	                                      foldername,
+	                                      entries,
+	                                      cancellable,
+	                                      &tmp_err);
+ exit:
+	if (tmp_err != NULL) {
+		g_propagate_error (err, tmp_err);
+		ok = FALSE;
+	}
 
-	return TRUE;
+	return ok;
 }
 
 /*----------------------------------------------------------------------------*/
diff --git a/src/libekolab/camel-imapx-extd-store.h b/src/libekolab/camel-imapx-extd-store.h
index 7fb8c2f..b158f0a 100644
--- a/src/libekolab/camel-imapx-extd-store.h
+++ b/src/libekolab/camel-imapx-extd-store.h
@@ -36,6 +36,7 @@
 
 #include <libekolabutil/camel-system-headers.h>
 
+#include "camel-imapx-acl.h"
 #include "camel-imapx-extd-server.h"
 
 /*----------------------------------------------------------------------------*/



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