Content transfer encodings

Content transfer encodings — Content transfer encoding names

Functions

Types and Values

Description

Utility functions to convert MIME Content-Transfer-Encoding names.

Functions

g_mime_content_encoding_from_string ()

GMimeContentEncoding
g_mime_content_encoding_from_string (const char *str);

Gets the appropriate GMimeContentEncoding enumeration value based on the input string. Leading ASCII linear whitespace (SP, HTAB, CR and LF) is skipped; the first linear whitespace or semicolon terminates the case-insensitive encoding name. Any suffix after that delimiter is ignored, matching MimeKit's tolerance for semicolons added by Google Docs. Comments are not skipped.

Recognizes 7bit, 8bit, binary, base64, quoted-printable, uuencode, x-uuencode and x-uue. The legacy 7-bit and 8-bit aliases remain supported as a GMime compatibility extension to MimeKit. NULL, an empty name, or malformed UTF-8 within the name returns GMIME_CONTENT_ENCODING_UNSPECIFIED.

Parameters

str

a UTF-8 Content-Transfer-Encoding value.

[nullable]

Returns

the GMimeContentEncoding specified by str or GMIME_CONTENT_ENCODING_UNSPECIFIED on error.


g_mime_content_encoding_to_string ()

const char *
g_mime_content_encoding_to_string (GMimeContentEncoding encoding);

Gets the string value of the content encoding.

Parameters

encoding

a GMimeContentEncoding

 

Types and Values

enum GMimeContentEncoding

A Content-Transfer-Encoding enumeration.

Members

GMIME_CONTENT_ENCODING_UNSPECIFIED

Unspecified transfer encoding.

 

GMIME_CONTENT_ENCODING_7BIT

7bit text transfer encoding.

 

GMIME_CONTENT_ENCODING_8BIT

8bit text transfer encoding.

 

GMIME_CONTENT_ENCODING_BINARY

Binary transfer encoding.

 

GMIME_CONTENT_ENCODING_BASE64

Base64 transfer encoding.

 

GMIME_CONTENT_ENCODING_QUOTEDPRINTABLE

Quoted-printable transfer encoding.

 

GMIME_CONTENT_ENCODING_UUENCODE

Uuencode transfer encoding.

 

enum GMimeEncodingConstraint

Used with functions like g_mime_filter_best_encoding() and g_mime_entity_prepare() as the 'constraint' argument. These values provide a means of letting the filter know what the encoding constraints are for the stream.

Members

GMIME_ENCODING_CONSTRAINT_7BIT

The stream data must fit within the 7bit ASCII range.

 

GMIME_ENCODING_CONSTRAINT_8BIT

The stream data may have bytes with the high bit set, but no null bytes.

 

GMIME_ENCODING_CONSTRAINT_BINARY

The stream may contain any binary data.