37 #include "qgpgmeverifydetachedjob.h" 39 #include <qgpgme/eventloopinteractor.h> 40 #include <qgpgme/dataprovider.h> 42 #include <gpgmepp/context.h> 43 #include <gpgmepp/verificationresult.h> 44 #include <gpgmepp/data.h> 48 Kleo::QGpgMEVerifyDetachedJob::QGpgMEVerifyDetachedJob( GpgME::Context * context )
49 : VerifyDetachedJob(
QGpgME::EventLoopInteractor::instance(),
"Kleo::QGpgMEVerifyDetachedJob" ),
50 QGpgMEJob( this, context )
55 Kleo::QGpgMEVerifyDetachedJob::~QGpgMEVerifyDetachedJob() {
58 void Kleo::QGpgMEVerifyDetachedJob::setup(
const TQByteArray & signature,
const TQByteArray & signedData ) {
65 mOutDataDataProvider =
new QGpgME::TQByteArrayDataProvider( signedData );
66 mOutData =
new GpgME::Data( mOutDataDataProvider );
67 assert( !mOutData->isNull() );
70 GpgME::Error Kleo::QGpgMEVerifyDetachedJob::start(
const TQByteArray & signature,
71 const TQByteArray & signedData ) {
72 setup( signature, signedData );
76 const GpgME::Error err = mCtx->startDetachedSignatureVerification( *mInData, *mOutData );
83 GpgME::VerificationResult Kleo::QGpgMEVerifyDetachedJob::exec(
const TQByteArray & signature,
84 const TQByteArray & signedData ) {
85 setup( signature, signedData );
86 const GpgME::VerificationResult r = mCtx->verifyDetachedSignature( *mInData, *mOutData );
91 void Kleo::QGpgMEVerifyDetachedJob::doOperationDoneEvent(
const GpgME::Error & ) {
92 const GpgME::VerificationResult res = mCtx->verificationResult();
98 #include "qgpgmeverifydetachedjob.moc"
void hookupContextToEventLoopInteractor()
void createInData(const TQByteArray &in)