summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorDavid Zeuthen <davidz@redhat.com>2007-12-19 10:06:28 +0000
committerAlexander Larsson <alexl@src.gnome.org>2007-12-19 10:06:28 +0000
commitc1be928d8e01972379156950397f813994c81b62 (patch)
tree499b164fb1bf24d93ce7072e0250428e67813e9f /common
parentcb5c86a46ce371035ab4c5078fa69be389ed7f06 (diff)
downloadgvfs-c1be928d8e01972379156950397f813994c81b62.tar.gz
Add the cdda:// backend for Compact Disc Digital Audio discs.
2007-12-19 David Zeuthen <davidz@redhat.com> Add the cdda:// backend for Compact Disc Digital Audio discs. Allow a backend to specify the fuse name directly instead of using the display name Make GDaemonVolumeMonitor and GDaemonMount use the new adopt_orphan_mount() function on GVolumeMonitor in gio. Also, since a GMount now can be associated with a GVolume, implement eject(). Add a new gvfs-less program. Make gvfs-mount capable of unmounting as well. HAL backend changes: attempt to unmount all mounts from enclosing volumes and fail the ejection if one of the unmount operations fails. Use new adopt_orphan_mount() from gio to adopt cdda:// volumes for audio discs. Emit the 'eject-button' signal on GDrive. Various other fixes. * client/gdaemonfile.c: (g_daemon_file_find_enclosing_mount): * client/gdaemonmount.c: (g_daemon_mount_finalize), (g_daemon_mount_new), (g_daemon_mount_get_volume), (g_daemon_mount_get_drive), (g_daemon_mount_can_eject), (foreign_volume_removed), (g_daemon_mount_set_foreign_volume), (eject_wrapper_callback), (g_daemon_mount_eject), (g_daemon_mount_eject_finish), (g_daemon_mount_mount_iface_init): * client/gdaemonmount.h: * client/gdaemonvolumemonitor.c: (mount_added), (mount_removed), (g_daemon_volume_monitor_init): * client/gvfsfusedaemon.c: (file_handle_close_stream), (free_file_handle_for_path), (mount_record_new): * common/gmounttracker.c: (g_mount_info_dup), (g_mount_info_unref), (g_mount_info_from_dbus): * common/gmounttracker.h: * configure.ac: * daemon/Makefile.am: * daemon/gvfsbackend.c: (g_vfs_backend_finalize), (g_vfs_backend_init), (g_vfs_backend_set_fuse_name), (g_vfs_backend_get_fuse_name), (g_vfs_backend_register_mount): * daemon/gvfsbackend.h: * daemon/gvfsjobunmount.c: (unregister_mount_callback), (send_reply): * daemon/mount.c: (vfs_mount_free), (vfs_mount_to_dbus), (register_mount), (list_mounts): * hal/ghaldrive.c: (g_hal_drive_finalize), (hal_condition), (g_hal_drive_new), (spawn_cb), (g_hal_drive_eject_do), (free_unmount_mounts_op), (_eject_unmount_mounts_cb), (_eject_unmount_mounts), (g_hal_drive_eject): * hal/ghalmount.c: (g_hal_mount_finalize), (unmount_cb), (unmount_read_error), (unmount_do), (g_hal_mount_unmount), (eject_wrapper_callback), (g_hal_mount_eject), (g_hal_mount_eject_finish): * hal/ghalvolume.c: (g_hal_volume_finalize), (do_update_from_hal), (g_hal_volume_new), (g_hal_volume_get_mount), (foreign_mount_unmounted), (g_hal_volume_adopt_foreign_mount), (g_hal_volume_has_foreign_mount_root), (spawn_cb), (mount_foreign_callback), (g_hal_volume_mount), (g_hal_volume_mount_finish), (eject_wrapper_callback), (g_hal_volume_eject), (g_hal_volume_eject_finish): * hal/ghalvolume.h: * hal/ghalvolumemonitor.c: (adopt_orphan_mount), (g_hal_volume_monitor_class_init), (update_volumes), (update_mounts), (update_discs): * hal/hal-device.c: (hal_device_class_init), (_hal_device_hal_condition): * hal/hal-device.h: * hal/hal-marshal.list: * hal/hal-pool.c: (hal_pool_class_init), (_hal_condition), (hal_pool_new): * hal/hal-pool.h: * programs/Makefile.am: * programs/gvfs-mount.c: (unmount_done_cb), (unmount), (main): svn path=/trunk/; revision=1052
Diffstat (limited to 'common')
-rw-r--r--common/gmounttracker.c8
-rw-r--r--common/gmounttracker.h1
2 files changed, 6 insertions, 3 deletions
diff --git a/common/gmounttracker.c b/common/gmounttracker.c
index c0f1537b..4b3b7717 100644
--- a/common/gmounttracker.c
+++ b/common/gmounttracker.c
@@ -88,6 +88,7 @@ g_mount_info_dup (GMountInfo *info)
copy = g_new (GMountInfo, 1);
copy->ref_count = 1;
copy->display_name = g_strdup (info->display_name);
+ copy->stable_name = g_strdup (info->stable_name);
copy->icon = g_strdup (info->icon);
copy->dbus_id = g_strdup (info->dbus_id);
copy->object_path = g_strdup (info->object_path);
@@ -112,6 +113,7 @@ g_mount_info_unref (GMountInfo *info)
if (g_atomic_int_dec_and_test (&info->ref_count))
{
g_free (info->display_name);
+ g_free (info->stable_name);
g_free (info->icon);
g_free (info->dbus_id);
g_free (info->object_path);
@@ -155,6 +157,7 @@ g_mount_info_from_dbus (DBusMessageIter *iter)
GMountSpec *mount_spec;
dbus_bool_t user_visible;
char *display_name;
+ char *stable_name;
char *icon;
char *prefered_filename_encoding;
char *dbus_id;
@@ -170,6 +173,7 @@ g_mount_info_from_dbus (DBusMessageIter *iter)
DBUS_TYPE_STRING, &dbus_id,
DBUS_TYPE_OBJECT_PATH, &obj_path,
DBUS_TYPE_STRING, &display_name,
+ DBUS_TYPE_STRING, &stable_name,
DBUS_TYPE_STRING, &icon,
DBUS_TYPE_STRING, &prefered_filename_encoding,
DBUS_TYPE_BOOLEAN, &user_visible,
@@ -177,9 +181,6 @@ g_mount_info_from_dbus (DBusMessageIter *iter)
0))
return NULL;
- g_free (fuse_mountpoint);
-
-
mount_spec = g_mount_spec_from_dbus (&struct_iter);
if (mount_spec == NULL) {
g_free (fuse_mountpoint);
@@ -189,6 +190,7 @@ g_mount_info_from_dbus (DBusMessageIter *iter)
info = g_new0 (GMountInfo, 1);
info->ref_count = 1;
info->display_name = g_strdup (display_name);
+ info->stable_name = g_strdup (stable_name);
info->icon = g_strdup (icon);
info->dbus_id = g_strdup (dbus_id);
info->object_path = g_strdup (obj_path);
diff --git a/common/gmounttracker.h b/common/gmounttracker.h
index 13536f04..8ff166ee 100644
--- a/common/gmounttracker.h
+++ b/common/gmounttracker.h
@@ -41,6 +41,7 @@ typedef struct _GMountTrackerClass GMountTrackerClass;
typedef struct {
volatile int ref_count;
char *display_name;
+ char *stable_name;
char *icon;
char *dbus_id;
char *object_path;