summaryrefslogtreecommitdiffstats
path: root/common/clientapi.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-02-10 11:02:39 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-02-10 11:02:39 +0100
commit668cead7d8f98615d90dbc933f194105b3cf0bc3 (patch)
tree596ef6d2cf0f90ccbeb399f60d7904e8821a7e9a /common/clientapi.h
parent0991561c9630fcb89b9666b8d57c2b7ea592fec6 (diff)
downloadsink-668cead7d8f98615d90dbc933f194105b3cf0bc3.tar.gz
sink-668cead7d8f98615d90dbc933f194105b3cf0bc3.zip
Moved Notifier and ResourceAccess to separate files.
Diffstat (limited to 'common/clientapi.h')
-rw-r--r--common/clientapi.h65
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
35class QAbstractItemModel;
36
37namespace Sink {
38class ResourceAccess;
39class Notification;
40
41class SINK_EXPORT Notifier {
42public:
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
48private:
49 class Private;
50 QSharedPointer<Private> d;
51};
52
53
54namespace ResourceControl {
55
56template <class DomainType>
57KAsync::Job<void> SINK_EXPORT inspect(const Inspection &inspectionCommand);
58
59/**
60 * Shutdown resource.
61 */
62KAsync::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 */
71KAsync::Job<void> SINK_EXPORT start(const QByteArray &resourceIdentifier);
72
73/**
74 * Flushes any pending messages to disk
75 */
76KAsync::Job<void> SINK_EXPORT flushMessageQueue(const QByteArrayList &resourceIdentifier);
77
78/**
79 * Flushes any pending messages that haven't been replayed to the source.
80 */
81KAsync::Job<void> SINK_EXPORT flushReplayQueue(const QByteArrayList &resourceIdentifier);
82
83}
84
85}
86