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/clientapi.h | |
parent | 0991561c9630fcb89b9666b8d57c2b7ea592fec6 (diff) | |
download | sink-668cead7d8f98615d90dbc933f194105b3cf0bc3.tar.gz sink-668cead7d8f98615d90dbc933f194105b3cf0bc3.zip |
Moved Notifier and ResourceAccess to separate files.
Diffstat (limited to 'common/clientapi.h')
-rw-r--r-- | common/clientapi.h | 65 |
1 files changed, 2 insertions, 63 deletions
diff --git a/common/clientapi.h b/common/clientapi.h index a1d2469..8333987 100644 --- a/common/clientapi.h +++ b/common/clientapi.h | |||
@@ -20,67 +20,6 @@ | |||
20 | 20 | ||
21 | #pragma once | 21 | #pragma once |
22 | 22 | ||
23 | #include "sink_export.h" | ||
24 | #include <QString> | ||
25 | #include <QSharedPointer> | ||
26 | |||
27 | #include <Async/Async> | ||
28 | |||
29 | #include "store.h" | 23 | #include "store.h" |
30 | 24 | #include "notifier.h" | |
31 | #include "query.h" | 25 | #include "resourcecontrol.h" |
32 | #include "inspection.h" | ||
33 | #include "applicationdomaintype.h" | ||
34 | |||
35 | class QAbstractItemModel; | ||
36 | |||
37 | namespace Sink { | ||
38 | class ResourceAccess; | ||
39 | class Notification; | ||
40 | |||
41 | class SINK_EXPORT Notifier { | ||
42 | public: | ||
43 | Notifier(const QSharedPointer<ResourceAccess> &resourceAccess); | ||
44 | Notifier(const QByteArray &resourceInstanceIdentifier); | ||
45 | // Notifier(const QByteArrayList &resource); | ||
46 | void registerHandler(std::function<void(const Notification &)>); | ||
47 | |||
48 | private: | ||
49 | class Private; | ||
50 | QSharedPointer<Private> d; | ||
51 | }; | ||
52 | |||
53 | |||
54 | namespace ResourceControl { | ||
55 | |||
56 | template <class DomainType> | ||
57 | KAsync::Job<void> SINK_EXPORT inspect(const Inspection &inspectionCommand); | ||
58 | |||
59 | /** | ||
60 | * Shutdown resource. | ||
61 | */ | ||
62 | KAsync::Job<void> SINK_EXPORT shutdown(const QByteArray &resourceIdentifier); | ||
63 | |||
64 | /** | ||
65 | * Start resource. | ||
66 | * | ||
67 | * The resource is ready for operation once this command completes. | ||
68 | * This command is only necessary if a resource was shutdown previously, | ||
69 | * otherwise the resource process will automatically start as necessary. | ||
70 | */ | ||
71 | KAsync::Job<void> SINK_EXPORT start(const QByteArray &resourceIdentifier); | ||
72 | |||
73 | /** | ||
74 | * Flushes any pending messages to disk | ||
75 | */ | ||
76 | KAsync::Job<void> SINK_EXPORT flushMessageQueue(const QByteArrayList &resourceIdentifier); | ||
77 | |||
78 | /** | ||
79 | * Flushes any pending messages that haven't been replayed to the source. | ||
80 | */ | ||
81 | KAsync::Job<void> SINK_EXPORT flushReplayQueue(const QByteArrayList &resourceIdentifier); | ||
82 | |||
83 | } | ||
84 | |||
85 | } | ||
86 | |||