diff options
Diffstat (limited to 'examples/maildirresource/maildirresource.h')
-rw-r--r-- | examples/maildirresource/maildirresource.h | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/examples/maildirresource/maildirresource.h b/examples/maildirresource/maildirresource.h index 9c205c8..48eac67 100644 --- a/examples/maildirresource/maildirresource.h +++ b/examples/maildirresource/maildirresource.h | |||
@@ -40,41 +40,6 @@ public: | |||
40 | private: | 40 | private: |
41 | KAsync::Job<void> replay(const QByteArray &type, const QByteArray &key, const QByteArray &value) Q_DECL_OVERRIDE; | 41 | KAsync::Job<void> replay(const QByteArray &type, const QByteArray &key, const QByteArray &value) Q_DECL_OVERRIDE; |
42 | 42 | ||
43 | /** | ||
44 | * Records a localId to remoteId mapping | ||
45 | */ | ||
46 | void recordRemoteId(const QByteArray &bufferType, const QByteArray &localId, const QByteArray &remoteId, Akonadi2::Storage::Transaction &transaction); | ||
47 | void removeRemoteId(const QByteArray &bufferType, const QByteArray &localId, const QByteArray &remoteId, Akonadi2::Storage::Transaction &transaction); | ||
48 | |||
49 | /** | ||
50 | * Tries to find a local id for the remote id, and creates a new local id otherwise. | ||
51 | * | ||
52 | * The new local id is recorded in the local to remote id mapping. | ||
53 | */ | ||
54 | QString resolveRemoteId(const QByteArray &type, const QString &remoteId, Akonadi2::Storage::Transaction &transaction); | ||
55 | |||
56 | /** | ||
57 | * Tries to find a remote id for a local id. | ||
58 | * | ||
59 | * This can fail if the entity hasn't been written back to the server yet. | ||
60 | */ | ||
61 | QString resolveLocalId(const QByteArray &bufferType, const QByteArray &localId, Akonadi2::Storage::Transaction &transaction); | ||
62 | |||
63 | /** | ||
64 | * An algorithm to remove entities that are no longer existing. | ||
65 | * | ||
66 | * This algorithm calls @param exists for every entity of type @param type, with its remoteId. For every entity where @param exists returns false, | ||
67 | * an entity delete command is enqueued. | ||
68 | */ | ||
69 | void scanForRemovals(Akonadi2::Storage::Transaction &transaction, Akonadi2::Storage::Transaction &synchronizationTransaction, const QByteArray &bufferType, std::function<bool(const QByteArray &remoteId)> exists); | ||
70 | |||
71 | /** | ||
72 | * An algorithm to create or modify the entity. | ||
73 | * | ||
74 | * Depending on whether the entity is locally available, or has changed. | ||
75 | */ | ||
76 | void createOrModify(Akonadi2::Storage::Transaction &transaction, Akonadi2::Storage::Transaction &synchronizationTransaction, DomainTypeAdaptorFactoryInterface &adaptorFactory, const QByteArray &bufferType, const QByteArray &remoteId, const Akonadi2::ApplicationDomain::ApplicationDomainType &entity); | ||
77 | |||
78 | void synchronizeFolders(Akonadi2::Storage::Transaction &transaction, Akonadi2::Storage::Transaction &synchronizationTransaction); | 43 | void synchronizeFolders(Akonadi2::Storage::Transaction &transaction, Akonadi2::Storage::Transaction &synchronizationTransaction); |
79 | void synchronizeMails(Akonadi2::Storage::Transaction &transaction, Akonadi2::Storage::Transaction &synchronizationTransaction, const QString &folder); | 44 | void synchronizeMails(Akonadi2::Storage::Transaction &transaction, Akonadi2::Storage::Transaction &synchronizationTransaction, const QString &folder); |
80 | QStringList listAvailableFolders(); | 45 | QStringList listAvailableFolders(); |