Lines Matching defs:box

7 void mailbox_recent_flags_set_uid(struct mailbox *box, uint32_t uid)
9 if (uid <= box->recent_flags_prev_uid) {
10 if (seq_range_exists(&box->recent_flags, uid))
13 mailbox_set_critical(box, "Recent flags state corrupted");
14 array_clear(&box->recent_flags);
15 box->recent_flags_count = 0;
17 mailbox_recent_flags_set_uid_forced(box, uid);
20 void mailbox_recent_flags_set_uid_forced(struct mailbox *box, uint32_t uid)
22 box->recent_flags_prev_uid = uid;
24 if (!mailbox_recent_flags_have_uid(box, uid)) {
25 seq_range_array_add_with_init(&box->recent_flags, 64, uid);
26 box->recent_flags_count++;
30 void mailbox_recent_flags_set_seqs(struct mailbox *box,
38 mailbox_recent_flags_set_uid(box, uid);
42 bool mailbox_recent_flags_have_uid(struct mailbox *box, uint32_t uid)
44 return array_is_created(&box->recent_flags) &&
45 seq_range_exists(&box->recent_flags, uid);
48 void mailbox_recent_flags_reset(struct mailbox *box)
50 if (array_is_created(&box->recent_flags))
51 array_clear(&box->recent_flags);
52 box->recent_flags_count = 0;
53 box->recent_flags_prev_uid = 0;
56 unsigned int mailbox_recent_flags_count(struct mailbox *box)
62 if (!array_is_created(&box->recent_flags))
65 hdr = mail_index_get_header(box->view);
66 recent_count = box->recent_flags_count;
67 range = array_get(&box->recent_flags, &count);
85 void mailbox_recent_flags_expunge_seqs(struct mailbox *box,
90 if (!array_is_created(&box->recent_flags))
94 mail_index_lookup_uid(box->view, seq1, &uid);
95 if (seq_range_array_remove(&box->recent_flags, uid))
96 box->recent_flags_count--;
100 void mailbox_recent_flags_expunge_uid(struct mailbox *box, uint32_t uid)
102 if (array_is_created(&box->recent_flags)) {
103 if (seq_range_array_remove(&box->recent_flags, uid))
104 box->recent_flags_count--;