88class QGPGME_EXPORT SignEncryptJob :
public Job
92 explicit SignEncryptJob(std::unique_ptr<SignEncryptJobPrivate>, QObject *parent);
94 ~SignEncryptJob()
override;
102 QString fileName()
const;
109 void setSigners(
const std::vector<GpgME::Key> &signers);
110 std::vector<GpgME::Key> signers()
const;
117 void setRecipients(
const std::vector<GpgME::Key> &recipients);
118 std::vector<GpgME::Key> recipients()
const;
126 QString inputFile()
const;
138 QString outputFile()
const;
149 GpgME::Context::EncryptionFlags encryptionFlags()
const;
161 virtual GpgME::Error
start(
const std::vector<GpgME::Key> &signers,
162 const std::vector<GpgME::Key> &recipients,
163 const QByteArray &plainText,
164 bool alwaysTrust =
false) = 0;
173 virtual void start(
const std::vector<GpgME::Key> &signers,
174 const std::vector<GpgME::Key> &recipients,
175 const std::shared_ptr<QIODevice> &plainText,
176 const std::shared_ptr<QIODevice> &cipherText = std::shared_ptr<QIODevice>(),
177 bool alwaysTrust =
false) = 0;
179 virtual std::pair<GpgME::SigningResult, GpgME::EncryptionResult>
180 exec(
const std::vector<GpgME::Key> &signers,
181 const std::vector<GpgME::Key> &recipients,
182 const QByteArray &plainText,
183 bool alwaysTrust, QByteArray &cipherText) = 0;
193 virtual void start(
const std::vector<GpgME::Key> &signers,
194 const std::vector<GpgME::Key> &recipients,
195 const std::shared_ptr<QIODevice> &plainText,
196 const std::shared_ptr<QIODevice> &cipherText = std::shared_ptr<QIODevice>(),
197 const GpgME::Context::EncryptionFlags flags = GpgME::Context::None) = 0;
201 virtual std::pair<GpgME::SigningResult, GpgME::EncryptionResult>
202 exec(
const std::vector<GpgME::Key> &signers,
203 const std::vector<GpgME::Key> &recipients,
204 const QByteArray &plainText,
205 const GpgME::Context::EncryptionFlags flags, QByteArray &cipherText) = 0;
207 void result(
const GpgME::SigningResult &signingresult,
208 const GpgME::EncryptionResult &encryptionresult,
209 const QByteArray &cipherText,
const QString &auditLogAsHtml = QString(),
210 const GpgME::Error &auditLogError = GpgME::Error());
213 Q_DECLARE_PRIVATE(SignEncryptJob)
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 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