33 #ifndef __KLEO_CRYPTOBACKEND_H__
34 #define __KLEO_CRYPTOBACKEND_H__
37 #include <tqvariant.h>
42 class KeyGenerationJob;
50 class VerifyDetachedJob;
51 class VerifyOpaqueJob;
53 class DecryptVerifyJob;
64 static const char OpenPGP[];
65 static const char SMIME[];
67 virtual ~CryptoBackend() {}
69 virtual TQString name() const = 0;
70 virtual TQString displayName() const = 0;
72 virtual bool checkForOpenPGP( TQString * reason=0 ) const = 0;
73 virtual bool checkForSMIME( TQString * reason=0 ) const = 0;
74 virtual bool checkForProtocol( const char * name, TQString * reason=0 ) const = 0;
76 virtual bool supportsOpenPGP() const = 0;
77 virtual bool supportsSMIME() const = 0;
78 virtual bool supportsProtocol( const char * name ) const = 0;
80 virtual CryptoConfig * config() const = 0;
82 virtual Protocol * openpgp() const = 0;
83 virtual Protocol * smime() const = 0;
84 virtual Protocol * protocol( const char * name ) const = 0;
86 virtual const char * enumerateProtocols( int i ) const = 0;
89 class CryptoBackend::Protocol {
91 virtual ~Protocol() {}
93 virtual TQString name() const = 0;
95 virtual TQString displayName() const = 0;
97 virtual KeyListJob * keyListJob( bool remote= false, bool includeSigs= false, bool validate= false ) const = 0;
98 virtual EncryptJob * encryptJob( bool armor= false, bool textmode= false ) const = 0;
99 virtual DecryptJob * decryptJob() const = 0;
100 virtual SignJob * signJob( bool armor= false, bool textMode= false ) const = 0;
101 virtual VerifyDetachedJob * verifyDetachedJob( bool textmode= false) const = 0;
102 virtual VerifyOpaqueJob * verifyOpaqueJob( bool textmode= false ) const = 0;
103 virtual KeyGenerationJob * keyGenerationJob() const = 0;
104 virtual ImportJob * importJob() const = 0;
105 virtual ExportJob * publicKeyExportJob( bool armor= false ) const = 0;
107 virtual ExportJob * secretKeyExportJob( bool armor= false, const TQString& charset = TQString() ) const = 0;
108 virtual DownloadJob * downloadJob( bool armor= false ) const = 0;
109 virtual DeleteJob * deleteJob() const = 0;
110 virtual SignEncryptJob * signEncryptJob( bool armor= false, bool textMode= false ) const = 0;
111 virtual DecryptVerifyJob * decryptVerifyJob( bool textmode= false ) const = 0;
112 virtual RefreshKeysJob * refreshKeysJob() const = 0;
114 virtual SpecialJob * specialJob( const char * type, const TQStringVariantMap & args ) const = 0;
|