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 QRESOURCE_P_H |
5 | #define QRESOURCE_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 purely as an |
12 | // implementation detail. This header file may change from version to |
13 | // version without notice, or even be removed. |
14 | // |
15 | // We mean it. |
16 | // |
17 | |
18 | #include "qabstractfileengine_p.h" |
19 | |
20 | QT_BEGIN_NAMESPACE |
21 | |
22 | class QResourceFileEnginePrivate; |
23 | class QResourceFileEngine : public QAbstractFileEngine |
24 | { |
25 | private: |
26 | Q_DECLARE_PRIVATE(QResourceFileEngine) |
27 | public: |
28 | explicit QResourceFileEngine(const QString &path); |
29 | ~QResourceFileEngine(); |
30 | |
31 | void setFileName(const QString &file) override; |
32 | |
33 | bool open(QIODevice::OpenMode flags, std::optional<QFile::Permissions> permissions) override; |
34 | bool close() override; |
35 | bool flush() override; |
36 | qint64 size() const override; |
37 | qint64 pos() const override; |
38 | virtual bool atEnd() const; |
39 | bool seek(qint64) override; |
40 | qint64 read(char *data, qint64 maxlen) override; |
41 | |
42 | bool caseSensitive() const override; |
43 | |
44 | FileFlags fileFlags(FileFlags type) const override; |
45 | |
46 | QString fileName(QAbstractFileEngine::FileName file) const override; |
47 | |
48 | uint ownerId(FileOwner) const override; |
49 | |
50 | QDateTime fileTime(FileTime time) const override; |
51 | |
52 | Iterator *beginEntryList(QDir::Filters filters, const QStringList &filterNames) override; |
53 | Iterator *endEntryList() override; |
54 | |
55 | bool extension(Extension extension, const ExtensionOption *option = nullptr, ExtensionReturn *output = nullptr) override; |
56 | bool supportsExtension(Extension extension) const override; |
57 | }; |
58 | |
59 | QT_END_NAMESPACE |
60 | |
61 | #endif // QRESOURCE_P_H |
62 |