File indexing completed on 2024-06-23 05:13:45

0001 /* -*- mode: c++; c-basic-offset:4 -*-
0002     commands/revokecertificationcommand.h
0003 
0004     This file is part of Kleopatra, the KDE keymanager
0005     SPDX-FileCopyrightText: 2020 g10 Code GmbH
0006     SPDX-FileContributor: Ingo Klöcker <dev@ingo-kloecker.de>
0007 
0008     SPDX-License-Identifier: GPL-2.0-or-later
0009 */
0010 
0011 #pragma once
0012 
0013 #include "command.h"
0014 
0015 #include <gpgme++/key.h>
0016 
0017 namespace Kleo
0018 {
0019 namespace Commands
0020 {
0021 
0022 class RevokeCertificationCommand : public Command
0023 {
0024     Q_OBJECT
0025 public:
0026     RevokeCertificationCommand(QAbstractItemView *view, KeyListController *parent);
0027     explicit RevokeCertificationCommand(const GpgME::Key &key);
0028     explicit RevokeCertificationCommand(const GpgME::UserID &uid);
0029     explicit RevokeCertificationCommand(const std::vector<GpgME::UserID> &uids);
0030     explicit RevokeCertificationCommand(const GpgME::UserID::Signature &signature);
0031     ~RevokeCertificationCommand() override;
0032 
0033     /* reimp */ static Restrictions restrictions()
0034     {
0035         return OnlyOneKey | MustBeOpenPGP;
0036     }
0037 
0038     static bool isSupported();
0039 
0040 private:
0041     void doStart() override;
0042     void doCancel() override;
0043 
0044 private:
0045     class Private;
0046     inline Private *d_func();
0047     inline const Private *d_func() const;
0048 };
0049 
0050 } // namespace Commands
0051 } // namespace Kleo