| Top |
Implements MimeKit's RFC 1896 command, parameter, and formatting model. Unknown commands retain their nesting without emitting arbitrary markup. Parameter values are validated before use in CSS or language attributes. Input, parameter, and output limits count Unicode scalar values; output limits include wrappers, escaped content, headers, and footers. CRLF and CR are normalized to LF during parsing.
GMimeTextConverter *
g_mime_enriched_to_html_new (void);
Creates an RFC 1896 text/enriched to HTML converter. By default, the output includes html and body wrappers, and headers and footers are interpreted as plain text.
gboolean
g_mime_enriched_to_html_get_output_html_fragment
(GMimeEnrichedToHtml *converter);
Gets whether the generated html and body wrappers are omitted.
void g_mime_enriched_to_html_set_output_html_fragment (GMimeEnrichedToHtml *converter,gboolean value);
Selects fragment or document output. The div used to preserve whitespace, as well as configured headers and footers, is included in either mode. This setting cannot be changed during conversion.
GMimeHeaderFooterFormat
g_mime_enriched_to_html_get_header_format
(GMimeEnrichedToHtml *converter);
Gets how the configured header is interpreted.
void g_mime_enriched_to_html_set_header_format (GMimeEnrichedToHtml *converter,GMimeHeaderFooterFormat value);
Selects how the header set by g_mime_text_converter_set_header() is written.
Text is converted as plain text, not enriched text. HTML is copied
verbatim and is not sanitized. This setting cannot be changed during
conversion.
GMimeHeaderFooterFormat
g_mime_enriched_to_html_get_footer_format
(GMimeEnrichedToHtml *converter);
Gets how the configured footer is interpreted.
void g_mime_enriched_to_html_set_footer_format (GMimeEnrichedToHtml *converter,GMimeHeaderFooterFormat value);
Selects how the footer set by g_mime_text_converter_set_footer() is written.
Text is converted as plain text, not enriched text. HTML is copied
verbatim and is not sanitized. This setting cannot be changed during
conversion.
guint
g_mime_enriched_to_html_get_max_element_depth
(GMimeEnrichedToHtml *converter);
Gets the maximum nesting depth of enriched commands, including unknown commands and nested parameters.
void g_mime_enriched_to_html_set_max_element_depth (GMimeEnrichedToHtml *converter,guint value);
Limits enriched command and parameter nesting. Exceeding the limit
causes conversion to fail with GMIME_ERROR_PARSE_ERROR. This setting
cannot be changed during conversion.
guint
g_mime_enriched_to_html_get_max_parameter_length
(GMimeEnrichedToHtml *converter);
Gets the maximum length of an enriched command parameter, measured in Unicode scalar values rather than bytes or UTF-16 code units.
void g_mime_enriched_to_html_set_max_parameter_length (GMimeEnrichedToHtml *converter,guint value);
Limits the text in each enriched command parameter. Exceeding the limit
causes conversion to fail with GMIME_ERROR_PARSE_ERROR. This setting
cannot be changed during conversion.
gsize
g_mime_enriched_to_html_get_max_input_length
(GMimeEnrichedToHtml *converter);
Gets the input length limit in Unicode scalar values, including enriched markup but excluding the configured header and footer.
void g_mime_enriched_to_html_set_max_input_length (GMimeEnrichedToHtml *converter,gsize value);
Limits decoded input, including enriched markup. Exceeding the limit
causes conversion to fail with GMIME_ERROR_PARSE_ERROR. This setting
cannot be changed during conversion.
gsize
g_mime_enriched_to_html_get_max_output_length
(GMimeEnrichedToHtml *converter);
Gets the output length limit in Unicode scalar values. Generated markup, escaped text, wrappers, headers and footers all count toward this limit.
void g_mime_enriched_to_html_set_max_output_length (GMimeEnrichedToHtml *converter,gsize value);
Limits the complete generated HTML before output charset encoding.
Exceeding the limit causes conversion to fail with
GMIME_ERROR_PARSE_ERROR. This setting cannot be changed during conversion.