Loading...
Searching...
No Matches
QGpgME::KeyForMailboxJob Class Referenceabstract

Get the best key to use for a Mailbox. More...

`#include <keyformailboxjob.h>`

Inheritance diagram for QGpgME::KeyForMailboxJob:
[legend]
Collaboration diagram for QGpgME::KeyForMailboxJob:
[legend]

## 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())
Signals inherited from QGpgME::Job
void | jobProgress (int current, int total)
void | rawProgress (const QString &what, int type, int current, int total)
QGPGME_DEPRECATED 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
Public Member Functions inherited from QGpgME::Job
virtual QString | auditLogAsHtml () const
virtual GpgME::Error | auditLogError () const
bool | isAuditLogSupported () const
GpgME::Error | startIt ()
void | startNow ()

## Protected Member Functions

| KeyForMailboxJob (QObject *parent)
Protected Member Functions inherited from QGpgME::Job
| Job (std::unique_ptr< JobPrivate >, QObject *parent)
| Job (QObject *parent)

## Additional Inherited Members

Public Slots inherited from QGpgME::Job
virtual void | slotCancel ()=0
Static Public Member Functions inherited from QGpgME::Job
static GpgME::Context * | context (Job *job)
Protected Attributes inherited from QGpgME::Job
const std::unique_ptr< JobPrivate > | d_ptr

## Detailed Description

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 connect the result() signal to a suitable slot.

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 job will schedule it's own destruction by calling QObject::deleteLater().

## Member Function Documentation

## result

void QGpgME::KeyForMailboxJob::result | ( | const GpgME::KeyListResult & | result,
|  | const GpgME::Key & | key,
|  | const GpgME::UserID & | uid,
|  | const QString & | auditLogAsHtml = `QString()`,
|  | const GpgME::Error & | auditLogError = `GpgME::Error()`
| ) |  |

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.

## start()

virtual GpgME::Error QGpgME::KeyForMailboxJob::start | ( | const QString & | mailbox,
|  | bool | canEncrypt = `true`
| ) |  |

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.

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

- keyformailboxjob.h