diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-11-28 19:33:01 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-11-28 19:33:01 +0100 |
commit | 938554f267193b652478fc12343819fa45d76034 (patch) | |
tree | 1c027f97f3209571740377f1d4b7e6721d8de777 /common/inspector.h | |
parent | 885f185f55249a2e97e9c7c238f89a5d0d99d1df (diff) | |
download | sink-938554f267193b652478fc12343819fa45d76034.tar.gz sink-938554f267193b652478fc12343819fa45d76034.zip |
Moved inspection commands to a separate inspector.
Diffstat (limited to 'common/inspector.h')
-rw-r--r-- | common/inspector.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/common/inspector.h b/common/inspector.h new file mode 100644 index 0000000..ff167b1 --- /dev/null +++ b/common/inspector.h | |||
@@ -0,0 +1,52 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2016 Christian Mollekopf <mollekopf@kolabsys.com> | ||
3 | * | ||
4 | * This library is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU Lesser General Public | ||
6 | * License as published by the Free Software Foundation; either | ||
7 | * version 2.1 of the License, or (at your option) version 3, or any | ||
8 | * later version accepted by the membership of KDE e.V. (or its | ||
9 | * successor approved by the membership of KDE e.V.), which shall | ||
10 | * act as a proxy defined in Section 6 of version 3 of the license. | ||
11 | * | ||
12 | * This library is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * Lesser General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU Lesser General Public | ||
18 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
19 | */ | ||
20 | #pragma once | ||
21 | |||
22 | #include "sink_export.h" | ||
23 | #include <QObject> | ||
24 | #include <Async/Async> | ||
25 | |||
26 | #include "notification.h" | ||
27 | #include "resourcecontext.h" | ||
28 | |||
29 | namespace Sink { | ||
30 | |||
31 | /** | ||
32 | * Synchronize and add what we don't already have to local queue | ||
33 | */ | ||
34 | class SINK_EXPORT Inspector : public QObject | ||
35 | { | ||
36 | Q_OBJECT | ||
37 | public: | ||
38 | Inspector(const ResourceContext &resourceContext); | ||
39 | virtual ~Inspector(); | ||
40 | |||
41 | KAsync::Job<void> processCommand(void const *command, size_t size); | ||
42 | |||
43 | signals: | ||
44 | void notify(Notification); | ||
45 | |||
46 | protected: | ||
47 | virtual KAsync::Job<void> inspect(int inspectionType, const QByteArray &inspectionId, const QByteArray &domainType, const QByteArray &entityId, const QByteArray &property, const QVariant &expectedValue); | ||
48 | |||
49 | Sink::ResourceContext mResourceContext; | ||
50 | }; | ||
51 | |||
52 | } | ||