[CalendarServer-changes] [5294] CalendarServer/trunk/txcaldav/icalendarstore.py

source_changes at macosforge.org source_changes at macosforge.org
Fri Mar 12 12:11:43 PST 2010


Revision: 5294
          http://trac.macosforge.org/projects/calendarserver/changeset/5294
Author:   wsanchez at apple.com
Date:     2010-03-12 12:11:42 -0800 (Fri, 12 Mar 2010)
Log Message:
-----------
Add ICalendarStore

Modified Paths:
--------------
    CalendarServer/trunk/txcaldav/icalendarstore.py

Modified: CalendarServer/trunk/txcaldav/icalendarstore.py
===================================================================
--- CalendarServer/trunk/txcaldav/icalendarstore.py	2010-03-12 19:42:39 UTC (rev 5293)
+++ CalendarServer/trunk/txcaldav/icalendarstore.py	2010-03-12 20:11:42 UTC (rev 5294)
@@ -39,6 +39,7 @@
     "InternalDataStoreError",
 
     # Classes
+    "ICalendarStore",
     "ICalendarHome",
     "ICalendar",
     "ICalendarObject",
@@ -125,6 +126,23 @@
 # Interfaces
 #
 
+class ICalendarStore(Interface):
+    """
+    Calendar store
+    """
+    def calendarHomeWithUID(uid, create=False):
+        """
+        Retrieve the calendar home for the principal with the given
+        C{uid}.
+
+        If C{create} is true, create the calendar home if it doesn't
+        already exist.
+
+        @return: an L{ICalendarHome} or C{None} if no such calendar
+        home exists.
+        """
+
+
 class ICalendarHome(Interface):
     """
     Calendar home
@@ -134,6 +152,14 @@
     includes both calendars owned by the principal as well as
     calendars that have been shared with and accepts by the principal.
     """
+    # FIXME: We need a principal interface somewhere, possibly part of
+    # an idirectory rework.  IDirectoryRecord may be close...
+    #def owner():
+    #    """
+    #    Retrieve the owner principal for this calendar home.
+    #    @return: a ???
+    #    """
+
     def uid():
         """
         Retrieve the unique identifier for this calendar home.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100312/361936a9/attachment.html>


More information about the calendarserver-changes mailing list