dbox-storage.h revision 4673afe816ffbca769585e4518e9b3c3d72e95dd
#ifndef __DBOX_STORAGE_H
#define __DBOX_STORAGE_H
#include "index-storage.h"
#include "dbox-format.h"
#define DBOX_STORAGE_NAME "dbox"
#define STORAGE(mbox_storage) \
#define INDEX_STORAGE(mbox_storage) \
(&(mbox_storage)->storage)
struct dbox_uidlist;
struct dbox_storage {
struct index_storage storage;
struct dotlock_settings uidlist_dotlock_set;
struct dotlock_settings file_dotlock_set;
struct dotlock_settings new_file_dotlock_set;
};
struct keyword_map {
unsigned int index_idx;
unsigned int file_idx;
};
struct dbox_file {
char *path;
int fd;
struct dbox_file_header hdr;
struct dbox_mail_header seeked_mail_header;
unsigned char *seeked_keywords;
/* Keywords list, sorted by index_idx. */
/* idx -> index_idx array */
ARRAY_DEFINE(file_idx_keywords, unsigned int);
};
struct dbox_mailbox {
struct index_mailbox ibox;
struct dbox_storage *storage;
struct dbox_uidlist *uidlist;
const char *path;
struct timeout *keep_lock_to;
unsigned int rotate_days;
};
struct dbox_transaction_context {
struct index_transaction_context ictx;
struct dbox_save_context *save_ctx;
};
extern struct mail_vfuncs dbox_mail_vfuncs;
void dbox_transaction_created(struct mail_index_transaction *t);
void dbox_transaction_class_init(void);
void dbox_transaction_class_deinit(void);
#endif