QGpgME  9.2.0.0
Qt API for GpgME
protocol.h
1 /*
2  protocol.h
3 
4  This file is part of qgpgme, the Qt API binding for gpgme
5  Copyright (c) 2004,2005 Klarälvdalens Datakonsult AB
6  Copyright (c) 2016 Intevation GmbH
7 
8  QGpgME is free software; you can redistribute it and/or
9  modify it under the terms of the GNU General Public License as
10  published by the Free Software Foundation; either version 2 of the
11  License, or (at your option) any later version.
12 
13  QGpgME is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with this program; if not, write to the Free Software
20  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 
22  In addition, as a special exception, the copyright holders give
23  permission to link the code of this program with any edition of
24  the Qt library by Trolltech AS, Norway (or with modified versions
25  of Qt that use the same license as Qt), and distribute linked
26  combinations including the two. You must obey the GNU General
27  Public License in all respects for all of the code used other than
28  Qt. If you modify this file, you may extend this exception to
29  your version of the file, but you are not obligated to do so. If
30  you do not wish to do so, delete this exception statement from
31  your version.
32 */
33 #ifndef __QGPGME_PROTOCOL_H__
34 #define __QGPGME_PROTOCOL_H__
35 
36 #include <QString>
37 #include <QVariant>
38 
39 #include "qgpgme_export.h"
40 
41 namespace QGpgME {
42 class CryptoConfig;
43 class KeyListJob;
44 class ListAllKeysJob;
45 class KeyGenerationJob;
46 class ImportJob;
47 class ImportFromKeyserverJob;
48 class ExportJob;
49 class DownloadJob;
50 class DeleteJob;
51 class EncryptJob;
52 class DecryptJob;
53 class SignJob;
54 class SignKeyJob;
55 class VerifyDetachedJob;
56 class VerifyOpaqueJob;
57 class SignEncryptJob;
58 class DecryptVerifyJob;
59 class RefreshKeysJob;
60 class ChangeExpiryJob;
61 class ChangeOwnerTrustJob;
62 class ChangePasswdJob;
63 class AddUserIDJob;
64 class SpecialJob;
65 class KeyForMailboxJob;
66 class WKSPublishJob;
67 class TofuPolicyJob;
68 
104 class QGPGME_EXPORT Protocol
105 {
106 public:
107  virtual ~Protocol() {}
108 
109  virtual QString name() const = 0;
110 
111  virtual QString displayName() const = 0;
112 
113  virtual KeyListJob *keyListJob(bool remote = false, bool includeSigs = false, bool validate = false) const = 0;
114  virtual ListAllKeysJob *listAllKeysJob(bool includeSigs = false, bool validate = false) const = 0;
115  virtual EncryptJob *encryptJob(bool armor = false, bool textmode = false) const = 0;
116  virtual DecryptJob *decryptJob() const = 0;
117  virtual SignJob *signJob(bool armor = false, bool textMode = false) const = 0;
118  virtual VerifyDetachedJob *verifyDetachedJob(bool textmode = false) const = 0;
119  virtual VerifyOpaqueJob *verifyOpaqueJob(bool textmode = false) const = 0;
120  virtual KeyGenerationJob *keyGenerationJob() const = 0;
121  virtual ImportJob *importJob() const = 0;
122  virtual ImportFromKeyserverJob *importFromKeyserverJob() const = 0;
123  virtual ExportJob *publicKeyExportJob(bool armor = false) const = 0;
124  // @param charset the encoding of the passphrase in the exported file
125  virtual ExportJob *secretKeyExportJob(bool armor = false, const QString &charset = QString()) const = 0;
126  virtual DownloadJob *downloadJob(bool armor = false) const = 0;
127  virtual DeleteJob *deleteJob() const = 0;
128  virtual SignEncryptJob *signEncryptJob(bool armor = false, bool textMode = false) const = 0;
129  virtual DecryptVerifyJob *decryptVerifyJob(bool textmode = false) const = 0;
130  virtual RefreshKeysJob *refreshKeysJob() const = 0;
131  virtual ChangeExpiryJob *changeExpiryJob() const = 0;
132  virtual SignKeyJob *signKeyJob() const = 0;
133  virtual ChangePasswdJob *changePasswdJob() const = 0;
134  virtual ChangeOwnerTrustJob *changeOwnerTrustJob() const = 0;
135  virtual AddUserIDJob *addUserIDJob() const = 0;
136  virtual SpecialJob *specialJob(const char *type, const QMap<QString, QVariant> &args) const = 0;
137 
150  virtual KeyListJob *locateKeysJob() const = 0;
152  virtual KeyForMailboxJob *keyForMailboxJob() const = 0;
153 
155  virtual WKSPublishJob *wksPublishJob() const = 0;
156 
158  virtual TofuPolicyJob *tofuPolicyJob() const = 0;
159 };
160 
166 QGPGME_EXPORT Protocol *openpgp();
167 
173 QGPGME_EXPORT Protocol *smime();
174 
180 QGPGME_EXPORT CryptoConfig *cryptoConfig();
181 
182 }
183 #endif
An abstract base class for asynchronous keyserver-importers.
Definition: importfromkeyserverjob.h:65
An abstract base class to asynchronously add UIDs to OpenPGP keys.
Definition: adduseridjob.h:63
Definition: tofupolicyjob.h:53
An abstract base class to change a key&#39;s passphrase asynchronously.
Definition: changepasswdjob.h:61
An abstract base class for asynchronous combined signing and encrypting.
Definition: signencryptjob.h:79
An abstract base class for asynchronous decrypters.
Definition: decryptjob.h:66
An abstract base class for asynchronous encrypters.
Definition: encryptjob.h:74
An abstract base class for asynchronous downloaders.
Definition: downloadjob.h:68
An abstract base class to change expiry asynchronously.
Definition: changeexpiryjob.h:63
An abstract base class for asynchronous deleters.
Definition: deletejob.h:62
Definition: wkspublishjob.h:60
An abstract base class for asynchronous verification of detached signatures.
Definition: verifydetachedjob.h:67
An abstract base class for asynchronous key generation.
Definition: keygenerationjob.h:64
An abstract base class for asynchronously listing all keys.
Definition: listallkeysjob.h:73
An abstract base class for asynchronous key refreshers.
Definition: refreshkeysjob.h:66
An abstract base class to sign keys asynchronously.
Definition: signkeyjob.h:63
An abstract base class for asynchronous exporters.
Definition: exportjob.h:65
An abstract base class for asynchronous signing.
Definition: signjob.h:75
An abstract base class for asynchronous combined decrypters and verifiers.
Definition: decryptverifyjob.h:67
Definition: abstractimportjob.h:47
An abstract base class for asynchronous importers.
Definition: importjob.h:64
An abstract base class for protocol-specific jobs.
Definition: specialjob.h:69
An abstract base class to change owner trust asynchronously.
Definition: changeownertrustjob.h:61
Get the best key to use for a Mailbox.
Definition: keyformailboxjob.h:72
Definition: protocol.h:104
An abstract base class for asynchronous verification of opaque signatures.
Definition: verifyopaquejob.h:66
Definition: qgpgmebackend.h:42
An abstract base class for asynchronous key listers.
Definition: keylistjob.h:74