diff options
Diffstat (limited to 'rbutil/rbutilqt/zipinstaller.h')
-rw-r--r-- | rbutil/rbutilqt/zipinstaller.h | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/rbutil/rbutilqt/zipinstaller.h b/rbutil/rbutilqt/zipinstaller.h new file mode 100644 index 0000000000..b9cf9b4616 --- /dev/null +++ b/rbutil/rbutilqt/zipinstaller.h | |||
@@ -0,0 +1,82 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * | ||
9 | * Copyright (C) 2007 by Dominik Wenger | ||
10 | * $Id$ | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | |||
22 | |||
23 | #ifndef INSTALLZIP_H | ||
24 | #define INSTALLZIP_H | ||
25 | |||
26 | |||
27 | |||
28 | #include <QtCore> | ||
29 | #include <QtNetwork> | ||
30 | |||
31 | #include "progressloggerinterface.h" | ||
32 | #include "httpget.h" | ||
33 | |||
34 | class ZipInstaller : public QObject | ||
35 | { | ||
36 | Q_OBJECT | ||
37 | public: | ||
38 | ZipInstaller(QObject* parent) ; | ||
39 | ~ZipInstaller(){} | ||
40 | void install(ProgressloggerInterface* dp); | ||
41 | void setMountPoint(QString mountpoint) {m_mountpoint = mountpoint;} | ||
42 | void setUrl(QString url){m_urllist = QStringList(url);} | ||
43 | void setUrl(QStringList url) { m_urllist = url; } | ||
44 | void setLogSection(QString name) {m_loglist = QStringList(name);} | ||
45 | void setLogSection(QStringList name) { m_loglist = name; } | ||
46 | void setLogVersion(QString v) { m_verlist = QStringList(v); qDebug() << m_verlist;} | ||
47 | void setLogVersion(QStringList v) { m_verlist = v; qDebug() << m_verlist;} | ||
48 | void setUnzip(bool i) { m_unzip = i; } | ||
49 | void setTarget(QString t) { m_target = t; } | ||
50 | void setCache(QDir c) { m_cache = c; m_usecache = true; }; | ||
51 | void setCache(bool c) { m_usecache = c; }; | ||
52 | void setCache(QString c) { m_cache = QDir(c); m_usecache = true; } | ||
53 | |||
54 | signals: | ||
55 | void done(bool error); | ||
56 | void cont(); | ||
57 | |||
58 | private slots: | ||
59 | void downloadDone(bool); | ||
60 | void installStart(void); | ||
61 | void installContinue(void); | ||
62 | |||
63 | private: | ||
64 | void installSingle(ProgressloggerInterface *dp); | ||
65 | QString m_url, m_file, m_mountpoint, m_logsection, m_logver; | ||
66 | QStringList m_urllist, m_loglist, m_verlist; | ||
67 | bool m_unzip; | ||
68 | QString m_target; | ||
69 | int runner; | ||
70 | QDir m_cache; | ||
71 | bool m_usecache; | ||
72 | |||
73 | HttpGet *getter; | ||
74 | QTemporaryFile *downloadFile; | ||
75 | |||
76 | ProgressloggerInterface* m_dp; | ||
77 | }; | ||
78 | |||
79 | |||
80 | |||
81 | #endif | ||
82 | |||