diff options
author | Alexander Larsson <alexl@redhat.com> | 2007-10-04 08:43:34 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2007-10-04 08:43:34 +0000 |
commit | 14f210480005deb8a9cb4e23d07f8ba979ee29bb (patch) | |
tree | b7bfab5f6a01f18af52c975e8504982c541d57d3 /daemon/gvfsjobopenforwrite.c | |
parent | 3c3c180f02e8c9485cf35cc9d5275e32da62135b (diff) | |
download | gvfs-14f210480005deb8a9cb4e23d07f8ba979ee29bb.tar.gz |
Add GFileCreateFlags flag to open for write. No actual backend support yet
2007-10-04 Alexander Larsson <alexl@redhat.com>
* TODO:
* client/gdaemonfile.c:
* client/gvfsfusedaemon.c:
* daemon/gvfsbackend.h:
* daemon/gvfsbackendftp.c:
* daemon/gvfsbackendsftp.c:
* daemon/gvfsbackendsmb.c:
* daemon/gvfsjobopenforwrite.[ch]:
* test/benchmark-gvfs-big-files.c:
* test/benchmark-gvfs-small-files.c:
Add GFileCreateFlags flag to open for write.
No actual backend support yet though.
svn path=/trunk/; revision=967
Diffstat (limited to 'daemon/gvfsjobopenforwrite.c')
-rw-r--r-- | daemon/gvfsjobopenforwrite.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/daemon/gvfsjobopenforwrite.c b/daemon/gvfsjobopenforwrite.c index d845df36..7ebf1415 100644 --- a/daemon/gvfsjobopenforwrite.c +++ b/daemon/gvfsjobopenforwrite.c @@ -73,6 +73,7 @@ g_vfs_job_open_for_write_new (DBusConnection *connection, guint16 mode; dbus_bool_t make_backup; const char *etag; + guint32 flags; path = NULL; dbus_error_init (&derror); @@ -82,6 +83,7 @@ g_vfs_job_open_for_write_new (DBusConnection *connection, DBUS_TYPE_UINT16, &mode, DBUS_TYPE_STRING, &etag, DBUS_TYPE_BOOLEAN, &make_backup, + DBUS_TYPE_UINT32, &flags, 0)) { reply = dbus_message_new_error (message, @@ -104,6 +106,7 @@ g_vfs_job_open_for_write_new (DBusConnection *connection, if (*etag != 0) job->etag = g_strdup (etag); job->make_backup = make_backup; + job->flags = flags; job->backend = backend; return G_VFS_JOB (job); @@ -126,7 +129,8 @@ run (GVfsJob *job) class->create (op_job->backend, op_job, - op_job->filename); + op_job->filename, + op_job->flags); } else if (op_job->mode == OPEN_FOR_WRITE_APPEND) { @@ -139,7 +143,8 @@ run (GVfsJob *job) class->append_to (op_job->backend, op_job, - op_job->filename); + op_job->filename, + op_job->flags); } else if (op_job->mode == OPEN_FOR_WRITE_REPLACE) { @@ -154,7 +159,8 @@ run (GVfsJob *job) op_job, op_job->filename, op_job->etag, - op_job->make_backup); + op_job->make_backup, + op_job->flags); } else g_assert_not_reached (); /* Handled in try */ @@ -172,7 +178,8 @@ try (GVfsJob *job) return FALSE; return class->try_create (op_job->backend, op_job, - op_job->filename); + op_job->filename, + op_job->flags); } else if (op_job->mode == OPEN_FOR_WRITE_APPEND) { @@ -180,7 +187,8 @@ try (GVfsJob *job) return FALSE; return class->try_append_to (op_job->backend, op_job, - op_job->filename); + op_job->filename, + op_job->flags); } else if (op_job->mode == OPEN_FOR_WRITE_REPLACE) { @@ -190,7 +198,8 @@ try (GVfsJob *job) op_job, op_job->filename, op_job->etag, - op_job->make_backup); + op_job->make_backup, + op_job->flags); } else { |