summaryrefslogtreecommitdiffstats
path: root/common/clientapi.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/clientapi.h')
-rw-r--r--common/clientapi.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/common/clientapi.h b/common/clientapi.h
index a01db23..4644ae1 100644
--- a/common/clientapi.h
+++ b/common/clientapi.h
@@ -35,6 +35,7 @@
35#include "resultprovider.h" 35#include "resultprovider.h"
36#include "domain/applicationdomaintype.h" 36#include "domain/applicationdomaintype.h"
37#include "resourceconfig.h" 37#include "resourceconfig.h"
38#include "log.h"
38 39
39namespace async { 40namespace async {
40 //This should abstract if we execute from eventloop or in thread. 41 //This should abstract if we execute from eventloop or in thread.
@@ -277,7 +278,9 @@ public:
277 //Potentially move to separate thread as well 278 //Potentially move to separate thread as well
278 auto facade = FacadeFactory::instance().getFacade<DomainType>(resourceName(resourceIdentifier), resourceIdentifier); 279 auto facade = FacadeFactory::instance().getFacade<DomainType>(resourceName(resourceIdentifier), resourceIdentifier);
279 if (facade) { 280 if (facade) {
280 facade->create(domainObject).exec().waitForFinished(); 281 facade->create(domainObject).template then<void>([](){}, [](int errorCode, const QString &error) {
282 Warning() << "Failed to create";
283 }).exec().waitForFinished();
281 } 284 }
282 //TODO return job? 285 //TODO return job?
283 } 286 }
@@ -292,7 +295,9 @@ public:
292 //Potentially move to separate thread as well 295 //Potentially move to separate thread as well
293 auto facade = FacadeFactory::instance().getFacade<DomainType>(resourceName(resourceIdentifier), resourceIdentifier); 296 auto facade = FacadeFactory::instance().getFacade<DomainType>(resourceName(resourceIdentifier), resourceIdentifier);
294 if (facade) { 297 if (facade) {
295 facade->modify(domainObject).exec().waitForFinished(); 298 facade->modify(domainObject).template then<void>([](){}, [](int errorCode, const QString &error) {
299 Warning() << "Failed to modify";
300 }).exec().waitForFinished();
296 } 301 }
297 //TODO return job? 302 //TODO return job?
298 } 303 }
@@ -305,7 +310,9 @@ public:
305 //Potentially move to separate thread as well 310 //Potentially move to separate thread as well
306 auto facade = FacadeFactory::instance().getFacade<DomainType>(resourceName(resourceIdentifier), resourceIdentifier); 311 auto facade = FacadeFactory::instance().getFacade<DomainType>(resourceName(resourceIdentifier), resourceIdentifier);
307 if (facade) { 312 if (facade) {
308 facade->remove(domainObject).exec().waitForFinished(); 313 facade->remove(domainObject).template then<void>([](){}, [](int errorCode, const QString &error) {
314 Warning() << "Failed to remove";
315 }).exec().waitForFinished();
309 } 316 }
310 //TODO return job? 317 //TODO return job?
311 } 318 }