diff options
author | Aaron Seigo <aseigo@kde.org> | 2014-12-16 12:13:06 +0100 |
---|---|---|
committer | Aaron Seigo <aseigo@kde.org> | 2014-12-16 12:13:06 +0100 |
commit | abdbd0e8d9a761b7906da2999d4fd58f2771c202 (patch) | |
tree | 135855e4a3d853573da93b2a43e2b730ab6b9f6a /common/resourceaccess.h | |
parent | e2ba730949837633490cefbb55165c81f2ffeb96 (diff) | |
download | sink-abdbd0e8d9a761b7906da2999d4fd58f2771c202.tar.gz sink-abdbd0e8d9a761b7906da2999d4fd58f2771c202.zip |
use a dptr, API for sending commands, queue commands until connected
Diffstat (limited to 'common/resourceaccess.h')
-rw-r--r-- | common/resourceaccess.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/common/resourceaccess.h b/common/resourceaccess.h index f381af1..3a35af6 100644 --- a/common/resourceaccess.h +++ b/common/resourceaccess.h | |||
@@ -40,6 +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); | ||
44 | void sendCommand(int commandId, flatbuffers::FlatBufferBuilder &fbb); | ||
45 | |||
43 | public Q_SLOTS: | 46 | public Q_SLOTS: |
44 | void open(); | 47 | void open(); |
45 | void close(); | 48 | void close(); |
@@ -49,6 +52,7 @@ Q_SIGNALS: | |||
49 | void revisionChanged(unsigned long long revision); | 52 | void revisionChanged(unsigned long long revision); |
50 | 53 | ||
51 | private Q_SLOTS: | 54 | private Q_SLOTS: |
55 | //TODO: move these to the Private class | ||
52 | void connected(); | 56 | void connected(); |
53 | void disconnected(); | 57 | void disconnected(); |
54 | void connectionError(QLocalSocket::LocalSocketError error); | 58 | void connectionError(QLocalSocket::LocalSocketError error); |
@@ -57,12 +61,9 @@ private Q_SLOTS: | |||
57 | 61 | ||
58 | private: | 62 | private: |
59 | void log(const QString &message); | 63 | void log(const QString &message); |
60 | QString m_resourceName; | 64 | |
61 | QLocalSocket *m_socket; | 65 | class Private; |
62 | QTimer *m_tryOpenTimer; | 66 | Private * const d; |
63 | bool m_startingProcess; | ||
64 | QByteArray m_partialMessageBuffer; | ||
65 | flatbuffers::FlatBufferBuilder m_fbb; | ||
66 | }; | 67 | }; |
67 | 68 | ||
68 | } | 69 | } |