34
34
<link rel="chapter" href="ch19.html" title="Migrating from GnomeVFS to GIO">
35
35
<link rel="chapter" href="gio-hierarchy.html" title="Object Hierarchy">
36
36
<link rel="index" href="ix01.html" title="Index">
37
<link rel="index" href="ix02.html" title="Index of new symbols in 2.18">
38
<link rel="index" href="ix03.html" title="Index of new symbols in 2.20">
39
<link rel="index" href="ix04.html" title="Index of new symbols in 2.22">
37
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
38
<link rel="index" href="ix03.html" title="Index of new symbols in 2.18">
39
<link rel="index" href="ix04.html" title="Index of new symbols in 2.20">
40
<link rel="index" href="ix05.html" title="Index of new symbols in 2.22">
41
42
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
42
43
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
104
105
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
105
106
>GError</a> **error);
107
void <a class="link" href="GMount.html#g-mount-unmount-with-operation" title="g_mount_unmount_with_operation ()">g_mount_unmount_with_operation</a> (<a class="link" href="GMount.html" title="GMount">GMount</a> *mount,
108
<a class="link" href="GMount.html#GMountUnmountFlags" title="enum GMountUnmountFlags">GMountUnmountFlags</a> flags,
109
<a class="link" href="GMountOperation.html" title="GMountOperation">GMountOperation</a> *mount_operation,
110
<a class="link" href="GCancellable.html" title="GCancellable">GCancellable</a> *cancellable,
111
<a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()">GAsyncReadyCallback</a> callback,
113
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
114
>gpointer</a> user_data);
116
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
117
>gboolean</a> <a class="link" href="GMount.html#g-mount-unmount-with-operation-finish" title="g_mount_unmount_with_operation_finish ()">g_mount_unmount_with_operation_finish</a>
118
(<a class="link" href="GMount.html" title="GMount">GMount</a> *mount,
119
<a class="link" href="GAsyncResult.html" title="GAsyncResult">GAsyncResult</a> *result,
121
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
122
>GError</a> **error);
106
123
void <a class="link" href="GMount.html#g-mount-remount" title="g_mount_remount ()">g_mount_remount</a> (<a class="link" href="GMount.html" title="GMount">GMount</a> *mount,
107
124
<a class="link" href="GMount.html#GMountMountFlags" title="enum GMountMountFlags">GMountMountFlags</a> flags,
108
125
<a class="link" href="GMountOperation.html" title="GMountOperation">GMountOperation</a> *mount_operation,
136
153
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
137
154
>GError</a> **error);
155
void <a class="link" href="GMount.html#g-mount-eject-with-operation" title="g_mount_eject_with_operation ()">g_mount_eject_with_operation</a> (<a class="link" href="GMount.html" title="GMount">GMount</a> *mount,
156
<a class="link" href="GMount.html#GMountUnmountFlags" title="enum GMountUnmountFlags">GMountUnmountFlags</a> flags,
157
<a class="link" href="GMountOperation.html" title="GMountOperation">GMountOperation</a> *mount_operation,
158
<a class="link" href="GCancellable.html" title="GCancellable">GCancellable</a> *cancellable,
159
<a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()">GAsyncReadyCallback</a> callback,
161
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
162
>gpointer</a> user_data);
164
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
165
>gboolean</a> <a class="link" href="GMount.html#g-mount-eject-with-operation-finish" title="g_mount_eject_with_operation_finish ()">g_mount_eject_with_operation_finish</a> (<a class="link" href="GMount.html" title="GMount">GMount</a> *mount,
166
<a class="link" href="GAsyncResult.html" title="GAsyncResult">GAsyncResult</a> *result,
168
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
169
>GError</a> **error);
138
170
void <a class="link" href="GMount.html#g-mount-guess-content-type" title="g_mount_guess_content_type ()">g_mount_guess_content_type</a> (<a class="link" href="GMount.html" title="GMount">GMount</a> *mount,
140
172
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
209
241
Unmounting a <a class="link" href="GMount.html" title="GMount"><span class="type">GMount</span></a> instance is an asynchronous operation. For
210
242
more information about asynchronous operations, see <span class="type">GAsyncReady</span>
211
243
and <span class="type">GSimpleAsyncReady</span>. To unmount a <a class="link" href="GMount.html" title="GMount"><span class="type">GMount</span></a> instance, first call
212
<a class="link" href="GMount.html#g-mount-unmount" title="g_mount_unmount ()"><code class="function">g_mount_unmount()</code></a> with (at least) the <a class="link" href="GMount.html" title="GMount"><span class="type">GMount</span></a> instance and a
244
<a class="link" href="GMount.html#g-mount-unmount-with-operation" title="g_mount_unmount_with_operation ()"><code class="function">g_mount_unmount_with_operation()</code></a> with (at least) the <a class="link" href="GMount.html" title="GMount"><span class="type">GMount</span></a> instance and a
213
245
<a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>. The callback will be fired when the
214
246
operation has resolved (either with success or failure), and a
215
247
<span class="type">GAsyncReady</span> structure will be passed to the callback. That
216
callback should then call <a class="link" href="GMount.html#g-mount-unmount-finish" title="g_mount_unmount_finish ()"><code class="function">g_mount_unmount_finish()</code></a> with the <a class="link" href="GMount.html" title="GMount"><span class="type">GMount</span></a>
248
callback should then call <a class="link" href="GMount.html#g-mount-unmount-with-operation-finish" title="g_mount_unmount_with_operation_finish ()"><code class="function">g_mount_unmount_with_operation_finish()</code></a> with the <a class="link" href="GMount.html" title="GMount"><span class="type">GMount</span></a>
217
249
and the <span class="type">GAsyncReady</span> data to see if the operation was completed
218
successfully. If an <em class="parameter"><code>error</code></em> is present when <a class="link" href="GMount.html#g-mount-unmount-finish" title="g_mount_unmount_finish ()"><code class="function">g_mount_unmount_finish()</code></a>
250
successfully. If an <em class="parameter"><code>error</code></em> is present when <a class="link" href="GMount.html#g-mount-unmount-with-operation-finish" title="g_mount_unmount_with_operation_finish ()"><code class="function">g_mount_unmount_with_operation_finish()</code></a>
219
251
is called, then it will be filled with any error information.</p>
293
325
GCancellable *cancellable,
296
/* yet more signals */
328
/* Signal, not VFunc */
297
329
void (* pre_unmount) (GMount *mount);
331
void (* unmount_with_operation) (GMount *mount,
332
GMountUnmountFlags flags,
333
GMountOperation *mount_operation,
334
GCancellable *cancellable,
335
GAsyncReadyCallback callback,
337
gboolean (* unmount_with_operation_finish) (GMount *mount,
338
GAsyncResult *result,
341
void (* eject_with_operation) (GMount *mount,
342
GMountUnmountFlags flags,
343
GMountOperation *mount_operation,
344
GCancellable *cancellable,
345
GAsyncReadyCallback callback,
347
gboolean (* eject_with_operation_finish) (GMount *mount,
348
GAsyncResult *result,
419
471
<td> The pre_unmout signal that is emitted when the <a class="link" href="GMount.html" title="GMount"><span class="type">GMount</span></a> will soon be emitted. If the recipient is somehow holding the mount open by keeping an open file on it it should close the file.
475
<td><p><span class="term"><em class="structfield"><code>unmount_with_operation</code></em> ()</span></p></td>
476
<td> Starts unmounting a <a class="link" href="GMount.html" title="GMount"><span class="type">GMount</span></a> using a <a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a>. Since 2.22.
480
<td><p><span class="term"><em class="structfield"><code>unmount_with_operation_finish</code></em> ()</span></p></td>
481
<td> Finishes an unmounting operation using a <a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a>. Since 2.22.
485
<td><p><span class="term"><em class="structfield"><code>eject_with_operation</code></em> ()</span></p></td>
486
<td> Starts ejecting a <a class="link" href="GMount.html" title="GMount"><span class="type">GMount</span></a> using a <a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a>. Since 2.22.
490
<td><p><span class="term"><em class="structfield"><code>eject_with_operation_finish</code></em> ()</span></p></td>
491
<td> Finishes an eject operation using a <a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a>. Since 2.22.
780
860
><code class="literal">TRUE</code></a> if the mount was successfully unmounted. <a
781
861
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
782
862
><code class="literal">FALSE</code></a> otherwise.
870
<div class="refsect2" title="g_mount_unmount_with_operation ()">
871
<a name="g-mount-unmount-with-operation"></a><h3>g_mount_unmount_with_operation ()</h3>
872
<pre class="programlisting">void g_mount_unmount_with_operation (<a class="link" href="GMount.html" title="GMount">GMount</a> *mount,
873
<a class="link" href="GMount.html#GMountUnmountFlags" title="enum GMountUnmountFlags">GMountUnmountFlags</a> flags,
874
<a class="link" href="GMountOperation.html" title="GMountOperation">GMountOperation</a> *mount_operation,
875
<a class="link" href="GCancellable.html" title="GCancellable">GCancellable</a> *cancellable,
876
<a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()">GAsyncReadyCallback</a> callback,
878
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
879
>gpointer</a> user_data);</pre>
881
Unmounts a mount. This is an asynchronous operation, and is
882
finished by calling <a class="link" href="GMount.html#g-mount-unmount-with-operation-finish" title="g_mount_unmount_with_operation_finish ()"><code class="function">g_mount_unmount_with_operation_finish()</code></a> with the <em class="parameter"><code>mount</code></em>
883
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>
886
<div class="variablelist"><table border="0">
887
<col align="left" valign="top">
890
<td><p><span class="term"><em class="parameter"><code>mount</code></em> :</span></p></td>
891
<td> a <a class="link" href="GMount.html" title="GMount"><span class="type">GMount</span></a>.
895
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
896
<td> flags affecting the operation
900
<td><p><span class="term"><em class="parameter"><code>mount_operation</code></em> :</span></p></td>
901
<td> a <a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a> or <a
902
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
903
><code class="literal">NULL</code></a> to avoid user interaction.
907
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
908
<td> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a
909
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
910
><code class="literal">NULL</code></a> to ignore.
914
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
915
<td> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>, or <a
916
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
917
><code class="literal">NULL</code></a>.
921
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
922
<td> user data passed to <em class="parameter"><code>callback</code></em>.
927
<p class="since">Since 2.22</p>
930
<div class="refsect2" title="g_mount_unmount_with_operation_finish ()">
931
<a name="g-mount-unmount-with-operation-finish"></a><h3>g_mount_unmount_with_operation_finish ()</h3>
932
<pre class="programlisting"><a
933
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
934
>gboolean</a> g_mount_unmount_with_operation_finish
935
(<a class="link" href="GMount.html" title="GMount">GMount</a> *mount,
936
<a class="link" href="GAsyncResult.html" title="GAsyncResult">GAsyncResult</a> *result,
938
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
939
>GError</a> **error);</pre>
941
Finishes unmounting a mount. If any errors occurred during the operation,
942
<em class="parameter"><code>error</code></em> will be set to contain the errors and <a
943
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
944
><code class="literal">FALSE</code></a> will be returned.</p>
947
<div class="variablelist"><table border="0">
948
<col align="left" valign="top">
951
<td><p><span class="term"><em class="parameter"><code>mount</code></em> :</span></p></td>
952
<td> a <a class="link" href="GMount.html" title="GMount"><span class="type">GMount</span></a>.
956
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
957
<td> a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a>.
961
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
963
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
964
><span class="type">GError</span></a> location to store the error occuring, or <a
965
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
966
><code class="literal">NULL</code></a> to
971
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
973
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
974
><code class="literal">TRUE</code></a> if the mount was successfully unmounted. <a
975
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
976
><code class="literal">FALSE</code></a> otherwise.
982
<p class="since">Since 2.22</p>
789
985
<div class="refsect2" title="g_mount_remount ()">
1029
1233
><code class="literal">TRUE</code></a> if the mount was successfully ejected. <a
1030
1234
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
1031
1235
><code class="literal">FALSE</code></a> otherwise.
1243
<div class="refsect2" title="g_mount_eject_with_operation ()">
1244
<a name="g-mount-eject-with-operation"></a><h3>g_mount_eject_with_operation ()</h3>
1245
<pre class="programlisting">void g_mount_eject_with_operation (<a class="link" href="GMount.html" title="GMount">GMount</a> *mount,
1246
<a class="link" href="GMount.html#GMountUnmountFlags" title="enum GMountUnmountFlags">GMountUnmountFlags</a> flags,
1247
<a class="link" href="GMountOperation.html" title="GMountOperation">GMountOperation</a> *mount_operation,
1248
<a class="link" href="GCancellable.html" title="GCancellable">GCancellable</a> *cancellable,
1249
<a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()">GAsyncReadyCallback</a> callback,
1251
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
1252
>gpointer</a> user_data);</pre>
1254
Ejects a mount. This is an asynchronous operation, and is
1255
finished by calling <a class="link" href="GMount.html#g-mount-eject-with-operation-finish" title="g_mount_eject_with_operation_finish ()"><code class="function">g_mount_eject_with_operation_finish()</code></a> with the <em class="parameter"><code>mount</code></em>
1256
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>
1259
<div class="variablelist"><table border="0">
1260
<col align="left" valign="top">
1263
<td><p><span class="term"><em class="parameter"><code>mount</code></em> :</span></p></td>
1264
<td> a <a class="link" href="GMount.html" title="GMount"><span class="type">GMount</span></a>.
1268
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
1269
<td> flags affecting the unmount if required for eject
1273
<td><p><span class="term"><em class="parameter"><code>mount_operation</code></em> :</span></p></td>
1274
<td> a <a class="link" href="GMountOperation.html" title="GMountOperation"><span class="type">GMountOperation</span></a> or <a
1275
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
1276
><code class="literal">NULL</code></a> to avoid user interaction.
1280
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
1281
<td> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a
1282
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
1283
><code class="literal">NULL</code></a> to ignore.
1287
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
1288
<td> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>, or <a
1289
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
1290
><code class="literal">NULL</code></a>.
1294
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
1295
<td> user data passed to <em class="parameter"><code>callback</code></em>.
1300
<p class="since">Since 2.22</p>
1303
<div class="refsect2" title="g_mount_eject_with_operation_finish ()">
1304
<a name="g-mount-eject-with-operation-finish"></a><h3>g_mount_eject_with_operation_finish ()</h3>
1305
<pre class="programlisting"><a
1306
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
1307
>gboolean</a> g_mount_eject_with_operation_finish (<a class="link" href="GMount.html" title="GMount">GMount</a> *mount,
1308
<a class="link" href="GAsyncResult.html" title="GAsyncResult">GAsyncResult</a> *result,
1310
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
1311
>GError</a> **error);</pre>
1313
Finishes ejecting a mount. If any errors occurred during the operation,
1314
<em class="parameter"><code>error</code></em> will be set to contain the errors and <a
1315
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
1316
><code class="literal">FALSE</code></a> will be returned.</p>
1319
<div class="variablelist"><table border="0">
1320
<col align="left" valign="top">
1323
<td><p><span class="term"><em class="parameter"><code>mount</code></em> :</span></p></td>
1324
<td> a <a class="link" href="GMount.html" title="GMount"><span class="type">GMount</span></a>.
1328
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
1329
<td> a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a>.
1333
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
1335
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
1336
><span class="type">GError</span></a> location to store the error occuring, or <a
1337
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
1338
><code class="literal">NULL</code></a> to
1343
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1345
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
1346
><code class="literal">TRUE</code></a> if the mount was successfully ejected. <a
1347
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
1348
><code class="literal">FALSE</code></a> otherwise.
1354
<p class="since">Since 2.22</p>
1038
1357
<div class="refsect2" title="g_mount_guess_content_type ()">