0

连接到 CalDAV 服务器后,您可以查询它支持哪些服务。例如,在 Lightning 连接到 CalDAV 服务器后,如果该服务器宣传任务支持,它将只允许您创建任务对象。

不幸的是,一些服务器(例如 AppSuite、Yahoo)确实支持 Tasks,但显然没有正确宣传这一事实,因此严格的 PIM 客户端(例如 Lightning)不会与它们对话 Tasks。

CalDAV 应该如何(确切地)做到这一点?

我已阅读https://wiki.wocommunity.org/display/~probert/CalDAV+and+CardDAV+handshake,它解释了 CalDAV 握手和连接,并识别连接后 OPTIONS 调用返回的 DAV 功能列表。我们的 CalDAV 服务器返回以下列表: 1, 2, 3, access-control, calendar-access, addressbook, extended-mkcol, calendar-auto-schedule, calendar-schedule, calendarserver-sharing, calendarserver-principal-search, calendarserver-principal-property-search, calendarserver-private-comments, extended-mkcol, calendar-managed-attachments

但是,我无法在任何地方找到标准功能名称的详尽列表,也无法找到期望支持的任务名称。

任何人都可以对此有所了解吗?

4

1 回答 1

2

这些功能保存在supported-calendar-component-set任何给定日历的属性中。如果未设置此属性,则应假定它支持所有内容。

要获取组件集,请使用它(使用正确的日历 URL 和身份验证):

PROPFIND https://myserver/caldav/url/12345 <?xml version="1.0" encoding="UTF-8"?> <A:propfind xmlns:A="DAV:"> <A:prop> <C:supported-calendar-component-set xmlns:C="urn:ietf:params:xml:ns:caldav"/> </A:prop> </A:propfind>

这返回

<D:multistatus> <D:response> <D:href>/caldav/3382/</D:href> <D:propstat> <D:prop> <supported-calendar-component-set> <CAL:comp name="VEVENT"/> </supported-calendar-component-set> </D:prop> <D:status>HTTP/1.1 200 OK</D:status> </D:propstat> </D:response> </D:multistatus>

在supported-calendar-component-set 部分,查找VEVENT(支持日历事件)、VTASK(支持任务)、VJOURNAL 等。所以在上面的示例中,支持日历事件,但不支持任务。

于 2016-08-03T04:16:01.873 回答