diff options
Diffstat (limited to 'common/clientapi.cpp')
-rw-r--r-- | common/clientapi.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/common/clientapi.cpp b/common/clientapi.cpp index 2a4b603..260b6b8 100644 --- a/common/clientapi.cpp +++ b/common/clientapi.cpp | |||
@@ -1,5 +1,7 @@ | |||
1 | 1 | ||
2 | #include "clientapi.h" | 2 | #include "clientapi.h" |
3 | #include "resourceaccess.h" | ||
4 | #include "commands.h" | ||
3 | 5 | ||
4 | namespace async | 6 | namespace async |
5 | { | 7 | { |
@@ -35,4 +37,14 @@ QString getTypeName<Todo>() | |||
35 | 37 | ||
36 | } // namespace Domain | 38 | } // namespace Domain |
37 | 39 | ||
40 | void Store::shutdown(const QString &identifier) | ||
41 | { | ||
42 | Akonadi2::ResourceAccess resourceAccess(identifier); | ||
43 | resourceAccess.open(); | ||
44 | resourceAccess.sendCommand(Akonadi2::Commands::ShutdownCommand).then<void>([](Async::Future<void> &f){ | ||
45 | //TODO wait for disconnect | ||
46 | f.setFinished(); | ||
47 | }).exec().waitForFinished(); | ||
48 | } | ||
49 | |||
38 | } // namespace Akonadi2 | 50 | } // namespace Akonadi2 |