kio Library API Documentation

kfilterdev.h

00001 /* This file is part of the KDE libraries 00002 Copyright (C) 2000 David Faure <faure@kde.org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License version 2 as published by the Free Software Foundation. 00007 00008 This library is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 Library General Public License for more details. 00012 00013 You should have received a copy of the GNU Library General Public License 00014 along with this library; see the file COPYING.LIB. If not, write to 00015 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00016 Boston, MA 02111-1307, USA. 00017 */ 00018 #ifndef __kfilterdev_h 00019 #define __kfilterdev_h 00020 00021 #include <qiodevice.h> 00022 #include <qstring.h> 00023 #include <kdemacros.h> 00024 00025 class QFile; 00026 class KFilterBase; 00027 00036 class 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 // Not implemented 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 //int readLine( char *data, uint maxlen ); 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 // BIC: merge with device() method below, using default value for autoDeleteInDevice 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
KDE Logo
This file is part of the documentation for kio Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Sep 29 09:43:52 2004 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2003