37 #ifndef __KLEO_SIGNENCRYPTJOB_H__
38 #define __KLEO_SIGNENCRYPTJOB_H__
41 #include "qgpgme_export.h"
43 #ifdef BUILDING_QGPGME
47 # include <gpgme++/global.h>
48 # include <gpgme++/context.h>
63 class EncryptionResult;
90 void setFileName(
const QString &fileName);
91 QString fileName()
const;
103 virtual GpgME::Error
start(
const std::vector<GpgME::Key> &signers,
104 const std::vector<GpgME::Key> &recipients,
105 const QByteArray &plainText,
106 bool alwaysTrust =
false) = 0;
115 virtual void start(
const std::vector<GpgME::Key> &signers,
116 const std::vector<GpgME::Key> &recipients,
117 const std::shared_ptr<QIODevice> &plainText,
118 const std::shared_ptr<QIODevice> &cipherText = std::shared_ptr<QIODevice>(),
119 bool alwaysTrust =
false) = 0;
121 virtual std::pair<GpgME::SigningResult, GpgME::EncryptionResult>
122 exec(
const std::vector<GpgME::Key> &signers,
123 const std::vector<GpgME::Key> &recipients,
124 const QByteArray &plainText,
125 bool alwaysTrust, QByteArray &cipherText) = 0;
135 virtual void start(
const std::vector<GpgME::Key> &signers,
136 const std::vector<GpgME::Key> &recipients,
137 const std::shared_ptr<QIODevice> &plainText,
138 const std::shared_ptr<QIODevice> &cipherText = std::shared_ptr<QIODevice>(),
139 const GpgME::Context::EncryptionFlags flags = GpgME::Context::None) = 0;
143 virtual std::pair<GpgME::SigningResult, GpgME::EncryptionResult>
144 exec(
const std::vector<GpgME::Key> &signers,
145 const std::vector<GpgME::Key> &recipients,
146 const QByteArray &plainText,
147 const GpgME::Context::EncryptionFlags flags, QByteArray &cipherText) = 0;
149 void result(
const GpgME::SigningResult &signingresult,
150 const GpgME::EncryptionResult &encryptionresult,
151 const QByteArray &cipherText,
const QString &auditLogAsHtml = QString(),
152 const GpgME::Error &auditLogError = GpgME::Error());
An abstract base class for asynchronous crypto operations.
Definition: job.h:73
An abstract base class for asynchronous combined signing and encrypting.
Definition: signencryptjob.h:83
virtual std::pair< GpgME::SigningResult, GpgME::EncryptionResult > exec(const std::vector< GpgME::Key > &signers, const std::vector< GpgME::Key > &recipients, const QByteArray &plainText, const GpgME::Context::EncryptionFlags flags, QByteArray &cipherText)=0
virtual void start(const std::vector< GpgME::Key > &signers, const std::vector< GpgME::Key > &recipients, const std::shared_ptr< QIODevice > &plainText, const std::shared_ptr< QIODevice > &cipherText=std::shared_ptr< QIODevice >(), const GpgME::Context::EncryptionFlags flags=GpgME::Context::None)=0
virtual GpgME::Error start(const std::vector< GpgME::Key > &signers, const std::vector< GpgME::Key > &recipients, const QByteArray &plainText, bool alwaysTrust=false)=0
virtual void start(const std::vector< GpgME::Key > &signers, const std::vector< GpgME::Key > &recipients, const std::shared_ptr< QIODevice > &plainText, const std::shared_ptr< QIODevice > &cipherText=std::shared_ptr< QIODevice >(), bool alwaysTrust=false)=0
virtual void setOutputIsBase64Encoded(bool)=0