1// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#ifndef POLKIT_H
6#define POLKIT_H
7
8#include <QString>
9#include <QObject>
10
11class PolKit final: public QObject
12{
13 Q_OBJECT
14 Q_DISABLE_COPY(PolKit)
15 PolKit();
16public:
17 PolKit &instance();
18
19 // Asynchronous
20 qint64 execute(const QString & program, const QStringList &arguments);
21
22 // kill Polkit
23 void cancel(qint64 executeID);
24
25signals:
26 void succeeded();
27 void failed(const QByteArray &);
28 void canceled();
29};
30
31#endif // POLKIT_H
32