Messagelib
bodypartformatter.cpp
43 const auto mp = AttachmentMessagePart::Ptr(new AttachmentMessagePart(part.objectTreeParser(), node, part.source()->decryptMessage()));
79 auto mp = AttachmentMessagePart::Ptr(new AttachmentMessagePart(part.objectTreeParser(), node, part.source()->decryptMessage()));
85 const bool isHtmlPreferred = (preferredMode == Util::Html) || (preferredMode == Util::MultipartHtml);
86 if (node->parent() && node->parent()->contentType()->subType() == "related" && isHtmlPreferred) {
120 return MessagePart::Ptr(new EncapsulatedRfc822MessagePart(part.objectTreeParser(), part.content(), message));
126 insert(QStringLiteral("application/pkcs7-mime"), ApplicationPkcs7MimeBodyPartFormatter::create());
127 insert(QStringLiteral("application/x-pkcs7-mime"), ApplicationPkcs7MimeBodyPartFormatter::create());
128 insert(QStringLiteral("application/pgp-encrypted"), ApplicationPGPEncryptedBodyPartFormatter::create());
130 insert(QStringLiteral("application/octet-stream"), ApplicationPkcs7MimeBodyPartFormatter::create());
131 insert(QStringLiteral("application/octet-stream"), EncryptedBodyPartFormatter::create(EncryptedBodyPartFormatter::AutoPGP));
134 insert(QStringLiteral("text/pgp"), EncryptedBodyPartFormatter::create(EncryptedBodyPartFormatter::ForcePGP));
149 insert(QStringLiteral("multipart/alternative"), MultiPartAlternativeBodyPartFormatter::create());
const Headers::ContentType * contentType() const
Content * parent()
QSharedPointer< Message > bodyAsMessage()
QByteArray subType() const
The AttachmentMessagePart class.
Definition mimetreeparser/src/messagepart.h:229
The EncapsulatedRfc822MessagePart class.
Definition mimetreeparser/src/messagepart.h:316
The BodyPartFormatter class.
Definition bodypartformatter.h:31
virtual MimeTreeParser::ObjectTreeParser * objectTreeParser() const =0
For making it easier to refactor, add objectTreeParser.
virtual MimeTreeParser::NodeHelper * nodeHelper() const =0
Ok, this is ugly, exposing the node helper here, but there is too much useful stuff in there for real...
virtual KMime::Content * content() const =0
Returns the KMime::Content node represented here.
virtual MimeTreeParser::Util::HtmlMode preferredMode() const =0
Return the mode that is the preferred to display.
virtual bool decryptMessage() const =0
Return true if an encrypted mail should be decrypted.
bool insert(Part *part, qint64 *insertId=nullptr)
QAction * create(StandardAction id, const Receiver *recvr, Func slot, QObject *parent, std::optional< Qt::ConnectionType > connectionType=std::nullopt)
@ MultipartHtml
A multipart/alternative message, the HTML part is currently displayed.
Definition mimetreeparser/src/utils/util.h:36
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.