diff options
Diffstat (limited to 'src/lib-storage/list/mailbox-list-index-sync.h')
-rw-r--r-- | src/lib-storage/list/mailbox-list-index-sync.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/lib-storage/list/mailbox-list-index-sync.h b/src/lib-storage/list/mailbox-list-index-sync.h new file mode 100644 index 0000000..db20244 --- /dev/null +++ b/src/lib-storage/list/mailbox-list-index-sync.h @@ -0,0 +1,35 @@ +#ifndef MAILBOX_LIST_INDEX_SYNC_H +#define MAILBOX_LIST_INDEX_SYNC_H + +#include "mailbox-list-index.h" + +struct mailbox_list_index_sync_context { + struct mailbox_list *list; + struct mailbox_list_index *ilist; + char sep[2]; + uint32_t next_uid; + uint32_t orig_highest_name_id; + + struct mail_index_sync_ctx *index_sync_ctx; + struct mail_index_view *view; + struct mail_index_transaction *trans; + + bool syncing_list:1; +}; + +int mailbox_list_index_sync_begin(struct mailbox_list *list, + struct mailbox_list_index_sync_context **sync_ctx_r); +int mailbox_list_index_sync_end(struct mailbox_list_index_sync_context **_sync_ctx, + bool success); +int mailbox_list_index_sync(struct mailbox_list *list, bool refresh); + +/* Add name to index, return seq in index. */ +uint32_t mailbox_list_index_sync_name(struct mailbox_list_index_sync_context *ctx, + const char *name, + struct mailbox_list_index_node **node_r, + bool *created_r); + +int mailbox_list_index_sync_delete(struct mailbox_list_index_sync_context *sync_ctx, + const char *name, bool delete_selectable); + +#endif |