diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-03-27 23:13:46 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-03-27 23:13:46 +0300 |
commit | 2a16d37f9b1a8e009aab482b8a003a224f81a31a (patch) | |
tree | b2ab0df9f57d3d70ade95f80601351b10c456a42 /src/net/download.h | |
parent | 0fe0f8bae7b754453e6e6bb7c7b29903facb9311 (diff) | |
download | manaverse-2a16d37f9b1a8e009aab482b8a003a224f81a31a.tar.gz manaverse-2a16d37f9b1a8e009aab482b8a003a224f81a31a.tar.bz2 manaverse-2a16d37f9b1a8e009aab482b8a003a224f81a31a.tar.xz manaverse-2a16d37f9b1a8e009aab482b8a003a224f81a31a.zip |
improve download class.
Diffstat (limited to 'src/net/download.h')
-rw-r--r-- | src/net/download.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/net/download.h b/src/net/download.h index f9f842588..53ecf4171 100644 --- a/src/net/download.h +++ b/src/net/download.h @@ -56,8 +56,9 @@ namespace Net class Download final { public: - Download(void *ptr, const std::string &url, - DownloadUpdate updateFunction, bool ignoreError = false); + Download(void *const ptr, const std::string &url, + const DownloadUpdate updateFunction, + const bool ignoreError = false); A_DELETE_COPY(Download) @@ -70,7 +71,7 @@ class Download final */ void noCache(); - void setFile(const std::string &filename, int64_t adler32 = -1); + void setFile(const std::string &filename, const int64_t adler32 = -1); void setWriteFunction(WriteFunction write); @@ -88,16 +89,16 @@ class Download final */ void cancel(); - char *getError() A_WARN_UNUSED; + char *getError() const A_WARN_UNUSED; - void setIgnoreError(bool n) + void setIgnoreError(const bool n) { mIgnoreError = n; } - static unsigned long fadler32(FILE *file) A_WARN_UNUSED; + static unsigned long fadler32(FILE *const file) A_WARN_UNUSED; - static void addProxy(CURL *curl); + static void addProxy(CURL *const curl); - static void secureCurl(CURL *curl); + static void secureCurl(CURL *const curl); private: static int downloadThread(void *ptr); |