![]() |
Qt 6.x
The Qt SDK
|
#include <qnetworkreplyimpl_p.h>
Public Types | |
enum | InternalNotifications { NotifyDownstreamReadyWrite } |
![]() | |
enum | State { Idle , Buffering , Working , Finished , Aborted } |
![]() | |
enum | AccessMode : quint8 { Unset , Sequential , RandomAccess } |
![]() | |
typedef void(* | StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **) |
using | ConnectionDataPointer = QExplicitlySharedDataPointer< ConnectionData > |
![]() | |
typedef QPair< QByteArray, QByteArray > | RawHeaderPair |
typedef QList< RawHeaderPair > | RawHeadersList |
typedef QHash< QNetworkRequest::KnownHeaders, QVariant > | CookedHeadersMap |
typedef QHash< QNetworkRequest::Attribute, QVariant > | AttributesMap |
Additional Inherited Members | |
![]() | |
static void | setManager (QNetworkReply *reply, QNetworkAccessManager *manager) |
![]() | |
static bool | removeConnection (Connection *c) |
static QObjectPrivate * | get (QObject *o) |
static const QObjectPrivate * | get (const QObject *o) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot) |
static QMetaObject::Connection | connectImpl (const QObject *sender, int signal_index, const QObject *receiver, void **slot, QtPrivate::QSlotObjectBase *slotObj, int type, const int *types, const QMetaObject *senderMetaObject) |
static QMetaObject::Connection | connect (const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type) |
static QMetaObject::Connection | connect (const QObject *sender, int signal_index, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type) |
static bool | disconnect (const QObject *sender, int signal_index, void **slot) |
static bool | disconnect (const QObject *sender, int signal_index, const QObject *receiver, void **slot) |
![]() | |
static QDateTime | fromHttpDate (const QByteArray &value) |
static QByteArray | toHttpDate (const QDateTime &dt) |
![]() | |
static const int | progressSignalInterval = 100 |
Definition at line 70 of file qnetworkreplyimpl_p.h.
Enumerator | |
---|---|
NotifyDownstreamReadyWrite |
Definition at line 73 of file qnetworkreplyimpl_p.h.
|
inline |
Definition at line 20 of file qnetworkreplyimpl.cpp.
References QNetworkRequest::attribute(), QNetworkRequest::EmitAllUploadProgressSignalsAttribute, request, and QVariant::toBool().
void QNetworkReplyImplPrivate::_q_bufferOutgoingData | ( | ) |
Definition at line 156 of file qnetworkreplyimpl.cpp.
References _q_bufferOutgoingData(), _q_bufferOutgoingDataFinished(), QIODevice::bytesAvailable(), QObject::connect(), forever, outgoingData, outgoingDataBuffer, QIODevice::read(), SIGNAL, and SLOT.
Referenced by _q_bufferOutgoingData(), and _q_bufferOutgoingDataFinished().
void QNetworkReplyImplPrivate::_q_bufferOutgoingDataFinished | ( | ) |
Definition at line 139 of file qnetworkreplyimpl.cpp.
References _q_bufferOutgoingData(), _q_bufferOutgoingDataFinished(), QNetworkReplyPrivate::Buffering, QObject::disconnect(), QMetaObject::invokeMethod(), outgoingData, Qt::QueuedConnection, SIGNAL, SLOT, and state.
Referenced by _q_bufferOutgoingData(), and _q_bufferOutgoingDataFinished().
void QNetworkReplyImplPrivate::_q_copyReadChannelFinished | ( | ) |
Definition at line 134 of file qnetworkreplyimpl.cpp.
References _q_copyReadyRead().
Referenced by appendDownstreamData().
void QNetworkReplyImplPrivate::_q_copyReadyRead | ( | ) |
Definition at line 82 of file qnetworkreplyimpl.cpp.
References QIODevice::atEnd(), QIODevice::bytesAvailable(), bytesDownloaded, QNetworkRequest::ContentLengthHeader, QNetworkHeadersPrivate::cookedHeaders, copyDevice, QNetworkReplyPrivate::downloadProgressSignalChoke, QElapsedTimer::elapsed(), emit, forever, QVariant::isNull(), QIODevice::isOpen(), QIODevice::isSequential(), nextDownstreamBlockSize(), pauseNotificationHandling(), QNetworkReplyPrivate::progressSignalInterval, Q_INT64_C, QIODevice::read(), QElapsedTimer::restart(), resumeNotificationHandling(), state, QVariant::toLongLong(), QHash< Key, T >::value(), and QNetworkReplyPrivate::Working.
Referenced by _q_copyReadChannelFinished(), appendDownstreamData(), and handleNotifications().
void QNetworkReplyImplPrivate::_q_startOperation | ( | ) |
Definition at line 37 of file qnetworkreplyimpl.cpp.
References arg, backend, QNetworkReplyPrivate::downloadProgressSignalChoke, error, QNetworkReplyPrivate::Finished, finished(), QNetworkAccessManager::GetOperation, handleNotifications(), QElapsedTimer::invalidate(), NotifyDownstreamReadyWrite, QNetworkReplyPrivate::operation, pendingNotifications, QNetworkReply::ProtocolUnknownError, qDebug, qWarning, QUrl::scheme(), QNetworkAccessBackend::start(), QElapsedTimer::start(), state, QCoreApplication::translate(), QNetworkReply::UnknownNetworkError, QNetworkReplyPrivate::uploadProgressSignalChoke, QNetworkReplyPrivate::url, and QNetworkReplyPrivate::Working.
Referenced by setup().
void QNetworkReplyImplPrivate::appendDownstreamData | ( | QByteDataBuffer & | data | ) |
Definition at line 450 of file qnetworkreplyimpl.cpp.
References appendDownstreamDataSignalEmissions(), bytesDownloaded, cacheEnabled, cacheSaveDevice, i, initCacheSaveDevice(), item, and QIODevice::write().
Definition at line 501 of file qnetworkreplyimpl.cpp.
References _q_copyReadChannelFinished(), _q_copyReadyRead(), copyDevice, Q_UNLIKELY, qCritical, SIGNAL, and SLOT.
void QNetworkReplyImplPrivate::appendDownstreamDataDownloadBuffer | ( | qint64 | bytesReceived, |
qint64 | bytesTotal | ||
) |
Definition at line 555 of file qnetworkreplyimpl.cpp.
References bytesDownloaded, cacheEnabled, cacheSaveDevice, downloadBuffer, downloadBufferCurrentSize, QNetworkReplyPrivate::downloadProgressSignalChoke, QElapsedTimer::elapsed(), emit, initCacheSaveDevice(), QNetworkReplyPrivate::progressSignalInterval, QElapsedTimer::restart(), and QIODevice::write().
void QNetworkReplyImplPrivate::appendDownstreamDataSignalEmissions | ( | ) |
Definition at line 477 of file qnetworkreplyimpl.cpp.
References backendNotify(), bytesDownloaded, QNetworkRequest::ContentLengthHeader, QNetworkHeadersPrivate::cookedHeaders, QNetworkReplyPrivate::downloadProgressSignalChoke, QElapsedTimer::elapsed(), emit, QVariant::isNull(), nextDownstreamBlockSize(), NotifyDownstreamReadyWrite, pauseNotificationHandling(), QNetworkReplyPrivate::progressSignalInterval, Q_INT64_C, QElapsedTimer::restart(), resumeNotificationHandling(), QVariant::toLongLong(), and QHash< Key, T >::value().
Referenced by appendDownstreamData().
void QNetworkReplyImplPrivate::backendNotify | ( | InternalNotifications | notification | ) |
Definition at line 268 of file qnetworkreplyimpl.cpp.
References it, QEvent::NetworkReplyUpdated, pendingNotifications, and QCoreApplication::postEvent().
Referenced by appendDownstreamDataSignalEmissions().
void QNetworkReplyImplPrivate::completeCacheSave | ( | ) |
Definition at line 366 of file qnetworkreplyimpl.cpp.
References cacheEnabled, cacheSaveDevice, QNetworkReplyPrivate::errorCode, QAbstractNetworkCache::insert(), networkCache(), QNetworkReply::NoError, QAbstractNetworkCache::remove(), and QNetworkReplyPrivate::url.
Referenced by finished().
void QNetworkReplyImplPrivate::createCache | ( | ) |
Definition at line 325 of file qnetworkreplyimpl.cpp.
References QNetworkRequest::attribute(), cacheEnabled, QNetworkRequest::CacheSaveControlAttribute, networkCache(), QNetworkReplyPrivate::request, and QVariant::toBool().
Referenced by setCachingEnabled().
Definition at line 377 of file qnetworkreplyimpl.cpp.
References bytesUploaded, QElapsedTimer::elapsed(), emit, QNetworkReplyPrivate::emitAllUploadProgressSignals, QElapsedTimer::isValid(), pauseNotificationHandling(), QNetworkReplyPrivate::progressSignalInterval, QElapsedTimer::restart(), resumeNotificationHandling(), QElapsedTimer::start(), and QNetworkReplyPrivate::uploadProgressSignalChoke.
void QNetworkReplyImplPrivate::encrypted | ( | ) |
Definition at line 670 of file qnetworkreplyimpl.cpp.
References emit.
void QNetworkReplyImplPrivate::error | ( | QNetworkReply::NetworkError | code, |
const QString & | errorString | ||
) |
Definition at line 625 of file qnetworkreplyimpl.cpp.
References emit, QNetworkReplyPrivate::errorCode, errorMessage(), QNetworkReply::NoError, and qWarning.
void QNetworkReplyImplPrivate::finished | ( | ) |
Definition at line 584 of file qnetworkreplyimpl.cpp.
References QNetworkReplyPrivate::Aborted, bytesDownloaded, bytesUploaded, completeCacheSave(), QNetworkRequest::ContentLengthHeader, QNetworkHeadersPrivate::cookedHeaders, emit, QNetworkReplyPrivate::Finished, QVariant::isNull(), outgoingData, outgoingDataBuffer, pauseNotificationHandling(), pendingNotifications, resumeNotificationHandling(), state, QVariant::toLongLong(), and QHash< Key, T >::value().
Referenced by _q_startOperation().
char * QNetworkReplyImplPrivate::getDownloadBuffer | ( | qint64 | size | ) |
Definition at line 522 of file qnetworkreplyimpl.cpp.
References QNetworkRequest::attribute(), downloadBuffer, QNetworkRequest::DownloadBufferAttribute, downloadBufferCurrentSize, downloadBufferMaximumSize, downloadBufferPointer, QVariant::fromValue(), QVariant::isValid(), QNetworkRequest::MaximumDownloadBufferSizeAttribute, QNetworkReplyPrivate::request, and QVariant::toLongLong().
void QNetworkReplyImplPrivate::handleNotifications | ( | ) |
Definition at line 279 of file qnetworkreplyimpl.cpp.
References _q_copyReadyRead(), backend, QNetworkAccessBackend::bytesAvailable(), copyDevice, notificationHandlingPaused, NotifyDownstreamReadyWrite, pendingNotifications, readFromBackend(), state, QNetworkAccessBackend::wantToRead(), and QNetworkReplyPrivate::Working.
Referenced by _q_startOperation().
void QNetworkReplyImplPrivate::initCacheSaveDevice | ( | ) |
Definition at line 409 of file qnetworkreplyimpl.cpp.
References QNetworkCacheMetaData::attributes(), QNetworkHeadersPrivate::attributes, cacheEnabled, cacheSaveDevice, className, QNetworkRequest::HttpStatusCodeAttribute, QHash< Key, T >::insert(), QIODevice::isOpen(), QVariant::isValid(), QObjectData::metaObject, networkCache(), QAbstractNetworkCache::prepare(), Q_UNLIKELY, qCritical, QNetworkRequest::RedirectionTargetAttribute, QAbstractNetworkCache::remove(), QNetworkCacheMetaData::setAttributes(), QNetworkCacheMetaData::setUrl(), and QNetworkReplyPrivate::url.
Referenced by appendDownstreamData(), and appendDownstreamDataDownloadBuffer().
bool QNetworkReplyImplPrivate::isCachingEnabled | ( | ) | const |
Definition at line 334 of file qnetworkreplyimpl.cpp.
References cacheEnabled, and networkCache().
void QNetworkReplyImplPrivate::metaDataChanged | ( | ) |
Definition at line 643 of file qnetworkreplyimpl.cpp.
References QNetworkRequest::attribute(), QNetworkRequest::Automatic, QHash< Key, T >::cend(), QHash< Key, T >::constFind(), QNetworkHeadersPrivate::cookedHeaders, QNetworkAccessManager::cookieJar(), QNetworkRequest::CookieSaveControlAttribute, emit, QPointer< T >::isNull(), it, QNetworkReplyPrivate::manager, QNetworkReplyPrivate::request, QNetworkRequest::SetCookieHeader, QNetworkCookieJar::setCookiesFromUrl(), QVariant::toInt(), and QNetworkReplyPrivate::url.
QAbstractNetworkCache * QNetworkReplyImplPrivate::networkCache | ( | ) | const |
Definition at line 318 of file qnetworkreplyimpl.cpp.
References backend, and QNetworkAccessBackend::networkCache().
Referenced by completeCacheSave(), createCache(), initCacheSaveDevice(), isCachingEnabled(), and setCachingEnabled().
qint64 QNetworkReplyImplPrivate::nextDownstreamBlockSize | ( | ) | const |
Definition at line 400 of file qnetworkreplyimpl.cpp.
References QNetworkReplyPrivate::readBufferMaxSize.
Referenced by _q_copyReadyRead(), appendDownstreamDataSignalEmissions(), and readFromBackend().
void QNetworkReplyImplPrivate::pauseNotificationHandling | ( | ) |
Definition at line 304 of file qnetworkreplyimpl.cpp.
References notificationHandlingPaused.
Referenced by _q_copyReadyRead(), appendDownstreamDataSignalEmissions(), emitUploadProgress(), and finished().
void QNetworkReplyImplPrivate::readFromBackend | ( | ) |
Definition at line 688 of file qnetworkreplyimpl.cpp.
References backend, QNetworkAccessBackend::bytesAvailable(), emit, QNetworkAccessBackend::ioFeatures(), nextDownstreamBlockSize(), Q_ASSERT, qMin(), QNetworkAccessBackend::read(), QNetworkReplyPrivate::readBufferMaxSize, and QNetworkAccessBackend::ZeroCopy.
Referenced by handleNotifications().
Definition at line 665 of file qnetworkreplyimpl.cpp.
References QNetworkHeadersPrivate::attributes, QHash< Key, T >::insert(), and QNetworkRequest::RedirectionTargetAttribute.
void QNetworkReplyImplPrivate::resumeNotificationHandling | ( | ) |
Definition at line 310 of file qnetworkreplyimpl.cpp.
References QEvent::NetworkReplyUpdated, notificationHandlingPaused, pendingNotifications, and QCoreApplication::postEvent().
Referenced by _q_copyReadyRead(), appendDownstreamDataSignalEmissions(), emitUploadProgress(), and finished().
void QNetworkReplyImplPrivate::setCachingEnabled | ( | bool | enable | ) |
Definition at line 339 of file qnetworkreplyimpl.cpp.
References backend, bytesDownloaded, cacheEnabled, cacheSaveDevice, createCache(), networkCache(), Q_UNLIKELY, qCritical, qDebug, QAbstractNetworkCache::remove(), and QNetworkReplyPrivate::url.
void QNetworkReplyImplPrivate::setDownloadBuffer | ( | QSharedPointer< char > | sp, |
qint64 | size | ||
) |
Definition at line 543 of file qnetworkreplyimpl.cpp.
References QSharedPointer< T >::data(), downloadBuffer, QNetworkRequest::DownloadBufferAttribute, downloadBufferCurrentSize, downloadBufferMaximumSize, downloadBufferPointer, QVariant::fromValue(), and sp.
void QNetworkReplyImplPrivate::setup | ( | QNetworkAccessManager::Operation | op, |
const QNetworkRequest & | request, | ||
QIODevice * | outgoingData | ||
) |
Definition at line 199 of file qnetworkreplyimpl.cpp.
References _q_startOperation(), QNetworkRequest::attribute(), backend, QNetworkReplyPrivate::Buffering, QNetworkRequest::ContentLengthHeader, QNetworkRequest::DoNotBufferUploadDataAttribute, QNetworkRequest::header(), QMetaObject::invokeMethod(), QIODevice::isSequential(), QVariant::isValid(), QNetworkAccessBackend::needsResetableUploadData(), QNetworkReplyPrivate::operation, QNetworkReplyPrivate::originalRequest, outgoingData, outgoingDataBuffer, Qt::QueuedConnection, QIODevice::readAll(), QIODeviceBase::ReadOnly, QNetworkReplyPrivate::request, state, QNetworkRequest::SynchronousRequestAttribute, QVariant::toBool(), QNetworkReplyPrivate::url, and QNetworkRequest::url().
Definition at line 678 of file qnetworkreplyimpl.cpp.
QNetworkAccessBackend* QNetworkReplyImplPrivate::backend |
Definition at line 120 of file qnetworkreplyimpl_p.h.
Referenced by _q_startOperation(), handleNotifications(), networkCache(), readFromBackend(), setCachingEnabled(), and setup().
qint64 QNetworkReplyImplPrivate::bytesDownloaded |
Definition at line 138 of file qnetworkreplyimpl_p.h.
Referenced by _q_copyReadyRead(), appendDownstreamData(), appendDownstreamDataDownloadBuffer(), appendDownstreamDataSignalEmissions(), finished(), and setCachingEnabled().
qint64 QNetworkReplyImplPrivate::bytesUploaded |
Definition at line 139 of file qnetworkreplyimpl_p.h.
Referenced by emitUploadProgress(), and finished().
bool QNetworkReplyImplPrivate::cacheEnabled |
Definition at line 126 of file qnetworkreplyimpl_p.h.
Referenced by appendDownstreamData(), appendDownstreamDataDownloadBuffer(), completeCacheSave(), createCache(), initCacheSaveDevice(), isCachingEnabled(), and setCachingEnabled().
QIODevice* QNetworkReplyImplPrivate::cacheSaveDevice |
Definition at line 127 of file qnetworkreplyimpl_p.h.
Referenced by appendDownstreamData(), appendDownstreamDataDownloadBuffer(), completeCacheSave(), initCacheSaveDevice(), and setCachingEnabled().
QIODevice* QNetworkReplyImplPrivate::copyDevice |
Definition at line 123 of file qnetworkreplyimpl_p.h.
Referenced by _q_copyReadyRead(), appendDownstreamData(), and handleNotifications().
char* QNetworkReplyImplPrivate::downloadBuffer |
Definition at line 152 of file qnetworkreplyimpl_p.h.
Referenced by appendDownstreamDataDownloadBuffer(), getDownloadBuffer(), and setDownloadBuffer().
qint64 QNetworkReplyImplPrivate::downloadBufferCurrentSize |
Definition at line 149 of file qnetworkreplyimpl_p.h.
Referenced by appendDownstreamDataDownloadBuffer(), getDownloadBuffer(), and setDownloadBuffer().
qint64 QNetworkReplyImplPrivate::downloadBufferMaximumSize |
Definition at line 150 of file qnetworkreplyimpl_p.h.
Referenced by getDownloadBuffer(), and setDownloadBuffer().
QSharedPointer<char> QNetworkReplyImplPrivate::downloadBufferPointer |
Definition at line 151 of file qnetworkreplyimpl_p.h.
Referenced by getDownloadBuffer(), and setDownloadBuffer().
qint64 QNetworkReplyImplPrivate::downloadBufferReadPosition |
Definition at line 148 of file qnetworkreplyimpl_p.h.
QString QNetworkReplyImplPrivate::httpReasonPhrase |
Definition at line 141 of file qnetworkreplyimpl_p.h.
int QNetworkReplyImplPrivate::httpStatusCode |
Definition at line 142 of file qnetworkreplyimpl_p.h.
QNetworkProxy QNetworkReplyImplPrivate::lastProxyAuthentication |
Definition at line 134 of file qnetworkreplyimpl_p.h.
bool QNetworkReplyImplPrivate::notificationHandlingPaused |
Definition at line 130 of file qnetworkreplyimpl_p.h.
Referenced by handleNotifications(), pauseNotificationHandling(), and resumeNotificationHandling().
QIODevice* QNetworkReplyImplPrivate::outgoingData |
Definition at line 121 of file qnetworkreplyimpl_p.h.
Referenced by _q_bufferOutgoingData(), _q_bufferOutgoingDataFinished(), finished(), and setup().
std::shared_ptr<QRingBuffer> QNetworkReplyImplPrivate::outgoingDataBuffer |
Definition at line 122 of file qnetworkreplyimpl_p.h.
Referenced by _q_bufferOutgoingData(), finished(), and setup().
std::vector<InternalNotifications> QNetworkReplyImplPrivate::pendingNotifications |
Definition at line 129 of file qnetworkreplyimpl_p.h.
Referenced by _q_startOperation(), backendNotify(), finished(), handleNotifications(), and resumeNotificationHandling().
QList<QNetworkProxy> QNetworkReplyImplPrivate::proxyList |
Definition at line 135 of file qnetworkreplyimpl_p.h.
State QNetworkReplyImplPrivate::state |
Definition at line 144 of file qnetworkreplyimpl_p.h.
Referenced by _q_bufferOutgoingDataFinished(), _q_copyReadyRead(), _q_startOperation(), finished(), handleNotifications(), and setup().
QUrl QNetworkReplyImplPrivate::urlForLastAuthentication |
Definition at line 132 of file qnetworkreplyimpl_p.h.