e716e8ef3da79022243910c2db73b2a4bd555c78Timo Sirainen#ifndef INDEX_MAILBOX_SIZE_H
e716e8ef3da79022243910c2db73b2a4bd555c78Timo Sirainen#define INDEX_MAILBOX_SIZE_H
e716e8ef3da79022243910c2db73b2a4bd555c78Timo Sirainen
e716e8ef3da79022243910c2db73b2a4bd555c78Timo Sirainenstruct mailbox;
e716e8ef3da79022243910c2db73b2a4bd555c78Timo Sirainen
e716e8ef3da79022243910c2db73b2a4bd555c78Timo Sirainenstruct mailbox_vsize_update *
e716e8ef3da79022243910c2db73b2a4bd555c78Timo Sirainenindex_mailbox_vsize_update_init(struct mailbox *box);
e716e8ef3da79022243910c2db73b2a4bd555c78Timo Sirainenvoid index_mailbox_vsize_update_deinit(struct mailbox_vsize_update **update);
e716e8ef3da79022243910c2db73b2a4bd555c78Timo Sirainen
e716e8ef3da79022243910c2db73b2a4bd555c78Timo Sirainenvoid index_mailbox_vsize_hdr_expunge(struct mailbox_vsize_update *update,
e716e8ef3da79022243910c2db73b2a4bd555c78Timo Sirainen uint32_t uid, uoff_t vsize);
e716e8ef3da79022243910c2db73b2a4bd555c78Timo Sirainen
e716e8ef3da79022243910c2db73b2a4bd555c78Timo Sirainenbool index_mailbox_vsize_update_try_lock(struct mailbox_vsize_update *update);
e716e8ef3da79022243910c2db73b2a4bd555c78Timo Sirainenbool index_mailbox_vsize_update_wait_lock(struct mailbox_vsize_update *update);
e716e8ef3da79022243910c2db73b2a4bd555c78Timo Sirainen/* Returns TRUE if expunges & appends should be updating the header. */
e716e8ef3da79022243910c2db73b2a4bd555c78Timo Sirainenbool index_mailbox_vsize_want_updates(struct mailbox_vsize_update *update);
e716e8ef3da79022243910c2db73b2a4bd555c78Timo Sirainen
e716e8ef3da79022243910c2db73b2a4bd555c78Timo Sirainenvoid index_mailbox_vsize_update_appends(struct mailbox *box);
e716e8ef3da79022243910c2db73b2a4bd555c78Timo Sirainen
e716e8ef3da79022243910c2db73b2a4bd555c78Timo Sirainen#endif