From d89674f944c419c9473da688993ee69671f2c295 Mon Sep 17 00:00:00 2001 From: kh1 Date: Thu, 2 May 2013 15:28:22 +0200 Subject: Reset to only use the basic LZMA SDK (Windows). Change-Id: I8088cc4775f6c5397991f00512354836d614ea4e Reviewed-by: Kai Koehne Reviewed-by: Tim Jenssen --- src/libs/7zip/win/CPP/7zip/Common/OutMemStream.h | 96 ------------------------ 1 file changed, 96 deletions(-) delete mode 100644 src/libs/7zip/win/CPP/7zip/Common/OutMemStream.h (limited to 'src/libs/7zip/win/CPP/7zip/Common/OutMemStream.h') diff --git a/src/libs/7zip/win/CPP/7zip/Common/OutMemStream.h b/src/libs/7zip/win/CPP/7zip/Common/OutMemStream.h deleted file mode 100644 index b47f339e9..000000000 --- a/src/libs/7zip/win/CPP/7zip/Common/OutMemStream.h +++ /dev/null @@ -1,96 +0,0 @@ -// OutMemStream.h - -#ifndef __OUTMEMSTREAM_H -#define __OUTMEMSTREAM_H - -#include "Common/MyCom.h" -#include "MemBlocks.h" - -class COutMemStream: - public IOutStream, - public CMyUnknownImp -{ - CMemBlockManagerMt *_memManager; - size_t _curBlockIndex; - size_t _curBlockPos; - bool _realStreamMode; - - bool _unlockEventWasSent; - NWindows::NSynchronization::CAutoResetEvent StopWritingEvent; - NWindows::NSynchronization::CAutoResetEvent WriteToRealStreamEvent; - // NWindows::NSynchronization::CAutoResetEvent NoLockEvent; - - HRESULT StopWriteResult; - CMemLockBlocks Blocks; - - UInt64 GetPos() const { return (UInt64)_curBlockIndex * _memManager->GetBlockSize() + _curBlockPos; } - - CMyComPtr OutSeqStream; - CMyComPtr OutStream; - -public: - - HRes CreateEvents() - { - RINOK(StopWritingEvent.CreateIfNotCreated()); - return WriteToRealStreamEvent.CreateIfNotCreated(); - } - - void SetOutStream(IOutStream *outStream) - { - OutStream = outStream; - OutSeqStream = outStream; - } - - void SetSeqOutStream(ISequentialOutStream *outStream) - { - OutStream = NULL; - OutSeqStream = outStream; - } - - void ReleaseOutStream() - { - OutStream.Release(); - OutSeqStream.Release(); - } - - COutMemStream(CMemBlockManagerMt *memManager): _memManager(memManager) { } - - ~COutMemStream() { Free(); } - void Free(); - - void Init(); - HRESULT WriteToRealStream(); - - void DetachData(CMemLockBlocks &blocks); - - bool WasUnlockEventSent() const { return _unlockEventWasSent; } - - void SetRealStreamMode() - { - _unlockEventWasSent = true; - WriteToRealStreamEvent.Set(); - } - - /* - void SetNoLockMode() - { - _unlockEventWasSent = true; - NoLockEvent.Set(); - } - */ - - void StopWriting(HRESULT res) - { - StopWriteResult = res; - StopWritingEvent.Set(); - } - - MY_UNKNOWN_IMP - - STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); - STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition); - STDMETHOD(SetSize)(UInt64 newSize); -}; - -#endif -- cgit v1.2.3