ABWZlibStream.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /*
00003  * This file is part of the libabw project.
00004  *
00005  * This Source Code Form is subject to the terms of the Mozilla Public
00006  * License, v. 2.0. If a copy of the MPL was not distributed with this
00007  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
00008  */
00009 
00010 #ifndef __ABWZLIBSTREAM_H__
00011 #define __ABWZLIBSTREAM_H__
00012 
00013 #include <vector>
00014 #include <libwpd-stream/libwpd-stream.h>
00015 
00016 namespace libabw
00017 {
00018 
00019 class ABWZlibStream : public WPXInputStream
00020 {
00021 public:
00022   ABWZlibStream(WPXInputStream *input);
00023   ~ABWZlibStream() {}
00024 
00025   bool isOLEStream()
00026   {
00027     return false;
00028   }
00029   WPXInputStream *getDocumentOLEStream(const char *)
00030   {
00031     return 0;
00032   }
00033 
00034   const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead);
00035   int seek(long offset, WPX_SEEK_TYPE seekType);
00036   long tell();
00037   bool atEOS();
00038 
00039 private:
00040   WPXInputStream *m_input;
00041   volatile long m_offset;
00042   std::vector<unsigned char> m_buffer;
00043   ABWZlibStream(const ABWZlibStream &);
00044   ABWZlibStream &operator=(const ABWZlibStream &);
00045 };
00046 
00047 } // namespace libabw
00048 
00049 #endif // __ABWZLIBSTREAM_H__
00050 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */