view src/lib-mail/message-content-parser.h @ 896:21ffcce83c70 HEAD

Rewrote rfc822-tokenize.c to work one token at a time so it won't uselessly take memory, maybe also a bit faster. This caused pretty large changes all around. Also moved all string (un)escaping code to lib/strescape.c.
author Timo Sirainen <tss@iki.fi>
date Fri, 03 Jan 2003 17:57:12 +0200
parents f3ab97771ed8
children 0d5be52d7131
line wrap: on
line source

#ifndef __MESSAGE_CONTENT_PARSER_H
#define __MESSAGE_CONTENT_PARSER_H

/* NOTE: name and value aren't \0-terminated. */
typedef void (*ParseContentFunc)(const char *value, size_t value_len,
				 void *context);
typedef void (*ParseContentParamFunc)(const char *name, size_t name_len,
				      const char *value, size_t value_len,
				      int value_quoted, void *context);

void message_content_parse_header(const char *data, size_t size,
				  ParseContentFunc func,
				  ParseContentParamFunc param_func,
				  void *context);

#endif