EMailParser: Evolution Mail Formatter Reference Manual

## EMailParser EMailParser |

## Functions

EMailParser * | e_mail_parser_new ()
EMailPartList * | e_mail_parser_parse_sync ()
void | e_mail_parser_parse ()
EMailPartList * | e_mail_parser_parse_finish ()
gboolean | e_mail_parser_parse_part ()
gboolean | e_mail_parser_parse_part_as ()
void | e_mail_parser_error ()
void | e_mail_parser_wrap_as_attachment ()
CamelSession * | e_mail_parser_get_session ()
EMailExtensionRegistry * | e_mail_parser_get_extension_registry ()

## Properties

CamelSession * | session | Read / Write / Construct Only

## Object Hierarchy

        GObject
        ╰── EMailParser

## Description

## Functions

### e_mail_parser_new ()

    EMailParser *
    e_mail_parser_new (CamelSession *session);

### e_mail_parser_parse_sync ()

    EMailPartList *
    e_mail_parser_parse_sync (EMailParser *parser,
                              CamelFolder *folder,
                              const gchar *message_uid,
                              CamelMimeMessage *message,
                              GCancellable *cancellable);

Parses the `message` synchronously. Returns a list of EMailPart<!-//>s which represents structure of the message and additional properties of each part.

Note that this function can block for a while, so it's not a good idea to call it from main thread.

#### Parameters

parser | an EMailParser |
folder | (allow none) a CamelFolder containing the `message` or `NULL` |
message_uid | (allow none) UID of the `message` within the `folder` or `NULL` |
message | a CamelMimeMessage |
cancellable | (allow-none) a GCancellable |

#### Returns

An EMailPartsList

### e_mail_parser_parse ()

    void
    e_mail_parser_parse (EMailParser *parser,
                         CamelFolder *folder,
                         const gchar *message_uid,
                         CamelMimeMessage *message,
                         GAsyncReadyCallback callback,
                         GCancellable *cancellable,
                         gpointer user_data);

Asynchronous version of `e_mail_parser_parse_sync()`.

#### Parameters

parser | an EMailParser |
message | a CamelMimeMessage |
callback | a GAsyncReadyCallback |
cancellable | (allow-none) a GCancellable |
user_data | (allow-none) user data passed to the callback |

### e_mail_parser_parse_finish ()

    EMailPartList *
    e_mail_parser_parse_finish (EMailParser *parser,
                                GAsyncResult *result,
                                GError **error);

### e_mail_parser_parse_part ()

    gboolean
    e_mail_parser_parse_part (EMailParser *parser,
                              CamelMimePart *part,
                              GString *part_id,
                              GCancellable *cancellable,
                              GQueue *out_mail_parts);

### e_mail_parser_parse_part_as ()

    gboolean
    e_mail_parser_parse_part_as (EMailParser *parser,
                                 CamelMimePart *part,
                                 GString *part_id,
                                 const gchar *mime_type,
                                 GCancellable *cancellable,
                                 GQueue *out_mail_parts);

### e_mail_parser_error ()

    void
    e_mail_parser_error (EMailParser *parser,
                         GQueue *out_mail_parts,
                         const gchar *format,
                         ...);

### e_mail_parser_wrap_as_attachment ()

    void
    e_mail_parser_wrap_as_attachment (EMailParser *parser,
                                      CamelMimePart *part,
                                      GString *part_id,
                                      GQueue *parts_queue);

### e_mail_parser_get_session ()

    CamelSession *
    e_mail_parser_get_session (EMailParser *parser);

### e_mail_parser_get_extension_registry ()

    EMailExtensionRegistry *
    e_mail_parser_get_extension_registry (EMailParser *parser);

## Types and Values

## Property Details

### The `“session”` property

      “session”                  CamelSession *

Flags: Read / Write / Construct Only