[CalendarServer-changes] [3948] CalendarServer/trunk/twistedcaldav

source_changes at macosforge.org source_changes at macosforge.org
Wed Apr 1 12:30:08 PDT 2009


Revision: 3948
          http://trac.macosforge.org/projects/calendarserver/changeset/3948
Author:   sagen at apple.com
Date:     2009-04-01 12:30:07 -0700 (Wed, 01 Apr 2009)
Log Message:
-----------
Adds record-type DAV property for clients to differentiate between types in principal-property-search results.  Previously, the calendar-user-type property was used for this, but now groups don't have such a property.

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/customxml.py
    CalendarServer/trunk/twistedcaldav/extensions.py

Modified: CalendarServer/trunk/twistedcaldav/customxml.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/customxml.py	2009-04-01 16:59:57 UTC (rev 3947)
+++ CalendarServer/trunk/twistedcaldav/customxml.py	2009-04-01 19:30:07 UTC (rev 3948)
@@ -571,6 +571,13 @@
     namespace = calendarserver_namespace
     name = "recurrenceid"
 
+class RecordType (davxml.WebDAVTextElement):
+    """
+    Exposes the type of a record
+    """
+    name = "record-type"
+    protected = True
+
 ##
 # Extensions to davxml.ResourceType
 ##

Modified: CalendarServer/trunk/twistedcaldav/extensions.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/extensions.py	2009-04-01 16:59:57 UTC (rev 3947)
+++ CalendarServer/trunk/twistedcaldav/extensions.py	2009-04-01 19:30:07 UTC (rev 3948)
@@ -670,6 +670,7 @@
     liveProperties = tuple(SuperDAVPrincipalResource.liveProperties) + (
         (calendarserver_namespace, "expanded-group-member-set"),
         (calendarserver_namespace, "expanded-group-membership"),
+        (calendarserver_namespace, "record-type"),
     )
 
     @inlineCallbacks
@@ -698,6 +699,10 @@
                     *[davxml.HRef(p.principalURL()) for p in principals]
                 ))
 
+            elif name == "record-type":
+                returnValue(customxml.RecordType(self.record.recordType))
+
+
         result = (yield super(DAVPrincipalResource, self).readProperty(property, request))
         returnValue(result)
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20090401/83c80fc3/attachment.html>


More information about the calendarserver-changes mailing list