certmanager/lib

kpgpwrapper.cpp
1/*
2 kpgpwrapper.cpp
3
4 This file is part of libkleopatra, the KDE keymanagement library
5 Copyright (c) 2004 Ingo Kloecker <kloecker@kde.org>
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 TQt library by Trolltech AS, Norway (or with modified versions
24 of TQt that use the same license as TQt), 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 TQt. 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#ifdef HAVE_CONFIG_H
34#include <config.h>
35#endif
36
37#include "kpgpwrapper.h"
38
39#include "kpgpbackendbase.h"
40
41#include <kpgpbase.h>
42
43#include <backends/kpgp/kpgpkeylistjob.h>
44//#include <backends/kpgp/kpgpencryptjob.h>
45//#include <backends/kpgp/kpgpdecryptjob.h>
46//#include <backends/kpgp/kpgpsignjob.h>
47//#include <backends/kpgp/kpgpverifydetachedjob.h>
48//#include <backends/kpgp/kpgpverifyopaquejob.h>
49//#include <backends/kpgp/kpgpkeygenerationjob.h>
50//#include <backends/kpgp/kpgpimportjob.h>
51//#include <backends/kpgp/kpgpexportjob.h>
52//#include <backends/kpgp/kpgpsecretkeyexportjob.h>
53//#include <backends/kpgp/kpgpdownloadjob.h>
54//#include <backends/kpgp/kpgpdeletejob.h>
55//#include <backends/kpgp/kpgpsignencryptjob.h>
56//#include <backends/kpgp/kpgpdecryptverifyjob.h>
57//#include <backends/kpgp/kpgpcryptoconfig.h>
58
59KpgpWrapper::KpgpWrapper( const TQString & name )
60 : mName( name ),
61 mPgpBase( nullptr )
62{
63
64}
65
66KpgpWrapper::~KpgpWrapper()
67{
68
69}
70
71TQString KpgpWrapper::name() const
72{
73 return mName;
74}
75
76TQString KpgpWrapper::displayName() const
77{
78 return mName;
79}
80
81Kleo::KeyListJob * KpgpWrapper::keyListJob( bool /*remote*/,
82 bool /*includeSigs*/,
83 bool /*validate*/ ) const
84{
85 return new Kleo::KpgpKeyListJob( pgpBase() );
86}
87
88Kleo::EncryptJob * KpgpWrapper::encryptJob( bool /*armor*/,
89 bool /*textmode*/ ) const
90{
91 return nullptr;
92}
93
94Kleo::DecryptJob * KpgpWrapper::decryptJob() const
95{
96 return nullptr;
97}
98
99Kleo::SignJob * KpgpWrapper::signJob( bool /*armor*/, bool /*textMode*/ ) const
100{
101 return nullptr;
102}
103
104Kleo::VerifyDetachedJob * KpgpWrapper::verifyDetachedJob( bool /*textmode*/ ) const
105{
106 return nullptr;
107}
108
109Kleo::VerifyOpaqueJob * KpgpWrapper::verifyOpaqueJob( bool /*textmode*/ ) const
110{
111 return nullptr;
112}
113
114Kleo::KeyGenerationJob * KpgpWrapper::keyGenerationJob() const
115{
116 return nullptr;
117}
118
119Kleo::ImportJob * KpgpWrapper::importJob() const
120{
121 return nullptr;
122}
123
124Kleo::ExportJob * KpgpWrapper::publicKeyExportJob( bool /*armor*/ ) const
125{
126 return nullptr;
127}
128
129Kleo::ExportJob * KpgpWrapper::secretKeyExportJob( bool /*armor*/ ) const
130{
131 return nullptr;
132}
133
134Kleo::DownloadJob * KpgpWrapper::downloadJob( bool /*armor*/ ) const
135{
136 return nullptr;
137}
138
139Kleo::DeleteJob * KpgpWrapper::deleteJob() const
140{
141 return nullptr;
142}
143
144Kleo::SignEncryptJob * KpgpWrapper::signEncryptJob( bool /*armor*/,
145 bool /*textMode*/ ) const
146{
147 return nullptr;
148}
149
150Kleo::DecryptVerifyJob * KpgpWrapper::decryptVerifyJob( bool /*textmode*/ ) const
151{
152 return nullptr;
153}
154
155Kleo::RefreshKeysJob * KpgpWrapper::refreshKeysJob() const
156{
157 return nullptr;
158}
159
160Kpgp::Base * KpgpWrapper::pgpBase() const
161{
162 if ( !mPgpBase ) {
163 if ( name() == GPG1_BACKEND_NAME )
164 mPgpBase = new Kpgp::BaseG();
165 else if ( name() == PGP2_BACKEND_NAME )
166 mPgpBase = new Kpgp::Base2();
167 else if ( name() == PGP5_BACKEND_NAME )
168 mPgpBase = new Kpgp::Base5();
169 else if ( name() == PGP6_BACKEND_NAME )
170 mPgpBase = new Kpgp::Base6();
171 }
172 return mPgpBase;
173}
An abstract base class for asynchronous decrypters.
Definition decryptjob.h:62
An abstract base class for asynchronous combined decrypters and verifiers.
An abstract base class for asynchronous deleters.
Definition deletejob.h:58
An abstract base class for asynchronous downloaders.
Definition downloadjob.h:61
An abstract base class for asynchronous encrypters.
Definition encryptjob.h:64
An abstract base class for asynchronous exporters.
Definition exportjob.h:61
An abstract base class for asynchronous importers.
Definition importjob.h:62
An abstract base class for asynchronous key generation.
An abstract base class for asynchronous key listers.
Definition keylistjob.h:65
An abstract base class for asynchronous key refreshers.
An abstract base class for asynchronous combined signing and encrypting.
An abstract base class for asynchronous signing.
Definition signjob.h:65
An abstract base class for asynchronous verification of detached signatures.
An abstract base class for asynchronous verification of opaque signatures.