QGpgME  8.1.0.0
Qt API for GpgME
tofupolicyjob.h
1 /* tofupolicyjob.h
2 
3  Copyright (c) 2016 Intevation GmbH
4 
5  QGpgME is free software; you can redistribute it and/or
6  modify it under the terms of the GNU General Public License as
7  published by the Free Software Foundation; either version 2 of the
8  License, or (at your option) any later version.
9 
10  QGpgME is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License along
16  with this program; if not, write to the Free Software Foundation, Inc.,
17  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 
19  In addition, as a special exception, the copyright holders give
20  permission to link the code of this program with any edition of
21  the Qt library by Trolltech AS, Norway (or with modified versions
22  of Qt that use the same license as Qt), and distribute linked
23  combinations including the two. You must obey the GNU General
24  Public License in all respects for all of the code used other than
25  Qt. If you modify this file, you may extend this exception to
26  your version of the file, but you are not obligated to do so. If
27  you do not wish to do so, delete this exception statement from
28  your version.
29 */
30 #ifndef QGPGME_TOFUPOLICYJOB_H
31 #define QGPGME_TOFUPOLICYJOB_H
32 
33 #include "job.h"
34 
35 #include "qgpgme_export.h"
36 
37 #ifdef BUILDING_QGPGME
38 # include "tofuinfo.h"
39 #else
40 # include <gpgme++/tofuinfo.h>
41 #endif
42 
43 namespace GpgME
44 {
45  class Key;
46 } // namespace GpgME
47 
48 namespace QGpgME {
49 
53 class QGPGME_EXPORT TofuPolicyJob: public Job
54 {
55  Q_OBJECT
56 protected:
57  explicit TofuPolicyJob(QObject *parent);
58 public:
59  ~TofuPolicyJob();
60 
61 
62  /* Set the policy to \a policy see the gpgme manual for
63  * policy explanations. */
64  virtual void start(const GpgME::Key &key, GpgME::TofuInfo::Policy policy) = 0;
65 
66  virtual GpgME::Error exec(const GpgME::Key &key, GpgME::TofuInfo::Policy policy) = 0;
67 
68 Q_SIGNALS:
69  /* Result of the operation
70  *
71  * As usual auditLogAsHtml and auditLogError can be ignored.
72  **/
73  void result(const GpgME::Error &error,
74  const QString &auditLogAsHtml = QString(),
75  const GpgME::Error &auditLogError = GpgME::Error());
76 };
77 
78 }
79 
80 #endif
An abstract base class for asynchronous crypto operations.
Definition: job.h:71
Definition: tofupolicyjob.h:53
Definition: abstractimportjob.h:41
Definition: abstractimportjob.h:47