|
@@ -2,6 +2,8 @@
|
|
|
#define LOTRO_DAT_LIBRARY_DATSTATUS_H
|
|
|
|
|
|
#include <string>
|
|
|
+#include <functional>
|
|
|
+#include <vector>
|
|
|
|
|
|
namespace LOTRO_DAT {
|
|
|
class DatFile;
|
|
@@ -41,7 +43,13 @@ namespace LOTRO_DAT {
|
|
|
|
|
|
explicit DatStatus(DatFile *datFilePtr);
|
|
|
|
|
|
- void SetPercentage(unsigned percent);
|
|
|
+ void UpdateStatus();
|
|
|
+
|
|
|
+ void SetPercentage();
|
|
|
+
|
|
|
+ void SetFinishedParts(unsigned long long finished_parts);
|
|
|
+
|
|
|
+ void SetTotalParts(unsigned long long total_parts);
|
|
|
|
|
|
unsigned GetPercentage();
|
|
|
|
|
@@ -59,10 +67,15 @@ namespace LOTRO_DAT {
|
|
|
|
|
|
private:
|
|
|
DatFile *dat;
|
|
|
- unsigned percentage_;
|
|
|
+ double percentage_;
|
|
|
+ unsigned long long finished_parts_;
|
|
|
+ unsigned long long total_parts_;
|
|
|
DAT_STATUS status_;
|
|
|
|
|
|
- std::string debug_message;
|
|
|
+ using callback = std::function<void(double, unsigned long long, unsigned long long, DAT_STATUS)>;
|
|
|
+ std::vector<callback> callback_functions_lazy_;
|
|
|
+ std::vector<callback> callback_functions_unoptimized_;
|
|
|
+ std::string debug_message_;
|
|
|
};
|
|
|
}
|
|
|
|