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

List:       kde-devel
Subject:    Re: KIO chains?
From:       Nicolas Goutte <nicog () snafu ! de>
Date:       2002-08-03 21:35:52
[Download RAW message or body]

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?

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.

>

All this is how I see your problem (based on KDE 3.0.2) . I do not tell that 
it is the simplest way. I have never done it, so there might be traps that I 
have not seen.

> - --
>
> Yannick Koehler

Have a nice day/evening/night!

> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
>
> iD8DBQE9SuW6fuKOJNEyL1URAnDFAJ4gUTHUifWcEDO/Q0HCW+tNIztnKQCdGR57
> UOBZpB1DcDyGwVSv1RC+dSY=
> =5Exe
> -----END PGP SIGNATURE-----
>
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> >> unsubscribe <<

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