4 * This file is part of CameraPlus.
6 * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 #ifndef QML_FILE_ENGINE_H
24 #define QML_FILE_ENGINE_H
26 #include <QFSFileEngine>
30 class QmlFileEngine : public QFSFileEngine {
32 QmlFileEngine(const QString& fileName);
34 virtual void setFileName(const QString& file);
35 virtual bool open(QIODevice::OpenMode flags);
38 virtual qint64 size() const;
39 virtual qint64 pos() const;
40 virtual bool atEnd() const;
41 virtual bool seek(qint64 pos);
42 virtual qint64 read(char *data, qint64 len);
43 virtual qint64 write(const char *data, qint64 len);
44 virtual bool remove();
45 virtual bool copy(const QString& newName);
46 virtual bool rename(const QString& newName);
47 virtual bool link(const QString& newName);
48 virtual bool isSequential() const;
49 virtual bool isRelativePath() const;
50 virtual bool mkdir(const QString& dirName, bool createParentDirectories) const;
51 virtual bool rmdir(const QString& dirName, bool recurseParentDirectories) const;
52 virtual bool setSize(qint64 size);
53 virtual QStringList entryList(QDir::Filters filters, const QStringList& filterNames) const;
54 virtual bool caseSensitive() const;
55 virtual FileFlags fileFlags(FileFlags type) const;
56 virtual bool setPermissions(uint perms);
57 virtual QString fileName(QAbstractFileEngine::FileName file) const;
58 virtual uint ownerId(FileOwner owner) const;
59 virtual QString owner(FileOwner owner) const;
60 virtual QDateTime fileTime(FileTime time) const;
62 // virtual Iterator *beginEntryList(QDir::Filters filters, const QStringList &filterNames);
63 // virtual Iterator *endEntryList();
64 // bool extension(Extension extension, const ExtensionOption *option = 0, ExtensionReturn *output = 0);
65 // bool supportsExtension(Extension extension) const;
73 #endif /* QML_FILE_ENGINE_H */