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

0001 /* -*- mode: c++; c-basic-offset:4 -*-
0002     uiserver/decryptverifycommandfilesbase.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 DecryptVerifyCommandFilesBase : public AssuanCommandMixin<DecryptVerifyCommandFilesBase>
0021 {
0022 public:
0023     enum Flags {
0024         DecryptOff = 0x0,
0025         DecryptOn = 0x1,
0026         DecryptImplied = 0x2,
0027 
0028         DecryptMask = 0x3,
0029 
0030         VerifyOff = 0x00,
0031         // VerifyOn  = 0x10, // non-sensical
0032         VerifyImplied = 0x20,
0033 
0034         VerifyMask = 0x30
0035     };
0036 
0037     explicit DecryptVerifyCommandFilesBase();
0038     ~DecryptVerifyCommandFilesBase() override;
0039 
0040 private:
0041     virtual DecryptVerifyOperation operation() const = 0;
0042 
0043 private:
0044     int doStart() override;
0045     void doCanceled() override;
0046 
0047 public:
0048     // ### FIXME fix this
0049     static const char *staticName()
0050     {
0051         return "";
0052     }
0053 
0054     class Private;
0055 
0056 private:
0057     kdtools::pimpl_ptr<Private> d;
0058 };
0059 }