diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-01-19 12:39:45 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-01-19 12:39:45 +0100 |
commit | d5b28efe4d7fc2a984243417d923ff5727234e94 (patch) | |
tree | 1546145760eb0fa2d8d606e3332e1bab92e63161 /common/facade.cpp | |
parent | 4922555a38af32fc94e56aeb208b9fda31dab1b2 (diff) | |
download | sink-d5b28efe4d7fc2a984243417d923ff5727234e94.tar.gz sink-d5b28efe4d7fc2a984243417d923ff5727234e94.zip |
Added bufferutils.h
Diffstat (limited to 'common/facade.cpp')
-rw-r--r-- | common/facade.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/common/facade.cpp b/common/facade.cpp index 22ef84a..91021db 100644 --- a/common/facade.cpp +++ b/common/facade.cpp | |||
@@ -25,6 +25,7 @@ | |||
25 | #include "definitions.h" | 25 | #include "definitions.h" |
26 | #include "domainadaptor.h" | 26 | #include "domainadaptor.h" |
27 | #include "queryrunner.h" | 27 | #include "queryrunner.h" |
28 | #include "bufferutils.h" | ||
28 | 29 | ||
29 | using namespace Akonadi2; | 30 | using namespace Akonadi2; |
30 | 31 | ||
@@ -113,7 +114,7 @@ KAsync::Job<void> GenericFacade<DomainType>::create(const DomainType &domainObje | |||
113 | } | 114 | } |
114 | flatbuffers::FlatBufferBuilder entityFbb; | 115 | flatbuffers::FlatBufferBuilder entityFbb; |
115 | mDomainTypeAdaptorFactory->createBuffer(domainObject, entityFbb); | 116 | mDomainTypeAdaptorFactory->createBuffer(domainObject, entityFbb); |
116 | return mResourceAccess->sendCreateCommand(bufferTypeForDomainType(), QByteArray::fromRawData(reinterpret_cast<const char*>(entityFbb.GetBufferPointer()), entityFbb.GetSize())); | 117 | return mResourceAccess->sendCreateCommand(bufferTypeForDomainType(), BufferUtils::extractBuffer(entityFbb)); |
117 | } | 118 | } |
118 | 119 | ||
119 | template<class DomainType> | 120 | template<class DomainType> |
@@ -125,7 +126,7 @@ KAsync::Job<void> GenericFacade<DomainType>::modify(const DomainType &domainObje | |||
125 | } | 126 | } |
126 | flatbuffers::FlatBufferBuilder entityFbb; | 127 | flatbuffers::FlatBufferBuilder entityFbb; |
127 | mDomainTypeAdaptorFactory->createBuffer(domainObject, entityFbb); | 128 | mDomainTypeAdaptorFactory->createBuffer(domainObject, entityFbb); |
128 | return mResourceAccess->sendModifyCommand(domainObject.identifier(), domainObject.revision(), bufferTypeForDomainType(), QByteArrayList(), QByteArray::fromRawData(reinterpret_cast<const char*>(entityFbb.GetBufferPointer()), entityFbb.GetSize())); | 129 | return mResourceAccess->sendModifyCommand(domainObject.identifier(), domainObject.revision(), bufferTypeForDomainType(), QByteArrayList(), BufferUtils::extractBuffer(entityFbb)); |
129 | } | 130 | } |
130 | 131 | ||
131 | template<class DomainType> | 132 | template<class DomainType> |