[evolution-kolab] CamelImapxAcl: added "spec" datastructure for specifying a query
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab] CamelImapxAcl: added "spec" datastructure for specifying a query
- Date: Tue, 2 Oct 2012 09:55:07 +0000 (UTC)
commit e1cd33bad26e73c6a62a084aaef5da53044f4a38
Author: Christian Hilberg <hilberg kernelconcepts de>
Date: Tue Oct 2 11:36:48 2012 +0200
CamelImapxAcl: added "spec" datastructure for specifying a query
* added new datastructure analogous to the one for metadata
* allows specifying the kind (ACL/myrights/both) and the
folder to get ACL data for
src/libekolab/camel-imapx-acl.c | 28 ++++++++++++++++++++++++++++
src/libekolab/camel-imapx-acl.h | 18 ++++++++++++++++++
2 files changed, 46 insertions(+), 0 deletions(-)
---
diff --git a/src/libekolab/camel-imapx-acl.c b/src/libekolab/camel-imapx-acl.c
index 04c0fe5..11b1778 100644
--- a/src/libekolab/camel-imapx-acl.c
+++ b/src/libekolab/camel-imapx-acl.c
@@ -77,6 +77,34 @@ imapx_acl_entry_gdestroy (gpointer data)
/*----------------------------------------------------------------------------*/
+CamelImapxAclSpec*
+camel_imapx_acl_spec_new (const gchar *mbox_name,
+ CamelImapxAclType type)
+{
+ CamelImapxAclSpec *spec = NULL;
+
+ g_return_val_if_fail (mbox_name != NULL, NULL);
+ g_return_val_if_fail (type > 0, NULL);
+
+ spec = g_new0 (CamelImapxAclSpec, 1);
+ spec->mbox_name = g_strdup (mbox_name);
+ spec->type = type;
+
+ return spec;
+}
+
+void
+camel_imapx_acl_spec_free (CamelImapxAclSpec *spec)
+{
+ if (spec == NULL)
+ return;
+
+ if (spec->mbox_name != NULL)
+ g_free (spec->mbox_name);
+
+ g_free (spec);
+}
+
CamelImapxAclEntry*
camel_imapx_acl_entry_new (const gchar *access_id,
const gchar *rights,
diff --git a/src/libekolab/camel-imapx-acl.h b/src/libekolab/camel-imapx-acl.h
index f43368c..eaf4f27 100644
--- a/src/libekolab/camel-imapx-acl.h
+++ b/src/libekolab/camel-imapx-acl.h
@@ -38,9 +38,20 @@
/*----------------------------------------------------------------------------*/
+typedef enum {
+ CAMEL_IMAPX_ACL_TYPE_NONE = 0,
+ CAMEL_IMAPX_ACL_TYPE_MYRIGHTS = 1 << 0,
+ CAMEL_IMAPX_ACL_TYPE_GENERAL = 1 << 1
+} CamelImapxAclType;
/*----------------------------------------------------------------------------*/
+typedef struct _CamelImapxAclSpec CamelImapxAclSpec;
+struct _CamelImapxAclSpec {
+ gchar *mbox_name;
+ CamelImapxAclType type;
+};
+
typedef struct _CamelImapxAclEntry CamelImapxAclEntry;
struct _CamelImapxAclEntry {
gchar *access_id;
@@ -56,6 +67,13 @@ struct _CamelImapxAcl {
/*----------------------------------------------------------------------------*/
+CamelImapxAclSpec*
+camel_imapx_acl_spec_new (const gchar *mbox_name,
+ CamelImapxAclType type);
+
+void
+camel_imapx_acl_spec_free (CamelImapxAclSpec *spec);
+
CamelImapxAclEntry*
camel_imapx_acl_entry_new (const gchar *access_id,
const gchar *rights,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]