IMPLZSSStream.h
Go to the documentation of this file.
1 
2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
3 /* libe-book
4  * Version: MPL 2.0 / LGPLv2.1+
5  *
6  * This Source Code Form is subject to the terms of the Mozilla Public
7  * License, v. 2.0. If a copy of the MPL was not distributed with this
8  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9  *
10  * Alternatively, the contents of this file may be used under the terms
11  * of the GNU Lesser General Public License Version 2.1 or later
12  * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
13  * applicable instead of those above.
14  *
15  * For further information visit http://libebook.sourceforge.net
16  */
17 
18 #ifndef IMPLZSSSTREAM_H_INCLUDED
19 #define IMPLZSSSTREAM_H_INCLUDED
20 
21 #include <boost/scoped_ptr.hpp>
22 
23 #include <libwpd-stream/libwpd-stream.h>
24 
25 namespace libebook
26 {
27 
28 class IMPLZSSStream : public WPXInputStream
29 {
30 // disable copying
31  IMPLZSSStream(const IMPLZSSStream &other);
32  IMPLZSSStream &operator=(const IMPLZSSStream &other);
33 
34 public:
36  {
37  unsigned offsetBits;
38  unsigned lengthBits;
40  unsigned fillPos;
41  char fillChar;
43  bool bigEndian;
44 
45  Configuration();
46  };
47 
48 public:
49  explicit IMPLZSSStream(WPXInputStream *stream, const Configuration &configuration = Configuration());
50  virtual ~IMPLZSSStream();
51 
52  virtual bool isOLEStream();
53  virtual WPXInputStream *getDocumentOLEStream(const char *name);
54 
55  virtual const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead);
56  virtual int seek(long offset, WPX_SEEK_TYPE seekType);
57  virtual long tell();
58  virtual bool atEOS();
59 
60 private:
61  boost::scoped_ptr<WPXInputStream> m_stream;
62 };
63 
64 }
65 
66 #endif // IMPLZSSSTREAM_H_INCLUDED
67 
68 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
boost::scoped_ptr< WPXInputStream > m_stream
Definition: IMPLZSSStream.h:61
bool bigEndian
Definition: IMPLZSSStream.h:43
unsigned uncompressedLength
Definition: IMPLZSSStream.h:39
virtual ~IMPLZSSStream()
Definition: IMPLZSSStream.cpp:199
virtual bool atEOS()
Definition: IMPLZSSStream.cpp:228
virtual const unsigned char * read(unsigned long numBytes, unsigned long &numBytesRead)
Definition: IMPLZSSStream.cpp:213
virtual long tell()
Definition: IMPLZSSStream.cpp:223
unsigned offsetBits
Definition: IMPLZSSStream.h:37
virtual WPXInputStream * getDocumentOLEStream(const char *name)
Definition: IMPLZSSStream.cpp:208
IMPLZSSStream & operator=(const IMPLZSSStream &other)
Configuration()
Definition: IMPLZSSStream.cpp:176
unsigned offset
Definition: IMPParser.cpp:78
IMPLZSSStream(const IMPLZSSStream &other)
char fillChar
Definition: IMPLZSSStream.h:41
unsigned fillPos
Definition: IMPLZSSStream.h:40
Definition: IMPLZSSStream.h:35
const char * name
Definition: FB2Token.cpp:26
unsigned lengthBits
Definition: IMPLZSSStream.h:38
virtual int seek(long offset, WPX_SEEK_TYPE seekType)
Definition: IMPLZSSStream.cpp:218
virtual bool isOLEStream()
Definition: IMPLZSSStream.cpp:203
Definition: IMPLZSSStream.h:28
bool allowOverflow
Definition: IMPLZSSStream.h:42

Generated for libe-book by doxygen 1.8.5