general kio slave for reading embedded files

Jos van den Oever jvdoever at gmail.com
Sun Dec 17 10:07:45 GMT 2006


2006/12/17, Thiago Macieira <thiago at kde.org>:
> Jos van den Oever wrote:
> >I would like to port the kioslave that comes with Strigi to KDE4 and
> >place it in kdelibs/kioslave/ or kdebase/runtime/kioslave/.
> >The current name of the kioslave is jstream:// which is not good.
> >Something like archive:// might be better.
>
> I am not sure an ioslave is the best approach here.
>
> I think this should be in libkio, working atop all ioslaves. That way, you
> can browse into archives in any ioslave, including remote files.
>
> That in turn means the naming scheme has to change. The actual file name
> and the data inside the archive should be separated by a # (for an HTML
> file, # marks an anchor inside the file; for an archive, why not mark the
> file inside?). The reason for that is that, for remote files, the cost of
> statting to find out if they exist is too high. The information should be
> present at the start.
>
> But this is just the external presentation. Strigi can stay unchanged.
>
> In other words, I'd like this to work:
>         file:///home/kde/a.zip#/b.tar.gz/x.rpm/y.deb/README
> or
>         file:///home/kde/a.zip#/b.tar.gz#/x.rpm#/y.deb#/README
These extra hashes are not required since in the stream name and data
are always close and checking if a filename points to archive data is
not expensive.

> as well as
>         http://localhost/~kde/a.zip#/b.tar.gz/x.rpm/y.deb/README
>         fish://remotehost/home/kde/a.zip#/b.tar.gz/x.rpm/y.deb/README
>         ftp://remotehost/home/kde/a.zip#/b.tar.gz/x.rpm/y.deb/README
>
> (Note all three represent different capabilities of KIO: fish is a
> random-access protocol; ftp is a filesystem but streaming-only protocol;
> http doesn't support directory listing)

I like this idea, but I see how to add the functionality in this way.
Integrating Strigi deeply in any Qt > 4.1 program easy thanks to
QAbstractFileEngine. There's an example of this here:
  http://websvn.kde.org/trunk/playground/base/strigi/src/qclient/filehandler.cpp
By simply instanciating an ArchiveEngineHandler, which implements
QAbstractFileEngine, any Qt application can browse through archives
and open files in them. This solution synchroneous and causes delays
when listing files in large archives.

By the way, in the meantime I've ported the jstream:/ kioslave to
KDE4. It can be found in
http://websvn.kde.org/trunk/playground/base/strigiplasmoid

Cheers,
Jos

Cheers,
Jos




More information about the kde-core-devel mailing list