diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-02-10 11:02:39 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-02-10 11:02:39 +0100 |
commit | 668cead7d8f98615d90dbc933f194105b3cf0bc3 (patch) | |
tree | 596ef6d2cf0f90ccbeb399f60d7904e8821a7e9a /common/resourcecontrol.h | |
parent | 0991561c9630fcb89b9666b8d57c2b7ea592fec6 (diff) | |
download | sink-668cead7d8f98615d90dbc933f194105b3cf0bc3.tar.gz sink-668cead7d8f98615d90dbc933f194105b3cf0bc3.zip |
Moved Notifier and ResourceAccess to separate files.
Diffstat (limited to 'common/resourcecontrol.h')
-rw-r--r-- | common/resourcecontrol.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/common/resourcecontrol.h b/common/resourcecontrol.h new file mode 100644 index 0000000..5bfa67f --- /dev/null +++ b/common/resourcecontrol.h | |||
@@ -0,0 +1,62 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2015 Christian Mollekopf <chrigi_1@fastmail.fm> | ||
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 | |||
21 | #pragma once | ||
22 | |||
23 | #include "sink_export.h" | ||
24 | #include <QByteArray> | ||
25 | |||
26 | #include <Async/Async> | ||
27 | |||
28 | #include "inspection.h" | ||
29 | |||
30 | namespace Sink { | ||
31 | namespace ResourceControl { | ||
32 | |||
33 | template <class DomainType> | ||
34 | KAsync::Job<void> SINK_EXPORT inspect(const Inspection &inspectionCommand); | ||
35 | |||
36 | /** | ||
37 | * Shutdown resource. | ||
38 | */ | ||
39 | KAsync::Job<void> SINK_EXPORT shutdown(const QByteArray &resourceIdentifier); | ||
40 | |||
41 | /** | ||
42 | * Start resource. | ||
43 | * | ||
44 | * The resource is ready for operation once this command completes. | ||
45 | * This command is only necessary if a resource was shutdown previously, | ||
46 | * otherwise the resource process will automatically start as necessary. | ||
47 | */ | ||
48 | KAsync::Job<void> SINK_EXPORT start(const QByteArray &resourceIdentifier); | ||
49 | |||
50 | /** | ||
51 | * Flushes any pending messages to disk | ||
52 | */ | ||
53 | KAsync::Job<void> SINK_EXPORT flushMessageQueue(const QByteArrayList &resourceIdentifier); | ||
54 | |||
55 | /** | ||
56 | * Flushes any pending messages that haven't been replayed to the source. | ||
57 | */ | ||
58 | KAsync::Job<void> SINK_EXPORT flushReplayQueue(const QByteArrayList &resourceIdentifier); | ||
59 | |||
60 | } | ||
61 | } | ||
62 | |||