MimeParser
Object Hierarchy:
Description:
[ CCode ( type_id = "camel_mime_parser_get_type ()" ) ]
public class MimeParser : Object
Content:
Creation methods:
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)
- 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
- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer
- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref