From 94420b05775122b25885c66ac67f77c59d01644d Mon Sep 17 00:00:00 2001 From: Andre Heinecke Date: Thu, 25 Aug 2016 14:29:41 +0200 Subject: qt: Add WKSPublishJob * lang/qt/src/Makefile.am: Add new files. * lang/qt/src/job.cpp: Include moc / subclass stub. * lang/qt/src/protocol.h: Add virtual for new job. * lang/qt/src/protocol_p.h: Add job. * lang/qt/src/wkspublishjob.h: Interface for WKSPublishJob. * lang/qt/src/qgpgmewkspublishjob.cpp, lang/qt/src/qgpgmewkspublishjob.h: New. -- The Job was originally intended to be used with a SpawnEngine Context but QProcess was a better fit for the job. Usage is similar to the client tool. check, create, recieve. --- lang/qt/src/protocol_p.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lang/qt/src/protocol_p.h') diff --git a/lang/qt/src/protocol_p.h b/lang/qt/src/protocol_p.h index afb4f9cb..2ce41824 100644 --- a/lang/qt/src/protocol_p.h +++ b/lang/qt/src/protocol_p.h @@ -57,6 +57,7 @@ #include "qgpgmechangepasswdjob.h" #include "qgpgmeadduseridjob.h" #include "qgpgmekeyformailboxjob.h" +#include "qgpgmewkspublishjob.h" namespace { @@ -387,6 +388,18 @@ public: } return new QGpgME::QGpgMEKeyForMailboxJob(context); } + + QGpgME::WKSPublishJob *wksPublishJob() const Q_DECL_OVERRIDE + { + if (mProtocol != GpgME::OpenPGP) { + return Q_NULLPTR; + } + auto context = GpgME::Context::createForEngine(GpgME::SpawnEngine); + if (!context) { + return Q_NULLPTR; + } + return new QGpgME::QGpgMEWKSPublishJob(context.release()); + } }; } -- cgit v1.2.3