diff options
author | Alexander Larsson <alexl@redhat.com> | 2007-12-20 11:48:48 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2007-12-20 11:48:48 +0000 |
commit | 496cfe2689f7d687203998e90b2b343682c95846 (patch) | |
tree | d7ae5183a32dd4a3c9c022ac94d749cd8fdfdbea | |
parent | 906960ade0efac716394ab7d09e7daf6dcdc3ace (diff) | |
download | gvfs-496cfe2689f7d687203998e90b2b343682c95846.tar.gz |
Update to new unmount flag api
2007-12-20 Alexander Larsson <alexl@redhat.com>
* client/gdaemonmount.c:
* hal/ghaldrive.c:
* hal/ghalmount.c:
* hal/ghalvolume.c:
* programs/gvfs-mount.c:
Update to new unmount flag api
svn path=/trunk/; revision=1057
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | client/gdaemonmount.c | 21 | ||||
-rw-r--r-- | hal/ghaldrive.c | 4 | ||||
-rw-r--r-- | hal/ghalmount.c | 6 | ||||
-rw-r--r-- | hal/ghalvolume.c | 9 | ||||
-rw-r--r-- | programs/gvfs-mount.c | 2 |
6 files changed, 37 insertions, 14 deletions
@@ -1,5 +1,14 @@ 2007-12-20 Alexander Larsson <alexl@redhat.com> + * client/gdaemonmount.c: + * hal/ghaldrive.c: + * hal/ghalmount.c: + * hal/ghalvolume.c: + * programs/gvfs-mount.c: + Update to new unmount flag api + +2007-12-20 Alexander Larsson <alexl@redhat.com> + * client/gdaemonfileinputstream.c: * client/gdaemonfileoutputstream.c: * client/gdaemonvfs.c: diff --git a/client/gdaemonmount.c b/client/gdaemonmount.c index 9e803384..4d13bdd0 100644 --- a/client/gdaemonmount.c +++ b/client/gdaemonmount.c @@ -32,6 +32,7 @@ #include "gvfsdaemondbus.h" #include "gdaemonfile.h" #include "gvfsdaemonprotocol.h" +#include "gdbusutils.h" struct _GDaemonMount { GObject parent; @@ -210,23 +211,28 @@ unmount_reply (DBusMessage *reply, static void g_daemon_mount_unmount (GMount *mount, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) + GMountUnmountFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) { GDaemonMount *daemon_mount = G_DAEMON_MOUNT (mount); DBusMessage *message; GMountInfo *mount_info; GSimpleAsyncResult *res; + guint32 dbus_flags; mount_info = daemon_mount->mount_info; - + message = dbus_message_new_method_call (mount_info->dbus_id, mount_info->object_path, G_VFS_DBUS_MOUNT_INTERFACE, G_VFS_DBUS_MOUNT_OP_UNMOUNT); + dbus_flags = flags; + _g_dbus_message_append_args (message, DBUS_TYPE_UINT32, &dbus_flags, 0); + res = g_simple_async_result_new (G_OBJECT (mount), callback, user_data, g_daemon_mount_unmount); @@ -264,6 +270,7 @@ eject_wrapper_callback (GObject *source_object, static void g_daemon_mount_eject (GMount *mount, + GMountUnmountFlags flags, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) @@ -281,15 +288,15 @@ g_daemon_mount_eject (GMount *mount, data->object = G_OBJECT (mount); data->callback = callback; data->user_data = user_data; - g_drive_eject (drive, cancellable, eject_wrapper_callback, data); + g_drive_eject (drive, flags, cancellable, eject_wrapper_callback, data); } } } static gboolean g_daemon_mount_eject_finish (GMount *mount, - GAsyncResult *result, - GError **error) + GAsyncResult *result, + GError **error) { GDaemonMount *daemon_mount = G_DAEMON_MOUNT (mount); GDrive *drive; diff --git a/hal/ghaldrive.c b/hal/ghaldrive.c index 5071e1bd..db4079a4 100644 --- a/hal/ghaldrive.c +++ b/hal/ghaldrive.c @@ -587,6 +587,7 @@ typedef struct { GAsyncReadyCallback callback; gpointer user_data; GCancellable *cancellable; + GMountUnmountFlags flags; GList *pending_mounts; } UnmountMountsOp; @@ -673,6 +674,7 @@ _eject_unmount_mounts (UnmountMountsOp *data) g_warning ("unmounting %p", mount); g_mount_unmount (mount, + data->flags, data->cancellable, _eject_unmount_mounts_cb, data); @@ -681,6 +683,7 @@ _eject_unmount_mounts (UnmountMountsOp *data) static void g_hal_drive_eject (GDrive *drive, + GMountUnmountFlags flags, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) @@ -696,6 +699,7 @@ g_hal_drive_eject (GDrive *drive, data->cancellable = cancellable; data->callback = callback; data->user_data = user_data; + data->flags = flags; for (l = hal_drive->volumes; l != NULL; l = l->next) { diff --git a/hal/ghalmount.c b/hal/ghalmount.c index d6729e4a..cc037ac0 100644 --- a/hal/ghalmount.c +++ b/hal/ghalmount.c @@ -811,7 +811,8 @@ unmount_do (GMount *mount, static void -g_hal_mount_unmount (GMount *mount, +g_hal_mount_unmount (GMount *mount, + GMountUnmountFlags flags, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) @@ -861,6 +862,7 @@ eject_wrapper_callback (GObject *source_object, static void g_hal_mount_eject (GMount *mount, + GMountUnmountFlags flags, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) @@ -878,7 +880,7 @@ g_hal_mount_eject (GMount *mount, data->object = G_OBJECT (mount); data->callback = callback; data->user_data = user_data; - g_drive_eject (drive, cancellable, eject_wrapper_callback, data); + g_drive_eject (drive, flags, cancellable, eject_wrapper_callback, data); } } } diff --git a/hal/ghalvolume.c b/hal/ghalvolume.c index b1863958..68803dd7 100644 --- a/hal/ghalvolume.c +++ b/hal/ghalvolume.c @@ -764,9 +764,10 @@ eject_wrapper_callback (GObject *source_object, static void g_hal_volume_eject (GVolume *volume, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) + GMountUnmountFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) { GHalVolume *hal_volume = G_HAL_VOLUME (volume); @@ -779,7 +780,7 @@ g_hal_volume_eject (GVolume *volume, data->object = G_OBJECT (volume); data->callback = callback; data->user_data = user_data; - g_drive_eject (G_DRIVE (hal_volume->drive), cancellable, eject_wrapper_callback, data); + g_drive_eject (G_DRIVE (hal_volume->drive), flags, cancellable, eject_wrapper_callback, data); } } diff --git a/programs/gvfs-mount.c b/programs/gvfs-mount.c index 7b9c29ef..43a0459f 100644 --- a/programs/gvfs-mount.c +++ b/programs/gvfs-mount.c @@ -209,7 +209,7 @@ unmount (GFile *file) return; } - g_mount_unmount (mount, NULL, unmount_done_cb, NULL); + g_mount_unmount (mount, 0, NULL, unmount_done_cb, NULL); outstanding_mounts++; } |