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

List:       kde-devel
Subject:    Re: KIO chains?
From:       Yannick Koehler <yannick.koehler () colubris ! com>
Date:       2002-08-05 12:24:51
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On August 3, 2002 05:35 pm, Nicolas Goutte wrote:
> On Freitag, 2. August 2002 22:04, Yannick Koehler wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > On August 2, 2002 03:59 pm, Nicolas Goutte wrote:
> > > I am not sure, but as far as I know gzip and bz2 work over tar. Perhaps
> > > you could write your encryption stuff like those.
> >
> > Yeah but those are filter...  The filter seems to require
> > compress/uncompress...  I can only do encrypt not unencrypt well at least
> > I don't want unencrypt for my application.
>
> But you have written: "So my protocol decrypt the file and present
> it as file.tar." So you are decrypting the file, aren't you?

Sorry,  I wrote the code to decrypt the file but that code gets called only 
when a get occurs with the url being the file.tar which occurs after 
Konqueror ask me to open the file with something else.

> However, I see your problem. tar:// only works with gzip and bzip2. It is
> not as open as I thought.
>
> > I'm not sure thought how the filters interacts with the KIO....
>
> I am supposing that you have a local file that you want to show. If it is a
> remote file, it will get more complicate.
>
> I have looked into KTar (files kdelins/kio/kio/ktar.*) KTar seems to be
> ready for other "uncompression" forms. So you could use it by giving the
> mime type of your "uncompressor" (i.e. your decryptor).
>
> As "uncompressor", you copy one of the kioslaves of gzip or bzip2 (look in
> kdelibs/kioslave) That will be what decrypts your file. You have to take
> care that the result is a tar file. (Sure, gzip and bzip2 do not care about
> such things.)  As for compression, just write a dummy that gives an error
> message.
>
> So your real problem is that tar:// do not cooperate. One possibility I see
> is that you copy the directory kdebase/kioslave/tar for your own kioslave.
> Just be careful to initialize KTar correctly with the mime type of your
> "uncompressor".
>
> It is just too bad that for just one line of code, you have to duplicate
> all the code of the tar kioslave. However, perhaps you could try to make a
> patch for tar:// and try to get it accepted. (
> mailto:kde-core-devel@kde.org ) For example the mime type of the file could
> be checked, as it would even open the possibility of other compression
> types.

The issue is that once the tar is accessible, there's more to do ;-), which is 
why I was asking about chaining...

The tar itself contains 3 files which are filesystem inside file.  That I'll 
need to dd to a device and mount then re-direct.  From what I understand this 
is too complex for KIO to support.

- -- 

Yannick Koehler
Software Designer - Colubris Networks Inc. - http://www.colubris.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9Tm6TfuKOJNEyL1URAkAJAJ4lBTRY430nAHA0AZbq8qryzYQmQQCfUshN
KzsaBj7FqZd7cgzjeLMZFE4=
=cpjJ
-----END PGP SIGNATURE-----


>> 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