File indexing completed on 2024-04-28 12:31:09
0001 /* 0002 SPDX-FileCopyrightText: 2009 Dawit Alemayehu <adawit@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.1-or-later 0005 */ 0006 0007 #ifndef WEBSSLINFO_H 0008 #define WEBSSLINFO_H 0009 0010 #include <QMap> 0011 #include <QUrl> 0012 #include <QHostAddress> 0013 #include <QSslCertificate> 0014 0015 class WebSslInfo 0016 { 0017 public: 0018 WebSslInfo(); 0019 WebSslInfo(const WebSslInfo&); 0020 virtual ~WebSslInfo(); 0021 0022 bool isValid() const; 0023 QUrl url() const; 0024 QHostAddress peerAddress() const; 0025 QHostAddress parentAddress() const; 0026 QString ciphers() const; 0027 QString protocol() const; 0028 QString certificateErrors() const; 0029 int supportedChiperBits () const; 0030 int usedChiperBits () const; 0031 QList<QSslCertificate> certificateChain() const; 0032 0033 bool saveTo(QMap<QString, QVariant>&) const; 0034 void restoreFrom(const QVariant &, const QUrl& = QUrl(), bool reset = false); 0035 0036 void setUrl (const QUrl &url); 0037 WebSslInfo& operator = (const WebSslInfo&); 0038 0039 protected: 0040 void setCiphers(const QString& ciphers); 0041 void setProtocol(const QString& protocol); 0042 void setPeerAddress(const QString& address); 0043 void setParentAddress(const QString& address); 0044 void setCertificateChain(const QByteArray& chain); 0045 void setCertificateErrors(const QString& certErrors); 0046 void setUsedCipherBits(const QString& bits); 0047 void setSupportedCipherBits(const QString& bits); 0048 0049 private: 0050 class WebSslInfoPrivate; 0051 WebSslInfoPrivate* d; 0052 }; 0053 0054 #endif // WEBSSLINFO_H