1*f6dc9357SAndroid Build Coastguard Worker // ProgressMt.h 2*f6dc9357SAndroid Build Coastguard Worker 3*f6dc9357SAndroid Build Coastguard Worker #ifndef ZIP7_INC_PROGRESSMT_H 4*f6dc9357SAndroid Build Coastguard Worker #define ZIP7_INC_PROGRESSMT_H 5*f6dc9357SAndroid Build Coastguard Worker 6*f6dc9357SAndroid Build Coastguard Worker #include "../../Common/MyCom.h" 7*f6dc9357SAndroid Build Coastguard Worker #include "../../Common/MyVector.h" 8*f6dc9357SAndroid Build Coastguard Worker #include "../../Windows/Synchronization.h" 9*f6dc9357SAndroid Build Coastguard Worker 10*f6dc9357SAndroid Build Coastguard Worker #include "../ICoder.h" 11*f6dc9357SAndroid Build Coastguard Worker #include "../IProgress.h" 12*f6dc9357SAndroid Build Coastguard Worker 13*f6dc9357SAndroid Build Coastguard Worker class CMtCompressProgressMixer 14*f6dc9357SAndroid Build Coastguard Worker { 15*f6dc9357SAndroid Build Coastguard Worker CMyComPtr<ICompressProgressInfo> _progress; 16*f6dc9357SAndroid Build Coastguard Worker CRecordVector<UInt64> InSizes; 17*f6dc9357SAndroid Build Coastguard Worker CRecordVector<UInt64> OutSizes; 18*f6dc9357SAndroid Build Coastguard Worker UInt64 TotalInSize; 19*f6dc9357SAndroid Build Coastguard Worker UInt64 TotalOutSize; 20*f6dc9357SAndroid Build Coastguard Worker public: 21*f6dc9357SAndroid Build Coastguard Worker NWindows::NSynchronization::CCriticalSection CriticalSection; 22*f6dc9357SAndroid Build Coastguard Worker void Init(unsigned numItems, ICompressProgressInfo *progress); 23*f6dc9357SAndroid Build Coastguard Worker void Reinit(unsigned index); 24*f6dc9357SAndroid Build Coastguard Worker HRESULT SetRatioInfo(unsigned index, const UInt64 *inSize, const UInt64 *outSize); 25*f6dc9357SAndroid Build Coastguard Worker }; 26*f6dc9357SAndroid Build Coastguard Worker 27*f6dc9357SAndroid Build Coastguard Worker Z7_CLASS_IMP_NOQIB_1(CMtCompressProgress,ICompressProgressInfo)28*f6dc9357SAndroid Build Coastguard WorkerZ7_CLASS_IMP_NOQIB_1( 29*f6dc9357SAndroid Build Coastguard Worker CMtCompressProgress 30*f6dc9357SAndroid Build Coastguard Worker , ICompressProgressInfo 31*f6dc9357SAndroid Build Coastguard Worker ) 32*f6dc9357SAndroid Build Coastguard Worker unsigned _index; 33*f6dc9357SAndroid Build Coastguard Worker CMtCompressProgressMixer *_progress; 34*f6dc9357SAndroid Build Coastguard Worker public: 35*f6dc9357SAndroid Build Coastguard Worker void Init(CMtCompressProgressMixer *progress, unsigned index) 36*f6dc9357SAndroid Build Coastguard Worker { 37*f6dc9357SAndroid Build Coastguard Worker _progress = progress; 38*f6dc9357SAndroid Build Coastguard Worker _index = index; 39*f6dc9357SAndroid Build Coastguard Worker } Reinit()40*f6dc9357SAndroid Build Coastguard Worker void Reinit() { _progress->Reinit(_index); } 41*f6dc9357SAndroid Build Coastguard Worker }; 42*f6dc9357SAndroid Build Coastguard Worker 43*f6dc9357SAndroid Build Coastguard Worker #endif 44