1
/****************************************************************************
3
** Copyright (C) 1992-2005 Trolltech AS. All rights reserved.
5
** This file is part of the core module of the Qt Toolkit.
7
** This file may be distributed under the terms of the Q Public License
8
** as defined by Trolltech AS of Norway and appearing in the file
9
** LICENSE.QPL included in the packaging of this file.
11
** This file may be distributed and/or modified under the terms of the
12
** GNU General Public License version 2 as published by the Free Software
13
** Foundation and appearing in the file LICENSE.GPL included in the
14
** packaging of this file.
16
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
17
** information about Qt Commercial License Agreements.
18
** See http://www.trolltech.com/qpl/ for QPL licensing information.
19
** See http://www.trolltech.com/gpl/ for GPL licensing information.
21
** Contact info@trolltech.com if any conditions of this licensing are
24
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
25
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27
****************************************************************************/
28
#ifndef __QRESOURCE_P_H__
29
#define __QRESOURCE_P_H__
31
#include <qfileengine.h>
33
class QResourceFileEnginePrivate;
34
class QResourceFileEngine : public QFileEngine
37
Q_DECLARE_PRIVATE(QResourceFileEngine)
39
explicit QResourceFileEngine(const QString &path);
40
~QResourceFileEngine();
42
virtual void setFileName(const QString &file);
44
virtual bool open(int flags) ;
47
virtual qint64 size() const;
48
virtual qint64 at() const;
49
virtual bool atEnd() const;
50
virtual bool seek(qint64);
51
virtual int ungetch(int);
52
virtual qint64 read(char *data, qint64 maxlen);
53
virtual qint64 write(const char *data, qint64 len);
55
virtual bool remove();
56
virtual bool copy(const QString &newName);
57
virtual bool rename(const QString &newName);
58
virtual bool link(const QString &newName);
60
virtual bool isSequential() const;
62
virtual bool isRelativePath() const;
64
virtual bool mkdir(const QString &dirName, bool createParentDirectories) const;
65
virtual bool rmdir(const QString &dirName, bool recurseParentDirectories) const;
67
virtual bool setSize(qint64 size);
69
virtual QStringList entryList(QDir::Filters filters, const QStringList &filterNames) const;
71
virtual bool caseSensitive() const;
73
virtual FileFlags fileFlags(FileFlags type) const;
75
virtual bool chmod(uint perms);
77
virtual QString fileName(QFileEngine::FileName file) const;
79
virtual uint ownerId(FileOwner) const;
80
virtual QString owner(FileOwner) const;
82
virtual QDateTime fileTime(FileTime time) const;
84
virtual Type type() const;
87
#endif /* __QRESOURCE_P_H__ */