1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7 <link rel="home" href="index.html" title="GIO Reference Manual">
8 <link rel="up" href="volume_mon.html" title="Volumes and Drives">
9 <link rel="prev" href="GVolumeMonitor.html" title="GVolumeMonitor">
10 <link rel="next" href="GMount.html" title="GMount">
11 <meta name="generator" content="GTK-Doc V1.13 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 <link rel="part" href="pt01.html" title="Part I. GIO Overview">
14 <link rel="chapter" href="ch01.html" title="Introduction">
15 <link rel="chapter" href="ch02.html" title="Compiling GIO applications">
16 <link rel="chapter" href="ch03.html" title="Running GIO applications">
17 <link rel="chapter" href="extending-gio.html" title="Extending GIO">
18 <link rel="part" href="pt02.html" title="Part II. API Reference">
19 <link rel="chapter" href="file_ops.html" title="File Operations">
20 <link rel="chapter" href="file_mon.html" title="File System Monitoring">
21 <link rel="chapter" href="async.html" title="Asynchronous I/O">
22 <link rel="chapter" href="conversion.html" title="Data conversion">
23 <link rel="chapter" href="streaming.html" title="Streaming I/O">
24 <link rel="chapter" href="types.html" title="File types and applications">
25 <link rel="chapter" href="volume_mon.html" title="Volumes and Drives">
26 <link rel="chapter" href="icons.html" title="Icons">
27 <link rel="chapter" href="failable_initialization.html" title="Failable Initialization">
28 <link rel="chapter" href="networking.html" title="Lowlevel platform-independent network support">
29 <link rel="chapter" href="resolver.html" title="DNS resolution">
30 <link rel="chapter" href="highlevel-socket.html" title="Highlevel network functionallity">
31 <link rel="chapter" href="utils.html" title="Utilities">
32 <link rel="chapter" href="extending.html" title="Extending GIO">
33 <link rel="part" href="migrating.html" title="Part III. Migrating to GIO">
34 <link rel="chapter" href="ch19.html" title="Migrating from POSIX to GIO">
35 <link rel="chapter" href="ch20.html" title="Migrating from GnomeVFS to GIO">
36 <link rel="chapter" href="gio-hierarchy.html" title="Object Hierarchy">
37 <link rel="index" href="api-index-full.html" title="Index">
38 <link rel="index" href="api-index-deprecated.html" title="Index of deprecated symbols">
39 <link rel="index" href="api-index-2-18.html" title="Index of new symbols in 2.18">
40 <link rel="index" href="api-index-2-20.html" title="Index of new symbols in 2.20">
41 <link rel="index" href="api-index-2-22.html" title="Index of new symbols in 2.22">
42 <link rel="index" href="api-index-2-24.html" title="Index of new symbols in 2.24">
44 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
45 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
47 <td><a accesskey="p" href="GVolumeMonitor.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
48 <td><a accesskey="u" href="volume_mon.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
49 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
50 <th width="100%" align="center">GIO Reference Manual</th>
51 <td><a accesskey="n" href="GMount.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
53 <tr><td colspan="5" class="shortcuts">
54 <a href="#GVolume.synopsis" class="shortcut">Top</a>
56 <a href="#GVolume.description" class="shortcut">Description</a>
58 <a href="#GVolume.object-hierarchy" class="shortcut">Object Hierarchy</a>
60 <a href="#GVolume.prerequisites" class="shortcut">Prerequisites</a>
62 <a href="#GVolume.signals" class="shortcut">Signals</a>
65 <div class="refentry" title="GVolume">
66 <a name="GVolume"></a><div class="titlepage"></div>
67 <div class="refnamediv"><table width="100%"><tr>
69 <h2><span class="refentrytitle"><a name="GVolume.top_of_page"></a>GVolume</span></h2>
70 <p>GVolume — Volume management</p>
72 <td valign="top" align="right"></td>
74 <div class="refsynopsisdiv" title="Synopsis">
75 <a name="GVolume.synopsis"></a><h2>Synopsis</h2>
76 <pre class="synopsis">
77 #include <gio/gio.h>
79 <a class="link" href="GVolume.html#GVolume-struct" title="GVolume">GVolume</a>;
80 <a class="link" href="GVolume.html#GVolumeIface" title="GVolumeIface">GVolumeIface</a>;
81 <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> (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume);
82 <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> (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume);
83 <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> (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume);
84 <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> (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume);
85 <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> (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume);
86 <a href="http://library.gnome.org/devel/glib/unstable/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> (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume);
87 <a href="http://library.gnome.org/devel/glib/unstable/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> (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume);
88 <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> (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume);
89 <span class="returnvalue">void</span> <a class="link" href="GVolume.html#g-volume-mount" title="g_volume_mount ()">g_volume_mount</a> (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume,
90 <a class="link" href="GMount.html#GMountMountFlags" title="enum GMountMountFlags"><span class="returnvalue">GMountMountFlags</span></a> flags,
91 <a class="link" href="GMountOperation.html" title="GMountOperation"><span class="returnvalue">GMountOperation</span></a> *mount_operation,
92 <a class="link" href="GCancellable.html" title="GCancellable"><span class="returnvalue">GCancellable</span></a> *cancellable,
93 <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="returnvalue">GAsyncReadyCallback</span></a> callback,
94 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> user_data);
95 <a href="http://library.gnome.org/devel/glib/unstable/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> (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume,
96 <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="returnvalue">GAsyncResult</span></a> *result,
97 <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a> **error);
98 <a href="http://library.gnome.org/devel/glib/unstable/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> (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume);
99 <span class="returnvalue">void</span> <a class="link" href="GVolume.html#g-volume-eject" title="g_volume_eject ()">g_volume_eject</a> (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume,
100 <a class="link" href="GMount.html#GMountUnmountFlags" title="enum GMountUnmountFlags"><span class="returnvalue">GMountUnmountFlags</span></a> flags,
101 <a class="link" href="GCancellable.html" title="GCancellable"><span class="returnvalue">GCancellable</span></a> *cancellable,
102 <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="returnvalue">GAsyncReadyCallback</span></a> callback,
103 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> user_data);
104 <a href="http://library.gnome.org/devel/glib/unstable/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> (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume,
105 <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="returnvalue">GAsyncResult</span></a> *result,
106 <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a> **error);
107 <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> (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume,
108 <a class="link" href="GMount.html#GMountUnmountFlags" title="enum GMountUnmountFlags"><span class="returnvalue">GMountUnmountFlags</span></a> flags,
109 <a class="link" href="GMountOperation.html" title="GMountOperation"><span class="returnvalue">GMountOperation</span></a> *mount_operation,
110 <a class="link" href="GCancellable.html" title="GCancellable"><span class="returnvalue">GCancellable</span></a> *cancellable,
111 <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="returnvalue">GAsyncReadyCallback</span></a> callback,
112 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> user_data);
113 <a href="http://library.gnome.org/devel/glib/unstable/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>
114 (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume,
115 <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="returnvalue">GAsyncResult</span></a> *result,
116 <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a> **error);
117 #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>
118 #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>
119 #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>
120 #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>
121 #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>
122 <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> (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume);
123 <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> (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume,
124 const <span class="returnvalue">char</span> *kind);
127 <div class="refsect1" title="Object Hierarchy">
128 <a name="GVolume.object-hierarchy"></a><h2>Object Hierarchy</h2>
129 <pre class="synopsis">
134 <div class="refsect1" title="Prerequisites">
135 <a name="GVolume.prerequisites"></a><h2>Prerequisites</h2>
138 <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>.</p>
140 <div class="refsect1" title="Signals">
141 <a name="GVolume.signals"></a><h2>Signals</h2>
142 <pre class="synopsis">
143 "<a class="link" href="GVolume.html#GVolume-changed" title='The "changed" signal'>changed</a>" : Run Last
144 "<a class="link" href="GVolume.html#GVolume-removed" title='The "removed" signal'>removed</a>" : Run Last
147 <div class="refsect1" title="Description">
148 <a name="GVolume.description"></a><h2>Description</h2>
150 The <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> interface represents user-visible objects that can be
151 mounted. Note, when porting from GnomeVFS, <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> is the moral
152 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>.
155 Mounting a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> instance is an asynchronous operation. For more
156 information about asynchronous operations, see <span class="type">GAsyncReady</span> and
157 <span class="type">GSimpleAsyncReady</span>. To mount a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>, first call
158 <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
159 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>.
162 Typically, one will only want to pass <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for the
163 <a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a> if automounting all volumes when a desktop session
164 starts since it's not desirable to put up a lot of dialogs asking
168 The callback will be fired when the operation has resolved (either
169 with success or failure), and a <span class="type">GAsyncReady</span> structure will be
170 passed to the callback. That callback should then call
171 <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
172 <span class="type">GAsyncReady</span> data to see if the operation was completed
173 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>
174 is called, then it will be filled with any error information.
178 <p><a name="volume-identifier"></a>
179 It is sometimes necessary to directly access the underlying
180 operating system object behind a volume (e.g. for passing a volume
181 to an application via the commandline). For this purpose, GIO
182 allows to obtain an 'identifier' for the volume. There can be
183 different kinds of identifiers, such as Hal UDIs, filesystem labels,
184 traditional Unix devices (e.g. <code class="filename">/dev/sda2</code>),
185 uuids. GIO uses predefind strings as names for the different kinds
186 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>,
187 <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>
188 to obtain an identifier for a volume.
193 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
194 when the gvfs hal volume monitor is in use. Other volume monitors
195 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>
196 identifier, which can be used to obtain a hal device by means of
197 <code class="function">libhal_manger_find_device_string_match()</code>.</p>
199 <div class="refsect1" title="Details">
200 <a name="GVolume.details"></a><h2>Details</h2>
201 <div class="refsect2" title="GVolume">
202 <a name="GVolume-struct"></a><h3>GVolume</h3>
203 <pre class="programlisting">typedef struct _GVolume GVolume;</pre>
205 Opaque mountable volume object.</p>
208 <div class="refsect2" title="GVolumeIface">
209 <a name="GVolumeIface"></a><h3>GVolumeIface</h3>
210 <pre class="programlisting">typedef struct {
211 GTypeInterface g_iface;
215 void (* changed) (GVolume *volume);
216 void (* removed) (GVolume *volume);
220 char * (* get_name) (GVolume *volume);
221 GIcon * (* get_icon) (GVolume *volume);
222 char * (* get_uuid) (GVolume *volume);
223 GDrive * (* get_drive) (GVolume *volume);
224 GMount * (* get_mount) (GVolume *volume);
225 gboolean (* can_mount) (GVolume *volume);
226 gboolean (* can_eject) (GVolume *volume);
227 void (* mount_fn) (GVolume *volume,
228 GMountMountFlags flags,
229 GMountOperation *mount_operation,
230 GCancellable *cancellable,
231 GAsyncReadyCallback callback,
233 gboolean (* mount_finish) (GVolume *volume,
234 GAsyncResult *result,
236 void (* eject) (GVolume *volume,
237 GMountUnmountFlags flags,
238 GCancellable *cancellable,
239 GAsyncReadyCallback callback,
241 gboolean (* eject_finish) (GVolume *volume,
242 GAsyncResult *result,
245 char * (* get_identifier) (GVolume *volume,
247 char ** (* enumerate_identifiers) (GVolume *volume);
249 gboolean (* should_automount) (GVolume *volume);
251 GFile * (* get_activation_root) (GVolume *volume);
253 void (* eject_with_operation) (GVolume *volume,
254 GMountUnmountFlags flags,
255 GMountOperation *mount_operation,
256 GCancellable *cancellable,
257 GAsyncReadyCallback callback,
259 gboolean (* eject_with_operation_finish) (GVolume *volume,
260 GAsyncResult *result,
265 Interface for implementing operations for mountable volumes.</p>
266 <div class="variablelist"><table border="0">
267 <col align="left" valign="top">
270 <td><p><span class="term"><a href="http://library.gnome.org/devel/gobject/unstable/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>
271 <td> The parent interface.
275 <td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.changed"></a>changed</code></em> ()</span></p></td>
276 <td> Changed signal that is emitted when the volume's state has changed.
280 <td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.removed"></a>removed</code></em> ()</span></p></td>
281 <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.
285 <td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.get-name"></a>get_name</code></em> ()</span></p></td>
286 <td> Gets a string containing the name of the <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>.
290 <td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.get-icon"></a>get_icon</code></em> ()</span></p></td>
291 <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>.
295 <td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.get-uuid"></a>get_uuid</code></em> ()</span></p></td>
296 <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="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there is no UUID available.
300 <td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.get-drive"></a>get_drive</code></em> ()</span></p></td>
301 <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="http://library.gnome.org/devel/glib/unstable/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>.
305 <td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.get-mount"></a>get_mount</code></em> ()</span></p></td>
306 <td> Gets a <a class="link" href="GMount.html" title="GMount"><span class="type">GMount</span></a> representing the mounted volume. Returns <a href="http://library.gnome.org/devel/glib/unstable/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.
310 <td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.can-mount"></a>can_mount</code></em> ()</span></p></td>
311 <td> Returns <a href="http://library.gnome.org/devel/glib/unstable/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.
315 <td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.can-eject"></a>can_eject</code></em> ()</span></p></td>
316 <td> Checks if a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> can be ejected.
320 <td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.mount-fn"></a>mount_fn</code></em> ()</span></p></td>
321 <td> Mounts a given <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>.
322 <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>
323 signal before completing a mount operation that is aborted while
324 awaiting input from the user through a <a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a> instance.
328 <td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.mount-finish"></a>mount_finish</code></em> ()</span></p></td>
329 <td> Finishes a mount operation.
333 <td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.eject"></a>eject</code></em> ()</span></p></td>
334 <td> Ejects a given <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>.
338 <td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.eject-finish"></a>eject_finish</code></em> ()</span></p></td>
339 <td> Finishes an eject operation.
343 <td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.get-identifier"></a>get_identifier</code></em> ()</span></p></td>
344 <td> Returns the <a class="link" href="GVolume.html#volume-identifier">identifier</a> of the given kind, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if
345 the <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> doesn't have one.
349 <td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.enumerate-identifiers"></a>enumerate_identifiers</code></em> ()</span></p></td>
350 <td> Returns an array strings listing the kinds
351 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.
355 <td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.should-automount"></a>should_automount</code></em> ()</span></p></td>
356 <td> Returns <a href="http://library.gnome.org/devel/glib/unstable/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.
360 <td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.get-activation-root"></a>get_activation_root</code></em> ()</span></p></td>
361 <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="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if
366 <td><p><span class="term"><em class="structfield"><code><a name="GVolumeIface.eject-with-operation"></a>eject_with_operation</code></em> ()</span></p></td>
367 <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.
371 <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>
372 <td> Finishes an eject operation using a <a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a>. Since 2.22.
379 <div class="refsect2" title="g_volume_get_name ()">
380 <a name="g-volume-get-name"></a><h3>g_volume_get_name ()</h3>
381 <pre class="programlisting"><span class="returnvalue">char</span> * g_volume_get_name (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume);</pre>
383 Gets the name of <em class="parameter"><code>volume</code></em>.</p>
384 <div class="variablelist"><table border="0">
385 <col align="left" valign="top">
388 <td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
389 <td> a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>.
393 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
394 <td> the name for the given <em class="parameter"><code>volume</code></em>. The returned string should
395 be freed with <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> when no longer needed.
402 <div class="refsect2" title="g_volume_get_uuid ()">
403 <a name="g-volume-get-uuid"></a><h3>g_volume_get_uuid ()</h3>
404 <pre class="programlisting"><span class="returnvalue">char</span> * g_volume_get_uuid (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume);</pre>
406 Gets the UUID for the <em class="parameter"><code>volume</code></em>. The reference is typically based on
407 the file system UUID for the volume in question and should be
408 considered an opaque string. Returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there is no UUID
410 <div class="variablelist"><table border="0">
411 <col align="left" valign="top">
414 <td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
415 <td> a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>.
419 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
420 <td> the UUID for <em class="parameter"><code>volume</code></em> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no UUID can be computed.
421 The returned string should be freed with <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>
422 when no longer needed.
429 <div class="refsect2" title="g_volume_get_icon ()">
430 <a name="g-volume-get-icon"></a><h3>g_volume_get_icon ()</h3>
431 <pre class="programlisting"><a class="link" href="GIcon.html" title="GIcon"><span class="returnvalue">GIcon</span></a> * g_volume_get_icon (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume);</pre>
433 Gets the icon for <em class="parameter"><code>volume</code></em>.</p>
434 <div class="variablelist"><table border="0">
435 <col align="left" valign="top">
438 <td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
439 <td> a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>.
443 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
444 <td> a <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a>.
445 The returned object should be unreffed with <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>
446 when no longer needed.
453 <div class="refsect2" title="g_volume_get_drive ()">
454 <a name="g-volume-get-drive"></a><h3>g_volume_get_drive ()</h3>
455 <pre class="programlisting"><a class="link" href="GDrive.html" title="GDrive"><span class="returnvalue">GDrive</span></a> * g_volume_get_drive (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume);</pre>
457 Gets the drive for the <em class="parameter"><code>volume</code></em>.</p>
458 <div class="variablelist"><table border="0">
459 <col align="left" valign="top">
462 <td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
463 <td> a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>.
467 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
468 <td> a <a class="link" href="GDrive.html" title="GDrive"><span class="type">GDrive</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/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.
469 The returned object should be unreffed with <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>
470 when no longer needed.
477 <div class="refsect2" title="g_volume_get_mount ()">
478 <a name="g-volume-get-mount"></a><h3>g_volume_get_mount ()</h3>
479 <pre class="programlisting"><a class="link" href="GMount.html" title="GMount"><span class="returnvalue">GMount</span></a> * g_volume_get_mount (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume);</pre>
481 Gets the mount for the <em class="parameter"><code>volume</code></em>.</p>
482 <div class="variablelist"><table border="0">
483 <col align="left" valign="top">
486 <td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
487 <td> a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>.
491 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
492 <td> a <a class="link" href="GMount.html" title="GMount"><span class="type">GMount</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>volume</code></em> isn't mounted.
493 The returned object should be unreffed with <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>
494 when no longer needed.
501 <div class="refsect2" title="g_volume_can_mount ()">
502 <a name="g-volume-can-mount"></a><h3>g_volume_can_mount ()</h3>
503 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_volume_can_mount (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume);</pre>
505 Checks if a volume can be mounted.</p>
506 <div class="variablelist"><table border="0">
507 <col align="left" valign="top">
510 <td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
511 <td> a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>.
515 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
516 <td> <a href="http://library.gnome.org/devel/glib/unstable/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="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.
523 <div class="refsect2" title="g_volume_should_automount ()">
524 <a name="g-volume-should-automount"></a><h3>g_volume_should_automount ()</h3>
525 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_volume_should_automount (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume);</pre>
527 Returns whether the volume should be automatically mounted.</p>
528 <div class="variablelist"><table border="0">
529 <col align="left" valign="top">
532 <td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
533 <td> a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>
537 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
538 <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the volume should be automatically mounted.
545 <div class="refsect2" title="g_volume_get_activation_root ()">
546 <a name="g-volume-get-activation-root"></a><h3>g_volume_get_activation_root ()</h3>
547 <pre class="programlisting"><a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> * g_volume_get_activation_root (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume);</pre>
549 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
550 mount time. Returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> otherwise. If not <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> and if <em class="parameter"><code>volume</code></em>
551 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
552 <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
553 either be equal or a prefix of what this function returns. In
558 <pre class="programlisting">
561 GFile *volume_activation_root;
563 mount = g_volume_get_mount (volume); /* mounted, so never NULL */
564 mount_root = g_mount_get_root (mount);
565 volume_activation_root = g_volume_get_activation_root(volume); /* assume not NULL */
574 <pre class="programlisting">
575 (g_file_has_prefix (volume_activation_root, mount_root) ||
576 g_file_equal (volume_activation_root, mount_root))
581 will always be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.
584 Activation roots are typically used in <a class="link" href="GVolumeMonitor.html" title="GVolumeMonitor"><span class="type">GVolumeMonitor</span></a>
585 implementations to find the underlying mount to shadow, see
586 <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>
587 <div class="variablelist"><table border="0">
588 <col align="left" valign="top">
591 <td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
592 <td> a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>
596 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
597 <td> the activation root of <em class="parameter"><code>volume</code></em> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. Use
598 <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> to free.
604 <p class="since">Since 2.18</p>
607 <div class="refsect2" title="g_volume_mount ()">
608 <a name="g-volume-mount"></a><h3>g_volume_mount ()</h3>
609 <pre class="programlisting"><span class="returnvalue">void</span> g_volume_mount (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume,
610 <a class="link" href="GMount.html#GMountMountFlags" title="enum GMountMountFlags"><span class="returnvalue">GMountMountFlags</span></a> flags,
611 <a class="link" href="GMountOperation.html" title="GMountOperation"><span class="returnvalue">GMountOperation</span></a> *mount_operation,
612 <a class="link" href="GCancellable.html" title="GCancellable"><span class="returnvalue">GCancellable</span></a> *cancellable,
613 <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="returnvalue">GAsyncReadyCallback</span></a> callback,
614 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> user_data);</pre>
616 Mounts a volume. This is an asynchronous operation, and is
617 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>
618 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>
619 <div class="variablelist"><table border="0">
620 <col align="left" valign="top">
623 <td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
624 <td> a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>.
628 <td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
629 <td> flags affecting the operation
633 <td><p><span class="term"><em class="parameter"><code>mount_operation</code></em> :</span></p></td>
634 <td> a <a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to avoid user interaction.
638 <td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
639 <td> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.
643 <td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
644 <td> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
648 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
649 <td> user data that gets passed to <em class="parameter"><code>callback</code></em>
656 <div class="refsect2" title="g_volume_mount_finish ()">
657 <a name="g-volume-mount-finish"></a><h3>g_volume_mount_finish ()</h3>
658 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_volume_mount_finish (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume,
659 <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="returnvalue">GAsyncResult</span></a> *result,
660 <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a> **error);</pre>
662 Finishes mounting a volume. If any errors occured during the operation,
663 <em class="parameter"><code>error</code></em> will be set to contain the errors and <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> will be returned.
666 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>
667 is guaranteed to return the mount right after calling this
668 function; there's no need to listen for the 'mount-added' signal on
669 <a class="link" href="GVolumeMonitor.html" title="GVolumeMonitor"><span class="type">GVolumeMonitor</span></a>.</p>
670 <div class="variablelist"><table border="0">
671 <col align="left" valign="top">
674 <td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
675 <td> a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>
679 <td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
680 <td> a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a>
684 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
685 <td> a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> location to store an error, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore
689 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
690 <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if operation failed.
697 <div class="refsect2" title="g_volume_can_eject ()">
698 <a name="g-volume-can-eject"></a><h3>g_volume_can_eject ()</h3>
699 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_volume_can_eject (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume);</pre>
701 Checks if a volume can be ejected.</p>
702 <div class="variablelist"><table border="0">
703 <col align="left" valign="top">
706 <td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
707 <td> a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>.
711 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
712 <td> <a href="http://library.gnome.org/devel/glib/unstable/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="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.
719 <div class="refsect2" title="g_volume_eject ()">
720 <a name="g-volume-eject"></a><h3>g_volume_eject ()</h3>
721 <pre class="programlisting"><span class="returnvalue">void</span> g_volume_eject (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume,
722 <a class="link" href="GMount.html#GMountUnmountFlags" title="enum GMountUnmountFlags"><span class="returnvalue">GMountUnmountFlags</span></a> flags,
723 <a class="link" href="GCancellable.html" title="GCancellable"><span class="returnvalue">GCancellable</span></a> *cancellable,
724 <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="returnvalue">GAsyncReadyCallback</span></a> callback,
725 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> user_data);</pre>
726 <div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
727 <h3 class="title">Warning</h3>
728 <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>
731 Ejects a volume. This is an asynchronous operation, and is
732 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>
733 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>
734 <div class="variablelist"><table border="0">
735 <col align="left" valign="top">
738 <td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
739 <td> a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>.
743 <td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
744 <td> flags affecting the unmount if required for eject
748 <td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
749 <td> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.
753 <td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
754 <td> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
758 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
759 <td> user data that gets passed to <em class="parameter"><code>callback</code></em>
766 <div class="refsect2" title="g_volume_eject_finish ()">
767 <a name="g-volume-eject-finish"></a><h3>g_volume_eject_finish ()</h3>
768 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_volume_eject_finish (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume,
769 <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="returnvalue">GAsyncResult</span></a> *result,
770 <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a> **error);</pre>
771 <div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
772 <h3 class="title">Warning</h3>
773 <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>
776 Finishes ejecting a volume. If any errors occured during the operation,
777 <em class="parameter"><code>error</code></em> will be set to contain the errors and <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> will be returned.</p>
778 <div class="variablelist"><table border="0">
779 <col align="left" valign="top">
782 <td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
783 <td> pointer to a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>.
787 <td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
788 <td> a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a>.
792 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
793 <td> a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> location to store an error, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore
797 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
798 <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if operation failed.
806 <div class="refsect2" title="g_volume_eject_with_operation ()">
807 <a name="g-volume-eject-with-operation"></a><h3>g_volume_eject_with_operation ()</h3>
808 <pre class="programlisting"><span class="returnvalue">void</span> g_volume_eject_with_operation (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume,
809 <a class="link" href="GMount.html#GMountUnmountFlags" title="enum GMountUnmountFlags"><span class="returnvalue">GMountUnmountFlags</span></a> flags,
810 <a class="link" href="GMountOperation.html" title="GMountOperation"><span class="returnvalue">GMountOperation</span></a> *mount_operation,
811 <a class="link" href="GCancellable.html" title="GCancellable"><span class="returnvalue">GCancellable</span></a> *cancellable,
812 <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="returnvalue">GAsyncReadyCallback</span></a> callback,
813 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> user_data);</pre>
815 Ejects a volume. This is an asynchronous operation, and is
816 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>
817 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>
818 <div class="variablelist"><table border="0">
819 <col align="left" valign="top">
822 <td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
823 <td> a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>.
827 <td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
828 <td> flags affecting the unmount if required for eject
832 <td><p><span class="term"><em class="parameter"><code>mount_operation</code></em> :</span></p></td>
833 <td> a <a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to avoid user interaction.
837 <td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
838 <td> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.
842 <td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
843 <td> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
847 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
848 <td> user data passed to <em class="parameter"><code>callback</code></em>.
853 <p class="since">Since 2.22</p>
856 <div class="refsect2" title="g_volume_eject_with_operation_finish ()">
857 <a name="g-volume-eject-with-operation-finish"></a><h3>g_volume_eject_with_operation_finish ()</h3>
858 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_volume_eject_with_operation_finish
859 (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume,
860 <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="returnvalue">GAsyncResult</span></a> *result,
861 <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a> **error);</pre>
863 Finishes ejecting a volume. If any errors occurred during the operation,
864 <em class="parameter"><code>error</code></em> will be set to contain the errors and <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> will be returned.</p>
865 <div class="variablelist"><table border="0">
866 <col align="left" valign="top">
869 <td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
870 <td> a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>.
874 <td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
875 <td> a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a>.
879 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
880 <td> a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> location to store the error occuring, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to
885 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
886 <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the volume was successfully ejected. <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.
892 <p class="since">Since 2.22</p>
895 <div class="refsect2" title="G_VOLUME_IDENTIFIER_KIND_HAL_UDI">
896 <a name="G-VOLUME-IDENTIFIER-KIND-HAL-UDI:CAPS"></a><h3>G_VOLUME_IDENTIFIER_KIND_HAL_UDI</h3>
897 <pre class="programlisting">#define G_VOLUME_IDENTIFIER_KIND_HAL_UDI "hal-udi"
900 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>
903 <div class="refsect2" title="G_VOLUME_IDENTIFIER_KIND_LABEL">
904 <a name="G-VOLUME-IDENTIFIER-KIND-LABEL:CAPS"></a><h3>G_VOLUME_IDENTIFIER_KIND_LABEL</h3>
905 <pre class="programlisting">#define G_VOLUME_IDENTIFIER_KIND_LABEL "label"
908 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>
911 <div class="refsect2" title="G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT">
912 <a name="G-VOLUME-IDENTIFIER-KIND-NFS-MOUNT:CAPS"></a><h3>G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT</h3>
913 <pre class="programlisting">#define G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT "nfs-mount"
916 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>
919 <div class="refsect2" title="G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE">
920 <a name="G-VOLUME-IDENTIFIER-KIND-UNIX-DEVICE:CAPS"></a><h3>G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE</h3>
921 <pre class="programlisting">#define G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE "unix-device"
924 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>
927 <div class="refsect2" title="G_VOLUME_IDENTIFIER_KIND_UUID">
928 <a name="G-VOLUME-IDENTIFIER-KIND-UUID:CAPS"></a><h3>G_VOLUME_IDENTIFIER_KIND_UUID</h3>
929 <pre class="programlisting">#define G_VOLUME_IDENTIFIER_KIND_UUID "uuid"
932 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>
935 <div class="refsect2" title="g_volume_enumerate_identifiers ()">
936 <a name="g-volume-enumerate-identifiers"></a><h3>g_volume_enumerate_identifiers ()</h3>
937 <pre class="programlisting"><span class="returnvalue">char</span> ** g_volume_enumerate_identifiers (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume);</pre>
939 Gets the kinds of <a class="link" href="GVolume.html#volume-identifier">identifiers</a>
940 that <em class="parameter"><code>volume</code></em> has. Use <code class="function">g_volume_get_identifer()</code> to obtain
941 the identifiers themselves.</p>
942 <div class="variablelist"><table border="0">
943 <col align="left" valign="top">
946 <td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
947 <td> a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>
951 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
952 <td> a <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of strings containing
953 kinds of identifiers. Use <a href="http://library.gnome.org/devel/glib/unstable/glib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a> to free.
960 <div class="refsect2" title="g_volume_get_identifier ()">
961 <a name="g-volume-get-identifier"></a><h3>g_volume_get_identifier ()</h3>
962 <pre class="programlisting"><span class="returnvalue">char</span> * g_volume_get_identifier (<a class="link" href="GVolume.html" title="GVolume"><span class="returnvalue">GVolume</span></a> *volume,
963 const <span class="returnvalue">char</span> *kind);</pre>
965 Gets the identifier of the given kind for <em class="parameter"><code>volume</code></em>.
966 See the <a class="link" href="GVolume.html#volume-identifier">introduction</a>
967 for more information about volume identifiers.</p>
968 <div class="variablelist"><table border="0">
969 <col align="left" valign="top">
972 <td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
973 <td> a <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a>
977 <td><p><span class="term"><em class="parameter"><code>kind</code></em> :</span></p></td>
978 <td> the kind of identifier to return
982 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
983 <td> a newly allocated string containing the
984 requested identfier, or <a href="http://library.gnome.org/devel/glib/unstable/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>
985 doesn't have this kind of identifier
992 <div class="refsect1" title="Signal Details">
993 <a name="GVolume.signal-details"></a><h2>Signal Details</h2>
994 <div class="refsect2" title='The "changed" signal'>
995 <a name="GVolume-changed"></a><h3>The <code class="literal">"changed"</code> signal</h3>
996 <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,
997 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : Run Last</pre>
999 Emitted when the volume has been changed.</p>
1000 <div class="variablelist"><table border="0">
1001 <col align="left" valign="top">
1003 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
1004 <td>user data set when the signal handler was connected.</td>
1009 <div class="refsect2" title='The "removed" signal'>
1010 <a name="GVolume-removed"></a><h3>The <code class="literal">"removed"</code> signal</h3>
1011 <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,
1012 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : Run Last</pre>
1014 This signal is emitted when the <a class="link" href="GVolume.html" title="GVolume"><span class="type">GVolume</span></a> have been removed. If
1015 the recipient is holding references to the object they should
1016 release them so the object can be finalized.</p>
1017 <div class="variablelist"><table border="0">
1018 <col align="left" valign="top">
1020 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
1021 <td>user data set when the signal handler was connected.</td>
1027 <div class="footer">
1029 Generated by GTK-Doc V1.13</div>