<refentry id="GMimeFilterFrom">
<refmeta>
<refentrytitle role="top_of_page" id="GMimeFilterFrom.top_of_page">GMimeFilterFrom</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>
  GMIME Library
</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GMimeFilterFrom</refname>
<refpurpose>Escape MBox From_ lines</refpurpose>
</refnamediv>

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

<synopsis>                    <link linkend="GMimeFilterFrom-struct">GMimeFilterFrom</link>;
enum                <link linkend="GMimeFilterFromMode">GMimeFilterFromMode</link>;
<link linkend="GMimeFilter"><returnvalue>GMimeFilter</returnvalue></link> *       <link linkend="g-mime-filter-from-new">g_mime_filter_from_new</link>              (<parameter><link linkend="GMimeFilterFromMode"><type>GMimeFilterFromMode</type></link> mode</parameter>);
</synopsis>
</refsynopsisdiv>
<refsect1 id="GMimeFilterFrom.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----<link linkend="GMimeFilter">GMimeFilter</link>
         +----GMimeFilterFrom
</synopsis>
</refsect1>

<refsect1 id="GMimeFilterFrom.description" role="desc">
<title role="desc.title">Description</title>
<para>
A <link linkend="GMimeFilter"><type>GMimeFilter</type></link> used for escaping MBox From_ lines using either the
traditional ">From " or quoted-printable encoding.
</para>
</refsect1>
<refsect1 id="GMimeFilterFrom.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GMimeFilterFrom-struct" role="struct">
<title>GMimeFilterFrom</title>
<indexterm zone="GMimeFilterFrom-struct"><primary>GMimeFilterFrom</primary></indexterm>
<programlisting>typedef struct _GMimeFilterFrom GMimeFilterFrom;</programlisting>
<para>
A filter for armoring or escaping lines beginning with "From ".
</para><variablelist role="struct">
</variablelist></refsect2>
<refsect2 id="GMimeFilterFromMode" role="enum">
<title>enum GMimeFilterFromMode</title>
<indexterm zone="GMimeFilterFromMode"><primary>GMimeFilterFromMode</primary></indexterm>
<programlisting>typedef enum {
	GMIME_FILTER_FROM_MODE_DEFAULT  = 0,
	GMIME_FILTER_FROM_MODE_ESCAPE   = 0,
	GMIME_FILTER_FROM_MODE_ARMOR    = 1
} GMimeFilterFromMode;
</programlisting>
<para>
The mode for a <link linkend="GMimeFilterFrom"><type>GMimeFilterFrom</type></link> filter.
</para><variablelist role="enum">
<varlistentry id="GMIME-FILTER-FROM-MODE-DEFAULT:CAPS" role="constant">
<term><literal>GMIME_FILTER_FROM_MODE_DEFAULT</literal></term>
<listitem><simpara>Default mode.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-FILTER-FROM-MODE-ESCAPE:CAPS" role="constant">
<term><literal>GMIME_FILTER_FROM_MODE_ESCAPE</literal></term>
<listitem><simpara>Escape 'From ' lines with a '>'
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-FILTER-FROM-MODE-ARMOR:CAPS" role="constant">
<term><literal>GMIME_FILTER_FROM_MODE_ARMOR</literal></term>
<listitem><simpara>QP-Encode 'From ' lines
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-filter-from-new" role="function">
<title>g_mime_filter_from_new ()</title>
<indexterm zone="g-mime-filter-from-new"><primary>g_mime_filter_from_new</primary></indexterm>
<programlisting><link linkend="GMimeFilter"><returnvalue>GMimeFilter</returnvalue></link> *       g_mime_filter_from_new              (<parameter><link linkend="GMimeFilterFromMode"><type>GMimeFilterFromMode</type></link> mode</parameter>);</programlisting>
<para>
Creates a new GMimeFilterFrom filter. If <parameter>mode</parameter> is
<link linkend="GMIME-FILTER-FROM-MODE-ARMOR:CAPS"><type>GMIME_FILTER_FROM_MODE_ARMOR</type></link>, the from-filter will encode from
lines using the quoted-printable encoding resulting in "=46rom ".
Using the <link linkend="GMIME-FILTER-FROM-MODE-DEFAULT:CAPS"><type>GMIME_FILTER_FROM_MODE_DEFAULT</type></link> or
<link linkend="GMIME-FILTER-FROM-MODE-ESCAPE:CAPS"><type>GMIME_FILTER_FROM_MODE_ESCAPE</type></link> mode (they are the same), from lines
will be escaped to ">From ".
</para>
<para>
Note: If you plan on using a from-filter in mode ARMOR, you should
remember to also use a <link linkend="GMimeFilterBasic"><type>GMimeFilterBasic</type></link> filter with an encoding of
<link linkend="GMIME-CONTENT-ENCODING-QUOTEDPRINTABLE:CAPS"><type>GMIME_CONTENT_ENCODING_QUOTEDPRINTABLE</type></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>mode</parameter>&#160;:</term>
<listitem><simpara>filter mode
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new from filter with mode <parameter>mode</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

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

</refentry>
