Messagelib

decryptverifybodypartmemento.h
1 /*
2  SPDX-FileCopyrightText: 2014-2021 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "cryptobodypartmemento.h"
10 
11 #include <gpgme++/decryptionresult.h>
12 #include <gpgme++/verificationresult.h>
13 
14 #include <QPointer>
15 
16 #include "interfaces/bodypart.h"
17 
18 namespace QGpgME
19 {
20 class DecryptVerifyJob;
21 }
22 
23 namespace MimeTreeParser
24 {
25 class DecryptVerifyBodyPartMemento : public CryptoBodyPartMemento
26 {
27  Q_OBJECT
28 public:
29  explicit DecryptVerifyBodyPartMemento(QGpgME::DecryptVerifyJob *job, const QByteArray &cipherText);
30  ~DecryptVerifyBodyPartMemento() override;
31 
32  Q_REQUIRED_RESULT bool start() override;
33  void exec() override;
34 
35  const QByteArray &plainText() const
36  {
37  return m_plainText;
38  }
39 
40  const GpgME::DecryptionResult &decryptResult() const
41  {
42  return m_dr;
43  }
44 
45  const GpgME::VerificationResult &verifyResult() const
46  {
47  return m_vr;
48  }
49 
50 private Q_SLOTS:
51  void slotResult(const GpgME::DecryptionResult &dr, const GpgME::VerificationResult &vr, const QByteArray &plainText);
52 
53 private:
54  void saveResult(const GpgME::DecryptionResult &, const GpgME::VerificationResult &, const QByteArray &);
55 
56 private:
57  // input:
58  const QByteArray m_cipherText;
60  // output:
61  GpgME::DecryptionResult m_dr;
62  GpgME::VerificationResult m_vr;
63  QByteArray m_plainText;
64 };
65 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Nov 30 2021 23:05:46 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.