diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2014-12-21 22:20:31 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2014-12-21 22:20:31 +0100 |
commit | d80ff84c28c0be626c1df4528741cddf5a55f547 (patch) | |
tree | dfa1a3771f52970bfaf7b9e56d8675aeabfc65ef /common/test/clientapitest.cpp | |
parent | d21aa4e35fb96fa3b07888f710cbc3440af8bdd3 (diff) | |
download | sink-d80ff84c28c0be626c1df4528741cddf5a55f547.tar.gz sink-d80ff84c28c0be626c1df4528741cddf5a55f547.zip |
Write-Read loop from clientside.
It's a huge hack but starts to show results.
Most urgently we need:
* reliable command results
* the 3 buffers instead of the 1
* A way to implement storage as preprocessor (or a place to impelement it after the preprocessors).
Diffstat (limited to 'common/test/clientapitest.cpp')
-rw-r--r-- | common/test/clientapitest.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/test/clientapitest.cpp b/common/test/clientapitest.cpp index 2d1c238..dd634f1 100644 --- a/common/test/clientapitest.cpp +++ b/common/test/clientapitest.cpp | |||
@@ -11,12 +11,13 @@ public: | |||
11 | virtual void create(const Akonadi2::Domain::Event &domainObject){}; | 11 | virtual void create(const Akonadi2::Domain::Event &domainObject){}; |
12 | virtual void modify(const Akonadi2::Domain::Event &domainObject){}; | 12 | virtual void modify(const Akonadi2::Domain::Event &domainObject){}; |
13 | virtual void remove(const Akonadi2::Domain::Event &domainObject){}; | 13 | virtual void remove(const Akonadi2::Domain::Event &domainObject){}; |
14 | virtual void load(const Akonadi2::Query &query, const std::function<void(const Akonadi2::Domain::Event::Ptr &)> &resultCallback) | 14 | virtual void load(const Akonadi2::Query &query, const std::function<void(const Akonadi2::Domain::Event::Ptr &)> &resultCallback, const std::function<void()> &completeCallback) |
15 | { | 15 | { |
16 | qDebug() << "load called"; | 16 | qDebug() << "load called"; |
17 | for(const auto &result : results) { | 17 | for(const auto &result : results) { |
18 | resultCallback(result); | 18 | resultCallback(result); |
19 | } | 19 | } |
20 | completeCallback(); | ||
20 | } | 21 | } |
21 | 22 | ||
22 | QList<Akonadi2::Domain::Event::Ptr> results; | 23 | QList<Akonadi2::Domain::Event::Ptr> results; |