add Network.getTotalUpload, getTotalDownload

This commit is contained in:
MihailRis
2024-11-11 04:26:07 +03:00
parent 46dfdac998
commit d7389c2220
3 changed files with 36 additions and 0 deletions
+5
View File
@@ -16,6 +16,8 @@ namespace network {
virtual ~Http() {}
virtual void get(const std::string& url, const OnResponse& callback) = 0;
virtual size_t getTotalUpload() const = 0;
virtual size_t getTotalDownload() const = 0;
};
class Network {
@@ -26,6 +28,9 @@ namespace network {
void httpGet(const std::string& url, const OnResponse& callback);
size_t getTotalUpload() const;
size_t getTotalDownload() const;
static std::unique_ptr<Network> create(const NetworkSettings& settings);
};
}