~ubuntu-branches/ubuntu/trusty/glib2.0/trusty-proposed

« back to all changes in this revision

Viewing changes to docs/reference/gio/xml/gvolume.xml

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2010-03-23 19:25:52 UTC
  • mfrom: (3.4.9 experimental)
  • Revision ID: james.westby@ubuntu.com-20100323192552-istna8c33bw6harh
Tags: 2.23.6-1ubuntu1
* Resync on Debian
* debian/patches/01_gettext-desktopfiles.patch:
  - updated to use gettext for X-GNOME-Fullname too
* debian/patches/71_gio_launch_handler.patch:
  - new gio default launch handle feature required for wncksync
* debian/control.in, 
  debian/patches/80-gtester-subunit.patch:
  - gtester-report subunit support
* debian/libglib2.0-0.symbols:
  - updated the symbols list for the gio launcher handler

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0"?>
2
 
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3
 
               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
4
 
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
5
 
<!ENTITY version SYSTEM "version.xml">
6
 
]>
7
 
<refentry id="GVolume">
8
 
<refmeta>
9
 
<refentrytitle role="top_of_page" id="GVolume.top_of_page">GVolume</refentrytitle>
10
 
<manvolnum>3</manvolnum>
11
 
<refmiscinfo>GIO Library</refmiscinfo>
12
 
</refmeta>
13
 
 
14
 
<refnamediv>
15
 
<refname>GVolume</refname>
16
 
<refpurpose>Volume management</refpurpose>
17
 
</refnamediv>
18
 
 
19
 
<refsynopsisdiv id="GVolume.synopsis" role="synopsis">
20
 
<title role="synopsis.title">Synopsis</title>
21
 
 
22
 
<synopsis>
23
 
 
24
 
#include &lt;gio/gio.h&gt;
25
 
 
26
 
                    <link linkend="GVolume-struct">GVolume</link>;
27
 
                    <link linkend="GVolumeIface">GVolumeIface</link>;
28
 
<link linkend="char">char</link> *              <link linkend="g-volume-get-name">g_volume_get_name</link>                   (<link linkend="GVolume">GVolume</link> *volume);
29
 
<link linkend="char">char</link> *              <link linkend="g-volume-get-uuid">g_volume_get_uuid</link>                   (<link linkend="GVolume">GVolume</link> *volume);
30
 
<link linkend="GIcon">GIcon</link> *             <link linkend="g-volume-get-icon">g_volume_get_icon</link>                   (<link linkend="GVolume">GVolume</link> *volume);
31
 
<link linkend="GDrive">GDrive</link> *            <link linkend="g-volume-get-drive">g_volume_get_drive</link>                  (<link linkend="GVolume">GVolume</link> *volume);
32
 
<link linkend="GMount">GMount</link> *            <link linkend="g-volume-get-mount">g_volume_get_mount</link>                  (<link linkend="GVolume">GVolume</link> *volume);
33
 
<link linkend="gboolean">gboolean</link>            <link linkend="g-volume-can-mount">g_volume_can_mount</link>                  (<link linkend="GVolume">GVolume</link> *volume);
34
 
<link linkend="gboolean">gboolean</link>            <link linkend="g-volume-should-automount">g_volume_should_automount</link>           (<link linkend="GVolume">GVolume</link> *volume);
35
 
<link linkend="GFile">GFile</link> *             <link linkend="g-volume-get-activation-root">g_volume_get_activation_root</link>        (<link linkend="GVolume">GVolume</link> *volume);
36
 
<link linkend="void">void</link>                <link linkend="g-volume-mount">g_volume_mount</link>                      (<link linkend="GVolume">GVolume</link> *volume,
37
 
                                                         <link linkend="GMountMountFlags">GMountMountFlags</link> flags,
38
 
                                                         <link linkend="GMountOperation">GMountOperation</link> *mount_operation,
39
 
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
40
 
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
41
 
                                                         <link linkend="gpointer">gpointer</link> user_data);
42
 
<link linkend="gboolean">gboolean</link>            <link linkend="g-volume-mount-finish">g_volume_mount_finish</link>               (<link linkend="GVolume">GVolume</link> *volume,
43
 
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
44
 
                                                         <link linkend="GError">GError</link> **error);
45
 
<link linkend="gboolean">gboolean</link>            <link linkend="g-volume-can-eject">g_volume_can_eject</link>                  (<link linkend="GVolume">GVolume</link> *volume);
46
 
<link linkend="void">void</link>                <link linkend="g-volume-eject">g_volume_eject</link>                      (<link linkend="GVolume">GVolume</link> *volume,
47
 
                                                         <link linkend="GMountUnmountFlags">GMountUnmountFlags</link> flags,
48
 
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
49
 
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
50
 
                                                         <link linkend="gpointer">gpointer</link> user_data);
51
 
<link linkend="gboolean">gboolean</link>            <link linkend="g-volume-eject-finish">g_volume_eject_finish</link>               (<link linkend="GVolume">GVolume</link> *volume,
52
 
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
53
 
                                                         <link linkend="GError">GError</link> **error);
54
 
<link linkend="void">void</link>                <link linkend="g-volume-eject-with-operation">g_volume_eject_with_operation</link>       (<link linkend="GVolume">GVolume</link> *volume,
55
 
                                                         <link linkend="GMountUnmountFlags">GMountUnmountFlags</link> flags,
56
 
                                                         <link linkend="GMountOperation">GMountOperation</link> *mount_operation,
57
 
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
58
 
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
59
 
                                                         <link linkend="gpointer">gpointer</link> user_data);
60
 
<link linkend="gboolean">gboolean</link>            <link linkend="g-volume-eject-with-operation-finish">g_volume_eject_with_operation_finish</link>
61
 
                                                        (<link linkend="GVolume">GVolume</link> *volume,
62
 
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
63
 
                                                         <link linkend="GError">GError</link> **error);
64
 
#define             <link linkend="G-VOLUME-IDENTIFIER-KIND-HAL-UDI--CAPS">G_VOLUME_IDENTIFIER_KIND_HAL_UDI</link>
65
 
#define             <link linkend="G-VOLUME-IDENTIFIER-KIND-LABEL--CAPS">G_VOLUME_IDENTIFIER_KIND_LABEL</link>
66
 
#define             <link linkend="G-VOLUME-IDENTIFIER-KIND-NFS-MOUNT--CAPS">G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT</link>
67
 
#define             <link linkend="G-VOLUME-IDENTIFIER-KIND-UNIX-DEVICE--CAPS">G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE</link>
68
 
#define             <link linkend="G-VOLUME-IDENTIFIER-KIND-UUID--CAPS">G_VOLUME_IDENTIFIER_KIND_UUID</link>
69
 
<link linkend="char">char</link> **             <link linkend="g-volume-enumerate-identifiers">g_volume_enumerate_identifiers</link>      (<link linkend="GVolume">GVolume</link> *volume);
70
 
<link linkend="char">char</link> *              <link linkend="g-volume-get-identifier">g_volume_get_identifier</link>             (<link linkend="GVolume">GVolume</link> *volume,
71
 
                                                         const <link linkend="char">char</link> *kind);
72
 
</synopsis>
73
 
</refsynopsisdiv>
74
 
 
75
 
<refsect1 id="GVolume.object-hierarchy" role="object_hierarchy">
76
 
<title role="object_hierarchy.title">Object Hierarchy</title>
77
 
<synopsis>
78
 
  <link linkend="GInterface">GInterface</link>
79
 
   +----GVolume
80
 
</synopsis>
81
 
</refsect1>
82
 
 
83
 
<refsect1 id="GVolume.prerequisites" role="prerequisites">
84
 
<title role="prerequisites.title">Prerequisites</title>
85
 
<para>
86
 
GVolume requires
87
 
 <link linkend="GObject">GObject</link>.</para>
88
 
</refsect1>
89
 
 
90
 
 
91
 
 
92
 
 
93
 
 
94
 
<refsect1 id="GVolume.signals" role="signal_proto">
95
 
<title role="signal_proto.title">Signals</title>
96
 
<synopsis>
97
 
  &quot;<link linkend="GVolume-changed">changed</link>&quot;                                        : Run Last
98
 
  &quot;<link linkend="GVolume-removed">removed</link>&quot;                                        : Run Last
99
 
</synopsis>
100
 
</refsect1>
101
 
 
102
 
 
103
 
<refsect1 id="GVolume.description" role="desc">
104
 
<title role="desc.title">Description</title>
105
 
<para>
106
 
The <link linkend="GVolume"><type>GVolume</type></link> interface represents user-visible objects that can be
107
 
mounted. Note, when porting from GnomeVFS, <link linkend="GVolume"><type>GVolume</type></link> is the moral
108
 
equivalent of <link linkend="GnomeVFSDrive"><type>GnomeVFSDrive</type></link>.
109
 
</para>
110
 
<para>
111
 
Mounting a <link linkend="GVolume"><type>GVolume</type></link> instance is an asynchronous operation. For more
112
 
information about asynchronous operations, see <link linkend="GAsyncReady"><type>GAsyncReady</type></link> and
113
 
<link linkend="GSimpleAsyncReady"><type>GSimpleAsyncReady</type></link>. To mount a <link linkend="GVolume"><type>GVolume</type></link>, first call
114
 
<link linkend="g-volume-mount"><function>g_volume_mount()</function></link> with (at least) the <link linkend="GVolume"><type>GVolume</type></link> instance, optionally
115
 
a <link linkend="GMountOperation"><type>GMountOperation</type></link> object and a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link>. 
116
 
</para>
117
 
<para>
118
 
Typically, one will only want to pass <link linkend="NULL--CAPS"><literal>NULL</literal></link> for the
119
 
<link linkend="GMountOperation"><type>GMountOperation</type></link> if automounting all volumes when a desktop session
120
 
starts since it's not desirable to put up a lot of dialogs asking
121
 
for credentials.
122
 
</para>
123
 
<para>
124
 
The callback will be fired when the operation has resolved (either
125
 
with success or failure), and a <link linkend="GAsyncReady"><type>GAsyncReady</type></link> structure will be
126
 
passed to the callback.  That callback should then call
127
 
<link linkend="g-volume-mount-finish"><function>g_volume_mount_finish()</function></link> with the <link linkend="GVolume"><type>GVolume</type></link> instance and the
128
 
<link linkend="GAsyncReady"><type>GAsyncReady</type></link> data to see if the operation was completed
129
 
successfully.  If an <parameter>error</parameter> is present when <link linkend="g-volume-mount-finish"><function>g_volume_mount_finish()</function></link>
130
 
is called, then it will be filled with any error information.
131
 
</para>
132
 
<para>
133
 
<para id="volume-identifier">
134
 
It is sometimes necessary to directly access the underlying
135
 
operating system object behind a volume (e.g. for passing a volume
136
 
to an application via the commandline). For this purpose, GIO
137
 
allows to obtain an 'identifier' for the volume. There can be
138
 
different kinds of identifiers, such as Hal UDIs, filesystem labels,
139
 
traditional Unix devices (e.g. <filename>/dev/sda2</filename>),
140
 
uuids. GIO uses predefind strings as names for the different kinds
141
 
of identifiers: <link linkend="G-VOLUME-IDENTIFIER-KIND-HAL-UDI--CAPS"><type>G_VOLUME_IDENTIFIER_KIND_HAL_UDI</type></link>,
142
 
<link linkend="G-VOLUME-IDENTIFIER-KIND-LABEL--CAPS"><type>G_VOLUME_IDENTIFIER_KIND_LABEL</type></link>, etc. Use <link linkend="g-volume-get-identifier"><function>g_volume_get_identifier()</function></link>
143
 
to obtain an identifier for a volume.
144
 
</para>
145
 
</para>
146
 
<para>
147
 
Note that <link linkend="G-VOLUME-IDENTIFIER-KIND-HAL-UDI--CAPS"><type>G_VOLUME_IDENTIFIER_KIND_HAL_UDI</type></link> will only be available
148
 
when the gvfs hal volume monitor is in use. Other volume monitors
149
 
will generally be able to provide the <link linkend="G-VOLUME-IDENTIFIER-KIND-UNIX-DEVICE--CAPS"><type>G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE</type></link>
150
 
identifier, which can be used to obtain a hal device by means of
151
 
<link linkend="libhal-manger-find-device-string-match"><function>libhal_manger_find_device_string_match()</function></link>.</para>
152
 
<para>
153
 
</para>
154
 
</refsect1>
155
 
 
156
 
<refsect1 id="GVolume.details" role="details">
157
 
<title role="details.title">Details</title>
158
 
<refsect2 id="GVolume-struct" role="struct">
159
 
<title>GVolume</title>
160
 
<indexterm zone="GVolume-struct"><primary sortas="Volume">GVolume</primary></indexterm><programlisting>typedef struct _GVolume GVolume;</programlisting>
161
 
<para>
162
 
Opaque mountable volume object.</para>
163
 
<para>
164
 
</para></refsect2>
165
 
<refsect2 id="GVolumeIface" role="struct">
166
 
<title>GVolumeIface</title>
167
 
<indexterm zone="GVolumeIface"><primary sortas="VolumeIface">GVolumeIface</primary></indexterm><programlisting>typedef struct {
168
 
  GTypeInterface g_iface;
169
 
 
170
 
  /* signals */
171
 
 
172
 
  void        (* changed)               (GVolume             *volume);
173
 
  void        (* removed)               (GVolume             *volume);
174
 
 
175
 
  /* Virtual Table */
176
 
 
177
 
  char      * (* get_name)              (GVolume             *volume);
178
 
  GIcon     * (* get_icon)              (GVolume             *volume);
179
 
  char      * (* get_uuid)              (GVolume             *volume);
180
 
  GDrive    * (* get_drive)             (GVolume             *volume);
181
 
  GMount    * (* get_mount)             (GVolume             *volume);
182
 
  gboolean    (* can_mount)             (GVolume             *volume);
183
 
  gboolean    (* can_eject)             (GVolume             *volume);
184
 
  void        (* mount_fn)              (GVolume             *volume,
185
 
                                         GMountMountFlags     flags,
186
 
                                         GMountOperation     *mount_operation,
187
 
                                         GCancellable        *cancellable,
188
 
                                         GAsyncReadyCallback  callback,
189
 
                                         gpointer             user_data);
190
 
  gboolean    (* mount_finish)          (GVolume             *volume,
191
 
                                         GAsyncResult        *result,
192
 
                                         GError             **error);
193
 
  void        (* eject)                 (GVolume             *volume,
194
 
                                         GMountUnmountFlags   flags,
195
 
                                         GCancellable        *cancellable,
196
 
                                         GAsyncReadyCallback  callback,
197
 
                                         gpointer             user_data);
198
 
  gboolean    (* eject_finish)          (GVolume             *volume,
199
 
                                         GAsyncResult        *result,
200
 
                                         GError             **error);
201
 
 
202
 
  char      * (* get_identifier)        (GVolume             *volume,
203
 
                                         const char          *kind);
204
 
  char     ** (* enumerate_identifiers) (GVolume             *volume);
205
 
 
206
 
  gboolean    (* should_automount)      (GVolume             *volume);
207
 
 
208
 
  GFile     * (* get_activation_root)   (GVolume             *volume);
209
 
 
210
 
  void        (* eject_with_operation)      (GVolume             *volume,
211
 
                                             GMountUnmountFlags   flags,
212
 
                                             GMountOperation     *mount_operation,
213
 
                                             GCancellable        *cancellable,
214
 
                                             GAsyncReadyCallback  callback,
215
 
                                             gpointer             user_data);
216
 
  gboolean    (* eject_with_operation_finish) (GVolume           *volume,
217
 
                                             GAsyncResult        *result,
218
 
                                             GError             **error);
219
 
} GVolumeIface;
220
 
</programlisting>
221
 
<para>
222
 
Interface for implementing operations for mountable volumes.</para>
223
 
<para>
224
 
</para><variablelist role="struct">
225
 
<varlistentry>
226
 
<term><link linkend="GTypeInterface">GTypeInterface</link>&#160;<structfield>g_iface</structfield>;</term>
227
 
<listitem><simpara> The parent interface.
228
 
</simpara></listitem>
229
 
</varlistentry>
230
 
<varlistentry>
231
 
<term><structfield>changed</structfield>&#160;()</term>
232
 
<listitem><simpara> Changed signal that is emitted when the volume's state has changed.
233
 
</simpara></listitem>
234
 
</varlistentry>
235
 
<varlistentry>
236
 
<term><structfield>removed</structfield>&#160;()</term>
237
 
<listitem><simpara> The removed signal that is emitted when the <link linkend="GVolume"><type>GVolume</type></link> have been removed. If the recipient is holding references to the object they should release them so the object can be finalized.
238
 
</simpara></listitem>
239
 
</varlistentry>
240
 
<varlistentry>
241
 
<term><structfield>get_name</structfield>&#160;()</term>
242
 
<listitem><simpara> Gets a string containing the name of the <link linkend="GVolume"><type>GVolume</type></link>.
243
 
</simpara></listitem>
244
 
</varlistentry>
245
 
<varlistentry>
246
 
<term><structfield>get_icon</structfield>&#160;()</term>
247
 
<listitem><simpara> Gets a <link linkend="GIcon"><type>GIcon</type></link> for the <link linkend="GVolume"><type>GVolume</type></link>.
248
 
</simpara></listitem>
249
 
</varlistentry>
250
 
<varlistentry>
251
 
<term><structfield>get_uuid</structfield>&#160;()</term>
252
 
<listitem><simpara> Gets the UUID for the <link linkend="GVolume"><type>GVolume</type></link>. The reference is typically based on the file system UUID for the mount in question and should be considered an opaque string. Returns <link linkend="NULL--CAPS"><literal>NULL</literal></link> if there is no UUID available.
253
 
</simpara></listitem>
254
 
</varlistentry>
255
 
<varlistentry>
256
 
<term><structfield>get_drive</structfield>&#160;()</term>
257
 
<listitem><simpara> Gets a <link linkend="GDrive"><type>GDrive</type></link> the volume is located on. Returns <link linkend="NULL--CAPS"><literal>NULL</literal></link> if the <link linkend="GVolume"><type>GVolume</type></link> is not associated with a <link linkend="GDrive"><type>GDrive</type></link>.
258
 
</simpara></listitem>
259
 
</varlistentry>
260
 
<varlistentry>
261
 
<term><structfield>get_mount</structfield>&#160;()</term>
262
 
<listitem><simpara> Gets a <link linkend="GMount"><type>GMount</type></link> representing the mounted volume. Returns <link linkend="NULL--CAPS"><literal>NULL</literal></link> if the <link linkend="GVolume"><type>GVolume</type></link> is not mounted.
263
 
</simpara></listitem>
264
 
</varlistentry>
265
 
<varlistentry>
266
 
<term><structfield>can_mount</structfield>&#160;()</term>
267
 
<listitem><simpara> Returns <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the <link linkend="GVolume"><type>GVolume</type></link> can be mounted.
268
 
</simpara></listitem>
269
 
</varlistentry>
270
 
<varlistentry>
271
 
<term><structfield>can_eject</structfield>&#160;()</term>
272
 
<listitem><simpara> Checks if a <link linkend="GVolume"><type>GVolume</type></link> can be ejected.
273
 
</simpara></listitem>
274
 
</varlistentry>
275
 
<varlistentry>
276
 
<term><structfield>mount_fn</structfield>&#160;()</term>
277
 
<listitem><simpara> Mounts a given <link linkend="GVolume"><type>GVolume</type></link>. 
278
 
    <link linkend="GVolume"><type>GVolume</type></link> implementations must emit the <link linkend="GMountOperation-aborted"><type>"aborted"</type></link> 
279
 
    signal before completing a mount operation that is aborted while 
280
 
    awaiting input from the user through a <link linkend="GMountOperation"><type>GMountOperation</type></link> instance.
281
 
</simpara></listitem>
282
 
</varlistentry>
283
 
<varlistentry>
284
 
<term><structfield>mount_finish</structfield>&#160;()</term>
285
 
<listitem><simpara> Finishes a mount operation.
286
 
</simpara></listitem>
287
 
</varlistentry>
288
 
<varlistentry>
289
 
<term><structfield>eject</structfield>&#160;()</term>
290
 
<listitem><simpara> Ejects a given <link linkend="GVolume"><type>GVolume</type></link>.
291
 
</simpara></listitem>
292
 
</varlistentry>
293
 
<varlistentry>
294
 
<term><structfield>eject_finish</structfield>&#160;()</term>
295
 
<listitem><simpara> Finishes an eject operation.
296
 
</simpara></listitem>
297
 
</varlistentry>
298
 
<varlistentry>
299
 
<term><structfield>get_identifier</structfield>&#160;()</term>
300
 
<listitem><simpara> Returns the <link linkend="volume-identifier">identifier</link> of the given kind, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if
301
 
   the <link linkend="GVolume"><type>GVolume</type></link> doesn't have one.
302
 
</simpara></listitem>
303
 
</varlistentry>
304
 
<varlistentry>
305
 
<term><structfield>enumerate_identifiers</structfield>&#160;()</term>
306
 
<listitem><simpara> Returns an array strings listing the kinds
307
 
   of <link linkend="volume-identifier">identifiers</link> which the <link linkend="GVolume"><type>GVolume</type></link> has.
308
 
</simpara></listitem>
309
 
</varlistentry>
310
 
<varlistentry>
311
 
<term><structfield>should_automount</structfield>&#160;()</term>
312
 
<listitem><simpara> Returns <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the <link linkend="GVolume"><type>GVolume</type></link> should be automatically mounted.
313
 
</simpara></listitem>
314
 
</varlistentry>
315
 
<varlistentry>
316
 
<term><structfield>get_activation_root</structfield>&#160;()</term>
317
 
<listitem><simpara> Returns the activation root for the <link linkend="GVolume"><type>GVolume</type></link> if it is known in advance or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if
318
 
  it is not known.
319
 
</simpara></listitem>
320
 
</varlistentry>
321
 
<varlistentry>
322
 
<term><structfield>eject_with_operation</structfield>&#160;()</term>
323
 
<listitem><simpara> Starts ejecting a <link linkend="GVolume"><type>GVolume</type></link> using a <link linkend="GMountOperation"><type>GMountOperation</type></link>. Since 2.22.
324
 
</simpara></listitem>
325
 
</varlistentry>
326
 
<varlistentry>
327
 
<term><structfield>eject_with_operation_finish</structfield>&#160;()</term>
328
 
<listitem><simpara> Finishes an eject operation using a <link linkend="GMountOperation"><type>GMountOperation</type></link>. Since 2.22.
329
 
</simpara></listitem>
330
 
</varlistentry>
331
 
</variablelist></refsect2>
332
 
<refsect2 id="g-volume-get-name" role="function">
333
 
<title>g_volume_get_name ()</title>
334
 
<indexterm zone="g-volume-get-name"><primary sortas="volume_get_name">g_volume_get_name</primary></indexterm><programlisting><link linkend="char">char</link> *              g_volume_get_name                   (<link linkend="GVolume">GVolume</link> *volume);</programlisting>
335
 
<para>
336
 
Gets the name of <parameter>volume</parameter>.</para>
337
 
<para>
338
 
</para><variablelist role="params">
339
 
<varlistentry><term><parameter>volume</parameter>&#160;:</term>
340
 
<listitem><simpara> a <link linkend="GVolume"><type>GVolume</type></link>.
341
 
</simpara></listitem></varlistentry>
342
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the name for the given <parameter>volume</parameter>. The returned string should 
343
 
be freed with <link linkend="g-free"><function>g_free()</function></link> when no longer needed.
344
 
</simpara></listitem></varlistentry>
345
 
</variablelist></refsect2>
346
 
<refsect2 id="g-volume-get-uuid" role="function">
347
 
<title>g_volume_get_uuid ()</title>
348
 
<indexterm zone="g-volume-get-uuid"><primary sortas="volume_get_uuid">g_volume_get_uuid</primary></indexterm><programlisting><link linkend="char">char</link> *              g_volume_get_uuid                   (<link linkend="GVolume">GVolume</link> *volume);</programlisting>
349
 
<para>
350
 
Gets the UUID for the <parameter>volume</parameter>. The reference is typically based on
351
 
the file system UUID for the volume in question and should be
352
 
considered an opaque string. Returns <link linkend="NULL--CAPS"><literal>NULL</literal></link> if there is no UUID
353
 
available.</para>
354
 
<para>
355
 
</para><variablelist role="params">
356
 
<varlistentry><term><parameter>volume</parameter>&#160;:</term>
357
 
<listitem><simpara> a <link linkend="GVolume"><type>GVolume</type></link>.
358
 
</simpara></listitem></varlistentry>
359
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the UUID for <parameter>volume</parameter> or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if no UUID can be computed.
360
 
    The returned string should be freed with <link linkend="g-free"><function>g_free()</function></link> 
361
 
    when no longer needed.
362
 
</simpara></listitem></varlistentry>
363
 
</variablelist></refsect2>
364
 
<refsect2 id="g-volume-get-icon" role="function">
365
 
<title>g_volume_get_icon ()</title>
366
 
<indexterm zone="g-volume-get-icon"><primary sortas="volume_get_icon">g_volume_get_icon</primary></indexterm><programlisting><link linkend="GIcon">GIcon</link> *             g_volume_get_icon                   (<link linkend="GVolume">GVolume</link> *volume);</programlisting>
367
 
<para>
368
 
Gets the icon for <parameter>volume</parameter>.</para>
369
 
<para>
370
 
</para><variablelist role="params">
371
 
<varlistentry><term><parameter>volume</parameter>&#160;:</term>
372
 
<listitem><simpara> a <link linkend="GVolume"><type>GVolume</type></link>.
373
 
</simpara></listitem></varlistentry>
374
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GIcon"><type>GIcon</type></link>.
375
 
    The returned object should be unreffed with <link linkend="g-object-unref"><function>g_object_unref()</function></link>
376
 
    when no longer needed.
377
 
</simpara></listitem></varlistentry>
378
 
</variablelist></refsect2>
379
 
<refsect2 id="g-volume-get-drive" role="function">
380
 
<title>g_volume_get_drive ()</title>
381
 
<indexterm zone="g-volume-get-drive"><primary sortas="volume_get_drive">g_volume_get_drive</primary></indexterm><programlisting><link linkend="GDrive">GDrive</link> *            g_volume_get_drive                  (<link linkend="GVolume">GVolume</link> *volume);</programlisting>
382
 
<para>
383
 
Gets the drive for the <parameter>volume</parameter>.</para>
384
 
<para>
385
 
</para><variablelist role="params">
386
 
<varlistentry><term><parameter>volume</parameter>&#160;:</term>
387
 
<listitem><simpara> a <link linkend="GVolume"><type>GVolume</type></link>.
388
 
</simpara></listitem></varlistentry>
389
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GDrive"><type>GDrive</type></link> or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if <parameter>volume</parameter> is not associated with a drive.
390
 
    The returned object should be unreffed with <link linkend="g-object-unref"><function>g_object_unref()</function></link>
391
 
    when no longer needed.
392
 
</simpara></listitem></varlistentry>
393
 
</variablelist></refsect2>
394
 
<refsect2 id="g-volume-get-mount" role="function">
395
 
<title>g_volume_get_mount ()</title>
396
 
<indexterm zone="g-volume-get-mount"><primary sortas="volume_get_mount">g_volume_get_mount</primary></indexterm><programlisting><link linkend="GMount">GMount</link> *            g_volume_get_mount                  (<link linkend="GVolume">GVolume</link> *volume);</programlisting>
397
 
<para>
398
 
Gets the mount for the <parameter>volume</parameter>.</para>
399
 
<para>
400
 
</para><variablelist role="params">
401
 
<varlistentry><term><parameter>volume</parameter>&#160;:</term>
402
 
<listitem><simpara> a <link linkend="GVolume"><type>GVolume</type></link>.
403
 
</simpara></listitem></varlistentry>
404
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GMount"><type>GMount</type></link> or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if <parameter>volume</parameter> isn't mounted.
405
 
    The returned object should be unreffed with <link linkend="g-object-unref"><function>g_object_unref()</function></link>
406
 
    when no longer needed.
407
 
</simpara></listitem></varlistentry>
408
 
</variablelist></refsect2>
409
 
<refsect2 id="g-volume-can-mount" role="function">
410
 
<title>g_volume_can_mount ()</title>
411
 
<indexterm zone="g-volume-can-mount"><primary sortas="volume_can_mount">g_volume_can_mount</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_volume_can_mount                  (<link linkend="GVolume">GVolume</link> *volume);</programlisting>
412
 
<para>
413
 
Checks if a volume can be mounted.</para>
414
 
<para>
415
 
</para><variablelist role="params">
416
 
<varlistentry><term><parameter>volume</parameter>&#160;:</term>
417
 
<listitem><simpara> a <link linkend="GVolume"><type>GVolume</type></link>.
418
 
</simpara></listitem></varlistentry>
419
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the <parameter>volume</parameter> can be mounted. <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise.
420
 
</simpara></listitem></varlistentry>
421
 
</variablelist></refsect2>
422
 
<refsect2 id="g-volume-should-automount" role="function">
423
 
<title>g_volume_should_automount ()</title>
424
 
<indexterm zone="g-volume-should-automount"><primary sortas="volume_should_automount">g_volume_should_automount</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_volume_should_automount           (<link linkend="GVolume">GVolume</link> *volume);</programlisting>
425
 
<para>
426
 
Returns whether the volume should be automatically mounted.</para>
427
 
<para>
428
 
</para><variablelist role="params">
429
 
<varlistentry><term><parameter>volume</parameter>&#160;:</term>
430
 
<listitem><simpara> a <link linkend="GVolume"><type>GVolume</type></link>
431
 
</simpara></listitem></varlistentry>
432
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the volume should be automatically mounted.
433
 
</simpara></listitem></varlistentry>
434
 
</variablelist></refsect2>
435
 
<refsect2 id="g-volume-get-activation-root" role="function" condition="since:2.18">
436
 
<title>g_volume_get_activation_root ()</title>
437
 
<indexterm zone="g-volume-get-activation-root" role="2.18"><primary sortas="volume_get_activation_root">g_volume_get_activation_root</primary></indexterm><programlisting><link linkend="GFile">GFile</link> *             g_volume_get_activation_root        (<link linkend="GVolume">GVolume</link> *volume);</programlisting>
438
 
<para>
439
 
Gets the activation root for a <link linkend="GVolume"><type>GVolume</type></link> if it is known ahead of
440
 
mount time. Returns <link linkend="NULL--CAPS"><literal>NULL</literal></link> otherwise. If not <link linkend="NULL--CAPS"><literal>NULL</literal></link> and if <parameter>volume</parameter>
441
 
is mounted, then the result of <link linkend="g-mount-get-root"><function>g_mount_get_root()</function></link> on the
442
 
<link linkend="GMount"><type>GMount</type></link> object obtained from <link linkend="g-volume-get-mount"><function>g_volume_get_mount()</function></link> will always
443
 
either be equal or a prefix of what this function returns. In
444
 
other words, in code
445
 
</para>
446
 
<para>
447
 
<programlisting>
448
 
  GMount *mount;
449
 
  GFile *mount_root
450
 
  GFile *volume_activation_root;
451
 
 
452
 
  mount = g_volume_get_mount (volume); /&ast; mounted, so never NULL &ast;/
453
 
  mount_root = g_mount_get_root (mount);
454
 
  volume_activation_root = g_volume_get_activation_root(volume); /&ast; assume not NULL &ast;/
455
 
</programlisting>
456
 
</para>
457
 
<para>
458
 
then the expression
459
 
</para>
460
 
<para>
461
 
<programlisting>
462
 
  (g_file_has_prefix (volume_activation_root, mount_root) ||
463
 
      g_file_equal (volume_activation_root, mount_root))
464
 
</programlisting>
465
 
</para>
466
 
<para>
467
 
will always be <link linkend="TRUE--CAPS"><literal>TRUE</literal></link>.
468
 
</para>
469
 
<para>
470
 
Activation roots are typically used in <link linkend="GVolumeMonitor"><type>GVolumeMonitor</type></link>
471
 
implementations to find the underlying mount to shadow, see
472
 
<link linkend="g-mount-is-shadowed"><function>g_mount_is_shadowed()</function></link> for more details.</para>
473
 
<para>
474
 
</para><variablelist role="params">
475
 
<varlistentry><term><parameter>volume</parameter>&#160;:</term>
476
 
<listitem><simpara> a <link linkend="GVolume"><type>GVolume</type></link>
477
 
</simpara></listitem></varlistentry>
478
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the activation root of <parameter>volume</parameter> or <link linkend="NULL--CAPS"><literal>NULL</literal></link>. Use
479
 
<link linkend="g-object-unref"><function>g_object_unref()</function></link> to free.
480
 
 
481
 
</simpara></listitem></varlistentry>
482
 
</variablelist><para role="since">Since 2.18</para></refsect2>
483
 
<refsect2 id="g-volume-mount" role="function">
484
 
<title>g_volume_mount ()</title>
485
 
<indexterm zone="g-volume-mount"><primary sortas="volume_mount">g_volume_mount</primary></indexterm><programlisting><link linkend="void">void</link>                g_volume_mount                      (<link linkend="GVolume">GVolume</link> *volume,
486
 
                                                         <link linkend="GMountMountFlags">GMountMountFlags</link> flags,
487
 
                                                         <link linkend="GMountOperation">GMountOperation</link> *mount_operation,
488
 
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
489
 
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
490
 
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
491
 
<para>
492
 
Mounts a volume. This is an asynchronous operation, and is
493
 
finished by calling <link linkend="g-volume-mount-finish"><function>g_volume_mount_finish()</function></link> with the <parameter>volume</parameter>
494
 
and <link linkend="GAsyncResult"><type>GAsyncResult</type></link> returned in the <parameter>callback</parameter>.</para>
495
 
<para>
496
 
</para><variablelist role="params">
497
 
<varlistentry><term><parameter>volume</parameter>&#160;:</term>
498
 
<listitem><simpara> a <link linkend="GVolume"><type>GVolume</type></link>.
499
 
</simpara></listitem></varlistentry>
500
 
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
501
 
<listitem><simpara> flags affecting the operation
502
 
</simpara></listitem></varlistentry>
503
 
<varlistentry><term><parameter>mount_operation</parameter>&#160;:</term>
504
 
<listitem><simpara> a <link linkend="GMountOperation"><type>GMountOperation</type></link> or <link linkend="NULL--CAPS"><literal>NULL</literal></link> to avoid user interaction.
505
 
</simpara></listitem></varlistentry>
506
 
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
507
 
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
508
 
</simpara></listitem></varlistentry>
509
 
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
510
 
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
511
 
</simpara></listitem></varlistentry>
512
 
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
513
 
<listitem><simpara> user data that gets passed to <parameter>callback</parameter>
514
 
</simpara></listitem></varlistentry>
515
 
</variablelist></refsect2>
516
 
<refsect2 id="g-volume-mount-finish" role="function">
517
 
<title>g_volume_mount_finish ()</title>
518
 
<indexterm zone="g-volume-mount-finish"><primary sortas="volume_mount_finish">g_volume_mount_finish</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_volume_mount_finish               (<link linkend="GVolume">GVolume</link> *volume,
519
 
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
520
 
                                                         <link linkend="GError">GError</link> **error);</programlisting>
521
 
<para>
522
 
Finishes mounting a volume. If any errors occured during the operation,
523
 
<parameter>error</parameter> will be set to contain the errors and <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> will be returned.
524
 
</para>
525
 
<para>
526
 
If the mount operation succeeded, <link linkend="g-volume-get-mount"><function>g_volume_get_mount()</function></link> on <parameter>volume</parameter>
527
 
is guaranteed to return the mount right after calling this
528
 
function; there's no need to listen for the 'mount-added' signal on
529
 
<link linkend="GVolumeMonitor"><type>GVolumeMonitor</type></link>.</para>
530
 
<para>
531
 
</para><variablelist role="params">
532
 
<varlistentry><term><parameter>volume</parameter>&#160;:</term>
533
 
<listitem><simpara> a <link linkend="GVolume"><type>GVolume</type></link>
534
 
</simpara></listitem></varlistentry>
535
 
<varlistentry><term><parameter>result</parameter>&#160;:</term>
536
 
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>
537
 
</simpara></listitem></varlistentry>
538
 
<varlistentry><term><parameter>error</parameter>&#160;:</term>
539
 
<listitem><simpara> a <link linkend="GError"><type>GError</type></link> location to store an error, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore
540
 
</simpara></listitem></varlistentry>
541
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link>, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> if operation failed.
542
 
</simpara></listitem></varlistentry>
543
 
</variablelist></refsect2>
544
 
<refsect2 id="g-volume-can-eject" role="function">
545
 
<title>g_volume_can_eject ()</title>
546
 
<indexterm zone="g-volume-can-eject"><primary sortas="volume_can_eject">g_volume_can_eject</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_volume_can_eject                  (<link linkend="GVolume">GVolume</link> *volume);</programlisting>
547
 
<para>
548
 
Checks if a volume can be ejected.</para>
549
 
<para>
550
 
</para><variablelist role="params">
551
 
<varlistentry><term><parameter>volume</parameter>&#160;:</term>
552
 
<listitem><simpara> a <link linkend="GVolume"><type>GVolume</type></link>.
553
 
</simpara></listitem></varlistentry>
554
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the <parameter>volume</parameter> can be ejected. <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise.
555
 
</simpara></listitem></varlistentry>
556
 
</variablelist></refsect2>
557
 
<refsect2 id="g-volume-eject" role="function" condition="deprecated:2.22: Use g_volume_eject_with_operation() instead.">
558
 
<title>g_volume_eject ()</title>
559
 
<indexterm zone="g-volume-eject" role="deprecated"><primary sortas="volume_eject">g_volume_eject</primary></indexterm><programlisting><link linkend="void">void</link>                g_volume_eject                      (<link linkend="GVolume">GVolume</link> *volume,
560
 
                                                         <link linkend="GMountUnmountFlags">GMountUnmountFlags</link> flags,
561
 
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
562
 
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
563
 
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
564
 
<warning><para><literal>g_volume_eject</literal> has been deprecated since version 2.22 and should not be used in newly-written code. Use <link linkend="g-volume-eject-with-operation"><function>g_volume_eject_with_operation()</function></link> instead.</para></warning>
565
 
<para>
566
 
Ejects a volume. This is an asynchronous operation, and is
567
 
finished by calling <link linkend="g-volume-eject-finish"><function>g_volume_eject_finish()</function></link> with the <parameter>volume</parameter>
568
 
and <link linkend="GAsyncResult"><type>GAsyncResult</type></link> returned in the <parameter>callback</parameter>.</para>
569
 
<para>
570
 
</para><variablelist role="params">
571
 
<varlistentry><term><parameter>volume</parameter>&#160;:</term>
572
 
<listitem><simpara> a <link linkend="GVolume"><type>GVolume</type></link>.
573
 
</simpara></listitem></varlistentry>
574
 
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
575
 
<listitem><simpara> flags affecting the unmount if required for eject
576
 
</simpara></listitem></varlistentry>
577
 
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
578
 
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
579
 
</simpara></listitem></varlistentry>
580
 
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
581
 
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
582
 
</simpara></listitem></varlistentry>
583
 
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
584
 
<listitem><simpara> user data that gets passed to <parameter>callback</parameter>
585
 
</simpara></listitem></varlistentry>
586
 
</variablelist></refsect2>
587
 
<refsect2 id="g-volume-eject-finish" role="function" condition="deprecated:2.22: Use g_volume_eject_with_operation_finish() instead.">
588
 
<title>g_volume_eject_finish ()</title>
589
 
<indexterm zone="g-volume-eject-finish" role="deprecated"><primary sortas="volume_eject_finish">g_volume_eject_finish</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_volume_eject_finish               (<link linkend="GVolume">GVolume</link> *volume,
590
 
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
591
 
                                                         <link linkend="GError">GError</link> **error);</programlisting>
592
 
<warning><para><literal>g_volume_eject_finish</literal> has been deprecated since version 2.22 and should not be used in newly-written code. Use <link linkend="g-volume-eject-with-operation-finish"><function>g_volume_eject_with_operation_finish()</function></link> instead.</para></warning>
593
 
<para>
594
 
Finishes ejecting a volume. If any errors occured during the operation,
595
 
<parameter>error</parameter> will be set to contain the errors and <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> will be returned.</para>
596
 
<para>
597
 
</para><variablelist role="params">
598
 
<varlistentry><term><parameter>volume</parameter>&#160;:</term>
599
 
<listitem><simpara> pointer to a <link linkend="GVolume"><type>GVolume</type></link>.
600
 
</simpara></listitem></varlistentry>
601
 
<varlistentry><term><parameter>result</parameter>&#160;:</term>
602
 
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>.
603
 
</simpara></listitem></varlistentry>
604
 
<varlistentry><term><parameter>error</parameter>&#160;:</term>
605
 
<listitem><simpara> a <link linkend="GError"><type>GError</type></link> location to store an error, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore
606
 
</simpara></listitem></varlistentry>
607
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link>, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> if operation failed.
608
 
 
609
 
</simpara></listitem></varlistentry>
610
 
</variablelist></refsect2>
611
 
<refsect2 id="g-volume-eject-with-operation" role="function" condition="since:2.22">
612
 
<title>g_volume_eject_with_operation ()</title>
613
 
<indexterm zone="g-volume-eject-with-operation" role="2.22"><primary sortas="volume_eject_with_operation">g_volume_eject_with_operation</primary></indexterm><programlisting><link linkend="void">void</link>                g_volume_eject_with_operation       (<link linkend="GVolume">GVolume</link> *volume,
614
 
                                                         <link linkend="GMountUnmountFlags">GMountUnmountFlags</link> flags,
615
 
                                                         <link linkend="GMountOperation">GMountOperation</link> *mount_operation,
616
 
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
617
 
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
618
 
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
619
 
<para>
620
 
Ejects a volume. This is an asynchronous operation, and is
621
 
finished by calling <link linkend="g-volume-eject-with-operation-finish"><function>g_volume_eject_with_operation_finish()</function></link> with the <parameter>volume</parameter>
622
 
and <link linkend="GAsyncResult"><type>GAsyncResult</type></link> data returned in the <parameter>callback</parameter>.</para>
623
 
<para>
624
 
</para><variablelist role="params">
625
 
<varlistentry><term><parameter>volume</parameter>&#160;:</term>
626
 
<listitem><simpara> a <link linkend="GVolume"><type>GVolume</type></link>.
627
 
</simpara></listitem></varlistentry>
628
 
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
629
 
<listitem><simpara> flags affecting the unmount if required for eject
630
 
</simpara></listitem></varlistentry>
631
 
<varlistentry><term><parameter>mount_operation</parameter>&#160;:</term>
632
 
<listitem><simpara> a <link linkend="GMountOperation"><type>GMountOperation</type></link> or <link linkend="NULL--CAPS"><literal>NULL</literal></link> to avoid user interaction.
633
 
</simpara></listitem></varlistentry>
634
 
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
635
 
<listitem><simpara> optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL--CAPS"><literal>NULL</literal></link> to ignore.
636
 
</simpara></listitem></varlistentry>
637
 
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
638
 
<listitem><simpara> a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
639
 
</simpara></listitem></varlistentry>
640
 
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
641
 
<listitem><simpara> user data passed to <parameter>callback</parameter>.
642
 
</simpara></listitem></varlistentry>
643
 
</variablelist><para role="since">Since 2.22</para></refsect2>
644
 
<refsect2 id="g-volume-eject-with-operation-finish" role="function" condition="since:2.22">
645
 
<title>g_volume_eject_with_operation_finish ()</title>
646
 
<indexterm zone="g-volume-eject-with-operation-finish" role="2.22"><primary sortas="volume_eject_with_operation_finish">g_volume_eject_with_operation_finish</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_volume_eject_with_operation_finish
647
 
                                                        (<link linkend="GVolume">GVolume</link> *volume,
648
 
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *result,
649
 
                                                         <link linkend="GError">GError</link> **error);</programlisting>
650
 
<para>
651
 
Finishes ejecting a volume. If any errors occurred during the operation,
652
 
<parameter>error</parameter> will be set to contain the errors and <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> will be returned.</para>
653
 
<para>
654
 
</para><variablelist role="params">
655
 
<varlistentry><term><parameter>volume</parameter>&#160;:</term>
656
 
<listitem><simpara> a <link linkend="GVolume"><type>GVolume</type></link>.
657
 
</simpara></listitem></varlistentry>
658
 
<varlistentry><term><parameter>result</parameter>&#160;:</term>
659
 
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>.
660
 
</simpara></listitem></varlistentry>
661
 
<varlistentry><term><parameter>error</parameter>&#160;:</term>
662
 
<listitem><simpara> a <link linkend="GError"><type>GError</type></link> location to store the error occuring, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> to
663
 
    ignore.
664
 
</simpara></listitem></varlistentry>
665
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the volume was successfully ejected. <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise.
666
 
 
667
 
</simpara></listitem></varlistentry>
668
 
</variablelist><para role="since">Since 2.22</para></refsect2>
669
 
<refsect2 id="G-VOLUME-IDENTIFIER-KIND-HAL-UDI--CAPS" role="macro">
670
 
<title>G_VOLUME_IDENTIFIER_KIND_HAL_UDI</title>
671
 
<indexterm zone="G-VOLUME-IDENTIFIER-KIND-HAL-UDI--CAPS"><primary sortas="VOLUME_IDENTIFIER_KIND_HAL_UDI">G_VOLUME_IDENTIFIER_KIND_HAL_UDI</primary></indexterm><programlisting>#define G_VOLUME_IDENTIFIER_KIND_HAL_UDI "hal-udi"
672
 
</programlisting>
673
 
<para>
674
 
The string used to obtain a Hal UDI with <link linkend="g-volume-get-identifier"><function>g_volume_get_identifier()</function></link>.</para>
675
 
<para>
676
 
</para></refsect2>
677
 
<refsect2 id="G-VOLUME-IDENTIFIER-KIND-LABEL--CAPS" role="macro">
678
 
<title>G_VOLUME_IDENTIFIER_KIND_LABEL</title>
679
 
<indexterm zone="G-VOLUME-IDENTIFIER-KIND-LABEL--CAPS"><primary sortas="VOLUME_IDENTIFIER_KIND_LABEL">G_VOLUME_IDENTIFIER_KIND_LABEL</primary></indexterm><programlisting>#define G_VOLUME_IDENTIFIER_KIND_LABEL "label"
680
 
</programlisting>
681
 
<para>
682
 
The string used to obtain a filesystem label with <link linkend="g-volume-get-identifier"><function>g_volume_get_identifier()</function></link>.</para>
683
 
<para>
684
 
</para></refsect2>
685
 
<refsect2 id="G-VOLUME-IDENTIFIER-KIND-NFS-MOUNT--CAPS" role="macro">
686
 
<title>G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT</title>
687
 
<indexterm zone="G-VOLUME-IDENTIFIER-KIND-NFS-MOUNT--CAPS"><primary sortas="VOLUME_IDENTIFIER_KIND_NFS_MOUNT">G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT</primary></indexterm><programlisting>#define G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT "nfs-mount"
688
 
</programlisting>
689
 
<para>
690
 
The string used to obtain a NFS mount with <link linkend="g-volume-get-identifier"><function>g_volume_get_identifier()</function></link>.</para>
691
 
<para>
692
 
</para></refsect2>
693
 
<refsect2 id="G-VOLUME-IDENTIFIER-KIND-UNIX-DEVICE--CAPS" role="macro">
694
 
<title>G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE</title>
695
 
<indexterm zone="G-VOLUME-IDENTIFIER-KIND-UNIX-DEVICE--CAPS"><primary sortas="VOLUME_IDENTIFIER_KIND_UNIX_DEVICE">G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE</primary></indexterm><programlisting>#define G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE "unix-device"
696
 
</programlisting>
697
 
<para>
698
 
The string used to obtain a Unix device path with <link linkend="g-volume-get-identifier"><function>g_volume_get_identifier()</function></link>.</para>
699
 
<para>
700
 
</para></refsect2>
701
 
<refsect2 id="G-VOLUME-IDENTIFIER-KIND-UUID--CAPS" role="macro">
702
 
<title>G_VOLUME_IDENTIFIER_KIND_UUID</title>
703
 
<indexterm zone="G-VOLUME-IDENTIFIER-KIND-UUID--CAPS"><primary sortas="VOLUME_IDENTIFIER_KIND_UUID">G_VOLUME_IDENTIFIER_KIND_UUID</primary></indexterm><programlisting>#define G_VOLUME_IDENTIFIER_KIND_UUID "uuid"
704
 
</programlisting>
705
 
<para>
706
 
The string used to obtain a UUID with <link linkend="g-volume-get-identifier"><function>g_volume_get_identifier()</function></link>.</para>
707
 
<para>
708
 
</para></refsect2>
709
 
<refsect2 id="g-volume-enumerate-identifiers" role="function">
710
 
<title>g_volume_enumerate_identifiers ()</title>
711
 
<indexterm zone="g-volume-enumerate-identifiers"><primary sortas="volume_enumerate_identifiers">g_volume_enumerate_identifiers</primary></indexterm><programlisting><link linkend="char">char</link> **             g_volume_enumerate_identifiers      (<link linkend="GVolume">GVolume</link> *volume);</programlisting>
712
 
<para>
713
 
Gets the kinds of <link linkend="volume-identifier">identifiers</link>
714
 
that <parameter>volume</parameter> has. Use <link linkend="g-volume-get-identifer"><function>g_volume_get_identifer()</function></link> to obtain 
715
 
the identifiers themselves.</para>
716
 
<para>
717
 
</para><variablelist role="params">
718
 
<varlistentry><term><parameter>volume</parameter>&#160;:</term>
719
 
<listitem><simpara> a <link linkend="GVolume"><type>GVolume</type></link>
720
 
</simpara></listitem></varlistentry>
721
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="NULL--CAPS"><literal>NULL</literal></link>-terminated array of strings containing
722
 
  kinds of identifiers. Use <link linkend="g-strfreev"><function>g_strfreev()</function></link> to free.
723
 
</simpara></listitem></varlistentry>
724
 
</variablelist></refsect2>
725
 
<refsect2 id="g-volume-get-identifier" role="function">
726
 
<title>g_volume_get_identifier ()</title>
727
 
<indexterm zone="g-volume-get-identifier"><primary sortas="volume_get_identifier">g_volume_get_identifier</primary></indexterm><programlisting><link linkend="char">char</link> *              g_volume_get_identifier             (<link linkend="GVolume">GVolume</link> *volume,
728
 
                                                         const <link linkend="char">char</link> *kind);</programlisting>
729
 
<para>
730
 
Gets the identifier of the given kind for <parameter>volume</parameter>. 
731
 
See the <link linkend="volume-identifier">introduction</link>
732
 
for more information about volume identifiers.</para>
733
 
<para>
734
 
</para><variablelist role="params">
735
 
<varlistentry><term><parameter>volume</parameter>&#160;:</term>
736
 
<listitem><simpara> a <link linkend="GVolume"><type>GVolume</type></link>
737
 
</simpara></listitem></varlistentry>
738
 
<varlistentry><term><parameter>kind</parameter>&#160;:</term>
739
 
<listitem><simpara> the kind of identifier to return
740
 
</simpara></listitem></varlistentry>
741
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a newly allocated string containing the
742
 
  requested identfier, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if the <link linkend="GVolume"><type>GVolume</type></link>
743
 
  doesn't have this kind of identifier
744
 
</simpara></listitem></varlistentry>
745
 
</variablelist></refsect2>
746
 
 
747
 
</refsect1>
748
 
 
749
 
<refsect1 id="GVolume.signal-details" role="signals">
750
 
<title role="signals.title">Signal Details</title>
751
 
<refsect2 id="GVolume-changed" role="signal"><title>The <literal>&quot;changed&quot;</literal> signal</title>
752
 
<indexterm zone="GVolume-changed"><primary sortas="Volume::changed">GVolume::changed</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GVolume">GVolume</link> *arg0,
753
 
                                                        <link linkend="gpointer">gpointer</link> user_data)      : Run Last</programlisting>
754
 
<para>
755
 
Emitted when the volume has been changed.</para>
756
 
<para>
757
 
</para><variablelist role="params">
758
 
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
759
 
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
760
 
</variablelist></refsect2><refsect2 id="GVolume-removed" role="signal"><title>The <literal>&quot;removed&quot;</literal> signal</title>
761
 
<indexterm zone="GVolume-removed"><primary sortas="Volume::removed">GVolume::removed</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GVolume">GVolume</link> *arg0,
762
 
                                                        <link linkend="gpointer">gpointer</link> user_data)      : Run Last</programlisting>
763
 
<para>
764
 
This signal is emitted when the <link linkend="GVolume"><type>GVolume</type></link> have been removed. If
765
 
the recipient is holding references to the object they should
766
 
release them so the object can be finalized.</para>
767
 
<para>
768
 
</para><variablelist role="params">
769
 
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
770
 
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
771
 
</variablelist></refsect2>
772
 
</refsect1>
773
 
 
774
 
 
775
 
 
776
 
</refentry>