diff options
author | Aaron Seigo <aseigo@kde.org> | 2014-11-20 16:28:31 +0100 |
---|---|---|
committer | Aaron Seigo <aseigo@kde.org> | 2014-11-20 16:28:31 +0100 |
commit | ed20c3082d4fd5e90703e4d6c37093dcecb5cfd1 (patch) | |
tree | c4ad96fde99c38ee66c0ba7d0f8231bc5326b3d6 /client/resourceaccess.h | |
download | sink-ed20c3082d4fd5e90703e4d6c37093dcecb5cfd1.tar.gz sink-ed20c3082d4fd5e90703e4d6c37093dcecb5cfd1.zip |
sketch in the client/resource model
Diffstat (limited to 'client/resourceaccess.h')
-rw-r--r-- | client/resourceaccess.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/client/resourceaccess.h b/client/resourceaccess.h new file mode 100644 index 0000000..f4c4ad4 --- /dev/null +++ b/client/resourceaccess.h | |||
@@ -0,0 +1,33 @@ | |||
1 | #pragma once | ||
2 | |||
3 | #include <QLocalSocket> | ||
4 | #include <QObject> | ||
5 | |||
6 | class ResourceAccess : public QObject | ||
7 | { | ||
8 | Q_OBJECT | ||
9 | |||
10 | public: | ||
11 | ResourceAccess(const QString &resourceName, QObject *parent = 0); | ||
12 | ~ResourceAccess(); | ||
13 | |||
14 | QString resourceName() const; | ||
15 | bool isReady() const; | ||
16 | |||
17 | public Q_SLOTS: | ||
18 | void open(); | ||
19 | void close(); | ||
20 | |||
21 | Q_SIGNALS: | ||
22 | void ready(bool isReady); | ||
23 | |||
24 | private Q_SLOTS: | ||
25 | void connected(); | ||
26 | void disconnected(); | ||
27 | void connectionError(QLocalSocket::LocalSocketError error); | ||
28 | |||
29 | private: | ||
30 | QString m_resourceName; | ||
31 | QLocalSocket *m_socket; | ||
32 | bool m_startingProcess; | ||
33 | }; | ||