Part
Object Hierarchy:
Description:
A leaf-node MIME part object.
All known sub-classes:
Namespace: GMime
Package: gmime-3.0
Content:
Creation methods:
- public Part ()
Creates a new MIME Part object with a default content-type of application/octet-stream.
- public Part.with_type (string type, string subtype)
Creates a new MIME Part with a sepcified type.
Methods:
- public ContentEncoding get_best_content_encoding (EncodingConstraint constraint)
Calculates the most efficient content encoding for the this given the
constraint
. - public unowned DataWrapper get_content ()
Gets the internal data-wrapper of the specified mime part, or null on error.
- public unowned string get_content_description ()
Gets the value of the Content-Description for the specified mime part if it exists or null otherwise.
- public ContentEncoding get_content_encoding ()
Gets the content encoding of the mime part.
- public unowned string get_content_id ()
Gets the content-id of the specified mime part if it exists, or null otherwise.
- public unowned string get_content_location ()
Gets the value of the Content-Location header if it exists, or null otherwise.
- public unowned string get_content_md5 ()
Gets the md5sum contained in the Content-Md5 header of the specified mime part if it exists, or null otherwise.
- public unowned string get_filename ()
Gets the filename of the specificed mime part, or null if the this does not have the filename or name parameter set.
- public OpenPGPData get_openpgp_data ()
Gets whether or not (and what type) of OpenPGP data is contained within the Part.
- public bool is_attachment ()
Determines whether or not the part is an attachment based on the value of the Content-Disposition header.
- public DecryptResult? openpgp_decrypt (DecryptFlags flags, string? session_key) throws Error
Decrypts the content of the this and then replaces the content with the new, decrypted, content.
- public bool openpgp_encrypt (bool sign, string? userid, EncryptFlags flags, GenericArray<string> recipients) throws Error
Encrypts (and optionally signs) the content of the this and then replaces the content with the new, encrypted, content.
- public bool openpgp_sign (string userid) throws Error
Signs the content of the this and then replaces the content with the new, signed, content.
- public SignatureList? openpgp_verify (VerifyFlags flags) throws Error
Verifies the OpenPGP signature of the this and then replaces the content with the original, raw, content.
- public virtual void set_content (DataWrapper content)
Sets the content on the mime part.
- public void set_content_description (string description)
Set the content description for the specified mime part.
- public void set_content_encoding (ContentEncoding encoding)
Set the content encoding for the specified mime part.
- public void set_content_id (string content_id)
Set the content id for the specified mime part.
- public void set_content_location (string content_location)
Set the content location for the specified mime part.
- public void set_content_md5 (string content_md5)
Set the content md5 for the specified mime part.
- public void set_filename (string filename)
Sets the "filename" parameter on the Content-Disposition and also sets the "name" parameter on the Content-Type.
- public void set_openpgp_data (OpenPGPData data)
Sets whether or not (and what type) of OpenPGP data is contained within the Part.
- public bool verify_content_md5 ()
Verify the content md5 for the specified mime part.
Fields:
- public unowned DataWrapper content
- public unowned string content_description
- public unowned string content_location
- public unowned string content_md5
- public ContentEncoding encoding
- public OpenPGPData openpgp
Inherited Members:
All known members inherited from class GMime.Object
All known members inherited from class GLib.Object