Mercurial > vba-linux
diff 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 |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/win32/7zip/7z/CPP/7zip/Common/ProgressMt.h Sat Mar 03 10:31:27 2012 -0600 1.3 @@ -0,0 +1,46 @@ 1.4 +// ProgressMt.h 1.5 + 1.6 +#ifndef __PROGRESSMT_H 1.7 +#define __PROGRESSMT_H 1.8 + 1.9 +#include "../../Common/MyCom.h" 1.10 +#include "../../Common/MyVector.h" 1.11 +#include "../../Windows/Synchronization.h" 1.12 + 1.13 +#include "../ICoder.h" 1.14 +#include "../IProgress.h" 1.15 + 1.16 +class CMtCompressProgressMixer 1.17 +{ 1.18 + CMyComPtr<ICompressProgressInfo> _progress; 1.19 + CRecordVector<UInt64> InSizes; 1.20 + CRecordVector<UInt64> OutSizes; 1.21 + UInt64 TotalInSize; 1.22 + UInt64 TotalOutSize; 1.23 +public: 1.24 + NWindows::NSynchronization::CCriticalSection CriticalSection; 1.25 + void Init(int numItems, ICompressProgressInfo *progress); 1.26 + void Reinit(int index); 1.27 + HRESULT SetRatioInfo(int index, const UInt64 *inSize, const UInt64 *outSize); 1.28 +}; 1.29 + 1.30 +class CMtCompressProgress: 1.31 + public ICompressProgressInfo, 1.32 + public CMyUnknownImp 1.33 +{ 1.34 + CMtCompressProgressMixer *_progress; 1.35 + int _index; 1.36 +public: 1.37 + void Init(CMtCompressProgressMixer *progress, int index) 1.38 + { 1.39 + _progress = progress; 1.40 + _index = index; 1.41 + } 1.42 + void Reinit() { _progress->Reinit(_index); } 1.43 + 1.44 + MY_UNKNOWN_IMP 1.45 + 1.46 + STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize); 1.47 +}; 1.48 + 1.49 +#endif