mail-storage.h revision 440b8b6666e62f80bb3aaca1e5e5c57fbf3bdcb0
39025a2dabfcfaeee3790988b9ea00d19887a3d3Timo Sirainen/* If some operation is taking long, call notify_ok every n seconds. */
39025a2dabfcfaeee3790988b9ea00d19887a3d3Timo Sirainen /* Remember message headers' MD5 sum */
18a2214eedb08d043277cf1d3e75c45762014663Timo Sirainen /* Don't try to autodetect anything, require that the given data
18a2214eedb08d043277cf1d3e75c45762014663Timo Sirainen contains all the necessary information. */
18a2214eedb08d043277cf1d3e75c45762014663Timo Sirainen /* Don't autocreate any directories. If they don't exist,
18a2214eedb08d043277cf1d3e75c45762014663Timo Sirainen fail to create the storage. */
5a8ee853d0b62692a6e624b125d08d87a79e001fTimo Sirainen /* Don't verify existence or accessibility of any directories.
18a2214eedb08d043277cf1d3e75c45762014663Timo Sirainen Create the storage in any case. */
6b8f4863bb2b0938d40f774122baf6528a833ea0Timo Sirainen /* Mailbox must not be modified even if asked */
6b8f4863bb2b0938d40f774122baf6528a833ea0Timo Sirainen /* Only saving/copying mails to mailbox works. */
6b8f4863bb2b0938d40f774122baf6528a833ea0Timo Sirainen /* Remove MAIL_RECENT flags when syncing */
6b8f4863bb2b0938d40f774122baf6528a833ea0Timo Sirainen /* Don't create index files for the mailbox */
6b8f4863bb2b0938d40f774122baf6528a833ea0Timo Sirainen /* Keep mailbox exclusively locked all the time while it's open */
5a8ee853d0b62692a6e624b125d08d87a79e001fTimo Sirainen /* Enable if mailbox is used for serving POP3. This allows making
18a2214eedb08d043277cf1d3e75c45762014663Timo Sirainen better caching decisions. */
6b8f4863bb2b0938d40f774122baf6528a833ea0Timo Sirainen /* Enable if mailbox is used for saving a mail delivery using MDA.
6b8f4863bb2b0938d40f774122baf6528a833ea0Timo Sirainen This causes ACL plugin to use POST right rather than INSERT. */
6b8f4863bb2b0938d40f774122baf6528a833ea0Timo Sirainen /* Force opening mailbox and ignoring any ACLs */
6b8f4863bb2b0938d40f774122baf6528a833ea0Timo Sirainen /* Open mailbox even if it's already marked as deleted */
58a770f1e0ab553a0dba9cad9d6f3a6cdf2dc855Timo Sirainen /* Enable tracking modsequences */
6b8f4863bb2b0938d40f774122baf6528a833ea0Timo Sirainen /* Enable tracking expunge modsequences */
6b8f4863bb2b0938d40f774122baf6528a833ea0Timo Sirainen STATUS_CHECK_OVER_QUOTA = 0x1000, /* return error if over quota */
6b8f4863bb2b0938d40f774122baf6528a833ea0Timo Sirainen /* metadata items that require mailbox to be synced at least once. */
6b8f4863bb2b0938d40f774122baf6528a833ea0Timo Sirainen /* Update search results whenever the mailbox view is synced.
6b8f4863bb2b0938d40f774122baf6528a833ea0Timo Sirainen Expunged messages are removed even without this flag. */
6b8f4863bb2b0938d40f774122baf6528a833ea0Timo Sirainen /* Queue changes so _sync() can be used. */
39025a2dabfcfaeee3790988b9ea00d19887a3d3Timo Sirainen/* Maximum size for sort program (each one separately + END) */
a1973d0f171b027f9a7c642bc1c2134293731e1cTimo Sirainen MAIL_SORT_FLAG_REVERSE = 0x1000, /* reverse this mask type */
39025a2dabfcfaeee3790988b9ea00d19887a3d3Timo Sirainen MAIL_SORT_END = 0x0000 /* ends sort program */
a8ebb72c0fba1a6a71104e530bf5903d5f149351Timo Sirainen /* Set has_nuls / has_no_nuls fields */
39025a2dabfcfaeee3790988b9ea00d19887a3d3Timo Sirainen /* specials: */
a1973d0f171b027f9a7c642bc1c2134293731e1cTimo Sirainen /* Hide changes done in this transaction from next view sync */
18a2214eedb08d043277cf1d3e75c45762014663Timo Sirainen /* External transaction. Should be used for copying and appends,
18a2214eedb08d043277cf1d3e75c45762014663Timo Sirainen but nothing else. */
18a2214eedb08d043277cf1d3e75c45762014663Timo Sirainen /* Always assign UIDs to messages when saving/copying. Normally this
39025a2dabfcfaeee3790988b9ea00d19887a3d3Timo Sirainen is done only if it can be done easily. */
39025a2dabfcfaeee3790988b9ea00d19887a3d3Timo Sirainen /* Refresh the index so lookups return latest flags/modseqs */
a1973d0f171b027f9a7c642bc1c2134293731e1cTimo Sirainen /* Don't update caching decisions no matter what we do in this
a1973d0f171b027f9a7c642bc1c2134293731e1cTimo Sirainen transaction (useful for e.g. precaching) */
a1973d0f171b027f9a7c642bc1c2134293731e1cTimo Sirainen /* Sync transaction describes changes to mailbox that already happened
a1973d0f171b027f9a7c642bc1c2134293731e1cTimo Sirainen to another mailbox with whom we're syncing with (dsync) */
99df8a838cd9c5257ea5a2554383a9a999191e38Pali Rohár /* Make sure we sync all external changes done to mailbox */
a1973d0f171b027f9a7c642bc1c2134293731e1cTimo Sirainen /* Make sure we write all our internal changes into the mailbox */
a1973d0f171b027f9a7c642bc1c2134293731e1cTimo Sirainen /* If it's not too much trouble, check if there are some changes */
a1973d0f171b027f9a7c642bc1c2134293731e1cTimo Sirainen /* Don't sync expunges from our view */
39025a2dabfcfaeee3790988b9ea00d19887a3d3Timo Sirainen /* If mailbox is currently inconsistent, fix it instead of failing. */
39025a2dabfcfaeee3790988b9ea00d19887a3d3Timo Sirainen /* Syncing after an EXPUNGE command. This is just an informational
baf3e87e186453fda13bd21f7cbcb2efc8492e8bTimo Sirainen flag for plugins. */
39025a2dabfcfaeee3790988b9ea00d19887a3d3Timo Sirainen /* Force doing a full resync of indexes. */
39025a2dabfcfaeee3790988b9ea00d19887a3d3Timo Sirainen /* FIXME: kludge until something better comes along:
39025a2dabfcfaeee3790988b9ea00d19887a3d3Timo Sirainen Request full text search index optimization */
enum mailbox_sync_type {
enum mail_attribute_type {
enum mail_attribute_value_flags {
struct mail_attribute_value {
const char *value;
struct message_part;
struct mail_namespace;
struct mail_storage;
struct mail_search_args;
struct mail_search_result;
struct mail_keywords;
struct mail_save_context;
struct mailbox;
struct mailbox_transaction_context;
struct mailbox_status {
struct mailbox_cache_field {
const char *name;
struct mailbox_metadata {
const char *backend_ns_prefix;
struct mailbox_update {
struct mail_transaction_commit_changes {
unsigned int ignored_modseq_changes;
bool changed;
bool no_read_perm;
struct mailbox_sync_rec {
struct mailbox_sync_status {
struct mailbox_expunge_rec {
enum mail_lookup_abort {
struct mail {
struct mail_storage_callbacks {
void *context);
void *context);
struct mailbox_virtual_pattern {
const char *pattern;
void mail_storage_init(void);
void mail_storage_deinit(void);
void mail_storage_register_all(void);
const struct mail_storage_settings *
const char * ATTR_NOWARN_UNUSED_RESULT
const char * ATTR_NOWARN_UNUSED_RESULT
/* Subscribe/unsubscribe mailbox. Subscribing to
enum mailbox_feature
struct mail_namespace *
const struct mail_storage_settings *
const struct mailbox_settings *
const char *key);
struct mailbox_attribute_iter *
const char *prefix);
struct mailbox_sync_context *
struct mailbox_transaction_context *
struct mailbox_transaction_context **t,
struct mailbox *
struct mailbox_header_lookup_ctx *
struct mail_search_result *
struct mail_keywords *
const char *const keywords[]);
struct mail_keywords *
const char **error_r);
struct mail_save_context *
replicating/restoring an existing mailbox. */
const char *envelope);
const char *uidl);
unsigned int order);
struct mailbox_transaction_context *
after the next mail_set_seq/uid(). */
const char **value_r);
const char **value_r);
const char *const **value_r);
const char *const **value_r);
unsigned int *lines_r);
const char **value_r);