diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-10-04 17:12:02 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-10-04 17:12:02 +0200 |
commit | 3ae3ef9676bd7fdcb45064f9a1b397c90478b4b7 (patch) | |
tree | 5ac341b501dae0a5e7d5addb8114535de53979cf /common/domain | |
parent | 7757d32b5a820623c469b7851354374427142598 (diff) | |
download | sink-3ae3ef9676bd7fdcb45064f9a1b397c90478b4b7.tar.gz sink-3ae3ef9676bd7fdcb45064f9a1b397c90478b4b7.zip |
Resource subqueries
Diffstat (limited to 'common/domain')
-rw-r--r-- | common/domain/applicationdomaintype.h | 75 |
1 files changed, 38 insertions, 37 deletions
diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h index 2c8b2ee..1c8b45a 100644 --- a/common/domain/applicationdomaintype.h +++ b/common/domain/applicationdomaintype.h | |||
@@ -201,10 +201,48 @@ inline QDebug operator<< (QDebug d, const ApplicationDomainType &type) | |||
201 | return d; | 201 | return d; |
202 | } | 202 | } |
203 | 203 | ||
204 | struct SINK_EXPORT SinkAccount : public ApplicationDomainType { | ||
205 | typedef QSharedPointer<SinkAccount> Ptr; | ||
206 | explicit SinkAccount(const QByteArray &resourceInstanceIdentifier, const QByteArray &identifier, qint64 revision, const QSharedPointer<BufferAdaptor> &adaptor); | ||
207 | explicit SinkAccount(const QByteArray &identifier); | ||
208 | SinkAccount(); | ||
209 | virtual ~SinkAccount(); | ||
210 | |||
211 | SINK_PROPERTY(QString, Name, name); | ||
212 | SINK_PROPERTY(QString, Icon, icon); | ||
213 | SINK_PROPERTY(QString, AccountType, type); | ||
214 | SINK_STATUS_PROPERTY(int, Status, status); | ||
215 | SINK_STATUS_PROPERTY(ApplicationDomain::Error, Error, error); | ||
216 | SINK_STATUS_PROPERTY(ApplicationDomain::Progress, Progress, progress); | ||
217 | }; | ||
218 | |||
219 | |||
220 | /** | ||
221 | * Represents an sink resource. | ||
222 | * | ||
223 | * This type is used for configuration of resources, | ||
224 | * and for creating and removing resource instances. | ||
225 | */ | ||
226 | struct SINK_EXPORT SinkResource : public ApplicationDomainType { | ||
227 | typedef QSharedPointer<SinkResource> Ptr; | ||
228 | explicit SinkResource(const QByteArray &resourceInstanceIdentifier, const QByteArray &identifier, qint64 revision, const QSharedPointer<BufferAdaptor> &adaptor); | ||
229 | explicit SinkResource(const QByteArray &identifier); | ||
230 | SinkResource(); | ||
231 | virtual ~SinkResource(); | ||
232 | |||
233 | SINK_REFERENCE_PROPERTY(SinkAccount, Account, account); | ||
234 | SINK_PROPERTY(QByteArray, ResourceType, type); | ||
235 | SINK_PROPERTY(QByteArrayList, Capabilities, capabilities); | ||
236 | SINK_STATUS_PROPERTY(int, Status, status); | ||
237 | SINK_STATUS_PROPERTY(ApplicationDomain::Error, Error, error); | ||
238 | SINK_STATUS_PROPERTY(ApplicationDomain::Progress, Progress, progress); | ||
239 | }; | ||
240 | |||
204 | struct SINK_EXPORT Entity : public ApplicationDomainType { | 241 | struct SINK_EXPORT Entity : public ApplicationDomainType { |
205 | typedef QSharedPointer<Entity> Ptr; | 242 | typedef QSharedPointer<Entity> Ptr; |
206 | using ApplicationDomainType::ApplicationDomainType; | 243 | using ApplicationDomainType::ApplicationDomainType; |
207 | virtual ~Entity(); | 244 | virtual ~Entity(); |
245 | SINK_REFERENCE_PROPERTY(SinkResource, Resource, resource); | ||
208 | }; | 246 | }; |
209 | 247 | ||
210 | struct SINK_EXPORT Event : public Entity { | 248 | struct SINK_EXPORT Event : public Entity { |
@@ -266,43 +304,6 @@ enum SINK_EXPORT Status { | |||
266 | ErrorStatus | 304 | ErrorStatus |
267 | }; | 305 | }; |
268 | 306 | ||
269 | struct SINK_EXPORT SinkAccount : public ApplicationDomainType { | ||
270 | typedef QSharedPointer<SinkAccount> Ptr; | ||
271 | explicit SinkAccount(const QByteArray &resourceInstanceIdentifier, const QByteArray &identifier, qint64 revision, const QSharedPointer<BufferAdaptor> &adaptor); | ||
272 | explicit SinkAccount(const QByteArray &identifier); | ||
273 | SinkAccount(); | ||
274 | virtual ~SinkAccount(); | ||
275 | |||
276 | SINK_PROPERTY(QString, Name, name); | ||
277 | SINK_PROPERTY(QString, Icon, icon); | ||
278 | SINK_PROPERTY(QString, AccountType, type); | ||
279 | SINK_STATUS_PROPERTY(int, Status, status); | ||
280 | SINK_STATUS_PROPERTY(ApplicationDomain::Error, Error, error); | ||
281 | SINK_STATUS_PROPERTY(ApplicationDomain::Progress, Progress, progress); | ||
282 | }; | ||
283 | |||
284 | |||
285 | /** | ||
286 | * Represents an sink resource. | ||
287 | * | ||
288 | * This type is used for configuration of resources, | ||
289 | * and for creating and removing resource instances. | ||
290 | */ | ||
291 | struct SINK_EXPORT SinkResource : public ApplicationDomainType { | ||
292 | typedef QSharedPointer<SinkResource> Ptr; | ||
293 | explicit SinkResource(const QByteArray &resourceInstanceIdentifier, const QByteArray &identifier, qint64 revision, const QSharedPointer<BufferAdaptor> &adaptor); | ||
294 | explicit SinkResource(const QByteArray &identifier); | ||
295 | SinkResource(); | ||
296 | virtual ~SinkResource(); | ||
297 | |||
298 | SINK_REFERENCE_PROPERTY(SinkAccount, Account, account); | ||
299 | SINK_PROPERTY(QByteArray, ResourceType, type); | ||
300 | SINK_PROPERTY(QByteArrayList, Capabilities, capabilities); | ||
301 | SINK_STATUS_PROPERTY(int, Status, status); | ||
302 | SINK_STATUS_PROPERTY(ApplicationDomain::Error, Error, error); | ||
303 | SINK_STATUS_PROPERTY(ApplicationDomain::Progress, Progress, progress); | ||
304 | }; | ||
305 | |||
306 | struct SINK_EXPORT Identity : public ApplicationDomainType { | 307 | struct SINK_EXPORT Identity : public ApplicationDomainType { |
307 | typedef QSharedPointer<Identity> Ptr; | 308 | typedef QSharedPointer<Identity> Ptr; |
308 | explicit Identity(const QByteArray &resourceInstanceIdentifier, const QByteArray &identifier, qint64 revision, const QSharedPointer<BufferAdaptor> &adaptor); | 309 | explicit Identity(const QByteArray &resourceInstanceIdentifier, const QByteArray &identifier, qint64 revision, const QSharedPointer<BufferAdaptor> &adaptor); |