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(ns = "rustical_dav::namespace::NS_CALDAV")]
|
||||||
#[xml(skip_deserializing)]
|
#[xml(skip_deserializing)]
|
||||||
SupportedCalendarComponentSet(SupportedCalendarComponentSet),
|
SupportedCalendarComponentSet(SupportedCalendarComponentSet),
|
||||||
#[xml(ns = "rustical_dav::namespace::NS_CALDAV")]
|
|
||||||
#[xml(skip_deserializing)]
|
#[xml(skip_deserializing)]
|
||||||
|
#[xml(ns = "rustical_dav::namespace::NS_CALDAV")]
|
||||||
SupportedCalendarData(SupportedCalendarData),
|
SupportedCalendarData(SupportedCalendarData),
|
||||||
|
#[xml(ns = "rustical_dav::namespace::NS_DAV")]
|
||||||
MaxResourceSize(i64),
|
MaxResourceSize(i64),
|
||||||
#[xml(skip_deserializing)]
|
#[xml(skip_deserializing)]
|
||||||
|
#[xml(ns = "rustical_dav::namespace::NS_CALDAV")]
|
||||||
SupportedReportSet(SupportedReportSet),
|
SupportedReportSet(SupportedReportSet),
|
||||||
|
|
||||||
// Collection Synchronization (RFC 6578)
|
// Collection Synchronization (RFC 6578)
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ impl Resource for AddressbookResource {
|
|||||||
type PrincipalResource = PrincipalResource;
|
type PrincipalResource = PrincipalResource;
|
||||||
|
|
||||||
fn get_resourcetype(&self) -> &'static [&'static str] {
|
fn get_resourcetype(&self) -> &'static [&'static str] {
|
||||||
|
// TODO: namespace
|
||||||
&["collection", "CARD:addressbook"]
|
&["collection", "CARD:addressbook"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -87,7 +87,12 @@ impl<PT: XmlSerialize> Default for ResponseElement<PT> {
|
|||||||
// Extended by sync-token as specified in RFC 6578
|
// Extended by sync-token as specified in RFC 6578
|
||||||
#[derive(XmlSerialize, XmlRootTag)]
|
#[derive(XmlSerialize, XmlRootTag)]
|
||||||
#[xml(root = b"multistatus", ns = "crate::namespace::NS_DAV")]
|
#[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> {
|
pub struct MultistatusElement<PropType: XmlSerialize, MemberPropType: XmlSerialize> {
|
||||||
#[xml(rename = b"response", flatten)]
|
#[xml(rename = b"response", flatten)]
|
||||||
pub responses: Vec<ResponseElement<PropType>>,
|
pub responses: Vec<ResponseElement<PropType>>,
|
||||||
|
|||||||
Reference in New Issue
Block a user