1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19 
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 
25 module gio.MountT;
26 
27 public  import gio.AsyncResultIF;
28 public  import gio.Cancellable;
29 public  import gio.Drive;
30 public  import gio.DriveIF;
31 public  import gio.File;
32 public  import gio.FileIF;
33 public  import gio.Icon;
34 public  import gio.IconIF;
35 public  import gio.MountOperation;
36 public  import gio.Volume;
37 public  import gio.VolumeIF;
38 public  import glib.ErrorG;
39 public  import glib.GException;
40 public  import glib.Str;
41 public  import gobject.ObjectG;
42 public  import gobject.Signals;
43 public  import gtkc.gdktypes;
44 public  import gtkc.gio;
45 public  import gtkc.giotypes;
46 
47 
48 /**
49  * The #GMount interface represents user-visible mounts. Note, when
50  * porting from GnomeVFS, #GMount is the moral equivalent of #GnomeVFSVolume.
51  * 
52  * #GMount is a "mounted" filesystem that you can access. Mounted is in
53  * quotes because it's not the same as a unix mount, it might be a gvfs
54  * mount, but you can still access the files on it if you use GIO. Might or
55  * might not be related to a volume object.
56  * 
57  * Unmounting a #GMount instance is an asynchronous operation. For
58  * more information about asynchronous operations, see #GAsyncResult
59  * and #GTask. To unmount a #GMount instance, first call
60  * g_mount_unmount_with_operation() with (at least) the #GMount instance and a
61  * #GAsyncReadyCallback.  The callback will be fired when the
62  * operation has resolved (either with success or failure), and a
63  * #GAsyncReady structure will be passed to the callback.  That
64  * callback should then call g_mount_unmount_with_operation_finish() with the #GMount
65  * and the #GAsyncReady data to see if the operation was completed
66  * successfully.  If an @error is present when g_mount_unmount_with_operation_finish()
67  * is called, then it will be filled with any error information.
68  */
69 public template MountT(TStruct)
70 {
71 	/** Get the main Gtk struct */
72 	public GMount* getMountStruct()
73 	{
74 		return cast(GMount*)getStruct();
75 	}
76 
77 	/**
78 	 */
79 
80 	/**
81 	 * Checks if @mount can be eject.
82 	 *
83 	 * Return: %TRUE if the @mount can be ejected.
84 	 */
85 	public bool canEject()
86 	{
87 		return g_mount_can_eject(getMountStruct()) != 0;
88 	}
89 
90 	/**
91 	 * Checks if @mount can be mounted.
92 	 *
93 	 * Return: %TRUE if the @mount can be unmounted.
94 	 */
95 	public bool canUnmount()
96 	{
97 		return g_mount_can_unmount(getMountStruct()) != 0;
98 	}
99 
100 	/**
101 	 * Ejects a mount. This is an asynchronous operation, and is
102 	 * finished by calling g_mount_eject_finish() with the @mount
103 	 * and #GAsyncResult data returned in the @callback.
104 	 *
105 	 * Deprecated: Use g_mount_eject_with_operation() instead.
106 	 *
107 	 * Params:
108 	 *     flags = flags affecting the unmount if required for eject
109 	 *     cancellable = optional #GCancellable object, %NULL to ignore.
110 	 *     callback = a #GAsyncReadyCallback, or %NULL.
111 	 *     userData = user data passed to @callback.
112 	 */
113 	public void eject(GMountUnmountFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)
114 	{
115 		g_mount_eject(getMountStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData);
116 	}
117 
118 	/**
119 	 * Finishes ejecting a mount. If any errors occurred during the operation,
120 	 * @error will be set to contain the errors and %FALSE will be returned.
121 	 *
122 	 * Deprecated: Use g_mount_eject_with_operation_finish() instead.
123 	 *
124 	 * Params:
125 	 *     result = a #GAsyncResult.
126 	 *
127 	 * Return: %TRUE if the mount was successfully ejected. %FALSE otherwise.
128 	 *
129 	 * Throws: GException on failure.
130 	 */
131 	public bool ejectFinish(AsyncResultIF result)
132 	{
133 		GError* err = null;
134 		
135 		auto p = g_mount_eject_finish(getMountStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0;
136 		
137 		if (err !is null)
138 		{
139 			throw new GException( new ErrorG(err) );
140 		}
141 		
142 		return p;
143 	}
144 
145 	/**
146 	 * Ejects a mount. This is an asynchronous operation, and is
147 	 * finished by calling g_mount_eject_with_operation_finish() with the @mount
148 	 * and #GAsyncResult data returned in the @callback.
149 	 *
150 	 * Params:
151 	 *     flags = flags affecting the unmount if required for eject
152 	 *     mountOperation = a #GMountOperation or %NULL to avoid
153 	 *         user interaction.
154 	 *     cancellable = optional #GCancellable object, %NULL to ignore.
155 	 *     callback = a #GAsyncReadyCallback, or %NULL.
156 	 *     userData = user data passed to @callback.
157 	 *
158 	 * Since: 2.22
159 	 */
160 	public void ejectWithOperation(GMountUnmountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)
161 	{
162 		g_mount_eject_with_operation(getMountStruct(), flags, (mountOperation is null) ? null : mountOperation.getMountOperationStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData);
163 	}
164 
165 	/**
166 	 * Finishes ejecting a mount. If any errors occurred during the operation,
167 	 * @error will be set to contain the errors and %FALSE will be returned.
168 	 *
169 	 * Params:
170 	 *     result = a #GAsyncResult.
171 	 *
172 	 * Return: %TRUE if the mount was successfully ejected. %FALSE otherwise.
173 	 *
174 	 * Since: 2.22
175 	 *
176 	 * Throws: GException on failure.
177 	 */
178 	public bool ejectWithOperationFinish(AsyncResultIF result)
179 	{
180 		GError* err = null;
181 		
182 		auto p = g_mount_eject_with_operation_finish(getMountStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0;
183 		
184 		if (err !is null)
185 		{
186 			throw new GException( new ErrorG(err) );
187 		}
188 		
189 		return p;
190 	}
191 
192 	/**
193 	 * Gets the default location of @mount. The default location of the given
194 	 * @mount is a path that reflects the main entry point for the user (e.g.
195 	 * the home directory, or the root of the volume).
196 	 *
197 	 * Return: a #GFile.
198 	 *     The returned object should be unreffed with
199 	 *     g_object_unref() when no longer needed.
200 	 */
201 	public FileIF getDefaultLocation()
202 	{
203 		auto p = g_mount_get_default_location(getMountStruct());
204 		
205 		if(p is null)
206 		{
207 			return null;
208 		}
209 		
210 		return ObjectG.getDObject!(File, FileIF)(cast(GFile*) p);
211 	}
212 
213 	/**
214 	 * Gets the drive for the @mount.
215 	 *
216 	 * This is a convenience method for getting the #GVolume and then
217 	 * using that object to get the #GDrive.
218 	 *
219 	 * Return: a #GDrive or %NULL if @mount is not associated with a volume or a drive.
220 	 *     The returned object should be unreffed with
221 	 *     g_object_unref() when no longer needed.
222 	 */
223 	public DriveIF getDrive()
224 	{
225 		auto p = g_mount_get_drive(getMountStruct());
226 		
227 		if(p is null)
228 		{
229 			return null;
230 		}
231 		
232 		return ObjectG.getDObject!(Drive, DriveIF)(cast(GDrive*) p);
233 	}
234 
235 	/**
236 	 * Gets the icon for @mount.
237 	 *
238 	 * Return: a #GIcon.
239 	 *     The returned object should be unreffed with
240 	 *     g_object_unref() when no longer needed.
241 	 */
242 	public IconIF getIcon()
243 	{
244 		auto p = g_mount_get_icon(getMountStruct());
245 		
246 		if(p is null)
247 		{
248 			return null;
249 		}
250 		
251 		return ObjectG.getDObject!(Icon, IconIF)(cast(GIcon*) p);
252 	}
253 
254 	/**
255 	 * Gets the name of @mount.
256 	 *
257 	 * Return: the name for the given @mount.
258 	 *     The returned string should be freed with g_free()
259 	 *     when no longer needed.
260 	 */
261 	public string getName()
262 	{
263 		return Str.toString(g_mount_get_name(getMountStruct()));
264 	}
265 
266 	/**
267 	 * Gets the root directory on @mount.
268 	 *
269 	 * Return: a #GFile.
270 	 *     The returned object should be unreffed with
271 	 *     g_object_unref() when no longer needed.
272 	 */
273 	public FileIF getRoot()
274 	{
275 		auto p = g_mount_get_root(getMountStruct());
276 		
277 		if(p is null)
278 		{
279 			return null;
280 		}
281 		
282 		return ObjectG.getDObject!(File, FileIF)(cast(GFile*) p);
283 	}
284 
285 	/**
286 	 * Gets the sort key for @mount, if any.
287 	 *
288 	 * Return: Sorting key for @mount or %NULL if no such key is available.
289 	 *
290 	 * Since: 2.32
291 	 */
292 	public string getSortKey()
293 	{
294 		return Str.toString(g_mount_get_sort_key(getMountStruct()));
295 	}
296 
297 	/**
298 	 * Gets the symbolic icon for @mount.
299 	 *
300 	 * Return: a #GIcon.
301 	 *     The returned object should be unreffed with
302 	 *     g_object_unref() when no longer needed.
303 	 *
304 	 * Since: 2.34
305 	 */
306 	public IconIF getSymbolicIcon()
307 	{
308 		auto p = g_mount_get_symbolic_icon(getMountStruct());
309 		
310 		if(p is null)
311 		{
312 			return null;
313 		}
314 		
315 		return ObjectG.getDObject!(Icon, IconIF)(cast(GIcon*) p);
316 	}
317 
318 	/**
319 	 * Gets the UUID for the @mount. The reference is typically based on
320 	 * the file system UUID for the mount in question and should be
321 	 * considered an opaque string. Returns %NULL if there is no UUID
322 	 * available.
323 	 *
324 	 * Return: the UUID for @mount or %NULL if no UUID can be computed.
325 	 *     The returned string should be freed with g_free()
326 	 *     when no longer needed.
327 	 */
328 	public string getUuid()
329 	{
330 		return Str.toString(g_mount_get_uuid(getMountStruct()));
331 	}
332 
333 	/**
334 	 * Gets the volume for the @mount.
335 	 *
336 	 * Return: a #GVolume or %NULL if @mount is not associated with a volume.
337 	 *     The returned object should be unreffed with
338 	 *     g_object_unref() when no longer needed.
339 	 */
340 	public VolumeIF getVolume()
341 	{
342 		auto p = g_mount_get_volume(getMountStruct());
343 		
344 		if(p is null)
345 		{
346 			return null;
347 		}
348 		
349 		return ObjectG.getDObject!(Volume, VolumeIF)(cast(GVolume*) p);
350 	}
351 
352 	/**
353 	 * Tries to guess the type of content stored on @mount. Returns one or
354 	 * more textual identifiers of well-known content types (typically
355 	 * prefixed with "x-content/"), e.g. x-content/image-dcf for camera
356 	 * memory cards. See the
357 	 * [shared-mime-info](http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec)
358 	 * specification for more on x-content types.
359 	 *
360 	 * This is an asynchronous operation (see
361 	 * g_mount_guess_content_type_sync() for the synchronous version), and
362 	 * is finished by calling g_mount_guess_content_type_finish() with the
363 	 * @mount and #GAsyncResult data returned in the @callback.
364 	 *
365 	 * Params:
366 	 *     forceRescan = Whether to force a rescan of the content.
367 	 *         Otherwise a cached result will be used if available
368 	 *     cancellable = optional #GCancellable object, %NULL to ignore
369 	 *     callback = a #GAsyncReadyCallback
370 	 *     userData = user data passed to @callback
371 	 *
372 	 * Since: 2.18
373 	 */
374 	public void guessContentType(bool forceRescan, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)
375 	{
376 		g_mount_guess_content_type(getMountStruct(), forceRescan, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData);
377 	}
378 
379 	/**
380 	 * Finishes guessing content types of @mount. If any errors occurred
381 	 * during the operation, @error will be set to contain the errors and
382 	 * %FALSE will be returned. In particular, you may get an
383 	 * %G_IO_ERROR_NOT_SUPPORTED if the mount does not support content
384 	 * guessing.
385 	 *
386 	 * Params:
387 	 *     result = a #GAsyncResult
388 	 *
389 	 * Return: a %NULL-terminated array of content types or %NULL on error.
390 	 *     Caller should free this array with g_strfreev() when done with it.
391 	 *
392 	 * Since: 2.18
393 	 *
394 	 * Throws: GException on failure.
395 	 */
396 	public string[] guessContentTypeFinish(AsyncResultIF result)
397 	{
398 		GError* err = null;
399 		
400 		auto p = g_mount_guess_content_type_finish(getMountStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err);
401 		
402 		if (err !is null)
403 		{
404 			throw new GException( new ErrorG(err) );
405 		}
406 		
407 		return Str.toStringArray(p);
408 	}
409 
410 	/**
411 	 * Tries to guess the type of content stored on @mount. Returns one or
412 	 * more textual identifiers of well-known content types (typically
413 	 * prefixed with "x-content/"), e.g. x-content/image-dcf for camera
414 	 * memory cards. See the
415 	 * [shared-mime-info](http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec)
416 	 * specification for more on x-content types.
417 	 *
418 	 * This is an synchronous operation and as such may block doing IO;
419 	 * see g_mount_guess_content_type() for the asynchronous version.
420 	 *
421 	 * Params:
422 	 *     forceRescan = Whether to force a rescan of the content.
423 	 *         Otherwise a cached result will be used if available
424 	 *     cancellable = optional #GCancellable object, %NULL to ignore
425 	 *
426 	 * Return: a %NULL-terminated array of content types or %NULL on error.
427 	 *     Caller should free this array with g_strfreev() when done with it.
428 	 *
429 	 * Since: 2.18
430 	 *
431 	 * Throws: GException on failure.
432 	 */
433 	public string[] guessContentTypeSync(bool forceRescan, Cancellable cancellable)
434 	{
435 		GError* err = null;
436 		
437 		auto p = g_mount_guess_content_type_sync(getMountStruct(), forceRescan, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err);
438 		
439 		if (err !is null)
440 		{
441 			throw new GException( new ErrorG(err) );
442 		}
443 		
444 		return Str.toStringArray(p);
445 	}
446 
447 	/**
448 	 * Determines if @mount is shadowed. Applications or libraries should
449 	 * avoid displaying @mount in the user interface if it is shadowed.
450 	 *
451 	 * A mount is said to be shadowed if there exists one or more user
452 	 * visible objects (currently #GMount objects) with a root that is
453 	 * inside the root of @mount.
454 	 *
455 	 * One application of shadow mounts is when exposing a single file
456 	 * system that is used to address several logical volumes. In this
457 	 * situation, a #GVolumeMonitor implementation would create two
458 	 * #GVolume objects (for example, one for the camera functionality of
459 	 * the device and one for a SD card reader on the device) with
460 	 * activation URIs `gphoto2://[usb:001,002]/store1/`
461 	 * and `gphoto2://[usb:001,002]/store2/`. When the
462 	 * underlying mount (with root
463 	 * `gphoto2://[usb:001,002]/`) is mounted, said
464 	 * #GVolumeMonitor implementation would create two #GMount objects
465 	 * (each with their root matching the corresponding volume activation
466 	 * root) that would shadow the original mount.
467 	 *
468 	 * The proxy monitor in GVfs 2.26 and later, automatically creates and
469 	 * manage shadow mounts (and shadows the underlying mount) if the
470 	 * activation root on a #GVolume is set.
471 	 *
472 	 * Return: %TRUE if @mount is shadowed.
473 	 *
474 	 * Since: 2.20
475 	 */
476 	public bool isShadowed()
477 	{
478 		return g_mount_is_shadowed(getMountStruct()) != 0;
479 	}
480 
481 	/**
482 	 * Remounts a mount. This is an asynchronous operation, and is
483 	 * finished by calling g_mount_remount_finish() with the @mount
484 	 * and #GAsyncResults data returned in the @callback.
485 	 *
486 	 * Remounting is useful when some setting affecting the operation
487 	 * of the volume has been changed, as these may need a remount to
488 	 * take affect. While this is semantically equivalent with unmounting
489 	 * and then remounting not all backends might need to actually be
490 	 * unmounted.
491 	 *
492 	 * Params:
493 	 *     flags = flags affecting the operation
494 	 *     mountOperation = a #GMountOperation or %NULL to avoid
495 	 *         user interaction.
496 	 *     cancellable = optional #GCancellable object, %NULL to ignore.
497 	 *     callback = a #GAsyncReadyCallback, or %NULL.
498 	 *     userData = user data passed to @callback.
499 	 */
500 	public void remount(GMountMountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)
501 	{
502 		g_mount_remount(getMountStruct(), flags, (mountOperation is null) ? null : mountOperation.getMountOperationStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData);
503 	}
504 
505 	/**
506 	 * Finishes remounting a mount. If any errors occurred during the operation,
507 	 * @error will be set to contain the errors and %FALSE will be returned.
508 	 *
509 	 * Params:
510 	 *     result = a #GAsyncResult.
511 	 *
512 	 * Return: %TRUE if the mount was successfully remounted. %FALSE otherwise.
513 	 *
514 	 * Throws: GException on failure.
515 	 */
516 	public bool remountFinish(AsyncResultIF result)
517 	{
518 		GError* err = null;
519 		
520 		auto p = g_mount_remount_finish(getMountStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0;
521 		
522 		if (err !is null)
523 		{
524 			throw new GException( new ErrorG(err) );
525 		}
526 		
527 		return p;
528 	}
529 
530 	/**
531 	 * Increments the shadow count on @mount. Usually used by
532 	 * #GVolumeMonitor implementations when creating a shadow mount for
533 	 * @mount, see g_mount_is_shadowed() for more information. The caller
534 	 * will need to emit the #GMount::changed signal on @mount manually.
535 	 *
536 	 * Since: 2.20
537 	 */
538 	public void shadow()
539 	{
540 		g_mount_shadow(getMountStruct());
541 	}
542 
543 	/**
544 	 * Unmounts a mount. This is an asynchronous operation, and is
545 	 * finished by calling g_mount_unmount_finish() with the @mount
546 	 * and #GAsyncResult data returned in the @callback.
547 	 *
548 	 * Deprecated: Use g_mount_unmount_with_operation() instead.
549 	 *
550 	 * Params:
551 	 *     flags = flags affecting the operation
552 	 *     cancellable = optional #GCancellable object, %NULL to ignore.
553 	 *     callback = a #GAsyncReadyCallback, or %NULL.
554 	 *     userData = user data passed to @callback.
555 	 */
556 	public void unmount(GMountUnmountFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)
557 	{
558 		g_mount_unmount(getMountStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData);
559 	}
560 
561 	/**
562 	 * Finishes unmounting a mount. If any errors occurred during the operation,
563 	 * @error will be set to contain the errors and %FALSE will be returned.
564 	 *
565 	 * Deprecated: Use g_mount_unmount_with_operation_finish() instead.
566 	 *
567 	 * Params:
568 	 *     result = a #GAsyncResult.
569 	 *
570 	 * Return: %TRUE if the mount was successfully unmounted. %FALSE otherwise.
571 	 *
572 	 * Throws: GException on failure.
573 	 */
574 	public bool unmountFinish(AsyncResultIF result)
575 	{
576 		GError* err = null;
577 		
578 		auto p = g_mount_unmount_finish(getMountStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0;
579 		
580 		if (err !is null)
581 		{
582 			throw new GException( new ErrorG(err) );
583 		}
584 		
585 		return p;
586 	}
587 
588 	/**
589 	 * Unmounts a mount. This is an asynchronous operation, and is
590 	 * finished by calling g_mount_unmount_with_operation_finish() with the @mount
591 	 * and #GAsyncResult data returned in the @callback.
592 	 *
593 	 * Params:
594 	 *     flags = flags affecting the operation
595 	 *     mountOperation = a #GMountOperation or %NULL to avoid
596 	 *         user interaction.
597 	 *     cancellable = optional #GCancellable object, %NULL to ignore.
598 	 *     callback = a #GAsyncReadyCallback, or %NULL.
599 	 *     userData = user data passed to @callback.
600 	 *
601 	 * Since: 2.22
602 	 */
603 	public void unmountWithOperation(GMountUnmountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)
604 	{
605 		g_mount_unmount_with_operation(getMountStruct(), flags, (mountOperation is null) ? null : mountOperation.getMountOperationStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData);
606 	}
607 
608 	/**
609 	 * Finishes unmounting a mount. If any errors occurred during the operation,
610 	 * @error will be set to contain the errors and %FALSE will be returned.
611 	 *
612 	 * Params:
613 	 *     result = a #GAsyncResult.
614 	 *
615 	 * Return: %TRUE if the mount was successfully unmounted. %FALSE otherwise.
616 	 *
617 	 * Since: 2.22
618 	 *
619 	 * Throws: GException on failure.
620 	 */
621 	public bool unmountWithOperationFinish(AsyncResultIF result)
622 	{
623 		GError* err = null;
624 		
625 		auto p = g_mount_unmount_with_operation_finish(getMountStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0;
626 		
627 		if (err !is null)
628 		{
629 			throw new GException( new ErrorG(err) );
630 		}
631 		
632 		return p;
633 	}
634 
635 	/**
636 	 * Decrements the shadow count on @mount. Usually used by
637 	 * #GVolumeMonitor implementations when destroying a shadow mount for
638 	 * @mount, see g_mount_is_shadowed() for more information. The caller
639 	 * will need to emit the #GMount::changed signal on @mount manually.
640 	 *
641 	 * Since: 2.20
642 	 */
643 	public void unshadow()
644 	{
645 		g_mount_unshadow(getMountStruct());
646 	}
647 
648 	int[string] connectedSignals;
649 
650 	void delegate(MountIF)[] _onChangedListeners;
651 	@property void delegate(MountIF)[] onChangedListeners()
652 	{
653 		return _onChangedListeners;
654 	}
655 	/**
656 	 * Emitted when the mount has been changed.
657 	 */
658 	void addOnChanged(void delegate(MountIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
659 	{
660 		if ( "changed" !in connectedSignals )
661 		{
662 			Signals.connectData(
663 				this,
664 				"changed",
665 				cast(GCallback)&callBackChanged,
666 				cast(void*)cast(MountIF)this,
667 				null,
668 				connectFlags);
669 			connectedSignals["changed"] = 1;
670 		}
671 		_onChangedListeners ~= dlg;
672 	}
673 	extern(C) static void callBackChanged(GMount* mountStruct, MountIF _mount)
674 	{
675 		foreach ( void delegate(MountIF) dlg; _mount.onChangedListeners )
676 		{
677 			dlg(_mount);
678 		}
679 	}
680 
681 	void delegate(MountIF)[] _onPreUnmountListeners;
682 	@property void delegate(MountIF)[] onPreUnmountListeners()
683 	{
684 		return _onPreUnmountListeners;
685 	}
686 	/**
687 	 * This signal is emitted when the #GMount is about to be
688 	 * unmounted.
689 	 *
690 	 * Since: 2.22
691 	 */
692 	void addOnPreUnmount(void delegate(MountIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
693 	{
694 		if ( "pre-unmount" !in connectedSignals )
695 		{
696 			Signals.connectData(
697 				this,
698 				"pre-unmount",
699 				cast(GCallback)&callBackPreUnmount,
700 				cast(void*)cast(MountIF)this,
701 				null,
702 				connectFlags);
703 			connectedSignals["pre-unmount"] = 1;
704 		}
705 		_onPreUnmountListeners ~= dlg;
706 	}
707 	extern(C) static void callBackPreUnmount(GMount* mountStruct, MountIF _mount)
708 	{
709 		foreach ( void delegate(MountIF) dlg; _mount.onPreUnmountListeners )
710 		{
711 			dlg(_mount);
712 		}
713 	}
714 
715 	void delegate(MountIF)[] _onUnmountedListeners;
716 	@property void delegate(MountIF)[] onUnmountedListeners()
717 	{
718 		return _onUnmountedListeners;
719 	}
720 	/**
721 	 * This signal is emitted when the #GMount have been
722 	 * unmounted. If the recipient is holding references to the
723 	 * object they should release them so the object can be
724 	 * finalized.
725 	 */
726 	void addOnUnmounted(void delegate(MountIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
727 	{
728 		if ( "unmounted" !in connectedSignals )
729 		{
730 			Signals.connectData(
731 				this,
732 				"unmounted",
733 				cast(GCallback)&callBackUnmounted,
734 				cast(void*)cast(MountIF)this,
735 				null,
736 				connectFlags);
737 			connectedSignals["unmounted"] = 1;
738 		}
739 		_onUnmountedListeners ~= dlg;
740 	}
741 	extern(C) static void callBackUnmounted(GMount* mountStruct, MountIF _mount)
742 	{
743 		foreach ( void delegate(MountIF) dlg; _mount.onUnmountedListeners )
744 		{
745 			dlg(_mount);
746 		}
747 	}
748 }