00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef MS_HTTP_HELPER_PROGRESS_HPP
00018 #define MS_HTTP_HELPER_PROGRESS_HPP
00019
00020
00021 #include <string>
00022
00023 namespace matrix_science
00024 {
00030
00031
00041 class MS_MASCOTRESFILE_API ms_http_helper_progress
00042 {
00043 public:
00044 #ifndef SWIG
00045
00046 ms_http_helper_progress();
00047 #endif
00048
00050 void setAbort();
00051
00053 bool isAbortSet() const;
00054
00056 bool isStarted() const;
00057
00059 UINT64 getCurrentBytes() const;
00060 UINT64 current() const { return getCurrentBytes(); }
00061
00063 UINT64 getTotalBytes() const;
00064 UINT64 total() const { return getTotalBytes(); }
00065
00067 double getProportion() const;
00068 double proportion() const { return getProportion(); }
00069
00071 bool isComplete() const;
00072
00073 private:
00074 void setStarted();
00075 void setProgress(UINT64 current, UINT64 total);
00076 void setComplete();
00077
00078 bool abort_;
00079 bool isStarted_;
00080 bool isComplete_;
00081 UINT64 current_;
00082 UINT64 total_;
00083 int count_;
00084 double proportion_;
00085
00086 friend class ms_http_helper;
00087 };
00088
00090 }
00091
00092 #endif // MS_HTTP_HELPER_PROGRESS_HPP
00093
00094