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

An abstract base class to sign keys asynchronously. More...

`#include <signkeyjob.h>`

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

## Signals

void | result (const GpgME::Error &result, 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 GpgME::Key &keyToSign)=0
virtual void | setUserIDsToSign (const std::vector< unsigned int > &idsToSign)=0
virtual void | setCheckLevel (unsigned int checkLevel)=0
virtual void | setExportable (bool exportable)=0
virtual void | setSigningKey (const GpgME::Key &key)=0
virtual void | setNonRevocable (bool nonRevocable)=0
virtual void | setDupeOk (bool)
virtual void | setRemark (const QString &)
virtual void | setTrustSignature (GpgME::TrustSignatureTrust trust, unsigned short depth, const QString &scope)
virtual void | setExpirationDate (const QDate &expiration)
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

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

An abstract base class to sign keys asynchronously.

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

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

## Member Function Documentation

## setCheckLevel()

virtual void QGpgME::SignKeyJob::setCheckLevel | ( | unsigned int | checkLevel | ) |

pure virtual

sets the check level

Parameters

  checkLevel | the check level, ranges from 0 (no claim) and 3 (extensively checked), default is 0

Implemented in QGpgME::QGpgMESignKeyJob.

## setDupeOk()

virtual void QGpgME::SignKeyJob::setDupeOk | ( | bool |  | ) |

inline virtual

Set this if it is ok to overwrite an existing signature. In that case the context has to have the flag "extended-edit" set to 1 through Context::setFlag before calling edit.

Not pure virtual for ABI compatibility.

Reimplemented in QGpgME::QGpgMESignKeyJob.

## setExpirationDate()

virtual void QGpgME::SignKeyJob::setExpirationDate | ( | const QDate & | expiration | ) |

inline virtual

Sets the expiration date of the key signature to expiration. By default, key signatures do not expire.

Note: Expiration dates after 2106-02-05 will be set to 2106-02-05.

Not pure virtual for ABI compatibility.

Reimplemented in QGpgME::QGpgMESignKeyJob.

## setExportable()

virtual void QGpgME::SignKeyJob::setExportable | ( | bool | exportable | ) |

pure virtual

sets whether the signature should be exportable, or local only. default is local.

Implemented in QGpgME::QGpgMESignKeyJob.

## setNonRevocable()

virtual void QGpgME::SignKeyJob::setNonRevocable | ( | bool | nonRevocable | ) |

pure virtual

if set, the created signature won't be revocable. By default signatures can be revoked.

Implemented in QGpgME::QGpgMESignKeyJob.

## setRemark()

virtual void QGpgME::SignKeyJob::setRemark | ( | const QString & |  | ) |

inline virtual

Add a remark to the signature. This uses rem@g.nosp@m.nupg.nosp@m..org as a notation.

Not pure virtual for ABI compatibility.

Reimplemented in QGpgME::QGpgMESignKeyJob.

## setSigningKey()

virtual void QGpgME::SignKeyJob::setSigningKey | ( | const GpgME::Key & | key | ) |

pure virtual

sets an alternate signing key

Implemented in QGpgME::QGpgMESignKeyJob.

## setTrustSignature()

virtual void QGpgME::SignKeyJob::setTrustSignature | ( | GpgME::TrustSignatureTrust | trust,
|  | unsigned short | depth,
|  | const QString & | scope )

inline virtual

If set, then the created signature will be a trust signature. By default, no trust signatures are created.

trust is the amount of trust to put into the signed key, either `TrustSignatureTrust::Partial` or `TrustSignatureTrust::Complete`. depth is the level of the trust signature. Values between 0 and 255 are allowed. Level 0 has the same meaning as an ordinary validity signature. Level 1 means that the signed key is asserted to be a valid trusted introducer. Level n >= 2 means that the signed key is asserted to be trusted to issue level n-1 trust signatures, i.e., that it is a "meta introducer". scope is a domain name that limits the scope of trust of the signed key to user IDs with email addresses matching the domain (or a subdomain).

Not pure virtual for ABI compatibility.

Reimplemented in QGpgME::QGpgMESignKeyJob.

## setUserIDsToSign()

virtual void QGpgME::SignKeyJob::setUserIDsToSign | ( | const std::vector< unsigned int > & | idsToSign | ) |

pure virtual

If explicitly specified, only the listed user IDs will be signed. Otherwise all user IDs are signed.

Parameters

  idsToSign | list of user ID indexes (of the key to be signed).

Implemented in QGpgME::QGpgMESignKeyJob.

## start()

virtual GpgME::Error QGpgME::SignKeyJob::start | ( | const GpgME::Key & | keyToSign | ) |

pure virtual

Starts the key signing operation. key is the key to sign.

Parameters

  keyToSign | the key to be signed

Implemented in QGpgME::QGpgMESignKeyJob.

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

- signkeyjob.h
- signkeyjob.cpp