diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-04-28 10:03:44 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-04-28 10:03:44 +0200 |
commit | 3c0e79b1e9088e3b55f65fe5cc440ffb08dfde0a (patch) | |
tree | 1156ceea4cde136a75109dda337d766e9cebb3a8 /common/resourceaccess.h | |
parent | 1e550b518fd49f954b6c422174f4a1a50f5268dc (diff) | |
download | sink-3c0e79b1e9088e3b55f65fe5cc440ffb08dfde0a.tar.gz sink-3c0e79b1e9088e3b55f65fe5cc440ffb08dfde0a.zip |
ResourceAccess: rewrite connection code using jobs
Another nice showcase implementation how things get easier, testable and
composable using async.
Diffstat (limited to 'common/resourceaccess.h')
-rw-r--r-- | common/resourceaccess.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/common/resourceaccess.h b/common/resourceaccess.h index 4c9d9d2..dc7640d 100644 --- a/common/resourceaccess.h +++ b/common/resourceaccess.h | |||
@@ -58,7 +58,6 @@ Q_SIGNALS: | |||
58 | 58 | ||
59 | private Q_SLOTS: | 59 | private Q_SLOTS: |
60 | //TODO: move these to the Private class | 60 | //TODO: move these to the Private class |
61 | void connected(); | ||
62 | void disconnected(); | 61 | void disconnected(); |
63 | void connectionError(QLocalSocket::LocalSocketError error); | 62 | void connectionError(QLocalSocket::LocalSocketError error); |
64 | void readResourceMessage(); | 63 | void readResourceMessage(); |
@@ -66,9 +65,9 @@ private Q_SLOTS: | |||
66 | void callCallbacks(int id); | 65 | void callCallbacks(int id); |
67 | 66 | ||
68 | private: | 67 | private: |
68 | void connected(); | ||
69 | void log(const QString &message); | 69 | void log(const QString &message); |
70 | void registerCallback(uint messageId, const std::function<void(int error, const QString &)> &callback); | 70 | void registerCallback(uint messageId, const std::function<void(int error, const QString &)> &callback); |
71 | void startResourceAndConnect(); | ||
72 | 71 | ||
73 | void sendCommand(const QSharedPointer<QueuedCommand> &command); | 72 | void sendCommand(const QSharedPointer<QueuedCommand> &command); |
74 | void processCommandQueue(); | 73 | void processCommandQueue(); |