Scribus
Open source desktop publishing at your fingertips
WPGInternalStream.h
1 /* libwpg
2  * Copyright (C) 2004-2005 William Lachance (wrlach@gmail.com)
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
17  *
18  * For further information visit http://libwpg.sourceforge.net
19  */
20 
21 /* "This product is not manufactured, approved, or supported by
22  * Corel Corporation or Corel Corporation Limited."
23  */
24 
25 #ifndef WPGINTERNALSTREAM_H
26 #define WPGINTERNALSTREAM_H
27 #include "WPXStream.h"
28 
30 {
31 public:
32  WPGInternalInputStream(const unsigned char *data, const size_t size);
33  virtual ~WPGInternalInputStream();
34 
35  virtual bool isOLEStream() { return false; }
36  virtual WPXInputStream * getDocumentOLEStream() { return 0; }
37 
38  const virtual uint8_t *read(size_t numBytes, size_t &numBytesRead);
39  virtual int seek(long offset, WPX_SEEK_TYPE seekType);
40  virtual long tell();
41  virtual bool atEOS();
42 
43 private:
44  long m_offset;
45  const size_t m_size;
46  const unsigned char *m_data;
47  unsigned char *m_tmpBuf;
50 };
51 
52 #endif
virtual long tell()
Definition: WPGInternalStream.cpp:95
virtual WPXInputStream * getDocumentOLEStream()
Definition: WPGInternalStream.h:36
Definition: WPXStream.h:36
virtual int seek(long offset, WPX_SEEK_TYPE seekType)
Definition: WPGInternalStream.cpp:74
virtual const uint8_t * read(size_t numBytes, size_t &numBytesRead)
Definition: WPGInternalStream.cpp:43
virtual bool atEOS()
Definition: WPGInternalStream.cpp:100
virtual bool isOLEStream()
Definition: WPGInternalStream.h:35
Definition: WPGInternalStream.h:29