+#define wxStream_NOERROR wxSTR_NOERROR
+#define wxStream_EOF wxSTR_EOF
+#define wxStream_WRITE_ERR wxSTR_WRITE_ERROR
+#define wxStream_READ_ERR wxSTR_READ_ERROR
+
+typedef enum {
+ wxStream_NOERROR = 0,
+ wxStream_EOF,
+ wxStream_WRITE_ERR,
+ wxStream_READ_ERR
+} wxStreamError;
+
+class WXDLLEXPORT wxStreamBase {
+ public:
+ wxStreamBase();
+ virtual ~wxStreamBase();
+
+ wxStreamError LastError() const { return m_lasterror; }
+ virtual size_t StreamSize() const { return ~((size_t)0); }
+
+ protected:
+ friend class wxStreamBuffer;
+
+ virtual size_t OnSysRead(void *buffer, size_t bufsize);
+ virtual size_t OnSysWrite(const void *buffer, size_t bufsize);
+ virtual off_t OnSysSeek(off_t seek, wxSeekMode mode);
+ virtual off_t OnSysTell() const;
+
+ protected:
+ size_t m_lastcount;
+ wxStreamError m_lasterror;
+};
+
+class WXDLLEXPORT wxInputStream: public wxStreamBase {