aboutsummaryrefslogtreecommitdiffstats
path: root/lang/qt/src/protocol.h
diff options
context:
space:
mode:
authorIngo Klöcker <[email protected]>2022-05-04 12:51:50 +0000
committerIngo Klöcker <[email protected]>2022-05-04 12:51:50 +0000
commitc64a8daf507a2216611861a12f312466b0bae8b2 (patch)
tree11e1a969269fef29992c40e6f73af60bd00de41a /lang/qt/src/protocol.h
parentcpp: Allow retrieving import result of key listing with locate mode (diff)
downloadgpgme-c64a8daf507a2216611861a12f312466b0bae8b2.tar.gz
gpgme-c64a8daf507a2216611861a12f312466b0bae8b2.zip
qt: Emit import result when refreshing OpenPGP keys
* lang/qt/src/refreshopenpgpkeysjob.h: New. * lang/qt/src/Makefile.am, lang/qt/src/job.cpp: Update accordingly. * lang/qt/src/qgpgmerefreshopenpgpkeysjob.h (class QGpgMERefreshOpenPGPKeysJob): Derive from RefreshOpenPGPKeysJob with result ImportResult. Remove unused start overload. * lang/qt/src/qgpgmerefreshopenpgpkeysjob.cpp (locate_external_keys): Ignore result of KeyListJob. Return import result. (receive_keys): Return import result. (refresh_keys): Merge the two import results and return the result. * lang/qt/src/protocol.h (class Protocol): Add pure virtual member function refreshOpenPGPKeysJob. * lang/qt/src/protocol_p.h (Protocol::refreshKeysJob): Return nullptr for OpenPGP protocol. (Protocol::refreshOpenPGPKeysJob): New. * lang/qt/tests/run-refreshkeysjob.cpp (main): Use appropriate job for the protocol of the key to refresh. -- This adds RefreshOpenPGPKeysJob complementing RefreshKeysJob (for S/MIME keys). Changing the result type of RefreshKeysJob would break the ABI. Therefore we have to introduce a new base class for the refresh job for OpenPGP. We derive this base class from AbstractImportJob because we want to return an import result. GnuPG-bug-id: 5951
Diffstat (limited to '')
-rw-r--r--lang/qt/src/protocol.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/lang/qt/src/protocol.h b/lang/qt/src/protocol.h
index d8500174..f0772eef 100644
--- a/lang/qt/src/protocol.h
+++ b/lang/qt/src/protocol.h
@@ -59,6 +59,7 @@ class VerifyOpaqueJob;
class SignEncryptJob;
class DecryptVerifyJob;
class RefreshKeysJob;
+class RefreshOpenPGPKeysJob;
class ChangeExpiryJob;
class ChangeOwnerTrustJob;
class ChangePasswdJob;
@@ -139,9 +140,7 @@ public:
/**
* For S/MIME keys this job performs a full validation check of the keys
* with updated CRLs.
- * For OpenPGP keys this job performs a refresh of keys via the external
- * methods as defined by the \c auto-key-locate option and from the
- * configured keyserver.
+ * For OpenPGP keys, use refreshOpenPGPKeysJob.
*/
virtual RefreshKeysJob *refreshKeysJob() const = 0;
virtual ChangeExpiryJob *changeExpiryJob() const = 0;
@@ -184,6 +183,13 @@ public:
virtual ReceiveKeysJob *receiveKeysJob() const = 0;
virtual RevokeKeyJob *revokeKeyJob() const = 0;
+
+ /**
+ * This job performs a refresh of OpenPGP keys via the external methods
+ * as defined by the \c auto-key-locate option and via an import from the
+ * configured keyserver.
+ */
+ virtual RefreshOpenPGPKeysJob *refreshOpenPGPKeysJob() const = 0;
};
/** Obtain a reference to the OpenPGP Protocol.