File indexing completed on 2024-06-23 05:13:54
0001 /* -*- mode: c++; c-basic-offset:4 -*- 0002 autodecryptverifyfilescontroller.h 0003 0004 This file is part of Kleopatra, the KDE keymanager 0005 SPDX-FileCopyrightText: 2008 Klarälvdalens Datakonsult AB 0006 0007 SPDX-FileCopyrightText: 2016 Bundesamt für Sicherheit in der Informationstechnik 0008 SPDX-FileContributor: Intevation GmbH 0009 0010 SPDX-License-Identifier: GPL-2.0-or-later 0011 */ 0012 0013 #pragma once 0014 0015 #include "crypto/decryptverifyfilescontroller.h" 0016 0017 #include <utils/types.h> 0018 0019 #include <memory> 0020 #include <vector> 0021 0022 namespace Kleo 0023 { 0024 namespace Crypto 0025 { 0026 0027 class AutoDecryptVerifyFilesController : public DecryptVerifyFilesController 0028 { 0029 Q_OBJECT 0030 public: 0031 explicit AutoDecryptVerifyFilesController(QObject *parent = nullptr); 0032 explicit AutoDecryptVerifyFilesController(const std::shared_ptr<const ExecutionContext> &ctx, QObject *parent = nullptr); 0033 0034 ~AutoDecryptVerifyFilesController() override; 0035 0036 void setFiles(const QStringList &files) override; 0037 void setOperation(DecryptVerifyOperation op) override; 0038 DecryptVerifyOperation operation() const override; 0039 void start() override; 0040 0041 public Q_SLOTS: 0042 void cancel() override; 0043 0044 private: 0045 void doTaskDone(const Task *task, const std::shared_ptr<const Task::Result> &) override; 0046 0047 private: 0048 class Private; 0049 kdtools::pimpl_ptr<Private> d; 0050 Q_PRIVATE_SLOT(d, void schedule()) 0051 }; 0052 0053 } 0054 }