aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2024-03-01 08:43:37 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2024-03-01 08:43:37 +0100
commit8691c98f44762d518ad0d34ba714180c79a9e506 (patch)
tree638a54d03d57a13c97b9bd29a2407d3de0810ecd
parente88e448179239fcc41aa03efcbfb2cc2ab0c922e (diff)
downloadaerogramme-8691c98f44762d518ad0d34ba714180c79a9e506.tar.gz
aerogramme-8691c98f44762d518ad0d34ba714180c79a9e506.zip
WIP property
-rw-r--r--src/dav/caltypes.rs1
-rw-r--r--src/dav/encoder.rs11
-rw-r--r--src/dav/types.rs9
3 files changed, 17 insertions, 4 deletions
diff --git a/src/dav/caltypes.rs b/src/dav/caltypes.rs
index c672370..a68936c 100644
--- a/src/dav/caltypes.rs
+++ b/src/dav/caltypes.rs
@@ -8,6 +8,7 @@ impl Extension for CalExtension {
type Error = Violation;
type Property = Property;
type PropertyRequest = Property; //@FIXME
+ type ResourceType = Property; //@FIXME
}
pub enum Violation {
diff --git a/src/dav/encoder.rs b/src/dav/encoder.rs
index 399a92e..5392b18 100644
--- a/src/dav/encoder.rs
+++ b/src/dav/encoder.rs
@@ -198,8 +198,15 @@ impl<C: Context> QuickWritable<C> for Property<C> {
match self {
CreationDate(date) => unimplemented!(),
DisplayName(name) => unimplemented!(),
- //@FIXME not finished
- _ => unimplemented!(),
+ GetContentLanguage(lang) => unimplemented!(),
+ GetContentLength(len) => unimplemented!(),
+ GetContentType(ct) => unimplemented!(),
+ GetEtag(et) => unimplemented!(),
+ GetLastModified(dt) => unimplemented!(),
+ LockDiscovery(locks) => unimplemented!(),
+ ResourceType(res) => unimplemented!(),
+ SupportedLock(sup) => unimplemented!(),
+ Extension(inner) => unimplemented!(),
};
Ok(())
}
diff --git a/src/dav/types.rs b/src/dav/types.rs
index 8807658..59cfcd6 100644
--- a/src/dav/types.rs
+++ b/src/dav/types.rs
@@ -8,6 +8,7 @@ pub trait Extension {
type Error;
type Property;
type PropertyRequest;
+ type ResourceType;
}
/// No extension
@@ -18,6 +19,7 @@ impl Extension for NoExtension {
type Error = Disabled;
type Property = Disabled;
type PropertyRequest = Disabled;
+ type ResourceType = Disabled;
}
/// 14.1. activelock XML Element
@@ -849,7 +851,7 @@ pub enum Property<T: Extension> {
/// <x:collection/>
/// <f:search-results xmlns:f="http://www.example.com/ns"/>
/// </x:resourcetype>
- ResourceType(Collection),
+ ResourceType(Vec<ResourceType<T>>),
/// 15.10. supportedlock Property
///
@@ -880,4 +882,7 @@ pub enum Property<T: Extension> {
Extension(T::Property),
}
-
+pub enum ResourceType<T: Extension> {
+ Collection,
+ Extension(T::ResourceType),
+}