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

Thomas McGuire mcguire at kde.org
Mon Feb 8 01:09:19 GMT 2010


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

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