Function

CamelGeneratePreviewFunc

since: 3.52

Declaration

gchar*
(* CamelGeneratePreviewFunc) (
  gpointer part,
  gpointer user_data
)

Description [src]

A custom function to generate preview text for the content of the part. The part can be either a CamelMimePart or a CamelMultipart, depending in which context it is called.

The preview is supposed to be up to CAMEL_MAX_PREVIEW_LENGTH characters long, in a plain text format.

Available since: 3.52

Parameters

part

Type: gpointer

Either a CamelMimePart or a CamelMultipart.

The argument can be NULL.
The data is owned by the caller of the function.
user_data

Type: gpointer

User data for the function.

The argument can be NULL.
The data is owned by the caller of the function.

Return value

Type: gchar*

Valid UTF-8 encoded preview text for the part, or NULL, when cannot handle the part.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The return value can be NULL.
The value is a NUL terminated UTF-8 string.