return mailbox_list_index_sync_end(&sync_ctx, TRUE);
}
+bool mailbox_list_index_get_index(struct mailbox_list *list,
+ struct mail_index **index_r)
+{
+ struct mailbox_list_index *ilist = INDEX_LIST_CONTEXT(list);
+
+ if (ilist == NULL)
+ return FALSE;
+ *index_r = ilist->index;
+ return TRUE;
+}
+
int mailbox_list_index_view_open(struct mailbox *box, bool require_refreshed,
struct mail_index_view **view_r,
uint32_t *seq_r)
int mailbox_list_index_handle_corruption(struct mailbox_list *list);
int mailbox_list_index_set_uncorrupted(struct mailbox_list *list);
+/* Returns TRUE and index_r if mailbox list index exists, FALSE if not. */
+bool mailbox_list_index_get_index(struct mailbox_list *list,
+ struct mail_index **index_r);
/* Open mailbox list index's view and get the given mailbox's sequence number
in it. If require_refreshed is TRUE, the mailbox must have up-to-date
information in the mailbox list index. Returns 1 if ok, 0 if mailbox wasn't