diff options
Diffstat (limited to 'examples/imapresource')
-rw-r--r-- | examples/imapresource/imapresource.cpp | 12 | ||||
-rw-r--r-- | examples/imapresource/imapresource.h | 7 |
2 files changed, 8 insertions, 11 deletions
diff --git a/examples/imapresource/imapresource.cpp b/examples/imapresource/imapresource.cpp index 9656a04..421bedf 100644 --- a/examples/imapresource/imapresource.cpp +++ b/examples/imapresource/imapresource.cpp | |||
@@ -683,16 +683,16 @@ Sink::Resource *ImapResourceFactory::createResource(const ResourceContext &conte | |||
683 | return new ImapResource(context); | 683 | return new ImapResource(context); |
684 | } | 684 | } |
685 | 685 | ||
686 | void ImapResourceFactory::registerFacades(Sink::FacadeFactory &factory) | 686 | void ImapResourceFactory::registerFacades(const QByteArray &name, Sink::FacadeFactory &factory) |
687 | { | 687 | { |
688 | factory.registerFacade<Sink::ApplicationDomain::Mail, ImapResourceMailFacade>(PLUGIN_NAME); | 688 | factory.registerFacade<Sink::ApplicationDomain::Mail, ImapResourceMailFacade>(name); |
689 | factory.registerFacade<Sink::ApplicationDomain::Folder, ImapResourceFolderFacade>(PLUGIN_NAME); | 689 | factory.registerFacade<Sink::ApplicationDomain::Folder, ImapResourceFolderFacade>(name); |
690 | } | 690 | } |
691 | 691 | ||
692 | void ImapResourceFactory::registerAdaptorFactories(Sink::AdaptorFactoryRegistry ®istry) | 692 | void ImapResourceFactory::registerAdaptorFactories(const QByteArray &name, Sink::AdaptorFactoryRegistry ®istry) |
693 | { | 693 | { |
694 | registry.registerFactory<Sink::ApplicationDomain::Mail, ImapMailAdaptorFactory>(PLUGIN_NAME); | 694 | registry.registerFactory<Sink::ApplicationDomain::Mail, ImapMailAdaptorFactory>(name); |
695 | registry.registerFactory<Sink::ApplicationDomain::Folder, ImapFolderAdaptorFactory>(PLUGIN_NAME); | 695 | registry.registerFactory<Sink::ApplicationDomain::Folder, ImapFolderAdaptorFactory>(name); |
696 | } | 696 | } |
697 | 697 | ||
698 | void ImapResourceFactory::removeDataFromDisk(const QByteArray &instanceIdentifier) | 698 | void ImapResourceFactory::removeDataFromDisk(const QByteArray &instanceIdentifier) |
diff --git a/examples/imapresource/imapresource.h b/examples/imapresource/imapresource.h index 684a3c9..216c6c5 100644 --- a/examples/imapresource/imapresource.h +++ b/examples/imapresource/imapresource.h | |||
@@ -25,9 +25,6 @@ | |||
25 | 25 | ||
26 | #include <flatbuffers/flatbuffers.h> | 26 | #include <flatbuffers/flatbuffers.h> |
27 | 27 | ||
28 | //TODO: a little ugly to have this in two places, once here and once in Q_PLUGIN_METADATA | ||
29 | #define PLUGIN_NAME "sink.imap" | ||
30 | |||
31 | class ImapMailAdaptorFactory; | 28 | class ImapMailAdaptorFactory; |
32 | class ImapFolderAdaptorFactory; | 29 | class ImapFolderAdaptorFactory; |
33 | 30 | ||
@@ -63,8 +60,8 @@ public: | |||
63 | ImapResourceFactory(QObject *parent = 0); | 60 | ImapResourceFactory(QObject *parent = 0); |
64 | 61 | ||
65 | Sink::Resource *createResource(const Sink::ResourceContext &resourceContext) Q_DECL_OVERRIDE; | 62 | Sink::Resource *createResource(const Sink::ResourceContext &resourceContext) Q_DECL_OVERRIDE; |
66 | void registerFacades(Sink::FacadeFactory &factory) Q_DECL_OVERRIDE; | 63 | void registerFacades(const QByteArray &name, Sink::FacadeFactory &factory) Q_DECL_OVERRIDE; |
67 | void registerAdaptorFactories(Sink::AdaptorFactoryRegistry ®istry) Q_DECL_OVERRIDE; | 64 | void registerAdaptorFactories(const QByteArray &name, Sink::AdaptorFactoryRegistry ®istry) Q_DECL_OVERRIDE; |
68 | void removeDataFromDisk(const QByteArray &instanceIdentifier) Q_DECL_OVERRIDE; | 65 | void removeDataFromDisk(const QByteArray &instanceIdentifier) Q_DECL_OVERRIDE; |
69 | }; | 66 | }; |
70 | 67 | ||