On Sun, 16 May 2004 14:21:06 +0200 (Romance Daylight Time) Vadim Zeitlin <[EMAIL 
PROTECTED]> wrote:

> 1. give ownership of this MimePartRaw to either MessageView or Message
>    itself, i.e. ask them to delete it when it is not shown any more or
>    when the Message itself is deleted.
>
>    This would work but would make the code quite ugly. Moreover,
>    ViewFilters don't even have access to MessageView (nor Message)
>    currently so this would have to be changed just for this.

This is already partly done: I had to make MessageView::ShowPart
public in order to display the created Mime part. Maybe it could be
given the ownership of the part, but I agree that this is not really
nice...

> 2. don't do this at all at ViewFilter level but create a new MessageUU
>    class similar to the existing MessageVirt and which could have "virtual"
>    MimePartUU parts.
>
>  I clearly prefer the choice (2) (as I think it would have to be done for
> ASCII-armoured PGP support anyhow) but it is much more work... 

More work, yes. 

With respect to ASCII-armoured PGP messages, I don't see your point:
those messages are plain-text, and they are already handled by the PGP
filter, aren't they? You must be refering to PGP-MIME, that can decode
to a full MIME hierarchy.

> Maybe doing it directly at Message level, i.e. simply adding
> methods to create artificial MIME parts to this class, would be
> slightly simpler than creating a new MessageUU (and
> MessagePGP...).

I agree.

>  In fact, when I added ViewFilter I originally wanted to have a similar in
> idea MIMEFilter class, i.e. a chain of filters which would take the
> original message, examine it and possibly rearrange its MIME parts. This
> would probably be the best solution.

Yes. But I'm affraid this would mean to build a layer on top of
c-client's MIME processing: we still need the latter to correctly
handle IMAP, if I understood correctly.

This layer would probably be quite complicated if we try to stick
UUdecoded parts in the MIME tree. This would complicate things for a
very borderline case (with plain text parts that could now become
e.g. multipart/mixed as in the text/file/text case). On the other
hand, PGP-Mime messages would not introduce too much complexity, as
they already have a MIME structure. We would just have to replace
the encrypted part with this decrypted structure.

More generally, do you see other uses for MIME filters than saving
the attachments on disk, replacing them with a pointer to the saved
file?

-- 
Xavier Nodet
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." - Benjamin Franklin, 1759.

Attachment: pgphiS1dt1mT3.pgp
Description: PGP signature

Reply via email to