37#ifndef __KLEO_ENCRYPTJOB_H__
38#define __KLEO_ENCRYPTJOB_H__
48# include <gpgme++/context.h>
58class EncryptionResult;
85 void setFileName(
const QString &fileName);
86 QString fileName()
const;
98 virtual GpgME::Error
start(
const std::vector<GpgME::Key> &recipients,
99 const QByteArray &plainText,
bool alwaysTrust =
false) = 0;
108 virtual void start(
const std::vector<GpgME::Key> &recipients,
109 const std::shared_ptr<QIODevice> &plainText,
110 const std::shared_ptr<QIODevice> &cipherText = std::shared_ptr<QIODevice>(),
111 bool alwaysTrust =
false) = 0;
113 virtual GpgME::EncryptionResult exec(
const std::vector<GpgME::Key> &recipients,
114 const QByteArray &plainText,
115 bool alwaysTrust, QByteArray &cipherText) = 0;
124 virtual void start(
const std::vector<GpgME::Key> &recipients,
125 const std::shared_ptr<QIODevice> &plainText,
126 const std::shared_ptr<QIODevice> &cipherText = std::shared_ptr<QIODevice>(),
127 const GpgME::Context::EncryptionFlags flags = GpgME::Context::None) = 0;
131 virtual GpgME::EncryptionResult
exec(
const std::vector<GpgME::Key> &recipients,
132 const QByteArray &plainText,
133 const GpgME::Context::EncryptionFlags flags, QByteArray &cipherText) = 0;
135 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:78
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