blokkalfileengine.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef BLOKKAL_FILEENGINE_H
00021 #define BLOKKAL_FILEENGINE_H
00022
00023 #include <QtCore/QAbstractFileEngine>
00024 #include <QtCore/QAbstractFileEngineHandler>
00025
00026 #include "blokkal_export.h"
00027
00028 namespace Blokkal {
00035 class BLOKKAL_EXPORT FileEngineHandler : public QAbstractFileEngineHandler {
00036 public:
00040 virtual QAbstractFileEngine * create( const QString & fileName ) const;
00041 };
00042
00058 class BLOKKAL_EXPORT FileEngine : public QAbstractFileEngine {
00059 public:
00060 virtual ~FileEngine( void );
00061
00062 virtual bool caseSensitive( void ) const;
00063 virtual bool close( void );
00064 virtual bool copy( const QString & newName );
00065 virtual QStringList entryList( QDir::Filters filters, const QStringList & filterNames ) const;
00066 virtual FileFlags fileFlags( FileFlags type = FileInfoAll ) const;
00067 virtual QString fileName( FileName file = DefaultName ) const;
00068 virtual QDateTime fileTime( FileTime time ) const;
00069 virtual bool isRelativePath( void ) const;
00070 virtual bool isSequential( void ) const;
00071 virtual bool mkdir( const QString & dirName, bool createParentDirectories ) const;
00072 virtual bool open( QIODevice::OpenMode mode );
00073 virtual QString owner( FileOwner owner ) const;
00074 virtual unsigned int ownerId( FileOwner owner ) const;
00075 virtual qint64 pos( void ) const;
00076 virtual qint64 read( char * data, qint64 maxlen );
00077 virtual qint64 readLine( char * data, qint64 maxlen );
00078 virtual bool remove( void );
00079 virtual bool rename( const QString & newName );
00080 virtual bool rmdir( const QString & dirName, bool recurseParentDirectories ) const;
00081 virtual bool seek( qint64 offset );
00082 virtual void setFileName( const QString & file );
00083 virtual bool setPermissions( uint perms );
00084 virtual bool setSize( qint64 size );
00085 virtual qint64 size( void ) const;
00086 virtual qint64 write( const char * data, qint64 len );
00087
00088
00089 private:
00090 FileEngine( void );
00091 friend class FileEngineHandler;
00092
00093 class Private;
00094 Private * const d;
00095 };
00096
00097 }
00098
00099 #endif