gmime.object

Module for [ObjectWrap] class

Types 3

Base class for all MIME parts.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
ObjectWrap self() nothrowReturns `this`, for use in `with` statements.
ObjectWrapGidBuilder builder() static nothrowGet builder for [gmime.object.ObjectWrap] Returns: New builder object
gmime.object.ObjectWrap newType(gmime.parser_options.ParserOptions options, string type, string subtype) static nothrowPerforms a lookup of registered #GMimeObject subclasses, registered using [gmime.object.ObjectWrap.registerType], to find an appropriate class capable of handling MIME parts of type type/subtype. I...
void registerType(string type, string subtype, gobject.types.GType objectType) static nothrowRegisters the object type object_type for use with the [gmime.object.ObjectWrap.newType] convenience function.
void typeRegistryInit() static nothrow
void typeRegistryShutdown() static nothrow
void appendHeader(string header, string value, string charset = null) nothrowAppends a new header to the header list.
void encode(gmime.types.EncodingConstraint constraint) nothrowCalculates and sets the most efficient Content-Transfer-Encoding for this #GMimeObject and all child parts based on the constraint provided.
gmime.autocrypt_header_list.AutocryptHeaderList getAutocryptHeaders(glib.date_time.DateTime effectiveDate, string matchheader, gmime.internet_address_list.InternetAddressList addresses, bool keepIncomplete) nothrowCreates a new #GMimeAutocryptHeaderList of relevant headers of the given type based on the addresses of an mime_part.
gmime.content_disposition.ContentDisposition getContentDisposition() nothrowGets the #GMimeContentDisposition for the specified MIME object. Returns: the #GMimeContentDisposition set on the MIME object.
string getContentDispositionParameter(string name) nothrowGets the value of the Content-Disposition parameter specified by name, or null if the parameter does not exist.
string getContentId() nothrowGets the Content-Id of the MIME object or NULL if one is not set. Returns: a const pointer to the Content-Id header.
gmime.content_type.ContentType getContentType() nothrowGets the #GMimeContentType object for the given MIME object or null on fail. Returns: the content-type object for the specified MIME object.
string getContentTypeParameter(string name) nothrowGets the value of the content-type param name set on the MIME part object.
string getDisposition() nothrowGets the MIME object's disposition if set or null otherwise. Returns: the disposition string which is probably one of #GMIME_DISPOSITION_ATTACHMENT or #GMIME_DISPOSITION_INLINE.
string getHeader(string header) nothrowGets the value of the first header with the specified name.
gmime.header_list.HeaderList getHeaderList() nothrowGet the header list for object. Returns: the #GMimeHeaderList for object. Do not free this pointer when you are done with it.
string getHeaders(gmime.format_options.FormatOptions options = null) nothrowAllocates a string buffer containing all of the MIME object's raw headers.
void prependHeader(string header, string value, string charset = null) nothrowPrepends a new header to the header list.
bool removeHeader(string header) nothrowRemoved the specified header if it exists.
void setContentDisposition(gmime.content_disposition.ContentDisposition disposition) nothrowSet the content disposition for the specified mime part and then serializes it to the Content-Disposition header field.
void setContentDispositionParameter(string name, string value) nothrowAdd a content-disposition parameter to the specified mime part.
void setContentId(string contentId) nothrowSets the Content-Id of the MIME object.
void setContentType(gmime.content_type.ContentType contentType) nothrowSets the content-type for the specified MIME object and then serializes it to the Content-Type header field.
void setContentTypeParameter(string name, string value) nothrowSets the content-type param name to the value value.
void setDisposition(string disposition) nothrowSets the disposition to disposition which may be one of #GMIME_DISPOSITION_ATTACHMENT or #GMIME_DISPOSITION_INLINE or, by your choice, any other string which would indicate how the MIME part should...
void setHeader(string header, string value, string charset = null) nothrowSets a header to the specified value.
string toString_(gmime.format_options.FormatOptions options = null) nothrowAllocates a string buffer containing the contents of object.
ptrdiff_t writeContentToStream(gmime.format_options.FormatOptions options, gmime.stream.Stream stream) nothrowWrite only the content of the MIME object to stream.
ptrdiff_t writeToStream(gmime.format_options.FormatOptions options, gmime.stream.Stream stream) nothrowWrite the headers and content of the MIME object to stream.
Constructors
this(void * ptr, Flag!"Take" take)
this(gmime.parser_options.ParserOptions options, gmime.content_type.ContentType contentType)Performs a lookup of registered #GMimeObject subclasses, registered using [gmime.object.ObjectWrap.registerType], to find an appropriate class capable of handling MIME parts of the specified Conten...

Fluent builder for gmime.object.ObjectWrap

Methods
ObjectWrap build() nothrowCreate object from builder. Returns: New object