MKCALENDAR: Add supported-calendar-component-set

This commit is contained in:
Lennart K
2024-05-30 19:52:18 +02:00
parent 5f194bbeb4
commit aa71540e04

View File

@@ -4,6 +4,7 @@ use actix_web::web::{Data, Path};
use actix_web::HttpResponse;
use anyhow::Result;
use rustical_auth::{AuthInfoExtractor, CheckAuthentication};
use rustical_dav::xml::tag_list::TagList;
use rustical_store::calendar::{Calendar, CalendarStore};
use serde::{Deserialize, Serialize};
@@ -15,6 +16,20 @@ pub struct Resourcetype {
collection: Option<()>,
}
#[derive(Serialize, Deserialize, Clone, Debug)]
#[serde(rename_all = "kebab-case")]
pub struct CalendarComponentElement {
#[serde(rename = "@name")]
name: String,
}
#[derive(Serialize, Deserialize, Clone, Debug)]
#[serde(rename_all = "kebab-case")]
pub struct SupportedCalendarComponentSetElement {
#[serde(flatten)]
comp: Vec<CalendarComponentElement>,
}
#[derive(Serialize, Deserialize, Clone, Debug)]
#[serde(rename_all = "kebab-case")]
pub struct MkcolCalendarProp {
@@ -23,6 +38,7 @@ pub struct MkcolCalendarProp {
calendar_description: Option<String>,
calendar_color: Option<String>,
calendar_timezone: Option<String>,
supported_calendar_component_set: Option<SupportedCalendarComponentSetElement>,
}
#[derive(Serialize, Deserialize, Clone, Debug)]