ProgressUtils.h 646 B

12345678910111213141516171819202122232425262728293031323334
  1. // ProgressUtils.h
  2. #ifndef __PROGRESSUTILS_H
  3. #define __PROGRESSUTILS_H
  4. #include "../../Common/MyCom.h"
  5. #include "../ICoder.h"
  6. #include "../IProgress.h"
  7. class CLocalProgress:
  8. public ICompressProgressInfo,
  9. public CMyUnknownImp
  10. {
  11. CMyComPtr<IProgress> _progress;
  12. CMyComPtr<ICompressProgressInfo> _ratioProgress;
  13. bool _inSizeIsMain;
  14. public:
  15. UInt64 ProgressOffset;
  16. UInt64 InSize;
  17. UInt64 OutSize;
  18. bool SendRatio;
  19. bool SendProgress;
  20. CLocalProgress();
  21. void Init(IProgress *progress, bool inSizeIsMain);
  22. HRESULT SetCur();
  23. MY_UNKNOWN_IMP
  24. STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize);
  25. };
  26. #endif