diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:51:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:51:24 +0000 |
commit | f7548d6d28c313cf80e6f3ef89aed16a19815df1 (patch) | |
tree | a3f6f2a3f247293bee59ecd28e8cd8ceb6ca064a /src/lib-storage/index/imapc/imapc-mail.h | |
parent | Initial commit. (diff) | |
download | dovecot-upstream.tar.xz dovecot-upstream.zip |
Adding upstream version 1:2.3.19.1+dfsg1.upstream/1%2.3.19.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/lib-storage/index/imapc/imapc-mail.h')
-rw-r--r-- | src/lib-storage/index/imapc/imapc-mail.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/lib-storage/index/imapc/imapc-mail.h b/src/lib-storage/index/imapc/imapc-mail.h new file mode 100644 index 0000000..52dfe5e --- /dev/null +++ b/src/lib-storage/index/imapc/imapc-mail.h @@ -0,0 +1,51 @@ +#ifndef IMAPC_MAIL_H +#define IMAPC_MAIL_H + +#include "index-mail.h" + +struct imap_arg; +struct imapc_untagged_reply; +struct imapc_mailbox; + +struct imapc_mail { + struct index_mail imail; + + enum mail_fetch_field fetching_fields; + const char *const *fetching_headers; + unsigned int fetch_count; + bool fetch_sent; + const char *last_fetch_reply; + + int fd; + buffer_t *body; + bool header_fetched; + bool body_fetched; + bool header_list_fetched; + bool fetch_ignore_if_missing; + bool fetch_failed; +}; + +#define IMAPC_MAIL(s) container_of(s, struct imapc_mail, imail.mail.mail) + +extern struct mail_vfuncs imapc_mail_vfuncs; + +struct mail * +imapc_mail_alloc(struct mailbox_transaction_context *t, + enum mail_fetch_field wanted_fields, + struct mailbox_header_lookup_ctx *wanted_headers); +int imapc_mail_fetch(struct mail *mail, enum mail_fetch_field fields, + const char *const *headers); +void imapc_mail_try_init_stream_from_cache(struct imapc_mail *mail); +bool imapc_mail_prefetch(struct mail *mail); +void imapc_mail_fetch_flush(struct imapc_mailbox *mbox); +void imapc_mail_init_stream(struct imapc_mail *mail); +bool imapc_mail_has_headers_in_cache(struct index_mail *mail, + struct mailbox_header_lookup_ctx *headers); + +void imapc_mail_fetch_update(struct imapc_mail *mail, + const struct imapc_untagged_reply *reply, + const struct imap_arg *args); +void imapc_mail_update_access_parts(struct index_mail *mail); +void imapc_mail_command_flush(struct imapc_mailbox *mbox); + +#endif |