Mercurial > dovecot > core-2.2
view src/lib-storage/list/mailbox-list-index-sync.h @ 22604:98d99bf6511e
lib-storage: Make sure mailbox list notification flush sees latest changes.
This is mainly useful with imaptest test scripts to make sure they're seeing
the changes done by the other session, without assuming that inotify will
always notify about the change before NOOP is run (it doesn't).
Do this only if mailbox_idle_check_interval>0, so it's not run when periodic
stat()s are wanted to be avoided.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Mon, 11 Sep 2017 13:48:17 +0300 |
parents | 0bd8a7224ec8 |
children |
line wrap: on
line source
#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; unsigned int 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