WIP property

This commit is contained in:
Quentin 2024-03-01 08:43:37 +01:00
parent e88e448179
commit 8691c98f44
Signed by: quentin
GPG key ID: E9602264D639FF68
3 changed files with 17 additions and 4 deletions

View file

@ -8,6 +8,7 @@ impl Extension for CalExtension {
type Error = Violation; type Error = Violation;
type Property = Property; type Property = Property;
type PropertyRequest = Property; //@FIXME type PropertyRequest = Property; //@FIXME
type ResourceType = Property; //@FIXME
} }
pub enum Violation { pub enum Violation {

View file

@ -198,8 +198,15 @@ impl<C: Context> QuickWritable<C> for Property<C> {
match self { match self {
CreationDate(date) => unimplemented!(), CreationDate(date) => unimplemented!(),
DisplayName(name) => unimplemented!(), DisplayName(name) => unimplemented!(),
//@FIXME not finished GetContentLanguage(lang) => unimplemented!(),
_ => 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(()) Ok(())
} }

View file

@ -8,6 +8,7 @@ pub trait Extension {
type Error; type Error;
type Property; type Property;
type PropertyRequest; type PropertyRequest;
type ResourceType;
} }
/// No extension /// No extension
@ -18,6 +19,7 @@ impl Extension for NoExtension {
type Error = Disabled; type Error = Disabled;
type Property = Disabled; type Property = Disabled;
type PropertyRequest = Disabled; type PropertyRequest = Disabled;
type ResourceType = Disabled;
} }
/// 14.1. activelock XML Element /// 14.1. activelock XML Element
@ -849,7 +851,7 @@ pub enum Property<T: Extension> {
/// <x:collection/> /// <x:collection/>
/// <f:search-results xmlns:f="http://www.example.com/ns"/> /// <f:search-results xmlns:f="http://www.example.com/ns"/>
/// </x:resourcetype> /// </x:resourcetype>
ResourceType(Collection), ResourceType(Vec<ResourceType<T>>),
/// 15.10. supportedlock Property /// 15.10. supportedlock Property
/// ///
@ -880,4 +882,7 @@ pub enum Property<T: Extension> {
Extension(T::Property), Extension(T::Property),
} }
pub enum ResourceType<T: Extension> {
Collection,
Extension(T::ResourceType),
}