int index_storage_attribute_set(struct mailbox_transaction_context *t,
enum mail_attribute_type type, const char *key,
- const struct mail_attribute_value *value,
- bool unused ATTR_UNUSED)
+ const struct mail_attribute_value *value)
{
struct dict_transaction_context *dtrans;
const char *mailbox_prefix;
int index_storage_attribute_get(struct mailbox *box,
enum mail_attribute_type type, const char *key,
- struct mail_attribute_value *value_r,
- bool unused ATTR_UNUSED)
+ struct mail_attribute_value *value_r)
{
struct dict *dict;
const char *mailbox_prefix, *error;
int index_storage_attribute_set(struct mailbox_transaction_context *t,
enum mail_attribute_type type, const char *key,
- const struct mail_attribute_value *value,
- bool unused);
+ const struct mail_attribute_value *value);
int index_storage_attribute_get(struct mailbox *box,
enum mail_attribute_type type, const char *key,
- struct mail_attribute_value *value_r,
- bool unused);
+ struct mail_attribute_value *value_r);
struct mailbox_attribute_iter *
index_storage_attribute_iter_init(struct mailbox *box,
enum mail_attribute_type type,
int (*attribute_set)(struct mailbox_transaction_context *t,
enum mail_attribute_type type, const char *key,
- const struct mail_attribute_value *value,
- bool internal_attribute);
+ const struct mail_attribute_value *value);
int (*attribute_get)(struct mailbox *box,
enum mail_attribute_type type, const char *key,
- struct mail_attribute_value *value_r,
- bool internal_attribute);
+ struct mail_attribute_value *value_r);
struct mailbox_attribute_iter *
(*attribute_iter_init)(struct mailbox *box,
enum mail_attribute_type type,
static int
mailbox_attribute_specialuse_get(struct mailbox *box,
const char *key ATTR_UNUSED,
- struct mail_attribute_value *value_r,
- bool internal_attribute ATTR_UNUSED)
+ struct mail_attribute_value *value_r)
{
const struct mailbox_settings *set = box->set;
static int
mailbox_attribute_comment_get(struct mailbox *box,
const char *key ATTR_UNUSED,
- struct mail_attribute_value *value_r,
- bool internal_attribute ATTR_UNUSED)
+ struct mail_attribute_value *value_r)
{
const struct mailbox_settings *set = box->set;
static int
server_attribute_comment_get(struct mailbox *box,
const char *key ATTR_UNUSED,
- struct mail_attribute_value *value_r,
- bool internal_attribute ATTR_UNUSED)
+ struct mail_attribute_value *value_r)
{
const struct mail_storage_settings *set = box->storage->set;
static int
server_attribute_admin_get(struct mailbox *box,
const char *key ATTR_UNUSED,
- struct mail_attribute_value *value_r,
- bool internal_attribute ATTR_UNUSED)
+ struct mail_attribute_value *value_r)
{
const struct mail_storage_settings *set = box->storage->set;
case MAIL_ATTRIBUTE_INTERNAL_RANK_DEFAULT:
case MAIL_ATTRIBUTE_INTERNAL_RANK_OVERRIDE:
/* notify about assignment */
- if (iattr->set != NULL && iattr->set(t, key, value, TRUE) < 0)
+ if (iattr->set != NULL && iattr->set(t, key, value) < 0)
return -1;
break;
case MAIL_ATTRIBUTE_INTERNAL_RANK_AUTHORITY:
return -1;
}
/* assign internal attribute */
- return iattr->set(t, key, value, TRUE);
+ return iattr->set(t, key, value);
default:
i_unreached();
}
}
-
- ret = t->box->v.attribute_set(t, type, key, value, (iattr != NULL && iattr->rank != MAIL_ATTRIBUTE_INTERNAL_RANK_AUTHORITY));
+
+ ret = t->box->v.attribute_set(t, type, key, value);
return ret;
}
if (iattr != NULL) {
switch (iattr->rank) {
case MAIL_ATTRIBUTE_INTERNAL_RANK_OVERRIDE:
- if ((ret = iattr->get(box, key, value_r, TRUE)) != 0) {
+ if ((ret = iattr->get(box, key, value_r)) != 0) {
if (ret < 0)
return -1;
value_r->flags |= MAIL_ATTRIBUTE_VALUE_FLAG_READONLY;
return 1;
}
+ break;
case MAIL_ATTRIBUTE_INTERNAL_RANK_DEFAULT:
break;
case MAIL_ATTRIBUTE_INTERNAL_RANK_AUTHORITY:
- if ((ret = iattr->get(box, key, value_r, TRUE)) <= 0)
+ if ((ret = iattr->get(box, key, value_r)) <= 0)
return ret;
value_r->flags |= MAIL_ATTRIBUTE_VALUE_FLAG_READONLY;
return 1;
}
}
- bool internal_attribute = (iattr != NULL && iattr->rank != MAIL_ATTRIBUTE_INTERNAL_RANK_AUTHORITY);
-
- ret = box->v.attribute_get(box, type, key, value_r, internal_attribute);
+ ret = box->v.attribute_get(box, type, key, value_r);
if (ret != 0)
return ret;
if (iattr->get == NULL)
ret = 0;
else {
- if ((ret = iattr->get(box, key, value_r, internal_attribute)) < 0)
+ if ((ret = iattr->get(box, key, value_r)) < 0)
return ret;
}
if (ret > 0) {
value_r->flags |= MAIL_ATTRIBUTE_VALUE_FLAG_READONLY;
return 1;
}
+ break;
case MAIL_ATTRIBUTE_INTERNAL_RANK_OVERRIDE:
break;
default:
/* Get the value of this internal attribute */
int (*get)(struct mailbox *box, const char *key,
- struct mail_attribute_value *value_r, bool internal_attribute);
- /* Set the value of this internal attribute */
+ struct mail_attribute_value *value_r);
+ /* Set the value of this internal attribute */
int (*set)(struct mailbox_transaction_context *t, const char *key,
- const struct mail_attribute_value *value, bool internal_attribute);
+ const struct mail_attribute_value *value);
};
void mailbox_attribute_register_internal(
int acl_attribute_set(struct mailbox_transaction_context *t,
enum mail_attribute_type type, const char *key,
- const struct mail_attribute_value *value,
- bool internal_attribute)
+ const struct mail_attribute_value *value)
{
struct acl_mailbox *abox = ACL_CONTEXT(t->box);
if (strncmp(key, MAILBOX_ATTRIBUTE_PREFIX_ACL,
strlen(MAILBOX_ATTRIBUTE_PREFIX_ACL)) == 0)
return acl_attribute_update_acl(t, key, value);
- return abox->module_ctx.super.attribute_set(t, type, key, value, internal_attribute);
+ return abox->module_ctx.super.attribute_set(t, type, key, value);
}
int acl_attribute_get(struct mailbox *box,
enum mail_attribute_type type, const char *key,
- struct mail_attribute_value *value_r,
- bool internal_attribute)
+ struct mail_attribute_value *value_r)
{
struct acl_mailbox *abox = ACL_CONTEXT(box);
if (strncmp(key, MAILBOX_ATTRIBUTE_PREFIX_ACL,
strlen(MAILBOX_ATTRIBUTE_PREFIX_ACL)) == 0)
return acl_attribute_get_acl(box, key, value_r);
- return abox->module_ctx.super.attribute_get(box, type, key, value_r, internal_attribute);
+ return abox->module_ctx.super.attribute_get(box, type, key, value_r);
}
struct mailbox_attribute_iter *
int acl_attribute_set(struct mailbox_transaction_context *t,
enum mail_attribute_type type, const char *key,
- const struct mail_attribute_value *value,
- bool internal_attribute);
+ const struct mail_attribute_value *value);
int acl_attribute_get(struct mailbox *box,
enum mail_attribute_type type, const char *key,
- struct mail_attribute_value *value_r,
- bool internal_attribute);
+ struct mail_attribute_value *value_r);
struct mailbox_attribute_iter *
acl_attribute_iter_init(struct mailbox *box, enum mail_attribute_type type,
const char *prefix);