1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
9 * Copyright (C) 2007 by Dominik Wenger
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 ****************************************************************************/
30 #include "progressloggerinterface.h"
33 class ZipInstaller
: public QObject
37 ZipInstaller(QObject
* parent
) ;
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; }
57 void downloadDone(bool);
58 void installStart(void);
59 void installContinue(void);
62 void done(bool error
);
64 void logItem(QString
, int); //! set logger item
65 void logProgress(int, int); //! set progress bar.
66 void internalAborted(void);
69 QString m_url
, m_file
, m_mountpoint
, m_logsection
, m_logver
;
70 QStringList m_urllist
, m_loglist
, m_verlist
;
78 QTemporaryFile
*downloadFile
;