Common VFS: GKIO experiment

Alexander Neundorf neundorf at kde.org
Wed Dec 8 17:04:05 GMT 2004


On Wednesday 08 December 2004 11:26, Waldo Bastian wrote:
> On Wednesday 08 December 2004 01:12, nf wrote:
> > In order to find a way out of this situation, i would like to start an
> > experiment: To write a (KDE/C++) wrapper to Gnome-VFS which looks and
> > acts like the KIO-API - "GKIO". Then write a number of test-cases, which
> > test the GKIO-API for KIO requirements and compatibility. Once this
> > tests work, i want to try plugging GKIO into kde-core libs (instead of
> > original KIO code).
>
> The API you are looking for is the io-slave API. In particular
> kdelibs/kio/kio/slaveinterface.h and kdelibs/kio/kio/slavebase.h
>
> The easiest is to start by making a single (out of process) ioslave, there
> are plenty of io-slaves available as example, but the file ioslave
> (kdelibs/kioslave/file) is probably relatively close to what you need.
>
> Most io-slaves don't use the Qt event loop at all, so you don't need to
> merge it either. If you need the glib event loop you may need to merge it
> with SlaveBase::dispatch which handles the communication between
> application and io-slave.
>
> If you need to do things in-process (but I can't see why actually) you can
> have a look at the data io-slave.

I also had once a look at gnome vfs and considered implementing a kio-vfs 
bridge. The only thing which kept me from doing it was missing time (having 
to install and learn gtk/gnome stuff).
I think it shouldn't be that hard: dlopen a vfs module, and you get more or 
less the standard file system functions, which shouldn't be too hard to map 
into the kioslave functions.
AFAIK the vfs interface was mainly a struct containing function pointers (I 
won't start wondering why they didn't use classes with virtual functions for 
this), where the functions pointers where thiongs like open(), read(), 
write(), well, you get it.

Bye
Alex
-- 
Work: alexander.neundorf at jenoptik.com - http://www.jenoptik-los.de
Home: neundorf at kde.org                - http://www.kde.org
      alex at neundorf.net               - http://www.neundorf.net




More information about the kde-core-devel mailing list