diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-05-25 17:31:17 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-05-25 17:31:17 +0200 |
commit | 8f01eb530262d1442fc4fa0782a41e052412d43b (patch) | |
tree | c322ad9ddb30da51eccf71e774787c05fc3226f6 /common/genericresource.h | |
parent | 7ed3ecd282516296bbc7e4a2a24d1e3266bd8601 (diff) | |
download | sink-8f01eb530262d1442fc4fa0782a41e052412d43b.tar.gz sink-8f01eb530262d1442fc4fa0782a41e052412d43b.zip |
Handle all the remoteId updating and entity reading in the base-class.
Diffstat (limited to 'common/genericresource.h')
-rw-r--r-- | common/genericresource.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/common/genericresource.h b/common/genericresource.h index 9582f06..c551e29 100644 --- a/common/genericresource.h +++ b/common/genericresource.h | |||
@@ -61,8 +61,15 @@ private slots: | |||
61 | 61 | ||
62 | protected: | 62 | protected: |
63 | void enableChangeReplay(bool); | 63 | void enableChangeReplay(bool); |
64 | |||
64 | void addType(const QByteArray &type, DomainTypeAdaptorFactoryInterface::Ptr factory, const QVector<Sink::Preprocessor *> &preprocessors); | 65 | void addType(const QByteArray &type, DomainTypeAdaptorFactoryInterface::Ptr factory, const QVector<Sink::Preprocessor *> &preprocessors); |
66 | |||
67 | ///Base implementation call the replay$Type calls | ||
65 | virtual KAsync::Job<void> replay(Sink::Storage &synchronizationStore, const QByteArray &type, const QByteArray &key, const QByteArray &value); | 68 | virtual KAsync::Job<void> replay(Sink::Storage &synchronizationStore, const QByteArray &type, const QByteArray &key, const QByteArray &value); |
69 | ///Implement to write back changes to the server | ||
70 | virtual KAsync::Job<QByteArray> replay(const Sink::ApplicationDomain::Mail &, Sink::Operation, const QByteArray &oldRemoteId); | ||
71 | virtual KAsync::Job<QByteArray> replay(const Sink::ApplicationDomain::Folder &, Sink::Operation, const QByteArray &oldRemoteId); | ||
72 | |||
66 | void onProcessorError(int errorCode, const QString &errorMessage); | 73 | void onProcessorError(int errorCode, const QString &errorMessage); |
67 | void enqueueCommand(MessageQueue &mq, int commandId, const QByteArray &data); | 74 | void enqueueCommand(MessageQueue &mq, int commandId, const QByteArray &data); |
68 | 75 | ||
@@ -127,5 +134,6 @@ private: | |||
127 | int mError; | 134 | int mError; |
128 | QTimer mCommitQueueTimer; | 135 | QTimer mCommitQueueTimer; |
129 | qint64 mClientLowerBoundRevision; | 136 | qint64 mClientLowerBoundRevision; |
137 | QHash<QByteArray, DomainTypeAdaptorFactoryInterface::Ptr> mAdaptorFactories; | ||
130 | }; | 138 | }; |
131 | } | 139 | } |