kio
kfilterdev.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __kfilterdev_h
00019 #define __kfilterdev_h
00020
00021 #include <qiodevice.h>
00022 #include <qstring.h>
00023 #include <kdelibs_export.h>
00024
00025 class QFile;
00026 class KFilterBase;
00027
00036 class KIO_EXPORT KFilterDev : public QIODevice
00037 {
00038 public:
00045 KFilterDev( KFilterBase * filter, bool autoDeleteFilterBase = false );
00050 virtual ~KFilterDev();
00051
00056 virtual bool open( int mode );
00061 virtual void close();
00062 virtual void flush();
00063
00069 void setOrigFileName( const QCString & fileName );
00070
00077 void setSkipHeaders();
00078
00079
00080 virtual QIODevice::Offset size() const;
00081
00082 virtual QIODevice::Offset at() const;
00086 virtual bool at( QIODevice::Offset );
00087
00088 virtual bool atEnd() const;
00089
00090 virtual Q_LONG readBlock( char *data, Q_ULONG maxlen );
00091 virtual Q_LONG writeBlock( const char *data, Q_ULONG len );
00092
00093
00094 virtual int getch();
00095 virtual int putch( int );
00096 virtual int ungetch( int );
00097
00098 #ifdef KDE_NO_COMPAT
00099 private:
00100 #endif
00101
00108 static QIODevice* createFilterDevice(KFilterBase* base, QFile* file) KDE_DEPRECATED;
00109 public:
00110
00137 static QIODevice * deviceForFile( const QString & fileName, const QString & mimetype = QString::null,
00138 bool forceFilter = false );
00139
00158 static QIODevice * device( QIODevice* inDevice, const QString & mimetype);
00159
00160
00181 static QIODevice * device( QIODevice* inDevice, const QString & mimetype, bool autoDeleteInDevice );
00182
00183 private:
00184 KFilterBase *filter;
00185 class KFilterDevPrivate;
00186 KFilterDevPrivate * d;
00187 };
00188
00189
00190 #endif