summaryrefslogtreecommitdiffstats
path: root/framework/src/domain/mime/mimetreeparser/verifydetachedbodypartmemento.h
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/domain/mime/mimetreeparser/verifydetachedbodypartmemento.h')
-rw-r--r--framework/src/domain/mime/mimetreeparser/verifydetachedbodypartmemento.h87
1 files changed, 0 insertions, 87 deletions
diff --git a/framework/src/domain/mime/mimetreeparser/verifydetachedbodypartmemento.h b/framework/src/domain/mime/mimetreeparser/verifydetachedbodypartmemento.h
deleted file mode 100644
index f37dfe81..00000000
--- a/framework/src/domain/mime/mimetreeparser/verifydetachedbodypartmemento.h
+++ /dev/null
@@ -1,87 +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_VERIFYDETACHEDBODYPARTMEMENTO_H__
19#define __MIMETREEPARSER_VERIFYDETACHEDBODYPARTMEMENTO_H__
20
21#include "cryptobodypartmemento.h"
22#include <gpgme++/verificationresult.h>
23#include <gpgme++/key.h>
24
25#include <QString>
26#include <QPointer>
27
28#include "bodypart.h"
29
30namespace QGpgME
31{
32class VerifyDetachedJob;
33class KeyListJob;
34}
35
36class QStringList;
37
38namespace MimeTreeParser
39{
40
41class VerifyDetachedBodyPartMemento
42 : public CryptoBodyPartMemento
43{
44 Q_OBJECT
45public:
46 VerifyDetachedBodyPartMemento(QGpgME::VerifyDetachedJob *job,
47 QGpgME::KeyListJob *klj,
48 const QByteArray &signature,
49 const QByteArray &plainText);
50 ~VerifyDetachedBodyPartMemento();
51
52 bool start() Q_DECL_OVERRIDE;
53 void exec() Q_DECL_OVERRIDE;
54
55 const GpgME::VerificationResult &verifyResult() const
56 {
57 return m_vr;
58 }
59 const GpgME::Key &signingKey() const
60 {
61 return m_key;
62 }
63
64private Q_SLOTS:
65 void slotResult(const GpgME::VerificationResult &vr);
66 void slotKeyListJobDone();
67 void slotNextKey(const GpgME::Key &);
68
69private:
70 void saveResult(const GpgME::VerificationResult &);
71 bool canStartKeyListJob() const;
72 QStringList keyListPattern() const;
73 bool startKeyListJob();
74private:
75 // input:
76 const QByteArray m_signature;
77 const QByteArray m_plainText;
78 QPointer<QGpgME::VerifyDetachedJob> m_job;
79 QPointer<QGpgME::KeyListJob> m_keylistjob;
80 // output:
81 GpgME::VerificationResult m_vr;
82 GpgME::Key m_key;
83};
84
85}
86
87#endif // __MIMETREEPARSER_VERIFYDETACHEDBODYPARTMEMENTO_H__