summaryrefslogtreecommitdiffstats
path: root/common/inspection.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/inspection.h')
-rw-r--r--common/inspection.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/common/inspection.h b/common/inspection.h
index 7abcd1c..e0321bf 100644
--- a/common/inspection.h
+++ b/common/inspection.h
@@ -35,6 +35,7 @@ struct Inspection
35 inspection.entityIdentifier = entity.identifier(); 35 inspection.entityIdentifier = entity.identifier();
36 inspection.property = property; 36 inspection.property = property;
37 inspection.expectedValue = expectedValue; 37 inspection.expectedValue = expectedValue;
38 inspection.type = PropertyInspectionType;
38 return inspection; 39 return inspection;
39 } 40 }
40 41
@@ -44,18 +45,30 @@ struct Inspection
44 inspection.resourceIdentifier = entity.resourceInstanceIdentifier(); 45 inspection.resourceIdentifier = entity.resourceInstanceIdentifier();
45 inspection.entityIdentifier = entity.identifier(); 46 inspection.entityIdentifier = entity.identifier();
46 inspection.expectedValue = exists; 47 inspection.expectedValue = exists;
48 inspection.type = ExistenceInspectionType;
49 return inspection;
50 }
51
52 static Inspection CacheIntegrityInspection(const Sink::ApplicationDomain::Entity &entity)
53 {
54 Inspection inspection;
55 inspection.resourceIdentifier = entity.resourceInstanceIdentifier();
56 inspection.entityIdentifier = entity.identifier();
57 inspection.type = CacheIntegrityInspectionType;
47 return inspection; 58 return inspection;
48 } 59 }
49 60
50 enum Type 61 enum Type
51 { 62 {
52 PropertyInspectionType, 63 PropertyInspectionType,
53 ExistenceInspectionType 64 ExistenceInspectionType,
65 CacheIntegrityInspectionType
54 }; 66 };
55 QByteArray resourceIdentifier; 67 QByteArray resourceIdentifier;
56 QByteArray entityIdentifier; 68 QByteArray entityIdentifier;
57 QByteArray property; 69 QByteArray property;
58 QVariant expectedValue; 70 QVariant expectedValue;
71 int type;
59}; 72};
60} 73}
61} 74}