certmanager Library API Documentation

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>

Collaboration diagram for Kleo::QGpgMEJob:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 QGpgMEJob (Kleo::Job *_this, GpgME::Context *context)

Protected Member Functions

virtual void doOperationDoneEvent (const GpgME::Error &e)=0
void hookupContextToEventLoopInteractor ()
void setPatterns (const QStringList &sl, bool allowEmpty=false)
void createOutData ()
void createInData (const QByteArray &in)
GpgME::Error setSigningKeys (const std::vector< GpgME::Key > &signers)
void doSlotOperationDoneEvent (GpgME::Context *context, const GpgME::Error &e)
virtual void doEmitProgressSignal (const QString &what, int current, int total)=0
virtual void doEmitDoneSignal ()=0
void doSlotCancel ()

Protected Attributes

Kleo::JobmThis
GpgME::Context * mCtx
const char ** mPatterns
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.

Definition at line 77 of file qgpgmejob.h.


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.

Referenced by doSlotOperationDoneEvent().

void Kleo::QGpgMEJob::hookupContextToEventLoopInteractor  )  [protected]
 

Hooks up mCtx to be managed by the event loop interactor

Definition at line 91 of file qgpgmejob.cpp.

void Kleo::QGpgMEJob::setPatterns const QStringList sl,
bool  allowEmpty = false
[protected]
 

Fills mPatterns from the stringlist

Definition at line 98 of file qgpgmejob.cpp.

void Kleo::QGpgMEJob::createOutData  )  [protected]
 

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

Definition at line 129 of file qgpgmejob.cpp.

void Kleo::QGpgMEJob::createInData const QByteArray in  )  [protected]
 

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

Definition at line 123 of file qgpgmejob.cpp.

GpgME::Error Kleo::QGpgMEJob::setSigningKeys const std::vector< GpgME::Key > &  signers  )  [protected]
 

Sets the list of signing keys

Definition at line 112 of file qgpgmejob.cpp.

void Kleo::QGpgMEJob::doSlotOperationDoneEvent GpgME::Context *  context,
const GpgME::Error &  e
[protected]
 

Call this to implement a slotOperationDoneEvent()

Definition at line 135 of file qgpgmejob.cpp.

References doOperationDoneEvent().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for certmanager Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Apr 4 04:45:47 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003