diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-12-02 21:32:56 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-12-02 21:32:56 +0100 |
commit | 41006b5cab7b0260f8abc42aa2d2e959a013764e (patch) | |
tree | fe8be353228233f45119964cbab4b578b496ac85 /common/facade.cpp | |
parent | 222cd83d659c3ff12380ecc5afd3cb29283e9ccd (diff) | |
download | sink-41006b5cab7b0260f8abc42aa2d2e959a013764e.tar.gz sink-41006b5cab7b0260f8abc42aa2d2e959a013764e.zip |
interresource move
Diffstat (limited to 'common/facade.cpp')
-rw-r--r-- | common/facade.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/common/facade.cpp b/common/facade.cpp index 3ec58e3..c618d4e 100644 --- a/common/facade.cpp +++ b/common/facade.cpp | |||
@@ -68,7 +68,19 @@ KAsync::Job<void> GenericFacade<DomainType>::modify(const DomainType &domainObje | |||
68 | SinkWarning() << "No domain type adaptor factory available"; | 68 | SinkWarning() << "No domain type adaptor factory available"; |
69 | return KAsync::error<void>(); | 69 | return KAsync::error<void>(); |
70 | } | 70 | } |
71 | return mResourceAccess->sendModifyCommand(domainObject.identifier(), domainObject.revision(), bufferTypeForDomainType(), QByteArrayList(), BufferUtils::extractBuffer(entityFbb), domainObject.changedProperties()); | 71 | return mResourceAccess->sendModifyCommand(domainObject.identifier(), domainObject.revision(), bufferTypeForDomainType(), QByteArrayList(), BufferUtils::extractBuffer(entityFbb), domainObject.changedProperties(), QByteArray(), false); |
72 | } | ||
73 | |||
74 | template <class DomainType> | ||
75 | KAsync::Job<void> GenericFacade<DomainType>::move(const DomainType &domainObject, const QByteArray &newResource) | ||
76 | { | ||
77 | SinkTrace() << "Moving entity: " << domainObject.identifier() << domainObject.changedProperties() << newResource; | ||
78 | flatbuffers::FlatBufferBuilder entityFbb; | ||
79 | if (!mResourceContext.adaptorFactory<DomainType>().createBuffer(domainObject, entityFbb)) { | ||
80 | SinkWarning() << "No domain type adaptor factory available"; | ||
81 | return KAsync::error<void>(); | ||
82 | } | ||
83 | return mResourceAccess->sendModifyCommand(domainObject.identifier(), domainObject.revision(), bufferTypeForDomainType(), QByteArrayList(), BufferUtils::extractBuffer(entityFbb), domainObject.changedProperties(), newResource, false); | ||
72 | } | 84 | } |
73 | 85 | ||
74 | template <class DomainType> | 86 | template <class DomainType> |