Changeset View
Changeset View
Standalone View
Standalone View
examples/carddavresource/carddavresource.h
- This file was moved from examples/davresource/davresource.h.
Show All 24 Lines | |||||
25 | #include <KAsync/Async> | 25 | #include <KAsync/Async> | ||
26 | 26 | | |||
27 | #include <flatbuffers/flatbuffers.h> | 27 | #include <flatbuffers/flatbuffers.h> | ||
28 | 28 | | |||
29 | class ContactAdaptorFactory; | 29 | class ContactAdaptorFactory; | ||
30 | class AddressbookAdaptorFactory; | 30 | class AddressbookAdaptorFactory; | ||
31 | 31 | | |||
32 | /** | 32 | /** | ||
33 | * A DAV resource. | 33 | * A CardDAV resource. | ||
34 | * | 34 | * | ||
35 | * Implementation details: | 35 | * Implementation details: | ||
36 | * The remoteid's have the following formats: | 36 | * The remoteid's have the following formats: | ||
37 | * files: full file path | 37 | * files: full file path | ||
38 | * directories: full directory path | 38 | * directories: full directory path | ||
39 | * | 39 | * | ||
40 | * The resource moves all messages from new to cur during sync and thus expectes all messages that are in the store to always reside in cur. | 40 | * The resource moves all messages from new to cur during sync and thus expectes all messages that are in the store to always reside in cur. | ||
41 | * The tmp directory is never directly used | 41 | * The tmp directory is never directly used | ||
42 | */ | 42 | */ | ||
43 | class DavResource : public Sink::GenericResource | 43 | class CardDavResource : public Sink::GenericResource | ||
44 | { | 44 | { | ||
45 | public: | 45 | public: | ||
46 | DavResource(const Sink::ResourceContext &resourceContext); | 46 | CardDavResource(const Sink::ResourceContext &resourceContext); | ||
47 | }; | 47 | }; | ||
48 | 48 | | |||
49 | class DavResourceFactory : public Sink::ResourceFactory | 49 | class CardDavResourceFactory : public Sink::ResourceFactory | ||
50 | { | 50 | { | ||
51 | Q_OBJECT | 51 | Q_OBJECT | ||
52 | Q_PLUGIN_METADATA(IID "sink.dav") | 52 | Q_PLUGIN_METADATA(IID "sink.carddav") | ||
53 | Q_INTERFACES(Sink::ResourceFactory) | 53 | Q_INTERFACES(Sink::ResourceFactory) | ||
54 | 54 | | |||
55 | public: | 55 | public: | ||
56 | DavResourceFactory(QObject *parent = 0); | 56 | CardDavResourceFactory(QObject *parent = 0); | ||
57 | 57 | | |||
58 | Sink::Resource *createResource(const Sink::ResourceContext &context) Q_DECL_OVERRIDE; | 58 | Sink::Resource *createResource(const Sink::ResourceContext &context) Q_DECL_OVERRIDE; | ||
59 | void registerFacades(const QByteArray &resourceName, Sink::FacadeFactory &factory) Q_DECL_OVERRIDE; | 59 | void registerFacades(const QByteArray &resourceName, Sink::FacadeFactory &factory) Q_DECL_OVERRIDE; | ||
60 | void registerAdaptorFactories(const QByteArray &resourceName, Sink::AdaptorFactoryRegistry ®istry) Q_DECL_OVERRIDE; | 60 | void registerAdaptorFactories(const QByteArray &resourceName, Sink::AdaptorFactoryRegistry ®istry) Q_DECL_OVERRIDE; | ||
61 | void removeDataFromDisk(const QByteArray &instanceIdentifier) Q_DECL_OVERRIDE; | 61 | void removeDataFromDisk(const QByteArray &instanceIdentifier) Q_DECL_OVERRIDE; | ||
62 | }; | 62 | }; | ||
63 | 63 | |