QGpgME
10.3.4.0000000
Qt API for GpgME
|
Get the best key to use for a Mailbox. More...
#include <keyformailboxjob.h>
Signals | |
void | result (const GpgME::KeyListResult &result, const GpgME::Key &key, const GpgME::UserID &uid, const QString &auditLogAsHtml=QString(), const GpgME::Error &auditLogError=GpgME::Error()) |
![]() | |
void | progress (const QString &what, int current, int total) |
void | done () |
Public Member Functions | |
virtual GpgME::Error | start (const QString &mailbox, bool canEncrypt=true)=0 |
virtual GpgME::KeyListResult | exec (const QString &mailbox, bool canEncrypt, GpgME::Key &key, GpgME::UserID &uid)=0 |
![]() | |
virtual QString | auditLogAsHtml () const |
virtual GpgME::Error | auditLogError () const |
bool | isAuditLogSupported () const |
Protected Member Functions | |
KeyForMailboxJob (QObject *parent) | |
![]() | |
Job (QObject *parent) | |
Additional Inherited Members | |
![]() | |
virtual void | slotCancel ()=0 |
![]() | |
static GpgME::Context * | context (Job *job) |
Get the best key to use for a Mailbox.
To use the keyformailboxjob, first obtain an instance from the CryptoBackend and either exec it or start and conncet the result() signals to a suitable slot. The job will be automatically deleted in which case the KeylistJob instance will have schedules it's own destruction with a call to QObject::deleteLater().
The best key is defined as the key with a UID that has an E-Mail that matches the mailbox provided. If multiple keys are found the one with the highest validity is returned.
After result() is emitted, the KeyListJob will schedule it's own destruction by calling QObject::deleteLater().
|
signal |
The result. Key is the key found or a Null key.
The userid is the uid where the mailbox matches.
The auditlog params are always null / empty.
|
pure virtual |
Starts the operation. mailbox is the mailbox to look for.
The result is the same as for the LocateKeysJob.
If canEncrypt is true, only keys that have a subkey for encryption usage are returned. Use this if you need to select a key for signing.
Implemented in QGpgME::QGpgMEKeyForMailboxJob.