aboutsummaryrefslogtreecommitdiff
path: root/aero-dav/src/versioningtypes.rs
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2024-05-27 18:16:53 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2024-05-27 18:16:53 +0200
commit5b1da2a33b265b674a130a90377c289faea7a210 (patch)
treee3c5ec8bc0745d978fd49ddc60d7e9170055dc9f /aero-dav/src/versioningtypes.rs
parent418adf92be86ea83008a145180837f1e0ad3018a (diff)
downloadaerogramme-5b1da2a33b265b674a130a90377c289faea7a210.tar.gz
aerogramme-5b1da2a33b265b674a130a90377c289faea7a210.zip
webdav sync core codec
Diffstat (limited to 'aero-dav/src/versioningtypes.rs')
-rw-r--r--aero-dav/src/versioningtypes.rs36
1 files changed, 36 insertions, 0 deletions
diff --git a/aero-dav/src/versioningtypes.rs b/aero-dav/src/versioningtypes.rs
index 6c1c204..ba64b05 100644
--- a/aero-dav/src/versioningtypes.rs
+++ b/aero-dav/src/versioningtypes.rs
@@ -1,3 +1,39 @@
+use super::types as dav;
+
//@FIXME required for a full DAV implementation
// See section 7.1 of the CalDAV RFC
// It seems it's mainly due to the fact that the REPORT method is re-used.
+// https://datatracker.ietf.org/doc/html/rfc4791#section-7.1
+//
+// Defines (required by CalDAV):
+// - REPORT method
+// - expand-property root report method
+//
+// Defines (required by Sync):
+// - limit, nresults
+// - supported-report-set
+
+// This property identifies the reports that are supported by the
+// resource.
+//
+// <!ELEMENT supported-report-set (supported-report*)>
+// <!ELEMENT supported-report report>
+// <!ELEMENT report ANY>
+// ANY value: a report element type
+
+#[derive(Debug, PartialEq, Clone)]
+pub enum Report<E: dav::Extension> {
+ VersionTree, // Not yet implemented
+ ExpandProperty, // Not yet implemented
+ Extension(E::ReportType),
+}
+
+/// Limit
+/// <!ELEMENT limit (nresults) >
+#[derive(Debug, PartialEq, Clone)]
+pub struct Limit(pub NResults);
+
+/// NResults
+/// <!ELEMENT nresults (#PCDATA) >
+#[derive(Debug, PartialEq, Clone)]
+pub struct NResults(pub u64);