From f1861e3f1265a47513779bd251298d034a9011a0 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Sat, 2 Mar 2024 16:10:41 +0100 Subject: Finalize caldav types iteration --- src/dav/caltypes.rs | 47 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 4 deletions(-) (limited to 'src/dav') diff --git a/src/dav/caltypes.rs b/src/dav/caltypes.rs index 6f6bd3f..a08f550 100644 --- a/src/dav/caltypes.rs +++ b/src/dav/caltypes.rs @@ -3,9 +3,13 @@ use chrono::{DateTime,Utc}; use super::types as Dav; -//@FIXME ACL part is missing, required -//@FIXME Versioning part is missing, required +//@FIXME ACL (rfc3744) is missing, required +//@FIXME Versioning (rfc3253) is missing, required //@FIXME WebDAV sync (rfc6578) is missing, optional +// For reference, SabreDAV guide gives high-level & real-world overview: +// https://sabre.io/dav/building-a-caldav-client/ +// For reference, non-official extensions documented by SabreDAV: +// https://github.com/apple/ccs-calendarserver/tree/master/doc/Extensions pub struct CalExtension { pub root: bool @@ -66,6 +70,38 @@ pub struct CalendarQuery { timezone: Option, } +/// Name: calendar-multiget +/// +/// Namespace: urn:ietf:params:xml:ns:caldav +/// +/// Purpose: CalDAV report used to retrieve specific calendar object +/// resources. +/// +/// Description: See Section 7.9. +/// +/// Definition: +/// +/// +pub struct CalendarMultiget { + selector: Option>, + href: Vec, +} + +/// Name: free-busy-query +/// +/// Namespace: urn:ietf:params:xml:ns:caldav +/// +/// Purpose: CalDAV report used to generate a VFREEBUSY to determine +/// busy time over a specific time range. +/// +/// Description: See Section 7.10. +/// +/// Definition: +/// +pub struct FreeBusyQuery(TimeRange); + // ----- Hooks ----- pub enum ResourceType { Calendar, @@ -116,7 +152,10 @@ pub enum Property { /// Calendrier de Mathilde Desruisseaux - CalendarDescription(String), + CalendarDescription { + lang: Option, + text: String, + }, /// 5.2.2. CALDAV:calendar-timezone Property /// @@ -1011,7 +1050,7 @@ pub struct LimitRecurrenceSet(DateTime, DateTime); /// end value: an iCalendar "date with UTC time" pub struct LimitFreebusySet(DateTime, DateTime); - +/// Used by CalendarQuery & CalendarMultiget pub enum CalendarSelector { AllProp, PropName, -- cgit v1.2.3