[CalendarServer-changes] [6191] CalendarServer/trunk/twistedcaldav
source_changes at macosforge.org
source_changes at macosforge.org
Thu Aug 26 08:34:28 PDT 2010
Revision: 6191
http://trac.macosforge.org/projects/calendarserver/changeset/6191
Author: cdaboo at apple.com
Date: 2010-08-26 08:34:27 -0700 (Thu, 26 Aug 2010)
Log Message:
-----------
Directory-gateways now have a resourcetype element. Property can be multi-valued.
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/carddavxml.py
CalendarServer/trunk/twistedcaldav/directorybackedaddressbook.py
Modified: CalendarServer/trunk/twistedcaldav/carddavxml.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/carddavxml.py 2010-08-26 15:32:41 UTC (rev 6190)
+++ CalendarServer/trunk/twistedcaldav/carddavxml.py 2010-08-26 15:34:27 UTC (rev 6191)
@@ -481,14 +481,20 @@
class DirectoryGateway(CardDAVElement):
"""
- CardDAV property on a principal to indicate where the directory geatway resource is.
+ CardDAV property on a principal to indicate where the directory gateway resource is.
"""
name = "directory-gateway"
hidden = True
protected = True
- allowed_children = { (davxml.dav_namespace, "href"): (0, 1) }
+ allowed_children = { (davxml.dav_namespace, "href"): (0, None) }
+class Directory(CardDAVEmptyElement):
+ """
+ CardDAV property on a principal to indicate where the directory resource is.
+ """
+ name = "directory"
+
##
# Extensions to davxml.ResourceType
##
@@ -496,3 +502,4 @@
def _isAddressBook(self): return bool(self.childrenOfType(AddressBook))
davxml.ResourceType.isAddressBook = _isAddressBook
davxml.ResourceType.addressbook = davxml.ResourceType(davxml.Collection(), AddressBook())
+davxml.ResourceType.directory = davxml.ResourceType(davxml.Collection(), AddressBook(), Directory())
Modified: CalendarServer/trunk/twistedcaldav/directorybackedaddressbook.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/directorybackedaddressbook.py 2010-08-26 15:32:41 UTC (rev 6190)
+++ CalendarServer/trunk/twistedcaldav/directorybackedaddressbook.py 2010-08-26 15:34:27 UTC (rev 6191)
@@ -114,7 +114,7 @@
)
def resourceType(self):
- return davxml.ResourceType.addressbook
+ return davxml.ResourceType.directory
def isDirectoryBackedAddressBookCollection(self):
return True
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100826/32ffb3d5/attachment-0001.html>
More information about the calendarserver-changes
mailing list