QGpgME  10.3.4.0000000
Qt API for GpgME
Public Member Functions | List of all members
QGpgME::QGpgMEEncryptJob Class Reference
Inheritance diagram for QGpgME::QGpgMEEncryptJob:
Inheritance graph
[legend]
Collaboration diagram for QGpgME::QGpgMEEncryptJob:
Collaboration graph
[legend]

Public Member Functions

 QGpgMEEncryptJob (GpgME::Context *context)
 
GpgME::Error start (const std::vector< GpgME::Key > &recipients, const QByteArray &plainText, bool alwaysTrust) Q_DECL_OVERRIDE
 
void start (const std::vector< GpgME::Key > &recipients, const std::shared_ptr< QIODevice > &plainText, const std::shared_ptr< QIODevice > &cipherText, bool alwaysTrust) Q_DECL_OVERRIDE
 
GpgME::EncryptionResult exec (const std::vector< GpgME::Key > &recipients, const QByteArray &plainText, bool alwaysTrust, QByteArray &cipherText) Q_DECL_OVERRIDE
 
void start (const std::vector< GpgME::Key > &recipients, const std::shared_ptr< QIODevice > &plainText, const std::shared_ptr< QIODevice > &cipherText, const GpgME::Context::EncryptionFlags flags) Q_DECL_OVERRIDE
 
GpgME::EncryptionResult exec (const std::vector< GpgME::Key > &recipients, const QByteArray &plainText, const GpgME::Context::EncryptionFlags flags, QByteArray &cipherText) Q_DECL_OVERRIDE
 
void setOutputIsBase64Encoded (bool on) Q_DECL_OVERRIDE
 
void resultHook (const result_type &r) Q_DECL_OVERRIDE
 
- Public Member Functions inherited from QGpgME::Job
virtual QString auditLogAsHtml () const
 
virtual GpgME::Error auditLogError () const
 
bool isAuditLogSupported () const
 

Additional Inherited Members

- Public Types inherited from QGpgME::_detail::ThreadedJobMixin< EncryptJob, std::tuple< GpgME::EncryptionResult, QByteArray, QString, GpgME::Error > >
typedef ThreadedJobMixin< EncryptJob, std::tuple< GpgME::EncryptionResult, QByteArray, QString, GpgME::Error > > mixin_type
 
typedef std::tuple< GpgME::EncryptionResult, QByteArray, QString, GpgME::Error > result_type
 
- Public Slots inherited from QGpgME::Job
- Signals inherited from QGpgME::EncryptJob
void result (const GpgME::EncryptionResult &result, const QByteArray &cipherText, const QString &auditLogAsHtml=QString(), const GpgME::Error &auditLogError=GpgME::Error())
 
- Signals inherited from QGpgME::Job
void progress (const QString &what, int current, int total)
 
void done ()
 
- Static Public Member Functions inherited from QGpgME::Job
static GpgME::Context * context (Job *job)
 
- Protected Member Functions inherited from QGpgME::_detail::ThreadedJobMixin< EncryptJob, std::tuple< GpgME::EncryptionResult, QByteArray, QString, GpgME::Error > >
 ThreadedJobMixin (GpgME::Context *ctx)
 
void lateInitialization ()
 
void run (const T_binder &func)
 
void run (const T_binder &func, const std::shared_ptr< QIODevice > &io)
 
void run (const T_binder &func, const std::shared_ptr< QIODevice > &io1, const std::shared_ptr< QIODevice > &io2)
 
GpgME::Context * context () const
 
void slotFinished ()
 
void slotCancel () Q_DECL_OVERRIDE
 
QString auditLogAsHtml () const Q_DECL_OVERRIDE
 
GpgME::Error auditLogError () const Q_DECL_OVERRIDE
 
void showProgress (const char *, int, int current, int total) Q_DECL_OVERRIDE
 
- Protected Member Functions inherited from QGpgME::EncryptJob
 EncryptJob (QObject *parent)
 
- Protected Member Functions inherited from QGpgME::Job
 Job (QObject *parent)
 

Member Function Documentation

◆ exec()

GpgME::EncryptionResult QGpgME::QGpgMEEncryptJob::exec ( const std::vector< GpgME::Key > &  recipients,
const QByteArray &  plainText,
const GpgME::Context::EncryptionFlags  flags,
QByteArray &  cipherText 
)
virtual

Like exec but with an additional argument for EncryptionFlags for more flexibility.

Implements QGpgME::EncryptJob.

◆ setOutputIsBase64Encoded()

void QGpgMEEncryptJob::setOutputIsBase64Encoded ( bool  )
virtual

This is a hack to request BASE64 output (instead of whatever comes out normally).

Implements QGpgME::EncryptJob.

◆ start() [1/3]

GpgME::Error QGpgME::QGpgMEEncryptJob::start ( const std::vector< GpgME::Key > &  recipients,
const QByteArray &  plainText,
bool  alwaysTrust 
)
virtual

Starts the encryption operation. recipients is the a list of keys to encrypt plainText to. Empty (null) keys are ignored. If recipients is empty, performs symmetric (passphrase) encryption.

If alwaysTrust is true, validity checking for the keys will not be performed, but full validity assumed for all keys without further checks.

Implements QGpgME::EncryptJob.

◆ start() [2/3]

void QGpgME::QGpgMEEncryptJob::start ( const std::vector< GpgME::Key > &  recipients,
const std::shared_ptr< QIODevice > &  plainText,
const std::shared_ptr< QIODevice > &  cipherText,
bool  alwaysTrust 
)
virtual

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

If cipherText is non-null, the ciphertext is written there. Otherwise, it will be delivered in the second argument of result().

Exceptions
GpgME::Exceptionif starting fails

Implements QGpgME::EncryptJob.

◆ start() [3/3]

void QGpgME::QGpgMEEncryptJob::start ( const std::vector< GpgME::Key > &  recipients,
const std::shared_ptr< QIODevice > &  plainText,
const std::shared_ptr< QIODevice > &  cipherText,
const GpgME::Context::EncryptionFlags  flags 
)
virtual

Like start but with an additional argument for EncryptionFlags for more flexibility.

Implements QGpgME::EncryptJob.


The documentation for this class was generated from the following files: