37#ifndef __KLEO_ENCRYPTJOB_H__
38#define __KLEO_ENCRYPTJOB_H__
49# include <gpgme++/context.h>
59class EncryptionResult;
86 void setFileName(
const QString &fileName);
87 QString fileName()
const;
89 void setInputEncoding(GpgME::Data::Encoding);
90 GpgME::Data::Encoding inputEncoding()
const;
102 virtual GpgME::Error
start(
const std::vector<GpgME::Key> &recipients,
103 const QByteArray &plainText,
bool alwaysTrust =
false) = 0;
112 virtual void start(
const std::vector<GpgME::Key> &recipients,
113 const std::shared_ptr<QIODevice> &plainText,
114 const std::shared_ptr<QIODevice> &cipherText = std::shared_ptr<QIODevice>(),
115 bool alwaysTrust =
false) = 0;
117 virtual GpgME::EncryptionResult exec(
const std::vector<GpgME::Key> &recipients,
118 const QByteArray &plainText,
119 bool alwaysTrust, QByteArray &cipherText) = 0;
128 virtual void start(
const std::vector<GpgME::Key> &recipients,
129 const std::shared_ptr<QIODevice> &plainText,
130 const std::shared_ptr<QIODevice> &cipherText = std::shared_ptr<QIODevice>(),
131 const GpgME::Context::EncryptionFlags flags = GpgME::Context::None) = 0;
135 virtual GpgME::EncryptionResult
exec(
const std::vector<GpgME::Key> &recipients,
136 const QByteArray &plainText,
137 const GpgME::Context::EncryptionFlags flags, QByteArray &cipherText) = 0;
139 void result(
const GpgME::EncryptionResult &result,
const QByteArray &cipherText,
const QString &auditLogAsHtml = QString(),
const GpgME::Error &auditLogError = GpgME::Error());
An abstract base class for asynchronous encrypters.
Definition: encryptjob.h:79
virtual void start(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 void setOutputIsBase64Encoded(bool)=0
virtual GpgME::EncryptionResult exec(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 > &recipients, const std::shared_ptr< QIODevice > &plainText, const std::shared_ptr< QIODevice > &cipherText=std::shared_ptr< QIODevice >(), bool alwaysTrust=false)=0
virtual GpgME::Error start(const std::vector< GpgME::Key > &recipients, const QByteArray &plainText, bool alwaysTrust=false)=0
An abstract base class for asynchronous crypto operations.
Definition: job.h:73