File indexing completed on 2024-07-21 03:41:34

0001 /*
0002     This file is part of the KDE libraries
0003     SPDX-FileCopyrightText: 2007, 2008, 2010 Andreas Hartmetz <ahartmetz@gmail.com>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-or-later
0006 */
0007 
0008 #ifndef KSSLD_H
0009 #define KSSLD_H
0010 
0011 #include <KDEDModule>
0012 #include <QList>
0013 #include <QVariant>
0014 #include <memory>
0015 class QString;
0016 class QSslCertificate;
0017 
0018 class KSslCertificateRule;
0019 
0020 class KSSLDPrivate;
0021 class KSSLD : public KDEDModule
0022 {
0023     Q_OBJECT
0024 public:
0025     KSSLD(QObject *parent, const QVariantList &);
0026     ~KSSLD() override;
0027 
0028     void setRule(const KSslCertificateRule &rule);
0029     void clearRule(const KSslCertificateRule &rule);
0030     void clearRule(const QSslCertificate &cert, const QString &hostName);
0031     void pruneExpiredRules();
0032     KSslCertificateRule rule(const QSslCertificate &cert, const QString &hostName) const;
0033 
0034 private:
0035     // AFAICS we don't need the d-pointer technique here but it makes the code look
0036     // more like the rest of kdelibs and it can be reused anywhere in kdelibs.
0037     std::unique_ptr<KSSLDPrivate> const d;
0038 };
0039 
0040 #endif // KSSLD_H