dbox-storage.h revision 4b41116563110d00330896a568eff1078c382827
#ifndef __DBOX_STORAGE_H
#define __DBOX_STORAGE_H
#include "index-storage.h"
#include "mailbox-list-private.h"
#include "dbox-format.h"
#define DBOX_STORAGE_NAME "dbox"
struct dbox_uidlist;
struct dbox_storage {
struct mail_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;
unsigned int syncing:1;
};
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_class_init(void);
void dbox_transaction_class_deinit(void);
#endif