File indexing completed on 2024-06-02 05:24:17

0001 /* -*- mode: c++; c-basic-offset:4 -*-
0002     commands/revokekeycommand.h
0003 
0004     This file is part of Kleopatra, the KDE keymanager
0005     SPDX-FileCopyrightText: 2022 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 namespace GpgME
0016 {
0017 class Key;
0018 }
0019 
0020 namespace Kleo
0021 {
0022 class RevokeKeyCommand : public Command
0023 {
0024     Q_OBJECT
0025 public:
0026     RevokeKeyCommand(QAbstractItemView *view, KeyListController *parent);
0027     explicit RevokeKeyCommand(const GpgME::Key &key);
0028     ~RevokeKeyCommand() override;
0029 
0030     static Restrictions restrictions()
0031     {
0032         return OnlyOneKey | NeedSecretKey | MustBeOpenPGP;
0033     }
0034 
0035 private:
0036     void doStart() override;
0037     void doCancel() override;
0038 
0039 private:
0040     class Private;
0041     inline Private *d_func();
0042     inline const Private *d_func() const;
0043 };
0044 }