GMime Library Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
struct GMimeParser; GMimeParser* g_mime_parser_new (void); void g_mime_parser_init_with_stream (GMimeParser *parser, GMimeStream *stream); void g_mime_parser_set_scan_from (GMimeParser *parser, |
void g_mime_parser_init_with_stream (GMimeParser *parser, GMimeStream *stream); |
Initializes parser to use stream.
WARNING: Initializing a parser with a stream is comparable to selling your soul (stream) to the devil (parser). You are basically giving the parser complete control of the stream, this means that you had better not touch the stream so long as the parser is still using it. This means no reading, writing, seeking, or resetting of the stream. Anything that will/could change the current stream's offset is PROHIBITED.
It is also recommended that you not use g_mime_stream_tell because it will not necessarily give you the current parser offset since parser handles its own internal read-ahead buffer. Instead, it is recommended that you use g_mime_parser_tell if you have a reason to need the current offset of the parser.
void g_mime_parser_set_scan_from (GMimeParser *parser, |
Sets whether or not parser should scan mbox-style From-lines.
|
Gets whether or not parser is set to scan mbox-style From-lines.
|
Gets the current stream offset from the parser's internal stream.
|
Tests the end-of-stream indicator for parser's internal stream.
GMimeObject* g_mime_parser_construct_part (GMimeParser *parser); |
Constructs a MIME part from parser.
GMimeMessage* g_mime_parser_construct_message (GMimeParser *parser); |
Constructs a MIME message from parser.
char* g_mime_parser_get_from (GMimeParser *parser); |
Gets the mbox-style From-line of the most recently parsed message (gotten from g_mime_parser_construct_message).