summaryrefslogtreecommitdiffstats
path: root/framework/src/domain/mime/mimetreeparser/verifyopaquebodypartmemento.h
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/domain/mime/mimetreeparser/verifyopaquebodypartmemento.h')
-rw-r--r--framework/src/domain/mime/mimetreeparser/verifyopaquebodypartmemento.h93
1 files changed, 0 insertions, 93 deletions
diff --git a/framework/src/domain/mime/mimetreeparser/verifyopaquebodypartmemento.h b/framework/src/domain/mime/mimetreeparser/verifyopaquebodypartmemento.h
deleted file mode 100644
index 02d30a13..00000000
--- a/framework/src/domain/mime/mimetreeparser/verifyopaquebodypartmemento.h
+++ /dev/null
@@ -1,93 +0,0 @@
1/*
2 Copyright (c) 2014-2016 Montel Laurent <montel@kde.org>
3
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License, version 2, as
6 published by the Free Software Foundation.
7
8 This program is distributed in the hope that it will be useful, but
9 WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 General Public License for more details.
12
13 You should have received a copy of the GNU General Public License along
14 with this program; if not, write to the Free Software Foundation, Inc.,
15 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16*/
17
18#ifndef __MIMETREEPARSER_VERIFYOPAQUEBODYPARTMEMENTO_H__
19#define __MIMETREEPARSER_VERIFYOPAQUEBODYPARTMEMENTO_H__
20
21#include "cryptobodypartmemento.h"
22#include <gpgme++/verificationresult.h>
23#include <gpgme++/decryptionresult.h>
24#include <gpgme++/key.h>
25
26#include <QString>
27#include <QPointer>
28
29#include "bodypart.h"
30
31namespace QGpgME
32{
33class VerifyOpaqueJob;
34class KeyListJob;
35}
36
37class QStringList;
38
39namespace MimeTreeParser
40{
41
42class VerifyOpaqueBodyPartMemento
43 : public CryptoBodyPartMemento
44{
45 Q_OBJECT
46public:
47 VerifyOpaqueBodyPartMemento(QGpgME::VerifyOpaqueJob *job,
48 QGpgME::KeyListJob *klj,
49 const QByteArray &signature);
50 ~VerifyOpaqueBodyPartMemento();
51
52 bool start() Q_DECL_OVERRIDE;
53 void exec() Q_DECL_OVERRIDE;
54
55 const QByteArray &plainText() const
56 {
57 return m_plainText;
58 }
59 const GpgME::VerificationResult &verifyResult() const
60 {
61 return m_vr;
62 }
63 const GpgME::Key &signingKey() const
64 {
65 return m_key;
66 }
67
68private Q_SLOTS:
69 void slotResult(const GpgME::VerificationResult &vr,
70 const QByteArray &plainText);
71 void slotKeyListJobDone();
72 void slotNextKey(const GpgME::Key &);
73
74private:
75 void saveResult(const GpgME::VerificationResult &,
76 const QByteArray &);
77 bool canStartKeyListJob() const;
78 QStringList keyListPattern() const;
79 bool startKeyListJob();
80private:
81 // input:
82 const QByteArray m_signature;
83 QPointer<QGpgME::VerifyOpaqueJob> m_job;
84 QPointer<QGpgME::KeyListJob> m_keylistjob;
85 // output:
86 GpgME::VerificationResult m_vr;
87 QByteArray m_plainText;
88 GpgME::Key m_key;
89};
90
91}
92
93#endif // __MIMETREEPARSER_VERIFYOPAQUEBODYPARTMEMENTO_H__