summaryrefslogtreecommitdiffstats
path: root/examples/dummyresource/resourcefactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/dummyresource/resourcefactory.cpp')
-rw-r--r--examples/dummyresource/resourcefactory.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/dummyresource/resourcefactory.cpp b/examples/dummyresource/resourcefactory.cpp
index a984097..c43b5e6 100644
--- a/examples/dummyresource/resourcefactory.cpp
+++ b/examples/dummyresource/resourcefactory.cpp
@@ -134,6 +134,22 @@ void DummyResource::removeFromDisk(const QByteArray &instanceIdentifier)
134 Akonadi2::Storage(Akonadi2::storageLocation(), instanceIdentifier + ".synchronization", Akonadi2::Storage::ReadWrite).removeFromDisk(); 134 Akonadi2::Storage(Akonadi2::storageLocation(), instanceIdentifier + ".synchronization", Akonadi2::Storage::ReadWrite).removeFromDisk();
135} 135}
136 136
137KAsync::Job<void> DummyResource::inspect(int inspectionType, const QByteArray &inspectionId, const QByteArray &domainType, const QByteArray &entityId, const QByteArray &property, const QVariant &expectedValue)
138{
139
140 Trace() << "Inspecting " << inspectionType << domainType << entityId << property << expectedValue;
141 if (property == "testInspection") {
142 if (expectedValue.toBool()) {
143 //Success
144 return KAsync::null<void>();
145 } else {
146 //Failure
147 return KAsync::error<void>(1, "Failed.");
148 }
149 }
150 return KAsync::null<void>();
151}
152
137DummyResourceFactory::DummyResourceFactory(QObject *parent) 153DummyResourceFactory::DummyResourceFactory(QObject *parent)
138 : Akonadi2::ResourceFactory(parent) 154 : Akonadi2::ResourceFactory(parent)
139{ 155{