summaryrefslogtreecommitdiffstats
path: root/common/store.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-11-21 10:10:15 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-11-21 10:45:04 +0100
commita188fb648ba001314adbb9d5cfc0bfb77198a5b9 (patch)
tree899e46c4d581e7a13df0efc58ceaaa80098d64c7 /common/store.cpp
parenta1dcb117835f7c1f0604f0302b42edd905190a52 (diff)
downloadsink-a188fb648ba001314adbb9d5cfc0bfb77198a5b9.tar.gz
sink-a188fb648ba001314adbb9d5cfc0bfb77198a5b9.zip
sinksh list identity support
Diffstat (limited to 'common/store.cpp')
-rw-r--r--common/store.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/store.cpp b/common/store.cpp
index 41b4867..5e0c327 100644
--- a/common/store.cpp
+++ b/common/store.cpp
@@ -200,6 +200,7 @@ static std::shared_ptr<StoreFacade<DomainType>> getFacade(const QByteArray &reso
200template <class DomainType> 200template <class DomainType>
201KAsync::Job<void> Store::create(const DomainType &domainObject) 201KAsync::Job<void> Store::create(const DomainType &domainObject)
202{ 202{
203 SinkTrace() << "Create: " << domainObject;
203 // Potentially move to separate thread as well 204 // Potentially move to separate thread as well
204 auto facade = getFacade<DomainType>(domainObject.resourceInstanceIdentifier()); 205 auto facade = getFacade<DomainType>(domainObject.resourceInstanceIdentifier());
205 return facade->create(domainObject).addToContext(std::shared_ptr<void>(facade)).onError([](const KAsync::Error &error) { SinkWarning() << "Failed to create"; }); 206 return facade->create(domainObject).addToContext(std::shared_ptr<void>(facade)).onError([](const KAsync::Error &error) { SinkWarning() << "Failed to create"; });
@@ -208,6 +209,7 @@ KAsync::Job<void> Store::create(const DomainType &domainObject)
208template <class DomainType> 209template <class DomainType>
209KAsync::Job<void> Store::modify(const DomainType &domainObject) 210KAsync::Job<void> Store::modify(const DomainType &domainObject)
210{ 211{
212 SinkTrace() << "Modify: " << domainObject;
211 // Potentially move to separate thread as well 213 // Potentially move to separate thread as well
212 auto facade = getFacade<DomainType>(domainObject.resourceInstanceIdentifier()); 214 auto facade = getFacade<DomainType>(domainObject.resourceInstanceIdentifier());
213 return facade->modify(domainObject).addToContext(std::shared_ptr<void>(facade)).onError([](const KAsync::Error &error) { SinkWarning() << "Failed to modify"; }); 215 return facade->modify(domainObject).addToContext(std::shared_ptr<void>(facade)).onError([](const KAsync::Error &error) { SinkWarning() << "Failed to modify"; });
@@ -216,6 +218,7 @@ KAsync::Job<void> Store::modify(const DomainType &domainObject)
216template <class DomainType> 218template <class DomainType>
217KAsync::Job<void> Store::remove(const DomainType &domainObject) 219KAsync::Job<void> Store::remove(const DomainType &domainObject)
218{ 220{
221 SinkTrace() << "Remove: " << domainObject;
219 // Potentially move to separate thread as well 222 // Potentially move to separate thread as well
220 auto facade = getFacade<DomainType>(domainObject.resourceInstanceIdentifier()); 223 auto facade = getFacade<DomainType>(domainObject.resourceInstanceIdentifier());
221 return facade->remove(domainObject).addToContext(std::shared_ptr<void>(facade)).onError([](const KAsync::Error &error) { SinkWarning() << "Failed to remove"; }); 224 return facade->remove(domainObject).addToContext(std::shared_ptr<void>(facade)).onError([](const KAsync::Error &error) { SinkWarning() << "Failed to remove"; });