imap-fetch.h revision a342a31752dd71ac444259ca57ad33ea6b79a572
#ifndef IMAP_FETCH_H
#define IMAP_FETCH_H
struct imap_fetch_context;
/* Returns 1 = ok, 0 = client output buffer full, call again, -1 = error.
mail = NULL for deinit. */
struct imap_fetch_handler {
const char *name;
/* Returns FALSE if arg is invalid. */
};
struct imap_fetch_context_handler {
void *context;
const char *name;
const char *nil_reply;
unsigned int buffered:1;
unsigned int want_deinit:1;
};
struct imap_fetch_context {
struct client_command_context *cmd;
struct mailbox_transaction_context *trans;
struct mail_search_args *search_args;
struct mail_search_context *search_ctx;
enum mail_fetch_field fetch_data;
struct mailbox_header_lookup_ctx *all_headers_ctx;
unsigned int buffered_handlers_count;
unsigned int cur_handler;
const char *cur_name;
bool skip_cr;
unsigned int select_counter;
unsigned int flags_have_handler:1;
unsigned int flags_update_seen:1;
unsigned int seen_flags_changed:1;
unsigned int flags_show_only_seen_changes:1;
unsigned int update_partial:1;
unsigned int cur_have_eoh:1;
unsigned int cur_append_eoh:1;
unsigned int first:1;
unsigned int line_partial:1;
unsigned int line_finished:1;
unsigned int partial_fetch:1;
unsigned int send_vanished:1;
unsigned int failed:1;
};
bool buffered, bool want_deinit,
#ifdef CONTEXT_TYPE_SAFETY
#else
#endif
struct imap_fetch_context *
#endif