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

kleopatra

  • sources
  • kde-4.14
  • kdepim
  • kleopatra
  • crypto
decryptverifyfilescontroller.cpp
Go to the documentation of this file.
1 /* -*- mode: c++; c-basic-offset:4 -*-
2  decryptverifyfilescontroller.cpp
3 
4  This file is part of Kleopatra, the KDE keymanager
5  Copyright (c) 2008 Klarälvdalens Datakonsult AB
6 
7  Kleopatra is free software; you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation; either version 2 of the License, or
10  (at your option) any later version.
11 
12  Kleopatra 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 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 <config-kleopatra.h>
34 
35 #include "decryptverifyfilescontroller.h"
36 
37 #include <crypto/gui/decryptverifyoperationwidget.h>
38 #include <crypto/gui/decryptverifyfileswizard.h>
39 #include <crypto/decryptverifytask.h>
40 #include <crypto/taskcollection.h>
41 
42 #include <utils/classify.h>
43 #include <utils/gnupg-helper.h>
44 #include <utils/path-helper.h>
45 #include <utils/input.h>
46 #include <utils/output.h>
47 #include <utils/kleo_assert.h>
48 #include <utils/archivedefinition.h>
49 
50 #include <KDebug>
51 #include <KLocalizedString>
52 
53 #include <QDir>
54 #include <QFile>
55 #include <QFileInfo>
56 #include <QPointer>
57 #include <QTimer>
58 
59 #ifndef Q_MOC_RUN
60 #include <boost/shared_ptr.hpp>
61 #endif
62 
63 #include <memory>
64 #include <vector>
65 
66 using namespace boost;
67 using namespace GpgME;
68 using namespace Kleo;
69 using namespace Kleo::Crypto;
70 using namespace Kleo::Crypto::Gui;
71 
72 class DecryptVerifyFilesController::Private {
73  DecryptVerifyFilesController* const q;
74 public:
75 
76  static shared_ptr<AbstractDecryptVerifyTask> taskFromOperationWidget( const DecryptVerifyOperationWidget * w, const QString & fileName, const QDir & outDir, const shared_ptr<OverwritePolicy> & overwritePolicy );
77 
78  explicit Private( DecryptVerifyFilesController* qq );
79 
80  void slotWizardOperationPrepared();
81  void slotWizardCanceled();
82  void schedule();
83 
84  QStringList prepareWizardFromPassedFiles();
85  std::vector<shared_ptr<Task> > buildTasks( const QStringList &, const shared_ptr<OverwritePolicy> & );
86 
87  void ensureWizardCreated();
88  void ensureWizardVisible();
89  void reportError( int err, const QString & details ) {
90  q->setLastError( err, details );
91  q->emitDoneOrError();
92  }
93  void cancelAllTasks();
94 
95  QStringList m_passedFiles, m_filesAfterPreparation;
96  QPointer<DecryptVerifyFilesWizard> m_wizard;
97  std::vector<shared_ptr<const DecryptVerifyResult> > m_results;
98  std::vector<shared_ptr<Task> > m_runnableTasks, m_completedTasks;
99  shared_ptr<Task> m_runningTask;
100  bool m_errorDetected;
101  DecryptVerifyOperation m_operation;
102 };
103 
104 // static
105 shared_ptr<AbstractDecryptVerifyTask> DecryptVerifyFilesController::Private::taskFromOperationWidget( const DecryptVerifyOperationWidget * w, const QString & fileName, const QDir & outDir, const shared_ptr<OverwritePolicy> & overwritePolicy ) {
106 
107  kleo_assert( w );
108 
109  shared_ptr<AbstractDecryptVerifyTask> task;
110 
111  switch ( w->mode() ) {
112  case DecryptVerifyOperationWidget::VerifyDetachedWithSignature:
113  {
114 
115  shared_ptr<VerifyDetachedTask> t( new VerifyDetachedTask );
116  t->setInput( Input::createFromFile( fileName ) );
117  t->setSignedData( Input::createFromFile( w->signedDataFileName() ) );
118  task = t;
119 
120  kleo_assert( fileName == w->inputFileName() );
121  }
122  break;
123  case DecryptVerifyOperationWidget::VerifyDetachedWithSignedData:
124  {
125  shared_ptr<VerifyDetachedTask> t( new VerifyDetachedTask );
126  t->setInput( Input::createFromFile( w->inputFileName() ) );
127  t->setSignedData( Input::createFromFile( fileName ) );
128  task = t;
129 
130  kleo_assert( fileName == w->signedDataFileName() );
131  }
132  break;
133  case DecryptVerifyOperationWidget::DecryptVerifyOpaque:
134  {
135  const unsigned int classification = classify( fileName );
136  kDebug() << "classified" << fileName << "as" << printableClassification( classification );
137 
138  const shared_ptr<ArchiveDefinition> ad = w->selectedArchiveDefinition();
139 
140  const Protocol proto =
141  isOpenPGP( classification ) ? OpenPGP :
142  isCMS( classification ) ? CMS :
143  ad /* _needs_ the info */ ? throw Exception( gpg_error( GPG_ERR_CONFLICT ), i18n("Cannot determine whether input data is OpenPGP or CMS") ) :
144  /* else we don't care */ UnknownProtocol ;
145 
146  const shared_ptr<Input> input = Input::createFromFile( fileName );
147  const shared_ptr<Output> output =
148  ad ? ad->createOutputFromUnpackCommand( proto, fileName, outDir ) :
149  /*else*/ Output::createFromFile( outDir.absoluteFilePath( outputFileName( QFileInfo( fileName ).fileName() ) ), overwritePolicy );
150 
151  if ( mayBeCipherText( classification ) ) {
152  kDebug() << "creating a DecryptVerifyTask";
153  shared_ptr<DecryptVerifyTask> t( new DecryptVerifyTask );
154  t->setInput( input );
155  t->setOutput( output );
156  task = t;
157  } else {
158  kDebug() << "creating a VerifyOpaqueTask";
159  shared_ptr<VerifyOpaqueTask> t( new VerifyOpaqueTask );
160  t->setInput( input );
161  t->setOutput( output );
162  task = t;
163  }
164 
165  kleo_assert( fileName == w->inputFileName() );
166  }
167  break;
168  }
169 
170  task->autodetectProtocolFromInput();
171  return task;
172 }
173 
174 DecryptVerifyFilesController::Private::Private( DecryptVerifyFilesController* qq ) : q( qq ), m_errorDetected( false ), m_operation( DecryptVerify )
175 {
176  qRegisterMetaType<VerificationResult>();
177 }
178 
179 void DecryptVerifyFilesController::Private::slotWizardOperationPrepared()
180 {
181  try {
182  ensureWizardCreated();
183  std::vector<shared_ptr<Task> > tasks = buildTasks( m_filesAfterPreparation, shared_ptr<OverwritePolicy>( new OverwritePolicy( m_wizard ) ) );
184  kleo_assert( m_runnableTasks.empty() );
185  m_runnableTasks.swap( tasks );
186 
187  shared_ptr<TaskCollection> coll( new TaskCollection );
188  Q_FOREACH( const shared_ptr<Task> & i, m_runnableTasks )
189  q->connectTask( i );
190  coll->setTasks( m_runnableTasks );
191  m_wizard->setTaskCollection( coll );
192 
193  QTimer::singleShot( 0, q, SLOT(schedule()) );
194 
195  } catch ( const Kleo::Exception & e ) {
196  reportError( e.error().encodedError(), e.message() );
197  } catch ( const std::exception & e ) {
198  reportError( gpg_error( GPG_ERR_UNEXPECTED ),
199  i18n("Caught unexpected exception in DecryptVerifyFilesController::Private::slotWizardOperationPrepared: %1",
200  QString::fromLocal8Bit( e.what() ) ) );
201  } catch ( ... ) {
202  reportError( gpg_error( GPG_ERR_UNEXPECTED ),
203  i18n("Caught unknown exception in DecryptVerifyFilesController::Private::slotWizardOperationPrepared") );
204  }
205 }
206 
207 void DecryptVerifyFilesController::Private::slotWizardCanceled()
208 {
209  kDebug();
210  reportError( gpg_error( GPG_ERR_CANCELED ), i18n("User canceled") );
211 }
212 
213 void DecryptVerifyFilesController::doTaskDone( const Task* task, const shared_ptr<const Task::Result> & result )
214 {
215  assert( task );
216  assert( task == d->m_runningTask.get() );
217  Q_UNUSED( task );
218 
219  // We could just delete the tasks here, but we can't use
220  // Qt::QueuedConnection here (we need sender()) and other slots
221  // might not yet have executed. Therefore, we push completed tasks
222  // into a burial container
223 
224  d->m_completedTasks.push_back( d->m_runningTask );
225  d->m_runningTask.reset();
226 
227  if ( const shared_ptr<const DecryptVerifyResult> & dvr = boost::dynamic_pointer_cast<const DecryptVerifyResult>( result ) )
228  d->m_results.push_back( dvr );
229 
230  QTimer::singleShot( 0, this, SLOT(schedule()) );
231 }
232 
233 void DecryptVerifyFilesController::Private::schedule()
234 {
235  if ( !m_runningTask && !m_runnableTasks.empty() ) {
236  const shared_ptr<Task> t = m_runnableTasks.back();
237  m_runnableTasks.pop_back();
238  t->start();
239  m_runningTask = t;
240  }
241  if ( !m_runningTask ) {
242  kleo_assert( m_runnableTasks.empty() );
243  Q_FOREACH ( const shared_ptr<const DecryptVerifyResult> & i, m_results )
244  emit q->verificationResult( i->verificationResult() );
245  q->emitDoneOrError();
246  }
247 }
248 
249 void DecryptVerifyFilesController::Private::ensureWizardCreated()
250 {
251  if ( m_wizard )
252  return;
253 
254  std::auto_ptr<DecryptVerifyFilesWizard> w( new DecryptVerifyFilesWizard );
255  w->setWindowTitle( i18n( "Decrypt/Verify Files" ) );
256  w->setAttribute( Qt::WA_DeleteOnClose );
257 
258  connect( w.get(), SIGNAL(operationPrepared()), q, SLOT(slotWizardOperationPrepared()), Qt::QueuedConnection );
259  connect( w.get(), SIGNAL(canceled()), q, SLOT(slotWizardCanceled()), Qt::QueuedConnection );
260  m_wizard = w.release();
261 
262 }
263 
264 namespace {
265  struct FindExtension : std::unary_function<shared_ptr<ArchiveDefinition>,bool> {
266  const QString ext;
267  const Protocol proto;
268  FindExtension( const QString & ext, Protocol proto ) : ext( ext ), proto( proto ) {}
269  bool operator()( const shared_ptr<ArchiveDefinition> & ad ) const {
270  kDebug() << " considering" << ( ad ? ad->label() : QLatin1String( "<null>" ) ) << "for" << ext;
271  bool result;
272  if ( proto == UnknownProtocol )
273  result = ad && ( ad->extensions( OpenPGP ).contains( ext, Qt::CaseInsensitive ) || ad->extensions( CMS ).contains( ext, Qt::CaseInsensitive ) );
274  else
275  result = ad && ad->extensions( proto ).contains( ext, Qt::CaseInsensitive );
276  kDebug() << ( result ? " -> matches" : " -> doesn't match" );
277  return result;
278  }
279  };
280 }
281 
282 shared_ptr<ArchiveDefinition> pick_archive_definition( GpgME::Protocol proto, const std::vector< shared_ptr<ArchiveDefinition> > & ads, const QString & filename ) {
283  const QFileInfo fi( outputFileName( filename ) );
284  QString extension = fi.completeSuffix();
285 
286  if ( extension == QLatin1String("out") ) // added by outputFileName() -> useless
287  return shared_ptr<ArchiveDefinition>();
288 
289  if ( extension.endsWith( QLatin1String( ".out" ) ) ) // added by outputFileName() -> remove
290  extension.chop(4);
291 
292  for ( ;; ) {
293  const std::vector<shared_ptr<ArchiveDefinition> >::const_iterator it
294  = std::find_if( ads.begin(), ads.end(), FindExtension( extension, proto ) );
295  if ( it != ads.end() )
296  return *it;
297  const int idx = extension.indexOf( QLatin1Char('.') );
298  if ( idx < 0 )
299  return shared_ptr<ArchiveDefinition>();
300  extension = extension.mid( idx + 1 );
301  }
302 }
303 
304 
305 QStringList DecryptVerifyFilesController::Private::prepareWizardFromPassedFiles()
306 {
307  ensureWizardCreated();
308 
309  const std::vector< shared_ptr<ArchiveDefinition> > archiveDefinitions = ArchiveDefinition::getArchiveDefinitions();
310 
311  QStringList fileNames;
312  unsigned int counter = 0;
313  Q_FOREACH( const QString & fname, m_passedFiles ) {
314 
315  kleo_assert( !fname.isEmpty() );
316 
317  const unsigned int classification = classify( fname );
318  const Protocol proto = findProtocol( classification );
319 
320  if ( mayBeOpaqueSignature( classification ) || mayBeCipherText( classification ) || mayBeDetachedSignature( classification ) ) {
321 
322  DecryptVerifyOperationWidget * const op = m_wizard->operationWidget( counter++ );
323  kleo_assert( op != 0 );
324 
325  op->setArchiveDefinitions( archiveDefinitions );
326 
327  const QString signedDataFileName = findSignedData( fname );
328 
329  // this breaks opaque signatures whose source files still
330  // happen to exist in the same directory. Until we have
331  // content-based classification, this is the most unlikely
332  // case, so that's the case we break. ### FIXME remove when content-classify is done
333  if ( mayBeDetachedSignature( classification ) && !signedDataFileName.isEmpty() )
334  op->setMode( DecryptVerifyOperationWidget::VerifyDetachedWithSignature );
335  // ### end FIXME
336  else if ( mayBeOpaqueSignature( classification ) || mayBeCipherText( classification ) )
337  op->setMode( DecryptVerifyOperationWidget::DecryptVerifyOpaque, pick_archive_definition( proto, archiveDefinitions, fname ) );
338  else
339  op->setMode( DecryptVerifyOperationWidget::VerifyDetachedWithSignature );
340 
341  op->setInputFileName( fname );
342  op->setSignedDataFileName( signedDataFileName );
343 
344  fileNames.push_back( fname );
345 
346  } else {
347 
348  // probably the signed data file was selected:
349  const QStringList signatures = findSignatures( fname );
350 
351  if ( signatures.empty() ) {
352  // We are assuming this is a detached signature file, but
353  // there were no signature files for it. Let's guess it's encrypted after all.
354  // ### FIXME once we have a proper heuristic for this, this should move into
355  // classify() and/or classifyContent()
356  DecryptVerifyOperationWidget * const op = m_wizard->operationWidget( counter++ );
357  kleo_assert( op != 0 );
358  op->setArchiveDefinitions( archiveDefinitions );
359  op->setMode( DecryptVerifyOperationWidget::DecryptVerifyOpaque, pick_archive_definition( proto, archiveDefinitions, fname ) );
360  op->setInputFileName( fname );
361  fileNames.push_back( fname );
362  } else {
363 
364  Q_FOREACH( const QString & s, signatures ) {
365  DecryptVerifyOperationWidget * op = m_wizard->operationWidget( counter++ );
366  kleo_assert( op != 0 );
367 
368  op->setArchiveDefinitions( archiveDefinitions );
369  op->setMode( DecryptVerifyOperationWidget::VerifyDetachedWithSignedData );
370  op->setInputFileName( s );
371  op->setSignedDataFileName( fname );
372 
373  fileNames.push_back( fname );
374  }
375 
376  }
377  }
378  }
379 
380  kleo_assert( counter == static_cast<unsigned>( fileNames.size() ) );
381 
382  if ( !counter )
383  throw Kleo::Exception( makeGnuPGError( GPG_ERR_ASS_NO_INPUT ), i18n("No usable inputs found") );
384 
385  m_wizard->setOutputDirectory( heuristicBaseDirectory( m_passedFiles ) );
386  return fileNames;
387 }
388 
389 std::vector< shared_ptr<Task> > DecryptVerifyFilesController::Private::buildTasks( const QStringList & fileNames, const shared_ptr<OverwritePolicy> & overwritePolicy )
390 {
391  const bool useOutDir = m_wizard->useOutputDirectory();
392  const QFileInfo outDirInfo( m_wizard->outputDirectory() );
393 
394  kleo_assert( !useOutDir || outDirInfo.isDir() );
395 
396  const QDir outDir( outDirInfo.absoluteFilePath() );
397  kleo_assert( !useOutDir || outDir.exists() );
398 
399  std::vector<shared_ptr<Task> > tasks;
400  for ( unsigned int i = 0, end = fileNames.size() ; i != end ; ++i )
401  try {
402  const QDir fileDir = QFileInfo( fileNames[i] ).absoluteDir();
403  kleo_assert( fileDir.exists() );
404  tasks.push_back( taskFromOperationWidget( m_wizard->operationWidget( i ), fileNames[i], useOutDir ? outDir : fileDir, overwritePolicy ) );
405  } catch ( const GpgME::Exception & e ) {
406  tasks.push_back( Task::makeErrorTask( e.error().code(), QString::fromLocal8Bit( e.what() ), fileNames[i] ) );
407  }
408 
409  return tasks;
410 }
411 
412 void DecryptVerifyFilesController::setFiles( const QStringList & files )
413 {
414  d->m_passedFiles = files;
415 }
416 
417 void DecryptVerifyFilesController::Private::ensureWizardVisible()
418 {
419  ensureWizardCreated();
420  q->bringToForeground( m_wizard );
421 }
422 
423 DecryptVerifyFilesController::DecryptVerifyFilesController( QObject* parent ) : Controller( parent ), d( new Private( this ) )
424 {
425 }
426 
427 DecryptVerifyFilesController::DecryptVerifyFilesController( const shared_ptr<const ExecutionContext> & ctx, QObject* parent ) : Controller( ctx, parent ), d( new Private( this ) )
428 {
429 }
430 
431 
432 DecryptVerifyFilesController::~DecryptVerifyFilesController() { kDebug(); }
433 
434 void DecryptVerifyFilesController::start()
435 {
436  d->m_filesAfterPreparation = d->prepareWizardFromPassedFiles();
437  d->ensureWizardVisible();
438 }
439 
440 void DecryptVerifyFilesController::setOperation( DecryptVerifyOperation op )
441 {
442  d->m_operation = op;
443 }
444 
445 DecryptVerifyOperation DecryptVerifyFilesController::operation() const
446 {
447  return d->m_operation;
448 }
449 
450 void DecryptVerifyFilesController::Private::cancelAllTasks() {
451 
452  // we just kill all runnable tasks - this will not result in
453  // signal emissions.
454  m_runnableTasks.clear();
455 
456  // a cancel() will result in a call to
457  if ( m_runningTask )
458  m_runningTask->cancel();
459 }
460 
461 void DecryptVerifyFilesController::cancel()
462 {
463  kDebug();
464  try {
465  d->m_errorDetected = true;
466  if ( d->m_wizard )
467  d->m_wizard->close();
468  d->cancelAllTasks();
469  } catch ( const std::exception & e ) {
470  kDebug() << "Caught exception: " << e.what();
471  }
472 }
473 
474 #include "moc_decryptverifyfilescontroller.cpp"
QFileInfo::completeSuffix
QString completeSuffix() const
Kleo::heuristicBaseDirectory
QString heuristicBaseDirectory(const QStringList &files)
Definition: path-helper.cpp:71
decryptverifyfileswizard.h
QString::indexOf
int indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
Kleo::Crypto::DecryptVerifyFilesController::operation
DecryptVerifyOperation operation() const
Definition: decryptverifyfilescontroller.cpp:445
output.h
input.h
Kleo::findSignedData
QString findSignedData(const QString &signatureFileName)
Definition: classify.cpp:251
QList::push_back
void push_back(const T &value)
path-helper.h
Kleo::Crypto::Gui::DecryptVerifyOperationWidget::setSignedDataFileName
void setSignedDataFileName(const QString &name)
Definition: decryptverifyoperationwidget.cpp:238
decryptverifytask.h
Kleo::Crypto::DecryptVerifyFilesController::DecryptVerifyFilesController
DecryptVerifyFilesController(QObject *parent=0)
Definition: decryptverifyfilescontroller.cpp:423
Kleo::Crypto::Task
Definition: task.h:57
QPointer< DecryptVerifyFilesWizard >
classify.h
Kleo::printableClassification
QString printableClassification(unsigned int classification)
Definition: classify.cpp:215
Kleo::Crypto::Gui::DecryptVerifyFilesWizard
Definition: decryptverifyfileswizard.h:53
QWidget::setAttribute
void setAttribute(Qt::WidgetAttribute attribute, bool on)
decryptverifyfilescontroller.h
Kleo::Crypto::VerifyDetachedTask
Definition: decryptverifytask.h:132
decryptverifyoperationwidget.h
Kleo::DecryptVerify
Definition: types.h:48
Kleo::OverwritePolicy
Definition: output.h:52
Kleo::Crypto::Gui::DecryptVerifyOperationWidget::setInputFileName
void setInputFileName(const QString &name)
Definition: decryptverifyoperationwidget.cpp:226
QString::chop
void chop(int n)
Kleo::Crypto::DecryptVerifyFilesController::~DecryptVerifyFilesController
~DecryptVerifyFilesController()
Definition: decryptverifyfilescontroller.cpp:432
Kleo::Crypto::Gui::DecryptVerifyOperationWidget::setArchiveDefinitions
void setArchiveDefinitions(const std::vector< boost::shared_ptr< ArchiveDefinition > > &ads)
Definition: decryptverifyoperationwidget.cpp:176
QList::size
int size() const
Kleo::Crypto::DecryptVerifyFilesController::start
void start()
Definition: decryptverifyfilescontroller.cpp:434
kleo_assert.h
boost::shared_ptr
Definition: encryptemailcontroller.h:51
Kleo::Crypto::VerifyOpaqueTask
Definition: decryptverifytask.h:163
QString::fromLocal8Bit
QString fromLocal8Bit(const char *str, int size)
QDir::exists
bool exists() const
d
#define d
Definition: adduseridcommand.cpp:89
Kleo::Crypto::DecryptVerifyTask
Definition: decryptverifytask.h:194
QList::empty
bool empty() const
QTimer
QObject
Kleo::Class::OpenPGP
Definition: classify.h:49
Kleo::Crypto::Gui::DecryptVerifyOperationWidget::mode
Mode mode
Definition: decryptverifyoperationwidget.h:58
QString::isEmpty
bool isEmpty() const
Kleo::Crypto::DecryptVerifyFilesController::setOperation
void setOperation(DecryptVerifyOperation op)
Definition: decryptverifyfilescontroller.cpp:440
Kleo::Crypto::Gui::DecryptVerifyOperationWidget::selectedArchiveDefinition
boost::shared_ptr< ArchiveDefinition > selectedArchiveDefinition() const
Definition: decryptverifyoperationwidget.cpp:250
QFileInfo::absoluteDir
QDir absoluteDir() const
Kleo::DecryptVerifyOperation
DecryptVerifyOperation
Definition: types.h:45
QString::endsWith
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const
Kleo::Class::CMS
Definition: classify.h:48
Kleo::Crypto::DecryptVerifyFilesController::cancel
void cancel()
Definition: decryptverifyfilescontroller.cpp:461
QString
QStringList
gnupg-helper.h
archivedefinition.h
Kleo::outputFileName
QString outputFileName(const QString &input)
Definition: classify.cpp:279
QFileInfo
QLatin1Char
Kleo::makeGnuPGError
int makeGnuPGError(int code)
Definition: gnupg-helper.cpp:69
kleo_assert
#define kleo_assert(cond)
Definition: kleo_assert.h:86
Kleo::Crypto::DecryptVerifyFilesController
Definition: decryptverifyfilescontroller.h:57
QDir
Kleo::findSignatures
QStringList findSignatures(const QString &signedDataFileName)
Definition: classify.cpp:264
Kleo::Crypto::Gui::DecryptVerifyOperationWidget::signedDataFileName
QString signedDataFileName
Definition: decryptverifyoperationwidget.h:60
Kleo::classify
unsigned int classify(const QString &filename)
Definition: classify.cpp:156
QLatin1String
Kleo::Crypto::TaskCollection
Definition: taskcollection.h:51
Kleo::Crypto::Gui::DecryptVerifyOperationWidget::setMode
void setMode(Mode mode, const boost::shared_ptr< ArchiveDefinition > &ad)
Definition: decryptverifyoperationwidget.cpp:189
pick_archive_definition
shared_ptr< ArchiveDefinition > pick_archive_definition(GpgME::Protocol proto, const std::vector< shared_ptr< ArchiveDefinition > > &ads, const QString &filename)
Definition: decryptverifyfilescontroller.cpp:282
QWidget::setWindowTitle
void setWindowTitle(const QString &)
q
#define q
Definition: adduseridcommand.cpp:90
Kleo::Crypto::Gui::DecryptVerifyOperationWidget
Definition: decryptverifyoperationwidget.h:55
QDir::absoluteFilePath
QString absoluteFilePath(const QString &fileName) const
extension
static const char * extension(bool pgp, bool sign, bool encrypt, bool ascii, bool detached)
Definition: signencryptfilescontroller.cpp:287
Kleo::Crypto::Gui::DecryptVerifyOperationWidget::inputFileName
QString inputFileName
Definition: decryptverifyoperationwidget.h:59
Kleo::Crypto::Controller
Definition: controller.h:52
taskcollection.h
Kleo::findProtocol
ProtocolMask FormatMask TypeMask TypeMask TypeMask GpgME::Protocol findProtocol(const unsigned int classifcation)
Definition: classify.h:127
Kleo::ArchiveDefinition::getArchiveDefinitions
static std::vector< boost::shared_ptr< ArchiveDefinition > > getArchiveDefinitions()
Definition: archivedefinition.cpp:354
QTimer::singleShot
singleShot
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:33:10 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kleopatra

Skip menu "kleopatra"
  • 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
  • pimprint

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