File indexing completed on 2024-06-09 05:17:17

0001 /*
0002     kleo/expirycheckersettings.h
0003 
0004     This file is part of libkleopatra, the KDE keymanagement library
0005     SPDX-FileCopyrightText: 2023 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 "kleo_export.h"
0014 
0015 #include <Libkleo/Chrono>
0016 
0017 #include <memory>
0018 
0019 namespace Kleo
0020 {
0021 
0022 class KLEO_EXPORT ExpiryCheckerSettings
0023 {
0024 public:
0025     ExpiryCheckerSettings(Kleo::chrono::days ownKeyThreshold,
0026                           Kleo::chrono::days otherKeyThreshold,
0027                           Kleo::chrono::days rootCertThreshold,
0028                           Kleo::chrono::days chainCertThreshold);
0029     ~ExpiryCheckerSettings();
0030 
0031     ExpiryCheckerSettings(const ExpiryCheckerSettings &other);
0032     ExpiryCheckerSettings &operator=(const ExpiryCheckerSettings &other);
0033 
0034     ExpiryCheckerSettings(ExpiryCheckerSettings &&other);
0035     ExpiryCheckerSettings &operator=(ExpiryCheckerSettings &&other);
0036 
0037     void setOwnKeyThreshold(Kleo::chrono::days threshold);
0038     [[nodiscard]] Kleo::chrono::days ownKeyThreshold() const;
0039 
0040     void setOtherKeyThreshold(Kleo::chrono::days threshold);
0041     [[nodiscard]] Kleo::chrono::days otherKeyThreshold() const;
0042 
0043     void setRootCertThreshold(Kleo::chrono::days threshold);
0044     [[nodiscard]] Kleo::chrono::days rootCertThreshold() const;
0045 
0046     void setChainCertThreshold(Kleo::chrono::days threshold);
0047     [[nodiscard]] Kleo::chrono::days chainCertThreshold() const;
0048 
0049 private:
0050     class Private;
0051     std::unique_ptr<Private> d;
0052 };
0053 
0054 }