summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkaccesshttpbackend_p.h
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-02-12 01:14:49 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-02-12 03:05:30 (GMT)
commitcc1268a6cbc9797e2a9137f7a0389f3d144a8c0a (patch)
tree60b38471ee1e8fc66a93978f599dca6f12b2a870 /src/network/access/qnetworkaccesshttpbackend_p.h
parentcb9cf8fbe9dd54c011490ee814c0692e61b729df (diff)
downloadQt-cc1268a6cbc9797e2a9137f7a0389f3d144a8c0a.zip
Qt-cc1268a6cbc9797e2a9137f7a0389f3d144a8c0a.tar.gz
Qt-cc1268a6cbc9797e2a9137f7a0389f3d144a8c0a.tar.bz2
Move http resume code into http backend.
Adds two new virtual functions to QNetworkAccessBackend: bool canResume() const; and void setResumeOffset(quint64) canResume() is used to query the existing backend if resuming is supported for the current request. setResumeOffset() is used to set an additional offset which should be applied when the backend posts the request. The default implementation of canResume() returns false (resuming not supported). The default implementation of setResumeOffset() does nothing.
Diffstat (limited to 'src/network/access/qnetworkaccesshttpbackend_p.h')
-rw-r--r--src/network/access/qnetworkaccesshttpbackend_p.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/network/access/qnetworkaccesshttpbackend_p.h b/src/network/access/qnetworkaccesshttpbackend_p.h
index 0eaf003..e5cc0ab 100644
--- a/src/network/access/qnetworkaccesshttpbackend_p.h
+++ b/src/network/access/qnetworkaccesshttpbackend_p.h
@@ -99,6 +99,9 @@ public:
// we return true since HTTP needs to send PUT/POST data again after having authenticated
bool needsResetableUploadData() { return true; }
+ bool canResume() const;
+ void setResumeOffset(quint64 offset);
+
private slots:
void replyReadyRead();
void replyFinished();
@@ -120,6 +123,8 @@ private:
QList<QSslError> pendingIgnoreSslErrorsList;
#endif
+ quint64 resumeOffset;
+
void disconnectFromHttp();
void setupConnection();
void validateCache(QHttpNetworkRequest &httpRequest, bool &loadedFromCache);