## CamelMimeFilter CamelMimeFilter |

## Functions

CamelMimeFilter * | camel_mime_filter_new ()
void | camel_mime_filter_filter ()
void | camel_mime_filter_complete ()
void | camel_mime_filter_reset ()
void | camel_mime_filter_backup ()
void | camel_mime_filter_set_size ()
void | camel_mime_filter_set_request_stop ()
gboolean | camel_mime_filter_get_request_stop ()

## Object Hierarchy

        GObject
        ╰── CamelMimeFilter
            ├── CamelMimeFilterBasic
            ├── CamelMimeFilterBestenc
            ├── CamelMimeFilterCanon
            ├── CamelMimeFilterCharset
            ├── CamelMimeFilterCRLF
            ├── CamelMimeFilterEnriched
            ├── CamelMimeFilterFrom
            ├── CamelMimeFilterGZip
            ├── CamelMimeFilterHTML
            ├── CamelMimeFilterIndex
            ├── CamelMimeFilterLinewrap
            ├── CamelMimeFilterPgp
            ├── CamelMimeFilterPreview
            ├── CamelMimeFilterProgress
            ├── CamelMimeFilterToHTML
            ├── CamelMimeFilterWindows
            ╰── CamelMimeFilterYenc

## Description

## Functions

### camel_mime_filter_new ()

    CamelMimeFilter *
    camel_mime_filter_new (void);

Create a new CamelMimeFilter object.

#### Returns

a new CamelMimeFilter

### camel_mime_filter_filter ()

    void
    camel_mime_filter_filter (CamelMimeFilter *filter,
                              const gchar *in,
                              gsize len,
                              gsize prespace,
                              gchar **out,
                              gsize *outlen,
                              gsize *outprespace);

Passes the input buffer, `in` , through `filter` and generates an output buffer, `out` .

#### Parameters

filter | a CamelMimeFilter object |
in | input buffer. | [array length=len][element-type guint8]
len | length of `in` |
prespace | amount of prespace |
out | pointer to the output buffer (to be set). | [out][array length=outlen][element-type guint8]
outlen | pointer to the length of the output buffer (to be set). | [out]
outprespace | pointer to the output prespace length (to be set). | [out]

### camel_mime_filter_complete ()

    void
    camel_mime_filter_complete (CamelMimeFilter *filter,
                                const gchar *in,
                                gsize len,
                                gsize prespace,
                                gchar **out,
                                gsize *outlen,
                                gsize *outprespace);

Passes the input buffer, `in` , through `filter` and generates an output buffer, `out` and makes sure that all data is flushed to the output buffer. This must be the last filtering call made, no further calls to `camel_mime_filter_filter()` may be called on `filter` until `filter` has been reset using `camel_mime_filter_reset()`.

#### Parameters

filter | a CamelMimeFilter object |
in | input buffer. | [array length=len][element-type guint8]
len | length of `in` |
prespace | amount of prespace |
out | pointer to the output buffer (to be set). | [out][array length=outlen][element-type guint8]
outlen | pointer to the length of the output buffer (to be set). | [out]
outprespace | pointer to the output prespace length (to be set). | [out]

### camel_mime_filter_reset ()

    void
    camel_mime_filter_reset (CamelMimeFilter *filter);

Resets the state on `filter` so that it may be used again.

#### Parameters

filter | a CamelMimeFilter object |

### camel_mime_filter_backup ()

    void
    camel_mime_filter_backup (CamelMimeFilter *filter,
                              const gchar *data,
                              gsize length);

Saves `data` to be used as prespace input data to the next call to `camel_mime_filter_filter()` or `camel_mime_filter_complete()`.

Note: New calls replace old data.

#### Parameters

filter | a CamelMimeFilter object |
data | data buffer to backup. | [array length=length][element-type guint8]
length | length of `data` |

### camel_mime_filter_set_size ()

    void
    camel_mime_filter_set_size (CamelMimeFilter *filter,
                                gsize size,
                                gint keep);

Ensure that `filter` has enough storage space to store `size` bytes for filter output.

#### Parameters

filter | a CamelMimeFilter object |
size | requested amount of storage space |
keep | `TRUE` to keep existing buffered data or `FALSE` otherwise |

### camel_mime_filter_set_request_stop ()

    void
    camel_mime_filter_set_request_stop (CamelMimeFilter *filter,
                                        gboolean request_stop);

Sets whether the `filter` requests, or not, stop further processing. This can be used to stop before all the data is filtered.

#### Parameters

filter | a CamelMimeFilter |
request_stop | value to set |

Since: 3.52

### camel_mime_filter_get_request_stop ()

    gboolean
    camel_mime_filter_get_request_stop (CamelMimeFilter *filter);

Returns whether the `filter` requested stop further processing with `camel_mime_filter_set_request_stop()`.

#### Parameters

filter | a CamelMimeFilter |

#### Returns

`TRUE`, when the `filter` request stop further processing, `FALSE` otherwise

Since: 3.52