37 #include "qgpgmeimportjob.h"
39 #include <qgpgme/eventloopinteractor.h>
40 #include <qgpgme/dataprovider.h>
42 #include <gpgmepp/context.h>
43 #include <gpgmepp/importresult.h>
44 #include <gpgmepp/data.h>
48 Kleo::QGpgMEImportJob::QGpgMEImportJob( GpgME::Context * context )
49 : ImportJob( QGpgME::EventLoopInteractor::instance(), "Kleo::QGpgMEImportJob" ),
50 QGpgMEJob( this, context )
55 Kleo::QGpgMEImportJob::~QGpgMEImportJob() {
58 void Kleo::QGpgMEImportJob::setup( const TQByteArray & keyData ) {
61 createInData( keyData );
64 GpgME::Error Kleo::QGpgMEImportJob::start( const TQByteArray & keyData ) {
67 hookupContextToEventLoopInteractor();
69 const GpgME::Error err = mCtx->startKeyImport( *mInData );
76 GpgME::ImportResult Kleo::QGpgMEImportJob::exec( const TQByteArray & keyData ) {
78 const GpgME::ImportResult res = mCtx->importKeys( *mInData );
83 void Kleo::QGpgMEImportJob::doOperationDoneEvent( const GpgME::Error & ) {
84 const GpgME::ImportResult res = mCtx->importResult();
90 #include "qgpgmeimportjob.moc"
|