• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

messageviewer

  • sources
  • kde-4.14
  • kdepim
  • messageviewer
  • viewer
  • memento
verifyopaquebodypartmemento.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2014-2015 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 VERIFYOPAQUEBODYPARTMEMENTO_H
19 #define 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 <QObject>
27 #include <QString>
28 #include <QPointer>
29 
30 #include "interfaces/bodypart.h"
31 #include "viewer/viewer.h"
32 
33 namespace Kleo {
34 class VerifyOpaqueJob;
35 class KeyListJob;
36 }
37 
38 class QStringList;
39 
40 namespace MessageViewer {
41 
42 
43 class VerifyOpaqueBodyPartMemento
44  : public CryptoBodyPartMemento
45 {
46  Q_OBJECT
47 public:
48  VerifyOpaqueBodyPartMemento( Kleo::VerifyOpaqueJob * job,
49  Kleo::KeyListJob * klj,
50  const QByteArray & signature );
51  ~VerifyOpaqueBodyPartMemento();
52 
53  bool start();
54  void exec();
55 
56  const QByteArray & plainText() const { return m_plainText; }
57  const GpgME::VerificationResult & verifyResult() const { return m_vr; }
58  const GpgME::Key & signingKey() const { return m_key; }
59 
60 private slots:
61  void slotResult( const GpgME::VerificationResult & vr,
62  const QByteArray & plainText );
63  void slotKeyListJobDone();
64  void slotNextKey( const GpgME::Key & );
65 
66 private:
67  void saveResult( const GpgME::VerificationResult &,
68  const QByteArray & );
69  bool canStartKeyListJob() const;
70  QStringList keyListPattern() const;
71  bool startKeyListJob();
72 private:
73  // input:
74  const QByteArray m_signature;
75  QPointer<Kleo::VerifyOpaqueJob> m_job;
76  QPointer<Kleo::KeyListJob> m_keylistjob;
77  // output:
78  GpgME::VerificationResult m_vr;
79  QByteArray m_plainText;
80  GpgME::Key m_key;
81 };
82 
83 }
84 
85 #endif // VERIFYOPAQUEBODYPARTMEMENTO_H
MessageViewer::VerifyOpaqueBodyPartMemento::verifyResult
const GpgME::VerificationResult & verifyResult() const
Definition: verifyopaquebodypartmemento.h:57
MessageViewer::VerifyOpaqueBodyPartMemento::exec
void exec()
Definition: verifyopaquebodypartmemento.cpp:70
viewer.h
QByteArray
QPointer< Kleo::VerifyOpaqueJob >
bodypart.h
MessageViewer::VerifyOpaqueBodyPartMemento::VerifyOpaqueBodyPartMemento
VerifyOpaqueBodyPartMemento(Kleo::VerifyOpaqueJob *job, Kleo::KeyListJob *klj, const QByteArray &signature)
Definition: verifyopaquebodypartmemento.cpp:34
MessageViewer::VerifyOpaqueBodyPartMemento::~VerifyOpaqueBodyPartMemento
~VerifyOpaqueBodyPartMemento()
Definition: verifyopaquebodypartmemento.cpp:45
MessageViewer::VerifyOpaqueBodyPartMemento::signingKey
const GpgME::Key & signingKey() const
Definition: verifyopaquebodypartmemento.h:58
QStringList
cryptobodypartmemento.h
MessageViewer::VerifyOpaqueBodyPartMemento::plainText
const QByteArray & plainText() const
Definition: verifyopaquebodypartmemento.h:56
MessageViewer::CryptoBodyPartMemento
Definition: cryptobodypartmemento.h:33
MessageViewer::VerifyOpaqueBodyPartMemento::start
bool start()
Definition: verifyopaquebodypartmemento.cpp:52
MessageViewer::VerifyOpaqueBodyPartMemento
Definition: verifyopaquebodypartmemento.h:43
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:45 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

messageviewer

Skip menu "messageviewer"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal