Mercurial > vba-linux
annotate src/win32/7zip/7z/CPP/7zip/Common/ProgressMt.h @ 1:f9f4f1b99eed
importing src directory
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 03 Mar 2012 10:31:27 -0600 |
parents | |
children |
rev | line source |
---|---|
rlm@1 | 1 // ProgressMt.h |
rlm@1 | 2 |
rlm@1 | 3 #ifndef __PROGRESSMT_H |
rlm@1 | 4 #define __PROGRESSMT_H |
rlm@1 | 5 |
rlm@1 | 6 #include "../../Common/MyCom.h" |
rlm@1 | 7 #include "../../Common/MyVector.h" |
rlm@1 | 8 #include "../../Windows/Synchronization.h" |
rlm@1 | 9 |
rlm@1 | 10 #include "../ICoder.h" |
rlm@1 | 11 #include "../IProgress.h" |
rlm@1 | 12 |
rlm@1 | 13 class CMtCompressProgressMixer |
rlm@1 | 14 { |
rlm@1 | 15 CMyComPtr<ICompressProgressInfo> _progress; |
rlm@1 | 16 CRecordVector<UInt64> InSizes; |
rlm@1 | 17 CRecordVector<UInt64> OutSizes; |
rlm@1 | 18 UInt64 TotalInSize; |
rlm@1 | 19 UInt64 TotalOutSize; |
rlm@1 | 20 public: |
rlm@1 | 21 NWindows::NSynchronization::CCriticalSection CriticalSection; |
rlm@1 | 22 void Init(int numItems, ICompressProgressInfo *progress); |
rlm@1 | 23 void Reinit(int index); |
rlm@1 | 24 HRESULT SetRatioInfo(int index, const UInt64 *inSize, const UInt64 *outSize); |
rlm@1 | 25 }; |
rlm@1 | 26 |
rlm@1 | 27 class CMtCompressProgress: |
rlm@1 | 28 public ICompressProgressInfo, |
rlm@1 | 29 public CMyUnknownImp |
rlm@1 | 30 { |
rlm@1 | 31 CMtCompressProgressMixer *_progress; |
rlm@1 | 32 int _index; |
rlm@1 | 33 public: |
rlm@1 | 34 void Init(CMtCompressProgressMixer *progress, int index) |
rlm@1 | 35 { |
rlm@1 | 36 _progress = progress; |
rlm@1 | 37 _index = index; |
rlm@1 | 38 } |
rlm@1 | 39 void Reinit() { _progress->Reinit(_index); } |
rlm@1 | 40 |
rlm@1 | 41 MY_UNKNOWN_IMP |
rlm@1 | 42 |
rlm@1 | 43 STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize); |
rlm@1 | 44 }; |
rlm@1 | 45 |
rlm@1 | 46 #endif |