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

0001 /* -*- mode: c++; c-basic-offset:4 -*-
0002     commands/genrevokecommand.h
0003 
0004     This file is part of Kleopatra, the KDE keymanager
0005     SPDX-FileCopyrightText: 2017 Bundesamt für Sicherheit in der Informationstechnik
0006     SPDX-FileContributor: Intevation GmbH
0007 
0008     SPDX-License-Identifier: GPL-2.0-or-later
0009 */
0010 
0011 #pragma once
0012 
0013 #include <commands/gnupgprocesscommand.h>
0014 
0015 #include <QString>
0016 
0017 class QWidget;
0018 
0019 namespace Kleo
0020 {
0021 namespace Commands
0022 {
0023 
0024 class GenRevokeCommand : public GnuPGProcessCommand
0025 {
0026     Q_OBJECT
0027 
0028 public:
0029     explicit GenRevokeCommand(QAbstractItemView *view, KeyListController *parent);
0030     explicit GenRevokeCommand(KeyListController *parent);
0031     explicit GenRevokeCommand(const GpgME::Key &key);
0032 
0033     static Restrictions restrictions()
0034     {
0035         return OnlyOneKey | NeedSecretKey | MustBeOpenPGP;
0036     }
0037 
0038 private:
0039     void postSuccessHook(QWidget *parentWidget) override;
0040 
0041     QStringList arguments() const override;
0042     QString errorCaption() const override;
0043 
0044     QString crashExitMessage(const QStringList &) const override;
0045     QString errorExitMessage(const QStringList &) const override;
0046 
0047     void doStart() override;
0048 
0049     QString mOutputFileName;
0050 };
0051 
0052 }
0053 }