37 #include "kpgpbackendbase.h"
39 #include "pgp2backend.h"
40 #include "pgp5backend.h"
41 #include "pgp6backend.h"
42 #include "gpg1backend.h"
44 #include <tdelocale.h>
48 #include "kpgpwrapper.h"
50 Kleo::KpgpBackendBase::KpgpBackendBase()
51 : Kleo::CryptoBackend(),
56 Kleo::KpgpBackendBase::~KpgpBackendBase()
58 delete mOpenPGPProtocol; mOpenPGPProtocol = 0;
61 TQString Kleo::GPG1Backend::name() const {
62 return GPG1_BACKEND_NAME;
65 TQString Kleo::GPG1Backend::displayName() const {
66 return i18n( "Kpgp/gpg");
69 TQString Kleo::PGP2Backend::name() const {
70 return PGP2_BACKEND_NAME;
73 TQString Kleo::PGP2Backend::displayName() const {
74 return i18n( "Kpgp/pgp v2");
77 TQString Kleo::PGP5Backend::name() const {
78 return PGP5_BACKEND_NAME;
81 TQString Kleo::PGP5Backend::displayName() const {
82 return i18n( "Kpgp/pgp v5");
85 TQString Kleo::PGP6Backend::name() const {
86 return PGP6_BACKEND_NAME;
89 TQString Kleo::PGP6Backend::displayName() const {
90 return i18n( "Kpgp/pgp v6");
93 static const TQString notSupported() {
94 return i18n( "This backend does not support S/MIME");
97 bool Kleo::KpgpBackendBase::checkForOpenPGP( TQString * ) const {
101 bool Kleo::KpgpBackendBase::checkForSMIME( TQString * reason ) const {
102 if ( reason ) *reason = notSupported();
106 Kleo::CryptoBackend::Protocol * Kleo::KpgpBackendBase::openpgp() const {
107 if ( !mOpenPGPProtocol )
108 if ( checkForOpenPGP() )
109 mOpenPGPProtocol = new KpgpWrapper( name() );
110 return mOpenPGPProtocol;
|