summaryrefslogtreecommitdiffstats
path: root/common/synchronizer.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-05-29 15:19:21 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-05-29 15:19:21 +0200
commitdabd408dcd372f16c7934597db30346869cd8ad8 (patch)
tree0d6513204b7fa6e34cf50733ad0472866ea05e2a /common/synchronizer.h
parentb441386c4e138d19bbd79d578e0a2ff1b3f54a93 (diff)
downloadsink-dabd408dcd372f16c7934597db30346869cd8ad8.tar.gz
sink-dabd408dcd372f16c7934597db30346869cd8ad8.zip
Fixed genericresource so it works with the maildirresourcetest
Diffstat (limited to 'common/synchronizer.h')
-rw-r--r--common/synchronizer.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/common/synchronizer.h b/common/synchronizer.h
index 61bca7d..17e7003 100644
--- a/common/synchronizer.h
+++ b/common/synchronizer.h
@@ -41,6 +41,17 @@ public:
41 void setup(const std::function<void(int commandId, const QByteArray &data)> &enqueueCommandCallback); 41 void setup(const std::function<void(int commandId, const QByteArray &data)> &enqueueCommandCallback);
42 KAsync::Job<void> synchronize(); 42 KAsync::Job<void> synchronize();
43 43
44 //Read only access to main storage
45 EntityStore &store();
46
47 //Read/Write access to sync storage
48 RemoteIdMap &syncStore();
49
50 void commit();
51 void commitSync();
52 Sink::Storage::Transaction &transaction();
53 Sink::Storage::Transaction &syncTransaction();
54
44protected: 55protected:
45 ///Calls the callback to enqueue the command 56 ///Calls the callback to enqueue the command
46 void enqueueCommand(int commandId, const QByteArray &data); 57 void enqueueCommand(int commandId, const QByteArray &data);
@@ -71,12 +82,6 @@ protected:
71 */ 82 */
72 void createOrModify(const QByteArray &bufferType, const QByteArray &remoteId, const Sink::ApplicationDomain::ApplicationDomainType &entity); 83 void createOrModify(const QByteArray &bufferType, const QByteArray &remoteId, const Sink::ApplicationDomain::ApplicationDomainType &entity);
73 84
74 //Read only access to main storage
75 EntityStore &store();
76
77 //Read/Write access to sync storage
78 RemoteIdMap &syncStore();
79
80 virtual KAsync::Job<void> synchronizeWithSource() = 0; 85 virtual KAsync::Job<void> synchronizeWithSource() = 0;
81 86
82private: 87private: