diff options
Diffstat (limited to 'common/synchronizer.h')
-rw-r--r-- | common/synchronizer.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/common/synchronizer.h b/common/synchronizer.h index a0a432c..be90293 100644 --- a/common/synchronizer.h +++ b/common/synchronizer.h | |||
@@ -57,6 +57,7 @@ public: | |||
57 | Sink::Storage::DataStore::Transaction &syncTransaction(); | 57 | Sink::Storage::DataStore::Transaction &syncTransaction(); |
58 | 58 | ||
59 | bool allChangesReplayed() Q_DECL_OVERRIDE; | 59 | bool allChangesReplayed() Q_DECL_OVERRIDE; |
60 | void flushComplete(const QByteArray &flushId); | ||
60 | 61 | ||
61 | signals: | 62 | signals: |
62 | void notify(Notification); | 63 | void notify(Notification); |
@@ -123,9 +124,15 @@ protected: | |||
123 | Flush | 124 | Flush |
124 | }; | 125 | }; |
125 | 126 | ||
126 | SyncRequest(const Sink::QueryBase &q, const QByteArray &requestId_ = QByteArray()) | 127 | enum RequestOptions { |
128 | NoOptions, | ||
129 | RequestFlush | ||
130 | }; | ||
131 | |||
132 | SyncRequest(const Sink::QueryBase &q, const QByteArray &requestId_ = QByteArray(), RequestOptions o = NoOptions) | ||
127 | : requestId(requestId_), | 133 | : requestId(requestId_), |
128 | requestType(Synchronization), | 134 | requestType(Synchronization), |
135 | options(o), | ||
129 | query(q) | 136 | query(q) |
130 | { | 137 | { |
131 | } | 138 | } |
@@ -145,6 +152,7 @@ protected: | |||
145 | int flushType = 0; | 152 | int flushType = 0; |
146 | QByteArray requestId; | 153 | QByteArray requestId; |
147 | RequestType requestType; | 154 | RequestType requestType; |
155 | RequestOptions options = NoOptions; | ||
148 | Sink::QueryBase query; | 156 | Sink::QueryBase query; |
149 | }; | 157 | }; |
150 | 158 | ||
@@ -181,6 +189,7 @@ private: | |||
181 | QList<SyncRequest> mSyncRequestQueue; | 189 | QList<SyncRequest> mSyncRequestQueue; |
182 | MessageQueue *mMessageQueue; | 190 | MessageQueue *mMessageQueue; |
183 | bool mSyncInProgress; | 191 | bool mSyncInProgress; |
192 | QMultiHash<QByteArray, SyncRequest> mPendingSyncRequests; | ||
184 | }; | 193 | }; |
185 | 194 | ||
186 | } | 195 | } |