summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/clientapi.cpp8
-rw-r--r--common/clientapi.h3
2 files changed, 11 insertions, 0 deletions
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)
56 }).exec().waitForFinished(); 56 }).exec().waitForFinished();
57} 57}
58 58
59void Store::synchronize(const QByteArray &identifier)
60{
61 Trace() << "synchronize";
62 auto resourceAccess = QSharedPointer<Akonadi2::ResourceAccess>::create(identifier);
63 resourceAccess->open();
64 resourceAccess->synchronizeResource(true, false).exec().waitForFinished();
65}
66
59} // namespace Akonadi2 67} // 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:
413 } 413 }
414 414
415 static void shutdown(const QByteArray &resourceIdentifier); 415 static void shutdown(const QByteArray &resourceIdentifier);
416
417 //TODO do we really want this command? And if yes, shouldn't it take a query to specify what to sync exactly?
418 static void synchronize(const QByteArray &resourceIdentifier);
416}; 419};
417 420
418/** 421/**