Just got an answer from a gvfs maintainer: I don't think there is any documentation explaining how to write gvfs backends yet. Basically you have to implement a bunch of virtual functions that get called from gvfs. All of those vfuncs come in two variants, a synch one which is run directly from the mainloop and must not block and an async one that is run within a thread. If you implement the sync one but return FALSE the async one will get called, which is also the default if you don't supply any sync implementation at all. The most important vfunc is prolly to "mount" one, which will establish a (virtual) mount within the gio/gvfs framework. All further file/directory access happens within such a mount (and path are given by gvfs relative to the mount point). Once mount is done you prolly want the open_*, read and close ones so you can read files. The enumerate ones are for file listing. Prolly the best idea is to look at one of the backends to see how the stuff works in detail.
Hope that helped a bit, Alex, correct me where I am wrong, Cheers, Christian Gordon, you can join the discussion by subscribing the alias gvfs-list at gnome.org. Jeff On Mon, 2009-08-31 at 12:51 +0800, Jeff Cai wrote: > I'm also trying to look for those documents. > > You can refer to some testing code to see how a backend is working. > Under gvfs source tree, you can find some such as gvfs_locatest and > gvfs_test. > > Jeff > On Fri, 2009-08-28 at 15:21 -0400, Gordon Ross wrote: > > Can anyone provide some "getting started" pointers? > > Documentation on how GVFS connects to a back end? > > Code for existing back end modules? > > > > I'd like to write up a project description for a > > possible new "back end" to work with GVFS. > > > > Thanks, > > Gordon > > > > > > _______________________________________________ > > desktop-discuss mailing list > > desktop-discuss at opensolaris.org > > _______________________________________________ > desktop-discuss mailing list > desktop-discuss at opensolaris.org
