int index_storage_list_index_has_changed(struct mailbox *box,
struct mail_index_view *list_view,
- uint32_t seq);
+ uint32_t seq, bool quick);
enum index_storage_list_change
index_storage_list_index_has_changed_full(struct mailbox *box,
struct mail_index_view *list_view,
int index_storage_list_index_has_changed(struct mailbox *box,
struct mail_index_view *list_view,
- uint32_t seq)
+ uint32_t seq, bool quick ATTR_UNUSED)
{
switch (index_storage_list_index_has_changed_full(box, list_view, seq)) {
case INDEX_STORAGE_LIST_CHANGE_ERROR:
int maildir_list_index_has_changed(struct mailbox *box,
struct mail_index_view *list_view,
- uint32_t seq)
+ uint32_t seq, bool quick)
{
struct maildir_mailbox *mbox = (struct maildir_mailbox *)box;
const struct maildir_list_index_record *rec;
bool expunged;
int ret;
- ret = index_storage_list_index_has_changed(box, list_view, seq);
+ ret = index_storage_list_index_has_changed(box, list_view, seq, quick);
if (ret != 0 || box->storage->set->mailbox_list_index_very_dirty_syncs)
return ret;
if (mbox->storage->set->maildir_very_dirty_syncs) {
int maildir_list_index_has_changed(struct mailbox *box,
struct mail_index_view *list_view,
- uint32_t seq);
+ uint32_t seq, bool quick);
void maildir_list_index_update_sync(struct mailbox *box,
struct mail_index_transaction *trans,
uint32_t seq);
int mbox_list_index_has_changed(struct mailbox *box,
struct mail_index_view *list_view,
- uint32_t seq)
+ uint32_t seq, bool quick)
{
struct mbox_mailbox *mbox = (struct mbox_mailbox *)box;
const struct mbox_list_index_record *rec;
bool expunged;
int ret;
- ret = index_storage_list_index_has_changed(box, list_view, seq);
+ ret = index_storage_list_index_has_changed(box, list_view, seq, quick);
if (ret != 0 || box->storage->set->mailbox_list_index_very_dirty_syncs)
return ret;
int mbox_list_index_has_changed(struct mailbox *box,
struct mail_index_view *list_view,
- uint32_t seq);
+ uint32_t seq, bool quick);
void mbox_list_index_update_sync(struct mailbox *box,
struct mail_index_transaction *trans,
uint32_t seq);
ret = 1;
} else T_BEGIN {
ret = box->v.list_index_has_changed == NULL ? 0 :
- box->v.list_index_has_changed(box, view, seq);
+ box->v.list_index_has_changed(box, view, seq, FALSE);
} T_END;
if (ret != 0) {
ret = 1;
} else T_BEGIN {
ret = box->v.list_index_has_changed == NULL ? 0 :
- box->v.list_index_has_changed(box, view, seq);
+ box->v.list_index_has_changed(box, view, seq, TRUE);
} T_END;
if (ret != 0) {
int (*attribute_iter_deinit)(struct mailbox_attribute_iter *iter);
/* Lookup sync extension record and figure out if it mailbox has
- changed since. Returns 1 = yes, 0 = no, -1 = error. */
+ changed since. Returns 1 = yes, 0 = no, -1 = error. if quick==TRUE,
+ return 1 if it's too costly to find out exactly. */
int (*list_index_has_changed)(struct mailbox *box,
struct mail_index_view *list_view,
- uint32_t seq);
+ uint32_t seq, bool quick);
/* Update the sync extension record. */
void (*list_index_update_sync)(struct mailbox *box,
struct mail_index_transaction *trans,