Mercurial > dovecot > core-2.2
changeset 20677:617f9489d849
lib-storage: Added mailbox_recent_flags_expunge_uid()
For storage backends where it's useful.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Tue, 23 Aug 2016 10:53:28 +0300 |
parents | 8b61428873f8 |
children | ff73fdd0558d |
files | src/lib-storage/mailbox-recent-flags.c src/lib-storage/mailbox-recent-flags.h |
diffstat | 2 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/mailbox-recent-flags.c Mon Aug 22 23:41:05 2016 +0300 +++ b/src/lib-storage/mailbox-recent-flags.c Tue Aug 23 10:53:28 2016 +0300 @@ -96,3 +96,11 @@ box->recent_flags_count--; } } + +void mailbox_recent_flags_expunge_uid(struct mailbox *box, uint32_t uid) +{ + if (array_is_created(&box->recent_flags)) { + if (seq_range_array_remove(&box->recent_flags, uid)) + box->recent_flags_count--; + } +}
--- a/src/lib-storage/mailbox-recent-flags.h Mon Aug 22 23:41:05 2016 +0300 +++ b/src/lib-storage/mailbox-recent-flags.h Tue Aug 23 10:53:28 2016 +0300 @@ -14,5 +14,6 @@ unsigned int mailbox_recent_flags_count(struct mailbox *box); void mailbox_recent_flags_expunge_seqs(struct mailbox *box, uint32_t seq1, uint32_t seq2); +void mailbox_recent_flags_expunge_uid(struct mailbox *box, uint32_t uid); #endif