sdbox-storage.h revision 0a7b04ec6441fdcf083392888b2e30844fc3e86d
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen#define SDBOX_MAIL_FILE_FORMAT SDBOX_MAIL_FILE_PREFIX"%u"
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen#define SDBOX_INDEX_HEADER_MIN_SIZE (sizeof(uint32_t))
e5fb952c6d49d3b6bff1746551566202e92947daTimo Sirainen /* increased every time a full mailbox rebuild is done */
e5fb952c6d49d3b6bff1746551566202e92947daTimo Sirainen /* if non-zero, storage should be rebuilt (except if rebuild_count
e5fb952c6d49d3b6bff1746551566202e92947daTimo Sirainen has changed from this value) */
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainenint sdbox_mail_open(struct dbox_mail *mail, uoff_t *offset_r,
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainenuint32_t dbox_get_uidvalidity_next(struct mailbox_list *list);
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainenint sdbox_read_header(struct sdbox_mailbox *mbox,
4b2a4c8c762e3eaddf7fd2abfe7d4cca6e5e3fd8Timo Sirainen struct sdbox_index_header *hdr, bool log_error);
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainenvoid sdbox_update_header(struct sdbox_mailbox *mbox,
0a7b04ec6441fdcf083392888b2e30844fc3e86dTimo Sirainenvoid sdbox_set_mailbox_corrupted(struct mailbox *box);
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainensdbox_save_alloc(struct mailbox_transaction_context *_t);
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainenint sdbox_save_begin(struct mail_save_context *ctx, struct istream *input);
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainenint sdbox_save_finish(struct mail_save_context *ctx);
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainenvoid sdbox_save_cancel(struct mail_save_context *ctx);
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainensdbox_save_file_get_file(struct mailbox_transaction_context *t, uint32_t seq);
e8762c2b4914db7997fa9eb644a91586952d1876Timo Sirainenvoid sdbox_save_add_file(struct mail_save_context *ctx, struct dbox_file *file);
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainenint sdbox_transaction_save_commit_pre(struct mail_save_context *ctx);
9f19a50d5966643c4d1c5ca06868ac2ad31bc4d5Timo Sirainenvoid sdbox_transaction_save_commit_post(struct mail_save_context *ctx,
9f19a50d5966643c4d1c5ca06868ac2ad31bc4d5Timo Sirainen struct mail_index_transaction_commit_result *result);
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainenvoid sdbox_transaction_save_rollback(struct mail_save_context *ctx);
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainenint sdbox_copy(struct mail_save_context *ctx, struct mail *mail);