Matrix Science Mascot Parser toolkit
 
Loading...
Searching...
No Matches
ms_http_helper_progress.hpp
1/*
2##############################################################################
3# file: ms_http_helper_progress.hpp #
4# 'msparser' toolkit #
5# Hold information about the progress of an internet file transfer #
6##############################################################################
7# COPYRIGHT NOTICE #
8# Copyright 1998-2024 Matrix Science Limited All Rights Reserved. #
9# #
10##############################################################################
11 * @(#)$Source: parser/inc/ms_http_helper_progress.hpp $
12 * @(#)$Revision: 391e7298502ad6bbe2132c2290996c0b12ee8c2b | MSPARSER_REL_3_0_0-2024-09-24-0-g93ebaeb4f4 $
13 * @(#)$Date: 2024-02-01 09:55:20 +0000 $
14##############################################################################
15 */
16
17#ifndef MS_HTTP_HELPER_PROGRESS_HPP
18#define MS_HTTP_HELPER_PROGRESS_HPP
19
20#include <memory>
21#include <string>
22
23namespace msparser_internal {
24 class ms_http_helper_progress_impl;
25}
26
27namespace matrix_science
28{
35
45 class MS_MASCOTRESFILE_API ms_http_helper_progress
46 {
47 public:
50
53
56
58 ms_http_helper_progress(ms_http_helper_progress &parentProgress, double proportionOffset, UINT64 byteOffset, double scale);
59
60#ifndef SWIG
61 ms_http_helper_progress& operator=(const ms_http_helper_progress &right);
62#endif
63
65 void copyFrom(const ms_http_helper_progress * right);
66
68 void setAbort();
69
71 bool isAbortSet() const;
72
74 bool isStarted() const;
75
77 UINT64 getCurrentBytes() const;
78 UINT64 current() const { return getCurrentBytes(); } // Deprecated and undocumented - not a normal Parser function name
79
81 UINT64 getTotalBytes() const;
82 UINT64 total() const { return getTotalBytes(); } // Deprecated and undocumented - not a normal Parser function name
83
85 double getProportion() const;
86 double proportion() const { return getProportion(); } // Deprecated and undocumented - not a normal Parser function name
87
89 bool isComplete() const;
90
92 bool hasParent() const;
93
94 protected:
95 ms_http_helper_progress(msparser_internal::ms_http_helper_progress_impl*);
96
97 private:
98 std::unique_ptr<msparser_internal::ms_http_helper_progress_impl> pImpl_;
99
100 friend class ms_http_helper;
101 friend class ms_http_client_search;
102 };
103 // end of http_client_group
105} // namespace matrix_science
106
107#endif // MS_HTTP_HELPER_PROGRESS_HPP
108
109/*------------------------------- End of File -------------------------------*/
Used for submitting searches to a Mascot server and retrieving search results using HTTP(S).
Definition: ms_http_client_search.hpp:44
This holds information on the progress of a running HTTP transfer.
Definition: ms_http_helper_progress.hpp:46
The class provides HTTP, FTP and FILE protocol access to a server.
Definition: ms_http_helper.hpp:57