caldav: add support for calendar subscriptions

This commit is contained in:
Lennart
2024-11-11 17:31:32 +01:00
parent dc4e0c7f28
commit 1d671ad266
16 changed files with 64 additions and 23 deletions

View File

@@ -70,7 +70,7 @@ pub trait Resource: Clone + 'static {
type Error: ResponseError + From<crate::Error>;
type PrincipalResource: Resource;
fn get_resourcetype() -> &'static [&'static str];
fn get_resourcetype(&self) -> &'static [&'static str];
fn list_props() -> Vec<&'static str> {
[Self::PropName::VARIANTS, CommonPropertiesPropName::VARIANTS].concat()
@@ -84,7 +84,7 @@ pub trait Resource: Clone + 'static {
) -> Result<CommonPropertiesProp, Self::Error> {
Ok(match prop {
CommonPropertiesPropName::Resourcetype => {
CommonPropertiesProp::Resourcetype(Resourcetype(Self::get_resourcetype()))
CommonPropertiesProp::Resourcetype(Resourcetype(self.get_resourcetype()))
}
CommonPropertiesPropName::CurrentUserPrincipal => {
CommonPropertiesProp::CurrentUserPrincipal(