37#ifndef __KLEO_SIGNENCRYPTJOB_H__
38#define __KLEO_SIGNENCRYPTJOB_H__
41#include "qgpgme_export.h"
43#include <gpgme++/global.h>
44#include <gpgme++/context.h>
58class EncryptionResult;
99 void setFileName(
const QString &fileName);
100 QString fileName()
const;
107 void setSigners(
const std::vector<GpgME::Key> &signers);
108 std::vector<GpgME::Key> signers()
const;
115 void setRecipients(
const std::vector<GpgME::Key> &recipients);
116 std::vector<GpgME::Key> recipients()
const;
123 void setInputFile(
const QString &path);
124 QString inputFile()
const;
135 void setOutputFile(
const QString &path);
136 QString outputFile()
const;
146 void setEncryptionFlags(GpgME::Context::EncryptionFlags flags);
147 GpgME::Context::EncryptionFlags encryptionFlags()
const;
159 virtual GpgME::Error
start(
const std::vector<GpgME::Key> &signers,
160 const std::vector<GpgME::Key> &recipients,
161 const QByteArray &plainText,
162 bool alwaysTrust =
false) = 0;
171 virtual void start(
const std::vector<GpgME::Key> &signers,
172 const std::vector<GpgME::Key> &recipients,
173 const std::shared_ptr<QIODevice> &plainText,
174 const std::shared_ptr<QIODevice> &cipherText = std::shared_ptr<QIODevice>(),
175 bool alwaysTrust =
false) = 0;
177 virtual std::pair<GpgME::SigningResult, GpgME::EncryptionResult>
178 exec(
const std::vector<GpgME::Key> &signers,
179 const std::vector<GpgME::Key> &recipients,
180 const QByteArray &plainText,
181 bool alwaysTrust, QByteArray &cipherText) = 0;
191 virtual void start(
const std::vector<GpgME::Key> &signers,
192 const std::vector<GpgME::Key> &recipients,
193 const std::shared_ptr<QIODevice> &plainText,
194 const std::shared_ptr<QIODevice> &cipherText = std::shared_ptr<QIODevice>(),
195 const GpgME::Context::EncryptionFlags flags = GpgME::Context::None) = 0;
199 virtual std::pair<GpgME::SigningResult, GpgME::EncryptionResult>
200 exec(
const std::vector<GpgME::Key> &signers,
201 const std::vector<GpgME::Key> &recipients,
202 const QByteArray &plainText,
203 const GpgME::Context::EncryptionFlags flags, QByteArray &cipherText) = 0;
205 void result(
const GpgME::SigningResult &signingresult,
206 const GpgME::EncryptionResult &encryptionresult,
207 const QByteArray &cipherText,
const QString &auditLogAsHtml = QString(),
208 const GpgME::Error &auditLogError = GpgME::Error());
An abstract base class for asynchronous crypto operations.
Definition: job.h:69
An abstract base class for asynchronous combined signing and encrypting.
Definition: signencryptjob.h:87
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 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 >(), bool alwaysTrust=false)=0
virtual void setOutputIsBase64Encoded(bool)=0