Debian Codegraph @

src/libdbm/backend/bmdbusinterface.h

raw symbols SCIP
1 // SPDX-FileCopyrightText: 2016 - 2022 UnionTech Software Technology Co., Ltd.
2 //
3 // SPDX-License-Identifier: GPL-3.0-only
4
5 #ifndef BMDBUSINTERFACE_H
6 #define BMDBUSINTERFACE_H
7
8 #include <QtCore/QObject>
9 #include <QtCore/QByteArray>
10 #include <QtCore/QList>
11 #include <QtCore/QMap>
12 #include <QtCore/QString>
13 #include <QtCore/QStringList>
14 #include <QtCore/QVariant>
15 #include <QtDBus/QtDBus>
16
17 /*
18 * Proxy class for interface com.deepin.bootmaker
19 */
20 class BMDBusInterface: public QDBusAbstractInterface
21 {
22 Q_OBJECT
23 public:
24 static inline const char *staticInterfaceName()
25 {
26 return "com.deepin.bootmaker";
27 }
28
29 public:
30 BMDBusInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr);
31
32 ~BMDBusInterface();
33
34 public Q_SLOTS: // METHODS
35 inline QDBusPendingReply<QString> DeviceList()
36 {
37 QList<QVariant> argumentList;
38 return asyncCallWithArgumentList(QStringLiteral("DeviceList"), argumentList);
39 }
40
41 inline QDBusPendingReply<bool> Install(const QString &image, const QString &device, const QString &partition, bool formatDevice)
42 {
43 QList<QVariant> argumentList;
44 argumentList << QVariant::fromValue(image) << QVariant::fromValue(device) << QVariant::fromValue(partition) << QVariant::fromValue(formatDevice);
45 return asyncCallWithArgumentList(QStringLiteral("Install"), argumentList);
46 }
47
48 inline QDBusPendingReply<bool> CheckFile(const QString &filepath)
49 {
50 QList<QVariant> argumentList;
51 argumentList << QVariant::fromValue(filepath);
52 return asyncCallWithArgumentList(QStringLiteral("CheckFile"), argumentList);
53 }
54
55 inline QDBusPendingReply<> Reboot()
56 {
57 QList<QVariant> argumentList;
58 return asyncCallWithArgumentList(QStringLiteral("Reboot"), argumentList);
59 }
60
61 inline QDBusPendingReply<> Start()
62 {
63 QList<QVariant> argumentList;
64 return asyncCallWithArgumentList(QStringLiteral("Start"), argumentList);
65 }
66
67 inline QDBusPendingReply<> Stop()
68 {
69 QList<QVariant> argumentList;
70 return callWithArgumentList(QDBus::CallMode::Block, QStringLiteral("Stop"), argumentList);
71 }
72
73 Q_SIGNALS: // SIGNALS
74 void DeviceListChanged(const QString &addlistJson, const QString &dellistJson);
75 void Finished(int errcode, const QString &description);
76 void ReportProgress(int current, int total, const QString &title, const QString &description);
77 void ReportProgress1(int current, int total, const QString &title, const QString &description);
78 // void CheckFileResult(bool result);
79 };
80
81 namespace com {
82 namespace deepin {
83 typedef ::BMDBusInterface bootmaker;
84 }
85 }
86 #endif