imap-login-settings.c revision f059a046515f4b2b15a6c2a10a6f12f6166e39a5
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen/* Copyright (c) 2005-2009 Dovecot authors, see the included COPYING file */
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen#include "lib.h"
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen#include "settings-parser.h"
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen#include "login-settings.h"
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen#include "imap-login-settings.h"
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen#include <stddef.h>
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen#undef DEF
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen#define DEF(type, name) \
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen { type, #name, offsetof(struct imap_login_settings, name), NULL }
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainenstatic struct setting_define imap_login_setting_defines[] = {
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen DEF(SET_STR, imap_capability),
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen SETTING_DEFINE_LIST_END
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen};
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainenstatic struct imap_login_settings imap_login_default_settings = {
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen MEMBER(imap_capability) ""
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen};
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainenstatic struct setting_parser_info *imap_login_setting_dependencies[] = {
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen &login_setting_parser_info,
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen NULL
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen};
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainenstatic struct setting_parser_info imap_login_setting_parser_info = {
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen MEMBER(module_name) "imap-login",
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen MEMBER(defines) imap_login_setting_defines,
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen MEMBER(defaults) &imap_login_default_settings,
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen MEMBER(type_offset) (size_t)-1,
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen MEMBER(struct_size) sizeof(struct imap_login_settings),
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen MEMBER(parent_offset) (size_t)-1,
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen MEMBER(parent) NULL,
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen MEMBER(check_func) NULL,
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen MEMBER(dependencies) imap_login_setting_dependencies
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen};
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainenconst struct setting_parser_info *imap_login_setting_roots[] = {
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen &login_setting_parser_info,
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen &imap_login_setting_parser_info,
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen NULL
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen};