<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="GMount">
<refmeta>
<refentrytitle role="top_of_page">GMount</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GIO Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GMount</refname>
<refpurpose>Mount management</refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>

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

<synopsis>

#include &lt;gio/gio.h
@see also: GVolume&gt;
#include &lt;GUnixMount&gt;


                    <link linkend="GMount-struct">GMount</link>;
                    <link linkend="GMountIface">GMountIface</link>;
<link linkend="char">char</link>*               <link linkend="g-mount-get-name">g_mount_get_name</link>                    (<link linkend="GMount">GMount</link> *mount);
<link linkend="char">char</link>*               <link linkend="g-mount-get-uuid">g_mount_get_uuid</link>                    (<link linkend="GMount">GMount</link> *mount);
<link linkend="GIcon">GIcon</link>*              <link linkend="g-mount-get-icon">g_mount_get_icon</link>                    (<link linkend="GMount">GMount</link> *mount);
<link linkend="GDrive">GDrive</link>*             <link linkend="g-mount-get-drive">g_mount_get_drive</link>                   (<link linkend="GMount">GMount</link> *mount);
<link linkend="GFile">GFile</link>*              <link linkend="g-mount-get-root">g_mount_get_root</link>                    (<link linkend="GMount">GMount</link> *mount);
<link linkend="GVolume">GVolume</link>*            <link linkend="g-mount-get-volume">g_mount_get_volume</link>                  (<link linkend="GMount">GMount</link> *mount);
<link linkend="gboolean">gboolean</link>            <link linkend="g-mount-can-unmount">g_mount_can_unmount</link>                 (<link linkend="GMount">GMount</link> *mount);
enum                <link linkend="GMountMountFlags">GMountMountFlags</link>;
enum                <link linkend="GMountUnmountFlags">GMountUnmountFlags</link>;
<link linkend="void">void</link>                <link linkend="g-mount-unmount">g_mount_unmount</link>                     (<link linkend="GMount">GMount</link> *mount,
                                                         <link linkend="GMountUnmountFlags">GMountUnmountFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="gboolean">gboolean</link>            <link linkend="g-mount-unmount-finish">g_mount_unmount_finish</link>              (<link linkend="GMount">GMount</link> *mount,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="void">void</link>                <link linkend="g-mount-remount">g_mount_remount</link>                     (<link linkend="GMount">GMount</link> *mount,
                                                         <link linkend="GMountMountFlags">GMountMountFlags</link> flags,
                                                         <link linkend="GMountOperation">GMountOperation</link> *mount_operation,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="gboolean">gboolean</link>            <link linkend="g-mount-remount-finish">g_mount_remount_finish</link>              (<link linkend="GMount">GMount</link> *mount,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="gboolean">gboolean</link>            <link linkend="g-mount-can-eject">g_mount_can_eject</link>                   (<link linkend="GMount">GMount</link> *mount);
<link linkend="void">void</link>                <link linkend="g-mount-eject">g_mount_eject</link>                       (<link linkend="GMount">GMount</link> *mount,
                                                         <link linkend="GMountUnmountFlags">GMountUnmountFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="gboolean">gboolean</link>            <link linkend="g-mount-eject-finish">g_mount_eject_finish</link>                (<link linkend="GMount">GMount</link> *mount,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
                                                         <link linkend="GError">GError</link> **error);


</synopsis>
</refsynopsisdiv>

<refsect1 role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>

  <link linkend="GInterface">GInterface</link>
   +----GMount
</synopsis>

</refsect1>

<refsect1 role="prerequisites">
<title role="prerequisites.title">Prerequisites</title>
<para>
GMount requires
 <link linkend="GObject">GObject</link>.</para>

</refsect1>







<refsect1 role="desc">
<title role="desc.title">Description</title>
<para>
The <link linkend="GMount"><type>GMount</type></link> interface represents user-visible mounts. Note, when 
porting from GnomeVFS, <link linkend="GMount"><type>GMount</type></link> is the moral equivalent of <link linkend="GnomeVFSVolume"><type>GnomeVFSVolume</type></link>.
</para>
<para>
<link linkend="GMount"><type>GMount</type></link> is a "mounted" filesystem that you can access. Mounted is in
quotes because it's not the same as a unix mount, it might be a gvfs
mount, but you can still access the files on it if you use GIO. Might or
might not be related to a volume object.
</para>
<para>
Unmounting a <link linkend="GMount"><type>GMount</type></link> instance is an asynchronous operation. For
more information about asynchronous operations, see <link linkend="GAsyncReady"><type>GAsyncReady</type></link>
and <link linkend="GSimpleAsyncReady"><type>GSimpleAsyncReady</type></link>. To unmount a <link linkend="GMount"><type>GMount</type></link> instance, first call
<link linkend="g-mount-unmount"><function>g_mount_unmount()</function></link> with (at least) the <link linkend="GMount"><type>GMount</type></link> instance and a
<link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link>.  The callback will be fired when the
operation has resolved (either with success or failure), and a
<link linkend="GAsyncReady"><type>GAsyncReady</type></link> structure will be passed to the callback.  That
callback should then call <link linkend="g-mount-unmount-finish"><function>g_mount_unmount_finish()</function></link> with the <link linkend="GMount"><type>GMount</type></link>
and the <link linkend="GAsyncReady"><type>GAsyncReady</type></link> data to see if the operation was completed
successfully.  If an <parameter>error</parameter> is present when <link linkend="g-mount-unmount-finish"><function>g_mount_unmount_finish()</function></link> 
is called, then it will be filled with any error information.</para>
<para>

</para>
</refsect1>

<refsect1 role="details">
<title role="details.title">Details</title>
<refsect2>
<title><anchor id="GMount-struct" role="struct"/>GMount</title>
<indexterm><primary>GMount</primary></indexterm><programlisting>typedef struct _GMount GMount;</programlisting>
<para>
A handle to an object implementing the <link linkend="GMountIface"><type>GMountIface</type></link> interface.</para>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="GMountIface" role="struct"/>GMountIface</title>
<indexterm><primary>GMountIface</primary></indexterm><programlisting>typedef struct {
  GTypeInterface g_iface;

  /* signals */

  void (*changed) (GMount *mount);
  void (*unmounted) (GMount *mount);
  
  /* Virtual Table */

  GFile *            (*get_root)             (GMount         *mount);
  char *             (*get_name)             (GMount         *mount);
  GIcon *            (*get_icon)             (GMount         *mount);
  char *             (*get_uuid)             (GMount         *mount);
  GVolume *          (*get_volume)           (GMount         *mount);
  GDrive *           (*get_drive)            (GMount         *mount);
  gboolean           (*can_unmount)          (GMount         *mount);
  gboolean           (*can_eject)            (GMount         *mount);
  void               (*unmount)              (GMount         *mount,
					      GMountUnmountFlags flags,
                                              GCancellable    *cancellable,
                                              GAsyncReadyCallback callback,
                                              gpointer         user_data);
  gboolean           (*unmount_finish)       (GMount         *mount,
                                              GAsyncResult    *result,
                                              GError         **error);
  void               (*eject)                (GMount         *mount,
					      GMountUnmountFlags flags,
                                              GCancellable    *cancellable,
                                              GAsyncReadyCallback callback,
                                              gpointer         user_data);
  gboolean           (*eject_finish)         (GMount         *mount,
                                              GAsyncResult    *result,
                                              GError         **error);
  void               (*remount)              (GMount         *mount,
					      GMountMountFlags     flags,
					      GMountOperation     *mount_operation,
                                              GCancellable    *cancellable,
                                              GAsyncReadyCallback callback,
                                              gpointer         user_data);
  gboolean           (*remount_finish)       (GMount         *mount,
                                              GAsyncResult    *result,
                                              GError         **error);
} GMountIface;
</programlisting>
<para>
Interface for implementing operations for mounts.</para>
<para>

</para><variablelist role="struct">
<varlistentry>
<term><link linkend="GTypeInterface">GTypeInterface</link>&nbsp;<structfield>g_iface</structfield>;</term>
<listitem><simpara> The parent interface.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>changed</structfield>&nbsp;()</term>
<listitem><simpara> Changed signal that is emitted when the mount's state has changed.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>unmounted</structfield>&nbsp;()</term>
<listitem><simpara> The unmounted signal that is emitted when the <link linkend="GMount"><type>GMount</type></link> have been unmounted. If the recipient is holding references to the object they should release them so the object can be finalized.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>get_root</structfield>&nbsp;()</term>
<listitem><simpara> Gets a <link linkend="GFile"><type>GFile</type></link> to the root directory of the <link linkend="GMount"><type>GMount</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>get_name</structfield>&nbsp;()</term>
<listitem><simpara> Gets a string containing the name of the <link linkend="GMount"><type>GMount</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>get_icon</structfield>&nbsp;()</term>
<listitem><simpara> Gets a <link linkend="GIcon"><type>GIcon</type></link> for the <link linkend="GMount"><type>GMount</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>get_uuid</structfield>&nbsp;()</term>
<listitem><simpara> Gets the UUID for the <link linkend="GMount"><type>GMount</type></link>. The reference is typically based on the file system UUID for the mount in question and should be considered an opaque string. Returns <link linkend="NULL:CAPS"><literal>NULL</literal></link> if there is no UUID available.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>get_volume</structfield>&nbsp;()</term>
<listitem><simpara> Gets a <link linkend="GVolume"><type>GVolume</type></link> the mount is located on. Returns <link linkend="NULL:CAPS"><literal>NULL</literal></link> if the <link linkend="GMount"><type>GMount</type></link> is not associated with a <link linkend="GVolume"><type>GVolume</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>get_drive</structfield>&nbsp;()</term>
<listitem><simpara> Gets a <link linkend="GDrive"><type>GDrive</type></link> the volume of the mount is located on. Returns <link linkend="NULL:CAPS"><literal>NULL</literal></link> if the <link linkend="GMount"><type>GMount</type></link> is not associated with a <link linkend="GDrive"><type>GDrive</type></link> or a <link linkend="GVolume"><type>GVolume</type></link>. This is convenience method for getting the <link linkend="GVolume"><type>GVolume</type></link> and using that to get the <link linkend="GDrive"><type>GDrive</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>can_unmount</structfield>&nbsp;()</term>
<listitem><simpara> Checks if a <link linkend="GMount"><type>GMount</type></link> can be unmounted.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>can_eject</structfield>&nbsp;()</term>
<listitem><simpara> Checks if a <link linkend="GMount"><type>GMount</type></link> can be ejected.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>unmount</structfield>&nbsp;()</term>
<listitem><simpara> Starts unmounting a <link linkend="GMount"><type>GMount</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>unmount_finish</structfield>&nbsp;()</term>
<listitem><simpara> Finishes an unmounting operation.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>eject</structfield>&nbsp;()</term>
<listitem><simpara> Starts ejecting a <link linkend="GMount"><type>GMount</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>eject_finish</structfield>&nbsp;()</term>
<listitem><simpara> Finishes an eject operation.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>remount</structfield>&nbsp;()</term>
<listitem><simpara> Starts remounting a <link linkend="GMount"><type>GMount</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>remount_finish</structfield>&nbsp;()</term>
<listitem><simpara> Finishes a remounting operation.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="g-mount-get-name" role="function"/>g_mount_get_name ()</title>
<indexterm><primary>g_mount_get_name</primary></indexterm><programlisting><link linkend="char">char</link>*               g_mount_get_name                    (<link linkend="GMount">GMount</link> *mount);</programlisting>
<para>
Gets the name of <parameter>mount</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mount</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GMount"><type>GMount</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the name for the given <parameter>mount</parameter>. The returned string should 
be freed when no longer needed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="g-mount-get-uuid" role="function"/>g_mount_get_uuid ()</title>
<indexterm><primary>g_mount_get_uuid</primary></indexterm><programlisting><link linkend="char">char</link>*               g_mount_get_uuid                    (<link linkend="GMount">GMount</link> *mount);</programlisting>
<para>
Gets the UUID for the <parameter>mount</parameter>. The reference is typically based on
the file system UUID for the mount in question and should be
considered an opaque string. Returns <link linkend="NULL:CAPS"><literal>NULL</literal></link> if there is no UUID
available.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mount</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GMount"><type>GMount</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the UUID for <parameter>mount</parameter> or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if no UUID can be computed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="g-mount-get-icon" role="function"/>g_mount_get_icon ()</title>
<indexterm><primary>g_mount_get_icon</primary></indexterm><programlisting><link linkend="GIcon">GIcon</link>*              g_mount_get_icon                    (<link linkend="GMount">GMount</link> *mount);</programlisting>
<para>
Gets the icon for <parameter>mount</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mount</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GMount"><type>GMount</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="GIcon"><type>GIcon</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="g-mount-get-drive" role="function"/>g_mount_get_drive ()</title>
<indexterm><primary>g_mount_get_drive</primary></indexterm><programlisting><link linkend="GDrive">GDrive</link>*             g_mount_get_drive                   (<link linkend="GMount">GMount</link> *mount);</programlisting>
<para>
Gets the drive for the <parameter>mount</parameter>.
</para>
<para>
This is a convenience method for getting the <link linkend="GVolume"><type>GVolume</type></link> and then
using that object to get the <link linkend="GDrive"><type>GDrive</type></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mount</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GMount"><type>GMount</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="GDrive"><type>GDrive</type></link> or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if <parameter>mount</parameter> is not associated with a volume or a drive.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="g-mount-get-root" role="function"/>g_mount_get_root ()</title>
<indexterm><primary>g_mount_get_root</primary></indexterm><programlisting><link linkend="GFile">GFile</link>*              g_mount_get_root                    (<link linkend="GMount">GMount</link> *mount);</programlisting>
<para>
Gets the root directory on <parameter>mount</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mount</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GMount"><type>GMount</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="GFile"><type>GFile</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="g-mount-get-volume" role="function"/>g_mount_get_volume ()</title>
<indexterm><primary>g_mount_get_volume</primary></indexterm><programlisting><link linkend="GVolume">GVolume</link>*            g_mount_get_volume                  (<link linkend="GMount">GMount</link> *mount);</programlisting>
<para>
Gets the volume for the <parameter>mount</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mount</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GMount"><type>GMount</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="GVolume"><type>GVolume</type></link> or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if <parameter>mount</parameter> is not associated with a volume.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="g-mount-can-unmount" role="function"/>g_mount_can_unmount ()</title>
<indexterm><primary>g_mount_can_unmount</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_mount_can_unmount                 (<link linkend="GMount">GMount</link> *mount);</programlisting>
<para>
Checks if <parameter>mount</parameter> can be mounted.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mount</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GMount"><type>GMount</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the <parameter>mount</parameter> can be unmounted.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="GMountMountFlags" role="enum"/>enum GMountMountFlags</title>
<indexterm><primary>GMountMountFlags</primary></indexterm><programlisting>typedef enum  {
  G_MOUNT_MOUNT_NONE = 0
} GMountMountFlags;
</programlisting>
<para>
Flags used when mounting a mount.</para>
<para>

</para><variablelist role="enum">
<varlistentry>
<term><anchor id="G-MOUNT-MOUNT-NONE:CAPS" role="constant"/><literal>G_MOUNT_MOUNT_NONE</literal></term>
<listitem><simpara> No flags set.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="GMountUnmountFlags" role="enum"/>enum GMountUnmountFlags</title>
<indexterm><primary>GMountUnmountFlags</primary></indexterm><programlisting>typedef enum  {
  G_MOUNT_UNMOUNT_NONE = 0,
  G_MOUNT_UNMOUNT_FORCE = (1&lt;&lt;0)
} GMountUnmountFlags;
</programlisting>
<para>
Flags used when an unmounting a mount.</para>
<para>

</para><variablelist role="enum">
<varlistentry>
<term><anchor id="G-MOUNT-UNMOUNT-NONE:CAPS" role="constant"/><literal>G_MOUNT_UNMOUNT_NONE</literal></term>
<listitem><simpara> No flags set.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><anchor id="G-MOUNT-UNMOUNT-FORCE:CAPS" role="constant"/><literal>G_MOUNT_UNMOUNT_FORCE</literal></term>
<listitem><simpara> Unmount even if there are outstanding
 file operations on the mount.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="g-mount-unmount" role="function"/>g_mount_unmount ()</title>
<indexterm><primary>g_mount_unmount</primary></indexterm><programlisting><link linkend="void">void</link>                g_mount_unmount                     (<link linkend="GMount">GMount</link> *mount,
                                                         <link linkend="GMountUnmountFlags">GMountUnmountFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Unmounts a mount. This is an asynchronous operation, and is 
finished by calling <link linkend="g-mount-unmount-finish"><function>g_mount_unmount_finish()</function></link> with the <parameter>mount</parameter> 
and <link linkend="GAsyncResults"><type>GAsyncResults</type></link> data returned in the <parameter>callback</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mount</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GMount"><type>GMount</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&nbsp;:</term>
<listitem><simpara> flags affecting the operation
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&nbsp;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL:CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara> user data passed to <parameter>callback</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="g-mount-unmount-finish" role="function"/>g_mount_unmount_finish ()</title>
<indexterm><primary>g_mount_unmount_finish</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_mount_unmount_finish              (<link linkend="GMount">GMount</link> *mount,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Finishes unmounting a mount. If any errors occurred during the operation, 
<parameter>error</parameter> will be set to contain the errors and <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> will be returned.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mount</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GMount"><type>GMount</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>result</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link> location to store the error occuring, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> to 
ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the mount was successfully unmounted. <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="g-mount-remount" role="function"/>g_mount_remount ()</title>
<indexterm><primary>g_mount_remount</primary></indexterm><programlisting><link linkend="void">void</link>                g_mount_remount                     (<link linkend="GMount">GMount</link> *mount,
                                                         <link linkend="GMountMountFlags">GMountMountFlags</link> flags,
                                                         <link linkend="GMountOperation">GMountOperation</link> *mount_operation,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Remounts a mount. This is an asynchronous operation, and is 
finished by calling <link linkend="g-mount-remount-finish"><function>g_mount_remount_finish()</function></link> with the <parameter>mount</parameter> 
and <link linkend="GAsyncResults"><type>GAsyncResults</type></link> data returned in the <parameter>callback</parameter>.
</para>
<para>
Remounting is useful when some setting affecting the operation
of the volume has been changed, as these may need a remount to
take affect. While this is semantically equivalent with unmounting
and then remounting not all backends might need to actually be
unmounted.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mount</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GMount"><type>GMount</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&nbsp;:</term>
<listitem><simpara> flags affecting the operation
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mount_operation</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GMountOperation"><type>GMountOperation</type></link> or <link linkend="NULL:CAPS"><literal>NULL</literal></link> to avoid user interaction.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&nbsp;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL:CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara> user data passed to <parameter>callback</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="g-mount-remount-finish" role="function"/>g_mount_remount_finish ()</title>
<indexterm><primary>g_mount_remount_finish</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_mount_remount_finish              (<link linkend="GMount">GMount</link> *mount,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Finishes remounting a mount. If any errors occurred during the operation, 
<parameter>error</parameter> will be set to contain the errors and <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> will be returned.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mount</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GMount"><type>GMount</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>result</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link> location to store the error occuring, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> to 
ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the mount was successfully remounted. <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="g-mount-can-eject" role="function"/>g_mount_can_eject ()</title>
<indexterm><primary>g_mount_can_eject</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_mount_can_eject                   (<link linkend="GMount">GMount</link> *mount);</programlisting>
<para>
Checks if <parameter>mount</parameter> can be eject.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mount</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GMount"><type>GMount</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the <parameter>mount</parameter> can be ejected.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="g-mount-eject" role="function"/>g_mount_eject ()</title>
<indexterm><primary>g_mount_eject</primary></indexterm><programlisting><link linkend="void">void</link>                g_mount_eject                       (<link linkend="GMount">GMount</link> *mount,
                                                         <link linkend="GMountUnmountFlags">GMountUnmountFlags</link> flags,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Ejects a mount. This is an asynchronous operation, and is 
finished by calling <link linkend="g-mount-eject-finish"><function>g_mount_eject_finish()</function></link> with the <parameter>mount</parameter> 
and <link linkend="GAsyncResults"><type>GAsyncResults</type></link> data returned in the <parameter>callback</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mount</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GMount"><type>GMount</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&nbsp;:</term>
<listitem><simpara> flags affecting the unmount if required for eject
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&nbsp;:</term>
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL:CAPS"><literal>NULL</literal></link> to ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara> user data passed to <parameter>callback</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="g-mount-eject-finish" role="function"/>g_mount_eject_finish ()</title>
<indexterm><primary>g_mount_eject_finish</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_mount_eject_finish                (<link linkend="GMount">GMount</link> *mount,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Finishes ejecting a mount. If any errors occurred during the operation, 
<parameter>error</parameter> will be set to contain the errors and <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> will be returned.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mount</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GMount"><type>GMount</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>result</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GError"><type>GError</type></link> location to store the error occuring, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> to 
ignore.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the mount was successfully ejected. <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>





<refsect1><refsect2 /><refsect2 /></refsect1>
</refentry>
