mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 17:52:24 +00:00
caldav: Add some properties in preparation for WebDAV Push
This commit is contained in:
@@ -87,28 +87,17 @@ pub enum Transport {
|
||||
WebPush,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, XmlSerialize, PartialEq)]
|
||||
pub struct TransportWrapper {
|
||||
#[xml(ty = "untagged")]
|
||||
transport: Transport,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, XmlSerialize, PartialEq)]
|
||||
pub struct Transports {
|
||||
// NOTE: Here we implement an older version of the spec since the new property name is not reflected
|
||||
// in DAVx5 yet
|
||||
// https://github.com/bitfireAT/webdav-push/commit/461259a2f2174454b2b00033419b11fac52b79e3
|
||||
#[xml(flatten, rename = b"transport")]
|
||||
#[xml(flatten, ty = "untagged")]
|
||||
#[xml(ns = "rustical_dav::namespace::NS_DAVPUSH")]
|
||||
transports: Vec<TransportWrapper>,
|
||||
transports: Vec<Transport>,
|
||||
}
|
||||
|
||||
impl Default for Transports {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
transports: vec![TransportWrapper {
|
||||
transport: Transport::WebPush,
|
||||
}],
|
||||
transports: vec![Transport::WebPush],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user