libkleo
qgpgmesignencryptjob.cpp
Go to the documentation of this file.
69 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 ) {
95 const std::pair<SigningResult, EncryptionResult> res = ctx->signAndEncrypt( recipients, indata, outdata, eflags );
106 const std::pair<SigningResult, EncryptionResult> res = ctx->signAndEncrypt( recipients, indata, outdata, eflags );
114 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 ) {
119 return sign_encrypt( ctx, 0, signers, recipients, buffer, shared_ptr<QIODevice>(), alwaysTrust, outputIsBsse64Encoded );
122 Error QGpgMESignEncryptJob::start( const std::vector<Key> & signers, const std::vector<Key> & recipients, const QByteArray & plainText, bool alwaysTrust ) {
123 run( boost::bind( &sign_encrypt_qba, _1, signers, recipients, plainText, alwaysTrust, mOutputIsBase64Encoded ) );
127 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 ) {
128 run( boost::bind( &sign_encrypt, _1, _2, signers, recipients, _3, _4, alwaysTrust, mOutputIsBase64Encoded ), plainText, cipherText );
131 std::pair<SigningResult,EncryptionResult> QGpgMESignEncryptJob::exec( const std::vector<Key> & signers, const std::vector<Key> & recipients, const QByteArray & plainText, bool alwaysTrust, QByteArray & cipherText ) {
132 const result_type r = sign_encrypt_qba( context(), signers, recipients, plainText, alwaysTrust, mOutputIsBase64Encoded );
void resultHook(const result_type &r)
Definition: qgpgmesignencryptjob.cpp:144
QGpgMESignEncryptJob(GpgME::Context *context)
Definition: qgpgmesignencryptjob.cpp:56
GpgME::Context * context() const
Definition: threadedjobmixin.h:176
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:131
void showErrorDialog(QWidget *parent, const QString &caption) const
Definition: qgpgmesignencryptjob.cpp:138
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:114
void lateInitialization()
Definition: threadedjobmixin.h:144
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:69
boost::tuple< GpgME::SigningResult, GpgME::EncryptionResult, QByteArray, QString, GpgME::Error > result_type
Definition: threadedjobmixin.h:115
void run(const T_binder &func)
Definition: threadedjobmixin.h:151
void setOutputIsBase64Encoded(bool on)
Definition: qgpgmesignencryptjob.cpp:65
~QGpgMESignEncryptJob()
Definition: qgpgmesignencryptjob.cpp:63
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:57:49 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:57:49 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.