diff options
Diffstat (limited to 'common/clientapi.h')
-rw-r--r-- | common/clientapi.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/common/clientapi.h b/common/clientapi.h index 1bd8bdc..c098bb5 100644 --- a/common/clientapi.h +++ b/common/clientapi.h | |||
@@ -28,8 +28,10 @@ | |||
28 | #include <QEventLoop> | 28 | #include <QEventLoop> |
29 | #include <functional> | 29 | #include <functional> |
30 | #include <memory> | 30 | #include <memory> |
31 | |||
32 | #include <Async/Async> | ||
33 | |||
31 | #include "threadboundary.h" | 34 | #include "threadboundary.h" |
32 | #include "async/src/async.h" | ||
33 | #include "resultprovider.h" | 35 | #include "resultprovider.h" |
34 | 36 | ||
35 | namespace async { | 37 | namespace async { |
@@ -228,10 +230,10 @@ class StoreFacade { | |||
228 | public: | 230 | public: |
229 | virtual ~StoreFacade(){}; | 231 | virtual ~StoreFacade(){}; |
230 | QByteArray type() const { return ApplicationDomain::getTypeName<DomainType>(); } | 232 | QByteArray type() const { return ApplicationDomain::getTypeName<DomainType>(); } |
231 | virtual Async::Job<void> create(const DomainType &domainObject) = 0; | 233 | virtual KAsync::Job<void> create(const DomainType &domainObject) = 0; |
232 | virtual Async::Job<void> modify(const DomainType &domainObject) = 0; | 234 | virtual KAsync::Job<void> modify(const DomainType &domainObject) = 0; |
233 | virtual Async::Job<void> remove(const DomainType &domainObject) = 0; | 235 | virtual KAsync::Job<void> remove(const DomainType &domainObject) = 0; |
234 | virtual Async::Job<void> load(const Query &query, const QSharedPointer<ResultProvider<typename DomainType::Ptr> > &resultProvider) = 0; | 236 | virtual KAsync::Job<void> load(const Query &query, const QSharedPointer<ResultProvider<typename DomainType::Ptr> > &resultProvider) = 0; |
235 | }; | 237 | }; |
236 | 238 | ||
237 | 239 | ||
@@ -341,8 +343,8 @@ public: | |||
341 | //The result provider must be threadsafe. | 343 | //The result provider must be threadsafe. |
342 | async::run([query, resultSet](){ | 344 | async::run([query, resultSet](){ |
343 | // Query all resources and aggregate results | 345 | // Query all resources and aggregate results |
344 | Async::iterate(query.resources) | 346 | KAsync::iterate(query.resources) |
345 | .template each<void, QByteArray>([query, resultSet](const QByteArray &resource, Async::Future<void> &future) { | 347 | .template each<void, QByteArray>([query, resultSet](const QByteArray &resource, KAsync::Future<void> &future) { |
346 | //TODO pass resource identifier to factory | 348 | //TODO pass resource identifier to factory |
347 | auto facade = FacadeFactory::instance().getFacade<DomainType>(resource); | 349 | auto facade = FacadeFactory::instance().getFacade<DomainType>(resource); |
348 | if (facade) { | 350 | if (facade) { |