diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2010-08-12 09:20:14 (GMT) |
---|---|---|
committer | Markus Goetz <Markus.Goetz@nokia.com> | 2010-08-12 09:28:19 (GMT) |
commit | 26af575213763c8202f1a142f42257d473076529 (patch) | |
tree | 8e7c32c926bf7ff92e19c39e34969f31f5cc56f5 /src/network/access/qnetworkreplyimpl_p.h | |
parent | 66a251c63191ae4dde4c9c3d6b2fcf75708c645a (diff) | |
download | Qt-26af575213763c8202f1a142f42257d473076529.zip Qt-26af575213763c8202f1a142f42257d473076529.tar.gz Qt-26af575213763c8202f1a142f42257d473076529.tar.bz2 |
QNAM Zerocopy: QNAM implementation part
Reviewed-by: Peter Hartmann
Reviewed-by: Jeremy Katz
Reviewed-by: Aleksandar Sasha Babic
Diffstat (limited to 'src/network/access/qnetworkreplyimpl_p.h')
-rw-r--r-- | src/network/access/qnetworkreplyimpl_p.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/network/access/qnetworkreplyimpl_p.h b/src/network/access/qnetworkreplyimpl_p.h index 38084bd..ab11ebe 100644 --- a/src/network/access/qnetworkreplyimpl_p.h +++ b/src/network/access/qnetworkreplyimpl_p.h @@ -62,6 +62,7 @@ #include "QtCore/qbuffer.h" #include "private/qringbuffer_p.h" #include "private/qbytedata_p.h" +#include <QVarLengthArray> QT_BEGIN_NAMESPACE @@ -163,6 +164,9 @@ public: void appendDownstreamData(QIODevice *data); void appendDownstreamData(const QByteArray &data); + char* getDownloadBuffer(qint64 size); + void appendDownstreamDataDownloadBuffer(qint64, qint64); + void finished(); void error(QNetworkReply::NetworkError code, const QString &errorString); void metaDataChanged(); @@ -191,6 +195,7 @@ public: QList<QNetworkProxy> proxyList; #endif + // Used for normal downloading. For "zero copy" the downloadBuffer is used QByteDataBuffer readBuffer; qint64 bytesDownloaded; qint64 lastBytesDownloaded; @@ -202,6 +207,11 @@ public: State state; + // only used when the "zero copy" style is used. Else readBuffer is used. + QSharedPointer< QVarLengthArray<char, 0> > downloadBufferArray; + char* downloadBuffer; + qint64 downloadBufferPosition; + Q_DECLARE_PUBLIC(QNetworkReplyImpl) }; |