mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 22:52:22 +00:00
Add namespace
This commit is contained in:
@@ -66,11 +66,13 @@ pub enum CalendarProp {
|
||||
#[xml(ns = "rustical_dav::namespace::NS_CALDAV")]
|
||||
#[xml(skip_deserializing)]
|
||||
SupportedCalendarComponentSet(SupportedCalendarComponentSet),
|
||||
#[xml(ns = "rustical_dav::namespace::NS_CALDAV")]
|
||||
#[xml(skip_deserializing)]
|
||||
#[xml(ns = "rustical_dav::namespace::NS_CALDAV")]
|
||||
SupportedCalendarData(SupportedCalendarData),
|
||||
#[xml(ns = "rustical_dav::namespace::NS_DAV")]
|
||||
MaxResourceSize(i64),
|
||||
#[xml(skip_deserializing)]
|
||||
#[xml(ns = "rustical_dav::namespace::NS_CALDAV")]
|
||||
SupportedReportSet(SupportedReportSet),
|
||||
|
||||
// Collection Synchronization (RFC 6578)
|
||||
|
||||
@@ -68,6 +68,7 @@ impl Resource for AddressbookResource {
|
||||
type PrincipalResource = PrincipalResource;
|
||||
|
||||
fn get_resourcetype(&self) -> &'static [&'static str] {
|
||||
// TODO: namespace
|
||||
&["collection", "CARD:addressbook"]
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,12 @@ impl<PT: XmlSerialize> Default for ResponseElement<PT> {
|
||||
// Extended by sync-token as specified in RFC 6578
|
||||
#[derive(XmlSerialize, XmlRootTag)]
|
||||
#[xml(root = b"multistatus", ns = "crate::namespace::NS_DAV")]
|
||||
#[xml(ns_prefix(crate::namespace::NS_DAV = b"D"))]
|
||||
#[xml(ns_prefix(
|
||||
crate::namespace::NS_DAV = b"D",
|
||||
crate::namespace::NS_CARDDAV = b"CARD",
|
||||
crate::namespace::NS_CALDAV = b"CAL",
|
||||
crate::namespace::NS_CALENDARSERVER = b"CS"
|
||||
))]
|
||||
pub struct MultistatusElement<PropType: XmlSerialize, MemberPropType: XmlSerialize> {
|
||||
#[xml(rename = b"response", flatten)]
|
||||
pub responses: Vec<ResponseElement<PropType>>,
|
||||
|
||||
Reference in New Issue
Block a user