85class QGPGME_EXPORT EncryptJob :
public Job
89 explicit EncryptJob(std::unique_ptr<EncryptJobPrivate>, QObject *parent);
91 ~EncryptJob()
override;
99 QString fileName()
const;
107 GpgME::Data::Encoding inputEncoding()
const;
114 void setRecipients(
const std::vector<GpgME::Key> &recipients);
115 std::vector<GpgME::Key> recipients()
const;
123 QString inputFile()
const;
135 QString outputFile()
const;
146 GpgME::Context::EncryptionFlags encryptionFlags()
const;
158 virtual GpgME::Error
start(
const std::vector<GpgME::Key> &recipients,
159 const QByteArray &plainText,
bool alwaysTrust =
false) = 0;
168 virtual void start(
const std::vector<GpgME::Key> &recipients,
169 const std::shared_ptr<QIODevice> &plainText,
170 const std::shared_ptr<QIODevice> &cipherText = std::shared_ptr<QIODevice>(),
171 bool alwaysTrust =
false) = 0;
173 virtual GpgME::EncryptionResult exec(
const std::vector<GpgME::Key> &recipients,
174 const QByteArray &plainText,
175 bool alwaysTrust, QByteArray &cipherText) = 0;
184 virtual void start(
const std::vector<GpgME::Key> &recipients,
185 const std::shared_ptr<QIODevice> &plainText,
186 const std::shared_ptr<QIODevice> &cipherText = std::shared_ptr<QIODevice>(),
187 const GpgME::Context::EncryptionFlags flags = GpgME::Context::None) = 0;
191 virtual GpgME::EncryptionResult
exec(
const std::vector<GpgME::Key> &recipients,
192 const QByteArray &plainText,
193 const GpgME::Context::EncryptionFlags flags, QByteArray &cipherText) = 0;
195 void result(
const GpgME::EncryptionResult &result,
const QByteArray &cipherText,
const QString &auditLogAsHtml = QString(),
const GpgME::Error &auditLogError = GpgME::Error());
198 Q_DECLARE_PRIVATE(EncryptJob)
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 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