mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 21:42:34 +00:00
Remove getcontenttype from collections, they don't belong there
This commit is contained in:
@@ -31,8 +31,6 @@ pub enum CalendarProp {
|
||||
// WebDAV (RFC 2518)
|
||||
#[xml(ns = "rustical_dav::namespace::NS_DAV")]
|
||||
Displayname(Option<String>),
|
||||
#[xml(ns = "rustical_dav::namespace::NS_DAV", skip_deserializing)]
|
||||
Getcontenttype(&'static str),
|
||||
|
||||
// CalDAV (RFC 4791)
|
||||
#[xml(ns = "rustical_dav::namespace::NS_ICAL")]
|
||||
@@ -155,9 +153,6 @@ impl Resource for CalendarResource {
|
||||
CalendarPropName::SupportedCalendarData => {
|
||||
CalendarProp::SupportedCalendarData(SupportedCalendarData::default())
|
||||
}
|
||||
CalendarPropName::Getcontenttype => {
|
||||
CalendarProp::Getcontenttype("text/calendar;charset=utf-8")
|
||||
}
|
||||
CalendarPropName::MaxResourceSize => CalendarProp::MaxResourceSize(10000000),
|
||||
CalendarPropName::SupportedReportSet => {
|
||||
CalendarProp::SupportedReportSet(SupportedReportSet::default())
|
||||
@@ -224,7 +219,6 @@ impl Resource for CalendarResource {
|
||||
Err(rustical_dav::Error::PropReadOnly)
|
||||
}
|
||||
CalendarProp::SupportedCalendarData(_) => Err(rustical_dav::Error::PropReadOnly),
|
||||
CalendarProp::Getcontenttype(_) => Err(rustical_dav::Error::PropReadOnly),
|
||||
CalendarProp::MaxResourceSize(_) => Err(rustical_dav::Error::PropReadOnly),
|
||||
CalendarProp::SupportedReportSet(_) => Err(rustical_dav::Error::PropReadOnly),
|
||||
// Converting between a calendar subscription calendar and a normal one would be weird
|
||||
@@ -271,7 +265,6 @@ impl Resource for CalendarResource {
|
||||
Err(rustical_dav::Error::PropReadOnly)
|
||||
}
|
||||
CalendarPropName::SupportedCalendarData => Err(rustical_dav::Error::PropReadOnly),
|
||||
CalendarPropName::Getcontenttype => Err(rustical_dav::Error::PropReadOnly),
|
||||
CalendarPropName::MaxResourceSize => Err(rustical_dav::Error::PropReadOnly),
|
||||
CalendarPropName::SupportedReportSet => Err(rustical_dav::Error::PropReadOnly),
|
||||
// Converting a calendar subscription calendar into a normal one would be weird
|
||||
|
||||
@@ -44,8 +44,6 @@ pub enum AddressbookProp {
|
||||
// WebDAV (RFC 2518)
|
||||
#[xml(ns = "rustical_dav::namespace::NS_DAV")]
|
||||
Displayname(Option<String>),
|
||||
#[xml(ns = "rustical_dav::namespace::NS_DAV", skip_deserializing)]
|
||||
Getcontenttype(&'static str),
|
||||
|
||||
// CardDAV (RFC 6352)
|
||||
#[xml(ns = "rustical_dav::namespace::NS_CARDDAV")]
|
||||
@@ -107,9 +105,6 @@ impl Resource for AddressbookResource {
|
||||
AddressbookPropName::Displayname => {
|
||||
AddressbookProp::Displayname(self.0.displayname.clone())
|
||||
}
|
||||
AddressbookPropName::Getcontenttype => {
|
||||
AddressbookProp::Getcontenttype("text/vcard;charset=utf-8")
|
||||
}
|
||||
AddressbookPropName::MaxResourceSize => {
|
||||
AddressbookProp::MaxResourceSize(10000000)
|
||||
}
|
||||
@@ -148,7 +143,6 @@ impl Resource for AddressbookResource {
|
||||
self.0.description = description;
|
||||
Ok(())
|
||||
}
|
||||
AddressbookProp::Getcontenttype(_) => Err(rustical_dav::Error::PropReadOnly),
|
||||
AddressbookProp::MaxResourceSize(_) => Err(rustical_dav::Error::PropReadOnly),
|
||||
AddressbookProp::SupportedReportSet(_) => Err(rustical_dav::Error::PropReadOnly),
|
||||
AddressbookProp::SupportedAddressData(_) => Err(rustical_dav::Error::PropReadOnly),
|
||||
@@ -170,7 +164,6 @@ impl Resource for AddressbookResource {
|
||||
self.0.description = None;
|
||||
Ok(())
|
||||
}
|
||||
AddressbookPropName::Getcontenttype => Err(rustical_dav::Error::PropReadOnly),
|
||||
AddressbookPropName::MaxResourceSize => Err(rustical_dav::Error::PropReadOnly),
|
||||
AddressbookPropName::SupportedReportSet => Err(rustical_dav::Error::PropReadOnly),
|
||||
AddressbookPropName::SupportedAddressData => Err(rustical_dav::Error::PropReadOnly),
|
||||
|
||||
Reference in New Issue
Block a user