virtual-storage.h (dovecot-2.3.16) | : | virtual-storage.h (dovecot-2.3.17) | ||
---|---|---|---|---|
skipping to change at line 16 | skipping to change at line 16 | |||
#define VIRTUAL_STORAGE_NAME "virtual" | #define VIRTUAL_STORAGE_NAME "virtual" | |||
#define VIRTUAL_SUBSCRIPTION_FILE_NAME ".virtual-subscriptions" | #define VIRTUAL_SUBSCRIPTION_FILE_NAME ".virtual-subscriptions" | |||
#define VIRTUAL_CONFIG_FNAME "dovecot-virtual" | #define VIRTUAL_CONFIG_FNAME "dovecot-virtual" | |||
#define VIRTUAL_CONTEXT(obj) \ | #define VIRTUAL_CONTEXT(obj) \ | |||
MODULE_CONTEXT(obj, virtual_storage_module) | MODULE_CONTEXT(obj, virtual_storage_module) | |||
#define VIRTUAL_CONTEXT_REQUIRE(obj) \ | #define VIRTUAL_CONTEXT_REQUIRE(obj) \ | |||
MODULE_CONTEXT_REQUIRE(obj, virtual_storage_module) | MODULE_CONTEXT_REQUIRE(obj, virtual_storage_module) | |||
#define VIRTUAL_MAIL_INDEX_EXT2_HEADER_VERSION 1 | ||||
struct virtual_save_context; | struct virtual_save_context; | |||
struct virtual_mail_index_header { | struct virtual_mail_index_header { | |||
/* Increased by one each time the header is modified */ | /* Increased by one each time the header is modified */ | |||
uint32_t change_counter; | uint32_t change_counter; | |||
/* Number of mailbox records following this header. Mailbox names | /* Number of mailbox records following this header. Mailbox names | |||
follow the mailbox records - they have neither NUL terminator nor | follow the mailbox records - they have neither NUL terminator nor | |||
padding. */ | padding. */ | |||
uint32_t mailbox_count; | uint32_t mailbox_count; | |||
/* Highest used mailbox ID. IDs are never reused. */ | /* Highest used mailbox ID. IDs are never reused. */ | |||
skipping to change at line 45 | skipping to change at line 47 | |||
/* Length of this mailbox's name. */ | /* Length of this mailbox's name. */ | |||
uint32_t name_len; | uint32_t name_len; | |||
/* Synced UID validity value */ | /* Synced UID validity value */ | |||
uint32_t uid_validity; | uint32_t uid_validity; | |||
/* Next unseen UID */ | /* Next unseen UID */ | |||
uint32_t next_uid; | uint32_t next_uid; | |||
/* Synced highest modseq value */ | /* Synced highest modseq value */ | |||
uint64_t highest_modseq; | uint64_t highest_modseq; | |||
}; | }; | |||
struct virtual_mail_index_ext2_header { | ||||
/* Version compatibility number: | ||||
VIRTUAL_MAIL_INDEX_EXT2_HEADER_VERSION */ | ||||
uint8_t version; | ||||
/* Set to sizeof(struct virtual_mail_index_mailbox_ext2_record) when | ||||
writing. */ | ||||
uint8_t ext_record_size; | ||||
/* Set to sizeof(struct virtual_mail_index_ext2_header) when writing. */ | ||||
uint16_t hdr_size; | ||||
/* Must be the same as virtual_mail_index_header.change_counter. | ||||
If not, it means the header was modified by an older Dovecot version | ||||
and this extension header should be ignored/rewritten. */ | ||||
uint32_t change_counter; | ||||
}; | ||||
struct virtual_mail_index_mailbox_ext2_record { | ||||
/* Synced GUID value */ | ||||
uint8_t guid[16]; | ||||
}; | ||||
struct virtual_mail_index_record { | struct virtual_mail_index_record { | |||
uint32_t mailbox_id; | uint32_t mailbox_id; | |||
uint32_t real_uid; | uint32_t real_uid; | |||
}; | }; | |||
struct virtual_storage { | struct virtual_storage { | |||
struct mail_storage storage; | struct mail_storage storage; | |||
/* List of mailboxes while a virtual mailbox is being opened. | /* List of mailboxes while a virtual mailbox is being opened. | |||
Used to track loops. */ | Used to track loops. */ | |||
skipping to change at line 81 | skipping to change at line 103 | |||
struct virtual_backend_box *prev_open, *next_open; | struct virtual_backend_box *prev_open, *next_open; | |||
/* Initially zero, updated by syncing */ | /* Initially zero, updated by syncing */ | |||
uint32_t mailbox_id; | uint32_t mailbox_id; | |||
const char *name; | const char *name; | |||
unsigned int sync_mailbox_idx1; | unsigned int sync_mailbox_idx1; | |||
uint32_t sync_uid_validity; | uint32_t sync_uid_validity; | |||
uint32_t sync_next_uid; | uint32_t sync_next_uid; | |||
uint64_t sync_highest_modseq; | uint64_t sync_highest_modseq; | |||
guid_128_t sync_guid; | ||||
/* this value is either 0 or same as sync_highest_modseq. it's kept 0 | /* this value is either 0 or same as sync_highest_modseq. it's kept 0 | |||
when there are pending removes that have yet to be expunged */ | when there are pending removes that have yet to be expunged */ | |||
uint64_t ondisk_highest_modseq; | uint64_t ondisk_highest_modseq; | |||
struct mail_search_args *search_args; | struct mail_search_args *search_args; | |||
struct mail_search_result *search_result; | struct mail_search_result *search_result; | |||
struct mailbox *box; | struct mailbox *box; | |||
/* Messages currently included in the virtual mailbox, | /* Messages currently included in the virtual mailbox, | |||
sorted by real_uid */ | sorted by real_uid */ | |||
skipping to change at line 120 | skipping to change at line 143 | |||
bool open_tracked:1; | bool open_tracked:1; | |||
bool open_failed:1; | bool open_failed:1; | |||
bool sync_seen:1; | bool sync_seen:1; | |||
bool wildcard:1; | bool wildcard:1; | |||
bool clear_recent:1; | bool clear_recent:1; | |||
bool negative_match:1; | bool negative_match:1; | |||
bool uids_nonsorted:1; | bool uids_nonsorted:1; | |||
bool search_args_initialized:1; | bool search_args_initialized:1; | |||
bool deleted:1; | bool deleted:1; | |||
bool notify_changes_started:1; /* if the box was opened for notify_change s */ | bool notify_changes_started:1; /* if the box was opened for notify_change s */ | |||
bool first_sync:1; /* if this is the first sync after bbox was (re-)creat ed */ | ||||
}; | }; | |||
ARRAY_DEFINE_TYPE(virtual_backend_box, struct virtual_backend_box *); | ARRAY_DEFINE_TYPE(virtual_backend_box, struct virtual_backend_box *); | |||
struct virtual_mailbox { | struct virtual_mailbox { | |||
struct mailbox box; | struct mailbox box; | |||
struct virtual_storage *storage; | struct virtual_storage *storage; | |||
uint32_t virtual_ext_id; | uint32_t virtual_ext_id; | |||
uint32_t virtual_ext2_id; | ||||
uint32_t virtual_guid_ext_id; | uint32_t virtual_guid_ext_id; | |||
uint32_t prev_uid_validity; | uint32_t prev_uid_validity; | |||
uint32_t prev_change_counter; | uint32_t prev_change_counter; | |||
uint32_t highest_mailbox_id; | uint32_t highest_mailbox_id; | |||
uint32_t search_args_crc32; | uint32_t search_args_crc32; | |||
guid_128_t guid; | guid_128_t guid; | |||
struct virtual_backend_box *lookup_prev_bbox; | struct virtual_backend_box *lookup_prev_bbox; | |||
uint32_t sync_virtual_next_uid; | uint32_t sync_virtual_next_uid; | |||
End of changes. 5 change blocks. | ||||
0 lines changed or deleted | 25 lines changed or added |