Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QNetworkReplyImplPrivate Class Reference

#include <qnetworkreplyimpl_p.h>

Inheritance diagram for QNetworkReplyImplPrivate:
Collaboration diagram for QNetworkReplyImplPrivate:

Public Types

enum  InternalNotifications { NotifyDownstreamReadyWrite }
Public Types inherited from QNetworkReplyPrivate
enum  State {
  Idle , Buffering , Working , Finished ,
  Aborted
}
Public Types inherited from QIODevicePrivate
enum class  ReadLineOption { NotNullTerminated , NullTerminated }
enum  AccessMode : quint8 { Unset , Sequential , RandomAccess }
Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
using ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData>
Public Types inherited from QNetworkHeadersPrivate
typedef std::pair< QByteArray, QByteArrayRawHeaderPair
typedef QList< RawHeaderPairRawHeadersList
typedef QHash< QNetworkRequest::KnownHeaders, QVariantCookedHeadersMap
typedef QHash< QNetworkRequest::Attribute, QVariantAttributesMap
typedef QList< QNetworkCookieNetworkCookieList

Public Member Functions

 QNetworkReplyImplPrivate ()
void _q_startOperation ()
void _q_copyReadyRead ()
void _q_copyReadChannelFinished ()
void _q_bufferOutgoingData ()
void _q_bufferOutgoingDataFinished ()
void setup (QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice *outgoingData)
void pauseNotificationHandling ()
void resumeNotificationHandling ()
void backendNotify (InternalNotifications notification)
void handleNotifications ()
void createCache ()
void completeCacheSave ()
void setCachingEnabled (bool enable)
bool isCachingEnabled () const
void consume (qint64 count)
void emitUploadProgress (qint64 bytesSent, qint64 bytesTotal)
qint64 nextDownstreamBlockSize () const
void initCacheSaveDevice ()
void appendDownstreamDataSignalEmissions ()
void appendDownstreamData (QByteDataBuffer &data)
void appendDownstreamData (QIODevice *data)
void setDownloadBuffer (QSharedPointer< char > sp, qint64 size)
char * getDownloadBuffer (qint64 size)
void appendDownstreamDataDownloadBuffer (qint64, qint64)
void finished ()
void error (QNetworkReply::NetworkError code, const QString &errorString)
void metaDataChanged ()
void redirectionRequested (const QUrl &target)
void encrypted ()
void sslErrors (const QList< QSslError > &errors)
void readFromBackend ()
QAbstractNetworkCachenetworkCache () const
Public Member Functions inherited from QNetworkReplyPrivate
 QNetworkReplyPrivate ()
Public Member Functions inherited from QIODevicePrivate
 QIODevicePrivate (decltype(QObjectPrivateVersion) version=QObjectPrivateVersion)
virtual ~QIODevicePrivate ()
virtual bool putCharHelper (char c)
bool isSequential () const
bool isBufferEmpty () const
bool allWriteBuffersEmpty () const
void seekBuffer (qint64 newPos)
void setCurrentReadChannel (int channel)
void setCurrentWriteChannel (int channel)
void setReadChannelCount (int count)
void setWriteChannelCount (int count)
qint64 read (char *data, qint64 maxSize, bool peeking=false)
qint64 readLine (char *data, qint64 maxSize, ReadLineOption option=ReadLineOption::NullTerminated)
virtual qint64 peek (char *data, qint64 maxSize)
virtual QByteArray peek (qint64 maxSize)
qint64 skipByReading (qint64 maxSize)
qint64 skipLine ()
void write (const char *data, qint64 size)
bool isWriteChunkCached (const char *data, qint64 size) const
Public Member Functions inherited from QObjectPrivate
void ensureExtraData ()
void setObjectNameWithoutBindings (const QString &name)
 QObjectPrivate (decltype(QObjectPrivateVersion) version=QObjectPrivateVersion)
virtual ~QObjectPrivate ()
void deleteChildren ()
void clearBindingStorage ()
void setParent_helper (QObject *)
void moveToThread_helper ()
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData, QBindingStatus *status)
QObjectList receiverList (const char *signal) const
void ensureConnectionData ()
void addConnection (int signal, Connection *c)
int signalIndex (const char *signalName, const QMetaObject **meta=nullptr) const
bool isSignalConnected (uint signalIdx, bool checkDeclarative=true) const
bool maybeSignalConnected (uint signalIndex) const
bool isDeclarativeSignalConnected (uint signalIdx) const
void connectNotify (const QMetaMethod &signal)
void disconnectNotify (const QMetaMethod &signal)
void reinitBindingStorageAfterThreadMove ()
virtual std::string flagsForDumping () const
virtual void writeToDebugStream (QDebug &) const
QtPrivate::QPropertyAdaptorSlotObjectgetPropertyAdaptorSlotObject (const QMetaProperty &property)
Public Member Functions inherited from QObjectData
 QObjectData ()=default
virtual ~QObjectData ()=0
const QMetaObjectdynamicMetaObject () const
Public Member Functions inherited from QNetworkHeadersPrivate
const RawHeadersListallRawHeaders () const
QList< QByteArrayrawHeadersKeys () const
QByteArray rawHeader (QAnyStringView headerName) const
void setRawHeader (const QByteArray &key, const QByteArray &value)
void setCookedHeader (QNetworkRequest::KnownHeaders header, const QVariant &value)
QHttpHeaders headers () const
void setHeaders (const QHttpHeaders &newHeaders)
void setHeaders (QHttpHeaders &&newHeaders)
void setHeader (QHttpHeaders::WellKnownHeader name, QByteArrayView value)
void clearHeaders ()

Public Attributes

QNetworkAccessBackendbackend
QIODeviceoutgoingData
std::shared_ptr< QRingBufferoutgoingDataBuffer
QIODevicecopyDevice
bool cacheEnabled
QIODevicecacheSaveDevice
std::vector< InternalNotificationspendingNotifications
bool notificationHandlingPaused
QUrl urlForLastAuthentication
QNetworkProxy lastProxyAuthentication
QList< QNetworkProxyproxyList
qint64 bytesDownloaded
qint64 bytesUploaded
QString httpReasonPhrase
int httpStatusCode
State state
qint64 downloadBufferReadPosition
qint64 downloadBufferCurrentSize
qint64 downloadBufferMaximumSize
QSharedPointer< char > downloadBufferPointer
char * downloadBuffer
Public Attributes inherited from QNetworkReplyPrivate
QNetworkRequest request
QNetworkRequest originalRequest
QUrl url
QPointer< QNetworkAccessManagermanager
qint64 readBufferMaxSize
QElapsedTimer downloadProgressSignalChoke
QElapsedTimer uploadProgressSignalChoke
bool emitAllUploadProgressSignals
QNetworkAccessManager::Operation operation
QNetworkReply::NetworkError errorCode
bool isFinished
Public Attributes inherited from QIODevicePrivate
qint64 pos = 0
qint64 devicePos = 0
qint64 transactionPos = 0
QRingBufferRef buffer
QRingBufferRef writeBuffer
const QByteArraycurrentWriteChunk = nullptr
int readChannelCount = 0
int writeChannelCount = 0
int currentReadChannel = 0
int currentWriteChannel = 0
int readBufferChunkSize = QIODEVICE_BUFFERSIZE
int writeBufferChunkSize = 0
QVarLengthArray< QRingBuffer, 2 > readBuffers
QVarLengthArray< QRingBuffer, 1 > writeBuffers
QString errorString
QIODevice::OpenMode openMode = QIODevice::NotOpen
bool transactionStarted = false
bool baseReadLineDataCalled = false
AccessMode accessMode = Unset
Public Attributes inherited from QObjectPrivate
ExtraDataextraData
QAtomicPointer< QThreadDatathreadData
QAtomicPointer< ConnectionDataconnections
union { 
   QObject *   currentChildBeingDeleted 
   QAbstractDeclarativeData *   declarativeData 
}; 
QAtomicPointer< QtSharedPointer::ExternalRefCountDatasharedRefcount
Public Attributes inherited from QObjectData
QObjectq_ptr
QObjectparent
QObjectList children
uint isWidget: 1
uint blockSig: 1
uint wasDeleted: 1
uint isDeletingChildren: 1
uint sendChildEvents: 1
uint receiveChildEvents: 1
uint isWindow: 1
uint deleteLaterCalled: 1
uint isQuickItem: 1
uint willBeWidget: 1
uint wasWidget: 1
uint receiveParentEvents: 1
uint unused: 20
QAtomicInt postedEvents
QDynamicMetaObjectDatametaObject
QBindingStorage bindingStorage
Public Attributes inherited from QNetworkHeadersPrivate
struct { 
   RawHeadersList   headersList 
   bool   isCached = false 
rawHeaderCache
QHttpHeaders httpHeaders
CookedHeadersMap cookedHeaders
AttributesMap attributes
QPointer< QObjectoriginatingObject

Additional Inherited Members

Static Public Member Functions inherited from QNetworkReplyPrivate
static void setManager (QNetworkReply *reply, QNetworkAccessManager *manager)
Static Public Member Functions inherited from QObjectPrivate
static bool removeConnection (Connection *c)
static QObjectPrivateget (QObject *o)
static const QObjectPrivateget (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 Public Member Functions inherited from QNetworkHeadersPrivate
static QDateTime fromHttpDate (QByteArrayView value)
static QByteArray toHttpDate (const QDateTime &dt)
static std::optional< qint64toInt (QByteArrayView value)
static QByteArray fromCookieList (const NetworkCookieList &cookies)
static std::optional< NetworkCookieListtoSetCookieList (const QList< QByteArray > &values)
static std::optional< NetworkCookieListtoCookieList (const QList< QByteArray > &values)
static RawHeadersList fromHttpToRaw (const QHttpHeaders &headers)
static QHttpHeaders fromRawToHttp (const RawHeadersList &raw)
Static Public Attributes inherited from QNetworkReplyPrivate
static const int progressSignalInterval = 100

Detailed Description

Definition at line 71 of file qnetworkreplyimpl_p.h.

Member Enumeration Documentation

◆ InternalNotifications

Enumerator
NotifyDownstreamReadyWrite 

Definition at line 74 of file qnetworkreplyimpl_p.h.

Constructor & Destructor Documentation

◆ QNetworkReplyImplPrivate()

QT_BEGIN_NAMESPACE QNetworkReplyImplPrivate::QNetworkReplyImplPrivate ( )
inline

Definition at line 21 of file qnetworkreplyimpl.cpp.

Member Function Documentation

◆ _q_bufferOutgoingData()

void QNetworkReplyImplPrivate::_q_bufferOutgoingData ( )

Definition at line 159 of file qnetworkreplyimpl.cpp.

◆ _q_bufferOutgoingDataFinished()

void QNetworkReplyImplPrivate::_q_bufferOutgoingDataFinished ( )

Definition at line 142 of file qnetworkreplyimpl.cpp.

References state.

◆ _q_copyReadChannelFinished()

void QNetworkReplyImplPrivate::_q_copyReadChannelFinished ( )

Definition at line 137 of file qnetworkreplyimpl.cpp.

References _q_copyReadyRead().

Here is the call graph for this function:

◆ _q_copyReadyRead()

void QNetworkReplyImplPrivate::_q_copyReadyRead ( )

Definition at line 83 of file qnetworkreplyimpl.cpp.

References pauseNotificationHandling(), resumeNotificationHandling(), and state.

Referenced by _q_copyReadChannelFinished(), and appendDownstreamData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _q_startOperation()

void QNetworkReplyImplPrivate::_q_startOperation ( )

Definition at line 38 of file qnetworkreplyimpl.cpp.

References backend, finished(), handleNotifications(), and state.

Referenced by setup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ appendDownstreamData() [1/2]

void QNetworkReplyImplPrivate::appendDownstreamData ( QByteDataBuffer & data)

Definition at line 454 of file qnetworkreplyimpl.cpp.

References appendDownstreamDataSignalEmissions(), and initCacheSaveDevice().

Here is the call graph for this function:

◆ appendDownstreamData() [2/2]

void QNetworkReplyImplPrivate::appendDownstreamData ( QIODevice * data)

Definition at line 506 of file qnetworkreplyimpl.cpp.

References _q_copyReadyRead().

Here is the call graph for this function:

◆ appendDownstreamDataDownloadBuffer()

void QNetworkReplyImplPrivate::appendDownstreamDataDownloadBuffer ( qint64 bytesReceived,
qint64 bytesTotal )

Definition at line 560 of file qnetworkreplyimpl.cpp.

References initCacheSaveDevice().

Here is the call graph for this function:

◆ appendDownstreamDataSignalEmissions()

void QNetworkReplyImplPrivate::appendDownstreamDataSignalEmissions ( )

Definition at line 481 of file qnetworkreplyimpl.cpp.

References backendNotify(), NotifyDownstreamReadyWrite, pauseNotificationHandling(), and resumeNotificationHandling().

Referenced by appendDownstreamData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ backendNotify()

void QNetworkReplyImplPrivate::backendNotify ( InternalNotifications notification)

Definition at line 274 of file qnetworkreplyimpl.cpp.

Referenced by appendDownstreamDataSignalEmissions().

Here is the caller graph for this function:

◆ completeCacheSave()

void QNetworkReplyImplPrivate::completeCacheSave ( )

Definition at line 372 of file qnetworkreplyimpl.cpp.

References cacheEnabled.

Referenced by finished().

Here is the caller graph for this function:

◆ consume()

void QNetworkReplyImplPrivate::consume ( qint64 count)

◆ createCache()

void QNetworkReplyImplPrivate::createCache ( )

Definition at line 331 of file qnetworkreplyimpl.cpp.

References cacheEnabled.

Referenced by setCachingEnabled().

Here is the caller graph for this function:

◆ emitUploadProgress()

void QNetworkReplyImplPrivate::emitUploadProgress ( qint64 bytesSent,
qint64 bytesTotal )

Definition at line 383 of file qnetworkreplyimpl.cpp.

References pauseNotificationHandling(), and resumeNotificationHandling().

Here is the call graph for this function:

◆ encrypted()

void QNetworkReplyImplPrivate::encrypted ( )

Definition at line 678 of file qnetworkreplyimpl.cpp.

◆ error()

void QNetworkReplyImplPrivate::error ( QNetworkReply::NetworkError code,
const QString & errorString )

Definition at line 633 of file qnetworkreplyimpl.cpp.

◆ finished()

void QNetworkReplyImplPrivate::finished ( )

Definition at line 590 of file qnetworkreplyimpl.cpp.

References completeCacheSave(), pauseNotificationHandling(), resumeNotificationHandling(), and state.

Referenced by _q_startOperation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDownloadBuffer()

char * QNetworkReplyImplPrivate::getDownloadBuffer ( qint64 size)

Definition at line 527 of file qnetworkreplyimpl.cpp.

References downloadBuffer.

◆ handleNotifications()

void QNetworkReplyImplPrivate::handleNotifications ( )

Definition at line 285 of file qnetworkreplyimpl.cpp.

References notificationHandlingPaused.

Referenced by _q_startOperation().

Here is the caller graph for this function:

◆ initCacheSaveDevice()

void QNetworkReplyImplPrivate::initCacheSaveDevice ( )

Definition at line 413 of file qnetworkreplyimpl.cpp.

References cacheEnabled, and networkCache().

Referenced by appendDownstreamData(), and appendDownstreamDataDownloadBuffer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isCachingEnabled()

bool QNetworkReplyImplPrivate::isCachingEnabled ( ) const

Definition at line 340 of file qnetworkreplyimpl.cpp.

References cacheEnabled, and networkCache().

Here is the call graph for this function:

◆ metaDataChanged()

void QNetworkReplyImplPrivate::metaDataChanged ( )

Definition at line 651 of file qnetworkreplyimpl.cpp.

◆ networkCache()

QAbstractNetworkCache * QNetworkReplyImplPrivate::networkCache ( ) const

Definition at line 324 of file qnetworkreplyimpl.cpp.

References backend.

Referenced by initCacheSaveDevice(), and isCachingEnabled().

Here is the caller graph for this function:

◆ nextDownstreamBlockSize()

qint64 QNetworkReplyImplPrivate::nextDownstreamBlockSize ( ) const

Definition at line 404 of file qnetworkreplyimpl.cpp.

◆ pauseNotificationHandling()

void QNetworkReplyImplPrivate::pauseNotificationHandling ( )

Definition at line 310 of file qnetworkreplyimpl.cpp.

References notificationHandlingPaused.

Referenced by _q_copyReadyRead(), appendDownstreamDataSignalEmissions(), emitUploadProgress(), and finished().

Here is the caller graph for this function:

◆ readFromBackend()

void QNetworkReplyImplPrivate::readFromBackend ( )

Definition at line 696 of file qnetworkreplyimpl.cpp.

References backend.

◆ redirectionRequested()

void QNetworkReplyImplPrivate::redirectionRequested ( const QUrl & target)

Definition at line 673 of file qnetworkreplyimpl.cpp.

◆ resumeNotificationHandling()

void QNetworkReplyImplPrivate::resumeNotificationHandling ( )

Definition at line 316 of file qnetworkreplyimpl.cpp.

References notificationHandlingPaused.

Referenced by _q_copyReadyRead(), appendDownstreamDataSignalEmissions(), emitUploadProgress(), and finished().

Here is the caller graph for this function:

◆ setCachingEnabled()

void QNetworkReplyImplPrivate::setCachingEnabled ( bool enable)

Definition at line 345 of file qnetworkreplyimpl.cpp.

References backend, cacheEnabled, and createCache().

Here is the call graph for this function:

◆ setDownloadBuffer()

void QNetworkReplyImplPrivate::setDownloadBuffer ( QSharedPointer< char > sp,
qint64 size )

Definition at line 548 of file qnetworkreplyimpl.cpp.

◆ setup()

void QNetworkReplyImplPrivate::setup ( QNetworkAccessManager::Operation op,
const QNetworkRequest & request,
QIODevice * outgoingData )

Definition at line 202 of file qnetworkreplyimpl.cpp.

References _q_startOperation(), backend, and state.

Here is the call graph for this function:

◆ sslErrors()

void QNetworkReplyImplPrivate::sslErrors ( const QList< QSslError > & errors)

Definition at line 686 of file qnetworkreplyimpl.cpp.

Member Data Documentation

◆ backend

QNetworkAccessBackend* QNetworkReplyImplPrivate::backend

◆ bytesDownloaded

qint64 QNetworkReplyImplPrivate::bytesDownloaded

Definition at line 139 of file qnetworkreplyimpl_p.h.

◆ bytesUploaded

qint64 QNetworkReplyImplPrivate::bytesUploaded

Definition at line 140 of file qnetworkreplyimpl_p.h.

◆ cacheEnabled

bool QNetworkReplyImplPrivate::cacheEnabled

◆ cacheSaveDevice

QIODevice* QNetworkReplyImplPrivate::cacheSaveDevice

Definition at line 128 of file qnetworkreplyimpl_p.h.

◆ copyDevice

QIODevice* QNetworkReplyImplPrivate::copyDevice

Definition at line 124 of file qnetworkreplyimpl_p.h.

◆ downloadBuffer

char* QNetworkReplyImplPrivate::downloadBuffer

Definition at line 153 of file qnetworkreplyimpl_p.h.

Referenced by getDownloadBuffer().

◆ downloadBufferCurrentSize

qint64 QNetworkReplyImplPrivate::downloadBufferCurrentSize

Definition at line 150 of file qnetworkreplyimpl_p.h.

◆ downloadBufferMaximumSize

qint64 QNetworkReplyImplPrivate::downloadBufferMaximumSize

Definition at line 151 of file qnetworkreplyimpl_p.h.

◆ downloadBufferPointer

QSharedPointer<char> QNetworkReplyImplPrivate::downloadBufferPointer

Definition at line 152 of file qnetworkreplyimpl_p.h.

◆ downloadBufferReadPosition

qint64 QNetworkReplyImplPrivate::downloadBufferReadPosition

Definition at line 149 of file qnetworkreplyimpl_p.h.

◆ httpReasonPhrase

QString QNetworkReplyImplPrivate::httpReasonPhrase

Definition at line 142 of file qnetworkreplyimpl_p.h.

◆ httpStatusCode

int QNetworkReplyImplPrivate::httpStatusCode

Definition at line 143 of file qnetworkreplyimpl_p.h.

◆ lastProxyAuthentication

QNetworkProxy QNetworkReplyImplPrivate::lastProxyAuthentication

Definition at line 135 of file qnetworkreplyimpl_p.h.

◆ notificationHandlingPaused

bool QNetworkReplyImplPrivate::notificationHandlingPaused

◆ outgoingData

QIODevice* QNetworkReplyImplPrivate::outgoingData

Definition at line 122 of file qnetworkreplyimpl_p.h.

◆ outgoingDataBuffer

std::shared_ptr<QRingBuffer> QNetworkReplyImplPrivate::outgoingDataBuffer

Definition at line 123 of file qnetworkreplyimpl_p.h.

◆ pendingNotifications

std::vector<InternalNotifications> QNetworkReplyImplPrivate::pendingNotifications

Definition at line 130 of file qnetworkreplyimpl_p.h.

◆ proxyList

QList<QNetworkProxy> QNetworkReplyImplPrivate::proxyList

Definition at line 136 of file qnetworkreplyimpl_p.h.

◆ state

State QNetworkReplyImplPrivate::state

◆ urlForLastAuthentication

QUrl QNetworkReplyImplPrivate::urlForLastAuthentication

Definition at line 133 of file qnetworkreplyimpl_p.h.


The documentation for this class was generated from the following files: