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>
58 class EncryptionResult;
64 class SignEncryptJobPrivate;
92 explicit SignEncryptJob(std::unique_ptr<SignEncryptJobPrivate>, QObject *parent);
101 void setFileName(
const QString &fileName);
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;
125 void setInputFile(
const QString &path);
126 QString inputFile()
const;
137 void setOutputFile(
const QString &path);
138 QString outputFile()
const;
148 void setEncryptionFlags(GpgME::Context::EncryptionFlags flags);
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;
189 virtual void setOutputIsBase64Encoded(
bool) = 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());
218 #endif // __KLEO_SIGNENCRYPTJOB_H__
An abstract base class for asynchronous crypto operations.
Definition: job.h:71
An abstract base class for asynchronous combined signing and encrypting.
Definition: signencryptjob.h:88
Definition: abstractimportjob.h:42
Definition: abstractimportjob.h:48