QGpgME 21.6.2.0000005
Qt API for GpgME
Loading...
Searching...
No Matches
Public Types | Signals | Public Member Functions | Protected Member Functions | List of all members
QGpgME::ListAllKeysJob Class Referenceabstract

An abstract base class for asynchronously listing all keys. More...

#include <listallkeysjob.h>

Inheritance diagram for QGpgME::ListAllKeysJob:
Inheritance graph
[legend]
Collaboration diagram for QGpgME::ListAllKeysJob:
Collaboration graph
[legend]

Public Types

enum  Option { Default = 0x00 , DisableAutomaticTrustDatabaseCheck = 0x01 }
 

Signals

void result (const GpgME::KeyListResult &result, const std::vector< GpgME::Key > &pub=std::vector< GpgME::Key >(), const std::vector< GpgME::Key > &sec=std::vector< GpgME::Key >(), 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

void setOptions (Options options)
 
Options options () const
 
virtual GpgME::Error start (bool mergeKeys=false)=0
 
virtual GpgME::KeyListResult exec (std::vector< GpgME::Key > &pub, std::vector< GpgME::Key > &sec, bool mergeKeys=false)=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

 ListAllKeysJob (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

An abstract base class for asynchronously listing all keys.

To use a ListAllKeysJob, first obtain an instance from the CryptoBackend implementation, connect the progress() and result() signals to suitable slots and then start the key listing with a call to start(). This call might fail, in which case the ListAllKeysJob instance will have schedules it's own destruction with a call to QObject::deleteLater().

After result() is emitted, the ListAllKeysJob will schedule it's own destruction by calling QObject::deleteLater().

This is potentially much faster than a KeyListJob with empty pattern.

Member Function Documentation

◆ exec()

virtual GpgME::KeyListResult QGpgME::ListAllKeysJob::exec ( std::vector< GpgME::Key > &  pub,
std::vector< GpgME::Key > &  sec,
bool  mergeKeys = false 
)
pure virtual

Synchronous version of start().

Implemented in QGpgME::QGpgMEListAllKeysJob.

◆ start()

virtual GpgME::Error QGpgME::ListAllKeysJob::start ( bool  mergeKeys = false)
pure virtual

Starts the listallkeys operation. In general, all keys are returned (however, the backend is free to truncate the result and should do so; when this happens, it will be reported by the result object).

If GnuPG 2.1 or later is used, then mergeKeys is ignored. Otherwise, if mergeKeys is true, then some (but not all) information of the secret keys is merged into public keys.

Implemented in QGpgME::QGpgMEListAllKeysJob.


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