diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2014-12-28 14:44:50 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2014-12-28 14:44:50 +0100 |
commit | 9b2257d680a5e4fa2fda8cf3302f25054a06710e (patch) | |
tree | 9abaf141018eb83d26ce07f5bd0e9436003ce732 /common/resourceaccess.h | |
parent | c83c2ef64b5a1e4b1dc0102df36687caebb96ff0 (diff) | |
download | sink-9b2257d680a5e4fa2fda8cf3302f25054a06710e.tar.gz sink-9b2257d680a5e4fa2fda8cf3302f25054a06710e.zip |
Buffers wrapped into entity buffer, async command progress tracking.
Diffstat (limited to 'common/resourceaccess.h')
-rw-r--r-- | common/resourceaccess.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/common/resourceaccess.h b/common/resourceaccess.h index 7416b25..d79c993 100644 --- a/common/resourceaccess.h +++ b/common/resourceaccess.h | |||
@@ -40,8 +40,9 @@ public: | |||
40 | QString resourceName() const; | 40 | QString resourceName() const; |
41 | bool isReady() const; | 41 | bool isReady() const; |
42 | 42 | ||
43 | void sendCommand(int commandId); | 43 | //TODO use jobs |
44 | void sendCommand(int commandId, flatbuffers::FlatBufferBuilder &fbb); | 44 | void sendCommand(int commandId, const std::function<void()> &callback = std::function<void()>()); |
45 | void sendCommand(int commandId, flatbuffers::FlatBufferBuilder &fbb, const std::function<void()> &callback); | ||
45 | void synchronizeResource(const std::function<void()> &resultHandler); | 46 | void synchronizeResource(const std::function<void()> &resultHandler); |
46 | 47 | ||
47 | public Q_SLOTS: | 48 | public Q_SLOTS: |
@@ -51,6 +52,7 @@ public Q_SLOTS: | |||
51 | Q_SIGNALS: | 52 | Q_SIGNALS: |
52 | void ready(bool isReady); | 53 | void ready(bool isReady); |
53 | void revisionChanged(unsigned long long revision); | 54 | void revisionChanged(unsigned long long revision); |
55 | void commandCompleted(); | ||
54 | 56 | ||
55 | private Q_SLOTS: | 57 | private Q_SLOTS: |
56 | //TODO: move these to the Private class | 58 | //TODO: move these to the Private class |
@@ -59,9 +61,11 @@ private Q_SLOTS: | |||
59 | void connectionError(QLocalSocket::LocalSocketError error); | 61 | void connectionError(QLocalSocket::LocalSocketError error); |
60 | void readResourceMessage(); | 62 | void readResourceMessage(); |
61 | bool processMessageBuffer(); | 63 | bool processMessageBuffer(); |
64 | void callCallbacks(int id); | ||
62 | 65 | ||
63 | private: | 66 | private: |
64 | void log(const QString &message); | 67 | void log(const QString &message); |
68 | void registerCallback(uint messageId, const std::function<void()> &callback); | ||
65 | 69 | ||
66 | class Private; | 70 | class Private; |
67 | Private * const d; | 71 | Private * const d; |