4#ifndef QNETWORKREPLYWASMIMPL_H
5#define QNETWORKREPLYWASMIMPL_H
22#include <QtCore/qfile.h>
24#include <private/qtnetworkglobal_p.h>
25#include <private/qabstractfileengine_p.h>
27#include <emscripten.h>
28#include <emscripten/fetch.h>
44 virtual void abort()
override;
47 virtual void close()
override;
80 enum class State { SCHEDULED, SENT, FINISHED, CANCELED, TO_BE_DESTROYED };
105 void setStatusCode(
int status,
const QByteArray &statusText);
111 void _q_bufferOutgoingData();
112 void _q_bufferOutgoingDataFinished();
129 static void downloadProgress(emscripten_fetch_t *fetch);
130 static void downloadFailed(emscripten_fetch_t *fetch);
131 static void downloadSucceeded(emscripten_fetch_t *fetch);
132 static void stateChange(emscripten_fetch_t *fetch);
138 void setReplyFinished();
\inmodule QtCore \reentrant
QString errorString() const
Returns a human-readable description of the last device error that occurred.
Operation
Indicates the operation this reply is processing.
qint64 downloadBufferReadPosition
std::shared_ptr< QRingBuffer > outgoingDataBuffer
qint64 downloadBufferCurrentSize
QByteArray downloadBuffer
emscripten_fetch_t * m_fetch
std::shared_ptr< QAtomicInt > pendingDownloadData
std::shared_ptr< QAtomicInt > pendingDownloadProgress
QNetworkAccessManagerPrivate * managerPrivate
FetchContext * m_fetchContext
qint64 size() const override
For open random-access devices, this function returns the size of the device.
virtual qint64 bytesAvailable() const override
Returns the number of bytes that are available for reading.
void emitDataReadProgress(qint64 done, qint64 total)) Q_PRIVATE_SLOT(d_func()
virtual void abort() override
Aborts the operation immediately and close down any network connections still open.
void setup(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice *outgoingData)
virtual bool isSequential() const override
QNetworkReplyWasmImpl(QObject *parent=nullptr)
virtual void close() override
Closes this device for reading.
The QNetworkReply class contains the data and headers for a request sent with QNetworkAccessManager.
NetworkError
Indicates all possible error conditions found during the processing of the request.
QNetworkRequest request() const
Returns the request that was posted for this reply.
The QNetworkRequest class holds a request to be sent with QNetworkAccessManager.
QObject * parent() const
Returns a pointer to the parent object.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
static QString methodName(const QDBusIntrospection::Method &method)
static QNetworkReply::NetworkError statusCodeFromHttp(int httpStatusCode, const QUrl &url)
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
QUrl url("example.com")
[constructor-url-reference]
QNetworkRequest request(url)
The FetchContext class ensures the requestData object remains valid while a fetch operation is pendin...
FetchContext(QNetworkReplyWasmImplPrivate *networkReply)