Index: src/libchcore/TSubTaskStatsSnapshot.h =================================================================== diff -u -N -r9b8cccbee0fcfeca28a112cc0253a7641f73f74f -ra5f396da5ed5ffb3fcd9fdf22afb5a7fd07e1ab8 --- src/libchcore/TSubTaskStatsSnapshot.h (.../TSubTaskStatsSnapshot.h) (revision 9b8cccbee0fcfeca28a112cc0253a7641f73f74f) +++ src/libchcore/TSubTaskStatsSnapshot.h (.../TSubTaskStatsSnapshot.h) (revision a5f396da5ed5ffb3fcd9fdf22afb5a7fd07e1ab8) @@ -25,6 +25,7 @@ #include "libchcore.h" #include "TString.h" +#include "ESubTaskTypes.h" BEGIN_CHCORE_NAMESPACE @@ -33,9 +34,6 @@ public: TSubTaskStatsSnapshot(); - TSubTaskStatsSnapshot(const TSubTaskStatsSnapshot& rSrc); - TSubTaskStatsSnapshot& operator=(const TSubTaskStatsSnapshot& rSrc); - void Clear(); // is running? @@ -64,7 +62,7 @@ unsigned long long GetCurrentItemTotalSize() const { return m_ullCurrentItemTotalSize; } // progress in percent - double GetProgressInPercent() const { return CalculateProgressInPercent(); } + double GetCombinedProgress() const; // returns progress [0.0, 1.0] // buffer index void SetCurrentBufferIndex(int iCurrentIndex) { m_iCurrentBufferIndex = iCurrentIndex; } @@ -90,8 +88,11 @@ double GetAvgSizeSpeed() const; double GetAvgCountSpeed() const; + chcore::ESubOperationType GetSubOperationType() const { return m_eSubOperationType; } + void SetSubOperationType(chcore::ESubOperationType val) { m_eSubOperationType = val; } + private: - double CalculateProgressInPercent() const; + double CalculateProgress() const; private: bool m_bSubTaskIsRunning; @@ -110,13 +111,17 @@ unsigned long long m_ullCurrentItemTotalSize; unsigned long long m_ullCurrentItemProcessedSize; + ESubOperationType m_eSubOperationType; + int m_iCurrentBufferIndex; TString m_strCurrentPath; // currently processed path unsigned long long m_timeElapsed; // time really elapsed for the subtask }; +typedef boost::shared_ptr TSubTaskStatsSnapshotPtr; + END_CHCORE_NAMESPACE #endif