## gmime-filter

gmime-filter —

## Synopsis

    struct      GMimeFilter;
    GMimeFilter* g_mime_filter_copy             (GMimeFilter *filter);
    void        g_mime_filter_filter            (GMimeFilter *filter,
                                                 char *in,
                                                 size_t len,
                                                 size_t prespace,
                                                 char **out,
                                                 size_t *outlen,
                                                 size_t *outprespace);
    void        g_mime_filter_complete          (GMimeFilter *filter,
                                                 char *in,
                                                 size_t len,
                                                 size_t prespace,
                                                 char **out,
                                                 size_t *outlen,
                                                 size_t *outprespace);
    void        g_mime_filter_reset             (GMimeFilter *filter);
    void        g_mime_filter_backup            (GMimeFilter *filter,
                                                 const char *data,
                                                 size_t length);
    void        g_mime_filter_set_size          (GMimeFilter *filter,
                                                 size_t size,
                                                 gboolean keep);

## Object Hierarchy

      GObject
       +----GMimeFilter
             +----GMimeFilterBasic
             +----GMimeFilterBest
             +----GMimeFilterCharset
             +----GMimeFilterCRLF
             +----GMimeFilterEnriched
             +----GMimeFilterFrom
             +----GMimeFilterGZip
             +----GMimeFilterHTML
             +----GMimeFilterMd5
             +----GMimeFilterStrip
             +----GMimeFilterWindows
             +----GMimeFilterYenc

## Description

## Details

### struct GMimeFilter

    struct GMimeFilter;

### g_mime_filter_copy ()

    GMimeFilter* g_mime_filter_copy             (GMimeFilter *filter);

Copies `filter` into a new GMimeFilter object.

`filter` : | filter
Returns : | a duplicate of `filter`.

### g_mime_filter_filter ()

    void        g_mime_filter_filter            (GMimeFilter *filter,
                                                 char *in,
                                                 size_t len,
                                                 size_t prespace,
                                                 char **out,
                                                 size_t *outlen,
                                                 size_t *outprespace);

Filters the input data and writes it to `out`.

`filter` : | filter
`in` : | input buffer
`len` : | input buffer length
`prespace` : | prespace buffer length
`out` : | pointer to output buffer
`outlen` : | pointer to output length
`outprespace` : | pointer to output prespace buffer length

### g_mime_filter_complete ()

    void        g_mime_filter_complete          (GMimeFilter *filter,
                                                 char *in,
                                                 size_t len,
                                                 size_t prespace,
                                                 char **out,
                                                 size_t *outlen,
                                                 size_t *outprespace);

Completes the filtering.

`filter` : | filter
`in` : | input buffer
`len` : | input length
`prespace` : | prespace buffer length
`out` : | pointer to output buffer
`outlen` : | pointer to output length
`outprespace` : | pointer to output prespace buffer length

### g_mime_filter_reset ()

    void        g_mime_filter_reset             (GMimeFilter *filter);

Resets the filter.

`filter` : |

### g_mime_filter_backup ()

    void        g_mime_filter_backup            (GMimeFilter *filter,
                                                 const char *data,
                                                 size_t length);

Sets number of bytes backed up on the input, new calls replace previous ones

`filter` : | filter
`data` : |
`length` : |

### g_mime_filter_set_size ()

    void        g_mime_filter_set_size          (GMimeFilter *filter,
                                                 size_t size,
                                                 gboolean keep);

Ensure this much size available for filter output (if required)

`filter` : | filter
`size` : |
`keep` : |