File indexing completed on 2024-04-14 03:52:59
0001 /* 0002 This file is part of the KDE libraries 0003 SPDX-FileCopyrightText: 2007 Thiago Macieira <thiago@kde.org> 0004 SPDX-FileCopyrightText: 2007 Andreas Hartmetz <ahartmetz@gmail.com> 0005 0006 SPDX-License-Identifier: LGPL-2.0-or-later 0007 */ 0008 0009 #ifndef KSSLERRORUIDATA_H 0010 #define KSSLERRORUIDATA_H 0011 0012 #include <kiocore_export.h> 0013 0014 #include <memory> 0015 0016 template<typename T> 0017 class QList; 0018 class QNetworkReply; 0019 class QSslError; 0020 class QSslSocket; 0021 0022 /** 0023 * This class can hold all the necessary data from a QSslSocket or QNetworkReply to ask the user 0024 * to continue connecting in the face of SSL errors. 0025 * It can be used to carry the data for the UI over time or over thread boundaries. 0026 * 0027 * @see: KSslCertificateManager::askIgnoreSslErrors() 0028 */ 0029 class KIOCORE_EXPORT KSslErrorUiData 0030 { 0031 public: 0032 /** 0033 * Default construct an instance with no useful data. 0034 */ 0035 KSslErrorUiData(); 0036 /** 0037 * Create an instance and initialize it with SSL error data from @p socket. 0038 */ 0039 KSslErrorUiData(const QSslSocket *socket); 0040 /** 0041 * Create an instance and initialize it with SSL error data from @p reply. 0042 * @since 5.62 0043 */ 0044 KSslErrorUiData(const QNetworkReply *reply, const QList<QSslError> &sslErrors); 0045 0046 KSslErrorUiData(const KSslErrorUiData &other); 0047 KSslErrorUiData &operator=(const KSslErrorUiData &); 0048 /** 0049 * Destructor 0050 */ 0051 ~KSslErrorUiData(); 0052 0053 class Private; 0054 0055 private: 0056 friend class Private; 0057 std::unique_ptr<Private> const d; 0058 }; 0059 0060 #endif // KSSLERRORUIDATA_H