<refentry id="gnome-vfs-20-gnome-vfs-module-shared">
<refmeta>
<refentrytitle id="top_of_page">gnome-vfs-module-shared</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GNOME-VFS-2.0 Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>gnome-vfs-module-shared</refname>
<refpurpose></refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>

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

<synopsis>



const <link linkend="gchar">gchar</link>* <link linkend="gnome-vfs-mime-type-from-mode">gnome_vfs_mime_type_from_mode</link>  (<link linkend="mode-t">mode_t</link> mode);
<link linkend="void">void</link>        <link linkend="gnome-vfs-stat-to-file-info">gnome_vfs_stat_to_file_info</link>     (<link linkend="GnomeVFSFileInfo">GnomeVFSFileInfo</link> *file_info,
                                             const struct <link linkend="stat">stat</link> *statptr);
<link linkend="GnomeVFSResult">GnomeVFSResult</link> <link linkend="gnome-vfs-set-meta">gnome_vfs_set_meta</link>           (<link linkend="GnomeVFSFileInfo">GnomeVFSFileInfo</link> *info,
                                             const <link linkend="char">char</link> *file_name,
                                             const <link linkend="char">char</link> *meta_key);
<link linkend="GnomeVFSResult">GnomeVFSResult</link> <link linkend="gnome-vfs-set-meta-for-list">gnome_vfs_set_meta_for_list</link>  (<link linkend="GnomeVFSFileInfo">GnomeVFSFileInfo</link> *info,
                                             const <link linkend="char">char</link> *file_name,
                                             const <link linkend="GList">GList</link> *meta_keys);
const <link linkend="char">char</link>* <link linkend="gnome-vfs-get-special-mime-type">gnome_vfs_get_special_mime_type</link> (<link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);
</synopsis>
</refsynopsisdiv>









<refsect1 id="desc">
<title id="desc.title">Description</title>
<para>

</para>
</refsect1>

<refsect1 id="details">
<title id="details.title">Details</title>
<refsect2>
<title><anchor id="gnome-vfs-mime-type-from-mode" role="function"/>gnome_vfs_mime_type_from_mode ()</title>
<indexterm><primary>gnome_vfs_mime_type_from_mode</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>* gnome_vfs_mime_type_from_mode  (<link linkend="mode-t">mode_t</link> mode);</programlisting>
<para>
Returns a MIME type based on the <parameter>mode</parameter>. It only works when <parameter>mode</parameter>
references a special file (directory, device, fifo, socket or symlink).
</para>
<para>
Returns: a string containing the MIME type, if <parameter>mode</parameter> is a normal file</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mode</parameter>&nbsp;:</term>
<listitem><simpara> value as the st_mode field in the system stat structure.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara><literal>NULL</literal>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-stat-to-file-info" role="function"/>gnome_vfs_stat_to_file_info ()</title>
<indexterm><primary>gnome_vfs_stat_to_file_info</primary></indexterm><programlisting><link linkend="void">void</link>        gnome_vfs_stat_to_file_info     (<link linkend="GnomeVFSFileInfo">GnomeVFSFileInfo</link> *file_info,
                                             const struct <link linkend="stat">stat</link> *statptr);</programlisting>
<para>
Fills the <parameter>file_info</parameter> structure with the values from <parameter>statptr</parameter> structure.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>file_info</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSFileInfo"><type>GnomeVFSFileInfo</type></link> which will be filled.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>statptr</parameter>&nbsp;:</term>
<listitem><simpara> pointer to a 'stat' structure.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-set-meta" role="function"/>gnome_vfs_set_meta ()</title>
<indexterm><primary>gnome_vfs_set_meta</primary></indexterm><programlisting><link linkend="GnomeVFSResult">GnomeVFSResult</link> gnome_vfs_set_meta           (<link linkend="GnomeVFSFileInfo">GnomeVFSFileInfo</link> *info,
                                             const <link linkend="char">char</link> *file_name,
                                             const <link linkend="char">char</link> *meta_key);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>info</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>file_name</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>meta_key</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-set-meta-for-list" role="function"/>gnome_vfs_set_meta_for_list ()</title>
<indexterm><primary>gnome_vfs_set_meta_for_list</primary></indexterm><programlisting><link linkend="GnomeVFSResult">GnomeVFSResult</link> gnome_vfs_set_meta_for_list  (<link linkend="GnomeVFSFileInfo">GnomeVFSFileInfo</link> *info,
                                             const <link linkend="char">char</link> *file_name,
                                             const <link linkend="GList">GList</link> *meta_keys);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>info</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>file_name</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>meta_keys</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-get-special-mime-type" role="function"/>gnome_vfs_get_special_mime_type ()</title>
<indexterm><primary>gnome_vfs_get_special_mime_type</primary></indexterm><programlisting>const <link linkend="char">char</link>* gnome_vfs_get_special_mime_type (<link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);</programlisting>
<para>
Gets the MIME type for <parameter>uri</parameter>, this function only returns the type
when the uri points to a file that can't be sniffed (sockets, 
directories, devices, and fifos).</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link> to get the mime type for.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a string containing the mime type or <literal>NULL</literal> if the <parameter>uri</parameter> doesn't 
present a special file.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
