summaryrefslogtreecommitdiff
path: root/utils/rbutilqt/base/bootloaderinstalls5l.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/rbutilqt/base/bootloaderinstalls5l.h')
-rw-r--r--utils/rbutilqt/base/bootloaderinstalls5l.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/utils/rbutilqt/base/bootloaderinstalls5l.h b/utils/rbutilqt/base/bootloaderinstalls5l.h
new file mode 100644
index 0000000000..e2a44a031f
--- /dev/null
+++ b/utils/rbutilqt/base/bootloaderinstalls5l.h
@@ -0,0 +1,71 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 *
9 * Copyright (C) 2008 by Dominik Riebeling
10 *
11 * All files in this archive are subject to the GNU General Public License.
12 * See the file COPYING in the source tree root for full license agreement.
13 *
14 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
15 * KIND, either express or implied.
16 *
17 ****************************************************************************/
18
19#ifndef BOOTLOADERINSTALLS5L_H
20#define BOOTLOADERINSTALLS5L_H
21
22#include <QtCore>
23#include "bootloaderinstallbase.h"
24
25
26//! bootloader installation derivate based on mks5lboot
27class BootloaderInstallS5l : public BootloaderInstallBase
28{
29 Q_OBJECT
30
31 public:
32 BootloaderInstallS5l(QObject *parent);
33 bool install(void);
34 bool uninstall(void);
35 BootloaderInstallBase::BootloaderType installed(void);
36 Capabilities capabilities(void);
37
38 private slots:
39 bool installStage1(void);
40 void installStageMkdfu(void);
41 void installStageWaitForEject(void);
42 void installStageWaitForSpindown(void);
43 void installStageWaitForProcs(void);
44 void installStageWaitForDfu(void);
45 void installStageSendDfu(void);
46 void installStageWaitForRemount(void);
47 void abortInstall(void);
48 void installDone(bool);
49
50 private:
51 bool doInstall;
52 QString mntpoint;
53 unsigned char* dfu_buf;
54 int dfu_size;
55 QList<int> suspendedPids;
56 bool aborted;
57 bool abortDetected(void);
58 QElapsedTimer scanTimer;
59 bool scanSuccess;
60 // progress
61 QElapsedTimer progressTimer;
62 int progressTimeout;
63 int progCurrent;
64 int progOrigin;
65 int progTarget;
66 bool actionShown;
67 void setProgress(int, int=0);
68 bool updateProgress(void);
69};
70
71#endif