| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
#pragma once |
| 6 |
|
| 7 |
#include <QObject> |
| 8 |
#include <QDBusContext> |
| 9 |
#include <QScopedPointer> |
| 10 |
|
| 11 |
class BootMakerServicePrivate; |
| 12 |
class BootMakerService : public QObject, |
| 13 |
protected QDBusContext |
| 14 |
{ |
| 15 |
Q_OBJECT |
| 16 |
Q_CLASSINFO("D-Bus Interface", "com.deepin.bootmaker") |
| 17 |
|
| 18 |
public: |
| 19 |
explicit BootMakerService(QObject *parent = nullptr); |
| 20 |
virtual ~BootMakerService(); |
| 21 |
|
| 22 |
signals: |
| 23 |
Q_SCRIPTABLE void DeviceListChanged(const QString addlistJson, const QString& dellistJson); |
| 24 |
Q_SCRIPTABLE void Finished(int errcode, const QString &description); |
| 25 |
Q_SCRIPTABLE void ReportProgress(int current, int error, const QString &title, const QString &description); |
| 26 |
Q_SCRIPTABLE void ReportProgress1(int current, int error, const QString &title, const QString &description); |
| 27 |
|
| 28 |
void s_StartBootMarker(); |
| 29 |
|
| 30 |
public slots: |
| 31 |
Q_SCRIPTABLE void Reboot(); |
| 32 |
Q_SCRIPTABLE void Start(); |
| 33 |
Q_SCRIPTABLE void Stop(); |
| 34 |
Q_SCRIPTABLE QString DeviceList(); |
| 35 |
Q_SCRIPTABLE bool Install(const QString &image, |
| 36 |
const QString &device, |
| 37 |
const QString &partition, |
| 38 |
bool formatDevice); |
| 39 |
Q_SCRIPTABLE bool CheckFile(const QString &filepath); |
| 40 |
|
| 41 |
private: |
| 42 |
QScopedPointer<BootMakerServicePrivate> d_ptr; |
| 43 |
Q_DECLARE_PRIVATE_D(qGetPtrHelper(d_ptr), BootMakerService) |
| 44 |
}; |
| 45 |
|