Qt 6.x
The Qt SDK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
qnetworkaccessdebugpipebackend_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QNETWORKACCESSDEBUGPIPEBACKEND_P_H
5#define QNETWORKACCESSDEBUGPIPEBACKEND_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists for the convenience
12// of the Network Access API. This header file may change from
13// version to version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtNetwork/private/qtnetworkglobal_p.h>
20#include "qnetworkrequest.h"
21#include "qnetworkreply.h"
22#include "qtcpsocket.h"
23
25
26#ifdef QT_BUILD_INTERNAL
27
28class QNetworkAccessDebugPipeBackend: public QNetworkAccessBackend
29{
31public:
32 QNetworkAccessDebugPipeBackend();
33 virtual ~QNetworkAccessDebugPipeBackend();
34
35 void open() override;
36 void close() override;
37
38 qint64 read(char *data, qint64 maxlen) override;
39 qint64 bytesAvailable() const override;
40
41protected:
42 void pushFromUpstreamToSocket();
43 void possiblyFinish();
44
45private slots:
46 void uploadReadyReadSlot();
47 void socketReadyRead();
48 void socketBytesWritten(qint64 bytes);
49 void socketError();
50 void socketDisconnected();
51 void socketConnected();
52
53private:
55 bool bareProtocol;
56 bool hasUploadFinished;
57 bool hasDownloadFinished;
58 bool hasEverythingFinished;
59
60 qint64 bytesDownloaded;
61 qint64 bytesUploaded;
62};
63
64class QNetworkAccessDebugPipeBackendFactory: public QNetworkAccessBackendFactory
65{
66public:
67 virtual QStringList supportedSchemes() const override;
69 const QNetworkRequest &request) const override;
70};
71
72#endif // QT_BUILD_INTERNAL
73
75
76#endif
virtual QStringList supportedSchemes() const =0
Override this method in your own derived class to let Qt know what schemes your class can handle.
QNetworkAccessBackend is the base class for implementing support for schemes used by QNetworkAccessMa...
virtual qint64 read(char *data, qint64 maxlen)
Implement this function to support reading from the resource made available by your plugin.
virtual void close()=0
You must implement this function in your derived class.
virtual qint64 bytesAvailable() const =0
You must implement this function in your derived class.
virtual void open()=0
You must implement this in your derived class.
Operation
Indicates the operation this reply is processing.
The QNetworkRequest class holds a request to be sent with QNetworkAccessManager.
\inmodule QtCore
The QTcpSocket class provides a TCP socket.
Definition qtcpsocket.h:18
Combined button and popup list for selecting options.
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
#define Q_OBJECT
#define slots
long long qint64
Definition qtypes.h:55
QTcpSocket * socket
[1]
QNetworkRequest request(url)
view create()