summaryrefslogtreecommitdiff
path: root/src/net/download.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-03 15:37:32 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-03 15:37:32 +0300
commitcb6899fa0d8488e7e380179cb2d4bde763667d71 (patch)
tree8acec2c520fbdcf5dc282a876a6d793861e03742 /src/net/download.h
parent913bc623a84a7dd61e71dd4e5f61097da1c1521b (diff)
downloadplus-cb6899fa0d8488e7e380179cb2d4bde763667d71.tar.gz
plus-cb6899fa0d8488e7e380179cb2d4bde763667d71.tar.bz2
plus-cb6899fa0d8488e7e380179cb2d4bde763667d71.tar.xz
plus-cb6899fa0d8488e7e380179cb2d4bde763667d71.zip
Add support for mirrors in download.
Diffstat (limited to 'src/net/download.h')
-rw-r--r--src/net/download.h5
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;