<refentry id="GMimeStreamMmap">
<refmeta>
<refentrytitle role="top_of_page" id="GMimeStreamMmap.top_of_page">GMimeStreamMmap</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>
  GMIME Library
</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GMimeStreamMmap</refname>
<refpurpose>A memory-mapped file stream</refpurpose>
</refnamediv>

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

<synopsis>                    <link linkend="GMimeStreamMmap-struct">GMimeStreamMmap</link>;
<link linkend="GMimeStream"><returnvalue>GMimeStream</returnvalue></link> *       <link linkend="g-mime-stream-mmap-new">g_mime_stream_mmap_new</link>              (<parameter><link linkend="int"><type>int</type></link> fd</parameter>,
                                                         <parameter><link linkend="int"><type>int</type></link> prot</parameter>,
                                                         <parameter><link linkend="int"><type>int</type></link> flags</parameter>);
<link linkend="GMimeStream"><returnvalue>GMimeStream</returnvalue></link> *       <link linkend="g-mime-stream-mmap-new-with-bounds">g_mime_stream_mmap_new_with_bounds</link>  (<parameter><link linkend="int"><type>int</type></link> fd</parameter>,
                                                         <parameter><link linkend="int"><type>int</type></link> prot</parameter>,
                                                         <parameter><link linkend="int"><type>int</type></link> flags</parameter>,
                                                         <parameter><link linkend="gint64"><type>gint64</type></link> start</parameter>,
                                                         <parameter><link linkend="gint64"><type>gint64</type></link> end</parameter>);
</synopsis>
</refsynopsisdiv>
<refsect1 id="GMimeStreamMmap.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----<link linkend="GMimeStream">GMimeStream</link>
         +----GMimeStreamMmap
</synopsis>
</refsect1>

<refsect1 id="GMimeStreamMmap.description" role="desc">
<title role="desc.title">Description</title>
<para>
A <link linkend="GMimeStream"><type>GMimeStream</type></link> implementation using a memory-mapped file backing
store. This may be faster than <link linkend="GMimeStreamFs"><type>GMimeStreamFs</type></link> or <link linkend="GMimeStreamFile"><type>GMimeStreamFile</type></link>
but you'll have to do your own performance checking to be sure for
your particular application/platform.
</para>
</refsect1>
<refsect1 id="GMimeStreamMmap.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GMimeStreamMmap-struct" role="struct">
<title>GMimeStreamMmap</title>
<indexterm zone="GMimeStreamMmap-struct"><primary>GMimeStreamMmap</primary></indexterm>
<programlisting>typedef struct _GMimeStreamMmap GMimeStreamMmap;</programlisting>
<para>
A memory-mapped <link linkend="GMimeStream"><type>GMimeStream</type></link>.
</para><variablelist role="struct">
</variablelist></refsect2>
<refsect2 id="g-mime-stream-mmap-new" role="function">
<title>g_mime_stream_mmap_new ()</title>
<indexterm zone="g-mime-stream-mmap-new"><primary>g_mime_stream_mmap_new</primary></indexterm>
<programlisting><link linkend="GMimeStream"><returnvalue>GMimeStream</returnvalue></link> *       g_mime_stream_mmap_new              (<parameter><link linkend="int"><type>int</type></link> fd</parameter>,
                                                         <parameter><link linkend="int"><type>int</type></link> prot</parameter>,
                                                         <parameter><link linkend="int"><type>int</type></link> flags</parameter>);</programlisting>
<para>
Creates a new <link linkend="GMimeStreamMmap"><type>GMimeStreamMmap</type></link> object around <parameter>fd</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>fd</parameter>&#160;:</term>
<listitem><simpara>file descriptor
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>prot</parameter>&#160;:</term>
<listitem><simpara>protection flags
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara>map flags
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a stream using <parameter>fd</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-stream-mmap-new-with-bounds" role="function">
<title>g_mime_stream_mmap_new_with_bounds ()</title>
<indexterm zone="g-mime-stream-mmap-new-with-bounds"><primary>g_mime_stream_mmap_new_with_bounds</primary></indexterm>
<programlisting><link linkend="GMimeStream"><returnvalue>GMimeStream</returnvalue></link> *       g_mime_stream_mmap_new_with_bounds  (<parameter><link linkend="int"><type>int</type></link> fd</parameter>,
                                                         <parameter><link linkend="int"><type>int</type></link> prot</parameter>,
                                                         <parameter><link linkend="int"><type>int</type></link> flags</parameter>,
                                                         <parameter><link linkend="gint64"><type>gint64</type></link> start</parameter>,
                                                         <parameter><link linkend="gint64"><type>gint64</type></link> end</parameter>);</programlisting>
<para>
Creates a new <link linkend="GMimeStreamMmap"><type>GMimeStreamMmap</type></link> object around <parameter>fd</parameter> with bounds <parameter>start</parameter>
and <parameter>end</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>fd</parameter>&#160;:</term>
<listitem><simpara>file descriptor
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>prot</parameter>&#160;:</term>
<listitem><simpara>protection flags
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara>map flags
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>start</parameter>&#160;:</term>
<listitem><simpara>start boundary
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>end</parameter>&#160;:</term>
<listitem><simpara>end boundary
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a stream using <parameter>fd</parameter> with bounds <parameter>start</parameter> and <parameter>end</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

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

</refentry>
