GMimeRtfToText

GMimeRtfToText — Render Rich Text Format as plain text

Functions

Types and Values

Description

The stream input charset defaults to ISO-8859-1 to preserve wire bytes; document and font code pages determine the interpretation of those bytes. The RTF rendition of encapsulated HTML is used, not its HTML markup.

Functions

GMimeRtfToTextAttachmentPlaceholderCallback ()

gboolean
(*GMimeRtfToTextAttachmentPlaceholderCallback)
                               (guint index,
                                GMimeStream *output,
                                gpointer user_data,
                                GError **error);

Parameters

index

zero-based index of this visible attachment placeholder

 

output

stream for UTF-8 replacement text.

[transfer none]

user_data

caller data.

[closure]

error

return location for an error

 

Returns

TRUE on success; on failure set error and return FALSE.


g_mime_rtf_to_text_new ()

GMimeTextConverter *
g_mime_rtf_to_text_new (void);

Returns

a new RTF to plain text converter.

[transfer full]


g_mime_rtf_to_text_get_max_group_depth ()

guint
g_mime_rtf_to_text_get_max_group_depth
                               (GMimeRtfToText *converter);

Parameters

converter

an RTF converter

 

Returns

the maximum number of distinct saved group states (initially 4096).


g_mime_rtf_to_text_set_max_group_depth ()

void
g_mime_rtf_to_text_set_max_group_depth
                               (GMimeRtfToText *converter,
                                guint maximum);

Sets the limit for subsequent conversions.

Parameters

converter

an RTF converter

 

maximum

maximum number of distinct saved group states, at least one

 

g_mime_rtf_to_text_get_max_font_table_entries ()

guint
g_mime_rtf_to_text_get_max_font_table_entries
                               (GMimeRtfToText *converter);

Parameters

converter

an RTF converter

 

Returns

the maximum number of font table entries (initially 4096).


g_mime_rtf_to_text_set_max_font_table_entries ()

void
g_mime_rtf_to_text_set_max_font_table_entries
                               (GMimeRtfToText *converter,
                                guint maximum);

Sets the limit for subsequent conversions.

Parameters

converter

an RTF converter

 

maximum

maximum number of font table entries, at least one

 

g_mime_rtf_to_text_get_max_color_table_entries ()

guint
g_mime_rtf_to_text_get_max_color_table_entries
                               (GMimeRtfToText *converter);

Parameters

converter

an RTF converter

 

Returns

the maximum number of color table entries (initially 4096).


g_mime_rtf_to_text_set_max_color_table_entries ()

void
g_mime_rtf_to_text_set_max_color_table_entries
                               (GMimeRtfToText *converter,
                                guint maximum);

Sets the limit for subsequent conversions.

Parameters

converter

an RTF converter

 

maximum

maximum number of color table entries, at least one

 

g_mime_rtf_to_text_set_attachment_placeholder_callback ()

void
g_mime_rtf_to_text_set_attachment_placeholder_callback
                               (GMimeRtfToText *converter,
                                GMimeRtfToTextAttachmentPlaceholderCallback callback,
                                gpointer user_data,
                                GDestroyNotify destroy);

Invoked for visible placeholders only. With no callback the placeholder is omitted.

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

Parameters

converter

a GMimeRtfToText

 

callback

the attachment placeholder callback.

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

user_data

data passed to the callback.

[nullable]

destroy

destroy notifier for user_data .

[nullable]

g_mime_rtf_to_text_get_attachment_placeholder_callback ()

GMimeRtfToTextAttachmentPlaceholderCallback
g_mime_rtf_to_text_get_attachment_placeholder_callback
                               (GMimeRtfToText *converter,
                                gpointer *user_data);

Gets the currently registered attachment placeholder callback.

[skip]

Parameters

converter

a GMimeRtfToText

 

user_data

the callback's borrowed user data.

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

Returns

the attachment placeholder callback, or NULL if none is registered.

[nullable]


g_mime_rtf_to_text_set_compliance_logger ()

void
g_mime_rtf_to_text_set_compliance_logger
                               (GMimeRtfToText *converter,
                                GMimeRtfComplianceLogger logger,
                                gpointer user_data,
                                GDestroyNotify destroy);

Sets the compliance logger, or clears it if logger is NULL. Diagnostics are borrowed for the duration of the callback and do not change output.

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

Parameters

converter

a GMimeRtfToText

 

logger

the compliance logger.

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

user_data

data passed to the logger.

[nullable]

destroy

destroy notifier for user_data .

[nullable]

g_mime_rtf_to_text_get_compliance_logger ()

GMimeRtfComplianceLogger
g_mime_rtf_to_text_get_compliance_logger
                               (GMimeRtfToText *converter,
                                gpointer *user_data);

Gets the currently registered RTF compliance logger.

[skip]

Parameters

converter

a GMimeRtfToText

 

user_data

the logger's borrowed user data.

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

Returns

the compliance logger, or NULL if none is registered.

[nullable]


g_mime_rtf_to_text_get_compliance_options ()

GMimeRtfComplianceOptions *
g_mime_rtf_to_text_get_compliance_options
                               (GMimeRtfToText *converter);

Gets the converter's RTF compliance options.

Parameters

converter

a GMimeRtfToText

 

Returns

the converter's compliance options.

[transfer none]


g_mime_rtf_to_text_set_compliance_options ()

void
g_mime_rtf_to_text_set_compliance_options
                               (GMimeRtfToText *converter,
                                GMimeRtfComplianceOptions *options);

Sets the compliance options. The converter retains a reference to options .

Parameters

converter

a GMimeRtfToText

 

options

the RTF compliance options.

[transfer none]

Types and Values

GMimeRtfToText

typedef struct _GMimeRtfToText GMimeRtfToText;

Renders Rich Text Format as plain text.