Home | History | Annotate | Download | only in Common
      1 // ProgressUtils.h
      2 
      3 #ifndef __PROGRESS_UTILS_H
      4 #define __PROGRESS_UTILS_H
      5 
      6 #include "../../Common/MyCom.h"
      7 
      8 #include "../ICoder.h"
      9 #include "../IProgress.h"
     10 
     11 class CLocalProgress:
     12   public ICompressProgressInfo,
     13   public CMyUnknownImp
     14 {
     15   CMyComPtr<IProgress> _progress;
     16   CMyComPtr<ICompressProgressInfo> _ratioProgress;
     17   bool _inSizeIsMain;
     18 public:
     19   UInt64 ProgressOffset;
     20   UInt64 InSize;
     21   UInt64 OutSize;
     22   bool SendRatio;
     23   bool SendProgress;
     24 
     25   CLocalProgress();
     26 
     27   void Init(IProgress *progress, bool inSizeIsMain);
     28   HRESULT SetCur();
     29 
     30   MY_UNKNOWN_IMP1(ICompressProgressInfo)
     31 
     32   STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize);
     33 };
     34 
     35 #endif
     36