summaryrefslogtreecommitdiffstats
path: root/common/clientapi.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/clientapi.h')
-rw-r--r--common/clientapi.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/common/clientapi.h b/common/clientapi.h
index f88eb5c..ff23da5 100644
--- a/common/clientapi.h
+++ b/common/clientapi.h
@@ -20,7 +20,7 @@
20 20
21#pragma once 21#pragma once
22 22
23#include "sinkcommon_export.h" 23#include "sink_export.h"
24#include <QString> 24#include <QString>
25#include <QSharedPointer> 25#include <QSharedPointer>
26 26
@@ -36,7 +36,7 @@ namespace Sink {
36class ResourceAccess; 36class ResourceAccess;
37class Notification; 37class Notification;
38 38
39class SINKCOMMON_EXPORT Notifier { 39class SINK_EXPORT Notifier {
40public: 40public:
41 Notifier(const QSharedPointer<ResourceAccess> &resourceAccess); 41 Notifier(const QSharedPointer<ResourceAccess> &resourceAccess);
42 Notifier(const QByteArray &resourceInstanceIdentifier); 42 Notifier(const QByteArray &resourceInstanceIdentifier);
@@ -54,8 +54,8 @@ private:
54 */ 54 */
55namespace Store { 55namespace Store {
56 56
57QString SINKCOMMON_EXPORT storageLocation(); 57QString SINK_EXPORT storageLocation();
58QByteArray SINKCOMMON_EXPORT resourceName(const QByteArray &instanceIdentifier); 58QByteArray SINK_EXPORT resourceName(const QByteArray &instanceIdentifier);
59 59
60enum Roles { 60enum Roles {
61 DomainObjectRole = Qt::UserRole + 1, //Must be the same as in ModelResult 61 DomainObjectRole = Qt::UserRole + 1, //Must be the same as in ModelResult
@@ -67,13 +67,13 @@ enum Roles {
67 * Asynchronusly load a dataset with tree structure information 67 * Asynchronusly load a dataset with tree structure information
68 */ 68 */
69template <class DomainType> 69template <class DomainType>
70QSharedPointer<QAbstractItemModel> SINKCOMMON_EXPORT loadModel(Query query); 70QSharedPointer<QAbstractItemModel> SINK_EXPORT loadModel(Query query);
71 71
72/** 72/**
73 * Create a new entity. 73 * Create a new entity.
74 */ 74 */
75template <class DomainType> 75template <class DomainType>
76KAsync::Job<void> SINKCOMMON_EXPORT create(const DomainType &domainObject); 76KAsync::Job<void> SINK_EXPORT create(const DomainType &domainObject);
77 77
78/** 78/**
79 * Modify an entity. 79 * Modify an entity.
@@ -81,51 +81,51 @@ KAsync::Job<void> SINKCOMMON_EXPORT create(const DomainType &domainObject);
81 * This includes moving etc. since these are also simple settings on a property. 81 * This includes moving etc. since these are also simple settings on a property.
82 */ 82 */
83template <class DomainType> 83template <class DomainType>
84KAsync::Job<void> SINKCOMMON_EXPORT modify(const DomainType &domainObject); 84KAsync::Job<void> SINK_EXPORT modify(const DomainType &domainObject);
85 85
86/** 86/**
87 * Remove an entity. 87 * Remove an entity.
88 */ 88 */
89template <class DomainType> 89template <class DomainType>
90KAsync::Job<void> SINKCOMMON_EXPORT remove(const DomainType &domainObject); 90KAsync::Job<void> SINK_EXPORT remove(const DomainType &domainObject);
91 91
92/** 92/**
93 * Synchronize data to local cache. 93 * Synchronize data to local cache.
94 */ 94 */
95KAsync::Job<void> SINKCOMMON_EXPORT synchronize(const Sink::Query &query); 95KAsync::Job<void> SINK_EXPORT synchronize(const Sink::Query &query);
96 96
97/** 97/**
98 * Removes a resource from disk. 98 * Removes a resource from disk.
99 */ 99 */
100void SINKCOMMON_EXPORT removeFromDisk(const QByteArray &resourceIdentifier); 100void SINK_EXPORT removeFromDisk(const QByteArray &resourceIdentifier);
101 101
102/** 102/**
103 * Removes all resource data from disk. 103 * Removes all resource data from disk.
104 * 104 *
105 * This will not touch the configuration. All commands that that arrived at the resource before this command will be dropped. All commands that arrived later will be executed. 105 * This will not touch the configuration. All commands that that arrived at the resource before this command will be dropped. All commands that arrived later will be executed.
106 */ 106 */
107KAsync::Job<void> SINKCOMMON_EXPORT removeDataFromDisk(const QByteArray &resourceIdentifier); 107KAsync::Job<void> SINK_EXPORT removeDataFromDisk(const QByteArray &resourceIdentifier);
108 108
109template <class DomainType> 109template <class DomainType>
110KAsync::Job<DomainType> SINKCOMMON_EXPORT fetchOne(const Sink::Query &query); 110KAsync::Job<DomainType> SINK_EXPORT fetchOne(const Sink::Query &query);
111 111
112template <class DomainType> 112template <class DomainType>
113KAsync::Job<QList<typename DomainType::Ptr> > SINKCOMMON_EXPORT fetchAll(const Sink::Query &query); 113KAsync::Job<QList<typename DomainType::Ptr> > SINK_EXPORT fetchAll(const Sink::Query &query);
114 114
115template <class DomainType> 115template <class DomainType>
116KAsync::Job<QList<typename DomainType::Ptr> > SINKCOMMON_EXPORT fetch(const Sink::Query &query, int minimumAmount = 0); 116KAsync::Job<QList<typename DomainType::Ptr> > SINK_EXPORT fetch(const Sink::Query &query, int minimumAmount = 0);
117 117
118}; 118};
119 119
120namespace Resources { 120namespace Resources {
121 121
122template <class DomainType> 122template <class DomainType>
123KAsync::Job<void> SINKCOMMON_EXPORT inspect(const Inspection &inspectionCommand); 123KAsync::Job<void> SINK_EXPORT inspect(const Inspection &inspectionCommand);
124 124
125/** 125/**
126 * Shutdown resource. 126 * Shutdown resource.
127 */ 127 */
128KAsync::Job<void> SINKCOMMON_EXPORT shutdown(const QByteArray &resourceIdentifier); 128KAsync::Job<void> SINK_EXPORT shutdown(const QByteArray &resourceIdentifier);
129 129
130/** 130/**
131 * Start resource. 131 * Start resource.
@@ -134,17 +134,17 @@ KAsync::Job<void> SINKCOMMON_EXPORT shutdown(const QByteArray &resourceIdentifie
134 * This command is only necessary if a resource was shutdown previously, 134 * This command is only necessary if a resource was shutdown previously,
135 * otherwise the resource process will automatically start as necessary. 135 * otherwise the resource process will automatically start as necessary.
136 */ 136 */
137KAsync::Job<void> SINKCOMMON_EXPORT start(const QByteArray &resourceIdentifier); 137KAsync::Job<void> SINK_EXPORT start(const QByteArray &resourceIdentifier);
138 138
139/** 139/**
140 * Flushes any pending messages to disk 140 * Flushes any pending messages to disk
141 */ 141 */
142KAsync::Job<void> SINKCOMMON_EXPORT flushMessageQueue(const QByteArrayList &resourceIdentifier); 142KAsync::Job<void> SINK_EXPORT flushMessageQueue(const QByteArrayList &resourceIdentifier);
143 143
144/** 144/**
145 * Flushes any pending messages that haven't been replayed to the source. 145 * Flushes any pending messages that haven't been replayed to the source.
146 */ 146 */
147KAsync::Job<void> SINKCOMMON_EXPORT flushReplayQueue(const QByteArrayList &resourceIdentifier); 147KAsync::Job<void> SINK_EXPORT flushReplayQueue(const QByteArrayList &resourceIdentifier);
148 148
149} 149}
150 150