aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2024-03-02 16:10:41 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2024-03-02 16:10:41 +0100
commitf1861e3f1265a47513779bd251298d034a9011a0 (patch)
tree0d21c474750f7e528ef36c39189e884948ca27ae /src
parent4d325a2f7b088276f805b29dfa9817b6f6783b69 (diff)
downloadaerogramme-f1861e3f1265a47513779bd251298d034a9011a0.tar.gz
aerogramme-f1861e3f1265a47513779bd251298d034a9011a0.zip
Finalize caldav types iteration
Diffstat (limited to 'src')
-rw-r--r--src/dav/caltypes.rs47
1 files changed, 43 insertions, 4 deletions
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<T: Dav::Extension> {
timezone: Option<TimeZone>,
}
+/// 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:
+///
+/// <!ELEMENT calendar-multiget ((DAV:allprop |
+/// DAV:propname |
+/// DAV:prop)?, DAV:href+)>
+pub struct CalendarMultiget<T: Dav::Extension> {
+ selector: Option<CalendarSelector<T>>,
+ href: Vec<Dav::Href>,
+}
+
+/// 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:
+/// <!ELEMENT free-busy-query (time-range)>
+pub struct FreeBusyQuery(TimeRange);
+
// ----- Hooks -----
pub enum ResourceType {
Calendar,
@@ -116,7 +152,10 @@ pub enum Property {
/// <C:calendar-description xml:lang="fr-CA"
/// xmlns:C="urn:ietf:params:xml:ns:caldav"
/// >Calendrier de Mathilde Desruisseaux</C:calendar-description>
- CalendarDescription(String),
+ CalendarDescription {
+ lang: Option<String>,
+ text: String,
+ },
/// 5.2.2. CALDAV:calendar-timezone Property
///
@@ -1011,7 +1050,7 @@ pub struct LimitRecurrenceSet(DateTime<Utc>, DateTime<Utc>);
/// end value: an iCalendar "date with UTC time"
pub struct LimitFreebusySet(DateTime<Utc>, DateTime<Utc>);
-
+/// Used by CalendarQuery & CalendarMultiget
pub enum CalendarSelector<T: Dav::Extension> {
AllProp,
PropName,