GMimeFlowedToHtml

GMimeFlowedToHtml — RFC 3676 paragraphs and blockquotes

Functions

Types and Values

Description

Reassembles flowed paragraphs, removes space stuffing, and honors quote-depth transitions and optional delsp processing. Generated paragraph separators use LF regardless of the host platform.

Functions

g_mime_flowed_to_html_new ()

GMimeTextConverter *
g_mime_flowed_to_html_new (void);

Creates an RFC 3676 format=flowed to HTML converter. By default, delsp processing is disabled, output includes html and body wrappers, and headers and footers are interpreted as text.

Returns

a new GMimeFlowedToHtml.

[transfer full]


g_mime_flowed_to_html_get_delete_space ()

gboolean
g_mime_flowed_to_html_get_delete_space
                               (GMimeFlowedToHtml *converter);

Gets whether the trailing space marking a flowed line is deleted when joining it to the next line.

Parameters

converter

a GMimeFlowedToHtml

 

Returns

TRUE for delsp=yes, or FALSE for delsp=no (the default).


g_mime_flowed_to_html_set_delete_space ()

void
g_mime_flowed_to_html_set_delete_space
                               (GMimeFlowedToHtml *converter,
                                gboolean value);

Selects RFC 3676 delsp processing. Set this to match the input MIME part's delsp parameter; FALSE preserves the joining space. This setting cannot be changed during conversion.

Parameters

converter

a GMimeFlowedToHtml

 

value

whether to apply delsp=yes processing

 

g_mime_flowed_to_html_get_output_html_fragment ()

gboolean
g_mime_flowed_to_html_get_output_html_fragment
                               (GMimeFlowedToHtml *converter);

Gets whether the generated html and body wrappers are omitted.

Parameters

converter

a GMimeFlowedToHtml

 

Returns

TRUE for fragment output, or FALSE for document output (the default).


g_mime_flowed_to_html_set_output_html_fragment ()

void
g_mime_flowed_to_html_set_output_html_fragment
                               (GMimeFlowedToHtml *converter,
                                gboolean value);

Selects fragment or document output. Headers and footers are included in either mode. This setting cannot be changed during conversion.

Parameters

converter

a GMimeFlowedToHtml

 

value

whether to omit the generated html and body wrappers

 

g_mime_flowed_to_html_get_header_format ()

GMimeHeaderFooterFormat
g_mime_flowed_to_html_get_header_format
                               (GMimeFlowedToHtml *converter);

Gets how the configured header is interpreted.

Parameters

converter

a GMimeFlowedToHtml

 

Returns

the header format, initially GMIME_HEADER_FOOTER_FORMAT_TEXT.


g_mime_flowed_to_html_set_header_format ()

void
g_mime_flowed_to_html_set_header_format
                               (GMimeFlowedToHtml *converter,
                                GMimeHeaderFooterFormat value);

Selects how the header set by g_mime_text_converter_set_header() is written. Text is converted as plain text, not flowed text, without invoking the body's tag callback. HTML is copied verbatim and is not sanitized. This setting cannot be changed during conversion.

Parameters

converter

a GMimeFlowedToHtml

 

value

the format of the configured header

 

g_mime_flowed_to_html_get_footer_format ()

GMimeHeaderFooterFormat
g_mime_flowed_to_html_get_footer_format
                               (GMimeFlowedToHtml *converter);

Gets how the configured footer is interpreted.

Parameters

converter

a GMimeFlowedToHtml

 

Returns

the footer format, initially GMIME_HEADER_FOOTER_FORMAT_TEXT.


g_mime_flowed_to_html_set_footer_format ()

void
g_mime_flowed_to_html_set_footer_format
                               (GMimeFlowedToHtml *converter,
                                GMimeHeaderFooterFormat value);

Selects how the footer set by g_mime_text_converter_set_footer() is written. Text is converted as plain text, not flowed text, without invoking the body's tag callback. HTML is copied verbatim and is not sanitized. This setting cannot be changed during conversion.

Parameters

converter

a GMimeFlowedToHtml

 

value

the format of the configured footer

 

g_mime_flowed_to_html_get_html_tag_callback ()

GMimeHtmlTagCallback
g_mime_flowed_to_html_get_html_tag_callback
                               (GMimeFlowedToHtml *converter,
                                gpointer *user_data);

Gets the registered HTML tag callback. This function is C-only because introspection does not support returning callback function pointers.

[skip]

Parameters

converter

a GMimeFlowedToHtml

 

user_data

return location for the callback's borrowed user data.

[out][optional][nullable][transfer none]

Returns

the registered callback, or NULL if none is set.

[nullable]


g_mime_flowed_to_html_set_html_tag_callback ()

void
g_mime_flowed_to_html_set_html_tag_callback
                               (GMimeFlowedToHtml *converter,
                                GMimeHtmlTagCallback callback,
                                gpointer user_data,
                                GDestroyNotify destroy_notify);

Sets the callback for tags generated from the body, or restores default tag output if callback is NULL. The callback must explicitly write any desired tag; end-tag callbacks are opt-in through GMimeHtmlTagContext. Wrappers, headers and footers do not invoke the callback.

The previous destroy notifier is called when replacing the registration. destroy_notify is called when this registration is replaced or the converter is finalized. The callback cannot be changed during conversion.

Parameters

converter

a GMimeFlowedToHtml

 

callback

the tag callback.

[nullable][scope notified][closure user_data][destroy destroy_notify]

user_data

data passed to callback .

[nullable]

destroy_notify

destroy notifier for user_data .

[nullable]

Types and Values

GMimeFlowedToHtml

typedef struct _GMimeFlowedToHtml GMimeFlowedToHtml;

Converts RFC 3676 format=flowed text to HTML paragraphs and blockquotes.