<refentry id="gnome-vfs-20-gnome-vfs-mime-database">
<refmeta>
<refentrytitle id="top_of_page">File Types</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GNOME-VFS-2.0 Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>File Types</refname>
<refpurpose>
functions for getting information about files based on their MIME type</refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>

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

<synopsis>



            <link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link>;
<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link>* <link linkend="gnome-vfs-mime-get-default-application">gnome_vfs_mime_get_default_application</link>
                                            (const <link linkend="char">char</link> *mime_type);
<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link>* <link linkend="gnome-vfs-mime-get-default-application-for-uri">gnome_vfs_mime_get_default_application_for_uri</link>
                                            (const <link linkend="char">char</link> *uri,
                                             const <link linkend="char">char</link> *mime_type);
<link linkend="GList">GList</link>*      <link linkend="gnome-vfs-mime-get-all-applications">gnome_vfs_mime_get_all_applications</link>
                                            (const <link linkend="char">char</link> *mime_type);
<link linkend="Bonobo-ServerInfo">Bonobo_ServerInfo</link>* <link linkend="gnome-vfs-mime-get-default-component">gnome_vfs_mime_get_default_component</link>
                                            (const <link linkend="char">char</link> *mime_type);
<link linkend="GList">GList</link>*      <link linkend="gnome-vfs-mime-get-all-components">gnome_vfs_mime_get_all_components</link>
                                            (const <link linkend="char">char</link> *mime_type);
const <link linkend="char">char</link>* <link linkend="gnome-vfs-mime-get-icon">gnome_vfs_mime_get_icon</link>         (const <link linkend="char">char</link> *mime_type);
const <link linkend="char">char</link>* <link linkend="gnome-vfs-mime-get-description">gnome_vfs_mime_get_description</link>  (const <link linkend="char">char</link> *mime_type);
<link linkend="gboolean">gboolean</link>    <link linkend="gnome-vfs-mime-can-be-executable">gnome_vfs_mime_can_be_executable</link>
                                            (const <link linkend="char">char</link> *mime_type);
<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link>* <link linkend="gnome-vfs-mime-application-new-from-desktop-id">gnome_vfs_mime_application_new_from_desktop_id</link>
                                            (const <link linkend="char">char</link> *id);
<link linkend="GnomeVFSResult">GnomeVFSResult</link> <link linkend="gnome-vfs-mime-application-launch">gnome_vfs_mime_application_launch</link>
                                            (<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link> *app,
                                             <link linkend="GList">GList</link> *uris);
<link linkend="GnomeVFSResult">GnomeVFSResult</link> <link linkend="gnome-vfs-mime-application-launch-with-env">gnome_vfs_mime_application_launch_with_env</link>
                                            (<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link> *app,
                                             <link linkend="GList">GList</link> *uris,
                                             <link linkend="char">char</link> **envp);
const <link linkend="char">char</link>* <link linkend="gnome-vfs-mime-application-get-desktop-id">gnome_vfs_mime_application_get_desktop_id</link>
                                            (<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link> *app);
const <link linkend="char">char</link>* <link linkend="gnome-vfs-mime-application-get-desktop-file-path">gnome_vfs_mime_application_get_desktop_file_path</link>
                                            (<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link> *app);
const <link linkend="char">char</link>* <link linkend="gnome-vfs-mime-application-get-name">gnome_vfs_mime_application_get_name</link>
                                            (<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link> *app);
const <link linkend="char">char</link>* <link linkend="gnome-vfs-mime-application-get-generic-name">gnome_vfs_mime_application_get_generic_name</link>
                                            (<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link> *app);
const <link linkend="char">char</link>* <link linkend="gnome-vfs-mime-application-get-icon">gnome_vfs_mime_application_get_icon</link>
                                            (<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link> *app);
const <link linkend="char">char</link>* <link linkend="gnome-vfs-mime-application-get-exec">gnome_vfs_mime_application_get_exec</link>
                                            (<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link> *app);
<link linkend="gboolean">gboolean</link>    <link linkend="gnome-vfs-mime-application-requires-terminal">gnome_vfs_mime_application_requires_terminal</link>
                                            (<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link> *app);
const <link linkend="char">char</link>* <link linkend="gnome-vfs-mime-application-get-startup-wm-class">gnome_vfs_mime_application_get_startup_wm_class</link>
                                            (<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link> *app);
<link linkend="gboolean">gboolean</link>    <link linkend="gnome-vfs-mime-application-supports-startup-notification">gnome_vfs_mime_application_supports_startup_notification</link>
                                            (<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link> *app);
const <link linkend="char">char</link>* <link linkend="gnome-vfs-mime-application-get-binary-name">gnome_vfs_mime_application_get_binary_name</link>
                                            (<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link> *app);
<link linkend="gboolean">gboolean</link>    <link linkend="gnome-vfs-mime-application-supports-uris">gnome_vfs_mime_application_supports_uris</link>
                                            (<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link> *app);
<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link>* <link linkend="gnome-vfs-mime-application-copy">gnome_vfs_mime_application_copy</link>
                                            (<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link> *app);
<link linkend="void">void</link>        <link linkend="gnome-vfs-mime-application-free">gnome_vfs_mime_application_free</link> (<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link> *app);
<link linkend="void">void</link>        <link linkend="gnome-vfs-mime-application-list-free">gnome_vfs_mime_application_list_free</link>
                                            (<link linkend="GList">GList</link> *list);
<link linkend="void">void</link>        <link linkend="gnome-vfs-mime-component-list-free">gnome_vfs_mime_component_list_free</link>
                                            (<link linkend="GList">GList</link> *list);
#define     <link linkend="GNOME-VFS-MIME-TYPE-UNKNOWN:CAPS">GNOME_VFS_MIME_TYPE_UNKNOWN</link>
const <link linkend="char">char</link>* <link linkend="gnome-vfs-get-mime-type-for-data">gnome_vfs_get_mime_type_for_data</link>
                                            (<link linkend="gconstpointer">gconstpointer</link> data,
                                             <link linkend="int">int</link> data_size);
<link linkend="char">char</link>*       <link linkend="gnome-vfs-get-mime-type">gnome_vfs_get_mime_type</link>         (const <link linkend="char">char</link> *text_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="GnomeVFSMimeApplication" role="struct"/>GnomeVFSMimeApplication</title>
<indexterm><primary>GnomeVFSMimeApplication</primary></indexterm><programlisting>typedef struct {
	char *id; /* PRIVATE */
	char *name;
#ifndef GNOME_VFS_DISABLE_DEPRECATED
	char *command;
	gboolean can_open_multiple_files;
	GnomeVFSMimeApplicationArgumentType expects_uris;
	GList *supported_uri_schemes;
#else
	char *_command;
	gboolean _can_open_multiple_files;
	GnomeVFSMimeApplicationArgumentType _expects_uris;
	GList *_supported_uri_schemes;
#endif
	gboolean requires_terminal;

	/* Padded to avoid future breaks in ABI compatibility */
	void *reserved1;

	GnomeVFSMimeApplicationPrivate *priv;
} GnomeVFSMimeApplication;
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-mime-get-default-application" role="function"/>gnome_vfs_mime_get_default_application ()</title>
<indexterm><primary>gnome_vfs_mime_get_default_application</primary></indexterm><programlisting><link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link>* gnome_vfs_mime_get_default_application
                                            (const <link linkend="char">char</link> *mime_type);</programlisting>
<para>
Query the MIME database for the application to be executed on files of MIME type
<parameter>mime_type</parameter> by default.
</para>
<para>
If you know the actual uri of the file you should use gnome_vfs_mime_get_default_application_for_uri
instead, as it will then be able to pick a better app. For instance it won't pick
an app that claims to only handle local files for a remote uri.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mime_type</parameter>&nbsp;:</term>
<listitem><simpara> a const char * containing a mime type, e.g. "image/png".
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="GnomeVFSMimeApplication"><type>GnomeVFSMimeApplication</type></link> representing the default handler of <parameter>mime_type</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-mime-get-default-application-for-uri" role="function"/>gnome_vfs_mime_get_default_application_for_uri ()</title>
<indexterm><primary>gnome_vfs_mime_get_default_application_for_uri</primary></indexterm><programlisting><link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link>* gnome_vfs_mime_get_default_application_for_uri
                                            (const <link linkend="char">char</link> *uri,
                                             const <link linkend="char">char</link> *mime_type);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mime_type</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-mime-get-all-applications" role="function"/>gnome_vfs_mime_get_all_applications ()</title>
<indexterm><primary>gnome_vfs_mime_get_all_applications</primary></indexterm><programlisting><link linkend="GList">GList</link>*      gnome_vfs_mime_get_all_applications
                                            (const <link linkend="char">char</link> *mime_type);</programlisting>
<para>
Return an alphabetically sorted list of <link linkend="GnomeVFSMimeApplication"><type>GnomeVFSMimeApplication</type></link>
data structures representing all applications in the MIME database registered
to handle files of MIME type <parameter>mime_type</parameter> (and supertypes).</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mime_type</parameter>&nbsp;:</term>
<listitem><simpara> a const char * containing a mime type, e.g. "image/png".
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="GList"><type>GList</type></link> * where the elements are <link linkend="GnomeVFSMimeApplication"><type>GnomeVFSMimeApplication</type></link> *
representing applications that handle MIME type <parameter>mime_type</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-mime-get-default-component" role="function"/>gnome_vfs_mime_get_default_component ()</title>
<indexterm><primary>gnome_vfs_mime_get_default_component</primary></indexterm><programlisting><link linkend="Bonobo-ServerInfo">Bonobo_ServerInfo</link>* gnome_vfs_mime_get_default_component
                                            (const <link linkend="char">char</link> *mime_type);</programlisting>
<para>
Query the MIME database for the default Bonobo component to be activated to 
view files of MIME type <parameter>mime_type</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mime_type</parameter>&nbsp;:</term>
<listitem><simpara> a const char * containing a mime type, e.g. "image/png".
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="Bonobo-ServerInfo"><type>Bonobo_ServerInfo</type></link> * representing the OAF server to be activated
to get a reference to the proper component.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-mime-get-all-components" role="function"/>gnome_vfs_mime_get_all_components ()</title>
<indexterm><primary>gnome_vfs_mime_get_all_components</primary></indexterm><programlisting><link linkend="GList">GList</link>*      gnome_vfs_mime_get_all_components
                                            (const <link linkend="char">char</link> *mime_type);</programlisting>
<para>
Return an alphabetically sorted list of <link linkend="Bonobo-ServerInfo"><type>Bonobo_ServerInfo</type></link>
data structures representing all Bonobo components registered
to handle files of <parameter>mime_type</parameter> (and supertypes).</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mime_type</parameter>&nbsp;:</term>
<listitem><simpara> a const char * containing a mime type, e.g. "image/png".
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="GList"><type>GList</type></link> * where the elements are <link linkend="Bonobo-ServerInfo"><type>Bonobo_ServerInfo</type></link> *
representing components that can handle <parameter>mime_type</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-mime-get-icon" role="function" condition="deprecated:Use gnome_icon_lookup() function in libgnomeui instead."/>gnome_vfs_mime_get_icon ()</title>
<indexterm role="deprecated"><primary>gnome_vfs_mime_get_icon</primary></indexterm><programlisting>const <link linkend="char">char</link>* gnome_vfs_mime_get_icon         (const <link linkend="char">char</link> *mime_type);</programlisting>
<warning><para><literal>gnome_vfs_mime_get_icon</literal> is deprecated and should not be used in newly-written code. Use <link linkend="gnome-icon-lookup"><function>gnome_icon_lookup()</function></link> function in libgnomeui instead.</para></warning>
<para>
Query the MIME database for an icon representing the <parameter>mime_type</parameter>.
</para>
<para>
It usually returns a filename without path information, e.g. "i-chardev.png", and sometimes
does not have an extension, e.g. "i-regular" if the icon is supposed to be image
type agnostic between icon themes. Icons are generic and not theme specific. These
will not necessarily match with the icons a user sees in Nautilus, you have been warned.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mime_type</parameter>&nbsp;:</term>
<listitem><simpara> a const char * containing a  MIME type.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The filename of the icon as listed in the MIME database.

</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-mime-get-description" role="function"/>gnome_vfs_mime_get_description ()</title>
<indexterm><primary>gnome_vfs_mime_get_description</primary></indexterm><programlisting>const <link linkend="char">char</link>* gnome_vfs_mime_get_description  (const <link linkend="char">char</link> *mime_type);</programlisting>
<para>
Query the MIME database for a description of the <parameter>mime_type</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mime_type</parameter>&nbsp;:</term>
<listitem><simpara> the mime type.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> description of MIME type <parameter>mime_type</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-mime-can-be-executable" role="function"/>gnome_vfs_mime_can_be_executable ()</title>
<indexterm><primary>gnome_vfs_mime_can_be_executable</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gnome_vfs_mime_can_be_executable
                                            (const <link linkend="char">char</link> *mime_type);</programlisting>
<para>
Check whether files of <parameter>mime_type</parameter> might conceivably be executable.
Default for known types if <literal>FALSE</literal>. Default for unknown types is <literal>TRUE</literal>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mime_type</parameter>&nbsp;:</term>
<listitem><simpara> a const char * containing a mime type.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <literal>TRUE</literal> if files of <parameter>mime_type</parameter>
can be executable, <literal>FALSE</literal> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-mime-application-new-from-desktop-id" role="function" condition="since:2.10"/>gnome_vfs_mime_application_new_from_desktop_id ()</title>
<indexterm role="2.10"><primary>gnome_vfs_mime_application_new_from_desktop_id</primary></indexterm><programlisting><link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link>* gnome_vfs_mime_application_new_from_desktop_id
                                            (const <link linkend="char">char</link> *id);</programlisting>
<para>
Returns a new <link linkend="GnomeVFSMimeApplication"><type>GnomeVFSMimeApplication</type></link> for the <parameter>id</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>id</parameter>&nbsp;:</term>
<listitem><simpara> the identifier of a desktop entry.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="GnomeVFSMimeApplication"><type>GnomeVFSMimeApplication</type></link>.

</simpara></listitem></varlistentry>
</variablelist><para>Since  2.10
</para></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-mime-application-launch" role="function" condition="since:2.4"/>gnome_vfs_mime_application_launch ()</title>
<indexterm role="2.4"><primary>gnome_vfs_mime_application_launch</primary></indexterm><programlisting><link linkend="GnomeVFSResult">GnomeVFSResult</link> gnome_vfs_mime_application_launch
                                            (<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link> *app,
                                             <link linkend="GList">GList</link> *uris);</programlisting>
<para>
Launches the given mime application with the given parameters.
Command line parameters will be expanded as required by the
application. The application will also be launched in a terminal
if that is required. If the application only supports one argument 
per instance then multiple instances of the application will be 
launched.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>app</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="GnomeVFSMimeApplication"><type>GnomeVFSMimeApplication</type></link> to launch.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>uris</parameter>&nbsp;:</term>
<listitem><simpara> parameters for the <link linkend="GnomeVFSMimeApplication"><type>GnomeVFSMimeApplication</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> 
<literal>GNOME_VFS_OK</literal> if the application was launched.
<literal>GNOME_VFS_ERROR_NOT_SUPPORTED</literal> if the uri protocol is not
supported by the application.
<literal>GNOME_VFS_ERROR_PARSE</literal> if the application command can not
be parsed.
<literal>GNOME_VFS_ERROR_LAUNCH</literal> if the application command can not
be launched.
<literal>GNOME_VFS_ERROR_INTERNAL</literal> for other internal and GConf errors.

</simpara></listitem></varlistentry>
</variablelist><para>Since  2.4
</para></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-mime-application-launch-with-env" role="function" condition="since:2.4"/>gnome_vfs_mime_application_launch_with_env ()</title>
<indexterm role="2.4"><primary>gnome_vfs_mime_application_launch_with_env</primary></indexterm><programlisting><link linkend="GnomeVFSResult">GnomeVFSResult</link> gnome_vfs_mime_application_launch_with_env
                                            (<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link> *app,
                                             <link linkend="GList">GList</link> *uris,
                                             <link linkend="char">char</link> **envp);</programlisting>
<para>
Same as <link linkend="gnome-vfs-mime-application-launch"><function>gnome_vfs_mime_application_launch()</function></link> except that
the application will be launched with the given environment.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>app</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>uris</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>envp</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> same as <link linkend="gnome-vfs-mime-application-launch"><function>gnome_vfs_mime_application_launch()</function></link>.

</simpara></listitem></varlistentry>
</variablelist><para>Since  2.4
</para></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-mime-application-get-desktop-id" role="function"/>gnome_vfs_mime_application_get_desktop_id ()</title>
<indexterm><primary>gnome_vfs_mime_application_get_desktop_id</primary></indexterm><programlisting>const <link linkend="char">char</link>* gnome_vfs_mime_application_get_desktop_id
                                            (<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link> *app);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>app</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-mime-application-get-desktop-file-path" role="function" condition="since:2.10"/>gnome_vfs_mime_application_get_desktop_file_path ()</title>
<indexterm role="2.10"><primary>gnome_vfs_mime_application_get_desktop_file_path</primary></indexterm><programlisting>const <link linkend="char">char</link>* gnome_vfs_mime_application_get_desktop_file_path
                                            (<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link> *app);</programlisting>
<para>
Returns the path of the desktop entry, a configuration
file describing the properties of a particular program like
it's name, how it is to be launched, how it appears in menus.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>app</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSMimeApplication"><type>GnomeVFSMimeApplication</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the path of the .desktop file.

</simpara></listitem></varlistentry>
</variablelist><para>Since  2.10
</para></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-mime-application-get-name" role="function" condition="since:2.10"/>gnome_vfs_mime_application_get_name ()</title>
<indexterm role="2.10"><primary>gnome_vfs_mime_application_get_name</primary></indexterm><programlisting>const <link linkend="char">char</link>* gnome_vfs_mime_application_get_name
                                            (<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link> *app);</programlisting>
<para>
Returns the name of the application <parameter>app</parameter></para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>app</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSMimeApplication"><type>GnomeVFSMimeApplication</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the name of the application.

</simpara></listitem></varlistentry>
</variablelist><para>Since  2.10
</para></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-mime-application-get-generic-name" role="function" condition="since:2.10"/>gnome_vfs_mime_application_get_generic_name ()</title>
<indexterm role="2.10"><primary>gnome_vfs_mime_application_get_generic_name</primary></indexterm><programlisting>const <link linkend="char">char</link>* gnome_vfs_mime_application_get_generic_name
                                            (<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link> *app);</programlisting>
<para>
Returns the generic name of the application.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>app</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSMimeApplication"><type>GnomeVFSMimeApplication</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the generic name of the application.

</simpara></listitem></varlistentry>
</variablelist><para>Since  2.10
</para></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-mime-application-get-icon" role="function" condition="since:2.10"/>gnome_vfs_mime_application_get_icon ()</title>
<indexterm role="2.10"><primary>gnome_vfs_mime_application_get_icon</primary></indexterm><programlisting>const <link linkend="char">char</link>* gnome_vfs_mime_application_get_icon
                                            (<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link> *app);</programlisting>
<para>
Returns an icon representing the specified application.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>app</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSMimeApplication"><type>GnomeVFSMimeApplication</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the filename of the icon usually without path information,
e.g. "gedit-icon.png", and sometimes does not have an extension,
e.g. "gnome-pdf" if the icon is supposed to be image type agnostic between
icon themes. Icons are generic, and not theme specific.

</simpara></listitem></varlistentry>
</variablelist><para>Since  2.10
</para></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-mime-application-get-exec" role="function" condition="since:2.10"/>gnome_vfs_mime_application_get_exec ()</title>
<indexterm role="2.10"><primary>gnome_vfs_mime_application_get_exec</primary></indexterm><programlisting>const <link linkend="char">char</link>* gnome_vfs_mime_application_get_exec
                                            (<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link> *app);</programlisting>
<para>
Returns the program to execute, possibly with arguments
and parameter variables, as specified by the
&lt;ulink url="http://www.freedesktop.org/standards/desktop-entry-spec"&gt;
Desktop Entry Specification&lt;/ulink&gt;.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>app</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSMimeApplication"><type>GnomeVFSMimeApplication</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the command line to execute.

</simpara></listitem></varlistentry>
</variablelist><para>Since  2.10
</para></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-mime-application-requires-terminal" role="function" condition="since:2.10"/>gnome_vfs_mime_application_requires_terminal ()</title>
<indexterm role="2.10"><primary>gnome_vfs_mime_application_requires_terminal</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gnome_vfs_mime_application_requires_terminal
                                            (<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link> *app);</programlisting>
<para>
Returns whether the application runs in a terminal window.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>app</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSMimeApplication"><type>GnomeVFSMimeApplication</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <literal>TRUE</literal> if the application runs in a terminal.

</simpara></listitem></varlistentry>
</variablelist><para>Since  2.10
</para></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-mime-application-get-startup-wm-class" role="function" condition="since:2.10"/>gnome_vfs_mime_application_get_startup_wm_class ()</title>
<indexterm role="2.10"><primary>gnome_vfs_mime_application_get_startup_wm_class</primary></indexterm><programlisting>const <link linkend="char">char</link>* gnome_vfs_mime_application_get_startup_wm_class
                                            (<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link> *app);</programlisting>
<para>
Returns the WM class of the main window of the application.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>app</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSMimeApplication"><type>GnomeVFSMimeApplication</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The WM class of the application's window

</simpara></listitem></varlistentry>
</variablelist><para>Since  2.10
</para></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-mime-application-supports-startup-notification" role="function" condition="since:2.10"/>gnome_vfs_mime_application_supports_startup_notification ()</title>
<indexterm role="2.10"><primary>gnome_vfs_mime_application_supports_startup_notification</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gnome_vfs_mime_application_supports_startup_notification
                                            (<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link> *app);</programlisting>
<para>
Returns whether the application supports startup notification.
If true, it is KNOWN that the application will send a
"remove" message when started with the DESKTOP_LAUNCH_ID
environment variable set.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>app</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSMimeApplication"><type>GnomeVFSMimeApplication</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <literal>TRUE</literal> if the application supports startup notification.

</simpara></listitem></varlistentry>
</variablelist><para>Since  2.10
</para></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-mime-application-get-binary-name" role="function" condition="since:2.10"/>gnome_vfs_mime_application_get_binary_name ()</title>
<indexterm role="2.10"><primary>gnome_vfs_mime_application_get_binary_name</primary></indexterm><programlisting>const <link linkend="char">char</link>* gnome_vfs_mime_application_get_binary_name
                                            (<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link> *app);</programlisting>
<para>
Returns the binary name of the specified application.
Useful to implement startup notification.
Note that this only provides partial information about
application execution, it misses arguments and macros.
DO NOT USE it to launch the application.
Use gnome_vfs_mime_application_launch or
<link linkend="gnome-vfs-mime-application-get-exec"><function>gnome_vfs_mime_application_get_exec()</function></link> if you really
need to write a custom launcher.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>app</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSMimeApplication"><type>GnomeVFSMimeApplication</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the application's binary name.

</simpara></listitem></varlistentry>
</variablelist><para>Since  2.10
</para></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-mime-application-supports-uris" role="function" condition="since:2.10"/>gnome_vfs_mime_application_supports_uris ()</title>
<indexterm role="2.10"><primary>gnome_vfs_mime_application_supports_uris</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gnome_vfs_mime_application_supports_uris
                                            (<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link> *app);</programlisting>
<para>
Returns whether the application accept uris as command
lines arguments.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>app</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSMimeApplication"><type>GnomeVFSMimeApplication</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <literal>TRUE</literal> if the application can handle uris.

</simpara></listitem></varlistentry>
</variablelist><para>Since  2.10
</para></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-mime-application-copy" role="function"/>gnome_vfs_mime_application_copy ()</title>
<indexterm><primary>gnome_vfs_mime_application_copy</primary></indexterm><programlisting><link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link>* gnome_vfs_mime_application_copy
                                            (<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link> *app);</programlisting>
<para>
Creates a newly referenced copy of a <link linkend="GnomeVFSMimeApplication"><type>GnomeVFSMimeApplication</type></link> object.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>app</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a copy of <parameter>application</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-mime-application-free" role="function"/>gnome_vfs_mime_application_free ()</title>
<indexterm><primary>gnome_vfs_mime_application_free</primary></indexterm><programlisting><link linkend="void">void</link>        gnome_vfs_mime_application_free (<link linkend="GnomeVFSMimeApplication">GnomeVFSMimeApplication</link> *app);</programlisting>
<para>
Frees a <link linkend="GnomeVFSMimeApplication"><type>GnomeVFSMimeApplication</type></link> *.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>app</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-mime-application-list-free" role="function"/>gnome_vfs_mime_application_list_free ()</title>
<indexterm><primary>gnome_vfs_mime_application_list_free</primary></indexterm><programlisting><link linkend="void">void</link>        gnome_vfs_mime_application_list_free
                                            (<link linkend="GList">GList</link> *list);</programlisting>
<para>
Frees lists of <link linkend="GnomeVFSApplications"><type>GnomeVFSApplications</type></link>, as returned from functions such
as <link linkend="gnome-vfs-get-all-applications"><function>gnome_vfs_get_all_applications()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>list</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GList"><type>GList</type></link> of <link linkend="GnomeVFSApplication"><type>GnomeVFSApplication</type></link> * to be freed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-mime-component-list-free" role="function"/>gnome_vfs_mime_component_list_free ()</title>
<indexterm><primary>gnome_vfs_mime_component_list_free</primary></indexterm><programlisting><link linkend="void">void</link>        gnome_vfs_mime_component_list_free
                                            (<link linkend="GList">GList</link> *list);</programlisting>
<para>
Frees lists of <link linkend="Bonobo-ServerInfo"><type>Bonobo_ServerInfo</type></link> * (as returned from functions such
as <parameter>gnome_vfs_get_all_components</parameter>).</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>list</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GList"><type>GList</type></link> of <link linkend="Bonobo-ServerInfo"><type>Bonobo_ServerInfo</type></link> * to be freed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="GNOME-VFS-MIME-TYPE-UNKNOWN:CAPS" role="macro"/>GNOME_VFS_MIME_TYPE_UNKNOWN</title>
<indexterm><primary>GNOME_VFS_MIME_TYPE_UNKNOWN</primary></indexterm><programlisting>#define GNOME_VFS_MIME_TYPE_UNKNOWN "application/octet-stream"
</programlisting>
<para>
The value returned for the MIME type when a file did
not match any entries in the MIME database. May be
treated as a file of an unknown type.</para>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-get-mime-type-for-data" role="function"/>gnome_vfs_get_mime_type_for_data ()</title>
<indexterm><primary>gnome_vfs_get_mime_type_for_data</primary></indexterm><programlisting>const <link linkend="char">char</link>* gnome_vfs_get_mime_type_for_data
                                            (<link linkend="gconstpointer">gconstpointer</link> data,
                                             <link linkend="int">int</link> data_size);</programlisting>
<para>
Tries to guess the mime type of the data in <parameter>data</parameter>
using the magic patterns.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara> a pointer to data in memory.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data_size</parameter>&nbsp;:</term>
<listitem><simpara> size of the data.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the mime-type for <parameter>data</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-get-mime-type" role="function"/>gnome_vfs_get_mime_type ()</title>
<indexterm><primary>gnome_vfs_get_mime_type</primary></indexterm><programlisting><link linkend="char">char</link>*       gnome_vfs_get_mime_type         (const <link linkend="char">char</link> *text_uri);</programlisting>
<para>
Determine the mime type of <parameter>text_uri</parameter>. The mime type is determined
in the same way as by <link linkend="gnome-vfs-get-file-info"><function>gnome_vfs_get_file_info()</function></link>. This is meant as
a convenient function for times when you only want the mime type.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>text_uri</parameter>&nbsp;:</term>
<listitem><simpara> path of the file for which to get the mime type.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The mime type, or <literal>NULL</literal> if there is an error reading
the file.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
