istream-raw-mbox.h revision ed63764502561bbeb12fe03878fb33a82b89bf27
#ifndef ISTREAM_RAW_MBOX_H
#define ISTREAM_RAW_MBOX_H
/* Create a mbox stream for parsing mbox. Reading stops before From-line,
you'll have to call istream_raw_mbox_next() to get to next message.
path is used only for logging purposes. */
const char *path);
/* Return offset to beginning of the "\nFrom"-line. */
/* Return offset to beginning of the headers. */
/* Return offset to beginning of the body. */
/* Return the number of bytes in the body of this message. If
expected_body_size isn't (uoff_t)-1, we'll use it as potentially valid body
size to avoid actually reading through the whole message. */
/* Return received time of current message, or (time_t)-1 if the timestamp is
broken. */
/* Return sender of current message. */
/* Return TRUE if the empty line between this and the next mail contains CR. */
/* Jump to next message. If expected_body_size isn't (uoff_t)-1, we'll use it
as potentially valid body size. */
/* Seek to message at given offset. offset must point to beginning of
"\nFrom ", or 0 for beginning of file. Returns -1 if it offset doesn't
contain a valid From-line. */
/* Set next message's start offset. If this isn't set, read stops at the next
valid From_-line, even if it belongs to the current message's body
(Content-Length: header can be used to determine that). */
/* Returns TRUE if we've read the whole mbox. */
#endif