messageviewer
objecttreeparser.cpp
Go to the documentation of this file.
206 mNodeHelper( other.nodeHelper() ), //TODO(Andras) hm, review what happens if mDeleteNodeHelper was true in the source
241 void ObjectTreeParser::createAndParseTempNode( KMime::Content* parentNode, const char* content, const char* cntDesc )
249 kDebug() << "MEDIATYPE: " << newNode->contentType()->mediaType() << newNode->contentType()->mimeType() ;
301 // Also force word wrapping, which is useful for printing, see https://issues.kolab.org/issue3992.
304 htmlWriter()->queue( QLatin1String("<div style=\"position: relative; word-wrap: break-word\">\n") );
316 htmlWriter()->queue( QString::fromLatin1("<a name=\"att%1\"></a>").arg( contentIndex.toString() ) );
332 part.setDefaultDisplay( (Interface::BodyPart::Display) attachmentStrategy()->defaultDisplay( node ) );
338 const Interface::BodyPartFormatter::Result result = formatter->format( &part, htmlWriter(), asyncResultObserver );
391 node->parent()->contentType()->subType() == "related" && mSource->htmlMail() && !showOnlyOneMimePart() ) {
585 = dynamic_cast<VerifyDetachedBodyPartMemento*>( mNodeHelper->bodyPartMemento( &sign, "verifydetached" ) );
642 = dynamic_cast<VerifyOpaqueBodyPartMemento*>( mNodeHelper->bodyPartMemento( &sign, "verifyopaque" ) );
658 QObject::connect( newM, SIGNAL(update(MessageViewer::Viewer::UpdateMode)), mSource->sourceObject(),
741 GpgME::KeyListResult res = job->exec( QStringList( QLatin1String(signature.fingerprint()) ), false, found_keys );
795 messagePart.signer += QLatin1String(" <") + messagePart.signerMailAddresses.front() + QLatin1Char('>');
892 const QString iconName = QLatin1String("file:///") + KIconLoader::global()->iconPath( QLatin1String("document-decrypt"),
909 if ( htmlWriter() ) { //TODO: check if this check should be here or at the beginning of the method
924 //const QString iconName = KGlobal::instance()->iconLoader()->iconPath( "decrypted", KIcon::Small );
954 QString comment = QLatin1String("<b>") + i18n( "Certificate import status:" ) + QLatin1String("</b><br/> <br/>");
975 htmlWriter()->queue( i18n( "Sorry, no details on certificate import available." ) + QLatin1String("<hr>") );
978 htmlWriter()->queue( QLatin1String("<b>") + i18n( "Certificate import details:" ) + QLatin1String("</b><br/>") );
982 htmlWriter()->queue( i18nc( "Certificate import failed.", "Failed: %1 (%2)", QLatin1String((*it).fingerprint()),
986 htmlWriter()->queue( i18n( "New or changed: %1 (secret key available)", QLatin1String((*it).fingerprint() )) );
1031 bool cipherIsBinary = ( !cipherStr.contains(QLatin1String("BEGIN ENCRYPTED MESSAGE"), Qt::CaseInsensitive ) ) &&
1055 = dynamic_cast<DecryptVerifyBodyPartMemento*>( mNodeHelper->bodyPartMemento( &data, "decryptverify" ) );
1065 QObject::connect( newM, SIGNAL(update(MessageViewer::Viewer::UpdateMode)), mSource->sourceObject(),
1114 partMetaData.errorText = i18n("Crypto plug-in \"%1\" could not decrypt the data.", cryptPlugLibName )
1144 bool cipherIsBinary = ( !cipherStr.contains(QLatin1String("BEGIN ENCRYPTED MESSAGE"), Qt::CaseInsensitive ) ) &&
1164 bool ObjectTreeParser::containsExternalReferences( const QString & str, const QString&extraHead )
1166 const bool hasBaseInHeader = extraHead.contains(QLatin1String("<base href=\""),Qt::CaseInsensitive);
1194 // <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
1223 if ( curNode->topLevel()->textContent() == curNode || attachmentStrategy()->defaultDisplay( curNode ) == AttachmentStrategy::Inline ||
1332 digestHeaderStr = QLatin1String("Content-Type: text/plain\nContent-Description: digest header\n\n");
1356 partStr = QLatin1String("Content-Type: message/rfc822\nContent-Description: embedded message\n\n");
1407 bool ObjectTreeParser::processTextPlainSubtype( KMime::Content *curNode, ProcessResult & result )
1411 if ( !isFirstTextPart && attachmentStrategy()->defaultDisplay( curNode ) != AttachmentStrategy::Inline &&
1430 const QString dir = QApplication::isRightToLeft() ? QLatin1String("rtl") : QLatin1String("ltr") ;
1435 htmlStr += QLatin1String("<a href=\"") + mNodeHelper->asHREF( curNode, QLatin1String("body") ) + QLatin1String("\">")
1454 // text part. The plain text content shall not contain any text/plain attachment, as it is content
1511 bool ObjectTreeParser::processMultiPartAlternativeSubtype( KMime::Content * node, ProcessResult & )
1537 // If there is no HTML writer, process both the HTML and the plain text nodes, as we're collecting
1569 bool ObjectTreeParser::processMultiPartDigestSubtype( KMime::Content * node, ProcessResult & result ) {
1573 bool ObjectTreeParser::processMultiPartParallelSubtype( KMime::Content * node, ProcessResult & result ) {
1601 QString protocolContentType = node->contentType()->parameter( QLatin1String("protocol") ).toLower();
1602 const QString signatureContentType = QLatin1String(signature->contentType()->mimeType().toLower());
1631 bool ObjectTreeParser::processMultiPartEncryptedSubtype( KMime::Content * node, ProcessResult & result )
1651 ATTENTION: This code is to be replaced by the new 'auto-detect' feature. --------------------------------------
1664 ---------------------------------------------------------------------------------------------------------------
1684 mNodeHelper->setNodeProcessed( data, false );// Set the data node to done to prevent it from being processed
1721 mNodeHelper->setNodeProcessed( data, false ); // Set the data node to done to prevent it from being processed
1756 decryptedData = KMime::CRLFtoLF( decryptedData ); //KMime works with LF only inside insertAndParseNewChildNode
1829 bool ObjectTreeParser::processApplicationOctetStreamSubtype( KMime::Content * node, ProcessResult & result )
1911 bool ObjectTreeParser::processApplicationPkcs7MimeSubtype( KMime::Content * node, ProcessResult & result )
1923 const Kleo::CryptoBackend::Protocol * smimeCrypto = Kleo::CryptoBackendFactory::instance()->smime();
1927 const QString smimeType = node->contentType()->parameter(QLatin1String("smime-type")).toLower();
2070 bool ObjectTreeParser::decryptChiasmus( const QByteArray& data, QByteArray& bodyDecoded, QString& errorText )
2077 const std::auto_ptr<Kleo::SpecialJob> listjob( chiasmus->specialJob( "x-obtain-keys", QMap<QString,QVariant>() ) );
2105 AutoQPointer<ChiasmusKeySelector> selectorDlg( new ChiasmusKeySelector( /*mReader*/0, i18n( "Chiasmus Decryption Key Selection" ),
2147 bool ObjectTreeParser::processApplicationChiasmusTextSubtype( KMime::Content * curNode, ProcessResult & result )
2152 // ### Surely this is totally wrong? The decoded text of this node is just garbage, since it is
2154 // should be added to mPlainTextContent. Needs testing with Chiasmus though, which I don't have.
2174 const QString chiasmusCharset = curNode->contentType()->parameter(QLatin1String("chiasmus-charset"));
2222 "<img src=\"file:///") + fileName + QLatin1String("\" border=\"0\" style=\"max-width: 100%\"/></a>"
2234 htmlWriter()->queue( QLatin1String("<div><a href=\"") + href + QLatin1String("\"><img src=\"file:///") +
2457 return QLatin1String("<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr><td rowspan=\"2\">");
2482 return QLatin1String("<a href=\"") + url.url() + QLatin1String("\">") + i18nc("The Audit Log is a detailed error log from the gnupg backend", "Show Audit Log") + QLatin1String("</a>");
2506 const bool isSMIME = cryptProto && ( cryptProto == Kleo::CryptoBackendFactory::instance()->smime() );
2510 const QString dir = QApplication::isRightToLeft() ? QLatin1String("rtl") : QLatin1String("ltr");
2515 htmlStr += QLatin1String("<table cellspacing=\"1\" ")+cellPadding+QLatin1String(" class=\"rfc822\">"
2518 htmlStr += QLatin1String("<a href=\"") + mNodeHelper->asHREF( node, QLatin1String("body") ) + QLatin1String("\">")
2527 htmlStr += QLatin1String("<table cellspacing=\"1\" ")+cellPadding+QLatin1String(" class=\"encr\">"
2544 htmlStr += QLatin1String("<table cellspacing=\"1\" ")+cellPadding+QLatin1String(" class=\"signInProgress\">"
2600 QString::fromLatin1("%1%2</a>").arg( startKeyHREF, QString::fromLatin1(QByteArray(QByteArray("0x") + block.keyId)) );
2692 "<tr class=\"") + block.signClass + QLatin1String("H\"><td dir=\"") + dir + QLatin1String("\">");
2712 signer = QLatin1String("<a href=\"mailto:") + QLatin1String(KUrl::toPercentEncoding( address.path() )) +
2778 "<tr class=\"") + block.signClass + QLatin1String("H\"><td dir=\"" )+ dir + QLatin1String("\">");
2817 signer = QLatin1String("<a href=\"mailto:") + signer + QLatin1String("\">") + signer + QLatin1String("</a>");
2826 "<tr class=\"") + block.signClass + QLatin1String("H\"><td dir=\"") + dir + QLatin1String("\">");
2870 "<tr class=\"") + block.signClass + QLatin1String("H\"><td dir=\"") + dir + QLatin1String("\">");
2898 const QString dir = ( QApplication::isRightToLeft() ? QLatin1String("rtl") : QLatin1String("ltr") );
2910 htmlStr += QLatin1String("</td></tr><tr class=\"encrH\"><td dir=\"") + dir + QLatin1String("\">") +
2917 htmlStr += QLatin1String("</td></tr><tr class=\"rfc822H\"><td dir=\"") + dir + QLatin1String("\">") +
2933 htmlWriter()->queue( QString::fromLatin1( "<div id=\"attachmentDiv%1\">\n" ).arg( node->index().toString() ) );
2964 const QString dir = ( QApplication::isRightToLeft() ? QLatin1String("rtl") : QLatin1String("ltr") );
2973 const Kleo::CryptoBackend::Protocol* cryptProto = Kleo::CryptoBackendFactory::instance()->openpgp();
3090 GpgME::KeyListResult res = job->exec( QStringList( QLatin1String(signature.fingerprint()) ), false, found_keys );
3141 messagePart.signer += QLatin1String(" <") + messagePart.signerMailAddresses.front() + QLatin1Char('>');
3346 htmlStr += QString::fromLatin1( "<div dir=\"%1\">" ).arg( paraIsRTL ? QLatin1String("rtl") : QLatin1String("ltr") );
3385 // 1. If newLinePos points after or before (=at the very beginning of) text, it is not between paragraphs
3386 // 2. If the previous line was longer than the wrap size, we want to consider it a paragraph on its own
3474 KMime::Content* ObjectTreeParser::findType( KMime::Content* content, const QByteArray& mimeType, bool deep, bool wide )
3490 KMime::Content* ObjectTreeParser::findType( KMime::Content* content, const QByteArray& mediaType, const QByteArray& subType, bool deep, bool wide )
3508 KMime::Content* ObjectTreeParser::findTypeNot( KMime::Content * content, const QByteArray& mediaType, const QByteArray& subType, bool deep, bool wide )
3549 htmlContent = convertedHtml.replace( QRegExp( QLatin1String("\n" )), QLatin1String("<br />") );
bool processMessageRfc822Subtype(KMime::Content *node, ProcessResult &result)
Definition: objecttreeparser.cpp:1779
const GpgME::VerificationResult & verifyResult() const
Definition: verifyopaquebodypartmemento.h:57
void exec()
Definition: verifyopaquebodypartmemento.cpp:70
const GpgME::VerificationResult & verifyResult() const
Definition: verifydetachedbodypartmemento.h:56
bool decryptChiasmus(const QByteArray &data, QByteArray &bodyDecoded, QString &errorText)
Definition: objecttreeparser.cpp:2070
virtual bool htmlLoadExternal()=0
Return true if external sources should be loaded in a html mail.
QString fromAscii(const char *str, int size)
QByteArray toByteArray() const
int indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
Definition: partmetadata.h:31
bool showOnlyOneMimePart() const
Definition: objecttreeparser.h:374
QString nonQuotedFontTag() const
Definition: csshelperbase.cpp:201
void attachExtraContent(KMime::Content *topLevelNode, KMime::Content *content)
Attach an extra node to an existing node.
Definition: nodehelper.cpp:799
bool isRightToLeft()
QString & append(QChar ch)
void truncate(int position)
void writePartIcon(KMime::Content *msgPart, bool inlineImage=false)
Definition: objecttreeparser.cpp:2200
QString generatePlainText()
Definition: converthtmltoplaintext.cpp:42
virtual QByteArray name() const =0
void writeBodyString(const QByteArray &bodyString, const QString &fromAddress, const QTextCodec *codec, ProcessResult &result, bool decorate)
Definition: objecttreeparser.cpp:2185
an implementation of the BodyPart interface using KMime::Content's
Definition: partnodebodypart.h:55
const T & next()
Definition: interfaces/bodypartformatter.h:58
static const BodyPartFormatter * createFor(const char *type, const char *subtype)
Definition: bodypartformatter.cpp:293
A multipart/alternative message, the plain text part is currently displayed.
Definition: util.h:76
KMime::Content * decryptedNodeForContent(KMime::Content *content) const
Definition: nodehelper.cpp:927
bool processTextPlainSubtype(KMime::Content *node, ProcessResult &result)
Definition: objecttreeparser.cpp:1407
PartMetaData partMetaData(KMime::Content *node)
Definition: nodehelper.cpp:208
const GpgME::Key & signingKey() const
Definition: verifydetachedbodypartmemento.h:57
QString & prepend(QChar ch)
virtual QObject * sourceObject()=0
The source object behind the interface.
bool neverDisplayInline() const
Definition: objecttreeparser.h:95
bool processMultiPartEncryptedSubtype(KMime::Content *node, ProcessResult &result)
Definition: objecttreeparser.cpp:1631
bool processMultiPartAlternativeSubtype(KMime::Content *node, ProcessResult &result)
Definition: objecttreeparser.cpp:1511
bool contains(const QString &str, Qt::CaseSensitivity cs) const
const GpgME::VerificationResult & verifyResult() const
Definition: decryptverifybodypartmemento.h:52
bool isEmpty() const
QByteArray plainTextContentCharset() const
The original charset of MIME part the plain text was extracted from.
Definition: objecttreeparser.h:364
virtual Display defaultDisplay(KMime::Content *node) const =0
QString sigStatusToString(const Kleo::CryptoBackend::Protocol *cryptProto, int status_code, GpgME::Signature::Summary summary, int &frameColor, bool &showKeyInfos)
Definition: objecttreeparser.cpp:2245
UpdateMode
The display update mode: Force updates the display immediately, Delayed updates after some time (150m...
Definition: viewer.h:132
bool isRunning() const
Definition: cryptobodypartmemento.cpp:45
int length() const
void setNeverDisplayInline(bool display)
Definition: objecttreeparser.h:96
void setCryptoProtocol(const Kleo::CryptoBackend::Protocol *protocol)
Definition: objecttreeparser.h:367
bool includeSignatures() const
Definition: objecttreeparser.h:384
void writeAttachmentMarkFooter()
Definition: objecttreeparser.cpp:2938
void writeAttachmentMarkHeader(KMime::Content *node)
Definition: objecttreeparser.cpp:2928
static QString defaultToltecReplacementText()
Default text for processToltecMail(), which is used in messageviewer.kcfg, therefore it needs to be s...
Definition: objecttreeparser.cpp:1478
static KMime::Content * findTypeNot(KMime::Content *content, const QByteArray &mediaType, const QByteArray &subType, bool deep=true, bool wide=true)
Definition: objecttreeparser.cpp:3508
void exec()
Definition: decryptverifybodypartmemento.cpp:56
int lastIndexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
bool processApplicationOctetStreamSubtype(KMime::Content *node, ProcessResult &result)
Definition: objecttreeparser.cpp:1829
void clear()
void exec()
Definition: verifydetachedbodypartmemento.cpp:74
bool keepEncryptions() const
Definition: objecttreeparser.h:379
GpgME::VerificationResult exec(Kleo::VerifyDetachedJob *job, const QByteArray &signature, const QByteArray &signedData)
Definition: kleojobexecutor.cpp:47
QString process(const QString &htmlSource, QString &extraHead)
Do the work and add nice colors to the HTML.
Definition: htmlquotecolorer.cpp:44
bool isEncapsulatedRfc822Message
Definition: partmetadata.h:63
Definition: nodehelper.h:64
Definition: nodehelper.h:66
bool processApplicationPkcs7MimeSubtype(KMime::Content *node, ProcessResult &result)
Definition: objecttreeparser.cpp:1911
bool isRightToLeft() const
QString fromLocal8Bit(const char *str, int size)
void append(const T &value)
QString fromUtf8(const char *str, int size)
bool allowAsync() const
Definition: objecttreeparser.h:310
static IconNameCache * instance()
Definition: iconnamecache.cpp:28
bool empty() const
A QPointer which when destructed, deletes the object it points to.
Definition: autoqpointer.h:38
void setHtml(const QString &html, const QUrl &baseUrl)
QString options() const
Definition: chiasmuskeyselector.cpp:67
void setInlineEncryptionState(KMMsgEncryptionState state)
Definition: objecttreeparser.h:91
void adjustCryptoStatesOfNode(KMime::Content *node) const
Definition: objecttreeparser.cpp:459
virtual bool showSignatureDetails()=0
Return true to include the signature details in the generated html.
Definition: nodehelper.h:54
virtual const QTextCodec * overrideCodec()=0
The override codec that should be used for the mail.
bool isEmpty() const
void setEnableHtmlQuoteColorer(bool enabled)
Definition: htmlquotecolorer.cpp:39
bool isEmpty() const
QString trimmed() const
bool processApplicationChiasmusTextSubtype(KMime::Content *node, ProcessResult &result)
Definition: objecttreeparser.cpp:2147
QWebFrame * mainFrame() const
const char * constData() const
void writeBodyStr(const QByteArray &bodyString, const QTextCodec *aCodec, const QString &fromAddress, KMMsgSignatureState &inlineSignatureState, KMMsgEncryptionState &inlineEncryptionState, bool decorate)
Definition: objecttreeparser.cpp:2958
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
QString toPlainText() const
QByteArray htmlContentCharset() const
Definition: objecttreeparser.h:365
QString writeSigstatFooter(PartMetaData &part)
Definition: objecttreeparser.cpp:2896
NodeHelper * nodeHelper() const
Definition: objecttreeparser.h:406
Interface for object tree sources.
Definition: objecttreesourceif.h:43
Little helper class that takes a HTML source as input and finds all lines that are quoted with '>' or...
Definition: htmlquotecolorer.h:31
static const BodyPartFormatterFactory * instance()
Definition: bodypartformatterfactory.cpp:67
void parseObjectTree(KMime::Content *node)
Parse beginning at a given node and recursively parsing the children of that node and it's next sibli...
Definition: objecttreeparser.cpp:268
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const
virtual void queue(const QString &str)=0
T & front()
T & first()
bool nodeProcessed(KMime::Content *node) const
Definition: nodehelper.cpp:142
bool processMultiPartMixedSubtype(KMime::Content *node, ProcessResult &result)
Definition: objecttreeparser.cpp:1496
const QByteArray & plainText() const
Definition: decryptverifybodypartmemento.h:50
const GpgME::Key & signingKey() const
Definition: verifyopaquebodypartmemento.h:58
KDE_DEPRECATED QByteArray rawDecryptedBody() const
The origin and purpose of this function is unknown, the ancient wisdom about it got lost during the c...
Definition: objecttreeparser.h:330
virtual void extraHead(const QString &str)=0
static const QTextCodec * codecForName(const QByteArray &_str)
Return a QTextCodec for the specified charset.
Definition: nodehelper.cpp:579
KMMsgSignatureState inlineSignatureState() const
Definition: objecttreeparser.h:81
const AttachmentStrategy * attachmentStrategy() const
Definition: objecttreeparser.h:398
QString iconPath(const QString &name, int size) const
Definition: iconnamecache.cpp:42
void setQuoteColor(unsigned int level, const QColor &color)
Sets the quote color of the specific leve.
Definition: htmlquotecolorer.cpp:154
QString right(int n) const
QString asHREF(const KMime::Content *node, const QString &place)
Definition: nodehelper.cpp:685
virtual int levelQuote()=0
virtual bool process(ObjectTreeParser *, KMime::Content *, ProcessResult &) const =0
void setBodyPartMemento(KMime::Content *node, const QByteArray &which, Interface::BodyPartMemento *memento)
Definition: nodehelper.cpp:612
iterator end()
QString toLower() const
Result
Definition: interfaces/bodypartformatter.h:58
bool contains(QChar ch, Qt::CaseSensitivity cs) const
QString quoteFontTag(int level) const
Definition: csshelperbase.cpp:188
static QString beginVerboseSigstatHeader()
Definition: objecttreeparser.cpp:2455
QString htmlContent() const
Similar to plainTextContent(), but returns the HTML source of the first text/html MIME part...
Definition: objecttreeparser.h:345
virtual void embedPart(const QByteArray &contentId, const QString &url)=0
Embed a part with Content-ID contentId, using url url.
bool isValid() const
void setPrinting(bool printing)
Definition: objecttreeparser.cpp:274
bool start()
Definition: verifydetachedbodypartmemento.cpp:56
void setSignatureState(KMime::Content *node, const KMMsgSignatureState state)
Definition: nodehelper.cpp:198
QString writeNodeToTempFile(KMime::Content *node)
Writes the given message part to a temporary file and returns the name of this file or QString() if w...
Definition: nodehelper.cpp:218
Interface::BodyPartMemento * bodyPartMemento(KMime::Content *node, const QByteArray &which) const
Definition: nodehelper.cpp:599
QString & replace(int position, int n, QChar after)
QString writeSigstatHeader(PartMetaData &part, const Kleo::CryptoBackend::Protocol *cryptProto, const QString &fromAddress, KMime::Content *node=0)
Definition: objecttreeparser.cpp:2501
GpgME::Signature::Summary sigSummary
Definition: partmetadata.h:44
static QByteArray charset(KMime::Content *node)
Returns the charset for the given node.
Definition: nodehelper.cpp:368
Definition: nodehelper.h:74
virtual ~ObjectTreeParser()
Definition: objecttreeparser.cpp:220
QString toPlainText() const
void setPartMetaData(KMime::Content *node, const PartMetaData &metaData)
Definition: nodehelper.cpp:213
QByteArray toLatin1() const
static QString makeShowAuditLogLink(const GpgME::Error &err, const QString &auditLog)
Definition: objecttreeparser.cpp:2460
static QString fromAsString(KMime::Content *node)
Definition: nodehelper.cpp:791
QString mid(int position, int n) const
static QString writeSimpleSigstatHeader(const PartMetaData &block, bool printing)
Definition: objecttreeparser.cpp:2414
QStringList toStringList() const
static bool isToltecMessage(KMime::Content *node)
Definition: nodehelper.cpp:321
const QByteArray & plainText() const
Definition: verifyopaquebodypartmemento.h:56
void setNodeDisplayedHidden(KMime::Content *node, bool displayedHidden)
Definition: nodehelper.cpp:653
void setNodeDisplayedEmbedded(KMime::Content *node, bool displayedEmbedded)
Definition: nodehelper.cpp:639
static int signatureToStatus(const GpgME::Signature &sig)
Definition: objecttreeparser.cpp:471
QString escape(const QString &plain)
KMMsgEncryptionState inlineEncryptionState() const
Definition: objecttreeparser.h:88
HtmlWriter * htmlWriter() const
Definition: objecttreeparser.h:402
T & last()
CSSHelper * cssHelper() const
Definition: objecttreeparser.h:404
const Kleo::CryptoBackend::Protocol * cryptoProtocol() const
Definition: objecttreeparser.h:370
typedef ConstIterator
bool start()
Definition: decryptverifybodypartmemento.cpp:44
static QString endVerboseSigstatHeader(const PartMetaData &pmd)
Definition: objecttreeparser.cpp:2488
static KMime::Content * findType(KMime::Content *content, const QByteArray &mimeType, bool deep, bool wide)
Definition: objecttreeparser.cpp:3474
int length() const
virtual const AttachmentStrategy * attachmentStrategy()=0
Return the wanted attachment startegy.
virtual bool htmlMail()=0
Return true if the mail should be parsed as a html mail.
const GpgME::DecryptionResult & decryptResult() const
Definition: decryptverifybodypartmemento.h:51
void setHtmlString(const QString &htmlString)
Definition: converthtmltoplaintext.cpp:37
char * data()
bool processMultiPartDigestSubtype(KMime::Content *node, ProcessResult &result)
Definition: objecttreeparser.cpp:1569
static QString iconName(KMime::Content *node, int size=KIconLoader::Desktop)
Definition: nodehelper.cpp:471
QString convertedTextContent() const
Returns a plain text version of the content, which is either plainTextContent() if that exists...
Definition: objecttreeparser.cpp:3525
void setHtml(const QString &html)
void setNodeUnprocessed(KMime::Content *node, bool recurse)
Definition: nodehelper.cpp:113
void setNodeProcessed(KMime::Content *node, bool recurse)
Definition: nodehelper.cpp:97
virtual QString createMessageHeader(KMime::Message *message)=0
QString fromLatin1(const char *str, int size)
Parses messages and generates HTML display code out of them.
Definition: objecttreeparser.h:287
const QTextCodec * codec(KMime::Content *node)
Get a QTextCodec suitable for this message part.
Definition: nodehelper.cpp:556
QStringList signerMailAddresses
Definition: partmetadata.h:47
const_iterator constEnd() const
Helper class for synchronous execution of Kleo crypto jobs.
Definition: kleojobexecutor.h:44
const_iterator constBegin() const
bool processTextHtmlSubtype(KMime::Content *node, ProcessResult &result)
Definition: objecttreeparser.cpp:1212
void setInlineSignatureState(KMMsgSignatureState state)
Definition: objecttreeparser.h:84
Type type() const
int size() const
bool isMailmanMessage(KMime::Content *curNode)
Definition: objecttreeparser.cpp:1283
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
virtual bool decryptMessage()=0
Return true if an encrypted mail should be decrypted.
bool processMultiPartSignedSubtype(KMime::Content *node, ProcessResult &result)
Definition: objecttreeparser.cpp:1577
QString convertedHtmlContent() const
Returns a HTML version of the plain text mail.
Definition: objecttreeparser.cpp:3542
bool start()
Definition: verifyopaquebodypartmemento.cpp:52
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
virtual void setHtmlMode(MessageViewer::Util::HtmlMode mode)=0
Sets the type of mail that is currently displayed.
iterator begin()
const QString & auditLogAsHtml() const
Definition: cryptobodypartmemento.h:44
QString toUnicode(const QByteArray &a) const
void setEncryptionState(KMime::Content *node, const KMMsgEncryptionState state)
Definition: nodehelper.cpp:188
static QString fileName(const KMime::Content *node)
Returns a usable filename for a node, that can be the filename from the content disposition header...
Definition: nodehelper.cpp:588
void magicSetType(KMime::Content *node, bool autoDecode=true)
Set the 'Content-Type' by mime-magic from the contents of the body.
Definition: nodehelper.cpp:486
void setTime_t(uint seconds)
A multipart/altervative message, the HTML part is currently displayed.
Definition: util.h:77
bool processMultiPartParallelSubtype(KMime::Content *node, ProcessResult &result)
Definition: objecttreeparser.cpp:1573
GpgME::Error auditLogError() const
Definition: cryptobodypartmemento.h:45
QByteArray toUtf8() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:45 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:45 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.