QGpgME  10.3.4.0000000
Qt API for GpgME
Signals | Public Member Functions | Protected Member Functions | List of all members
QGpgME::KeyForMailboxJob Class Referenceabstract

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

#include <keyformailboxjob.h>

Inheritance diagram for QGpgME::KeyForMailboxJob:
Inheritance graph
[legend]
Collaboration diagram for QGpgME::KeyForMailboxJob:
Collaboration graph
[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 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
 

Protected Member Functions

 KeyForMailboxJob (QObject *parent)
 
- Protected Member Functions inherited from QGpgME::Job
 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)
 

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 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().

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: