Libkleo

expirycheckersettings.cpp
1 /*
2  kleo/expirycheckersettings.cpp
3 
4  This file is part of libkleopatra, the KDE keymanagement library
5  SPDX-FileCopyrightText: 2023 g10 Code GmbH
6  SPDX-FileContributor: Ingo Klöcker <dev@ingo-kloecker.de>
7 
8  SPDX-License-Identifier: GPL-2.0-or-later
9 */
10 
11 #include <config-libkleo.h>
12 
13 #include "expirycheckersettings.h"
14 
15 using namespace Kleo;
16 
17 class ExpiryCheckerSettings::Private
18 {
19 public:
20  Kleo::chrono::days ownKeyThreshold;
21  Kleo::chrono::days otherKeyThreshold;
22  Kleo::chrono::days rootCertThreshold;
23  Kleo::chrono::days chainCertThreshold;
24 };
25 
26 ExpiryCheckerSettings::ExpiryCheckerSettings(Kleo::chrono::days ownKeyThreshold,
27  Kleo::chrono::days otherKeyThreshold,
28  Kleo::chrono::days rootCertThreshold,
29  Kleo::chrono::days chainCertThreshold)
30  : d{new Private{ownKeyThreshold, otherKeyThreshold, rootCertThreshold, chainCertThreshold}}
31 {
32 }
33 
34 ExpiryCheckerSettings::~ExpiryCheckerSettings() = default;
35 
36 ExpiryCheckerSettings::ExpiryCheckerSettings(const ExpiryCheckerSettings &other)
37  : d{new Private{*other.d}}
38 {
39 }
40 
41 ExpiryCheckerSettings &ExpiryCheckerSettings::operator=(const ExpiryCheckerSettings &other)
42 {
43  *d = *other.d;
44  return *this;
45 }
46 
47 ExpiryCheckerSettings::ExpiryCheckerSettings(ExpiryCheckerSettings &&other) = default;
48 
49 ExpiryCheckerSettings &ExpiryCheckerSettings::operator=(ExpiryCheckerSettings &&other) = default;
50 
51 void ExpiryCheckerSettings::setOwnKeyThreshold(Kleo::chrono::days threshold)
52 {
53  d->ownKeyThreshold = threshold;
54 }
55 
56 Kleo::chrono::days ExpiryCheckerSettings::ownKeyThreshold() const
57 {
58  return d->ownKeyThreshold;
59 }
60 
61 void ExpiryCheckerSettings::setOtherKeyThreshold(Kleo::chrono::days threshold)
62 {
63  d->otherKeyThreshold = threshold;
64 }
65 
66 Kleo::chrono::days ExpiryCheckerSettings::otherKeyThreshold() const
67 {
68  return d->otherKeyThreshold;
69 }
70 
71 void ExpiryCheckerSettings::setRootCertThreshold(Kleo::chrono::days threshold)
72 {
73  d->rootCertThreshold = threshold;
74 }
75 
76 Kleo::chrono::days ExpiryCheckerSettings::rootCertThreshold() const
77 {
78  return d->rootCertThreshold;
79 }
80 
81 void ExpiryCheckerSettings::setChainCertThreshold(Kleo::chrono::days threshold)
82 {
83  d->chainCertThreshold = threshold;
84 }
85 
86 Kleo::chrono::days ExpiryCheckerSettings::chainCertThreshold() const
87 {
88  return d->chainCertThreshold;
89 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Thu Feb 15 2024 03:56:14 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.