diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-08-12 00:35:49 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-08-12 00:35:49 +0200 |
commit | a8825608e1969acf4622fec3f6b6c284f1c66ea4 (patch) | |
tree | b9f30d0228cedb6f1aa359c5237d399ec2b1e52e /common/resourceaccess.h | |
parent | ffef7c0341ea42aba550fc6db432da3a334fd7f1 (diff) | |
download | sink-a8825608e1969acf4622fec3f6b6c284f1c66ea4.tar.gz sink-a8825608e1969acf4622fec3f6b6c284f1c66ea4.zip |
Moved sendCommand implementations to ResourceAccess
So we have commands in one place, and not in a header file.
Diffstat (limited to 'common/resourceaccess.h')
-rw-r--r-- | common/resourceaccess.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common/resourceaccess.h b/common/resourceaccess.h index 55379f3..e6b9d91 100644 --- a/common/resourceaccess.h +++ b/common/resourceaccess.h | |||
@@ -43,6 +43,10 @@ public: | |||
43 | virtual KAsync::Job<void> sendCommand(int commandId, flatbuffers::FlatBufferBuilder &fbb) = 0; | 43 | virtual KAsync::Job<void> sendCommand(int commandId, flatbuffers::FlatBufferBuilder &fbb) = 0; |
44 | virtual KAsync::Job<void> synchronizeResource(bool remoteSync, bool localSync) = 0; | 44 | virtual KAsync::Job<void> synchronizeResource(bool remoteSync, bool localSync) = 0; |
45 | 45 | ||
46 | virtual KAsync::Job<void> sendCreateCommand(const QByteArray &resourceBufferType, const QByteArray &buffer) { return KAsync::null<void>(); }; | ||
47 | virtual KAsync::Job<void> sendModifyCommand(const QByteArray &uid, qint64 revision, const QByteArray &resourceBufferType, const QByteArrayList &deletedProperties, const QByteArray &buffer) { return KAsync::null<void>(); }; | ||
48 | virtual KAsync::Job<void> sendDeleteCommand(const QByteArray &uid, qint64 revision, const QByteArray &resourceBufferType) { return KAsync::null<void>(); }; | ||
49 | |||
46 | Q_SIGNALS: | 50 | Q_SIGNALS: |
47 | void ready(bool isReady); | 51 | void ready(bool isReady); |
48 | void revisionChanged(unsigned long long revision); | 52 | void revisionChanged(unsigned long long revision); |
@@ -65,6 +69,9 @@ public: | |||
65 | KAsync::Job<void> sendCommand(int commandId) Q_DECL_OVERRIDE; | 69 | KAsync::Job<void> sendCommand(int commandId) Q_DECL_OVERRIDE; |
66 | KAsync::Job<void> sendCommand(int commandId, flatbuffers::FlatBufferBuilder &fbb) Q_DECL_OVERRIDE; | 70 | KAsync::Job<void> sendCommand(int commandId, flatbuffers::FlatBufferBuilder &fbb) Q_DECL_OVERRIDE; |
67 | KAsync::Job<void> synchronizeResource(bool remoteSync, bool localSync) Q_DECL_OVERRIDE; | 71 | KAsync::Job<void> synchronizeResource(bool remoteSync, bool localSync) Q_DECL_OVERRIDE; |
72 | KAsync::Job<void> sendCreateCommand(const QByteArray &resourceBufferType, const QByteArray &buffer); | ||
73 | KAsync::Job<void> sendModifyCommand(const QByteArray &uid, qint64 revision, const QByteArray &resourceBufferType, const QByteArrayList &deletedProperties, const QByteArray &buffer); | ||
74 | KAsync::Job<void> sendDeleteCommand(const QByteArray &uid, qint64 revision, const QByteArray &resourceBufferType); | ||
68 | /** | 75 | /** |
69 | * Tries to connect to server, and returns a connected socket on success. | 76 | * Tries to connect to server, and returns a connected socket on success. |
70 | */ | 77 | */ |