diff options
Diffstat (limited to 'rbutil/rbutilqt/installbootloader.h')
-rw-r--r-- | rbutil/rbutilqt/installbootloader.h | 127 |
1 files changed, 0 insertions, 127 deletions
diff --git a/rbutil/rbutilqt/installbootloader.h b/rbutil/rbutilqt/installbootloader.h deleted file mode 100644 index f849361699..0000000000 --- a/rbutil/rbutilqt/installbootloader.h +++ /dev/null | |||
@@ -1,127 +0,0 @@ | |||
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 | #ifndef INSTALLBOOTLOADER_H | ||
23 | #define INSTALLBOOTLOADER_H | ||
24 | |||
25 | #ifndef CONSOLE | ||
26 | #include <QtGui> | ||
27 | #else | ||
28 | #include <QtCore> | ||
29 | #endif | ||
30 | |||
31 | #include "progressloggerinterface.h" | ||
32 | #include "httpget.h" | ||
33 | #include "irivertools/irivertools.h" | ||
34 | |||
35 | #include "../ipodpatcher/ipodpatcher.h" | ||
36 | #include "../sansapatcher/sansapatcher.h" | ||
37 | |||
38 | bool initIpodpatcher(); | ||
39 | bool initSansapatcher(); | ||
40 | |||
41 | class BootloaderInstaller : public QObject | ||
42 | { | ||
43 | Q_OBJECT | ||
44 | |||
45 | public: | ||
46 | BootloaderInstaller(QObject* parent); | ||
47 | ~BootloaderInstaller() {} | ||
48 | |||
49 | void install(ProgressloggerInterface* dp); | ||
50 | void uninstall(ProgressloggerInterface* dp); | ||
51 | |||
52 | void setMountPoint(QString mountpoint) {m_mountpoint = mountpoint;} | ||
53 | void setDevice(QString device) {m_device= device;} //!< the current plattform | ||
54 | void setBootloaderMethod(QString method) {m_bootloadermethod= method;} | ||
55 | void setBootloaderName(QString name){m_bootloadername= name;} | ||
56 | void setBootloaderBaseUrl(QString baseUrl){m_bootloaderUrlBase = baseUrl;} | ||
57 | void setOrigFirmwarePath(QString path) {m_origfirmware = path;} //!< for iriver original firmware | ||
58 | void setBootloaderInfoUrl(QString url) {m_bootloaderinfoUrl =url; } //!< the url for the info file | ||
59 | bool downloadInfo(); //!< should be called before install/uninstall, blocks until downloaded. | ||
60 | bool uptodate(); //!< returns wether the bootloader is uptodate | ||
61 | |||
62 | signals: | ||
63 | void done(bool error); //installation finished. | ||
64 | |||
65 | signals: // internal signals. Dont use this from out side. | ||
66 | void prepare(); | ||
67 | void finish(); | ||
68 | |||
69 | private slots: | ||
70 | void createInstallLog(); // adds the bootloader entry to the log | ||
71 | void removeInstallLog(); // removes the bootloader entry from the log | ||
72 | |||
73 | void downloadDone(bool); | ||
74 | void downloadRequestFinished(int, bool); | ||
75 | void infoDownloadDone(bool); | ||
76 | void infoRequestFinished(int, bool); | ||
77 | void installEnded(bool); | ||
78 | |||
79 | // gigabeat specific routines | ||
80 | void gigabeatPrepare(); | ||
81 | void gigabeatFinish(); | ||
82 | |||
83 | //iaudio specific routines | ||
84 | void iaudioPrepare(); | ||
85 | void iaudioFinish(); | ||
86 | |||
87 | //h10 specific routines | ||
88 | void h10Prepare(); | ||
89 | void h10Finish(); | ||
90 | |||
91 | //ipod specific routines | ||
92 | void ipodPrepare(); | ||
93 | void ipodFinish(); | ||
94 | |||
95 | //sansa specific routines | ||
96 | void sansaPrepare(); | ||
97 | void sansaFinish(); | ||
98 | |||
99 | //iriver specific routines | ||
100 | void iriverPrepare(); | ||
101 | void iriverFinish(); | ||
102 | |||
103 | //mrobe100 specific routines | ||
104 | void mrobe100Prepare(); | ||
105 | void mrobe100Finish(); | ||
106 | |||
107 | private: | ||
108 | |||
109 | HttpGet *infodownloader; | ||
110 | QTemporaryFile bootloaderInfo; | ||
111 | volatile bool infoDownloaded; | ||
112 | volatile bool infoError; | ||
113 | |||
114 | QString m_mountpoint, m_device,m_bootloadermethod,m_bootloadername; | ||
115 | QString m_bootloaderUrlBase,m_tempfilename,m_origfirmware; | ||
116 | QString m_bootloaderinfoUrl; | ||
117 | bool m_install; | ||
118 | |||
119 | int series,table_entry; // for fwpatcher | ||
120 | |||
121 | HttpGet *getter; | ||
122 | QTemporaryFile downloadFile; | ||
123 | |||
124 | ProgressloggerInterface* m_dp; | ||
125 | |||
126 | }; | ||
127 | #endif | ||