D8071: Make KMime::Content available properly in MessagePart

Sandro Knauß noreply at phabricator.kde.org
Sat Sep 30 14:53:51 BST 2017


knauss added a comment.


  In https://phabricator.kde.org/D8071#150859, @vkrause wrote:
  
  > But that would tie processing and rendering always together to the same plugin, wouldn't it? In which case the entire exercise of splitting this up becomes kinda pointless, we could just render with the same plugin that managed to succeed in processing.
  
  
  I think in most cases they are connected yes: for vcard, WKS, calendar there is for sure things, that should be done in Processing and not at render step.
  
  > Also, look at it from the plugin developer POV: In this scenario I need to implement process() to decide if I want to deal with it (fair enough), implement my own sub-class of TextMessagePart or AttachmentMessagePart (without any extra data, everything I need is already there, so that's just busy work), fill it with the same logic that TextPlainBodyPartFormatter has presumably (that's highly error prone, that code deals with sign/encrypt state for example), and then I eventually get that passed to my render() method that actually does what my plugin wants to do.
  
  well that is a valid point, the formatter need to get much easier! btw. the distintion between AttachmentMessagePart/textmessagepart is also something that really should be removed, the descition if what is an attachment should be done later in ther rendering step.
  
  > As most plugins are purely dealing with rendering, I think this deserves a more convenient API. Ie. leave processing to things like crypto that actually manipulates the hierarchy, and to do things like determining what's the main body text etc, and allow rendering to work on top of that result.
  
  Okay we don't come to a good conclusion...
  
  So be pramatic: So far we don't have that many plugins, and these need at least be updated to the recent interface. And this patch helps to do the work.
  
  We can later still make the getter as deprecated and rework, if we have more clearer picture with the plugins...

REPOSITORY
  R94 PIM: Message Library

REVISION DETAIL
  https://phabricator.kde.org/D8071

To: vkrause, knauss
Cc: #kde_pim, dvasin, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20170930/8f45ccc5/attachment.html>


More information about the kde-pim mailing list