19#include <QtNetwork/private/qtnetworkglobal_p.h>
20#include "QtCore/qmutex.h"
21#include "QtCore/qrunnable.h"
23#include "QtCore/qthreadpool.h"
25#include "QtNetwork/qdnslookup.h"
26#include "QtNetwork/qhostaddress.h"
27#include "private/qobject_p.h"
28#include "private/qurl_p.h"
64 std::optional<QSslConfiguration> sslConfiguration;
92 errorString = QDnsLookup::tr(
"Server could not process query");
101 errorString = QDnsLookup::tr(
"Non existent domain");
105 errorString = QDnsLookup::tr(
"Server refused to answer");
109 errorString = QDnsLookup::tr(
"Invalid reply received (rcode %1)")
118 msg = QDnsLookup::tr(
"Invalid reply received");
120 msg = QDnsLookup::tr(
"Invalid reply received (%1)").arg(std::move(msg));
126 bool allAreEmpty()
const
157 emit q_func()->nameserverChanged(nameserver);
172 emit q_func()->nameserverPortChanged(
port);
180 emit q_func()->nameserverProtocolChanged(protocol);
191 std::optional<QSslConfiguration> sslConfiguration;
209 using ReplyBuffer = QVarLengthArray<unsigned char, ReplyBufferSize>;
219 template <
typename T>
static QString decodeLabel(T encodedLabel)
232 std::optional<QSslConfiguration> sslConfiguration;
QDnsDomainNameRecordPrivate()
QDnsHostAddressRecordPrivate()
Q_OBJECT_BINDABLE_PROPERTY(QDnsLookupPrivate, QHostAddress, nameserver, &QDnsLookupPrivate::nameserverChanged)
Q_OBJECT_BINDABLE_PROPERTY(QDnsLookupPrivate, QString, name, &QDnsLookupPrivate::nameChanged)
Q_OBJECT_BINDABLE_PROPERTY(QDnsLookupPrivate, quint16, port, &QDnsLookupPrivate::nameserverPortChanged)
QDnsLookupRunnable * runnable
void nameserverProtocolChanged()
void nameserverPortChanged()
Q_OBJECT_BINDABLE_PROPERTY(QDnsLookupPrivate, QDnsLookup::Protocol, protocol, &QDnsLookupPrivate::nameserverProtocolChanged)
Q_OBJECT_BINDABLE_PROPERTY(QDnsLookupPrivate, QDnsLookup::Type, type, &QDnsLookupPrivate::typeChanged)
void setError(QDnsLookup::Error err, QString &&msg)
QList< QDnsMailExchangeRecord > mailExchangeRecords
void makeDnsRcodeError(quint8 rcode)
QList< QDnsServiceRecord > serviceRecords
void makeInvalidReplyError(QString &&msg=QString())
QList< QDnsDomainNameRecord > canonicalNameRecords
QList< QDnsDomainNameRecord > nameServerRecords
QList< QDnsDomainNameRecord > pointerRecords
QList< QDnsHostAddressRecord > hostAddressRecords
void makeResolverSystemError(int code=-1)
QList< QDnsTlsAssociationRecord > tlsAssociationRecords
QList< QDnsTextRecord > textRecords
void finished(const QDnsLookupReply &reply)
QDnsLookupRunnable(const QDnsLookupPrivate *d)
void run() override
Implement this pure virtual function in your subclass.
static constexpr qsizetype ReplyBufferSize
bool sendDnsOverTls(QDnsLookupReply *reply, QSpan< unsigned char > query, ReplyBuffer &response)
friend QDebug operator<<(QDebug &, QDnsLookupRunnable *)
The QDnsLookup class represents a DNS lookup.
Type
Indicates the type of DNS lookup that was performed.
Error
Indicates all possible error conditions found during the processing of the DNS lookup.
Protocol
Indicates the type of DNS server that is being queried.
QDnsMailExchangeRecordPrivate()
QDnsServiceRecordPrivate()
QList< QByteArray > values
QDnsTlsAssociationRecord::CertificateUsage usage
QDnsTlsAssociationRecord::MatchingType matchType
QDnsTlsAssociationRecord::Selector selector
CertificateUsage
This enumeration contains valid values for the certificate usage field of TLS Association queries.
Selector
This enumeration contains valid values for the selector field of TLS Association queries.
MatchingType
This enumeration contains valid values for the matching type field of TLS Association queries.
The QHostAddress class provides an IP address.
bool isEmpty() const noexcept
\macro QT_RESTRICTED_CAST_FROM_ASCII
QString arg(qlonglong a, int fieldwidth=0, int base=10, QChar fillChar=u' ') const
Combined button and popup list for selecting options.
constexpr quint16 DnsPort
constexpr quint16 DnsOverTlsPort
QT_BEGIN_NAMESPACE constexpr qsizetype MaxDomainNameLength
QDebug operator<<(QDebug &, QDnsLookupRunnable *)
typedef QByteArray(EGLAPIENTRYP PFNQGSGETDISPLAYSPROC)()
Q_DECL_COLD_FUNCTION Q_CORE_EXPORT QString qt_error_string(int errorCode=-1)
GLuint GLuint GLfloat weight
#define QT_REQUIRE_CONFIG(feature)
QString Q_CORE_EXPORT qt_ACE_do(const QString &domain, AceOperation op, AceLeadingDot dot, QUrl::AceProcessingOptions options={})