[evolution-kolab] CamelIMAPXExtdStore: stubbed in ACL getter/setter functions
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab] CamelIMAPXExtdStore: stubbed in ACL getter/setter functions
- Date: Tue, 2 Oct 2012 09:55:18 +0000 (UTC)
commit d44486b4ee82c493490e4a9f6b4936176c8017e9
Author: Christian Hilberg <hilberg kernelconcepts de>
Date: Tue Oct 2 11:41:18 2012 +0200
CamelIMAPXExtdStore: stubbed in ACL getter/setter functions
* new API functions for getting and setting ACL data,
analogous to the ones for metadata
src/libekolab/camel-imapx-extd-store.c | 80 ++++++++++++++++++++++++++++++-
src/libekolab/camel-imapx-extd-store.h | 24 ++++++++++
2 files changed, 101 insertions(+), 3 deletions(-)
---
diff --git a/src/libekolab/camel-imapx-extd-store.c b/src/libekolab/camel-imapx-extd-store.c
index 5f3c371..9d749fe 100644
--- a/src/libekolab/camel-imapx-extd-store.c
+++ b/src/libekolab/camel-imapx-extd-store.c
@@ -276,7 +276,7 @@ imapx_extd_store_delete_folder_sync (CamelStore *self,
{
CamelIMAPXExtdStore *myself = NULL;
CamelIMAPXExtdStorePrivate *priv = NULL;
-
+
gboolean ok = FALSE;
g_assert (CAMEL_IS_IMAPX_EXTD_STORE (self));
@@ -291,7 +291,7 @@ imapx_extd_store_delete_folder_sync (CamelStore *self,
if (ok) {
myself = CAMEL_IMAPX_EXTD_STORE (self);
priv = CAMEL_IMAPX_EXTD_STORE_PRIVATE (myself);
-
+
/* delete folder metadata entry from our
* hash table so we will not return a wrong
* folder annotation if a folder with the
@@ -301,7 +301,7 @@ imapx_extd_store_delete_folder_sync (CamelStore *self,
(void) camel_imapx_metadata_remove_metadata (priv->md,
foldername);
}
-
+
return ok;
}
@@ -557,6 +557,42 @@ imapx_extd_store_set_metadata (CamelIMAPXExtdStore *self,
return TRUE;
}
+static CamelImapxAcl*
+imapx_extd_store_get_acl (CamelIMAPXExtdStore *self,
+ CamelImapxAclSpec *spec,
+ gboolean do_resect,
+ GCancellable *cancellable,
+ GError **err)
+{
+ 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__);
+
+ return NULL;
+}
+
+static gboolean
+imapx_extd_store_set_acl (CamelIMAPXExtdStore *self,
+ CamelImapxAcl *acl,
+ GCancellable *cancellable,
+ GError **err)
+{
+ g_assert (CAMEL_IS_IMAPX_EXTD_STORE (self));
+ g_assert (acl != 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__);
+
+ return FALSE;
+}
+
/*----------------------------------------------------------------------------*/
/* interface functions */
@@ -735,6 +771,8 @@ camel_imapx_extd_store_class_init (CamelIMAPXExtdStoreClass *klass)
klass->metadata_get_proto = imapx_extd_store_metadata_get_proto;
klass->get_metadata = imapx_extd_store_get_metadata;
klass->set_metadata = imapx_extd_store_set_metadata;
+ klass->get_acl = imapx_extd_store_get_acl;
+ klass->set_acl = imapx_extd_store_set_acl;
}
/*----------------------------------------------------------------------------*/
@@ -806,6 +844,42 @@ camel_imapx_extd_store_set_metadata (CamelIMAPXExtdStore *self,
err);
}
+CamelImapxAcl*
+camel_imapx_extd_store_get_acl (CamelIMAPXExtdStore *self,
+ CamelImapxAclSpec *spec,
+ gboolean do_resect,
+ GCancellable *cancellable,
+ GError **err)
+{
+ CamelIMAPXExtdStoreClass *klass = NULL;
+
+ g_return_val_if_fail (CAMEL_IS_IMAPX_EXTD_STORE (self), FALSE);
+
+ klass = CAMEL_IMAPX_EXTD_STORE_GET_CLASS (self);
+ return klass->get_acl (self,
+ spec,
+ do_resect,
+ cancellable,
+ err);
+}
+
+gboolean
+camel_imapx_extd_store_set_acl (CamelIMAPXExtdStore *self,
+ CamelImapxAcl *acl,
+ GCancellable *cancellable,
+ GError **err)
+{
+ CamelIMAPXExtdStoreClass *klass = NULL;
+
+ g_return_val_if_fail (CAMEL_IS_IMAPX_EXTD_STORE (self), FALSE);
+
+ klass = CAMEL_IMAPX_EXTD_STORE_GET_CLASS (self);
+ return klass->set_acl (self,
+ acl,
+ cancellable,
+ err);
+}
+
/*----------------------------------------------------------------------------*/
/* "friend" API */
diff --git a/src/libekolab/camel-imapx-extd-store.h b/src/libekolab/camel-imapx-extd-store.h
index c721a25..39b315b 100644
--- a/src/libekolab/camel-imapx-extd-store.h
+++ b/src/libekolab/camel-imapx-extd-store.h
@@ -88,6 +88,17 @@ struct _CamelIMAPXExtdStoreClass {
CamelImapxMetadata *md,
GCancellable *cancellable,
GError **err);
+
+ CamelImapxAcl* (*get_acl) (CamelIMAPXExtdStore *self,
+ CamelImapxAclSpec *spec,
+ gboolean do_resect,
+ GCancellable *cancellable,
+ GError **err);
+
+ gboolean (*set_acl) (CamelIMAPXExtdStore *self,
+ CamelImapxAcl *acl,
+ GCancellable *cancellable,
+ GError **err);
};
GType
@@ -115,6 +126,19 @@ camel_imapx_extd_store_set_metadata (CamelIMAPXExtdStore *self,
GCancellable *cancellable,
GError **err);
+CamelImapxAcl*
+camel_imapx_extd_store_get_acl (CamelIMAPXExtdStore *self,
+ CamelImapxAclSpec *spec,
+ gboolean do_resect,
+ GCancellable *cancellable,
+ GError **err);
+
+gboolean
+camel_imapx_extd_store_set_acl (CamelIMAPXExtdStore *self,
+ CamelImapxAcl *acl,
+ GCancellable *cancellable,
+ GError **err);
+
G_END_DECLS
/*----------------------------------------------------------------------------*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]