5#ifndef QIOSFILEENGINEASSETSLIBRARY_H
6#define QIOSFILEENGINEASSETSLIBRARY_H
8#include <QtCore/private/qabstractfileengine_p.h>
22 bool open(QIODevice::OpenMode openMode, std::optional<QFile::Permissions> permissions)
override;
26 qint64 read(
char *data, qint64 maxlen)
override;
28 bool seek(qint64 pos)
override;
32#ifndef QT_NO_FILESYSTEMITERATOR
34 const QStringList &filterNames)
override;
37 void setError(QFile::FileError error,
const QString &str) { QAbstractFileEngine::setError(error, str); }
45 ALAsset *loadAsset()
const;
QIOSAssetData(const QString &assetUrl, QIOSFileEngineAssetsLibrary *engine)
QIOSAssetEnumerator(ALAssetsLibrary *assetsLibrary, ALAssetsGroupType type)
~QIOSFileEngineAssetsLibrary()
QString fileName(FileName file) const override
Return the file engine's current file name in the format specified by file.
void setError(QFile::FileError error, const QString &str)
bool open(QIODevice::OpenMode openMode, std::optional< QFile::Permissions > permissions) override
Opens the file in the specified mode.
qint64 pos() const override
Returns the current file position.
void setFileName(const QString &file) override
Sets the file engine's file name to file.
bool seek(qint64 pos) override
Sets the file position to the given offset.
FileFlags fileFlags(FileFlags type) const override
This function should return the set of OR'd flags that are true for the file engine's file,...
qint64 read(char *data, qint64 maxlen) override
Reads a number of characters from the file into data.
qint64 size() const override
Returns the size of the file.
QIOSFileEngineAssetsLibrary(const QString &fileName)
IteratorUniquePtr beginEntryList(const QString &path, QDirListing::IteratorFlags filters, const QStringList &filterNames) override
Returns a QAbstractFileEngine::IteratorUniquePtr, that can be used to iterate over the entries in pat...
bool close() override
Closes the file, returning true if successful; otherwise returns false.
QIOSAssetEnumerator * m_enumerator
Q_FORWARD_DECLARE_OBJC_CLASS(ALAsset)
static const int kBufferSize
static QThreadStorage< QPointer< QIOSAssetData > > g_assetDataCache
static bool ensureAuthorizationDialogNotBlocked()
static ALAsset * kNoAsset
static QThreadStorage< QString > g_iteratorCurrentUrl