diff options
author | Alexander Larsson <alexl@src.gnome.org> | 2007-09-13 10:27:23 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2007-09-13 10:27:23 +0000 |
commit | ee86f465ad9d3e5b41b61008eedb3632198bf03e (patch) | |
tree | 79c6677c77f408a044ac8d4046add1642b10b219 /daemon/gvfsjobopenforread.c | |
parent | 961a0a09f3c8518a3e56d6fa76a58a6389c8189b (diff) | |
download | gvfs-ee86f465ad9d3e5b41b61008eedb3632198bf03e.tar.gz |
Allow multiple backend in one daemon
Original git commit by Alexander Larsson <alex@greebo.(none)> at 1164972080 +0100
svn path=/trunk/; revision=207
Diffstat (limited to 'daemon/gvfsjobopenforread.c')
-rw-r--r-- | daemon/gvfsjobopenforread.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/daemon/gvfsjobopenforread.c b/daemon/gvfsjobopenforread.c index a7cdea7b..9a9c16ca 100644 --- a/daemon/gvfsjobopenforread.c +++ b/daemon/gvfsjobopenforread.c @@ -60,7 +60,8 @@ g_vfs_job_open_for_read_init (GVfsJobOpenForRead *job) GVfsJob * g_vfs_job_open_for_read_new (DBusConnection *connection, - DBusMessage *message) + DBusMessage *message, + GVfsBackend *backend) { GVfsJobOpenForRead *job; DBusMessage *reply; @@ -85,6 +86,8 @@ g_vfs_job_open_for_read_new (DBusConnection *connection, job = g_object_new (G_TYPE_VFS_JOB_OPEN_FOR_READ, NULL); + g_vfs_job_set_backend (G_VFS_JOB (job), backend); + job->connection = dbus_connection_ref (connection); job->message = dbus_message_ref (message); job->filename = g_strndup (path_data, path_len); @@ -104,7 +107,7 @@ start (GVfsJob *job) void g_vfs_job_open_for_read_set_handle (GVfsJobOpenForRead *job, - GVfsHandle *handle) + GVfsBackendHandle handle) { job->backend_handle = handle; } @@ -134,7 +137,7 @@ create_reply (GVfsJob *job, g_assert (open_job->backend_handle != NULL); error = NULL; - stream = g_vfs_read_stream_new (&error); + stream = g_vfs_read_stream_new (job->backend, &error); if (stream == NULL) { reply = dbus_message_new_error_from_gerror (message, error); @@ -162,7 +165,7 @@ create_reply (GVfsJob *job, DBUS_TYPE_BOOLEAN, &can_seek, DBUS_TYPE_INVALID); - g_vfs_read_stream_set_user_data (stream, open_job->backend_handle); + g_vfs_read_stream_set_backend_handle (stream, open_job->backend_handle); open_job->backend_handle = NULL; open_job->read_stream = stream; |