diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2011-01-28 12:53:12 (GMT) |
---|---|---|
committer | Markus Goetz <Markus.Goetz@nokia.com> | 2011-02-21 10:52:15 (GMT) |
commit | f085092a48966a81315a021367086eb69c02e6a6 (patch) | |
tree | df6cdfc7a161d754323296ee5e7e6926a9d972fc /src/network/access/qnetworkaccessbackend_p.h | |
parent | b8fddce9e6f8dbd30e21cc2d8b20bb1bb0bccba8 (diff) | |
download | Qt-f085092a48966a81315a021367086eb69c02e6a6.zip Qt-f085092a48966a81315a021367086eb69c02e6a6.tar.gz Qt-f085092a48966a81315a021367086eb69c02e6a6.tar.bz2 |
QNAM: Threaded HTTP implementation
HTTP requests are run in a separate thread now.
This required some big changes in the QNetworkAccessHttpBackend.
There is a new class QHttpThreadDelegate which lives in the
HTTP thread and is the communication layer between HTTP code
and QNetworkAccessHttpBackend. Communication is done
via signals/slots.
The synchronous HTTP code (private QtWebKit API) also had to
be completely re-worked and uses its own thread now.
Reviewed-by: Peter Hartmann
Task-number: QTBUG-14162
Diffstat (limited to 'src/network/access/qnetworkaccessbackend_p.h')
-rw-r--r-- | src/network/access/qnetworkaccessbackend_p.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/network/access/qnetworkaccessbackend_p.h b/src/network/access/qnetworkaccessbackend_p.h index 26ee61a..644ae2d 100644 --- a/src/network/access/qnetworkaccessbackend_p.h +++ b/src/network/access/qnetworkaccessbackend_p.h @@ -70,7 +70,6 @@ class QNetworkAccessManagerPrivate; class QNetworkReplyImplPrivate; class QAbstractNetworkCache; class QNetworkCacheMetaData; -class QNetworkAccessBackendUploadIODevice; class QNonContiguousByteDevice; // Should support direct file upload from disk or download to disk. @@ -175,7 +174,6 @@ protected: // Create the device used for reading the upload data QNonContiguousByteDevice* createUploadByteDevice(); - // these functions control the downstream mechanism // that is, data that has come via the connection and is going out the backend qint64 nextDownstreamBlockSize() const; @@ -185,6 +183,8 @@ protected: void writeDownstreamDataDownloadBuffer(qint64, qint64); char* getDownloadBuffer(qint64); + QSharedPointer<QNonContiguousByteDevice> uploadByteDevice; + public slots: // for task 251801, needs to be a slot to be called asynchronously void writeDownstreamData(QIODevice *data); @@ -196,19 +196,22 @@ protected slots: void proxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *auth); #endif void authenticationRequired(QAuthenticator *auth); - void cacheCredentials(QAuthenticator *auth); void metaDataChanged(); void redirectionRequested(const QUrl &destination); void sslErrors(const QList<QSslError> &errors); void emitReplyUploadProgress(qint64 bytesSent, qint64 bytesTotal); +protected: + // FIXME In the long run we should get rid of our QNAM architecture + // and scrap this ReplyImpl/Backend distinction. + QNetworkAccessManagerPrivate *manager; + QNetworkReplyImplPrivate *reply; + private: friend class QNetworkAccessManager; friend class QNetworkAccessManagerPrivate; - friend class QNetworkAccessBackendUploadIODevice; friend class QNetworkReplyImplPrivate; - QNetworkAccessManagerPrivate *manager; - QNetworkReplyImplPrivate *reply; + bool synchronous; }; |