QGpgME  16.1.0.0000469
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 CryptoConfig;
45 class KeyListJob;
46 class ListAllKeysJob;
47 class KeyGenerationJob;
48 class ImportJob;
49 class ImportFromKeyserverJob;
50 class ExportJob;
51 class DownloadJob;
52 class DeleteJob;
53 class EncryptJob;
54 class DecryptJob;
55 class SignJob;
56 class SignKeyJob;
57 class VerifyDetachedJob;
58 class VerifyOpaqueJob;
59 class SignEncryptJob;
60 class DecryptVerifyJob;
61 class RefreshKeysJob;
62 class ChangeExpiryJob;
63 class ChangeOwnerTrustJob;
64 class ChangePasswdJob;
65 class AddUserIDJob;
66 class SpecialJob;
67 class KeyForMailboxJob;
68 class WKDLookupJob;
69 class WKSPublishJob;
70 class TofuPolicyJob;
71 class QuickJob;
72 class GpgCardJob;
73 class ReceiveKeysJob;
74 class RevokeKeyJob;
75 class SetPrimaryUserIDJob;
76 
113 class QGPGME_EXPORT Protocol
114 {
115 public:
116  virtual ~Protocol() {}
117 
118  virtual QString name() const = 0;
119 
120  virtual QString displayName() const = 0;
121 
122  virtual KeyListJob *keyListJob(bool remote = false, bool includeSigs = false, bool validate = false) const = 0;
123  virtual ListAllKeysJob *listAllKeysJob(bool includeSigs = false, bool validate = false) const = 0;
124  virtual EncryptJob *encryptJob(bool armor = false, bool textmode = false) const = 0;
125  virtual DecryptJob *decryptJob() const = 0;
126  virtual SignJob *signJob(bool armor = false, bool textMode = false) const = 0;
127  virtual VerifyDetachedJob *verifyDetachedJob(bool textmode = false) const = 0;
128  virtual VerifyOpaqueJob *verifyOpaqueJob(bool textmode = false) const = 0;
129  virtual KeyGenerationJob *keyGenerationJob() const = 0;
130  virtual ImportJob *importJob() const = 0;
131  virtual ImportFromKeyserverJob *importFromKeyserverJob() const = 0;
132  virtual ExportJob *publicKeyExportJob(bool armor = false) const = 0;
133  // the second parameter is ignored; the passphrase in the exported file is always utf-8 encoded
134  virtual ExportJob *secretKeyExportJob(bool armor = false, const QString & = QString()) const = 0;
135  virtual DownloadJob *downloadJob(bool armor = false) const = 0;
136  virtual DeleteJob *deleteJob() const = 0;
137  virtual SignEncryptJob *signEncryptJob(bool armor = false, bool textMode = false) const = 0;
138  virtual DecryptVerifyJob *decryptVerifyJob(bool textmode = false) const = 0;
139 
145  virtual RefreshKeysJob *refreshKeysJob() const = 0;
146  virtual ChangeExpiryJob *changeExpiryJob() const = 0;
147  virtual SignKeyJob *signKeyJob() const = 0;
148  virtual ChangePasswdJob *changePasswdJob() const = 0;
149  virtual ChangeOwnerTrustJob *changeOwnerTrustJob() const = 0;
150  virtual AddUserIDJob *addUserIDJob() const = 0;
151  virtual SpecialJob *specialJob(const char *type, const QMap<QString, QVariant> &args) const = 0;
152 
165  virtual KeyListJob *locateKeysJob() const = 0;
167  virtual KeyForMailboxJob *keyForMailboxJob() const = 0;
168 
170  virtual WKSPublishJob *wksPublishJob() const = 0;
171 
173  virtual TofuPolicyJob *tofuPolicyJob() const = 0;
174 
176  virtual QuickJob *quickJob() const = 0;
177 
179  virtual WKDLookupJob *wkdLookupJob() const = 0;
180 
181  virtual ExportJob *secretSubkeyExportJob(bool armor = false) const = 0;
182  virtual AddExistingSubkeyJob *addExistingSubkeyJob() const = 0;
183  virtual ReceiveKeysJob *receiveKeysJob() const = 0;
184 
185  virtual RevokeKeyJob *revokeKeyJob() const = 0;
186 
192 };
193 
199 QGPGME_EXPORT Protocol *openpgp();
200 
206 QGPGME_EXPORT Protocol *smime();
207 
213 QGPGME_EXPORT CryptoConfig *cryptoConfig();
214 
220 QGPGME_EXPORT GpgCardJob *gpgCardJob();
221 
222 }
223 #endif
Definition: addexistingsubkeyjob.h:53
An abstract base class to asynchronously add UIDs to OpenPGP keys.
Definition: adduseridjob.h:65
An abstract base class to change expiry asynchronously.
Definition: changeexpiryjob.h:72
An abstract base class to change owner trust asynchronously.
Definition: changeownertrustjob.h:63
An abstract base class to change a key's passphrase asynchronously.
Definition: changepasswdjob.h:63
An abstract base class for asynchronous decrypters.
Definition: decryptjob.h:68
An abstract base class for asynchronous combined decrypters and verifiers.
Definition: decryptverifyjob.h:69
An abstract base class for asynchronous deleters.
Definition: deletejob.h:64
An abstract base class for asynchronous downloaders.
Definition: downloadjob.h:70
An abstract base class for asynchronous encrypters.
Definition: encryptjob.h:78
An abstract base class for asynchronous exporters.
Definition: exportjob.h:66
Definition: gpgcardjob.h:48
An abstract base class for asynchronous keyserver-importers.
Definition: importfromkeyserverjob.h:67
An abstract base class for asynchronous importers.
Definition: importjob.h:70
Get the best key to use for a Mailbox.
Definition: keyformailboxjob.h:70
An abstract base class for asynchronous key generation.
Definition: keygenerationjob.h:66
An abstract base class for asynchronous key listers.
Definition: keylistjob.h:76
An abstract base class for asynchronously listing all keys.
Definition: listallkeysjob.h:75
Definition: protocol.h:114
virtual TofuPolicyJob * tofuPolicyJob() const =0
virtual KeyListJob * locateKeysJob() const =0
virtual RefreshKeysJob * refreshKeysJob() const =0
virtual QuickJob * quickJob() const =0
virtual WKDLookupJob * wkdLookupJob() const =0
virtual SetPrimaryUserIDJob * setPrimaryUserIDJob() const =0
virtual WKSPublishJob * wksPublishJob() const =0
virtual KeyForMailboxJob * keyForMailboxJob() const =0
Definition: quickjob.h:56
Definition: receivekeysjob.h:44
An abstract base class for asynchronous key refreshers.
Definition: refreshkeysjob.h:68
Definition: revokekeyjob.h:52
Definition: setprimaryuseridjob.h:51
An abstract base class for asynchronous combined signing and encrypting.
Definition: signencryptjob.h:83
An abstract base class for asynchronous signing.
Definition: signjob.h:77
An abstract base class to sign keys asynchronously.
Definition: signkeyjob.h:69
An abstract base class for protocol-specific jobs.
Definition: specialjob.h:71
Definition: tofupolicyjob.h:55
An abstract base class for asynchronous verification of detached signatures.
Definition: verifydetachedjob.h:69
An abstract base class for asynchronous verification of opaque signatures.
Definition: verifyopaquejob.h:68
Definition: wkdlookupjob.h:54
Definition: wkspublishjob.h:60
Definition: qgpgmebackend.h:43