| Top |
A GMimeFilter which can encode or decode basic MIME encodings such as Quoted-Printable, Base64 and UUEncode, or use an explicitly supplied GMimeYencEncoder or GMimeYencDecoder for yEnc.
The g_mime_filter_basic_create_encoder() and
g_mime_filter_basic_create_decoder() factory families follow MimeKit's
encoding selection, returning GMimeFilterPassThrough for unhandled
encodings. Encoder factories default to CRLF, unlike the existing
LF-based g_mime_filter_basic_new() constructor.
GMimeFilter * g_mime_filter_basic_new (GMimeContentEncoding encoding,gboolean encode);
Creates a new basic filter for encoding
.
Encoders use LF line endings. Unspecified, 7bit, 8bit and binary encodings
use copying pass-through codecs, unlike
g_mime_filter_basic_create_encoder() and
g_mime_filter_basic_create_decoder(), which return GMimeFilterPassThrough.
GMimeFilter *
g_mime_filter_basic_new_with_encoder (GMimeEncoder *encoder);
The filter retains a reference and uses the encoder's current state. Copies of the filter use independent, reset clones of the encoder.
GMimeFilter *
g_mime_filter_basic_new_with_decoder (GMimeDecoder *decoder);
The filter retains a reference and uses the decoder's current state. Copies of the filter use independent, reset clones of the decoder.
GMimeFilter *
g_mime_filter_basic_create_encoder (GMimeContentEncoding encoding);
Creates an encoding filter using CRLF line endings and a maximum line length of 78, capped by the selected encoder's MIME limits. Encodings other than Base64, quoted-printable and uuencode pass through unchanged without copying or allocating an output buffer.
GMimeFilter * g_mime_filter_basic_create_encoder_with_newline_format (GMimeContentEncoding encoding,GMimeNewLineFormat newline_format,guint max_line_length);
Creates a Base64, quoted-printable or uuencode filter with the selected line endings. Base64 and quoted-printable require a line length between 60 and 998 and cap it at 76. uuencode and unhandled encodings ignore the line-length argument. Unhandled encodings return GMimeFilterPassThrough. The newline format must be valid even for pass-through filters.
GMimeFilter *
g_mime_filter_basic_create_encoder_by_name
(const char *name);
Creates an encoding filter using CRLF and a maximum line length of 78. Matching is case-insensitive, skips leading Unicode whitespace, and stops at the first whitespace or semicolon. Unknown names pass through unchanged without copying.
GMimeFilter * g_mime_filter_basic_create_encoder_by_name_with_newline_format (const char *name,GMimeNewLineFormat newline_format,guint max_line_length);
Resolves name
as in g_mime_filter_basic_create_encoder_by_name() and
selects a filter as in
g_mime_filter_basic_create_encoder_with_newline_format().
Base64 and quoted-printable validate max_line_length
; other encodings
ignore it. The newline format is always validated.
GMimeFilter *
g_mime_filter_basic_create_decoder (GMimeContentEncoding encoding);
Creates a Base64, quoted-printable or uuencode decoder filter. The UU decoder looks for a begin-line before decoding the payload. Other encodings pass through unchanged without copying.
GMimeFilter *
g_mime_filter_basic_create_decoder_by_name
(const char *name);
Resolves name
as in g_mime_filter_basic_create_encoder_by_name() and
selects a filter as in g_mime_filter_basic_create_decoder().