Camel.MimePart.generate_preview

### Method

# Camel MimePartgenerate_preview

since: 3.52

#### Declaration [src]

    gchar*
    camel_mime_part_generate_preview (
      CamelMimePart* mime_part,
      CamelGeneratePreviewFunc func,
      gpointer user_data
    )

#### Description [src]

Generates preview of the `mime_part`, to be used in the interface, read by the users.

The optional `func` can be used to override default preview generation function. If provided, it’s always called as the first try on the parts.

Available since: 3.52

#### Parameters

`func`

  Type: `CamelGeneratePreviewFunc`

  An optional `CamelGeneratePreviewFunc` function, or `NULL`.

  The argument can be `NULL`.

`user_data`

  Type: `gpointer`

  User data for the `func`, or `NULL`.

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

#### Return value

Type: `gchar*`

Part’s preview as a new string, or `NULL`, when cannot be generated. Free with g_free(), when no longer needed.

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