diff options
author | Ingo Klöcker <[email protected]> | 2020-10-28 16:02:22 +0000 |
---|---|---|
committer | Ingo Klöcker <[email protected]> | 2020-10-29 11:57:10 +0000 |
commit | f042739d3a2ed23a90441a81782e4c3ac6ffb1c5 (patch) | |
tree | c96b36b2b16bef7aad038d95e19ca04928770ec4 /lang/qt/src/qgpgmequickjob.cpp | |
parent | qt: Some minor cleanups (diff) | |
download | gpgme-f042739d3a2ed23a90441a81782e4c3ac6ffb1c5.tar.gz gpgme-f042739d3a2ed23a90441a81782e4c3ac6ffb1c5.zip |
qt: Add support for revoke signature quick command
* lang/qt/src/quickjob.h (QuickJob::startRevokeSignature): New.
* lang/qt/src/qgpgmequickjob.h, lang/qt/src/qgpgmequickjob.cpp
(QGpgMEQuickJob::startRevokeSignature): New.
* lang/qt/src/qgpgmequickjob.cpp (revokeSignatureWorker): New.
--
GnuPG-bug-id: 5094
Diffstat (limited to 'lang/qt/src/qgpgmequickjob.cpp')
-rw-r--r-- | lang/qt/src/qgpgmequickjob.cpp | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/lang/qt/src/qgpgmequickjob.cpp b/lang/qt/src/qgpgmequickjob.cpp index 93027d94..e29be913 100644 --- a/lang/qt/src/qgpgmequickjob.cpp +++ b/lang/qt/src/qgpgmequickjob.cpp @@ -1,6 +1,9 @@ -/* qgpgmequickjob.cpp +/* qgpgmequickjob.cpp + This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2017 Intevation GmbH + Copyright (c) 2020 g10 Code GmbH + Software engineering by Ingo Klöcker <[email protected]> QGpgME is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -47,7 +50,9 @@ QGpgMEQuickJob::QGpgMEQuickJob(Context *context) lateInitialization(); } -QGpgMEQuickJob::~QGpgMEQuickJob() {} +QGpgMEQuickJob::~QGpgMEQuickJob() +{ +} static QGpgMEQuickJob::result_type createWorker(GpgME::Context *ctx, const QString &uid, @@ -93,6 +98,15 @@ static QGpgMEQuickJob::result_type revUidWorker(GpgME::Context *ctx, return std::make_tuple(err, QString(), Error()); } +static QGpgMEQuickJob::result_type revokeSignatureWorker(Context *ctx, + const Key &key, + const Key &signingKey, + const std::vector<UserID> &userIds) +{ + const auto err = ctx->revokeSignature(key, signingKey, userIds); + return std::make_tuple(err, QString(), Error()); +} + void QGpgMEQuickJob::startCreate(const QString &uid, const char *algo, const QDateTime &expires, @@ -120,4 +134,10 @@ void QGpgMEQuickJob::startAddSubkey(const GpgME::Key &key, const char *algo, run(std::bind(&addSubkeyWorker, std::placeholders::_1, key, algo, expires, flags)); } + +void QGpgMEQuickJob::startRevokeSignature(const Key &key, const Key &signingKey, const std::vector<UserID> &userIds) +{ + run(std::bind(&revokeSignatureWorker, std::placeholders::_1, key, signingKey, userIds)); +} + #include "qgpgmequickjob.moc" |