<refentry id="GMimeStreamFs">
<refmeta>
<refentrytitle role="top_of_page" id="GMimeStreamFs.top_of_page">GMimeStreamFs</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>
  GMIME Library
</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GMimeStreamFs</refname>
<refpurpose>A low-level FileSystem stream</refpurpose>
</refnamediv>

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

<synopsis>                    <link linkend="GMimeStreamFs-struct">GMimeStreamFs</link>;
<link linkend="GMimeStream"><returnvalue>GMimeStream</returnvalue></link> *       <link linkend="g-mime-stream-fs-new">g_mime_stream_fs_new</link>                (<parameter><link linkend="int"><type>int</type></link> fd</parameter>);
<link linkend="GMimeStream"><returnvalue>GMimeStream</returnvalue></link> *       <link linkend="g-mime-stream-fs-new-with-bounds">g_mime_stream_fs_new_with_bounds</link>    (<parameter><link linkend="int"><type>int</type></link> fd</parameter>,
                                                         <parameter><link linkend="gint64"><type>gint64</type></link> start</parameter>,
                                                         <parameter><link linkend="gint64"><type>gint64</type></link> end</parameter>);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            <link linkend="g-mime-stream-fs-get-owner">g_mime_stream_fs_get_owner</link>          (<parameter><link linkend="GMimeStreamFs"><type>GMimeStreamFs</type></link> *stream</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-stream-fs-set-owner">g_mime_stream_fs_set_owner</link>          (<parameter><link linkend="GMimeStreamFs"><type>GMimeStreamFs</type></link> *stream</parameter>,
                                                         <parameter><link linkend="gboolean"><type>gboolean</type></link> owner</parameter>);
</synopsis>
</refsynopsisdiv>
<refsect1 id="GMimeStreamFs.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----<link linkend="GMimeStream">GMimeStream</link>
         +----GMimeStreamFs
</synopsis>
</refsect1>

<refsect1 id="GMimeStreamFs.description" role="desc">
<title role="desc.title">Description</title>
<para>
A simple <link linkend="GMimeStream"><type>GMimeStream</type></link> implementation that sits on top of the
low-level UNIX file descriptor based I/O layer.
</para>
</refsect1>
<refsect1 id="GMimeStreamFs.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GMimeStreamFs-struct" role="struct">
<title>GMimeStreamFs</title>
<indexterm zone="GMimeStreamFs-struct"><primary>GMimeStreamFs</primary></indexterm>
<programlisting>typedef struct _GMimeStreamFs GMimeStreamFs;</programlisting>
<para>
A <link linkend="GMimeStream"><type>GMimeStream</type></link> wrapper around POSIX file descriptors.
</para><variablelist role="struct">
</variablelist></refsect2>
<refsect2 id="g-mime-stream-fs-new" role="function">
<title>g_mime_stream_fs_new ()</title>
<indexterm zone="g-mime-stream-fs-new"><primary>g_mime_stream_fs_new</primary></indexterm>
<programlisting><link linkend="GMimeStream"><returnvalue>GMimeStream</returnvalue></link> *       g_mime_stream_fs_new                (<parameter><link linkend="int"><type>int</type></link> fd</parameter>);</programlisting>
<para>
Creates a new <link linkend="GMimeStreamFs"><type>GMimeStreamFs</type></link> object around <parameter>fd</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>fd</parameter>&#160;:</term>
<listitem><simpara>a file descriptor
</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-fs-new-with-bounds" role="function">
<title>g_mime_stream_fs_new_with_bounds ()</title>
<indexterm zone="g-mime-stream-fs-new-with-bounds"><primary>g_mime_stream_fs_new_with_bounds</primary></indexterm>
<programlisting><link linkend="GMimeStream"><returnvalue>GMimeStream</returnvalue></link> *       g_mime_stream_fs_new_with_bounds    (<parameter><link linkend="int"><type>int</type></link> fd</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="GMimeStreamFs"><type>GMimeStreamFs</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>a file descriptor
</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>
<refsect2 id="g-mime-stream-fs-get-owner" role="function">
<title>g_mime_stream_fs_get_owner ()</title>
<indexterm zone="g-mime-stream-fs-get-owner"><primary>g_mime_stream_fs_get_owner</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            g_mime_stream_fs_get_owner          (<parameter><link linkend="GMimeStreamFs"><type>GMimeStreamFs</type></link> *stream</parameter>);</programlisting>
<para>
Gets whether or not <parameter>stream</parameter> owns the backend file descriptor.
</para><variablelist role="params">
<varlistentry><term><parameter>stream</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeStreamFs"><type>GMimeStreamFs</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>stream</parameter> owns the backend file descriptor or <link linkend="FALSE:CAPS"><literal>FALSE</literal></link>
otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-stream-fs-set-owner" role="function">
<title>g_mime_stream_fs_set_owner ()</title>
<indexterm zone="g-mime-stream-fs-set-owner"><primary>g_mime_stream_fs_set_owner</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_stream_fs_set_owner          (<parameter><link linkend="GMimeStreamFs"><type>GMimeStreamFs</type></link> *stream</parameter>,
                                                         <parameter><link linkend="gboolean"><type>gboolean</type></link> owner</parameter>);</programlisting>
<para>
Sets whether or not <parameter>stream</parameter> owns the backend file descriptor.
</para>
<para>
Note: <parameter>owner</parameter> should be <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the stream should <link linkend="close"><function>close()</function></link> the
backend file descriptor when destroyed or <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise.
</para><variablelist role="params">
<varlistentry><term><parameter>stream</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeStreamFs"><type>GMimeStreamFs</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>owner</parameter>&#160;:</term>
<listitem><simpara><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if this stream should own the file descriptor or <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise
</simpara></listitem></varlistentry>
</variablelist></refsect2>

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

</refentry>
