summaryrefslogtreecommitdiffstats
path: root/examples/webdavcommon/webdav.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/webdavcommon/webdav.h')
-rw-r--r--examples/webdavcommon/webdav.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/examples/webdavcommon/webdav.h b/examples/webdavcommon/webdav.h
index 3a4977c..ecb6a81 100644
--- a/examples/webdavcommon/webdav.h
+++ b/examples/webdavcommon/webdav.h
@@ -35,6 +35,32 @@ public:
35 KAsync::Job<void> synchronizeWithSource(const Sink::QueryBase &query) Q_DECL_OVERRIDE; 35 KAsync::Job<void> synchronizeWithSource(const Sink::QueryBase &query) Q_DECL_OVERRIDE;
36 36
37protected: 37protected:
38
39 /**
40 * Called in a child synchronizer, when replaying a creation of an item.
41 */
42 KAsync::Job<void> createItem(const KDAV2::DavItem &);
43
44 /**
45 * Called in a child synchronizer, when replaying a removal of an item.
46 */
47 KAsync::Job<void> removeItem(const KDAV2::DavItem &);
48
49 /**
50 * Called in a child synchronizer, when replaying a modification of an item.
51 *
52 * The item to modify is chosen according to the given item's URL.
53 * The job will fail if the ETag does not match.
54 */
55 KAsync::Job<void> modifyItem(const KDAV2::DavItem &);
56
57 /**
58 * See comments of the *Item version above
59 */
60 KAsync::Job<void> createCollection(const KDAV2::DavUrl &);
61 KAsync::Job<void> removeCollection(const KDAV2::DavUrl &);
62 KAsync::Job<void> modifyCollection(const KDAV2::DavUrl &);
63
38 /** 64 /**
39 * Called with the list of discovered collections. It's purpose should be 65 * Called with the list of discovered collections. It's purpose should be
40 * adding the said collections to the store. 66 * adding the said collections to the store.
@@ -63,6 +89,19 @@ protected:
63 static QByteArray resourceID(const KDAV2::DavCollection &); 89 static QByteArray resourceID(const KDAV2::DavCollection &);
64 static QByteArray resourceID(const KDAV2::DavItem &); 90 static QByteArray resourceID(const KDAV2::DavItem &);
65 91
92 /**
93 * Used to get the url of an item / collection with the given remote ID
94 */
95 KDAV2::DavUrl urlOf(const QByteArray &remoteId);
96
97 /**
98 * Used to get the url of an item / collection with the given remote ID,
99 * and append `itemPath` to the path of the URI.
100 *
101 * Useful when adding a new item to a collection
102 */
103 KDAV2::DavUrl urlOf(const QByteArray &collectionRemoteId, const QString &itemPath);
104
66 bool unchanged(const KDAV2::DavCollection &); 105 bool unchanged(const KDAV2::DavCollection &);
67 bool unchanged(const KDAV2::DavItem &); 106 bool unchanged(const KDAV2::DavItem &);
68 107