![]() |
Qt 6.x
The Qt SDK
|
#include <qnetworkreplyhttpimpl_p.h>
Signals | |
void | startHttpRequest () |
void | abortHttpRequest () |
void | readBufferSizeChanged (qint64 size) |
void | readBufferFreed (qint64 size) |
void | startHttpRequestSynchronously () |
void | haveUploadData (const qint64 pos, const QByteArray &dataArray, bool dataAtEnd, qint64 dataSize) |
![]() | |
void | socketStartedConnecting () |
void | requestSent () |
void | metaDataChanged () |
\omit FIXME: Update name? \endomit | |
void | finished () |
This signal is emitted when the reply has finished processing. | |
void | errorOccurred (QNetworkReply::NetworkError) |
void | redirected (const QUrl &url) |
void | redirectAllowed () |
void | uploadProgress (qint64 bytesSent, qint64 bytesTotal) |
This signal is emitted to indicate the progress of the upload part of this network request, if there's any. | |
void | downloadProgress (qint64 bytesReceived, qint64 bytesTotal) |
This signal is emitted to indicate the progress of the download part of this network request, if there's any. | |
![]() | |
void | readyRead () |
This signal is emitted once every time new data is available for reading from the device's current read channel. | |
void | channelReadyRead (int channel) |
void | bytesWritten (qint64 bytes) |
This signal is emitted every time a payload of data has been written to the device's current write channel. | |
void | channelBytesWritten (int channel, qint64 bytes) |
void | aboutToClose () |
This signal is emitted when the device is about to close. | |
void | readChannelFinished () |
![]() | |
void | destroyed (QObject *=nullptr) |
This signal is emitted immediately before the object obj is destroyed, after any instances of QPointer have been notified, and cannot be blocked. | |
void | objectNameChanged (const QString &objectName, QPrivateSignal) |
This signal is emitted after the object's name has been changed. | |
Public Member Functions | |
QNetworkReplyHttpImpl (QNetworkAccessManager *const, const QNetworkRequest &, QNetworkAccessManager::Operation &, QIODevice *outgoingData) | |
virtual | ~QNetworkReplyHttpImpl () |
void | close () override |
Closes this device for reading. | |
void | abort () override |
Aborts the operation immediately and close down any network connections still open. | |
qint64 | bytesAvailable () const override |
Returns the number of bytes that are available for reading. | |
bool | isSequential () const override |
qint64 | size () const override |
For open random-access devices, this function returns the size of the device. | |
qint64 | readData (char *, qint64) override |
Reads up to maxSize bytes from the device into data, and returns the number of bytes read or -1 if an error occurred. | |
void | setReadBufferSize (qint64 size) override |
Sets the size of the read buffer to be size bytes. | |
bool | canReadLine () const override |
Returns true if a complete line of data can be read from the device; otherwise returns false . | |
Q_PRIVATE_SLOT (d_func(), void _q_startOperation()) Q_PRIVATE_SLOT(d_func() | |
void | _q_cacheLoadReadyRead ()) Q_PRIVATE_SLOT(d_func() |
void void | _q_bufferOutgoingData ()) Q_PRIVATE_SLOT(d_func() |
void void void | _q_bufferOutgoingDataFinished ()) Q_PRIVATE_SLOT(d_func() |
void void void void | _q_transferTimedOut ()) Q_PRIVATE_SLOT(d_func() |
void void void void void | _q_finished ()) Q_PRIVATE_SLOT(d_func() |
void void void void void void | _q_error (QNetworkReply::NetworkError, const QString &)) Q_PRIVATE_SLOT(d_func() |
void void void void void void void | replyDownloadData (QByteArray)) Q_PRIVATE_SLOT(d_func() |
void void void void void void void void | replyFinished ()) Q_PRIVATE_SLOT(d_func() |
void void void void void void void void void | replyDownloadProgressSlot (qint64, qint64)) Q_PRIVATE_SLOT(d_func() |
void void void void void void void void void void | httpAuthenticationRequired (const QHttpNetworkRequest &, QAuthenticator *)) Q_PRIVATE_SLOT(d_func() |
void void void void void void void void void void void | httpError (QNetworkReply::NetworkError, const QString &)) Q_PRIVATE_SLOT(d_func() |
void void void void void void void void void void void void | replyEncrypted ()) Q_PRIVATE_SLOT(d_func() |
void void void void void void void void void void void void void | replySslErrors (const QList< QSslError > &, bool *, QList< QSslError > *)) Q_PRIVATE_SLOT(d_func() |
void void void void void void void void void void void void void void | replySslConfigurationChanged (const QSslConfiguration &)) Q_PRIVATE_SLOT(d_func() |
void void void void void void void void void void void void void void void | replyPreSharedKeyAuthenticationRequiredSlot (QSslPreSharedKeyAuthenticator *)) Q_PRIVATE_SLOT(d_func() |
void void void void void void void void void void void void void void void void | proxyAuthenticationRequired (const QNetworkProxy &proxy, QAuthenticator *auth)) Q_PRIVATE_SLOT(d_func() |
void void void void void void void void void void void void void void void void void | resetUploadDataSlot (bool *r)) Q_PRIVATE_SLOT(d_func() |
void void void void void void void void void void void void void void void void void void | wantUploadDataSlot (qint64)) Q_PRIVATE_SLOT(d_func() |
void void void void void void void void void void void void void void void void void void void | sentUploadDataSlot (qint64, qint64)) Q_PRIVATE_SLOT(d_func() |
void void void void void void void void void void void void void void void void void void void void | uploadByteDeviceReadyReadSlot ()) Q_PRIVATE_SLOT(d_func() |
void void void void void void void void void void void void void void void void void void void void void | emitReplyUploadProgress (qint64, qint64)) Q_PRIVATE_SLOT(d_func() |
void void void void void void void void void void void void void void void void void void void void void void | _q_cacheSaveDeviceAboutToClose ()) Q_PRIVATE_SLOT(d_func() |
void void void void void void void void void void void void void void void void void void void void void void void | _q_metaDataChanged ()) Q_PRIVATE_SLOT(d_func() |
void void void void void void void void void void void void void void void void void void void void void void void void | onRedirected (const QUrl &, int, int)) Q_PRIVATE_SLOT(d_func() |
void void void void void void void void void void void void void void void void void void void void void void void void void followRedirect()) protected void | ignoreSslErrorsImplementation (const QList< QSslError > &errors) override |
void | setSslConfigurationImplementation (const QSslConfiguration &configuration) override |
void | sslConfigurationImplementation (QSslConfiguration &configuration) const override |
![]() | |
~QNetworkReply () | |
Disposes of this reply and frees any resources associated with it. | |
virtual void | close () override |
Closes this device for reading. | |
virtual bool | isSequential () const override |
qint64 | readBufferSize () const |
Returns the size of the read buffer, in bytes. | |
virtual void | setReadBufferSize (qint64 size) |
Sets the size of the read buffer to be size bytes. | |
QNetworkAccessManager * | manager () const |
Returns the QNetworkAccessManager that was used to create this QNetworkReply object. | |
QNetworkAccessManager::Operation | operation () const |
Returns the operation that was posted for this reply. | |
QNetworkRequest | request () const |
Returns the request that was posted for this reply. | |
NetworkError | error () const |
Returns the error that was found during the processing of this request. | |
bool | isFinished () const |
bool | isRunning () const |
QUrl | url () const |
Returns the URL of the content downloaded or uploaded. | |
QVariant | header (QNetworkRequest::KnownHeaders header) const |
Returns the value of the known header header, if that header was sent by the remote server. | |
bool | hasRawHeader (const QByteArray &headerName) const |
Returns true if the raw header of name headerName was sent by the remote server. | |
QList< QByteArray > | rawHeaderList () const |
Returns a list of headers fields that were sent by the remote server, in the order that they were sent. | |
QByteArray | rawHeader (const QByteArray &headerName) const |
Returns the raw contents of the header headerName as sent by the remote server. | |
const QList< RawHeaderPair > & | rawHeaderPairs () const |
Returns a list of raw header pairs. | |
QVariant | attribute (QNetworkRequest::Attribute code) const |
Returns the attribute associated with the code code. | |
![]() | |
QIODevice () | |
Constructs a QIODevice object. | |
QIODevice (QObject *parent) | |
Constructs a QIODevice object with the given parent. | |
virtual | ~QIODevice () |
The destructor is virtual, and QIODevice is an abstract base class. | |
QIODeviceBase::OpenMode | openMode () const |
Returns the mode in which the device has been opened; i.e. | |
void | setTextModeEnabled (bool enabled) |
If enabled is true, this function sets the \l Text flag on the device; otherwise the \l Text flag is removed. | |
bool | isTextModeEnabled () const |
Returns true if the \l Text flag is enabled; otherwise returns false . | |
bool | isOpen () const |
Returns true if the device is open; otherwise returns false . | |
bool | isReadable () const |
Returns true if data can be read from the device; otherwise returns false. | |
bool | isWritable () const |
Returns true if data can be written to the device; otherwise returns false. | |
virtual bool | isSequential () const |
Returns true if this device is sequential; otherwise returns false. | |
int | readChannelCount () const |
int | writeChannelCount () const |
int | currentReadChannel () const |
void | setCurrentReadChannel (int channel) |
int | currentWriteChannel () const |
void | setCurrentWriteChannel (int channel) |
virtual bool | open (QIODeviceBase::OpenMode mode) |
Opens the device and sets its OpenMode to mode. | |
virtual void | close () |
First emits aboutToClose(), then closes the device and sets its OpenMode to NotOpen. | |
virtual qint64 | pos () const |
For random-access devices, this function returns the position that data is written to or read from. | |
virtual qint64 | size () const |
For open random-access devices, this function returns the size of the device. | |
virtual bool | seek (qint64 pos) |
For random-access devices, this function sets the current position to pos, returning true on success, or false if an error occurred. | |
virtual bool | atEnd () const |
Returns true if the current read and write position is at the end of the device (i.e. | |
virtual bool | reset () |
Seeks to the start of input for random-access devices. | |
virtual qint64 | bytesAvailable () const |
Returns the number of bytes that are available for reading. | |
virtual qint64 | bytesToWrite () const |
For buffered devices, this function returns the number of bytes waiting to be written. | |
qint64 | read (char *data, qint64 maxlen) |
Reads at most maxSize bytes from the device into data, and returns the number of bytes read. | |
QByteArray | read (qint64 maxlen) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Reads at most maxSize bytes from the device, and returns the data read as a QByteArray. | |
QByteArray | readAll () |
Reads all remaining data from the device, and returns it as a byte array. | |
qint64 | readLine (char *data, qint64 maxlen) |
This function reads a line of ASCII characters from the device, up to a maximum of maxSize - 1 bytes, stores the characters in data, and returns the number of bytes read. | |
QByteArray | readLine (qint64 maxlen=0) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Reads a line from the device, but no more than maxSize characters, and returns the result as a byte array. | |
virtual bool | canReadLine () const |
Returns true if a complete line of data can be read from the device; otherwise returns false . | |
void | startTransaction () |
void | commitTransaction () |
void | rollbackTransaction () |
bool | isTransactionStarted () const |
qint64 | write (const char *data, qint64 len) |
Writes at most maxSize bytes of data from data to the device. | |
qint64 | write (const char *data) |
qint64 | write (const QByteArray &data) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Writes the content of data to the device. | |
qint64 | peek (char *data, qint64 maxlen) |
QByteArray | peek (qint64 maxlen) |
qint64 | skip (qint64 maxSize) |
virtual bool | waitForReadyRead (int msecs) |
Blocks until new data is available for reading and the readyRead() signal has been emitted, or until msecs milliseconds have passed. | |
virtual bool | waitForBytesWritten (int msecs) |
For buffered devices, this function waits until a payload of buffered written data has been written to the device and the bytesWritten() signal has been emitted, or until msecs milliseconds have passed. | |
void | ungetChar (char c) |
Puts the character c back into the device, and decrements the current position unless the position is 0. | |
bool | putChar (char c) |
Writes the character c to the device. | |
bool | getChar (char *c) |
Reads one character from the device and stores it in c. | |
QString | errorString () const |
Returns a human-readable description of the last device error that occurred. | |
![]() | |
Q_INVOKABLE | QObject (QObject *parent=nullptr) |
Constructs an object with parent object parent. | |
virtual | ~QObject () |
Destroys the object, deleting all its child objects. | |
virtual bool | event (QEvent *event) |
This virtual function receives events to an object and should return true if the event e was recognized and processed. | |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
Filters events if this object has been installed as an event filter for the watched object. | |
QString | objectName () const |
Q_WEAK_OVERLOAD void | setObjectName (const QString &name) |
Sets the object's name to name. | |
void | setObjectName (QAnyStringView name) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
QBindable< QString > | bindableObjectName () |
bool | isWidgetType () const |
Returns true if the object is a widget; otherwise returns false . | |
bool | isWindowType () const |
Returns true if the object is a window; otherwise returns false . | |
bool | isQuickItemType () const |
Returns true if the object is a QQuickItem; otherwise returns false . | |
bool | signalsBlocked () const noexcept |
Returns true if signals are blocked; otherwise returns false . | |
bool | blockSignals (bool b) noexcept |
If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it). | |
QThread * | thread () const |
Returns the thread in which the object lives. | |
void | moveToThread (QThread *thread) |
Changes the thread affinity for this object and its children. | |
int | startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer) |
This is an overloaded function that will start a timer of type timerType and a timeout of interval milliseconds. | |
int | startTimer (std::chrono::milliseconds time, Qt::TimerType timerType=Qt::CoarseTimer) |
void | killTimer (int id) |
Kills the timer with timer identifier, id. | |
template<typename T > | |
T | findChild (const QString &aName=QString(), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
Returns the child of this object that can be cast into type T and that is called name, or \nullptr if there is no such object. | |
template<typename T > | |
QList< T > | findChildren (const QString &aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects. | |
template<typename T > | |
QList< T > | findChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
const QObjectList & | children () const |
Returns a list of child objects. | |
void | setParent (QObject *parent) |
Makes the object a child of parent. | |
void | installEventFilter (QObject *filterObj) |
Installs an event filter filterObj on this object. | |
void | removeEventFilter (QObject *obj) |
Removes an event filter object obj from this object. | |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const |
bool | disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const |
bool | disconnect (const QObject *receiver, const char *member=nullptr) const |
void | dumpObjectTree () const |
Dumps a tree of children to the debug output. | |
void | dumpObjectInfo () const |
Dumps information about signal connections, etc. | |
bool | setProperty (const char *name, const QVariant &value) |
Sets the value of the object's name property to value. | |
bool | setProperty (const char *name, QVariant &&value) |
QVariant | property (const char *name) const |
Returns the value of the object's name property. | |
QList< QByteArray > | dynamicPropertyNames () const |
QBindingStorage * | bindingStorage () |
const QBindingStorage * | bindingStorage () const |
QObject * | parent () const |
Returns a pointer to the parent object. | |
bool | inherits (const char *classname) const |
Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false . | |
Additional Inherited Members | |
![]() | |
enum | NetworkError { NoError = 0 , ConnectionRefusedError = 1 , RemoteHostClosedError , HostNotFoundError , TimeoutError , OperationCanceledError , SslHandshakeFailedError , TemporaryNetworkFailureError , NetworkSessionFailedError , BackgroundRequestNotAllowedError , TooManyRedirectsError , InsecureRedirectError , UnknownNetworkError = 99 , ProxyConnectionRefusedError = 101 , ProxyConnectionClosedError , ProxyNotFoundError , ProxyTimeoutError , ProxyAuthenticationRequiredError , UnknownProxyError = 199 , ContentAccessDenied = 201 , ContentOperationNotPermittedError , ContentNotFoundError , AuthenticationRequiredError , ContentReSendError , ContentConflictError , ContentGoneError , UnknownContentError = 299 , ProtocolUnknownError = 301 , ProtocolInvalidOperationError , ProtocolFailure = 399 , InternalServerError = 401 , OperationNotImplementedError , ServiceUnavailableError , UnknownServerError = 499 } |
Indicates all possible error conditions found during the processing of the request. More... | |
typedef QPair< QByteArray, QByteArray > | RawHeaderPair |
RawHeaderPair is a QPair<QByteArray, QByteArray> where the first QByteArray is the header name and the second is the header. | |
![]() | |
enum | OpenModeFlag { NotOpen = 0x0000 , ReadOnly = 0x0001 , WriteOnly = 0x0002 , ReadWrite = ReadOnly | WriteOnly , Append = 0x0004 , Truncate = 0x0008 , Text = 0x0010 , Unbuffered = 0x0020 , NewOnly = 0x0040 , ExistingOnly = 0x0080 } |
This enum is used with QIODevice::open() to describe the mode in which a device is opened. More... | |
![]() | |
virtual void | abort ()=0 |
Aborts the operation immediately and close down any network connections still open. | |
virtual void | ignoreSslErrors () |
If this function is called, SSL errors related to network connection will be ignored, including certificate validation errors. | |
![]() | |
void | deleteLater () |
\threadsafe | |
![]() | |
static QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection) |
\threadsafe | |
static QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::ContextTypeForFunctor< Func2 >::ContextType *context, Func2 &&slot, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 &&slot) |
static bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member) |
\threadsafe | |
static bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member) |
static bool | disconnect (const QMetaObject::Connection &) |
Disconnect a connection. | |
template<typename Func1 , typename Func2 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot) |
template<typename Func1 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero) |
![]() | |
QNetworkReply (QObject *parent=nullptr) | |
Creates a QNetworkReply object with parent parent. | |
QNetworkReply (QNetworkReplyPrivate &dd, QObject *parent) | |
virtual qint64 | writeData (const char *data, qint64 len) override |
void | setOperation (QNetworkAccessManager::Operation operation) |
Sets the associated operation for this object to be operation. | |
void | setRequest (const QNetworkRequest &request) |
Sets the associated request for this object to be request. | |
void | setError (NetworkError errorCode, const QString &errorString) |
Sets the error condition to be errorCode. | |
void | setFinished (bool) |
void | setUrl (const QUrl &url) |
Sets the URL being processed to be url. | |
void | setHeader (QNetworkRequest::KnownHeaders header, const QVariant &value) |
Sets the known header header to be of value value. | |
void | setRawHeader (const QByteArray &headerName, const QByteArray &value) |
Sets the raw header headerName to be of value value. | |
void | setAttribute (QNetworkRequest::Attribute code, const QVariant &value) |
Sets the attribute code to have value value. | |
![]() | |
QIODevice (QIODevicePrivate &dd, QObject *parent=nullptr) | |
virtual qint64 | readData (char *data, qint64 maxlen)=0 |
Reads up to maxSize bytes from the device into data, and returns the number of bytes read or -1 if an error occurred. | |
virtual qint64 | readLineData (char *data, qint64 maxlen) |
Reads up to maxSize characters into data and returns the number of characters read. | |
virtual qint64 | skipData (qint64 maxSize) |
virtual qint64 | writeData (const char *data, qint64 len)=0 |
Writes up to maxSize bytes from data to the device. | |
void | setOpenMode (QIODeviceBase::OpenMode openMode) |
Sets the OpenMode of the device to openMode. | |
void | setErrorString (const QString &errorString) |
Sets the human readable description of the last device error that occurred to str. | |
![]() | |
QObject * | sender () const |
Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns \nullptr. | |
int | senderSignalIndex () const |
int | receivers (const char *signal) const |
Returns the number of receivers connected to the signal. | |
bool | isSignalConnected (const QMetaMethod &signal) const |
virtual void | timerEvent (QTimerEvent *event) |
This event handler can be reimplemented in a subclass to receive timer events for the object. | |
virtual void | childEvent (QChildEvent *event) |
This event handler can be reimplemented in a subclass to receive child events. | |
virtual void | customEvent (QEvent *event) |
This event handler can be reimplemented in a subclass to receive custom events. | |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
QObject (QObjectPrivate &dd, QObject *parent=nullptr) | |
![]() | |
~QIODeviceBase ()=default | |
![]() | |
QScopedPointer< QObjectData > | d_ptr |
![]() | |
QString | objectName |
the name of this object | |
![]() | |
template< class T > T | qobject_cast (const QObject *object) |
Returns the given object cast to type T if the object is of type T (or of a subclass); otherwise returns \nullptr. | |
template< typename T > T | qFindChildqFindChildren (const QObject *obj, const QString &name)() |
template< typename T > QList< T > | qFindChildrenqFindChildren (const QObject *obj, const QString &name)() |
QObjectList | |
\macro Q_CLASSINFO(Name, Value) | |
Definition at line 51 of file qnetworkreplyhttpimpl_p.h.
QNetworkReplyHttpImpl::QNetworkReplyHttpImpl | ( | QNetworkAccessManager * const | manager, |
const QNetworkRequest & | request, | ||
QNetworkAccessManager::Operation & | operation, | ||
QIODevice * | outgoingData | ||
) |
Definition at line 136 of file qnetworkreplyhttpimpl.cpp.
References QNetworkRequest::attribute(), QObjectPrivate::connect(), QNetworkRequest::ContentLengthHeader, d, QNetworkRequest::DoNotBufferUploadDataAttribute, QNetworkReplyHttpImplPrivate::followRedirect(), QNetworkRequest::header(), QMetaObject::invokeMethod(), QVariant::isValid(), QNetworkReply::manager(), QIODevice::open(), QNetworkReply::operation(), Q_ASSERT, Qt::QueuedConnection, QIODeviceBase::ReadOnly, QNetworkReply::redirectAllowed(), QNetworkReply::request(), QUrl::scheme(), QNetworkRequest::sslConfiguration(), QNetworkRequest::SynchronousRequestAttribute, QVariant::toBool(), and QNetworkRequest::url().
|
virtual |
Definition at line 219 of file qnetworkreplyhttpimpl.cpp.
References abortHttpRequest(), and emit.
void QNetworkReplyHttpImpl::_q_cacheLoadReadyRead | ( | ) |
void void void void void void void void void void void void void void void void void void void void void void QNetworkReplyHttpImpl::_q_cacheSaveDeviceAboutToClose | ( | ) |
void void void void void void QNetworkReplyHttpImpl::_q_error | ( | QNetworkReply::NetworkError | , |
const QString & | |||
) |
void void void void void void void void void void void void void void void void void void void void void void void QNetworkReplyHttpImpl::_q_metaDataChanged | ( | ) |
|
overridevirtual |
Aborts the operation immediately and close down any network connections still open.
Uploads still in progress are also aborted.
The finished() signal will also be emitted.
Implements QNetworkReply.
Definition at line 243 of file qnetworkreplyhttpimpl.cpp.
References QNetworkReplyPrivate::Aborted, abortHttpRequest(), QNetworkReply::close(), d, emit, QNetworkReplyPrivate::Finished, QNetworkReply::OperationCanceledError, and tr.
|
signal |
|
overridevirtual |
Returns the number of bytes that are available for reading.
This function is commonly used with sequential devices to determine the number of bytes to allocate in a buffer before reading.
Subclasses that reimplement this function must call the base implementation in order to include the size of the buffer of QIODevice. Example:
Reimplemented from QIODevice.
Definition at line 264 of file qnetworkreplyhttpimpl.cpp.
References QIODevice::bytesAvailable(), and d.
|
overridevirtual |
Returns true
if a complete line of data can be read from the device; otherwise returns false
.
Note that unbuffered devices, which have no way of determining what can be read, always return false.
This function is often called in conjunction with the readyRead() signal.
Subclasses that reimplement this function must call the base implementation in order to include the contents of the QIODevice's buffer. Example:
Reimplemented from QIODevice.
Definition at line 369 of file qnetworkreplyhttpimpl.cpp.
References QIODevice::canReadLine(), and d.
|
overridevirtual |
Closes this device for reading.
Unread data is discarded, but the network resources are not discarded until they are finished. In particular, if any upload is in progress, it will continue until it is done.
The finished() signal is emitted when all operations are over and the network resources are freed.
Reimplemented from QNetworkReply.
Definition at line 225 of file qnetworkreplyhttpimpl.cpp.
References QNetworkReplyPrivate::Aborted, QNetworkReply::close(), d, QNetworkReplyPrivate::Finished, QNetworkReply::OperationCanceledError, and tr.
void void void void void void void void void void void void void void void void void void void void void QNetworkReplyHttpImpl::emitReplyUploadProgress | ( | qint64 | , |
qint64 | |||
) |
|
signal |
void void void void void void void void void void QNetworkReplyHttpImpl::httpAuthenticationRequired | ( | const QHttpNetworkRequest & | , |
QAuthenticator * | |||
) |
void void void void void void void void void void void QNetworkReplyHttpImpl::httpError | ( | QNetworkReply::NetworkError | , |
const QString & | |||
) |
|
override |
Definition at line 399 of file qnetworkreplyhttpimpl.cpp.
References d, Q_ASSERT, and QNetworkReply::url().
|
overridevirtual |
Reimplemented from QNetworkReply.
Definition at line 289 of file qnetworkreplyhttpimpl.cpp.
void void void void void void void void void void void void void void void void void void void void void void void void QNetworkReplyHttpImpl::onRedirected | ( | const QUrl & | , |
int | , | ||
int | |||
) |
void void void void void void void void void void void void void void void void QNetworkReplyHttpImpl::proxyAuthenticationRequired | ( | const QNetworkProxy & | proxy, |
QAuthenticator * | auth | ||
) |
QNetworkReplyHttpImpl::Q_PRIVATE_SLOT | ( | d_func() | , |
void | _q_startOperation() | ||
) |
Reads up to maxSize bytes from the device into data, and returns the number of bytes read or -1 if an error occurred.
If there are no bytes to be read and there can never be more bytes available (examples include socket closed, pipe closed, sub-process finished), this function returns -1.
This function is called by QIODevice. Reimplement this function when creating a subclass of QIODevice.
When reimplementing this function it is important that this function reads all the required data before returning. This is required in order for QDataStream to be able to operate on the class. QDataStream assumes all the requested information was read and therefore does not retry reading if there was a problem.
This function might be called with a maxSize of 0, which can be used to perform post-reading operations.
Implements QIODevice.
Definition at line 302 of file qnetworkreplyhttpimpl.cpp.
References arg, d, emit, QNetworkReply::isFinished(), qMin(), readBufferFreed(), QNetworkReply::readBufferSize(), ret, QCoreApplication::translate(), and QNetworkReply::UnknownContentError.
void void void void void void void void void QNetworkReplyHttpImpl::replyDownloadProgressSlot | ( | qint64 | , |
qint64 | |||
) |
void void void void void void void void void void void void QNetworkReplyHttpImpl::replyEncrypted | ( | ) |
void void void void void void void void void void void void void void void QNetworkReplyHttpImpl::replyPreSharedKeyAuthenticationRequiredSlot | ( | QSslPreSharedKeyAuthenticator * | ) |
void void void void void void void void void void void void void void QNetworkReplyHttpImpl::replySslConfigurationChanged | ( | const QSslConfiguration & | ) |
void void void void void void void void void void void void void QNetworkReplyHttpImpl::replySslErrors | ( | const QList< QSslError > & | , |
bool * | , | ||
QList< QSslError > * | |||
) |
void void void void void void void void void void void void void void void void void QNetworkReplyHttpImpl::resetUploadDataSlot | ( | bool * | r | ) |
void void void void void void void void void void void void void void void void void void void QNetworkReplyHttpImpl::sentUploadDataSlot | ( | qint64 | , |
qint64 | |||
) |
Sets the size of the read buffer to be size bytes.
The read buffer is the buffer that holds data that is being downloaded off the network, before it is read with QIODevice::read(). Setting the buffer size to 0 will make the buffer unlimited in size.
QNetworkReply will try to stop reading from the network once this buffer is full (i.e., bytesAvailable() returns size or more), thus causing the download to throttle down as well. If the buffer is not limited in size, QNetworkReply will try to download as fast as possible from the network.
Unlike QAbstractSocket::setReadBufferSize(), QNetworkReply cannot guarantee precision in the read buffer size. That is, bytesAvailable() can return more than size.
Reimplemented from QNetworkReply.
Definition at line 362 of file qnetworkreplyhttpimpl.cpp.
References emit, readBufferSizeChanged(), and QNetworkReply::setReadBufferSize().
|
override |
Definition at line 414 of file qnetworkreplyhttpimpl.cpp.
References Q_UNUSED.
|
overridevirtual |
For open random-access devices, this function returns the size of the device.
For open sequential devices, bytesAvailable() is returned.
If the device is closed, the size returned will not reflect the actual size of the device.
Reimplemented from QIODevice.
Definition at line 296 of file qnetworkreplyhttpimpl.cpp.
References QIODevice::size().
|
override |
Definition at line 421 of file qnetworkreplyhttpimpl.cpp.
References d, QNetworkReply::request(), and QNetworkRequest::sslConfiguration().
|
signal |
|
signal |
void void void void void void void void void void void void void void void void void void void void QNetworkReplyHttpImpl::uploadByteDeviceReadyReadSlot | ( | ) |
void void void void void void void void void void void void void void void void void void QNetworkReplyHttpImpl::wantUploadDataSlot | ( | qint64 | ) |