## GMimeStreamFilter

GMimeStreamFilter — A filtering stream

## Functions

GMimeStream * | g_mime_stream_filter_new ()
int | g_mime_stream_filter_add ()
void | g_mime_stream_filter_remove ()
gboolean | g_mime_stream_filter_get_owner ()
void | g_mime_stream_filter_set_owner ()

## Types and Values

struct | GMimeStreamFilter

## Object Hierarchy

        GObject
        ╰── GMimeStream
            ╰── GMimeStreamFilter

## Description

A GMimeStream meant for filtering data passing through it.

This stream class is useful for converting data of one type to another using GMimeFilter objects.

When data passes through a GMimeStreamFilter, it will pass through GMimeFilter filters in the order they were added.

## Functions

### g_mime_stream_filter_new ()

    GMimeStream *
    g_mime_stream_filter_new (GMimeStream *stream);

Creates a new GMimeStreamFilter object using `stream` as the source stream.

#### Parameters

stream | source stream |

#### Returns

a new filter stream with `stream` as its source.

### g_mime_stream_filter_add ()

    int
    g_mime_stream_filter_add (GMimeStreamFilter *stream,
                              GMimeFilter *filter);

Adds `filter` to `stream` . Filters are applied in the same order in which they are added.

#### Parameters

stream | a GMimeStreamFilter |
filter | a GMimeFilter |

#### Returns

an id for the filter.

### g_mime_stream_filter_remove ()

    void
    g_mime_stream_filter_remove (GMimeStreamFilter *stream,
                                 int id);

Removed a filter from the stream based on the id (as returned from filter_add).

#### Parameters

stream | a GMimeStreamFilter |
id | filter id |

### g_mime_stream_filter_get_owner ()

    gboolean
    g_mime_stream_filter_get_owner (GMimeStreamFilter *stream);

Gets whether or not `stream` owns the source stream.

#### Parameters

stream | a GMimeStreamFilter |

#### Returns

`TRUE` if `stream` owns the source stream or `FALSE` otherwise.

### g_mime_stream_filter_set_owner ()

    void
    g_mime_stream_filter_set_owner (GMimeStreamFilter *stream,
                                    gboolean owner);

Sets whether or not `stream` owns the source stream..

Note: `owner` should be `TRUE` if the stream should `close()` the backend source stream when destroyed or `FALSE` otherwise.

#### Parameters

stream | a GMimeStreamFilter |
owner | `TRUE` if this stream should own the source stream or `FALSE` otherwise |

## Types and Values

### struct GMimeStreamFilter

    struct GMimeStreamFilter;

A GMimeStream which passes data through any GMimeFilter objects.

#### Members

## See Also

Filters