The source is actually here,

gvfs - http://git.gnome.org/cgit/gvfs/tree
the backend : http://git.gnome.org/cgit/gvfs/tree/daemon
A backend is generally coded in a file as Jeff has mentioned. An example 
is gvfsbackendcomputer.[ch]
and its configuration file is  computer.mount.in which it describes 
whether the executable is installed and run when the associated type is 
invoked.

If you intend to do a backend which is of generic type, you should work 
with upstream in the mailing alias Jeff mentioned below. Once that is 
integrated and release, the desktop will pick up the tarball and 
released accordingly. Of course, you can also work the desktop team here 
should you want to try to release within certain build of OpenSolaris. 
With the latter approach, there are the internal processes that you will 
have to follow :)

-Ghee



Jeff Cai wrote:
> 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
>>     
>
> _______________________________________________
> desktop-discuss mailing list
> desktop-discuss at opensolaris.org
>   

Reply via email to