message-header-parser.h revision a10ed8c47534b4c6b6bf2711ccfe577e720a47b4
#ifndef MESSAGE_HEADER_PARSER_H
#define MESSAGE_HEADER_PARSER_H
#define IS_LWSP(c) \
((c) == ' ' || (c) == '\t')
struct message_size;
struct message_header_parser_ctx;
enum message_header_parser_flags {
/* Don't add LWSP after "header: " to value. */
/* Don't add CRs to full_value even if input had them */
/* Convert [CR+]LF+LWSP to a space character in full_value */
};
struct message_header_line {
const char *name;
const unsigned char *value;
const unsigned char *full_value;
const unsigned char *middle;
};
/* called once with hdr = NULL at the end of headers */
void *context);
struct message_header_parser_ctx *
/* Read and return next header line. Returns 1 if header is returned, 0 if
input stream is non-blocking and more data needs to be read, -1 when all is
done or error occurred (see stream's error status). */
struct message_header_line **hdr_r);
/* Returns TRUE if the parser has seen NUL characters. */
/* Read and parse the header from the given stream. */
ATTR_NULL(2);
#ifdef CONTEXT_TYPE_SAFETY
#else
#endif
#endif