bcb4e51a409d94ae670de96afb8483a4f7855294Stephan Bosch/* Copyright (c) 2017-2018 Dovecot authors, see the included COPYING file */
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi#include "lib.h"
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi#include "settings-parser.h"
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi#include "service-settings.h"
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi#include "mail-storage-settings.h"
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi#include "quota-status-settings.h"
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi#undef DEF
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi#define DEF(type, name) \
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi { type, #name, offsetof(struct quota_status_settings, name), NULL }
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomistatic const struct setting_define quota_status_setting_defines[] = {
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi DEF(SET_STR, recipient_delimiter),
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi SETTING_DEFINE_LIST_END
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi};
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomistatic const struct quota_status_settings quota_status_default_settings = {
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi .recipient_delimiter = "+",
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi};
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomistatic const struct setting_parser_info *quota_status_setting_dependencies[] = {
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi NULL
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi};
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomiconst struct setting_parser_info quota_status_setting_parser_info = {
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi .module_name = "mail",
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi .defines = quota_status_setting_defines,
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi .defaults = &quota_status_default_settings,
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi .type_offset = (size_t)-1,
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi .struct_size = sizeof(struct quota_status_settings),
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi .parent_offset = (size_t)-1,
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi .dependencies = quota_status_setting_dependencies
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi};