Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / other-licenses / 7zstub / src / 7zip / Common / StreamBinder.h
blob7899f0ff046ea2d5236ab3dba09cf80a623b1857
1 // StreamBinder.h
3 #ifndef __STREAMBINDER_H
4 #define __STREAMBINDER_H
6 #include "../IStream.h"
7 #include "../../Windows/Synchronization.h"
9 class CStreamBinder
11 NWindows::NSynchronization::CManualResetEvent *_allBytesAreWritenEvent;
12 NWindows::NSynchronization::CManualResetEvent *_thereAreBytesToReadEvent;
13 NWindows::NSynchronization::CManualResetEvent *_readStreamIsClosedEvent;
14 UInt32 _bufferSize;
15 const void *_buffer;
16 public:
17 // bool ReadingWasClosed;
18 UInt64 ProcessedSize;
19 CStreamBinder():
20 _allBytesAreWritenEvent(NULL),
21 _thereAreBytesToReadEvent(NULL),
22 _readStreamIsClosedEvent(NULL)
24 ~CStreamBinder();
25 void CreateEvents();
27 void CreateStreams(ISequentialInStream **inStream,
28 ISequentialOutStream **outStream);
29 HRESULT Read(void *data, UInt32 size, UInt32 *processedSize);
30 void CloseRead();
32 HRESULT Write(const void *data, UInt32 size, UInt32 *processedSize);
33 void CloseWrite();
34 void ReInit();
37 #endif