Changeset View
Changeset View
Standalone View
Standalone View
src/dbusrunner/dbusrunner1adaptor_p.h
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | * Copyright 2018 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 | #ifndef KDBUSRUNNER_DBUSRUNNER1ADAPTOR_P_H | ||||
21 | #define KDBUSRUNNER_DBUSRUNNER1ADAPTOR_P_H | ||||
22 | | ||||
23 | #include "abstractrunner_p.h" | ||||
24 | // Qt | ||||
25 | #include <QDBusAbstractAdaptor> | ||||
26 | | ||||
27 | namespace KDBusRunner | ||||
28 | { | ||||
29 | | ||||
30 | /* | ||||
31 | * Adaptor class for interface org.kde.krunner1 | ||||
32 | */ | ||||
33 | class DBusRunner1Adaptor: public QDBusAbstractAdaptor | ||||
34 | { | ||||
35 | Q_OBJECT | ||||
36 | Q_CLASSINFO("D-Bus Interface", "org.kde.krunner1") | ||||
37 | Q_CLASSINFO("D-Bus Introspection", "" | ||||
38 | " <interface name=\"org.kde.krunner1\">\n" | ||||
39 | " <method name=\"Actions\">\n" | ||||
40 | " <arg direction=\"out\" type=\"a(sss)\" name=\"matches\"/>\n" | ||||
41 | " </method>\n" | ||||
42 | " <method name=\"Run\">\n" | ||||
43 | " <arg direction=\"in\" type=\"s\" name=\"matchId\"/>\n" | ||||
44 | " <arg direction=\"in\" type=\"s\" name=\"actionId\"/>\n" | ||||
45 | " </method>\n" | ||||
46 | " <method name=\"Match\">\n" | ||||
47 | " <arg direction=\"in\" type=\"s\" name=\"query\"/>\n" | ||||
48 | " <arg direction=\"out\" type=\"a(sssida{sv})\" name=\"matches\"/>\n" | ||||
49 | " </method>\n" | ||||
50 | " </interface>\n" | ||||
51 | "") | ||||
52 | public: | ||||
53 | explicit DBusRunner1Adaptor(AbstractRunnerPrivate *parent); | ||||
54 | ~DBusRunner1Adaptor() override; | ||||
55 | | ||||
56 | inline AbstractRunnerPrivate * parent() const { return static_cast<AbstractRunnerPrivate*>(QObject::parent()); } | ||||
57 | | ||||
58 | public Q_SLOTS: | ||||
59 | KDBusRunner::QueryMatches Match(const QString &query); | ||||
60 | void Run(const QString &matchId, const QString &actionId); | ||||
61 | KDBusRunner::Actions Actions(); | ||||
62 | }; | ||||
63 | | ||||
64 | } | ||||
65 | | ||||
66 | #endif |