Kleo::QGpgMEJob Class Reference
This is a hackish helper class to avoid code duplication in this backend's
Kleo::Job subclasses.
More...
#include <qgpgmejob.h>
Inherits ProgressProvider, and PassphraseProvider.
Inherited by Kleo::QGpgMEDecryptJob [private]
, Kleo::QGpgMEDecryptVerifyJob [private]
, Kleo::QGpgMEDeleteJob [private]
, Kleo::QGpgMEDownloadJob [private]
, Kleo::QGpgMEEncryptJob [private]
, Kleo::QGpgMEExportJob [private]
, Kleo::QGpgMEImportJob [private]
, Kleo::QGpgMEKeyGenerationJob [private]
, Kleo::QGpgMEKeyListJob [private]
, Kleo::QGpgMESignEncryptJob [private]
, Kleo::QGpgMESignJob [private]
, Kleo::QGpgMEVerifyDetachedJob [private]
, and Kleo::QGpgMEVerifyOpaqueJob [private]
.
List of all members.
Public Member Functions
-
QGpgMEJob (Kleo::Job *_this, GpgME::Context *context)
-
void checkInvariants () const
Protected Member Functions
Protected Attributes
-
Kleo::Job * mThis
-
GpgME::Context * mCtx
-
GpgME::Data * mInData
-
QGpgME::QByteArrayDataProvider * mInDataDataProvider
-
GpgME::Data * mOutData
-
QGpgME::QByteArrayDataProvider * mOutDataDataProvider
Detailed Description
This is a hackish helper class to avoid code duplication in this backend's
Kleo::Job subclasses.
It contains several workarounds for moc/signal/slot shortcomings, most of which the author of this thinks are Qt bugs (lazy implementations), first and foremost the inability of moc to handle inheritance from multiple QObject-derived subclasses.
To use it, inherit from the Job-subclass, then from this class, add QGPGME_JOB to just after Q OBJECT and implement doOperationDoneEvent() by emitting your variant of the result() signal there. Pass "this" as the first argument this QGpgMEJOb's ctor. The rest is dealt with automatically.
Member Function Documentation
virtual void Kleo::QGpgMEJob::doOperationDoneEvent |
( |
const GpgME::Error & |
e |
) |
[protected, pure virtual] |
|
|
Called on operation-done events, between emitting done() and calling deleteLater(). You should emit your result signal here. |
void Kleo::QGpgMEJob::hookupContextToEventLoopInteractor |
( |
|
) |
[protected] |
|
|
Hooks up mCtx to be managed by the event loop interactor |
void Kleo::QGpgMEJob::setPatterns |
( |
const QStringList & |
sl, |
|
|
bool |
allowEmpty = false |
|
) |
[protected] |
|
|
Fills mPatterns from the stringlist, resets chunking to the full list |
unsigned int Kleo::QGpgMEJob::numPatterns |
( |
|
) |
const [inline, protected] |
|
|
Returnes the number of patterns set |
const char ** Kleo::QGpgMEJob::nextChunk |
( |
|
) |
[protected] |
|
|
Skips to the next chunk of patterns. - Returns:
- patterns()
|
const char ** Kleo::QGpgMEJob::patterns |
( |
|
) |
const [protected] |
|
|
- Returns:
- patterns, offset by the current chunk
|
void Kleo::QGpgMEJob::setChunkSize |
( |
unsigned int |
size |
) |
[protected] |
|
|
Set the current pattern chunksize to size and reset the chunk index to zero |
unsigned int Kleo::QGpgMEJob::chunkSize |
( |
|
) |
const [inline, protected] |
|
|
- Returns:
- current chunksize
|
void Kleo::QGpgMEJob::createOutData |
( |
|
) |
[protected] |
|
|
Creates an empty GpgME::Data/QGpgME::QByteArrayDataProvider pair |
void Kleo::QGpgMEJob::createInData |
( |
const QByteArray & |
in |
) |
[protected] |
|
|
Creates a GpgME::Data/QGpgME::QByteArrayDataProvider pair, filled with the contents of in |
GpgME::Error Kleo::QGpgMEJob::setSigningKeys |
( |
const std::vector< GpgME::Key > & |
signers |
) |
[protected] |
|
|
Sets the list of signing keys |
void Kleo::QGpgMEJob::doSlotOperationDoneEvent |
( |
GpgME::Context * |
context, |
|
|
const GpgME::Error & |
e |
|
) |
[protected] |
|
|
Call this to implement a slotOperationDoneEvent() |
The documentation for this class was generated from the following files: