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
15using namespace Kleo;
16
17class ExpiryCheckerSettings::Private
18{
19public:
20 Kleo::chrono::days ownKeyThreshold;
21 Kleo::chrono::days otherKeyThreshold;
22 Kleo::chrono::days rootCertThreshold;
23 Kleo::chrono::days chainCertThreshold;
24};
25
26ExpiryCheckerSettings::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
34ExpiryCheckerSettings::~ExpiryCheckerSettings() = default;
35
36ExpiryCheckerSettings::ExpiryCheckerSettings(const ExpiryCheckerSettings &other)
37 : d{new Private{*other.d}}
38{
39}
40
41ExpiryCheckerSettings &ExpiryCheckerSettings::operator=(const ExpiryCheckerSettings &other)
42{
43 *d = *other.d;
44 return *this;
45}
46
47ExpiryCheckerSettings::ExpiryCheckerSettings(ExpiryCheckerSettings &&other) = default;
48
49ExpiryCheckerSettings &ExpiryCheckerSettings::operator=(ExpiryCheckerSettings &&other) = default;
50
51void ExpiryCheckerSettings::setOwnKeyThreshold(Kleo::chrono::days threshold)
52{
53 d->ownKeyThreshold = threshold;
54}
55
56Kleo::chrono::days ExpiryCheckerSettings::ownKeyThreshold() const
57{
58 return d->ownKeyThreshold;
59}
60
61void ExpiryCheckerSettings::setOtherKeyThreshold(Kleo::chrono::days threshold)
62{
63 d->otherKeyThreshold = threshold;
64}
65
66Kleo::chrono::days ExpiryCheckerSettings::otherKeyThreshold() const
67{
68 return d->otherKeyThreshold;
69}
70
71void ExpiryCheckerSettings::setRootCertThreshold(Kleo::chrono::days threshold)
72{
73 d->rootCertThreshold = threshold;
74}
75
76Kleo::chrono::days ExpiryCheckerSettings::rootCertThreshold() const
77{
78 return d->rootCertThreshold;
79}
80
81void ExpiryCheckerSettings::setChainCertThreshold(Kleo::chrono::days threshold)
82{
83 d->chainCertThreshold = threshold;
84}
85
86Kleo::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 Mon Nov 4 2024 16:29:01 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.