11#include <config-libkleo.h>
13#include "expirycheckersettings.h"
17class ExpiryCheckerSettings::Private
20 Kleo::chrono::days ownKeyThreshold;
21 Kleo::chrono::days otherKeyThreshold;
22 Kleo::chrono::days rootCertThreshold;
23 Kleo::chrono::days chainCertThreshold;
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}}
34ExpiryCheckerSettings::~ExpiryCheckerSettings() =
default;
36ExpiryCheckerSettings::ExpiryCheckerSettings(
const ExpiryCheckerSettings &other)
37 : d{new Private{*other.d}}
41ExpiryCheckerSettings &ExpiryCheckerSettings::operator=(
const ExpiryCheckerSettings &other)
47ExpiryCheckerSettings::ExpiryCheckerSettings(ExpiryCheckerSettings &&other) =
default;
49ExpiryCheckerSettings &ExpiryCheckerSettings::operator=(ExpiryCheckerSettings &&other) =
default;
51void ExpiryCheckerSettings::setOwnKeyThreshold(Kleo::chrono::days threshold)
53 d->ownKeyThreshold = threshold;
56Kleo::chrono::days ExpiryCheckerSettings::ownKeyThreshold()
const
58 return d->ownKeyThreshold;
61void ExpiryCheckerSettings::setOtherKeyThreshold(Kleo::chrono::days threshold)
63 d->otherKeyThreshold = threshold;
66Kleo::chrono::days ExpiryCheckerSettings::otherKeyThreshold()
const
68 return d->otherKeyThreshold;
71void ExpiryCheckerSettings::setRootCertThreshold(Kleo::chrono::days threshold)
73 d->rootCertThreshold = threshold;
76Kleo::chrono::days ExpiryCheckerSettings::rootCertThreshold()
const
78 return d->rootCertThreshold;
81void ExpiryCheckerSettings::setChainCertThreshold(Kleo::chrono::days threshold)
83 d->chainCertThreshold = threshold;
86Kleo::chrono::days ExpiryCheckerSettings::chainCertThreshold()
const
88 return d->chainCertThreshold;