37 #include "qgpgmeverifyopaquejob.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::QGpgMEVerifyOpaqueJob::QGpgMEVerifyOpaqueJob( GpgME::Context * context )
49 : VerifyOpaqueJob( QGpgME::EventLoopInteractor::instance(),
"Kleo::QGpgMEVerifyOpaqueJob" ),
50 QGpgMEJob( this, context )
55 Kleo::QGpgMEVerifyOpaqueJob::~QGpgMEVerifyOpaqueJob() {
58 void Kleo::QGpgMEVerifyOpaqueJob::setup(
const TQByteArray & signedData ) {
62 createInData( signedData );
66 GpgME::Error Kleo::QGpgMEVerifyOpaqueJob::start(
const TQByteArray & signedData ) {
69 hookupContextToEventLoopInteractor();
71 const GpgME::Error err = mCtx->startOpaqueSignatureVerification( *mInData, *mOutData );
78 GpgME::VerificationResult Kleo::QGpgMEVerifyOpaqueJob::exec(
const TQByteArray & signedData, TQByteArray & plainText ) {
80 const GpgME::VerificationResult res = mCtx->verifyOpaqueSignature( *mInData, *mOutData );
81 plainText = mOutDataDataProvider->data();
86 void Kleo::QGpgMEVerifyOpaqueJob::doOperationDoneEvent(
const GpgME::Error & ) {
87 const GpgME::VerificationResult res = mCtx->verificationResult();
88 const TQByteArray plainText = mOutDataDataProvider->data();
90 emit result( res, plainText );
94 #include "qgpgmeverifyopaquejob.moc"