Changeset View
Changeset View
Standalone View
Standalone View
autotests/testremoteasyncrunner.h
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | * Copyright 2017 David Edmundson <davidedmundson@kde.org> | ||||
3 | * Copyright 2018 Friedrich W. H. Kossebau <kossebau@kde.org> | ||||
4 | * | ||||
5 | * This program is free software; you can redistribute it and/or modify | ||||
6 | * it under the terms of the GNU Library General Public License version 2 as | ||||
7 | * published by the Free Software Foundation | ||||
8 | * | ||||
9 | * This program is distributed in the hope that it will be useful, | ||||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
12 | * GNU General Public License for more details | ||||
13 | * | ||||
14 | * You should have received a copy of the GNU Library General Public | ||||
15 | * License along with this program; if not, write to the | ||||
16 | * Free Software Foundation, Inc., | ||||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
18 | */ | ||||
19 | | ||||
20 | #pragma once | ||||
21 | | ||||
22 | #include <KDBusRunner/AbstractRunner> | ||||
23 | | ||||
24 | class QTimer; | ||||
25 | | ||||
26 | class TestRemoteAsyncRunner : public KDBusRunner::AbstractRunner | ||||
27 | { | ||||
28 | Q_OBJECT | ||||
29 | | ||||
30 | public: | ||||
31 | explicit TestRemoteAsyncRunner(const QString &serviceName); | ||||
32 | | ||||
33 | public: | ||||
34 | KDBusRunner::Actions actions() const override; | ||||
35 | void handleMatchRequest(const KDBusRunner::MatchReply::Ptr &matchReply) override; | ||||
36 | void run(const QString &matchId, const QString &actionId) override; | ||||
37 | | ||||
38 | private: | ||||
39 | void handleMatchRequestAsync(); | ||||
40 | | ||||
41 | private: | ||||
42 | KDBusRunner::MatchReply::Ptr m_matchReply; | ||||
43 | QTimer *m_asyncHandlingTimer; | ||||
44 | }; |