dovecot-2.2: lib-storage: Added mailbox_attribute_register_inter...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Sep 7 13:41:07 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/2e420ceaee1d
changeset: 19105:2e420ceaee1d
user: Timo Sirainen <tss at iki.fi>
date: Mon Sep 07 16:39:28 2015 +0300
description:
lib-storage: Added mailbox_attribute_register_internals()
Just for making it easier to register multiple attributes.
diffstat:
src/lib-storage/mailbox-attribute.c | 9 +++++++++
src/lib-storage/mailbox-attribute.h | 2 ++
2 files changed, 11 insertions(+), 0 deletions(-)
diffs (31 lines):
diff -r 04ed3c9c330f -r 2e420ceaee1d src/lib-storage/mailbox-attribute.c
--- a/src/lib-storage/mailbox-attribute.c Mon Sep 07 16:23:40 2015 +0300
+++ b/src/lib-storage/mailbox-attribute.c Mon Sep 07 16:39:28 2015 +0300
@@ -51,6 +51,15 @@
array_insert(&mailbox_internal_attributes, insert_idx, &ireg, 1);
}
+void mailbox_attribute_register_internals(
+ const struct mailbox_attribute_internal *iattrs, unsigned int count)
+{
+ unsigned int i;
+
+ for (i = 0; i < count; i++)
+ mailbox_attribute_register_internal(&iattrs[i]);
+}
+
static const struct mailbox_attribute_internal *
mailbox_internal_attribute_get(enum mail_attribute_type type,
const char *key)
diff -r 04ed3c9c330f -r 2e420ceaee1d src/lib-storage/mailbox-attribute.h
--- a/src/lib-storage/mailbox-attribute.h Mon Sep 07 16:23:40 2015 +0300
+++ b/src/lib-storage/mailbox-attribute.h Mon Sep 07 16:39:28 2015 +0300
@@ -103,6 +103,8 @@
void mailbox_attribute_register_internal(
const struct mailbox_attribute_internal *iattr);
+void mailbox_attribute_register_internals(
+ const struct mailbox_attribute_internal *iattrs, unsigned int count);
/*
* Attribute API
More information about the dovecot-cvs
mailing list