Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QHttpNetworkReplyPrivate Class Reference

#include <qhttpnetworkreply_p.h>

+ Inheritance diagram for QHttpNetworkReplyPrivate:
+ Collaboration diagram for QHttpNetworkReplyPrivate:

Public Types

enum  ReplyState {
  NothingDoneState , ReadingStatusState , ReadingHeaderState , ReadingDataState ,
  AllDoneState , SPDYSYNSent , SPDYUploading , SPDYHalfClosed ,
  SPDYClosed , Aborted
}
 
- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
using ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData>
 

Public Member Functions

 QHttpNetworkReplyPrivate (const QUrl &newUrl=QUrl())
 
 ~QHttpNetworkReplyPrivate ()
 
qint64 readStatus (QIODevice *socket)
 
bool parseStatus (QByteArrayView status)
 
qint64 readHeader (QIODevice *socket)
 
void parseHeader (QByteArrayView header)
 
void appendHeaderField (const QByteArray &name, const QByteArray &data)
 
qint64 readBody (QIODevice *socket, QByteDataBuffer *out)
 
qint64 readBodyVeryFast (QIODevice *socket, char *b)
 
qint64 readBodyFast (QIODevice *socket, QByteDataBuffer *rb)
 
void clear ()
 
void clearHttpLayerInformation ()
 
qint64 readReplyBodyRaw (QIODevice *in, QByteDataBuffer *out, qint64 size)
 
qint64 readReplyBodyChunked (QIODevice *in, QByteDataBuffer *out)
 
qint64 getChunkSize (QIODevice *in, qint64 *chunkSize)
 
bool isRedirecting () const
 
bool shouldEmitSignals ()
 
bool expectContent ()
 
void eraseData ()
 
qint64 bytesAvailable () const
 
bool isChunked ()
 
bool isConnectionCloseEnabled ()
 
bool isCompressed () const
 
void removeAutoDecompressHeader ()
 
- Public Member Functions inherited from QObjectPrivate
void ensureExtraData ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
virtual ~QObjectPrivate ()
 
void deleteChildren ()
 
void clearBindingStorage ()
 
void checkForIncompatibleLibraryVersion (int version) const
 
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
 
QMetaObjectdynamicMetaObject () const
 
- Public Member Functions inherited from QHttpNetworkHeaderPrivate
 QHttpNetworkHeaderPrivate (const QUrl &newUrl=QUrl())
 
 QHttpNetworkHeaderPrivate (const QHttpNetworkHeaderPrivate &other)=default
 
qint64 contentLength () const
 
void setContentLength (qint64 length)
 
QByteArray headerField (QByteArrayView name, const QByteArray &defaultValue=QByteArray()) const
 
QList< QByteArrayheaderFieldValues (QByteArrayView name) const
 
void setHeaderField (const QByteArray &name, const QByteArray &data)
 
void prependHeaderField (const QByteArray &name, const QByteArray &data)
 
void clearHeaders ()
 
QHttpHeaders headers () const
 
bool operator== (const QHttpNetworkHeaderPrivate &other) const
 
- Public Member Functions inherited from QSharedData
 QSharedData () noexcept
 Constructs a QSharedData object with a reference count of 0.
 
 QSharedData (const QSharedData &) noexcept
 Constructs a QSharedData object with reference count 0.
 
QSharedDataoperator= (const QSharedData &)=delete
 
 ~QSharedData ()=default
 

Public Attributes

enum QHttpNetworkReplyPrivate::ReplyState state
 
QHttpNetworkRequest request
 
bool ssl
 
QString errorString
 
qint64 bodyLength
 
qint64 contentRead
 
qint64 totalProgress
 
QByteArray fragment
 
bool chunkedTransferEncoding
 
bool connectionCloseEnabled
 
bool forceConnectionCloseEnabled
 
bool lastChunkRead
 
qint64 currentChunkSize
 
qint64 currentChunkRead
 
qint64 readBufferMaxSize
 
qint64 totallyUploadedData
 
qint64 removedContentLength
 
QPointer< QHttpNetworkConnectionconnection
 
QPointer< QHttpNetworkConnectionChannelconnectionChannel
 
QNetworkReply::NetworkError httpErrorCode = QNetworkReply::NoError
 
bool autoDecompress
 
QByteDataBuffer responseData
 
bool requestIsPrepared
 
bool pipeliningUsed
 
bool h2Used
 
bool downstreamLimited
 
char * userProvidedDownloadBuffer
 
QUrl redirectUrl
 
- 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 QHttpNetworkHeaderPrivate
QUrl url
 
QHttpHeaderParser parser
 
- Public Attributes inherited from QSharedData
QAtomicInt ref
 

Additional Inherited Members

- 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)
 

Detailed Description

Definition at line 170 of file qhttpnetworkreply_p.h.

Member Enumeration Documentation

◆ ReplyState

Enumerator
NothingDoneState 
ReadingStatusState 
ReadingHeaderState 
ReadingDataState 
AllDoneState 
SPDYSYNSent 
SPDYUploading 
SPDYHalfClosed 
SPDYClosed 
Aborted 

Definition at line 202 of file qhttpnetworkreply_p.h.

Constructor & Destructor Documentation

◆ QHttpNetworkReplyPrivate()

QHttpNetworkReplyPrivate::QHttpNetworkReplyPrivate ( const QUrl & newUrl = QUrl())

Definition at line 302 of file qhttpnetworkreply.cpp.

References connectionCloseEnabled.

◆ ~QHttpNetworkReplyPrivate()

QHttpNetworkReplyPrivate::~QHttpNetworkReplyPrivate ( )
default

Member Function Documentation

◆ appendHeaderField()

void QHttpNetworkReplyPrivate::appendHeaderField ( const QByteArray & name,
const QByteArray & data )

Definition at line 502 of file qhttpnetworkreply.cpp.

References QHttpHeaderParser::appendHeaderField(), and QHttpNetworkHeaderPrivate::parser.

+ Here is the call graph for this function:

◆ bytesAvailable()

qint64 QHttpNetworkReplyPrivate::bytesAvailable ( ) const

Definition at line 351 of file qhttpnetworkreply.cpp.

References fragment, ReadingDataState, QByteArray::size(), and state.

Referenced by getChunkSize().

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

◆ clear()

void QHttpNetworkReplyPrivate::clear ( )

Definition at line 342 of file qhttpnetworkreply.cpp.

References autoDecompress, clearHttpLayerInformation(), connection, and connectionChannel.

+ Here is the call graph for this function:

◆ clearHttpLayerInformation()

void QHttpNetworkReplyPrivate::clearHttpLayerInformation ( )

Definition at line 328 of file qhttpnetworkreply.cpp.

References bodyLength, QHttpHeaderParser::clear(), connectionCloseEnabled, contentRead, currentChunkRead, currentChunkSize, lastChunkRead, NothingDoneState, QHttpNetworkHeaderPrivate::parser, state, and totalProgress.

Referenced by clear().

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

◆ eraseData()

void QHttpNetworkReplyPrivate::eraseData ( )

Definition at line 758 of file qhttpnetworkreply.cpp.

References QByteDataBuffer::clear(), and responseData.

+ Here is the call graph for this function:

◆ expectContent()

bool QHttpNetworkReplyPrivate::expectContent ( )

Definition at line 738 of file qhttpnetworkreply.cpp.

References bodyLength, QHttpNetworkHeaderPrivate::contentLength(), QHttpHeaderParser::getStatusCode(), QHttpNetworkRequest::Head, QHttpNetworkRequest::operation(), QHttpNetworkHeaderPrivate::parser, and request.

+ Here is the call graph for this function:

◆ getChunkSize()

qint64 QHttpNetworkReplyPrivate::getChunkSize ( QIODevice * in,
qint64 * chunkSize )

Definition at line 683 of file qhttpnetworkreply.cpp.

References QByteArray::append(), bytesAvailable(), QAbstractSocket::bytesAvailable(), QByteArray::clear(), QByteArray::endsWith(), fragment, QByteArray::indexOf(), QByteArrayView::mid(), ok, QIODevice::peek(), QIODevice::read(), QByteArray::size(), and socket.

Referenced by readReplyBodyChunked().

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

◆ isChunked()

bool QHttpNetworkReplyPrivate::isChunked ( )

Definition at line 507 of file qhttpnetworkreply.cpp.

References chunkedTransferEncoding.

Referenced by readBody().

+ Here is the caller graph for this function:

◆ isCompressed()

bool QHttpNetworkReplyPrivate::isCompressed ( ) const

Definition at line 356 of file qhttpnetworkreply.cpp.

References QHttpNetworkHeaderPrivate::headerField(), and QDecompressHelper::isSupportedEncoding().

+ Here is the call graph for this function:

◆ isConnectionCloseEnabled()

bool QHttpNetworkReplyPrivate::isConnectionCloseEnabled ( )

Definition at line 512 of file qhttpnetworkreply.cpp.

References connectionCloseEnabled, and forceConnectionCloseEnabled.

◆ isRedirecting()

bool QHttpNetworkReplyPrivate::isRedirecting ( ) const

Definition at line 723 of file qhttpnetworkreply.cpp.

References QHttpHeaderParser::getStatusCode(), QHttpNetworkRequest::isFollowRedirects(), QHttpNetworkReply::isHttpRedirect(), QHttpNetworkHeaderPrivate::parser, and request.

+ Here is the call graph for this function:

◆ parseHeader()

void QHttpNetworkReplyPrivate::parseHeader ( QByteArrayView header)

Definition at line 497 of file qhttpnetworkreply.cpp.

References header(), QHttpHeaderParser::parseHeaders(), and QHttpNetworkHeaderPrivate::parser.

Referenced by readHeader().

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

◆ parseStatus()

bool QHttpNetworkReplyPrivate::parseStatus ( QByteArrayView status)

Definition at line 430 of file qhttpnetworkreply.cpp.

References QHttpNetworkHeaderPrivate::parser, and QHttpHeaderParser::parseStatus().

Referenced by readStatus().

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

◆ readBody()

qint64 QHttpNetworkReplyPrivate::readBody ( QIODevice * socket,
QByteDataBuffer * out )

Definition at line 568 of file qhttpnetworkreply.cpp.

References AllDoneState, bodyLength, QAbstractSocket::bytesAvailable(), contentRead, isChunked(), out, readReplyBodyChunked(), readReplyBodyRaw(), socket, and state.

+ Here is the call graph for this function:

◆ readBodyFast()

qint64 QHttpNetworkReplyPrivate::readBodyFast ( QIODevice * socket,
QByteDataBuffer * rb )

Definition at line 538 of file qhttpnetworkreply.cpp.

References AllDoneState, QByteDataBuffer::append(), bodyLength, QAbstractSocket::bytesAvailable(), contentRead, qMin(), QIODevice::read(), readBufferMaxSize, QByteArray::resize(), socket, and state.

+ Here is the call graph for this function:

◆ readBodyVeryFast()

qint64 QHttpNetworkReplyPrivate::readBodyVeryFast ( QIODevice * socket,
char * b )

Definition at line 519 of file qhttpnetworkreply.cpp.

References AllDoneState, bodyLength, contentRead, QIODevice::read(), socket, and state.

+ Here is the call graph for this function:

◆ readHeader()

◆ readReplyBodyChunked()

qint64 QHttpNetworkReplyPrivate::readReplyBodyChunked ( QIODevice * in,
QByteDataBuffer * out )

Definition at line 621 of file qhttpnetworkreply.cpp.

References AllDoneState, QAbstractSocket::bytesAvailable(), currentChunkRead, currentChunkSize, forceConnectionCloseEnabled, getChunkSize(), lastChunkRead, out, QIODevice::read(), readBufferMaxSize, readReplyBodyRaw(), socket, and state.

Referenced by readBody().

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

◆ readReplyBodyRaw()

qint64 QHttpNetworkReplyPrivate::readReplyBodyRaw ( QIODevice * in,
QByteDataBuffer * out,
qint64 size )

Definition at line 588 of file qhttpnetworkreply.cpp.

References QAbstractSocket::bytesAvailable(), QByteArray::clear(), QByteArray::data(), out, Q_ASSERT, QIODevice::read(), readBufferMaxSize, QByteArray::resize(), QByteArray::size(), and socket.

Referenced by readBody(), and readReplyBodyChunked().

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

◆ readStatus()

qint64 QHttpNetworkReplyPrivate::readStatus ( QIODevice * socket)

Definition at line 381 of file qhttpnetworkreply.cpp.

References QByteArray::append(), QByteArray::clear(), QByteArray::endsWith(), fragment, QByteArray::isEmpty(), ok, parseStatus(), QIODevice::read(), ReadingHeaderState, QByteArray::reserve(), QByteArray::size(), socket, QByteArray::startsWith(), state, and QByteArray::truncate().

+ Here is the call graph for this function:

◆ removeAutoDecompressHeader()

void QHttpNetworkReplyPrivate::removeAutoDecompressHeader ( )

Definition at line 367 of file qhttpnetworkreply.cpp.

References QHttpNetworkHeaderPrivate::contentLength(), QHttpHeaderParser::firstHeaderField(), QHttpNetworkHeaderPrivate::parser, removedContentLength, and QHttpHeaderParser::removeHeaderField().

+ Here is the call graph for this function:

◆ shouldEmitSignals()

bool QHttpNetworkReplyPrivate::shouldEmitSignals ( )

Definition at line 731 of file qhttpnetworkreply.cpp.

References QHttpHeaderParser::getStatusCode(), and QHttpNetworkHeaderPrivate::parser.

+ Here is the call graph for this function:

Member Data Documentation

◆ autoDecompress

bool QHttpNetworkReplyPrivate::autoDecompress

Definition at line 235 of file qhttpnetworkreply_p.h.

Referenced by clear().

◆ bodyLength

qint64 QHttpNetworkReplyPrivate::bodyLength

◆ chunkedTransferEncoding

bool QHttpNetworkReplyPrivate::chunkedTransferEncoding

Definition at line 222 of file qhttpnetworkreply_p.h.

Referenced by isChunked(), and readHeader().

◆ connection

QPointer<QHttpNetworkConnection> QHttpNetworkReplyPrivate::connection

Definition at line 231 of file qhttpnetworkreply_p.h.

Referenced by clear().

◆ connectionChannel

QPointer<QHttpNetworkConnectionChannel> QHttpNetworkReplyPrivate::connectionChannel

Definition at line 232 of file qhttpnetworkreply_p.h.

Referenced by clear().

◆ connectionCloseEnabled

bool QHttpNetworkReplyPrivate::connectionCloseEnabled

◆ contentRead

qint64 QHttpNetworkReplyPrivate::contentRead

◆ currentChunkRead

qint64 QHttpNetworkReplyPrivate::currentChunkRead

Definition at line 227 of file qhttpnetworkreply_p.h.

Referenced by clearHttpLayerInformation(), and readReplyBodyChunked().

◆ currentChunkSize

qint64 QHttpNetworkReplyPrivate::currentChunkSize

Definition at line 226 of file qhttpnetworkreply_p.h.

Referenced by clearHttpLayerInformation(), and readReplyBodyChunked().

◆ downstreamLimited

bool QHttpNetworkReplyPrivate::downstreamLimited

Definition at line 242 of file qhttpnetworkreply_p.h.

◆ errorString

QString QHttpNetworkReplyPrivate::errorString

Definition at line 217 of file qhttpnetworkreply_p.h.

◆ forceConnectionCloseEnabled

bool QHttpNetworkReplyPrivate::forceConnectionCloseEnabled

Definition at line 224 of file qhttpnetworkreply_p.h.

Referenced by isConnectionCloseEnabled(), and readReplyBodyChunked().

◆ fragment

QByteArray QHttpNetworkReplyPrivate::fragment

Definition at line 221 of file qhttpnetworkreply_p.h.

Referenced by bytesAvailable(), getChunkSize(), readHeader(), and readStatus().

◆ h2Used

bool QHttpNetworkReplyPrivate::h2Used

Definition at line 241 of file qhttpnetworkreply_p.h.

◆ httpErrorCode

QNetworkReply::NetworkError QHttpNetworkReplyPrivate::httpErrorCode = QNetworkReply::NoError

Definition at line 233 of file qhttpnetworkreply_p.h.

◆ lastChunkRead

bool QHttpNetworkReplyPrivate::lastChunkRead

Definition at line 225 of file qhttpnetworkreply_p.h.

Referenced by clearHttpLayerInformation(), and readReplyBodyChunked().

◆ pipeliningUsed

bool QHttpNetworkReplyPrivate::pipeliningUsed

Definition at line 240 of file qhttpnetworkreply_p.h.

◆ readBufferMaxSize

qint64 QHttpNetworkReplyPrivate::readBufferMaxSize

Definition at line 228 of file qhttpnetworkreply_p.h.

Referenced by readBodyFast(), readReplyBodyChunked(), and readReplyBodyRaw().

◆ redirectUrl

QUrl QHttpNetworkReplyPrivate::redirectUrl

Definition at line 245 of file qhttpnetworkreply_p.h.

◆ removedContentLength

qint64 QHttpNetworkReplyPrivate::removedContentLength

Definition at line 230 of file qhttpnetworkreply_p.h.

Referenced by removeAutoDecompressHeader().

◆ request

QHttpNetworkRequest QHttpNetworkReplyPrivate::request

Definition at line 215 of file qhttpnetworkreply_p.h.

Referenced by expectContent(), and isRedirecting().

◆ requestIsPrepared

bool QHttpNetworkReplyPrivate::requestIsPrepared

Definition at line 238 of file qhttpnetworkreply_p.h.

◆ responseData

QByteDataBuffer QHttpNetworkReplyPrivate::responseData

Definition at line 237 of file qhttpnetworkreply_p.h.

Referenced by eraseData().

◆ ssl

bool QHttpNetworkReplyPrivate::ssl

Definition at line 216 of file qhttpnetworkreply_p.h.

◆ state

◆ totallyUploadedData

qint64 QHttpNetworkReplyPrivate::totallyUploadedData

Definition at line 229 of file qhttpnetworkreply_p.h.

◆ totalProgress

qint64 QHttpNetworkReplyPrivate::totalProgress

Definition at line 220 of file qhttpnetworkreply_p.h.

Referenced by clearHttpLayerInformation().

◆ userProvidedDownloadBuffer

char* QHttpNetworkReplyPrivate::userProvidedDownloadBuffer

Definition at line 244 of file qhttpnetworkreply_p.h.


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