EBOOKUTF8Stream.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* libe-book
3  * Version: MPL 2.0 / LGPLv2.1+
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * Alternatively, the contents of this file may be used under the terms
10  * of the GNU Lesser General Public License Version 2.1 or later
11  * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
12  * applicable instead of those above.
13  *
14  * For further information visit http://libebook.sourceforge.net
15  */
16 
17 #ifndef EBOOKUTF8STREAM_H_INCLUDED
18 #define EBOOKUTF8STREAM_H_INCLUDED
19 
20 #include <boost/scoped_ptr.hpp>
21 
22 #include <libwpd-stream/WPXStream.h>
23 
24 namespace libebook
25 {
26 
27 class EBOOKCharsetConverter;
28 
29 class EBOOKUTF8Stream : public WPXInputStream
30 {
31 public:
32  explicit EBOOKUTF8Stream(WPXInputStream *strm, EBOOKCharsetConverter *converter = 0);
33  virtual ~EBOOKUTF8Stream();
34 
35  virtual bool isOLEStream();
36  virtual WPXInputStream *getDocumentOLEStream(const char *name);
37 
38  virtual const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead);
39  virtual int seek(long offset, WPX_SEEK_TYPE seekType);
40  virtual long tell();
41  virtual bool atEOS();
42 
43 private:
44  boost::scoped_ptr<WPXInputStream> m_stream;
45 };
46 
47 }
48 
49 #endif // EBOOKUTF8STREAM_H_INCLUDED
50 
51 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
virtual bool isOLEStream()
Definition: EBOOKUTF8Stream.cpp:83
EBOOKUTF8Stream(WPXInputStream *strm, EBOOKCharsetConverter *converter=0)
Definition: EBOOKUTF8Stream.cpp:40
Definition: EBOOKCharsetConverter.h:27
Definition: EBOOKUTF8Stream.h:29
virtual int seek(long offset, WPX_SEEK_TYPE seekType)
Definition: EBOOKUTF8Stream.cpp:98
virtual const unsigned char * read(unsigned long numBytes, unsigned long &numBytesRead)
Definition: EBOOKUTF8Stream.cpp:93
boost::scoped_ptr< WPXInputStream > m_stream
Definition: EBOOKUTF8Stream.h:44
virtual ~EBOOKUTF8Stream()
Definition: EBOOKUTF8Stream.cpp:79
unsigned offset
Definition: IMPParser.cpp:78
virtual long tell()
Definition: EBOOKUTF8Stream.cpp:103
const char * name
Definition: FB2Token.cpp:26
virtual bool atEOS()
Definition: EBOOKUTF8Stream.cpp:108
virtual WPXInputStream * getDocumentOLEStream(const char *name)
Definition: EBOOKUTF8Stream.cpp:88

Generated for libe-book by doxygen 1.8.5