diff options
Diffstat (limited to 'camel/camel-mime-parser.h')
-rw-r--r-- | camel/camel-mime-parser.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/camel/camel-mime-parser.h b/camel/camel-mime-parser.h index d9a6e8bbb3..477dd4288a 100644 --- a/camel/camel-mime-parser.h +++ b/camel/camel-mime-parser.h @@ -38,6 +38,7 @@ typedef struct _CamelMimeParserClass CamelMimeParserClass; the same as the matching start tag, with a bit difference */ enum _header_state { HSCAN_INITIAL, + HSCAN_PRE_FROM, /* data before a 'From' line */ HSCAN_FROM, /* got 'From' line */ HSCAN_HEADER, /* toplevel header */ HSCAN_BODY, /* scanning body of message */ @@ -49,6 +50,7 @@ enum _header_state { HSCAN_END = 8, /* bit mask for 'end' flags */ HSCAN_EOF = 8, /* end of file */ + HSCAN_PRE_FROM_END, /* pre from end */ HSCAN_FROM_END, /* end of whole from bracket */ HSCAN_HEADER_END, /* dummy value */ HSCAN_BODY_END, /* end of message */ @@ -84,6 +86,8 @@ int camel_mime_parser_fd(CamelMimeParser *m); /* scan 'From' separators? */ void camel_mime_parser_scan_from(CamelMimeParser *, int); +/* Do we want to know about the pre-from data? */ +void camel_mime_parser_scan_pre_from(CamelMimeParser *, int); /* what headers to save, MUST include ^Content-Type: */ int camel_mime_parser_set_header_regex(CamelMimeParser *m, char *matchstr); @@ -94,6 +98,9 @@ void camel_mime_parser_unstep(CamelMimeParser *); void camel_mime_parser_drop_step(CamelMimeParser *m); enum _header_state camel_mime_parser_state(CamelMimeParser *); +/* read through the parser */ +int camel_mime_parser_read(CamelMimeParser *m, const char **databuffer, int len); + /* get content type for the current part/header */ struct _header_content_type *camel_mime_parser_content_type(CamelMimeParser *); @@ -107,6 +114,9 @@ struct _header_raw *camel_mime_parser_headers_raw(CamelMimeParser *); const char *camel_mime_parser_preface(CamelMimeParser *m); const char *camel_mime_parser_postface(CamelMimeParser *m); +/* return the from line content */ +const char *camel_mime_parser_from_line(CamelMimeParser *m); + /* add a processing filter for body contents */ int camel_mime_parser_filter_add(CamelMimeParser *, CamelMimeFilter *); void camel_mime_parser_filter_remove(CamelMimeParser *, int); |