mail-storage-private.h (dovecot-2.3.16) | : | mail-storage-private.h (dovecot-2.3.17) | ||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
#include "unichar.h" | #include "unichar.h" | |||
#include "file-lock.h" | #include "file-lock.h" | |||
#include "mail-storage.h" | #include "mail-storage.h" | |||
#include "mail-storage-hooks.h" | #include "mail-storage-hooks.h" | |||
#include "mail-storage-settings.h" | #include "mail-storage-settings.h" | |||
#include "mailbox-attribute-private.h" | #include "mailbox-attribute-private.h" | |||
#include "mail-index-private.h" | #include "mail-index-private.h" | |||
struct file_lock; | struct file_lock; | |||
struct file_create_settings; | struct file_create_settings; | |||
struct fs; | ||||
/* Default prefix for indexes */ | /* Default prefix for indexes */ | |||
#define MAIL_INDEX_PREFIX "dovecot.index" | #define MAIL_INDEX_PREFIX "dovecot.index" | |||
/* Block size when read()ing message header. */ | /* Block size when read()ing message header. */ | |||
#define MAIL_READ_HDR_BLOCK_SIZE (1024*4) | #define MAIL_READ_HDR_BLOCK_SIZE (1024*4) | |||
/* Block size when read()ing message (header and) body. */ | /* Block size when read()ing message (header and) body. */ | |||
#define MAIL_READ_FULL_BLOCK_SIZE IO_BLOCK_SIZE | #define MAIL_READ_FULL_BLOCK_SIZE IO_BLOCK_SIZE | |||
#define MAIL_SHARED_STORAGE_NAME "shared" | #define MAIL_SHARED_STORAGE_NAME "shared" | |||
#define MAIL_STORAGE_LOST_MAILBOX_PREFIX "recovered-lost-folder-" | ||||
enum mail_storage_list_index_rebuild_reason { | enum mail_storage_list_index_rebuild_reason { | |||
/* Mailbox list index was found to be corrupted. */ | /* Mailbox list index was found to be corrupted. */ | |||
MAIL_STORAGE_LIST_INDEX_REBUILD_REASON_CORRUPTED, | MAIL_STORAGE_LIST_INDEX_REBUILD_REASON_CORRUPTED, | |||
/* Mailbox list index doesn't have INBOX in an inbox=yes namespace. | /* Mailbox list index doesn't have INBOX in an inbox=yes namespace. | |||
Rebuild is done to verify whether the user really is an empty new | Rebuild is done to verify whether the user really is an empty new | |||
user, or if an existing user's mailbox list index was lost. Because | user, or if an existing user's mailbox list index was lost. Because | |||
this is called in non-error conditions, the callback shouldn't log | this is called in non-error conditions, the callback shouldn't log | |||
any errors or warnings if it didn't find any missing mailboxes. */ | any errors or warnings if it didn't find any missing mailboxes. */ | |||
MAIL_STORAGE_LIST_INDEX_REBUILD_REASON_NO_INBOX, | MAIL_STORAGE_LIST_INDEX_REBUILD_REASON_NO_INBOX, | |||
/* MAILBOX_SYNC_FLAG_FORCE_RESYNC is run. This is called only once | /* MAILBOX_SYNC_FLAG_FORCE_RESYNC is run. This is called only once | |||
skipping to change at line 109 | skipping to change at line 112 | |||
MAIL_STORAGE_CLASS_FLAG_HAVE_MAIL_SAVE_GUIDS = 0x80, | MAIL_STORAGE_CLASS_FLAG_HAVE_MAIL_SAVE_GUIDS = 0x80, | |||
/* message content can be unstructured binary data | /* message content can be unstructured binary data | |||
(e.g. zlib plugin is allowed to compress/decompress mails) */ | (e.g. zlib plugin is allowed to compress/decompress mails) */ | |||
MAIL_STORAGE_CLASS_FLAG_BINARY_DATA = 0x100, | MAIL_STORAGE_CLASS_FLAG_BINARY_DATA = 0x100, | |||
/* Message GUIDs can only be 128bit (always set | /* Message GUIDs can only be 128bit (always set | |||
mailbox_status.have_only_guid128) */ | mailbox_status.have_only_guid128) */ | |||
MAIL_STORAGE_CLASS_FLAG_HAVE_MAIL_GUID128 = 0x200, | MAIL_STORAGE_CLASS_FLAG_HAVE_MAIL_GUID128 = 0x200, | |||
/* Storage deletes all files internally - mailbox list's | /* Storage deletes all files internally - mailbox list's | |||
delete_mailbox() shouldn't delete anything itself. */ | delete_mailbox() shouldn't delete anything itself. */ | |||
MAIL_STORAGE_CLASS_FLAG_NO_LIST_DELETES = 0x400, | MAIL_STORAGE_CLASS_FLAG_NO_LIST_DELETES = 0x400, | |||
/* Storage creates a secondary index */ | ||||
MAIL_STORAGE_CLASS_FLAG_SECONDARY_INDEX = 0x800, | ||||
}; | }; | |||
struct mail_binary_cache { | struct mail_binary_cache { | |||
struct timeout *to; | struct timeout *to; | |||
struct mailbox *box; | struct mailbox *box; | |||
uint32_t uid; | uint32_t uid; | |||
uoff_t orig_physical_pos; | uoff_t orig_physical_pos; | |||
bool include_hdr; | bool include_hdr; | |||
struct istream *input; | struct istream *input; | |||
skipping to change at line 156 | skipping to change at line 161 | |||
int refcount; | int refcount; | |||
/* counting number of objects (e.g. mailbox) that have a pointer | /* counting number of objects (e.g. mailbox) that have a pointer | |||
to this storage. */ | to this storage. */ | |||
int obj_refcount; | int obj_refcount; | |||
/* Linked list of all mailboxes in the storage */ | /* Linked list of all mailboxes in the storage */ | |||
struct mailbox *mailboxes; | struct mailbox *mailboxes; | |||
/* A "root dir" to enable storage sharing. It is only ever used for | /* A "root dir" to enable storage sharing. It is only ever used for | |||
* uniqueness checking (via strcmp) and never used as a path. */ | * uniqueness checking (via strcmp) and never used as a path. */ | |||
const char *unique_root_dir; | const char *unique_root_dir; | |||
/* prefix for lost mailbox */ | ||||
const char *lost_mailbox_prefix; | ||||
/* Last error set in mail_storage_set_critical(). */ | /* Last error set in mail_storage_set_critical(). */ | |||
char *last_internal_error; | char *last_internal_error; | |||
char *error_string; | char *error_string; | |||
enum mail_error error; | enum mail_error error; | |||
ARRAY(struct mail_storage_error) error_stack; | ARRAY(struct mail_storage_error) error_stack; | |||
struct event *event; | struct event *event; | |||
const struct mail_storage *storage_class; | const struct mail_storage *storage_class; | |||
struct mail_user *user; | struct mail_user *user; | |||
skipping to change at line 179 | skipping to change at line 187 | |||
enum mail_storage_flags flags; | enum mail_storage_flags flags; | |||
struct mail_storage_callbacks callbacks; | struct mail_storage_callbacks callbacks; | |||
void *callback_context; | void *callback_context; | |||
struct mail_binary_cache binary_cache; | struct mail_binary_cache binary_cache; | |||
/* Filled lazily by mailbox_attribute_*() when accessing shared | /* Filled lazily by mailbox_attribute_*() when accessing shared | |||
attributes. */ | attributes. */ | |||
struct dict *_shared_attr_dict; | struct dict *_shared_attr_dict; | |||
/* optional fs-api object for accessing mailboxes */ | ||||
struct fs *mailboxes_fs; | ||||
/* Module-specific contexts. See mail_storage_module_id. */ | /* Module-specific contexts. See mail_storage_module_id. */ | |||
ARRAY(union mail_storage_module_context *) module_contexts; | ARRAY(union mail_storage_module_context *) module_contexts; | |||
/* Failed to create shared attribute dict, don't try again */ | /* Failed to create shared attribute dict, don't try again */ | |||
bool shared_attr_dict_failed:1; | bool shared_attr_dict_failed:1; | |||
bool last_error_is_internal:1; | bool last_error_is_internal:1; | |||
bool rebuilding_list_index:1; | ||||
bool rebuild_list_index:1; | ||||
}; | }; | |||
struct mail_attachment_part { | struct mail_attachment_part { | |||
struct message_part *part; | struct message_part *part; | |||
const char *content_type, *content_disposition; | const char *content_type, *content_disposition; | |||
}; | }; | |||
struct virtual_mailbox_vfuncs { | struct virtual_mailbox_vfuncs { | |||
/* convert backend UIDs to virtual UIDs. if some backend UID doesn't | /* convert backend UIDs to virtual UIDs. if some backend UID doesn't | |||
exist in mailbox, it's simply ignored */ | exist in mailbox, it's simply ignored */ | |||
skipping to change at line 868 | skipping to change at line 881 | |||
mail_storage_settings_to_index_flags(const struct mail_storage_settings *set); | mail_storage_settings_to_index_flags(const struct mail_storage_settings *set); | |||
void mailbox_save_context_deinit(struct mail_save_context *ctx); | void mailbox_save_context_deinit(struct mail_save_context *ctx); | |||
/* Notify that a sync should be done. */ | /* Notify that a sync should be done. */ | |||
void mailbox_sync_notify(struct mailbox *box, uint32_t uid, | void mailbox_sync_notify(struct mailbox *box, uint32_t uid, | |||
enum mailbox_sync_type sync_type); | enum mailbox_sync_type sync_type); | |||
/* for unit testing */ | /* for unit testing */ | |||
int mailbox_verify_name(struct mailbox *box); | int mailbox_verify_name(struct mailbox *box); | |||
int mail_storage_list_index_rebuild_and_set_uncorrupted(struct mail_storage *sto | ||||
rage); | ||||
int mail_storage_list_index_rebuild(struct mail_storage *storage, | ||||
enum mail_storage_list_index_rebuild_reason r | ||||
eason); | ||||
#endif | #endif | |||
End of changes. 7 change blocks. | ||||
0 lines changed or deleted | 19 lines changed or added |