diff options
Diffstat (limited to 'common/clientapi.h')
-rw-r--r-- | common/clientapi.h | 25 |
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 | ||
114 | namespace 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 | ||