index-mail.h revision a58e4aec412a30352d9d45e63726cac044aa6aa5
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen /* fixed size fields */
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen /* variable sized field */
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainenextern struct mail_cache_field cache_fields[MAIL_CACHE_FIELD_COUNT];
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen /* If binary flags are set, it's not checked whether mail is
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen missing CRs. So this flag may be set as an optimization for
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen regular non-binary mails as well if it's known that it contains
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen valid CR+LF line breaks. */
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen /* Mail header or body is known to contain NUL characters. */
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen /* Mail header or body is known to not contain NUL characters. */
33d63688ed8b26dc333e3c2edbfb2fe6e412604dTimo Sirainen const char *envelope, *body, *bodystructure, *uid_string;
645f258ea29afaf09b673fc65d1bd788dfec8db8Timo Sirainen struct message_part_envelope_data *envelope_data;
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen struct index_header_lookup_ctx *wanted_headers;
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen /* per-mail variables, here for performance reasons: */
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenvoid index_mail_init(struct index_transaction_context *t,
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen struct mailbox_header_lookup_ctx *wanted_headers);
992a13add4eea0810e4db0f042a595dddf85536aTimo Sirainenint index_mail_next(struct index_mail *mail, uint32_t seq);
e8a59a1671127f87e2d22f42e84c572f28299d81Timo Sirainenvoid index_mail_deinit(struct index_mail *mail);
6789ed17e7ca4021713507baf0dcf6979bb42e0cTimo Sirainenvoid index_mail_parse_header_init(struct index_mail *mail,
644268f7848a7c4221146d0b11feb8ed5bbed233Timo Sirainenint index_mail_parse_header(struct message_part *part,
2aecf7be5834e7f6520f8deaad683a6fa1de4d61Timo Sirainenint index_mail_parse_headers(struct index_mail *mail,
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainenvoid index_mail_headers_get_envelope(struct index_mail *mail);
1bdda5c0c30463160c47151537e6bb2c6c994841Timo Sirainenconst char *index_mail_get_header(struct mail *_mail, const char *field);
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenconst struct mail_full_flags *index_mail_get_flags(struct mail *_mail);
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenconst struct message_part *index_mail_get_parts(struct mail *_mail);
8fcff4c5b52f24d9c681805fdf06b486f1d0fcbeTimo Sirainentime_t index_mail_get_received_date(struct mail *_mail);
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainentime_t index_mail_get_date(struct mail *_mail, int *timezone);
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenuoff_t index_mail_get_size(struct mail *_mail);
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenstruct istream *index_mail_init_stream(struct index_mail *mail,
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenconst char *index_mail_get_special(struct mail *_mail,
1171f0abf442638bac1827bb24a0b6b8eb682a82Timo Sirainenconst char *index_mail_get_cached_string(struct index_mail *mail,
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenuoff_t index_mail_get_cached_uoff_t(struct index_mail *mail,
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenuoff_t index_mail_get_cached_virtual_size(struct index_mail *mail);