00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef ISTREAM_H
00016 #define ISTREAM_H
00017
00018 #include "IInterface.h"
00019 #include "CEvent.h"
00020
00022
00025 class IStream : public IInterface {
00026 public:
00028
00029
00031
00038 virtual void close() = 0;
00039
00041
00046 virtual UInt32 read(void* buffer, UInt32 n) = 0;
00047
00049
00055 virtual void write(const void* buffer, UInt32 n) = 0;
00056
00058
00061 virtual void flush() = 0;
00062
00064
00068 virtual void shutdownInput() = 0;
00069
00071
00076 virtual void shutdownOutput() = 0;
00077
00079
00080
00081
00083
00087 virtual void* getEventTarget() const = 0;
00088
00090
00095 virtual bool isReady() const = 0;
00096
00098
00104 virtual UInt32 getSize() const = 0;
00105
00107
00111 static CEvent::Type getInputReadyEvent();
00112
00114
00121 static CEvent::Type getOutputFlushedEvent();
00122
00124
00128 static CEvent::Type getOutputErrorEvent();
00129
00131
00136 static CEvent::Type getInputShutdownEvent();
00137
00139
00145 static CEvent::Type getOutputShutdownEvent();
00146
00148
00149 private:
00150 static CEvent::Type s_inputReadyEvent;
00151 static CEvent::Type s_outputFlushedEvent;
00152 static CEvent::Type s_outputErrorEvent;
00153 static CEvent::Type s_inputShutdownEvent;
00154 static CEvent::Type s_outputShutdownEvent;
00155 };
00156
00157 #endif