File indexing completed on 2024-06-23 05:14:13
0001 /* -*- mode: c++; c-basic-offset:4 -*- 0002 uiserver/decryptverifycommandemailbase.h 0003 0004 This file is part of Kleopatra, the KDE keymanager 0005 SPDX-FileCopyrightText: 2008 Klarälvdalens Datakonsult AB 0006 0007 SPDX-License-Identifier: GPL-2.0-or-later 0008 */ 0009 0010 #pragma once 0011 0012 #include "assuancommand.h" 0013 0014 #include <utils/pimpl_ptr.h> 0015 #include <utils/types.h> 0016 0017 namespace Kleo 0018 { 0019 0020 class DecryptVerifyCommandEMailBase : public AssuanCommandMixin<DecryptVerifyCommandEMailBase> 0021 { 0022 public: 0023 explicit DecryptVerifyCommandEMailBase(); 0024 ~DecryptVerifyCommandEMailBase() override; 0025 0026 private: 0027 virtual DecryptVerifyOperation operation() const = 0; 0028 virtual Mode mode() const 0029 { 0030 return EMail; 0031 } 0032 0033 private: 0034 int doStart() override; 0035 void doCanceled() override; 0036 0037 public: 0038 static const char *staticName() 0039 { 0040 return ""; 0041 } 0042 0043 class Private; 0044 0045 private: 0046 kdtools::pimpl_ptr<Private> d; 0047 }; 0048 0049 class DecryptVerifyCommand : public AssuanCommandMixin<DecryptVerifyCommand, DecryptVerifyCommandEMailBase> 0050 { 0051 public: 0052 private: 0053 DecryptVerifyOperation operation() const override 0054 { 0055 return DecryptVerify; 0056 } 0057 0058 public: 0059 static const char *staticName() 0060 { 0061 return "DECRYPT_VERIFY"; 0062 } 0063 }; 0064 }