diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:51:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:51:24 +0000 |
commit | f7548d6d28c313cf80e6f3ef89aed16a19815df1 (patch) | |
tree | a3f6f2a3f247293bee59ecd28e8cd8ceb6ca064a /src/lib-storage/index/dbox-single/sdbox-sync.h | |
parent | Initial commit. (diff) | |
download | dovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.tar.xz dovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.zip |
Adding upstream version 1:2.3.19.1+dfsg1.upstream/1%2.3.19.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/lib-storage/index/dbox-single/sdbox-sync.h')
-rw-r--r-- | src/lib-storage/index/dbox-single/sdbox-sync.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/lib-storage/index/dbox-single/sdbox-sync.h b/src/lib-storage/index/dbox-single/sdbox-sync.h new file mode 100644 index 0000000..70306c9 --- /dev/null +++ b/src/lib-storage/index/dbox-single/sdbox-sync.h @@ -0,0 +1,38 @@ +#ifndef SDBOX_SYNC_H +#define SDBOX_SYNC_H + +struct mailbox; +struct sdbox_mailbox; + +enum sdbox_sync_flags { + SDBOX_SYNC_FLAG_FORCE = 0x01, + SDBOX_SYNC_FLAG_FSYNC = 0x02, + SDBOX_SYNC_FLAG_FORCE_REBUILD = 0x04 +}; + +enum sdbox_sync_entry_type { + SDBOX_SYNC_ENTRY_TYPE_EXPUNGE, + SDBOX_SYNC_ENTRY_TYPE_MOVE_FROM_ALT, + SDBOX_SYNC_ENTRY_TYPE_MOVE_TO_ALT +}; + +struct sdbox_sync_context { + struct sdbox_mailbox *mbox; + struct mail_index_sync_ctx *index_sync_ctx; + struct mail_index_view *sync_view; + struct mail_index_transaction *trans; + enum sdbox_sync_flags flags; + ARRAY_TYPE(uint32_t) expunged_uids; +}; + +int sdbox_sync_begin(struct sdbox_mailbox *mbox, enum sdbox_sync_flags flags, + struct sdbox_sync_context **ctx_r); +int sdbox_sync_finish(struct sdbox_sync_context **ctx, bool success); +int sdbox_sync(struct sdbox_mailbox *mbox, enum sdbox_sync_flags flags); + +int sdbox_sync_index_rebuild(struct sdbox_mailbox *mbox, bool force); + +struct mailbox_sync_context * +sdbox_storage_sync_init(struct mailbox *box, enum mailbox_sync_flags flags); + +#endif |