<refentry id="GMimeStreamFilter">
<refmeta>
<refentrytitle role="top_of_page" id="GMimeStreamFilter.top_of_page">GMimeStreamFilter</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>
  GMIME Library
</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GMimeStreamFilter</refname>
<refpurpose>A filtering stream</refpurpose>
</refnamediv>

<refsynopsisdiv id="GMimeStreamFilter.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>                    <link linkend="GMimeStreamFilter-struct">GMimeStreamFilter</link>;
<link linkend="GMimeStream"><returnvalue>GMimeStream</returnvalue></link> *       <link linkend="g-mime-stream-filter-new">g_mime_stream_filter_new</link>            (<parameter><link linkend="GMimeStream"><type>GMimeStream</type></link> *stream</parameter>);
<link linkend="int"><returnvalue>int</returnvalue></link>                 <link linkend="g-mime-stream-filter-add">g_mime_stream_filter_add</link>            (<parameter><link linkend="GMimeStreamFilter"><type>GMimeStreamFilter</type></link> *stream</parameter>,
                                                         <parameter><link linkend="GMimeFilter"><type>GMimeFilter</type></link> *filter</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-stream-filter-remove">g_mime_stream_filter_remove</link>         (<parameter><link linkend="GMimeStreamFilter"><type>GMimeStreamFilter</type></link> *stream</parameter>,
                                                         <parameter><link linkend="int"><type>int</type></link> id</parameter>);
</synopsis>
</refsynopsisdiv>
<refsect1 id="GMimeStreamFilter.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----<link linkend="GMimeStream">GMimeStream</link>
         +----GMimeStreamFilter
</synopsis>
</refsect1>

<refsect1 id="GMimeStreamFilter.description" role="desc">
<title role="desc.title">Description</title>
<para>
A <link linkend="GMimeStream"><type>GMimeStream</type></link> meant for filtering data passing through it.
</para>
<para>
This stream class is useful for converting data of one type to
another using <link linkend="GMimeFilter"><type>GMimeFilter</type></link> objects.
</para>
<para>
When data passes through a <link linkend="GMimeStreamFilter"><type>GMimeStreamFilter</type></link>, it will pass through
<link linkend="GMimeFilter"><type>GMimeFilter</type></link> filters in the order they were added.
</para>
</refsect1>
<refsect1 id="GMimeStreamFilter.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GMimeStreamFilter-struct" role="struct">
<title>GMimeStreamFilter</title>
<indexterm zone="GMimeStreamFilter-struct"><primary>GMimeStreamFilter</primary></indexterm>
<programlisting>typedef struct _GMimeStreamFilter GMimeStreamFilter;</programlisting>
<para>
A <link linkend="GMimeStream"><type>GMimeStream</type></link> which passes data through any <link linkend="GMimeFilter"><type>GMimeFilter</type></link> objects.
</para><variablelist role="struct">
</variablelist></refsect2>
<refsect2 id="g-mime-stream-filter-new" role="function">
<title>g_mime_stream_filter_new ()</title>
<indexterm zone="g-mime-stream-filter-new"><primary>g_mime_stream_filter_new</primary></indexterm>
<programlisting><link linkend="GMimeStream"><returnvalue>GMimeStream</returnvalue></link> *       g_mime_stream_filter_new            (<parameter><link linkend="GMimeStream"><type>GMimeStream</type></link> *stream</parameter>);</programlisting>
<para>
Creates a new <link linkend="GMimeStreamFilter"><type>GMimeStreamFilter</type></link> object using <parameter>stream</parameter> as the source
stream.
</para><variablelist role="params">
<varlistentry><term><parameter>stream</parameter>&#160;:</term>
<listitem><simpara>source stream
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new filter stream with <parameter>stream</parameter> as its source.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-stream-filter-add" role="function">
<title>g_mime_stream_filter_add ()</title>
<indexterm zone="g-mime-stream-filter-add"><primary>g_mime_stream_filter_add</primary></indexterm>
<programlisting><link linkend="int"><returnvalue>int</returnvalue></link>                 g_mime_stream_filter_add            (<parameter><link linkend="GMimeStreamFilter"><type>GMimeStreamFilter</type></link> *stream</parameter>,
                                                         <parameter><link linkend="GMimeFilter"><type>GMimeFilter</type></link> *filter</parameter>);</programlisting>
<para>
Adds <parameter>filter</parameter> to <parameter>stream</parameter>. Filters are applied in the same order in
which they are added.
</para><variablelist role="params">
<varlistentry><term><parameter>stream</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeStreamFilter"><type>GMimeStreamFilter</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>filter</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeFilter"><type>GMimeFilter</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> an id for the filter.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-stream-filter-remove" role="function">
<title>g_mime_stream_filter_remove ()</title>
<indexterm zone="g-mime-stream-filter-remove"><primary>g_mime_stream_filter_remove</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_stream_filter_remove         (<parameter><link linkend="GMimeStreamFilter"><type>GMimeStreamFilter</type></link> *stream</parameter>,
                                                         <parameter><link linkend="int"><type>int</type></link> id</parameter>);</programlisting>
<para>
Removed a filter from the stream based on the id (as returned from
filter_add).
</para><variablelist role="params">
<varlistentry><term><parameter>stream</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeStreamFilter"><type>GMimeStreamFilter</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>id</parameter>&#160;:</term>
<listitem><simpara>filter id
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>
<refsect1 id="GMimeStreamFilter.see-also">
<title>See Also</title>
<link linkend="Filters"><type>Filters</type></link>
</refsect1>

</refentry>
