7#include <QtNetwork/qtnetworkglobal.h>
8#include <QtCore/qlist.h>
9#include <QtCore/qscopedpointer.h>
10#include <QtNetwork/qhostaddress.h>
28 explicit QHostInfo(
int lookupId = -1);
29 QHostInfo(
const QHostInfo &d);
30 QHostInfo(QHostInfo &&other)
noexcept : d_ptr(std::exchange(other.d_ptr,
nullptr)) {}
31 QHostInfo &operator=(
const QHostInfo &d);
32 QHostInfo &operator=(QHostInfo &&other)
noexcept { swap(other);
return *
this; }
35 void swap(QHostInfo &other)
noexcept { qt_ptr_swap(d_ptr, other.d_ptr); }
37 QString hostName()
const;
38 void setHostName(
const QString &name);
40 QList<QHostAddress> addresses()
const;
41 void setAddresses(
const QList<QHostAddress> &addresses);
43 HostInfoError error()
const;
44 void setError(HostInfoError error);
46 QString errorString()
const;
47 void setErrorString(
const QString &errorString);
49 void setLookupId(
int id);
52#if QT_NETWORK_REMOVED_SINCE(6
, 7
)
53 static int lookupHost(
const QString &name, QObject *receiver,
const char *member);
55 static int lookupHost(
const QString &name,
const QObject *receiver,
const char *member);
56 static void abortHostLookup(
int lookupId);
58 static QHostInfo fromName(
const QString &name);
59 static QString localHostName();
60 static QString localDomainName();
63 template<
typename Functor>
64 static int lookupHost(
const QString &name,
const QObject *context, Functor functor);
67 template <
typename Functor>
68 static inline int lookupHost(
const QString &name,
69 const typename QtPrivate::ContextTypeForFunctor<Functor>::ContextType *receiver,
72 using Prototype =
void(*)(QHostInfo);
73 QtPrivate::AssertCompatibleFunctions<Prototype, Functor>();
74 return lookupHostImpl(name, receiver,
75 QtPrivate::makeCallableObject<Prototype>(std::forward<Functor>(func)),
80#ifndef QT_NO_CONTEXTLESS_CONNECT
82 template <
typename Functor>
83 static inline int lookupHost(
const QString &name, Functor &&slot)
85 return lookupHost(name,
nullptr, std::forward<Functor>(slot));
90 QHostInfoPrivate *d_ptr;
91 Q_DECLARE_PRIVATE(QHostInfo)
93 static int lookupHostImpl(
const QString &name,
94 const QObject *receiver,
95 QtPrivate::QSlotObjectBase *slotObj,
98 friend QHostInfo Q_NETWORK_EXPORT qt_qhostinfo_lookup(
const QString &name, QObject *receiver,
99 const char *member,
bool *valid,
int *id);
106QT_DECL_METATYPE_EXTERN(QHostInfo, Q_NETWORK_EXPORT)
The QHostInfo class provides static functions for host name lookups.
QNetworkReplyImplPrivate * m_reply
QNetworkAccessBackend::SecurityFeatures m_securityFeatures
QNetworkAccessBackend::IOFeatures m_ioFeatures
QNetworkAccessManagerPrivate * m_manager
QIODevice * wrappedUploadByteDevice
std::shared_ptr< QNonContiguousByteDevice > uploadByteDevice
QNetworkAccessBackend::TargetTypes m_targetTypes
QStringList backendSupportedSchemes() const
QNetworkAccessBackend * findBackend(QNetworkAccessManager::Operation op, const QNetworkRequest &request)
void handleNotifications()
void resumeNotificationHandling()
QNetworkProxy lastProxyAuthentication
qint64 downloadBufferReadPosition
void _q_bufferOutgoingDataFinished()
qint64 downloadBufferMaximumSize
@ NotifyDownstreamReadyWrite
QNetworkReplyImplPrivate()
std::vector< InternalNotifications > pendingNotifications
qint64 nextDownstreamBlockSize() const
void setDownloadBuffer(QSharedPointer< char > sp, qint64 size)
void error(QNetworkReply::NetworkError code, const QString &errorString)
void appendDownstreamDataDownloadBuffer(qint64, qint64)
QSharedPointer< char > downloadBufferPointer
QNetworkAccessBackend * backend
void _q_bufferOutgoingData()
void appendDownstreamData(QIODevice *data)
bool notificationHandlingPaused
QUrl urlForLastAuthentication
void setup(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice *outgoingData)
void emitUploadProgress(qint64 bytesSent, qint64 bytesTotal)
qint64 downloadBufferCurrentSize
void backendNotify(InternalNotifications notification)
void appendDownstreamDataSignalEmissions()
std::shared_ptr< QRingBuffer > outgoingDataBuffer
void initCacheSaveDevice()
QAbstractNetworkCache * networkCache() const
void appendDownstreamData(QByteDataBuffer &data)
char * getDownloadBuffer(qint64 size)
void _q_copyReadChannelFinished()
bool isCachingEnabled() const
void consume(qint64 count)
void sslErrors(const QList< QSslError > &errors)
QList< QNetworkProxy > proxyList
void pauseNotificationHandling()
QIODevice * cacheSaveDevice
void redirectionRequested(const QUrl &target)
void setCachingEnabled(bool enable)
virtual qint64 bytesAvailable() const override
Returns the number of bytes available for reading with QIODevice::read().
virtual qint64 readData(char *data, qint64 maxlen) override
virtual void ignoreSslErrorsImplementation(const QList< QSslError > &errors) override
virtual void setReadBufferSize(qint64 size) override
Sets the size of the read buffer to be size bytes.
virtual void close() override
Closes this device for reading.
virtual void abort() override
Aborts the operation immediately and close down any network connections still open.
virtual bool event(QEvent *) override
void void void void _q_bufferOutgoingDataFinished()) protected void setSslConfigurationImplementation(const QSslConfiguration &configuration) override
virtual void ignoreSslErrors() override
If this function is called, SSL errors related to network connection will be ignored,...
The QNetworkReply class contains the data and headers for a request sent with QNetworkAccessManager.
The QSslPreSharedKeyAuthenticator class provides authentication data for pre shared keys (PSK) cipher...
Combined button and popup list for selecting options.
Q_DECLARE_TYPEINFO(QNetworkReplyImplPrivate::InternalNotifications, Q_PRIMITIVE_TYPE)