ioctls for gnome-vfs
- From: Alexander Larsson <alexl redhat com>
- To: gnome-vfs-list gnome org
- Subject: ioctls for gnome-vfs
- Date: Fri, 8 Nov 2002 11:35:41 -0500 (EST)
Whenever I want to use gnome-vfs for something just a little bit unusual,
something that maps well to file handling, but then requires some extra
function to work I'm hindered by the lack of an ioctl() style call in
gnome-vfs. I really want to get this in gnome 2.2 so that I can do some
cool stuff I've been planning[1].
So, I wrote a patch that adds gnome_vfs_file_operation that is useful when
you want to do a backend specific operation. It is modeled on ioctl, but
slightly different. It uses strings instead of magic numbers, so we can
easier avoid collisions (backend-specific operations can be prefixed with
the module name, we can work out the names for any operations that are
common between several modules). It also passes just one pointer instead
of using varargs, because otherwise the async framework wouldn't work with
it.
The patch is appended to this mail. The last testing part may or may not
be commited, I just used it to test the stuff. If this is ok for commiting
I will write docs for all the new APIs. This whole thing is 100% backward
compat, even for modules compiled against the old module ABI
(GnomeVFSMethod is versioned).
I'd really like to get this in before the API freeze, so that I can start
implementing some cool features in separate modules and have them work in
Gnome 2.2.
[1] An example of cool stuff:
I want to write a cdburn: backend that basically is a virtual
ram-backed filesystem. If you copy files to it we just store the filename,
and all operations on it are redirected to the real file. When the user
have built up his CD by dnd:in in nautilus we just traverse the whole
filesystem and call
gnome_vfs_file_control(handle, "cdburn:get_real_filename", &filename)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]