00001 #ifndef WPXSTREAM_H 00002 #define WPXSTREAM_H 00003 #include <stdio.h> 00004 #include "libwpd_types.h" 00005 00006 enum WPX_SEEK_TYPE 00007 { 00008 WPX_SEEK_CUR, 00009 WPX_SEEK_SET 00010 }; 00011 00012 class WPXInputStream 00013 { 00014 public: 00015 WPXInputStream(bool supportsOLE) : 00016 m_supportsOLE(supportsOLE) {} 00017 virtual ~WPXInputStream() {} 00018 00019 virtual bool isOLEStream() = 0; 00020 virtual WPXInputStream * getDocumentOLEStream() = 0; 00021 00022 const virtual uint8_t *read(size_t numBytes, size_t &numBytesRead) = 0; 00023 virtual int seek(long offset, WPX_SEEK_TYPE seekType) = 0; 00024 virtual long tell() = 0; 00025 virtual bool atEOS() = 0; 00026 00027 private: 00028 bool m_supportsOLE; 00029 }; 00030 #endif