Camel.MimeParser.filter_add

### Method

# Camel MimeParserfilter_add

since: 2.22

#### Declaration [src]

    gint
    camel_mime_parser_filter_add (
      CamelMimeParser* m,
      CamelMimeFilter* mf
    )

#### Description [src]

Add a filter that will be applied to any body content before it is passed to the caller. Filters may be pipelined to perform multi-pass operations on the content, and are applied in the order they were added.

Note that filters are only applied to the body content of messages, and once a filter has been set, all content returned by a `camel_mime_parser_step()` with a state of CAMEL_MIME_PARSER_STATE_BODY will have passed through the filter.

Available since: 2.22

#### Parameters

`mf`

  Type: `CamelMimeFilter`

  A `CamelMimeFilter`.

  The data is owned by the caller of the method.

#### Return value

Type: `gint`

An id that may be passed to `camel_mime_parser_filter_remove()` to remove the filter, or -1 if the operation failed.