Object
Object Hierarchy:
Description:
Base class for all MIME parts.
All known sub-classes:
Namespace: GMime
Package: gmime-3.0
Content:
Static methods:
- public static Object new_for_type (ParserOptions? options, ContentType content_type)
Performs a lookup of registered Object subclasses, registered using register_type, to find an appropriate class capable of handling MIME parts of the specified Content-Type.
- public static Object new_for_type_str (ParserOptions? options, string type, string subtype)
Performs a lookup of registered Object subclasses, registered using register_type, to find an appropriate class capable of handling MIME parts of type
type
/subtype
. - public static void register_type (string type, string subtype, Type object_type)
Registers the object type
object_type
for use with the new_for_type_str convenience function. - public static void type_registry_init ()
- public static void type_registry_shutdown ()
Creation methods:
- protected Object ()
Methods:
- public void append_header (string header, string value, string charset)
Appends a new header to the header list.
- public virtual void encode (EncodingConstraint constraint)
Calculates and sets the most efficient Content-Transfer-Encoding for this Object and all child parts based on the
constraint
provided. - public unowned ContentDisposition get_content_disposition ()
Gets the ContentDisposition for the specified MIME object.
- public unowned string get_content_disposition_parameter (string name)
Gets the value of the Content-Disposition parameter specified by
name
, or null if the parameter does not exist. - public unowned string get_content_id ()
Gets the Content-Id of the MIME object or NULL if one is not set.
- public unowned ContentType get_content_type ()
Gets the ContentType object for the given MIME object or null on fail.
- public unowned string? get_content_type_parameter (string name)
Gets the value of the content-type param
name
set on the MIME part this. - public unowned string get_disposition ()
Gets the MIME object's disposition if set or null otherwise.
- public unowned string get_header (string header)
Gets the value of the first header with the specified name.
- public unowned HeaderList get_header_list ()
Get the header list for this.
- public virtual string get_headers (FormatOptions? options)
Allocates a string buffer containing all of the MIME object's raw headers.
- public virtual void header_added (Header header)
- public virtual void header_changed (Header header)
- public virtual void header_removed (Header header)
- public virtual void headers_cleared ()
- public void prepend_header (string header, string value, string charset)
Prepends a new header to the header list.
- public bool remove_header (string header)
Removed the specified header if it exists.
- public void set_content_disposition (ContentDisposition disposition)
Set the content disposition for the specified mime part and then serializes it to the Content-Disposition header field.
- public void set_content_disposition_parameter (string name, string value)
Add a content-disposition parameter to the specified mime part.
- public void set_content_id (string content_id)
Sets the Content-Id of the MIME object.
- public virtual void set_content_type (ContentType content_type)
Sets the content-type for the specified MIME object and then serializes it to the Content-Type header field.
- public void set_content_type_parameter (string name, string value)
Sets the content-type param
name
to the valuevalue
. - public void set_disposition (string disposition)
Sets the disposition to
disposition
which may be one of DISPOSITION_ATTACHMENT or DISPOSITION_INLINE or, by your choice, any other string which would indicate how the MIME part should be displayed by the MUA. - public void set_header (string header, string value, string charset)
Sets a header to the specified value.
- public string to_string (FormatOptions? options)
Allocates a string buffer containing the contents of this.
- public ssize_t write_content_to_stream (FormatOptions? options, Stream stream)
Write only the content of the MIME object to
stream
. - public ssize_t write_to_stream (FormatOptions? options, Stream stream)
Write the headers and content of the MIME object to
stream
. - public virtual ssize_t write_to_stream_vfunc (FormatOptions options, bool content_only, Stream stream)
Fields:
- public unowned string content_id
- public unowned ContentType content_type
- public unowned ContentDisposition disposition
- public unowned HeaderList headers
Inherited Members:
All known members inherited from class GLib.Object