diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-05-28 12:38:22 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-05-28 12:38:22 +0200 |
commit | 1c9d2eab6976993c85eaa3e8eb4f1c433258fd16 (patch) | |
tree | 6e29fdc6a465295f2142163744e8851a1cb5e95a /aero-dav/src/calencoder.rs | |
parent | 5b1da2a33b265b674a130a90377c289faea7a210 (diff) | |
download | aerogramme-1c9d2eab6976993c85eaa3e8eb4f1c433258fd16.tar.gz aerogramme-1c9d2eab6976993c85eaa3e8eb4f1c433258fd16.zip |
parse property for sync + versioning
Diffstat (limited to 'aero-dav/src/calencoder.rs')
-rw-r--r-- | aero-dav/src/calencoder.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/aero-dav/src/calencoder.rs b/aero-dav/src/calencoder.rs index 48c93d0..a41747f 100644 --- a/aero-dav/src/calencoder.rs +++ b/aero-dav/src/calencoder.rs @@ -33,6 +33,25 @@ impl<E: Extension> QWrite for MkCalendarResponse<E> { } // ----------------------- REPORT METHOD ------------------------------------- +impl QWrite for ReportTypeName { + async fn qwrite(&self, xml: &mut Writer<impl IWrite>) -> Result<(), QError> { + match self { + Self::Query => { + let start = xml.create_dav_element("calendar-query"); + xml.q.write_event_async(Event::Empty(start)).await + } + Self::Multiget => { + let start = xml.create_dav_element("calendar-multiget"); + xml.q.write_event_async(Event::Empty(start)).await + } + Self::FreeBusy => { + let start = xml.create_dav_element("free-busy-query"); + xml.q.write_event_async(Event::Empty(start)).await + } + } + } +} + impl<E: Extension> QWrite for ReportType<E> { async fn qwrite(&self, xml: &mut Writer<impl IWrite>) -> Result<(), QError> { match self { |