diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-03 15:37:32 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-03 15:37:32 +0300 |
commit | cb6899fa0d8488e7e380179cb2d4bde763667d71 (patch) | |
tree | 8acec2c520fbdcf5dc282a876a6d793861e03742 /src/net/download.h | |
parent | 913bc623a84a7dd61e71dd4e5f61097da1c1521b (diff) | |
download | manaplus-cb6899fa0d8488e7e380179cb2d4bde763667d71.tar.gz manaplus-cb6899fa0d8488e7e380179cb2d4bde763667d71.tar.bz2 manaplus-cb6899fa0d8488e7e380179cb2d4bde763667d71.tar.xz manaplus-cb6899fa0d8488e7e380179cb2d4bde763667d71.zip |
Add support for mirrors in download.
Diffstat (limited to 'src/net/download.h')
-rw-r--r-- | src/net/download.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/net/download.h b/src/net/download.h index d9a88f8a5..2201aaff2 100644 --- a/src/net/download.h +++ b/src/net/download.h @@ -24,6 +24,7 @@ #define NET_DOWNLOAD_H #include <string> +#include <queue> #include "localconsts.h" @@ -87,6 +88,9 @@ class Download final */ void cancel(); + void addMirror(const std::string &str) + { mUrlQueue.push(str); } + const char *getError() const A_WARN_UNUSED; void setIgnoreError(const bool n) @@ -126,6 +130,7 @@ class Download final unsigned checkAdler: 1; } mOptions; std::string mFileName; + std::queue<std::string> mUrlQueue; WriteFunction mWriteFunction; unsigned long mAdler; DownloadUpdate mUpdateFunction; |