diff options
author | Alexander Larsson <alexl@redhat.com> | 2008-01-09 14:49:05 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2008-01-09 14:49:05 +0000 |
commit | 23730c607ca8ae5a6f8d84d623e7b21bdd5bd1c3 (patch) | |
tree | 1f4c6e149a351d32ba92a9ba71c6856ce771d81e /common/gmountoperationdbus.c | |
parent | ca250f832f62324f0bef8fab968d681d03a84a57 (diff) | |
download | gvfs-23730c607ca8ae5a6f8d84d623e7b21bdd5bd1c3.tar.gz |
Add g_mount_source_get_operation() that lets you handle a remote
2008-01-09 Alexander Larsson <alexl@redhat.com>
* common/gmountsource.[ch]:
Add g_mount_source_get_operation() that lets
you handle a remote GMountSource as if it
was a GMountOperation.
* common/gmountoperationdbus.c:
* programs/gvfs-mount.c:
Update to new GMountOperation APIs
* client/gdaemonfile.c:
* daemon/gvfsjobmountmountable.[ch]:
Also let you return target by uri, as not all
targets are from gvfs.
* daemon/gvfsbackendcomputer.c:
Initial cut at mount_mountable
svn path=/trunk/; revision=1085
Diffstat (limited to 'common/gmountoperationdbus.c')
-rw-r--r-- | common/gmountoperationdbus.c | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/common/gmountoperationdbus.c b/common/gmountoperationdbus.c index 1f46ab04..ea44f534 100644 --- a/common/gmountoperationdbus.c +++ b/common/gmountoperationdbus.c @@ -156,18 +156,20 @@ mount_op_send_reply (GMountOperationDBus *op_dbus, static void ask_password_reply (GMountOperation *op, - gboolean abort, + GMountOperationResult result, gpointer data) { DBusMessage *reply = data; const char *username, *password, *domain; dbus_bool_t anonymous; guint32 password_save; - dbus_bool_t handled = TRUE; - dbus_bool_t abort_dbus = abort; + dbus_bool_t handled, abort_dbus; GMountOperationDBus *op_dbus; op_dbus = g_object_get_data (G_OBJECT (op), "dbus-op"); + + handled = (result != G_MOUNT_OPERATION_UNHANDLED); + abort_dbus = (result == G_MOUNT_OPERATION_ABORTED); password = g_mount_operation_get_password (op); if (password == NULL) @@ -238,31 +240,24 @@ mount_op_ask_password (GMountOperationDBus *op_dbus, message_string, default_user, default_domain, - flags, - &res); - - if (!res) - { - _g_dbus_message_append_args (reply, - DBUS_TYPE_BOOLEAN, &handled, - 0); - mount_op_send_reply (op_dbus, reply); - } + flags); } static void ask_question_reply (GMountOperation *op, - gboolean abort, + GMountOperationResult result, gpointer data) { DBusMessage *reply = data; guint32 choice; - dbus_bool_t handled = TRUE; - dbus_bool_t abort_dbus = abort; + dbus_bool_t handled, abort_dbus; GMountOperationDBus *op_dbus; op_dbus = g_object_get_data (G_OBJECT (op), "dbus-op"); + handled = (result != G_MOUNT_OPERATION_UNHANDLED); + abort_dbus = (result == G_MOUNT_OPERATION_ABORTED); + choice = g_mount_operation_get_choice (op); _g_dbus_message_append_args (reply, |