certmanager/lib

#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::JobmThis
 
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()

unsigned int Kleo::QGpgMEJob::chunkSize ( ) const
inlineprotected
Returns
current chunksize

Definition at line 100 of file qgpgmejob.h.

◆ createInData()

void Kleo::QGpgMEJob::createInData ( const TQByteArray &  in)
protected

Creates a GpgME::Data/QGpgME::TQByteArrayDataProvider pair, filled with the contents of in

Definition at line 226 of file qgpgmejob.cpp.

◆ createOutData()

void Kleo::QGpgMEJob::createOutData ( )
protected

Creates an empty GpgME::Data/QGpgME::TQByteArrayDataProvider pair

Definition at line 232 of file qgpgmejob.cpp.

◆ doOperationDoneEvent()

virtual void Kleo::QGpgMEJob::doOperationDoneEvent ( const GpgME::Error &  e)
protectedpure virtual

Called on operation-done events, between emitting done() and calling deleteLater(). You should emit your result signal here.

◆ doSlotOperationDoneEvent()

void Kleo::QGpgMEJob::doSlotOperationDoneEvent ( GpgME::Context *  context,
const GpgME::Error &  e 
)
protected

Call this to implement a slotOperationDoneEvent()

Definition at line 251 of file qgpgmejob.cpp.

◆ getAuditLog()

void Kleo::QGpgMEJob::getAuditLog ( )
protected

Call this to extract the audit log from mCtx

Definition at line 259 of file qgpgmejob.cpp.

◆ hookupContextToEventLoopInteractor()

void Kleo::QGpgMEJob::hookupContextToEventLoopInteractor ( )
protected

Hooks up mCtx to be managed by the event loop interactor

Definition at line 153 of file qgpgmejob.cpp.

◆ nextChunk()

const char ** Kleo::QGpgMEJob::nextChunk ( )
protected

Skips to the next chunk of patterns.

Returns
patterns()

Definition at line 193 of file qgpgmejob.cpp.

◆ numPatterns()

unsigned int Kleo::QGpgMEJob::numPatterns ( ) const
inlineprotected

Returnes the number of patterns set

Definition at line 92 of file qgpgmejob.h.

◆ patterns()

const char ** Kleo::QGpgMEJob::patterns ( ) const
protected
Returns
patterns, offset by the current chunk

Definition at line 208 of file qgpgmejob.cpp.

◆ setChunkSize()

void Kleo::QGpgMEJob::setChunkSize ( unsigned int  size)
protected

Set the current pattern chunksize to size and reset the chunk index to zero

Definition at line 180 of file qgpgmejob.cpp.

◆ setPatterns()

void Kleo::QGpgMEJob::setPatterns ( const TQStringList &  sl,
bool  allowEmpty = false 
)
protected

Fills mPatterns from the stringlist, resets chunking to the full list

Definition at line 160 of file qgpgmejob.cpp.

◆ setSigningKeys()

GpgME::Error Kleo::QGpgMEJob::setSigningKeys ( const std::vector< GpgME::Key > &  signers)
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: