<refentry id="camel-CamelStreamVFS">
<refmeta>
<refentrytitle role="top_of_page" id="camel-CamelStreamVFS.top_of_page">CamelStreamVFS</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>CAMEL Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>CamelStreamVFS</refname>
<refpurpose></refpurpose>
</refnamediv>

<refsynopsisdiv id="camel-CamelStreamVFS.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>
                    <link linkend="CamelStreamVFS">CamelStreamVFS</link>;
enum                <link linkend="CamelStreamVFSOpenMethod">CamelStreamVFSOpenMethod</link>;
<link linkend="CamelStream">CamelStream</link> *       <link linkend="camel-stream-vfs-new-with-uri">camel_stream_vfs_new_with_uri</link>       (const <link linkend="char">char</link> *uri,
                                                         <link linkend="CamelStreamVFSOpenMethod">CamelStreamVFSOpenMethod</link> mode);
<link linkend="CamelStream">CamelStream</link> *       <link linkend="camel-stream-vfs-new-with-stream">camel_stream_vfs_new_with_stream</link>    (<link linkend="GObject">GObject</link> *stream);
<link linkend="gboolean">gboolean</link>            <link linkend="camel-stream-vfs-is-writable">camel_stream_vfs_is_writable</link>        (<link linkend="CamelStreamVFS">CamelStreamVFS</link> *stream_vfs);
</synopsis>
</refsynopsisdiv>









<refsect1 id="camel-CamelStreamVFS.description" role="desc">
<title role="desc.title">Description</title>
<para>
</para>
</refsect1>

<refsect1 id="camel-CamelStreamVFS.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="CamelStreamVFS" role="struct">
<title>CamelStreamVFS</title>
<indexterm zone="CamelStreamVFS"><primary sortas="CamelStreamVFS">CamelStreamVFS</primary></indexterm><programlisting>typedef struct {
	CamelStream parent_object;

	GObject *stream;
} CamelStreamVFS;
</programlisting>
<para>
</para></refsect2>
<refsect2 id="CamelStreamVFSOpenMethod" role="enum">
<title>enum CamelStreamVFSOpenMethod</title>
<indexterm zone="CamelStreamVFSOpenMethod"><primary sortas="CamelStreamVFSOpenMethod">CamelStreamVFSOpenMethod</primary></indexterm><programlisting>typedef enum {
	CAMEL_STREAM_VFS_CREATE,	/* writable, creates new file or replaces old file */
	CAMEL_STREAM_VFS_APPEND,	/* writable, creates new file or appends at the end of the old file */
	CAMEL_STREAM_VFS_READ		/* readable, opens existing file for reading */
} CamelStreamVFSOpenMethod;
</programlisting>
<para>
</para></refsect2>
<refsect2 id="camel-stream-vfs-new-with-uri" role="function">
<title>camel_stream_vfs_new_with_uri ()</title>
<indexterm zone="camel-stream-vfs-new-with-uri"><primary sortas="camel_stream_vfs_new_with_uri">camel_stream_vfs_new_with_uri</primary></indexterm><programlisting><link linkend="CamelStream">CamelStream</link> *       camel_stream_vfs_new_with_uri       (const <link linkend="char">char</link> *uri,
                                                         <link linkend="CamelStreamVFSOpenMethod">CamelStreamVFSOpenMethod</link> mode);</programlisting>
<para>
Creates a new <link linkend="CamelStreamVFS"><type>CamelStreamVFS</type></link> corresponding to the named file and mode.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&#160;:</term>
<listitem><simpara> a file uri
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mode</parameter>&#160;:</term>
<listitem><simpara> opening mode for the uri file
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the new stream, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> on error.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-stream-vfs-new-with-stream" role="function">
<title>camel_stream_vfs_new_with_stream ()</title>
<indexterm zone="camel-stream-vfs-new-with-stream"><primary sortas="camel_stream_vfs_new_with_stream">camel_stream_vfs_new_with_stream</primary></indexterm><programlisting><link linkend="CamelStream">CamelStream</link> *       camel_stream_vfs_new_with_stream    (<link linkend="GObject">GObject</link> *stream);</programlisting>
<para>
Creates a new fs stream using the given gio stream <parameter>stream</parameter> as the
backing store. When the stream is destroyed, the file descriptor
will be closed. This will not increase reference counter on the stream.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>stream</parameter>&#160;:</term>
<listitem><simpara> a GInputStream or GOutputStream instance
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="CamelStreamVFS"><type>CamelStreamVFS</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-stream-vfs-is-writable" role="function">
<title>camel_stream_vfs_is_writable ()</title>
<indexterm zone="camel-stream-vfs-is-writable"><primary sortas="camel_stream_vfs_is_writable">camel_stream_vfs_is_writable</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            camel_stream_vfs_is_writable        (<link linkend="CamelStreamVFS">CamelStreamVFS</link> *stream_vfs);</programlisting>
<para>
</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>stream_vfs</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="CamelStreamVFS"><type>CamelStreamVFS</type></link> instance
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> whether is the underlying stream writable or not.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
