diff options
Diffstat (limited to 'examples/mailtransportresource/mailtransportresource.h')
-rw-r--r-- | examples/mailtransportresource/mailtransportresource.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/examples/mailtransportresource/mailtransportresource.h b/examples/mailtransportresource/mailtransportresource.h index 2ccca0a..6622ea6 100644 --- a/examples/mailtransportresource/mailtransportresource.h +++ b/examples/mailtransportresource/mailtransportresource.h | |||
@@ -20,10 +20,29 @@ | |||
20 | #pragma once | 20 | #pragma once |
21 | 21 | ||
22 | #include "common/resource.h" | 22 | #include "common/resource.h" |
23 | #include "common/genericresource.h" | ||
23 | 24 | ||
24 | //TODO: a little ugly to have this in two places, once here and once in Q_PLUGIN_METADATA | 25 | //TODO: a little ugly to have this in two places, once here and once in Q_PLUGIN_METADATA |
25 | #define PLUGIN_NAME "org.kde.mailtransport" | 26 | #define PLUGIN_NAME "org.kde.mailtransport" |
26 | 27 | ||
28 | class MailtransportResource : public Sink::GenericResource | ||
29 | { | ||
30 | public: | ||
31 | MailtransportResource(const QByteArray &instanceIdentifier, const QSharedPointer<Sink::Pipeline> &pipeline = QSharedPointer<Sink::Pipeline>()); | ||
32 | KAsync::Job<void> inspect(int inspectionType, const QByteArray &inspectionId, const QByteArray &domainType, const QByteArray &entityId, const QByteArray &property, const QVariant &expectedValue) Q_DECL_OVERRIDE; | ||
33 | static void removeFromDisk(const QByteArray &instanceIdentifier); | ||
34 | |||
35 | struct Settings { | ||
36 | QString server; | ||
37 | QString username; | ||
38 | QString cacert; | ||
39 | QString password; | ||
40 | bool testMode; | ||
41 | }; | ||
42 | private: | ||
43 | Settings mSettings; | ||
44 | }; | ||
45 | |||
27 | class MailtransportResourceFactory : public Sink::ResourceFactory | 46 | class MailtransportResourceFactory : public Sink::ResourceFactory |
28 | { | 47 | { |
29 | Q_OBJECT | 48 | Q_OBJECT |
@@ -35,5 +54,6 @@ public: | |||
35 | 54 | ||
36 | Sink::Resource *createResource(const QByteArray &instanceIdentifier) Q_DECL_OVERRIDE; | 55 | Sink::Resource *createResource(const QByteArray &instanceIdentifier) Q_DECL_OVERRIDE; |
37 | void registerFacades(Sink::FacadeFactory &factory) Q_DECL_OVERRIDE; | 56 | void registerFacades(Sink::FacadeFactory &factory) Q_DECL_OVERRIDE; |
57 | void registerAdaptorFactories(Sink::AdaptorFactoryRegistry ®istry) Q_DECL_OVERRIDE; | ||
38 | }; | 58 | }; |
39 | 59 | ||