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 ()
GQueue * | e_mail_parser_get_parsers_for_part ()
GQueue * | e_mail_parser_get_parsers ()
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 ()
void | e_mail_parser_wrap_as_non_expandable_attachment ()
CamelSession * | e_mail_parser_get_session ()
EMailPartList * | e_mail_parser_ref_part_list_for_operation ()
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 EMailParts 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_get_parsers_for_part ()

    GQueue *
    e_mail_parser_get_parsers_for_part (EMailParser *parser,
                                        CamelMimePart *part);

### e_mail_parser_get_parsers ()

    GQueue *
    e_mail_parser_get_parsers (EMailParser *parser,
                               const gchar *mime_type);

### 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,
                                      EMailParserWrapAttachmentFlags flags,
                                      GQueue *parts_queue);

### e_mail_parser_wrap_as_non_expandable_attachment ()

    void
    e_mail_parser_wrap_as_non_expandable_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_ref_part_list_for_operation ()

    EMailPartList *
    e_mail_parser_ref_part_list_for_operation
                                   (EMailParser *parser,
                                    GCancellable *operation);

### e_mail_parser_get_extension_registry ()

    EMailExtensionRegistry *
    e_mail_parser_get_extension_registry (EMailParser *parser);

## Property Details

### The `“session”` property

      “session”                  CamelSession *

Owner: EMailParser

Flags: Read / Write / Construct Only