GMimeStreamFilter

## GMimeStreamFilter GMimeStreamFilter — A filtering stream |

## Synopsis

    struct              GMimeStreamFilter;
    GMimeStream *       g_mime_stream_filter_new            (GMimeStream *stream);
    int                 g_mime_stream_filter_add            (GMimeStreamFilter *stream,
                                                             GMimeFilter *filter);
    void                g_mime_stream_filter_remove         (GMimeStreamFilter *stream,
                                                             int id);

## 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.

## Details

### struct GMimeStreamFilter

    struct GMimeStreamFilter {
    	GMimeStream parent_object;

    	struct _GMimeStreamFilterPrivate *priv;

    	GMimeStream *source;
    };

A GMimeStream which passes data through any GMimeFilter objects.

GMimeStream `parent_object`; | parent GMimeStream
struct _GMimeStreamFilterPrivate *`priv`; | private state data
GMimeStream *`source`; | source stream

### g_mime_stream_filter_new ()

    GMimeStream *       g_mime_stream_filter_new            (GMimeStream *stream);

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

`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.

`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).

`stream` : | a GMimeStreamFilter
`id` : | filter id

## See Also

Filters