imap client: initial implementation of fetch.
* include/mailutils/imap.h (mu_imap_fetch): New proto. (MU_IMAP_CB_FETCH): New callback code. (MU_IMAP_FETCH_BODY,MU_IMAP_FETCH_BODYSTRUCTURE) (MU_IMAP_FETCH_ENVELOPE,MU_IMAP_FETCH_FLAGS) (MU_IMAP_FETCH_INTERNALDATE,MU_IMAP_FETCH_RFC822_SIZE) (MU_IMAP_FETCH_UID): New constants. (mu_imap_fetch_body,mu_imap_fetch_bodystructure) (mu_imap_fetch_envelope,mu_imap_fetch_flags) (mu_imap_fetch_internaldate,mu_imap_fetch_rfc822_size) (mu_imap_fetch_uid,mu_imap_fetch_response): New structures. * include/mailutils/sys/imap.h (MU_IMAP_SET_XSCRIPT_MASK) (MU_IMAP_CLR_XSCRIPT_MASK): New macros. (mu_imap_client_state)<MU_IMAP_FETCH_RX>: New state. (_mu_imap_list_nth_element_is_string): New proto. * libproto/imap/fetch.c: New file. * libproto/imap/Makefile.am (libmu_imap_la_SOURCES): Add fetch.c * libproto/imap/carrier.c (mu_imap_set_carrier): Update call to mu_imapio_create. * libproto/imap/resplist.c (_mu_imap_list_nth_element_is_string): New function. * libproto/imap/resproc.c (_process_unsolicited_response): Handle FETCH response. * libproto/imap/trace.c (mu_imap_trace_mask): Call mu_imapio_trace_payload if needed. * mu/imap.c (imap_bad_callback): New function. (com_disconnect): Register imap_bad_callback. (com_fetch): New function. (imap_comtab): Add the "fetch" command. * mu/mu.h (mutool_command) <flags>: New member. * mu/pop.c (pop_comtab): Update initializers. * mu/shell.c (default_comtab): Update initializers. (execute_line): Rewrite using incremental wordsplit. This allows for optionally coalescing arguments with indices >= argmax into one argument. This is useful for such commands as "prompt" and "fetch".
Showing
13 changed files
with
310 additions
and
82 deletions
libproto/imap/fetch.c
0 → 100644
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment