From 2a16d37f9b1a8e009aab482b8a003a224f81a31a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 27 Mar 2013 23:13:46 +0300 Subject: improve download class. --- src/net/download.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/net/download.h') 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); -- cgit v1.2.3-60-g2f50