From: Timo Sirainen Date: Wed, 12 Jun 2013 19:58:42 +0000 (+0300) Subject: lib-storage: Added MAIL_STORAGE_CLASS_FLAG_BINARY_DATA flag for classes. X-Git-Tag: 2.2.3~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d46a1e3f999dda802dc5137e883adcd7a6629cd3;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: Added MAIL_STORAGE_CLASS_FLAG_BINARY_DATA flag for classes. --- diff --git a/src/lib-storage/index/cydir/cydir-storage.c b/src/lib-storage/index/cydir/cydir-storage.c index 9e7b73b413..1338836960 100644 --- a/src/lib-storage/index/cydir/cydir-storage.c +++ b/src/lib-storage/index/cydir/cydir-storage.c @@ -110,7 +110,8 @@ static void cydir_notify_changes(struct mailbox *box) struct mail_storage cydir_storage = { .name = CYDIR_STORAGE_NAME, - .class_flags = MAIL_STORAGE_CLASS_FLAG_FILE_PER_MSG, + .class_flags = MAIL_STORAGE_CLASS_FLAG_FILE_PER_MSG | + MAIL_STORAGE_CLASS_FLAG_BINARY_DATA, .v = { NULL, diff --git a/src/lib-storage/index/dbox-multi/mdbox-storage.c b/src/lib-storage/index/dbox-multi/mdbox-storage.c index bb81b66c6c..5e135263dd 100644 --- a/src/lib-storage/index/dbox-multi/mdbox-storage.c +++ b/src/lib-storage/index/dbox-multi/mdbox-storage.c @@ -418,7 +418,8 @@ struct mail_storage mdbox_storage = { .name = MDBOX_STORAGE_NAME, .class_flags = MAIL_STORAGE_CLASS_FLAG_UNIQUE_ROOT | MAIL_STORAGE_CLASS_FLAG_HAVE_MAIL_GUIDS | - MAIL_STORAGE_CLASS_FLAG_HAVE_MAIL_SAVE_GUIDS, + MAIL_STORAGE_CLASS_FLAG_HAVE_MAIL_SAVE_GUIDS | + MAIL_STORAGE_CLASS_FLAG_BINARY_DATA, .v = { mdbox_get_setting_parser_info, diff --git a/src/lib-storage/index/dbox-single/sdbox-storage.c b/src/lib-storage/index/dbox-single/sdbox-storage.c index 708a9732a5..9ee0daa6f9 100644 --- a/src/lib-storage/index/dbox-single/sdbox-storage.c +++ b/src/lib-storage/index/dbox-single/sdbox-storage.c @@ -401,7 +401,8 @@ struct mail_storage sdbox_storage = { .name = SDBOX_STORAGE_NAME, .class_flags = MAIL_STORAGE_CLASS_FLAG_FILE_PER_MSG | MAIL_STORAGE_CLASS_FLAG_HAVE_MAIL_GUIDS | - MAIL_STORAGE_CLASS_FLAG_HAVE_MAIL_SAVE_GUIDS, + MAIL_STORAGE_CLASS_FLAG_HAVE_MAIL_SAVE_GUIDS | + MAIL_STORAGE_CLASS_FLAG_BINARY_DATA, .v = { NULL, diff --git a/src/lib-storage/index/maildir/maildir-storage.c b/src/lib-storage/index/maildir/maildir-storage.c index 1a076635e2..afd84a87b5 100644 --- a/src/lib-storage/index/maildir/maildir-storage.c +++ b/src/lib-storage/index/maildir/maildir-storage.c @@ -658,7 +658,8 @@ struct mail_storage maildir_storage = { .name = MAILDIR_STORAGE_NAME, .class_flags = MAIL_STORAGE_CLASS_FLAG_FILE_PER_MSG | MAIL_STORAGE_CLASS_FLAG_HAVE_MAIL_GUIDS | - MAIL_STORAGE_CLASS_FLAG_HAVE_MAIL_SAVE_GUIDS, + MAIL_STORAGE_CLASS_FLAG_HAVE_MAIL_SAVE_GUIDS | + MAIL_STORAGE_CLASS_FLAG_BINARY_DATA, .v = { maildir_get_setting_parser_info, diff --git a/src/lib-storage/index/raw/raw-storage.c b/src/lib-storage/index/raw/raw-storage.c index f5c1a9c7e9..84c07749c1 100644 --- a/src/lib-storage/index/raw/raw-storage.c +++ b/src/lib-storage/index/raw/raw-storage.c @@ -200,7 +200,8 @@ static void raw_notify_changes(struct mailbox *box ATTR_UNUSED) struct mail_storage raw_storage = { .name = RAW_STORAGE_NAME, .class_flags = MAIL_STORAGE_CLASS_FLAG_MAILBOX_IS_FILE | - MAIL_STORAGE_CLASS_FLAG_OPEN_STREAMS, + MAIL_STORAGE_CLASS_FLAG_OPEN_STREAMS | + MAIL_STORAGE_CLASS_FLAG_BINARY_DATA, .v = { NULL, diff --git a/src/lib-storage/mail-storage-private.h b/src/lib-storage/mail-storage-private.h index 1c31c14cd7..08018b73be 100644 --- a/src/lib-storage/mail-storage-private.h +++ b/src/lib-storage/mail-storage-private.h @@ -69,7 +69,10 @@ enum mail_storage_class_flags { MAIL_STORAGE_CLASS_FLAG_HAVE_MAIL_GUIDS = 0x40, /* mailbox_save_set_guid() works (always set mailbox_status.have_save_guids=TRUE) */ - 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 + (e.g. zlib plugin is allowed to compress/decompress mails) */ + MAIL_STORAGE_CLASS_FLAG_BINARY_DATA = 0x100 }; struct mail_binary_cache {