Add more simulator stubs. This should get rid of the last reds
[kugel-rb.git] / rbutil / rbutilqt / installzip.h
blobb9cf9b4616341ca0d9ffba3fa65ad61acf428b20
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
9 * Copyright (C) 2007 by Dominik Wenger
10 * $Id$
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.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
23 #ifndef INSTALLZIP_H
24 #define INSTALLZIP_H
28 #include <QtCore>
29 #include <QtNetwork>
31 #include "progressloggerinterface.h"
32 #include "httpget.h"
34 class ZipInstaller : public QObject
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; }
54 signals:
55 void done(bool error);
56 void cont();
58 private slots:
59 void downloadDone(bool);
60 void installStart(void);
61 void installContinue(void);
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;
73 HttpGet *getter;
74 QTemporaryFile *downloadFile;
76 ProgressloggerInterface* m_dp;
81 #endif