From d04b873e5341e2e3009f59f71a7210fe1b2b519d Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Fri, 1 May 2015 23:47:56 +0200 Subject: Synchronize API call --- common/clientapi.cpp | 8 ++++++++ common/clientapi.h | 3 +++ 2 files changed, 11 insertions(+) diff --git a/common/clientapi.cpp b/common/clientapi.cpp index 3350927..e4608c8 100644 --- a/common/clientapi.cpp +++ b/common/clientapi.cpp @@ -56,4 +56,12 @@ void Store::shutdown(const QByteArray &identifier) }).exec().waitForFinished(); } +void Store::synchronize(const QByteArray &identifier) +{ + Trace() << "synchronize"; + auto resourceAccess = QSharedPointer::create(identifier); + resourceAccess->open(); + resourceAccess->synchronizeResource(true, false).exec().waitForFinished(); +} + } // namespace Akonadi2 diff --git a/common/clientapi.h b/common/clientapi.h index 56247a7..4650221 100644 --- a/common/clientapi.h +++ b/common/clientapi.h @@ -413,6 +413,9 @@ public: } static void shutdown(const QByteArray &resourceIdentifier); + + //TODO do we really want this command? And if yes, shouldn't it take a query to specify what to sync exactly? + static void synchronize(const QByteArray &resourceIdentifier); }; /** -- cgit v1.2.3