summaryrefslogtreecommitdiffstats
path: root/framework/src/domain/mime/mimetreeparser/qgpgmejobexecutor.h
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/domain/mime/mimetreeparser/qgpgmejobexecutor.h')
-rw-r--r--framework/src/domain/mime/mimetreeparser/qgpgmejobexecutor.h86
1 files changed, 0 insertions, 86 deletions
diff --git a/framework/src/domain/mime/mimetreeparser/qgpgmejobexecutor.h b/framework/src/domain/mime/mimetreeparser/qgpgmejobexecutor.h
deleted file mode 100644
index 8a81b078..00000000
--- a/framework/src/domain/mime/mimetreeparser/qgpgmejobexecutor.h
+++ /dev/null
@@ -1,86 +0,0 @@
1/*
2 Copyright (c) 2008 Volker Krause <vkrause@kde.org>
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17*/
18
19#ifndef __MIMETREEPARSER_KLEOJOBEXECUTOR_H__
20#define __MIMETREEPARSER_KLEOJOBEXECUTOR_H__
21
22#include <gpgme++/decryptionresult.h>
23#include <gpgme++/importresult.h>
24#include <gpgme++/verificationresult.h>
25
26#include <QObject>
27
28#include <utility>
29
30class QEventLoop;
31
32namespace QGpgME
33{
34class DecryptVerifyJob;
35class ImportJob;
36class VerifyDetachedJob;
37class VerifyOpaqueJob;
38}
39
40namespace MimeTreeParser
41{
42
43/**
44 Helper class for synchronous execution of Kleo crypto jobs.
45*/
46class QGpgMEJobExecutor : public QObject
47{
48 Q_OBJECT
49public:
50 explicit QGpgMEJobExecutor(QObject *parent = nullptr);
51
52 GpgME::VerificationResult exec(QGpgME::VerifyDetachedJob *job,
53 const QByteArray &signature,
54 const QByteArray &signedData);
55 GpgME::VerificationResult exec(QGpgME::VerifyOpaqueJob *job,
56 const QByteArray &signedData,
57 QByteArray &plainText);
58 std::pair<GpgME::DecryptionResult, GpgME::VerificationResult> exec(QGpgME::DecryptVerifyJob *job,
59 const QByteArray &cipherText,
60 QByteArray &plainText);
61 GpgME::ImportResult exec(QGpgME::ImportJob *job, const QByteArray &certData);
62
63 GpgME::Error auditLogError() const;
64 QString auditLogAsHtml() const;
65
66private Q_SLOTS:
67 void verificationResult(const GpgME::VerificationResult &result);
68 void verificationResult(const GpgME::VerificationResult &result, const QByteArray &plainText);
69 void decryptResult(const GpgME::DecryptionResult &decryptionresult,
70 const GpgME::VerificationResult &verificationresult,
71 const QByteArray &plainText);
72 void importResult(const GpgME::ImportResult &result);
73
74private:
75 QEventLoop *mEventLoop;
76 GpgME::VerificationResult mVerificationResult;
77 GpgME::DecryptionResult mDecryptResult;
78 GpgME::ImportResult mImportResult;
79 QByteArray mData;
80 GpgME::Error mAuditLogError;
81 QString mAuditLog;
82};
83
84}
85
86#endif