diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2014-12-28 14:44:50 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2014-12-28 14:44:50 +0100 |
commit | 9b2257d680a5e4fa2fda8cf3302f25054a06710e (patch) | |
tree | 9abaf141018eb83d26ce07f5bd0e9436003ce732 /common/entitybuffer.h | |
parent | c83c2ef64b5a1e4b1dc0102df36687caebb96ff0 (diff) | |
download | sink-9b2257d680a5e4fa2fda8cf3302f25054a06710e.tar.gz sink-9b2257d680a5e4fa2fda8cf3302f25054a06710e.zip |
Buffers wrapped into entity buffer, async command progress tracking.
Diffstat (limited to 'common/entitybuffer.h')
-rw-r--r-- | common/entitybuffer.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/common/entitybuffer.h b/common/entitybuffer.h new file mode 100644 index 0000000..2a7150e --- /dev/null +++ b/common/entitybuffer.h | |||
@@ -0,0 +1,22 @@ | |||
1 | #pragma once | ||
2 | |||
3 | #include <functional> | ||
4 | #include <flatbuffers/flatbuffers.h> | ||
5 | |||
6 | namespace Akonadi2 { | ||
7 | class Entity; | ||
8 | |||
9 | class EntityBuffer { | ||
10 | public: | ||
11 | EntityBuffer(void *dataValue, int size); | ||
12 | const flatbuffers::Vector<uint8_t> *resourceBuffer(); | ||
13 | const flatbuffers::Vector<uint8_t> *metadataBuffer(); | ||
14 | const flatbuffers::Vector<uint8_t> *localBuffer(); | ||
15 | |||
16 | static void extractResourceBuffer(void *dataValue, int dataSize, const std::function<void(const flatbuffers::Vector<uint8_t> *)> &handler); | ||
17 | private: | ||
18 | const Entity *mEntity; | ||
19 | }; | ||
20 | |||
21 | } | ||
22 | |||