Camel.Session.get_filter_driver
Description: Reference for Camel.Session.get_filter_driver

### Virtual Method

# Camel Sessionget_filter_driver

#### Declaration [src]

    CamelFilterDriver*
    get_filter_driver (
      CamelSession* session,
      const gchar* type,
      CamelFolder* for_folder,
      GError** error
    )

#### Description [src]

The optional `for_folder` can be used to determine which filters to add and which not.

#### Parameters

`type`

  Type: `const gchar*`

  The type of filter (eg, “incoming”).

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`for_folder`

  Type: `CamelFolder`

  An optional `CamelFolder`, for which the filter driver will run, or `NULL`.

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

`error`

  Type: `GError **`

  The return location for a recoverable error.

  The argument can be `NULL`.
  If the return location is not `NULL`, then you must initialize it to a `NULL` `GError*`.
  The argument will be left initialized to `NULL` by the virtual function if there are no errors.
  In case of error, the argument will be set to a newly allocated `GError`; the caller will take ownership of the data, and be responsible for freeing it.

#### Return value

Type: `CamelFilterDriver`

A filter driver, loaded with applicable rules.

The returned data is owned by the instance.