Messagelib
multipartsigned.cpp
36 qCDebug(MIMETREEPARSER_LOG) << "multipart/signed must have exactly two child parts!" << Qt::endl << "processing as multipart/mixed";
38 return MessagePart::Ptr(new MimeMessagePart(part.objectTreeParser(), node->contents().at(0), false));
49 QString protocolContentType = node->contentType()->parameter(QStringLiteral("protocol")).toLower();
50 const QString signatureContentType = QLatin1String(signature->contentType()->mimeType().toLower());
52 qCWarning(MIMETREEPARSER_LOG) << "Message doesn't set the protocol for the multipart/signed content-type, "
59 if (protocolContentType == QLatin1String("application/pkcs7-signature") || protocolContentType == QLatin1String("application/x-pkcs7-signature")) {
61 } else if (protocolContentType == QLatin1String("application/pgp-signature") || protocolContentType == QLatin1String("application/x-pgp-signature")) {
77 new SignedMessagePart(part.objectTreeParser(), aCodec->toUnicode(cleartext), protocol, part.nodeHelper()->fromAsString(node), signedData));
The BodyPartFormatter class.
Definition: bodypartformatter.h:30
virtual MimeTreeParser::ObjectTreeParser * objectTreeParser() const =0
For making it easier to refactor, add objectTreeParser.
QByteArray toLower() const const
QTextStream & endl(QTextStream &stream)
QByteArray mimeType() const
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...
QString parameter(const QString &key) const
QByteArray encodedContent(bool useCrLf=false)
bool isEmpty() const const
The MimeMessagePart class.
Definition: mimetreeparser/src/messagepart.h:145
virtual KMime::Content * content() const =0
Returns the KMime::Content node represented here.
QByteArray decodedContent()
QString toLower() const const
The SignedMessagePart class.
Definition: mimetreeparser/src/messagepart.h:397
Headers::ContentType * contentType(bool create=true)
QVector< Content * > contents() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Apr 1 2023 04:01:57 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Apr 1 2023 04:01:57 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.