kleopatra
signencryptfilescontroller.cpp
Go to the documentation of this file.
170 SignEncryptFilesController::SignEncryptFilesController( const shared_ptr<const ExecutionContext> & ctx, QObject * p )
301 createSignEncryptTaskForFileInfo( const QFileInfo & fi, bool pgp, bool sign, bool encrypt, bool ascii, bool removeUnencrypted, const std::vector<Key> & recipients, const std::vector<Key> & signers ) {
328 createArchiveSignEncryptTaskForFiles( const QStringList & files, const QString & outputFileBaseName, const shared_ptr<ArchiveDefinition> & ad, bool pgp, bool sign, bool encrypt, bool ascii, bool removeUnencrypted, const std::vector<Key> & recipients, const std::vector<Key> & signers ) {
358 createSignEncryptTasksForFileInfo( const QFileInfo & fi, bool sign, bool encrypt, bool ascii, bool removeUnencrypted, const std::vector<Key> & pgpRecipients, const std::vector<Key> & pgpSigners, const std::vector<Key> & cmsRecipients, const std::vector<Key> & cmsSigners ) {
363 const bool pgp = ( shallPgpEncrypt && ( !sign || shallPgpSign ) ) || ( !encrypt && shallPgpSign );
367 const bool cms = ( shallCmsEncrypt && ( !sign || shallCmsSign ) ) || ( !encrypt && shallCmsSign );
372 result.push_back( createSignEncryptTaskForFileInfo( fi, true, sign, encrypt, ascii, removeUnencrypted, pgpRecipients, pgpSigners ) );
374 result.push_back( createSignEncryptTaskForFileInfo( fi, false, sign, encrypt, ascii, removeUnencrypted, cmsRecipients, cmsSigners ) );
380 createArchiveSignEncryptTasksForFiles( const QStringList & files, const QString & pgpOutputFileBaseName, const QString & cmsOutputFileBaseName, const shared_ptr<ArchiveDefinition> & ad, bool sign, bool encrypt, bool ascii, bool removeUnencrypted, const std::vector<Key> & pgpRecipients, const std::vector<Key> & pgpSigners, const std::vector<Key> & cmsRecipients, const std::vector<Key> & cmsSigners ) {
385 const bool pgp = ( shallPgpEncrypt && ( !sign || shallPgpSign )) || ( !encrypt && shallPgpSign );
389 const bool cms = ( shallCmsEncrypt && ( !sign || shallCmsSign )) || ( !encrypt && shallCmsSign );
394 result.push_back( createArchiveSignEncryptTaskForFiles( files, pgpOutputFileBaseName, ad, true, sign, encrypt, ascii, removeUnencrypted, pgpRecipients, pgpSigners ) );
396 result.push_back( createArchiveSignEncryptTaskForFiles( files, cmsOutputFileBaseName, ad, false, sign, encrypt, ascii, removeUnencrypted, cmsRecipients, cmsSigners ) );
452 createSignEncryptTasksForFileInfo( QFileInfo( file ), sign, encrypt, ascii, removeUnencrypted, pgpRecipients, pgpSigners, cmsRecipients, cmsSigners );
479 i18n("Caught unexpected exception in SignEncryptFilesController::Private::slotWizardOperationPrepared: %1",
483 i18n("Caught unknown exception in SignEncryptFilesController::Private::slotWizardOperationPrepared") );
507 shared_ptr<SignEncryptFilesTask> SignEncryptFilesController::Private::takeRunnable( GpgME::Protocol proto ) {
519 void SignEncryptFilesController::doTaskDone( const Task * task, const shared_ptr<const Task::Result> & result )
571 connect( w.get(), SIGNAL(operationPrepared()), q, SLOT(slotWizardOperationPrepared()), Qt::QueuedConnection );
void setOperationMode(unsigned int mode)
Definition: signencryptfilescontroller.cpp:209
const char * outputFileExtension(unsigned int classification)
Definition: classify.cpp:294
static bool contains_dir(const QStringList &files)
Definition: signencryptfilescontroller.cpp:82
Definition: classify.h:62
Definition: task.h:57
Definition: classify.h:68
void setFiles(const QStringList &files)
Definition: signencryptfilescontroller.cpp:269
Definition: output.h:52
Definition: classify.h:56
void start()
Definition: signencryptfilescontroller.cpp:283
QString fromLocal8Bit(const char *str, int size)
~SignEncryptFilesController()
Definition: signencryptfilescontroller.cpp:176
bool empty() const
bool isDir() const
Definition: classify.h:49
QString absoluteFilePath() const
GpgME::Protocol protocol() const
Definition: signencryptfilescontroller.cpp:191
Definition: classify.h:48
static boost::shared_ptr< Input > createFromFile(const QString &filename, bool dummy=false)
Definition: input.cpp:199
Definition: classify.h:63
static std::vector< shared_ptr< SignEncryptFilesTask > > createArchiveSignEncryptTasksForFiles(const QStringList &files, const QString &pgpOutputFileBaseName, const QString &cmsOutputFileBaseName, const shared_ptr< ArchiveDefinition > &ad, bool sign, bool encrypt, bool ascii, bool removeUnencrypted, const std::vector< Key > &pgpRecipients, const std::vector< Key > &pgpSigners, const std::vector< Key > &cmsRecipients, const std::vector< Key > &cmsSigners)
Definition: signencryptfilescontroller.cpp:380
static shared_ptr< SignEncryptFilesTask > createArchiveSignEncryptTaskForFiles(const QStringList &files, const QString &outputFileBaseName, const shared_ptr< ArchiveDefinition > &ad, bool pgp, bool sign, bool encrypt, bool ascii, bool removeUnencrypted, const std::vector< Key > &recipients, const std::vector< Key > &signers)
Definition: signencryptfilescontroller.cpp:328
Definition: classify.h:55
void setProtocol(GpgME::Protocol proto)
Definition: signencryptfilescontroller.cpp:183
SignEncryptFilesController(QObject *parent=0)
Definition: signencryptfilescontroller.cpp:164
unsigned int operationMode() const
Definition: signencryptfilescontroller.cpp:265
Definition: taskcollection.h:51
void cancel()
Definition: signencryptfilescontroller.cpp:540
static std::vector< shared_ptr< SignEncryptFilesTask > > createSignEncryptTasksForFileInfo(const QFileInfo &fi, bool sign, bool encrypt, bool ascii, bool removeUnencrypted, const std::vector< Key > &pgpRecipients, const std::vector< Key > &pgpSigners, const std::vector< Key > &cmsRecipients, const std::vector< Key > &cmsSigners)
Definition: signencryptfilescontroller.cpp:358
static const char * extension(bool pgp, bool sign, bool encrypt, bool ascii, bool detached)
Definition: signencryptfilescontroller.cpp:287
virtual GpgME::Protocol protocol() const =0
Definition: controller.h:52
static shared_ptr< SignEncryptFilesTask > createSignEncryptTaskForFileInfo(const QFileInfo &fi, bool pgp, bool sign, bool encrypt, bool ascii, bool removeUnencrypted, const std::vector< Key > &recipients, const std::vector< Key > &signers)
Definition: signencryptfilescontroller.cpp:301
singleShot
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:33:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:33:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.