#include <qgpgmejob.h>
Inherits GpgME::ProgressProvider, and GpgME::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]
.
Public Member Functions | |
QGpgMEJob (Kleo::Job *_this, GpgME::Context *context) | |
void | checkInvariants () const |
Protected Member Functions | |
virtual void | doOperationDoneEvent (const GpgME::Error &e)=0 |
void | hookupContextToEventLoopInteractor () |
void | setPatterns (const TQStringList &sl, bool allowEmpty=false) |
unsigned int | numPatterns () const |
const char ** | nextChunk () |
const char ** | patterns () const |
void | setChunkSize (unsigned int size) |
unsigned int | chunkSize () const |
void | createOutData () |
void | createInData (const TQByteArray &in) |
GpgME::Error | setSigningKeys (const std::vector< GpgME::Key > &signers) |
void | doSlotOperationDoneEvent (GpgME::Context *context, const GpgME::Error &e) |
void | getAuditLog () |
virtual void | doEmitProgressSignal (const TQString &what, int current, int total)=0 |
virtual void | doEmitDoneSignal ()=0 |
void | doSlotCancel () |
TQString | auditLogAsHtml () const |
GpgME::Error | auditLogError () const |
Protected Attributes | |
Kleo::Job * | mThis |
GpgME::Context * | mCtx |
GpgME::Data * | mInData |
QGpgME::TQByteArrayDataProvider * | mInDataDataProvider |
GpgME::Data * | mOutData |
QGpgME::TQByteArrayDataProvider * | 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 TQt bugs (lazy implementations), first and foremost the inability of moc to handle inheritance from multiple TQObject-derived subclasses.
To use it, inherit from the Job-subclass, then from this class, add TQGPGME_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.
Definition at line 78 of file qgpgmejob.h.
Member Function Documentation
◆ chunkSize()
|
inlineprotected |
- Returns
- current chunksize
Definition at line 100 of file qgpgmejob.h.
◆ createInData()
|
protected |
Creates a GpgME::Data/QGpgME::TQByteArrayDataProvider pair, filled with the contents of in
Definition at line 226 of file qgpgmejob.cpp.
◆ createOutData()
|
protected |
Creates an empty GpgME::Data/QGpgME::TQByteArrayDataProvider pair
Definition at line 232 of file qgpgmejob.cpp.
◆ doOperationDoneEvent()
|
protectedpure virtual |
Called on operation-done events, between emitting done() and calling deleteLater(). You should emit your result signal here.
◆ doSlotOperationDoneEvent()
|
protected |
Call this to implement a slotOperationDoneEvent()
Definition at line 251 of file qgpgmejob.cpp.
◆ getAuditLog()
|
protected |
Call this to extract the audit log from mCtx
Definition at line 259 of file qgpgmejob.cpp.
◆ hookupContextToEventLoopInteractor()
|
protected |
Hooks up mCtx to be managed by the event loop interactor
Definition at line 153 of file qgpgmejob.cpp.
◆ nextChunk()
|
protected |
Skips to the next chunk of patterns.
- Returns
- patterns()
Definition at line 193 of file qgpgmejob.cpp.
◆ numPatterns()
|
inlineprotected |
Returnes the number of patterns set
Definition at line 92 of file qgpgmejob.h.
◆ patterns()
|
protected |
- Returns
- patterns, offset by the current chunk
Definition at line 208 of file qgpgmejob.cpp.
◆ setChunkSize()
|
protected |
Set the current pattern chunksize to size and reset the chunk index to zero
Definition at line 180 of file qgpgmejob.cpp.
◆ setPatterns()
|
protected |
Fills mPatterns from the stringlist, resets chunking to the full list
Definition at line 160 of file qgpgmejob.cpp.
◆ setSigningKeys()
|
protected |
Sets the list of signing keys
Definition at line 215 of file qgpgmejob.cpp.
The documentation for this class was generated from the following files: