Code Repositories xandikos / adc16ba
Add some constants for scheduling. Jelmer Vernooń≥ 2 years ago
3 changed file(s) with 16 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
+0
-9
notes/principal.rst less more
0 Principal
1 =========
2
3 Need per principal config:
4
5 - calendar home sets
6 - addressbook home sets
7 - user address set
8 - infit settings
2929 # Feature to advertise to indicate scheduling support.
3030 FEATURE = 'calendar-auto-schedule'
3131
32 CALENDAR_USER_TYPE_INDIVIDUAL = "INDIVIDUAL" # An individual
33 CALENDAR_USER_TYPE_GROUP = "GROUP" # A group of individuals
34 CALENDAR_USER_TYPE_RESOURCE = "RESOURCE" # A physical resource
35 CALENDAR_USER_TYPE_ROOM = "ROOM" # A room resource
36 CALENDAR_USER_TYPE_UNKNOWN = "UNKNOWN" # Otherwise not known
37
38 CALENDAR_USER_TYPES = (
39 CALENDAR_USER_TYPE_INDIVIDUAL,
40 CALENDAR_USER_TYPE_GROUP,
41 CALENDAR_USER_TYPE_RESOURCE,
42 CALENDAR_USER_TYPE_ROOM,
43 CALENDAR_USER_TYPE_UNKNOWN)
44
3245
3346 class ScheduleInbox(caldav.Calendar):
3447
3952 raise NotImplementedError(self.get_schedule_inbox_url)
4053
4154 def get_schedule_outbox_url(self):
42 raise NotImplementedError(self.get_schedule_inbox_url)
55 raise NotImplementedError(self.get_schedule_outbox_url)
4356
4457 def get_calendar_user_type(self):
4558 # Default, per section 2.4.2
46 return "INDIVIDUAL"
59 return CALENDAR_USER_TYPE_INDIVIDUAL
4760
4861
4962 class ScheduleInboxURLProperty(webdav.Property):
637637
638638 def get_calendar_user_type(self):
639639 # TODO(jelmer)
640 return "INDIVIDUAL"
640 return scheduling.CALENDAR_USER_TYPE_INDIVIDUAL
641641
642642 def get_calendar_proxy_read_for(self):
643643 # TODO(jelmer)