summaryrefslogtreecommitdiffstats
path: root/common/clientapi.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-01-18 15:17:30 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-01-18 15:17:30 +0100
commitd8cd2d6585507a4e40881092a633ec1a80b14dd9 (patch)
treee710026c9191fe42643f7996a55b460e3ff39622 /common/clientapi.h
parent0d55900241772fa5cc5028934358cbcb28702c46 (diff)
downloadsink-d8cd2d6585507a4e40881092a633ec1a80b14dd9.tar.gz
sink-d8cd2d6585507a4e40881092a633ec1a80b14dd9.zip
Draft of inspection API
Diffstat (limited to 'common/clientapi.h')
-rw-r--r--common/clientapi.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/common/clientapi.h b/common/clientapi.h
index eff8e8d..d496715 100644
--- a/common/clientapi.h
+++ b/common/clientapi.h
@@ -111,6 +111,31 @@ public:
111 static KAsync::Job<QList<typename DomainType::Ptr> > fetch(const Akonadi2::Query &query, int minimumAmount = 0); 111 static KAsync::Job<QList<typename DomainType::Ptr> > fetch(const Akonadi2::Query &query, int minimumAmount = 0);
112}; 112};
113 113
114namespace Resources {
115 struct Inspection {
116 static Inspection PropertyInspection(const Akonadi2::ApplicationDomain::Entity &entity, const QByteArray &property, const QVariant &expectedValue)
117 {
118 Inspection inspection;
119 inspection.resourceIdentifier = entity.resourceInstanceIdentifier();
120 inspection.entityIdentifier = entity.identifier();
121 inspection.property = property;
122 inspection.expectedValue = expectedValue;
123 return inspection;
124 }
125
126 enum Type {
127 PropertyInspectionType
128 };
129
130 QByteArray resourceIdentifier;
131 QByteArray entityIdentifier;
132 QByteArray property;
133 QVariant expectedValue;
134 };
135 template <class DomainType>
136 KAsync::Job<void> inspect(const Inspection &inspectionCommand);
137}
138
114 139
115} 140}
116 141