From abc90b737074d93f73490a77e1eb1e1666dac375 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 6 Jul 2016 09:58:34 +0200 Subject: Test the resource status --- examples/dummyresource/resourcefactory.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'examples/dummyresource/resourcefactory.cpp') diff --git a/examples/dummyresource/resourcefactory.cpp b/examples/dummyresource/resourcefactory.cpp index 2bd52cc..21a76ad 100644 --- a/examples/dummyresource/resourcefactory.cpp +++ b/examples/dummyresource/resourcefactory.cpp @@ -23,6 +23,7 @@ #include "entitybuffer.h" #include "pipeline.h" #include "dummycalendar_generated.h" +#include "notification_generated.h" #include "mail_generated.h" #include "createentity_generated.h" #include "domainadaptor.h" @@ -144,6 +145,18 @@ DummyResource::~DummyResource() } +KAsync::Job DummyResource::synchronizeWithSource() +{ + Trace() << "Synchronize with source and sending a notification about it"; + Sink::Notification n; + n.id = "connected"; + n.type = Sink::Notification::Status; + n.message = "We're connected"; + n.code = Sink::ApplicationDomain::ConnectedStatus; + emit notify(n); + return GenericResource::synchronizeWithSource(); +} + KAsync::Job DummyResource::inspect(int inspectionType, const QByteArray &inspectionId, const QByteArray &domainType, const QByteArray &entityId, const QByteArray &property, const QVariant &expectedValue) { -- cgit v1.2.3