diff options
Diffstat (limited to 'framework/src/domain/mime/mimetreeparser/messagepart.h')
-rw-r--r-- | framework/src/domain/mime/mimetreeparser/messagepart.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/framework/src/domain/mime/mimetreeparser/messagepart.h b/framework/src/domain/mime/mimetreeparser/messagepart.h index b2714f09..31864ee5 100644 --- a/framework/src/domain/mime/mimetreeparser/messagepart.h +++ b/framework/src/domain/mime/mimetreeparser/messagepart.h | |||
@@ -57,6 +57,12 @@ class MultiPartAlternativeBodyPartFormatter; | |||
57 | class SignedMessagePart; | 57 | class SignedMessagePart; |
58 | class EncryptedMessagePart; | 58 | class EncryptedMessagePart; |
59 | 59 | ||
60 | enum CryptoProtocol { | ||
61 | UnknownProtocol, | ||
62 | OpenPGP, | ||
63 | CMS | ||
64 | }; | ||
65 | |||
60 | class MessagePart : public QObject | 66 | class MessagePart : public QObject |
61 | { | 67 | { |
62 | Q_OBJECT | 68 | Q_OBJECT |
@@ -262,14 +268,14 @@ class CertMessagePart : public MessagePart | |||
262 | Q_OBJECT | 268 | Q_OBJECT |
263 | public: | 269 | public: |
264 | typedef QSharedPointer<CertMessagePart> Ptr; | 270 | typedef QSharedPointer<CertMessagePart> Ptr; |
265 | CertMessagePart(MimeTreeParser::ObjectTreeParser *otp, KMime::Content *node, const GpgME::Protocol cryptoProto); | 271 | CertMessagePart(MimeTreeParser::ObjectTreeParser *otp, KMime::Content *node, const CryptoProtocol cryptoProto); |
266 | virtual ~CertMessagePart(); | 272 | virtual ~CertMessagePart(); |
267 | 273 | ||
268 | QString text() const Q_DECL_OVERRIDE; | 274 | QString text() const Q_DECL_OVERRIDE; |
269 | void import(); | 275 | void import(); |
270 | 276 | ||
271 | private: | 277 | private: |
272 | const GpgME::Protocol mProtocol; | 278 | const CryptoProtocol mProtocol; |
273 | friend class DefaultRendererPrivate; | 279 | friend class DefaultRendererPrivate; |
274 | }; | 280 | }; |
275 | 281 | ||
@@ -298,7 +304,7 @@ public: | |||
298 | typedef QSharedPointer<EncryptedMessagePart> Ptr; | 304 | typedef QSharedPointer<EncryptedMessagePart> Ptr; |
299 | EncryptedMessagePart(ObjectTreeParser *otp, | 305 | EncryptedMessagePart(ObjectTreeParser *otp, |
300 | const QString &text, | 306 | const QString &text, |
301 | const GpgME::Protocol protocol, | 307 | const CryptoProtocol protocol, |
302 | const QString &fromAddress, | 308 | const QString &fromAddress, |
303 | KMime::Content *node, KMime::Content *encryptedNode = nullptr); | 309 | KMime::Content *node, KMime::Content *encryptedNode = nullptr); |
304 | 310 | ||
@@ -327,7 +333,7 @@ private: | |||
327 | bool okDecryptMIME(KMime::Content &data); | 333 | bool okDecryptMIME(KMime::Content &data); |
328 | 334 | ||
329 | protected: | 335 | protected: |
330 | const GpgME::Protocol mProtocol; | 336 | const CryptoProtocol mProtocol; |
331 | QString mFromAddress; | 337 | QString mFromAddress; |
332 | QByteArray mVerifiedText; | 338 | QByteArray mVerifiedText; |
333 | std::vector<GpgME::DecryptionResult::Recipient> mDecryptRecipients; | 339 | std::vector<GpgME::DecryptionResult::Recipient> mDecryptRecipients; |
@@ -345,7 +351,7 @@ public: | |||
345 | typedef QSharedPointer<SignedMessagePart> Ptr; | 351 | typedef QSharedPointer<SignedMessagePart> Ptr; |
346 | SignedMessagePart(ObjectTreeParser *otp, | 352 | SignedMessagePart(ObjectTreeParser *otp, |
347 | const QString &text, | 353 | const QString &text, |
348 | const GpgME::Protocol protocol, | 354 | const CryptoProtocol protocol, |
349 | const QString &fromAddress, | 355 | const QString &fromAddress, |
350 | KMime::Content *node, KMime::Content *signedData); | 356 | KMime::Content *node, KMime::Content *signedData); |
351 | 357 | ||
@@ -367,7 +373,7 @@ private: | |||
367 | void setVerificationResult(const GpgME::VerificationResult &result, bool parseText, const QByteArray &plainText); | 373 | void setVerificationResult(const GpgME::VerificationResult &result, bool parseText, const QByteArray &plainText); |
368 | 374 | ||
369 | protected: | 375 | protected: |
370 | GpgME::Protocol mProtocol; | 376 | CryptoProtocol mProtocol; |
371 | QString mFromAddress; | 377 | QString mFromAddress; |
372 | KMime::Content *mSignedData; | 378 | KMime::Content *mSignedData; |
373 | 379 | ||