imap-fetch.h revision 2ba4e9bedb0fa778dfbccec5370018b4d0040d9c
#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;
};
struct imap_fetch_context {
struct mailbox_transaction_context *trans;
struct mail_search_context *search_ctx;
enum mail_fetch_field fetch_data;
struct mailbox_header_lookup_ctx *all_headers_ctx;
unsigned int cur_handler;
int skip_cr;
unsigned int select_counter;
struct mail_full_flags seen_flag;
unsigned int flags_have_handler:1;
unsigned int flags_update_seen: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_finished:1;
unsigned int failed:1;
};
struct mail_search_arg *search_arg);
#endif