EBOOKUTF8Stream.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3 * This file is part of the libe-book project.
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
10 #ifndef EBOOKUTF8STREAM_H_INCLUDED
11 #define EBOOKUTF8STREAM_H_INCLUDED
12
13 #include <boost/scoped_ptr.hpp>
14
15 #include <librevenge/librevenge.h>
16
17 namespace libebook
18 {
19
20 class EBOOKCharsetConverter;
21
22 class EBOOKUTF8Stream : public librevenge::RVNGInputStream
23 {
24 public:
25 explicit EBOOKUTF8Stream(librevenge::RVNGInputStream *strm, EBOOKCharsetConverter *converter = 0);
26 virtual ~EBOOKUTF8Stream();
27
28 virtual bool isStructured();
29 virtual unsigned subStreamCount();
30 virtual const char *subStreamName(unsigned id);
31 virtual bool existsSubStream(const char *name);
32 virtual librevenge::RVNGInputStream *getSubStreamByName(const char *name);
33 virtual RVNGInputStream *getSubStreamById(unsigned id);
34
35 virtual const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead);
36 virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType);
37 virtual long tell();
38 virtual bool isEnd();
39
40 private:
41 boost::scoped_ptr<librevenge::RVNGInputStream> m_stream;
42 };
43
44 }
45
46 #endif // EBOOKUTF8STREAM_H_INCLUDED
47
48 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libebook::EBOOKUTF8Stream::seek
virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType)
Definition: EBOOKUTF8Stream.cpp:115
libebook::EBOOKCharsetConverter
Definition: EBOOKCharsetConverter.h:20
libebook::EBOOKUTF8Stream
Definition: EBOOKUTF8Stream.h:22
libebook::EBOOKUTF8Stream::isEnd
virtual bool isEnd()
Definition: EBOOKUTF8Stream.cpp:125
libebook::EBOOKUTF8Stream::read
virtual const unsigned char * read(unsigned long numBytes, unsigned long &numBytesRead)
Definition: EBOOKUTF8Stream.cpp:110
libebook::EBOOKUTF8Stream::subStreamName
virtual const char * subStreamName(unsigned id)
Definition: EBOOKUTF8Stream.cpp:89
libebook::EBOOKUTF8Stream::~EBOOKUTF8Stream
virtual ~EBOOKUTF8Stream()
Definition: EBOOKUTF8Stream.cpp:75
offset
unsigned offset
Definition: IMPParser.cpp:73
name
string name
Definition: CHMStream.cpp:80
libebook::EBOOKUTF8Stream::getSubStreamById
virtual RVNGInputStream * getSubStreamById(unsigned id)
Definition: EBOOKUTF8Stream.cpp:104
libebook::EBOOKUTF8Stream::getSubStreamByName
virtual librevenge::RVNGInputStream * getSubStreamByName(const char *name)
Definition: EBOOKUTF8Stream.cpp:99
libebook::EBOOKUTF8Stream::existsSubStream
virtual bool existsSubStream(const char *name)
Definition: EBOOKUTF8Stream.cpp:94
libebook::EBOOKUTF8Stream::subStreamCount
virtual unsigned subStreamCount()
Definition: EBOOKUTF8Stream.cpp:84
libebook
Definition: CHMParser.cpp:20
libebook::EBOOKUTF8Stream::tell
virtual long tell()
Definition: EBOOKUTF8Stream.cpp:120
libebook::EBOOKUTF8Stream::isStructured
virtual bool isStructured()
Definition: EBOOKUTF8Stream.cpp:79
libebook::EBOOKUTF8Stream::m_stream
boost::scoped_ptr< librevenge::RVNGInputStream > m_stream
Definition: EBOOKUTF8Stream.h:41
libebook::EBOOKUTF8Stream::EBOOKUTF8Stream
EBOOKUTF8Stream(librevenge::RVNGInputStream *strm, EBOOKCharsetConverter *converter=0)
Definition: EBOOKUTF8Stream.cpp:33