diff options
Diffstat (limited to 'rbutil/rbutilqt/base/zipinstaller.h')
-rw-r--r-- | rbutil/rbutilqt/base/zipinstaller.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/rbutil/rbutilqt/base/zipinstaller.h b/rbutil/rbutilqt/base/zipinstaller.h index 97a5156ee8..59a0f785d9 100644 --- a/rbutil/rbutilqt/base/zipinstaller.h +++ b/rbutil/rbutilqt/base/zipinstaller.h | |||
@@ -28,11 +28,15 @@ | |||
28 | #include "httpget.h" | 28 | #include "httpget.h" |
29 | #include "Logger.h" | 29 | #include "Logger.h" |
30 | 30 | ||
31 | /** Install a file or zip. | ||
32 | * Downloads file(s) from a given URL, and installs by either extracting or | ||
33 | * copying it to the target path set by setMountpoint(). | ||
34 | */ | ||
31 | class ZipInstaller : public QObject | 35 | class ZipInstaller : public QObject |
32 | { | 36 | { |
33 | Q_OBJECT | 37 | Q_OBJECT |
34 | public: | 38 | public: |
35 | ZipInstaller(QObject* parent) ; | 39 | ZipInstaller(QObject* parent); |
36 | ~ZipInstaller(){} | 40 | ~ZipInstaller(){} |
37 | void install(void); | 41 | void install(void); |
38 | void setMountPoint(QString mountpoint) {m_mountpoint = mountpoint;} | 42 | void setMountPoint(QString mountpoint) {m_mountpoint = mountpoint;} |
@@ -44,11 +48,12 @@ public: | |||
44 | { m_verlist = QStringList(v); LOG_INFO() << m_verlist;} | 48 | { m_verlist = QStringList(v); LOG_INFO() << m_verlist;} |
45 | void setLogVersion(QStringList v) | 49 | void setLogVersion(QStringList v) |
46 | { m_verlist = v; LOG_INFO() << m_verlist;} | 50 | { m_verlist = v; LOG_INFO() << m_verlist;} |
51 | /** Change between copy and unzip mode. */ | ||
47 | void setUnzip(bool i) { m_unzip = i; } | 52 | void setUnzip(bool i) { m_unzip = i; } |
53 | /** Set target filename for copy mode. | ||
54 | * If not set the filename part of the download URL is used. */ | ||
48 | void setTarget(QString t) { m_target = t; } | 55 | void setTarget(QString t) { m_target = t; } |
49 | void setCache(QDir c) { m_cache = c; m_usecache = true; }; | 56 | void setCache(bool c) { m_usecache = c; } |
50 | void setCache(bool c) { m_usecache = c; }; | ||
51 | void setCache(QString c) { m_cache = QDir(c); m_usecache = true; } | ||
52 | 57 | ||
53 | public slots: | 58 | public slots: |
54 | void abort(void); | 59 | void abort(void); |
@@ -70,8 +75,7 @@ private: | |||
70 | QStringList m_urllist, m_loglist, m_verlist; | 75 | QStringList m_urllist, m_loglist, m_verlist; |
71 | bool m_unzip; | 76 | bool m_unzip; |
72 | QString m_target; | 77 | QString m_target; |
73 | int runner; | 78 | int m_runner; |
74 | QDir m_cache; | ||
75 | bool m_usecache; | 79 | bool m_usecache; |
76 | 80 | ||
77 | HttpGet *m_getter; | 81 | HttpGet *m_getter; |