summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkaccessdebugpipebackend_p.h
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2009-05-13 11:19:24 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2009-05-13 11:42:05 (GMT)
commitc2c69c117407990e5c2d8900f4aa27979273084a (patch)
tree92a9abff79c1e6a124fdf5da7bfc032537b789e3 /src/network/access/qnetworkaccessdebugpipebackend_p.h
parent51ad9b25af4379d80ba1992994beffca548194a7 (diff)
downloadQt-c2c69c117407990e5c2d8900f4aa27979273084a.zip
Qt-c2c69c117407990e5c2d8900f4aa27979273084a.tar.gz
Qt-c2c69c117407990e5c2d8900f4aa27979273084a.tar.bz2
QNAM: Upload architecture change: Changed all QNAM backends
Reviewed-by: Peter Hartmann Reviewed-by: Thiago Macieira
Diffstat (limited to 'src/network/access/qnetworkaccessdebugpipebackend_p.h')
-rw-r--r--src/network/access/qnetworkaccessdebugpipebackend_p.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/network/access/qnetworkaccessdebugpipebackend_p.h b/src/network/access/qnetworkaccessdebugpipebackend_p.h
index 73a35cf..a13edc4 100644
--- a/src/network/access/qnetworkaccessdebugpipebackend_p.h
+++ b/src/network/access/qnetworkaccessdebugpipebackend_p.h
@@ -66,35 +66,38 @@ class QNetworkAccessDebugPipeBackend: public QNetworkAccessBackend
{
Q_OBJECT
public:
- struct DataPacket;
QNetworkAccessDebugPipeBackend();
virtual ~QNetworkAccessDebugPipeBackend();
virtual void open();
virtual void closeDownstreamChannel();
- virtual void closeUpstreamChannel();
virtual bool waitForDownstreamReadyRead(int msecs);
- virtual bool waitForUpstreamBytesWritten(int msecs);
- virtual void upstreamReadyRead();
virtual void downstreamReadyWrite();
+protected:
+ void pushFromSocketToDownstream();
+ void pushFromUpstreamToSocket();
+ void possiblyFinish();
+ QNonContiguousByteDevice *uploadByteDevice;
+
private slots:
+ void uploadReadyReadSlot();
void socketReadyRead();
void socketBytesWritten(qint64 bytes);
void socketError();
void socketDisconnected();
+ void socketConnected();
private:
QTcpSocket socket;
- qint32 incomingPacketSize;
- bool readyReadEmitted;
- bool bytesWrittenEmitted;
bool bareProtocol;
+ bool hasUploadFinished;
+ bool hasDownloadFinished;
+ bool hasEverythingFinished;
- bool send(const DataPacket &packet);
- bool canReceive();
- bool receive(DataPacket &packet);
+ qint64 bytesDownloaded;
+ qint64 bytesUploaded;
};
class QNetworkAccessDebugPipeBackendFactory: public QNetworkAccessBackendFactory