mbox-storage.h revision df9db9faf9c3a145a930abb0ec1f13a60ea65703
#ifndef __MBOX_STORAGE_H
#define __MBOX_STORAGE_H
/* Padding to leave in X-Keywords header when rewriting mbox */
#define MBOX_HEADER_PADDING 50
/* Don't write Content-Length header unless it's value is larger than this. */
#define MBOX_MIN_CONTENT_LENGTH_SIZE 1024
#define SUBSCRIPTION_FILE_NAME ".subscriptions"
#define MBOX_INDEX_PREFIX "dovecot.index"
#define MBOX_INDEX_DIR_NAME ".imap"
#include "index-storage.h"
#define STORAGE(mbox_storage) \
#define INDEX_STORAGE(mbox_storage) \
(&(mbox_storage)->storage)
struct mbox_storage {
struct index_storage storage;
};
struct mbox_mailbox {
struct index_mailbox ibox;
struct mbox_storage *storage;
const char *path;
int mbox_fd;
int mbox_lock_type;
unsigned int mbox_excl_locks, mbox_shared_locks;
struct dotlock *mbox_dotlock;
unsigned int mbox_lock_id;
bool mbox_readonly, mbox_writeonly;
unsigned int no_mbox_file:1;
unsigned int mbox_sync_dirty:1;
unsigned int mbox_do_dirty_syncs:1;
unsigned int mbox_very_dirty_syncs:1;
unsigned int mbox_save_md5:1;
unsigned int mbox_dotlocked:1;
};
struct mbox_transaction_context {
struct index_transaction_context ictx;
struct mbox_save_context *save_ctx;
unsigned int mbox_lock_id;
unsigned int mbox_modified:1;
};
extern struct mail_vfuncs mbox_mail_vfuncs;
extern const char *mbox_hide_headers[];
extern unsigned int mbox_hide_headers_count;
struct mailbox_list_context *
enum mailbox_list_flags flags);
struct mailbox_transaction_context *
enum mailbox_transaction_flags flags);
int mbox_transaction_commit(struct mailbox_transaction_context *t,
enum mailbox_sync_flags flags);
void mbox_transaction_rollback(struct mailbox_transaction_context *t);
struct mailbox_sync_context *
#endif