瀏覽代碼

LotroDat-6-Aded DatStatus variables declarations

Ivan Arkhipov 5 年之前
父節點
當前提交
7695b7c989
共有 1 個文件被更改,包括 16 次插入3 次删除
  1. 16 3
      include/DatSubsystems/DatStatus.h

+ 16 - 3
include/DatSubsystems/DatStatus.h

@@ -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_;
     };
 }