Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qnetworkaccesscachebackend_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// Qt-Security score:significant reason:default
4
5#ifndef QNETWORKACCESSCACHEBACKEND_P_H
6#define QNETWORKACCESSCACHEBACKEND_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists for the convenience
13// of the Network Access API. This header file may change from
14// version to version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtNetwork/private/qtnetworkglobal_p.h>
22#include "qnetworkreply.h"
23
25
26class QNetworkAccessCacheBackend : public QNetworkAccessBackend
27{
28
29public:
30 QNetworkAccessCacheBackend();
31 ~QNetworkAccessCacheBackend();
32
33 void open() override;
34 void close() override;
35 bool start() override;
36 qint64 bytesAvailable() const override;
37 qint64 read(char *data, qint64 maxlen) override;
38
39private:
40 bool sendCacheContents();
41
42 QIODevice *device = nullptr;
43};
44
45QT_END_NAMESPACE
46
47#endif // QNETWORKACCESSCACHEBACKEND_P_H
QNetworkReplyImplPrivate * m_reply
QNetworkAccessBackend::SecurityFeatures m_securityFeatures
QNetworkAccessBackend::IOFeatures m_ioFeatures
QNetworkAccessManagerPrivate * m_manager
std::shared_ptr< QNonContiguousByteDevice > uploadByteDevice
QNetworkAccessBackend::TargetTypes m_targetTypes
QStringList backendSupportedSchemes() const
QNetworkAccessBackend * findBackend(QNetworkAccessManager::Operation op, const QNetworkRequest &request)
std::vector< InternalNotifications > pendingNotifications
void setDownloadBuffer(QSharedPointer< char > sp, qint64 size)
void error(QNetworkReply::NetworkError code, const QString &errorString)
void appendDownstreamDataDownloadBuffer(qint64, qint64)
QSharedPointer< char > downloadBufferPointer
QNetworkAccessBackend * backend
void appendDownstreamData(QIODevice *data)
void setup(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice *outgoingData)
void emitUploadProgress(qint64 bytesSent, qint64 bytesTotal)
void backendNotify(InternalNotifications notification)
std::shared_ptr< QRingBuffer > outgoingDataBuffer
QAbstractNetworkCache * networkCache() const
void appendDownstreamData(QByteDataBuffer &data)
char * getDownloadBuffer(qint64 size)
void consume(qint64 count)
void sslErrors(const QList< QSslError > &errors)
QList< QNetworkProxy > proxyList
void redirectionRequested(const QUrl &target)
void setCachingEnabled(bool enable)
virtual qint64 bytesAvailable() const override
Returns the number of bytes available for reading with QIODevice::read().
virtual qint64 readData(char *data, qint64 maxlen) override
virtual void ignoreSslErrorsImplementation(const QList< QSslError > &errors) override
virtual void setReadBufferSize(qint64 size) override
Sets the size of the read buffer to be size bytes.
virtual void close() override
Closes this device for reading.
virtual void abort() override
Aborts the operation immediately and closes any network connections still open.
virtual bool event(QEvent *) override
void void void void _q_bufferOutgoingDataFinished()) protected void setSslConfigurationImplementation(const QSslConfiguration &configuration) override
virtual void ignoreSslErrors() override
If this function is called, SSL errors related to network connection will be ignored,...
The QNetworkReply class contains the data and headers for a request sent with QNetworkAccessManager.
The QSslPreSharedKeyAuthenticator class provides authentication data for pre shared keys (PSK) cipher...
Q_DECLARE_TYPEINFO(QNetworkReplyImplPrivate::InternalNotifications, Q_PRIMITIVE_TYPE)