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 QNETWORKFILE_H
5#define QNETWORKFILE_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>
19#include <QFile>
20#include <qnetworkreply.h>
21
22QT_BEGIN_NAMESPACE
23
24class QNetworkFile : public QFile
25{
26 Q_OBJECT
27public:
28 QNetworkFile();
29 QNetworkFile(const QString &name);
30 using QFile::open;
31
32public Q_SLOTS:
33 void open();
34 void close() override;
35
36Q_SIGNALS:
37 void finished(bool ok);
38 void headerRead(QNetworkRequest::KnownHeaders header, const QVariant &value);
39 void error(QNetworkReply::NetworkError error, const QString &message);
40};
41
42QT_END_NAMESPACE
43
44#endif // QNETWORKFILE_H
45

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