예제 #1
0
# draft-daboo-caldav-attachments
#

caldav_managed_attachments_compliance = ("calendar-managed-attachments", )


@registerElement
class ManagedAttachmentsServerURL(CalDAVElement):
    """
    Zero or one href elements defining the base scheme/host for attachments.
    """
    name = "managed-attachments-server-URL"

    allowed_children = {(dav_namespace, "href"): (0, 1)}


#
# Extensions to ResourceType
#


def _isCalendar(self):
    return bool(self.childrenOfType(Calendar))


ResourceType.isCalendar = _isCalendar

ResourceType.calendar = ResourceType(Collection(), Calendar())
ResourceType.scheduleInbox = ResourceType(Collection(), ScheduleInbox())
ResourceType.scheduleOutbox = ResourceType(Collection(), ScheduleOutbox())
예제 #2
0
class Directory(CardDAVEmptyElement):
    """
    CardDAV property on a principal to indicate where the directory resource is.
    """
    name = "directory"


@registerElement
class DefaultAddressBookURL(CardDAVElement):
    """
    A single href indicating which addressbook is the default.
    """
    name = "default-addressbook-URL"

    allowed_children = {(dav_namespace, "href"): (0, 1)}


##
# Extensions to ResourceType
##


def _isAddressBook(self):
    return bool(self.childrenOfType(AddressBook))


ResourceType.isAddressBook = _isAddressBook

ResourceType.addressbook = ResourceType(Collection(), AddressBook())
ResourceType.directory = ResourceType(Collection(), AddressBook(), Directory())
예제 #3
0
    name = "calendarserver-principal-search"

    allowed_children = {
        (calendarserver_namespace, "search-token"): (0, None),
        (calendarserver_namespace, "limit"): (0, 1),
        (dav_namespace, "prop"): (0, 1),
        (dav_namespace, "apply-to-principal-collection-set"): (0, 1),
    }
    allowed_attributes = {"context": False}


##
# Extensions to ResourceType
##

ResourceType.dropboxhome = ResourceType(Collection(), DropBoxHome())
ResourceType.dropbox = ResourceType(Collection(), DropBox())

ResourceType.calendarproxyread = ResourceType(Principal(), Collection(),
                                              CalendarProxyRead())
ResourceType.calendarproxywrite = ResourceType(Principal(), Collection(),
                                               CalendarProxyWrite())
ResourceType.calendarproxyreadfor = ResourceType(Principal(), Collection(),
                                                 CalendarProxyReadFor())
ResourceType.calendarproxywritefor = ResourceType(Principal(), Collection(),
                                                  CalendarProxyWriteFor())

ResourceType.timezones = ResourceType(Timezones())

ResourceType.ischeduleinbox = ResourceType(IScheduleInbox())
예제 #4
0
    namespace = calendarserver_namespace
    name = "calendarserver-principal-search"

    allowed_children = {
        (calendarserver_namespace, "search-token"): (0, None),
        (calendarserver_namespace, "limit"): (0, 1),
        (dav_namespace, "prop"): (0, 1),
        (dav_namespace, "apply-to-principal-collection-set"): (0, 1),
    }
    allowed_attributes = {"context": False}

##
# Extensions to ResourceType
##

ResourceType.dropboxhome = ResourceType(Collection(), DropBoxHome())
ResourceType.dropbox = ResourceType(Collection(), DropBox())

ResourceType.calendarproxyread = ResourceType(Principal(), Collection(), CalendarProxyRead())
ResourceType.calendarproxywrite = ResourceType(Principal(), Collection(), CalendarProxyWrite())
ResourceType.calendarproxyreadfor = ResourceType(Principal(), Collection(), CalendarProxyReadFor())
ResourceType.calendarproxywritefor = ResourceType(Principal(), Collection(), CalendarProxyWriteFor())

ResourceType.timezones = ResourceType(Timezones())

ResourceType.ischeduleinbox = ResourceType(IScheduleInbox())

ResourceType.freebusyurl = ResourceType(FreeBusyURL())

ResourceType.notification = ResourceType(Collection(), Notification())