blob: 1eba9ffd5f449a316c2c80bcb66f80391b38daa3 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GVolume</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="GIO Reference Manual">
<link rel="up" href="volume_mon.html" title="Volumes and Drives">
<link rel="prev" href="GVolumeMonitor.html" title="GVolumeMonitor">
<link rel="next" href="GMount.html" title="GMount">
<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="GVolumeMonitor.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="volume_mon.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GIO Reference Manual</th>
<td><a accesskey="n" href="GMount.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#GVolume.synopsis" class="shortcut">Top</a>
 | 
<a href="#GVolume.description" class="shortcut">Description</a>
 | 
<a href="#GVolume.object-hierarchy" class="shortcut">Object Hierarchy</a>
 | 
<a href="#GVolume.prerequisites" class="shortcut">Prerequisites</a>
 | 
<a href="#GVolume.signals" class="shortcut">Signals</a>
</td></tr>
</table>
<div class="refentry" title="GVolume">
<a name="GVolume"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GVolume.top_of_page"></a>GVolume</span></h2>
<p>GVolume — Volume management</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="GVolume.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gio/gio.h&gt;
<a class="link" href="GVolume.html#GVolume-struct" title="GVolume">GVolume</a>;
<a class="link" href="GVolume.html#GVolumeIface" title="GVolumeIface">GVolumeIface</a>;
<span class="returnvalue">char</span> * <a class="link" href="GVolume.html#g-volume-get-name" title="g_volume_get_name ()">g_volume_get_name</a> (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>);
<span class="returnvalue">char</span> * <a class="link" href="GVolume.html#g-volume-get-uuid" title="g_volume_get_uuid ()">g_volume_get_uuid</a> (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>);
<a class="link" href="GIcon.html" title="GIcon"><span class="returnvalue">GIcon</span></a> * <a class="link" href="GVolume.html#g-volume-get-icon" title="g_volume_get_icon ()">g_volume_get_icon</a> (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>);
<a class="link" href="GDrive.html" title="GDrive"><span class="returnvalue">GDrive</span></a> * <a class="link" href="GVolume.html#g-volume-get-drive" title="g_volume_get_drive ()">g_volume_get_drive</a> (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>);
<a class="link" href="GMount.html" title="GMount"><span class="returnvalue">GMount</span></a> * <a class="link" href="GVolume.html#g-volume-get-mount" title="g_volume_get_mount ()">g_volume_get_mount</a> (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GVolume.html#g-volume-can-mount" title="g_volume_can_mount ()">g_volume_can_mount</a> (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GVolume.html#g-volume-should-automount" title="g_volume_should_automount ()">g_volume_should_automount</a> (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>);
<a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> * <a class="link" href="GVolume.html#g-volume-get-activation-root" title="g_volume_get_activation_root ()">g_volume_get_activation_root</a> (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>);
<span class="returnvalue">void</span> <a class="link" href="GVolume.html#g-volume-mount" title="g_volume_mount ()">g_volume_mount</a> (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>,
<em class="parameter"><code><a class="link" href="GMount.html#GMountMountFlags" title="enum GMountMountFlags"><span class="type">GMountMountFlags</span></a> flags</code></em>,
<em class="parameter"><code><a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a> *mount_operation</code></em>,
<em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GVolume.html#g-volume-mount-finish" title="g_volume_mount_finish ()">g_volume_mount_finish</a> (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>,
<em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GVolume.html#g-volume-can-eject" title="g_volume_can_eject ()">g_volume_can_eject</a> (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>);
<span class="returnvalue">void</span> <a class="link" href="GVolume.html#g-volume-eject" title="g_volume_eject ()">g_volume_eject</a> (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>,
<em class="parameter"><code><a class="link" href="GMount.html#GMountUnmountFlags" title="enum GMountUnmountFlags"><span class="type">GMountUnmountFlags</span></a> flags</code></em>,
<em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GVolume.html#g-volume-eject-finish" title="g_volume_eject_finish ()">g_volume_eject_finish</a> (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>,
<em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<span class="returnvalue">void</span> <a class="link" href="GVolume.html#g-volume-eject-with-operation" title="g_volume_eject_with_operation ()">g_volume_eject_with_operation</a> (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>,
<em class="parameter"><code><a class="link" href="GMount.html#GMountUnmountFlags" title="enum GMountUnmountFlags"><span class="type">GMountUnmountFlags</span></a> flags</code></em>,
<em class="parameter"><code><a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a> *mount_operation</code></em>,
<em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GVolume.html#g-volume-eject-with-operation-finish" title="g_volume_eject_with_operation_finish ()">g_volume_eject_with_operation_finish</a>
(<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>,
<em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
#define <a class="link" href="GVolume.html#G-VOLUME-IDENTIFIER-KIND-HAL-UDI:CAPS" title="G_VOLUME_IDENTIFIER_KIND_HAL_UDI">G_VOLUME_IDENTIFIER_KIND_HAL_UDI</a>
#define <a class="link" href="GVolume.html#G-VOLUME-IDENTIFIER-KIND-LABEL:CAPS" title="G_VOLUME_IDENTIFIER_KIND_LABEL">G_VOLUME_IDENTIFIER_KIND_LABEL</a>
#define <a class="link" href="GVolume.html#G-VOLUME-IDENTIFIER-KIND-NFS-MOUNT:CAPS" title="G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT">G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT</a>
#define <a class="link" href="GVolume.html#G-VOLUME-IDENTIFIER-KIND-UNIX-DEVICE:CAPS" title="G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE">G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE</a>
#define <a class="link" href="GVolume.html#G-VOLUME-IDENTIFIER-KIND-UUID:CAPS" title="G_VOLUME_IDENTIFIER_KIND_UUID">G_VOLUME_IDENTIFIER_KIND_UUID</a>
<span class="returnvalue">char</span> ** <a class="link" href="GVolume.html#g-volume-enumerate-identifiers" title="g_volume_enumerate_identifiers ()">g_volume_enumerate_identifiers</a> (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>);
<span class="returnvalue">char</span> * <a class="link" href="GVolume.html#g-volume-get-identifier" title="g_volume_get_identifier ()">g_volume_get_identifier</a> (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *kind</code></em>);
</pre>
</div>
<div class="refsect1" title="Object Hierarchy">
<a name="GVolume.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
GInterface
+----GVolume
</pre>
</div>
<div class="refsect1" title="Prerequisites">
<a name="GVolume.prerequisites"></a><h2>Prerequisites</h2>
<p>
GVolume requires
<a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>.</p>
</div>
<div class="refsect1" title="Signals">
<a name="GVolume.signals"></a><h2>Signals</h2>
<pre class="synopsis">
"<a class="link" href="GVolume.html#GVolume-changed" title='The "changed" signal'>changed</a>" : Run Last
"<a class="link" href="GVolume.html#GVolume-removed" title='The "removed" signal'>removed</a>" : Run Last
</pre>
</div>
<div class="refsect1" title="Description">
<a name="GVolume.description"></a><h2>Description</h2>
<p>
The <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> interface represents user-visible objects that can be
mounted. Note, when porting from GnomeVFS, <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> is the moral
equivalent of <a href="/usr/share/gtk-doc/html/gnome-vfs-2.0/gnome-vfs-2.0-gnome-vfs-drive.html#GnomeVFSDrive"><span class="type">GnomeVFSDrive</span></a>.
</p>
<p>
Mounting a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> instance is an asynchronous operation. For more
information about asynchronous operations, see <span class="type">GAsyncReady</span> and
<span class="type">GSimpleAsyncReady</span>. To mount a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>, first call
<a class="link" href="GVolume.html#g-volume-mount" title="g_volume_mount ()"><code class="function">g_volume_mount()</code></a> with (at least) the <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> instance, optionally
a <a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a> object and a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>.
</p>
<p>
Typically, one will only want to pass <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for the
<a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a> if automounting all volumes when a desktop session
starts since it's not desirable to put up a lot of dialogs asking
for credentials.
</p>
<p>
The callback will be fired when the operation has resolved (either
with success or failure), and a <span class="type">GAsyncReady</span> structure will be
passed to the callback. That callback should then call
<a class="link" href="GVolume.html#g-volume-mount-finish" title="g_volume_mount_finish ()"><code class="function">g_volume_mount_finish()</code></a> with the <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> instance and the
<span class="type">GAsyncReady</span> data to see if the operation was completed
successfully. If an <em class="parameter"><code>error</code></em> is present when <a class="link" href="GVolume.html#g-volume-mount-finish" title="g_volume_mount_finish ()"><code class="function">g_volume_mount_finish()</code></a>
is called, then it will be filled with any error information.
</p>
<p>
</p>
<p><a name="volume-identifier"></a>
It is sometimes necessary to directly access the underlying
operating system object behind a volume (e.g. for passing a volume
to an application via the commandline). For this purpose, GIO
allows to obtain an 'identifier' for the volume. There can be
different kinds of identifiers, such as Hal UDIs, filesystem labels,
traditional Unix devices (e.g. <code class="filename">/dev/sda2</code>),
uuids. GIO uses predefind strings as names for the different kinds
of identifiers: <a class="link" href="GVolume.html#G-VOLUME-IDENTIFIER-KIND-HAL-UDI:CAPS" title="G_VOLUME_IDENTIFIER_KIND_HAL_UDI"><span class="type">G_VOLUME_IDENTIFIER_KIND_HAL_UDI</span></a>,
<a class="link" href="GVolume.html#G-VOLUME-IDENTIFIER-KIND-LABEL:CAPS" title="G_VOLUME_IDENTIFIER_KIND_LABEL"><span class="type">G_VOLUME_IDENTIFIER_KIND_LABEL</span></a>, etc. Use <a class="link" href="GVolume.html#g-volume-get-identifier" title="g_volume_get_identifier ()"><code class="function">g_volume_get_identifier()</code></a>
to obtain an identifier for a volume.
</p>
<p>
</p>
<p>
Note that <a class="link" href="GVolume.html#G-VOLUME-IDENTIFIER-KIND-HAL-UDI:CAPS" title="G_VOLUME_IDENTIFIER_KIND_HAL_UDI"><span class="type">G_VOLUME_IDENTIFIER_KIND_HAL_UDI</span></a> will only be available
when the gvfs hal volume monitor is in use. Other volume monitors
will generally be able to provide the <a class="link" href="GVolume.html#G-VOLUME-IDENTIFIER-KIND-UNIX-DEVICE:CAPS" title="G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE"><span class="type">G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE</span></a>
identifier, which can be used to obtain a hal device by means of
<code class="function">libhal_manger_find_device_string_match()</code>.
</p>
</div>
<div class="refsect1" title="Details">
<a name="GVolume.details"></a><h2>Details</h2>
<div class="refsect2" title="GVolume">
<a name="GVolume-struct"></a><h3>GVolume</h3>
<pre class="programlisting">typedef struct _GVolume GVolume;</pre>
<p>
Opaque mountable volume object.
</p>
</div>
<hr>
<div class="refsect2" title="GVolumeIface">
<a name="GVolumeIface"></a><h3>GVolumeIface</h3>
<pre class="programlisting">typedef struct {
GTypeInterface g_iface;
/* signals */
void (* changed) (GVolume *volume);
void (* removed) (GVolume *volume);
/* Virtual Table */
char * (* get_name) (GVolume *volume);
GIcon * (* get_icon) (GVolume *volume);
char * (* get_uuid) (GVolume *volume);
GDrive * (* get_drive) (GVolume *volume);
GMount * (* get_mount) (GVolume *volume);
gboolean (* can_mount) (GVolume *volume);
gboolean (* can_eject) (GVolume *volume);
void (* mount_fn) (GVolume *volume,
GMountMountFlags flags,
GMountOperation *mount_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean (* mount_finish) (GVolume *volume,
GAsyncResult *result,
GError **error);
void (* eject) (GVolume *volume,
GMountUnmountFlags flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean (* eject_finish) (GVolume *volume,
GAsyncResult *result,
GError **error);
char * (* get_identifier) (GVolume *volume,
const char *kind);
char ** (* enumerate_identifiers) (GVolume *volume);
gboolean (* should_automount) (GVolume *volume);
GFile * (* get_activation_root) (GVolume *volume);
void (* eject_with_operation) (GVolume *volume,
GMountUnmountFlags flags,
GMountOperation *mount_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean (* eject_with_operation_finish) (GVolume *volume,
GAsyncResult *result,
GError **error);
} GVolumeIface;
</pre>
<p>
Interface for implementing operations for mountable volumes.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> <em class="structfield"><code><a name="GVolumeIface.g-iface"></a>g_iface</code></em>;</span></p></td>
<td>The parent interface.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.changed"></a>changed</code></em> ()</span></p></td>
<td>Changed signal that is emitted when the volume's state has changed.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.removed"></a>removed</code></em> ()</span></p></td>
<td>The removed signal that is emitted when the <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> have been removed. If the recipient is holding references to the object they should release them so the object can be finalized.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.get-name"></a>get_name</code></em> ()</span></p></td>
<td>Gets a string containing the name of the <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.get-icon"></a>get_icon</code></em> ()</span></p></td>
<td>Gets a <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a> for the <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.get-uuid"></a>get_uuid</code></em> ()</span></p></td>
<td>Gets the UUID for the <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>. The reference is typically based on the file system UUID for the mount in question and should be considered an opaque string. Returns <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there is no UUID available.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.get-drive"></a>get_drive</code></em> ()</span></p></td>
<td>Gets a <a class="link" href="GDrive.html" title="GDrive"><span class="type">GDrive</span></a> the volume is located on. Returns <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> is not associated with a <a class="link" href="GDrive.html" title="GDrive"><span class="type">GDrive</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.get-mount"></a>get_mount</code></em> ()</span></p></td>
<td>Gets a <a class="link" href="GMount.html" title="GMount"><span class="type">GMount</span></a> representing the mounted volume. Returns <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> is not mounted.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.can-mount"></a>can_mount</code></em> ()</span></p></td>
<td>Returns <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> can be mounted.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.can-eject"></a>can_eject</code></em> ()</span></p></td>
<td>Checks if a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> can be ejected.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.mount-fn"></a>mount_fn</code></em> ()</span></p></td>
<td>Mounts a given <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>.
<a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> implementations must emit the <a class="link" href="GMountOperation.html#GMountOperation-aborted" title='The "aborted" signal'><span class="type">"aborted"</span></a>
signal before completing a mount operation that is aborted while
awaiting input from the user through a <a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a> instance.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.mount-finish"></a>mount_finish</code></em> ()</span></p></td>
<td>Finishes a mount operation.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.eject"></a>eject</code></em> ()</span></p></td>
<td>Ejects a given <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.eject-finish"></a>eject_finish</code></em> ()</span></p></td>
<td>Finishes an eject operation.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.get-identifier"></a>get_identifier</code></em> ()</span></p></td>
<td>Returns the <a class="link" href="GVolume.html#volume-identifier">identifier</a> of the given kind, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if
the <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> doesn't have one.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.enumerate-identifiers"></a>enumerate_identifiers</code></em> ()</span></p></td>
<td>Returns an array strings listing the kinds
of <a class="link" href="GVolume.html#volume-identifier">identifiers</a> which the <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> has.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.should-automount"></a>should_automount</code></em> ()</span></p></td>
<td>Returns <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> should be automatically mounted.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.get-activation-root"></a>get_activation_root</code></em> ()</span></p></td>
<td>Returns the activation root for the <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> if it is known in advance or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if
it is not known.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.eject-with-operation"></a>eject_with_operation</code></em> ()</span></p></td>
<td>Starts ejecting a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> using a <a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a>. Since 2.22.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.eject-with-operation-finish"></a>eject_with_operation_finish</code></em> ()</span></p></td>
<td>Finishes an eject operation using a <a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a>. Since 2.22.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_volume_get_name ()">
<a name="g-volume-get-name"></a><h3>g_volume_get_name ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> * g_volume_get_name (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>);</pre>
<p>
Gets the name of <em class="parameter"><code>volume</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
<td>a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the name for the given <em class="parameter"><code>volume</code></em>. The returned string should
be freed with <a href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> when no longer needed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_volume_get_uuid ()">
<a name="g-volume-get-uuid"></a><h3>g_volume_get_uuid ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> * g_volume_get_uuid (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>);</pre>
<p>
Gets the UUID for the <em class="parameter"><code>volume</code></em>. The reference is typically based on
the file system UUID for the volume in question and should be
considered an opaque string. Returns <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there is no UUID
available.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
<td>a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the UUID for <em class="parameter"><code>volume</code></em> or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no UUID can be computed.
The returned string should be freed with <a href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>
when no longer needed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_volume_get_icon ()">
<a name="g-volume-get-icon"></a><h3>g_volume_get_icon ()</h3>
<pre class="programlisting"><a class="link" href="GIcon.html" title="GIcon"><span class="returnvalue">GIcon</span></a> * g_volume_get_icon (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>);</pre>
<p>
Gets the icon for <em class="parameter"><code>volume</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
<td>a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a>.
The returned object should be unreffed with <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>
when no longer needed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_volume_get_drive ()">
<a name="g-volume-get-drive"></a><h3>g_volume_get_drive ()</h3>
<pre class="programlisting"><a class="link" href="GDrive.html" title="GDrive"><span class="returnvalue">GDrive</span></a> * g_volume_get_drive (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>);</pre>
<p>
Gets the drive for the <em class="parameter"><code>volume</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
<td>a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a <a class="link" href="GDrive.html" title="GDrive"><span class="type">GDrive</span></a> or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>volume</code></em> is not associated with a drive.
The returned object should be unreffed with <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>
when no longer needed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_volume_get_mount ()">
<a name="g-volume-get-mount"></a><h3>g_volume_get_mount ()</h3>
<pre class="programlisting"><a class="link" href="GMount.html" title="GMount"><span class="returnvalue">GMount</span></a> * g_volume_get_mount (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>);</pre>
<p>
Gets the mount for the <em class="parameter"><code>volume</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
<td>a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a <a class="link" href="GMount.html" title="GMount"><span class="type">GMount</span></a> or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>volume</code></em> isn't mounted.
The returned object should be unreffed with <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>
when no longer needed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_volume_can_mount ()">
<a name="g-volume-can-mount"></a><h3>g_volume_can_mount ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_volume_can_mount (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>);</pre>
<p>
Checks if a volume can be mounted.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
<td>a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <em class="parameter"><code>volume</code></em> can be mounted. <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_volume_should_automount ()">
<a name="g-volume-should-automount"></a><h3>g_volume_should_automount ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_volume_should_automount (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>);</pre>
<p>
Returns whether the volume should be automatically mounted.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
<td>a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the volume should be automatically mounted.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_volume_get_activation_root ()">
<a name="g-volume-get-activation-root"></a><h3>g_volume_get_activation_root ()</h3>
<pre class="programlisting"><a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> * g_volume_get_activation_root (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>);</pre>
<p>
Gets the activation root for a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> if it is known ahead of
mount time. Returns <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> otherwise. If not <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> and if <em class="parameter"><code>volume</code></em>
is mounted, then the result of <a class="link" href="GMount.html#g-mount-get-root" title="g_mount_get_root ()"><code class="function">g_mount_get_root()</code></a> on the
<a class="link" href="GMount.html" title="GMount"><span class="type">GMount</span></a> object obtained from <a class="link" href="GVolume.html#g-volume-get-mount" title="g_volume_get_mount ()"><code class="function">g_volume_get_mount()</code></a> will always
either be equal or a prefix of what this function returns. In
other words, in code
</p>
<p>
</p>
<pre class="programlisting">
GMount *mount;
GFile *mount_root
GFile *volume_activation_root;
mount = g_volume_get_mount (volume); /* mounted, so never NULL */
mount_root = g_mount_get_root (mount);
volume_activation_root = g_volume_get_activation_root(volume); /* assume not NULL */
</pre>
<p>
</p>
<p>
then the expression
</p>
<p>
</p>
<pre class="programlisting">
(g_file_has_prefix (volume_activation_root, mount_root) ||
g_file_equal (volume_activation_root, mount_root))
</pre>
<p>
</p>
<p>
will always be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.
</p>
<p>
Activation roots are typically used in <a class="link" href="GVolumeMonitor.html" title="GVolumeMonitor"><span class="type">GVolumeMonitor</span></a>
implementations to find the underlying mount to shadow, see
<a class="link" href="GMount.html#g-mount-is-shadowed" title="g_mount_is_shadowed ()"><code class="function">g_mount_is_shadowed()</code></a> for more details.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
<td>a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the activation root of <em class="parameter"><code>volume</code></em> or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. Use
<a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> to free.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.18</p>
</div>
<hr>
<div class="refsect2" title="g_volume_mount ()">
<a name="g-volume-mount"></a><h3>g_volume_mount ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> g_volume_mount (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>,
<em class="parameter"><code><a class="link" href="GMount.html#GMountMountFlags" title="enum GMountMountFlags"><span class="type">GMountMountFlags</span></a> flags</code></em>,
<em class="parameter"><code><a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a> *mount_operation</code></em>,
<em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
Mounts a volume. This is an asynchronous operation, and is
finished by calling <a class="link" href="GVolume.html#g-volume-mount-finish" title="g_volume_mount_finish ()"><code class="function">g_volume_mount_finish()</code></a> with the <em class="parameter"><code>volume</code></em>
and <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> returned in the <em class="parameter"><code>callback</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
<td>a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td>flags affecting the operation
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mount_operation</code></em> :</span></p></td>
<td>a <a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a> or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to avoid user interaction.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data that gets passed to <em class="parameter"><code>callback</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_volume_mount_finish ()">
<a name="g-volume-mount-finish"></a><h3>g_volume_mount_finish ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_volume_mount_finish (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>,
<em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Finishes mounting a volume. If any errors occured during the operation,
<em class="parameter"><code>error</code></em> will be set to contain the errors and <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> will be returned.
</p>
<p>
If the mount operation succeeded, <a class="link" href="GVolume.html#g-volume-get-mount" title="g_volume_get_mount ()"><code class="function">g_volume_get_mount()</code></a> on <em class="parameter"><code>volume</code></em>
is guaranteed to return the mount right after calling this
function; there's no need to listen for the 'mount-added' signal on
<a class="link" href="GVolumeMonitor.html" title="GVolumeMonitor"><span class="type">GVolumeMonitor</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
<td>a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
<td>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> location to store an error, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if operation failed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_volume_can_eject ()">
<a name="g-volume-can-eject"></a><h3>g_volume_can_eject ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_volume_can_eject (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>);</pre>
<p>
Checks if a volume can be ejected.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
<td>a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <em class="parameter"><code>volume</code></em> can be ejected. <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_volume_eject ()">
<a name="g-volume-eject"></a><h3>g_volume_eject ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> g_volume_eject (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>,
<em class="parameter"><code><a class="link" href="GMount.html#GMountUnmountFlags" title="enum GMountUnmountFlags"><span class="type">GMountUnmountFlags</span></a> flags</code></em>,
<em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">g_volume_eject</code> has been deprecated since version 2.22 and should not be used in newly-written code. Use <a class="link" href="GVolume.html#g-volume-eject-with-operation" title="g_volume_eject_with_operation ()"><code class="function">g_volume_eject_with_operation()</code></a> instead.</p>
</div>
<p>
Ejects a volume. This is an asynchronous operation, and is
finished by calling <a class="link" href="GVolume.html#g-volume-eject-finish" title="g_volume_eject_finish ()"><code class="function">g_volume_eject_finish()</code></a> with the <em class="parameter"><code>volume</code></em>
and <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> returned in the <em class="parameter"><code>callback</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
<td>a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td>flags affecting the unmount if required for eject
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data that gets passed to <em class="parameter"><code>callback</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_volume_eject_finish ()">
<a name="g-volume-eject-finish"></a><h3>g_volume_eject_finish ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_volume_eject_finish (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>,
<em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">g_volume_eject_finish</code> has been deprecated since version 2.22 and should not be used in newly-written code. Use <a class="link" href="GVolume.html#g-volume-eject-with-operation-finish" title="g_volume_eject_with_operation_finish ()"><code class="function">g_volume_eject_with_operation_finish()</code></a> instead.</p>
</div>
<p>
Finishes ejecting a volume. If any errors occured during the operation,
<em class="parameter"><code>error</code></em> will be set to contain the errors and <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> will be returned.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
<td>pointer to a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
<td>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> location to store an error, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if operation failed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_volume_eject_with_operation ()">
<a name="g-volume-eject-with-operation"></a><h3>g_volume_eject_with_operation ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> g_volume_eject_with_operation (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>,
<em class="parameter"><code><a class="link" href="GMount.html#GMountUnmountFlags" title="enum GMountUnmountFlags"><span class="type">GMountUnmountFlags</span></a> flags</code></em>,
<em class="parameter"><code><a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a> *mount_operation</code></em>,
<em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
Ejects a volume. This is an asynchronous operation, and is
finished by calling <a class="link" href="GVolume.html#g-volume-eject-with-operation-finish" title="g_volume_eject_with_operation_finish ()"><code class="function">g_volume_eject_with_operation_finish()</code></a> with the <em class="parameter"><code>volume</code></em>
and <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> data returned in the <em class="parameter"><code>callback</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
<td>a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td>flags affecting the unmount if required for eject
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mount_operation</code></em> :</span></p></td>
<td>a <a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a> or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to avoid user interaction.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data passed to <em class="parameter"><code>callback</code></em>.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2" title="g_volume_eject_with_operation_finish ()">
<a name="g-volume-eject-with-operation-finish"></a><h3>g_volume_eject_with_operation_finish ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_volume_eject_with_operation_finish
(<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>,
<em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Finishes ejecting a volume. If any errors occurred during the operation,
<em class="parameter"><code>error</code></em> will be set to contain the errors and <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> will be returned.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
<td>a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
<td>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> location to store the error occuring, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to
ignore.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the volume was successfully ejected. <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2" title="G_VOLUME_IDENTIFIER_KIND_HAL_UDI">
<a name="G-VOLUME-IDENTIFIER-KIND-HAL-UDI:CAPS"></a><h3>G_VOLUME_IDENTIFIER_KIND_HAL_UDI</h3>
<pre class="programlisting">#define G_VOLUME_IDENTIFIER_KIND_HAL_UDI "hal-udi"
</pre>
<p>
The string used to obtain a Hal UDI with <a class="link" href="GVolume.html#g-volume-get-identifier" title="g_volume_get_identifier ()"><code class="function">g_volume_get_identifier()</code></a>.
</p>
</div>
<hr>
<div class="refsect2" title="G_VOLUME_IDENTIFIER_KIND_LABEL">
<a name="G-VOLUME-IDENTIFIER-KIND-LABEL:CAPS"></a><h3>G_VOLUME_IDENTIFIER_KIND_LABEL</h3>
<pre class="programlisting">#define G_VOLUME_IDENTIFIER_KIND_LABEL "label"
</pre>
<p>
The string used to obtain a filesystem label with <a class="link" href="GVolume.html#g-volume-get-identifier" title="g_volume_get_identifier ()"><code class="function">g_volume_get_identifier()</code></a>.
</p>
</div>
<hr>
<div class="refsect2" title="G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT">
<a name="G-VOLUME-IDENTIFIER-KIND-NFS-MOUNT:CAPS"></a><h3>G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT</h3>
<pre class="programlisting">#define G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT "nfs-mount"
</pre>
<p>
The string used to obtain a NFS mount with <a class="link" href="GVolume.html#g-volume-get-identifier" title="g_volume_get_identifier ()"><code class="function">g_volume_get_identifier()</code></a>.
</p>
</div>
<hr>
<div class="refsect2" title="G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE">
<a name="G-VOLUME-IDENTIFIER-KIND-UNIX-DEVICE:CAPS"></a><h3>G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE</h3>
<pre class="programlisting">#define G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE "unix-device"
</pre>
<p>
The string used to obtain a Unix device path with <a class="link" href="GVolume.html#g-volume-get-identifier" title="g_volume_get_identifier ()"><code class="function">g_volume_get_identifier()</code></a>.
</p>
</div>
<hr>
<div class="refsect2" title="G_VOLUME_IDENTIFIER_KIND_UUID">
<a name="G-VOLUME-IDENTIFIER-KIND-UUID:CAPS"></a><h3>G_VOLUME_IDENTIFIER_KIND_UUID</h3>
<pre class="programlisting">#define G_VOLUME_IDENTIFIER_KIND_UUID "uuid"
</pre>
<p>
The string used to obtain a UUID with <a class="link" href="GVolume.html#g-volume-get-identifier" title="g_volume_get_identifier ()"><code class="function">g_volume_get_identifier()</code></a>.
</p>
</div>
<hr>
<div class="refsect2" title="g_volume_enumerate_identifiers ()">
<a name="g-volume-enumerate-identifiers"></a><h3>g_volume_enumerate_identifiers ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> ** g_volume_enumerate_identifiers (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>);</pre>
<p>
Gets the kinds of <a class="link" href="GVolume.html#volume-identifier">identifiers</a>
that <em class="parameter"><code>volume</code></em> has. Use <code class="function">g_volume_get_identifer()</code> to obtain
the identifiers themselves.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
<td>a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of strings containing
kinds of identifiers. Use <a href="/usr/share/gtk-doc/html/glib/glib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a> to free.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_volume_get_identifier ()">
<a name="g-volume-get-identifier"></a><h3>g_volume_get_identifier ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> * g_volume_get_identifier (<em class="parameter"><code><a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *volume</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *kind</code></em>);</pre>
<p>
Gets the identifier of the given kind for <em class="parameter"><code>volume</code></em>.
See the <a class="link" href="GVolume.html#volume-identifier">introduction</a>
for more information about volume identifiers.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
<td>a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>kind</code></em> :</span></p></td>
<td>the kind of identifier to return
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly allocated string containing the
requested identfier, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>
doesn't have this kind of identifier
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" title="Signal Details">
<a name="GVolume.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2" title='The "changed" signal'>
<a name="GVolume-changed"></a><h3>The <code class="literal">"changed"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *arg0,
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : Run Last</pre>
<p>
Emitted when the volume has been changed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title='The "removed" signal'>
<a name="GVolume-removed"></a><h3>The <code class="literal">"removed"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> *arg0,
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : Run Last</pre>
<p>
This signal is emitted when the <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> have been removed. If
the recipient is holding references to the object they should
release them so the object can be finalized.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr></tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.14</div>
</body>
</html>