libkleo
qgpgmesignencryptjob.cpp
Go to the documentation of this file.
71 static QGpgMESignEncryptJob::result_type sign_encrypt( Context * ctx, QThread * thread, const std::vector<Key> & signers, const std::vector<Key> & recipients, const weak_ptr<QIODevice> & plainText_, const weak_ptr<QIODevice> & cipherText_, bool alwaysTrust, bool outputIsBsse64Encoded ) {
97 const std::pair<SigningResult, EncryptionResult> res = ctx->signAndEncrypt( recipients, indata, outdata, eflags );
108 const std::pair<SigningResult, EncryptionResult> res = ctx->signAndEncrypt( recipients, indata, outdata, eflags );
116 static QGpgMESignEncryptJob::result_type sign_encrypt_qba( Context * ctx, const std::vector<Key> & signers, const std::vector<Key> & recipients, const QByteArray & plainText, bool alwaysTrust, bool outputIsBsse64Encoded ) {
121 return sign_encrypt( ctx, 0, signers, recipients, buffer, shared_ptr<QIODevice>(), alwaysTrust, outputIsBsse64Encoded );
124 Error QGpgMESignEncryptJob::start( const std::vector<Key> & signers, const std::vector<Key> & recipients, const QByteArray & plainText, bool alwaysTrust ) {
125 run( boost::bind( &sign_encrypt_qba, _1, signers, recipients, plainText, alwaysTrust, mOutputIsBase64Encoded ) );
129 void QGpgMESignEncryptJob::start( const std::vector<Key> & signers, const std::vector<Key> & recipients, const shared_ptr<QIODevice> & plainText, const shared_ptr<QIODevice> & cipherText, bool alwaysTrust ) {
130 run( boost::bind( &sign_encrypt, _1, _2, signers, recipients, _3, _4, alwaysTrust, mOutputIsBase64Encoded ), plainText, cipherText );
133 std::pair<SigningResult,EncryptionResult> QGpgMESignEncryptJob::exec( const std::vector<Key> & signers, const std::vector<Key> & recipients, const QByteArray & plainText, bool alwaysTrust, QByteArray & cipherText ) {
134 const result_type r = sign_encrypt_qba( context(), signers, recipients, plainText, alwaysTrust, mOutputIsBase64Encoded );
void resultHook(const result_type &r)
Definition: qgpgmesignencryptjob.cpp:146
QGpgMESignEncryptJob(GpgME::Context *context)
Definition: qgpgmesignencryptjob.cpp:58
GpgME::Context * context() const
Definition: threadedjobmixin.h:178
static void error(QWidget *parent, const GpgME::SigningResult &result, const Kleo::Job *job, const QString &caption, KMessageBox::Options options=KMessageBox::Notify)
std::pair< GpgME::SigningResult, GpgME::EncryptionResult > exec(const std::vector< GpgME::Key > &signers, const std::vector< GpgME::Key > &recipients, const QByteArray &plainText, bool alwaysTrust, QByteArray &cipherText)
Definition: qgpgmesignencryptjob.cpp:133
void showErrorDialog(QWidget *parent, const QString &caption) const
Definition: qgpgmesignencryptjob.cpp:140
GpgME::Error start(const std::vector< GpgME::Key > &signers, const std::vector< GpgME::Key > &recipients, const QByteArray &plainText, bool alwaysTrust)
static QGpgMESignEncryptJob::result_type sign_encrypt_qba(Context *ctx, const std::vector< Key > &signers, const std::vector< Key > &recipients, const QByteArray &plainText, bool alwaysTrust, bool outputIsBsse64Encoded)
Definition: qgpgmesignencryptjob.cpp:116
void lateInitialization()
Definition: threadedjobmixin.h:146
QString audit_log_as_html(GpgME::Context *ctx, GpgME::Error &err)
static QGpgMESignEncryptJob::result_type sign_encrypt(Context *ctx, QThread *thread, const std::vector< Key > &signers, const std::vector< Key > &recipients, const weak_ptr< QIODevice > &plainText_, const weak_ptr< QIODevice > &cipherText_, bool alwaysTrust, bool outputIsBsse64Encoded)
Definition: qgpgmesignencryptjob.cpp:71
boost::tuple< GpgME::SigningResult, GpgME::EncryptionResult, QByteArray, QString, GpgME::Error > result_type
Definition: threadedjobmixin.h:117
void run(const T_binder &func)
Definition: threadedjobmixin.h:153
void setOutputIsBase64Encoded(bool on)
Definition: qgpgmesignencryptjob.cpp:67
~QGpgMESignEncryptJob()
Definition: qgpgmesignencryptjob.cpp:65
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:33:38 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:38 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.