Common VFS: GKIO experiment

Waldo Bastian bastian at kde.org
Wed Dec 8 12:33:02 EET 2004


[Cross-posted this time, with some changes to the dispatch part]
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.

In general 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::dispatchLoop() which handles the communication between 
application and io-slave. Typically the slave is idle when it hangs around in 
dispatchLoop(), waiting to get a new command from the application, so I don't 
think you would have much glib events to process there.

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, kdelibs/kio/kio/dataslave.cpp

Cheers,
Waldo
-- 
bastian at kde.org   |   Free Novell Linux Desktop 9 Evaluation Download
bastian at suse.com  |   http://www.novell.com/products/desktop/eval.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xdg/attachments/20041208/f0d39d08/attachment.pgp 


More information about the xdg mailing list