c5d6b453eccc0962eae967abc10e028a740e1256Timo Sirainen#ifndef IMAPC_SETTINGS_H
c5d6b453eccc0962eae967abc10e028a740e1256Timo Sirainen#define IMAPC_SETTINGS_H
c5d6b453eccc0962eae967abc10e028a740e1256Timo Sirainen
009217abb57a24a4076092e8e4e165545747839eStephan Bosch#include "net.h"
009217abb57a24a4076092e8e4e165545747839eStephan Bosch
adcb46fe2c6d1139dfbd8ab08a8fbe96e53f8fd6Timo Sirainen/* <settings checks> */
adcb46fe2c6d1139dfbd8ab08a8fbe96e53f8fd6Timo Sirainenenum imapc_features {
3394dcb43382e094b0707c1640efbf46adac9e7dTimo Sirainen IMAPC_FEATURE_RFC822_SIZE = 0x01,
3394dcb43382e094b0707c1640efbf46adac9e7dTimo Sirainen IMAPC_FEATURE_GUID_FORCED = 0x02,
3394dcb43382e094b0707c1640efbf46adac9e7dTimo Sirainen IMAPC_FEATURE_FETCH_HEADERS = 0x04,
6e1cac3defe84a222b804f3ef41ff558e1a86391Timo Sirainen IMAPC_FEATURE_GMAIL_MIGRATION = 0x08,
eb1365e61674c54c7c453143356a891fb2e2b3d6Timo Sirainen IMAPC_FEATURE_SEARCH = 0x10,
df596e34b604e6ac873de9ca92fb5df2a5fed45fTimo Sirainen IMAPC_FEATURE_ZIMBRA_WORKAROUNDS = 0x20,
bd06c77a12bb02871b25dceb749fa955f4a272ffTimo Sirainen IMAPC_FEATURE_NO_EXAMINE = 0x40,
53841bd6c67a24b60b64cec41b72eb8b474cfbc7Timo Sirainen IMAPC_FEATURE_PROXYAUTH = 0x80,
2ddc5efd47452644be369fa86e978cc05a508217Timo Sirainen IMAPC_FEATURE_FETCH_MSN_WORKAROUNDS = 0x100,
90355e35d1139e446a99733986a9181bd7f05dd4Timo Sirainen IMAPC_FEATURE_FETCH_FIX_BROKEN_MAILS = 0x200,
30871b77e627d3d6b244305fbea7aeee578f2927Timo Sirainen IMAPC_FEATURE_MODSEQ = 0x400,
30871b77e627d3d6b244305fbea7aeee578f2927Timo Sirainen IMAPC_FEATURE_DELAY_LOGIN = 0x800,
e1005f8bf9190e1778010032dbd20c64acb53610Timo Sirainen IMAPC_FEATURE_FETCH_BODYSTRUCTURE = 0x1000,
3c8055b25beef96e7be25895bac34f3eda7ceca1Timo Sirainen IMAPC_FEATURE_SEND_ID = 0x2000,
e01ebd51ac369430ec81945e3c5317d6d6244138Timo Sirainen IMAPC_FEATURE_FETCH_EMPTY_IS_EXPUNGED = 0x4000,
7484b1b01bee9b767f8b67396e1f4af4b0ea1dd3Timo Sirainen IMAPC_FEATURE_NO_MSN_UPDATES = 0x8000,
adcb46fe2c6d1139dfbd8ab08a8fbe96e53f8fd6Timo Sirainen};
adcb46fe2c6d1139dfbd8ab08a8fbe96e53f8fd6Timo Sirainen/* </settings checks> */
adcb46fe2c6d1139dfbd8ab08a8fbe96e53f8fd6Timo Sirainen
1f4d459111419a47021e677839439f2e2ca78ad5Josef 'Jeff' Sipek/*
1f4d459111419a47021e677839439f2e2ca78ad5Josef 'Jeff' Sipek * NOTE: Any additions here should be reflected in imapc_storage_create's
1f4d459111419a47021e677839439f2e2ca78ad5Josef 'Jeff' Sipek * serialization of settings.
1f4d459111419a47021e677839439f2e2ca78ad5Josef 'Jeff' Sipek */
c5d6b453eccc0962eae967abc10e028a740e1256Timo Sirainenstruct imapc_settings {
c5d6b453eccc0962eae967abc10e028a740e1256Timo Sirainen const char *imapc_host;
009217abb57a24a4076092e8e4e165545747839eStephan Bosch in_port_t imapc_port;
c5d6b453eccc0962eae967abc10e028a740e1256Timo Sirainen
c5d6b453eccc0962eae967abc10e028a740e1256Timo Sirainen const char *imapc_user;
5c6aa687a33a4d819f4b50bb9ec02535395865d6Timo Sirainen const char *imapc_master_user;
c5d6b453eccc0962eae967abc10e028a740e1256Timo Sirainen const char *imapc_password;
c6033074ada5c7441ff7bb12c4b433cae737fea2Timo Sirainen const char *imapc_sasl_mechanisms;
c5d6b453eccc0962eae967abc10e028a740e1256Timo Sirainen
c5d6b453eccc0962eae967abc10e028a740e1256Timo Sirainen const char *imapc_ssl;
35779754964119c94b919b75bbf1ccc1c02aad52Timo Sirainen bool imapc_ssl_verify;
0998339f5a8424ce0b9f108006fa6bbc74be70dfTimo Sirainen
adcb46fe2c6d1139dfbd8ab08a8fbe96e53f8fd6Timo Sirainen const char *imapc_features;
0998339f5a8424ce0b9f108006fa6bbc74be70dfTimo Sirainen const char *imapc_rawlog_dir;
b08822564e0fcb8f3eafd2e4be06ae2efedff0cdTimo Sirainen const char *imapc_list_prefix;
cff23ec51177f11902c99b727268eb05ea7c97c7Timo Sirainen unsigned int imapc_cmd_timeout;
cee50689ea9f3cfec451a6e105307ee2d86ed5dcTimo Sirainen unsigned int imapc_max_idle_time;
c515f5c969f7a3a5b525ab15bde2f116cbe932deAki Tuomi unsigned int imapc_connection_retry_count;
294c52ba40b626ab1288a27441980cf5285f87ddTimo Sirainen unsigned int imapc_connection_retry_interval;
c23ebb9b0e0b760ca8da16fde34ff33f5ece5e07Timo Sirainen uoff_t imapc_max_line_length;
cee50689ea9f3cfec451a6e105307ee2d86ed5dcTimo Sirainen
6b23e5a3fff511cd64f1edb880fd080016c23c0fTimo Sirainen const char *pop3_deleted_flag;
6b23e5a3fff511cd64f1edb880fd080016c23c0fTimo Sirainen
adcb46fe2c6d1139dfbd8ab08a8fbe96e53f8fd6Timo Sirainen enum imapc_features parsed_features;
de26c21cfadf24c1fa59f06414854d58b3d8baadTimo Sirainen unsigned int throttle_init_msecs;
de26c21cfadf24c1fa59f06414854d58b3d8baadTimo Sirainen unsigned int throttle_max_msecs;
de26c21cfadf24c1fa59f06414854d58b3d8baadTimo Sirainen unsigned int throttle_shrink_min_msecs;
c5d6b453eccc0962eae967abc10e028a740e1256Timo Sirainen};
c5d6b453eccc0962eae967abc10e028a740e1256Timo Sirainen
c5d6b453eccc0962eae967abc10e028a740e1256Timo Sirainenconst struct setting_parser_info *imapc_get_setting_parser_info(void);
c5d6b453eccc0962eae967abc10e028a740e1256Timo Sirainen
c5d6b453eccc0962eae967abc10e028a740e1256Timo Sirainen#endif