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

libkleo

  • sources
  • kde-4.12
  • kdepim
  • libkleo
  • kleo
cryptobackend.h
Go to the documentation of this file.
1 /*
2  kleo/cryptobackend.h
3 
4  This file is part of libkleopatra, the KDE keymanagement library
5  Copyright (c) 2004,2005,2010 Klarälvdalens Datakonsult AB
6 
7  Libkleopatra is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of the
10  License, or (at your option) any later version.
11 
12  Libkleopatra is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 
21  In addition, as a special exception, the copyright holders give
22  permission to link the code of this program with any edition of
23  the Qt library by Trolltech AS, Norway (or with modified versions
24  of Qt that use the same license as Qt), and distribute linked
25  combinations including the two. You must obey the GNU General
26  Public License in all respects for all of the code used other than
27  Qt. If you modify this file, you may extend this exception to
28  your version of the file, but you are not obligated to do so. If
29  you do not wish to do so, delete this exception statement from
30  your version.
31 */
32 
33 #ifndef __KLEO_CRYPTOBACKEND_H__
34 #define __KLEO_CRYPTOBACKEND_H__
35 
36 #include <QtCore/QString>
37 
38 namespace Kleo {
39  class CryptoConfig;
40  class KeyListJob;
41  class ListAllKeysJob;
42  class KeyGenerationJob;
43  class ImportJob;
44  class ImportFromKeyserverJob;
45  class ExportJob;
46  class DownloadJob;
47  class DeleteJob;
48  class EncryptJob;
49  class DecryptJob;
50  class SignJob;
51  class SignKeyJob;
52  class VerifyDetachedJob;
53  class VerifyOpaqueJob;
54  class SignEncryptJob;
55  class DecryptVerifyJob;
56  class RefreshKeysJob;
57  class ChangeExpiryJob;
58  class ChangeOwnerTrustJob;
59  class ChangePasswdJob;
60  class AddUserIDJob;
61  class SpecialJob;
62 }
63 
64 class QString;
65 class QVariant;
66 template <typename T_Key, typename T_Value> class QMap;
67 
68 namespace Kleo {
69 
70  class CryptoBackend {
71  public:
72  class Protocol;
73 
74  static const char OpenPGP[];
75  static const char SMIME[];
76 
77  virtual ~CryptoBackend() {}
78 
79  virtual QString name() const = 0;
80  virtual QString displayName() const = 0;
81 
82  virtual bool checkForOpenPGP( QString * reason=0 ) const = 0;
83  virtual bool checkForSMIME( QString * reason=0 ) const = 0;
84  virtual bool checkForProtocol( const char * name, QString * reason=0 ) const = 0;
85 
86  virtual bool supportsOpenPGP() const = 0;
87  virtual bool supportsSMIME() const = 0;
88  virtual bool supportsProtocol( const char * name ) const = 0;
89 
90  virtual CryptoConfig * config() const = 0;
91 
92  virtual Protocol * openpgp() const = 0;
93  virtual Protocol * smime() const = 0;
94  virtual Protocol * protocol( const char * name ) const = 0;
95 
96  virtual const char * enumerateProtocols( int i ) const = 0;
97  };
98 
99  class CryptoBackend::Protocol {
100  public:
101  virtual ~Protocol() {}
102 
103  virtual QString name() const = 0;
104 
105  virtual QString displayName() const = 0;
106 
107  virtual KeyListJob * keyListJob( bool remote=false, bool includeSigs=false, bool validate=false ) const = 0;
108  virtual ListAllKeysJob * listAllKeysJob( bool includeSigs=false, bool validate=false ) const = 0;
109  virtual EncryptJob * encryptJob( bool armor=false, bool textmode=false ) const = 0;
110  virtual DecryptJob * decryptJob() const = 0;
111  virtual SignJob * signJob( bool armor=false, bool textMode=false ) const = 0;
112  virtual VerifyDetachedJob * verifyDetachedJob( bool textmode=false) const = 0;
113  virtual VerifyOpaqueJob * verifyOpaqueJob( bool textmode=false ) const = 0;
114  virtual KeyGenerationJob * keyGenerationJob() const = 0;
115  virtual ImportJob * importJob() const = 0;
116  virtual ImportFromKeyserverJob * importFromKeyserverJob() const = 0;
117  virtual ExportJob * publicKeyExportJob( bool armor=false ) const = 0;
118  // @param charset the encoding of the passphrase in the exported file
119  virtual ExportJob * secretKeyExportJob( bool armor=false, const QString& charset = QString() ) const = 0;
120  virtual DownloadJob * downloadJob( bool armor=false ) const = 0;
121  virtual DeleteJob * deleteJob() const = 0;
122  virtual SignEncryptJob * signEncryptJob( bool armor=false, bool textMode=false ) const = 0;
123  virtual DecryptVerifyJob * decryptVerifyJob( bool textmode=false ) const = 0;
124  virtual RefreshKeysJob * refreshKeysJob() const = 0;
125  virtual ChangeExpiryJob * changeExpiryJob() const;
126  virtual ChangeOwnerTrustJob * changeOwnerTrustJob() const;
127  virtual ChangePasswdJob * changePasswdJob() const;
128  virtual SignKeyJob * signKeyJob() const;
129  virtual AddUserIDJob * addUserIDJob() const;
130  virtual SpecialJob * specialJob( const char * type, const QMap<QString,QVariant> & args ) const = 0;
131  };
132 
133 }
134 
135 #endif // __KLEO_CRYPTOBACKEND_H__
Kleo::DecryptJob
An abstract base class for asynchronous decrypters.
Definition: decryptjob.h:64
Kleo::RefreshKeysJob
An abstract base class for asynchronous key refreshers.
Definition: refreshkeysjob.h:62
Kleo::ChangePasswdJob
An abstract base class to change a key's passphrase asynchronously.
Definition: changepasswdjob.h:58
Kleo::VerifyOpaqueJob
An abstract base class for asynchronous verification of opaque signatures.
Definition: verifyopaquejob.h:64
Kleo::CryptoBackend::Protocol::verifyDetachedJob
virtual VerifyDetachedJob * verifyDetachedJob(bool textmode=false) const =0
Kleo::CryptoBackend::Protocol::~Protocol
virtual ~Protocol()
Definition: cryptobackend.h:101
Kleo::SpecialJob
An abstract base class for protocol-specific jobs.
Definition: specialjob.h:65
Kleo::ImportFromKeyserverJob
An abstract base class for asynchronous keyserver-importers.
Definition: importfromkeyserverjob.h:61
Kleo::CryptoBackend::Protocol::keyGenerationJob
virtual KeyGenerationJob * keyGenerationJob() const =0
QString
Kleo::CryptoBackend::enumerateProtocols
virtual const char * enumerateProtocols(int i) const =0
Kleo::CryptoBackend::checkForOpenPGP
virtual bool checkForOpenPGP(QString *reason=0) const =0
Kleo::CryptoBackend::Protocol::displayName
virtual QString displayName() const =0
Kleo::CryptoBackend
Definition: cryptobackend.h:70
Kleo::CryptoBackend::Protocol::deleteJob
virtual DeleteJob * deleteJob() const =0
Kleo::CryptoBackend::checkForSMIME
virtual bool checkForSMIME(QString *reason=0) const =0
Kleo::CryptoBackend::Protocol::importJob
virtual ImportJob * importJob() const =0
Kleo::ChangeOwnerTrustJob
An abstract base class to change owner trust asynchronously.
Definition: changeownertrustjob.h:56
Kleo::CryptoBackend::Protocol::refreshKeysJob
virtual RefreshKeysJob * refreshKeysJob() const =0
Kleo::CryptoBackend::Protocol::changePasswdJob
virtual ChangePasswdJob * changePasswdJob() const
Definition: cryptobackend.cpp:40
Kleo::CryptoBackend::openpgp
virtual Protocol * openpgp() const =0
Kleo::CryptoBackend::Protocol::decryptJob
virtual DecryptJob * decryptJob() const =0
Kleo::ListAllKeysJob
An abstract base class for asynchronously listing all keys.
Definition: listallkeysjob.h:67
Kleo::ImportJob
An abstract base class for asynchronous importers.
Definition: importjob.h:61
Kleo::CryptoBackend::Protocol::verifyOpaqueJob
virtual VerifyOpaqueJob * verifyOpaqueJob(bool textmode=false) const =0
Kleo::CryptoBackend::Protocol::signJob
virtual SignJob * signJob(bool armor=false, bool textMode=false) const =0
Kleo::CryptoBackend::OpenPGP
static const char OpenPGP[]
Definition: cryptobackend.h:72
Kleo::CryptoBackend::Protocol::importFromKeyserverJob
virtual ImportFromKeyserverJob * importFromKeyserverJob() const =0
Kleo::AddUserIDJob
An abstract base class to asynchronously add UIDs to OpenPGP keys.
Definition: adduseridjob.h:60
Kleo::CryptoBackend::Protocol::specialJob
virtual SpecialJob * specialJob(const char *type, const QMap< QString, QVariant > &args) const =0
Kleo::CryptoBackend::Protocol::publicKeyExportJob
virtual ExportJob * publicKeyExportJob(bool armor=false) const =0
Kleo::CryptoBackend::Protocol::signKeyJob
virtual SignKeyJob * signKeyJob() const
Definition: cryptobackend.cpp:41
Kleo::CryptoBackend::supportsSMIME
virtual bool supportsSMIME() const =0
Kleo::CryptoBackend::Protocol::signEncryptJob
virtual SignEncryptJob * signEncryptJob(bool armor=false, bool textMode=false) const =0
Kleo::ChangeExpiryJob
An abstract base class to change expiry asynchronously.
Definition: changeexpiryjob.h:60
Kleo::KeyListJob
An abstract base class for asynchronous key listers.
Definition: keylistjob.h:66
Kleo::SignJob
An abstract base class for asynchronous signing.
Definition: signjob.h:69
Kleo::CryptoBackend::SMIME
static const char SMIME[]
Definition: cryptobackend.h:75
Kleo::CryptoBackend::smime
virtual Protocol * smime() const =0
Kleo::SignKeyJob
An abstract base class to sign keys asynchronously.
Definition: signkeyjob.h:60
Kleo::CryptoBackend::checkForProtocol
virtual bool checkForProtocol(const char *name, QString *reason=0) const =0
Kleo::CryptoBackend::Protocol::addUserIDJob
virtual AddUserIDJob * addUserIDJob() const
Definition: cryptobackend.cpp:42
Kleo::CryptoBackend::Protocol::downloadJob
virtual DownloadJob * downloadJob(bool armor=false) const =0
Kleo::CryptoBackend::name
virtual QString name() const =0
Kleo::CryptoBackend::Protocol::decryptVerifyJob
virtual DecryptVerifyJob * decryptVerifyJob(bool textmode=false) const =0
Kleo::CryptoBackend::Protocol::changeOwnerTrustJob
virtual ChangeOwnerTrustJob * changeOwnerTrustJob() const
Definition: cryptobackend.cpp:39
Kleo::ExportJob
An abstract base class for asynchronous exporters.
Definition: exportjob.h:61
Kleo::CryptoBackend::config
virtual CryptoConfig * config() const =0
Kleo::CryptoBackend::Protocol::secretKeyExportJob
virtual ExportJob * secretKeyExportJob(bool armor=false, const QString &charset=QString()) const =0
Kleo::SignEncryptJob
An abstract base class for asynchronous combined signing and encrypting.
Definition: signencryptjob.h:71
Kleo::CryptoBackend::supportsProtocol
virtual bool supportsProtocol(const char *name) const =0
Kleo::CryptoBackend::Protocol::name
virtual QString name() const =0
Kleo::DecryptVerifyJob
An abstract base class for asynchronous combined decrypters and verifiers.
Definition: decryptverifyjob.h:65
Kleo::CryptoBackend::~CryptoBackend
virtual ~CryptoBackend()
Definition: cryptobackend.h:77
Kleo::CryptoBackend::Protocol::keyListJob
virtual KeyListJob * keyListJob(bool remote=false, bool includeSigs=false, bool validate=false) const =0
Kleo::CryptoBackend::displayName
virtual QString displayName() const =0
Kleo::CryptoBackend::Protocol::changeExpiryJob
virtual ChangeExpiryJob * changeExpiryJob() const
Definition: cryptobackend.cpp:38
Kleo::CryptoBackend::supportsOpenPGP
virtual bool supportsOpenPGP() const =0
Kleo::DownloadJob
An abstract base class for asynchronous downloaders.
Definition: downloadjob.h:67
Kleo::KeyGenerationJob
An abstract base class for asynchronous key generation.
Definition: keygenerationjob.h:61
Kleo::DeleteJob
An abstract base class for asynchronous deleters.
Definition: deletejob.h:58
Kleo::CryptoBackend::Protocol
Definition: cryptobackend.h:99
Kleo::CryptoBackend::Protocol::encryptJob
virtual EncryptJob * encryptJob(bool armor=false, bool textmode=false) const =0
Kleo::VerifyDetachedJob
An abstract base class for asynchronous verification of detached signatures.
Definition: verifydetachedjob.h:64
Kleo::CryptoBackend::Protocol::listAllKeysJob
virtual ListAllKeysJob * listAllKeysJob(bool includeSigs=false, bool validate=false) const =0
QMap
Definition: cryptobackend.h:66
Kleo::CryptoBackend::protocol
virtual Protocol * protocol(const char *name) const =0
Kleo::EncryptJob
An abstract base class for asynchronous encrypters.
Definition: encryptjob.h:67
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:57:48 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libkleo

Skip menu "libkleo"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

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

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