diff options
Diffstat (limited to 'common/synchronizer.h')
-rw-r--r-- | common/synchronizer.h | 17 |
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 | |||
44 | protected: | 55 | protected: |
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 | ||
82 | private: | 87 | private: |