Class

CamelMimeParser

Description

class Camel.MimeParser : GObject.Object {
  parent: GObject,
  priv: CamelMimeParserPrivate*
}
No description available.

Ancestors

Constructors

camel_mime_parser_new

Create a new CamelMimeParser object.

Instance methods

camel_mime_parser_content_type

Get the content type defined in the current part.

camel_mime_parser_drop_step

Drop the last step call. This should only be used in conjunction with seeking of the stream as the stream may be in an undefined state relative to the state of the parser.

camel_mime_parser_dup_headers

Get the list of the raw headers which are defined for the current state of the parser. These headers are valid until the next call to camel_mime_parser_step(), or camel_mime_parser_drop_step().

since: 3.24

camel_mime_parser_errno
No description available.

camel_mime_parser_filter_add

Add a filter that will be applied to any body content before it is passed to the caller. Filters may be pipelined to perform multi-pass operations on the content, and are applied in the order they were added.

since: 2.22

camel_mime_parser_filter_remove

Remove a processing filter from the pipeline. There is no restriction on the order the filters can be removed.

since: 2.22

camel_mime_parser_from_line

Get the last scanned “From ” line, from a recently scanned from. This should only be called in the CAMEL_MIME_PARSER_STATE_FROM state. The from line will include the closing \n found (if there was one).

since: 2.22

camel_mime_parser_header

Lookup a header by name.

camel_mime_parser_init_with_bytes

Convenience function creates a GMemoryInputStream from bytes and hands it off to camel_mime_parser_init_with_input_stream().

since: 3.12

camel_mime_parser_init_with_fd

Initialise the scanner with an fd. The scanner’s offsets will be relative to the current file position of the file descriptor. As a result, seekable descritors should be seeked using the parser seek functions.

camel_mime_parser_init_with_input_stream

Initialize the scanner with input_stream. The scanner’s offsets will be relative to the current file position of the stream. As a result, seekable streams should only be seeked using the parser seek function.

since: 3.12

camel_mime_parser_init_with_stream

Initialise the scanner with a source stream. The scanner’s offsets will be relative to the current file position of the stream. As a result, seekable streams should only be seeked using the parser seek function.

camel_mime_parser_postface

Retrieve the postface text for the current multipart. Only returns valid data when the current state if CAMEL_MIME_PARSER_STATE_MULTIPART_END.

since: 2.22

camel_mime_parser_preface

Retrieve the preface text for the current multipart. Can only be used when the state is CAMEL_MIME_PARSER_STATE_MULTIPART_END.

since: 2.22

camel_mime_parser_push_state

Pre-load a new parser state. Used to post-parse multipart content without headers.

camel_mime_parser_read

Read at most len bytes from the internal mime parser buffer.

camel_mime_parser_scan_from

Tell the scanner if it should scan “^From ” lines or not.

camel_mime_parser_scan_pre_from

Tell the scanner whether we want to know abou the pre-from data during a scan. If we do, then we may get an additional state CAMEL_MIME_PARSER_STATE_PRE_FROM which returns the specified data.

camel_mime_parser_seek

Reset the source position to a known value.

since: 2.22

camel_mime_parser_set_header_regex
No description available.

camel_mime_parser_state

Get the current parser state.

camel_mime_parser_step

Parse the next part of the MIME message. If camel_mime_parser_unstep() has been called, then continue to return the same state for that many calls.

camel_mime_parser_stream

Get the stream, if any, the parser has been initialised with. May be used to setup sub-streams, but should not be read from directly (without saving and restoring the seek position in between).

camel_mime_parser_tell

Return the current scanning offset. The meaning of this value will depend on the current state of the parser.

since: 2.22

camel_mime_parser_tell_start_boundary

When parsing a multipart, this returns the start of the last boundary.

since: 2.22

camel_mime_parser_tell_start_from

If the parser is scanning From lines, then this returns the position of the start of the From line.

since: 2.22

camel_mime_parser_tell_start_headers

Find out the position within the file of where the headers started, this is cached by the parser at the time.

since: 2.22

camel_mime_parser_unstep

Cause the last step operation to repeat itself. If this is called repeated times, then the same step will be repeated that many times.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Signals

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct CamelMimeParserClass {
  GObjectClass parent_class;
  void (* message) (
    CamelMimeParser* parser,
    gpointer headers
  );
  void (* part) (
    CamelMimeParser* parser
  );
  void (* content) (
    CamelMimeParser* parser
  );
  None reserved;
  
}
No description available.
Class members
parent_class: GObjectClass
No description available.
message: void (* message) ( CamelMimeParser* parser, gpointer headers )
No description available.
part: void (* part) ( CamelMimeParser* parser )
No description available.
content: void (* content) ( CamelMimeParser* parser )
No description available.
reserved: None
No description available.

Virtual methods

Camel.MimeParserClass.content
No description available.

Camel.MimeParserClass.message
No description available.

Camel.MimeParserClass.part
No description available.