Fix wpsbuild to properly generate "-" for theme related settings (to get the default...
[kugel-rb.git] / rbutil / rbutilqt / base / zipinstaller.h
blobc0e13efa20f09ade25bd301508495879e9fb5fc7
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>
30 #include "progressloggerinterface.h"
31 #include "httpget.h"
33 class ZipInstaller : public QObject
35 Q_OBJECT
36 public:
37 ZipInstaller(QObject* parent) ;
38 ~ZipInstaller(){}
39 void install(void);
40 void setMountPoint(QString mountpoint) {m_mountpoint = mountpoint;}
41 void setUrl(QString url){m_urllist = QStringList(url);}
42 void setUrl(QStringList url) { m_urllist = url; }
43 void setLogSection(QString name) {m_loglist = QStringList(name);}
44 void setLogSection(QStringList name) { m_loglist = name; }
45 void setLogVersion(QString v) { m_verlist = QStringList(v); qDebug() << m_verlist;}
46 void setLogVersion(QStringList v) { m_verlist = v; qDebug() << m_verlist;}
47 void setUnzip(bool i) { m_unzip = i; }
48 void setTarget(QString t) { m_target = t; }
49 void setCache(QDir c) { m_cache = c; m_usecache = true; };
50 void setCache(bool c) { m_usecache = c; };
51 void setCache(QString c) { m_cache = QDir(c); m_usecache = true; }
53 public slots:
54 void abort(void);
56 private slots:
57 void downloadDone(bool);
58 void installStart(void);
59 void installContinue(void);
61 signals:
62 void done(bool error);
63 void cont();
64 void logItem(QString, int); //! set logger item
65 void logProgress(int, int); //! set progress bar.
66 void internalAborted(void);
68 private:
69 QString m_url, m_file, m_mountpoint, m_logsection, m_logver;
70 QStringList m_urllist, m_loglist, m_verlist;
71 bool m_unzip;
72 QString m_target;
73 int runner;
74 QDir m_cache;
75 bool m_usecache;
77 HttpGet *getter;
78 QTemporaryFile *downloadFile;
83 #endif