2001-10-06 18:13:28 +04:00
|
|
|
#ifndef CINPUTSTREAMFILTER_H
|
|
|
|
#define CINPUTSTREAMFILTER_H
|
|
|
|
|
|
|
|
#include "IInputStream.h"
|
|
|
|
|
|
|
|
class CInputStreamFilter : public IInputStream {
|
2002-04-29 18:40:01 +04:00
|
|
|
public:
|
2001-10-06 18:13:28 +04:00
|
|
|
CInputStreamFilter(IInputStream*, bool adoptStream = true);
|
|
|
|
~CInputStreamFilter();
|
|
|
|
|
|
|
|
// manipulators
|
|
|
|
|
|
|
|
// accessors
|
|
|
|
|
|
|
|
// IInputStream overrides
|
2001-10-14 20:58:01 +04:00
|
|
|
virtual void close() = 0;
|
2002-06-26 20:31:48 +04:00
|
|
|
virtual UInt32 read(void*, UInt32 maxCount, double timeout) = 0;
|
2001-10-14 20:58:01 +04:00
|
|
|
virtual UInt32 getSize() const = 0;
|
2001-10-06 18:13:28 +04:00
|
|
|
|
2002-04-29 18:40:01 +04:00
|
|
|
protected:
|
2001-10-14 20:58:01 +04:00
|
|
|
IInputStream* getStream() const;
|
2001-10-06 18:13:28 +04:00
|
|
|
|
2002-04-29 18:40:01 +04:00
|
|
|
private:
|
2001-10-06 18:13:28 +04:00
|
|
|
IInputStream* m_stream;
|
|
|
|
bool m_adopted;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|