33 #ifndef __KLEO_CRYPTOBACKEND_H__
34 #define __KLEO_CRYPTOBACKEND_H__
41 class KeyGenerationJob;
49 class VerifyDetachedJob;
50 class VerifyOpaqueJob;
52 class DecryptVerifyJob;
59 template < typename T_Key, typename T_Value> class TQMap;
67 static const char OpenPGP[];
68 static const char SMIME[];
70 virtual ~CryptoBackend() {}
72 virtual TQString name() const = 0;
73 virtual TQString displayName() const = 0;
75 virtual bool checkForOpenPGP( TQString * reason=0 ) const = 0;
76 virtual bool checkForSMIME( TQString * reason=0 ) const = 0;
77 virtual bool checkForProtocol( const char * name, TQString * reason=0 ) const = 0;
79 virtual bool supportsOpenPGP() const = 0;
80 virtual bool supportsSMIME() const = 0;
81 virtual bool supportsProtocol( const char * name ) const = 0;
83 virtual CryptoConfig * config() const = 0;
85 virtual Protocol * openpgp() const = 0;
86 virtual Protocol * smime() const = 0;
87 virtual Protocol * protocol( const char * name ) const = 0;
89 virtual const char * enumerateProtocols( int i ) const = 0;
92 class CryptoBackend::Protocol {
94 virtual ~Protocol() {}
96 virtual TQString name() const = 0;
98 virtual TQString displayName() const = 0;
100 virtual KeyListJob * keyListJob( bool remote= false, bool includeSigs= false, bool validate= false ) const = 0;
101 virtual EncryptJob * encryptJob( bool armor= false, bool textmode= false ) const = 0;
102 virtual DecryptJob * decryptJob() const = 0;
103 virtual SignJob * signJob( bool armor= false, bool textMode= false ) const = 0;
104 virtual VerifyDetachedJob * verifyDetachedJob( bool textmode= false) const = 0;
105 virtual VerifyOpaqueJob * verifyOpaqueJob( bool textmode= false ) const = 0;
106 virtual KeyGenerationJob * keyGenerationJob() const = 0;
107 virtual ImportJob * importJob() const = 0;
108 virtual ExportJob * publicKeyExportJob( bool armor= false ) const = 0;
110 virtual ExportJob * secretKeyExportJob( bool armor= false, const TQString& charset = TQString() ) const = 0;
111 virtual DownloadJob * downloadJob( bool armor= false ) const = 0;
112 virtual DeleteJob * deleteJob() const = 0;
113 virtual SignEncryptJob * signEncryptJob( bool armor= false, bool textMode= false ) const = 0;
114 virtual DecryptVerifyJob * decryptVerifyJob( bool textmode= false ) const = 0;
115 virtual RefreshKeysJob * refreshKeysJob() const = 0;
117 virtual SpecialJob * specialJob( const char * type, const TQMap<TQString,TQVariant> & args ) const = 0;
|