FilterBest

A filter for calculating the best encoding and/or charset to encode the data passed through it.

Constructors

this
this(void* ptr, Flag!"Take" take)
this
this(gmime.types.FilterBestFlags flags)

Creates a new GMimeFilterBest filter. flags are used to determine which information to keep statistics of. If the #GMIME_FILTER_BEST_CHARSET bit is set, the filter will be able to compute the best charset for encoding the stream of data filtered. If the #GMIME_FILTER_BEST_ENCODING bit is set, the filter will be able to compute the best Content-Transfer-Encoding for use with the stream being filtered.

Members

Functions

charset
string charset()

Calculates the best charset for encoding the content filtered through the best filter.

encoding
gmime.types.ContentEncoding encoding(gmime.types.EncodingConstraint constraint)

Calculates the most efficient Content-Transfer-Encoding for the content filtered through best that fits within the encoding constraint.

self
FilterBest self()

Returns this, for use in with statements.

Properties

_gType
GType _gType [@property getter]

Static functions

_getGType
GType _getGType()
builder
FilterBestGidBuilder builder()

Get builder for gmime.filter_best.FilterBest

Inherited Members

From Filter

_getGType
GType _getGType()
_gType
GType _gType [@property getter]
self
Filter self()

Returns this, for use in with statements.

builder
FilterGidBuilder builder()

Get builder for gmime.filter.Filter

backup
void backup(ubyte[] data)

Sets number of bytes backed up on the input, new calls replace previous ones

complete
void complete(ubyte[] inbuf, size_t prespace, ubyte[] outbuf, size_t outprespace)

Completes the filtering.

copy
gmime.filter.Filter copy()

Copies filter into a new #GMimeFilter object.

filter
void filter(ubyte[] inbuf, size_t prespace, ubyte[] outbuf, size_t outprespace)

Filters the input data and writes it to out.

reset
void reset()

Resets the filter.

setSize
void setSize(size_t size, bool keep)

Ensure this much size is available for filter output (if required)