aboutsummaryrefslogtreecommitdiff
path: root/aero-proto/src/dav/resource.rs
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2024-04-23 15:43:48 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2024-04-23 15:43:48 +0200
commitadbccd88348f472751373a2e1d536e818be8fa67 (patch)
tree6e87f26cce79339854414e2de328e1dd20d1d2a9 /aero-proto/src/dav/resource.rs
parent50ce8621c2eaf91c46be0a2a9c2b82b19e66880b (diff)
downloadaerogramme-adbccd88348f472751373a2e1d536e818be8fa67.tar.gz
aerogramme-adbccd88348f472751373a2e1d536e818be8fa67.zip
Add support for content type
Diffstat (limited to 'aero-proto/src/dav/resource.rs')
-rw-r--r--aero-proto/src/dav/resource.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/aero-proto/src/dav/resource.rs b/aero-proto/src/dav/resource.rs
index bd377fb..f13fb0c 100644
--- a/aero-proto/src/dav/resource.rs
+++ b/aero-proto/src/dav/resource.rs
@@ -70,6 +70,10 @@ impl DavNode for RootNode {
futures::stream::once(futures::future::err(std::io::Error::from(std::io::ErrorKind::Unsupported))).boxed()
}.boxed()
}
+
+ fn content_type(&self) -> &str {
+ "text/plain"
+ }
}
#[derive(Clone)]
@@ -139,6 +143,11 @@ impl DavNode for HomeNode {
futures::stream::once(futures::future::err(std::io::Error::from(std::io::ErrorKind::Unsupported))).boxed()
}.boxed()
}
+
+
+ fn content_type(&self) -> &str {
+ "text/plain"
+ }
}
#[derive(Clone)]
@@ -218,6 +227,10 @@ impl DavNode for CalendarListNode {
futures::stream::once(futures::future::err(std::io::Error::from(std::io::ErrorKind::Unsupported))).boxed()
}.boxed()
}
+
+ fn content_type(&self) -> &str {
+ "text/plain"
+ }
}
#[derive(Clone)]
@@ -314,6 +327,10 @@ impl DavNode for CalendarNode {
futures::stream::once(futures::future::err(std::io::Error::from(std::io::ErrorKind::Unsupported))).boxed()
}.boxed()
}
+
+ fn content_type(&self) -> &str {
+ "text/plain"
+ }
}
const FAKE_ICS: &str = r#"BEGIN:VCALENDAR
@@ -432,6 +449,10 @@ impl DavNode for EventNode {
futures::stream::once(Box::pin(r)).boxed()
}.boxed()
}
+
+ fn content_type(&self) -> &str {
+ "text/calendar"
+ }
}
#[derive(Clone)]
@@ -484,4 +505,8 @@ impl DavNode for CreateEventNode {
futures::stream::once(futures::future::err(std::io::Error::from(std::io::ErrorKind::Unsupported))).boxed()
}.boxed()
}
+
+ fn content_type(&self) -> &str {
+ "text/plain"
+ }
}