Mercurial > dovecot > core-2.2
view src/lib-mail/message-header-search.h @ 568:f2aa58c2afd0 HEAD
SEARCH CHARSET support. Currently we do it through iconv() and only ASCII
characters are compared case-insensitively.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 03 Nov 2002 10:39:43 +0200 |
parents | |
children | debb8468514e |
line wrap: on
line source
#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. */ HeaderSearchContext * message_header_search_init(Pool pool, const char *key, const char *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, size_t *header_size, HeaderSearchContext *ctx); /* Next call to message_header_search() will begin a new header. */ void message_header_search_reset(HeaderSearchContext *ctx); #endif