<refentry id="GMimeFilterCRLF">
<refmeta>
<refentrytitle role="top_of_page" id="GMimeFilterCRLF.top_of_page">GMimeFilterCRLF</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>
  GMIME Library
</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GMimeFilterCRLF</refname>
<refpurpose>Convert line-endings from LF to CRLF or vise versa</refpurpose>
</refnamediv>

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

<synopsis>                    <link linkend="GMimeFilterCRLF-struct">GMimeFilterCRLF</link>;
<link linkend="GMimeFilter"><returnvalue>GMimeFilter</returnvalue></link> *       <link linkend="g-mime-filter-crlf-new">g_mime_filter_crlf_new</link>              (<parameter><link linkend="gboolean"><type>gboolean</type></link> encode</parameter>,
                                                         <parameter><link linkend="gboolean"><type>gboolean</type></link> dots</parameter>);
</synopsis>
</refsynopsisdiv>
<refsect1 id="GMimeFilterCRLF.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----<link linkend="GMimeFilter">GMimeFilter</link>
         +----GMimeFilterCRLF
</synopsis>
</refsect1>

<refsect1 id="GMimeFilterCRLF.description" role="desc">
<title role="desc.title">Description</title>
<para>
A <link linkend="GMimeFilter"><type>GMimeFilter</type></link> for converting between DOS and UNIX line-endings.
</para>
</refsect1>
<refsect1 id="GMimeFilterCRLF.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GMimeFilterCRLF-struct" role="struct">
<title>GMimeFilterCRLF</title>
<indexterm zone="GMimeFilterCRLF-struct"><primary>GMimeFilterCRLF</primary></indexterm>
<programlisting>typedef struct _GMimeFilterCRLF GMimeFilterCRLF;</programlisting>
<para>
A filter to convert between line-ending formats and encode/decode
lines beginning with a '.'.
</para><variablelist role="struct">
</variablelist></refsect2>
<refsect2 id="g-mime-filter-crlf-new" role="function">
<title>g_mime_filter_crlf_new ()</title>
<indexterm zone="g-mime-filter-crlf-new"><primary>g_mime_filter_crlf_new</primary></indexterm>
<programlisting><link linkend="GMimeFilter"><returnvalue>GMimeFilter</returnvalue></link> *       g_mime_filter_crlf_new              (<parameter><link linkend="gboolean"><type>gboolean</type></link> encode</parameter>,
                                                         <parameter><link linkend="gboolean"><type>gboolean</type></link> dots</parameter>);</programlisting>
<para>
Creates a new <link linkend="GMimeFilterCRLF"><type>GMimeFilterCRLF</type></link> filter.
</para>
<para>
If <parameter>encode</parameter> is <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>, then lone line-feeds ('\n') will be 'encoded'
into the canonical CRLF end-of-line sequence ("\r\n") otherwise
CRLF sequences will be 'decoded' into the UNIX line-ending form
('\n').
</para>
<para>
The <parameter>dots</parameter> parameter tells the filter whether or not it should
encode or decode lines beginning with a dot ('.'). If both <parameter>encode</parameter>
and <parameter>dots</parameter> are <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>, then a '.' at the beginning of a line will be
'encoded' into "..". If <parameter>encode</parameter> is <link linkend="FALSE:CAPS"><literal>FALSE</literal></link>, then ".." at the
beginning of a line will be decoded into a single '.'.
</para><variablelist role="params">
<varlistentry><term><parameter>encode</parameter>&#160;:</term>
<listitem><simpara><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the filter should encode or <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dots</parameter>&#160;:</term>
<listitem><simpara>encode/decode dots (as for SMTP)
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="GMimeFilterCRLF"><type>GMimeFilterCRLF</type></link> filter.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>

</refentry>
