QGZipDevice.h

Go to the documentation of this file.
00001 /********************************************************************************
00002 *                                                                               *
00003 *                          Filter device applying .gz                           *
00004 *                                                                               *
00005 *********************************************************************************
00006 *        Copyright (C) 2003 by Niall Douglas.   All Rights Reserved.            *
00007 *       NOTE THAT I DO NOT PERMIT ANY OF MY CODE TO BE PROMOTED TO THE GPL      *
00008 *********************************************************************************
00009 * This code is free software; you can redistribute it and/or modify it under    *
00010 * the terms of the GNU Library General Public License v2.1 as published by the  *
00011 * Free Software Foundation EXCEPT that clause 3 does not apply ie; you may not  *
00012 * "upgrade" this code to the GPL without my prior written permission.           *
00013 * Please consult the file "License_Addendum2.txt" accompanying this file.       *
00014 *                                                                               *
00015 * This code is distributed in the hope that it will be useful,                  *
00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of                *
00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                          *
00018 *********************************************************************************
00019 * $Id:                                                                          *
00020 ********************************************************************************/
00021 
00022 #ifndef QGZIPDEVICE_H
00023 #define QGZIPDEVICE_H
00024 
00025 #include "QIODevice.h"
00026 
00027 namespace FX {
00028 
00069 struct QGZipDevicePrivate;
00070 class FXAPIR QGZipDevice : public QIODevice
00071 {
00072     QGZipDevicePrivate *p;
00073     QGZipDevice(const QGZipDevice &);
00074     QGZipDevice &operator=(const QGZipDevice &);
00075 public:
00076     QGZipDevice(QIODevice *gzdata=0);
00077     ~QGZipDevice();
00079     QIODevice *GZData() const;
00081     void setGZData(QIODevice *gzdata);
00082 
00083     virtual bool open(FXuint mode);
00084     virtual void close();
00085     virtual void flush();
00086     virtual FXfval size() const;
00087     virtual void truncate(FXfval size);
00088     virtual FXfval at() const;
00089     virtual bool at(FXfval newpos);
00090     virtual bool atEnd() const;
00091     virtual FXuval readBlock(char *data, FXuval maxlen);
00092     virtual FXuval writeBlock(const char *data, FXuval maxlen);
00093     virtual FXuval readBlockFrom(char *data, FXuval maxlen, FXfval pos);
00094     virtual FXuval writeBlockTo(FXfval pos, const char *data, FXuval maxlen);
00095     virtual int getch();
00096     virtual int putch(int c);
00097     virtual int ungetch(int c);
00098 };
00099 
00100 } // namespace
00101 
00102 #endif

(C) 2002-2009 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Nov 20 18:31:25 2009 for TnFOX by doxygen v1.4.7