Move device and mountpoint selection to configuration to eliminate the need of asking...
[Rockbox.git] / rbutil / rbutilqt / installzip.h
blobf70ec70ccff2ff1a6867928ce2efa179d4f4c3d9
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
9 * Copyright (C) 2007 by Dominik Wenger
10 * $Id: installzip.h 13990 2007-07-25 22:26:10Z Dominik Wenger $
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
21 #ifndef INSTALLRB_H
22 #define INSTALLRB_H
26 #include <QtGui>
27 #include <QtNetwork>
29 #include "progressloggerinterface.h"
30 #include "httpget.h"
32 class ZipInstaller : public QObject
34 Q_OBJECT
35 public:
36 ZipInstaller(QObject* parent) ;
37 ~ZipInstaller(){}
38 void install(ProgressloggerInterface* dp);
39 void setMountPoint(QString mountpoint) {m_mountpoint = mountpoint;}
40 void setFilename(QString filename){m_file = filename;}
41 void setUrl(QString url){m_url = url;}
42 void setProxy(QUrl proxy) {m_proxy= proxy;}
43 void setLogSection(QString name) {m_logsection = name;}
45 signals:
46 void done(bool error);
48 private slots:
49 void updateDataReadProgress(int, int);
50 void downloadDone(bool);
51 void downloadRequestFinished(int, bool);
53 private:
54 QString m_url,m_file,m_mountpoint,m_logsection;
55 QUrl m_proxy;
57 HttpGet *getter;
58 QTemporaryFile downloadFile;
60 ProgressloggerInterface* m_dp;
65 #endif