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 */
9865d9e7c5713e41db939222ed9c0225a11fb99eTimo Sirainen uint8_t flags; /* enum dbox_index_header_flags */
e5fb952c6d49d3b6bff1746551566202e92947daTimo Sirainen /* if non-zero, storage should be rebuilt (except if rebuild_count
e5fb952c6d49d3b6bff1746551566202e92947daTimo Sirainen has changed from this value) */
df3963075d67f76ade66b6a74764f4eae31d9c87Josef 'Jeff' Sipek#define SDBOX_STORAGE(s) container_of(DBOX_STORAGE(s), struct sdbox_storage, storage)
df3963075d67f76ade66b6a74764f4eae31d9c87Josef 'Jeff' Sipek#define SDBOX_MAILBOX(s) container_of(s, struct sdbox_mailbox, box)
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainenint sdbox_mail_open(struct dbox_mail *mail, uoff_t *offset_r,
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainenint sdbox_read_header(struct sdbox_mailbox *mbox,
9865d9e7c5713e41db939222ed9c0225a11fb99eTimo Sirainen struct sdbox_index_header *hdr, bool log_error,
f605df8a4c15cc7a11e16fdde994d51473700890Timo Sirainenint sdbox_mailbox_create_indexes(struct mailbox *box,
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);