MimeParser
Object Hierarchy:
Description:
Namespace: Camel
Package: camel-1.2
Content:
Creation methods:
- public MimeParser ()
Create a new CamelMimeParser object.
Methods:
- public virtual void content ()
- public ContentType? content_type ()
Get the content type defined in the current part.
- public void drop_step ()
Drop the last step call.
- public NameValueArray? dup_headers ()
Get the list of the raw headers which are defined for the current state of the parser.
- public int errno ()
- public int filter_add (MimeFilter mf)
Add a filter that will be applied to any body content before it is passed to the caller.
- public void filter_remove (int id)
Remove a processing filter from the pipeline.
- public unowned string? from_line ()
Get the last scanned "From " line, from a recently scanned from.
- public unowned string? header (string name, int offset)
Lookup a header by name.
- public void init_with_bytes (Bytes bytes)
Convenience function creates a MemoryInputStream from
bytes
and hands it off to init_with_input_stream. - public int init_with_fd (int fd)
Initialise the scanner with an fd.
- public void init_with_input_stream (InputStream input_stream)
Initialize the scanner with
input_stream
. - public int init_with_stream (Stream stream) throws Error
Initialise the scanner with a source stream.
- public virtual void message (void* headers)
- public virtual void part ()
- public unowned string? postface ()
Retrieve the postface text for the current multipart.
- public unowned string? preface ()
Retrieve the preface text for the current multipart.
- public void push_state (MimeParserState newstate, string boundary)
Pre-load a new parser state.
- public ssize_t read (out uint8[] databuffer, ssize_t len) throws Error
Read at most
len
bytes from the internal mime parser buffer. - public void scan_from (bool scan_from)
Tell the scanner if it should scan "^From " lines or not.
- public void scan_pre_from (bool scan_pre_from)
Tell the scanner whether we want to know abou the pre-from data during a scan.
- public int64 seek (int64 offset, int whence)
Reset the source position to a known value.
- public int set_header_regex (string matchstr)
- public MimeParserState state ()
Get the current parser state.
- public MimeParserState step (ref uint8[] databuffer)
Parse the next part of the MIME message.
- public unowned Stream? stream ()
Get the stream, if any, the parser has been initialised with.
- public int64 tell ()
Return the current scanning offset.
- public int64 tell_start_boundary ()
When parsing a multipart, this returns the start of the last boundary.
- public int64 tell_start_from ()
If the parser is scanning From lines, then this returns the position of the start of the From line.
- public int64 tell_start_headers ()
Find out the position within the file of where the headers started, this is cached by the parser at the time.
- public void unstep ()
Cause the last step operation to repeat itself.
Inherited Members:
All known members inherited from class GLib.Object