message-header-search.h revision d8e43743157d05e416eb5d3b45cddb3b3122dc07
#ifndef __MESSAGE_HEADER_SEARCH_H
#define __MESSAGE_HEADER_SEARCH_H
typedef struct _HeaderSearchContext HeaderSearchContext;
/* Initialize new search. Allocates memory from data stack. Returns NULL
if charset is unknown or key is not valid in specified charset. */
int *unknown_charset);
/* Returns TRUE if key is found from header. This function may be called
multiple times with partial header blocks, but the blocks must contain only
full lines so RFC2047 parsing can be done. *header_size is updated to
contain the number of bytes we didn't access (either because we got a match,
or because end of headers). */
int message_header_search(const unsigned char *header_block,
/* Next call to message_header_search() will begin a new header. */
#endif