QGpgME  2.2.0-unknown
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 by Bundesamt für Sicherheit in der Informationstechnik
7  Software engineering by Intevation GmbH
8 
9  QGpgME is free software; you can redistribute it and/or
10  modify it under the terms of the GNU General Public License as
11  published by the Free Software Foundation; either version 2 of the
12  License, or (at your option) any later version.
13 
14  QGpgME is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program; if not, write to the Free Software
21  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 
23  In addition, as a special exception, the copyright holders give
24  permission to link the code of this program with any edition of
25  the Qt library by Trolltech AS, Norway (or with modified versions
26  of Qt that use the same license as Qt), and distribute linked
27  combinations including the two. You must obey the GNU General
28  Public License in all respects for all of the code used other than
29  Qt. If you modify this file, you may extend this exception to
30  your version of the file, but you are not obligated to do so. If
31  you do not wish to do so, delete this exception statement from
32  your version.
33 */
34 #ifndef __QGPGME_PROTOCOL_H__
35 #define __QGPGME_PROTOCOL_H__
36 
37 #include <QString>
38 #include <QVariant>
39 
40 #include "qgpgme_export.h"
41 
42 namespace QGpgME {
43 class AddExistingSubkeyJob;
44 class ADQueryJob;
45 class CryptoConfig;
46 class KeyListJob;
47 class ListAllKeysJob;
48 class KeyGenerationJob;
49 class ImportJob;
50 class ImportFromKeyserverJob;
51 class ExportJob;
52 class DownloadJob;
53 class DeleteJob;
54 class EncryptArchiveJob;
55 class EncryptJob;
56 class DecryptJob;
57 class SignArchiveJob;
58 class SignEncryptArchiveJob;
59 class SignJob;
60 class SignKeyJob;
61 class VerifyDetachedJob;
62 class VerifyOpaqueJob;
63 class SignEncryptJob;
64 class DecryptVerifyArchiveJob;
65 class DecryptVerifyJob;
66 class RefreshKeysJob;
67 class ChangeExpiryJob;
68 class ChangeOwnerTrustJob;
69 class ChangePasswdJob;
70 class AddUserIDJob;
71 class SpecialJob;
72 class KeyForMailboxJob;
73 class WKDLookupJob;
74 class WKSPublishJob;
75 class TofuPolicyJob;
76 class QuickJob;
77 class GpgCardJob;
78 class ReceiveKeysJob;
79 class RevokeKeyJob;
80 class SetPrimaryUserIDJob;
81 class WKDRefreshJob;
82 
119 class QGPGME_EXPORT Protocol
120 {
121 public:
122  virtual ~Protocol() {}
123 
124  virtual QString name() const = 0;
125 
126  virtual QString displayName() const = 0;
127 
128  virtual KeyListJob *keyListJob(bool remote = false, bool includeSigs = false, bool validate = false) const = 0;
129  virtual ListAllKeysJob *listAllKeysJob(bool includeSigs = false, bool validate = false) const = 0;
130  virtual EncryptJob *encryptJob(bool armor = false, bool textmode = false) const = 0;
131  virtual DecryptJob *decryptJob() const = 0;
132  virtual SignJob *signJob(bool armor = false, bool textMode = false) const = 0;
133  virtual VerifyDetachedJob *verifyDetachedJob(bool textmode = false) const = 0;
134  virtual VerifyOpaqueJob *verifyOpaqueJob(bool textmode = false) const = 0;
135  virtual KeyGenerationJob *keyGenerationJob() const = 0;
136  virtual ImportJob *importJob() const = 0;
137  virtual ImportFromKeyserverJob *importFromKeyserverJob() const = 0;
138  virtual ExportJob *publicKeyExportJob(bool armor = false) const = 0;
139  // the second parameter is ignored; the passphrase in the exported file is always utf-8 encoded
140  virtual ExportJob *secretKeyExportJob(bool armor = false, const QString & = QString()) const = 0;
141  virtual DownloadJob *downloadJob(bool armor = false) const = 0;
142  virtual DeleteJob *deleteJob() const = 0;
143  virtual SignEncryptJob *signEncryptJob(bool armor = false, bool textMode = false) const = 0;
144  virtual DecryptVerifyJob *decryptVerifyJob(bool textmode = false) const = 0;
145 
151  virtual RefreshKeysJob *refreshKeysJob() const = 0;
152  virtual ChangeExpiryJob *changeExpiryJob() const = 0;
153  virtual SignKeyJob *signKeyJob() const = 0;
154  virtual ChangePasswdJob *changePasswdJob() const = 0;
155  virtual ChangeOwnerTrustJob *changeOwnerTrustJob() const = 0;
156  virtual AddUserIDJob *addUserIDJob() const = 0;
157  virtual SpecialJob *specialJob(const char *type, const QMap<QString, QVariant> &args) const = 0;
158 
171  virtual KeyListJob *locateKeysJob() const = 0;
173  virtual KeyForMailboxJob *keyForMailboxJob() const = 0;
174 
176  virtual WKSPublishJob *wksPublishJob() const = 0;
177 
179  virtual TofuPolicyJob *tofuPolicyJob() const = 0;
180 
182  virtual QuickJob *quickJob() const = 0;
183 
185  virtual WKDLookupJob *wkdLookupJob() const = 0;
186 
187  virtual ExportJob *secretSubkeyExportJob(bool armor = false) const = 0;
188  virtual AddExistingSubkeyJob *addExistingSubkeyJob() const = 0;
189  virtual ReceiveKeysJob *receiveKeysJob() const = 0;
190 
191  virtual RevokeKeyJob *revokeKeyJob() const = 0;
192 
197  virtual SetPrimaryUserIDJob *setPrimaryUserIDJob() const = 0;
198 
199  virtual EncryptArchiveJob *encryptArchiveJob(bool armor = false) const = 0;
200  virtual SignArchiveJob *signArchiveJob(bool armor = false) const = 0;
201  virtual SignEncryptArchiveJob *signEncryptArchiveJob(bool armor = false) const = 0;
202  virtual DecryptVerifyArchiveJob *decryptVerifyArchiveJob() const = 0;
203 
204  virtual WKDRefreshJob *wkdRefreshJob() const = 0;
205 
206  virtual ADQueryJob *adQueryJob() const = 0;
207 };
208 
214 QGPGME_EXPORT Protocol *openpgp();
215 
221 QGPGME_EXPORT Protocol *smime();
222 
228 QGPGME_EXPORT CryptoConfig *cryptoConfig();
229 
235 QGPGME_EXPORT GpgCardJob *gpgCardJob();
236 
237 }
238 #endif
An abstract base class for asynchronous keyserver-importers.
Definition: importfromkeyserverjob.h:66
An abstract base class to asynchronously add UIDs to OpenPGP keys.
Definition: adduseridjob.h:64
Definition: tofupolicyjob.h:50
An abstract base class to change a key's passphrase asynchronously.
Definition: changepasswdjob.h:62
An abstract base class for asynchronous combined signing and encrypting.
Definition: signencryptjob.h:88
Definition: receivekeysjob.h:43
Definition: wkdlookupjob.h:53
An abstract base class for asynchronous decrypters.
Definition: decryptjob.h:67
An abstract base class for asynchronous encrypters.
Definition: encryptjob.h:85
An abstract base class for asynchronous downloaders.
Definition: downloadjob.h:69
An abstract base class to change expiry asynchronously.
Definition: changeexpiryjob.h:69
An abstract base class for asynchronous deleters.
Definition: deletejob.h:65
Definition: wkspublishjob.h:59
Definition: signencryptarchivejob.h:54
Definition: setprimaryuseridjob.h:50
An abstract base class for asynchronous verification of detached signatures.
Definition: verifydetachedjob.h:75
An abstract base class for asynchronous key generation.
Definition: keygenerationjob.h:65
An abstract base class for asynchronously listing all keys.
Definition: listallkeysjob.h:74
An abstract base class for asynchronous key refreshers.
Definition: refreshkeysjob.h:67
An abstract base class to sign keys asynchronously.
Definition: signkeyjob.h:68
Definition: decryptverifyarchivejob.h:54
An abstract base class for asynchronous exporters.
Definition: exportjob.h:67
An abstract base class for asynchronous signing.
Definition: signjob.h:82
An abstract base class for asynchronous combined decrypters and verifiers.
Definition: decryptverifyjob.h:78
Definition: wkdrefreshjob.h:57
Definition: abstractimportjob.h:48
Definition: adqueryjob.h:62
Definition: revokekeyjob.h:51
An abstract base class for asynchronous importers.
Definition: importjob.h:69
Definition: encryptarchivejob.h:54
An abstract base class for protocol-specific jobs.
Definition: specialjob.h:70
An abstract base class to change owner trust asynchronously.
Definition: changeownertrustjob.h:58
Definition: gpgcardjob.h:47
Get the best key to use for a Mailbox.
Definition: keyformailboxjob.h:65
Definition: addexistingsubkeyjob.h:52
Definition: protocol.h:119
Definition: signarchivejob.h:54
An abstract base class for asynchronous verification of opaque signatures.
Definition: verifyopaquejob.h:77
Definition: quickjob.h:55
Definition: qgpgmebackend.h:43
An abstract base class for asynchronous key listers.
Definition: keylistjob.h:71