summaryrefslogtreecommitdiffstats
path: root/common/resourceaccess.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2015-04-28 10:03:44 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2015-04-28 10:03:44 +0200
commit3c0e79b1e9088e3b55f65fe5cc440ffb08dfde0a (patch)
tree1156ceea4cde136a75109dda337d766e9cebb3a8 /common/resourceaccess.h
parent1e550b518fd49f954b6c422174f4a1a50f5268dc (diff)
downloadsink-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.h3
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
59private Q_SLOTS: 59private 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
68private: 67private:
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();