Re: Questions about Gnome-VFS



On Mon, 2004-12-20 at 03:07 +0100, nf wrote:
> Hi!
> 
> Because i am trying to write this KIO->GnomeVFS bridge and i am new to
> both libraries i also have some questions about Gnome-VFS. (The
> documentation does not talk a lot about the internal concept of
> Gnome-VFS)
> 
> 1) Main loop: Is glib main loop required for all Gnome-VFS operations or
> only for the async operations? Or is it only used for certain modules?
> (Do some modules iterate the main-loop inside synchronous calls
> recursively for internal communication?).

main loop is only needed for async operations and some extras like
volume monitor and change notification.

> 2) The GnomeVFSDaemon: What's the purpose of this daemon? Is it only
> used for the async operations?

Its used for a couple of reasons:
a) We put some module in it to make sure they have a sane environment
with a glib mainloop and to allow sharing connections and authentication
between several processes.
b) Some of the stuff we do is "expensive", and needs to be synchronized
across processes, like the volume monitoring. We do this in the daemon.
c) We want to do some plugins on a desktop-level, such as modules that
looks for some plugged in hardware and creates virtual uri-based
mountpoints for non-storage cameras etc. This would run in the daemon.

> 3) Sessions: Does Gnome-VFS have a notion of sessions between the
> desktop and a resource. For instance if you have a ftp-server, which
> only allows one session per user, but multiple applications on your
> desktop want to communicate with that server. Can Gnome-VFS "serialize"
> all communication to that server in a single session?

Not really, apart from putting the module in the daemon.

> What about archives (tar.gz or zip). Clearly you can only have a single
> session with an archive when you want to change it's contents (don't
> know if editing archives is possible with gnome-vfs at the moment). 

When tar/zip support is finished (it really doesn't work atm) this would
be handled by putting these methods in the daemon.

> 4) User credentials: Where and for how long does Gnome-VFS keep them?
> Are they stored per client process when i use the synchronous functions?

Stored per-process.

> 5) What about GnomeVFSVolume and GnomeVFSDrive? What's their role in the
> whole game? Are they related to authentication and sessions? When i
> connect to a server via gnome_vfs_open(uri) - does Gnome-VFS
> automatically create a Volume or Drive object?

No. They are not related to uris really. They are objects describing the
storage devices and media connected to the machine.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a short-sighted ninja card sharp from the 'hood. She's a foxy paranoid 
detective who believes she is the reincarnation of an ancient Egyptian queen. 
They fight crime! 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]