diff options
Diffstat (limited to 'examples/dummyresource/resourcefacade.cpp')
-rw-r--r-- | examples/dummyresource/resourcefacade.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/dummyresource/resourcefacade.cpp b/examples/dummyresource/resourcefacade.cpp index 870bea2..af293d4 100644 --- a/examples/dummyresource/resourcefacade.cpp +++ b/examples/dummyresource/resourcefacade.cpp | |||
@@ -40,38 +40,38 @@ QSharedPointer<QSettings> DummyResourceConfigFacade::getSettings() | |||
40 | return QSharedPointer<QSettings>::create(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/akonadi2/" + "org.kde." + instanceIdentifier + "/settings.ini", QSettings::IniFormat); | 40 | return QSharedPointer<QSettings>::create(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/akonadi2/" + "org.kde." + instanceIdentifier + "/settings.ini", QSettings::IniFormat); |
41 | } | 41 | } |
42 | 42 | ||
43 | Async::Job<void> DummyResourceConfigFacade::create(const Akonadi2::ApplicationDomain::AkonadiResource &domainObject) | 43 | KAsync::Job<void> DummyResourceConfigFacade::create(const Akonadi2::ApplicationDomain::AkonadiResource &domainObject) |
44 | { | 44 | { |
45 | //TODO create resource instance | 45 | //TODO create resource instance |
46 | //This can be generalized in a base implementation | 46 | //This can be generalized in a base implementation |
47 | return Async::null<void>(); | 47 | return KAsync::null<void>(); |
48 | } | 48 | } |
49 | 49 | ||
50 | Async::Job<void> DummyResourceConfigFacade::modify(const Akonadi2::ApplicationDomain::AkonadiResource &domainObject) | 50 | KAsync::Job<void> DummyResourceConfigFacade::modify(const Akonadi2::ApplicationDomain::AkonadiResource &domainObject) |
51 | { | 51 | { |
52 | //modify configuration | 52 | //modify configuration |
53 | //This part is likely resource specific, but could be partially generalized | 53 | //This part is likely resource specific, but could be partially generalized |
54 | return Async::start<void>([domainObject, this]() { | 54 | return KAsync::start<void>([domainObject, this]() { |
55 | auto settings = getSettings(); | 55 | auto settings = getSettings(); |
56 | //TODO Write properties to file | 56 | //TODO Write properties to file |
57 | }); | 57 | }); |
58 | } | 58 | } |
59 | 59 | ||
60 | Async::Job<void> DummyResourceConfigFacade::remove(const Akonadi2::ApplicationDomain::AkonadiResource &domainObject) | 60 | KAsync::Job<void> DummyResourceConfigFacade::remove(const Akonadi2::ApplicationDomain::AkonadiResource &domainObject) |
61 | { | 61 | { |
62 | //TODO remove resource instance | 62 | //TODO remove resource instance |
63 | //This can be generalized in a base implementation | 63 | //This can be generalized in a base implementation |
64 | return Async::null<void>(); | 64 | return KAsync::null<void>(); |
65 | } | 65 | } |
66 | 66 | ||
67 | Async::Job<void> DummyResourceConfigFacade::load(const Akonadi2::Query &query, const QSharedPointer<async::ResultProvider<typename Akonadi2::ApplicationDomain::AkonadiResource::Ptr> > &resultProvider) | 67 | KAsync::Job<void> DummyResourceConfigFacade::load(const Akonadi2::Query &query, const QSharedPointer<async::ResultProvider<typename Akonadi2::ApplicationDomain::AkonadiResource::Ptr> > &resultProvider) |
68 | { | 68 | { |
69 | //Read configuration and list all available instances. | 69 | //Read configuration and list all available instances. |
70 | //This includes runtime information about runing instances etc. | 70 | //This includes runtime information about runing instances etc. |
71 | //Part of this is generic, and part is accessing the resource specific configuration. | 71 | //Part of this is generic, and part is accessing the resource specific configuration. |
72 | //FIXME this currently does not support live queries (because we're not inheriting from GenericFacade) | 72 | //FIXME this currently does not support live queries (because we're not inheriting from GenericFacade) |
73 | //FIXME only read what was requested in the query? | 73 | //FIXME only read what was requested in the query? |
74 | return Async::start<void>([resultProvider, this]() { | 74 | return KAsync::start<void>([resultProvider, this]() { |
75 | auto settings = getSettings(); | 75 | auto settings = getSettings(); |
76 | auto memoryAdaptor = QSharedPointer<Akonadi2::ApplicationDomain::MemoryBufferAdaptor>::create(); | 76 | auto memoryAdaptor = QSharedPointer<Akonadi2::ApplicationDomain::MemoryBufferAdaptor>::create(); |
77 | //TODO copy settings to adaptor | 77 | //TODO copy settings to adaptor |