Provide eject() on both GMount and GVolume and utility functions to guess
authorDavid Zeuthen <davidz@redhat.com>
Mon, 17 Dec 2007 09:31:08 +0000 (09:31 +0000)
committerAlexander Larsson <alexl@src.gnome.org>
Mon, 17 Dec 2007 09:31:08 +0000 (09:31 +0000)
commitf4add8f0faf4a8c2ca1cdb4f99f5f3d0d66aaff8
tree7b3dd83e827af09ff5750c0d90ac540cf9dd487c
parent96a0e238e5f8854ff0f4207e51bc0beed52d6c2f
Provide eject() on both GMount and GVolume and utility functions to guess

2007-12-14  David Zeuthen  <davidz@redhat.com>

* Makefile.am:
* gio.symbols:
* gmount.c: (g_mount_get_uuid), (g_mount_can_eject),
(g_mount_eject), (g_mount_eject_finish):
* gmount.h:
* gunionvolumemonitor.c: (g_union_volume_monitor_finalize),
(get_volume_for_uuid), (get_mount_for_uuid),
(g_union_volume_monitor_class_init),
(get_default_native_type_with_exclude), (get_default_native_type),
(get_native_type), (update_native_type),
(g_union_volume_monitor_init), (_g_mount_get_for_mount_path):
* gunixmount.c: (_g_unix_mount_new), (g_unix_mount_get_uuid),
(g_unix_mount_can_eject), (eject_unmount_cb),
(eject_unmount_read_error), (eject_unmount_do),
(g_unix_mount_unmount), (g_unix_mount_eject),
(g_unix_mount_eject_finish), (g_unix_mount_mount_iface_init):
* gunixmounts.c: (g_unix_mount_guess_can_eject),
(g_unix_mount_point_guess_can_eject):
* gunixmounts.h:
* gunixvolume.c: (_g_unix_volume_new), (g_unix_volume_get_uuid),
(g_unix_volume_can_eject), (g_unix_volume_get_drive),
(eject_mount_cb), (eject_mount_read_error), (eject_mount_do),
(g_unix_volume_mount), (g_unix_volume_eject),
(g_unix_volume_eject_finish), (g_unix_volume_volume_iface_init):
* gunixvolumemonitor.c: (get_volume_for_uuid),
(get_mount_for_uuid), (g_unix_volume_monitor_class_init),
(update_mounts):
* gvolume.c: (g_volume_get_uuid), (g_volume_can_eject),
(g_volume_eject), (g_volume_eject_finish):
* gvolume.h:
* gvolumemonitor.c: (g_volume_monitor_get_volume_for_uuid),
(g_volume_monitor_get_mount_for_uuid):
* gvolumemonitor.h:

Provide eject() on both GMount and GVolume and utility functions
to guess whether a GUnixMountPoint or GUnixMountEntry should be
ejected. Introduce the concept of UUID's and wire it into GVolume
and GMount and provide API on GVolumeMonitor to find such
instances. Also handle the case where an external
GNativeVolumeMonitor fails to initialize. Lock around the
_g_get_mount_for_mount_path() function such that volume monitor
implementations won't have to do locking themselves.

svn path=/trunk/; revision=6140
16 files changed:
gio/ChangeLog
gio/Makefile.am
gio/gio.h
gio/gio.symbols
gio/gmount.c
gio/gmount.h
gio/gunionvolumemonitor.c
gio/gunixmount.c
gio/gunixmounts.c
gio/gunixmounts.h
gio/gunixvolume.c
gio/gunixvolumemonitor.c
gio/gvolume.c
gio/gvolume.h
gio/gvolumemonitor.c
gio/gvolumemonitor.h