Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '7zip/Common/LimitedStreams.h')
-rwxr-xr-x7zip/Common/LimitedStreams.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/7zip/Common/LimitedStreams.h b/7zip/Common/LimitedStreams.h
index d40be974..ec4a3a70 100755
--- a/7zip/Common/LimitedStreams.h
+++ b/7zip/Common/LimitedStreams.h
@@ -10,14 +10,24 @@ class CLimitedSequentialInStream:
public ISequentialInStream,
public CMyUnknownImp
{
- UInt64 _size;
CMyComPtr<ISequentialInStream> _stream;
+ UInt64 _size;
+ UInt64 _pos;
+ bool _wasFinished;
public:
- void Init(ISequentialInStream *stream, UInt64 streamSize);
+ void SetStream(ISequentialInStream *stream) { _stream = stream; }
+ void Init(UInt64 streamSize)
+ {
+ _size = streamSize;
+ _pos = 0;
+ _wasFinished = false;
+ }
MY_UNKNOWN_IMP
STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
+ UInt64 GetSize() const { return _pos; }
+ bool WasFinished() const { return _wasFinished; }
};
#endif