diff options
Diffstat (limited to 'common/resourceaccess.h')
-rw-r--r-- | common/resourceaccess.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/common/resourceaccess.h b/common/resourceaccess.h index 69d52b4..5d66246 100644 --- a/common/resourceaccess.h +++ b/common/resourceaccess.h | |||
@@ -29,6 +29,7 @@ | |||
29 | 29 | ||
30 | #include <flatbuffers/flatbuffers.h> | 30 | #include <flatbuffers/flatbuffers.h> |
31 | #include "notification.h" | 31 | #include "notification.h" |
32 | #include "log.h" | ||
32 | 33 | ||
33 | namespace Sink { | 34 | namespace Sink { |
34 | 35 | ||
@@ -72,19 +73,28 @@ public: | |||
72 | return KAsync::null<void>(); | 73 | return KAsync::null<void>(); |
73 | }; | 74 | }; |
74 | 75 | ||
76 | int getResourceStatus() const | ||
77 | { | ||
78 | return mResourceStatus; | ||
79 | } | ||
80 | |||
75 | signals: | 81 | signals: |
76 | void ready(bool isReady); | 82 | void ready(bool isReady); |
77 | void revisionChanged(qint64 revision); | 83 | void revisionChanged(qint64 revision); |
78 | void notification(Notification revision); | 84 | void notification(Notification notification); |
79 | 85 | ||
80 | public slots: | 86 | public slots: |
81 | virtual void open() = 0; | 87 | virtual void open() = 0; |
82 | virtual void close() = 0; | 88 | virtual void close() = 0; |
89 | |||
90 | protected: | ||
91 | int mResourceStatus; | ||
83 | }; | 92 | }; |
84 | 93 | ||
85 | class SINK_EXPORT ResourceAccess : public ResourceAccessInterface | 94 | class SINK_EXPORT ResourceAccess : public ResourceAccessInterface |
86 | { | 95 | { |
87 | Q_OBJECT | 96 | Q_OBJECT |
97 | SINK_DEBUG_AREA("communication") | ||
88 | public: | 98 | public: |
89 | typedef QSharedPointer<ResourceAccess> Ptr; | 99 | typedef QSharedPointer<ResourceAccess> Ptr; |
90 | 100 | ||
@@ -130,6 +140,7 @@ private: | |||
130 | 140 | ||
131 | class Private; | 141 | class Private; |
132 | Private *const d; | 142 | Private *const d; |
143 | // SINK_DEBUG_COMPONENT(d->resourceInstanceIdentifier) | ||
133 | }; | 144 | }; |
134 | 145 | ||
135 | /** | 146 | /** |
@@ -137,8 +148,9 @@ private: | |||
137 | * | 148 | * |
138 | * This avoids constantly recreating connections, and should allow a single process to have one connection per resource. | 149 | * This avoids constantly recreating connections, and should allow a single process to have one connection per resource. |
139 | */ | 150 | */ |
140 | class ResourceAccessFactory | 151 | class SINK_EXPORT ResourceAccessFactory |
141 | { | 152 | { |
153 | SINK_DEBUG_AREA("ResourceAccessFactory") | ||
142 | public: | 154 | public: |
143 | static ResourceAccessFactory &instance(); | 155 | static ResourceAccessFactory &instance(); |
144 | Sink::ResourceAccess::Ptr getAccess(const QByteArray &instanceIdentifier, const QByteArray resourceType); | 156 | Sink::ResourceAccess::Ptr getAccess(const QByteArray &instanceIdentifier, const QByteArray resourceType); |