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

libkleo

cryptobackend.h

Go to the documentation of this file.
00001 /*
00002     kleo/cryptobackend.h
00003 
00004     This file is part of libkleopatra, the KDE keymanagement library
00005     Copyright (c) 2004,2005 Klarälvdalens Datakonsult AB
00006 
00007     Libkleopatra is free software; you can redistribute it and/or
00008     modify it under the terms of the GNU General Public License as
00009     published by the Free Software Foundation; either version 2 of the
00010     License, or (at your option) any later version.
00011 
00012     Libkleopatra is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015     General Public License for more details.
00016 
00017     You should have received a copy of the GNU General Public License
00018     along with this program; if not, write to the Free Software
00019     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00020 
00021     In addition, as a special exception, the copyright holders give
00022     permission to link the code of this program with any edition of
00023     the Qt library by Trolltech AS, Norway (or with modified versions
00024     of Qt that use the same license as Qt), and distribute linked
00025     combinations including the two.  You must obey the GNU General
00026     Public License in all respects for all of the code used other than
00027     Qt.  If you modify this file, you may extend this exception to
00028     your version of the file, but you are not obligated to do so.  If
00029     you do not wish to do so, delete this exception statement from
00030     your version.
00031 */
00032 
00033 #ifndef __KLEO_CRYPTOBACKEND_H__
00034 #define __KLEO_CRYPTOBACKEND_H__
00035 
00036 #include <QtCore/QString>
00037 
00038 namespace Kleo {
00039   class CryptoConfig;
00040   class KeyListJob;
00041   class KeyGenerationJob;
00042   class ImportJob;
00043   class ExportJob;
00044   class DownloadJob;
00045   class DeleteJob;
00046   class EncryptJob;
00047   class DecryptJob;
00048   class SignJob;
00049   class SignKeyJob;
00050   class VerifyDetachedJob;
00051   class VerifyOpaqueJob;
00052   class SignEncryptJob;
00053   class DecryptVerifyJob;
00054   class RefreshKeysJob;
00055   class ChangeExpiryJob;
00056   class ChangeOwnerTrustJob;
00057   class AddUserIDJob;
00058   class SpecialJob;
00059 }
00060 
00061 class QString;
00062 class QVariant;
00063 template <typename T_Key, typename T_Value> class QMap;
00064 
00065 namespace Kleo {
00066 
00067   class CryptoBackend {
00068   public:
00069     class Protocol;
00070 
00071     static const char OpenPGP[];
00072     static const char SMIME[];
00073 
00074     virtual ~CryptoBackend() {}
00075 
00076     virtual QString name() const = 0;
00077     virtual QString displayName() const = 0;
00078 
00079     virtual bool checkForOpenPGP( QString * reason=0 ) const = 0;
00080     virtual bool checkForSMIME( QString * reason=0 ) const = 0;
00081     virtual bool checkForProtocol( const char * name,  QString * reason=0 ) const = 0;
00082 
00083     virtual bool supportsOpenPGP() const = 0;
00084     virtual bool supportsSMIME() const = 0;
00085     virtual bool supportsProtocol( const char * name ) const = 0;
00086 
00087     virtual CryptoConfig * config() const = 0;
00088 
00089     virtual Protocol * openpgp() const = 0;
00090     virtual Protocol * smime() const = 0;
00091     virtual Protocol * protocol( const char * name ) const = 0;
00092 
00093     virtual const char * enumerateProtocols( int i ) const = 0;
00094   };
00095 
00096   class CryptoBackend::Protocol {
00097   public:
00098     virtual ~Protocol() {}
00099 
00100     virtual QString name() const = 0;
00101 
00102     virtual QString displayName() const = 0;
00103 
00104     virtual KeyListJob          * keyListJob( bool remote=false, bool includeSigs=false, bool validate=false ) const = 0;
00105     virtual EncryptJob          * encryptJob( bool armor=false, bool textmode=false ) const = 0;
00106     virtual DecryptJob          * decryptJob() const = 0;
00107     virtual SignJob             * signJob( bool armor=false, bool textMode=false ) const = 0;
00108     virtual VerifyDetachedJob   * verifyDetachedJob( bool textmode=false) const = 0;
00109     virtual VerifyOpaqueJob     * verifyOpaqueJob( bool textmode=false ) const = 0;
00110     virtual KeyGenerationJob    * keyGenerationJob() const = 0;
00111     virtual ImportJob           * importJob() const = 0;
00112     virtual ExportJob           * publicKeyExportJob( bool armor=false ) const = 0;
00113     // @param charset the encoding of the passphrase in the exported file
00114     virtual ExportJob           * secretKeyExportJob( bool armor=false, const QString& charset = QString() ) const = 0;
00115     virtual DownloadJob         * downloadJob( bool armor=false ) const = 0;
00116     virtual DeleteJob           * deleteJob() const = 0;
00117     virtual SignEncryptJob      * signEncryptJob( bool armor=false, bool textMode=false ) const = 0;
00118     virtual DecryptVerifyJob    * decryptVerifyJob( bool textmode=false ) const = 0;
00119     virtual RefreshKeysJob      * refreshKeysJob() const = 0;
00120     virtual ChangeExpiryJob     * changeExpiryJob() const;
00121     virtual ChangeOwnerTrustJob * changeOwnerTrustJob() const;
00122     virtual SignKeyJob          * signKeyJob() const;
00123     virtual AddUserIDJob        * addUserIDJob() const;
00124     virtual SpecialJob          * specialJob( const char * type, const QMap<QString,QVariant> & args ) const = 0;
00125   };
00126 
00127 }
00128 
00129 #endif // __KLEO_CRYPTOBACKEND_H__

libkleo

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

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal