[CalendarServer-changes] [8630] CalendarServer/trunk/doc/Extensions

source_changes at macosforge.org source_changes at macosforge.org
Tue Feb 7 12:57:34 PST 2012


Revision: 8630
          http://trac.macosforge.org/projects/calendarserver/changeset/8630
Author:   cdaboo at apple.com
Date:     2012-02-07 12:57:32 -0800 (Tue, 07 Feb 2012)
Log Message:
-----------
Updated spec.

Modified Paths:
--------------
    CalendarServer/trunk/doc/Extensions/caldav-notifications.txt
    CalendarServer/trunk/doc/Extensions/caldav-notifications.xml

Modified: CalendarServer/trunk/doc/Extensions/caldav-notifications.txt
===================================================================
--- CalendarServer/trunk/doc/Extensions/caldav-notifications.txt	2012-02-07 20:29:11 UTC (rev 8629)
+++ CalendarServer/trunk/doc/Extensions/caldav-notifications.txt	2012-02-07 20:57:32 UTC (rev 8630)
@@ -3,10 +3,10 @@
 
 Calendar Server Extension                                       C. Daboo
                                                               Apple Inc.
-                                                        January 17, 2012
+                                                        February 7, 2012
 
 
-                      CalDAV: Server Notifications
+                  CalDAV: Calendar User Notifications
 
 Abstract
 
@@ -28,13 +28,12 @@
        4.3.1.  CS:notifications . . . . . . . . . . . . . . . . . . .  5
        4.3.2.  CS:notification  . . . . . . . . . . . . . . . . . . .  5
        4.3.3.  CS:dtstamp . . . . . . . . . . . . . . . . . . . . . .  6
-       4.3.4.  CS:uid . . . . . . . . . . . . . . . . . . . . . . . .  6
    5.  Notification Definitions . . . . . . . . . . . . . . . . . . .  6
-     5.1.  System Status Notification . . . . . . . . . . . . . . . .  7
-       5.1.1.  CS:systemstatus Element Definition . . . . . . . . . .  7
-     5.2.  Quota Notification . . . . . . . . . . . . . . . . . . . .  8
+     5.1.  System Status Notification . . . . . . . . . . . . . . . .  6
+       5.1.1.  CS:systemstatus Element Definition . . . . . . . . . .  6
+     5.2.  Quota Notification . . . . . . . . . . . . . . . . . . . .  7
        5.2.1.  CS:quotastatus Element Definition  . . . . . . . . . .  8
-     5.3.  Resource Changes Notification  . . . . . . . . . . . . . . 10
+     5.3.  Resource Changes Notification  . . . . . . . . . . . . . .  9
        5.3.1.  CS:resource-change Element Definition  . . . . . . . . 10
        5.3.2.  CS:calendar-changes Element Definition . . . . . . . . 13
          5.3.2.1.  Handling Recurrences in CS:calendar-changes  . . . 15
@@ -52,9 +51,10 @@
 
 
 
+
 Daboo                                                           [Page 1]
 
-                          CalDAV Notifications              January 2012
+                        CalDAV User Notifications          February 2012
 
 
 1.  Introduction
@@ -110,7 +110,7 @@
 
 Daboo                                                           [Page 2]
 
-                          CalDAV Notifications              January 2012
+                        CalDAV User Notifications          February 2012
 
 
    The notification collection referenced by the CS:notification-URL
@@ -120,10 +120,10 @@
    Notification "messages" are XML documents stored as resources in the
    notification collection.  Each XML document contains a CS:
    notification (Section 4.3.2) element as its root.  The root element
-   contains a CS:dtstamp element, a CS:uid element, and one additional
-   element which represents the type of notification being conveyed in
-   the message.  That child element will typically contain additional
-   content that describes the notification.
+   contains a CS:dtstamp element, and one additional element which
+   represents the type of notification being conveyed in the message.
+   That child element will typically contain additional content that
+   describes the notification.
 
    Each notification resource has a CS:notificationtype (Section 4.2.1)
    property which contains as its single child element an empty element
@@ -166,7 +166,7 @@
 
 Daboo                                                           [Page 3]
 
-                          CalDAV Notifications              January 2012
+                        CalDAV User Notifications          February 2012
 
 
 4.1.1.  CS:notification-URL Property
@@ -222,7 +222,7 @@
 
 Daboo                                                           [Page 4]
 
-                          CalDAV Notifications              January 2012
+                        CalDAV User Notifications          February 2012
 
 
    COPY/MOVE behavior:  This property value MUST be preserved in COPY
@@ -278,12 +278,12 @@
 
 Daboo                                                           [Page 5]
 
-                          CalDAV Notifications              January 2012
+                        CalDAV User Notifications          February 2012
 
 
    Definition:
 
-   <!ELEMENT notification (dtstamp, uid, XXX) >
+   <!ELEMENT notification (dtstamp, XXX) >
    <!-- Any notification type element can appear after
         CS:dtstamp -->
 
@@ -302,41 +302,11 @@
 
    <!ELEMENT dtstamp (#PCDATA)>
 
-4.3.4.  CS:uid
 
-   Name:  uid
-
-   Namespace:  http://calendarserver.org/ns/
-
-   Purpose:  Unique identifier for a notification.
-
-   Description:  Contains the unique identifier for a notification
-      message.  In some situation a server might update an existing
-      notification with new information (e.g., when coalescing), but the
-      server might create a new resource and delete the old one.
-      However, clients will likely want to track this change as an
-      update rather than a deletion and creation of a new notification.
-      To aid that servers MUST include a unique identifier in the CS:uid
-      element in the notification to allow clients to track notification
-      updates.
-
-   Definition:
-
-   <!ELEMENT uid (#PCDATA)>
-
-
 5.  Notification Definitions
 
    This section defines a set of common notification types.
 
-
-
-
-Daboo                                                           [Page 6]
-
-                          CalDAV Notifications              January 2012
-
-
 5.1.  System Status Notification
 
    The system status notification is used to convey a URI and/or textual
@@ -356,6 +326,17 @@
 
 5.1.1.  CS:systemstatus Element Definition
 
+
+
+
+
+
+
+Daboo                                                           [Page 6]
+
+                        CalDAV User Notifications          February 2012
+
+
    Name:  systemstatus
 
    Namespace:  http://calendarserver.org/ns/
@@ -377,27 +358,10 @@
    Example:  This is an example of the body of a notification resource
       for an emergency system outage:
 
-
-
-
-
-
-
-
-
-
-
-
-Daboo                                                           [Page 7]
-
-                          CalDAV Notifications              January 2012
-
-
    <?xml version="1.0" encoding="UTF-8"?>
    <CS:notification xmlns:D="DAV:"
                     xmlns:CS="http://calendarserver.org/ns/">
      <CS:dtstamp>2011-12-09T11:12:53-05:00</CS:dtstamp>
-     <CS:uid>9B75C4F9-80CB-4E3B-A231-4AEEDD50D2FA</CS:uid>
      <CS:systemstatus type="high">
        <D:href>http://example.com/emergency_shutdown.html</D:href>
        <CS:description xml:lang='en_US'
@@ -421,6 +385,14 @@
    elements for different types of quota being reported to the user.  In
    some cases these may be warnings (e.g., a user getting to 80% of
    their quota limit), or in other cases errors (e.g., a user exceeding
+
+
+
+Daboo                                                           [Page 7]
+
+                        CalDAV User Notifications          February 2012
+
+
    their quota).
 
 5.2.1.  CS:quotastatus Element Definition
@@ -439,16 +411,6 @@
       a URI for a webpage where the user can go to get further
       information about their quota status or take corrective action.
 
-
-
-
-
-
-Daboo                                                           [Page 8]
-
-                          CalDAV Notifications              January 2012
-
-
    Definition:
 
    <!ELEMENT quota-status (quota+)>
@@ -470,11 +432,27 @@
    Example:  This is an example of the body of a notification resource
       for a quota warning:
 
+
+
+
+
+
+
+
+
+
+
+
+
+Daboo                                                           [Page 8]
+
+                        CalDAV User Notifications          February 2012
+
+
    <?xml version="1.0" encoding="UTF-8"?>
    <CS:notification xmlns:D="DAV:"
                     xmlns:CS="http://calendarserver.org/ns/">
      <CS:dtstamp>2011-12-09T11:12:53-05:00</CS:dtstamp>
-     <CS:uid>9B61A79D-7C07-48C2-B9E4-B3DFD9506C80</CS:uid>
      <CS:quota-status>
        <CS:quota type="warning">
          <CS:quota-type><CS:attachments /></CS:quota-type>
@@ -488,28 +466,10 @@
       for a quota that has been exceeded, and a count-based limit that
       is shown as a warning:
 
-
-
-
-
-
-
-
-
-
-
-
-
-Daboo                                                           [Page 9]
-
-                          CalDAV Notifications              January 2012
-
-
    <?xml version="1.0" encoding="UTF-8"?>
    <CS:notification xmlns:D="DAV:"
                     xmlns:CS="http://calendarserver.org/ns/">
      <CS:dtstamp>2011-12-09T11:12:53-05:00</CS:dtstamp>
-     <CS:uid>E3892573-5605-45F8-8F21-62C63ED013A3</CS:uid>
      <CS:quota-status>
        <CS:quota type="exceeded">
          <CS:quota-type><CS:attachments /></CS:quota-type>
@@ -537,6 +497,14 @@
    can be displayed on all devices a user is accessing their data from.
    When the user acknowledges and dismisses the notification on one
    device, other devices SHOULD also remove the notification when they
+
+
+
+Daboo                                                           [Page 9]
+
+                        CalDAV User Notifications          February 2012
+
+
    next synchronize the notification collection.
 
    A new WebDAV property CS:notify-changes (Section 5.3.4) is defined
@@ -547,20 +515,16 @@
    honor the chosen setting to enable or disable change notifications.
 
    Servers can send notifications for calendar object resources, and
-   ones for calendar collections.
+   ones for calendar collections.  Servers SHOULD coalesce notifications
+   that refer to the same resource into a single notification resource,
+   containing multiple CS:created, CS:updated or CS:deleted elements all
+   with the same DAV:href child element value.  Servers MAY coalesce
+   changes to multiple resources into a change notification for the
+   parent collection of those resources and use a CS:collection-changes
+   element to indicate the number of individual resources that changed.
 
 5.3.1.  CS:resource-change Element Definition
 
-
-
-
-
-
-Daboo                                                          [Page 10]
-
-                          CalDAV Notifications              January 2012
-
-
    Name:  resource-change
 
    Namespace:  http://calendarserver.org/ns/
@@ -569,12 +533,16 @@
       deleted.
 
    Description:  This XML element is used in a CS:notification element
-      to describe a resource changes notification.  It can contain CS:
-      created, CS:updated, CS:deleted elements each of which indicates a
-      created, updated or deleted resource, respectively.  The DAV:href
-      element within those three elements, contain the URI of the
-      changed resource, optional information about who changed the
-      resource and when that change was made (the CS:changed-by
+      to describe a resource change notification.  It can describe a
+      change directly to a calendar object resource or to a calendar
+      collection.
+
+      When used for a calendar object resource change, it can contain
+      CS:created, CS:updated, CS:deleted elements each of which
+      indicates a created, updated or deleted resource, respectively.
+      The DAV:href element within those three elements, contain the URI
+      of the changed resource, optional information about who changed
+      the resource and when that change was made (the CS:changed-by
       element), and information specific to the nature of the change.
       Servers SHOULD coalesce resource change notifications for the same
       resource into a single notification resource.  Servers MAY
@@ -585,6 +553,14 @@
       respectively.  The DAV:prop element MAY contain a list of property
       elements to indicate which properties changed.  The CS:updated
       element can also contain zero or more CS:calendar-changes elements
+
+
+
+Daboo                                                          [Page 10]
+
+                        CalDAV User Notifications          February 2012
+
+
       to list details of the changes.  If no CS:calendar-changes element
       is present, the specific details are not provided, and clients
       will need to assume that some set of changes occurred, but the
@@ -592,32 +568,19 @@
       element can also contain zero or more CS:deleted-details elements
       to list details of the deleted resource.
 
+      When used for a calendar collection change, it can contain a CS:
+      collection-changes element.  The DAV:href element within that
+      element, contains the URI of the changed calendar collection.  The
+      DAV:prop element indicates a change to WebDAV properties on the
+      calendar collection resource.  The CS:child-created, CS:child-
+      updated, and CS:child-deleted elements each contain a positive
+      integer value indicating how many child resources were added,
+      updated or deleted in the collection, respectively.
+
    Definition:
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Daboo                                                          [Page 11]
-
-                          CalDAV Notifications              January 2012
-
-
-   <!ELEMENT resource-change (created*, updated*, deleted*)>
+   <!ELEMENT resource-change ((created*, updated*, deleted*) |
+                              collection-changes)>
      <!ELEMENT created (DAV:href, changed-by?, ANY)>
      <!ELEMENT updated (DAV:href, changed-by?, content?,
                         DAV:prop?, calendar-changes*)>
@@ -635,52 +598,38 @@
           is the principal URI or email address of the user who made
           the change. -->
 
+     <!ELEMENT collection-changes (DAV:href, DAV:prop?, child-created?,
+                                   child-updated? child-deleted?>
+       <!ELEMENT child-created CDATA>
+       <!ELEMENT child-updated CDATA>
+       <!ELEMENT child-deleted CDATA>
+       <!-- Each of the three elements above MUST contain a positive,
+            non-zero integer value indicate the total number of changes
+            being reported for the collection. -->
 
-   Example:  This is an example of the body of a notification resource
-      for changes where one resource has been created, two updated, and
-      one deleted.  One of the updated resources elements contains
-      additional information indicating which recurrence instances in
-      the iCalendar data were changed:
 
 
 
 
 
+Daboo                                                          [Page 11]
+
+                        CalDAV User Notifications          February 2012
 
 
+   Example:  This is an example of the body of a notification resource
+      for changes where one resource has been created, two updated, and
+      one deleted.  One of the updated resources elements contains
+      additional information indicating which recurrence instances in
+      the iCalendar data were changed:
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Daboo                                                          [Page 12]
-
-                          CalDAV Notifications              January 2012
-
-
    <?xml version="1.0" encoding="UTF-8"?>
    <CS:notification xmlns:D="DAV:"
                     xmlns:CS="http://calendarserver.org/ns/">
      <CS:dtstamp>2011-12-09T11:51:14-05:00</CS:dtstamp>
-     <CS:uid>0EAA94D2-CD76-417C-B278-220A4D2D0ABB</CS:uid>
      <CS:resource-changed>
        <CS:created>
-         <D:href>http://example.com/cyrus/tasks/new.ics</D:href>
+         <D:href>http://example.com/cyrus/calendar/new.ics</D:href>
          <CS:changed-by>
            <CS:first-name>Cyrus</CS:first-name>
            <CS:last-name>Daboo</CS:last-name>
@@ -696,7 +645,7 @@
          </CS:changed-by>
        </CS:updated>
        <CS:updated>
-         <D:href>http://example.com/cyrus/tasks/todo.ics</D:href>
+         <D:href>http://example.com/cyrus/calendar/todo.ics</D:href>
          <CS:changed-by>
            <CS:first-name>Eleanor</CS:first-name>
            <CS:last-name>Daboo</CS:last-name>
@@ -714,21 +663,39 @@
      </CS:resource-changed>
    </CS:notification>
 
-5.3.2.  CS:calendar-changes Element Definition
 
-   Name:  calendar-changes
 
 
 
 
+Daboo                                                          [Page 12]
+
+                        CalDAV User Notifications          February 2012
 
 
+   Example:  This example is the same as the previous one, except that
+      all the individual resource changes have been coalesced into a
+      single notification about changes to the parent calendar
+      collection:
 
-Daboo                                                          [Page 13]
-
-                          CalDAV Notifications              January 2012
+   <?xml version="1.0" encoding="UTF-8"?>
+   <CS:notification xmlns:D="DAV:"
+                    xmlns:CS="http://calendarserver.org/ns/">
+     <CS:dtstamp>2011-12-09T11:51:14-05:00</CS:dtstamp>
+     <CS:resource-changed>
+       <CS:collection-changes>
+         <D:href>http://example.com/cyrus/calendar/</D:href>
+         <CS:child-created>1</CS:child-created>
+         <CS:child-updated>2</CS:child-updated>
+         <CS:child-deleted>1</CS:child-deleted>
+       </CS:collection-changes>
+     </CS:resource-changed>
+   </CS:notification>
 
+5.3.2.  CS:calendar-changes Element Definition
 
+   Name:  calendar-changes
+
    Namespace:  http://calendarserver.org/ns/
 
    Purpose:  Indicates which portions of an calendar object resource
@@ -746,6 +713,22 @@
 
    Definition:
 
+
+
+
+
+
+
+
+
+
+
+
+Daboo                                                          [Page 13]
+
+                        CalDAV User Notifications          February 2012
+
+
        <!ELEMENT calendar-changes (recurrence+) >
 
        <!ELEMENT recurrence
@@ -777,14 +760,6 @@
        <!-- An iCalendar property parameter changed -->
 
 
-
-
-
-Daboo                                                          [Page 14]
-
-                          CalDAV Notifications              January 2012
-
-
    Example:  This example indicates that a non-recurring component, or
       the master component in a recurring component, was changed and
       that the change was to the "SUMMARY" iCalendar property.
@@ -798,6 +773,18 @@
      <CS:recurrence/>
    </CS:calendar-changes>
 
+
+
+
+
+
+
+
+Daboo                                                          [Page 14]
+
+                        CalDAV User Notifications          February 2012
+
+
    Example:  This example indicates that an instance of a recurring
       component was changed and that the change was to the "DTSTART"
       iCalendar property.
@@ -833,14 +820,6 @@
       element will be present, containing a CS:recurrence-id element
       with a value equal to the RECURRENCE-ID property value (in UTC) of
       the added component.  A CS:changes element will be present.  There
-
-
-
-Daboo                                                          [Page 15]
-
-                          CalDAV Notifications              January 2012
-
-
       will not be any CS:added or CS:removed elements.
 
    Master exists, override removed  In this case, a CS:recurrence
@@ -851,6 +830,17 @@
       present if the removed component differs from the "derived" master
       instance.
 
+
+
+
+
+
+
+Daboo                                                          [Page 15]
+
+                        CalDAV User Notifications          February 2012
+
+
    Master exists, override cancelled  In this case, a CS:recurrence
       element will be present, containing a CS:recurrence-id element
       with a value equal to the RECURRENCE-ID property value (in UTC) of
@@ -886,23 +876,27 @@
 
    Purpose:  Provides summary information about a deleted resource.
 
+   Description:  This XML element is used in a CS:deleted element to
+      describe specific summary information about a deleted resource, so
+      clients can provide a meaningful notification message to users.
 
+   Definition:
 
 
 
 
 
+
+
+
+
+
+
 Daboo                                                          [Page 16]
 
-                          CalDAV Notifications              January 2012
+                        CalDAV User Notifications          February 2012
 
 
-   Description:  This XML element is used in a CS:deleted element to
-      describe specific summary information about a deleted resource, so
-      clients can provide a meaningful notification message to users.
-
-   Definition:
-
        <!ELEMENT deleted-details (deleted-component, deleted-summary,
                                   deleted-next-instance?,
                                   deleted-had-more-instances?) >
@@ -943,21 +937,22 @@
 
    Namespace:  http://calendarserver.org/ns/
 
+   Purpose:  Allows a user to specify whether resource change
+      notifications are generated by the server.
 
+   Protected:  This property MUST NOT be protected.
 
 
 
 
+
+
+
 Daboo                                                          [Page 17]
 
-                          CalDAV Notifications              January 2012
+                        CalDAV User Notifications          February 2012
 
 
-   Purpose:  Allows a user to specify whether resource change
-      notifications are generated by the server.
-
-   Protected:  This property MUST NOT be protected.
-
    PROPFIND behavior:  This property SHOULD NOT be returned by a
       PROPFIND allprop request (as defined in Section 14.2 of
       [RFC4918]).
@@ -1001,18 +996,18 @@
 8.  Acknowledgments
 
    This specification is the result of discussions between the various
+   Apple calendar server and client teams.
 
 
+9.  References
 
-Daboo                                                          [Page 18]
-
-                          CalDAV Notifications              January 2012
 
 
-   Apple calendar server and client teams.
 
+Daboo                                                          [Page 18]
+
+                        CalDAV User Notifications          February 2012
 
-9.  References
 
 9.1.  Normative References
 
@@ -1060,5 +1055,10 @@
 
 
 
+
+
+
+
+
 Daboo                                                          [Page 19]
 

Modified: CalendarServer/trunk/doc/Extensions/caldav-notifications.xml
===================================================================
--- CalendarServer/trunk/doc/Extensions/caldav-notifications.xml	2012-02-07 20:29:11 UTC (rev 8629)
+++ CalendarServer/trunk/doc/Extensions/caldav-notifications.xml	2012-02-07 20:57:32 UTC (rev 8630)
@@ -18,7 +18,7 @@
 <?rfc private="Calendar Server Extension"?>
 <rfc ipr="none" docName='caldav-notifications-00'>
     <front>
-        <title abbrev="CalDAV Notifications">CalDAV: Server Notifications</title> 
+        <title abbrev="CalDAV User Notifications">CalDAV: Calendar User Notifications</title> 
         <author initials="C." surname="Daboo" fullname="Cyrus Daboo">
             <organization abbrev="Apple Inc.">
                 Apple Inc.
@@ -309,18 +309,21 @@
             <section title="Resource Changes Notification">
                 <t>The resource change notification is used to inform the user of new, updated or deleted resources caused by changes made by someone else (note: servers MUST NOT generate notifications to users for changes they themselves make, though the possibility of an automated process acting on behalf of a user needs to be considered). This notification can be used by clients to show changes that a user can acknowledge in their own time. When the notification is present, it can be displayed on all devices a user is accessing their data from. When the user acknowledges and dismisses the notification on one device, other devices SHOULD also remove the notification when they next synchronize the notification collection.</t>
                 <t>A new WebDAV property <xref target="CS:notify-changes">CS:notify-changes</xref> is defined for calendar collections. This allows users to enable or disable the sending of resource change notifications for the calendar and its child resources. Servers MUST allow users to set this property on a per-user basis on any calendars accessible to them. Servers MUST honor the chosen setting to enable or disable change notifications.</t>
-                <t>Servers can send notifications for calendar object resources, and ones for calendar collections.</t>
+                <t>Servers can send notifications for calendar object resources, and ones for calendar collections. Servers SHOULD coalesce notifications that refer to the same resource into a single notification resource, containing multiple CS:created, CS:updated or CS:deleted elements all with the same DAV:href child element value. Servers MAY coalesce changes to multiple resources into a change notification for the parent collection of those resources and use a CS:collection-changes element to indicate the number of individual resources that changed.</t>
                 <section title="CS:resource-change Element Definition" anchor="CS:resource-change">
                     <t>
                       <list style="hanging">
                         <t hangText="Name:">resource-change</t>
                         <t hangText="Namespace:">http://calendarserver.org/ns/</t>
                         <t hangText="Purpose:">Indicates that resources have been created, updated or deleted.</t>
-                        <t hangText="Description:">This XML element is used in a CS:notification element to describe a resource changes notification. It can contain CS:created, CS:updated, CS:deleted elements each of which indicates a created, updated or deleted resource, respectively. The DAV:href element within those three elements, contain the URI of the changed resource, optional information about who changed the resource and when that change was made (the CS:changed-by element), and information specific to the nature of the change. Servers SHOULD coalesce resource change notifications for the same resource into a single notification resource. Servers MAY coalesce resource change notifications to multiple resources into a single notification resource. The CS:updated element optionally contains CS:content and/or DAV:prop elements to indicate a change to the body of the resource or resource WebDAV properties, respectively. The DAV:prop element MAY contain a list of property elements to indicate which properties changed. The CS:updated element can also contain zero or more CS:calendar-changes elements to list details of the changes. If no CS:calendar-changes element is present, the specific details are not provided, and clients will need to assume that some set of changes occurred, but the server is unwilling to disclose the full details. The CS:deleted element can also contain zero or more CS:deleted-details elements to list details of the deleted resource.</t>
+                        <t hangText="Description:">This XML element is used in a CS:notification element to describe a resource change notification. It can describe a change directly to a calendar object resource or to a calendar collection.</t>
+                        <t>When used for a calendar object resource change, it can contain CS:created, CS:updated, CS:deleted elements each of which indicates a created, updated or deleted resource, respectively. The DAV:href element within those three elements, contain the URI of the changed resource, optional information about who changed the resource and when that change was made (the CS:changed-by element), and information specific to the nature of the change. Servers SHOULD coalesce resource change notifications for the same resource into a single notification resource. Servers MAY coalesce resource change notifications to multiple resources into a single notification resource. The CS:updated element optionally contains CS:content and/or DAV:prop elements to indicate a change to the body of the resource or resource WebDAV properties, respectively. The DAV:prop element MAY contain a list of property elements to indicate which properties changed. The CS:updated element can also contain zero or more CS:calendar-changes elements to list details of the changes. If no CS:calendar-changes element is present, the specific details are not provided, and clients will need to assume that some set of changes occurred, but the server is unwilling to disclose the full details. The CS:deleted element can also contain zero or more CS:deleted-details elements to list details of the deleted resource.</t>
+                        <t>When used for a calendar collection change, it can contain a CS:collection-changes element. The DAV:href element within that element, contains the URI of the changed calendar collection. The DAV:prop element indicates a change to WebDAV properties on the calendar collection resource. The CS:child-created, CS:child-updated, and CS:child-deleted elements each contain a positive integer value indicating how many child resources were added, updated or deleted in the collection, respectively.</t>
                         <t hangText="Definition:">
                           <figure>
                             <artwork><![CDATA[
-<!ELEMENT resource-change (created*, updated*, deleted*)>
+<!ELEMENT resource-change ((created*, updated*, deleted*) |
+                           collection-changes)>
   <!ELEMENT created (DAV:href, changed-by?, ANY)>
   <!ELEMENT updated (DAV:href, changed-by?, content?,
                      DAV:prop?, calendar-changes*)>
@@ -338,6 +341,14 @@
        is the principal URI or email address of the user who made
        the change. -->
 
+  <!ELEMENT collection-changes (DAV:href, DAV:prop?, child-created?,
+                                child-updated? child-deleted?>
+    <!ELEMENT child-created CDATA>
+    <!ELEMENT child-updated CDATA>
+    <!ELEMENT child-deleted CDATA>
+    <!-- Each of the three elements above MUST contain a positive,
+         non-zero integer value indicate the total number of changes
+         being reported for the collection. -->
 ]]></artwork>
                           </figure>
                         </t>
@@ -350,7 +361,7 @@
   <CS:dtstamp>2011-12-09T11:51:14-05:00</CS:dtstamp>
   <CS:resource-changed>
     <CS:created>
-      <D:href>http://example.com/cyrus/tasks/new.ics</D:href>
+      <D:href>http://example.com/cyrus/calendar/new.ics</D:href>
       <CS:changed-by>
         <CS:first-name>Cyrus</CS:first-name>
         <CS:last-name>Daboo</CS:last-name>
@@ -366,7 +377,7 @@
       </CS:changed-by>
     </CS:updated>
     <CS:updated>
-      <D:href>http://example.com/cyrus/tasks/todo.ics</D:href>
+      <D:href>http://example.com/cyrus/calendar/todo.ics</D:href>
       <CS:changed-by>
         <CS:first-name>Eleanor</CS:first-name>
         <CS:last-name>Daboo</CS:last-name>
@@ -385,6 +396,24 @@
 </CS:notification>]]></artwork>
                           </figure>
                         </t>
+                        <t hangText="Example:">This example is the same as the previous one, except that all the individual resource changes have been coalesced into a single notification about changes to the parent calendar collection:
+                          <figure>
+                            <artwork><![CDATA[
+<?xml version="1.0" encoding="UTF-8"?>
+<CS:notification xmlns:D="DAV:"
+                 xmlns:CS="http://calendarserver.org/ns/">
+  <CS:dtstamp>2011-12-09T11:51:14-05:00</CS:dtstamp>
+  <CS:resource-changed>
+    <CS:collection-changes>
+      <D:href>http://example.com/cyrus/calendar/</D:href>
+      <CS:child-created>1</CS:child-created>
+      <CS:child-updated>2</CS:child-updated>
+      <CS:child-deleted>1</CS:child-deleted>
+    </CS:collection-changes>
+  </CS:resource-changed>
+</CS:notification>]]></artwork>
+                          </figure>
+                        </t>
                       </list>
                     </t>
                 </section>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120207/b1947d66/attachment-0001.html>


More information about the calendarserver-changes mailing list