EMailPart: Evolution Mail Formatter Reference Manual

## EMailPart EMailPart |

## Functions

EMailPart * | e_mail_part_new ()
const gchar * | e_mail_part_get_id ()
const gchar * | e_mail_part_get_cid ()
void | e_mail_part_set_cid ()
gboolean | e_mail_part_id_has_prefix ()
gboolean | e_mail_part_id_has_suffix ()
gboolean | e_mail_part_id_has_substr ()
CamelMimePart * | e_mail_part_ref_mime_part ()
const gchar * | e_mail_part_get_mime_type ()
void | e_mail_part_set_mime_type ()
gboolean | e_mail_part_get_converted_to_utf8 ()
void | e_mail_part_set_converted_to_utf8 ()
gboolean | e_mail_part_should_show_inline ()
struct _EMailPartList * | e_mail_part_ref_part_list ()
void | e_mail_part_set_part_list ()
gboolean | e_mail_part_get_is_attachment ()
void | e_mail_part_set_is_attachment ()
gboolean | e_mail_part_get_is_printable ()
void | e_mail_part_set_is_printable ()
void | e_mail_part_content_loaded ()
void | e_mail_part_update_validity ()
CamelCipherValidity * | e_mail_part_get_validity ()
gboolean | e_mail_part_has_validity ()
EMailPartValidityFlags | e_mail_part_get_validity_flags ()
void | e_mail_part_verify_validity_sender ()

## Properties

gchar * | cid | Read / Write
gboolean | converted-to-utf8 | Read / Write
gchar * | id | Read / Write / Construct Only
gboolean | is-attachment | Read / Write / Construct
gboolean | is-printable | Read / Write / Construct
CamelMimePart * | mime-part | Read / Write / Construct Only
gchar * | mime-type | Read / Write
EMailPartList * | part-list | Read / Write

## Types and Values

struct | EMailPartValidityPair

## Object Hierarchy

        GObject
        ╰── EMailPart
            ├── EMailPartAttachment
            ├── EMailPartAudio
            ├── EMailPartHeaders
            ├── EMailPartImage
            ╰── EMailPartSecureButton

## Description

## Functions

### e_mail_part_new ()

    EMailPart *
    e_mail_part_new (CamelMimePart *mime_part,
                     const gchar *id);

Creates a new EMailPart for the given `mime_part` .

#### Parameters

mime_part | (allow-none) a CamelMimePart or `NULL` |
id | part ID |

#### Returns

a new EMailPart

### e_mail_part_get_id ()

    const gchar *
    e_mail_part_get_id (EMailPart *part);

### e_mail_part_get_cid ()

    const gchar *
    e_mail_part_get_cid (EMailPart *part);

### e_mail_part_set_cid ()

    void
    e_mail_part_set_cid (EMailPart *part,
                         const gchar *cid);

### e_mail_part_id_has_prefix ()

    gboolean
    e_mail_part_id_has_prefix (EMailPart *part,
                               const gchar *prefix);

### e_mail_part_id_has_suffix ()

    gboolean
    e_mail_part_id_has_suffix (EMailPart *part,
                               const gchar *suffix);

### e_mail_part_id_has_substr ()

    gboolean
    e_mail_part_id_has_substr (EMailPart *part,
                               const gchar *substr);

### e_mail_part_ref_mime_part ()

    CamelMimePart *
    e_mail_part_ref_mime_part (EMailPart *part);

### e_mail_part_get_mime_type ()

    const gchar *
    e_mail_part_get_mime_type (EMailPart *part);

### e_mail_part_set_mime_type ()

    void
    e_mail_part_set_mime_type (EMailPart *part,
                               const gchar *mime_type);

### e_mail_part_get_converted_to_utf8 ()

    gboolean
    e_mail_part_get_converted_to_utf8 (EMailPart *part);

### e_mail_part_set_converted_to_utf8 ()

    void
    e_mail_part_set_converted_to_utf8 (EMailPart *part,
                                       gboolean converted_to_utf8);

### e_mail_part_should_show_inline ()

    gboolean
    e_mail_part_should_show_inline (EMailPart *part);

### e_mail_part_ref_part_list ()

    struct _EMailPartList *
    e_mail_part_ref_part_list (EMailPart *part);

### e_mail_part_set_part_list ()

    void
    e_mail_part_set_part_list (EMailPart *part,
                               struct _EMailPartList *part_list);

### e_mail_part_get_is_attachment ()

    gboolean
    e_mail_part_get_is_attachment (EMailPart *part);

### e_mail_part_set_is_attachment ()

    void
    e_mail_part_set_is_attachment (EMailPart *part,
                                   gboolean is_attachment);

### e_mail_part_get_is_printable ()

    gboolean
    e_mail_part_get_is_printable (EMailPart *part);

### e_mail_part_set_is_printable ()

    void
    e_mail_part_set_is_printable (EMailPart *part,
                                  gboolean is_printable);

### e_mail_part_content_loaded ()

    void
    e_mail_part_content_loaded (EMailPart *part,
                                EWebView *web_view);

### e_mail_part_update_validity ()

    void
    e_mail_part_update_validity (EMailPart *part,
                                 CamelCipherValidity *validity,
                                 EMailPartValidityFlags validity_type);

Updates validity of the `part` . When the part already has some validity set, the new `validity` and `validity_type` are just appended, preserving the original validity. Validities of the same type (PGP or S/MIME) are merged together.

#### Parameters

part | An EMailPart |
validity | a CamelCipherValidity |
validity_type | E_MAIL_PART_VALIDITY_* flags |

### e_mail_part_get_validity ()

    CamelCipherValidity *
    e_mail_part_get_validity (EMailPart *part,
                              EMailPartValidityFlags validity_type);

Returns, validity of `part` contains any validity with the same bits as `validity_type` set. It should contain all bits of it.

#### Parameters

part | An EMailPart |
validity_type | E_MAIL_PART_VALIDITY_* flags |

#### Returns

a CamelCipherValidity of the given type, `NULL` if not found

Since: 3.8

### e_mail_part_has_validity ()

    gboolean
    e_mail_part_has_validity (EMailPart *part);

### e_mail_part_get_validity_flags ()

    EMailPartValidityFlags
    e_mail_part_get_validity_flags (EMailPart *part);

### e_mail_part_verify_validity_sender ()

    void
    e_mail_part_verify_validity_sender (EMailPart *part,
                                        CamelInternetAddress *from_address);

## Types and Values

### struct EMailPartValidityPair

    struct EMailPartValidityPair {
    	EMailPartValidityFlags validity_type;
    	CamelCipherValidity *validity;
    };

## Property Details

### The `“cid”` property

      “cid”                      gchar *

The MIME Content-ID.

Owner: EMailPart

Flags: Read / Write

Default value: NULL

### The `“converted-to-utf8”` property

      “converted-to-utf8”        gboolean

Whether the part content was already converted to UTF-8.

Owner: EMailPart

Flags: Read / Write

Default value: FALSE

### The `“id”` property

      “id”                       gchar *

The part ID.

Owner: EMailPart

Flags: Read / Write / Construct Only

Default value: NULL

### The `“is-attachment”` property

      “is-attachment”            gboolean

Format the part as an attachment.

Owner: EMailPart

Flags: Read / Write / Construct

Default value: FALSE

### The `“is-printable”` property

      “is-printable”             gboolean

Whether this part can be printed.

Owner: EMailPart

Flags: Read / Write / Construct

Default value: TRUE

### The `“mime-part”` property

      “mime-part”                CamelMimePart *

The MIME part.

Owner: EMailPart

Flags: Read / Write / Construct Only

### The `“mime-type”` property

      “mime-type”                gchar *

The MIME type.

Owner: EMailPart

Flags: Read / Write

Default value: NULL

### The `“part-list”` property

      “part-list”                EMailPartList *

The part list that owns the part.

Owner: EMailPart

Flags: Read / Write