Messagelib

decryptverifybodypartmemento.h
1/*
2 SPDX-FileCopyrightText: 2014-2024 Laurent Montel <montel@kde.org>
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
18namespace QGpgME
19{
20class DecryptVerifyJob;
21}
22
23namespace MimeTreeParser
24{
25class DecryptVerifyBodyPartMemento : public CryptoBodyPartMemento
26{
28public:
29 explicit DecryptVerifyBodyPartMemento(QGpgME::DecryptVerifyJob *job, const QByteArray &cipherText);
30 ~DecryptVerifyBodyPartMemento() override;
31
32 [[nodiscard]] 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
50private:
51 void slotResult(const GpgME::DecryptionResult &dr, const GpgME::VerificationResult &vr, const QByteArray &plainText);
52 void saveResult(const GpgME::DecryptionResult &, const GpgME::VerificationResult &, const QByteArray &);
53
54 // input:
55 const QByteArray m_cipherText;
57 // output:
58 GpgME::DecryptionResult m_dr;
59 GpgME::VerificationResult m_vr;
60 QByteArray m_plainText;
61};
62}
Q_OBJECTQ_OBJECT
T qobject_cast(QObject *object)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:12:43 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.