-
Notifications
You must be signed in to change notification settings - Fork 17
/
dbuscaller.h
45 lines (38 loc) · 1.13 KB
/
dbuscaller.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
* SPDX-FileCopyrightText: 2013-2018 CSSlayer <wengxt@gmail.com>
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*
*/
/*
* SPDX-FileCopyrightText: 2020~2020 CSSlayer <wengxt@gmail.com>
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*
*/
#ifndef _FCITX5_CONFIGTOOL_MIGRATOR_LIB_DBUSCALLER_H_
#define _FCITX5_CONFIGTOOL_MIGRATOR_LIB_DBUSCALLER_H_
#include "fcitx5migrator_export.h"
#include "pipelinejob.h"
#include <QDBusPendingCallWatcher>
#include <QObject>
namespace fcitx {
class FCITX5MIGRATOR_EXPORT DBusCaller : public PipelineJob {
Q_OBJECT
public:
explicit DBusCaller(std::function<QDBusPendingCallWatcher *()> callback,
const QString &startMessage,
const QString &finishMessage,
QObject *parent = nullptr);
void start() override;
void abort() override;
void cleanUp() override;
private Q_SLOTS:
private:
std::function<QDBusPendingCallWatcher *()> callback_;
QString startMessage_;
QString finishMessage_;
QDBusPendingCallWatcher *watcher_;
};
} // namespace fcitx
#endif // _FCITX5_CONFIGTOOL_MIGRATOR_LIB_DBUSCALLER_H_