summaryrefslogtreecommitdiffstats
path: root/common/genericresource.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-05-25 17:31:17 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-05-25 17:31:17 +0200
commit8f01eb530262d1442fc4fa0782a41e052412d43b (patch)
treec322ad9ddb30da51eccf71e774787c05fc3226f6 /common/genericresource.h
parent7ed3ecd282516296bbc7e4a2a24d1e3266bd8601 (diff)
downloadsink-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.h8
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
62protected: 62protected:
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}