|
| 1 | +// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd. |
| 2 | +// |
| 3 | +// SPDX-License-Identifier: GPL-3.0-or-later |
| 4 | + |
| 5 | +#ifndef BOOTMAKERADAPTOR_H |
| 6 | +#define BOOTMAKERADAPTOR_H |
| 7 | + |
| 8 | +#include <QtCore/QObject> |
| 9 | +#include <QtDBus/QtDBus> |
| 10 | +QT_BEGIN_NAMESPACE |
| 11 | +class QByteArray; |
| 12 | +template<class T> class QList; |
| 13 | +template<class Key, class Value> class QMap; |
| 14 | +class QString; |
| 15 | +class QStringList; |
| 16 | +class QVariant; |
| 17 | +QT_END_NAMESPACE |
| 18 | + |
| 19 | +/* |
| 20 | + * Adaptor class for interface com.deepin.bootmaker |
| 21 | + */ |
| 22 | +class BootMakerAdaptor: public QDBusAbstractAdaptor |
| 23 | +{ |
| 24 | + Q_OBJECT |
| 25 | + Q_CLASSINFO("D-Bus Interface", "com.deepin.bootmaker") |
| 26 | + Q_CLASSINFO("D-Bus Introspection", "" |
| 27 | +" <interface name=\"com.deepin.bootmaker\">\n" |
| 28 | +" <signal name=\"DeviceListChanged\">\n" |
| 29 | +" <arg direction=\"out\" type=\"s\" name=\"deviceListJson\"/>\n" |
| 30 | +" </signal>\n" |
| 31 | +" <signal name=\"Finished\">\n" |
| 32 | +" <arg direction=\"out\" type=\"i\" name=\"errcode\"/>\n" |
| 33 | +" <arg direction=\"out\" type=\"s\" name=\"description\"/>\n" |
| 34 | +" </signal>\n" |
| 35 | +" <signal name=\"ReportProgress\">\n" |
| 36 | +" <arg direction=\"out\" type=\"i\" name=\"current\"/>\n" |
| 37 | +" <arg direction=\"out\" type=\"i\" name=\"total\"/>\n" |
| 38 | +" <arg direction=\"out\" type=\"s\" name=\"title\"/>\n" |
| 39 | +" <arg direction=\"out\" type=\"s\" name=\"description\"/>\n" |
| 40 | +" </signal>\n" |
| 41 | +" <method name=\"DeviceList\">\n" |
| 42 | +" <arg direction=\"out\" type=\"s\"/>\n" |
| 43 | +" </method>\n" |
| 44 | +" <method name=\"Reboot\"/>\n" |
| 45 | +" <method name=\"Start\"/>\n" |
| 46 | +" <method name=\"Stop\"/>\n" |
| 47 | +" <method name=\"Install\">\n" |
| 48 | +" <arg direction=\"out\" type=\"b\"/>\n" |
| 49 | +" <arg direction=\"in\" type=\"s\" name=\"image\"/>\n" |
| 50 | +" <arg direction=\"in\" type=\"s\" name=\"device\"/>\n" |
| 51 | +" <arg direction=\"in\" type=\"s\" name=\"partition\"/>\n" |
| 52 | +" <arg direction=\"in\" type=\"b\" name=\"formatDevice\"/>\n" |
| 53 | +" </method>\n" |
| 54 | +" </interface>\n" |
| 55 | + "") |
| 56 | +public: |
| 57 | + BootMakerAdaptor(QObject *parent); |
| 58 | + virtual ~BootMakerAdaptor(); |
| 59 | + |
| 60 | +public: // PROPERTIES |
| 61 | +public Q_SLOTS: // METHODS |
| 62 | + QString DeviceList(); |
| 63 | + bool Install(const QString &image, const QString &device, const QString &partition, bool formatDevice); |
| 64 | + void Reboot(); |
| 65 | + void Start(); |
| 66 | + void Stop(); |
| 67 | +Q_SIGNALS: // SIGNALS |
| 68 | + void DeviceListChanged(const QString &deviceListJson); |
| 69 | + void Finished(int errcode, const QString &description); |
| 70 | + void ReportProgress(int current, int total, const QString &title, const QString &description); |
| 71 | +}; |
| 72 | + |
| 73 | +#endif |
0 commit comments