[Kde-pim] Review Request: Add support for encapsulated messages to KMime

Ingo Klöcker kloecker at kde.org
Mon Feb 8 23:03:16 GMT 2010



> On 2010-02-08 11:51:42, Thomas McGuire wrote:
> > trunk/KDE/kdepimlibs/kmime/kmime_content.h, line 72
> > <http://reviewboard.kde.org/r/2858/diff/1/?file=18935#file18935line72>
> >
> >     Anyone knows how to forward-declare this in a nicer way?
> >     I actually want to forward-declare KMime::Message::Ptr, but I don't know the syntax.
> 
> Kevin Krammer wrote:
>     Try this:
>     
>     namespace boost
>     {
>       template <class T> shared_ptr;
>     }

As KMime::Message is a class it is (for all that I know) impossible to forward-declare KMime::Message::Ptr. But be sure to ask Marc. He will be able to give you a definitive answer.


- Ingo


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/2858/#review4098
-----------------------------------------------------------


On 2010-02-08 01:09:19, Thomas McGuire wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/2858/
> -----------------------------------------------------------
> 
> (Updated 2010-02-08 01:09:19)
> 
> 
> Review request for KDE PIM.
> 
> 
> Summary
> -------
> 
> KMime currently has no way at all to handle encapsulated messages. A KMime::Content * that has mimetype message/rfc822
> is currently being treated as an opaque blob.
> 
> However, in many situations one needs to deal with the encapsulated message, for example:
> - When modifying an attachment in the encapsulated message, the change should propagate to the complete message
> - The message structure viewer in KMail should display children of the message/rfc822 node
> - The ObjectTreeParser needs to deal with encapsulated messages to display them (this is currently broken)
> 
> This patch implements handling of encapsulated messages in KMime::Content.
> The main addition is a function bodyAsMessage(), which returns the KMime::Message::Ptr that represents the encapsulated
> message. assemble() and parse() are updated to take the possibility of encapsulated messages into account.
> contents() on a message/rfc822 Content will contain the encapsulated message as a subcontent.
> 
> This patch hopefully shouldn't introduce regressions in existing code, as looking at the encapsulated message is optional.
> 
> Please review:
> 1. The API
> 2. The API documentation
> 3. The actual implementation
> 
> 
> Diffs
> -----
> 
>   trunk/KDE/kdepimlibs/kmime/CMakeLists.txt 1080589 
>   trunk/KDE/kdepimlibs/kmime/kmime_content.h 1085276 
>   trunk/KDE/kdepimlibs/kmime/kmime_content.cpp 1080589 
>   trunk/KDE/kdepimlibs/kmime/kmime_content_p.h 1080589 
>   trunk/KDE/kdepimlibs/kmime/kmime_message.h 1080589 
>   trunk/KDE/kdepimlibs/kmime/kmime_message.cpp 1080589 
>   trunk/KDE/kdepimlibs/kmime/tests/data/mails/simple-encapsulated.mbox PRE-CREATION 
>   trunk/KDE/kdepimlibs/kmime/tests/kmime_message_test.h 1080589 
>   trunk/KDE/kdepimlibs/kmime/tests/kmime_message_test.cpp 1080589 
> 
> Diff: http://reviewboard.kde.org/r/2858/diff
> 
> 
> Testing
> -------
> 
> - No regressions in the KMime and messagecomposer unit tests
> - New unit test for KMime to verify this stuff works
> - In a seperate patch, I used the new functionality in the ObjectTreeParser, and it works fine
> 
> 
> Thanks,
> 
> Thomas
> 
>

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list