summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/httpget.h
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutilqt/httpget.h')
-rw-r--r--rbutil/rbutilqt/httpget.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/rbutil/rbutilqt/httpget.h b/rbutil/rbutilqt/httpget.h
index 4a3d811e05..79522f6e8f 100644
--- a/rbutil/rbutilqt/httpget.h
+++ b/rbutil/rbutilqt/httpget.h
@@ -35,6 +35,7 @@ class HttpGet : public QObject
35 35
36 bool getFile(const QUrl &url); 36 bool getFile(const QUrl &url);
37 void setProxy(const QUrl &url); 37 void setProxy(const QUrl &url);
38 void setProxy(bool);
38 QHttp::Error error(void); 39 QHttp::Error error(void);
39 QString errorString(void); 40 QString errorString(void);
40 void setFile(QFile*); 41 void setFile(QFile*);
@@ -43,6 +44,10 @@ class HttpGet : public QObject
43 int httpResponse(void); 44 int httpResponse(void);
44 QByteArray readAll(void); 45 QByteArray readAll(void);
45 bool isCached() { return cached; } 46 bool isCached() { return cached; }
47 static void setGlobalCache(const QDir d) //< set global cache path
48 { m_globalCache = d; }
49 static void setGlobalProxy(const QUrl p) //< set global proxy value
50 { m_globalProxy = p; }
46 51
47 public slots: 52 public slots:
48 void abort(void); 53 void abort(void);
@@ -61,9 +66,9 @@ class HttpGet : public QObject
61 void httpStarted(int); 66 void httpStarted(int);
62 67
63 private: 68 private:
64 QHttp http; 69 QHttp http; //< download object
65 QFile *outputFile; 70 QFile *outputFile;
66 int response; 71 int response; //< http response
67 int getRequest; 72 int getRequest;
68 QByteArray dataBuffer; 73 QByteArray dataBuffer;
69 bool outputToBuffer; 74 bool outputToBuffer;
@@ -72,6 +77,9 @@ class HttpGet : public QObject
72 QDir m_cachedir; 77 QDir m_cachedir;
73 QString cachefile; 78 QString cachefile;
74 bool cached; 79 bool cached;
80 QUrl m_proxy;
81 static QDir m_globalCache; //< global cache path value
82 static QUrl m_globalProxy; //< global proxy value
75}; 83};
76 84
77#endif 85#endif