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

libkleo

  • sources
  • kde-4.12
  • kdepim
  • libkleo
  • backends
  • chiasmus
chiasmusbackend.cpp
Go to the documentation of this file.
1 /*
2  chiasmusbackend.cpp
3 
4  This file is part of libkleopatra, the KDE keymanagement library
5  Copyright (c) 2005 Klarälvdalens Datakonsult AB
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 along
18  with this program; if not, write to the Free Software Foundation, Inc.,
19  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 Qt library by Trolltech AS, Norway (or with modified versions
24  of Qt that use the same license as Qt), 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  Qt. 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 #include "chiasmusbackend.h"
34 
35 #include "config_data.h"
36 #include "obtainkeysjob.h"
37 #include "chiasmusjob.h"
38 
39 #include "kleo/cryptoconfig.h"
40 
41 #include <klocale.h>
42 #include <kconfig.h>
43 #include <kshell.h>
44 #include <kdebug.h>
45 #include <kconfiggroup.h>
46 
47 #include <QStringList>
48 #include <QVariant>
49 #include <QFileInfo>
50 
51 #include <QList>
52 
53 #include <map>
54 #include <memory>
55 #include <vector>
56 
57 #include <cassert>
58 
59 namespace {
60 
61  //
62  // The usual QVariant template helpers:
63  //
64 
65  // to<> is a demarshaller. It's a class b/c you can't partially
66  // specialize function templates yet. However, to<> can be used as if
67  // it was a function: QString s = to<QString>( myVariant );
68  template <typename T> class to {};
69 
70 #define MAKE_TO( type, func ) \
71  template <> \
72  class to< type > { \
73  type m; \
74  public: \
75  to( const QVariant & v ) : m( v.func() ) {} \
76  operator type() const { return m; } \
77  }
78 
79  MAKE_TO( int, toInt );
80  MAKE_TO( unsigned int, toUInt );
81 
82  template <>
83  class to<KUrl> {
84  KUrl m;
85  public:
86  to( const QVariant & v ) {
87  m.setPath( v.toString() );
88  }
89  operator KUrl() const { return m; }
90  };
91 
92  template <typename T>
93  class to< QList<T> > {
94  QList<T> m;
95  public:
96  to( const QVariant & v ) {
97  const QList<QVariant> vl = v.toList();
98  for ( QList<QVariant>::const_iterator it = vl.begin(), end = vl.end() ; it != end ; ++it )
99  m.push_back( to<T>( *it ) );
100  }
101  operator QList<T> () const { return m; }
102  };
103 
104  template <typename T>
105  class to< std::vector<T> > {
106  std::vector<T> m;
107  public:
108  to( const QVariant & v ) {
109  const QList<QVariant> vl = v.toList();
110  m.reserve( m.size() + vl.size() );
111  for ( QList<QVariant>::const_iterator it = vl.begin(), end = vl.end() ; it != end ; ++it )
112  m.push_back( to<T>( *it ) );
113  }
114  operator std::vector<T> () const { return m; }
115  };
116 
117  template <>
118  class to<KUrl::List> {
119  KUrl::List m;
120  public:
121  to( const QVariant & v ) {
122  // wow, KUrl::List is broken... it lacks conversion from and to QVL<KUrl>...
123  m += to< QList<KUrl> >( v );
124  }
125  operator KUrl::List() const { return m; }
126  };
127 
128 
129  // from<> is the demarshaller. See to<> for why this is a class...
130 
131  template <typename T>
132  struct from_helper : public QVariant {
133  from_helper( const T & t ) : QVariant( t ) {}
134  };
135 
136  template <typename T>
137  QVariant from( const T & t ) {
138  return from_helper<T>( t );
139  }
140 
141  // some special types:
142  template <> struct from_helper<bool> : public QVariant {
143  from_helper( bool b ) : QVariant( b ) {}
144  };
145  template <> struct from_helper<KUrl> : public QVariant {
146  from_helper( const KUrl & url ) : QVariant( url.path() ) {}
147  };
148  template <typename T> struct from_helper< QList<T> > : public QVariant {
149  from_helper( const QList<T> & l ) {
150  QList<QVariant> result;
151  for ( typename QList<T>::const_iterator it = l.begin(), end = l.end() ; it != end ; ++it )
152  result.push_back( from( *it ) );
153  QVariant::operator=( result );
154  }
155  };
156  template <typename T> struct from_helper< std::vector<T> > : public QVariant {
157  from_helper( const std::vector<T> & l ) {
158  QList<QVariant> result;
159  for ( typename std::vector<T>::const_iterator it = l.begin(), end = l.end() ; it != end ; ++it )
160  result.push_back( from( *it ) );
161  QVariant::operator=( result );
162  }
163  };
164  template <> struct from_helper<KUrl::List> : public from_helper< QList<KUrl> > {
165  from_helper( const KUrl::List & l ) : from_helper< QList<KUrl> >( l ) {}
166  };
167 
168  class ChiasmusConfigEntry : public Kleo::CryptoConfigEntry {
169  unsigned int mIdx;
170  QVariant mValue;
171  bool mDirty;
172  public:
173  ChiasmusConfigEntry( unsigned int i )
174  : Kleo::CryptoConfigEntry(),
175  mIdx( i ), mValue( defaultValue() ), mDirty( false )
176  {
177  assert( i < kleo_chiasmus_config_entries_dim );
178  }
179  QString name() const { return QLatin1String(kleo_chiasmus_config_entries[mIdx].name); }
180  QString description() const { return i18n( kleo_chiasmus_config_entries[mIdx].description ); }
181  QString path() const { return name(); }
182  bool isOptional() const { return kleo_chiasmus_config_entries[mIdx].is_optional; }
183  bool isReadOnly() const { return false; }
184  bool isList() const { return kleo_chiasmus_config_entries[mIdx].is_list; }
185  bool isRuntime() const { return kleo_chiasmus_config_entries[mIdx].is_runtime; }
186  Level level() const { return static_cast<Level>( kleo_chiasmus_config_entries[mIdx].level ); }
187  ArgType argType() const { return static_cast<ArgType>( kleo_chiasmus_config_entries[mIdx].type ); }
188  bool isSet() const { return mValue != defaultValue(); }
189  bool boolValue() const { return mValue.toBool(); }
190  QString stringValue() const { return mValue.toString(); }
191  int intValue() const { return mValue.toInt(); }
192  unsigned int uintValue() const { return mValue.toUInt(); }
193  KUrl urlValue() const {
194  if ( argType() != ArgType_Path && argType() != ArgType_DirPath ) return KUrl( mValue.toString() );
195  KUrl u; u.setPath( mValue.toString() ); return u;
196  }
197  unsigned int numberOfTimesSet() const { return 0; }
198  QStringList stringValueList() const { return mValue.toStringList(); }
199  std::vector<int> intValueList() const { return to< std::vector<int> >( mValue ); }
200  std::vector<unsigned int> uintValueList() const { return to< std::vector<unsigned int> >( mValue ); }
201  KUrl::List urlValueList() const {
202  if ( argType() != ArgType_Path && argType()!= ArgType_DirPath ) return mValue.toStringList();
203  else return to<KUrl::List>( mValue ); }
204  void resetToDefault() { mValue = defaultValue(); mDirty = false; }
205  void setBoolValue( bool value ) { setValue( QVariant( value ) ); }
206  void setStringValue( const QString & value ) { setValue( value ); }
207  void setIntValue( int value ) { setValue( value ); }
208  void setUIntValue( unsigned int value ) { setValue( value ); }
209  void setURLValue( const KUrl & value ) {
210  if ( argType() != ArgType_Path && argType()!= ArgType_DirPath ) setValue( value.url() );
211  else setValue( value.path() );
212  }
213  void setNumberOfTimesSet( unsigned int ) {}
214  void setStringValueList( const QStringList & value ) { setValue( value ); }
215  void setIntValueList( const std::vector<int> & l ) { setValue( from( l ) ); }
216  void setUIntValueList( const std::vector<unsigned int> & l ) { setValue( from( l ) ); }
217  void setURLValueList( const KUrl::List & l ) { setValue( from( l ) ); }
218  bool isDirty() const { return mDirty; }
219 
220  QVariant value() const { return mValue; }
221 
222  void sync( KConfigGroup config ) {
223  if ( !mDirty )
224  return;
225  mDirty = false;
226  config.writeEntry( kleo_chiasmus_config_entries[mIdx].name, mValue );
227  }
228  void read( const KConfigGroup & config ) {
229  mDirty = false;
230  mValue = config.readEntry( kleo_chiasmus_config_entries[mIdx].name, defaultValue() );
231  }
232  private:
233  QVariant defaultValue() const;
234  void setValue( const QVariant & value ) { mValue = value; mDirty = true; }
235  };
236 
237  QVariant ChiasmusConfigEntry::defaultValue() const {
238  const kleo_chiasmus_config_data & data = kleo_chiasmus_config_entries[mIdx];
239  switch ( data.type ) {
240  default:
241  return QVariant();
242  case ArgType_None:
243  if ( isList() )
244  return QList<QVariant>() << QVariant( data.defaults.boolean.value );
245  else
246  return QVariant( data.defaults.boolean.value );
247  case ArgType_String:
248  if ( isList() )
249  return QStringList( QString::fromLatin1( data.defaults.string ) );
250  else
251  return QString::fromLatin1( data.defaults.string );
252  case ArgType_Int:
253  if ( isList() )
254  return QList<QVariant>() << data.defaults.integer;
255  else
256  return data.defaults.integer;
257  case ArgType_UInt:
258  if ( isList() )
259  return QList<QVariant>() << data.defaults.unsigned_integer;
260  else
261  return data.defaults.unsigned_integer;
262  case ArgType_Path:
263  case ArgType_DirPath:
264  if ( isList() )
265  return QList<QVariant>() << QString::fromLatin1( data.defaults.path );
266  else
267  return QString::fromLatin1( data.defaults.path );
268  case ArgType_URL:
269  case ArgType_LDAPURL:
270  if ( isList() )
271  return QList<QVariant>() << QString::fromLatin1( data.defaults.url );
272  else
273  return QString::fromLatin1( data.defaults.url );
274  }
275  }
276 
277  class ChiasmusGeneralGroup : public Kleo::CryptoConfigGroup {
278  mutable std::map<QString,ChiasmusConfigEntry*> mCache;
279  mutable KConfig * mConfigObject;
280  public:
281  ChiasmusGeneralGroup() : Kleo::CryptoConfigGroup(), mConfigObject( 0 ) {}
282  ~ChiasmusGeneralGroup() { clear(); delete mConfigObject; }
283  QString name() const { return QLatin1String("General"); }
284  QString iconName() const { return QLatin1String("chiasmus_chi"); }
285  QString path() const { return QString(); }
286  QString description() const { return i18n( "General" ); }
287  Kleo::CryptoConfigEntry::Level level() const { return Kleo::CryptoConfigEntry::Level_Basic; }
288  QStringList entryList() const {
289  QStringList result;
290  for ( unsigned int i = 0 ; i < kleo_chiasmus_config_entries_dim ; ++i )
291  result.push_back( QLatin1String(kleo_chiasmus_config_entries[i].name ));
292  return result;
293  }
294  Kleo::CryptoConfigEntry * entry( const QString & name ) const {
295  if ( ChiasmusConfigEntry * entry = mCache[name] )
296  return entry;
297  const KConfigGroup group( configObject(), "Chiasmus" );
298  for ( unsigned int i = 0 ; i < kleo_chiasmus_config_entries_dim ; ++i )
299  if ( name == QLatin1String(kleo_chiasmus_config_entries[i].name) ) {
300  ChiasmusConfigEntry * entry = new ChiasmusConfigEntry( i );
301  entry->read( group );
302  return mCache[name] = entry;
303  }
304  return 0;
305  }
306 
307  void sync() {
308  KConfigGroup group( configObject(), "Chiasmus" );
309  for ( std::map<QString,ChiasmusConfigEntry*>::const_iterator it = mCache.begin(), end = mCache.end() ; it != end ; ++it )
310  it->second->sync( group );
311  group.sync();
312  clear();
313  }
314  private:
315  KConfig * configObject() const {
316  if ( !mConfigObject )
317  // this is unsafe. We're a lib, used by concurrent apps.
318  mConfigObject = new KConfig( QLatin1String("chiasmusbackendrc") );
319  return mConfigObject;
320  }
321  void clear() {
322  for ( std::map<QString,ChiasmusConfigEntry*>::const_iterator it = mCache.begin(), end = mCache.end() ; it != end ; ++it )
323  delete it->second;
324  mCache.clear();
325  }
326  };
327 
328  class ChiasmusComponent : public Kleo::CryptoConfigComponent {
329  mutable ChiasmusGeneralGroup * mGeneralGroup;
330  public:
331  ChiasmusComponent() : Kleo::CryptoConfigComponent(), mGeneralGroup( 0 ) {}
332  ~ChiasmusComponent() { delete mGeneralGroup; }
333 
334  void sync() {
335  if ( mGeneralGroup )
336  mGeneralGroup->sync();
337  }
338 
339  QString name() const { return QLatin1String("Chiasmus"); }
340  QString iconName() const { return QLatin1String("chiasmus_chi"); }
341  QString description() const { return i18n( "Chiasmus" ); }
342  QStringList groupList() const { return QStringList() << QLatin1String("General"); }
343  Kleo::CryptoConfigGroup * group( const QString & name ) const {
344  if ( name != QLatin1String("General") )
345  return 0;
346  if ( !mGeneralGroup )
347  mGeneralGroup = new ChiasmusGeneralGroup();
348  return mGeneralGroup;
349  }
350  };
351 
352 }
353 
354 class Kleo::ChiasmusBackend::CryptoConfig : public Kleo::CryptoConfig {
355  mutable ChiasmusComponent * mComponent;
356 public:
357  CryptoConfig() : Kleo::CryptoConfig(), mComponent( 0 ) {}
358  ~CryptoConfig() { delete mComponent; }
359 
360  QStringList componentList() const { return QStringList() << QLatin1String("Chiasmus") ; }
361  ChiasmusComponent * component( const QString & name ) const {
362  if ( name != QLatin1String("Chiasmus") )
363  return 0;
364  if ( !mComponent )
365  mComponent = new ChiasmusComponent();
366  return mComponent;
367  }
368  void sync( bool ) {
369  if ( mComponent )
370  mComponent->sync();
371  }
372  void clear() { delete mComponent; mComponent = 0; }
373 };
374 
375 class Kleo::ChiasmusBackend::Protocol : public Kleo::CryptoBackend::Protocol {
376  Kleo::CryptoConfig * mCryptoConfig;
377 public:
378  Protocol( Kleo::CryptoConfig * config )
379  : Kleo::CryptoBackend::Protocol(), mCryptoConfig( config )
380  {
381  assert( config );
382  }
383  ~Protocol() {}
384 
385  QString name() const { return QLatin1String("Chiasmus"); }
386  QString displayName() const { return i18n( "Chiasmus command line tool" ); }
387  KeyListJob * keyListJob( bool, bool, bool ) const { return 0; }
388  ListAllKeysJob * listAllKeysJob( bool, bool ) const { return 0; }
389  EncryptJob * encryptJob( bool, bool ) const { return 0; }
390  DecryptJob * decryptJob() const { return 0; }
391  SignJob * signJob( bool, bool ) const { return 0; }
392  VerifyDetachedJob * verifyDetachedJob( bool ) const { return 0; }
393  VerifyOpaqueJob * verifyOpaqueJob( bool ) const { return 0; }
394  KeyGenerationJob * keyGenerationJob() const { return 0; }
395  ImportFromKeyserverJob * importFromKeyserverJob() const { return 0; }
396  ImportJob * importJob() const { return 0; }
397  ExportJob * publicKeyExportJob( bool ) const { return 0; }
398  ExportJob * secretKeyExportJob( bool, const QString& ) const { return 0; }
399  DownloadJob * downloadJob( bool ) const { return 0; }
400  DeleteJob * deleteJob() const { return 0; }
401  SignEncryptJob * signEncryptJob( bool, bool ) const { return 0; }
402  DecryptVerifyJob * decryptVerifyJob( bool ) const { return 0; }
403  RefreshKeysJob * refreshKeysJob() const { return 0; }
404 
405  SpecialJob * specialJob( const char * type, const QMap<QString,QVariant> & args ) const {
406  if ( qstricmp( type, "x-obtain-keys" ) == 0 && args.size() == 0 )
407  return new ObtainKeysJob();
408  if ( qstricmp( type, "x-encrypt" ) == 0 && args.size() == 0 )
409  return new ChiasmusJob( ChiasmusJob::Encrypt );
410  if ( qstricmp( type, "x-decrypt" ) == 0 && args.size() == 0 )
411  return new ChiasmusJob( ChiasmusJob::Decrypt );
412  kDebug(5150) <<"ChiasmusBackend::Protocol: tried to instantiate unknown job type \""
413  << type << "\"";
414 
415  return 0;
416  }
417 };
418 
419 Kleo::ChiasmusBackend * Kleo::ChiasmusBackend::self = 0;
420 
421 Kleo::ChiasmusBackend::ChiasmusBackend()
422  : Kleo::CryptoBackend(),
423  mCryptoConfig( 0 ),
424  mProtocol( 0 )
425 {
426  self = this;
427 }
428 
429 Kleo::ChiasmusBackend::~ChiasmusBackend() {
430  self = 0;
431  delete mCryptoConfig;
432  delete mProtocol;
433 }
434 
435 QString Kleo::ChiasmusBackend::name() const {
436  return QLatin1String("Chiasmus");
437 }
438 
439 QString Kleo::ChiasmusBackend::displayName() const {
440  return i18n( "Chiasmus" );
441 }
442 
443 Kleo::CryptoConfig * Kleo::ChiasmusBackend::config() const {
444  if ( !mCryptoConfig )
445  mCryptoConfig = new CryptoConfig();
446  return mCryptoConfig;
447 }
448 
449 Kleo::CryptoBackend::Protocol * Kleo::ChiasmusBackend::protocol( const char * name ) const {
450  if ( qstricmp( name, "Chiasmus" ) != 0 )
451  return 0;
452  if ( !mProtocol )
453  if ( checkForChiasmus() )
454  mProtocol = new Protocol( config() );
455  return mProtocol;
456 }
457 
458 bool Kleo::ChiasmusBackend::checkForOpenPGP( QString * reason ) const {
459  if ( reason )
460  *reason = i18n( "Unsupported protocol \"%1\"", QLatin1String("OpenPGP") );
461  return false;
462 }
463 
464 bool Kleo::ChiasmusBackend::checkForSMIME( QString * reason ) const {
465  if ( reason )
466  *reason = i18n( "Unsupported protocol \"%1\"", QLatin1String("SMIME") );
467  return false;
468 }
469 
470 bool Kleo::ChiasmusBackend::checkForChiasmus( QString * reason ) const {
471 
472  // kills the protocol instance when we return false:
473  std::auto_ptr<Protocol> tmp( mProtocol );
474  mProtocol = 0;
475 
476  const CryptoConfigEntry * path = config()->entry( QLatin1String("Chiasmus"), QLatin1String("General"), QLatin1String("path") );
477  assert( path ); assert( path->argType() == CryptoConfigEntry::ArgType_Path );
478  const QString chiasmus = path->urlValue().path();
479  const QFileInfo fi( KShell::tildeExpand( chiasmus ) );
480  if ( !fi.isExecutable() ) {
481  if ( reason )
482  *reason = i18n( "File \"%1\" does not exist or is not executable.", chiasmus );
483  return false;
484  }
485 
486  // FIXME: more checks?
487  mProtocol = tmp.release();
488  return true;
489 }
490 
491 bool Kleo::ChiasmusBackend::checkForProtocol( const char * name, QString * reason ) const {
492  if ( qstricmp( name, "Chiasmus" ) == 0 )
493  return checkForChiasmus( reason );
494  if ( reason )
495  *reason = i18n( "Unsupported protocol \"%1\"", QLatin1String(name) );
496  return 0;
497 }
498 
499 bool Kleo::ChiasmusBackend::supportsProtocol( const char * name ) const {
500  return qstricmp( name, "Chiasmus" ) == 0;
501 }
502 
503 const char * Kleo::ChiasmusBackend::enumerateProtocols( int i ) const {
504  return i == 0 ? "Chiasmus" : 0 ;
505 }
kleo_chiasmus_config_data::boolean
struct kleo_chiasmus_config_data::@0::@1 boolean
ArgType_LDAPURL
Definition: cryptoconfig.h:87
config_data.h
obtainkeysjob.h
name
const char * name
Definition: kconfigbasedkeyfilter.cpp:124
ArgType_DirPath
Definition: cryptoconfig.h:88
Kleo::ChiasmusBackend::name
QString name() const
Definition: chiasmusbackend.cpp:435
Kleo::CryptoBackend::Protocol::verifyDetachedJob
virtual VerifyDetachedJob * verifyDetachedJob(bool textmode=false) const =0
Kleo::CryptoBackend::Protocol::~Protocol
virtual ~Protocol()
Definition: cryptobackend.h:101
ArgType_String
Definition: cryptoconfig.h:82
kleo_chiasmus_config_data::is_list
unsigned int is_list
Definition: config_data.h:54
MAKE_TO
#define MAKE_TO(type, func)
Definition: chiasmusbackend.cpp:70
kleo_chiasmus_config_data::is_runtime
unsigned int is_runtime
Definition: config_data.h:55
Level_Basic
Definition: cryptoconfig.h:60
kleo_chiasmus_config_data::type
int type
Definition: config_data.h:44
Kleo::CryptoBackend::Protocol::keyGenerationJob
virtual KeyGenerationJob * keyGenerationJob() const =0
QString
Kleo::CryptoBackend::Protocol::displayName
virtual QString displayName() const =0
ArgType_Path
Definition: cryptoconfig.h:85
Kleo::CryptoBackend
Definition: cryptobackend.h:70
Kleo::CryptoBackend::Protocol::deleteJob
virtual DeleteJob * deleteJob() const =0
Kleo::CryptoBackend::Protocol::importJob
virtual ImportJob * importJob() const =0
Kleo::CryptoBackend::Protocol::refreshKeysJob
virtual RefreshKeysJob * refreshKeysJob() const =0
kleo_chiasmus_config_data::level
int level
Definition: config_data.h:43
kleo_chiasmus_config_data
Definition: config_data.h:40
Kleo::CryptoBackend::Protocol::decryptJob
virtual DecryptJob * decryptJob() const =0
Kleo::ChiasmusBackend::config
Kleo::CryptoConfig * config() const
Definition: chiasmusbackend.cpp:443
kleo_chiasmus_config_data::unsigned_integer
unsigned int unsigned_integer
Definition: config_data.h:51
Kleo::CryptoBackend::Protocol::verifyOpaqueJob
virtual VerifyOpaqueJob * verifyOpaqueJob(bool textmode=false) const =0
Kleo::ChiasmusBackend::protocol
Kleo::CryptoBackend::Protocol * protocol(const char *name) const
Definition: chiasmusbackend.cpp:449
Level
Level
Definition: cryptoconfig.h:60
Kleo::ChiasmusBackend::checkForOpenPGP
bool checkForOpenPGP(QString *reason=0) const
Definition: chiasmusbackend.cpp:458
kleo_chiasmus_config_data::defaults
union kleo_chiasmus_config_data::@0 defaults
Kleo::CryptoBackend::Protocol::signJob
virtual SignJob * signJob(bool armor=false, bool textMode=false) const =0
Kleo::CryptoBackend::Protocol::importFromKeyserverJob
virtual ImportFromKeyserverJob * importFromKeyserverJob() const =0
Kleo::ChiasmusJob::Decrypt
Definition: chiasmusjob.h:61
Kleo::CryptoBackend::Protocol::specialJob
virtual SpecialJob * specialJob(const char *type, const QMap< QString, QVariant > &args) const =0
Kleo::CryptoBackend::Protocol::publicKeyExportJob
virtual ExportJob * publicKeyExportJob(bool armor=false) const =0
cryptoconfig.h
kleo_chiasmus_config_entries_dim
const unsigned int kleo_chiasmus_config_entries_dim
kleo_chiasmus_config_data::string
const char * string
Definition: config_data.h:47
Kleo::CryptoBackend::Protocol::signEncryptJob
virtual SignEncryptJob * signEncryptJob(bool armor=false, bool textMode=false) const =0
Kleo::ChiasmusBackend::~ChiasmusBackend
~ChiasmusBackend()
Definition: chiasmusbackend.cpp:429
kleo_chiasmus_config_data::url
const char * url
Definition: config_data.h:48
chiasmusjob.h
Kleo::ChiasmusJob::Encrypt
Definition: chiasmusjob.h:61
Kleo::ChiasmusBackend::checkForSMIME
bool checkForSMIME(QString *reason=0) const
Definition: chiasmusbackend.cpp:464
kleo_chiasmus_config_entries
const struct kleo_chiasmus_config_data kleo_chiasmus_config_entries[]
ArgType
ArgType
Type of the argument.
Definition: cryptoconfig.h:81
Kleo::CryptoBackend::Protocol::downloadJob
virtual DownloadJob * downloadJob(bool armor=false) const =0
Kleo::CryptoBackend::Protocol::decryptVerifyJob
virtual DecryptVerifyJob * decryptVerifyJob(bool textmode=false) const =0
Kleo::ChiasmusBackend
Definition: chiasmusbackend.h:47
Kleo::CryptoBackend::Protocol::secretKeyExportJob
virtual ExportJob * secretKeyExportJob(bool armor=false, const QString &charset=QString()) const =0
ArgType_UInt
Definition: cryptoconfig.h:84
ArgType_URL
Definition: cryptoconfig.h:86
Kleo::CryptoBackend::Protocol::name
virtual QString name() const =0
kleo_chiasmus_config_data::integer
int integer
Definition: config_data.h:50
Kleo::CryptoBackend::Protocol::keyListJob
virtual KeyListJob * keyListJob(bool remote=false, bool includeSigs=false, bool validate=false) const =0
Kleo::ChiasmusBackend::enumerateProtocols
const char * enumerateProtocols(int i) const
Definition: chiasmusbackend.cpp:503
Kleo::ChiasmusBackend::checkForChiasmus
bool checkForChiasmus(QString *reason=0) const
Definition: chiasmusbackend.cpp:470
chiasmusbackend.h
ArgType_None
Definition: cryptoconfig.h:81
ArgType_Int
Definition: cryptoconfig.h:83
Kleo::ChiasmusBackend::displayName
QString displayName() const
Definition: chiasmusbackend.cpp:439
kleo_chiasmus_config_data::is_optional
unsigned int is_optional
Definition: config_data.h:53
kleo_chiasmus_config_data::path
const char * path
Definition: config_data.h:46
Kleo::ChiasmusBackend::supportsProtocol
bool supportsProtocol(const char *name) const
Definition: chiasmusbackend.cpp:499
Kleo::CryptoBackend::Protocol
Definition: cryptobackend.h:99
Kleo::CryptoBackend::Protocol::encryptJob
virtual EncryptJob * encryptJob(bool armor=false, bool textmode=false) const =0
Kleo::CryptoBackend::Protocol::listAllKeysJob
virtual ListAllKeysJob * listAllKeysJob(bool includeSigs=false, bool validate=false) const =0
Kleo::ChiasmusBackend::ChiasmusBackend
ChiasmusBackend()
Definition: chiasmusbackend.cpp:421
QMap
Definition: cryptobackend.h:66
Kleo::ChiasmusBackend::checkForProtocol
bool checkForProtocol(const char *name, QString *reason=0) const
Definition: chiasmusbackend.cpp:491
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:57:48 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libkleo

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

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal