[evolution-kolab] CamelIMAPXExtdStore: implemened ACL getter
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab] CamelIMAPXExtdStore: implemened ACL getter
- Date: Fri, 5 Oct 2012 16:32:26 +0000 (UTC)
commit f86c89543b490eb0432519291b78c7d4d15e8ed7
Author: Christian Hilberg <hilberg kernelconcepts de>
Date: Fri Oct 5 18:22:20 2012 +0200
CamelIMAPXExtdStore: implemened ACL getter
* implemented getter function for querying ACL
and MYRIGHTS from the IMAP server
src/libekolab/camel-imapx-extd-store.c | 43 +++++++++++++++++++++++++++++--
1 files changed, 40 insertions(+), 3 deletions(-)
---
diff --git a/src/libekolab/camel-imapx-extd-store.c b/src/libekolab/camel-imapx-extd-store.c
index 9d749fe..ce6d98d 100644
--- a/src/libekolab/camel-imapx-extd-store.c
+++ b/src/libekolab/camel-imapx-extd-store.c
@@ -564,16 +564,53 @@ imapx_extd_store_get_acl (CamelIMAPXExtdStore *self,
GCancellable *cancellable,
GError **err)
{
+ CamelIMAPXExtdStorePrivate *priv = NULL;
+ CamelIMAPXServer *is = NULL;
+ CamelImapxAcl *acl = NULL;
+ GError *tmp_err = NULL;
+ gboolean ok = TRUE;
+
g_assert (CAMEL_IS_IMAPX_EXTD_STORE (self));
g_assert (spec != NULL);
g_assert (spec->mbox_name != NULL);
/* cancellable may be NULL */
g_return_val_if_fail (err == NULL || *err == NULL, NULL);
- /* FIXME implement me */
- g_warning ("%s()[%u] FIXME implement me", __func__, __LINE__);
+ priv = CAMEL_IMAPX_EXTD_STORE_PRIVATE (self);
+
+ is = imapx_extd_store_get_server (CAMEL_IMAPX_STORE (self),
+ NULL,
+ cancellable,
+ &tmp_err);
+ if (is == NULL)
+ goto exit;
+
+ if (spec->type & CAMEL_IMAPX_ACL_TYPE_GENERAL) {
+ ok = camel_imapx_extd_server_get_acl (is,
+ spec->mbox_name,
+ cancellable,
+ &tmp_err);
+ if (! ok)
+ goto exit;
+ }
+
+ if (spec->type & CAMEL_IMAPX_ACL_TYPE_MYRIGHTS) {
+ ok = camel_imapx_extd_server_get_myrights (is,
+ spec->mbox_name,
+ cancellable,
+ &tmp_err);
+ if (! ok)
+ goto exit;
+ }
+
+ if (do_resect)
+ acl = camel_imapx_acl_resect (priv->acl);
+
+ exit:
+ if (tmp_err != NULL)
+ g_propagate_error (err, tmp_err);
- return NULL;
+ return acl;
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]