[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: KIO Chains?
From:       David Faure <faure () kde ! org>
Date:       2004-09-08 9:06:56
Message-ID: 200409081106.56769.faure () kde ! org
[Download RAW message or body]

(sorry for breaking the thread, I just subscribed again and saw this post in the archives)

> Is it currently possible to define (at runtime) a kio chain? For example, 
> let's say I create a kio slave which logs every kio request/result and called 
> it "kiolog". I would then want to create a virtual slave called "flog" which 
> would basically call "kiolog" followed by "kiofile". The result would be that 
> any use of the "flog:" protocol would work exactly the same as "file:" with 
> the addition of keeping a log of every action.

It is possible to do this, although it takes a bit of programming:
you can call an ioslave from an ioslave, using the normal KIO job API,
in order to let the underlying ioslave do all the work.
kio_trash (kdebase/kioslave/trash) does this for some commands, using kio_file.

A good idea would be to write a generic "relay" ioslave class, which relays every
command to another ioslave (the URL conversion between the two protocols
would have to be a virtual method). You could then inherit from this generic relay
to implement flog:, and Kevin Ottens could inherit from it for his future "filesystems"
ioslave (a bit like the current devices:/, but using such a relay mechanism instead
of a redirection).

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic