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>
20#include "qnetworkaccessbackend_p.h"
21#include "qnetworkrequest.h"
22#include "qnetworkreply.h"
23
24QT_BEGIN_NAMESPACE
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
48

Provided by KDAB

Privacy Policy
Start learning QML with our Intro Training
Find out more

source code of qtbase/src/network/access/qnetworkaccesscachebackend_p.h