[CalendarServer-changes] [4865] CalendarServer/branches/users/cdaboo/partition-4464

source_changes at macosforge.org source_changes at macosforge.org
Tue Dec 15 18:48:42 PST 2009


Revision: 4865
          http://trac.macosforge.org/projects/calendarserver/changeset/4865
Author:   cdaboo at apple.com
Date:     2009-12-15 18:48:38 -0800 (Tue, 15 Dec 2009)
Log Message:
-----------
Merging r4464 through r4857.

Revision Links:
--------------
    http://trac.macosforge.org/projects/calendarserver/changeset/4464
    http://trac.macosforge.org/projects/calendarserver/changeset/4857

Modified Paths:
--------------
    CalendarServer/branches/users/cdaboo/partition-4464/HACKING
    CalendarServer/branches/users/cdaboo/partition-4464/README
    CalendarServer/branches/users/cdaboo/partition-4464/bin/calendarserver_export
    CalendarServer/branches/users/cdaboo/partition-4464/bin/calendarserver_manage_principals
    CalendarServer/branches/users/cdaboo/partition-4464/bin/calendarserver_warmup
    CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/provision/root.py
    CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/tap/caldav.py
    CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/tap/test/test_caldav.py
    CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/tools/fixcalendardata.py
    CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/tools/principals.py
    CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/tools/util.py
    CalendarServer/branches/users/cdaboo/partition-4464/conf/auth/augments.dtd
    CalendarServer/branches/users/cdaboo/partition-4464/conf/caldavd-apple.plist
    CalendarServer/branches/users/cdaboo/partition-4464/conf/caldavd-test.plist
    CalendarServer/branches/users/cdaboo/partition-4464/conf/caldavd.plist
    CalendarServer/branches/users/cdaboo/partition-4464/doc/RFC/draft-daboo-calendar-availability.txt
    CalendarServer/branches/users/cdaboo/partition-4464/memcacheclient.py
    CalendarServer/branches/users/cdaboo/partition-4464/run
    CalendarServer/branches/users/cdaboo/partition-4464/support/Makefile.Apple
    CalendarServer/branches/users/cdaboo/partition-4464/support/submit
    CalendarServer/branches/users/cdaboo/partition-4464/support/version.py
    CalendarServer/branches/users/cdaboo/partition-4464/test
    CalendarServer/branches/users/cdaboo/partition-4464/twext/python/plistlib.py
    CalendarServer/branches/users/cdaboo/partition-4464/twext/web2/channel/http.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/accesslog.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/accounting.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/cache.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/appleopendirectory.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/augment.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/cachingdirectory.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/calendar.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/calendaruserproxy.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/directory.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/idirectory.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/principal.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/resource.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/test/accounts.xml
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/test/augments-test-default.xml
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/test/augments-test.xml
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/test/test_augment.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/test/test_cachedirectory.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/test/test_opendirectory.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/test/test_proxyprincipalmembers.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/util.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/xmlaugmentsparser.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/xmlfile.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/extensions.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/index.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/instance.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/localization.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/method/propfind.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/method/put.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/method/put_common.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/notify.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/caldav.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/icaldiff.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/imip.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/implicit.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/itip.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/scheduler.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/test/test_icaldiff.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/sql.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/static.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/stdconfig.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/test/test_config.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/test/test_index.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/test/test_upgrade.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/test/util.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/upgrade.py

Added Paths:
-----------
    CalendarServer/branches/users/cdaboo/partition-4464/bin/icalendar_split
    CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/sidecar/test/
    CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/sidecar/test/test_task.py
    CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/tools/anonymize.py
    CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/tools/icalsplit.py
    CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/
    CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/DirectoryService-Apache.txt
    CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/DirectoryService-OpenDirectory.txt
    CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/DirectoryService-XML.txt
    CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/DirectoryServices.txt
    CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/ExtendedLogItems.txt
    CalendarServer/branches/users/cdaboo/partition-4464/doc/RFC/rfc5545-iCalendar.txt
    CalendarServer/branches/users/cdaboo/partition-4464/doc/RFC/rfc5689-Extended MKCOL.txt
    CalendarServer/branches/users/cdaboo/partition-4464/support/build.sh
    CalendarServer/branches/users/cdaboo/partition-4464/support/diffbranch
    CalendarServer/branches/users/cdaboo/partition-4464/support/mergebranch
    CalendarServer/branches/users/cdaboo/partition-4464/support/py.sh
    CalendarServer/branches/users/cdaboo/partition-4464/twext/internet/tcp.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/test/test_caldav.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/test/test_imip.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/test/test_extensions.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/test/test_stdconfig.py
    CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/test/test_validation.py

Removed Paths:
-------------
    CalendarServer/branches/users/cdaboo/partition-4464/bin/xattr
    CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/sidecar/test/test_task.py
    CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/DirectoryService-Apache.txt
    CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/DirectoryService-OpenDirectory.txt
    CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/DirectoryService-XML.txt
    CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/DirectoryServices.txt
    CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/ExtendedLogItems.txt
    CalendarServer/branches/users/cdaboo/partition-4464/doc/Developer/CalendarIndex.xcdatamodel/
    CalendarServer/branches/users/cdaboo/partition-4464/doc/Developer/twisted.cfg
    CalendarServer/branches/users/cdaboo/partition-4464/doc/Developer/twistedcaldav.cfg
    CalendarServer/branches/users/cdaboo/partition-4464/doc/RFC/rfc2445-iCalendar.txt
    CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.application.app.patch
    CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.mail.imap4.patch
    CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.python.util.patch
    CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.web2.auth.digest.patch
    CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.web2.dav.method.report.patch
    CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.web2.dav.resource.patch
    CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.web2.error.patch
    CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.web2.server.patch

Property Changed:
----------------
    CalendarServer/branches/users/cdaboo/partition-4464/HACKING
    CalendarServer/branches/users/cdaboo/partition-4464/README
    CalendarServer/branches/users/cdaboo/partition-4464/doc/Extensions/caldav-privatecomments.txt
    CalendarServer/branches/users/cdaboo/partition-4464/doc/Extensions/caldav-privatecomments.xml
    CalendarServer/branches/users/cdaboo/partition-4464/doc/Extensions/caldav-schedulingchanges.txt
    CalendarServer/branches/users/cdaboo/partition-4464/doc/Extensions/caldav-schedulingchanges.xml

Modified: CalendarServer/branches/users/cdaboo/partition-4464/HACKING
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/HACKING	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/HACKING	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,36 +1,35 @@
 Developer's Guide to Hacking the Calendar Server
 ================================================
 
-If you are interested in contributing to Darwin Calendar Server project,
-please read this document.
+If you are interested in contributing to Darwin Calendar Server
+project, please read this document.
 
+
 Participating in the Community
 ==============================
 
 Although the Calendar Server is sponsored and hosted by Apple
 Inc. (http://www.apple.com/), it's a true open-source project under an
-Apache license.  At present, the developers work for Apple, but that's
-due to the project being new and originating at Apple.  Contributions
-from other developers are welcome, and, as with all open development
-projects, may lead to "commit access" and a voice in the future of the
-project.
+Apache license.  Contributions from other developers are welcome, and,
+as with all open development projects, may lead to "commit access" and
+a voice in the future of the project.
 
 The community exists mainly through mailing lists and a Subversion
 repository. To participate, go to:
 
-    http://trac.calendarserver.org/projects/calendarserver/wiki/MailLists
+  http://trac.calendarserver.org/projects/calendarserver/wiki/MailLists
 
 and join the appropriate mailing lists.  We also use IRC, as described
 here:
 
-    http://trac.calendarserver.org/projects/calendarserver/wiki/IRC
+  http://trac.calendarserver.org/projects/calendarserver/wiki/IRC
 
 There are many ways to join the project.  One may write code, test the
 software and file bugs, write documentation, etc.
 
 The bug tracking database is here:
 
-    http://trac.calendarserver.org/projects/calendarserver/report
+  http://trac.calendarserver.org/projects/calendarserver/report
 
 To help manage the issues database, read over the issue summaries,
 looking and testing for issues that are either invalid, or are
@@ -46,70 +45,91 @@
 comment to the existing bug if appropriate and monitor it, rather than
 filing a duplicate.
 
+
 Obtaining the Code
 ==================
 
-Check out the sources using Subversion from this repository URL:
+The source code to Calendar Server is available via Subversion at this
+repository URL:
 
-    http://svn.macosforge.org/repository/calendarserver/CalendarServer/trunk/
+  http://svn.macosforge.org/repository/calendarserver/CalendarServer/trunk/
 
-It is assumed here that you are familiar with and able to use
-Subversion.  More information about Subversion, including
-documentation and download instructions, is available from:
+You can also browse the repository directly using your web browser, or
+use WebDAV clients to browse the repository, such as Mac OS X's Finder
+(`Go -> Connect to Server`).
 
-    http://subversion.tigris.org/
+A richer web interface which provides access to version history and
+logs is available via Trac here:
 
+  http://trac.calendarserver.org/browser/
+
+Most developers will want to use a full-featured Subversion client.
+More information about Subversion, including documentation and client
+download instructions, is available from the Subversion project:
+
+  http://subversion.tigris.org/
+
+
 Directory Layout
 ================
 
 A rough guide to the source tree:
 
- * doc/ - User and developer documentation, including relevant
+ * ``doc/`` - User and developer documentation, including relevant
    protocol specifications and extensions.
 
- * bin/ - Executable programs.
+ * ``bin/`` - Executable programs.
 
- * conf/ - Configuration files.
+ * ``conf/`` - Configuration files.
 
- * contrib/ - Stuff that works with the Calendar Server, but that the
-   Calendar Server does not depend on.
+ * ``calendarserver/`` - Source code for the Calendar Server
 
- * support/ - Support files of possible use to developers.
+ * ``twistedcaldav/`` - Source code for CalDAV library
 
- * twistedcaldav/ - Source code for the Calendar Server.
+ * ``twistedcaldav/`` - Source code for extensions to Twisted
 
- * lib-patches/ - Patch files which modify 3rd-party software required
-   by the Calendar Server.  In an ideal world, this would be empty.
+ * ``lib-patches/`` - Patch files which modify 3rd-party software
+   required by the Calendar Server.  In an ideal world, this would be
+   empty.
 
- * twisted/ - Files required to set up the Calendar Server as a
+ * ``twisted/`` - Files required to set up the Calendar Server as a
    Twisted service.  Twisted (http://twistedmatrix.com/) is a
    networking framework upon which the Calendar Server is built.
 
+ * ``locales/`` - Localization files.
+
+ * ``contrib/`` - Extra stuff that works with the Calendar Server, or
+   that helps integrate with other software (including operating
+   systems), but that the Calendar Server does not depend on.
+
+ * ``support/`` - Support files of possible use to developers.
+
+
 Coding Standards
 ================
 
-The vast majority of the Calendar Server is writen in the Python
+The vast majority of the Calendar Server is written in the Python
 programming language.  When writing Python code for the Calendar
 Server, please observe the following conventions.
 
 Please note that all of our code at present does not follow these
 standards, but that does not mean that one shouldn't bother to do so.
 On the contrary, code changes that do nothing but reformat code to
-comply with these standards are welcome, and code chanegs that do not
+comply with these standards are welcome, and code changes that do not
 conform to these standards are discouraged.
 
-We require Python 2.5 or higher.  It is OK to write code that does not
-work with Python versions older than 2.5.  At present, adding code
-that requires the in-development Python 2.6/3.0 or newer is not allowed.
+**We require Python 2.5 or higher.** It therefore is OK to write code
+that does not work with Python versions older than 2.5.  At present,
+adding code that requires Python 2.6/3.0 or later is not allowed.
 
 Read PEP-8:
 
-    http://www.python.org/dev/peps/pep-0008/
+  http://www.python.org/dev/peps/pep-0008/
 
 For the most part, our code should follow PEP-8, with a few exceptions
 and a few additions.  It is also useful to review the Twisted Coding
-Standard, from which we borrow some standards, though we do't follow
-it per se:
+Standard, from which we borrow some standards, though we don't
+strictly follow it:
 
    http://twistedmatrix.com/trac/browser/trunk/doc/development/policy/coding-standard.xhtml?format=raw
 
@@ -127,14 +147,18 @@
 
  * PEP-8 recommends using a backslash to break long lines up:
 
+   ::
+
      if width == 0 and height == 0 and \
-        color == 'red' and emphasis == 'strong' or \
-        highlight > 100:
-         raise ValueError("sorry, you lose")
+         color == 'red' and emphasis == 'strong' or \
+         highlight > 100:
+             raise ValueError("sorry, you lose")
 
-   Don't do that, it's gross, and the indentation for the "raise" line
+   Don't do that, it's gross, and the indentation for the ``raise`` line
    gets confusing.  Use parentheses:
 
+   ::
+
      if (
          width == 0 and
          height == 0 and
@@ -146,6 +170,8 @@
 
    Just don't do it the way PEP-8 suggests:
 
+   ::
+
      if width == 0 and height == 0 and (color == 'red' or
                                         emphasis is None):
          raise ValueError("I don't think so")
@@ -154,15 +180,19 @@
 
  * Lining up assignments is OK, within reason:
 
+   ::
+
      cars       =  4
      motorbikes =  8
      bicycles   = 18
 
 Additions:
 
- * Close parentheses and brackets such as '()', '[]' and '{}' at the
+ * Close parentheses and brackets such as ``()``, ``[]`` and ``{}`` at the
    same indent level as the line in which you opened it:
 
+   ::
+
      launchAtTarget(
          target="David",
          object=PaperWad(
@@ -175,6 +205,8 @@
  * Long lines are often due to long strings.  Try to break strings up
    into multiple lines:
 
+   ::
+
      processString(
         "This is a very long string with a lot of text. "
         "Fortunately, it is easy to break it up into parts "
@@ -182,11 +214,13 @@
      )
 
    Similarly, callables that take many arguments can be broken up into
-   multiple lines, as in the launchAtTarget example above.
+   multiple lines, as in the ``launchAtTarget()`` example above.
 
- * It's OK to break generator expressions and list comprehensions into
-   multiple lines.  For example:
+ * Breaking generator expressions and list comprehensions into
+   multiple lines can improve readability.  For example:
 
+   ::
+
      myStuff = (
          item.obtainUsefulValue()
          for item in someDataStore
@@ -197,46 +231,56 @@
    importing modules and referencing the symbol via the module unless
    it doesn't make sense to do so.  For example:
 
+   ::
+
      from subprocess import Popen
 
      process = Popen(...)
 
    Instead of:
 
+   ::
+
      import subprocess
 
      process = subprocess.Popen(...)
 
    This makes code shorter and removes the runtime indirection (which
-   can be relevant in tight loops).
+   can be relevant in tight loops). It also makes it easier to replace
+   one implementation with another.
 
- * All files should have an __all__ specification.  Put them at the
+ * All files should have an ``__all__`` specification.  Put them at the
    top of the file, before imports (PEP-8 puts them at the top, but
    after the imports), so you can see what the public symbols are for
    a file right at the top.
 
  * It is more important that symbol names are meaningful than it is
-   that they be concise.  "x" is rarely an appropriate name for a
-   variable.  "transmogrifierStatus" is more useful to the reader than
-   "trmgStat"; avoid contractions.
+   that they be concise.  ``x`` is rarely an appropriate name for a
+   variable.  ``transmogrifierStatus`` is more useful to the reader
+   than ``trmgStat``; avoid contractions.
 
- * A deferred that will be immediately returned may be called "d":
+ * A deferred that will be immediately returned may be called ``d``:
 
+   ::
+
      d = doThisAndThat()
      d.addCallback(onResult)
      d.addErrback(onError)
      return d
 
- * When using waitForDeferred() in a deferredGenerator, "x" may be
-   used to clear the deferred if the deferred result will be ignored.
+ * We prefer ``inlineCallbacks`` over ``deferredGenerator``.
+   ``inlineCallbacks`` are more readable, and we do not support Python
+   versions old enough that ``deferredGenerator`` would be necessary.
 
-     x = waitForDeferred(doThisAndThat())
-     yield x
-     x.getResult()
-     del x # Optional, but should be safe
+ * That said, avoid using ``inlineCallbacks`` when chaining deferreds
+   is straightforward, as they are more expensive.  Use
+   ``inlineCallbacks`` when necessary for keeping code maintainable,
+   such as when creating serialized deferreds in a for loop.
 
- * "_" may be used to denote unused arguments in callbacks:
+ * ``_`` may be used to denote unused callback arguments:
 
+   ::
+
      def onCompletion(_):
        # Don't care about result of doThisAndThat() in here;
        # we only care that it has completed.
@@ -246,38 +290,47 @@
      d.addCallback(onCompletion)
      return d
 
- * Do not prefix symbols with "_" unless they might otherwise be
+ * Do not prefix symbols with ``_`` unless they might otherwise be
    exposed as a public symbol: a private method name should begin with
-   "_", but a locally scoped variable should not, as there is no
-   danger of it being exposed.
+   ``_``, but a locally scoped variable should not, as there is no
+   danger of it being exposed. Locally scoped variables are already
+   private.
 
- * Per twisted convention, use camel-case (fuzzyWidget, doThisAndThat())
-   for symbol names instead of using underbars (fuzzy_widget,
-   do_this_and_that()).
+ * Per twisted convention, use camel-case (``fuzzyWidget``,
+   ``doThisAndThat()``) for symbol names instead of using underscores
+   (``fuzzy_widget``, ``do_this_and_that()``).
 
-   Use of underbars is reserved for implied dispatching and the like
-   (eg. http_FOO()).  See the Twisted Coding Standard for details.
+   Use of underscores is reserved for implied dispatching and the like
+   (eg. ``http_FOO()``).  See the Twisted Coding Standard for details.
 
- * Always use a tuple when using % formatting, even when only one
+ * Always use a tuple when using ``%``-formatting, even when only one
    value is being provided:
 
+   ::
+
      error = "Unexpected value: %s" % (value,)
 
    Do not use the non-tuple form:
 
+   ::
+
      error = "Unexpected value: %s" % value
 
-   Which is allowed in Python, but results in an programming error if
-   type(value) is tuple and len(value) != 1.
+   Which is allowed in Python, but results in a programming error if
+   ``type(value) is tuple and len(value) != 1``.
 
- * Don't use a trailing ',' at the end of a tuple if it's on one line:
+ * Don't use a trailing ``,`` at the end of a tuple if it's on one line:
 
+   ::
+
      numbers = (1,2,3,) # No
      numbers = (1,2,3)  # Yes
 
    It's desirable on multiple lines, though, as that makes re-ordering
    items easy, and avoids a diff on the last line when adding another:
 
+   ::
+
      strings = (
        "This is a string.",
        "And so is this one.",
@@ -285,9 +338,9 @@
      )
 
  * Docstrings are important.  All public symbols (anything declared in
-   __all__) must have a correct docstring.  The script
-   docs/Developer/gendocs will generate the API documentation using
-   pydoctor.  See the pydoctor documentation for details on the
+   ``__all__``) must have a correct docstring.  The script
+   ``docs/Developer/gendocs`` will generate the API documentation using
+   ``pydoctor``.  See the ``pydoctor`` documentation for details on the
    formatting:
 
      http://codespeak.net/~mwh/pydoctor/
@@ -296,23 +349,27 @@
 
  * Use PEP-257 as a guideline for docstrings.
 
- * Begin all multi-line docstrings with a 3 double quotes and a
+ * Begin all multi-line docstrings with 3 double quotes and a
    newline:
 
+   ::
+
      def doThisAndThat(...):
        """
        Do this, and that.
        ...
        """
 
+
 Best Practices
 ==============
 
  * If a callable is going to return a Deferred some of the time, it
    should probably return a deferred all of the time.  Return
-   succeed(value) instead of value if necessary.  This avoids forcing
-   the caller to check as to whether the value is a deferred or not.
-   (eg. by using maybeDeferred())
+   ``succeed(value)`` instead of ``value`` if necessary.  This avoids
+   forcing the caller to check as to whether the value is a deferred
+   or not (eg. by using ``maybeDeferred()``), which is both annoying
+   to code and potentially expensive at runtime.
 
  * Be proactive about closing files and file-like objects.
 
@@ -327,14 +384,17 @@
    it.
 
    The most reliable way to ensure that a stream is closed is to put
-   the call to `close()` in a `finally` block:
+   the call to ``close()`` in a ``finally`` block:
 
+   ::
+
      stream = file(somePath)
      try:
        ... do something with stream ...
      finally:
        stream.close()
 
+
 Testing
 =======
 
@@ -347,25 +407,28 @@
 a possible time sink for other developers, and is not looked upon
 favorably.
 
-Units tests can be run rather easily by executing the `test` script at
-the top of the Calendar Server source tree.  By default, it will run
-all of the `twistedcaldav` tests followed by all of the `twisted`
+Units tests can be run rather easily by executing the ``test`` script
+at the top of the Calendar Server source tree.  By default, it will
+run all of the Calendar Server tests followed by all of the Twisted
 tests.  You can run specific tests by specifying them as arguments
 like this:
 
+   ::
+
     ./test twistedcaldav.static
 
 All non-trivial public callables must have unit tests.  (Note we don't
 don't totally comply with this rule; that's a problem we'd like to
 fix.)  All other callables should have unit tests.
 
-Units tests are written using the `twisted.trial` framework.  Test
-module names should start with `test_`.  Twisted has some tips on
+Units tests are written using the ``twisted.trial`` framework.  Test
+module names should start with ``test_``.  Twisted has some tips on
 writing tests here:
 
-    http://twistedmatrix.com/projects/core/documentation/howto/testing.html
-    http://twistedmatrix.com/trac/browser/trunk/doc/development/policy/test-standard.xhtml?format=raw
+  http://twistedmatrix.com/projects/core/documentation/howto/testing.html
 
+  http://twistedmatrix.com/trac/browser/trunk/doc/development/policy/test-standard.xhtml?format=raw
+
 We also use CalDAVTester (which is a companion to Calendar Server in
 the same Mac OS Forge project), which performs more "black box"-type
 testing against the server to ensure compliance with the CalDAV
@@ -373,8 +436,9 @@
 and then running CalDAVTester against it.  For information about
 CalDAVTester is available here:
 
-    http://trac.calendarserver.org/projects/calendarserver/wiki/CalDAVTester
+  http://trac.calendarserver.org/projects/calendarserver/wiki/CalDAVTester
 
+
 Commit Policy
 =============
 


Property changes on: CalendarServer/branches/users/cdaboo/partition-4464/HACKING
___________________________________________________________________
Added: svn:keywords
   + Date Revision

Modified: CalendarServer/branches/users/cdaboo/partition-4464/README
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/README	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/README	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,183 +1,96 @@
-This is the core code base for a CalDAV/WebDAV/HTTP server.
+Getting Started
+===============
 
+This is the core code base for Darwin Calendar Server, which is a
+CalDAV, WebDAV, and HTTP server.
+
 For general information about the server, see:
 
-    http://www.calendarserver.org/
+  http://www.calendarserver.org/
 
 
-COPYRIGHT AND LICENSE
+Copyright and License
 =====================
 
-This software is copyright (c) 2005-2007 Apple Inc.  All
-rights reserved and is licensed under the Apache License, Version
-2.0.  The Apache License is a well-established open source license,
-providing reliable and long-lived software products through
+Copyright (c) 2005-2007 Apple Inc.  All rights reserved.
+
+This software is licensed under the Apache License, Version 2.0.  The
+Apache License is a well-established open source license, enabling
 collaborative open source software development.
 
-See the 'LICENSE' file for the full text of the license terms.
+See the "LICENSE" file for the full text of the license terms.
 
 
-QUICK START
+Quick Start
 ===========
 
-Place this source directory into an empty development directory, such
-as '~/Developer/Collaboration/CalendarServer/'.  The server requires a
-number of libraries in order to operate.  The 'run' script in the
-sources will automatically download or check out the appropriate
-libraries and build them for you:
+**WARNING:** these instructions are for running a server from the
+source tree, which is useful for development and you edit the source
+code. These are not the correct steps for running the server in
+deployment or as part of an OS install. You should **not** be using
+the ``run`` script in system startup files (eg. ``/etc/init.d``); it
+does things (like download software) that you don't want to happen in
+that context.
 
+Create an empty development directory, such as
+``~/Developer/CalendarServer/``.  Then check out or copy this source
+project into this directory.  The server requires a number of
+libraries in order to operate, which will need to be places as peers
+of the source directory.  The ``run`` script in the sources will
+automatically download or check out the appropriate libraries and
+build them for you:
+
+  ::
+
     ./run -s
 
+The result will be a set of directories, including the CalendarServer
+source directory in your original empty directory:
+
+  ::
+
+    % ls -1 ~/Developer/CalendarServer
+    CalendarServer
+    Twisted
+    ...
+
 Before you can run the server, you need to set up a configuration file
 for development.  There is a provided test configuration that you can
-use to start with:
+use to start with, called ``caldavd-test.plist``. Copy this to
+``caldavd-dev.plist``, which the server will use in development:
 
+ ::
+
     cp ./conf/caldavd-test.plist ./conf/caldavd-dev.plist
 
 You will need to choose a "directory service" to use to populate your
-server's principals (users, groups and resources).  A directory service
-provides the calendar server with information about these principals.
-Some of the directory services which are supported by the calendar
-server include:
+server's principals (users, groups and resources).  A directory
+service provides the calendar server with information about these
+principals.  Some of the directory services which are supported by the
+calendar server include:
 
- * XMLDirectoryService: this service is configurable via an XML file
-   that contains principal information.  The file
-   'conf/auth/accounts.xml' provides an example principals
+ * ``XMLDirectoryService``: this service is configurable via an XML
+   file that contains principal information.  The file
+   ``conf/auth/accounts.xml`` provides an example principals
    configuration.
 
- * OpenDirectoryService: this service uses OpenDirectory (which in
-   turn uses LDAP, Active Directory, etc.) to obtain principal
-   information.
+ * ``OpenDirectoryService``: this service uses Apple's OpenDirectory
+   client (which in turn uses LDAP, Active Directory, etc.) to obtain
+   principal information.
 
- * BasicDirectoryService and DigestDirectoryService: these services
-   are configurable using configuration files in the same formats as
-   used by the Apache HTTP server, allowing you to use the same
-   user/group setup as a separately-running Apache server.
+The ``caldavd-test.plist`` configuration uses ``XMLDirectoryService``
+by default, set up to use ``conf/auth/accounts-test.xml``.  This is a
+generally useful configuration for development and testing.
 
-   Note that the current implementation does not allow for
-   configuring resources, since Apache doesn't have resource
-   principals.
+This file contains a user principal, named ``admin``, with password
+``admin``, which is set up (in ``caldavd-test.plist``) to have
+administrative permissions on the server.
 
-The 'caldavd-test.plist' configuration uses XMLDirectoryService by
-default, set up to use 'conf/auth/accounts-test.xml'.
-
-This file contains a user principal, named "admin", with password
-"admin", which is set up with administrative permissions on the server.
-
 You can then run the server as follows:
 
-    ./run
+    ``./run``
 
-This should start up and bind to port 8008 for HTTP and 8443 for
-HTTPS.  You should then be able to connect to the server using your
-web browser (eg. Safari, Firefox) or with a CalDAV client (eg. iCal,
-Chandler).
-
-
-DAV Functionality
-====================
-
-The server implements the following specifications:
-
- * HTTP/1.1, RFC 2616
- * HTTP Authentication, RFC 2617
- * WebDAV level 1, RFC 2518
- * WebDAV Access Control Protocol, RFC 3744
- * WebDAV Quota and Size Properties, RFC 4331
- * CalDAV, draft-dusseault-caldav-15
- * CalDAV Scheduling Extensions, draft-desruisseaux-caldav-sched-02
-
-Note that while the server does support WebDAV, it does not support
-WebDAV level 2, which means it does not implement the LOCK and UNLOCK
-methods.
-
-
-PORTABILITY
-===========
-
-Portability may be limited in this release.
-
-The server requires:
- * Python 2.5
- * Zope Interface 3.1.0c1
- * PyXML 0.8.4
- * pyOpenSSL 0.6
- * python-dateutil-1.0
- * xattr 0.2 (Bob Ippolito's implementation)
- * Twisted
- * vObject
- * PyKerberos
- * PyOpenDirectory
-
-It also requires, naturally, anything these components depend on.  For
-example, pyOpenSSL requires the OpenSSL library.
-
-The server is most actively developed on Mac OS 10.5 Leopard, which is
-presently only available to Apple developers in a preview release.  (See
-http://developer.apple.com/ for more information.)  However, it is not
-intended to run solely on that platform; that just happens to be what
-the current developers are using (because we work at Apple, and are
-building it as a feature of Mac OS X Server).
-
-If you are using Tiger (Mac OS 10.4), you will need to install Python
-2.5.  See http://pythonmac.org/packages/ for installable packages.
-
-If you are using other operating systems, there may be additional
-coding work required before you can get started.
-
-WEBDAV PROPERTY STORAGE
------------------------
-
-For starters, twisted.web2.dav requires Bob Ippolito's xattr library
-to access file system extended attributes, which are used to store
-WebDAV properties.  File system extended attributes are available
-on all file systems in Mac OS X, and on some file systems on Linux
-and FreeBSD.  Another alternative is to implement a new property store
-class which does not use extended attributes. The Apache HTTP Server, for
-example, uses a database to keep track of properties on files, and this
-method works on many more platforms and file systems.
-
-Linux and FreeBSD users have had some success running our calendar
-server.  Check our bug tracker for status:
-
-    http://trac.calendarserver.org/projects/calendarserver/report/1
-
-PYTHON 2.5
-----------
-
-The Calendar Server was implemented using Python 2.5. Backporting to
-earlier Python releases might be possible, however we use a number of
-language constructs specific to 2.5 that might make that hard.
-
-GETTING INVOLVED
-================
-
-If you are interested in getting involved with development, be sure to
-visit our home page for more information:
-
-    http://www.calendarserver.org/
-
-Bug reports are welcome, and contributions such as code patches and
-documentation are appreciated.  Visit our bug tracker:
-
-    http://trac.calendarserver.org/projects/calendarserver/report/
-
-You can chat with other users and developers on IRC on channel
-#calendarserver on the irc.freenode.net server network.
-
-You can also subscribe to our mailing lists for users and developers:
-
- * calendarserver-users is for users of the Calendar Server. It's the
-   main forum for asking questions about installing, configuring and
-   administering a Calendar Server.
- 
- * calendarserver-dev is for developers. It's for engineering
-   discussions, including design directions, ways of extending the
-   server, and reviewing code.
-
- * calendarserver-changes is for change notifications to the source
-   repository.
-
-Register for mailing lists on our mailing lists page:
-
-    http://lists.macosforge.org/mailman/listinfo/
+The server should then start up and bind to port 8008 for HTTP and
+8443 for HTTPS.  You should then be able to connect to the server
+using your web browser (eg. Safari, Firefox) or with a CalDAV client
+(eg. iCal).


Property changes on: CalendarServer/branches/users/cdaboo/partition-4464/README
___________________________________________________________________
Added: svn:keywords
   + Date Revision

Modified: CalendarServer/branches/users/cdaboo/partition-4464/bin/calendarserver_export
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/bin/calendarserver_export	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/bin/calendarserver_export	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+
 ##
 # Copyright (c) 2006-2007 Apple Inc. All rights reserved.
 #
@@ -32,8 +33,12 @@
         child = Popen((run, "-p"), stdout=PIPE)
         path, stderr = child.communicate()
 
+        path = path.rstrip("\n")
+
         if child.wait() == 0:
             sys.path[0:0] = path.split(":")
 
+        sys.argv[1:1] = ["-f", join(home, "conf", "caldavd-dev.plist")]
+
     from calendarserver.tools.export import main
     main()

Modified: CalendarServer/branches/users/cdaboo/partition-4464/bin/calendarserver_manage_principals
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/bin/calendarserver_manage_principals	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/bin/calendarserver_manage_principals	2009-12-16 02:48:38 UTC (rev 4865)
@@ -16,7 +16,6 @@
 # limitations under the License.
 ##
 
-from __future__ import with_statement
 import sys
 
 #PYTHONPATH
@@ -34,8 +33,12 @@
         child = Popen((run, "-p"), stdout=PIPE)
         path, stderr = child.communicate()
 
+        path = path.rstrip("\n")
+
         if child.wait() == 0:
             sys.path[0:0] = path.split(":")
 
+        sys.argv[1:1] = ["-f", join(home, "conf", "caldavd-dev.plist")]
+
     from calendarserver.tools.principals import main
     main()

Modified: CalendarServer/branches/users/cdaboo/partition-4464/bin/calendarserver_warmup
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/bin/calendarserver_warmup	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/bin/calendarserver_warmup	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+
 ##
 # Copyright (c) 2006-2007 Apple Inc. All rights reserved.
 #
@@ -32,8 +33,12 @@
         child = Popen((run, "-p"), stdout=PIPE)
         path, stderr = child.communicate()
 
+        path = path.rstrip("\n")
+
         if child.wait() == 0:
             sys.path[0:0] = path.split(":")
 
+        sys.argv[1:1] = ["-f", join(home, "conf", "caldavd-dev.plist")]
+
     from calendarserver.tools.warmup import main
     main()

Copied: CalendarServer/branches/users/cdaboo/partition-4464/bin/icalendar_split (from rev 4858, CalendarServer/trunk/bin/icalendar_split)
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/bin/icalendar_split	                        (rev 0)
+++ CalendarServer/branches/users/cdaboo/partition-4464/bin/icalendar_split	2009-12-16 02:48:38 UTC (rev 4865)
@@ -0,0 +1,41 @@
+#!/usr/bin/env python
+##
+# Copyright (c) 2006-2007 Apple Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##
+
+import sys
+
+#PYTHONPATH
+
+if __name__ == "__main__":
+    if "PYTHONPATH" in globals():
+        sys.path.insert(0, PYTHONPATH)
+    else:
+        from os.path import dirname, abspath, join
+        from subprocess import Popen, PIPE
+
+        home = dirname(dirname(abspath(__file__)))
+        run = join(home, "run")
+
+        child = Popen((run, "-p"), stdout=PIPE)
+        path, stderr = child.communicate()
+
+        path = path.rstrip("\n")
+
+        if child.wait() == 0:
+            sys.path[0:0] = path.split(":")
+
+    from calendarserver.tools.icalsplit import main
+    main()

Deleted: CalendarServer/branches/users/cdaboo/partition-4464/bin/xattr
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/bin/xattr	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/bin/xattr	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,202 +0,0 @@
-#!/usr/bin/env python
-
-##
-# Copyright (c) 2007 Apple Inc.
-#
-# This is the MIT license.  This software may also be distributed under the
-# same terms as Python (the PSF license).
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-# IN THE SOFTWARE.
-##
-
-import sys
-import os
-import getopt
-import xattr
-import zlib
-
-def usage(e=None):
-    if e:
-        print e
-        print ""
-
-    name = os.path.basename(sys.argv[0])
-    print "usage: %s [-lz] file [file ...]" % (name,)
-    print "       %s -p [-lz] attr_name file [file ...]" % (name,)
-    print "       %s -w [-z] attr_name attr_value file [file ...]" % (name,)
-    print "       %s -d attr_name file [file ...]" % (name,)
-    print ""
-    print "The first form lists the names of all xattrs on the given file(s)."
-    print "The second form (-p) prints the value of the xattr attr_name."
-    print "The third form (-w) sets the value of the xattr attr_name to attr_value."
-    print "The fourth form (-d) deletes the xattr attr_name."
-    print ""
-    print "options:"
-    print "  -h: print this help"
-    print "  -l: print long format (attr_name: attr_value)"
-    print "  -z: compress or decompress (if compressed) attribute value in zip format"
-
-    if e:
-        sys.exit(64)
-    else:
-        sys.exit(0)
-
-class NullsInString(Exception):
-    """Nulls in string."""
-
-_FILTER=''.join([(len(repr(chr(x)))==3) and chr(x) or '.' for x in range(256)])
-
-def _dump(src, length=16):
-    result=[]
-    for i in xrange(0, len(src), length):
-        s = src[i:i+length]
-        hexa = ' '.join(["%02X"%ord(x) for x in s])
-        printable = s.translate(_FILTER)
-        result.append("%04X   %-*s   %s\n" % (i, length*3, hexa, printable))
-    return ''.join(result)
-
-def main():
-    try:
-        (optargs, args) = getopt.getopt(sys.argv[1:], "hlpwdz", ["help"])
-    except getopt.GetoptError, e:
-        usage(e)
-
-    attr_name   = None
-    long_format = False
-    read        = False
-    write       = False
-    delete      = False
-    compress    = lambda x: x
-    decompress  = compress
-    status      = 0
-
-    for opt, arg in optargs:
-        if opt in ("-h", "--help"):
-            usage()
-        elif opt == "-l":
-            long_format = True
-        elif opt == "-p":
-            read = True
-            if write or delete:
-                usage("-p not allowed with -w or -d")
-        elif opt == "-w":
-            write = True
-            if read or delete:
-                usage("-w not allowed with -p or -d")
-        elif opt == "-d":
-            delete = True
-            if read or write:
-                usage("-d not allowed with -p or -w")
-        elif opt == "-z":
-            compress   = zlib.compress
-            decompress = zlib.decompress
-
-    if write or delete:
-        if long_format:
-            usage("-l not allowed with -w or -p")
-
-    if read or write or delete:
-        if not args:
-            usage("No attr_name")
-        attr_name = args.pop(0)
-
-    if write:
-        if not args:
-            usage("No attr_value")
-        attr_value = args.pop(0)
-
-    if len(args) > 1:
-        multiple_files = True
-    else:
-        multiple_files = False
-
-    for filename in args:
-        def onError(e):
-            if not os.path.exists(filename):
-                sys.stderr.write("No such file: %s\n" % (filename,))
-            else:
-                sys.stderr.write(str(e) + "\n")
-            status = 1
-
-        try:
-            attrs = xattr.xattr(filename)
-        except (IOError, OSError), e:
-            onError(e)
-            continue
-
-        if write:
-            try:
-                attrs[attr_name] = compress(attr_value)
-            except (IOError, OSError), e:
-                onError(e)
-                continue
-
-        elif delete:
-            try:
-                del attrs[attr_name]
-            except (IOError, OSError), e:
-                onError(e)
-                continue
-            except KeyError:
-                onError("No such xattr: %s" % (attr_name,))
-                continue
-
-        else:
-            try:
-                if read:
-                    attr_names = (attr_name,)
-                else:
-                    attr_names = attrs.keys()
-            except (IOError, OSError), e:
-                onError(e)
-                continue
-
-            if multiple_files:
-                file_prefix = "%s: " % (filename,)
-            else:
-                file_prefix = ""
-
-            for attr_name in attr_names:
-                try:
-                    try:
-                        attr_value = decompress(attrs[attr_name])
-                    except zlib.error:
-                        attr_value = attrs[attr_name]
-                except KeyError:
-                    onError("%sNo such xattr: %s" % (file_prefix, attr_name))
-                    continue
-
-                if long_format:
-                    try:
-                        if attr_value.find('\0') >= 0:
-                            raise NullsInString;
-                        print "".join((file_prefix, "%s: " % (attr_name,), attr_value))
-                    except (UnicodeDecodeError, NullsInString):
-                        print "".join((file_prefix, "%s:" % (attr_name,)))
-                        print _dump(attr_value)
-                else:
-                    if read:
-                        print "".join((file_prefix, attr_value))
-                    else:
-                        print "".join((file_prefix, attr_name))
-
-    sys.exit(status)
-
-if __name__ == "__main__":
-    main()

Modified: CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/provision/root.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/provision/root.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/provision/root.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -162,7 +162,10 @@
         for filter in self.contentFilters:
             request.addResponseFilter(filter[0], atEnd=filter[1])
 
-        # Examine cookies for wiki auth token
+        # Examine cookies for wiki auth token; if there, ask the paired wiki
+        # server for the corresponding record name.  If that maps to a
+        # principal, assign that to authnuser.
+
         wikiConfig = config.Authentication.Wiki
         cookies = request.headers.getHeader("cookie")
         if wikiConfig["Enabled"] and cookies is not None:
@@ -178,62 +181,53 @@
                 proxy = Proxy(wikiConfig["URL"])
                 try:
                     username = (yield proxy.callRemote(wikiConfig["UserMethod"], token))
+                except Exception, e:
+                    log.error("Failed to look up wiki token (%s)" % (e,))
+                    username = None
+
+                if username is not None:
                     log.debug("Wiki lookup returned user: %s" % (username,))
+                    principal = None
                     directory = request.site.resource.getDirectory()
                     record = directory.recordWithShortName("users", username)
-                    if record is None:
-                        raise HTTPError(StatusResponse(
-                            responsecode.FORBIDDEN,
-                            "The username (%s) corresponding to your sessionID was not found by calendar server." % (username,)
-                        ))
-                    for collection in self.principalCollections():
-                        principal = collection.principalForRecord(record)
-                        if principal is not None:
-                            break
-                    else:
-                        # Can't find principal
-                        raise HTTPError(StatusResponse(
-                            responsecode.FORBIDDEN,
-                            "The principal corresponding to your username (%s) was not found by calendar server." % (username,)
-                        ))
+                    log.debug("Wiki user record for user %s : %s" % (username, record))
+                    if record:
+                        # Note: record will be None if it's a /Local/Default user
+                        for collection in self.principalCollections():
+                            principal = collection.principalForRecord(record)
+                            if principal is not None:
+                                break
 
-                    request.authzUser = request.authnUser = davxml.Principal(
-                        davxml.HRef.fromString("/principals/__uids__/%s/" % (record.guid,))
-                    )
+                    if principal:
+                        log.debug("Found wiki principal and setting authnuser and authzuser")
+                        request.authzUser = request.authnUser = davxml.Principal(
+                            davxml.HRef.fromString("/principals/__uids__/%s/" % (record.guid,))
+                        )
 
-                    if not isinstance(principal, DirectoryCalendarPrincipalResource):
-                        # Not enabled for calendaring, so use the wiki principal as authzUser if the resource is within
-                        # a wiki.  Examining the request path to determine this:
-                        path = request.prepath
-                        if len(path) > 2 and path[0] in ("principals", "calendars"):
-                            wikiName = None
-                            if path[1] == "wikis":
-                                wikiName = path[2]
-                            elif path[1] == "__uids__" and path[2].startswith("wiki-"):
-                                wikiName = path[2][5:]
-                            if wikiName:
-                                log.debug("Using %s wiki as authzUser instead of %s" % (wikiName, username))
-                                request.authzUser = davxml.Principal(
-                                    davxml.HRef.fromString("/principals/wikis/%s/" % (wikiName,))
-                                )
+        # We don't want the /inbox resource to pay attention to SACLs because
+        # we just want it to use the hard-coded ACL for the imip reply user.
+        # The /timezones resource is used by the wiki web calendar, so open
+        # up that resource.
+        if segments[0] in ("inbox", "timezones"):
+            request.checkedSACL = True
 
-                    child = (yield super(RootResource, self).locateChild(request, segments))
-                    returnValue(child)
+        elif (len(segments) > 2 and (segments[1] == "wikis" or
+            (segments[1] == "__uids__" and segments[2].startswith("wiki-")))):
 
-                # FIXME: should catch something more specific than Exception
-                except Exception, e:
-                    log.warn("Wiki lookup returned ERROR: %s" % (e,))
-                    raise HTTPError(StatusResponse(
-                        responsecode.FORBIDDEN,
-                        "Your sessionID was rejected by the authenticating wiki server."
-                    ))
-
-
-        # We don't want the /inbox resource to pay attention to SACLs because
-        # we just want it to use the hard-coded ACL for the imip reply user
-        if segments[0] == "inbox":
+            # This is a wiki-related resource. SACLs are not checked.
             request.checkedSACL = True
 
+            # The authzuser value is set to that of the wiki principal.
+            wikiName = None
+            if segments[1] == "wikis":
+                wikiName = segments[2]
+            else:
+                wikiName = segments[2][5:]
+            if wikiName:
+                request.authzUser = davxml.Principal(
+                    davxml.HRef.fromString("/principals/wikis/%s/" % (wikiName,))
+                )
+
         elif self.useSacls and not hasattr(request, "checkedSACL") and not hasattr(request, "checkingSACL"):
             yield self.checkSacl(request)
 

Deleted: CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/sidecar/test/test_task.py
===================================================================
--- CalendarServer/trunk/calendarserver/sidecar/test/test_task.py	2009-12-11 19:55:47 UTC (rev 4858)
+++ CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/sidecar/test/test_task.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,216 +0,0 @@
-##
-# Copyright (c) 2009 Apple Inc. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-##
-
-import os, zlib
-
-from calendarserver.sidecar.task import CalDAVTaskServiceMaker, CalDAVTaskOptions, Task
-from os.path import dirname, abspath
-from twext.python.plistlib import writePlist
-from twisted.python.usage import Options, UsageError
-from twistedcaldav.config import config, ConfigDict, _mergeData
-from twistedcaldav.stdconfig import DEFAULT_CONFIG, DEFAULT_CONFIG_FILE
-from twistedcaldav.test.util import TestCase
-from twisted.internet.defer import inlineCallbacks
-
-import memcacheclient
-
-# Points to top of source tree.
-sourceRoot = dirname(dirname(dirname(dirname(abspath(__file__)))))
-
-
-class CalDAVTaskServiceTest(TestCase):
-    """
-    Test various parameters of our usage.Options subclass
-    """
-    def setUp(self):
-        """
-        Set up our options object, giving it a parent, and forcing the
-        global config to be loaded from defaults.
-        """
-        TestCase.setUp(self)
-        self.options = CalDAVTaskOptions()
-        self.options.parent = Options()
-        self.options.parent["uid"] = 0
-        self.options.parent["gid"] = 0
-        self.options.parent["nodaemon"] = False
-
-        self.config = ConfigDict(DEFAULT_CONFIG)
-
-        accountsFile = os.path.join(sourceRoot, "twistedcaldav/directory/test/accounts.xml")
-        self.config["DirectoryService"] = {
-            "params": {"xmlFile": accountsFile},
-            "type": "twistedcaldav.directory.xmlfile.XMLDirectoryService"
-        }
-
-        self.config.DocumentRoot   = self.mktemp()
-        self.config.DataRoot       = self.mktemp()
-        self.config.ProcessType    = "Single"
-        self.config.Memcached.ClientEnabled = False
-        self.config.Memcached.ServerEnabled = False
-
-
-        pemFile = os.path.join(sourceRoot, "twistedcaldav/test/data/server.pem")
-        self.config.SSLPrivateKey = pemFile
-        self.config.SSLCertificate = pemFile
-
-        os.mkdir(self.config.DocumentRoot)
-        os.mkdir(self.config.DataRoot)
-
-        self.configFile = self.mktemp()
-
-        self.writeConfig()
-
-    def writeConfig(self):
-        """
-        Flush self.config out to self.configFile
-        """
-        writePlist(self.config, self.configFile)
-
-    def tearDown(self):
-        config.setDefaults(DEFAULT_CONFIG)
-        config.reload()
-
-    def makeService(self):
-        self.options.parseOptions(["-f", self.configFile])
-        return CalDAVTaskServiceMaker().makeService(self.options)
-
-    @inlineCallbacks
-    def test_taskService(self):
-        service = self.makeService()
-
-        structure = {
-            "calendars" : {
-                "__uids__" : {
-                    "64" : {
-                        "23" : {
-                            "6423F94A-6B76-4A3A-815B-D52CFD77935D" : {
-                                "calendar": {
-                                    "@xattrs" :
-                                    {
-                                        "WebDAV:{DAV:}resourcetype" : zlib.compress("<?xml version='1.0' encoding='UTF-8'?>\r\n<resourcetype xmlns='DAV:'>\r\n<collection/>\r\n<calendar xmlns='urn:ietf:params:xml:ns:caldav'/>\r\n</resourcetype>\r\n"),
-                                    },
-                                },
-                                "inbox": {
-                                    "unprocessed.ics": {
-                                        "@contents" : unprocessed,
-                                    }
-                                },
-                            }
-                        }
-                    }
-                }
-            },
-        }
-
-        self.createHierarchy(structure, root=self.config.DocumentRoot)
-
-        structure = {
-            "tasks" : {
-                "incoming" : { },
-                "processing" : {
-                    "scheduleinboxes.task" : {
-                        "@contents" : os.path.join(
-                            self.config.DocumentRoot,
-                            "calendars",
-                            "__uids__",
-                            "64",
-                            "23",
-                            "6423F94A-6B76-4A3A-815B-D52CFD77935D",
-                            "inbox",
-                            "unprocessed.ics"
-                        ),
-                    },
-                },
-            },
-        }
-
-        self.createHierarchy(structure, root=self.config.DataRoot)
-
-        task = Task(service, "scheduleinboxes.task")
-        yield task.run()
-
-        # Aftwards we want to see a .ics file in calendar and inbox
-        structure = {
-            "calendars" : {
-                "__uids__" : {
-                    "64" : {
-                        "23" : {
-                            "6423F94A-6B76-4A3A-815B-D52CFD77935D" : {
-                                "calendar": {
-                                    ".db.sqlite" : {
-                                        "@contents" : None,
-                                    },
-                                    "*.ics": {
-                                        "@contents" : None,
-                                    },
-                                },
-                                "inbox": {
-                                    ".db.sqlite" : {
-                                        "@contents" : None,
-                                    },
-                                    "*.ics": {
-                                        "@contents" : None,
-                                    },
-                                },
-                            }
-                        }
-                    }
-                }
-            },
-        }
-        self.assertTrue(self.verifyHierarchy(self.config.DocumentRoot, structure))
-
-unprocessed = """BEGIN:VCALENDAR
-VERSION:2.0
-CALSCALE:GREGORIAN
-METHOD:REQUEST
-PRODID:-//Apple Inc.//iCal 4.0.1//EN
-BEGIN:VTIMEZONE
-TZID:US/Pacific
-BEGIN:STANDARD
-DTSTART:20071104T020000
-RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
-TZNAME:PST
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0800
-END:STANDARD
-BEGIN:DAYLIGHT
-DTSTART:20070311T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
-TZNAME:PDT
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0700
-END:DAYLIGHT
-END:VTIMEZONE
-BEGIN:VEVENT
-UID:A40F4892-B40F-4C0F-B8D0-F4EB2C97F4B9
-DTSTART;TZID=US/Pacific:20091209T120000
-DTEND;TZID=US/Pacific:20091209T130000
-ATTENDEE;CN=Wilfredo Sanchez;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=N
- EEDS-ACTION;EMAIL=wsanchez at example.com;RSVP=TRUE:/principals/__uids__/6423F94
- A-6B76-4A3A-815B-D52CFD77935D/
-ATTENDEE;CUTYPE=INDIVIDUAL;CN=Morgen Sagen;PARTSTAT=ACCEPTED:mailto:sagen at exam
- ple.com
-CREATED:20091209T183541Z
-DTSTAMP:20091209T183612Z
-ORGANIZER;CN=Morgen Sagen:mailto:sagen at example.com
-SEQUENCE:6
-SUMMARY:Test
-TRANSP:OPAQUE
-END:VEVENT
-END:VCALENDAR
-""".replace("\n", "\r\n")
-

Copied: CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/sidecar/test/test_task.py (from rev 4858, CalendarServer/trunk/calendarserver/sidecar/test/test_task.py)
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/sidecar/test/test_task.py	                        (rev 0)
+++ CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/sidecar/test/test_task.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -0,0 +1,216 @@
+##
+# Copyright (c) 2009 Apple Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##
+
+import os, zlib
+
+from calendarserver.sidecar.task import CalDAVTaskServiceMaker, CalDAVTaskOptions, Task
+from os.path import dirname, abspath
+from twext.python.plistlib import writePlist
+from twisted.python.usage import Options, UsageError
+from twistedcaldav.config import config, ConfigDict, _mergeData
+from twistedcaldav.stdconfig import DEFAULT_CONFIG, DEFAULT_CONFIG_FILE
+from twistedcaldav.test.util import TestCase
+from twisted.internet.defer import inlineCallbacks
+
+import memcacheclient
+
+# Points to top of source tree.
+sourceRoot = dirname(dirname(dirname(dirname(abspath(__file__)))))
+
+
+class CalDAVTaskServiceTest(TestCase):
+    """
+    Test various parameters of our usage.Options subclass
+    """
+    def setUp(self):
+        """
+        Set up our options object, giving it a parent, and forcing the
+        global config to be loaded from defaults.
+        """
+        TestCase.setUp(self)
+        self.options = CalDAVTaskOptions()
+        self.options.parent = Options()
+        self.options.parent["uid"] = 0
+        self.options.parent["gid"] = 0
+        self.options.parent["nodaemon"] = False
+
+        self.config = ConfigDict(DEFAULT_CONFIG)
+
+        accountsFile = os.path.join(sourceRoot, "twistedcaldav/directory/test/accounts.xml")
+        self.config["DirectoryService"] = {
+            "params": {"xmlFile": accountsFile},
+            "type": "twistedcaldav.directory.xmlfile.XMLDirectoryService"
+        }
+
+        self.config.DocumentRoot   = self.mktemp()
+        self.config.DataRoot       = self.mktemp()
+        self.config.ProcessType    = "Single"
+        self.config.Memcached.ClientEnabled = False
+        self.config.Memcached.ServerEnabled = False
+
+
+        pemFile = os.path.join(sourceRoot, "twistedcaldav/test/data/server.pem")
+        self.config.SSLPrivateKey = pemFile
+        self.config.SSLCertificate = pemFile
+
+        os.mkdir(self.config.DocumentRoot)
+        os.mkdir(self.config.DataRoot)
+
+        self.configFile = self.mktemp()
+
+        self.writeConfig()
+
+    def writeConfig(self):
+        """
+        Flush self.config out to self.configFile
+        """
+        writePlist(self.config, self.configFile)
+
+    def tearDown(self):
+        config.setDefaults(DEFAULT_CONFIG)
+        config.reload()
+
+    def makeService(self):
+        self.options.parseOptions(["-f", self.configFile])
+        return CalDAVTaskServiceMaker().makeService(self.options)
+
+    @inlineCallbacks
+    def test_taskService(self):
+        service = self.makeService()
+
+        structure = {
+            "calendars" : {
+                "__uids__" : {
+                    "64" : {
+                        "23" : {
+                            "6423F94A-6B76-4A3A-815B-D52CFD77935D" : {
+                                "calendar": {
+                                    "@xattrs" :
+                                    {
+                                        "WebDAV:{DAV:}resourcetype" : zlib.compress("<?xml version='1.0' encoding='UTF-8'?>\r\n<resourcetype xmlns='DAV:'>\r\n<collection/>\r\n<calendar xmlns='urn:ietf:params:xml:ns:caldav'/>\r\n</resourcetype>\r\n"),
+                                    },
+                                },
+                                "inbox": {
+                                    "unprocessed.ics": {
+                                        "@contents" : unprocessed,
+                                    }
+                                },
+                            }
+                        }
+                    }
+                }
+            },
+        }
+
+        self.createHierarchy(structure, root=self.config.DocumentRoot)
+
+        structure = {
+            "tasks" : {
+                "incoming" : { },
+                "processing" : {
+                    "scheduleinboxes.task" : {
+                        "@contents" : os.path.join(
+                            self.config.DocumentRoot,
+                            "calendars",
+                            "__uids__",
+                            "64",
+                            "23",
+                            "6423F94A-6B76-4A3A-815B-D52CFD77935D",
+                            "inbox",
+                            "unprocessed.ics"
+                        ),
+                    },
+                },
+            },
+        }
+
+        self.createHierarchy(structure, root=self.config.DataRoot)
+
+        task = Task(service, "scheduleinboxes.task")
+        yield task.run()
+
+        # Aftwards we want to see a .ics file in calendar and inbox
+        structure = {
+            "calendars" : {
+                "__uids__" : {
+                    "64" : {
+                        "23" : {
+                            "6423F94A-6B76-4A3A-815B-D52CFD77935D" : {
+                                "calendar": {
+                                    ".db.sqlite" : {
+                                        "@contents" : None,
+                                    },
+                                    "*.ics": {
+                                        "@contents" : None,
+                                    },
+                                },
+                                "inbox": {
+                                    ".db.sqlite" : {
+                                        "@contents" : None,
+                                    },
+                                    "*.ics": {
+                                        "@contents" : None,
+                                    },
+                                },
+                            }
+                        }
+                    }
+                }
+            },
+        }
+        self.assertTrue(self.verifyHierarchy(self.config.DocumentRoot, structure))
+
+unprocessed = """BEGIN:VCALENDAR
+VERSION:2.0
+CALSCALE:GREGORIAN
+METHOD:REQUEST
+PRODID:-//Apple Inc.//iCal 4.0.1//EN
+BEGIN:VTIMEZONE
+TZID:US/Pacific
+BEGIN:STANDARD
+DTSTART:20071104T020000
+RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
+TZNAME:PST
+TZOFFSETFROM:-0700
+TZOFFSETTO:-0800
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART:20070311T020000
+RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
+TZNAME:PDT
+TZOFFSETFROM:-0800
+TZOFFSETTO:-0700
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:A40F4892-B40F-4C0F-B8D0-F4EB2C97F4B9
+DTSTART;TZID=US/Pacific:20091209T120000
+DTEND;TZID=US/Pacific:20091209T130000
+ATTENDEE;CN=Wilfredo Sanchez;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=N
+ EEDS-ACTION;EMAIL=wsanchez at example.com;RSVP=TRUE:/principals/__uids__/6423F94
+ A-6B76-4A3A-815B-D52CFD77935D/
+ATTENDEE;CUTYPE=INDIVIDUAL;CN=Morgen Sagen;PARTSTAT=ACCEPTED:mailto:sagen at exam
+ ple.com
+CREATED:20091209T183541Z
+DTSTAMP:20091209T183612Z
+ORGANIZER;CN=Morgen Sagen:mailto:sagen at example.com
+SEQUENCE:6
+SUMMARY:Test
+TRANSP:OPAQUE
+END:VEVENT
+END:VCALENDAR
+""".replace("\n", "\r\n")
+

Modified: CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/tap/caldav.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/tap/caldav.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/tap/caldav.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,3 +1,4 @@
+# -*- test-case-name: calendarserver.tap.test.test_caldav -*-
 ##
 # Copyright (c) 2005-2009 Apple Inc. All rights reserved.
 #
@@ -24,9 +25,8 @@
 import socket
 import stat
 import sys
-from time import sleep
+from time import sleep, time
 
-from tempfile import mkstemp
 from subprocess import Popen, PIPE
 from pwd import getpwnam, getpwuid
 from grp import getgrnam
@@ -40,11 +40,11 @@
 from twisted.python.reflect import namedClass
 from twisted.plugin import IPlugin
 from twisted.internet import reactor
-from twisted.internet.reactor import callLater
+from twisted.internet.reactor import callLater, spawnProcess
 from twisted.internet.process import ProcessExitedAlready
 from twisted.internet.protocol import Protocol, Factory
 from twisted.internet.address import IPv4Address
-from twisted.application.internet import TCPServer, SSLServer, UNIXServer
+from twisted.application.internet import TCPServer, UNIXServer
 from twisted.application.service import Service, MultiService, IServiceMaker
 from twisted.scripts.mktap import getid
 from twisted.runner import procmon
@@ -52,15 +52,15 @@
 from twisted.web2.dav import auth
 from twisted.web2.auth.basic import BasicCredentialFactory
 from twisted.web2.server import Site
-from twisted.web2.channel import HTTPFactory
 from twisted.web2.static import File as FileResource
-from twisted.web2.http import Request, RedirectResponse
 
 from twext.internet.ssl import ChainingOpenSSLContextFactory
-from twext.web2.channel.http import HTTP503LoggingFactory
+from twext.internet.tcp import MaxAcceptTCPServer, MaxAcceptSSLServer
+from twext.web2.channel.http import LimitingHTTPFactory, SSLRedirectRequest
 
 try:
     from twistedcaldav.version import version
+    version                     # pacify pyflakes
 except ImportError:
     sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "support"))
     from version import version as getVersion
@@ -97,6 +97,7 @@
 
 try:
     from twistedcaldav.authkerb import NegotiateCredentialFactory
+    NegotiateCredentialFactory  # pacify pyflakes
 except ImportError:
     NegotiateCredentialFactory = None
 
@@ -341,6 +342,30 @@
             )
 
 
+
+class GroupOwnedUNIXServer(UNIXServer, object):
+    """
+    A L{GroupOwnedUNIXServer} is a L{UNIXServer} which changes the group
+    ownership of its socket immediately after binding its port.
+
+    @ivar gid: the group ID which should own the socket after it is bound.
+    """
+    def __init__(self, gid, *args, **kw):
+        super(GroupOwnedUNIXServer, self).__init__(*args, **kw)
+        self.gid = gid
+
+
+    def privilegedStartService(self):
+        """
+        Bind the UNIX socket and then change its group.
+        """
+        super(GroupOwnedUNIXServer, self).privilegedStartService()
+        fileName = self._port.port # Unfortunately, there's no public way to
+                                   # access this. -glyph
+        os.chown(fileName, os.getuid(), self.gid)
+
+
+
 class CalDAVServiceMaker (LoggingMixIn):
     implements(IPlugin, IServiceMaker)
 
@@ -375,7 +400,7 @@
         if not serviceMethod:
             raise UsageError(
                 "Unknown server type %s. "
-                "Please choose: Master, Slave, Single or Combined"
+                "Please choose: Slave, Single or Combined"
                 % (config.ProcessType,)
             )
         else:
@@ -747,17 +772,7 @@
         self.log_info("Setting up service")
 
         if config.ProcessType == "Slave":
-            if (
-                config.MultiProcess.ProcessCount > 1 and
-                config.MultiProcess.LoadBalancer.Enabled
-            ):
-                realRoot = PDClientAddressWrapper(
-                    logWrapper,
-                    config.PythonDirector.ControlSocket,
-                    directory,
-                )
-            else:
-                realRoot = logWrapper
+            realRoot = logWrapper
 
             if config.ControlSocket:
                 mode = "AF_UNIX"
@@ -775,7 +790,7 @@
             self.deleteStaleSocketFiles()
 
             realRoot = logWrapper
-            
+
             logObserver = RotatingFileAccessLoggingObserver(
                 config.AccessLogFile,
             )
@@ -786,44 +801,36 @@
 
         site = Site(realRoot)
 
-        channel = HTTP503LoggingFactory(
+        httpFactory = LimitingHTTPFactory(
             site,
-            maxRequests = config.MaxRequests,
-            retryAfter = config.HTTPRetryAfter,
-            betweenRequestsTimeOut = config.IdleConnectionTimeOut,
-            vary = True,
+            maxRequests=config.MaxRequests,
+            maxAccepts=config.MaxAccepts,
+            betweenRequestsTimeOut=config.IdleConnectionTimeOut,
+            vary=True,
         )
+        if config.RedirectHTTPToHTTPS:
+            redirectFactory = LimitingHTTPFactory(
+                SSLRedirectRequest,
+                maxRequests=config.MaxRequests,
+                maxAccepts=config.MaxAccepts,
+                betweenRequestsTimeOut=config.IdleConnectionTimeOut,
+                vary=True,
+            )
 
-        def updateChannel(configDict):
-            channel.maxRequests = configDict.MaxRequests
-            channel.retryAfter = configDict.HTTPRetryAfter
+        def updateFactory(configDict):
+            httpFactory.maxRequests = configDict.MaxRequests
+            httpFactory.maxAccepts = configDict.MaxAccepts
+            if config.RedirectHTTPToHTTPS:
+                redirectFactory.maxRequests = configDict.MaxRequests
+                redirectFactory.maxAccepts = configDict.MaxAccepts
 
-        config.addPostUpdateHook(updateChannel)
+        config.addPostUpdateHook(updateFactory)
 
-        if not config.BindAddresses:
-            config.BindAddresses = [""]
+        if config.InheritFDs or config.InheritSSLFDs:
 
-        for bindAddress in config.BindAddresses:
-            if config.BindHTTPPorts:
-                if config.HTTPPort == 0:
-                    raise UsageError(
-                        "HTTPPort required if BindHTTPPorts is not empty"
-                    )
-            elif config.HTTPPort != 0:
-                    config.BindHTTPPorts = [config.HTTPPort]
+            for fd in config.InheritSSLFDs:
+                fd = int(fd)
 
-            if config.BindSSLPorts:
-                if config.SSLPort == 0:
-                    raise UsageError(
-                        "SSLPort required if BindSSLPorts is not empty"
-                    )
-            elif config.SSLPort != 0:
-                config.BindSSLPorts = [config.SSLPort]
-
-            for port in config.BindSSLPorts:
-                self.log_info("Adding SSL server at %s:%s"
-                              % (bindAddress, port))
-
                 try:
                     contextFactory = ChainingOpenSSLContextFactory(
                         config.SSLPrivateKey,
@@ -833,53 +840,100 @@
                         sslmethod=getattr(OpenSSL.SSL, config.SSLMethod),
                     )
                 except SSLError, e:
-                    self.log_error("Unable to set up SSL context factory: %s"
-                                   % (e,))
-                    self.log_error("Disabling SSL port: %s" % (port,))
+                    log.error("Unable to set up SSL context factory: %s" % (e,))
                 else:
-                    httpsService = SSLServer(
-                        int(port), channel,
-                        contextFactory, interface=bindAddress,
+                    MaxAcceptSSLServer(
+                        fd, httpFactory,
+                        contextFactory,
                         backlog=config.ListenBacklog,
-                    )
-                    httpsService.setServiceParent(service)
+                        inherit=True
+                    ).setServiceParent(service)
 
-            for port in config.BindHTTPPorts:
+            for fd in config.InheritFDs:
+                fd = int(fd)
 
                 if config.RedirectHTTPToHTTPS:
-                    #
-                    # Redirect non-SSL ports to the configured SSL port.
-                    #
-                    class SSLRedirectRequest(Request):
-                        def process(self):
-                            if config.SSLPort == 443:
-                                location = (
-                                    "https://%s%s"
-                                    % (config.ServerHostName, self.uri)
-                                )
-                            else:
-                                location = (
-                                    "https://%s:%d%s"
-                                    % (config.ServerHostName, config.SSLPort, self.uri)
-                                )
-                            self.writeResponse(RedirectResponse(location))
+                    self.log_info("Redirecting to HTTPS port %s" % (config.SSLPort,))
+                    useFactory = redirectFactory
+                else:
+                    useFactory = httpFactory
 
-                    self.log_info(
-                        "Redirecting HTTP port %s:%s to HTTPS port %s:%s"
-                        % (bindAddress, port, bindAddress, config.SSLPort)
-                    )
-                    TCPServer(int(port), HTTPFactory(SSLRedirectRequest),
-                        interface=bindAddress, backlog=config.ListenBacklog,
-                    ).setServiceParent(service)
+                MaxAcceptTCPServer(
+                    fd, useFactory,
+                    backlog=config.ListenBacklog,
+                    inherit=True
+                ).setServiceParent(service)
 
-                else:
-                    # Set up non-SSL port
-                    self.log_info(
-                        "Adding server at %s:%s"
-                        % (bindAddress, port)
-                    )
-                    TCPServer(int(port), channel,
-                        interface=bindAddress, backlog=config.ListenBacklog,
+
+        else: # Not inheriting, therefore we open our own:
+
+            if not config.BindAddresses:
+                config.BindAddresses = [""]
+
+            for bindAddress in config.BindAddresses:
+                if config.BindHTTPPorts:
+                    if config.HTTPPort == 0:
+                        raise UsageError(
+                            "HTTPPort required if BindHTTPPorts is not empty"
+                        )
+                elif config.HTTPPort != 0:
+                        config.BindHTTPPorts = [config.HTTPPort]
+
+                if config.BindSSLPorts:
+                    if config.SSLPort == 0:
+                        raise UsageError(
+                            "SSLPort required if BindSSLPorts is not empty"
+                        )
+                elif config.SSLPort != 0:
+                    config.BindSSLPorts = [config.SSLPort]
+
+                for port in config.BindSSLPorts:
+                    self.log_info("Adding SSL server at %s:%s"
+                                  % (bindAddress, port))
+
+                    try:
+                        contextFactory = ChainingOpenSSLContextFactory(
+                            config.SSLPrivateKey,
+                            config.SSLCertificate,
+                            certificateChainFile=config.SSLAuthorityChain,
+                            passwdCallback=getSSLPassphrase,
+                            sslmethod=getattr(OpenSSL.SSL, config.SSLMethod),
+                        )
+                    except SSLError, e:
+                        self.log_error("Unable to set up SSL context factory: %s"
+                                       % (e,))
+                        self.log_error("Disabling SSL port: %s" % (port,))
+                    else:
+                        httpsService = MaxAcceptSSLServer(
+                            int(port), httpFactory,
+                            contextFactory, interface=bindAddress,
+                            backlog=config.ListenBacklog,
+                            inherit=False
+                        )
+                        httpsService.setServiceParent(service)
+
+                for port in config.BindHTTPPorts:
+
+                    if config.RedirectHTTPToHTTPS:
+                        #
+                        # Redirect non-SSL ports to the configured SSL port.
+                        #
+                        self.log_info("Redirecting HTTP port %s to HTTPS port %s"
+                            % (port, config.SSLPort)
+                        )
+                        useFactory = redirectFactory
+                    else:
+                        self.log_info(
+                            "Adding server at %s:%s"
+                            % (bindAddress, port)
+                        )
+                        useFactory = httpFactory
+
+                    MaxAcceptTCPServer(
+                        int(port), useFactory,
+                        interface=bindAddress,
+                        backlog=config.ListenBacklog,
+                        inherit=False
                     ).setServiceParent(service)
 
 
@@ -895,18 +949,26 @@
 
         # Make sure no old socket files are lying around.
         self.deleteStaleSocketFiles()
-        
+
         # The logger service must come before the monitor service, otherwise
         # we won't know which logging port to pass to the slaves' command lines
 
         logger = AMPLoggingFactory(
             RotatingFileAccessLoggingObserver(config.AccessLogFile)
         )
+        if config.GroupName:
+            gid = getgrnam(config.GroupName).gr_gid
+        else:
+            gid = os.getgid()
         if config.ControlSocket:
-            loggingService = UNIXServer(config.ControlSocket, logger)
+            loggingService = GroupOwnedUNIXServer(
+                gid, config.ControlSocket, logger, mode=0660
+            )
         else:
-            loggingService = ControlPortTCPServer(config.ControlPort, logger,
-                interface="127.0.0.1")
+            loggingService = ControlPortTCPServer(
+                config.ControlPort, logger, interface="127.0.0.1"
+            )
+        loggingService.setName("logging")
         loggingService.setServiceParent(s)
 
         monitor = DelayedStartupProcessMonitor()
@@ -922,14 +984,6 @@
         if "KRB5_KTNAME" in os.environ:
             parentEnv["KRB5_KTNAME"] = os.environ["KRB5_KTNAME"]
 
-        hosts = []
-        sslHosts = []
-
-        port = [config.HTTPPort,]
-        sslPort = [config.SSLPort,]
-
-        bindAddress = ["127.0.0.1"]
-
         #
         # Attempt to calculate the number of processes to use 1 per processor
         #
@@ -956,148 +1010,68 @@
 
             config.MultiProcess.ProcessCount = processCount
 
-        if config.MultiProcess.ProcessCount > 1:
-            if config.BindHTTPPorts:
-                port = [list(reversed(config.BindHTTPPorts))[0]]
 
-            if config.BindSSLPorts:
-                sslPort = [list(reversed(config.BindSSLPorts))[0]]
+        # Open the socket(s) to be inherited by the slaves
 
-        elif config.MultiProcess.ProcessCount == 1:
+        if not config.BindAddresses:
+            config.BindAddresses = [""]
+
+        inheritFDs = []
+        inheritSSLFDs = []
+
+        s._inheritedSockets = [] # keep a reference to these so they don't close
+
+        for bindAddress in config.BindAddresses:
             if config.BindHTTPPorts:
-                port = config.BindHTTPPorts
+                if config.HTTPPort == 0:
+                    raise UsageError(
+                        "HTTPPort required if BindHTTPPorts is not empty"
+                    )
+            elif config.HTTPPort != 0:
+                config.BindHTTPPorts = [config.HTTPPort]
 
             if config.BindSSLPorts:
-                sslPort = config.BindSSLPorts
+                if config.SSLPort == 0:
+                    raise UsageError(
+                        "SSLPort required if BindSSLPorts is not empty"
+                    )
+            elif config.SSLPort != 0:
+                config.BindSSLPorts = [config.SSLPort]
 
-        if port[0] == 0:
-            port = None
+            def _openSocket(addr, port):
+                log.info("Opening socket for inheritance at %s:%d" % (addr, port))
+                sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+                sock.setblocking(0)
+                sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
+                sock.bind((addr, port))
+                sock.listen(config.ListenBacklog)
+                s._inheritedSockets.append(sock)
+                return sock
 
-        if sslPort[0] == 0:
-            sslPort = None
+            for portNum in config.BindHTTPPorts:
+                sock = _openSocket(bindAddress, int(portNum))
+                inheritFDs.append(sock.fileno())
 
-        # If the load balancer isn't enabled, or if we only have one process
-        # We listen directly on the interfaces.
+            for portNum in config.BindSSLPorts:
+                sock = _openSocket(bindAddress, int(portNum))
+                inheritSSLFDs.append(sock.fileno())
 
-        if (
-            not config.MultiProcess.LoadBalancer.Enabled or
-            config.MultiProcess.ProcessCount == 1
-        ):
-            bindAddress = config.BindAddresses
 
         for p in xrange(0, config.MultiProcess.ProcessCount):
-            if config.MultiProcess.ProcessCount > 1:
-                if port is not None:
-                    port = [port[0] + 1]
-
-                if sslPort is not None:
-                    sslPort = [sslPort[0] + 1]
-
             process = TwistdSlaveProcess(
                 config.Twisted.twistd,
                 self.tapname,
                 options["config"],
-                bindAddress,
-                port,
-                sslPort
+                p,
+                config.BindAddresses,
+                inheritFDs=inheritFDs,
+                inheritSSLFDs=inheritSSLFDs
             )
 
             monitor.addProcessObject(process, parentEnv)
 
-            if config.HTTPPort:
-                hosts.append(process.getHostLine())
 
-            if config.SSLPort:
-                sslHosts.append(process.getHostLine(ssl=True))
 
-        #
-        # Set up pydirector config file.
-        #
-        if (config.MultiProcess.LoadBalancer.Enabled and
-            config.MultiProcess.ProcessCount > 1):
-            services = []
-
-            if not config.BindAddresses:
-                config.BindAddresses = [""]
-
-            scheduler_map = {
-                "LeastConnections": "leastconns",
-                "RoundRobin": "roundrobin",
-                "LeastConnectionsAndRoundRobin": "leastconnsrr",
-            }
-
-            for bindAddress in config.BindAddresses:
-                httpListeners = []
-                sslListeners = []
-
-                httpPorts = config.BindHTTPPorts
-                if not httpPorts:
-                    if config.HTTPPort != 0:
-                        httpPorts = (config.HTTPPort,)
-
-                sslPorts = config.BindSSLPorts
-                if not sslPorts:
-                    if config.SSLPort != 0:
-                        sslPorts = (config.SSLPort,)
-
-                for ports, listeners in (
-                    (httpPorts, httpListeners),
-                    (sslPorts, sslListeners)
-                ):
-                    for port in ports:
-                        listeners.append(
-                            """<listen ip="%s:%s" />""" % (bindAddress, port)
-                        )
-
-                scheduler = config.MultiProcess.LoadBalancer.Scheduler
-
-                pydirServiceTemplate = (
-                    """<service name="%(name)s">"""
-                    """%(listeningInterfaces)s"""
-                    """<group name="main" scheduler="%(scheduler)s">"""
-                    """%(hosts)s"""
-                    """</group>"""
-                    """<enable group="main" />"""
-                    """</service>"""
-                )
-
-                if httpPorts:
-                    services.append(
-                        pydirServiceTemplate % {
-                            "name": "http",
-                            "listeningInterfaces": "\n".join(httpListeners),
-                            "scheduler": scheduler_map[scheduler],
-                            "hosts": "\n".join(hosts)
-                        }
-                    )
-
-                if sslPorts:
-                    services.append(
-                        pydirServiceTemplate % {
-                            "name": "https",
-                            "listeningInterfaces": "\n".join(sslListeners),
-                            "scheduler": scheduler_map[scheduler],
-                            "hosts": "\n".join(sslHosts),
-                        }
-                    )
-
-            pdconfig = """<pdconfig>%s<control socket="%s" /></pdconfig>""" % (
-                "\n".join(services), config.PythonDirector.ControlSocket,
-            )
-
-            fd, fname = mkstemp(prefix="pydir")
-            os.write(fd, pdconfig)
-            os.close(fd)
-
-            self.log_info("Adding pydirector service with configuration: %s"
-                          % (fname,))
-
-            monitor.addProcess(
-                "pydir",
-                [sys.executable, config.PythonDirector.pydir, fname],
-                env=parentEnv,
-            )
-
         for name, pool in config.Memcached.Pools.items():
             if pool.ServerEnabled:
                 self.log_info("Adding memcached service for pool: %s" % (name,))
@@ -1179,35 +1153,19 @@
 
 
         stats = CalDAVStatisticsServer(logger) 
-        statsService = UNIXServer(config.GlobalStatsSocket, stats) 
+        statsService = GroupOwnedUNIXServer(
+            gid, config.GlobalStatsSocket, stats, mode=0660
+        )
+        statsService.setName("stats")
         statsService.setServiceParent(s)
 
         return s
 
-    def makeService_Master(self, options):
-        service = procmon.ProcessMonitor()
 
-        parentEnv = {"PYTHONPATH": os.environ.get("PYTHONPATH", "")}
-
-        self.log_info("Adding pydirector service with configuration: %s"
-                      % (config.PythonDirector.ConfigFile,))
-
-        service.addProcess(
-            "pydir",
-            [
-                sys.executable,
-                config.PythonDirector.pydir,
-                config.PythonDirector.ConfigFile
-            ],
-            env=parentEnv
-        )
-
-        return service
-
     def deleteStaleSocketFiles(self):
         
         # Check all socket files we use.
-        for checkSocket in [config.ControlSocket, config.GlobalStatsSocket, config.PythonDirector.ControlSocket] :
+        for checkSocket in [config.ControlSocket, config.GlobalStatsSocket] :
     
             # See if the file exists.
             if (os.path.exists(checkSocket)):
@@ -1237,28 +1195,25 @@
 class TwistdSlaveProcess(object):
     prefix = "caldav"
 
-    def __init__(self, twistd, tapname, configFile, interfaces, port, sslPort):
+    def __init__(self, twistd, tapname, configFile, id, interfaces,
+            inheritFDs=None, inheritSSLFDs=None):
+
         self.twistd = twistd
 
         self.tapname = tapname
 
         self.configFile = configFile
 
-        self.ports = port
-        self.sslPorts = sslPort
+        self.id = id
 
+        self.inheritFDs = inheritFDs
+        self.inheritSSLFDs = inheritSSLFDs
+
         self.interfaces = interfaces
 
     def getName(self):
-        if self.ports is not None:
-            return "%s-%s" % (self.prefix, self.ports[0])
-        elif self.sslPorts is not None:
-            return "%s-%s" % (self.prefix, self.sslPorts[0])
+        return '%s-%s' % (self.prefix, self.id)
 
-        raise ConfigurationError(
-            "Can't create TwistdSlaveProcess without a TCP Port"
-        )
-
     def getCommandLine(self):
         args = [sys.executable, self.twistd]
 
@@ -1283,40 +1238,26 @@
             "-o", "BindAddresses=%s" % (",".join(self.interfaces),),
             "-o", "PIDFile=None",
             "-o", "ErrorLogFile=None",
+            "-o", "LogID=%s" % (self.id,),
             "-o", "MultiProcess/ProcessCount=%d"
                   % (config.MultiProcess.ProcessCount,),
             "-o", "ControlPort=%d"
                   % (config.ControlPort,),
         ])
 
-        if self.ports:
+        if self.inheritFDs:
             args.extend([
-                "-o", "BindHTTPPorts=%s" % (",".join(map(str, self.ports)),)
+                "-o", "InheritFDs=%s" % (",".join(map(str, self.inheritFDs)),)
             ])
 
-        if self.sslPorts:
+        if self.inheritSSLFDs:
             args.extend([
-                "-o", "BindSSLPorts=%s" % (",".join(map(str, self.sslPorts)),)
+                "-o", "InheritSSLFDs=%s" % (",".join(map(str, self.inheritSSLFDs)),)
             ])
 
         return args
 
-    def getHostLine(self, ssl=False):
-        name = self.getName()
-        port = None
 
-        if self.ports is not None:
-            port = self.ports
-
-        if ssl and self.sslPorts is not None:
-            port = self.sslPorts
-
-        if port is None:
-            raise ConfigurationError("Can not add a host without a port")
-
-        return """<host name="%s" ip="127.0.0.1:%s" />""" % (name, port[0])
-
-
 class ControlPortTCPServer(TCPServer):
     """ This TCPServer retrieves the port number that was actually assigned
         when the service was started, and stores that into config.ControlPort
@@ -1405,7 +1346,29 @@
         except ProcessExitedAlready:
             pass
 
+    def startProcess(self, name):
+        if self.protocols.has_key(name):
+            return
+        p = self.protocols[name] = procmon.LoggingProtocol()
+        p.service = self
+        p.name = name
+        args, uid, gid, env = self.processes[name]
+        self.timeStarted[name] = time()
 
+        childFDs = { 0 : "w", 1 : "r", 2 : "r" }
+
+        # Examine args for -o InheritFDs= and -o InheritSSLFDs=
+        # Add any file descriptors listed in those args to the childFDs
+        # dictionary so those don't get closed across the spawn.
+        for i in xrange(len(args)-1):
+            if args[i] == "-o" and args[i+1].startswith("Inherit"):
+                for fd in map(int, args[i+1].split("=")[1].split(",")):
+                    childFDs[fd] = fd
+
+        spawnProcess(p, args[0], args, uid=uid, gid=gid, env=env,
+            childFDs=childFDs)
+
+
 def getSSLPassphrase(*ignored):
 
     if not config.SSLPrivateKey:

Modified: CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/tap/test/test_caldav.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/tap/test/test_caldav.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/tap/test/test_caldav.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -15,10 +15,18 @@
 ##
 
 import os
+import stat
+import grp
+
 from os.path import dirname, abspath
 
+from twisted.trial.unittest import TestCase as BaseTestCase
+
 from twisted.python.usage import Options, UsageError
 from twisted.python.reflect import namedAny
+
+from twisted.internet.protocol import ServerFactory
+
 from twisted.application.service import IService
 from twisted.application import internet
 
@@ -26,6 +34,7 @@
 from twisted.web2.log import LogWrapperResource
 
 from twext.python.plistlib import writePlist
+from twext.internet.tcp import MaxAcceptTCPServer, MaxAcceptSSLServer
 
 from twistedcaldav.config import config, ConfigDict, _mergeData
 from twistedcaldav.stdconfig import DEFAULT_CONFIG
@@ -35,7 +44,8 @@
 from twistedcaldav.directory.directory import UnknownRecordTypeError
 from twistedcaldav.test.util import TestCase
 
-from calendarserver.tap.caldav import CalDAVOptions, CalDAVServiceMaker, CalDAVService
+from calendarserver.tap.caldav import (CalDAVOptions, CalDAVServiceMaker,
+                                       CalDAVService, GroupOwnedUNIXServer)
 
 
 # Points to top of source tree.
@@ -127,7 +137,6 @@
         myConfig = ConfigDict(DEFAULT_CONFIG)
 
         myConfig.Authentication.Basic.Enabled = False
-        myConfig.MultiProcess.LoadBalancer.Enabled = False
         myConfig.HTTPPort = 80
         myConfig.ServerHostName = "calendar.calenderserver.org"
 
@@ -139,10 +148,6 @@
         self.config.parseOptions(args)
 
         self.assertEquals(config.ServerHostName, myConfig["ServerHostName"])
-        self.assertEquals(
-            config.MultiProcess.LoadBalancer.Enabled,
-            myConfig.MultiProcess.LoadBalancer.Enabled
-        )
         self.assertEquals(config.HTTPPort, myConfig.HTTPPort)
         self.assertEquals(
             config.Authentication.Basic.Enabled,
@@ -239,6 +244,37 @@
         return service.services[0].args[1].protocolArgs["requestFactory"]
 
 
+
+def determineAppropriateGroupID():
+    """
+    Determine a secondary group ID which can be used for testing.
+    """
+    return os.getgroups()[1]
+
+
+
+class SocketGroupOwnership(BaseTestCase):
+    """
+    Tests for L{GroupOwnedUNIXServer}.
+    """
+
+    def test_groupOwnedUNIXSocket(self):
+        """
+        When a L{GroupOwnedUNIXServer} is started, it will change the group of
+        its socket.
+        """
+        alternateGroup = determineAppropriateGroupID()
+        socketName = self.mktemp()
+        gous = GroupOwnedUNIXServer(alternateGroup, socketName, ServerFactory(), mode=0660)
+        gous.privilegedStartService()
+        self.addCleanup(gous.stopService)
+        filestat = os.stat(socketName)
+        self.assertTrue(stat.S_ISSOCK(filestat.st_mode))
+        self.assertEquals(filestat.st_gid, alternateGroup)
+        self.assertEquals(filestat.st_uid, os.getuid())
+
+
+
 class CalDAVServiceMakerTests(BaseServiceMakerTests):
     """
     Test the service maker's behavior
@@ -248,9 +284,9 @@
         """
         Test the default options of the dispatching makeService
         """
-        validServices = ["Slave", "Master", "Combined"]
+        validServices = ["Slave", "Combined"]
 
-        self.config["HTTPPort"] = 80
+        self.config["HTTPPort"] = 0
 
         for service in validServices:
             self.config["ProcessType"] = service
@@ -262,6 +298,32 @@
         self.assertRaises(UsageError, self.makeService)
 
 
+    def test_modesOnUNIXSockets(self):
+        """
+        The logging and stats UNIX sockets that are bound as part of the
+        'Combined' service hierarchy should have a secure mode specified: only
+        the executing user should be able to open and send to them.
+        """
+
+        self.config["HTTPPort"] = 0 # Don't conflict with the test above.
+        alternateGroup = determineAppropriateGroupID()
+        self.config.GroupName = grp.getgrgid(alternateGroup).gr_name
+
+        self.config["ProcessType"] = "Combined"
+        self.writeConfig()
+        svc = self.makeService()
+        for serviceName in ["logging", "stats"]:
+            socketService = svc.getServiceNamed(serviceName)
+            self.assertIsInstance(socketService, GroupOwnedUNIXServer)
+            m = socketService.kwargs.get("mode", 0666)
+            self.assertEquals(
+                m, int("660", 8),
+                "Wrong mode on %s: %s" % (serviceName, oct(m))
+            )
+            self.assertEquals(socketService.gid, alternateGroup)
+
+
+
 class SlaveServiceTest(BaseServiceMakerTests):
     """
     Test various configurations of the Slave service
@@ -300,8 +362,8 @@
         service = self.makeService()
 
         expectedSubServices = (
-            (internet.TCPServer, self.config["HTTPPort"]),
-            (internet.SSLServer, self.config["SSLPort"]),
+            (MaxAcceptTCPServer, self.config["HTTPPort"]),
+            (MaxAcceptSSLServer, self.config["SSLPort"]),
         )
 
         configuredSubServices = [(s.__class__, s.args) for s in service.services]

Copied: CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/tools/anonymize.py (from rev 4858, CalendarServer/trunk/calendarserver/tools/anonymize.py)
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/tools/anonymize.py	                        (rev 0)
+++ CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/tools/anonymize.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -0,0 +1,599 @@
+#!/usr/bin/env python
+
+##
+# Copyright (c) 2006-2009 Apple Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##
+
+from __future__ import with_statement
+
+from getopt import getopt, GetoptError
+from subprocess import Popen, PIPE, STDOUT
+import datetime
+import hashlib
+import operator
+import os
+import plistlib
+import random
+import shutil
+import sys
+import tempfile
+import urllib
+import uuid
+import vobject
+import xattr
+import zlib
+
+COPY_CAL_XATTRS = (
+    'WebDAV:{DAV:}resourcetype',
+    'WebDAV:{urn:ietf:params:xml:ns:caldav}calendar-timezone',
+    'WebDAV:{http:%2F%2Fapple.com%2Fns%2Fical%2F}calendar-color',
+    'WebDAV:{http:%2F%2Fapple.com%2Fns%2Fical%2F}calendar-order',
+)
+COPY_EVENT_XATTRS = ('WebDAV:{DAV:}getcontenttype',)
+
+
+def usage(e=None):
+    if e:
+        print e
+        print ""
+
+    name = os.path.basename(sys.argv[0])
+    print "usage: %s [options] source destination" % (name,)
+    print ""
+    print "  Anonymizes calendar data"
+    print ""
+    print "  source and destination should refer to document root directories"
+    print ""
+    print "options:"
+    print "  -h --help: print this help and exit"
+    print "  -n --node <node>: Directory node (defaults to /Search)"
+    print ""
+
+    if e:
+        sys.exit(64)
+    else:
+        sys.exit(0)
+
+def main():
+
+    try:
+        (optargs, args) = getopt(
+            sys.argv[1:], "hn:", [
+                "help",
+                "node=",
+            ],
+        )
+    except GetoptError, e:
+        usage(e)
+
+    #
+    # Get configuration
+    #
+    directoryNode = "/Search"
+    sourceDirectory = None
+    destDirectory = None
+
+    for opt, arg in optargs:
+        if opt in ("-h", "--help"):
+            usage()
+
+        elif opt in ("-n", "--node"):
+            directoryNode = arg
+
+    if len(args) != 2:
+        usage("Source and destination directories must be specified.")
+
+    sourceDirectory, destDirectory = args
+
+    directoryMap = DirectoryMap(directoryNode)
+
+    anonymizeRoot(directoryMap, sourceDirectory, destDirectory)
+
+    directoryMap.printStats()
+
+    directoryMap.dumpDsImports(os.path.join(destDirectory, "dsimports"))
+
+
+def anonymizeRoot(directoryMap, sourceDirectory, destDirectory):
+    # sourceDirectory and destDirectory are DocumentRoots
+
+    print "Anonymizing calendar data from %s into %s" % (sourceDirectory, destDirectory)
+
+    homes = 0
+    calendars = 0
+    resources = 0
+
+    if not os.path.exists(sourceDirectory):
+        print "Can't find source: %s" % (sourceDirectory,)
+        sys.exit(1)
+
+    if not os.path.exists(destDirectory):
+        os.makedirs(destDirectory)
+
+    sourceCalRoot = os.path.join(sourceDirectory, "calendars")
+
+    destCalRoot = os.path.join(destDirectory, "calendars")
+    if not os.path.exists(destCalRoot):
+        os.makedirs(destCalRoot)
+
+    sourceUidHomes = os.path.join(sourceCalRoot, "__uids__")
+    if os.path.exists(sourceUidHomes):
+
+        destUidHomes = os.path.join(destCalRoot, "__uids__")
+        if not os.path.exists(destUidHomes):
+            os.makedirs(destUidHomes)
+
+        homeList = []
+
+        for first in os.listdir(sourceUidHomes):
+            if len(first) == 2:
+                firstPath = os.path.join(sourceUidHomes, first)
+                for second in os.listdir(firstPath):
+                    if len(second) == 2:
+                        secondPath = os.path.join(firstPath, second)
+                        for home in os.listdir(secondPath):
+                            record = directoryMap.lookupCUA(home)
+                            if not record:
+                                print "Couldn't find %s, skipping." % (home,)
+                                continue
+                            sourceHome = os.path.join(secondPath, home)
+                            destHome = os.path.join(destUidHomes,
+                                record['guid'][0:2], record['guid'][2:4],
+                                record['guid'])
+                            homeList.append((sourceHome, destHome, record))
+
+            else:
+                home = first
+                sourceHome = os.path.join(sourceUidHomes, home)
+                if not os.path.isdir(sourceHome):
+                    continue
+                record = directoryMap.lookupCUA(home)
+                if not record:
+                    print "Couldn't find %s, skipping." % (home,)
+                    continue
+                sourceHome = os.path.join(sourceUidHomes, home)
+                destHome = os.path.join(destUidHomes, record['guid'])
+                homeList.append((sourceHome, destHome, record))
+
+        print "Processing %d calendar homes..." % (len(homeList),)
+
+        for sourceHome, destHome, record in homeList:
+            quotaUsed = 0
+
+            if not os.path.exists(destHome):
+                os.makedirs(destHome)
+
+            homes += 1
+
+            # Iterate calendars
+            freeBusies = []
+            for cal in os.listdir(sourceHome):
+
+                # Skip these:
+                if cal in ("dropbox", "notifications"):
+                    continue
+
+                # Don't include these in freebusy list
+                if cal not in ("inbox", "outbox"):
+                    freeBusies.append(cal)
+
+                sourceCal = os.path.join(sourceHome, cal)
+                destCal = os.path.join(destHome, cal)
+                if not os.path.exists(destCal):
+                    os.makedirs(destCal)
+                calendars += 1
+
+                # Copy calendar xattrs
+                for attr, value in xattr.xattr(sourceCal).iteritems():
+                    if attr in COPY_CAL_XATTRS:
+                        xattr.setxattr(destCal, attr, value)
+
+                # Copy index
+                sourceIndex = os.path.join(sourceCal, ".db.sqlite")
+                destIndex = os.path.join(destCal, ".db.sqlite")
+                if os.path.exists(sourceIndex):
+                    shutil.copyfile(sourceIndex, destIndex)
+
+                # Iterate resources
+                for resource in os.listdir(sourceCal):
+
+                    if resource.startswith("."):
+                        continue
+
+                    sourceResource = os.path.join(sourceCal, resource)
+
+                    # Skip directories
+                    if os.path.isdir(sourceResource):
+                        continue
+
+                    with open(sourceResource) as res:
+                        data = res.read()
+
+                    data = anonymizeData(directoryMap, data)
+
+                    destResource = os.path.join(destCal, resource)
+                    with open(destResource, "w") as res:
+                        res.write(data)
+
+                    quotaUsed += len(data)
+
+                    for attr, value in xattr.xattr(sourceResource).iteritems():
+                        if attr in COPY_EVENT_XATTRS:
+                            xattr.setxattr(destResource, attr, value)
+
+                    # Set new etag
+                    xml = "<?xml version='1.0' encoding='UTF-8'?>\r\n<getcontentmd5 xmlns='http://twistedmatrix.com/xml_namespace/dav/'>%s</getcontentmd5>\r\n" % (hashlib.md5(data).hexdigest(),)
+                    xattr.setxattr(destResource, "WebDAV:{http:%2F%2Ftwistedmatrix.com%2Fxml_namespace%2Fdav%2F}getcontentmd5", zlib.compress(xml))
+
+                    resources += 1
+
+
+                # Store new ctag on calendar
+                xml = "<?xml version='1.0' encoding='UTF-8'?>\r\n<getctag xmlns='http://calendarserver.org/ns/'>%s</getctag>\r\n" % (str(datetime.datetime.now()),)
+                xattr.setxattr(destCal, "WebDAV:{http:%2F%2Fcalendarserver.org%2Fns%2F}getctag", zlib.compress(xml))
+
+
+            # Calendar home quota
+            xml = "<?xml version='1.0' encoding='UTF-8'?>\r\n<quota-used xmlns='http://twistedmatrix.com/xml_namespace/dav/private/'>%d</quota-used>\r\n" % (quotaUsed,)
+            xattr.setxattr(destHome, "WebDAV:{http:%2F%2Ftwistedmatrix.com%2Fxml_namespace%2Fdav%2Fprivate%2F}quota-used", zlib.compress(xml))
+
+            # Inbox free busy calendars list
+            destInbox = os.path.join(destHome, "inbox")
+            if not os.path.exists(destInbox):
+                os.makedirs(destInbox)
+            xml = "<?xml version='1.0' encoding='UTF-8'?><calendar-free-busy-set xmlns='urn:ietf:params:xml:ns:caldav'>\n"
+            for freeBusy in freeBusies:
+                xml += "<href xmlns='DAV:'>/calendars/__uids__/%s/%s/</href>\n" % (record['guid'], freeBusy)
+            xml += "</calendar-free-busy-set>\n"
+            xattr.setxattr(destInbox,
+                "WebDAV:{urn:ietf:params:xml:ns:caldav}calendar-free-busy-set",
+                zlib.compress(xml)
+            )
+
+            if not (homes % 100):
+                print " %d..." % (homes,)
+
+    print "Done."
+    print ""
+
+    print "Calendar totals:"
+    print " Calendar homes: %d" % (homes,)
+    print " Calendars: %d" % (calendars,)
+    print " Events: %d" % (resources,)
+    print ""
+
+
+def anonymizeData(directoryMap, data):
+    vobj = vobject.readComponents(data).next()
+
+    # Delete property from the top level
+    try:
+        for prop in vobj.contents['x-wr-calname']:
+            prop.value = anonymize(prop.value)
+    except KeyError:
+        pass
+
+    for comp in vobj.components():
+
+        # Replace with anonymized CUAs:
+        for propName in ('organizer', 'attendee'):
+            try:
+                for prop in list(comp.contents[propName]):
+                    cua = prop.value
+                    record = directoryMap.lookupCUA(cua)
+                    if record is None:
+                        # print "Can't find record for", cua
+                        record = directoryMap.addRecord(cua=cua)
+                        if record is None:
+                            comp.remove(prop)
+                            continue
+                    prop.value = "urn:uuid:%s" % (record['guid'],)
+                    if prop.params.has_key('X-CALENDARSERVER-EMAIL'):
+                        prop.params['X-CALENDARSERVER-EMAIL'] = (record['email'],)
+                    else:
+                        prop.params['EMAIL'] = (record['email'],)
+                    prop.params['CN'] = (record['name'],)
+            except KeyError:
+                pass
+
+        # Replace with anonymized text:
+        for propName in ('summary', 'location', 'description'):
+            try:
+                for prop in comp.contents[propName]:
+                    prop.value = anonymize(prop.value)
+            except KeyError:
+                pass
+
+        # Replace with anonymized URL:
+        try:
+            for prop in comp.contents['url']:
+                prop.value = "http://example.com/%s/" % (anonymize(prop.value),)
+        except KeyError:
+            pass
+
+        # Remove properties:
+        for propName in ('x-apple-dropbox', 'attach'):
+            try:
+                for prop in list(comp.contents[propName]):
+                    comp.remove(prop)
+            except KeyError:
+                pass
+
+    return vobj.serialize()
+
+
+class DirectoryMap(object):
+
+    def __init__(self, node):
+
+        self.map = { }
+        self.byType = {
+            'users' : [],
+            'groups' : [],
+            'locations' : [],
+            'resources' : [],
+        }
+        self.counts = {
+            'users' : 0,
+            'groups' : 0,
+            'locations' : 0,
+            'resources' : 0,
+            'unknown' : 0,
+        }
+
+        self.strings = {
+            'users' : ('Users', 'user'),
+            'groups' : ('Groups', 'group'),
+            'locations' : ('Places', 'location'),
+            'resources' : ('Resources', 'resource'),
+        }
+
+        print "Fetching records from directory: %s" % (node,)
+
+        for internalType, (recordType, friendlyType) in self.strings.iteritems():
+            print " %s..." % (internalType,)
+            child = Popen(
+                args = [
+                    "/usr/bin/dscl", "-plist", node, "-readall",
+                    "/%s" % (recordType,),
+                    "GeneratedUID", "RecordName", "EMailAddress", "GroupMembers"
+                ],
+                stdout=PIPE, stderr=STDOUT,
+            )
+            output, error = child.communicate()
+
+            if child.returncode:
+                raise DirectoryError(error)
+            else:
+                records = plistlib.readPlistFromString(output)
+                random.shuffle(records) # so we don't go alphabetically
+
+                for record in records:
+                    origGUID = record.get('dsAttrTypeStandard:GeneratedUID', [None])[0]
+                    if not origGUID:
+                        continue
+                    origRecordNames = record['dsAttrTypeStandard:RecordName']
+                    origEmails = record.get('dsAttrTypeStandard:EMailAddress', [])
+                    origMembers = record.get('dsAttrTypeStandard:GroupMembers', [])
+                    self.addRecord(internalType=internalType, guid=origGUID,
+                        names=origRecordNames, emails=origEmails,
+                        members=origMembers)
+
+        print "Done."
+        print ""
+
+    def addRecord(self, internalType="users", guid=None, names=None,
+        emails=None, members=None, cua=None):
+
+        if cua:
+            keys = [self.cua2key(cua)]
+            self.counts['unknown'] += 1
+        else:
+            keys = self.getKeys(guid, names, emails)
+
+        if keys:
+            self.counts[internalType] += 1
+            count = self.counts[internalType]
+
+            namePrefix = randomName(6)
+            typeStr = self.strings[internalType][1]
+            record = {
+                'guid' : str(uuid.uuid4()).upper(),
+                'name' : "%s %s%d" % (namePrefix, typeStr, count,),
+                'first' : namePrefix,
+                'last' : "%s%d" % (typeStr, count,),
+                'recordName' : "%s%d" % (typeStr, count,),
+                'email' : ("%s%d at example.com" % (typeStr, count,)),
+                'type' : self.strings[internalType][0],
+                'cua' : cua,
+                'members' : members,
+            }
+            for key in keys:
+                self.map[key] = record
+            self.byType[internalType].append(record)
+            return record
+        else:
+            return None
+
+
+    def getKeys(self, guid, names, emails):
+        keys = []
+        if guid:
+            keys.append(guid.lower())
+        if names:
+            for name in names:
+                try:
+                    name = name.encode('utf-8')
+                    name = urllib.quote(name).lower()
+                    keys.append(name)
+                except:
+                    # print "Failed to urllib.quote( ) %s. Skipping." % (name,)
+                    pass
+        if emails:
+            for email in emails:
+                email = email.lower()
+                keys.append(email)
+        return keys
+
+    def cua2key(self, cua):
+        key = cua.lower()
+
+        if key.startswith("mailto:"):
+            key = key[7:]
+
+        elif key.startswith("urn:uuid:"):
+            key = key[9:]
+
+        elif (key.startswith("/") or key.startswith("http")):
+            key = key.rstrip("/")
+            key = key.split("/")[-1]
+
+        return key
+
+    def lookupCUA(self, cua):
+        key = self.cua2key(cua)
+
+        if key and self.map.has_key(key):
+            return self.map[key]
+        else:
+            return None
+
+
+    def printStats(self):
+        print "Directory totals:"
+        for internalType, (recordType, ignore) in self.strings.iteritems():
+            print " %s: %d" % (recordType, self.counts[internalType])
+
+        unknown = self.counts['unknown']
+        if unknown:
+            print " Principals not found in directory: %d" % (unknown,)
+
+    def dumpDsImports(self, dirPath):
+        if not os.path.exists(dirPath):
+            os.makedirs(dirPath)
+
+        uid = 1000000
+        filePath = os.path.join(dirPath, "users.dsimport")
+        with open(filePath, "w") as out:
+            out.write("0x0A 0x5C 0x3A 0x2C dsRecTypeStandard:Users 12 dsAttrTypeStandard:RecordName dsAttrTypeStandard:AuthMethod dsAttrTypeStandard:Password dsAttrTypeStandard:UniqueID dsAttrTypeStandard:GeneratedUID dsAttrTypeStandard:PrimaryGroupID dsAttrTypeStandard:RealName dsAttrTypeStandard:FirstName dsAttrTypeStandard:LastName dsAttrTypeStandard:NFSHomeDirectory dsAttrTypeStandard:UserShell dsAttrTypeStandard:EMailAddress\n")
+            for record in self.byType['users']:
+                fields = []
+                fields.append(record['recordName'])
+                fields.append("dsAuthMethodStandard\\:dsAuthClearText")
+                fields.append("test") # password
+                fields.append(str(uid))
+                fields.append(record['guid'])
+                fields.append("20") # primary group id
+                fields.append(record['name'])
+                fields.append(record['first'])
+                fields.append(record['last'])
+                fields.append("/var/empty")
+                fields.append("/usr/bin/false")
+                fields.append(record['email'])
+                out.write(":".join(fields))
+                out.write("\n")
+                uid += 1
+
+        gid = 2000000
+        filePath = os.path.join(dirPath, "groups.dsimport")
+        with open(filePath, "w") as out:
+            out.write("0x0A 0x5C 0x3A 0x2C dsRecTypeStandard:Groups 5 dsAttrTypeStandard:RecordName dsAttrTypeStandard:PrimaryGroupID dsAttrTypeStandard:GeneratedUID dsAttrTypeStandard:RealName dsAttrTypeStandard:GroupMembership\n")
+            for record in self.byType['groups']:
+                fields = []
+                fields.append(record['recordName'])
+                fields.append(str(gid))
+                fields.append(record['guid'])
+                fields.append(record['name'])
+                anonMembers = []
+                for member in record['members']:
+                    memberRec = self.lookupCUA("urn:uuid:%s" % (member,))
+                    if memberRec:
+                        anonMembers.append(memberRec['guid'])
+                if anonMembers: # skip empty groups
+                    fields.append(",".join(anonMembers))
+                    out.write(":".join(fields))
+                    out.write("\n")
+                    gid += 1
+
+        filePath = os.path.join(dirPath, "resources.dsimport")
+        with open(filePath, "w") as out:
+            out.write("0x0A 0x5C 0x3A 0x2C dsRecTypeStandard:Resources 3 dsAttrTypeStandard:RecordName dsAttrTypeStandard:GeneratedUID dsAttrTypeStandard:RealName\n")
+            for record in self.byType['resources']:
+                fields = []
+                fields.append(record['recordName'])
+                fields.append(record['guid'])
+                fields.append(record['name'])
+                out.write(":".join(fields))
+                out.write("\n")
+
+        filePath = os.path.join(dirPath, "places.dsimport")
+        with open(filePath, "w") as out:
+            out.write("0x0A 0x5C 0x3A 0x2C dsRecTypeStandard:Places 3 dsAttrTypeStandard:RecordName dsAttrTypeStandard:GeneratedUID dsAttrTypeStandard:RealName\n")
+            for record in self.byType['locations']:
+                fields = []
+                fields.append(record['recordName'])
+                fields.append(record['guid'])
+                fields.append(record['name'])
+                out.write(":".join(fields))
+                out.write("\n")
+
+
+
+class DirectoryError(Exception):
+    """
+    Error trying to access dscl
+    """
+
+class DatabaseError(Exception):
+    """
+    Error trying to access sqlite3
+    """
+
+
+
+
+
+def anonymize(text):
+    """
+    Return a string whose value is the hex digest of text, repeated as needed
+    to create a string of the same length as text.
+
+    Useful for anonymizing strings in a deterministic manner.
+    """
+    if isinstance(text, unicode):
+        try:
+            text = text.encode('utf-8')
+        except UnicodeEncodeError:
+            print "Failed to anonymize:", text
+            text = "Anonymize me!"
+    h = hashlib.md5(text)
+    h = h.hexdigest()
+    l = len(text)
+    return (h*((l/32)+1))[:-(32-(l%32))]
+
+
+
+nameChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
+def randomName(length):
+    l = []
+    for i in xrange(length):
+        l.append(random.choice(nameChars))
+    return "".join(l)
+
+
+
+
+if __name__ == "__main__":
+    main()

Modified: CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/tools/fixcalendardata.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/tools/fixcalendardata.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/tools/fixcalendardata.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -136,15 +136,25 @@
             if f:
                 f.close()
 
-        # See whether there is a \" that needs fixing.
-        # NB Have to handle the case of a folded line... 
-        if testICSData_DoubleQuotes(icsData) or testICSData_TZIDs(icsData):
+        # See what needs fixing.
+        problems = []
+        fixQuotes = fixTZIDs = fixMultiVALARMs = False
+        if testICSData_DoubleQuotes(icsData):
+            problems.append("double quotes")
+            fixQuotes = True
+        if testICSData_TZIDs(icsData):
+            problems.append("tzids")
+            fixTZIDs = True
+        if testICSData_MultipleVALARMS(icsData):
+            problems.append("multi-valarms")
+            fixMultiVALARMs = True
+        if problems:
             if doFix:
-                if fixPath(icsPath, icsData):
+                if fixPath(icsPath, icsData, fixQuotes, fixTZIDs, fixMultiVALARMs):
                     didFix = True
-                    print "Problem fixed in: <BasePath>%s" % (icsPath[basePathLength:],)
+                    print "Problems %s fixed in: <BasePath>%s" % (",".join(problems), icsPath[basePathLength:],)
             else:
-                print "Problem found in: <BasePath>%s" % (icsPath[basePathLength:],)
+                print "Problem %s found in: <BasePath>%s" % (",".join(problems), icsPath[basePathLength:],)
                 scanFile.write(icsPath + "\n")
             totalProblems += 1
      
@@ -165,6 +175,10 @@
     
     return tzidRESearch.search(icsData) != None
 
+def testICSData_MultipleVALARMS(icsData):
+    
+    return icsData.find("END:VALARM\r\nBEGIN:VALARM") != -1
+
 def fixData(basePath, scanPath):
     
     global totalProblems
@@ -204,7 +218,7 @@
         if didFix:
             updateCtag(calendarPath)
         
-def fixPath(icsPath, icsData=None):
+def fixPath(icsPath, icsData=None, doQuotes=True, doTZIDs=True, doMultiVALARMs=True):
 
     global totalProblems
     global totalErrors
@@ -224,21 +238,35 @@
                 f.close()
         
     # Fix by continuously replacing \" with " until no more replacements occur
-    while True:
-        newIcsData = icsData.replace('\\"', '"').replace('\\\r\n "', '\r\n "').replace('\r\n \r\n "', '\r\n "')
-        if newIcsData == icsData:
-            break
-        else:
-            icsData = newIcsData
+    if doQuotes:
+        while True:
+            newIcsData = icsData.replace('\\"', '"').replace('\\\r\n "', '\r\n "').replace('\r\n \r\n "', '\r\n "')
+            if newIcsData == icsData:
+                break
+            else:
+                icsData = newIcsData
     
     # Fix the TZID problem
-    while True:
-        icsMatch = tzidREReplace.search(icsData)
-        if icsMatch is not None:
-            icsData = icsMatch.expand("\\1\\2")
-        else:
-            break
+    if doTZIDs:
+        while True:
+            icsMatch = tzidREReplace.search(icsData)
+            if icsMatch is not None:
+                icsData = icsMatch.expand("\\1\\2")
+            else:
+                break
 
+    if doMultiVALARMs:
+        lines = icsData.split("BEGIN:")
+        newlines = []
+        lastalarm = False
+        for line in lines:
+            isalarm = line.startswith("VALARM")
+            if lastalarm and isalarm:
+                newlines.pop()
+            newlines.append(line)
+            lastalarm = isalarm     
+        icsData = "BEGIN:".join(newlines)
+
     try:
         f = None
         f = open(icsPath, "w")

Copied: CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/tools/icalsplit.py (from rev 4858, CalendarServer/trunk/calendarserver/tools/icalsplit.py)
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/tools/icalsplit.py	                        (rev 0)
+++ CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/tools/icalsplit.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -0,0 +1,114 @@
+##
+# Copyright (c) 2005-2009 Apple Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##
+
+import os
+import sys
+from getopt import getopt, GetoptError
+
+from twistedcaldav.ical import Component as iComponent
+
+
+def splitICalendarFile(inputFileName, outputDirectory):
+    """
+    Reads iCalendar data from a file and outputs a separate file for
+    each iCalendar component into a directory.  This is useful for
+    converting a monolithic iCalendar object into a set of objects
+    that comply with CalDAV's requirements on resources.
+    """
+    inputFile = open(inputFileName)
+    try:
+        calendar = iComponent.fromStream(inputFile)
+    finally:
+        inputFile.close()
+
+    assert calendar.name() == "VCALENDAR"
+
+    topLevelProperties = tuple(calendar.properties())
+
+    for subcomponent in calendar.subcomponents():
+        subcalendar = iComponent("VCALENDAR")
+
+        #
+        # Add top-level properties from monolithic calendar to
+        # top-level properties of subcalendar.
+        #
+        for property in topLevelProperties:
+            subcalendar.addProperty(property)
+
+        subcalendar.addComponent(subcomponent)
+
+        uid = subcalendar.resourceUID()
+        subFileName = os.path.join(outputDirectory, uid + ".ics")
+
+        print "Writing %s" % (subFileName,)
+
+        subcalendar_file = file(subFileName, "w")
+        try:
+            subcalendar_file.write(str(subcalendar))
+        finally:
+            subcalendar_file.close()
+
+
+def usage(e=None):
+    if e:
+        print e
+        print ""
+
+    name = os.path.basename(sys.argv[0])
+    print "usage: %s [options] input_file output_directory" % (name,)
+    print ""
+    print "  Splits up monolithic iCalendar data into separate files for each"
+    print "  subcomponent so as to comply with CalDAV requirements for"
+    print "  individual resources."
+    print ""
+    print "options:"
+    print "  -h --help: print this help and exit"
+    print ""
+
+    if e:
+        sys.exit(64)
+    else:
+        sys.exit(0)
+
+
+def main():
+    try:
+        (optargs, args) = getopt(
+            sys.argv[1:], "h", [
+                "help",
+            ],
+        )
+    except GetoptError, e:
+        usage(e)
+
+    for opt, arg in optargs:
+        if opt in ("-h", "--help"):
+            usage()
+
+    try:
+        inputFileName, outputDirectory = args
+    except ValueError:
+        if len(args) > 2:
+            many = "many"
+        else:
+            many = "few"
+        usage("Too %s arguments" % (many,))
+
+    splitICalendarFile(inputFileName, outputDirectory)
+
+
+if __name__ == "__main__":
+    main()

Modified: CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/tools/principals.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/tools/principals.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/tools/principals.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -38,6 +38,7 @@
 from twistedcaldav.log import setLogLevelForNamespace
 from twistedcaldav.notify import installNotificationClient
 from twistedcaldav.static import CalendarHomeProvisioningFile
+from twistedcaldav.directory.directory import UnknownRecordTypeError, DirectoryError
 
 from calendarserver.tools.util import booleanArgument, autoDisableMemcached
 from calendarserver.tools.util import loadConfig, getDirectory
@@ -45,11 +46,17 @@
 
 def usage(e=None):
     if e:
+        if isinstance(e, UnknownRecordTypeError):
+            print "Valid record types:"
+            for recordType in config.directory.recordTypes():
+                print "    %s" % (recordType,)
+
         print e
         print ""
 
     name = os.path.basename(sys.argv[0])
-    print "usage: %s [options] actions principal [principal ...]" % (name,)
+    print "usage: %s [options] action_flags principal [principal ...]" % (name,)
+   #print "       %s [options] --list-principals type" % (name,)
     print ""
     print "  Performs the given actions against the giving principals."
     print ""
@@ -64,7 +71,8 @@
     print ""
     print "actions:"
    #print "  --search <search-string>: search for matching resources"
-    print "  -P, --read-property=property: read DAV property (eg.: {DAV:}group-member-set)"
+   #print "  --list-principals=type: list all principals of the given type"
+    print "  --read-property=property: read DAV property (eg.: {DAV:}group-member-set)"
     print "  --list-read-proxies: list proxies with read-only access"
     print "  --list-write-proxies: list proxies with read-write access"
     print "  --list-proxies: list all proxies"
@@ -92,6 +100,7 @@
                 "help",
                 "config=",
                #"search=",
+                "list-principals=",
                 "read-property=",
                 "list-read-proxies",
                 "list-write-proxies",
@@ -110,7 +119,8 @@
     # Get configuration
     #
     configFileName = None
-    actions = []
+    listPrincipals = None
+    principalActions = []
 
     for opt, arg in optargs:
         if opt in ("-h", "--help"):
@@ -119,21 +129,24 @@
         elif opt in ("-f", "--config"):
             configFileName = arg
 
-        elif opt in ("-P", "--read-property"):
+        elif opt in ("", "--list-principals"):
+            listPrincipals = arg
+
+        elif opt in ("", "--read-property"):
             try:
                 qname = sname2qname(arg)
             except ValueError, e:
                 abort(e)
-            actions.append((action_readProperty, qname))
+            principalActions.append((action_readProperty, qname))
 
         elif opt in ("", "--list-read-proxies"):
-            actions.append((action_listProxies, "read"))
+            principalActions.append((action_listProxies, "read"))
 
         elif opt in ("", "--list-write-proxies"):
-            actions.append((action_listProxies, "write"))
+            principalActions.append((action_listProxies, "write"))
 
         elif opt in ("-L", "--list-proxies"):
-            actions.append((action_listProxies, "read", "write"))
+            principalActions.append((action_listProxies, "read", "write"))
 
         elif opt in ("--add-read-proxy", "--add-write-proxy"):
             if "read" in opt:
@@ -148,7 +161,7 @@
             except ValueError, e:
                 abort(e)
 
-            actions.append((action_addProxy, proxyType, arg))
+            principalActions.append((action_addProxy, proxyType, arg))
 
         elif opt in ("", "--remove-proxy"):
             try:
@@ -156,7 +169,7 @@
             except ValueError, e:
                 abort(e)
 
-            actions.append((action_removeProxy, arg))
+            principalActions.append((action_removeProxy, arg))
 
         elif opt in ("", "--set-auto-schedule"):
             try:
@@ -164,17 +177,14 @@
             except ValueError, e:
                 abort(e)
 
-            actions.append((action_setAutoSchedule, autoSchedule))
+            principalActions.append((action_setAutoSchedule, autoSchedule))
 
         elif opt in ("", "--get-auto-schedule"):
-            actions.append((action_getAutoSchedule,))
+            principalActions.append((action_getAutoSchedule,))
 
         else:
             raise NotImplementedError(opt)
 
-    if not args:
-        usage("No principals specified.")
-
     #
     # Get configuration
     #
@@ -190,15 +200,37 @@
 
         os.umask(config.umask)
 
-        config.directory = getDirectory()
+        try:
+            config.directory = getDirectory()
+        except DirectoryError, e:
+            abort(e)
         autoDisableMemcached(config)
     except ConfigurationError, e:
         abort(e)
 
     #
+    # List principals
+    #
+    if listPrincipals:
+        if args:
+            usage("Too many arguments")
+
+        try:
+            print config.directory
+            for record in config.directory.listRecords(listPrincipals):
+                print record
+        except UnknownRecordTypeError, e:
+            usage(e)
+
+        return
+
+    #
     # Do a quick sanity check that arguments look like principal
     # identifiers.
     #
+    if not args:
+        usage("No principals specified.")
+
     for arg in args:
         try:
             principalForPrincipalID(arg, checkOnly=True)
@@ -208,7 +240,7 @@
     #
     # Start the reactor
     #
-    reactor.callLater(0, run, args, actions)
+    reactor.callLater(0, run, args, principalActions)
     reactor.run()
 
 @inlineCallbacks

Modified: CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/tools/util.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/tools/util.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/calendarserver/tools/util.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -131,10 +131,6 @@
     else:
         raise ValueError("Not a boolean: %s" % (arg,))
 
-
-
-
-
 def autoDisableMemcached(config):
     """
     If memcached is not running, set config.Memcached.ClientEnabled to False

Modified: CalendarServer/branches/users/cdaboo/partition-4464/conf/auth/augments.dtd
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/conf/auth/augments.dtd	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/conf/auth/augments.dtd	2009-12-16 02:48:38 UTC (rev 4865)
@@ -16,7 +16,7 @@
 
 <!ELEMENT augments (record*) >
 
-  <!ELEMENT record (guid, enable, hosted-at?, enable-calendar?, auto-schedule?, cuaddr*)>
+  <!ELEMENT record (guid, enable, hosted-at?, enable-calendar?, auto-schedule?)>
     <!ATTLIST record repeat CDATA "1">
 
   <!ELEMENT guid              (#PCDATA)>
@@ -24,5 +24,4 @@
   <!ELEMENT hosted-at         (#PCDATA)>
   <!ELEMENT enable-calendar   (#PCDATA)>
   <!ELEMENT auto-schedule     (#PCDATA)>
-  <!ELEMENT cuaddr            (#PCDATA)>
 >

Modified: CalendarServer/branches/users/cdaboo/partition-4464/conf/caldavd-apple.plist
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/conf/caldavd-apple.plist	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/conf/caldavd-apple.plist	2009-12-16 02:48:38 UTC (rev 4865)
@@ -377,6 +377,10 @@
     <key>SSLCertificate</key>
     <string></string>
 
+    <!-- SSL authority chain (for intermediate certs) -->
+    <key>SSLAuthorityChain</key>
+    <string></string>
+
     <!-- Private key -->
     <key>SSLPrivateKey</key>
     <string></string>

Modified: CalendarServer/branches/users/cdaboo/partition-4464/conf/caldavd-test.plist
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/conf/caldavd-test.plist	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/conf/caldavd-test.plist	2009-12-16 02:48:38 UTC (rev 4865)
@@ -416,6 +416,10 @@
     <key>SSLCertificate</key>
     <string>twistedcaldav/test/data/server.pem</string>
 
+    <!-- SSL authority chain (for intermediate certs) -->
+    <key>SSLAuthorityChain</key>
+    <string></string>
+
     <!-- Private key -->
     <key>SSLPrivateKey</key>
     <string>twistedcaldav/test/data/server.pem</string>
@@ -438,19 +442,6 @@
     <dict>
       <key>ProcessCount</key>
       <integer>2</integer> <!-- 0 = larger of: 4 or (2 * CPU count) -->
-
-      <key>LoadBalancer</key>
-      <dict>
-        <!--
-            Valid values are:
-            - LeastConnections
-            - RoundRobin
-            - LeastConnectionsAndRoundRobin
-          -->
-        <key>Scheduler</key>
-        <string>LeastConnections</string>
-      </dict>
-
     </dict>
 
 
@@ -719,22 +710,6 @@
     </dict>
 
 
-    <!--
-        Python Director
-      -->
-
-    <key>PythonDirector</key>
-    <dict>
-      <key>pydir</key>
-      <string>../pydirector-1.0.0/pydir.py</string>
-
-      <key>ConfigFile</key>
-      <string>conf/pydir.xml</string>
-
-      <key>ControlSocket</key>
-      <string>logs/caldavd-pydir.sock</string>
-    </dict>
-
     <key>Localization</key>
     <dict>
       <key>LocalesDirectory</key>

Modified: CalendarServer/branches/users/cdaboo/partition-4464/conf/caldavd.plist
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/conf/caldavd.plist	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/conf/caldavd.plist	2009-12-16 02:48:38 UTC (rev 4865)
@@ -365,6 +365,10 @@
     <key>SSLCertificate</key>
     <string></string>
 
+    <!-- SSL authority chain (for intermediate certs) -->
+    <key>SSLAuthorityChain</key>
+    <string></string>
+
     <!-- Private key -->
     <key>SSLPrivateKey</key>
     <string></string>

Deleted: CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/DirectoryService-Apache.txt
===================================================================
--- CalendarServer/trunk/doc/Admin/DirectoryService-Apache.txt	2009-12-11 19:55:47 UTC (rev 4858)
+++ CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/DirectoryService-Apache.txt	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,112 +0,0 @@
-Apache Directory Services
-=========================
-
-**WARNING:** *This directory service implementation is experimental,
-incomplete and not supported.*
-
-The Apache directory services provide principal information that is
-read from configuration files in the `same formats`_ as used by the
-`Apache HTTP server`_, allowing you to easily share user and group
-information with an Apache server.
-
-.. _same formats: http://httpd.apache.org/docs/2.3/howto/auth.html
-.. _Apache HTTP server: http://httpd.apache.org/
-
-The Apache directory services provide principal information for users
-and groups. They do not provide principal information for locations or
-resources.
-
-Configuring the Calendar Server
--------------------------------
-
-The full name of the service is either
-``twistedcaldav.directory.apache.BasicDirectoryService`` or
-``twistedcaldav.directory.apache.DigestDirectoryService``. These
-services implement `basic and digest HTTP authentication`_,
-respectively.
-
-.. _basic and digest HTTP authentication: http://www.ietf.org/rfc/rfc2617.txt
-
-Both services take a ``userFile`` parameter which contains the name of
-the file to read user principal information from and an optional
-``groupFile`` parameter which contains the name of the file to read
-group principal information from.
-
-For example, if you are using digest:
-
-::
-
-  <!--  Apache-style Digest Directory Service -->
-  <key>DirectoryService</key>
-  <dict>
-    <key>type</key>
-    <string>twistedcaldav.directory.apache.DigestDirectoryService</string>
-  
-    <key>params</key>
-    <dict>
-      <key>userFile</key>
-      <string>conf/digest</string>
-      <key>groupFile</key>
-      <string>conf/group</string>
-    </dict>
-  </dict>
-
-The service re-reads the user and group files if either file's
-timestamp changes, so edits to the files do not require a server
-restart.
-
-Note that basic authentication is highly insecure because it sends
-password information in plain text over the network (where is may be
-intercepted) and should not be enabled on a server unless all
-connections are somehow secured by another means, such as by enabling
-SSL and disabling non-SSL connections.
-
-Configuring Principals
-----------------------
-
-In the case of ``BasicDirectoryService``, the user file must be in the
-form generated by the Apache ``htpasswd`` command; in the case of
-``DigestDirectoryService``, the user file must be in the form
-generated by the Apache ``htdigest`` command.
-
-Both user file formats contain a single entry per line, with fields
-separated by the colon (``:``) character. The basic format has two
-fields, one containing a user identifier and the second containing the
-user's password in the UNIX crypt format. The digest format has three
-fields: a user identifier, a realm name, and the user's hashed
-password.
-
-An example basic user file:
-
-::
-
-  wsanchez:Cytm0Bwm7CPJs
-  cdaboo:I.Ef5FJl5GVh2
-  dreid:LVhqAv4qSrYPs
-  lecroy:/7/5VDrkrLxY.
-
-And an example digest user file:
-
-::
-
-  wsanchez:Test:decbe233ab3d997cacc2fc058b19db8c
-  cdaboo:Test:61164bf3d607d072fe8a7ac420b24aac
-  dreid:Test:8ee67801004b2752f72b84e7064889a6
-  lecroy:Test:60d4feb424430953be045738041e51be
-
-The group file is in a similar format, with one entry of
-colon-separated field per line. Each line has two fields: a group
-identifier, and a comma- (``,``) separated list of user identifiers
-which identify the members of the group.
-
-And example group file:
-
-::
-
-  managers: lecroy
-  grunts: wsanchez, cdaboo, dreid
-  right_coast: cdaboo
-  left_coast: wsanchez, dreid, lecroy
-
-The user files should be edited using the ``htpasswd`` and
-``htdigest`` tools. The group file is typically edited by hand.

Copied: CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/DirectoryService-Apache.txt (from rev 4858, CalendarServer/trunk/doc/Admin/DirectoryService-Apache.txt)
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/DirectoryService-Apache.txt	                        (rev 0)
+++ CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/DirectoryService-Apache.txt	2009-12-16 02:48:38 UTC (rev 4865)
@@ -0,0 +1,112 @@
+Apache Directory Services
+=========================
+
+**WARNING:** *This directory service implementation is experimental,
+incomplete and not supported.*
+
+The Apache directory services provide principal information that is
+read from configuration files in the `same formats`_ as used by the
+`Apache HTTP server`_, allowing you to easily share user and group
+information with an Apache server.
+
+.. _same formats: http://httpd.apache.org/docs/2.3/howto/auth.html
+.. _Apache HTTP server: http://httpd.apache.org/
+
+The Apache directory services provide principal information for users
+and groups. They do not provide principal information for locations or
+resources.
+
+Configuring the Calendar Server
+-------------------------------
+
+The full name of the service is either
+``twistedcaldav.directory.apache.BasicDirectoryService`` or
+``twistedcaldav.directory.apache.DigestDirectoryService``. These
+services implement `basic and digest HTTP authentication`_,
+respectively.
+
+.. _basic and digest HTTP authentication: http://www.ietf.org/rfc/rfc2617.txt
+
+Both services take a ``userFile`` parameter which contains the name of
+the file to read user principal information from and an optional
+``groupFile`` parameter which contains the name of the file to read
+group principal information from.
+
+For example, if you are using digest:
+
+::
+
+  <!--  Apache-style Digest Directory Service -->
+  <key>DirectoryService</key>
+  <dict>
+    <key>type</key>
+    <string>twistedcaldav.directory.apache.DigestDirectoryService</string>
+  
+    <key>params</key>
+    <dict>
+      <key>userFile</key>
+      <string>conf/digest</string>
+      <key>groupFile</key>
+      <string>conf/group</string>
+    </dict>
+  </dict>
+
+The service re-reads the user and group files if either file's
+timestamp changes, so edits to the files do not require a server
+restart.
+
+Note that basic authentication is highly insecure because it sends
+password information in plain text over the network (where is may be
+intercepted) and should not be enabled on a server unless all
+connections are somehow secured by another means, such as by enabling
+SSL and disabling non-SSL connections.
+
+Configuring Principals
+----------------------
+
+In the case of ``BasicDirectoryService``, the user file must be in the
+form generated by the Apache ``htpasswd`` command; in the case of
+``DigestDirectoryService``, the user file must be in the form
+generated by the Apache ``htdigest`` command.
+
+Both user file formats contain a single entry per line, with fields
+separated by the colon (``:``) character. The basic format has two
+fields, one containing a user identifier and the second containing the
+user's password in the UNIX crypt format. The digest format has three
+fields: a user identifier, a realm name, and the user's hashed
+password.
+
+An example basic user file:
+
+::
+
+  wsanchez:Cytm0Bwm7CPJs
+  cdaboo:I.Ef5FJl5GVh2
+  dreid:LVhqAv4qSrYPs
+  lecroy:/7/5VDrkrLxY.
+
+And an example digest user file:
+
+::
+
+  wsanchez:Test:decbe233ab3d997cacc2fc058b19db8c
+  cdaboo:Test:61164bf3d607d072fe8a7ac420b24aac
+  dreid:Test:8ee67801004b2752f72b84e7064889a6
+  lecroy:Test:60d4feb424430953be045738041e51be
+
+The group file is in a similar format, with one entry of
+colon-separated field per line. Each line has two fields: a group
+identifier, and a comma- (``,``) separated list of user identifiers
+which identify the members of the group.
+
+And example group file:
+
+::
+
+  managers: lecroy
+  grunts: wsanchez, cdaboo, dreid
+  right_coast: cdaboo
+  left_coast: wsanchez, dreid, lecroy
+
+The user files should be edited using the ``htpasswd`` and
+``htdigest`` tools. The group file is typically edited by hand.

Deleted: CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/DirectoryService-OpenDirectory.txt
===================================================================
--- CalendarServer/trunk/doc/Admin/DirectoryService-OpenDirectory.txt	2009-12-11 19:55:47 UTC (rev 4858)
+++ CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/DirectoryService-OpenDirectory.txt	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,44 +0,0 @@
-Open Directory Service
-======================
-
-The Open Directory directory service provides principal information
-that is obtained using Apple's Open Directory service.
-
-Open Directory provides principal information for users, groups,
-locations, and resources.
-
-For more information about configuring Open Directory and running Open
-Directory services, see Apple's `Open Directory Administration`_
-document.
-
-.. _Open Directory Administration: http://images.apple.com/server/macosx/docs/Open_Directory_Admin_v10.6.pdf
-
-Configuring the Calendar Server
--------------------------------
-
-The full name of the service is
-``twistedcaldav.directory.appleopendirectory.OpenDirectoryService``
-and the service takes a ``node`` parameter which contains the name of
-the directory node to bind to.
-
-For example:
-
-::
-
-  <!-- Open Directory Service -->
-  <key>DirectoryService</key>
-  <dict>
-    <key>type</key>
-    <string>twistedcaldav.directory.appleopendirectory.OpenDirectoryService</string>
-  
-    <key>params</key>
-    <dict>
-      <key>node</key>
-      <string>/Search</string>
-    </dict>
-  </dict>
-
-The special Open Directory node ``/Search`` causes the server to use
-the default directory search path that the host system the server is
-running on is configured to use. To bind to a specific LDAP service, a
-node in the form ``/LDAPv3/ldapserver.example.com`` may be specified.

Copied: CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/DirectoryService-OpenDirectory.txt (from rev 4858, CalendarServer/trunk/doc/Admin/DirectoryService-OpenDirectory.txt)
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/DirectoryService-OpenDirectory.txt	                        (rev 0)
+++ CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/DirectoryService-OpenDirectory.txt	2009-12-16 02:48:38 UTC (rev 4865)
@@ -0,0 +1,44 @@
+Open Directory Service
+======================
+
+The Open Directory directory service provides principal information
+that is obtained using Apple's Open Directory service.
+
+Open Directory provides principal information for users, groups,
+locations, and resources.
+
+For more information about configuring Open Directory and running Open
+Directory services, see Apple's `Open Directory Administration`_
+document.
+
+.. _Open Directory Administration: http://images.apple.com/server/macosx/docs/Open_Directory_Admin_v10.6.pdf
+
+Configuring the Calendar Server
+-------------------------------
+
+The full name of the service is
+``twistedcaldav.directory.appleopendirectory.OpenDirectoryService``
+and the service takes a ``node`` parameter which contains the name of
+the directory node to bind to.
+
+For example:
+
+::
+
+  <!-- Open Directory Service -->
+  <key>DirectoryService</key>
+  <dict>
+    <key>type</key>
+    <string>twistedcaldav.directory.appleopendirectory.OpenDirectoryService</string>
+  
+    <key>params</key>
+    <dict>
+      <key>node</key>
+      <string>/Search</string>
+    </dict>
+  </dict>
+
+The special Open Directory node ``/Search`` causes the server to use
+the default directory search path that the host system the server is
+running on is configured to use. To bind to a specific LDAP service, a
+node in the form ``/LDAPv3/ldapserver.example.com`` may be specified.

Deleted: CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/DirectoryService-XML.txt
===================================================================
--- CalendarServer/trunk/doc/Admin/DirectoryService-XML.txt	2009-12-11 19:55:47 UTC (rev 4858)
+++ CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/DirectoryService-XML.txt	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,159 +0,0 @@
-XML Directory Service
-=====================
-
-The XML directory service provides principal information that is read
-from an XML file.
-
-The XML file provides principal information for users, groups,
-locations, and resources.
-
-One advantage to this directory service implementation is that it does
-not require a networked directory server to be running somewhere,
-instead simply relying on a file.
-
-Configuring the Calendar Server
--------------------------------
-
-The full name of the service is
-``twistedcaldav.directory.xmlfile.XMLDirectoryService`` and the
-service takes an ``xmlFile`` parameter which contains the name of the
-XML file to read principal information from.
-
-For example:
-
-::
-
-  <!--  XML File Directory Service -->
-  <key>DirectoryService</key>
-  <dict>
-    <key>type</key>
-    <string>twistedcaldav.directory.xmlfile.XMLDirectoryService</string>
-
-    <key>params</key>
-    <dict>
-      <key>xmlFile</key>
-      <string>/etc/caldavd/accounts.xml</string>
-    </dict>
-  </dict>
-
-The service re-reads the XML file if it's timestamp changes, so edits
-to the XML file do not require a server restart.
-
-Configuring Principals
-----------------------
-
-Principals are expressed in an XML document. The root element
-``accounts`` has an attribute ``realm`` which describes the
-authentication realm. It contains principal elements which in turn
-contain elements describing the principal. The element itself
-(``user``, ``group``, ``location``, ``resource``) denotes the
-principal type.
-
-Principal elements can contain the following elements which provide
-information about the principal:
-
-``uid``
-
-  The login identifier for the principal (ie. "user name" or "short
-  name").
-
-``guid``
-
-  A globally unique identifier for the principal. Must be a UUID
-  string that complies with `RFC 4122`_.
-
-  .. _RFC 4122: http://tools.ietf.org/html/rfc4122
-
-``password``
-
-  The principal's password in plain text.
-
-``name``
-
-  The principal's full name (or description).
-
-``members``
-
-  A list of uids for the principals which are members of the principal
-  being defined. Only group principals may have members. The
-  ``members`` element has ``member`` sub-elements used to specify each
-  member. The member element has a type attribute that defines the
-  principal type of the member (one of ``users``, ``groups``,
-  ``locations`` and ``resources``), and the text value inside the
-  ``member`` element is the corresponding uid of the principal being
-  referenced. Any principal may be a member of a group, including
-  other groups. One should avoid creating "loops" by having two groups
-  include each other.
-
-``cuaddr``
-
-  A "calendar user address" for the principal. Principals may have
-  multiple calendar user addresses, but a calendar user addresses must
-  be unique to one principal. A calendar user address must be a URI_.
-
-  .. _URI: http://tools.ietf.org/html/rfc2396
-
-  Note that calendar user addresses here supplement any calendar user
-  addresses that are assigned by the server based on other principal
-  information.
-  
-``disable-calendar``
-
-  When present, this element indicates that the principal is able to
-  login to the calendar server, but is not provided a calendar home
-  and therefore cannot do scheduling. This type of principal is
-  typically used to allow access to the calendars of other principals
-  or other data on the server. This element may only pecified for user
-  principals.
-
-``auto-schedule``
-
-  Indicates that the server will automatically process scheduling
-  messages for the corresponding principal. For example, when a
-  scheduling message arrives, if it does not conflict with an existing
-  meeting it will be automatically accepted into the principal's main
-  calendar; if it does conflict it will be automatically
-  declined. This element can only be defined on location and resource
-  principals.
-
-``proxies``
-
-  Contains a list of ``member`` elements that define which other
-  principals have read-write proxy access to the corresponding
-  principal's calendar data.
-
-An example:
-
-::
-
-  <?xml version="1.0" encoding="utf-8"?>
-  <accounts realm="Test Realm">
-    <user>
-      <uid>admin</uid>
-      <password>admin</password>
-      <name>Super User</name>
-    </user>
-    <user>
-      <uid>test</uid>
-      <password>test</password>
-      <name>Test User</name>
-      <cuaddr>mailto:testuser at example.com</cuaddr>
-    </user>
-    <group>
-      <uid>users</uid>
-      <password>users</password>
-      <name>Users Group</name>
-      <members>
-        <member type="users">test</member>
-      </members>
-    </group>
-    <location>
-      <uid>mercury</uid>
-      <password>mercury</password>
-      <name>Mecury Conference Room, Building 1, 2nd Floor</name>
-      <auto-schedule/>
-      <proxies>
-        <member type="users">test</member>
-      </proxies>
-    </location>
-  </accounts>

Copied: CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/DirectoryService-XML.txt (from rev 4858, CalendarServer/trunk/doc/Admin/DirectoryService-XML.txt)
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/DirectoryService-XML.txt	                        (rev 0)
+++ CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/DirectoryService-XML.txt	2009-12-16 02:48:38 UTC (rev 4865)
@@ -0,0 +1,159 @@
+XML Directory Service
+=====================
+
+The XML directory service provides principal information that is read
+from an XML file.
+
+The XML file provides principal information for users, groups,
+locations, and resources.
+
+One advantage to this directory service implementation is that it does
+not require a networked directory server to be running somewhere,
+instead simply relying on a file.
+
+Configuring the Calendar Server
+-------------------------------
+
+The full name of the service is
+``twistedcaldav.directory.xmlfile.XMLDirectoryService`` and the
+service takes an ``xmlFile`` parameter which contains the name of the
+XML file to read principal information from.
+
+For example:
+
+::
+
+  <!--  XML File Directory Service -->
+  <key>DirectoryService</key>
+  <dict>
+    <key>type</key>
+    <string>twistedcaldav.directory.xmlfile.XMLDirectoryService</string>
+
+    <key>params</key>
+    <dict>
+      <key>xmlFile</key>
+      <string>/etc/caldavd/accounts.xml</string>
+    </dict>
+  </dict>
+
+The service re-reads the XML file if it's timestamp changes, so edits
+to the XML file do not require a server restart.
+
+Configuring Principals
+----------------------
+
+Principals are expressed in an XML document. The root element
+``accounts`` has an attribute ``realm`` which describes the
+authentication realm. It contains principal elements which in turn
+contain elements describing the principal. The element itself
+(``user``, ``group``, ``location``, ``resource``) denotes the
+principal type.
+
+Principal elements can contain the following elements which provide
+information about the principal:
+
+``uid``
+
+  The login identifier for the principal (ie. "user name" or "short
+  name").
+
+``guid``
+
+  A globally unique identifier for the principal. Must be a UUID
+  string that complies with `RFC 4122`_.
+
+  .. _RFC 4122: http://tools.ietf.org/html/rfc4122
+
+``password``
+
+  The principal's password in plain text.
+
+``name``
+
+  The principal's full name (or description).
+
+``members``
+
+  A list of uids for the principals which are members of the principal
+  being defined. Only group principals may have members. The
+  ``members`` element has ``member`` sub-elements used to specify each
+  member. The member element has a type attribute that defines the
+  principal type of the member (one of ``users``, ``groups``,
+  ``locations`` and ``resources``), and the text value inside the
+  ``member`` element is the corresponding uid of the principal being
+  referenced. Any principal may be a member of a group, including
+  other groups. One should avoid creating "loops" by having two groups
+  include each other.
+
+``cuaddr``
+
+  A "calendar user address" for the principal. Principals may have
+  multiple calendar user addresses, but a calendar user addresses must
+  be unique to one principal. A calendar user address must be a URI_.
+
+  .. _URI: http://tools.ietf.org/html/rfc2396
+
+  Note that calendar user addresses here supplement any calendar user
+  addresses that are assigned by the server based on other principal
+  information.
+  
+``disable-calendar``
+
+  When present, this element indicates that the principal is able to
+  login to the calendar server, but is not provided a calendar home
+  and therefore cannot do scheduling. This type of principal is
+  typically used to allow access to the calendars of other principals
+  or other data on the server. This element may only pecified for user
+  principals.
+
+``auto-schedule``
+
+  Indicates that the server will automatically process scheduling
+  messages for the corresponding principal. For example, when a
+  scheduling message arrives, if it does not conflict with an existing
+  meeting it will be automatically accepted into the principal's main
+  calendar; if it does conflict it will be automatically
+  declined. This element can only be defined on location and resource
+  principals.
+
+``proxies``
+
+  Contains a list of ``member`` elements that define which other
+  principals have read-write proxy access to the corresponding
+  principal's calendar data.
+
+An example:
+
+::
+
+  <?xml version="1.0" encoding="utf-8"?>
+  <accounts realm="Test Realm">
+    <user>
+      <uid>admin</uid>
+      <password>admin</password>
+      <name>Super User</name>
+    </user>
+    <user>
+      <uid>test</uid>
+      <password>test</password>
+      <name>Test User</name>
+      <cuaddr>mailto:testuser at example.com</cuaddr>
+    </user>
+    <group>
+      <uid>users</uid>
+      <password>users</password>
+      <name>Users Group</name>
+      <members>
+        <member type="users">test</member>
+      </members>
+    </group>
+    <location>
+      <uid>mercury</uid>
+      <password>mercury</password>
+      <name>Mecury Conference Room, Building 1, 2nd Floor</name>
+      <auto-schedule/>
+      <proxies>
+        <member type="users">test</member>
+      </proxies>
+    </location>
+  </accounts>

Deleted: CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/DirectoryServices.txt
===================================================================
--- CalendarServer/trunk/doc/Admin/DirectoryServices.txt	2009-12-11 19:55:47 UTC (rev 4858)
+++ CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/DirectoryServices.txt	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,93 +0,0 @@
-Directory Services
-==================
-
-The Calendar Server needs to be able to obtain information about the
-users, groups and resources ("principals") which access and/or have a
-presence on the server.
-
-About Principals
-----------------
-
-All principals have a "principal resource" on the server which
-represents the principal in the form of an HTTP resource. This is
-useful for obtaining information about a principal, such as the URL of
-the principal's calendar home, the principal's members and/or
-memberships, and so on. This information is exposed via WebDAV
-properties on the principal resource.
-
-Principals can be used to configure access controls for resources on
-the server by granting or denying various privileges to the principal.
-Privileges granted or denied to group principals are also granted or
-denied to all members of the group.
-
-Some principals (often, but not necessarily all) are also given a
-calendar home collection on the server, in which the principal may
-have one or more calendar collections, as well as special collections
-which allow the principals to schedule meetings with others, and so
-on.
-
-The Role of a Directory Service
--------------------------------
-
-A "directory service" is simply an entity which contains information
-about principals.
-
-Directory services are interchangeable, which allows the server to
-obtain this information from a variety of data stores, such as
-configuration files or network directory systems like LDAP.
-
-Most directory services refer to principals as "records" in their
-databases. Internally, Calendar Server will map records from a
-directory service to WebDAV principals.
-
-A given directory service may classify records into "types" such as
-users, groups, resources, and so on. Calendar Server keeps this
-distinction, and some types are treated specially.
-
-Principal types commonly provided by directory services include:
-
-users
-
-  Individual (typically human) users of the system.
-
-groups
-
-  Principals that contain other principals ("members"). Members can be
-  principals of any type, including other group principals.
-
-locations
-
-  Locations that can be scheduled.
-
-resources
-
-  Other resources (eg. projectors) which can be scheduled.
-
-For example, only user principals are allowed to authenticate with
-(log into) the server. Only group principals have members, and group
-principals do not have calendars.
-
-
-Configuration
-=============
-
-The directory service used by the server is configured in the
-``caldavd.plist`` file by specifying the directory service
-implementation to use, as well as its configuration options. Options
-are specified as a dictionary.
-
-The configuration syntax looks like this:
-
-::
-
-  <key>DirectoryService</key>
-  <dict>
-    <key>type</key>
-    <string>ExampleService</string>
-
-    <key>params</key>
-    <dict>
-      <key>option</key>
-      <string>value</string>
-    </dict>
-  </dict>

Copied: CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/DirectoryServices.txt (from rev 4858, CalendarServer/trunk/doc/Admin/DirectoryServices.txt)
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/DirectoryServices.txt	                        (rev 0)
+++ CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/DirectoryServices.txt	2009-12-16 02:48:38 UTC (rev 4865)
@@ -0,0 +1,93 @@
+Directory Services
+==================
+
+The Calendar Server needs to be able to obtain information about the
+users, groups and resources ("principals") which access and/or have a
+presence on the server.
+
+About Principals
+----------------
+
+All principals have a "principal resource" on the server which
+represents the principal in the form of an HTTP resource. This is
+useful for obtaining information about a principal, such as the URL of
+the principal's calendar home, the principal's members and/or
+memberships, and so on. This information is exposed via WebDAV
+properties on the principal resource.
+
+Principals can be used to configure access controls for resources on
+the server by granting or denying various privileges to the principal.
+Privileges granted or denied to group principals are also granted or
+denied to all members of the group.
+
+Some principals (often, but not necessarily all) are also given a
+calendar home collection on the server, in which the principal may
+have one or more calendar collections, as well as special collections
+which allow the principals to schedule meetings with others, and so
+on.
+
+The Role of a Directory Service
+-------------------------------
+
+A "directory service" is simply an entity which contains information
+about principals.
+
+Directory services are interchangeable, which allows the server to
+obtain this information from a variety of data stores, such as
+configuration files or network directory systems like LDAP.
+
+Most directory services refer to principals as "records" in their
+databases. Internally, Calendar Server will map records from a
+directory service to WebDAV principals.
+
+A given directory service may classify records into "types" such as
+users, groups, resources, and so on. Calendar Server keeps this
+distinction, and some types are treated specially.
+
+Principal types commonly provided by directory services include:
+
+users
+
+  Individual (typically human) users of the system.
+
+groups
+
+  Principals that contain other principals ("members"). Members can be
+  principals of any type, including other group principals.
+
+locations
+
+  Locations that can be scheduled.
+
+resources
+
+  Other resources (eg. projectors) which can be scheduled.
+
+For example, only user principals are allowed to authenticate with
+(log into) the server. Only group principals have members, and group
+principals do not have calendars.
+
+
+Configuration
+=============
+
+The directory service used by the server is configured in the
+``caldavd.plist`` file by specifying the directory service
+implementation to use, as well as its configuration options. Options
+are specified as a dictionary.
+
+The configuration syntax looks like this:
+
+::
+
+  <key>DirectoryService</key>
+  <dict>
+    <key>type</key>
+    <string>ExampleService</string>
+
+    <key>params</key>
+    <dict>
+      <key>option</key>
+      <string>value</string>
+    </dict>
+  </dict>

Deleted: CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/ExtendedLogItems.txt
===================================================================
--- CalendarServer/trunk/doc/Admin/ExtendedLogItems.txt	2009-12-11 19:55:47 UTC (rev 4858)
+++ CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/ExtendedLogItems.txt	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,73 +0,0 @@
-Apache-style Access Log Extensions
-==================================
-
-Calendar Server extends the Apache log file format it uses by:
-
- * Adding a "sub-method" to the HTTP method field.
- * Adding key-value pairs at the end of log lines.
-
-The sub-method is adding by appending the name of the sub-method in
-parentheses to the original HTTP request method.  This is used to
-clarify what operation is going on for HTTP methods that are commonly
-used to tunnel other operations, such as ``POST`` and ``REPORT``.  For
-example, CalDAV uses ``POST`` for free/busy lookups, and ``REPORT``
-can be used to make any sort of query.
-
-Key-value pairs are used to provide additional details about the
-request.  They are added to the end of the line as new fields in the
-form ``key=value``.
-
-These keys are always emitted:
-
-  ``i``
-
-    the port number of the server instance emitting the log
-
-  ``t``
-
-    the amount of time spent processing the request (in milliseconds).
-
-  ``or``
-
-    the number of outstanding requests enqueued for the server
-    instance emitting the log entry.
-
-Keys that may be emitted depending on the client request and server
-response include:
-
-  ``rcount``
-
-    the number of resources specified in a ``MULTIGET`` request.
-
-  ``responses``
-
-    the number of responses included in a ``multi-status`` response to
-    a ``PROPFIND`` request or a CalDAV ``calendar-query`` request.
-
-  ``recipients``
-
-    the number of recipients in a CalDAV scheduling request via
-    ``POST`` (which are typically only free/busy requests).
-
-  ``itip.requests``
-
-    the number of attendees in a scheduling operation triggered by an
-    Organizer.
-
-  ``itip.refreshes``
-
-    the number of attendee refreshes completed after a scheduling
-    operation.
-
-  ``itip.reply``
-
-    Either ``reply`` or ``cancel`` depending on...???
-
-In the following example, we see a ``CalDAV:calendar-multiget``
-``REPORT`` for 32 resources in a user's calendar, which was handled by
-instance ``8459`` in 183.0ms, with one outstanding request (the one
-being logged):
-
-::
-
-  17.108.160.37 - scastillo [15/Sep/2009:20:10:23 +0000] "REPORT(CalDAV:calendar-multiget) /calendars/__uids__/B8CE9430-965B-11DE-B626-EC2E9DB52B69/calendar/ HTTP/1.1" 207 149285 "-" "DAVKit/4.0 (729); CalendarStore/4.0 (965); iCal/4.0 (1362); Mac OS X/10.6.1 (10B504)" i=8459 t=183.0 or=1 rcount=32

Copied: CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/ExtendedLogItems.txt (from rev 4858, CalendarServer/trunk/doc/Admin/ExtendedLogItems.txt)
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/ExtendedLogItems.txt	                        (rev 0)
+++ CalendarServer/branches/users/cdaboo/partition-4464/doc/Admin/ExtendedLogItems.txt	2009-12-16 02:48:38 UTC (rev 4865)
@@ -0,0 +1,73 @@
+Apache-style Access Log Extensions
+==================================
+
+Calendar Server extends the Apache log file format it uses by:
+
+ * Adding a "sub-method" to the HTTP method field.
+ * Adding key-value pairs at the end of log lines.
+
+The sub-method is adding by appending the name of the sub-method in
+parentheses to the original HTTP request method.  This is used to
+clarify what operation is going on for HTTP methods that are commonly
+used to tunnel other operations, such as ``POST`` and ``REPORT``.  For
+example, CalDAV uses ``POST`` for free/busy lookups, and ``REPORT``
+can be used to make any sort of query.
+
+Key-value pairs are used to provide additional details about the
+request.  They are added to the end of the line as new fields in the
+form ``key=value``.
+
+These keys are always emitted:
+
+  ``i``
+
+    the port number of the server instance emitting the log
+
+  ``t``
+
+    the amount of time spent processing the request (in milliseconds).
+
+  ``or``
+
+    the number of outstanding requests enqueued for the server
+    instance emitting the log entry.
+
+Keys that may be emitted depending on the client request and server
+response include:
+
+  ``rcount``
+
+    the number of resources specified in a ``MULTIGET`` request.
+
+  ``responses``
+
+    the number of responses included in a ``multi-status`` response to
+    a ``PROPFIND`` request or a CalDAV ``calendar-query`` request.
+
+  ``recipients``
+
+    the number of recipients in a CalDAV scheduling request via
+    ``POST`` (which are typically only free/busy requests).
+
+  ``itip.requests``
+
+    the number of attendees in a scheduling operation triggered by an
+    Organizer.
+
+  ``itip.refreshes``
+
+    the number of attendee refreshes completed after a scheduling
+    operation.
+
+  ``itip.reply``
+
+    Either ``reply`` or ``cancel`` depending on...???
+
+In the following example, we see a ``CalDAV:calendar-multiget``
+``REPORT`` for 32 resources in a user's calendar, which was handled by
+instance ``8459`` in 183.0ms, with one outstanding request (the one
+being logged):
+
+::
+
+  17.108.160.37 - scastillo [15/Sep/2009:20:10:23 +0000] "REPORT(CalDAV:calendar-multiget) /calendars/__uids__/B8CE9430-965B-11DE-B626-EC2E9DB52B69/calendar/ HTTP/1.1" 207 149285 "-" "DAVKit/4.0 (729); CalendarStore/4.0 (965); iCal/4.0 (1362); Mac OS X/10.6.1 (10B504)" i=8459 t=183.0 or=1 rcount=32

Deleted: CalendarServer/branches/users/cdaboo/partition-4464/doc/Developer/twisted.cfg
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/doc/Developer/twisted.cfg	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/doc/Developer/twisted.cfg	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,7 +0,0 @@
-systemclass: pydoctor.twistedmodel.TwistedSystem
-htmlsourcebase: http://twistedmatrix.com/trac/browser/trunk
-htmlwriter: pydoctor.nevowhtml.NevowWriter
-projectname: Twisted
-htmloutput: ../../../Twisted/
-htmlusesorttable: True
-packages: ../../../Twisted/twisted

Deleted: CalendarServer/branches/users/cdaboo/partition-4464/doc/Developer/twistedcaldav.cfg
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/doc/Developer/twistedcaldav.cfg	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/doc/Developer/twistedcaldav.cfg	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,6 +0,0 @@
-packages: ../../twistedcaldav
-systemclass: pydoctor.twistedmodel.TwistedSystem
-htmlsourcebase: http://trac.macosforge.org/projects/collaboration/browser/CalendarServer/trunk
-htmlwriter: pydoctor.nevowhtml.NevowWriter
-projectname: TwistedCalDAV
-abbrevmapping: twistedcaldav=tcd


Property changes on: CalendarServer/branches/users/cdaboo/partition-4464/doc/Extensions/caldav-privatecomments.txt
___________________________________________________________________
Modified: svn:mergeinfo
   - /CalendarServer/branches/config-separation/doc/Extensions/caldav-privatecomments.txt:4379-4443
/CalendarServer/branches/users/cdaboo/attendee-comments-2886/doc/Extensions/caldav-privatecomments-00.txt:2887-2910
/CalendarServer/branches/users/cdaboo/byebye-serviceslocator-2937/doc/Extensions/caldav-privatecomments-00.txt:2938-3097
/CalendarServer/branches/users/cdaboo/implicit-if-match-3306/doc/Extensions/caldav-privatecomments.txt:3307-3349
/CalendarServer/branches/users/cdaboo/implicitauto-2947/doc/Extensions/caldav-privatecomments-00.txt:2948-2989
/CalendarServer/branches/users/cdaboo/location-partial-accept-3573/doc/Extensions/caldav-privatecomments.txt:3574-3581
/CalendarServer/branches/users/sagen/resource-delegates-4038/doc/Extensions/caldav-privatecomments.txt:4040-4067
/CalendarServer/branches/users/sagen/resource-delegates-4066/doc/Extensions/caldav-privatecomments.txt:4068-4075
   + /CalendarServer/branches/config-separation/doc/Extensions/caldav-privatecomments.txt:4379-4443
/CalendarServer/branches/users/cdaboo/attendee-comments-2886/doc/Extensions/caldav-privatecomments-00.txt:2887-2910
/CalendarServer/branches/users/cdaboo/byebye-serviceslocator-2937/doc/Extensions/caldav-privatecomments-00.txt:2938-3097
/CalendarServer/branches/users/cdaboo/implicit-if-match-3306/doc/Extensions/caldav-privatecomments.txt:3307-3349
/CalendarServer/branches/users/cdaboo/implicitauto-2947/doc/Extensions/caldav-privatecomments-00.txt:2948-2989
/CalendarServer/branches/users/cdaboo/location-partial-accept-3573/doc/Extensions/caldav-privatecomments.txt:3574-3581
/CalendarServer/branches/users/sagen/resource-delegates-4038/doc/Extensions/caldav-privatecomments.txt:4040-4067
/CalendarServer/branches/users/sagen/resource-delegates-4066/doc/Extensions/caldav-privatecomments.txt:4068-4075
/CalendarServer/trunk/doc/Extensions/caldav-privatecomments.txt:4465-4858


Property changes on: CalendarServer/branches/users/cdaboo/partition-4464/doc/Extensions/caldav-privatecomments.xml
___________________________________________________________________
Modified: svn:mergeinfo
   - /CalendarServer/branches/config-separation/doc/Extensions/caldav-privatecomments.xml:4379-4443
/CalendarServer/branches/users/cdaboo/attendee-comments-2886/doc/Extensions/caldav-privatecomments-00.xml:2887-2910
/CalendarServer/branches/users/cdaboo/byebye-serviceslocator-2937/doc/Extensions/caldav-privatecomments-00.xml:2938-3097
/CalendarServer/branches/users/cdaboo/implicit-if-match-3306/doc/Extensions/caldav-privatecomments.xml:3307-3349
/CalendarServer/branches/users/cdaboo/implicitauto-2947/doc/Extensions/caldav-privatecomments-00.xml:2948-2989
/CalendarServer/branches/users/cdaboo/location-partial-accept-3573/doc/Extensions/caldav-privatecomments.xml:3574-3581
/CalendarServer/branches/users/sagen/resource-delegates-4038/doc/Extensions/caldav-privatecomments.xml:4040-4067
/CalendarServer/branches/users/sagen/resource-delegates-4066/doc/Extensions/caldav-privatecomments.xml:4068-4075
   + /CalendarServer/branches/config-separation/doc/Extensions/caldav-privatecomments.xml:4379-4443
/CalendarServer/branches/users/cdaboo/attendee-comments-2886/doc/Extensions/caldav-privatecomments-00.xml:2887-2910
/CalendarServer/branches/users/cdaboo/byebye-serviceslocator-2937/doc/Extensions/caldav-privatecomments-00.xml:2938-3097
/CalendarServer/branches/users/cdaboo/implicit-if-match-3306/doc/Extensions/caldav-privatecomments.xml:3307-3349
/CalendarServer/branches/users/cdaboo/implicitauto-2947/doc/Extensions/caldav-privatecomments-00.xml:2948-2989
/CalendarServer/branches/users/cdaboo/location-partial-accept-3573/doc/Extensions/caldav-privatecomments.xml:3574-3581
/CalendarServer/branches/users/sagen/resource-delegates-4038/doc/Extensions/caldav-privatecomments.xml:4040-4067
/CalendarServer/branches/users/sagen/resource-delegates-4066/doc/Extensions/caldav-privatecomments.xml:4068-4075
/CalendarServer/trunk/doc/Extensions/caldav-privatecomments.xml:4465-4858


Property changes on: CalendarServer/branches/users/cdaboo/partition-4464/doc/Extensions/caldav-schedulingchanges.txt
___________________________________________________________________
Modified: svn:mergeinfo
   - /CalendarServer/branches/config-separation/doc/Extensions/caldav-schedulingchanges.txt:4379-4443
/CalendarServer/branches/users/cdaboo/attendee-comments-2886/doc/Extensions/caldav-schedulingchanges-01.txt:2887-2910
/CalendarServer/branches/users/cdaboo/byebye-serviceslocator-2937/doc/Extensions/caldav-schedulingchanges-01.txt:2938-3097
/CalendarServer/branches/users/cdaboo/implicit-if-match-3306/doc/Extensions/caldav-schedulingchanges.txt:3307-3349
/CalendarServer/branches/users/cdaboo/implicitauto-2947/doc/Extensions/caldav-schedulingchanges-01.txt:2948-2989
/CalendarServer/branches/users/cdaboo/location-partial-accept-3573/doc/Extensions/caldav-schedulingchanges.txt:3574-3581
/CalendarServer/branches/users/sagen/resource-delegates-4038/doc/Extensions/caldav-schedulingchanges.txt:4040-4067
/CalendarServer/branches/users/sagen/resource-delegates-4066/doc/Extensions/caldav-schedulingchanges.txt:4068-4075
   + /CalendarServer/branches/config-separation/doc/Extensions/caldav-schedulingchanges.txt:4379-4443
/CalendarServer/branches/users/cdaboo/attendee-comments-2886/doc/Extensions/caldav-schedulingchanges-01.txt:2887-2910
/CalendarServer/branches/users/cdaboo/byebye-serviceslocator-2937/doc/Extensions/caldav-schedulingchanges-01.txt:2938-3097
/CalendarServer/branches/users/cdaboo/implicit-if-match-3306/doc/Extensions/caldav-schedulingchanges.txt:3307-3349
/CalendarServer/branches/users/cdaboo/implicitauto-2947/doc/Extensions/caldav-schedulingchanges-01.txt:2948-2989
/CalendarServer/branches/users/cdaboo/location-partial-accept-3573/doc/Extensions/caldav-schedulingchanges.txt:3574-3581
/CalendarServer/branches/users/sagen/resource-delegates-4038/doc/Extensions/caldav-schedulingchanges.txt:4040-4067
/CalendarServer/branches/users/sagen/resource-delegates-4066/doc/Extensions/caldav-schedulingchanges.txt:4068-4075
/CalendarServer/trunk/doc/Extensions/caldav-schedulingchanges.txt:4465-4858


Property changes on: CalendarServer/branches/users/cdaboo/partition-4464/doc/Extensions/caldav-schedulingchanges.xml
___________________________________________________________________
Modified: svn:mergeinfo
   - /CalendarServer/branches/config-separation/doc/Extensions/caldav-schedulingchanges.xml:4379-4443
/CalendarServer/branches/users/cdaboo/attendee-comments-2886/doc/Extensions/caldav-schedulingchanges-01.xml:2887-2910
/CalendarServer/branches/users/cdaboo/byebye-serviceslocator-2937/doc/Extensions/caldav-schedulingchanges-01.xml:2938-3097
/CalendarServer/branches/users/cdaboo/implicit-if-match-3306/doc/Extensions/caldav-schedulingchanges.xml:3307-3349
/CalendarServer/branches/users/cdaboo/implicitauto-2947/doc/Extensions/caldav-schedulingchanges-01.xml:2948-2989
/CalendarServer/branches/users/cdaboo/location-partial-accept-3573/doc/Extensions/caldav-schedulingchanges.xml:3574-3581
/CalendarServer/branches/users/sagen/resource-delegates-4038/doc/Extensions/caldav-schedulingchanges.xml:4040-4067
/CalendarServer/branches/users/sagen/resource-delegates-4066/doc/Extensions/caldav-schedulingchanges.xml:4068-4075
   + /CalendarServer/branches/config-separation/doc/Extensions/caldav-schedulingchanges.xml:4379-4443
/CalendarServer/branches/users/cdaboo/attendee-comments-2886/doc/Extensions/caldav-schedulingchanges-01.xml:2887-2910
/CalendarServer/branches/users/cdaboo/byebye-serviceslocator-2937/doc/Extensions/caldav-schedulingchanges-01.xml:2938-3097
/CalendarServer/branches/users/cdaboo/implicit-if-match-3306/doc/Extensions/caldav-schedulingchanges.xml:3307-3349
/CalendarServer/branches/users/cdaboo/implicitauto-2947/doc/Extensions/caldav-schedulingchanges-01.xml:2948-2989
/CalendarServer/branches/users/cdaboo/location-partial-accept-3573/doc/Extensions/caldav-schedulingchanges.xml:3574-3581
/CalendarServer/branches/users/sagen/resource-delegates-4038/doc/Extensions/caldav-schedulingchanges.xml:4040-4067
/CalendarServer/branches/users/sagen/resource-delegates-4066/doc/Extensions/caldav-schedulingchanges.xml:4068-4075
/CalendarServer/trunk/doc/Extensions/caldav-schedulingchanges.xml:4465-4858

Modified: CalendarServer/branches/users/cdaboo/partition-4464/doc/RFC/draft-daboo-calendar-availability.txt
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/doc/RFC/draft-daboo-calendar-availability.txt	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/doc/RFC/draft-daboo-calendar-availability.txt	2009-12-16 02:48:38 UTC (rev 4865)
@@ -2,14 +2,14 @@
 
 
 Network Working Group                                           C. Daboo
-Internet-Draft                                            Apple Computer
+Internet-Draft                                                     Apple
 Intended status: Standards Track                         B. Desruisseaux
-Expires: May 18, 2007                                             Oracle
-                                                       November 14, 2006
+Expires: May 7, 2009                                              Oracle
+                                                        November 3, 2008
 
 
                          Calendar Availability
-                  draft-daboo-calendar-availability-00
+                  draft-daboo-calendar-availability-01
 
 Status of this Memo
 
@@ -34,12 +34,8 @@
    The list of Internet-Draft Shadow Directories can be accessed at
    http://www.ietf.org/shadow.html.
 
-   This Internet-Draft will expire on May 18, 2007.
+   This Internet-Draft will expire on May 7, 2009.
 
-Copyright Notice
-
-   Copyright (C) The Internet Society (2006).
-
 Abstract
 
    This document specifies a new iCalendar calendar component that
@@ -49,18 +45,18 @@
    requests, to generate repeating blocks of available or busy time with
    exceptions as needed.
 
+   This document also defines extensions to CalDAV calendar-access and
+   calendar-auto-schedule which specify how this new calendar component
+   should be used when doing free busy time evaluation in CalDAV.
 
 
 
-Daboo & Desruisseaux      Expires May 18, 2007                  [Page 1]
+
+Daboo & Desruisseaux       Expires May 7, 2009                  [Page 1]
 
-Internet-Draft            Calendar Availability            November 2006
+Internet-Draft            Calendar Availability            November 2008
 
 
-   This document also defines extensions to CalDAV calendar-access and
-   calendar-schedule which specify how this new calendar component
-   should be used when doing free busy time evaluation in CalDAV.
-
 Editorial Note (To be removed by RFC Editor before publication)
 
    Discussion of this specification is taking place on the mailing list
@@ -79,13 +75,17 @@
    5.  CalDAV Extensions  . . . . . . . . . . . . . . . . . . . . . . 11
      5.1.  CalDAV Requirements Overview . . . . . . . . . . . . . . . 11
      5.2.  New features in CalDAV . . . . . . . . . . . . . . . . . . 12
-   6.  Security Considerations  . . . . . . . . . . . . . . . . . . . 13
-   7.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 13
-   8.  Acknowledgments  . . . . . . . . . . . . . . . . . . . . . . . 13
-   9.  Normative References . . . . . . . . . . . . . . . . . . . . . 13
-   Appendix A.  Example Calendar #1 . . . . . . . . . . . . . . . . . 14
-   Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 16
-   Intellectual Property and Copyright Statements . . . . . . . . . . 17
+   6.  Security Considerations  . . . . . . . . . . . . . . . . . . . 15
+   7.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 15
+     7.1.  Component Registrations  . . . . . . . . . . . . . . . . . 15
+     7.2.  Property Registrations . . . . . . . . . . . . . . . . . . 15
+   8.  Acknowledgments  . . . . . . . . . . . . . . . . . . . . . . . 16
+   9.  Normative References . . . . . . . . . . . . . . . . . . . . . 16
+   Appendix A.  Example Calendar #1 . . . . . . . . . . . . . . . . . 16
+   Appendix B.  Change History (To be removed by RFC Editor
+                before publication) . . . . . . . . . . . . . . . . . 18
+   Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 18
+   Intellectual Property and Copyright Statements . . . . . . . . . . 19
 
 
 
@@ -108,16 +108,16 @@
 
 
 
-Daboo & Desruisseaux      Expires May 18, 2007                  [Page 2]
+Daboo & Desruisseaux       Expires May 7, 2009                  [Page 2]
 
-Internet-Draft            Calendar Availability            November 2006
+Internet-Draft            Calendar Availability            November 2008
 
 
 1.  Introduction
 
    Often calendar users have regular periods of time when they are
    either available to be scheduled or always unavailable.  For example,
-   an office worker will often wish to only appear free to her work
+   an office worker will often wish to only appear free to their work
    colleagues during normal 'office hours' (e.g., Monday through Friday,
    9 am through 5 pm).  Or, a university professor may only be available
    to students during a set period of time (e.g., Thursday afternoons, 2
@@ -127,31 +127,32 @@
    lookup for that user.  In addition it should be possible for
    different periods of available time to appear for different users.
 
-   However, iCalendar [RFC2445] does not provide a way to specify a
-   repeating period of available or unavailable time as "VFREEBUSY"
-   components cannot include any form of recurrence information, as
-   opposed to "VEVENT" components which can.  Since repeating patterns
-   are often the case, "VFREEBUSY" components are not sufficient to
-   solve this problem.
+   However, iCalendar [I-D.ietf-calsify-rfc2445bis] does not provide a
+   way to specify a repeating period of available or unavailable time as
+   "VFREEBUSY" components cannot include any form of recurrence
+   information, as opposed to "VEVENT" components which can.  Since
+   repeating patterns are often the case, "VFREEBUSY" components are not
+   sufficient to solve this problem.
 
    This specification defines a new type of iCalendar calendar component
    that can be used to publish user availability.
 
-   CalDAV provides a way for calendar users to access and manage
-   calendar data and exchange this data via scheduling operations.  As
-   part of this the CalDAV calendar-access [I-D.dusseault-caldav]
+   CalDAV [RFC4791] provides a way for calendar users to access and
+   manage calendar data and exchange this data via scheduling
+   operations.  As part of this the CalDAV calendar-access [RFC4791]
    feature provides a CALDAV:free-busy-query REPORT that returns free-
    busy information for a calendar collection or hierarchy of calendar
-   collections.  Also, the CalDAV calendar-schedule
+   collections.  Also, the CalDAV calendar-auto-schedule
    [I-D.desruisseaux-caldav-sched] feature allows free-busy information
    for a calendar user to be determined.  Both of these operations
    involve examining user calendars for events that 'block time', with
    the blocked out periods being returned in a "VFREEBUSY" component.
 
    This specification extends the CalDAV calendar-access and CalDAV
-   calendar-schedule features to allow the new iCalendar availability
-   components to be stored and manipulated, and to allow free-busy
-   lookups to use the information from any such components, if present.
+   calendar-auto-schedule features to allow the new iCalendar
+   availability components to be stored and manipulated, and to allow
+   free-busy lookups to use the information from any such components, if
+   present.
 
 
 2.  Conventions Used in This Document
@@ -163,10 +164,9 @@
 
 
 
-
-Daboo & Desruisseaux      Expires May 18, 2007                  [Page 3]
+Daboo & Desruisseaux       Expires May 7, 2009                  [Page 3]
 
-Internet-Draft            Calendar Availability            November 2006
+Internet-Draft            Calendar Availability            November 2008
 
 
    When XML element types in the namespaces "DAV:" and
@@ -212,23 +212,24 @@
                             ; the following are OPTIONAL,
                             ; but MUST NOT occur more than once
 
-                            busytype / created / dtstart / last-mod /
-                            organizer / seq / summary / url /
+                            busytype / created / dtend /dtstart /
+                            last-mod / organizer / seq / summary / url /
 
-                            ; either 'dtend' or 'duration' may appear
-                            ; in a 'availabilityprop', but 'dtend' and
+                            ; 'duration' is OPTIONAL in a
+                            ;  'availabilityprop' but MUST only be
 
 
 
-Daboo & Desruisseaux      Expires May 18, 2007                  [Page 4]
+Daboo & Desruisseaux       Expires May 7, 2009                  [Page 4]
 
-Internet-Draft            Calendar Availability            November 2006
+Internet-Draft            Calendar Availability            November 2008
 
 
-                            ; 'duration' MUST NOT occur in the same
-                            ; 'availabilityprop'
+                            ; present if 'dtstart' is also present and
+                            ; 'dtend' is not present, and it MUST NOT
+                            ; occur more than once
 
-                            dtend / duration /
+                            duration /
 
                             ; the following are OPTIONAL,
                             ; and MAY occur more than once
@@ -248,7 +249,7 @@
 
                          dtstamp / dtstart / uid /
 
-                         ; either a 'dtend' or a 'duration' is required
+                         ; either a 'dtend' or a 'duration' is REQUIRED
                          ; in a 'availableprop', but 'dtend' and
                          ; 'duration' MUST NOT occur in the same
                          ; 'availableprop', and each MUST NOT occur more
@@ -275,18 +276,17 @@
 
 
 
-
-Daboo & Desruisseaux      Expires May 18, 2007                  [Page 5]
+Daboo & Desruisseaux       Expires May 7, 2009                  [Page 5]
 
-Internet-Draft            Calendar Availability            November 2006
+Internet-Draft            Calendar Availability            November 2008
 
 
    Description:  A "VAVAILABILITY" component indicates a period of time
       within which availability information is provided.  A
       "VAVAILABILITY" component MUST specify a start time and optionally
       an end time or duration.  Within that time period, availability
-      defaults to a free-busy type of "BUSY", except for any time
-      periods corresponding to "AVAILABLE" sub-components.
+      defaults to a free-busy type of "BUSY-UNAVAILABLE", except for any
+      time periods corresponding to "AVAILABLE" sub-components.
 
       "AVAILABLE" sub-components are used to indicate periods of free
       time within the time range of the enclosing "VAVAILABILITY"
@@ -304,7 +304,7 @@
       "VAVAILABILITY" component or any of its "AVAILABLE" sub-
       components, and that property includes a "TZID" parameter, then
       the iCalendar object containing the "VAVAILABILITY" component MUST
-      contain "VTIMEZONE" components corresponding to each "TZID"
+      contain "VTIMEZONE" components corresponding to each unique "TZID"
       parameter value.
 
       When used to publish available time, the "ORGANIZER" property
@@ -332,9 +332,9 @@
 
 
 
-Daboo & Desruisseaux      Expires May 18, 2007                  [Page 6]
+Daboo & Desruisseaux       Expires May 7, 2009                  [Page 6]
 
-Internet-Draft            Calendar Availability            November 2006
+Internet-Draft            Calendar Availability            November 2008
 
 
       The following is an example of a "VAVAILABILITY" calendar
@@ -388,9 +388,9 @@
 
 
 
-Daboo & Desruisseaux      Expires May 18, 2007                  [Page 7]
+Daboo & Desruisseaux       Expires May 7, 2009                  [Page 7]
 
-Internet-Draft            Calendar Availability            November 2006
+Internet-Draft            Calendar Availability            November 2008
 
 
         BEGIN:VAVAILABILITY
@@ -444,9 +444,9 @@
 
 
 
-Daboo & Desruisseaux      Expires May 18, 2007                  [Page 8]
+Daboo & Desruisseaux       Expires May 7, 2009                  [Page 8]
 
-Internet-Draft            Calendar Availability            November 2006
+Internet-Draft            Calendar Availability            November 2008
 
 
    Property Name:  BUSYTYPE
@@ -491,18 +491,18 @@
 
    An iCalendar "VFREEBUSY" component is used to convey "rolled-up"
    free-busy time information for a calendar user.  This can be
-   generated as the result of an iTIP "VFREEBUSY" [RFC2446] request or
-   through some other mechanism (e.g., a CalDAV calendar-access CALDAV:
-   free-busy-query REPORT).
+   generated as the result of an iTIP "VFREEBUSY"
+   [I-D.ietf-calsify-2446bis] request or through some other mechanism
+   (e.g., a CalDAV calendar-access CALDAV:free-busy-query REPORT).
 
    When a "VAVAILABILITY" component is present and intersects the time-
    range for the free-busy request, the time covered by the
 
 
 
-Daboo & Desruisseaux      Expires May 18, 2007                  [Page 9]
+Daboo & Desruisseaux       Expires May 7, 2009                  [Page 9]
 
-Internet-Draft            Calendar Availability            November 2006
+Internet-Draft            Calendar Availability            November 2008
 
 
    "VAVAILABILITY" component is set to busy and then portions of it
@@ -556,9 +556,9 @@
 
 
 
-Daboo & Desruisseaux      Expires May 18, 2007                 [Page 10]
+Daboo & Desruisseaux       Expires May 7, 2009                 [Page 10]
 
-Internet-Draft            Calendar Availability            November 2006
+Internet-Draft            Calendar Availability            November 2008
 
 
      +-----------+--------------------------------------------------+
@@ -601,28 +601,32 @@
    This section lists what functionality is required of a CalDAV server
    which supports this extension.  A server:
 
-   o  MUST support CalDAV calendar-access;
-
-   o  MAY support CalDAV calendar-schedule;
-
    o  MUST support "VAVAILABILITY" components in a calendar collection
-      resource;
+      resource if the CALDAV calendar-access feature is supported;
 
+   o  MUST support CALDAV:free-busy-query REPORTs that aggregate the
+      information in any "VAVAILABILITY" components;
 
+   o  MUST support "VAVAILABILITY" components stored in a CALDAV:inbox-
+      availability WebDAV property on a CALDAV scheduling inbox
 
 
 
-Daboo & Desruisseaux      Expires May 18, 2007                 [Page 11]
+Daboo & Desruisseaux       Expires May 7, 2009                 [Page 11]
 
-Internet-Draft            Calendar Availability            November 2006
+Internet-Draft            Calendar Availability            November 2008
 
 
-   o  MUST support CALDAV:free-busy-query REPORTs that aggregate the
-      information in any "VAVAILABILITY" components;
+      collection if the CALDAV calendar-auto-schedule feature is
+      supported;
 
-   o  MUST support CalDAV calendar-schedule iTIP [RFC2446] free busy
-      requests that aggregate the information in any "VAVAILABILITY"
-      components, if the CalDAV calendar-schedule feature is available.
+   o  MUST support iTIP [I-D.ietf-calsify-2446bis] free busy requests
+      that aggregate the information in any "VAVAILABILITY" components
+      in calendar collections that contribute to free-busy, or in any
+      "VAVAILABILITY" components stored in the CALDAV:calendar-
+      availability in the CALDAV scheduling inbox collection of the
+      calendar user targeted by the iTIP free-busy request, if the
+      CalDAV calendar-auto-schedule feature is available.
 
 5.2.  New features in CalDAV
 
@@ -659,101 +663,171 @@
    collection "/home/bernard/calendars/" supports the new features
    defined in this specification.
 
+
+
+
+
+
+Daboo & Desruisseaux       Expires May 7, 2009                 [Page 12]
+
+Internet-Draft            Calendar Availability            November 2008
+
+
 5.2.2.  CALDAV:free-busy-query REPORT
 
    A CALDAV:free-busy-query REPORT can be executed on a calendar
    collection that contains iCalendar "VAVAILABILITY" components.  When
    that is done, the server MUST aggregate the information in any
    "VAVAILABILITY" components when generating the free-busy response, as
+   described in Section 4.
 
+5.2.3.  CALDAV:calendar-availability Property
 
+   Name:  calendar-availability
 
-Daboo & Desruisseaux      Expires May 18, 2007                 [Page 12]
-
-Internet-Draft            Calendar Availability            November 2006
+   Namespace:  urn:ietf:params:xml:ns:caldav
 
+   Purpose:  Defines a "VAVAILABILITY" component that will be used in
+      calculating free-busy time when an iTIP VFREEBUSY request is
+      targetted at the calendar user who owns the Inbox.
 
-   described in Section 4.
+   Conformance:  This property MAY be protected and SHOULD NOT be
+      returned by a PROPFIND allprop request (as defined in Section
+      12.14.1 of [RFC2518]).  Support for this property is REQUIRED.
+      The value of this property MUST be a valid iCalendar object
+      containing a single "VAVAILABILITY" component.
 
-5.2.3.  iTIP VFREEBUSY requests
+   Description:  This property allows a user to specify their
+      availability by including a VAVAILABILITY component in the value
+      of this property.  If present, the server MUST use the
+      "VAVAILABILITY" component in the value of this property when
+      determining free-busy information as part of an iTIP VFREEBUSY
+      requested being handled by the server.
 
-   The [I-D.desruisseaux-caldav-sched] processing of a "VFREEBUSY"
-   request targeted at the owner of the CALDAV:schedule-inbox will
-   include free-busy information derived from "VAVAILABILITY" components
-   in any calendar collection targeted during the request, as described
-   in Section 4.
+   Definition:
 
+      <!ELEMENT calendar-availability (#PCDATA) >
+      ; Data value MUST be iCalendar object containing a
+      ; "VAVAILABILITY" component.
 
-6.  Security Considerations
+   Example:
 
-   Free-busy information generated from "VAVAILABILITY" components MUST
-   NOT include information other than busy or free time periods.  In
-   particular, user specified property values such as "SUMMARY" and
-   "DESCRIPTION" MUST NOT be copied into the free-busy result data.
 
-   Beyond this, this specification does not add any additional security
-   issues that are not already present in [RFC2445] and [RFC2446].
 
 
-7.  IANA Considerations
 
-   TBD - register new components using 2445bis templates.
 
 
-8.  Acknowledgments
 
-   This specification came about via discussions at the Calendaring and
-   Scheduling Consortium.
 
 
-9.  Normative References
 
-   [I-D.desruisseaux-caldav-sched]
-              Daboo, C., Desruisseaux, B., and L. Dusseault, "Scheduling
-              Extensions to CalDAV", draft-desruisseaux-caldav-sched-02
-              (work in progress), June 2006.
 
-   [I-D.dusseault-caldav]
-              Daboo, C., Desruisseaux, B., and L. Dusseault,
-              "Calendaring Extensions to WebDAV (CalDAV)",
-              draft-dusseault-caldav-15 (work in progress),
-              September 2006.
 
-   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
-              Requirement Levels", BCP 14, RFC 2119, March 1997.
+Daboo & Desruisseaux       Expires May 7, 2009                 [Page 13]
+
+Internet-Draft            Calendar Availability            November 2008
 
 
+       <C:calendar-availability xmlns:D="DAV:"
+                            xmlns:C="urn:ietf:params:xml:ns:caldav"
+       >BEGIN:VCALENDAR
+       CALSCALE:GREGORIAN
+       PRODID:-//example.com//iCalendar 2.0//EN
+       VERSION:2.0
+       BEGIN:VTIMEZONE
+       LAST-MODIFIED:20040110T032845Z
+       TZID:America/Montreal
+       BEGIN:DAYLIGHT
+       DTSTART:20000404T020000
+       RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+       TZNAME:EDT
+       TZOFFSETFROM:-0500
+       TZOFFSETTO:-0400
+       END:DAYLIGHT
+       BEGIN:STANDARD
+       DTSTART:20001026T020000
+       RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+       TZNAME:EST
+       TZOFFSETFROM:-0400
+       TZOFFSETTO:-0500
+       END:STANDARD
+       END:VTIMEZONE
+       BEGIN:VEVENT
+       DTSTAMP:20061113T044111Z
+       DTSTART;TZID=America/Montreal:20061106T120000
+       DURATION:PT1H
+       SUMMARY:Meeting
+       UID:60A48841ECB90F3F215FE3D2 at example.com
+       END:VEVENT
+       BEGIN:VAVAILABILITY
+       UID:20061005T133225Z-00001 at example.com
+       DTSTAMP:20061005T133225Z
+       DTSTART;TZID=America/Montreal:20061002T000000
+       BEGIN:AVAILABLE
+       UID:20061005T133225Z-00001-A at example.com
+       SUMMARY:Monday to Friday from 9:00 to 18:00
+       DTSTART;TZID=America/Montreal:20061002T090000
+       DTEND;TZID=America/Montreal:20061002T180000
+       RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR
+       END:AVAILABLE
+       END:VAVAILABILITY
+       END:VCALENDAR
+       </C:calendar-availability>
 
-Daboo & Desruisseaux      Expires May 18, 2007                 [Page 13]
-
-Internet-Draft            Calendar Availability            November 2006
 
 
-   [RFC2445]  Dawson, F. and D. Stenerson, "Internet Calendaring and
-              Scheduling Core Object Specification (iCalendar)",
-              RFC 2445, November 1998.
 
-   [RFC2446]  Silverberg, S., Mansour, S., Dawson, F., and R. Hopson,
-              "iCalendar Transport-Independent Interoperability Protocol
-              (iTIP) Scheduling Events, BusyTime, To-dos and Journal
-              Entries", RFC 2446, November 1998.
 
 
-Appendix A.  Example Calendar #1
+Daboo & Desruisseaux       Expires May 7, 2009                 [Page 14]
+
+Internet-Draft            Calendar Availability            November 2008
 
 
+5.2.4.  iTIP VFREEBUSY requests
 
+   The [I-D.desruisseaux-caldav-sched] processing of a "VFREEBUSY"
+   request targeted at the owner of the CALDAV:schedule-inbox will
+   include free-busy information derived from "VAVAILABILITY" components
+   in any calendar collection targeted during the request, as described
+   in Section 4.  In addition, any "VAVAILABILITY" component specified
+   in the CALDAV:calendar-availability property on the owner's Inbox,
+   MUST be included in the free-busy calculation.
 
 
+6.  Security Considerations
 
+   Free-busy information generated from "VAVAILABILITY" components MUST
+   NOT include information other than busy or free time periods.  In
+   particular, user specified property values such as "SUMMARY" and
+   "DESCRIPTION" MUST NOT be copied into the free-busy result data.
 
+   Beyond this, this specification does not add any additional security
+   issues that are not already present in [I-D.ietf-calsify-rfc2445bis]
+   and [I-D.ietf-calsify-2446bis].
 
 
+7.  IANA Considerations
 
+7.1.  Component Registrations
 
+   This documents defines the following new iCalendar components to be
+   added to the registry defined in Section 8.2.2 of
+   [I-D.ietf-calsify-rfc2445bis]:
 
+            +---------------+---------+----------------------+
+            | Component     | Status  | Reference            |
+            +---------------+---------+----------------------+
+            | VAVAILABILITY | Current | RFCXXXX, Section 3.1 |
+            | AVAILABLE     | Current | RFCXXXX, Section 3.1 |
+            +---------------+---------+----------------------+
 
+7.2.  Property Registrations
 
+   This documents defines the following new iCalendar properties to be
+   added to the registry defined in Section 8.2.3 of
+   [I-D.ietf-calsify-rfc2445bis]:
 
 
 
@@ -762,27 +836,65 @@
 
 
 
+Daboo & Desruisseaux       Expires May 7, 2009                 [Page 15]
+
+Internet-Draft            Calendar Availability            November 2008
 
 
+               +----------+---------+----------------------+
+               | Property | Status  | Reference            |
+               +----------+---------+----------------------+
+               | BUSYTYPE | Current | RFCXXXX, Section 3.2 |
+               +----------+---------+----------------------+
 
 
+8.  Acknowledgments
 
+   This specification came about via discussions at the Calendaring and
+   Scheduling Consortium.
 
 
+9.  Normative References
 
+   [I-D.desruisseaux-caldav-sched]
+              Daboo, C. and B. Desruisseaux, "CalDAV Scheduling
+              Extensions to WebDAV", draft-desruisseaux-caldav-sched-06
+              (work in progress), November 2008.
 
+   [I-D.ietf-calsify-2446bis]
+              Daboo, C., "iCalendar Transport-Independent
+              Interoperability Protocol (iTIP)",
+              draft-ietf-calsify-2446bis-08 (work in progress),
+              November 2008.
 
+   [I-D.ietf-calsify-rfc2445bis]
+              Desruisseaux, B., "Internet Calendaring and Scheduling
+              Core Object Specification (iCalendar)",
+              draft-ietf-calsify-rfc2445bis-09 (work in progress),
+              November 2008.
 
+   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
+              Requirement Levels", BCP 14, RFC 2119, March 1997.
 
+   [RFC2518]  Goland, Y., Whitehead, E., Faizi, A., Carter, S., and D.
+              Jensen, "HTTP Extensions for Distributed Authoring --
+              WEBDAV", RFC 2518, February 1999.
 
+   [RFC4791]  Daboo, C., Desruisseaux, B., and L. Dusseault,
+              "Calendaring Extensions to WebDAV (CalDAV)", RFC 4791,
+              March 2007.
 
 
+Appendix A.  Example Calendar #1
 
 
 
-Daboo & Desruisseaux      Expires May 18, 2007                 [Page 14]
+
+
+
+Daboo & Desruisseaux       Expires May 7, 2009                 [Page 16]
 
-Internet-Draft            Calendar Availability            November 2006
+Internet-Draft            Calendar Availability            November 2008
 
 
    iCalendar object
@@ -836,15 +948,30 @@
 
 
 
-Daboo & Desruisseaux      Expires May 18, 2007                 [Page 15]
+Daboo & Desruisseaux       Expires May 7, 2009                 [Page 17]
 
-Internet-Draft            Calendar Availability            November 2006
+Internet-Draft            Calendar Availability            November 2008
 
 
+Appendix B.  Change History (To be removed by RFC Editor before
+             publication)
+
+   Changes from -00:
+
+   1.  Allow property on Inbox for caldav-schedule.
+
+   2.  Clarify that DURATION can only be present in VAVAILABILITY if
+       DTSTART is also present, and DTEND is not.
+
+   3.  Updated references.
+
+   4.  Added templates.
+
+
 Authors' Addresses
 
    Cyrus Daboo
-   Apple Computer, Inc.
+   Apple Inc.
    1 Infinite Loop
    Cupertino, CA  95014
    USA
@@ -877,29 +1004,14 @@
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Daboo & Desruisseaux      Expires May 18, 2007                 [Page 16]
+Daboo & Desruisseaux       Expires May 7, 2009                 [Page 18]
 
-Internet-Draft            Calendar Availability            November 2006
+Internet-Draft            Calendar Availability            November 2008
 
 
 Full Copyright Statement
 
-   Copyright (C) The Internet Society (2006).
+   Copyright (C) The IETF Trust (2008).
 
    This document is subject to the rights, licenses and restrictions
    contained in BCP 78, and except as set forth therein, the authors
@@ -907,10 +1019,10 @@
 
    This document and the information contained herein are provided on an
    "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
-   OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
-   ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
-   INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
-   INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
+   OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
+   THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
+   OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
+   THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
    WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
 
 
@@ -939,14 +1051,14 @@
    ietf-ipr at ietf.org.
 
 
-Acknowledgment
 
-   Funding for the RFC Editor function is provided by the IETF
-   Administrative Support Activity (IASA).
 
 
 
 
 
-Daboo & Desruisseaux      Expires May 18, 2007                 [Page 17]
+
+
+
+Daboo & Desruisseaux       Expires May 7, 2009                 [Page 19]
 

Deleted: CalendarServer/branches/users/cdaboo/partition-4464/doc/RFC/rfc2445-iCalendar.txt
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/doc/RFC/rfc2445-iCalendar.txt	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/doc/RFC/rfc2445-iCalendar.txt	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,8291 +0,0 @@
-
-
-
-
-
-
-Network Working Group                                         F. Dawson
-Request for Comments: 2445                                        Lotus
-Category: Standards Track                                  D. Stenerson
-                                                              Microsoft
-                                                          November 1998
-
-
-     Internet Calendaring and Scheduling Core Object Specification
-                              (iCalendar)
-
-Status of this Memo
-
-   This document specifies an Internet standards track protocol for the
-   Internet community, and requests discussion and suggestions for
-   improvements.  Please refer to the current edition of the "Internet
-   Official Protocol Standards" (STD 1) for the standardization state
-   and status of this protocol.  Distribution of this memo is unlimited.
-
-Copyright Notice
-
-   Copyright (C) The Internet Society (1998).  All Rights Reserved.
-
-Abstract
-
-   There is a clear need to provide and deploy interoperable calendaring
-   and scheduling services for the Internet. Current group scheduling
-   and Personal Information Management (PIM) products are being extended
-   for use across the Internet, today, in proprietary ways. This memo
-   has been defined to provide the definition of a common format for
-   openly exchanging calendaring and scheduling information across the
-   Internet.
-
-   This memo is formatted as a registration for a MIME media type per
-   [RFC 2048]. However, the format in this memo is equally applicable
-   for use outside of a MIME message content type.
-
-   The proposed media type value is 'text/calendar'. This string would
-   label a media type containing calendaring and scheduling information
-   encoded as text characters formatted in a manner outlined below.
-
-   This MIME media type provides a standard content type for capturing
-   calendar event, to-do and journal entry information. It also can be
-   used to convey free/busy time information. The content type is
-   suitable as a MIME message entity that can be transferred over MIME
-   based email systems, using HTTP or some other Internet transport. In
-
-
-
-
-
-
-Dawson & Stenerson          Standards Track                     [Page 1]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   addition, the content type is useful as an object for interactions
-   between desktop applications using the operating system clipboard,
-   drag/drop or file systems capabilities.
-
-   This memo is based on the earlier work of the vCalendar specification
-   for the exchange of personal calendaring and scheduling information.
-   In order to avoid confusion with this referenced work, this memo is
-   to be known as the iCalendar specification.
-
-   This memo defines the format for specifying iCalendar object methods.
-   An iCalendar object method is a set of usage constraints for the
-   iCalendar object. For example, these methods might define scheduling
-   messages that request an event be scheduled, reply to an event
-   request, send a cancellation notice for an event, modify or replace
-   the definition of an event, provide a counter proposal for an
-   original event request, delegate an event request to another
-   individual, request free or busy time, reply to a free or busy time
-   request, or provide similar scheduling messages for a to-do or
-   journal entry calendar component. The iCalendar Transport-indendent
-   Interoperability Protocol (iTIP) defined in [ITIP] is one such
-   scheduling protocol.
-
-Table of Contents
-
-   1 Introduction.....................................................5
-   2 Basic Grammar and Conventions....................................6
-    2.1 Formatting Conventions .......................................7
-    2.2 Related Memos ................................................8
-    2.3 International Considerations .................................8
-   3 Registration Information.........................................8
-    3.1 Content Type .................................................8
-    3.2 Parameters ...................................................9
-    3.3 Content Header Fields .......................................10
-    3.4 Encoding Considerations .....................................10
-    3.5 Security Considerations .....................................10
-    3.6 Interoperability Considerations .............................11
-    3.7 Applications Which Use This Media Type ......................11
-    3.8 Additional Information ......................................11
-    3.9 Magic Numbers ...............................................11
-    3.10 File Extensions ............................................11
-    3.11 Contact for Further Information: ...........................12
-    3.12 Intended Usage .............................................12
-    3.13 Authors/Change Controllers .................................12
-   4 iCalendar Object Specification..................................13
-    4.1 Content Lines ...............................................13
-     4.1.1 List and Field Separators ................................16
-     4.1.2 Multiple Values ..........................................16
-     4.1.3 Binary Content ...........................................16
-
-
-
-Dawson & Stenerson          Standards Track                     [Page 2]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     4.1.4 Character Set ............................................17
-    4.2 Property Parameters .........................................17
-     4.2.1 Alternate Text Representation ............................18
-     4.2.2 Common Name ..............................................19
-     4.2.3 Calendar User Type .......................................20
-     4.2.4 Delegators ...............................................20
-     4.2.5 Delegatees ...............................................21
-     4.2.6 Directory Entry Reference ................................21
-     4.2.7 Inline Encoding ..........................................22
-     4.2.8 Format Type ..............................................23
-     4.2.9 Free/Busy Time Type ......................................23
-     4.2.10 Language ................................................24
-     4.2.11 Group or List Membership ................................25
-     4.2.12 Participation Status ....................................25
-     4.2.13 Recurrence Identifier Range .............................27
-     4.2.14 Alarm Trigger Relationship ..............................27
-     4.2.15 Relationship Type .......................................28
-     4.2.16 Participation Role ......................................29
-     4.2.17 RSVP Expectation ........................................29
-     4.2.18 Sent By .................................................30
-     4.2.19 Time Zone Identifier ....................................30
-     4.2.20 Value Data Types ........................................32
-    4.3 Property Value Data Types ...................................32
-     4.3.1 Binary ...................................................33
-     4.3.2 Boolean ..................................................33
-     4.3.3 Calendar User Address ....................................34
-     4.3.4 Date .....................................................34
-     4.3.5 Date-Time ................................................35
-     4.3.6 Duration .................................................37
-     4.3.7 Float ....................................................38
-     4.3.8 Integer ..................................................38
-     4.3.9 Period of Time ...........................................39
-     4.3.10 Recurrence Rule .........................................40
-     4.3.11 Text ....................................................45
-     4.3.12 Time ....................................................47
-     4.3.13 URI .....................................................49
-     4.3.14 UTC Offset ..............................................49
-    4.4 iCalendar Object ............................................50
-    4.5 Property ....................................................51
-    4.6 Calendar Components .........................................51
-     4.6.1 Event Component ..........................................52
-     4.6.2 To-do Component ..........................................55
-     4.6.3 Journal Component ........................................56
-     4.6.4 Free/Busy Component ......................................58
-     4.6.5 Time Zone Component ......................................60
-     4.6.6 Alarm Component ..........................................67
-    4.7 Calendar Properties .........................................73
-     4.7.1 Calendar Scale ...........................................73
-
-
-
-Dawson & Stenerson          Standards Track                     [Page 3]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     4.7.2 Method ...................................................74
-     4.7.3 Product Identifier .......................................75
-     4.7.4 Version ..................................................76
-    4.8 Component Properties ........................................77
-     4.8.1 Descriptive Component Properties .........................77
-       4.8.1.1 Attachment ...........................................77
-       4.8.1.2 Categories ...........................................78
-       4.8.1.3 Classification .......................................79
-       4.8.1.4 Comment ..............................................80
-       4.8.1.5 Description ..........................................81
-       4.8.1.6 Geographic Position ..................................82
-       4.8.1.7 Location .............................................84
-       4.8.1.8 Percent Complete .....................................85
-       4.8.1.9 Priority .............................................85
-       4.8.1.10 Resources ...........................................87
-       4.8.1.11 Status ..............................................88
-       4.8.1.12 Summary .............................................89
-     4.8.2 Date and Time Component Properties .......................90
-       4.8.2.1 Date/Time Completed ..................................90
-       4.8.2.2 Date/Time End ........................................91
-       4.8.2.3 Date/Time Due ........................................92
-       4.8.2.4 Date/Time Start ......................................93
-       4.8.2.5 Duration .............................................94
-       4.8.2.6 Free/Busy Time .......................................95
-       4.8.2.7 Time Transparency ....................................96
-     4.8.3 Time Zone Component Properties ...........................97
-       4.8.3.1 Time Zone Identifier .................................97
-       4.8.3.2 Time Zone Name .......................................98
-       4.8.3.3 Time Zone Offset From ................................99
-       4.8.3.4 Time Zone Offset To .................................100
-       4.8.3.5 Time Zone URL .......................................101
-     4.8.4 Relationship Component Properties .......................102
-       4.8.4.1 Attendee ............................................102
-       4.8.4.2 Contact .............................................104
-       4.8.4.3 Organizer ...........................................106
-       4.8.4.4 Recurrence ID .......................................107
-       4.8.4.5 Related To ..........................................109
-       4.8.4.6 Uniform Resource Locator ............................110
-       4.8.4.7 Unique Identifier ...................................111
-     4.8.5 Recurrence Component Properties .........................112
-       4.8.5.1 Exception Date/Times ................................112
-       4.8.5.2 Exception Rule ......................................114
-       4.8.5.3 Recurrence Date/Times ...............................115
-       4.8.5.4 Recurrence Rule .....................................117
-     4.8.6 Alarm Component Properties ..............................126
-       4.8.6.1 Action ..............................................126
-       4.8.6.2 Repeat Count ........................................126
-       4.8.6.3 Trigger .............................................127
-
-
-
-Dawson & Stenerson          Standards Track                     [Page 4]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     4.8.7 Change Management Component Properties ..................129
-       4.8.7.1 Date/Time Created ...................................129
-       4.8.7.2 Date/Time Stamp .....................................130
-       4.8.7.3 Last Modified .......................................131
-       4.8.7.4 Sequence Number .....................................131
-     4.8.8 Miscellaneous Component Properties ......................133
-       4.8.8.1 Non-standard Properties .............................133
-       4.8.8.2 Request Status ......................................134
-   5 iCalendar Object Examples......................................136
-   6 Recommended Practices..........................................140
-   7 Registration of Content Type Elements..........................141
-    7.1 Registration of New and Modified iCalendar Object Methods ..141
-    7.2 Registration of New Properties .............................141
-     7.2.1 Define the property .....................................142
-     7.2.2 Post the Property definition ............................143
-     7.2.3 Allow a comment period ..................................143
-     7.2.4 Submit the property for approval ........................143
-    7.3 Property Change Control ....................................143
-   8 References.....................................................144
-   9 Acknowledgments................................................145
-   10 Authors' and Chairs' Addresses................................146
-   11 Full Copyright Statement......................................148
-
-1 Introduction
-
-   The use of calendaring and scheduling has grown considerably in the
-   last decade. Enterprise and inter-enterprise business has become
-   dependent on rapid scheduling of events and actions using this
-   information technology. However, the longer term growth of
-   calendaring and scheduling, is currently limited by the lack of
-   Internet standards for the message content types that are central to
-   these knowledgeware applications. This memo is intended to progress
-   the level of interoperability possible between dissimilar calendaring
-   and scheduling applications. This memo defines a MIME content type
-   for exchanging electronic calendaring and scheduling information. The
-   Internet Calendaring and Scheduling Core Object Specification, or
-   iCalendar, allows for the capture and exchange of information
-   normally stored within a calendaring and scheduling application; such
-   as a Personal Information Manager (PIM) or a Group Scheduling
-   product.
-
-   The iCalendar format is suitable as an exchange format between
-   applications or systems. The format is defined in terms of a MIME
-   content type. This will enable the object to be exchanged using
-   several transports, including but not limited to SMTP, HTTP, a file
-   system, desktop interactive protocols such as the use of a memory-
-   based clipboard or drag/drop interactions, point-to-point
-   asynchronous communication, wired-network transport, or some form of
-
-
-
-Dawson & Stenerson          Standards Track                     [Page 5]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   unwired transport such as infrared might also be used.
-
-   The memo also provides for the definition of iCalendar object methods
-   that will map this content type to a set of messages for supporting
-   calendaring and scheduling operations such as requesting, replying
-   to, modifying, and canceling meetings or appointments, to-dos and
-   journal entries. The iCalendar object methods can be used to define
-   other calendaring and scheduling operations such a requesting for and
-   replying with free/busy time data. Such a scheduling protocol is
-   defined in the iCalendar Transport-independent Interoperability
-   Protocol (iTIP) defined in [ITIP].
-
-   The memo also includes a formal grammar for the content type based on
-   the Internet ABNF defined in [RFC 2234]. This ABNF is required for
-   the implementation of parsers and to serve as the definitive
-   reference when ambiguities or questions arise in interpreting the
-   descriptive prose definition of the memo.
-
-2 Basic Grammar and Conventions
-
-   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
-   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY" and
-   "OPTIONAL" in this document are to be interoperated as described in
-   [RFC 2119].
-
-   This memo makes use of both a descriptive prose and a more formal
-   notation for defining the calendaring and scheduling format.
-
-   The notation used in this memo is the ABNF notation of [RFC 2234].
-   Readers intending on implementing this format defined in this memo
-   should be familiar with this notation in order to properly interpret
-   the specifications of this memo.
-
-   All numeric and hexadecimal values used in this memo are given in
-   decimal notation.
-
-   All names of properties, property parameters, enumerated property
-   values and property parameter values are case-insensitive. However,
-   all other property values are case-sensitive, unless otherwise
-   stated.
-
-        Note: All indented editorial notes, such as this one, are
-        intended to provide the reader with additional information. The
-        information is not essential to the building of an
-        implementation conformant with this memo. The information is
-        provided to highlight a particular feature or characteristic of
-        the memo.
-
-
-
-
-Dawson & Stenerson          Standards Track                     [Page 6]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   The format for the iCalendar object is based on the syntax of the
-   [RFC 2425] content type. While the iCalendar object is not a profile
-   of the [RFC 2425] content type, it does reuse a number of the
-   elements from the [RFC 2425] specification.
-
-2.1 Formatting Conventions
-
-   The mechanisms defined in this memo are defined in prose. Many of the
-   terms used to describe these have common usage that is different than
-   the standards usage of this memo. In order to reference within this
-   memo elements of the calendaring and scheduling model, core object
-   (this memo) or interoperability protocol [ITIP] some formatting
-   conventions have been used. Calendaring and scheduling roles are
-   referred to in quoted-strings of text with the first character of
-   each word in upper case. For example, "Organizer" refers to a role of
-   a "Calendar User" within the scheduling protocol defined by [ITIP].
-   Calendar components defined by this memo are referred to with
-   capitalized, quoted-strings of text. All calendar components start
-   with the letter "V". For example, "VEVENT" refers to the event
-   calendar component, "VTODO" refers to the to-do calendar component
-   and "VJOURNAL" refers to the daily journal calendar component.
-   Scheduling methods defined by [ITIP] are referred to with
-   capitalized, quoted-strings of text. For example, "REQUEST" refers to
-   the method for requesting a scheduling calendar component be created
-   or modified, "REPLY" refers to the method a recipient of a request
-   uses to update their status with the "Organizer" of the calendar
-   component.
-
-   The properties defined by this memo are referred to with capitalized,
-   quoted-strings of text, followed by the word "property". For example,
-   "ATTENDEE" property refers to the iCalendar property used to convey
-   the calendar address of a calendar user. Property parameters defined
-   by this memo are referred to with lowercase, quoted-strings of text,
-   followed by the word "parameter". For example, "value" parameter
-   refers to the iCalendar property parameter used to override the
-   default data type for a property value. Enumerated values defined by
-   this memo are referred to with capitalized text, either alone or
-   followed by the word "value". For example, the "MINUTELY" value can
-   be used with the "FREQ" component of the "RECUR" data type to specify
-   repeating components based on an interval of one minute or more.
-
-
-
-
-
-
-
-
-
-
-
-Dawson & Stenerson          Standards Track                     [Page 7]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-2.2 Related Memos
-
-   Implementers will need to be familiar with several other memos that,
-   along with this memo, form a framework for Internet calendaring and
-   scheduling standards. This memo, [ICAL], specifies a core
-   specification of objects, data types, properties and property
-   parameters.
-
-   [ITIP] - specifies an interoperability protocol for scheduling
-   between different implementations;
-
-   [IMIP] specifies an Internet email binding for [ITIP].
-
-   This memo does not attempt to repeat the specification of concepts or
-   definitions from these other memos. Where possible, references are
-   made to the memo that provides for the specification of these
-   concepts or definitions.
-
-2.3 International Considerations
-
-   In the rest of this document, descriptions of characters are of the
-   form "character name (codepoint)", where "codepoint" is from the US-
-   ASCII character set. The "character name" is the authoritative
-   description; (codepoint) is a reference to that character in US-ASCII
-   or US-ASCII compatible sets (for example the ISO-8859-x family, UTF-
-   8, ISO-2022-xx, KOI8-R). If a non-US-ASCII compatible character set
-   is used, appropriate code-point from that character set MUST be
-   chosen instead. Use of non-US-ASCII-compatible character sets is NOT
-   recommended.
-
-3  Registration Information
-
-   The Calendaring and Scheduling Core Object Specification is intended
-   for use as a MIME content type. However, the implementation of the
-   memo is in no way limited solely as a MIME content type.
-
-3.1 Content Type
-
-   The following text is intended to register this memo as the MIME
-   content type "text/calendar".
-
-     To: ietf-types at uninett.no
-
-     Subject: Registration of MIME content type text/calendar.
-
-     MIME media type name: text
-
-     MIME subtype name: calendar
-
-
-
-Dawson & Stenerson          Standards Track                     [Page 8]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-3.2 Parameters
-
-   Required parameters: none
-
-   Optional parameters: charset, method, component and optinfo
-
-   The "charset" parameter is defined in [RFC 2046] for other body
-   parts. It is used to identify the default character set used within
-   the body part.
-
-   The "method" parameter is used to convey the iCalendar object method
-   or transaction semantics for the calendaring and scheduling
-   information. It also is an identifier for the restricted set of
-   properties and values that the iCalendar object consists of. The
-   parameter is to be used as a guide for applications interpreting the
-   information contained within the body part. It SHOULD NOT be used to
-   exclude or require particular pieces of information unless the
-   identified method definition specifically calls for this behavior.
-   Unless specifically forbidden by a particular method definition, a
-   text/calendar content type can contain any set of properties
-   permitted by the Calendaring and Scheduling Core Object
-   Specification. The "method" parameter MUST be the same value as that
-   specified in the "METHOD" component property in the iCalendar object.
-   If one is present, the other MUST also be present.
-
-   The value for the "method" parameter is defined as follows:
-
-        method  = 1*(ALPHA / DIGIT / "-")
-        ; IANA registered iCalendar object method
-
-   The "component" parameter conveys the type of iCalendar calendar
-   component within the body part. If the iCalendar object contains more
-   than one calendar component type, then multiple component parameters
-   MUST be specified.
-
-   The value for the "component" parameter is defined as follows:
-
-        component       = ("VEVENT" / "VTODO" / "VJOURNAL" / "VFREEBUSY"
-                        / "VTIMEZONE" / x-name / iana-token)
-
-   The "optinfo" parameter conveys optional information about the
-   iCalendar object within the body part. This parameter can only
-   specify semantics already specified by the iCalendar object and that
-   can be otherwise determined by parsing the body part. In addition,
-   the optional information specified by this parameter MUST be
-   consistent with that information specified by the iCalendar object.
-   For example, it can be used to convey the "Attendee" response status
-   to a meeting request. The parameter value consists of a string value.
-
-
-
-Dawson & Stenerson          Standards Track                     [Page 9]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   The parameter can be specified multiple times.
-
-   This parameter MAY only specify semantics already specified by the
-   iCalendar object and that can be otherwise determined by parsing the
-   body part.
-
-   The value for the "optinfo" parameter is defined as follows:
-
-        optinfo = infovalue / qinfovalue
-
-        infovalue       = iana-token / x-name
-
-        qinfovalue      = DQUOTE (infovalue) DQUOTE
-
-3.3 Content Header Fields
-
-   Optional content header fields: Any header fields defined by [RFC
-   2045].
-
-3.4 Encoding Considerations
-
-   This MIME content type can contain 8bit characters, so the use of
-   quoted-printable or BASE64 MIME content-transfer-encodings might be
-   necessary when iCalendar objects are transferred across protocols
-   restricted to the 7bit repertoire. Note that a text valued property
-   in the content entity can also have content encoding of special
-   characters using a BACKSLASH character (US-ASCII decimal 92)
-   escapement technique. This means that content values can end up
-   encoded twice.
-
-3.5 Security Considerations
-
-   SPOOFING - - In this memo, the "Organizer" is the only person
-   authorized to make changes to an existing "VEVENT", "VTODO",
-   "VJOURNAL" calendar component and redistribute the updates to the
-   "Attendees". An iCalendar object that maliciously changes or cancels
-   an existing "VEVENT", "VTODO" or "VJOURNAL" or "VFREEBUSY" calendar
-   component might be constructed by someone other than the "Organizer"
-   and sent to the "Attendees". In addition in this memo, other than the
-   "Organizer", an "Attendee" of a "VEVENT", "VTODO", "VJOURNAL"
-   calendar component is the only other person authorized to update any
-   parameter associated with their "ATTENDEE" property and send it to
-   the "Organizer". An iCalendar object that maliciously changes the
-   "ATTENDEE" parameters can be constructed by someone other than the
-   real "Attendee" and sent to the "Organizer".
-
-
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 10]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   PROCEDURAL ALARMS - - An iCalendar object can be created that
-   contains a "VEVENT" and "VTODO" calendar component with "VALARM"
-   calendar components. The "VALARM" calendar component can be of type
-   PROCEDURE and can have an attachment containing some sort of
-   executable program. Implementations that incorporate these types of
-   alarms are subject to any virus or malicious attack that might occur
-   as a result of executing the attachment.
-
-   ATTACHMENTS - - An iCalendar object can include references to Uniform
-   Resource Locators that can be programmed resources.
-
-   Implementers and users of this memo should be aware of the network
-   security implications of accepting and parsing such information. In
-   addition, the security considerations observed by implementations of
-   electronic mail systems should be followed for this memo.
-
-3.6 Interoperability Considerations
-
-   This MIME content type is intended to define a common format for
-   conveying calendaring and scheduling information between different
-   systems. It is heavily based on the earlier [VCAL] industry
-   specification.
-
-3.7 Applications Which Use This Media Type
-
-   This content-type is designed for widespread use by Internet
-   calendaring and scheduling applications. In addition, applications in
-   the workflow and document management area might find this content-
-   type applicable. The [ITIP] and [IMIP] Internet protocols directly
-   use this content-type also. Future work on an Internet calendar
-   access protocol will utilize this content-type too.
-
-3.8 Additional Information
-
-   This memo defines this content-type.
-
-3.9 Magic Numbers
-
-   None.
-
-3.10 File Extensions
-
-   The file extension of "ics" is to be used to designate a file
-   containing (an arbitrary set of) calendaring and scheduling
-   information consistent with this MIME content type.
-
-
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 11]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   The file extension of "ifb" is to be used to designate a file
-   containing free or busy time information consistent with this MIME
-   content type.
-
-   Macintosh file type codes: The file type code of "iCal" is to be used
-   in Apple MacIntosh operating system environments to designate a file
-   containing calendaring and scheduling information consistent with
-   this MIME media type.
-
-   The file type code of "iFBf" is to be used in Apple MacIntosh
-   operating system environments to designate a file containing free or
-   busy time information consistent with this MIME media type.
-
-3.11 Contact for Further Information:
-
-   Frank Dawson
-   6544 Battleford Drive
-   Raleigh, NC 27613-3502
-   919-676-9515 (Telephone)
-   919-676-9564 (Data/Facsimile)
-   Frank_Dawson at Lotus.com (Internet Mail)
-
-   Derik Stenerson
-   One Microsoft Way
-   Redmond, WA  98052-6399
-   425-936-5522 (Telephone)
-   425-936-7329 (Facsimile)
-   deriks at microsoft.com (Internet Mail)
-
-3.12 Intended Usage
-
-   COMMON
-
-3.13 Authors/Change Controllers
-
-   Frank Dawson
-   6544 Battleford Drive
-   Raleigh, NC 27613-3502
-   919-676-9515 (Telephone)
-   919-676-9564 (Data/Facsimile)
-   Frank_Dawson at Lotus.com (Internet Mail)
-
-   Derik Stenerson
-   One Microsoft Way
-   Redmond, WA  98052-6399
-   425-936-5522 (Telephone)
-   425-936-7329 (Facsimile)
-   deriks at microsoft.com (Internet Mail)
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 12]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-4 iCalendar Object Specification
-
-   The following sections define the details of a Calendaring and
-   Scheduling Core Object Specification. This information is intended to
-   be an integral part of the MIME content type registration. In
-   addition, this information can be used independent of such content
-   registration. In particular, this memo has direct applicability for
-   use as a calendaring and scheduling exchange format in file-, memory-
-   or network-based transport mechanisms.
-
-4.1 Content Lines
-
-   The iCalendar object is organized into individual lines of text,
-   called content lines. Content lines are delimited by a line break,
-   which is a CRLF sequence (US-ASCII decimal 13, followed by US-ASCII
-   decimal 10).
-
-   Lines of text SHOULD NOT be longer than 75 octets, excluding the line
-   break. Long content lines SHOULD be split into a multiple line
-   representations using a line "folding" technique. That is, a long
-   line can be split between any two characters by inserting a CRLF
-   immediately followed by a single linear white space character (i.e.,
-   SPACE, US-ASCII decimal 32 or HTAB, US-ASCII decimal 9). Any sequence
-   of CRLF followed immediately by a single linear white space character
-   is ignored (i.e., removed) when processing the content type.
-
-   For example the line:
-
-     DESCRIPTION:This is a long description that exists on a long line.
-
-   Can be represented as:
-
-     DESCRIPTION:This is a lo
-      ng description
-       that exists on a long line.
-
-   The process of moving from this folded multiple line representation
-   to its single line representation is called "unfolding". Unfolding is
-   accomplished by removing the CRLF character and the linear white
-   space character that immediately follows.
-
-   When parsing a content line, folded lines MUST first be unfolded
-   according to the unfolding procedure described above. When generating
-   a content line, lines longer than 75 octets SHOULD be folded
-   according to the folding procedure described above.
-
-
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 13]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   The content information associated with an iCalendar object is
-   formatted using a syntax similar to that defined by [RFC 2425]. That
-   is, the content information consists of CRLF-separated content lines.
-
-   The following notation defines the lines of content in an iCalendar
-   object:
-
-     contentline        = name *(";" param ) ":" value CRLF
-        ; This ABNF is just a general definition for an initial parsing
-        ; of the content line into its property name, parameter list,
-        ; and value string
-
-     ; When parsing a content line, folded lines MUST first
-        ; be unfolded according to the unfolding procedure
-        ; described above. When generating a content line, lines
-        ; longer than 75 octets SHOULD be folded according to
-        ; the folding procedure described above.
-
-     name               = x-name / iana-token
-
-     iana-token = 1*(ALPHA / DIGIT / "-")
-     ; iCalendar identifier registered with IANA
-
-     x-name             = "X-" [vendorid "-"] 1*(ALPHA / DIGIT / "-")
-     ; Reservered for experimental use. Not intended for use in
-     ; released products.
-
-     vendorid   = 3*(ALPHA / DIGIT)     ;Vendor identification
-
-     param              = param-name "=" param-value
-                          *("," param-value)
-        ; Each property defines the specific ABNF for the parameters
-        ; allowed on the property. Refer to specific properties for
-        ; precise parameter ABNF.
-
-     param-name = iana-token / x-token
-
-     param-value        = paramtext / quoted-string
-
-     paramtext  = *SAFE-CHAR
-
-     value      = *VALUE-CHAR
-
-     quoted-string      = DQUOTE *QSAFE-CHAR DQUOTE
-
-     NON-US-ASCII       = %x80-F8
-     ; Use restricted by charset parameter
-     ; on outer MIME object (UTF-8 preferred)
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 14]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     QSAFE-CHAR = WSP / %x21 / %x23-7E / NON-US-ASCII
-     ; Any character except CTLs and DQUOTE
-
-     SAFE-CHAR  = WSP / %x21 / %x23-2B / %x2D-39 / %x3C-7E
-                / NON-US-ASCII
-     ; Any character except CTLs, DQUOTE, ";", ":", ","
-
-     VALUE-CHAR = WSP / %x21-7E / NON-US-ASCII
-     ; Any textual character
-
-     CR = %x0D
-     ; carriage return
-
-     LF = %x0A
-     ; line feed
-
-     CRLF       = CR LF
-     ; Internet standard newline
-
-     CTL        = %x00-08 / %x0A-1F / %x7F
-        ; Controls
-
-     ALPHA      = %x41-5A / %x61-7A   ; A-Z / a-z
-
-     DIGIT      = %x30-39
-        ; 0-9
-
-     DQUOTE     = %x22
-        ; Quotation Mark
-
-     WSP        = SPACE / HTAB
-
-     SPACE      = %x20
-
-     HTAB       = %x09
-
-   The property value component of a content line has a format that is
-   property specific. Refer to the section describing each property for
-   a definition of this format.
-
-   All names of properties, property parameters, enumerated property
-   values and property parameter values are case-insensitive. However,
-   all other property values are case-sensitive, unless otherwise
-   stated.
-
-
-
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 15]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-4.1.1 List and Field Separators
-
-   Some properties and parameters allow a list of values. Values in a
-   list of values MUST be separated by a COMMA character (US-ASCII
-   decimal 44). There is no significance to the order of values in a
-   list. For those parameter values (such as those that specify URI
-   values) that are specified in quoted-strings, the individual quoted-
-   strings are separated by a COMMA character (US-ASCII decimal 44).
-
-   Some property values are defined in terms of multiple parts. These
-   structured property values MUST have their value parts separated by a
-   SEMICOLON character (US-ASCII decimal 59).
-
-   Some properties allow a list of parameters. Each property parameter
-   in a list of property parameters MUST be separated by a SEMICOLON
-   character (US-ASCII decimal 59).
-
-   Property parameters with values containing a COLON, a SEMICOLON or a
-   COMMA character MUST be placed in quoted text.
-
-   For example, in the following properties a SEMICOLON is used to
-   separate property parameters from each other, and a COMMA is used to
-   separate property values in a value list.
-
-     ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT:MAILTO:
-      jsmith at host.com
-
-     RDATE;VALUE=DATE:19970304,19970504,19970704,19970904
-
-4.1.2 Multiple Values
-
-   Some properties defined in the iCalendar object can have multiple
-   values. The general rule for encoding multi-valued items is to simply
-   create a new content line for each value, including the property
-   name. However, it should be noted that some properties support
-   encoding multiple values in a single property by separating the
-   values with a COMMA character (US-ASCII decimal 44). Individual
-   property definitions should be consulted for determining whether a
-   specific property allows multiple values and in which of these two
-   forms.
-
-4.1.3 Binary Content
-
-   Binary content information in an iCalendar object SHOULD be
-   referenced using a URI within a property value. That is the binary
-   content information SHOULD be placed in an external MIME entity that
-   can be referenced by a URI from within the iCalendar object. In
-   applications where this is not feasible, binary content information
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 16]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   can be included within an iCalendar object, but only after first
-   encoding it into text using the "BASE64" encoding method defined in
-   [RFC 2045]. Inline binary contact SHOULD only be used in applications
-   whose special circumstances demand that an iCalendar object be
-   expressed as a single entity. A property containing inline binary
-   content information MUST specify the "ENCODING" property parameter.
-   Binary content information placed external to the iCalendar object
-   MUST be referenced by a uniform resource identifier (URI).
-
-   The following example specifies an "ATTACH" property that references
-   an attachment external to the iCalendar object with a URI reference:
-
-     ATTACH:http://xyz.com/public/quarterly-report.doc
-
-   The following example specifies an "ATTACH" property with inline
-   binary encoded content information:
-
-     ATTACH;FMTTYPE=image/basic;ENCODING=BASE64;VALUE=BINARY:
-      MIICajCCAdOgAwIBAgICBEUwDQYJKoZIhvcNAQEEBQAwdzELMAkGA1U
-      EBhMCVVMxLDAqBgNVBAoTI05ldHNjYXBlIENvbW11bmljYXRpb25zIE
-        <...remainder of "BASE64" encoded binary data...>
-
-4.1.4 Character Set
-
-   There is not a property parameter to declare the character set used
-   in a property value. The default character set for an iCalendar
-   object is UTF-8 as defined in [RFC 2279].
-
-   The "charset" Content-Type parameter can be used in MIME transports
-   to specify any other IANA registered character set.
-
-4.2 Property Parameters
-
-   A property can have attributes associated with it. These "property
-   parameters" contain meta-information about the property or the
-   property value. Property parameters are provided to specify such
-   information as the location of an alternate text representation for a
-   property value, the language of a text property value, the data type
-   of the property value and other attributes.
-
-   Property parameter values that contain the COLON (US-ASCII decimal
-   58), SEMICOLON (US-ASCII decimal 59) or COMMA (US-ASCII decimal 44)
-   character separators MUST be specified as quoted-string text values.
-   Property parameter values MUST NOT contain the DOUBLE-QUOTE (US-ASCII
-   decimal 22) character. The DOUBLE-QUOTE (US-ASCII decimal 22)
-   character is used as a delimiter for parameter values that contain
-   restricted characters or URI text. For example:
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 17]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     DESCRIPTION;ALTREP="http://www.wiz.org":The Fall'98 Wild Wizards
-       Conference - - Las Vegas, NV, USA
-
-   Property parameter values that are not in quoted strings are case
-   insensitive.
-
-   The general property parameters defined by this memo are defined by
-   the following notation:
-
-     parameter  = altrepparam           ; Alternate text representation
-                / cnparam               ; Common name
-                / cutypeparam           ; Calendar user type
-                / delfromparam          ; Delegator
-                / deltoparam            ; Delegatee
-                / dirparam              ; Directory entry
-                / encodingparam         ; Inline encoding
-                / fmttypeparam          ; Format type
-                / fbtypeparam           ; Free/busy time type
-                / languageparam         ; Language for text
-                / memberparam           ; Group or list membership
-                / partstatparam         ; Participation status
-                / rangeparam            ; Recurrence identifier range
-                / trigrelparam          ; Alarm trigger relationship
-                / reltypeparam          ; Relationship type
-                / roleparam             ; Participation role
-                / rsvpparam             ; RSVP expectation
-                / sentbyparam           ; Sent by
-                / tzidparam             ; Reference to time zone object
-                / valuetypeparam        ; Property value data type
-                / ianaparam
-        ; Some other IANA registered iCalendar parameter.
-                / xparam
-        ; A non-standard, experimental parameter.
-
-     ianaparam  = iana-token "=" param-value *("," param-value)
-
-     xparam     =x-name "=" param-value *("," param-value)
-
-4.2.1 Alternate Text Representation
-
-   Parameter Name: ALTREP
-
-   Purpose: To specify an alternate text representation for the property
-   value.
-
-   Format Definition: The property parameter is defined by the following
-   notation:
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 18]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     altrepparam        = "ALTREP" "=" DQUOTE uri DQUOTE
-
-   Description: The parameter specifies a URI that points to an
-   alternate representation for a textual property value. A property
-   specifying this parameter MUST also include a value that reflects the
-   default representation of the text value. The individual URI
-   parameter values MUST each be specified in a quoted-string.
-
-   Example:
-
-     DESCRIPTION;ALTREP="CID:<part3.msg.970415T083000 at host.com>":Project
-       XYZ Review Meeting will include the following agenda items: (a)
-       Market Overview, (b) Finances, (c) Project Management
-
-   The "ALTREP" property parameter value might point to a "text/html"
-   content portion.
-
-     Content-Type:text/html
-     Content-Id:<part3.msg.970415T083000 at host.com>
-
-     <html><body>
-     <p><b>Project XYZ Review Meeting</b> will include the following
-     agenda items:<ol><li>Market
-     Overview</li><li>Finances</li><li>Project Management</li></ol></p>
-     </body></html>
-
-4.2.2 Common Name
-
-   Parameter Name: CN
-
-   Purpose: To specify the common name to be associated with the
-   calendar user specified by the property.
-
-   Format Definition: The property parameter is defined by the following
-   notation:
-
-     cnparam    = "CN" "=" param-value
-
-   Description: This parameter can be specified on properties with a
-   CAL-ADDRESS value type. The parameter specifies the common name to be
-   associated with the calendar user specified by the property. The
-   parameter value is text. The parameter value can be used for display
-   text to be associated with the calendar address specified by the
-   property.
-
-
-
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 19]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Example:
-
-     ORGANIZER;CN="John Smith":MAILTO:jsmith at host.com
-
-4.2.3 Calendar User Type
-
-   Parameter Name: CUTYPE
-
-   Purpose: To specify the type of calendar user specified by the
-   property.
-
-   Format Definition: The property parameter is defined by the following
-   notation:
-
-     cutypeparam        = "CUTYPE" "="
-                         ("INDIVIDUAL"          ; An individual
-                        / "GROUP"               ; A group of individuals
-                        / "RESOURCE"            ; A physical resource
-                        / "ROOM"                ; A room resource
-                        / "UNKNOWN"             ; Otherwise not known
-                        / x-name                ; Experimental type
-                        / iana-token)           ; Other IANA registered
-                                                ; type
-     ; Default is INDIVIDUAL
-
-   Description: This parameter can be specified on properties with a
-   CAL-ADDRESS value type. The parameter identifies the type of calendar
-   user specified by the property. If not specified on a property that
-   allows this parameter, the default is INDIVIDUAL.
-
-   Example:
-
-     ATTENDEE;CUTYPE=GROUP:MAILTO:ietf-calsch at imc.org
-
-4.2.4 Delegators
-
-   Parameter Name: DELEGATED-FROM
-
-   Purpose: To specify the calendar users that have delegated their
-   participation to the calendar user specified by the property.
-
-   Format Definition: The property parameter is defined by the following
-   notation:
-
-     delfromparam       = "DELEGATED-FROM" "=" DQUOTE cal-address DQUOTE
-                          *("," DQUOTE cal-address DQUOTE)
-
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 20]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Description: This parameter can be specified on properties with a
-   CAL-ADDRESS value type. This parameter can be specified on a property
-   that has a value type of calendar address. This parameter specifies
-   those calendar uses that have delegated their participation in a
-   group scheduled event or to-do to the calendar user specified by the
-   property. The value MUST be a MAILTO URI as defined in [RFC 1738].
-   The individual calendar address parameter values MUST each be
-   specified in a quoted-string.
-
-   Example:
-
-     ATTENDEE;DELEGATED-FROM="MAILTO:jsmith at host.com":MAILTO:
-      jdoe at host.com
-
-4.2.5 Delegatees
-
-   Parameter Name: DELEGATED-TO
-
-   Purpose: To specify the calendar users to whom the calendar user
-   specified by the property has delegated participation.
-
-   Format Definition: The property parameter is defined by the following
-   notation:
-
-     deltoparam = "DELEGATED-TO" "=" DQUOTE cal-address DQUOTE
-                  *("," DQUOTE cal-address DQUOTE)
-
-   Description: This parameter can be specified on properties with a
-   CAL-ADDRESS value type. This parameter specifies those calendar users
-   whom have been delegated participation in a group scheduled event or
-   to-do by the calendar user specified by the property. The value MUST
-   be a MAILTO URI as defined in [RFC 1738]. The individual calendar
-   address parameter values MUST each be specified in a quoted-string.
-
-   Example:
-
-     ATTENDEE;DELEGATED-TO="MAILTO:jdoe at host.com","MAILTO:jqpublic@
-      host.com":MAILTO:jsmith at host.com
-
-4.2.6 Directory Entry Reference
-
-   Parameter Name: DIR
-
-   Purpose: To specify reference to a directory entry associated with
-   the calendar user specified by the property.
-
-   Format Definition: The property parameter is defined by the following
-   notation:
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 21]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     dirparam   = "DIR" "=" DQUOTE uri DQUOTE
-
-   Description: This parameter can be specified on properties with a
-   CAL-ADDRESS value type. The parameter specifies a reference to the
-   directory entry associated with the calendar user specified by the
-   property. The parameter value is a URI. The individual URI parameter
-   values MUST each be specified in a quoted-string.
-
-   Example:
-
-     ORGANIZER;DIR="ldap://host.com:6666/o=eDABC%20Industries,c=3DUS??
-      (cn=3DBJim%20Dolittle)":MAILTO:jimdo at host1.com
-
-4.2.7 Inline Encoding
-
-   Parameter Name: ENCODING
-
-   Purpose: To specify an alternate inline encoding for the property
-   value.
-
-   Format Definition: The property parameter is defined by the following
-   notation:
-
-     encodingparam      = "ENCODING" "="
-                          ("8BIT"
-        ; "8bit" text encoding is defined in [RFC 2045]
-                        / "BASE64"
-        ; "BASE64" binary encoding format is defined in [RFC 2045]
-                        / iana-token
-        ; Some other IANA registered iCalendar encoding type
-                        / x-name)
-        ; A non-standard, experimental encoding type
-
-   Description: The property parameter identifies the inline encoding
-   used in a property value. The default encoding is "8BIT",
-   corresponding to a property value consisting of text. The "BASE64"
-   encoding type corresponds to a property value encoded using the
-   "BASE64" encoding defined in [RFC 2045].
-
-   If the value type parameter is ";VALUE=BINARY", then the inline
-   encoding parameter MUST be specified with the value
-   ";ENCODING=BASE64".
-
-
-
-
-
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 22]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Example:
-
-     ATTACH;FMTYPE=IMAGE/JPEG;ENCODING=BASE64;VALUE=BINARY:MIICajC
-      CAdOgAwIBAgICBEUwDQYJKoZIhvcNAQEEBQAwdzELMAkGA1UEBhMCVVMxLDA
-      qBgNVBAoTI05ldHNjYXBlIENvbW11bmljYXRpb25zIENvcnBvcmF0aW9uMRw
-      <...remainder of "BASE64" encoded binary data...>
-
-4.2.8 Format Type
-
-   Parameter Name: FMTTYPE
-
-   Purpose: To specify the content type of a referenced object.
-
-   Format Definition: The property parameter is defined by the following
-   notation:
-
-     fmttypeparam       = "FMTTYPE" "=" iana-token
-                                        ; A IANA registered content type
-                                     / x-name
-                                        ; A non-standard content type
-
-   Description: This parameter can be specified on properties that are
-   used to reference an object. The parameter specifies the content type
-   of the referenced object. For example, on the "ATTACH" property, a
-   FTP type URI value does not, by itself, necessarily convey the type
-   of content associated with the resource. The parameter value MUST be
-   the TEXT for either an IANA registered content type or a non-standard
-   content type.
-
-     Example:
-
-      ATTACH;FMTTYPE=application/binary:ftp://domain.com/pub/docs/
-       agenda.doc
-
-4.2.9 Free/Busy Time Type
-
-   Parameter Name: FBTYPE
-
-   Purpose: To specify the free or busy time type.
-
-   Format Definition: The property parameter is defined by the following
-   notation:
-
-     fbtypeparam        = "FBTYPE" "=" ("FREE" / "BUSY"
-                        / "BUSY-UNAVAILABLE" / "BUSY-TENTATIVE"
-                        / x-name
-        ; Some experimental iCalendar data type.
-                        / iana-token)
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 23]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-        ; Some other IANA registered iCalendar data type.
-
-   Description: The parameter specifies the free or busy time type. The
-   value FREE indicates that the time interval is free for scheduling.
-   The value BUSY indicates that the time interval is busy because one
-   or more events have been scheduled for that interval. The value
-   BUSY-UNAVAILABLE indicates that the time interval is busy and that
-   the interval can not be scheduled. The value BUSY-TENTATIVE indicates
-   that the time interval is busy because one or more events have been
-   tentatively scheduled for that interval. If not specified on a
-   property that allows this parameter, the default is BUSY.
-
-   Example: The following is an example of this parameter on a FREEBUSY
-   property.
-
-     FREEBUSY;FBTYPE=BUSY:19980415T133000Z/19980415T170000Z
-
-4.2.10 Language
-
-   Parameter Name: LANGUAGE
-
-   Purpose: To specify the language for text values in a property or
-   property parameter.
-
-   Format Definition: The property parameter is defined by the following
-   notation:
-
-     languageparam =    "LANGUAGE" "=" language
-
-     language = <Text identifying a language, as defined in [RFC 1766]>
-
-   Description: This parameter can be specified on properties with a
-   text value type. The parameter identifies the language of the text in
-   the property or property parameter value. The value of the "language"
-   property parameter is that defined in [RFC 1766].
-
-   For transport in a MIME entity, the Content-Language header field can
-   be used to set the default language for the entire body part.
-   Otherwise, no default language is assumed.
-
-   Example:
-
-     SUMMARY;LANGUAGE=us-EN:Company Holiday Party
-
-     LOCATION;LANGUAGE=en:Germany
-     LOCATION;LANGUAGE=no:Tyskland
-
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 24]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   The following example makes use of the Quoted-Printable encoding in
-   order to represent non-ASCII characters.
-
-     LOCATION;LANGUAGE=da:K=F8benhavn
-     LOCATION;LANGUAGE=en:Copenhagen
-
-4.2.11  Group or List Membership
-
-   Parameter Name: MEMBER
-
-   Purpose: To specify the group or list membership of the calendar user
-   specified by the property.
-
-   Format Definition: The property parameter is defined by the following
-   notation:
-
-     memberparam        = "MEMBER" "=" DQUOTE cal-address DQUOTE
-                          *("," DQUOTE cal-address DQUOTE)
-
-   Description: This parameter can be specified on properties with a
-   CAL-ADDRESS value type. The parameter identifies the groups or list
-   membership for the calendar user specified by the property. The
-   parameter value either a single calendar address in a quoted-string
-   or a COMMA character (US-ASCII decimal 44) list of calendar
-   addresses, each in a quoted-string. The individual calendar address
-   parameter values MUST each be specified in a quoted-string.
-
-   Example:
-
-     ATTENDEE;MEMBER="MAILTO:ietf-calsch at imc.org":MAILTO:jsmith at host.com
-
-     ATTENDEE;MEMBER="MAILTO:projectA at host.com","MAILTO:projectB at host.
-      com":MAILTO:janedoe at host.com
-
-4.2.12 Participation Status
-
-   Parameter Name: PARTSTAT
-
-   Purpose: To specify the participation status for the calendar user
-   specified by the property.
-
-   Format Definition: The property parameter is defined by the following
-   notation:
-
-     partstatparam      = "PARTSTAT" "="
-                         ("NEEDS-ACTION"        ; Event needs action
-                        / "ACCEPTED"            ; Event accepted
-                        / "DECLINED"            ; Event declined
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 25]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-                        / "TENTATIVE"           ; Event tentatively
-                                                ; accepted
-                        / "DELEGATED"           ; Event delegated
-                        / x-name                ; Experimental status
-                        / iana-token)           ; Other IANA registered
-                                                ; status
-     ; These are the participation statuses for a "VEVENT". Default is
-     ; NEEDS-ACTION
-     partstatparam      /= "PARTSTAT" "="
-                         ("NEEDS-ACTION"        ; To-do needs action
-                        / "ACCEPTED"            ; To-do accepted
-                        / "DECLINED"            ; To-do declined
-                        / "TENTATIVE"           ; To-do tentatively
-                                                ; accepted
-                        / "DELEGATED"           ; To-do delegated
-                        / "COMPLETED"           ; To-do completed.
-                                                ; COMPLETED property has
-                                                ;date/time completed.
-                        / "IN-PROCESS"          ; To-do in process of
-                                                ; being completed
-                        / x-name                ; Experimental status
-                        / iana-token)           ; Other IANA registered
-                                                ; status
-     ; These are the participation statuses for a "VTODO". Default is
-     ; NEEDS-ACTION
-
-     partstatparam      /= "PARTSTAT" "="
-                         ("NEEDS-ACTION"        ; Journal needs action
-                        / "ACCEPTED"            ; Journal accepted
-                        / "DECLINED"            ; Journal declined
-                        / x-name                ; Experimental status
-                        / iana-token)           ; Other IANA registered
-                                                ; status
-     ; These are the participation statuses for a "VJOURNAL". Default is
-     ; NEEDS-ACTION
-
-   Description: This parameter can be specified on properties with a
-   CAL-ADDRESS value type. The parameter identifies the participation
-   status for the calendar user specified by the property value. The
-   parameter values differ depending on whether they are associated with
-   a group scheduled "VEVENT", "VTODO" or "VJOURNAL". The values MUST
-   match one of the values allowed for the given calendar component. If
-   not specified on a property that allows this parameter, the default
-   value is NEEDS-ACTION.
-
-   Example:
-
-     ATTENDEE;PARTSTAT=DECLINED:MAILTO:jsmith at host.com
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 26]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-4.2.13  Recurrence Identifier Range
-
-   Parameter Name: RANGE
-
-   Purpose: To specify the effective range of recurrence instances from
-   the instance specified by the recurrence identifier specified by the
-   property.
-
-   Format Definition: The property parameter is defined by the following
-   notation:
-
-     rangeparam = "RANGE" "=" ("THISANDPRIOR"
-        ; To specify all instances prior to the recurrence identifier
-                / "THISANDFUTURE")
-        ; To specify the instance specified by the recurrence identifier
-        ; and all subsequent recurrence instances
-
-   Description: The parameter can be specified on a property that
-   specifies a recurrence identifier. The parameter specifies the
-   effective range of recurrence instances that is specified by the
-   property. The effective range is from the recurrence identified
-   specified by the property. If this parameter is not specified an
-   allowed property, then the default range is the single instance
-   specified by the recurrence identifier value of the property. The
-   parameter value can be "THISANDPRIOR" to indicate a range defined by
-   the recurrence identified value of the property and all prior
-   instances. The parameter value can also be "THISANDFUTURE" to
-   indicate a range defined by the recurrence identifier and all
-   subsequent instances.
-
-   Example:
-
-     RECURRENCE-ID;RANGE=THISANDPRIOR:19980401T133000Z
-
-4.2.14 Alarm Trigger Relationship
-
-   Parameter Name: RELATED
-
-   Purpose: To specify the relationship of the alarm trigger with
-   respect to the start or end of the calendar component.
-
-   Format Definition: The property parameter is defined by the following
-   notation:
-
-     trigrelparam       = "RELATED" "="
-                         ("START"       ; Trigger off of start
-                        / "END")        ; Trigger off of end
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 27]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Description: The parameter can be specified on properties that
-   specify an alarm trigger with a DURATION value type. The parameter
-   specifies whether the alarm will trigger relative to the start or end
-   of the calendar component. The parameter value START will set the
-   alarm to trigger off the start of the calendar component; the
-   parameter value END will set the alarm to trigger off the end of the
-   calendar component. If the parameter is not specified on an allowable
-   property, then the default is START.
-
-   Example:
-
-     TRIGGER;RELATED=END:PT5M
-
-4.2.15 Relationship Type
-
-   Parameter Name: RELTYPE
-
-   Purpose: To specify the type of hierarchical relationship associated
-   with the calendar component specified by the property.
-
-   Format Definition: The property parameter is defined by the following
-   notation:
-
-     reltypeparam       = "RELTYPE" "="
-                         ("PARENT"      ; Parent relationship. Default.
-                        / "CHILD"       ; Child relationship
-                        / "SIBLING      ; Sibling relationship
-                        / iana-token    ; Some other IANA registered
-                                        ; iCalendar relationship type
-                        / x-name)       ; A non-standard, experimental
-                                        ; relationship type
-
-   Description: This parameter can be specified on a property that
-   references another related calendar. The parameter specifies the
-   hierarchical relationship type of the calendar component referenced
-   by the property. The parameter value can be PARENT, to indicate that
-   the referenced calendar component is a superior of calendar
-   component; CHILD to indicate that the referenced calendar component
-   is a subordinate of the calendar component; SIBLING to indicate that
-   the referenced calendar component is a peer of the calendar
-   component. If this parameter is not specified on an allowable
-   property, the default relationship type is PARENT.
-
-   Example:
-
-     RELATED-TO;RELTYPE=SIBLING:<19960401-080045-4000F192713 at host.com>
-
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 28]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-4.2.16 Participation Role
-
-   Parameter Name: ROLE
-
-   Purpose: To specify the participation role for the calendar user
-   specified by the property.
-
-   Format Definition: The property parameter is defined by the following
-   notation:
-
-     roleparam  = "ROLE" "="
-                 ("CHAIR"               ; Indicates chair of the
-                                        ; calendar entity
-                / "REQ-PARTICIPANT"     ; Indicates a participant whose
-                                        ; participation is required
-                / "OPT-PARTICIPANT"     ; Indicates a participant whose
-                                        ; participation is optional
-                / "NON-PARTICIPANT"     ; Indicates a participant who is
-                                        ; copied for information
-                                        ; purposes only
-                / x-name                ; Experimental role
-                / iana-token)           ; Other IANA role
-     ; Default is REQ-PARTICIPANT
-
-   Description: This parameter can be specified on properties with a
-   CAL-ADDRESS value type. The parameter specifies the participation
-   role for the calendar user specified by the property in the group
-   schedule calendar component. If not specified on a property that
-   allows this parameter, the default value is REQ-PARTICIPANT.
-
-   Example:
-
-     ATTENDEE;ROLE=CHAIR:MAILTO:mrbig at host.com
-
-4.2.17  RSVP Expectation
-
-   Parameter Name: RSVP
-
-   Purpose: To specify whether there is an expectation of a favor of a
-   reply from the calendar user specified by the property value.
-
-   Format Definition: The property parameter is defined by the following
-   notation:
-
-     rsvpparam = "RSVP" "=" ("TRUE" / "FALSE")
-     ; Default is FALSE
-
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 29]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Description: This parameter can be specified on properties with a
-   CAL-ADDRESS value type. The parameter identifies the expectation of a
-   reply from the calendar user specified by the property value. This
-   parameter is used by the "Organizer" to request a participation
-   status reply from an "Attendee" of a group scheduled event or to-do.
-   If not specified on a property that allows this parameter, the
-   default value is FALSE.
-
-   Example:
-
-     ATTENDEE;RSVP=TRUE:MAILTO:jsmith at host.com
-
-4.2.18  Sent By
-
-   Parameter Name: SENT-BY
-
-   Purpose: To specify the calendar user that is acting on behalf of the
-   calendar user specified by the property.
-
-   Format Definition: The property parameter is defined by the following
-   notation:
-
-     sentbyparam        = "SENT-BY" "=" DQUOTE cal-address DQUOTE
-
-   Description: This parameter can be specified on properties with a
-   CAL-ADDRESS value type. The parameter specifies the calendar user
-   that is acting on behalf of the calendar user specified by the
-   property. The parameter value MUST be a MAILTO URI as defined in [RFC
-   1738]. The individual calendar address parameter values MUST each be
-   specified in a quoted-string.
-
-   Example:
-
-     ORGANIZER;SENT-BY:"MAILTO:sray at host.com":MAILTO:jsmith at host.com
-
-4.2.19 Time Zone Identifier
-
-   Parameter Name: TZID
-
-   Purpose: To specify the identifier for the time zone definition for a
-   time component in the property value.
-
-   Format Definition: This property parameter is defined by the
-   following notation:
-
-     tzidparam  = "TZID" "=" [tzidprefix] paramtext CRLF
-
-     tzidprefix = "/"
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 30]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Description: The parameter MUST be specified on the "DTSTART",
-   "DTEND", "DUE", "EXDATE" and "RDATE" properties when either a DATE-
-   TIME or TIME value type is specified and when the value is not either
-   a UTC or a "floating" time. Refer to the DATE-TIME or TIME value type
-   definition for a description of UTC and "floating time" formats. This
-   property parameter specifies a text value which uniquely identifies
-   the "VTIMEZONE" calendar component to be used when evaluating the
-   time portion of the property. The value of the TZID property
-   parameter will be equal to the value of the TZID property for the
-   matching time zone definition. An individual "VTIMEZONE" calendar
-   component MUST be specified for each unique "TZID" parameter value
-   specified in the iCalendar object.
-
-   The parameter MUST be specified on properties with a DATE-TIME value
-   if the DATE-TIME is not either a UTC or a "floating" time.
-
-   The presence of the SOLIDUS character (US-ASCII decimal 47) as a
-   prefix, indicates that this TZID represents a unique ID in a globally
-   defined time zone registry (when such registry is defined).
-
-        Note: This document does not define a naming convention for time
-        zone identifiers. Implementers may want to use the naming
-        conventions defined in existing time zone specifications such as
-        the public-domain Olson database [TZ]. The specification of
-        globally unique time zone identifiers is not addressed by this
-        document and is left for future study.
-
-   The following are examples of this property parameter:
-
-     DTSTART;TZID=US-Eastern:19980119T020000
-
-     DTEND;TZID=US-Eastern:19980119T030000
-
-   The TZID property parameter MUST NOT be applied to DATE-TIME or TIME
-   properties whose time values are specified in UTC.
-
-   The use of local time in a DATE-TIME or TIME value without the TZID
-   property parameter is to be interpreted as a local time value,
-   regardless of the existence of "VTIMEZONE" calendar components in the
-   iCalendar object.
-
-   For more information see the sections on the data types DATE-TIME and
-   TIME.
-
-
-
-
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 31]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-4.2.20 Value Data Types
-
-   Parameter Name: VALUE
-
-   Purpose: To explicitly specify the data type format for a property
-   value.
-
-   Format Definition: The "VALUE" property parameter is defined by the
-   following notation:
-
-     valuetypeparam = "VALUE" "=" valuetype
-
-     valuetype  = ("BINARY"
-                / "BOOLEAN"
-                / "CAL-ADDRESS"
-                / "DATE"
-                / "DATE-TIME"
-                / "DURATION"
-                / "FLOAT"
-                / "INTEGER"
-                / "PERIOD"
-                / "RECUR"
-                / "TEXT"
-                / "TIME"
-                / "URI"
-                / "UTC-OFFSET"
-                / x-name
-                ; Some experimental iCalendar data type.
-                / iana-token)
-                ; Some other IANA registered iCalendar data type.
-
-   Description: The parameter specifies the data type and format of the
-   property value. The property values MUST be of a single value type.
-   For example, a "RDATE" property cannot have a combination of DATE-
-   TIME and TIME value types.
-
-   If the property's value is the default value type, then this
-   parameter need not be specified. However, if the property's default
-   value type is overridden by some other allowable value type, then
-   this parameter MUST be specified.
-
-4.3 Property Value Data Types
-
-   The properties in an iCalendar object are strongly typed. The
-   definition of each property restricts the value to be one of the
-   value data types, or simply value types, defined in this section. The
-   value type for a property will either be specified implicitly as the
-   default value type or will be explicitly specified with the "VALUE"
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 32]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   parameter. If the value type of a property is one of the alternate
-   valid types, then it MUST be explicitly specified with the "VALUE"
-   parameter.
-
-4.3.1   Binary
-
-   Value Name: BINARY
-
-   Purpose: This value type is used to identify properties that contain
-   a character encoding of inline binary data. For example, an inline
-   attachment of an object code might be included in an iCalendar
-   object.
-
-   Formal Definition: The value type is defined by the following
-   notation:
-
-     binary     = *(4b-char) [b-end]
-     ; A "BASE64" encoded character string, as defined by [RFC 2045].
-
-     b-end      = (2b-char "==") / (3b-char "=")
-
-     b-char = ALPHA / DIGIT / "+" / "/"
-
-   Description: Property values with this value type MUST also include
-   the inline encoding parameter sequence of ";ENCODING=BASE64". That
-   is, all inline binary data MUST first be character encoded using the
-   "BASE64" encoding method defined in [RFC 2045]. No additional content
-   value encoding (i.e., BACKSLASH character encoding) is defined for
-   this value type.
-
-   Example: The following is an abridged example of a "BASE64" encoded
-   binary value data.
-
-     ATTACH;VALUE=BINARY;ENCODING=BASE64:MIICajCCAdOgAwIBAgICBEUwDQY
-      JKoZIhvcNAQEEBQAwdzELMAkGA1UEBhMCVVMxLDAqBgNVBAoTI05ldHNjYXBlI
-      ENvbW11bmljYXRpb25zIENvcnBvcmF0aW9uMRwwGgYDVQQLExNJbmZv
-        <...remainder of "BASE64" encoded binary data...>
-
-4.3.2   Boolean
-
-   Value Name: BOOLEAN
-
-   Purpose: This value type is used to identify properties that contain
-   either a "TRUE" or "FALSE" Boolean value.
-
-   Formal Definition: The value type is defined by the following
-   notation:
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 33]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     boolean    = "TRUE" / "FALSE"
-
-   Description: These values are case insensitive text. No additional
-   content value encoding (i.e., BACKSLASH character encoding) is
-   defined for this value type.
-
-   Example: The following is an example of a hypothetical property that
-   has a BOOLEAN value type:
-
-   GIBBERISH:TRUE
-
-4.3.3   Calendar User Address
-
-   Value Name: CAL-ADDRESS
-
-   Purpose: This value type is used to identify properties that contain
-   a calendar user address.
-
-   Formal Definition: The value type is as defined by the following
-   notation:
-
-     cal-address        = uri
-
-   Description: The value is a URI as defined by [RFC 1738] or any other
-   IANA registered form for a URI. When used to address an Internet
-   email transport address for a calendar user, the value MUST be a
-   MAILTO URI, as defined by [RFC 1738]. No additional content value
-   encoding (i.e., BACKSLASH character encoding) is defined for this
-   value type.
-
-   Example:
-
-     ATTENDEE:MAILTO:jane_doe at host.com
-
-4.3.4 Date
-
-   Value Name: DATE
-
-   Purpose: This value type is used to identify values that contain a
-   calendar date.
-
-   Formal Definition: The value type is defined by the following
-   notation:
-
-     date               = date-value
-
-     date-value         = date-fullyear date-month date-mday
-     date-fullyear      = 4DIGIT
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 34]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     date-month         = 2DIGIT        ;01-12
-     date-mday          = 2DIGIT        ;01-28, 01-29, 01-30, 01-31
-                                        ;based on month/year
-
-   Description: If the property permits, multiple "date" values are
-   specified as a COMMA character (US-ASCII decimal 44) separated list
-   of values. The format for the value type is expressed as the [ISO
-   8601] complete representation, basic format for a calendar date. The
-   textual format specifies a four-digit year, two-digit month, and
-   two-digit day of the month. There are no separator characters between
-   the year, month and day component text.
-
-   No additional content value encoding (i.e., BACKSLASH character
-   encoding) is defined for this value type.
-
-   Example: The following represents July 14, 1997:
-
-     19970714
-
-4.3.5   Date-Time
-
-   Value Name: DATE-TIME
-
-   Purpose: This value type is used to identify values that specify a
-   precise calendar date and time of day.
-
-   Formal Definition: The value type is defined by the following
-   notation:
-
-     date-time  = date "T" time ;As specified in the date and time
-                                ;value definitions
-
-   Description: If the property permits, multiple "date-time" values are
-   specified as a COMMA character (US-ASCII decimal 44) separated list
-   of values. No additional content value encoding (i.e., BACKSLASH
-   character encoding) is defined for this value type.
-
-   The "DATE-TIME" data type is used to identify values that contain a
-   precise calendar date and time of day. The format is based on the
-   [ISO 8601] complete representation, basic format for a calendar date
-   and time of day. The text format is a concatenation of the "date",
-   followed by the LATIN CAPITAL LETTER T character (US-ASCII decimal
-   84) time designator, followed by the "time" format.
-
-   The "DATE-TIME" data type expresses time values in three forms:
-
-   The form of date and time with UTC offset MUST NOT be used. For
-   example, the following is not valid for a date-time value:
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 35]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     DTSTART:19980119T230000-0800       ;Invalid time format
-
-   FORM #1: DATE WITH LOCAL TIME
-
-   The date with local time form is simply a date-time value that does
-   not contain the UTC designator nor does it reference a time zone. For
-   example, the following represents Janurary 18, 1998, at 11 PM:
-
-     DTSTART:19980118T230000
-
-   Date-time values of this type are said to be "floating" and are not
-   bound to any time zone in particular. They are used to represent the
-   same hour, minute, and second value regardless of which time zone is
-   currently being observed. For example, an event can be defined that
-   indicates that an individual will be busy from 11:00 AM to 1:00 PM
-   every day, no matter which time zone the person is in. In these
-   cases, a local time can be specified. The recipient of an iCalendar
-   object with a property value consisting of a local time, without any
-   relative time zone information, SHOULD interpret the value as being
-   fixed to whatever time zone the ATTENDEE is in at any given moment.
-   This means that two ATTENDEEs, in different time zones, receiving the
-   same event definition as a floating time, may be participating in the
-   event at different actual times. Floating time SHOULD only be used
-   where that is the reasonable behavior.
-
-   In most cases, a fixed time is desired. To properly communicate a
-   fixed time in a property value, either UTC time or local time with
-   time zone reference MUST be specified.
-
-   The use of local time in a DATE-TIME value without the TZID property
-   parameter is to be interpreted as floating time, regardless of the
-   existence of "VTIMEZONE" calendar components in the iCalendar object.
-
-   FORM #2: DATE WITH UTC TIME
-
-   The date with UTC time, or absolute time, is identified by a LATIN
-   CAPITAL LETTER Z suffix character (US-ASCII decimal 90), the UTC
-   designator, appended to the time value. For example, the following
-   represents January 19, 1998, at 0700 UTC:
-
-     DTSTART:19980119T070000Z
-
-   The TZID property parameter MUST NOT be applied to DATE-TIME
-   properties whose time values are specified in UTC.
-
-   FORM #3: DATE WITH LOCAL TIME AND TIME ZONE REFERENCE
-
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 36]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   The date and local time with reference to time zone information is
-   identified by the use the TZID property parameter to reference the
-   appropriate time zone definition. TZID is discussed in detail in the
-   section on Time Zone. For example, the following represents 2 AM in
-   New York on Janurary 19, 1998:
-
-          DTSTART;TZID=US-Eastern:19980119T020000
-
-   Example: The following represents July 14, 1997, at 1:30 PM in New
-   York City in each of the three time formats, using the "DTSTART"
-   property.
-
-     DTSTART:19970714T133000            ;Local time
-     DTSTART:19970714T173000Z           ;UTC time
-     DTSTART;TZID=US-Eastern:19970714T133000    ;Local time and time
-                        ; zone reference
-
-   A time value MUST ONLY specify 60 seconds when specifying the
-   periodic "leap second" in the time value. For example:
-
-     COMPLETED:19970630T235960Z
-
-4.3.6   Duration
-
-   Value Name: DURATION
-
-   Purpose: This value type is used to identify properties that contain
-   a duration of time.
-
-   Formal Definition: The value type is defined by the following
-   notation:
-
-     dur-value  = (["+"] / "-") "P" (dur-date / dur-time / dur-week)
-
-     dur-date   = dur-day [dur-time]
-     dur-time   = "T" (dur-hour / dur-minute / dur-second)
-     dur-week   = 1*DIGIT "W"
-     dur-hour   = 1*DIGIT "H" [dur-minute]
-     dur-minute = 1*DIGIT "M" [dur-second]
-     dur-second = 1*DIGIT "S"
-     dur-day    = 1*DIGIT "D"
-
-   Description: If the property permits, multiple "duration" values are
-   specified by a COMMA character (US-ASCII decimal 44) separated list
-   of values. The format is expressed as the [ISO 8601] basic format for
-   the duration of time. The format can represent durations in terms of
-   weeks, days, hours, minutes, and seconds.
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 37]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   No additional content value encoding (i.e., BACKSLASH character
-   encoding) are defined for this value type.
-
-   Example: A duration of 15 days, 5 hours and 20 seconds would be:
-
-     P15DT5H0M20S
-
-   A duration of 7 weeks would be:
-
-     P7W
-
-4.3.7   Float
-
-   Value Name: FLOAT
-
-   Purpose: This value type is used to identify properties that contain
-   a real number value.
-
-   Formal Definition: The value type is defined by the following
-   notation:
-
-     float      = (["+"] / "-") 1*DIGIT ["." 1*DIGIT]
-
-   Description: If the property permits, multiple "float" values are
-   specified by a COMMA character (US-ASCII decimal 44) separated list
-   of values.
-
-   No additional content value encoding (i.e., BACKSLASH character
-   encoding) is defined for this value type.
-
-   Example:
-
-     1000000.0000001
-     1.333
-     -3.14
-
-4.3.8 Integer
-
-     Value Name:INTEGER
-
-     Purpose: This value type is used to identify properties that contain
-     a signed integer value.
-
-     Formal Definition: The value type is defined by the following
-     notation:
-
-     integer    = (["+"] / "-") 1*DIGIT
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 38]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     Description: If the property permits, multiple "integer" values are
-     specified by a COMMA character (US-ASCII decimal 44) separated list
-     of values. The valid range for "integer" is -2147483648 to
-     2147483647. If the sign is not specified, then the value is assumed
-     to be positive.
-
-     No additional content value encoding (i.e., BACKSLASH character
-     encoding) is defined for this value type.
-
-     Example:
-
-     1234567890
-     -1234567890
-     +1234567890
-     432109876
-
-4.3.9 Period of Time
-
-   Value Name: PERIOD
-
-   Purpose: This value type is used to identify values that contain a
-   precise period of time.
-
-   Formal Definition: The data type is defined by the following
-   notation:
-
-     period     = period-explicit / period-start
-
-     period-explicit = date-time "/" date-time
-     ; [ISO 8601] complete representation basic format for a period of
-     ; time consisting of a start and end. The start MUST be before the
-     ; end.
-
-     period-start = date-time "/" dur-value
-     ; [ISO 8601] complete representation basic format for a period of
-     ; time consisting of a start and positive duration of time.
-
-   Description: If the property permits, multiple "period" values are
-   specified by a COMMA character (US-ASCII decimal 44) separated list
-   of values. There are two forms of a period of time. First, a period
-   of time is identified by its start and its end. This format is
-   expressed as the [ISO 8601] complete representation, basic format for
-   "DATE-TIME" start of the period, followed by a SOLIDUS character
-   (US-ASCII decimal 47), followed by the "DATE-TIME" of the end of the
-   period. The start of the period MUST be before the end of the period.
-   Second, a period of time can also be defined by a start and a
-   positive duration of time. The format is expressed as the [ISO 8601]
-   complete representation, basic format for the "DATE-TIME" start of
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 39]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   the period, followed by a SOLIDUS character (US-ASCII decimal 47),
-   followed by the [ISO 8601] basic format for "DURATION" of the period.
-
-   Example: The period starting at 18:00:00 UTC, on January 1, 1997 and
-   ending at 07:00:00 UTC on January 2, 1997 would be:
-
-     19970101T180000Z/19970102T070000Z
-
-   The period start at 18:00:00 on January 1, 1997 and lasting 5 hours
-   and 30 minutes would be:
-
-     19970101T180000Z/PT5H30M
-
-   No additional content value encoding (i.e., BACKSLASH character
-   encoding) is defined for this value type.
-
-4.3.10 Recurrence Rule
-
-   Value Name: RECUR
-
-   Purpose: This value type is used to identify properties that contain
-   a recurrence rule specification.
-
-   Formal Definition: The value type is defined by the following
-   notation:
-
-     recur      = "FREQ"=freq *(
-
-                ; either UNTIL or COUNT may appear in a 'recur',
-                ; but UNTIL and COUNT MUST NOT occur in the same 'recur'
-
-                ( ";" "UNTIL" "=" enddate ) /
-                ( ";" "COUNT" "=" 1*DIGIT ) /
-
-                ; the rest of these keywords are optional,
-                ; but MUST NOT occur more than once
-
-                ( ";" "INTERVAL" "=" 1*DIGIT )          /
-                ( ";" "BYSECOND" "=" byseclist )        /
-                ( ";" "BYMINUTE" "=" byminlist )        /
-                ( ";" "BYHOUR" "=" byhrlist )           /
-                ( ";" "BYDAY" "=" bywdaylist )          /
-                ( ";" "BYMONTHDAY" "=" bymodaylist )    /
-                ( ";" "BYYEARDAY" "=" byyrdaylist )     /
-                ( ";" "BYWEEKNO" "=" bywknolist )       /
-                ( ";" "BYMONTH" "=" bymolist )          /
-                ( ";" "BYSETPOS" "=" bysplist )         /
-                ( ";" "WKST" "=" weekday )              /
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 40]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-                ( ";" x-name "=" text )
-                )
-
-     freq       = "SECONDLY" / "MINUTELY" / "HOURLY" / "DAILY"
-                / "WEEKLY" / "MONTHLY" / "YEARLY"
-
-     enddate    = date
-     enddate    =/ date-time            ;An UTC value
-
-     byseclist  = seconds / ( seconds *("," seconds) )
-
-     seconds    = 1DIGIT / 2DIGIT       ;0 to 59
-
-     byminlist  = minutes / ( minutes *("," minutes) )
-
-     minutes    = 1DIGIT / 2DIGIT       ;0 to 59
-
-     byhrlist   = hour / ( hour *("," hour) )
-
-     hour       = 1DIGIT / 2DIGIT       ;0 to 23
-
-     bywdaylist = weekdaynum / ( weekdaynum *("," weekdaynum) )
-
-     weekdaynum = [([plus] ordwk / minus ordwk)] weekday
-
-     plus       = "+"
-
-     minus      = "-"
-
-     ordwk      = 1DIGIT / 2DIGIT       ;1 to 53
-
-     weekday    = "SU" / "MO" / "TU" / "WE" / "TH" / "FR" / "SA"
-     ;Corresponding to SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY,
-     ;FRIDAY, SATURDAY and SUNDAY days of the week.
-
-     bymodaylist = monthdaynum / ( monthdaynum *("," monthdaynum) )
-
-     monthdaynum = ([plus] ordmoday) / (minus ordmoday)
-
-     ordmoday   = 1DIGIT / 2DIGIT       ;1 to 31
-
-     byyrdaylist = yeardaynum / ( yeardaynum *("," yeardaynum) )
-
-     yeardaynum = ([plus] ordyrday) / (minus ordyrday)
-
-     ordyrday   = 1DIGIT / 2DIGIT / 3DIGIT      ;1 to 366
-
-     bywknolist = weeknum / ( weeknum *("," weeknum) )
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 41]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     weeknum    = ([plus] ordwk) / (minus ordwk)
-
-     bymolist   = monthnum / ( monthnum *("," monthnum) )
-
-     monthnum   = 1DIGIT / 2DIGIT       ;1 to 12
-
-     bysplist   = setposday / ( setposday *("," setposday) )
-
-     setposday  = yeardaynum
-
-   Description: If the property permits, multiple "recur" values are
-   specified by a COMMA character (US-ASCII decimal 44) separated list
-   of values. The value type is a structured value consisting of a list
-   of one or more recurrence grammar parts. Each rule part is defined by
-   a NAME=VALUE pair. The rule parts are separated from each other by
-   the SEMICOLON character (US-ASCII decimal 59). The rule parts are not
-   ordered in any particular sequence. Individual rule parts MUST only
-   be specified once.
-
-   The FREQ rule part identifies the type of recurrence rule. This rule
-   part MUST be specified in the recurrence rule. Valid values include
-   SECONDLY, to specify repeating events based on an interval of a
-   second or more; MINUTELY, to specify repeating events based on an
-   interval of a minute or more; HOURLY, to specify repeating events
-   based on an interval of an hour or more; DAILY, to specify repeating
-   events based on an interval of a day or more; WEEKLY, to specify
-   repeating events based on an interval of a week or more; MONTHLY, to
-   specify repeating events based on an interval of a month or more; and
-   YEARLY, to specify repeating events based on an interval of a year or
-   more.
-
-   The INTERVAL rule part contains a positive integer representing how
-   often the recurrence rule repeats. The default value is "1", meaning
-   every second for a SECONDLY rule, or every minute for a MINUTELY
-   rule, every hour for an HOURLY rule, every day for a DAILY rule,
-   every week for a WEEKLY rule, every month for a MONTHLY rule and
-   every year for a YEARLY rule.
-
-   The UNTIL rule part defines a date-time value which bounds the
-   recurrence rule in an inclusive manner. If the value specified by
-   UNTIL is synchronized with the specified recurrence, this date or
-   date-time becomes the last instance of the recurrence. If specified
-   as a date-time value, then it MUST be specified in an UTC time
-   format. If not present, and the COUNT rule part is also not present,
-   the RRULE is considered to repeat forever.
-
-   The COUNT rule part defines the number of occurrences at which to
-   range-bound the recurrence. The "DTSTART" property value, if
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 42]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   specified, counts as the first occurrence.
-
-   The BYSECOND rule part specifies a COMMA character (US-ASCII decimal
-   44) separated list of seconds within a minute. Valid values are 0 to
-   59. The BYMINUTE rule part specifies a COMMA character (US-ASCII
-   decimal 44) separated list of minutes within an hour. Valid values
-   are 0 to 59. The BYHOUR rule part specifies a COMMA character (US-
-   ASCII decimal 44) separated list of hours of the day. Valid values
-   are 0 to 23.
-
-   The BYDAY rule part specifies a COMMA character (US-ASCII decimal 44)
-   separated list of days of the week; MO indicates Monday; TU indicates
-   Tuesday; WE indicates Wednesday; TH indicates Thursday; FR indicates
-   Friday; SA indicates Saturday; SU indicates Sunday.
-
-   Each BYDAY value can also be preceded by a positive (+n) or negative
-   (-n) integer. If present, this indicates the nth occurrence of the
-   specific day within the MONTHLY or YEARLY RRULE. For example, within
-   a MONTHLY rule, +1MO (or simply 1MO) represents the first Monday
-   within the month, whereas -1MO represents the last Monday of the
-   month. If an integer modifier is not present, it means all days of
-   this type within the specified frequency. For example, within a
-   MONTHLY rule, MO represents all Mondays within the month.
-
-   The BYMONTHDAY rule part specifies a COMMA character (ASCII decimal
-   44) separated list of days of the month. Valid values are 1 to 31 or
-   -31 to -1. For example, -10 represents the tenth to the last day of
-   the month.
-
-   The BYYEARDAY rule part specifies a COMMA character (US-ASCII decimal
-   44) separated list of days of the year. Valid values are 1 to 366 or
-   -366 to -1. For example, -1 represents the last day of the year
-   (December 31st) and -306 represents the 306th to the last day of the
-   year (March 1st).
-
-   The BYWEEKNO rule part specifies a COMMA character (US-ASCII decimal
-   44) separated list of ordinals specifying weeks of the year. Valid
-   values are 1 to 53 or -53 to -1. This corresponds to weeks according
-   to week numbering as defined in [ISO 8601]. A week is defined as a
-   seven day period, starting on the day of the week defined to be the
-   week start (see WKST). Week number one of the calendar year is the
-   first week which contains at least four (4) days in that calendar
-   year. This rule part is only valid for YEARLY rules. For example, 3
-   represents the third week of the year.
-
-        Note: Assuming a Monday week start, week 53 can only occur when
-        Thursday is January 1 or if it is a leap year and Wednesday is
-        January 1.
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 43]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   The BYMONTH rule part specifies a COMMA character (US-ASCII decimal
-   44) separated list of months of the year. Valid values are 1 to 12.
-
-   The WKST rule part specifies the day on which the workweek starts.
-   Valid values are MO, TU, WE, TH, FR, SA and SU. This is significant
-   when a WEEKLY RRULE has an interval greater than 1, and a BYDAY rule
-   part is specified. This is also significant when in a YEARLY RRULE
-   when a BYWEEKNO rule part is specified. The default value is MO.
-
-   The BYSETPOS rule part specifies a COMMA character (US-ASCII decimal
-   44) separated list of values which corresponds to the nth occurrence
-   within the set of events specified by the rule. Valid values are 1 to
-   366 or -366 to -1. It MUST only be used in conjunction with another
-   BYxxx rule part. For example "the last work day of the month" could
-   be represented as:
-
-     RRULE:FREQ=MONTHLY;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-1
-
-   Each BYSETPOS value can include a positive (+n) or negative (-n)
-   integer. If present, this indicates the nth occurrence of the
-   specific occurrence within the set of events specified by the rule.
-
-   If BYxxx rule part values are found which are beyond the available
-   scope (ie, BYMONTHDAY=30 in February), they are simply ignored.
-
-   Information, not contained in the rule, necessary to determine the
-   various recurrence instance start time and dates are derived from the
-   Start Time (DTSTART) entry attribute. For example,
-   "FREQ=YEARLY;BYMONTH=1" doesn't specify a specific day within the
-   month or a time. This information would be the same as what is
-   specified for DTSTART.
-
-   BYxxx rule parts modify the recurrence in some manner. BYxxx rule
-   parts for a period of time which is the same or greater than the
-   frequency generally reduce or limit the number of occurrences of the
-   recurrence generated. For example, "FREQ=DAILY;BYMONTH=1" reduces the
-   number of recurrence instances from all days (if BYMONTH tag is not
-   present) to all days in January. BYxxx rule parts for a period of
-   time less than the frequency generally increase or expand the number
-   of occurrences of the recurrence. For example,
-   "FREQ=YEARLY;BYMONTH=1,2" increases the number of days within the
-   yearly recurrence set from 1 (if BYMONTH tag is not present) to 2.
-
-   If multiple BYxxx rule parts are specified, then after evaluating the
-   specified FREQ and INTERVAL rule parts, the BYxxx rule parts are
-   applied to the current set of evaluated occurrences in the following
-   order: BYMONTH, BYWEEKNO, BYYEARDAY, BYMONTHDAY, BYDAY, BYHOUR,
-   BYMINUTE, BYSECOND and BYSETPOS; then COUNT and UNTIL are evaluated.
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 44]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Here is an example of evaluating multiple BYxxx rule parts.
-
-     DTSTART;TZID=US-Eastern:19970105T083000
-     RRULE:FREQ=YEARLY;INTERVAL=2;BYMONTH=1;BYDAY=SU;BYHOUR=8,9;
-      BYMINUTE=30
-
-   First, the "INTERVAL=2" would be applied to "FREQ=YEARLY" to arrive
-   at "every other year". Then, "BYMONTH=1" would be applied to arrive
-   at "every January, every other year". Then, "BYDAY=SU" would be
-   applied to arrive at "every Sunday in January, every other year".
-   Then, "BYHOUR=8,9" would be applied to arrive at "every Sunday in
-   January at 8 AM and 9 AM, every other year". Then, "BYMINUTE=30"
-   would be applied to arrive at "every Sunday in January at 8:30 AM and
-   9:30 AM, every other year". Then, lacking information from RRULE, the
-   second is derived from DTSTART, to end up in "every Sunday in January
-   at 8:30:00 AM and 9:30:00 AM, every other year". Similarly, if the
-   BYMINUTE, BYHOUR, BYDAY, BYMONTHDAY or BYMONTH rule part were
-   missing, the appropriate minute, hour, day or month would have been
-   retrieved from the "DTSTART" property.
-
-   No additional content value encoding (i.e., BACKSLASH character
-   encoding) is defined for this value type.
-
-   Example: The following is a rule which specifies 10 meetings which
-   occur every other day:
-
-     FREQ=DAILY;COUNT=10;INTERVAL=2
-
-   There are other examples specified in the "RRULE" specification.
-
-4.3.11 Text
-
-   Value Name: TEXT
-
-   Purpose This value type is used to identify values that contain human
-   readable text.
-
-   Formal Definition: The character sets supported by this revision of
-   iCalendar are UTF-8 and US ASCII thereof. The applicability to other
-   character sets is for future work. The value type is defined by the
-   following notation.
-
-     text       = *(TSAFE-CHAR / ":" / DQUOTE / ESCAPED-CHAR)
-     ; Folded according to description above
-
-     ESCAPED-CHAR = "\\" / "\;" / "\," / "\N" / "\n")
-        ; \\ encodes \, \N or \n encodes newline
-        ; \; encodes ;, \, encodes ,
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 45]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     TSAFE-CHAR = %x20-21 / %x23-2B / %x2D-39 / %x3C-5B
-                  %x5D-7E / NON-US-ASCII
-        ; Any character except CTLs not needed by the current
-        ; character set, DQUOTE, ";", ":", "\", ","
-
-     Note: Certain other character sets may require modification of the
-     above definitions, but this is beyond the scope of this document.
-
-   Description: If the property permits, multiple "text" values are
-   specified by a COMMA character (US-ASCII decimal 44) separated list
-   of values.
-
-   The language in which the text is represented can be controlled by
-   the "LANGUAGE" property parameter.
-
-   An intentional formatted text line break MUST only be included in a
-   "TEXT" property value by representing the line break with the
-   character sequence of BACKSLASH (US-ASCII decimal 92), followed by a
-   LATIN SMALL LETTER N (US-ASCII decimal 110) or a LATIN CAPITAL LETTER
-   N (US-ASCII decimal 78), that is "\n" or "\N".
-
-   The "TEXT" property values may also contain special characters that
-   are used to signify delimiters, such as a COMMA character for lists
-   of values or a SEMICOLON character for structured values. In order to
-   support the inclusion of these special characters in "TEXT" property
-   values, they MUST be escaped with a BACKSLASH character. A BACKSLASH
-   character (US-ASCII decimal 92) in a "TEXT" property value MUST be
-   escaped with another BACKSLASH character. A COMMA character in a
-   "TEXT" property value MUST be escaped with a BACKSLASH character
-   (US-ASCII decimal 92). A SEMICOLON character in a "TEXT" property
-   value MUST be escaped with a BACKSLASH character (US-ASCII decimal
-   92).  However, a COLON character in a "TEXT" property value SHALL NOT
-   be escaped with a BACKSLASH character.Example: A multiple line value
-   of:
-
-     Project XYZ Final Review
-     Conference Room - 3B
-     Come Prepared.
-
-   would be represented as:
-
-     Project XYZ Final Review\nConference Room - 3B\nCome Prepared.
-
-
-
-
-
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 46]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-4.3.12 Time
-
-   Value Name: TIME
-
-   Purpose: This value type is used to identify values that contain a
-   time of day.
-
-   Formal Definition: The data type is defined by the following
-   notation:
-
-     time               = time-hour time-minute time-second [time-utc]
-
-     time-hour          = 2DIGIT        ;00-23
-     time-minute        = 2DIGIT        ;00-59
-     time-second        = 2DIGIT        ;00-60
-     ;The "60" value is used to account for "leap" seconds.
-
-     time-utc   = "Z"
-
-   Description: If the property permits, multiple "time" values are
-   specified by a COMMA character (US-ASCII decimal 44) separated list
-   of values. No additional content value encoding (i.e., BACKSLASH
-   character encoding) is defined for this value type.
-
-   The "TIME" data type is used to identify values that contain a time
-   of day. The format is based on the [ISO 8601] complete
-   representation, basic format for a time of day. The text format
-   consists of a two-digit 24-hour of the day (i.e., values 0-23), two-
-   digit minute in the hour (i.e., values 0-59), and two-digit seconds
-   in the minute (i.e., values 0-60). The seconds value of 60 MUST only
-   to be used to account for "leap" seconds. Fractions of a second are
-   not supported by this format.
-
-   In parallel to the "DATE-TIME" definition above, the "TIME" data type
-   expresses time values in three forms:
-
-   The form of time with UTC offset MUST NOT be used. For example, the
-   following is NOT VALID for a time value:
-
-     230000-0800        ;Invalid time format
-
-   FORM #1 LOCAL TIME
-
-   The local time form is simply a time value that does not contain the
-   UTC designator nor does it reference a time zone. For example, 11:00
-   PM:
-
-     230000
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 47]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Time values of this type are said to be "floating" and are not bound
-   to any time zone in particular. They are used to represent the same
-   hour, minute, and second value regardless of which time zone is
-   currently being observed. For example, an event can be defined that
-   indicates that an individual will be busy from 11:00 AM to 1:00 PM
-   every day, no matter which time zone the person is in. In these
-   cases, a local time can be specified. The recipient of an iCalendar
-   object with a property value consisting of a local time, without any
-   relative time zone information, SHOULD interpret the value as being
-   fixed to whatever time zone the ATTENDEE is in at any given moment.
-   This means that two ATTENDEEs may participate in the same event at
-   different UTC times; floating time SHOULD only be used where that is
-   reasonable behavior.
-
-   In most cases, a fixed time is desired. To properly communicate a
-   fixed time in a property value, either UTC time or local time with
-   time zone reference MUST be specified.
-
-   The use of local time in a TIME value without the TZID property
-   parameter is to be interpreted as a local time value, regardless of
-   the existence of "VTIMEZONE" calendar components in the iCalendar
-   object.
-
-   FORM #2: UTC TIME
-
-   UTC time, or absolute time, is identified by a LATIN CAPITAL LETTER Z
-   suffix character (US-ASCII decimal 90), the UTC designator, appended
-   to the time value. For example, the following represents 07:00 AM
-   UTC:
-
-     070000Z
-
-   The TZID property parameter MUST NOT be applied to TIME properties
-   whose time values are specified in UTC.
-
-   FORM #3: LOCAL TIME AND TIME ZONE REFERENCE
-
-   The local time with reference to time zone information form is
-   identified by the use the TZID property parameter to reference the
-   appropriate time zone definition. TZID is discussed in detail in the
-   section on Time Zone.
-
-   Example: The following represents 8:30 AM in New York in Winter, five
-   hours behind UTC, in each of the three formats using the "X-
-   TIMEOFDAY" non-standard property:
-
-
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 48]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     X-TIMEOFDAY:083000
-
-     X-TIMEOFDAY:133000Z
-
-     X-TIMEOFDAY;TZID=US-Eastern:083000
-
-4.3.13 URI
-
-   Value Name: URI
-
-   Purpose: This value type is used to identify values that contain a
-   uniform resource identifier (URI) type of reference to the property
-   value.
-
-   Formal Definition: The data type is defined by the following
-   notation:
-
-     uri        = <As defined by any IETF RFC>
-
-   Description: This data type might be used to reference binary
-   information, for values that are large, or otherwise undesirable to
-   include directly in the iCalendar object.
-
-   The URI value formats in RFC 1738, RFC 2111 and any other IETF
-   registered value format can be specified.
-
-   Any IANA registered URI format can be used. These include, but are
-   not limited to, those defined in RFC 1738 and RFC 2111.
-
-   When a property parameter value is a URI value type, the URI MUST be
-   specified as a quoted-string value.
-
-   No additional content value encoding (i.e., BACKSLASH character
-   encoding) is defined for this value type.
-
-   Example: The following is a URI for a network file:
-
-     http://host1.com/my-report.txt
-
-4.3.14 UTC Offset
-
-   Value Name: UTC-OFFSET
-
-   Purpose: This value type is used to identify properties that contain
-   an offset from UTC to local time.
-
-   Formal Definition: The data type is defined by the following
-   notation:
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 49]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     utc-offset = time-numzone  ;As defined above in time data type
-
-     time-numzone       = ("+" / "-") time-hour time-minute [time-
-     second]
-
-   Description: The PLUS SIGN character MUST be specified for positive
-   UTC offsets (i.e., ahead of UTC). The value of "-0000" and "-000000"
-   are not allowed. The time-second, if present, may not be 60; if
-   absent, it defaults to zero.
-
-   No additional content value encoding (i.e., BACKSLASH character
-   encoding) is defined for this value type.
-
-   Example: The following UTC offsets are given for standard time for
-   New York (five hours behind UTC) and Geneva (one hour ahead of UTC):
-
-     -0500
-
-     +0100
-
-4.4 iCalendar Object
-
-   The Calendaring and Scheduling Core Object is a collection of
-   calendaring and scheduling information. Typically, this information
-   will consist of a single iCalendar object. However, multiple
-   iCalendar objects can be sequentially grouped together. The first
-   line and last line of the iCalendar object MUST contain a pair of
-   iCalendar object delimiter strings. The syntax for an iCalendar
-   object is as follows:
-
-     icalobject = 1*("BEGIN" ":" "VCALENDAR" CRLF
-                  icalbody
-                  "END" ":" "VCALENDAR" CRLF)
-
-   The following is a simple example of an iCalendar object:
-
-     BEGIN:VCALENDAR
-     VERSION:2.0
-     PRODID:-//hacksw/handcal//NONSGML v1.0//EN
-     BEGIN:VEVENT
-     DTSTART:19970714T170000Z
-     DTEND:19970715T035959Z
-     SUMMARY:Bastille Day Party
-     END:VEVENT
-     END:VCALENDAR
-
-
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 50]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-4.5 Property
-
-   A property is the definition of an individual attribute describing a
-   calendar or a calendar component. A property takes the form defined
-   by the "contentline" notation defined in section 4.1.1.
-
-   The following is an example of a property:
-
-     DTSTART:19960415T133000Z
-
-   This memo imposes no ordering of properties within an iCalendar
-   object.
-
-   Property names, parameter names and enumerated parameter values are
-   case insensitive. For example, the property name "DUE" is the same as
-   "due" and "Due", DTSTART;TZID=US-Eastern:19980714T120000 is the same
-   as DtStart;TzID=US-Eastern:19980714T120000.
-
-4.6 Calendar Components
-
-   The body of the iCalendar object consists of a sequence of calendar
-   properties and one or more calendar components. The calendar
-   properties are attributes that apply to the calendar as a whole. The
-   calendar components are collections of properties that express a
-   particular calendar semantic. For example, the calendar component can
-   specify an event, a to-do, a journal entry, time zone information, or
-   free/busy time information, or an alarm.
-
-   The body of the iCalendar object is defined by the following
-   notation:
-
-     icalbody   = calprops component
-
-     calprops   = 2*(
-
-                ; 'prodid' and 'version' are both REQUIRED,
-                ; but MUST NOT occur more than once
-
-                prodid /version /
-
-                ; 'calscale' and 'method' are optional,
-                ; but MUST NOT occur more than once
-
-                calscale        /
-                method          /
-
-                x-prop
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 51]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-                )
-
-     component  = 1*(eventc / todoc / journalc / freebusyc /
-                / timezonec / iana-comp / x-comp)
-
-     iana-comp  = "BEGIN" ":" iana-token CRLF
-
-                  1*contentline
-
-                  "END" ":" iana-token CRLF
-
-     x-comp     = "BEGIN" ":" x-name CRLF
-
-                  1*contentline
-
-                  "END" ":" x-name CRLF
-
-   An iCalendar object MUST include the "PRODID" and "VERSION" calendar
-   properties. In addition, it MUST include at least one calendar
-   component. Special forms of iCalendar objects are possible to publish
-   just busy time (i.e., only a "VFREEBUSY" calendar component) or time
-   zone (i.e., only a "VTIMEZONE" calendar component) information. In
-   addition, a complex iCalendar object is possible that is used to
-   capture a complete snapshot of the contents of a calendar (e.g.,
-   composite of many different calendar components). More commonly, an
-   iCalendar object will consist of just a single "VEVENT", "VTODO" or
-   "VJOURNAL" calendar component.
-
-4.6.1 Event Component
-
-   Component Name: "VEVENT"
-
-   Purpose: Provide a grouping of component properties that describe an
-   event.
-
-   Format Definition: A "VEVENT" calendar component is defined by the
-   following notation:
-
-     eventc     = "BEGIN" ":" "VEVENT" CRLF
-                  eventprop *alarmc
-                  "END" ":" "VEVENT" CRLF
-
-     eventprop  = *(
-
-                ; the following are optional,
-                ; but MUST NOT occur more than once
-
-                class / created / description / dtstart / geo /
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 52]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-                last-mod / location / organizer / priority /
-                dtstamp / seq / status / summary / transp /
-                uid / url / recurid /
-
-                ; either 'dtend' or 'duration' may appear in
-                ; a 'eventprop', but 'dtend' and 'duration'
-                ; MUST NOT occur in the same 'eventprop'
-
-                dtend / duration /
-
-                ; the following are optional,
-                ; and MAY occur more than once
-
-                attach / attendee / categories / comment /
-                contact / exdate / exrule / rstatus / related /
-                resources / rdate / rrule / x-prop
-
-                )
-
-   Description: A "VEVENT" calendar component is a grouping of component
-   properties, and possibly including "VALARM" calendar components, that
-   represents a scheduled amount of time on a calendar. For example, it
-   can be an activity; such as a one-hour long, department meeting from
-   8:00 AM to 9:00 AM, tomorrow. Generally, an event will take up time
-   on an individual calendar. Hence, the event will appear as an opaque
-   interval in a search for busy time. Alternately, the event can have
-   its Time Transparency set to "TRANSPARENT" in order to prevent
-   blocking of the event in searches for busy time.
-
-   The "VEVENT" is also the calendar component used to specify an
-   anniversary or daily reminder within a calendar. These events have a
-   DATE value type for the "DTSTART" property instead of the default
-   data type of DATE-TIME. If such a "VEVENT" has a "DTEND" property, it
-   MUST be specified as a DATE value also. The anniversary type of
-   "VEVENT" can span more than one date (i.e, "DTEND" property value is
-   set to a calendar date after the "DTSTART" property value).
-
-   The "DTSTART" property for a "VEVENT" specifies the inclusive start
-   of the event. For recurring events, it also specifies the very first
-   instance in the recurrence set. The "DTEND" property for a "VEVENT"
-   calendar component specifies the non-inclusive end of the event. For
-   cases where a "VEVENT" calendar component specifies a "DTSTART"
-   property with a DATE data type but no "DTEND" property, the events
-   non-inclusive end is the end of the calendar date specified by the
-   "DTSTART" property. For cases where a "VEVENT" calendar component
-   specifies a "DTSTART" property with a DATE-TIME data type but no
-   "DTEND" property, the event ends on the same calendar date and time
-   of day specified by the "DTSTART" property.
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 53]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   The "VEVENT" calendar component cannot be nested within another
-   calendar component. However, "VEVENT" calendar components can be
-   related to each other or to a "VTODO" or to a "VJOURNAL" calendar
-   component with the "RELATED-TO" property.
-
-   Example: The following is an example of the "VEVENT" calendar
-   component used to represent a meeting that will also be opaque to
-   searches for busy time:
-
-     BEGIN:VEVENT
-     UID:19970901T130000Z-123401 at host.com
-     DTSTAMP:19970901T1300Z
-     DTSTART:19970903T163000Z
-     DTEND:19970903T190000Z
-     SUMMARY:Annual Employee Review
-     CLASS:PRIVATE
-     CATEGORIES:BUSINESS,HUMAN RESOURCES
-     END:VEVENT
-
-   The following is an example of the "VEVENT" calendar component used
-   to represent a reminder that will not be opaque, but rather
-   transparent, to searches for busy time:
-
-     BEGIN:VEVENT
-     UID:19970901T130000Z-123402 at host.com
-     DTSTAMP:19970901T1300Z
-     DTSTART:19970401T163000Z
-     DTEND:19970402T010000Z
-     SUMMARY:Laurel is in sensitivity awareness class.
-     CLASS:PUBLIC
-     CATEGORIES:BUSINESS,HUMAN RESOURCES
-     TRANSP:TRANSPARENT
-     END:VEVENT
-
-   The following is an example of the "VEVENT" calendar component used
-   to represent an anniversary that will occur annually. Since it takes
-   up no time, it will not appear as opaque in a search for busy time;
-   no matter what the value of the "TRANSP" property indicates:
-
-     BEGIN:VEVENT
-     UID:19970901T130000Z-123403 at host.com
-     DTSTAMP:19970901T1300Z
-     DTSTART:19971102
-     SUMMARY:Our Blissful Anniversary
-     CLASS:CONFIDENTIAL
-     CATEGORIES:ANNIVERSARY,PERSONAL,SPECIAL OCCASION
-     RRULE:FREQ=YEARLY
-     END:VEVENT
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 54]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-4.6.2 To-do Component
-
-   Component Name: VTODO
-
-   Purpose: Provide a grouping of calendar properties that describe a
-   to-do.
-
-   Formal Definition: A "VTODO" calendar component is defined by the
-   following notation:
-
-     todoc      = "BEGIN" ":" "VTODO" CRLF
-                  todoprop *alarmc
-                  "END" ":" "VTODO" CRLF
-
-     todoprop   = *(
-
-                ; the following are optional,
-                ; but MUST NOT occur more than once
-
-                class / completed / created / description / dtstamp /
-                dtstart / geo / last-mod / location / organizer /
-                percent / priority / recurid / seq / status /
-                summary / uid / url /
-
-                ; either 'due' or 'duration' may appear in
-                ; a 'todoprop', but 'due' and 'duration'
-                ; MUST NOT occur in the same 'todoprop'
-
-                due / duration /
-
-                ; the following are optional,
-                ; and MAY occur more than once
-                attach / attendee / categories / comment / contact /
-                exdate / exrule / rstatus / related / resources /
-                rdate / rrule / x-prop
-
-                )
-
-   Description: A "VTODO" calendar component is a grouping of component
-   properties and possibly "VALARM" calendar components that represent
-   an action-item or assignment. For example, it can be used to
-   represent an item of work assigned to an individual; such as "turn in
-   travel expense today".
-
-   The "VTODO" calendar component cannot be nested within another
-   calendar component. However, "VTODO" calendar components can be
-   related to each other or to a "VTODO" or to a "VJOURNAL" calendar
-   component with the "RELATED-TO" property.
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 55]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   A "VTODO" calendar component without the "DTSTART" and "DUE" (or
-   "DURATION") properties specifies a to-do that will be associated with
-   each successive calendar date, until it is completed.
-
-   Example: The following is an example of a "VTODO" calendar component:
-
-     BEGIN:VTODO
-     UID:19970901T130000Z-123404 at host.com
-     DTSTAMP:19970901T1300Z
-     DTSTART:19970415T133000Z
-     DUE:19970416T045959Z
-     SUMMARY:1996 Income Tax Preparation
-     CLASS:CONFIDENTIAL
-     CATEGORIES:FAMILY,FINANCE
-     PRIORITY:1
-     STATUS:NEEDS-ACTION
-     END:VTODO
-
-4.6.3 Journal Component
-
-   Component Name: VJOURNAL
-
-   Purpose: Provide a grouping of component properties that describe a
-   journal entry.
-
-   Formal Definition: A "VJOURNAL" calendar component is defined by the
-   following notation:
-
-     journalc   = "BEGIN" ":" "VJOURNAL" CRLF
-                  jourprop
-                  "END" ":" "VJOURNAL" CRLF
-
-     jourprop   = *(
-
-                ; the following are optional,
-                ; but MUST NOT occur more than once
-
-                class / created / description / dtstart / dtstamp /
-                last-mod / organizer / recurid / seq / status /
-                summary / uid / url /
-
-                ; the following are optional,
-                ; and MAY occur more than once
-
-                attach / attendee / categories / comment /
-                contact / exdate / exrule / related / rdate /
-                rrule / rstatus / x-prop
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 56]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-                )
-
-   Description: A "VJOURNAL" calendar component is a grouping of
-   component properties that represent one or more descriptive text
-   notes associated with a particular calendar date. The "DTSTART"
-   property is used to specify the calendar date that the journal entry
-   is associated with. Generally, it will have a DATE value data type,
-   but it can also be used to specify a DATE-TIME value data type.
-   Examples of a journal entry include a daily record of a legislative
-   body or a journal entry of individual telephone contacts for the day
-   or an ordered list of accomplishments for the day. The "VJOURNAL"
-   calendar component can also be used to associate a document with a
-   calendar date.
-
-   The "VJOURNAL" calendar component does not take up time on a
-   calendar. Hence, it does not play a role in free or busy time
-   searches - - it is as though it has a time transparency value of
-   TRANSPARENT. It is transparent to any such searches.
-
-   The "VJOURNAL" calendar component cannot be nested within another
-   calendar component. However, "VJOURNAL" calendar components can be
-   related to each other or to a "VEVENT" or to a "VTODO" calendar
-   component, with the "RELATED-TO" property.
-
-   Example: The following is an example of the "VJOURNAL" calendar
-   component:
-
-     BEGIN:VJOURNAL
-     UID:19970901T130000Z-123405 at host.com
-     DTSTAMP:19970901T1300Z
-     DTSTART;VALUE=DATE:19970317
-     SUMMARY:Staff meeting minutes
-     DESCRIPTION:1. Staff meeting: Participants include Joe\, Lisa
-       and Bob. Aurora project plans were reviewed. There is currently
-       no budget reserves for this project. Lisa will escalate to
-       management. Next meeting on Tuesday.\n
-       2. Telephone Conference: ABC Corp. sales representative called
-       to discuss new printer. Promised to get us a demo by Friday.\n
-       3. Henry Miller (Handsoff Insurance): Car was totaled by tree.
-       Is looking into a loaner car. 654-2323 (tel).
-     END:VJOURNAL
-
-
-
-
-
-
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 57]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-4.6.4 Free/Busy Component
-
-   Component Name: VFREEBUSY
-
-   Purpose: Provide a grouping of component properties that describe
-   either a request for free/busy time, describe a response to a request
-   for free/busy time or describe a published set of busy time.
-
-   Formal Definition: A "VFREEBUSY" calendar component is defined by the
-   following notation:
-
-     freebusyc  = "BEGIN" ":" "VFREEBUSY" CRLF
-                  fbprop
-                  "END" ":" "VFREEBUSY" CRLF
-
-     fbprop     = *(
-
-                ; the following are optional,
-                ; but MUST NOT occur more than once
-
-                contact / dtstart / dtend / duration / dtstamp /
-                organizer / uid / url /
-
-                ; the following are optional,
-                ; and MAY occur more than once
-
-                attendee / comment / freebusy / rstatus / x-prop
-
-                )
-
-   Description: A "VFREEBUSY" calendar component is a grouping of
-   component properties that represents either a request for, a reply to
-   a request for free or busy time information or a published set of
-   busy time information.
-
-   When used to request free/busy time information, the "ATTENDEE"
-   property specifies the calendar users whose free/busy time is being
-   requested; the "ORGANIZER" property specifies the calendar user who
-   is requesting the free/busy time; the "DTSTART" and "DTEND"
-   properties specify the window of time for which the free/busy time is
-   being requested; the "UID" and "DTSTAMP" properties are specified to
-   assist in proper sequencing of multiple free/busy time requests.
-
-   When used to reply to a request for free/busy time, the "ATTENDEE"
-   property specifies the calendar user responding to the free/busy time
-   request; the "ORGANIZER" property specifies the calendar user that
-   originally requested the free/busy time; the "FREEBUSY" property
-   specifies the free/busy time information (if it exists); and the
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 58]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   "UID" and "DTSTAMP" properties are specified to assist in proper
-   sequencing of multiple free/busy time replies.
-
-   When used to publish busy time, the "ORGANIZER" property specifies
-   the calendar user associated with the published busy time; the
-   "DTSTART" and "DTEND" properties specify an inclusive time window
-   that surrounds the busy time information; the "FREEBUSY" property
-   specifies the published busy time information; and the "DTSTAMP"
-   property specifies the date/time that iCalendar object was created.
-
-   The "VFREEBUSY" calendar component cannot be nested within another
-   calendar component. Multiple "VFREEBUSY" calendar components can be
-   specified within an iCalendar object. This permits the grouping of
-   Free/Busy information into logical collections, such as monthly
-   groups of busy time information.
-
-   The "VFREEBUSY" calendar component is intended for use in iCalendar
-   object methods involving requests for free time, requests for busy
-   time, requests for both free and busy, and the associated replies.
-
-   Free/Busy information is represented with the "FREEBUSY" property.
-   This property provides a terse representation of time periods. One or
-   more "FREEBUSY" properties can be specified in the "VFREEBUSY"
-   calendar component.
-
-   When present in a "VFREEBUSY" calendar component, the "DTSTART" and
-   "DTEND" properties SHOULD be specified prior to any "FREEBUSY"
-   properties. In a free time request, these properties can be used in
-   combination with the "DURATION" property to represent a request for a
-   duration of free time within a specified window of time.
-
-   The recurrence properties ("RRULE", "EXRULE", "RDATE", "EXDATE") are
-   not permitted within a "VFREEBUSY" calendar component. Any recurring
-   events are resolved into their individual busy time periods using the
-   "FREEBUSY" property.
-
-   Example: The following is an example of a "VFREEBUSY" calendar
-   component used to request free or busy time information:
-
-     BEGIN:VFREEBUSY
-     ORGANIZER:MAILTO:jane_doe at host1.com
-     ATTENDEE:MAILTO:john_public at host2.com
-     DTSTART:19971015T050000Z
-     DTEND:19971016T050000Z
-     DTSTAMP:19970901T083000Z
-     END:VFREEBUSY
-
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 59]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   The following is an example of a "VFREEBUSY" calendar component used
-   to reply to the request with busy time information:
-
-     BEGIN:VFREEBUSY
-     ORGANIZER:MAILTO:jane_doe at host1.com
-     ATTENDEE:MAILTO:john_public at host2.com
-     DTSTAMP:19970901T100000Z
-     FREEBUSY;VALUE=PERIOD:19971015T050000Z/PT8H30M,
-      19971015T160000Z/PT5H30M,19971015T223000Z/PT6H30M
-     URL:http://host2.com/pub/busy/jpublic-01.ifb
-     COMMENT:This iCalendar file contains busy time information for
-       the next three months.
-     END:VFREEBUSY
-
-   The following is an example of a "VFREEBUSY" calendar component used
-   to publish busy time information.
-
-     BEGIN:VFREEBUSY
-     ORGANIZER:jsmith at host.com
-     DTSTART:19980313T141711Z
-     DTEND:19980410T141711Z
-     FREEBUSY:19980314T233000Z/19980315T003000Z
-     FREEBUSY:19980316T153000Z/19980316T163000Z
-     FREEBUSY:19980318T030000Z/19980318T040000Z
-     URL:http://www.host.com/calendar/busytime/jsmith.ifb
-     END:VFREEBUSY
-
-4.6.5 Time Zone Component
-
-   Component Name: VTIMEZONE
-
-   Purpose: Provide a grouping of component properties that defines a
-   time zone.
-
-   Formal Definition: A "VTIMEZONE" calendar component is defined by the
-   following notation:
-
-     timezonec  = "BEGIN" ":" "VTIMEZONE" CRLF
-
-                  2*(
-
-                  ; 'tzid' is required, but MUST NOT occur more
-                  ; than once
-
-                tzid /
-
-                  ; 'last-mod' and 'tzurl' are optional,
-                but MUST NOT occur more than once
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 60]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-                last-mod / tzurl /
-
-                  ; one of 'standardc' or 'daylightc' MUST occur
-                ..; and each MAY occur more than once.
-
-                standardc / daylightc /
-
-                ; the following is optional,
-                ; and MAY occur more than once
-
-                  x-prop
-
-                  )
-
-                  "END" ":" "VTIMEZONE" CRLF
-
-     standardc  = "BEGIN" ":" "STANDARD" CRLF
-
-                  tzprop
-
-                  "END" ":" "STANDARD" CRLF
-
-     daylightc  = "BEGIN" ":" "DAYLIGHT" CRLF
-
-                  tzprop
-
-                  "END" ":" "DAYLIGHT" CRLF
-
-     tzprop     = 3*(
-
-                ; the following are each REQUIRED,
-                ; but MUST NOT occur more than once
-
-                dtstart / tzoffsetto / tzoffsetfrom /
-
-                ; the following are optional,
-                ; and MAY occur more than once
-
-                comment / rdate / rrule / tzname / x-prop
-
-                )
-
-   Description: A time zone is unambiguously defined by the set of time
-   measurement rules determined by the governing body for a given
-   geographic area. These rules describe at a minimum the base  offset
-   from UTC for the time zone, often referred to as the Standard Time
-   offset. Many locations adjust their Standard Time forward or backward
-   by one hour, in order to accommodate seasonal changes in number of
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 61]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   daylight hours, often referred to as Daylight  Saving Time. Some
-   locations adjust their time by a fraction of an hour. Standard Time
-   is also known as Winter Time. Daylight Saving Time is also known as
-   Advanced Time, Summer Time, or Legal Time in certain countries. The
-   following table shows the changes in time zone rules in effect for
-   New York City starting from 1967. Each line represents a description
-   or rule for a particular observance.
-
-     Effective Observance Rule
-
-     Date       (Date/Time)             Offset  Abbreviation
-
-     1967-*     last Sun in Oct, 02:00  -0500   EST
-
-     1967-1973  last Sun in Apr, 02:00  -0400   EDT
-
-     1974-1974  Jan 6,  02:00           -0400   EDT
-
-     1975-1975  Feb 23, 02:00           -0400   EDT
-
-     1976-1986  last Sun in Apr, 02:00  -0400   EDT
-
-     1987-*     first Sun in Apr, 02:00 -0400   EDT
-
-        Note: The specification of a global time zone registry is not
-        addressed by this document and is left for future study.
-        However, implementers may find the Olson time zone database [TZ]
-        a useful reference. It is an informal, public-domain collection
-        of time zone information, which is currently being maintained by
-        volunteer Internet participants, and is used in several
-        operating systems. This database contains current and historical
-        time zone information for a wide variety of locations around the
-        globe; it provides a time zone identifier for every unique time
-        zone rule set in actual use since 1970, with historical data
-        going back to the introduction of standard time.
-
-   Interoperability between two calendaring and scheduling applications,
-   especially for recurring events, to-dos or journal entries, is
-   dependent on the ability to capture and convey date and time
-   information in an unambiguous format. The specification of current
-   time zone information is integral to this behavior.
-
-   If present, the "VTIMEZONE" calendar component defines the set of
-   Standard Time and Daylight Saving Time observances (or rules) for a
-   particular time zone for a given interval of time. The "VTIMEZONE"
-   calendar component cannot be nested within other calendar components.
-   Multiple "VTIMEZONE" calendar components can exist in an iCalendar
-   object. In this situation, each "VTIMEZONE" MUST represent a unique
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 62]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   time zone definition. This is necessary for some classes of events,
-   such as airline flights, that start in one time zone and end in
-   another.
-
-   The "VTIMEZONE" calendar component MUST be present if the iCalendar
-   object contains an RRULE that generates dates on both sides of a time
-   zone shift (e.g. both in Standard Time and Daylight Saving Time)
-   unless the iCalendar object intends to convey a floating time (See
-   the section "4.1.10.11 Time" for proper interpretation of floating
-   time). It can be present if the iCalendar object does not contain
-   such a RRULE. In addition, if a RRULE is present, there MUST be valid
-   time zone information for all recurrence instances.
-
-   The "VTIMEZONE" calendar component MUST include the "TZID" property
-   and at least one definition of a standard or daylight component. The
-   standard or daylight component MUST include the "DTSTART",
-   "TZOFFSETFROM" and "TZOFFSETTO" properties.
-
-   An individual "VTIMEZONE" calendar component MUST be specified for
-   each unique "TZID" parameter value specified in the iCalendar object.
-
-   Each "VTIMEZONE" calendar component consists of a collection of one
-   or more sub-components that describe the rule for a particular
-   observance (either a Standard Time or a Daylight Saving Time
-   observance). The "STANDARD" sub-component consists of a collection of
-   properties that describe Standard Time. The "DAYLIGHT" sub-component
-   consists of a collection of properties that describe Daylight Saving
-   Time. In general this collection of properties consists of:
-
-        - the first onset date-time for the observance
-
-        - the last onset date-time for the observance, if a last onset
-          is known.
-
-        - the offset to be applied for the observance
-
-        - a rule that describes the day and time when the observance
-          takes effect
-
-        - an optional name for the observance
-
-   For a given time zone, there may be multiple unique definitions of
-   the observances over a period of time. Each observance is described
-   using either a "STANDARD" or "DAYLIGHT" sub-component. The collection
-   of these sub-components is used to describe the time zone for a given
-   period of time. The offset to apply at any given time is found by
-   locating the observance that has the last onset date and time before
-   the time in question, and using the offset value from that
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 63]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   observance.
-
-   The top-level properties in a "VTIMEZONE" calendar component are:
-
-   The mandatory "TZID" property is a text value that uniquely
-   identifies the VTIMZONE calendar component within the scope of an
-   iCalendar object.
-
-   The optional "LAST-MODIFIED" property is a UTC value that specifies
-   the date and time that this time zone definition was last updated.
-
-   The optional "TZURL" property is url value that points to a published
-   VTIMEZONE definition. TZURL SHOULD refer to a resource that is
-   accessible by anyone who might need to interpret the object. This
-   SHOULD NOT normally be a file: URL or other URL that is not widely-
-   accessible.
-
-   The collection of properties that are used to define the STANDARD and
-   DAYLIGHT sub-components include:
-
-   The mandatory "DTSTART" property gives the effective onset date and
-   local time for the time zone sub-component definition. "DTSTART" in
-   this usage MUST be specified as a local DATE-TIME value.
-
-   The mandatory "TZOFFSETFROM" property gives the UTC offset which is
-   in use when the onset of this time zone observance begins.
-   "TZOFFSETFROM" is combined with "DTSTART" to define the effective
-   onset for the time zone sub-component definition. For example, the
-   following represents the time at which the observance of Standard
-   Time took effect in Fall 1967 for New York City:
-
-     DTSTART:19671029T020000
-
-     TZOFFSETFROM:-0400
-
-   The mandatory "TZOFFSETTO " property gives the UTC offset for the
-   time zone sub-component (Standard Time or Daylight Saving Time) when
-   this observance is in use.
-
-   The optional "TZNAME" property is the customary name for the time
-   zone. It may be specified multiple times, to allow for specifying
-   multiple language variants of the time zone names. This could be used
-   for displaying dates.
-
-   If specified, the onset for the observance defined by the time zone
-   sub-component is defined by either the "RRULE" or "RDATE" property.
-   If neither is specified, only one sub-component can be specified in
-   the "VTIMEZONE" calendar component and it is assumed that the single
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 64]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   observance specified is always in effect.
-
-   The "RRULE" property defines the recurrence rule for the onset of the
-   observance defined by this time zone sub-component. Some specific
-   requirements for the usage of RRULE for this purpose include:
-
-        - If observance is known to have an effective end date, the
-        "UNTIL" recurrence rule parameter MUST be used to specify the
-        last valid onset of this observance (i.e., the UNTIL date-time
-        will be equal to the last instance generated by the recurrence
-        pattern). It MUST be specified in UTC time.
-
-        - The "DTSTART" and the "TZOFFSETTO" properties MUST be used
-        when generating the onset date-time values (instances) from the
-        RRULE.
-
-   Alternatively, the "RDATE" property can be used to define the onset
-   of the observance by giving the individual onset date and times.
-   "RDATE" in this usage MUST be specified as a local DATE-TIME value in
-   UTC time.
-
-   The optional "COMMENT" property is also allowed for descriptive
-   explanatory text.
-
-   Example: The following are examples of the "VTIMEZONE" calendar
-   component:
-
-   This is an example showing time zone information for the Eastern
-   United States using "RDATE" property. Note that this is only suitable
-   for a recurring event that starts on or later than April 6, 1997 at
-   03:00:00 EDT (i.e., the earliest effective transition date and time)
-   and ends no later than April 7, 1998 02:00:00 EST (i.e., latest valid
-   date and time for EST in this scenario). For example, this can be
-   used for a recurring event that occurs every Friday, 8am-9:00 AM,
-   starting June 1, 1997, ending December 31, 1997.
-
-     BEGIN:VTIMEZONE
-     TZID:US-Eastern
-     LAST-MODIFIED:19870101T000000Z
-     BEGIN:STANDARD
-     DTSTART:19971026T020000
-     RDATE:19971026T020000
-     TZOFFSETFROM:-0400
-     TZOFFSETTO:-0500
-     TZNAME:EST
-     END:STANDARD
-     BEGIN:DAYLIGHT
-     DTSTART:19971026T020000
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 65]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     RDATE:19970406T020000
-     TZOFFSETFROM:-0500
-     TZOFFSETTO:-0400
-     TZNAME:EDT
-     END:DAYLIGHT
-     END:VTIMEZONE
-
-   This is a simple example showing the current time zone rules for the
-   Eastern United States using a RRULE recurrence pattern. Note that
-   there is no effective end date to either of the Standard Time or
-   Daylight Time rules. This information would be valid for a recurring
-   event starting today and continuing indefinitely.
-
-     BEGIN:VTIMEZONE
-     TZID:US-Eastern
-     LAST-MODIFIED:19870101T000000Z
-     TZURL:http://zones.stds_r_us.net/tz/US-Eastern
-     BEGIN:STANDARD
-     DTSTART:19671029T020000
-     RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
-     TZOFFSETFROM:-0400
-     TZOFFSETTO:-0500
-     TZNAME:EST
-     END:STANDARD
-     BEGIN:DAYLIGHT
-     DTSTART:19870405T020000
-     RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
-     TZOFFSETFROM:-0500
-     TZOFFSETTO:-0400
-     TZNAME:EDT
-     END:DAYLIGHT
-     END:VTIMEZONE
-
-   This is an example showing a fictitious set of rules for the Eastern
-   United States, where the Daylight Time rule has an effective end date
-   (i.e., after that date, Daylight Time is no longer observed).
-
-     BEGIN:VTIMEZONE
-     TZID:US--Fictitious-Eastern
-     LAST-MODIFIED:19870101T000000Z
-     BEGIN:STANDARD
-     DTSTART:19671029T020000
-     RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
-     TZOFFSETFROM:-0400
-     TZOFFSETTO:-0500
-     TZNAME:EST
-     END:STANDARD
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 66]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     BEGIN:DAYLIGHT
-     DTSTART:19870405T020000
-     RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4;UNTIL=19980404T070000Z
-     TZOFFSETFROM:-0500
-     TZOFFSETTO:-0400
-     TZNAME:EDT
-     END:DAYLIGHT
-     END:VTIMEZONE
-
-   This is an example showing a fictitious set of rules for the Eastern
-   United States, where the first Daylight Time rule has an effective
-   end date. There is a second Daylight Time rule that picks up where
-   the other left off.
-
-     BEGIN:VTIMEZONE
-     TZID:US--Fictitious-Eastern
-     LAST-MODIFIED:19870101T000000Z
-     BEGIN:STANDARD
-     DTSTART:19671029T020000
-     RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
-     TZOFFSETFROM:-0400
-     TZOFFSETTO:-0500
-     TZNAME:EST
-     END:STANDARD
-     BEGIN:DAYLIGHT
-     DTSTART:19870405T020000
-     RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4;UNTIL=19980404T070000Z
-     TZOFFSETFROM:-0500
-     TZOFFSETTO:-0400
-     TZNAME:EDT
-     END:DAYLIGHT
-     BEGIN:DAYLIGHT
-     DTSTART:19990424T020000
-     RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=4
-     TZOFFSETFROM:-0500
-     TZOFFSETTO:-0400
-     TZNAME:EDT
-     END:DAYLIGHT
-     END:VTIMEZONE
-
-4.6.6 Alarm Component
-
-   Component Name: VALARM
-
-   Purpose: Provide a grouping of component properties that define an
-   alarm.
-
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 67]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Formal Definition: A "VALARM" calendar component is defined by the
-   following notation:
-
-          alarmc     = "BEGIN" ":" "VALARM" CRLF
-                       (audioprop / dispprop / emailprop / procprop)
-                       "END" ":" "VALARM" CRLF
-
-     audioprop  = 2*(
-
-                ; 'action' and 'trigger' are both REQUIRED,
-                ; but MUST NOT occur more than once
-
-                action / trigger /
-
-                ; 'duration' and 'repeat' are both optional,
-                ; and MUST NOT occur more than once each,
-                ; but if one occurs, so MUST the other
-
-                duration / repeat /
-
-                ; the following is optional,
-                ; but MUST NOT occur more than once
-
-                attach /
-
-                ; the following is optional,
-                ; and MAY occur more than once
-
-                x-prop
-
-                )
-
-
-
-     dispprop   = 3*(
-
-                ; the following are all REQUIRED,
-                ; but MUST NOT occur more than once
-
-                action / description / trigger /
-
-                ; 'duration' and 'repeat' are both optional,
-                ; and MUST NOT occur more than once each,
-                ; but if one occurs, so MUST the other
-
-                duration / repeat /
-
-                ; the following is optional,
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 68]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-                ; and MAY occur more than once
-
-                *x-prop
-
-                )
-
-
-
-     emailprop  = 5*(
-
-                ; the following are all REQUIRED,
-                ; but MUST NOT occur more than once
-
-                action / description / trigger / summary
-
-                ; the following is REQUIRED,
-                ; and MAY occur more than once
-
-                attendee /
-
-                ; 'duration' and 'repeat' are both optional,
-                ; and MUST NOT occur more than once each,
-                ; but if one occurs, so MUST the other
-
-                duration / repeat /
-
-                ; the following are optional,
-                ; and MAY occur more than once
-
-                attach / x-prop
-
-                )
-
-
-
-     procprop   = 3*(
-
-                ; the following are all REQUIRED,
-                ; but MUST NOT occur more than once
-
-                action / attach / trigger /
-
-                ; 'duration' and 'repeat' are both optional,
-                ; and MUST NOT occur more than once each,
-                ; but if one occurs, so MUST the other
-
-                duration / repeat /
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 69]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-                ; 'description' is optional,
-                ; and MUST NOT occur more than once
-
-                description /
-
-                ; the following is optional,
-                ; and MAY occur more than once
-
-                x-prop
-
-                )
-
-   Description: A "VALARM" calendar component is a grouping of component
-   properties that is a reminder or alarm for an event or a to-do. For
-   example, it may be used to define a reminder for a pending event or
-   an overdue to-do.
-
-   The "VALARM" calendar component MUST include the "ACTION" and
-   "TRIGGER" properties. The "ACTION" property further constrains the
-   "VALARM" calendar component in the following ways:
-
-   When the action is "AUDIO", the alarm can also include one and only
-   one "ATTACH" property, which MUST point to a sound resource, which is
-   rendered when the alarm is triggered.
-
-   When the action is "DISPLAY", the alarm MUST also include a
-   "DESCRIPTION" property, which contains the text to be displayed when
-   the alarm is triggered.
-
-   When the action is "EMAIL", the alarm MUST include a "DESCRIPTION"
-   property, which contains the text to be used as the message body, a
-   "SUMMARY" property, which contains the text to be used as the message
-   subject, and one or more "ATTENDEE" properties, which contain the
-   email address of attendees to receive the message. It can also
-   include one or more "ATTACH" properties, which are intended to be
-   sent as message attachments. When the alarm is triggered, the email
-   message is sent.
-
-   When the action is "PROCEDURE", the alarm MUST include one and only
-   one "ATTACH" property, which MUST point to a procedure resource,
-   which is invoked when the alarm is triggered.
-
-   The "VALARM" calendar component MUST only appear within either a
-   "VEVENT" or "VTODO" calendar component. "VALARM" calendar components
-   cannot be nested. Multiple mutually independent "VALARM" calendar
-   components can be specified for a single "VEVENT" or "VTODO" calendar
-   component.
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 70]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   The "TRIGGER" property specifies when the alarm will be triggered.
-   The "TRIGGER" property specifies a duration prior to the start of an
-   event or a to-do. The "TRIGGER" edge may be explicitly set to be
-   relative to the "START" or "END" of the event or to-do with the
-   "RELATED" parameter of the "TRIGGER" property. The "TRIGGER" property
-   value type can alternatively be set to an absolute calendar date and
-   time of day value.
-
-   In an alarm set to trigger on the "START" of an event or to-do, the
-   "DTSTART" property MUST be present in the associated event or to-do.
-   In an alarm in a "VEVENT" calendar component set to trigger on the
-   "END" of the event, either the "DTEND" property MUST be present, or
-   the "DTSTART" and "DURATION" properties MUST both be present. In an
-   alarm in a "VTODO" calendar component set to trigger on the "END" of
-   the to-do, either the "DUE" property MUST be present, or the
-   "DTSTART" and "DURATION" properties MUST both be present.
-
-   The alarm can be defined such that it triggers repeatedly. A
-   definition of an alarm with a repeating trigger MUST include both the
-   "DURATION" and "REPEAT" properties. The "DURATION" property specifies
-   the delay period, after which the alarm will repeat. The "REPEAT"
-   property specifies the number of additional repetitions that the
-   alarm will triggered. This repitition count is in addition to the
-   initial triggering of the alarm. Both of these properties MUST be
-   present in order to specify a repeating alarm. If one of these two
-   properties is absent, then the alarm will not repeat beyond the
-   initial trigger.
-
-   The "ACTION" property is used within the "VALARM" calendar component
-   to specify the type of action invoked when the alarm is triggered.
-   The "VALARM" properties provide enough information for a specific
-   action to be invoked. It is typically the responsibility of a
-   "Calendar User Agent" (CUA) to deliver the alarm in the specified
-   fashion. An "ACTION" property value of AUDIO specifies an alarm that
-   causes a sound to be played to alert the user; DISPLAY specifies an
-   alarm that causes a text message to be displayed to the user; EMAIL
-   specifies an alarm that causes an electronic email message to be
-   delivered to one or more email addresses; and PROCEDURE specifies an
-   alarm that causes a procedure to be executed. The "ACTION" property
-   MUST specify one and only one of these values.
-
-   In an AUDIO alarm, if the optional "ATTACH" property is included, it
-   MUST specify an audio sound resource. The intention is that the sound
-   will be played as the alarm effect. If an "ATTACH" property is
-   specified that does not refer to a sound resource, or if the
-   specified sound resource cannot be rendered (because its format is
-   unsupported, or because it cannot be retrieved), then the CUA or
-   other entity responsible for playing the sound may choose a fallback
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 71]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   action, such as playing a built-in default sound, or playing no sound
-   at all.
-
-   In a DISPLAY alarm, the intended alarm effect is for the text value
-   of the "DESCRIPTION" property to be displayed to the user.
-
-   In an EMAIL alarm, the intended alarm effect is for an email message
-   to be composed and delivered to all the addresses specified by the
-   "ATTENDEE" properties in the "VALARM" calendar component. The
-   "DESCRIPTION" property of the "VALARM" calendar component MUST be
-   used as the body text of the message, and the "SUMMARY" property MUST
-   be used as the subject text. Any "ATTACH" properties in the "VALARM"
-   calendar component SHOULD be sent as attachments to the message.
-
-   In a PROCEDURE alarm, the "ATTACH" property in the "VALARM" calendar
-   component MUST specify a procedure or program that is intended to be
-   invoked as the alarm effect. If the procedure or program is in a
-   format that cannot be rendered, then no procedure alarm will be
-   invoked. If the "DESCRIPTION" property is present, its value
-   specifies the argument string to be passed to the procedure or
-   program. "Calendar User Agents" that receive an iCalendar object with
-   this category of alarm, can disable or allow the "Calendar User" to
-   disable, or otherwise ignore this type of alarm. While a very useful
-   alarm capability, the PROCEDURE type of alarm SHOULD be treated by
-   the "Calendar User Agent" as a potential security risk.
-
-   Example: The following example is for a "VALARM" calendar component
-   that specifies an audio alarm that will sound at a precise time and
-   repeat 4 more times at 15 minute intervals:
-
-     BEGIN:VALARM
-     TRIGGER;VALUE=DATE-TIME:19970317T133000Z
-     REPEAT:4
-     DURATION:PT15M
-     ACTION:AUDIO
-     ATTACH;FMTTYPE=audio/basic:ftp://host.com/pub/sounds/bell-01.aud
-     END:VALARM
-
-   The following example is for a "VALARM" calendar component that
-   specifies a display alarm that will trigger 30 minutes before the
-   scheduled start of the event or the due date/time of the to-do it is
-   associated with and will repeat 2 more times at 15 minute intervals:
-
-     BEGIN:VALARM
-     TRIGGER:-PT30M
-     REPEAT:2
-     DURATION:PT15M
-     ACTION:DISPLAY
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 72]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     DESCRIPTION:Breakfast meeting with executive\n
-      team at 8:30 AM EST.
-     END:VALARM
-
-   The following example is for a "VALARM" calendar component that
-   specifies an email alarm that will trigger 2 days before the
-   scheduled due date/time of a to-do it is associated with. It does not
-   repeat. The email has a subject, body and attachment link.
-
-     BEGIN:VALARM
-     TRIGGER:-P2D
-     ACTION:EMAIL
-     ATTENDEE:MAILTO:john_doe at host.com
-     SUMMARY:*** REMINDER: SEND AGENDA FOR WEEKLY STAFF MEETING ***
-     DESCRIPTION:A draft agenda needs to be sent out to the attendees
-       to the weekly managers meeting (MGR-LIST). Attached is a
-       pointer the document template for the agenda file.
-     ATTACH;FMTTYPE=application/binary:http://host.com/templates/agen
-      da.doc
-     END:VALARM
-
-   The following example is for a "VALARM" calendar component that
-   specifies a procedural alarm that will trigger at a precise date/time
-   and will repeat 23 more times at one hour intervals. The alarm will
-   invoke a procedure file.
-
-     BEGIN:VALARM
-     TRIGGER;VALUE=DATE-TIME:19980101T050000Z
-     REPEAT:23
-     DURATION:PT1H
-     ACTION:PROCEDURE
-     ATTACH;FMTTYPE=application/binary:ftp://host.com/novo-
-      procs/felizano.exe
-     END:VALARM
-
-4.7 Calendar Properties
-
-   The Calendar Properties are attributes that apply to the iCalendar
-   object, as a whole. These properties do not appear within a calendar
-   component. They SHOULD be specified after the "BEGIN:VCALENDAR"
-   property and prior to any calendar component.
-
-4.7.1 Calendar Scale
-
-   Property Name: CALSCALE
-
-   Purpose: This property defines the calendar scale used for the
-   calendar information specified in the iCalendar object.
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 73]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Value Type: TEXT
-
-   Property Parameters: Non-standard property parameters can be
-   specified on this property.
-
-   Conformance: Property can be specified in an iCalendar object. The
-   default value is "GREGORIAN".
-
-   Description: This memo is based on the Gregorian calendar scale. The
-   Gregorian calendar scale is assumed if this property is not specified
-   in the iCalendar object. It is expected that other calendar scales
-   will be defined in other specifications or by future versions of this
-   memo.
-
-   Format Definition: The property is defined by the following notation:
-
-     calscale   = "CALSCALE" calparam ":" calvalue CRLF
-
-     calparam   = *(";" xparam)
-
-     calvalue   = "GREGORIAN" / iana-token
-
-   Example: The following is an example of this property:
-
-     CALSCALE:GREGORIAN
-
-4.7.2 Method
-
-   Property Name: METHOD
-
-   Purpose: This property defines the iCalendar object method associated
-   with the calendar object.
-
-   Value Type: TEXT
-
-   Property Parameters: Non-standard property parameters can be
-   specified on this property.
-
-   Conformance: The property can be specified in an iCalendar object.
-
-   Description: When used in a MIME message entity, the value of this
-   property MUST be the same as the Content-Type "method" parameter
-   value. This property can only appear once within the iCalendar
-   object. If either the "METHOD" property or the Content-Type "method"
-   parameter is specified, then the other MUST also be specified.
-
-   No methods are defined by this specification. This is the subject of
-   other specifications, such as the iCalendar Transport-independent
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 74]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Interoperability Protocol (iTIP) defined by [ITIP].
-
-   If this property is not present in the iCalendar object, then a
-   scheduling transaction MUST NOT be assumed. In such cases, the
-   iCalendar object is merely being used to transport a snapshot of some
-   calendar information; without the intention of conveying a scheduling
-   semantic.
-
-   Format Definition: The property is defined by the following notation:
-
-     method     = "METHOD" metparam ":" metvalue CRLF
-
-     metparam   = *(";" xparam)
-
-     metvalue   = iana-token
-
-   Example: The following is a hypothetical example of this property to
-   convey that the iCalendar object is a request for a meeting:
-
-     METHOD:REQUEST
-
-4.7.3 Product Identifier
-
-   Property Name: PRODID
-
-   Purpose: This property specifies the identifier for the product that
-   created the iCalendar object.
-
-   Value Type: TEXT
-
-   Property Parameters: Non-standard property parameters can be
-   specified on this property.
-
-   Conformance: The property MUST be specified once in an iCalendar
-   object.
-
-   Description: The vendor of the implementation SHOULD assure that this
-   is a globally unique identifier; using some technique such as an FPI
-   value, as defined in [ISO 9070].
-
-   This property SHOULD not be used to alter the interpretation of an
-   iCalendar object beyond the semantics specified in this memo. For
-   example, it is not to be used to further the understanding of non-
-   standard properties.
-
-   Format Definition: The property is defined by the following notation:
-
-     prodid     = "PRODID" pidparam ":" pidvalue CRLF
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 75]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     pidparam   = *(";" xparam)
-
-     pidvalue   = text
-     ;Any text that describes the product and version
-     ;and that is generally assured of being unique.
-
-   Example: The following is an example of this property. It does not
-   imply that English is the default language.
-
-     PRODID:-//ABC Corporation//NONSGML My Product//EN
-
-4.7.4 Version
-
-   Property Name: VERSION
-
-   Purpose: This property specifies the identifier corresponding to the
-   highest version number or the minimum and maximum range of the
-   iCalendar specification that is required in order to interpret the
-   iCalendar object.
-
-   Value Type: TEXT
-
-   Property Parameters: Non-standard property parameters can be
-   specified on this property.
-
-   Conformance: This property MUST be specified by an iCalendar object,
-   but MUST only be specified once.
-
-   Description: A value of "2.0" corresponds to this memo.
-
-   Format Definition: The property is defined by the following notation:
-
-     version    = "VERSION" verparam ":" vervalue CRLF
-
-     verparam   = *(";" xparam)
-
-     vervalue   = "2.0"         ;This memo
-                / maxver
-                / (minver ";" maxver)
-
-     minver     = <A IANA registered iCalendar version identifier>
-     ;Minimum iCalendar version needed to parse the iCalendar object
-
-     maxver     = <A IANA registered iCalendar version identifier>
-     ;Maximum iCalendar version needed to parse the iCalendar object
-
-   Example: The following is an example of this property:
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 76]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     VERSION:2.0
-
-4.8 Component Properties
-
-   The following properties can appear within calendar components, as
-   specified by each component property definition.
-
-4.8.1 Descriptive Component Properties
-
-   The following properties specify descriptive information about
-   calendar components.
-
-4.8.1.1 Attachment
-
-   Property Name: ATTACH
-
-   Purpose: The property provides the capability to associate a document
-   object with a calendar component.
-
-   Value Type: The default value type for this property is URI. The
-   value type can also be set to BINARY to indicate inline binary
-   encoded content information.
-
-   Property Parameters: Non-standard, inline encoding, format type and
-   value data type property parameters can be specified on this
-   property.
-
-   Conformance: The property can be specified in a "VEVENT", "VTODO",
-   "VJOURNAL" or "VALARM" calendar components.
-
-   Description: The property can be specified within "VEVENT", "VTODO",
-   "VJOURNAL", or "VALARM" calendar components. This property can be
-   specified multiple times within an iCalendar object.
-
-   Format Definition: The property is defined by the following notation:
-
-     attach     = "ATTACH" attparam ":" uri  CRLF
-
-     attach     =/ "ATTACH" attparam ";" "ENCODING" "=" "BASE64"
-                   ";" "VALUE" "=" "BINARY" ":" binary
-
-     attparam   = *(
-
-                ; the following is optional,
-                ; but MUST NOT occur more than once
-
-                (";" fmttypeparam) /
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 77]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-                ; the following is optional,
-                ; and MAY occur more than once
-
-                (";" xparam)
-
-                )
-
-   Example: The following are examples of this property:
-
-     ATTACH:CID:jsmith.part3.960817T083000.xyzMail at host1.com
-
-     ATTACH;FMTTYPE=application/postscript:ftp://xyzCorp.com/pub/
-      reports/r-960812.ps
-
-4.8.1.2 Categories
-
-   Property Name: CATEGORIES
-
-   Purpose: This property defines the categories for a calendar
-   component.
-
-   Value Type: TEXT
-
-   Property Parameters: Non-standard and language property parameters
-   can be specified on this property.
-
-   Conformance: The property can be specified within "VEVENT", "VTODO"
-   or "VJOURNAL" calendar components.
-
-   Description: This property is used to specify categories or subtypes
-   of the calendar component. The categories are useful in searching for
-   a calendar component of a particular type and category. Within the
-   "VEVENT", "VTODO" or "VJOURNAL" calendar components, more than one
-   category can be specified as a list of categories separated by the
-   COMMA character (US-ASCII decimal 44).
-
-   Format Definition: The property is defined by the following notation:
-
-     categories = "CATEGORIES" catparam ":" text *("," text)
-                  CRLF
-
-     catparam   = *(
-
-                ; the following is optional,
-                ; but MUST NOT occur more than once
-
-                (";" languageparam ) /
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 78]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-                ; the following is optional,
-                ; and MAY occur more than once
-
-                (";" xparam)
-
-                )
-
-   Example: The following are examples of this property:
-
-     CATEGORIES:APPOINTMENT,EDUCATION
-
-     CATEGORIES:MEETING
-
-4.8.1.3 Classification
-
-   Property Name: CLASS
-
-   Purpose: This property defines the access classification for a
-   calendar component.
-
-   Value Type: TEXT
-
-   Property Parameters: Non-standard property parameters can be
-   specified on this property.
-
-   Conformance: The property can be specified once in a "VEVENT",
-   "VTODO" or "VJOURNAL" calendar components.
-
-   Description: An access classification is only one component of the
-   general security system within a calendar application. It provides a
-   method of capturing the scope of the access the calendar owner
-   intends for information within an individual calendar entry. The
-   access classification of an individual iCalendar component is useful
-   when measured along with the other security components of a calendar
-   system (e.g., calendar user authentication, authorization, access
-   rights, access role, etc.). Hence, the semantics of the individual
-   access classifications cannot be completely defined by this memo
-   alone. Additionally, due to the "blind" nature of most exchange
-   processes using this memo, these access classifications cannot serve
-   as an enforcement statement for a system receiving an iCalendar
-   object. Rather, they provide a method for capturing the intention of
-   the calendar owner for the access to the calendar component.
-
-   Format Definition: The property is defined by the following notation:
-
-     class      = "CLASS" classparam ":" classvalue CRLF
-
-     classparam = *(";" xparam)
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 79]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     classvalue = "PUBLIC" / "PRIVATE" / "CONFIDENTIAL" / iana-token
-                / x-name
-     ;Default is PUBLIC
-
-   Example: The following is an example of this property:
-
-     CLASS:PUBLIC
-
-4.8.1.4 Comment
-
-   Property Name: COMMENT
-
-   Purpose: This property specifies non-processing information intended
-   to provide a comment to the calendar user.
-
-   Value Type: TEXT
-
-   Property Parameters: Non-standard, alternate text representation and
-   language property parameters can be specified on this property.
-
-   Conformance: This property can be specified in "VEVENT", "VTODO",
-   "VJOURNAL", "VTIMEZONE" or "VFREEBUSY" calendar components.
-
-   Description: The property can be specified multiple times.
-
-   Format Definition: The property is defined by the following notation:
-
-     comment    = "COMMENT" commparam ":" text CRLF
-
-     commparam  = *(
-
-                ; the following are optional,
-                ; but MUST NOT occur more than once
-
-                (";" altrepparam) / (";" languageparam) /
-
-                ; the following is optional,
-                ; and MAY occur more than once
-
-                (";" xparam)
-
-                )
-
-   Example: The following is an example of this property:
-
-     COMMENT:The meeting really needs to include both ourselves
-       and the customer. We can't hold this  meeting without them.
-       As a matter of fact\, the venue for the meeting ought to be at
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 80]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-       their site. - - John
-
-   The data type for this property is TEXT.
-
-4.8.1.5 Description
-
-   Property Name: DESCRIPTION
-
-   Purpose: This property provides a more complete description of the
-   calendar component, than that provided by the "SUMMARY" property.
-
-   Value Type: TEXT
-
-   Property Parameters: Non-standard, alternate text representation and
-   language property parameters can be specified on this property.
-
-   Conformance: The property can be specified in the "VEVENT", "VTODO",
-   "VJOURNAL" or "VALARM" calendar components. The property can be
-   specified multiple times only within a "VJOURNAL" calendar component.
-
-   Description: This property is used in the "VEVENT" and "VTODO" to
-   capture lengthy textual decriptions associated with the activity.
-
-   This property is used in the "VJOURNAL" calendar component to capture
-   one more textual journal entries.
-
-   This property is used in the "VALARM" calendar component to capture
-   the display text for a DISPLAY category of alarm, to capture the body
-   text for an EMAIL category of alarm and to capture the argument
-   string for a PROCEDURE category of alarm.
-
-   Format Definition: The property is defined by the following notation:
-
-     description        = "DESCRIPTION" descparam ":" text CRLF
-
-     descparam  = *(
-
-                ; the following are optional,
-                ; but MUST NOT occur more than once
-
-                (";" altrepparam) / (";" languageparam) /
-
-                ; the following is optional,
-                ; and MAY occur more than once
-
-                (";" xparam)
-
-                )
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 81]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Example: The following is an example of the property with formatted
-   line breaks in the property value:
-
-     DESCRIPTION:Meeting to provide technical review for "Phoenix"
-       design.\n Happy Face Conference Room. Phoenix design team
-       MUST attend this meeting.\n RSVP to team leader.
-
-   The following is an example of the property with folding of long
-   lines:
-
-     DESCRIPTION:Last draft of the new novel is to be completed
-       for the editor's proof today.
-
-4.8.1.6 Geographic Position
-
-   Property Name: GEO
-
-   Purpose: This property specifies information related to the global
-   position for the activity specified by a calendar component.
-
-   Value Type: FLOAT. The value MUST be two SEMICOLON separated FLOAT
-   values.
-
-   Property Parameters: Non-standard property parameters can be
-   specified on this property.
-
-   Conformance: This property can be specified in  "VEVENT" or "VTODO"
-   calendar components.
-
-   Description: The property value specifies latitude and longitude, in
-   that order (i.e., "LAT LON" ordering). The longitude represents the
-   location east or west of the prime meridian as a positive or negative
-   real number, respectively. The longitude and latitude values MAY be
-   specified up to six decimal places, which will allow for accuracy to
-   within one meter of geographical position. Receiving applications
-   MUST accept values of this precision and MAY truncate values of
-   greater precision.
-
-   Values for latitude and longitude shall be expressed as decimal
-   fractions of degrees. Whole degrees of latitude shall be represented
-   by a two-digit decimal number ranging from 0 through 90. Whole
-   degrees of longitude shall be represented by a decimal number ranging
-   from 0 through 180. When a decimal fraction of a degree is specified,
-   it shall be separated from the whole number of degrees by a decimal
-   point.
-
-
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 82]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Latitudes north of the equator shall be specified by a plus sign (+),
-   or by the absence of a minus sign (-), preceding the digits
-   designating degrees. Latitudes south of the Equator shall be
-   designated by a minus sign (-) preceding the digits designating
-   degrees. A point on the Equator shall be assigned to the Northern
-   Hemisphere.
-
-   Longitudes east of the prime meridian shall be specified by a plus
-   sign (+), or by the absence of a minus sign (-), preceding the digits
-   designating degrees. Longitudes west of the meridian shall be
-   designated by minus sign (-) preceding the digits designating
-   degrees. A point on the prime meridian shall be assigned to the
-   Eastern Hemisphere. A point on the 180th meridian shall be assigned
-   to the Western Hemisphere. One exception to this last convention is
-   permitted. For the special condition of describing a band of latitude
-   around the earth, the East Bounding Coordinate data element shall be
-   assigned the value +180 (180) degrees.
-
-   Any spatial address with a latitude of +90 (90) or -90 degrees will
-   specify the position at the North or South Pole, respectively. The
-   component for longitude may have any legal value.
-
-   With the exception of the special condition described above, this
-   form is specified in Department of Commerce, 1986, Representation of
-   geographic point locations for information interchange (Federal
-   Information Processing Standard 70-1):  Washington,  Department of
-   Commerce, National Institute of Standards and Technology.
-
-   The simple formula for converting degrees-minutes-seconds into
-   decimal degrees is:
-
-     decimal = degrees + minutes/60 + seconds/3600.
-
-   Format Definition: The property is defined by the following notation:
-
-     geo        = "GEO" geoparam ":" geovalue CRLF
-
-     geoparam   = *(";" xparam)
-
-     geovalue   = float ";" float
-     ;Latitude and Longitude components
-
-   Example: The following is an example of this property:
-
-     GEO:37.386013;-122.082932
-
-
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 83]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-4.8.1.7 Location
-
-   Property Name: LOCATION
-
-   Purpose: The property defines the intended venue for the activity
-   defined by a calendar component.
-
-   Value Type: TEXT
-
-   Property Parameters: Non-standard, alternate text representation and
-   language property parameters can be specified on this property.
-
-   Conformance: This property can be specified in "VEVENT" or "VTODO"
-   calendar component.
-
-   Description: Specific venues such as conference or meeting rooms may
-   be explicitly specified using this property. An alternate
-   representation may be specified that is a URI that points to
-   directory information with more structured specification of the
-   location. For example, the alternate representation may specify
-   either an LDAP URI pointing to an LDAP server entry or a CID URI
-   pointing to a MIME body part containing a vCard [RFC 2426] for the
-   location.
-
-   Format Definition: The property is defined by the following notation:
-
-     location   = "LOCATION locparam ":" text CRLF
-
-     locparam   = *(
-
-                ; the following are optional,
-                ; but MUST NOT occur more than once
-
-                (";" altrepparam) / (";" languageparam) /
-
-                ; the following is optional,
-                ; and MAY occur more than once
-
-                (";" xparam)
-
-                )
-
-   Example: The following are some examples of this property:
-
-     LOCATION:Conference Room - F123, Bldg. 002
-
-     LOCATION;ALTREP="http://xyzcorp.com/conf-rooms/f123.vcf":
-      Conference Room - F123, Bldg. 002
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 84]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-4.8.1.8 Percent Complete
-
-   Property Name: PERCENT-COMPLETE
-
-   Purpose: This property is used by an assignee or delegatee of a to-do
-   to convey the percent completion of a to-do to the Organizer.
-
-   Value Type: INTEGER
-
-   Property Parameters: Non-standard property parameters can be
-   specified on this property.
-
-   Conformance: This property can be specified in a "VTODO" calendar
-   component.
-
-   Description: The property value is a positive integer between zero
-   and one hundred. A value of "0" indicates the to-do has not yet been
-   started. A value of "100" indicates that the to-do has been
-   completed. Integer values in between indicate the percent partially
-   complete.
-
-   When a to-do is assigned to multiple individuals, the property value
-   indicates the percent complete for that portion of the to-do assigned
-   to the assignee or delegatee. For example, if a to-do is assigned to
-   both individuals "A" and "B". A reply from "A" with a percent
-   complete of "70" indicates that "A" has completed 70% of the to-do
-   assigned to them. A reply from "B" with a percent complete of "50"
-   indicates "B" has completed 50% of the to-do assigned to them.
-
-   Format Definition: The property is defined by the following notation:
-
-     percent = "PERCENT-COMPLETE" pctparam ":" integer CRLF
-
-     pctparam   = *(";" xparam)
-
-   Example: The following is an example of this property to show 39%
-   completion:
-
-     PERCENT-COMPLETE:39
-
-4.8.1.9 Priority
-
-   Property Name: PRIORITY
-
-   Purpose: The property defines the relative priority for a calendar
-   component.
-
-   Value Type: INTEGER
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 85]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Property Parameters: Non-standard property parameters can be
-   specified on this property.
-
-   Conformance: The property can be specified in a "VEVENT" or "VTODO"
-   calendar component.
-
-   Description: The priority is specified as an integer in the range
-   zero to nine. A value of zero (US-ASCII decimal 48) specifies an
-   undefined priority. A value of one (US-ASCII decimal 49) is the
-   highest priority. A value of two (US-ASCII decimal 50) is the second
-   highest priority. Subsequent numbers specify a decreasing ordinal
-   priority. A value of nine (US-ASCII decimal 58) is the lowest
-   priority.
-
-   A CUA with a three-level priority scheme of "HIGH", "MEDIUM" and
-   "LOW" is mapped into this property such that a property value in the
-   range of one (US-ASCII decimal 49) to four (US-ASCII decimal 52)
-   specifies "HIGH" priority. A value of five (US-ASCII decimal 53) is
-   the normal or "MEDIUM" priority. A value in the range of six (US-
-   ASCII decimal 54) to nine (US-ASCII decimal 58) is "LOW" priority.
-
-   A CUA with a priority schema of "A1", "A2", "A3", "B1", "B2", ...,
-   "C3" is mapped into this property such that a property value of one
-   (US-ASCII decimal 49) specifies "A1", a property value of two (US-
-   ASCII decimal 50) specifies "A2", a property value of three (US-ASCII
-   decimal 51) specifies "A3", and so forth up to a property value of 9
-   (US-ASCII decimal 58) specifies "C3".
-
-   Other integer values are reserved for future use.
-
-   Within a "VEVENT" calendar component, this property specifies a
-   priority for the event. This property may be useful when more than
-   one event is scheduled for a given time period.
-
-   Within a "VTODO" calendar component, this property specified a
-   priority for the to-do. This property is useful in prioritizing
-   multiple action items for a given time period.
-
-   Format Definition: The property is specified by the following
-   notation:
-
-     priority   = "PRIORITY" prioparam ":" privalue CRLF
-     ;Default is zero
-
-     prioparam  = *(";" xparam)
-
-     privalue   = integer       ;Must be in the range [0..9]
-        ; All other values are reserved for future use
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 86]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   The following is an example of a property with the highest priority:
-
-     PRIORITY:1
-
-   The following is an example of a property with a next highest
-   priority:
-
-     PRIORITY:2
-
-   Example: The following is an example of a property with no priority.
-   This is equivalent to not specifying the "PRIORITY" property:
-
-     PRIORITY:0
-
-4.8.1.10 Resources
-
-   Property Name: RESOURCES
-
-   Purpose: This property defines the equipment or resources anticipated
-   for an activity specified by a calendar entity..
-
-   Value Type: TEXT
-
-   Property Parameters: Non-standard, alternate text representation and
-   language property parameters can be specified on this property.
-
-   Conformance: This property can be specified in "VEVENT" or "VTODO"
-   calendar component.
-
-   Description: The property value is an arbitrary text. More than one
-   resource can be specified as a list of resources separated by the
-   COMMA character (US-ASCII decimal 44).
-
-   Format Definition: The property is defined by the following notation:
-
-     resources  = "RESOURCES" resrcparam ":" text *("," text) CRLF
-
-     resrcparam = *(
-
-                ; the following are optional,
-                ; but MUST NOT occur more than once
-
-                (";" altrepparam) / (";" languageparam) /
-
-                ; the following is optional,
-                ; and MAY occur more than once
-
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 87]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-                (";" xparam)
-
-                )
-
-   Example: The following is an example of this property:
-
-     RESOURCES:EASEL,PROJECTOR,VCR
-
-     RESOURCES;LANGUAGE=fr:1 raton-laveur
-
-4.8.1.11 Status
-
-   Property Name: STATUS
-
-   Purpose: This property defines the overall status or confirmation for
-   the calendar component.
-
-   Value Type: TEXT
-
-   Property Parameters: Non-standard property parameters can be
-   specified on this property.
-
-   Conformance: This property can be specified in "VEVENT", "VTODO" or
-   "VJOURNAL" calendar components.
-
-   Description: In a group scheduled calendar component, the property is
-   used by the "Organizer" to provide a confirmation of the event to the
-   "Attendees". For example in a "VEVENT" calendar component, the
-   "Organizer" can indicate that a meeting is tentative, confirmed or
-   cancelled. In a "VTODO" calendar component, the "Organizer" can
-   indicate that an action item needs action, is completed, is in
-   process or being worked on, or has been cancelled. In a "VJOURNAL"
-   calendar component, the "Organizer" can indicate that a journal entry
-   is draft, final or has been cancelled or removed.
-
-   Format Definition: The property is defined by the following notation:
-
-     status     = "STATUS" statparam] ":" statvalue CRLF
-
-     statparam  = *(";" xparam)
-
-     statvalue  = "TENTATIVE"           ;Indicates event is
-                                        ;tentative.
-                / "CONFIRMED"           ;Indicates event is
-                                        ;definite.
-                / "CANCELLED"           ;Indicates event was
-                                        ;cancelled.
-        ;Status values for a "VEVENT"
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 88]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     statvalue  =/ "NEEDS-ACTION"       ;Indicates to-do needs action.
-                / "COMPLETED"           ;Indicates to-do completed.
-                / "IN-PROCESS"          ;Indicates to-do in process of
-                / "CANCELLED"           ;Indicates to-do was cancelled.
-        ;Status values for "VTODO".
-
-     statvalue  =/ "DRAFT"              ;Indicates journal is draft.
-                / "FINAL"               ;Indicates journal is final.
-                / "CANCELLED"           ;Indicates journal is removed.
-        ;Status values for "VJOURNAL".
-
-   Example: The following is an example of this property for a "VEVENT"
-   calendar component:
-
-     STATUS:TENTATIVE
-
-   The following is an example of this property for a "VTODO" calendar
-   component:
-
-     STATUS:NEEDS-ACTION
-
-   The following is an example of this property for a "VJOURNAL"
-   calendar component:
-
-     STATUS:DRAFT
-
-4.8.1.12 Summary
-
-   Property Name: SUMMARY
-
-   Purpose: This property defines a short summary or subject for the
-   calendar component.
-
-   Value Type: TEXT
-
-   Property Parameters: Non-standard, alternate text representation and
-   language property parameters can be specified on this property.
-
-   Conformance: The property can be specified in "VEVENT", "VTODO",
-   "VJOURNAL" or "VALARM" calendar components.
-
-   Description: This property is used in the "VEVENT", "VTODO" and
-   "VJOURNAL" calendar components to capture a short, one line summary
-   about the activity or journal entry.
-
-   This property is used in the "VALARM" calendar component to capture
-   the subject of an EMAIL category of alarm.
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 89]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Format Definition: The property is defined by the following notation:
-
-     summary    = "SUMMARY" summparam ":" text CRLF
-
-     summparam  = *(
-
-                ; the following are optional,
-                ; but MUST NOT occur more than once
-
-                (";" altrepparam) / (";" languageparam) /
-
-                ; the following is optional,
-                ; and MAY occur more than once
-
-                (";" xparam)
-
-                )
-
-   Example: The following is an example of this property:
-
-     SUMMARY:Department Party
-
-4.8.2 Date and Time Component Properties
-
-   The following properties specify date and time related information in
-   calendar components.
-
-4.8.2.1 Date/Time Completed
-
-   Property Name: COMPLETED
-
-   Purpose: This property defines the date and time that a to-do was
-   actually completed.
-
-   Value Type: DATE-TIME
-
-   Property Parameters: Non-standard property parameters can be
-   specified on this property.
-
-   Conformance: The property can be specified in a "VTODO" calendar
-   component.
-
-   Description: The date and time MUST be in a UTC format.
-
-   Format Definition: The property is defined by the following notation:
-
-     completed  = "COMPLETED" compparam ":" date-time CRLF
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 90]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     compparam  = *(";" xparam)
-
-   Example: The following is an example of this property:
-
-     COMPLETED:19960401T235959Z
-
-4.8.2.2 Date/Time End
-
-   Property Name: DTEND
-
-   Purpose: This property specifies the date and time that a calendar
-   component ends.
-
-   Value Type: The default value type is DATE-TIME. The value type can
-   be set to a DATE value type.
-
-   Property Parameters: Non-standard, value data type, time zone
-   identifier property parameters can be specified on this property.
-
-   Conformance: This property can be specified in "VEVENT" or
-   "VFREEBUSY" calendar components.
-
-   Description: Within the "VEVENT" calendar component, this property
-   defines the date and time by which the event ends. The value MUST be
-   later in time than the value of the "DTSTART" property.
-
-   Within the "VFREEBUSY" calendar component, this property defines the
-   end date and time for the free or busy time information. The time
-   MUST be specified in the UTC time format. The value MUST be later in
-   time than the value of the "DTSTART" property.
-
-   Format Definition: The property is defined by the following notation:
-
-     dtend      = "DTEND" dtendparam":" dtendval CRLF
-
-     dtendparam = *(
-
-                ; the following are optional,
-                ; but MUST NOT occur more than once
-
-                (";" "VALUE" "=" ("DATE-TIME" / "DATE")) /
-                (";" tzidparam) /
-
-                ; the following is optional,
-                ; and MAY occur more than once
-
-
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 91]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-                (";" xparam)
-
-                )
-
-
-
-     dtendval   = date-time / date
-     ;Value MUST match value type
-
-   Example: The following is an example of this property:
-
-     DTEND:19960401T235959Z
-
-     DTEND;VALUE=DATE:19980704
-
-4.8.2.3 Date/Time Due
-
-   Property Name: DUE
-
-   Purpose: This property defines the date and time that a to-do is
-   expected to be completed.
-
-   Value Type: The default value type is DATE-TIME. The value type can
-   be set to a DATE value type.
-
-   Property Parameters: Non-standard, value data type, time zone
-   identifier property parameters can be specified on this property.
-
-   Conformance: The property can be specified once in a "VTODO" calendar
-   component.
-
-   Description: The value MUST be a date/time equal to or after the
-   DTSTART value, if specified.
-
-   Format Definition: The property is defined by the following notation:
-
-     due        = "DUE" dueparam":" dueval CRLF
-
-     dueparam   = *(
-                ; the following are optional,
-                ; but MUST NOT occur more than once
-
-                (";" "VALUE" "=" ("DATE-TIME" / "DATE")) /
-                (";" tzidparam) /
-
-                ; the following is optional,
-                ; and MAY occur more than once
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 92]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-                  *(";" xparam)
-
-                )
-
-
-
-     dueval     = date-time / date
-     ;Value MUST match value type
-
-   Example: The following is an example of this property:
-
-     DUE:19980430T235959Z
-
-4.8.2.4 Date/Time Start
-
-   Property Name: DTSTART
-
-   Purpose: This property specifies when the calendar component begins.
-
-   Value Type: The default value type is DATE-TIME. The time value MUST
-   be one of the forms defined for the DATE-TIME value type. The value
-   type can be set to a DATE value type.
-
-   Property Parameters: Non-standard, value data type, time zone
-   identifier property parameters can be specified on this property.
-
-   Conformance: This property can be specified in the "VEVENT", "VTODO",
-   "VFREEBUSY", or "VTIMEZONE" calendar components.
-
-   Description: Within the "VEVENT" calendar component, this property
-   defines the start date and time for the event. The property is
-   REQUIRED in "VEVENT" calendar components. Events can have a start
-   date/time but no end date/time. In that case, the event does not take
-   up any time.
-
-   Within the "VFREEBUSY" calendar component, this property defines the
-   start date and time for the free or busy time information. The time
-   MUST be specified in UTC time.
-
-   Within the "VTIMEZONE" calendar component, this property defines the
-   effective start date and time for a time zone specification. This
-   property is REQUIRED within each STANDARD and DAYLIGHT part included
-   in "VTIMEZONE" calendar components and MUST be specified as a local
-   DATE-TIME without the "TZID" property parameter.
-
-   Format Definition: The property is defined by the following notation:
-
-     dtstart    = "DTSTART" dtstparam ":" dtstval CRLF
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 93]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     dtstparam  = *(
-
-                ; the following are optional,
-                ; but MUST NOT occur more than once
-
-                (";" "VALUE" "=" ("DATE-TIME" / "DATE")) /
-                (";" tzidparam) /
-
-                ; the following is optional,
-                ; and MAY occur more than once
-
-                  *(";" xparam)
-
-                )
-
-
-
-     dtstval    = date-time / date
-     ;Value MUST match value type
-
-   Example: The following is an example of this property:
-
-     DTSTART:19980118T073000Z
-
-4.8.2.5 Duration
-
-   Property Name: DURATION
-
-   Purpose: The property specifies a positive duration of time.
-
-   Value Type: DURATION
-
-   Property Parameters: Non-standard property parameters can be
-   specified on this property.
-
-   Conformance: The property can be specified in "VEVENT", "VTODO",
-   "VFREEBUSY" or "VALARM" calendar components.
-
-   Description: In a "VEVENT" calendar component the property may be
-   used to specify a duration of the event, instead of an explicit end
-   date/time. In a "VTODO" calendar component the property may be used
-   to specify a duration for the to-do, instead of an explicit due
-   date/time. In a "VFREEBUSY" calendar component the property may be
-   used to specify the interval of free time being requested. In a
-   "VALARM" calendar component the property may be used to specify the
-   delay period prior to repeating an alarm.
-
-   Format Definition: The property is defined by the following notation:
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 94]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     duration   = "DURATION" durparam ":" dur-value CRLF
-                  ;consisting of a positive duration of time.
-
-     durparam   = *(";" xparam)
-
-   Example: The following is an example of this property that specifies
-   an interval of time of 1 hour and zero minutes and zero seconds:
-
-     DURATION:PT1H0M0S
-
-   The following is an example of this property that specifies an
-   interval of time of 15 minutes.
-
-     DURATION:PT15M
-
-4.8.2.6 Free/Busy Time
-
-   Property Name: FREEBUSY
-
-   Purpose: The property defines one or more free or busy time
-   intervals.
-
-   Value Type: PERIOD. The date and time values MUST be in an UTC time
-   format.
-
-   Property Parameters: Non-standard or free/busy time type property
-   parameters can be specified on this property.
-
-   Conformance: The property can be specified in a "VFREEBUSY" calendar
-   component.
-
-   Property Parameter: "FBTYPE" and non-standard parameters can be
-   specified on this property.
-
-   Description: These time periods can be specified as either a start
-   and end date-time or a start date-time and duration. The date and
-   time MUST be a UTC time format.
-
-   "FREEBUSY" properties within the "VFREEBUSY" calendar component
-   SHOULD be sorted in ascending order, based on start time and then end
-   time, with the earliest periods first.
-
-   The "FREEBUSY" property can specify more than one value, separated by
-   the COMMA character (US-ASCII decimal 44). In such cases, the
-   "FREEBUSY" property values SHOULD all be of the same "FBTYPE"
-   property parameter type (e.g., all values of a particular "FBTYPE"
-   listed together in a single property).
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 95]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Format Definition: The property is defined by the following notation:
-
-     freebusy   = "FREEBUSY" fbparam ":" fbvalue
-                  CRLF
-
-     fbparam    = *(
-                ; the following is optional,
-                ; but MUST NOT occur more than once
-
-                (";" fbtypeparam) /
-
-                ; the following is optional,
-                ; and MAY occur more than once
-
-                (";" xparam)
-
-                )
-
-     fbvalue    = period *["," period]
-     ;Time value MUST be in the UTC time format.
-
-   Example: The following are some examples of this property:
-
-     FREEBUSY;FBTYPE=BUSY-UNAVAILABLE:19970308T160000Z/PT8H30M
-
-     FREEBUSY;FBTYPE=FREE:19970308T160000Z/PT3H,19970308T200000Z/PT1H
-
-     FREEBUSY;FBTYPE=FREE:19970308T160000Z/PT3H,19970308T200000Z/PT1H,
-      19970308T230000Z/19970309T000000Z
-
-4.8.2.7 Time Transparency
-
-   Property Name: TRANSP
-
-   Purpose: This property defines whether an event is transparent or not
-   to busy time searches.
-
-   Value Type: TEXT
-
-   Property Parameters: Non-standard property parameters can be
-   specified on this property.
-
-   Conformance: This property can be specified once in a "VEVENT"
-   calendar component.
-
-   Description: Time Transparency is the characteristic of an event that
-   determines whether it appears to consume time on a calendar. Events
-   that consume actual time for the individual or resource associated
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 96]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   with the calendar SHOULD be recorded as OPAQUE, allowing them to be
-   detected by free-busy time searches. Other events, which do not take
-   up the individual's (or resource's) time SHOULD be recorded as
-   TRANSPARENT, making them invisible to free-busy time searches.
-
-   Format Definition: The property is specified by the following
-   notation:
-
-     transp     = "TRANSP" tranparam ":" transvalue CRLF
-
-     tranparam  = *(";" xparam)
-
-     transvalue = "OPAQUE"      ;Blocks or opaque on busy time searches.
-                / "TRANSPARENT" ;Transparent on busy time searches.
-        ;Default value is OPAQUE
-
-   Example: The following is an example of this property for an event
-   that is transparent or does not block on free/busy time searches:
-
-     TRANSP:TRANSPARENT
-
-   The following is an example of this property for an event that is
-   opaque or blocks on free/busy time searches:
-
-     TRANSP:OPAQUE
-
-4.8.3 Time Zone Component Properties
-
-   The following properties specify time zone information in calendar
-   components.
-
-4.8.3.1 Time Zone Identifier
-
-   Property Name: TZID
-
-   Purpose: This property specifies the text value that uniquely
-   identifies the "VTIMEZONE" calendar component.
-
-   Value Type: TEXT
-
-   Property Parameters: Non-standard property parameters can be
-   specified on this property.
-
-   Conformance: This property MUST be specified in a "VTIMEZONE"
-   calendar component.
-
-
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 97]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Description: This is the label by which a time zone calendar
-   component is referenced by any iCalendar properties whose data type
-   is either DATE-TIME or TIME and not intended to specify a UTC or a
-   "floating" time. The presence of the SOLIDUS character (US-ASCII
-   decimal 47) as a prefix, indicates that this TZID represents an
-   unique ID in a globally defined time zone registry (when such
-   registry is defined).
-
-        Note: This document does not define a naming convention for time
-        zone identifiers. Implementers may want to use the naming
-        conventions defined in existing time zone specifications such as
-        the public-domain Olson database [TZ]. The specification of
-        globally unique time zone identifiers is not addressed by this
-        document and is left for future study.
-
-   Format Definition: This property is defined by the following
-   notation:
-
-     tzid       = "TZID" tzidpropparam ":" [tzidprefix] text CRLF
-
-     tzidpropparam      = *(";" xparam)
-
-     ;tzidprefix        = "/"
-     ; Defined previously. Just listed here for reader convenience.
-
-   Example: The following are examples of non-globally unique time zone
-   identifiers:
-
-     TZID:US-Eastern
-
-     TZID:California-Los_Angeles
-
-   The following is an example of a fictitious globally unique time zone
-   identifier:
-
-     TZID:/US-New_York-New_York
-
-4.8.3.2 Time Zone Name
-
-   Property Name: TZNAME
-
-   Purpose: This property specifies the customary designation for a time
-   zone description.
-
-   Value Type: TEXT
-
-   Property Parameters: Non-standard and language property parameters
-   can be specified on this property.
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 98]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Conformance: This property can be specified in a "VTIMEZONE" calendar
-   component.
-
-   Description: This property may be specified in multiple languages; in
-   order to provide for different language requirements.
-
-   Format Definition: This property is defined by the following
-   notation:
-
-     tzname     = "TZNAME" tznparam ":" text CRLF
-
-     tznparam   = *(
-
-                ; the following is optional,
-                ; but MUST NOT occur more than once
-
-                (";" languageparam) /
-
-                ; the following is optional,
-                ; and MAY occur more than once
-
-                (";" xparam)
-
-                )
-
-   Example: The following are example of this property:
-
-     TZNAME:EST
-
-   The following is an example of this property when two different
-   languages for the time zone name are specified:
-
-     TZNAME;LANGUAGE=en:EST
-     TZNAME;LANGUAGE=fr-CA:HNE
-
-4.8.3.3 Time Zone Offset From
-
-   Property Name: TZOFFSETFROM
-
-   Purpose: This property specifies the offset which is in use prior to
-   this time zone observance.
-
-   Value Type: UTC-OFFSET
-
-   Property Parameters: Non-standard property parameters can be
-   specified on this property.
-
-
-
-
-
-Dawson & Stenerson          Standards Track                    [Page 99]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Conformance: This property MUST be specified in a "VTIMEZONE"
-   calendar component.
-
-   Description: This property specifies the offset which is in use prior
-   to this time observance. It is used to calculate the absolute time at
-   which the transition to a given observance takes place. This property
-   MUST only be specified in a "VTIMEZONE" calendar component. A
-   "VTIMEZONE" calendar component MUST include this property. The
-   property value is a signed numeric indicating the number of hours and
-   possibly minutes from UTC. Positive numbers represent time zones east
-   of the prime meridian, or ahead of UTC. Negative numbers represent
-   time zones west of the prime meridian, or behind UTC.
-
-   Format Definition: The property is defined by the following notation:
-
-     tzoffsetfrom       = "TZOFFSETFROM" frmparam ":" utc-offset
-                          CRLF
-
-     frmparam   = *(";" xparam)
-
-   Example: The following are examples of this property:
-
-     TZOFFSETFROM:-0500
-
-     TZOFFSETFROM:+1345
-
-4.8.3.4 Time Zone Offset To
-
-   Property Name: TZOFFSETTO
-
-   Purpose: This property specifies the offset which is in use in this
-   time zone observance.
-
-   Value Type: UTC-OFFSET
-
-   Property Parameters: Non-standard property parameters can be
-   specified on this property.
-
-   Conformance: This property MUST be specified in a "VTIMEZONE"
-   calendar component.
-
-   Description: This property specifies the offset which is in use in
-   this time zone observance. It is used to calculate the absolute time
-   for the new observance. The property value is a signed numeric
-   indicating the number of hours and possibly minutes from UTC.
-   Positive numbers represent time zones east of the prime meridian, or
-   ahead of UTC. Negative numbers represent time zones west of the prime
-   meridian, or behind UTC.
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 100]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Format Definition: The property is defined by the following notation:
-
-     tzoffsetto = "TZOFFSETTO" toparam ":" utc-offset CRLF
-
-     toparam    = *(";" xparam)
-
-   Example: The following are examples of this property:
-
-     TZOFFSETTO:-0400
-
-     TZOFFSETTO:+1245
-
-4.8.3.5 Time Zone URL
-
-   Property Name: TZURL
-
-   Purpose: The TZURL provides a means for a VTIMEZONE component to
-   point to a network location that can be used to retrieve an up-to-
-   date version of itself.
-
-   Value Type: URI
-
-   Property Parameters: Non-standard property parameters can be
-   specified on this property.
-
-   Conformance: This property can be specified in a "VTIMEZONE" calendar
-   component.
-
-   Description: The TZURL provides a means for a VTIMEZONE component to
-   point to a network location that can be used to retrieve an up-to-
-   date version of itself. This provides a hook to handle changes
-   government bodies impose upon time zone definitions. Retrieval of
-   this resource results in an iCalendar object containing a single
-   VTIMEZONE component and a METHOD property set to PUBLISH.
-
-   Format Definition: The property is defined by the following notation:
-
-     tzurl      = "TZURL" tzurlparam ":" uri CRLF
-
-     tzurlparam = *(";" xparam)
-
-   Example: The following is an example of this property:
-
-     TZURL:http://timezones.r.us.net/tz/US-California-Los_Angeles
-
-
-
-
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 101]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-4.8.4 Relationship Component Properties
-
-   The following properties specify relationship information in calendar
-   components.
-
-4.8.4.1 Attendee
-
-   Property Name: ATTENDEE
-
-   Purpose: The property defines an "Attendee" within a calendar
-   component.
-
-   Value Type: CAL-ADDRESS
-
-   Property Parameters: Non-standard, language, calendar user type,
-   group or list membership, participation role, participation status,
-   RSVP expectation, delegatee, delegator, sent by, common name or
-   directory entry reference property parameters can be specified on
-   this property.
-
-   Conformance: This property MUST be specified in an iCalendar object
-   that specifies a group scheduled calendar entity. This property MUST
-   NOT be specified in an iCalendar object when publishing the calendar
-   information (e.g., NOT in an iCalendar object that specifies the
-   publication of a calendar user's busy time, event, to-do or journal).
-   This property is not specified in an iCalendar object that specifies
-   only a time zone definition or that defines calendar entities that
-   are not group scheduled entities, but are entities only on a single
-   user's calendar.
-
-   Description: The property MUST only be specified within calendar
-   components to specify participants, non-participants and the chair of
-   a group scheduled calendar entity. The property is specified within
-   an "EMAIL" category of the "VALARM" calendar component to specify an
-   email address that is to receive the email type of iCalendar alarm.
-
-   The property parameter CN is for the common or displayable name
-   associated with the calendar address; ROLE, for the intended role
-   that the attendee will have in the calendar component; PARTSTAT, for
-   the status of the attendee's participation; RSVP, for indicating
-   whether the favor of a reply is requested; CUTYPE, to indicate the
-   type of calendar user; MEMBER, to indicate the groups that the
-   attendee belongs to; DELEGATED-TO, to indicate the calendar users
-   that the original request was delegated to; and DELEGATED-FROM, to
-   indicate whom the request was delegated from; SENT-BY, to indicate
-   whom is acting on behalf of the ATTENDEE; and DIR, to indicate the
-   URI that points to the directory information corresponding to the
-   attendee. These property parameters can be specified on an "ATTENDEE"
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 102]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   property in either a "VEVENT", "VTODO" or "VJOURNAL" calendar
-   component. They MUST not be specified in an "ATTENDEE" property in a
-   "VFREEBUSY" or "VALARM" calendar component. If the LANGUAGE property
-   parameter is specified, the identified language applies to the CN
-   parameter.
-
-   A recipient delegated a request MUST inherit the RSVP and ROLE values
-   from the attendee that delegated the request to them.
-
-   Multiple attendees can be specified by including multiple "ATTENDEE"
-   properties within the calendar component.
-
-   Format Definition: The property is defined by the following notation:
-
-     attendee   = "ATTENDEE" attparam ":" cal-address CRLF
-
-     attparam   = *(
-
-                ; the following are optional,
-                ; but MUST NOT occur more than once
-
-                (";" cutypeparam) / (";"memberparam) /
-                (";" roleparam) / (";" partstatparam) /
-                (";" rsvpparam) / (";" deltoparam) /
-                (";" delfromparam) / (";" sentbyparam) /
-                (";"cnparam) / (";" dirparam) /
-                (";" languageparam) /
-
-                ; the following is optional,
-                ; and MAY occur more than once
-
-                (";" xparam)
-
-                )
-
-   Example: The following are examples of this property's use for a to-
-   do:
-
-     ORGANIZER:MAILTO:jsmith at host1.com
-     ATTENDEE;MEMBER="MAILTO:DEV-GROUP at host2.com":
-      MAILTO:joecool at host2.com
-     ATTENDEE;DELEGATED-FROM="MAILTO:immud at host3.com":
-      MAILTO:ildoit at host1.com
-
-   The following is an example of this property used for specifying
-   multiple attendees to an event:
-
-
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 103]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     ORGANIZER:MAILTO:jsmith at host1.com
-     ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=TENTATIVE;CN=Henry Cabot
-      :MAILTO:hcabot at host2.com
-     ATTENDEE;ROLE=REQ-PARTICIPANT;DELEGATED-FROM="MAILTO:bob at host.com"
-      ;PARTSTAT=ACCEPTED;CN=Jane Doe:MAILTO:jdoe at host1.com
-
-   The following is an example of this property with a URI to the
-   directory information associated with the attendee:
-
-     ATTENDEE;CN=John Smith;DIR="ldap://host.com:6666/o=eDABC%
-      20Industries,c=3DUS??(cn=3DBJim%20Dolittle)":MAILTO:jimdo@
-      host1.com
-
-   The following is an example of this property with "delegatee" and
-   "delegator" information for an event:
-
-     ORGANIZER;CN=John Smith:MAILTO:jsmith at host.com
-     ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=TENTATIVE;DELEGATED-FROM=
-      "MAILTO:iamboss at host2.com";CN=Henry Cabot:MAILTO:hcabot@
-      host2.com
-     ATTENDEE;ROLE=NON-PARTICIPANT;PARTSTAT=DELEGATED;DELEGATED-TO=
-      "MAILTO:hcabot at host2.com";CN=The Big Cheese:MAILTO:iamboss
-      @host2.com
-     ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;CN=Jane Doe
-      :MAILTO:jdoe at host1.com
-
-   Example: The following is an example of this property's use when
-   another calendar user is acting on behalf of the "Attendee":
-
-     ATTENDEE;SENT-BY=MAILTO:jan_doe at host1.com;CN=John Smith:MAILTO:
-      jsmith at host1.com
-
-4.8.4.2 Contact
-
-   Property Name: CONTACT
-
-   Purpose: The property is used to represent contact information or
-   alternately a reference to contact information associated with the
-   calendar component.
-
-   Value Type: TEXT
-
-   Property Parameters: Non-standard, alternate text representation and
-   language property parameters can be specified on this property.
-
-   Conformance: The property can be specified in a "VEVENT", "VTODO",
-   "VJOURNAL" or "VFREEBUSY" calendar component.
-
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 104]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Description: The property value consists of textual contact
-   information. An alternative representation for the property value can
-   also be specified that refers to a URI pointing to an alternate form,
-   such as a vCard [RFC 2426], for the contact information.
-
-   Format Definition: The property is defined by the following notation:
-
-     contact    = "CONTACT" contparam ":" text CRLF
-
-     contparam  = *(
-                ; the following are optional,
-                ; but MUST NOT occur more than once
-
-                (";" altrepparam) / (";" languageparam) /
-
-                ; the following is optional,
-                ; and MAY occur more than once
-
-                (";" xparam)
-
-                )
-
-   Example: The following is an example of this property referencing
-   textual contact information:
-
-     CONTACT:Jim Dolittle\, ABC Industries\, +1-919-555-1234
-
-   The following is an example of this property with an alternate
-   representation of a LDAP URI to a directory entry containing the
-   contact information:
-
-     CONTACT;ALTREP="ldap://host.com:6666/o=3DABC%20Industries\,
-      c=3DUS??(cn=3DBJim%20Dolittle)":Jim Dolittle\, ABC Industries\,
-      +1-919-555-1234
-
-   The following is an example of this property with an alternate
-   representation of a MIME body part containing the contact
-   information, such as a vCard [RFC 2426] embedded in a [MIME-DIR]
-   content-type:
-
-     CONTACT;ALTREP="CID=<part3.msg970930T083000SILVER at host.com>":Jim
-       Dolittle\, ABC Industries\, +1-919-555-1234
-
-   The following is an example of this property referencing a network
-   resource, such as a vCard [RFC 2426] object containing the contact
-   information:
-
-
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 105]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     CONTACT;ALTREP="http://host.com/pdi/jdoe.vcf":Jim
-       Dolittle\, ABC Industries\, +1-919-555-1234
-
-4.8.4.3 Organizer
-
-   Property Name: ORGANIZER
-
-   Purpose: The property defines the organizer for a calendar component.
-
-   Value Type: CAL-ADDRESS
-
-   Property Parameters: Non-standard, language, common name, directory
-   entry reference, sent by property parameters can be specified on this
-   property.
-
-   Conformance: This property MUST be specified in an iCalendar object
-   that specifies a group scheduled calendar entity. This property MUST
-   be specified in an iCalendar object that specifies the publication of
-   a calendar user's busy time. This property MUST NOT be specified in
-   an iCalendar object that specifies only a time zone definition or
-   that defines calendar entities that are not group scheduled entities,
-   but are entities only on a single user's calendar.
-
-   Description: The property is specified within the "VEVENT", "VTODO",
-   "VJOURNAL calendar components to specify the organizer of a group
-   scheduled calendar entity. The property is specified within the
-   "VFREEBUSY" calendar component to specify the calendar user
-   requesting the free or busy time. When publishing a "VFREEBUSY"
-   calendar component, the property is used to specify the calendar that
-   the published busy time came from.
-
-   The property has the property parameters CN, for specifying the
-   common or display name associated with the "Organizer", DIR, for
-   specifying a pointer to the directory information associated with the
-   "Organizer", SENT-BY, for specifying another calendar user that is
-   acting on behalf of the "Organizer". The non-standard parameters may
-   also be specified on this property. If the LANGUAGE property
-   parameter is specified, the identified language applies to the CN
-   parameter value.
-
-   Format Definition: The property is defined by the following notation:
-
-     organizer  = "ORGANIZER" orgparam ":"
-                  cal-address CRLF
-
-     orgparam   = *(
-
-                ; the following are optional,
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 106]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-                ; but MUST NOT occur more than once
-
-                (";" cnparam) / (";" dirparam) / (";" sentbyparam) /
-                (";" languageparam) /
-
-                ; the following is optional,
-                ; and MAY occur more than once
-
-                (";" xparam)
-
-                )
-
-   Example: The following is an example of this property:
-
-     ORGANIZER;CN=John Smith:MAILTO:jsmith at host1.com
-
-   The following is an example of this property with a pointer to the
-   directory information associated with the organizer:
-
-     ORGANIZER;CN=JohnSmith;DIR="ldap://host.com:6666/o=3DDC%20Associ
-      ates,c=3DUS??(cn=3DJohn%20Smith)":MAILTO:jsmith at host1.com
-
-   The following is an example of this property used by another calendar
-   user who is acting on behalf of the organizer, with responses
-   intended to be sent back to the organizer, not the other calendar
-   user:
-
-     ORGANIZER;SENT-BY="MAILTO:jane_doe at host.com":
-      MAILTO:jsmith at host1.com
-
-4.8.4.4 Recurrence ID
-
-   Property Name: RECURRENCE-ID
-
-   Purpose: This property is used in conjunction with the "UID" and
-   "SEQUENCE" property to identify a specific instance of a recurring
-   "VEVENT", "VTODO" or "VJOURNAL" calendar component. The property
-   value is the effective value of the "DTSTART" property of the
-   recurrence instance.
-
-   Value Type: The default value type for this property is DATE-TIME.
-   The time format can be any of the valid forms defined for a DATE-TIME
-   value type. See DATE-TIME value type definition for specific
-   interpretations of the various forms. The value type can be set to
-   DATE.
-
-
-
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 107]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Property Parameters: Non-standard property, value data type, time
-   zone identifier and recurrence identifier range parameters can be
-   specified on this property.
-
-   Conformance: This property can be specified in an iCalendar object
-   containing a recurring calendar component.
-
-   Description: The full range of calendar components specified by a
-   recurrence set is referenced by referring to just the "UID" property
-   value corresponding to the calendar component. The "RECURRENCE-ID"
-   property allows the reference to an individual instance within the
-   recurrence set.
-
-   If the value of the "DTSTART" property is a DATE type value, then the
-   value MUST be the calendar date for the recurrence instance.
-
-   The date/time value is set to the time when the original recurrence
-   instance would occur; meaning that if the intent is to change a
-   Friday meeting to Thursday, the date/time is still set to the
-   original Friday meeting.
-
-   The "RECURRENCE-ID" property is used in conjunction with the "UID"
-   and "SEQUENCE" property to identify a particular instance of a
-   recurring event, to-do or journal. For a given pair of "UID" and
-   "SEQUENCE" property values, the "RECURRENCE-ID" value for a
-   recurrence instance is fixed. When the definition of the recurrence
-   set for a calendar component changes, and hence the "SEQUENCE"
-   property value changes, the "RECURRENCE-ID" for a given recurrence
-   instance might also change.The "RANGE" parameter is used to specify
-   the effective range of recurrence instances from the instance
-   specified by the "RECURRENCE-ID" property value. The default value
-   for the range parameter is the single recurrence instance only. The
-   value can also be "THISANDPRIOR" to indicate a range defined by the
-   given recurrence instance and all prior instances or the value can be
-   "THISANDFUTURE" to indicate a range defined by the given recurrence
-   instance and all subsequent instances.
-
-   Format Definition: The property is defined by the following notation:
-
-     recurid    = "RECURRENCE-ID" ridparam ":" ridval CRLF
-
-     ridparam   = *(
-
-                ; the following are optional,
-                ; but MUST NOT occur more than once
-
-                (";" "VALUE" "=" ("DATE-TIME" / "DATE)) /
-                (";" tzidparam) / (";" rangeparam) /
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 108]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-                ; the following is optional,
-                ; and MAY occur more than once
-
-                (";" xparam)
-
-                )
-
-     ridval     = date-time / date
-     ;Value MUST match value type
-
-   Example: The following are examples of this property:
-
-     RECURRENCE-ID;VALUE=DATE:19960401
-
-     RECURRENCE-ID;RANGE=THISANDFUTURE:19960120T120000Z
-
-4.8.4.5 Related To
-
-   Property Name: RELATED-TO
-
-   Purpose: The property is used to represent a relationship or
-   reference between one calendar component and another.
-
-   Value Type: TEXT
-
-   Property Parameters: Non-standard and relationship type property
-   parameters can be specified on this property.
-
-   Conformance: The property can be specified one or more times in the
-   "VEVENT", "VTODO" or "VJOURNAL" calendar components.
-
-   Description: The property value consists of the persistent, globally
-   unique identifier of another calendar component. This value would be
-   represented in a calendar component by the "UID" property.
-
-   By default, the property value points to another calendar component
-   that has a PARENT relationship to the referencing object. The
-   "RELTYPE" property parameter is used to either explicitly state the
-   default PARENT relationship type to the referenced calendar component
-   or to override the default PARENT relationship type and specify
-   either a CHILD or SIBLING relationship. The PARENT relationship
-   indicates that the calendar component is a subordinate of the
-   referenced calendar component. The CHILD relationship indicates that
-   the calendar component is a superior of the referenced calendar
-   component. The SIBLING relationship indicates that the calendar
-   component is a peer of the referenced calendar component.
-
-
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 109]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Changes to a calendar component referenced by this property can have
-   an implicit impact on the related calendar component. For example, if
-   a group event changes its start or end date or time, then the
-   related, dependent events will need to have their start and end dates
-   changed in a corresponding way. Similarly, if a PARENT calendar
-   component is canceled or deleted, then there is an implied impact to
-   the related CHILD calendar components. This property is intended only
-   to provide information on the relationship of calendar components. It
-   is up to the target calendar system to maintain any property
-   implications of this relationship.
-
-   Format Definition: The property is defined by the following notation:
-
-     related    = "RELATED-TO" [relparam] ":" text CRLF
-
-     relparam   = *(
-
-                ; the following is optional,
-                ; but MUST NOT occur more than once
-
-                (";" reltypeparam) /
-
-                ; the following is optional,
-                ; and MAY occur more than once
-
-                (";" xparm)
-
-                )
-
-   The following is an example of this property:
-
-     RELATED-TO:<jsmith.part7.19960817T083000.xyzMail at host3.com>
-
-     RELATED-TO:<19960401-080045-4000F192713-0052 at host1.com>
-
-4.8.4.6 Uniform Resource Locator
-
-   Property Name: URL
-
-   Purpose: This property defines a Uniform Resource Locator (URL)
-   associated with the iCalendar object.
-
-   Value Type: URI
-
-   Property Parameters: Non-standard property parameters can be
-   specified on this property.
-
-
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 110]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Conformance: This property can be specified once in the "VEVENT",
-   "VTODO", "VJOURNAL" or "VFREEBUSY" calendar components.
-
-   Description: This property may be used in a calendar component to
-   convey a location where a more dynamic rendition of the calendar
-   information associated with the calendar component can be found. This
-   memo does not attempt to standardize the form of the URI, nor the
-   format of the resource pointed to by the property value. If the URL
-   property and Content-Location MIME header are both specified, they
-   MUST point to the same resource.
-
-   Format Definition: The property is defined by the following notation:
-
-     url        = "URL" urlparam ":" uri CRLF
-
-     urlparam   = *(";" xparam)
-
-   Example: The following is an example of this property:
-
-     URL:http://abc.com/pub/calendars/jsmith/mytime.ics
-
-4.8.4.7 Unique Identifier
-
-   Property Name: UID
-
-   Purpose: This property defines the persistent, globally unique
-   identifier for the calendar component.
-
-   Value Type: TEXT
-
-   Property Parameters: Non-standard property parameters can be
-   specified on this property.
-
-   Conformance: The property MUST be specified in the "VEVENT", "VTODO",
-   "VJOURNAL" or "VFREEBUSY" calendar components.
-
-   Description: The UID itself MUST be a globally unique identifier. The
-   generator of the identifier MUST guarantee that the identifier is
-   unique. There are several algorithms that can be used to accomplish
-   this. The identifier is RECOMMENDED to be the identical syntax to the
-   [RFC 822] addr-spec. A good method to assure uniqueness is to put the
-   domain name or a domain literal IP address of the host on which the
-   identifier was created on the right hand side of the "@", and on the
-   left hand side, put a combination of the current calendar date and
-   time of day (i.e., formatted in as a DATE-TIME value) along with some
-   other currently unique (perhaps sequential) identifier available on
-   the system (for example, a process id number). Using a date/time
-   value on the left hand side and a domain name or domain literal on
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 111]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   the right hand side makes it possible to guarantee uniqueness since
-   no two hosts should be using the same domain name or IP address at
-   the same time. Though other algorithms will work, it is RECOMMENDED
-   that the right hand side contain some domain identifier (either of
-   the host itself or otherwise) such that the generator of the message
-   identifier can guarantee the uniqueness of the left hand side within
-   the scope of that domain.
-
-   This is the method for correlating scheduling messages with the
-   referenced "VEVENT", "VTODO", or "VJOURNAL" calendar component.
-
-   The full range of calendar components specified by a recurrence set
-   is referenced by referring to just the "UID" property value
-   corresponding to the calendar component. The "RECURRENCE-ID" property
-   allows the reference to an individual instance within the recurrence
-   set.
-
-   This property is an important method for group scheduling
-   applications to match requests with later replies, modifications or
-   deletion requests. Calendaring and scheduling applications MUST
-   generate this property in "VEVENT", "VTODO" and "VJOURNAL" calendar
-   components to assure interoperability with other group scheduling
-   applications. This identifier is created by the calendar system that
-   generates an iCalendar object.
-
-   Implementations MUST be able to receive and persist values of at
-   least 255 characters for this property.
-
-   Format Definition: The property is defined by the following notation:
-
-     uid        = "UID" uidparam ":" text CRLF
-
-     uidparam   = *(";" xparam)
-
-   Example: The following is an example of this property:
-
-     UID:19960401T080045Z-4000F192713-0052 at host1.com
-
-4.8.5 Recurrence Component Properties
-
-   The following properties specify recurrence information in calendar
-   components.
-
-4.8.5.1 Exception Date/Times
-
-   Property Name: EXDATE
-
-
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 112]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Purpose: This property defines the list of date/time exceptions for a
-   recurring calendar component.
-
-   Value Type: The default value type for this property is DATE-TIME.
-   The value type can be set to DATE.
-
-   Property Parameters: Non-standard, value data type and time zone
-   identifier property parameters can be specified on this property.
-
-   Conformance: This property can be specified in an iCalendar object
-   that includes a recurring calendar component.
-
-   Description: The exception dates, if specified, are used in computing
-   the recurrence set. The recurrence set is the complete set of
-   recurrence instances for a calendar component. The recurrence set is
-   generated by considering the initial "DTSTART" property along with
-   the "RRULE", "RDATE", "EXDATE" and "EXRULE" properties contained
-   within the iCalendar object. The "DTSTART" property defines the first
-   instance in the recurrence set. Multiple instances of the "RRULE" and
-   "EXRULE" properties can also be specified to define more
-   sophisticated recurrence sets. The final recurrence set is generated
-   by gathering all of the start date-times generated by any of the
-   specified "RRULE" and "RDATE" properties, and then excluding any
-   start date and times which fall within the union of start date and
-   times generated by any specified "EXRULE" and "EXDATE" properties.
-   This implies that start date and times within exclusion related
-   properties (i.e., "EXDATE" and "EXRULE") take precedence over those
-   specified by inclusion properties (i.e., "RDATE" and "RRULE"). Where
-   duplicate instances are generated by the "RRULE" and "RDATE"
-   properties, only one recurrence is considered. Duplicate instances
-   are ignored.
-
-   The "EXDATE" property can be used to exclude the value specified in
-   "DTSTART". However, in such cases the original "DTSTART" date MUST
-   still be maintained by the calendaring and scheduling system because
-   the original "DTSTART" value has inherent usage dependencies by other
-   properties such as the "RECURRENCE-ID".
-
-   Format Definition: The property is defined by the following notation:
-
-     exdate     = "EXDATE" exdtparam ":" exdtval *("," exdtval) CRLF
-
-     exdtparam  = *(
-
-                ; the following are optional,
-                ; but MUST NOT occur more than once
-
-                (";" "VALUE" "=" ("DATE-TIME" / "DATE")) /
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 113]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-                (";" tzidparam) /
-
-                ; the following is optional,
-                ; and MAY occur more than once
-
-                (";" xparam)
-
-                )
-
-     exdtval    = date-time / date
-     ;Value MUST match value type
-
-   Example: The following is an example of this property:
-
-     EXDATE:19960402T010000Z,19960403T010000Z,19960404T010000Z
-
-4.8.5.2 Exception Rule
-
-   Property Name: EXRULE
-
-   Purpose: This property defines a rule or repeating pattern for an
-   exception to a recurrence set.
-
-   Value Type: RECUR
-
-   Property Parameters: Non-standard property parameters can be
-   specified on this property.
-
-   Conformance: This property can be specified in "VEVENT", "VTODO" or
-   "VJOURNAL" calendar components.
-
-   Description: The exception rule, if specified, is used in computing
-   the recurrence set. The recurrence set is the complete set of
-   recurrence instances for a calendar component. The recurrence set is
-   generated by considering the initial "DTSTART" property along with
-   the "RRULE", "RDATE", "EXDATE" and "EXRULE" properties contained
-   within the iCalendar object. The "DTSTART" defines the first instance
-   in the recurrence set. Multiple instances of the "RRULE" and "EXRULE"
-   properties can also be specified to define more sophisticated
-   recurrence sets. The final recurrence set is generated by gathering
-   all of the start date-times generated by any of the specified "RRULE"
-   and "RDATE" properties, and excluding any start date and times which
-   fall within the union of start date and times generated by any
-   specified "EXRULE" and "EXDATE" properties. This implies that start
-   date and times within exclusion related properties (i.e., "EXDATE"
-   and "EXRULE") take precedence over those specified by inclusion
-
-
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 114]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   properties (i.e., "RDATE" and "RRULE"). Where duplicate instances are
-   generated by the "RRULE" and "RDATE" properties, only one recurrence
-   is considered. Duplicate instances are ignored.
-
-   The "EXRULE" property can be used to exclude the value specified in
-   "DTSTART". However, in such cases the original "DTSTART" date MUST
-   still be maintained by the calendaring and scheduling system because
-   the original "DTSTART" value has inherent usage dependencies by other
-   properties such as the "RECURRENCE-ID".
-
-   Format Definition: The property is defined by the following notation:
-
-     exrule     = "EXRULE" exrparam ":" recur CRLF
-
-     exrparam   = *(";" xparam)
-
-   Example: The following are examples of this property. Except every
-   other week, on Tuesday and Thursday for 4 occurrences:
-
-     EXRULE:FREQ=WEEKLY;COUNT=4;INTERVAL=2;BYDAY=TU,TH
-
-   Except daily for 10 occurrences:
-
-     EXRULE:FREQ=DAILY;COUNT=10
-
-   Except yearly in June and July for 8 occurrences:
-
-     EXRULE:FREQ=YEARLY;COUNT=8;BYMONTH=6,7
-
-4.8.5.3 Recurrence Date/Times
-
-   Property Name: RDATE
-
-   Purpose: This property defines the list of date/times for a
-   recurrence set.
-
-   Value Type: The default value type for this property is DATE-TIME.
-   The value type can be set to DATE or PERIOD.
-
-   Property Parameters: Non-standard, value data type and time zone
-   identifier property parameters can be specified on this property.
-
-   Conformance: The property can be specified in "VEVENT", "VTODO",
-   "VJOURNAL" or "VTIMEZONE" calendar components.
-
-
-
-
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 115]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Description: This property can appear along with the "RRULE" property
-   to define an aggregate set of repeating occurrences. When they both
-   appear in an iCalendar object, the recurring events are defined by
-   the union of occurrences defined by both the "RDATE" and "RRULE".
-
-   The recurrence dates, if specified, are used in computing the
-   recurrence set. The recurrence set is the complete set of recurrence
-   instances for a calendar component. The recurrence set is generated
-   by considering the initial "DTSTART" property along with the "RRULE",
-   "RDATE", "EXDATE" and "EXRULE" properties contained within the
-   iCalendar object. The "DTSTART" property defines the first instance
-   in the recurrence set. Multiple instances of the "RRULE" and "EXRULE"
-   properties can also be specified to define more sophisticated
-   recurrence sets. The final recurrence set is generated by gathering
-   all of the start date/times generated by any of the specified "RRULE"
-   and "RDATE" properties, and excluding any start date/times which fall
-   within the union of start date/times generated by any specified
-   "EXRULE" and "EXDATE" properties. This implies that start date/times
-   within exclusion related properties (i.e., "EXDATE" and "EXRULE")
-   take precedence over those specified by inclusion properties (i.e.,
-   "RDATE" and "RRULE"). Where duplicate instances are generated by the
-   "RRULE" and "RDATE" properties, only one recurrence is considered.
-   Duplicate instances are ignored.
-
-   Format Definition: The property is defined by the following notation:
-
-     rdate      = "RDATE" rdtparam ":" rdtval *("," rdtval) CRLF
-
-     rdtparam   = *(
-
-                ; the following are optional,
-                ; but MUST NOT occur more than once
-
-                (";" "VALUE" "=" ("DATE-TIME" / "DATE" / "PERIOD")) /
-                (";" tzidparam) /
-
-                ; the following is optional,
-                ; and MAY occur more than once
-
-                (";" xparam)
-
-                )
-
-     rdtval     = date-time / date / period
-     ;Value MUST match value type
-
-   Example: The following are examples of this property:
-
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 116]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     RDATE:19970714T123000Z
-
-     RDATE;TZID=US-EASTERN:19970714T083000
-
-     RDATE;VALUE=PERIOD:19960403T020000Z/19960403T040000Z,
-      19960404T010000Z/PT3H
-
-     RDATE;VALUE=DATE:19970101,19970120,19970217,19970421
-      19970526,19970704,19970901,19971014,19971128,19971129,19971225
-
-4.8.5.4 Recurrence Rule
-
-   Property Name: RRULE
-
-   Purpose: This property defines a rule or repeating pattern for
-   recurring events, to-dos, or time zone definitions.
-
-   Value Type: RECUR
-
-   Property Parameters: Non-standard property parameters can be
-   specified on this property.
-
-   Conformance: This property can be specified one or more times in
-   recurring "VEVENT", "VTODO" and "VJOURNAL" calendar components. It
-   can also be specified once in each STANDARD or DAYLIGHT sub-component
-   of the "VTIMEZONE" calendar component.
-
-   Description: The recurrence rule, if specified, is used in computing
-   the recurrence set. The recurrence set is the complete set of
-   recurrence instances for a calendar component. The recurrence set is
-   generated by considering the initial "DTSTART" property along with
-   the "RRULE", "RDATE", "EXDATE" and "EXRULE" properties contained
-   within the iCalendar object. The "DTSTART" property defines the first
-   instance in the recurrence set. Multiple instances of the "RRULE" and
-   "EXRULE" properties can also be specified to define more
-   sophisticated recurrence sets. The final recurrence set is generated
-   by gathering all of the start date/times generated by any of the
-   specified "RRULE" and "RDATE" properties, and excluding any start
-   date/times which fall within the union of start date/times generated
-   by any specified "EXRULE" and "EXDATE" properties. This implies that
-   start date/times within exclusion related properties (i.e., "EXDATE"
-   and "EXRULE") take precedence over those specified by inclusion
-   properties (i.e., "RDATE" and "RRULE"). Where duplicate instances are
-   generated by the "RRULE" and "RDATE" properties, only one recurrence
-   is considered. Duplicate instances are ignored.
-
-
-
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 117]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   The "DTSTART" and "DTEND" property pair or "DTSTART" and "DURATION"
-   property pair, specified within the iCalendar object defines the
-   first instance of the recurrence. When used with a recurrence rule,
-   the "DTSTART" and "DTEND" properties MUST be specified in local time
-   and the appropriate set of "VTIMEZONE" calendar components MUST be
-   included. For detail on the usage of the "VTIMEZONE" calendar
-   component, see the "VTIMEZONE" calendar component definition.
-
-   Any duration associated with the iCalendar object applies to all
-   members of the generated recurrence set. Any modified duration for
-   specific recurrences MUST be explicitly specified using the "RDATE"
-   property.
-
-   Format Definition: This property is defined by the following
-   notation:
-
-     rrule      = "RRULE" rrulparam ":" recur CRLF
-
-     rrulparam  = *(";" xparam)
-
-   Example: All examples assume the Eastern United States time zone.
-
-   Daily for 10 occurrences:
-
-     DTSTART;TZID=US-Eastern:19970902T090000
-     RRULE:FREQ=DAILY;COUNT=10
-
-     ==> (1997 9:00 AM EDT)September 2-11
-
-   Daily until December 24, 1997:
-
-     DTSTART;TZID=US-Eastern:19970902T090000
-     RRULE:FREQ=DAILY;UNTIL=19971224T000000Z
-
-     ==> (1997 9:00 AM EDT)September 2-30;October 1-25
-         (1997 9:00 AM EST)October 26-31;November 1-30;December 1-23
-
-   Every other day - forever:
-
-     DTSTART;TZID=US-Eastern:19970902T090000
-     RRULE:FREQ=DAILY;INTERVAL=2
-     ==> (1997 9:00 AM EDT)September2,4,6,8...24,26,28,30;
-          October 2,4,6...20,22,24
-         (1997 9:00 AM EST)October 26,28,30;November 1,3,5,7...25,27,29;
-          Dec 1,3,...
-
-   Every 10 days, 5 occurrences:
-
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 118]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     DTSTART;TZID=US-Eastern:19970902T090000
-     RRULE:FREQ=DAILY;INTERVAL=10;COUNT=5
-
-     ==> (1997 9:00 AM EDT)September 2,12,22;October 2,12
-
-   Everyday in January, for 3 years:
-
-     DTSTART;TZID=US-Eastern:19980101T090000
-     RRULE:FREQ=YEARLY;UNTIL=20000131T090000Z;
-      BYMONTH=1;BYDAY=SU,MO,TU,WE,TH,FR,SA
-     or
-     RRULE:FREQ=DAILY;UNTIL=20000131T090000Z;BYMONTH=1
-
-     ==> (1998 9:00 AM EDT)January 1-31
-         (1999 9:00 AM EDT)January 1-31
-         (2000 9:00 AM EDT)January 1-31
-
-   Weekly for 10 occurrences
-
-     DTSTART;TZID=US-Eastern:19970902T090000
-     RRULE:FREQ=WEEKLY;COUNT=10
-
-     ==> (1997 9:00 AM EDT)September 2,9,16,23,30;October 7,14,21
-         (1997 9:00 AM EST)October 28;November 4
-
-   Weekly until December 24, 1997
-
-     DTSTART;TZID=US-Eastern:19970902T090000
-     RRULE:FREQ=WEEKLY;UNTIL=19971224T000000Z
-
-     ==> (1997 9:00 AM EDT)September 2,9,16,23,30;October 7,14,21
-         (1997 9:00 AM EST)October 28;November 4,11,18,25;
-                           December 2,9,16,23
-   Every other week - forever:
-
-     DTSTART;TZID=US-Eastern:19970902T090000
-     RRULE:FREQ=WEEKLY;INTERVAL=2;WKST=SU
-
-     ==> (1997 9:00 AM EDT)September 2,16,30;October 14
-         (1997 9:00 AM EST)October 28;November 11,25;December 9,23
-         (1998 9:00 AM EST)January 6,20;February
-     ...
-
-   Weekly on Tuesday and Thursday for 5 weeks:
-
-    DTSTART;TZID=US-Eastern:19970902T090000
-    RRULE:FREQ=WEEKLY;UNTIL=19971007T000000Z;WKST=SU;BYDAY=TU,TH
-    or
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 119]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-    RRULE:FREQ=WEEKLY;COUNT=10;WKST=SU;BYDAY=TU,TH
-
-    ==> (1997 9:00 AM EDT)September 2,4,9,11,16,18,23,25,30;October 2
-
-   Every other week on Monday, Wednesday and Friday until December 24,
-   1997, but starting on Tuesday, September 2, 1997:
-
-     DTSTART;TZID=US-Eastern:19970902T090000
-     RRULE:FREQ=WEEKLY;INTERVAL=2;UNTIL=19971224T000000Z;WKST=SU;
-      BYDAY=MO,WE,FR
-     ==> (1997 9:00 AM EDT)September 2,3,5,15,17,19,29;October
-     1,3,13,15,17
-         (1997 9:00 AM EST)October 27,29,31;November 10,12,14,24,26,28;
-                           December 8,10,12,22
-
-   Every other week on Tuesday and Thursday, for 8 occurrences:
-
-     DTSTART;TZID=US-Eastern:19970902T090000
-     RRULE:FREQ=WEEKLY;INTERVAL=2;COUNT=8;WKST=SU;BYDAY=TU,TH
-
-     ==> (1997 9:00 AM EDT)September 2,4,16,18,30;October 2,14,16
-
-   Monthly on the 1st Friday for ten occurrences:
-
-     DTSTART;TZID=US-Eastern:19970905T090000
-     RRULE:FREQ=MONTHLY;COUNT=10;BYDAY=1FR
-
-     ==> (1997 9:00 AM EDT)September 5;October 3
-         (1997 9:00 AM EST)November 7;Dec 5
-         (1998 9:00 AM EST)January 2;February 6;March 6;April 3
-         (1998 9:00 AM EDT)May 1;June 5
-
-   Monthly on the 1st Friday until December 24, 1997:
-
-     DTSTART;TZID=US-Eastern:19970905T090000
-     RRULE:FREQ=MONTHLY;UNTIL=19971224T000000Z;BYDAY=1FR
-
-     ==> (1997 9:00 AM EDT)September 5;October 3
-         (1997 9:00 AM EST)November 7;December 5
-
-   Every other month on the 1st and last Sunday of the month for 10
-   occurrences:
-
-     DTSTART;TZID=US-Eastern:19970907T090000
-     RRULE:FREQ=MONTHLY;INTERVAL=2;COUNT=10;BYDAY=1SU,-1SU
-
-     ==> (1997 9:00 AM EDT)September 7,28
-         (1997 9:00 AM EST)November 2,30
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 120]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-         (1998 9:00 AM EST)January 4,25;March 1,29
-         (1998 9:00 AM EDT)May 3,31
-
-   Monthly on the second to last Monday of the month for 6 months:
-
-     DTSTART;TZID=US-Eastern:19970922T090000
-     RRULE:FREQ=MONTHLY;COUNT=6;BYDAY=-2MO
-
-     ==> (1997 9:00 AM EDT)September 22;October 20
-         (1997 9:00 AM EST)November 17;December 22
-         (1998 9:00 AM EST)January 19;February 16
-
-   Monthly on the third to the last day of the month, forever:
-
-     DTSTART;TZID=US-Eastern:19970928T090000
-     RRULE:FREQ=MONTHLY;BYMONTHDAY=-3
-
-     ==> (1997 9:00 AM EDT)September 28
-         (1997 9:00 AM EST)October 29;November 28;December 29
-         (1998 9:00 AM EST)January 29;February 26
-     ...
-
-   Monthly on the 2nd and 15th of the month for 10 occurrences:
-
-     DTSTART;TZID=US-Eastern:19970902T090000
-     RRULE:FREQ=MONTHLY;COUNT=10;BYMONTHDAY=2,15
-
-     ==> (1997 9:00 AM EDT)September 2,15;October 2,15
-         (1997 9:00 AM EST)November 2,15;December 2,15
-         (1998 9:00 AM EST)January 2,15
-
-   Monthly on the first and last day of the month for 10 occurrences:
-
-     DTSTART;TZID=US-Eastern:19970930T090000
-     RRULE:FREQ=MONTHLY;COUNT=10;BYMONTHDAY=1,-1
-
-     ==> (1997 9:00 AM EDT)September 30;October 1
-         (1997 9:00 AM EST)October 31;November 1,30;December 1,31
-         (1998 9:00 AM EST)January 1,31;February 1
-
-   Every 18 months on the 10th thru 15th of the month for 10
-   occurrences:
-
-     DTSTART;TZID=US-Eastern:19970910T090000
-     RRULE:FREQ=MONTHLY;INTERVAL=18;COUNT=10;BYMONTHDAY=10,11,12,13,14,
-      15
-
-     ==> (1997 9:00 AM EDT)September 10,11,12,13,14,15
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 121]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-         (1999 9:00 AM EST)March 10,11,12,13
-
-   Every Tuesday, every other month:
-
-     DTSTART;TZID=US-Eastern:19970902T090000
-     RRULE:FREQ=MONTHLY;INTERVAL=2;BYDAY=TU
-
-     ==> (1997 9:00 AM EDT)September 2,9,16,23,30
-         (1997 9:00 AM EST)November 4,11,18,25
-         (1998 9:00 AM EST)January 6,13,20,27;March 3,10,17,24,31
-     ...
-
-   Yearly in June and July for 10 occurrences:
-
-     DTSTART;TZID=US-Eastern:19970610T090000
-     RRULE:FREQ=YEARLY;COUNT=10;BYMONTH=6,7
-     ==> (1997 9:00 AM EDT)June 10;July 10
-         (1998 9:00 AM EDT)June 10;July 10
-         (1999 9:00 AM EDT)June 10;July 10
-         (2000 9:00 AM EDT)June 10;July 10
-         (2001 9:00 AM EDT)June 10;July 10
-     Note: Since none of the BYDAY, BYMONTHDAY or BYYEARDAY components
-     are specified, the day is gotten from DTSTART
-
-   Every other year on January, February, and March for 10 occurrences:
-
-     DTSTART;TZID=US-Eastern:19970310T090000
-     RRULE:FREQ=YEARLY;INTERVAL=2;COUNT=10;BYMONTH=1,2,3
-
-     ==> (1997 9:00 AM EST)March 10
-         (1999 9:00 AM EST)January 10;February 10;March 10
-         (2001 9:00 AM EST)January 10;February 10;March 10
-         (2003 9:00 AM EST)January 10;February 10;March 10
-
-   Every 3rd year on the 1st, 100th and 200th day for 10 occurrences:
-
-     DTSTART;TZID=US-Eastern:19970101T090000
-     RRULE:FREQ=YEARLY;INTERVAL=3;COUNT=10;BYYEARDAY=1,100,200
-
-     ==> (1997 9:00 AM EST)January 1
-         (1997 9:00 AM EDT)April 10;July 19
-         (2000 9:00 AM EST)January 1
-         (2000 9:00 AM EDT)April 9;July 18
-         (2003 9:00 AM EST)January 1
-         (2003 9:00 AM EDT)April 10;July 19
-         (2006 9:00 AM EST)January 1
-
-   Every 20th Monday of the year, forever:
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 122]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     DTSTART;TZID=US-Eastern:19970519T090000
-     RRULE:FREQ=YEARLY;BYDAY=20MO
-
-     ==> (1997 9:00 AM EDT)May 19
-         (1998 9:00 AM EDT)May 18
-         (1999 9:00 AM EDT)May 17
-     ...
-
-   Monday of week number 20 (where the default start of the week is
-   Monday), forever:
-
-     DTSTART;TZID=US-Eastern:19970512T090000
-     RRULE:FREQ=YEARLY;BYWEEKNO=20;BYDAY=MO
-
-     ==> (1997 9:00 AM EDT)May 12
-         (1998 9:00 AM EDT)May 11
-         (1999 9:00 AM EDT)May 17
-     ...
-
-   Every Thursday in March, forever:
-
-     DTSTART;TZID=US-Eastern:19970313T090000
-     RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=TH
-
-     ==> (1997 9:00 AM EST)March 13,20,27
-         (1998 9:00 AM EST)March 5,12,19,26
-         (1999 9:00 AM EST)March 4,11,18,25
-     ...
-
-   Every Thursday, but only during June, July, and August, forever:
-
-     DTSTART;TZID=US-Eastern:19970605T090000
-     RRULE:FREQ=YEARLY;BYDAY=TH;BYMONTH=6,7,8
-
-     ==> (1997 9:00 AM EDT)June 5,12,19,26;July 3,10,17,24,31;
-                       August 7,14,21,28
-         (1998 9:00 AM EDT)June 4,11,18,25;July 2,9,16,23,30;
-                       August 6,13,20,27
-         (1999 9:00 AM EDT)June 3,10,17,24;July 1,8,15,22,29;
-                       August 5,12,19,26
-     ...
-
-   Every Friday the 13th, forever:
-
-     DTSTART;TZID=US-Eastern:19970902T090000
-     EXDATE;TZID=US-Eastern:19970902T090000
-     RRULE:FREQ=MONTHLY;BYDAY=FR;BYMONTHDAY=13
-
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 123]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     ==> (1998 9:00 AM EST)February 13;March 13;November 13
-         (1999 9:00 AM EDT)August 13
-         (2000 9:00 AM EDT)October 13
-     ...
-
-   The first Saturday that follows the first Sunday of the month,
-    forever:
-
-     DTSTART;TZID=US-Eastern:19970913T090000
-     RRULE:FREQ=MONTHLY;BYDAY=SA;BYMONTHDAY=7,8,9,10,11,12,13
-
-     ==> (1997 9:00 AM EDT)September 13;October 11
-         (1997 9:00 AM EST)November 8;December 13
-         (1998 9:00 AM EST)January 10;February 7;March 7
-         (1998 9:00 AM EDT)April 11;May 9;June 13...
-     ...
-
-   Every four years, the first Tuesday after a Monday in November,
-   forever (U.S. Presidential Election day):
-
-     DTSTART;TZID=US-Eastern:19961105T090000
-     RRULE:FREQ=YEARLY;INTERVAL=4;BYMONTH=11;BYDAY=TU;BYMONTHDAY=2,3,4,
-      5,6,7,8
-
-     ==> (1996 9:00 AM EST)November 5
-         (2000 9:00 AM EST)November 7
-         (2004 9:00 AM EST)November 2
-     ...
-
-   The 3rd instance into the month of one of Tuesday, Wednesday or
-   Thursday, for the next 3 months:
-
-     DTSTART;TZID=US-Eastern:19970904T090000
-     RRULE:FREQ=MONTHLY;COUNT=3;BYDAY=TU,WE,TH;BYSETPOS=3
-
-     ==> (1997 9:00 AM EDT)September 4;October 7
-         (1997 9:00 AM EST)November 6
-
-   The 2nd to last weekday of the month:
-
-     DTSTART;TZID=US-Eastern:19970929T090000
-     RRULE:FREQ=MONTHLY;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-2
-
-     ==> (1997 9:00 AM EDT)September 29
-         (1997 9:00 AM EST)October 30;November 27;December 30
-         (1998 9:00 AM EST)January 29;February 26;March 30
-     ...
-
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 124]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Every 3 hours from 9:00 AM to 5:00 PM on a specific day:
-
-     DTSTART;TZID=US-Eastern:19970902T090000
-     RRULE:FREQ=HOURLY;INTERVAL=3;UNTIL=19970902T170000Z
-
-     ==> (September 2, 1997 EDT)09:00,12:00,15:00
-
-   Every 15 minutes for 6 occurrences:
-
-     DTSTART;TZID=US-Eastern:19970902T090000
-     RRULE:FREQ=MINUTELY;INTERVAL=15;COUNT=6
-
-     ==> (September 2, 1997 EDT)09:00,09:15,09:30,09:45,10:00,10:15
-
-   Every hour and a half for 4 occurrences:
-
-     DTSTART;TZID=US-Eastern:19970902T090000
-     RRULE:FREQ=MINUTELY;INTERVAL=90;COUNT=4
-
-     ==> (September 2, 1997 EDT)09:00,10:30;12:00;13:30
-
-   Every 20 minutes from 9:00 AM to 4:40 PM every day:
-
-     DTSTART;TZID=US-Eastern:19970902T090000
-     RRULE:FREQ=DAILY;BYHOUR=9,10,11,12,13,14,15,16;BYMINUTE=0,20,40
-     or
-     RRULE:FREQ=MINUTELY;INTERVAL=20;BYHOUR=9,10,11,12,13,14,15,16
-
-     ==> (September 2, 1997 EDT)9:00,9:20,9:40,10:00,10:20,
-                                ... 16:00,16:20,16:40
-         (September 3, 1997 EDT)9:00,9:20,9:40,10:00,10:20,
-                               ...16:00,16:20,16:40
-     ...
-
-   An example where the days generated makes a difference because of
-   WKST:
-
-     DTSTART;TZID=US-Eastern:19970805T090000
-     RRULE:FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=MO
-
-     ==> (1997 EDT)Aug 5,10,19,24
-
-     changing only WKST from MO to SU, yields different results...
-
-     DTSTART;TZID=US-Eastern:19970805T090000
-     RRULE:FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU
-     ==> (1997 EDT)August 5,17,19,31
-
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 125]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-4.8.6 Alarm Component Properties
-
-   The following properties specify alarm information in calendar
-   components.
-
-4.8.6.1 Action
-
-   Property Name: ACTION
-
-   Purpose: This property defines the action to be invoked when an alarm
-   is triggered.
-
-   Value Type: TEXT
-
-   Property Parameters: Non-standard property parameters can be
-   specified on this property.
-
-   Conformance: This property MUST be specified once in a "VALARM"
-   calendar component.
-
-   Description: Each "VALARM" calendar component has a particular type
-   of action associated with it. This property specifies the type of
-   action
-
-   Format Definition: The property is defined by the following notation:
-
-     action     = "ACTION" actionparam ":" actionvalue CRLF
-
-     actionparam        = *(";" xparam)
-
-     actionvalue        = "AUDIO" / "DISPLAY" / "EMAIL" / "PROCEDURE"
-                        / iana-token / x-name
-
-   Example: The following are examples of this property in a "VALARM"
-   calendar component:
-
-     ACTION:AUDIO
-
-     ACTION:DISPLAY
-
-     ACTION:PROCEDURE
-
-4.8.6.2 Repeat Count
-
-   Property Name: REPEAT
-
-   Purpose: This property defines the number of time the alarm should be
-   repeated, after the initial trigger.
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 126]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Value Type: INTEGER
-
-   Property Parameters: Non-standard property parameters can be
-   specified on this property.
-
-   Conformance: This property can be specified in a "VALARM" calendar
-   component.
-
-   Description: If the alarm triggers more than once, then this property
-   MUST be specified along with the "DURATION" property.
-
-   Format Definition: The property is defined by the following notation:
-
-     repeatcnt  = "REPEAT" repparam ":" integer CRLF
-     ;Default is "0", zero.
-
-     repparam   = *(";" xparam)
-
-   Example: The following is an example of this property for an alarm
-   that repeats 4 additional times with a 5 minute delay after the
-   initial triggering of the alarm:
-
-     REPEAT:4
-     DURATION:PT5M
-
-4.8.6.3 Trigger
-
-   Property Name: TRIGGER
-
-   Purpose: This property specifies when an alarm will trigger.
-
-   Value Type: The default value type is DURATION. The value type can be
-   set to a DATE-TIME value type, in which case the value MUST specify a
-   UTC formatted DATE-TIME value.
-
-   Property Parameters: Non-standard, value data type, time zone
-   identifier or trigger relationship property parameters can be
-   specified on this property. The trigger relationship property
-   parameter MUST only be specified when the value type is DURATION.
-
-   Conformance: This property MUST be specified in the "VALARM" calendar
-   component.
-
-   Description: Within the "VALARM" calendar component, this property
-   defines when the alarm will trigger. The default value type is
-   DURATION, specifying a relative time for the trigger of the alarm.
-   The default duration is relative to the start of an event or to-do
-   that the alarm is associated with. The duration can be explicitly set
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 127]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   to trigger from either the end or the start of the associated event
-   or to-do with the "RELATED" parameter. A value of START will set the
-   alarm to trigger off the start of the associated event or to-do. A
-   value of END will set the alarm to trigger off the end of the
-   associated event or to-do.
-
-   Either a positive or negative duration may be specified for the
-   "TRIGGER" property. An alarm with a positive duration is triggered
-   after the associated start or end of the event or to-do. An alarm
-   with a negative duration is triggered before the associated start or
-   end of the event or to-do.
-
-   The "RELATED" property parameter is not valid if the value type of
-   the property is set to DATE-TIME (i.e., for an absolute date and time
-   alarm trigger). If a value type of DATE-TIME is specified, then the
-   property value MUST be specified in the UTC time format. If an
-   absolute trigger is specified on an alarm for a recurring event or
-   to-do, then the alarm will only trigger for the specified absolute
-   date/time, along with any specified repeating instances.
-
-   If the trigger is set relative to START, then the "DTSTART" property
-   MUST be present in the associated "VEVENT" or "VTODO" calendar
-   component. If an alarm is specified for an event with the trigger set
-   relative to the END, then the "DTEND" property or the "DSTART" and
-   "DURATION' properties MUST be present in the associated "VEVENT"
-   calendar component. If the alarm is specified for a to-do with a
-   trigger set relative to the END, then either the "DUE" property or
-   the "DSTART" and "DURATION' properties MUST be present in the
-   associated "VTODO" calendar component.
-
-   Alarms specified in an event or to-do which is defined in terms of a
-   DATE value type will be triggered relative to 00:00:00 UTC on the
-   specified date. For example, if "DTSTART:19980205, then the duration
-   trigger will be relative to19980205T000000Z.
-
-   Format Definition: The property is defined by the following notation:
-
-     trigger    = "TRIGGER" (trigrel / trigabs)
-
-     trigrel    = *(
-
-                ; the following are optional,
-                ; but MUST NOT occur more than once
-
-                  (";" "VALUE" "=" "DURATION") /
-                  (";" trigrelparam) /
-
-                ; the following is optional,
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 128]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-                ; and MAY occur more than once
-
-                  (";" xparam)
-                  ) ":"  dur-value
-
-     trigabs    = 1*(
-
-                ; the following is REQUIRED,
-                ; but MUST NOT occur more than once
-
-                  (";" "VALUE" "=" "DATE-TIME") /
-
-                ; the following is optional,
-                ; and MAY occur more than once
-
-                  (";" xparam)
-
-                  ) ":" date-time
-
-   Example: A trigger set 15 minutes prior to the start of the event or
-   to-do.
-
-     TRIGGER:-P15M
-
-   A trigger set 5 minutes after the end of the event or to-do.
-
-     TRIGGER;RELATED=END:P5M
-
-   A trigger set to an absolute date/time.
-
-     TRIGGER;VALUE=DATE-TIME:19980101T050000Z
-
-4.8.7 Change Management Component Properties
-
-   The following properties specify change management information in
-   calendar components.
-
-4.8.7.1 Date/Time Created
-
-   Property Name: CREATED
-
-   Purpose: This property specifies the date and time that the calendar
-   information was created by the calendar user agent in the calendar
-   store.
-
-        Note: This is analogous to the creation date and time for a file
-        in the file system.
-
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 129]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Value Type: DATE-TIME
-
-   Property Parameters: Non-standard property parameters can be
-   specified on this property.
-
-   Conformance: The property can be specified once in "VEVENT", "VTODO"
-   or "VJOURNAL" calendar components.
-
-   Description: The date and time is a UTC value.
-
-   Format Definition: The property is defined by the following notation:
-
-     created    = "CREATED" creaparam ":" date-time CRLF
-
-     creaparam  = *(";" xparam)
-
-   Example: The following is an example of this property:
-
-     CREATED:19960329T133000Z
-
-4.8.7.2 Date/Time Stamp
-
-   Property Name: DTSTAMP
-
-   Purpose: The property indicates the date/time that the instance of
-   the iCalendar object was created.
-
-   Value Type: DATE-TIME
-
-   Property Parameters: Non-standard property parameters can be
-   specified on this property.
-
-   Conformance: This property MUST be included in the "VEVENT", "VTODO",
-   "VJOURNAL" or "VFREEBUSY" calendar components.
-
-   Description: The value MUST be specified in the UTC time format.
-
-   This property is also useful to protocols such as [IMIP] that have
-   inherent latency issues with the delivery of content. This property
-   will assist in the proper sequencing of messages containing iCalendar
-   objects.
-
-   This property is different than the "CREATED" and "LAST-MODIFIED"
-   properties. These two properties are used to specify when the
-   particular calendar data in the calendar store was created and last
-   modified. This is different than when the iCalendar object
-   representation of the calendar service information was created or
-   last modified.
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 130]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Format Definition: The property is defined by the following notation:
-
-     dtstamp    = "DTSTAMP" stmparam ":" date-time CRLF
-
-     stmparam   = *(";" xparam)
-
-   Example:
-
-     DTSTAMP:19971210T080000Z
-
-4.8.7.3 Last Modified
-
-   Property Name: LAST-MODIFIED
-
-   Purpose: The property specifies the date and time that the
-   information associated with the calendar component was last revised
-   in the calendar store.
-
-        Note: This is analogous to the modification date and time for a
-        file in the file system.
-
-   Value Type: DATE-TIME
-
-   Property Parameters: Non-standard property parameters can be
-   specified on this property.
-
-   Conformance: This property can be specified in the "EVENT", "VTODO",
-   "VJOURNAL" or "VTIMEZONE" calendar components.
-
-   Description: The property value MUST be specified in the UTC time
-   format.
-
-   Format Definition: The property is defined by the following notation:
-
-     last-mod   = "LAST-MODIFIED" lstparam ":" date-time CRLF
-
-     lstparam   = *(";" xparam)
-
-   Example: The following is are examples of this property:
-
-     LAST-MODIFIED:19960817T133000Z
-
-4.8.7.4 Sequence Number
-
-   Property Name: SEQUENCE
-
-   Purpose: This property defines the revision sequence number of the
-   calendar component within a sequence of revisions.
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 131]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Value Type: integer
-
-   Property Parameters: Non-standard property parameters can be
-   specified on this property.
-
-   Conformance: The property can be specified in "VEVENT", "VTODO" or
-   "VJOURNAL" calendar component.
-
-   Description: When a calendar component is created, its sequence
-   number is zero (US-ASCII decimal 48). It is monotonically incremented
-   by the "Organizer's" CUA each time the "Organizer" makes a
-   significant revision to the calendar component. When the "Organizer"
-   makes changes to one of the following properties, the sequence number
-   MUST be incremented:
-
-     .  "DTSTART"
-
-     .  "DTEND"
-
-     .  "DUE"
-
-     .  "RDATE"
-
-     .  "RRULE"
-
-     .  "EXDATE"
-
-     .  "EXRULE"
-
-     .  "STATUS"
-
-   In addition, changes made by the "Organizer" to other properties can
-   also force the sequence number to be incremented. The "Organizer" CUA
-   MUST increment the sequence number when ever it makes changes to
-   properties in the calendar component that the "Organizer" deems will
-   jeopardize the validity of the participation status of the
-   "Attendees". For example, changing the location of a meeting from one
-   locale to another distant locale could effectively impact the
-   participation status of the "Attendees".
-
-   The "Organizer" includes this property in an iCalendar object that it
-   sends to an "Attendee" to specify the current version of the calendar
-   component.
-
-   The "Attendee" includes this property in an iCalendar object that it
-   sends to the "Organizer" to specify the version of the calendar
-   component that the "Attendee" is referring to.
-
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 132]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   A change to the sequence number is not the mechanism that an
-   "Organizer" uses to request a response from the "Attendees". The
-   "RSVP" parameter on the "ATTENDEE" property is used by the
-   "Organizer" to indicate that a response from the "Attendees" is
-   requested.
-
-   Format Definition: This property is defined by the following
-   notation:
-
-     seq = "SEQUENCE" seqparam ":" integer CRLF
-     ; Default is "0"
-
-     seqparam   = *(";" xparam)
-
-   Example: The following is an example of this property for a calendar
-   component that was just created by the "Organizer".
-
-     SEQUENCE:0
-
-   The following is an example of this property for a calendar component
-   that has been revised two different times by the "Organizer".
-
-     SEQUENCE:2
-
-4.8.8 Miscellaneous Component Properties
-
-   The following properties specify information about a number of
-   miscellaneous features of calendar components.
-
-4.8.8.1 Non-standard Properties
-
-   Property Name: Any property name with a "X-" prefix
-
-   Purpose: This class of property provides a framework for defining
-   non-standard properties.
-
-   Value Type: TEXT
-
-   Property Parameters: Non-standard and language property parameters
-   can be specified on this property.
-
-   Conformance: This property can be specified in any calendar
-   component.
-
-   Description: The MIME Calendaring and Scheduling Content Type
-   provides a "standard mechanism for doing non-standard things". This
-   extension support is provided for implementers to "push the envelope"
-   on the existing version of the memo. Extension properties are
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 133]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   specified by property and/or property parameter names that have the
-   prefix text of "X-" (the two character sequence: LATIN CAPITAL LETTER
-   X character followed by the HYPEN-MINUS character). It is recommended
-   that vendors concatenate onto this sentinel another short prefix text
-   to identify the vendor. This will facilitate readability of the
-   extensions and minimize possible collision of names between different
-   vendors. User agents that support this content type are expected to
-   be able to parse the extension properties and property parameters but
-   can ignore them.
-
-   At present, there is no registration authority for names of extension
-   properties and property parameters. The data type for this property
-   is TEXT. Optionally, the data type can be any of the other valid data
-   types.
-
-   Format Definition: The property is defined by the following notation:
-
-     x-prop     = x-name *(";" xparam) [";" languageparam] ":" text CRLF
-        ; Lines longer than 75 octets should be folded
-
-   Example: The following might be the ABC vendor's extension for an
-   audio-clip form of subject property:
-
-     X-ABC-MMSUBJ;X-ABC-MMSUBJTYPE=wave:http://load.noise.org/mysubj.wav
-
-4.8.8.2 Request Status
-
-   Property Name: REQUEST-STATUS
-
-   Purpose: This property defines the status code returned for a
-   scheduling request.
-
-   Value Type: TEXT
-
-   Property Parameters: Non-standard and language property parameters
-   can be specified on this property.
-
-   Conformance: The property can be specified in "VEVENT", "VTODO",
-   "VJOURNAL" or "VFREEBUSY" calendar component.
-
-   Description: This property is used to return status code information
-   related to the processing of an associated iCalendar object. The data
-   type for this property is TEXT.
-
-   The value consists of a short return status component, a longer
-   return status description component, and optionally a status-specific
-   data component. The components of the value are separated by the
-   SEMICOLON character (US-ASCII decimal 59).
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 134]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   The short return status is a PERIOD character (US-ASCII decimal 46)
-   separated 3-tuple of integers. For example, "3.1.1". The successive
-   levels of integers provide for a successive level of status code
-   granularity.
-
-   The following are initial classes for the return status code.
-   Individual iCalendar object methods will define specific return
-   status codes for these classes. In addition, other classes for the
-   return status code may be defined using the registration process
-   defined later in this memo.
-
-     |==============+===============================================|
-     | Short Return | Longer Return Status Description              |
-     | Status Code  |                                               |
-     |==============+===============================================|
-     |    1.xx      | Preliminary success. This class of status     |
-     |              | of status code indicates that the request has |
-     |              | request has been initially processed but that |
-     |              | completion is pending.                        |
-     |==============+===============================================|
-     |    2.xx      | Successful. This class of status code         |
-     |              | indicates that the request was completed      |
-     |              | successfuly. However, the exact status code   |
-     |              | can indicate that a fallback has been taken.  |
-     |==============+===============================================|
-     |    3.xx      | Client Error. This class of status code       |
-     |              | indicates that the request was not successful.|
-     |              | The error is the result of either a syntax or |
-     |              | a semantic error in the client formatted      |
-     |              | request. Request should not be retried until  |
-     |              | the condition in the request is corrected.    |
-     |==============+===============================================|
-     |    4.xx      | Scheduling Error. This class of status code   |
-     |              | indicates that the request was not successful.|
-     |              | Some sort of error occurred within the        |
-     |              | calendaring and scheduling service, not       |
-     |              | directly related to the request itself.       |
-     |==============+===============================================|
-
-   Format Definition: The property is defined by the following notation:
-
-     rstatus    = "REQUEST-STATUS" rstatparam ":"
-                  statcode ";" statdesc [";" extdata]
-
-     rstatparam = *(
-
-                ; the following is optional,
-                ; but MUST NOT occur more than once
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 135]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-                (";" languageparm) /
-
-                ; the following is optional,
-                ; and MAY occur more than once
-
-                (";" xparam)
-
-                )
-
-     statcode   = 1*DIGIT *("." 1*DIGIT)
-     ;Hierarchical, numeric return status code
-
-     statdesc   = text
-     ;Textual status description
-
-     extdata    = text
-     ;Textual exception data. For example, the offending property
-     ;name and value or complete property line.
-
-   Example: The following are some possible examples of this property.
-   The COMMA and SEMICOLON separator characters in the property value
-   are BACKSLASH character escaped because they appear in a  text value.
-
-     REQUEST-STATUS:2.0;Success
-
-     REQUEST-STATUS:3.1;Invalid property value;DTSTART:96-Apr-01
-
-     REQUEST-STATUS:2.8; Success\, repeating event ignored. Scheduled
-      as a single event.;RRULE:FREQ=WEEKLY\;INTERVAL=2
-
-     REQUEST-STATUS:4.1;Event conflict. Date/time is busy.
-
-     REQUEST-STATUS:3.7;Invalid calendar user;ATTENDEE:
-      MAILTO:jsmith at host.com
-
-5 iCalendar Object Examples
-
-   The following examples are provided as an informational source of
-   illustrative iCalendar objects consistent with this content type.
-
-   The following example specifies a three-day conference that begins at
-   8:00 AM EDT, September 18, 1996 and end at 6:00 PM EDT, September 20,
-   1996.
-
-     BEGIN:VCALENDAR PRODID:-//xyz Corp//NONSGML PDA Calendar Verson
-     1.0//EN VERSION:2.0 BEGIN:VEVENT DTSTAMP:19960704T120000Z
-     UID:uid1 at host.com ORGANIZER:MAILTO:jsmith at host.com
-     DTSTART:19960918T143000Z DTEND:19960920T220000Z STATUS:CONFIRMED
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 136]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     CATEGORIES:CONFERENCE SUMMARY:Networld+Interop Conference
-     DESCRIPTION:Networld+Interop Conference
-       and Exhibit\nAtlanta World Congress Center\n
-      Atlanta, Georgia END:VEVENT END:VCALENDAR
-
-   The following example specifies a group scheduled meeting that begin
-   at 8:30 AM EST on March 12, 1998 and end at 9:30 AM EST on March 12,
-   1998. The "Organizer" has scheduled the meeting with one or more
-   calendar users in a group. A time zone specification for Eastern
-   United States has been specified.
-
-     BEGIN:VCALENDAR
-     PRODID:-//RDU Software//NONSGML HandCal//EN
-     VERSION:2.0
-     BEGIN:VTIMEZONE
-     TZID:US-Eastern
-     BEGIN:STANDARD
-     DTSTART:19981025T020000
-     RDATE:19981025T020000
-     TZOFFSETFROM:-0400
-     TZOFFSETTO:-0500
-     TZNAME:EST
-     END:STANDARD
-     BEGIN:DAYLIGHT
-     DTSTART:19990404T020000
-     RDATE:19990404T020000
-     TZOFFSETFROM:-0500
-     TZOFFSETTO:-0400
-     TZNAME:EDT
-     END:DAYLIGHT
-     END:VTIMEZONE
-     BEGIN:VEVENT
-     DTSTAMP:19980309T231000Z
-     UID:guid-1.host1.com
-     ORGANIZER;ROLE=CHAIR:MAILTO:mrbig at host.com
-     ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:
-      MAILTO:employee-A at host.com
-     DESCRIPTION:Project XYZ Review Meeting
-     CATEGORIES:MEETING
-     CLASS:PUBLIC
-     CREATED:19980309T130000Z
-     SUMMARY:XYZ Project Review
-     DTSTART;TZID=US-Eastern:19980312T083000
-     DTEND;TZID=US-Eastern:19980312T093000
-     LOCATION:1CP Conference Room 4350
-     END:VEVENT
-     END:VCALENDAR
-
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 137]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   The following is an example of an iCalendar object passed in a MIME
-   message with a single body part consisting of a "text/calendar"
-   Content Type.
-
-     TO:jsmith at host1.com
-     FROM:jdoe at host1.com
-     MIME-VERSION:1.0
-     MESSAGE-ID:<id3 at host1.com>
-     CONTENT-TYPE:text/calendar
-
-     BEGIN:VCALENDAR
-     METHOD:xyz
-     VERSION:2.0
-     PRODID:-//ABC Corporation//NONSGML My Product//EN
-     BEGIN:VEVENT
-     DTSTAMP:19970324T1200Z
-     SEQUENCE:0
-     UID:uid3 at host1.com
-     ORGANIZER:MAILTO:jdoe at host1.com
-     ATTENDEE;RSVP=TRUE:MAILTO:jsmith at host1.com
-     DTSTART:19970324T123000Z
-     DTEND:19970324T210000Z
-     CATEGORIES:MEETING,PROJECT
-     CLASS:PUBLIC
-     SUMMARY:Calendaring Interoperability Planning Meeting
-     DESCRIPTION:Discuss how we can test c&s interoperability\n
-      using iCalendar and other IETF standards.
-     LOCATION:LDB Lobby
-     ATTACH;FMTTYPE=application/postscript:ftp://xyzCorp.com/pub/
-      conf/bkgrnd.ps
-     END:VEVENT
-     END:VCALENDAR
-
-   The following is an example of a to-do due on April 15, 1998. An
-   audio alarm has been specified to remind the calendar user at noon,
-   the day before the to-do is expected to be completed and repeat
-   hourly, four additional times. The to-do definition has been modified
-   twice since it was initially created.
-
-     BEGIN:VCALENDAR
-     VERSION:2.0
-     PRODID:-//ABC Corporation//NONSGML My Product//EN
-     BEGIN:VTODO
-     DTSTAMP:19980130T134500Z
-     SEQUENCE:2
-     UID:uid4 at host1.com
-     ORGANIZER:MAILTO:unclesam at us.gov
-     ATTENDEE;PARTSTAT=ACCEPTED:MAILTO:jqpublic at host.com
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 138]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     DUE:19980415T235959
-     STATUS:NEEDS-ACTION
-     SUMMARY:Submit Income Taxes
-     BEGIN:VALARM
-     ACTION:AUDIO
-     TRIGGER:19980403T120000
-     ATTACH;FMTTYPE=audio/basic:http://host.com/pub/audio-
-      files/ssbanner.aud
-     REPEAT:4
-     DURATION:PT1H
-     END:VALARM
-     END:VTODO
-     END:VCALENDAR
-
-   The following is an example of a journal entry.
-
-     BEGIN:VCALENDAR
-     VERSION:2.0
-     PRODID:-//ABC Corporation//NONSGML My Product//EN
-     BEGIN:VJOURNAL
-     DTSTAMP:19970324T120000Z
-     UID:uid5 at host1.com
-     ORGANIZER:MAILTO:jsmith at host.com
-     STATUS:DRAFT
-     CLASS:PUBLIC
-     CATEGORY:Project Report, XYZ, Weekly Meeting
-     DESCRIPTION:Project xyz Review Meeting Minutes\n
-      Agenda\n1. Review of project version 1.0 requirements.\n2.
-     Definition
-      of project processes.\n3. Review of project schedule.\n
-      Participants: John Smith, Jane Doe, Jim Dandy\n-It was
-       decided that the requirements need to be signed off by
-       product marketing.\n-Project processes were accepted.\n
-      -Project schedule needs to account for scheduled holidays
-       and employee vacation time. Check with HR for specific
-       dates.\n-New schedule will be distributed by Friday.\n-
-      Next weeks meeting is cancelled. No meeting until 3/23.
-     END:VJOURNAL
-     END:VCALENDAR
-
-   The following is an example of published busy time information. The
-   iCalendar object might be placed in the network resource
-   www.host.com/calendar/busytime/jsmith.ifb.
-
-     BEGIN:VCALENDAR
-     VERSION:2.0
-     PRODID:-//RDU Software//NONSGML HandCal//EN
-     BEGIN:VFREEBUSY
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 139]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-     ORGANIZER:MAILTO:jsmith at host.com
-     DTSTART:19980313T141711Z
-     DTEND:19980410T141711Z
-     FREEBUSY:19980314T233000Z/19980315T003000Z
-     FREEBUSY:19980316T153000Z/19980316T163000Z
-     FREEBUSY:19980318T030000Z/19980318T040000Z
-     URL:http://www.host.com/calendar/busytime/jsmith.ifb
-     END:VFREEBUSY
-     END:VCALENDAR
-
-6 Recommended Practices
-
-   These recommended practices should be followed in order to assure
-   consistent handling of the following cases for an iCalendar object.
-
-   1.  Content lines longer than 75 octets SHOULD be folded.
-
-   2.  A calendar entry with a "DTSTART" property but no "DTEND"
-       property does not take up any time. It is intended to represent
-       an event that is associated with a given calendar date and time
-       of day, such as an anniversary. Since the event does not take up
-       any time, it MUST NOT be used to record busy time no matter what
-       the value for the "TRANSP" property.
-
-   3.  When the "DTSTART" and "DTEND", for "VEVENT", "VJOURNAL" and
-       "VFREEBUSY" calendar components, and "DTSTART" and "DUE", for
-       "VTODO" calendar components, have the same value data type (e.g.,
-       DATE-TIME), they SHOULD specify values in the same time format
-       (e.g., UTC time format).
-
-   4.  When the combination of the "RRULE" and "RDATE" properties on an
-       iCalendar object produces multiple instances having the same
-       start date/time, they should be collapsed to, and considered as,
-       a single instance.
-
-   5.  When a calendar user receives multiple requests for the same
-       calendar component (e.g., REQUEST for a "VEVENT" calendar
-       component) as a result of being on multiple mailing lists
-       specified by "ATTENDEE" properties in the request, they SHOULD
-       respond to only one of the requests. The calendar user SHOULD
-       also specify (using the "MEMBER" parameter of the "ATTENDEE"
-       property) which mailing list they are a member of.
-
-   6.  An implementation can truncate a "SUMMARY" property value to 255
-       characters.
-
-
-
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 140]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   7.  If seconds of the minute are not supported by an implementation,
-       then a value of "00" SHOULD be specified for the seconds
-       component in a time value.
-
-   8.  If the value type parameter (VALUE=) contains an unknown value
-       type, it SHOULD be treated as TEXT.
-
-   9.  TZURL values SHOULD NOT be specified as a FILE URI type. This URI
-       form can be useful within an organization, but is problematic in
-       the Internet.
-
-   10.  Some possible English values for CATEGORIES property include
-        "ANNIVERSARY", "APPOINTMENT", "BUSINESS", "EDUCATION",
-        "HOLIDAY", "MEETING", "MISCELLANEOUS", "NON-WORKING HOURS", "NOT
-        IN OFFICE", "PERSONAL", "PHONE CALL", "SICK DAY", "SPECIAL
-        OCCASION", "TRAVEL", "VACATION". Categories can be specified in
-        any registered language.
-
-   11.  Some possible English values for RESOURCES property include
-        "CATERING", "CHAIRS", "COMPUTER PROJECTOR", "EASEL", "OVERHEAD
-        PROJECTOR", "SPEAKER PHONE", "TABLE", "TV", "VCR", "VIDEO
-        PHONE", "VEHICLE". Resources can be specified in any registered
-        language.
-
-7 Registration of Content Type Elements
-
-   This section provides the process for registration of MIME
-   Calendaring and Scheduling Content Type iCalendar object methods and
-   new or modified properties.
-
-7.1 Registration of New and Modified iCalendar Object Methods
-
-   New MIME Calendaring and Scheduling Content Type iCalendar object
-   methods are registered by the publication of an IETF Request for
-   Comments (RFC). Changes to an iCalendar object method are registered
-   by the publication of a revision of the RFC defining the method.
-
-7.2 Registration of New Properties
-
-   This section defines procedures by which new properties or enumerated
-   property values for the MIME Calendaring and Scheduling Content Type
-   can be registered with the IANA. Non-IANA properties can be used by
-   bilateral agreement, provided the associated properties names follow
-   the "X-" convention.
-
-   The procedures defined here are designed to allow public comment and
-   review of new properties, while posing only a small impediment to the
-   definition of new properties.
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 141]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Registration of a new property is accomplished by the following
-   steps.
-
-7.2.1 Define the property
-
-   A property is defined by completing the following template.
-
-     To: ietf-calendar at imc.org
-
-     Subject: Registration of text/calendar MIME property XXX
-
-     Property name:
-
-     Property purpose:
-
-     Property value type(s):
-
-     Property parameter (s):
-
-     Conformance:
-
-     Description:
-
-     Format definition:
-
-     Examples:
-
-   The meaning of each field in the template is as follows.
-
-   Property name: The name of the property, as it will appear in the
-   body of an text/calendar MIME Content-Type "property: value" line to
-   the left of the colon ":".
-
-   Property purpose: The purpose of the property (e.g., to indicate a
-   delegate for the event or to-do, etc.). Give a short but clear
-   description.
-
-   Property value type (s): Any of the valid value types for the
-   property value needs to be specified. The default value type also
-   needs to be specified. If a new value type is specified, it needs to
-   be declared in this section.
-
-   Property parameter (s): Any of the valid property parameters for the
-   property needs to be specified.
-
-   Conformance: The calendar components that the property can appear in
-   needs to be specified.
-
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 142]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Description: Any special notes about the property, how it is to be
-   used, etc.
-
-   Format definition: The ABNF for the property definition needs to be
-   specified.
-
-   Examples: One or more examples of instances of the property needs to
-   be specified.
-
-7.2.2 Post the Property definition
-
-   The property description MUST be posted to the new property
-   discussion list, ietf-calendar at imc.org.
-
-7.2.3   Allow a comment period
-
-   Discussion on the new property MUST be allowed to take place on the
-   list for a minimum of two weeks. Consensus MUST be reached on the
-   property before proceeding to the next step.
-
-7.2.4 Submit the property for approval
-
-   Once the two-week comment period has elapsed, and the proposer is
-   convinced consensus has been reached on the property, the
-   registration application should be submitted to the Method Reviewer
-   for approval. The Method Reviewer is appointed to the Application
-   Area Directors and can either accept or reject the property
-   registration. An accepted registration should be passed on by the
-   Method Reviewer to the IANA for inclusion in the official IANA method
-   registry. The registration can be rejected for any of the following
-   reasons. 1) Insufficient comment period; 2) Consensus not reached; 3)
-   Technical deficiencies raised on the list or elsewhere have not been
-   addressed. The Method Reviewer's decision to reject a property can be
-   appealed by the proposer to the IESG, or the objections raised can be
-   addressed by the proposer and the property resubmitted.
-
-7.3 Property Change Control
-
-   Existing properties can be changed using the same process by which
-   they were registered.
-
-        1.           Define the change
-
-        2.           Post the change
-
-        3.           Allow a comment period
-
-        4.           Submit the property for approval
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 143]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   Note that the original author or any other interested party can
-   propose a change to an existing property, but that such changes
-   should only be proposed when there are serious omissions or errors in
-   the published memo. The Method Reviewer can object to a change if it
-   is not backward compatible, but is not required to do so.
-
-   Property definitions can never be deleted from the IANA registry, but
-   properties which are no longer believed to be useful can be declared
-   OBSOLETE by a change to their "intended use" field.
-
-8 References
-
-   [IMIP]     Dawson, F., Mansour, S. and S. Silverberg, "iCalendar
-              Message-based Interoperability Protocol (IMIP)", RFC 2447,
-              November 1998.
-
-   [ITIP]     Silverberg, S., Mansour, S., Dawson, F. and R. Hopson,
-              "iCalendar Transport-Independent Interoperability Protocol
-              (iTIP) : Scheduling Events, Busy Time, To-dos and Journal
-              Entries", RFC 2446, November 1998.
-
-   [ISO 8601] ISO 8601, "Data elements and interchange formats-
-              Information interchange--Representation of dates and
-              times", International Organization for Standardization,
-              June, 1988.
-
-   [ISO 9070] ISO/IEC 9070, "Information Technology_SGML Support
-              Facilities--Registration Procedures for Public Text Owner
-              Identifiers", Second Edition, International Organization
-              for Standardization, April 1991.
-
-   [RFC 822]  Crocker, D., "Standard for the Format of ARPA Internet
-              Text Messages", STD 11, RFC 822, August 1982.
-
-   [RFC 1738] Berners-Lee, T., Masinter, L. and M. McCahill, "Uniform
-              Resource Locators (URL)", RFC 1738, December 1994.
-
-   [RFC 1766] Alvestrand, H., "Tags for the Identification of
-              Languages", RFC 1766, March 1995.
-
-   [RFC 2045] Freed, N. and N. Borenstein, " Multipurpose Internet Mail
-              Extensions (MIME) - Part One: Format of Internet Message
-              Bodies", RFC 2045, November 1996.
-
-   [RFC 2046] Freed, N. and N. Borenstein, " Multipurpose Internet Mail
-              Extensions (MIME) - Part Two: Media Types", RFC 2046,
-              November 1996.
-
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 144]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   [RFC 2048] Freed, N., Klensin, J. and J. Postel, "Multipurpose
-              Internet Mail Extensions (MIME) - Part Four: Registration
-              Procedures", RFC 2048, January 1997.
-
-   [RFC 2119] Bradner, S., "Key words for use in RFCs to Indicate
-              Requirement Levels", BCP 14, RFC 2119, March 1997.
-
-   [RFC 2234] Crocker, D. and P. Overell, "Augmented BNF for Syntax
-              Specifications: ABNF", RFC 2234, November 1997.
-
-   [RFC 2279] Yergeau, F., "UTF-8, a transformation format of ISO
-              10646", RFC 2279, January 1998.
-
-   [RFC 2425] Howes, T., Smith, M. and F. Dawson, "A MIME Content-Type
-              for Directory Information", RFC 2425, September 1998.
-
-   [RFC 2426] Dawson, F. and T. Howes, "vCard MIME Directory Profile",
-              RFC 2426, September 1998.
-
-   [TZ]       Olson, A.D., et al, Time zone code and data,
-              ftp://elsie.nci.nih.gov/pub/, updated periodically.
-
-   [VCAL]     Internet Mail Consortium, "vCalendar - The Electronic
-              Calendaring and Scheduling Exchange Format",
-              http://www.imc.org/pdi/vcal-10.txt, September 18, 1996.
-
-9 Acknowledgments
-
-   A hearty thanks to the IETF Calendaring and Scheduling Working Group
-   and also the following individuals who have participated in the
-   drafting, review and discussion of this memo:
-
-   Roland Alden, Harald T. Alvestrand, Eric Berman, Denis Bigorgne, John
-   Binici, Bill Bliss, Philippe Boucher, Steve Carter, Andre
-   Courtemanche, Dave Crocker, David Curley, Alec Dun, John Evans, Ross
-   Finlayson, Randell Flint, Ned Freed, Patrik Faltstrom, Chuck
-   Grandgent, Mark Handley, Steve Hanna, Paul B. Hill, Paul Hoffman,
-   Ross Hopson, Mark Horton, Daryl Huff, Bruce Kahn, C. Harald Koch,
-   Ryan Jansen, Don Lavange, Antoine Leca, Theodore Lorek, Steve
-   Mansour, Skip Montanaro, Keith Moore, Cecil Murray, Chris Newman,
-   John Noerenberg, Ralph Patterson, Pete Resnick, Keith Rhodes, Robert
-   Ripberger, John Rose, Doug Royer, Andras Salamar, Ted Schuh, Vinod
-   Seraphin, Derrick Shadel, Ken Shan, Andrew Shuman, Steve Silverberg,
-   William P. Spencer, John Sun, Mark Towfiq, Yvonne Tso, Robert Visnov,
-   James L. Weiner, Mike Weston, William Wyatt.
-
-
-
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 145]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-10 Authors' and Chairs' Addresses
-
-   The following address information is provided in a MIME-VCARD,
-   Electronic Business Card, format.
-
-   The authors of this memo are:
-
-   BEGIN:VCARD
-   VERSION:3.0
-   N:Dawson;Frank
-   FN:Frank Dawson
-   ORG:Lotus Development Corporation
-   ADR;TYPE=WORK,POSTAL,PARCEL:;;6544 Battleford Drive;
-    Raleigh;NC;27613-3502;USA
-   TEL;TYPE=WORK,MSG:+1-919-676-9515
-   TEL;TYPE=WORK,FAX:+1-919-676-9564
-   EMAIL;TYPE=PREF,INTERNET:Frank_Dawson at Lotus.com
-   EMAIL;TYPE=INTERNET:fdawson at earthlink.net
-   URL:http://home.earthlink.net/~fdawson
-   END:VCARD
-
-   BEGIN:VCARD
-   VERSION:3.0
-   N:Stenerson;Derik
-   FN:Derik Stenerson
-   ORG:Microsoft Corporation
-   ADR;TYPE=WORK,POSTAL,PARCEL:;;One Microsoft Way;
-    Redmond;WA;98052-6399;USA
-   TEL;TYPE=WORK,MSG:+1-425-936-5522
-   TEL;TYPE=WORK,FAX:+1-425-936-7329
-   EMAIL;TYPE=INTERNET:deriks at Microsoft.com
-   END:VCARD
-
-   The iCalendar object is a result of the work of the Internet
-   Engineering Task Force Calendaring and Scheduling Working Group. The
-   chairmen of that working group are:
-
-   BEGIN:VCARD
-   VERSION:3.0
-   N:Ganguly;Anik
-   FN:Anik Ganguly
-   ORG: Open Text Inc.
-   ADR;TYPE=WORK,POSTAL,PARCEL:;Suite 101;38777 West Six Mile Road;
-    Livonia;MI;48152;USA
-   TEL;TYPE=WORK,MSG:+1-734-542-5955
-   EMAIL;TYPE=INTERNET:ganguly at acm.org
-   END:VCARD
-
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 146]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-   The co-chairman of that working group is:
-
-   BEGIN:VCARD
-   VERSION:3.0
-   N:Moskowitz;Robert
-   FN:Robert Moskowitz
-   EMAIL;TYPE=INTERNET:rgm-ietf at htt-consult.com
-   END:VCARD
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 147]
-
-RFC 2445                       iCalendar                   November 1998
-
-
-11.  Full Copyright Statement
-
-   Copyright (C) The Internet Society (1998).  All Rights Reserved.
-
-   This document and translations of it may be copied and furnished to
-   others, and derivative works that comment on or otherwise explain it
-   or assist in its implementation may be prepared, copied, published
-   and distributed, in whole or in part, without restriction of any
-   kind, provided that the above copyright notice and this paragraph are
-   included on all such copies and derivative works.  However, this
-   document itself may not be modified in any way, such as by removing
-   the copyright notice or references to the Internet Society or other
-   Internet organizations, except as needed for the purpose of
-   developing Internet standards in which case the procedures for
-   copyrights defined in the Internet Standards process must be
-   followed, or as required to translate it into languages other than
-   English.
-
-   The limited permissions granted above are perpetual and will not be
-   revoked by the Internet Society or its successors or assigns.
-
-   This document and the information contained herein is provided on an
-   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
-   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
-   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
-   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
-   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Dawson & Stenerson          Standards Track                   [Page 148]
-

Copied: CalendarServer/branches/users/cdaboo/partition-4464/doc/RFC/rfc5545-iCalendar.txt (from rev 4858, CalendarServer/trunk/doc/RFC/rfc5545-iCalendar.txt)
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/doc/RFC/rfc5545-iCalendar.txt	                        (rev 0)
+++ CalendarServer/branches/users/cdaboo/partition-4464/doc/RFC/rfc5545-iCalendar.txt	2009-12-16 02:48:38 UTC (rev 4865)
@@ -0,0 +1,9411 @@
+
+
+
+
+
+
+Network Working Group                               B. Desruisseaux, Ed.
+Request for Comments: 5545                                        Oracle
+Obsoletes: 2445                                           September 2009
+Category: Standards Track
+
+
+     Internet Calendaring and Scheduling Core Object Specification
+                              (iCalendar)
+
+Abstract
+
+This document defines the iCalendar data format for representing and
+exchanging calendaring and scheduling information such as events,
+to-dos, journal entries, and free/busy information, independent of any
+particular calendar service or protocol.
+
+Status of This Memo
+
+   This document specifies an Internet standards track protocol for the
+   Internet community, and requests discussion and suggestions for
+   improvements.  Please refer to the current edition of the "Internet
+   Official Protocol Standards" (STD 1) for the standardization state
+   and status of this protocol.  Distribution of this memo is unlimited.
+
+Copyright and License Notice
+
+   Copyright (c) 2009 IETF Trust and the persons identified as the
+   document authors.  All rights reserved.
+
+   This document is subject to BCP 78 and the IETF Trust's Legal
+   Provisions Relating to IETF Documents
+   (http://trustee.ietf.org/license-info) in effect on the date of
+   publication of this document.  Please review these documents
+   carefully, as they describe your rights and restrictions with respect
+   to this document.  Code Components extracted from this document must
+   include Simplified BSD License text as described in Section 4.e of
+   the Trust Legal Provisions and are provided without warranty as
+   described in the BSD License.
+
+   This document may contain material from IETF Documents or IETF
+   Contributions published or made publicly available before November
+   10, 2008.  The person(s) controlling the copyright in some of this
+   material may not have granted the IETF Trust the right to allow
+   modifications of such material outside the IETF Standards Process.
+   Without obtaining an adequate license from the person(s) controlling
+   the copyright in such materials, this document may not be modified
+   outside the IETF Standards Process, and derivative works of it may
+   not be created outside the IETF Standards Process, except to format
+
+
+
+Desruisseaux                Standards Track                     [Page 1]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   it for publication as an RFC or to translate it into languages other
+   than English.
+
+Table of Contents
+
+   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   5
+   2.  Basic Grammar and Conventions . . . . . . . . . . . . . . . .   6
+     2.1.  Formatting Conventions  . . . . . . . . . . . . . . . . .   6
+     2.2.  Related Memos . . . . . . . . . . . . . . . . . . . . . .   7
+   3.  iCalendar Object Specification  . . . . . . . . . . . . . . .   8
+     3.1.  Content Lines . . . . . . . . . . . . . . . . . . . . . .   8
+       3.1.1.  List and Field Separators . . . . . . . . . . . . . .  11
+       3.1.2.  Multiple Values . . . . . . . . . . . . . . . . . . .  11
+       3.1.3.  Binary Content  . . . . . . . . . . . . . . . . . . .  11
+       3.1.4.  Character Set . . . . . . . . . . . . . . . . . . . .  12
+     3.2.  Property Parameters . . . . . . . . . . . . . . . . . . .  12
+       3.2.1.  Alternate Text Representation . . . . . . . . . . . .  13
+       3.2.2.  Common Name . . . . . . . . . . . . . . . . . . . . .  15
+       3.2.3.  Calendar User Type  . . . . . . . . . . . . . . . . .  15
+       3.2.4.  Delegators  . . . . . . . . . . . . . . . . . . . . .  16
+       3.2.5.  Delegatees  . . . . . . . . . . . . . . . . . . . . .  16
+       3.2.6.  Directory Entry Reference . . . . . . . . . . . . . .  17
+       3.2.7.  Inline Encoding . . . . . . . . . . . . . . . . . . .  17
+       3.2.8.  Format Type . . . . . . . . . . . . . . . . . . . . .  18
+       3.2.9.  Free/Busy Time Type . . . . . . . . . . . . . . . . .  19
+       3.2.10. Language  . . . . . . . . . . . . . . . . . . . . . .  20
+       3.2.11. Group or List Membership  . . . . . . . . . . . . . .  20
+       3.2.12. Participation Status  . . . . . . . . . . . . . . . .  21
+       3.2.13. Recurrence Identifier Range . . . . . . . . . . . . .  22
+       3.2.14. Alarm Trigger Relationship  . . . . . . . . . . . . .  23
+       3.2.15. Relationship Type . . . . . . . . . . . . . . . . . .  24
+       3.2.16. Participation Role  . . . . . . . . . . . . . . . . .  25
+       3.2.17. RSVP Expectation  . . . . . . . . . . . . . . . . . .  25
+       3.2.18. Sent By . . . . . . . . . . . . . . . . . . . . . . .  26
+       3.2.19. Time Zone Identifier  . . . . . . . . . . . . . . . .  26
+       3.2.20. Value Data Types  . . . . . . . . . . . . . . . . . .  28
+     3.3.  Property Value Data Types . . . . . . . . . . . . . . . .  29
+       3.3.1.  Binary  . . . . . . . . . . . . . . . . . . . . . . .  29
+       3.3.2.  Boolean . . . . . . . . . . . . . . . . . . . . . . .  30
+       3.3.3.  Calendar User Address . . . . . . . . . . . . . . . .  30
+       3.3.4.  Date  . . . . . . . . . . . . . . . . . . . . . . . .  31
+       3.3.5.  Date-Time . . . . . . . . . . . . . . . . . . . . . .  31
+       3.3.6.  Duration  . . . . . . . . . . . . . . . . . . . . . .  34
+       3.3.7.  Float . . . . . . . . . . . . . . . . . . . . . . . .  35
+       3.3.8.  Integer . . . . . . . . . . . . . . . . . . . . . . .  35
+       3.3.9.  Period of Time  . . . . . . . . . . . . . . . . . . .  36
+       3.3.10. Recurrence Rule . . . . . . . . . . . . . . . . . . .  37
+       3.3.11. Text  . . . . . . . . . . . . . . . . . . . . . . . .  45
+
+
+
+Desruisseaux                Standards Track                     [Page 2]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+       3.3.12. Time  . . . . . . . . . . . . . . . . . . . . . . . .  46
+       3.3.13. URI . . . . . . . . . . . . . . . . . . . . . . . . .  48
+       3.3.14. UTC Offset  . . . . . . . . . . . . . . . . . . . . .  49
+     3.4.  iCalendar Object  . . . . . . . . . . . . . . . . . . . .  49
+     3.5.  Property  . . . . . . . . . . . . . . . . . . . . . . . .  50
+     3.6.  Calendar Components . . . . . . . . . . . . . . . . . . .  50
+       3.6.1.  Event Component . . . . . . . . . . . . . . . . . . .  52
+       3.6.2.  To-Do Component . . . . . . . . . . . . . . . . . . .  56
+       3.6.3.  Journal Component . . . . . . . . . . . . . . . . . .  58
+       3.6.4.  Free/Busy Component . . . . . . . . . . . . . . . . .  60
+       3.6.5.  Time Zone Component . . . . . . . . . . . . . . . . .  63
+       3.6.6.  Alarm Component . . . . . . . . . . . . . . . . . . .  72
+     3.7.  Calendar Properties . . . . . . . . . . . . . . . . . . .  77
+       3.7.1.  Calendar Scale  . . . . . . . . . . . . . . . . . . .  77
+       3.7.2.  Method  . . . . . . . . . . . . . . . . . . . . . . .  78
+       3.7.3.  Product Identifier  . . . . . . . . . . . . . . . . .  79
+       3.7.4.  Version . . . . . . . . . . . . . . . . . . . . . . .  80
+     3.8.  Component Properties  . . . . . . . . . . . . . . . . . .  81
+       3.8.1.  Descriptive Component Properties  . . . . . . . . . .  81
+         3.8.1.1.  Attachment  . . . . . . . . . . . . . . . . . . .  81
+         3.8.1.2.  Categories  . . . . . . . . . . . . . . . . . . .  82
+         3.8.1.3.  Classification  . . . . . . . . . . . . . . . . .  83
+         3.8.1.4.  Comment . . . . . . . . . . . . . . . . . . . . .  84
+         3.8.1.5.  Description . . . . . . . . . . . . . . . . . . .  85
+         3.8.1.6.  Geographic Position . . . . . . . . . . . . . . .  87
+         3.8.1.7.  Location  . . . . . . . . . . . . . . . . . . . .  88
+         3.8.1.8.  Percent Complete  . . . . . . . . . . . . . . . .  89
+         3.8.1.9.  Priority  . . . . . . . . . . . . . . . . . . . .  90
+         3.8.1.10. Resources . . . . . . . . . . . . . . . . . . . .  92
+         3.8.1.11. Status  . . . . . . . . . . . . . . . . . . . . .  93
+         3.8.1.12. Summary . . . . . . . . . . . . . . . . . . . . .  94
+       3.8.2.  Date and Time Component Properties  . . . . . . . . .  95
+         3.8.2.1.  Date-Time Completed . . . . . . . . . . . . . . .  95
+         3.8.2.2.  Date-Time End . . . . . . . . . . . . . . . . . .  96
+         3.8.2.3.  Date-Time Due . . . . . . . . . . . . . . . . . .  97
+         3.8.2.4.  Date-Time Start . . . . . . . . . . . . . . . . .  99
+         3.8.2.5.  Duration  . . . . . . . . . . . . . . . . . . . . 100
+         3.8.2.6.  Free/Busy Time  . . . . . . . . . . . . . . . . . 101
+         3.8.2.7.  Time Transparency . . . . . . . . . . . . . . . . 102
+       3.8.3.  Time Zone Component Properties  . . . . . . . . . . . 103
+         3.8.3.1.  Time Zone Identifier  . . . . . . . . . . . . . . 103
+         3.8.3.2.  Time Zone Name  . . . . . . . . . . . . . . . . . 105
+         3.8.3.3.  Time Zone Offset From . . . . . . . . . . . . . . 106
+         3.8.3.4.  Time Zone Offset To . . . . . . . . . . . . . . . 106
+         3.8.3.5.  Time Zone URL . . . . . . . . . . . . . . . . . . 107
+       3.8.4.  Relationship Component Properties . . . . . . . . . . 108
+         3.8.4.1.  Attendee  . . . . . . . . . . . . . . . . . . . . 108
+         3.8.4.2.  Contact . . . . . . . . . . . . . . . . . . . . . 111
+
+
+
+Desruisseaux                Standards Track                     [Page 3]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+         3.8.4.3.  Organizer . . . . . . . . . . . . . . . . . . . . 113
+         3.8.4.4.  Recurrence ID . . . . . . . . . . . . . . . . . . 114
+         3.8.4.5.  Related To  . . . . . . . . . . . . . . . . . . . 117
+         3.8.4.6.  Uniform Resource Locator  . . . . . . . . . . . . 118
+         3.8.4.7.  Unique Identifier . . . . . . . . . . . . . . . . 119
+       3.8.5.  Recurrence Component Properties . . . . . . . . . . . 120
+         3.8.5.1.  Exception Date-Times  . . . . . . . . . . . . . . 120
+         3.8.5.2.  Recurrence Date-Times . . . . . . . . . . . . . . 122
+         3.8.5.3.  Recurrence Rule . . . . . . . . . . . . . . . . . 124
+       3.8.6.  Alarm Component Properties  . . . . . . . . . . . . . 134
+         3.8.6.1.  Action  . . . . . . . . . . . . . . . . . . . . . 134
+         3.8.6.2.  Repeat Count  . . . . . . . . . . . . . . . . . . 135
+         3.8.6.3.  Trigger . . . . . . . . . . . . . . . . . . . . . 135
+       3.8.7.  Change Management Component Properties  . . . . . . . 138
+         3.8.7.1.  Date-Time Created . . . . . . . . . . . . . . . . 138
+         3.8.7.2.  Date-Time Stamp . . . . . . . . . . . . . . . . . 139
+         3.8.7.3.  Last Modified . . . . . . . . . . . . . . . . . . 140
+         3.8.7.4.  Sequence Number . . . . . . . . . . . . . . . . . 141
+       3.8.8.  Miscellaneous Component Properties  . . . . . . . . . 142
+         3.8.8.1.  IANA Properties . . . . . . . . . . . . . . . . . 142
+         3.8.8.2.  Non-Standard Properties . . . . . . . . . . . . . 142
+         3.8.8.3.  Request Status  . . . . . . . . . . . . . . . . . 144
+   4.  iCalendar Object Examples . . . . . . . . . . . . . . . . . . 146
+   5.  Recommended Practices . . . . . . . . . . . . . . . . . . . . 150
+   6.  Internationalization Considerations . . . . . . . . . . . . . 151
+   7.  Security Considerations . . . . . . . . . . . . . . . . . . . 151
+   8.  IANA Considerations . . . . . . . . . . . . . . . . . . . . . 151
+     8.1.  iCalendar Media Type Registration . . . . . . . . . . . . 151
+     8.2.  New iCalendar Elements Registration . . . . . . . . . . . 155
+       8.2.1.  iCalendar Elements Registration Procedure . . . . . . 155
+       8.2.2.  Registration Template for Components  . . . . . . . . 155
+       8.2.3.  Registration Template for Properties  . . . . . . . . 156
+       8.2.4.  Registration Template for Parameters  . . . . . . . . 156
+       8.2.5.  Registration Template for Value Data Types  . . . . . 157
+       8.2.6.  Registration Template for Values  . . . . . . . . . . 157
+     8.3.  Initial iCalendar Elements Registries . . . . . . . . . . 158
+       8.3.1.  Components Registry . . . . . . . . . . . . . . . . . 158
+       8.3.2.  Properties Registry . . . . . . . . . . . . . . . . . 158
+       8.3.3.  Parameters Registry . . . . . . . . . . . . . . . . . 161
+       8.3.4.  Value Data Types Registry . . . . . . . . . . . . . . 162
+       8.3.5.  Calendar User Types Registry  . . . . . . . . . . . . 162
+       8.3.6.  Free/Busy Time Types Registry . . . . . . . . . . . . 163
+       8.3.7.  Participation Statuses Registry . . . . . . . . . . . 163
+       8.3.8.  Relationship Types Registry . . . . . . . . . . . . . 164
+       8.3.9.  Participation Roles Registry  . . . . . . . . . . . . 164
+       8.3.10. Actions Registry  . . . . . . . . . . . . . . . . . . 165
+       8.3.11. Classifications Registry  . . . . . . . . . . . . . . 165
+       8.3.12. Methods Registry  . . . . . . . . . . . . . . . . . . 165
+
+
+
+Desruisseaux                Standards Track                     [Page 4]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   9.  Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 165
+   10. References  . . . . . . . . . . . . . . . . . . . . . . . . . 166
+     10.1. Normative References  . . . . . . . . . . . . . . . . . . 166
+     10.2. Informative References  . . . . . . . . . . . . . . . . . 167
+   Appendix A.  Differences from RFC 2445  . . . . . . . . . . . . . 169
+     A.1.  New Restrictions  . . . . . . . . . . . . . . . . . . . . 169
+     A.2.  Restrictions Removed  . . . . . . . . . . . . . . . . . . 169
+     A.3.  Deprecated Features . . . . . . . . . . . . . . . . . . . 169
+
+1.  Introduction
+
+   The use of calendaring and scheduling has grown considerably in the
+   last decade.  Enterprise and inter-enterprise business has become
+   dependent on rapid scheduling of events and actions using this
+   information technology.  This memo is intended to progress the level
+   of interoperability possible between dissimilar calendaring and
+   scheduling applications.  This memo defines a MIME content type for
+   exchanging electronic calendaring and scheduling information.  The
+   Internet Calendaring and Scheduling Core Object Specification, or
+   iCalendar, allows for the capture and exchange of information
+   normally stored within a calendaring and scheduling application; such
+   as a Personal Information Manager (PIM) or a Group-Scheduling
+   product.
+
+   The iCalendar format is suitable as an exchange format between
+   applications or systems.  The format is defined in terms of a MIME
+   content type.  This will enable the object to be exchanged using
+   several transports, including but not limited to SMTP, HTTP, a file
+   system, desktop interactive protocols such as the use of a memory-
+   based clipboard or drag/drop interactions, point-to-point
+   asynchronous communication, wired-network transport, or some form of
+   unwired transport such as infrared.
+
+   The memo also provides for the definition of iCalendar object methods
+   that will map this content type to a set of messages for supporting
+   calendaring and scheduling operations such as requesting, replying
+   to, modifying, and canceling meetings or appointments, to-dos, and
+   journal entries.  The iCalendar object methods can be used to define
+   other calendaring and scheduling operations such as requesting for
+   and replying with free/busy time data.  Such a scheduling protocol is
+   defined in the iCalendar Transport-independent Interoperability
+   Protocol (iTIP) defined in [2446bis].
+
+   The memo also includes a formal grammar for the content type based on
+   the Internet ABNF defined in [RFC5234].  This ABNF is required for
+   the implementation of parsers and to serve as the definitive
+   reference when ambiguities or questions arise in interpreting the
+   descriptive prose definition of the memo.  Additional restrictions
+
+
+
+Desruisseaux                Standards Track                     [Page 5]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   that could not easily be expressed with the ABNF syntax are specified
+   as comments in the ABNF.  Comments with normative statements should
+   be treated as such.
+
+2.  Basic Grammar and Conventions
+
+   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
+   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
+   document are to be interpreted as described in [RFC2119].
+
+   This memo makes use of both a descriptive prose and a more formal
+   notation for defining the calendaring and scheduling format.
+
+   The notation used in this memo is the ABNF notation of [RFC5234].
+   Readers intending on implementing the format defined in this memo
+   should be familiar with this notation in order to properly interpret
+   the specifications of this memo.
+
+   All numeric values used in this memo are given in decimal notation.
+
+   All names of properties, property parameters, enumerated property
+   values, and property parameter values are case-insensitive.  However,
+   all other property values are case-sensitive, unless otherwise
+   stated.
+
+      Note: All indented editorial notes, such as this one, are intended
+      to provide the reader with additional information.  The
+      information is not essential to the building of an implementation
+      conformant with this memo.  The information is provided to
+      highlight a particular feature or characteristic of the memo.
+
+   The format for the iCalendar object is based on the syntax of the
+   text/directory media type [RFC2425].  While the iCalendar object is
+   not a profile of the text/directory media type [RFC2425], it does
+   reuse a number of the elements from the [RFC2425] specification.
+
+2.1.  Formatting Conventions
+
+   The elements defined in this memo are defined in prose.  Many of the
+   terms used to describe these have common usage that is different than
+   the standards usage of this memo.  In order to reference, within this
+   memo, elements of the calendaring and scheduling model, core object
+   (this memo), or interoperability protocol [2446bis] some formatting
+   conventions have been used.  Calendaring and scheduling roles are
+   referred to in quoted-strings of text with the first character of
+   each word in uppercase.  For example, "Organizer" refers to a role of
+   a "Calendar User" within the scheduling protocol defined by
+   [2446bis].  Calendar components defined by this memo are referred to
+
+
+
+Desruisseaux                Standards Track                     [Page 6]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   with capitalized, quoted-strings of text.  All calendar components
+   start with the letter "V".  For example, "VEVENT" refers to the event
+   calendar component, "VTODO" refers to the to-do calendar component,
+   and "VJOURNAL" refers to the daily journal calendar component.
+   Scheduling methods defined by iTIP [2446bis] are referred to with
+   capitalized, quoted-strings of text.  For example, "REQUEST" refers
+   to the method for requesting a scheduling calendar component be
+   created or modified, and "REPLY" refers to the method a recipient of
+   a request uses to update their status with the "Organizer" of the
+   calendar component.
+
+   The properties defined by this memo are referred to with capitalized,
+   quoted-strings of text, followed by the word "property".  For
+   example, "ATTENDEE" property refers to the iCalendar property used to
+   convey the calendar address of a calendar user.  Property parameters
+   defined by this memo are referred to with lowercase, quoted-strings
+   of text, followed by the word "parameter".  For example, "value"
+   parameter refers to the iCalendar property parameter used to override
+   the default value type for a property value.  Enumerated values
+   defined by this memo are referred to with capitalized text, either
+   alone or followed by the word "value".  For example, the "MINUTELY"
+   value can be used with the "FREQ" component of the "RECUR" value type
+   to specify repeating components based on an interval of one minute or
+   more.
+
+   The following table lists the different characters from the
+   [US-ASCII] character set that is referenced in this document.  For
+   each character, the table specifies the character name used
+   throughout this document, along with its US-ASCII decimal codepoint.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                     [Page 7]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+              +------------------------+-------------------+
+              | Character name         | Decimal codepoint |
+              +------------------------+-------------------+
+              | HTAB                   | 9                 |
+              | LF                     | 10                |
+              | CR                     | 13                |
+              | DQUOTE                 | 22                |
+              | SPACE                  | 32                |
+              | PLUS SIGN              | 43                |
+              | COMMA                  | 44                |
+              | HYPHEN-MINUS           | 45                |
+              | PERIOD                 | 46                |
+              | SOLIDUS                | 47                |
+              | COLON                  | 58                |
+              | SEMICOLON              | 59                |
+              | LATIN CAPITAL LETTER N | 78                |
+              | LATIN CAPITAL LETTER T | 84                |
+              | LATIN CAPITAL LETTER X | 88                |
+              | LATIN CAPITAL LETTER Z | 90                |
+              | BACKSLASH              | 92                |
+              | LATIN SMALL LETTER N   | 110               |
+              +------------------------+-------------------+
+
+2.2.  Related Memos
+
+   Implementers will need to be familiar with several other memos that,
+   along with this memo, form a framework for Internet calendaring and
+   scheduling standards.  This memo specifies a core specification of
+   objects, value types, properties, and property parameters.
+
+   o  iTIP [2446bis] specifies an interoperability protocol for
+      scheduling between different implementations;
+
+   o  iCalendar Message-Based Interoperability Protocol (iMIP) [2447bis]
+      specifies an Internet email binding for [2446bis].
+
+   This memo does not attempt to repeat the specification of concepts or
+   definitions from these other memos.  Where possible, references are
+   made to the memo that provides for the specification of these
+   concepts or definitions.
+
+3.  iCalendar Object Specification
+
+   The following sections define the details of a Calendaring and
+   Scheduling Core Object Specification.  The Calendaring and Scheduling
+   Core Object is a collection of calendaring and scheduling
+   information.  Typically, this information will consist of an
+   iCalendar stream with one or more iCalendar objects.  The body of the
+
+
+
+Desruisseaux                Standards Track                     [Page 8]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   iCalendar object consists of a sequence of calendar properties and
+   one or more calendar components.
+
+   Section 3.1 defines the content line format; Section 3.2 defines the
+   property parameter format; Section 3.3 defines the data types for
+   property values; Section 3.4 defines the iCalendar object format;
+   Section 3.5 defines the iCalendar property format; Section 3.6
+   defines the calendar component format; Section 3.7 defines calendar
+   properties; and Section 3.8 defines calendar component properties.
+
+   This information is intended to be an integral part of the MIME
+   content type registration.  In addition, this information can be used
+   independent of such content registration.  In particular, this memo
+   has direct applicability for use as a calendaring and scheduling
+   exchange format in file-, memory-, or network-based transport
+   mechanisms.
+
+3.1.  Content Lines
+
+   The iCalendar object is organized into individual lines of text,
+   called content lines.  Content lines are delimited by a line break,
+   which is a CRLF sequence (CR character followed by LF character).
+
+   Lines of text SHOULD NOT be longer than 75 octets, excluding the line
+   break.  Long content lines SHOULD be split into a multiple line
+   representations using a line "folding" technique.  That is, a long
+   line can be split between any two characters by inserting a CRLF
+   immediately followed by a single linear white-space character (i.e.,
+   SPACE or HTAB).  Any sequence of CRLF followed immediately by a
+   single linear white-space character is ignored (i.e., removed) when
+   processing the content type.
+
+   For example, the line:
+
+     DESCRIPTION:This is a long description that exists on a long line.
+
+   Can be represented as:
+
+     DESCRIPTION:This is a lo
+      ng description
+       that exists on a long line.
+
+   The process of moving from this folded multiple-line representation
+   to its single-line representation is called "unfolding".  Unfolding
+   is accomplished by removing the CRLF and the linear white-space
+   character that immediately follows.
+
+
+
+
+
+Desruisseaux                Standards Track                     [Page 9]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   When parsing a content line, folded lines MUST first be unfolded
+   according to the unfolding procedure described above.
+
+      Note: It is possible for very simple implementations to generate
+      improperly folded lines in the middle of a UTF-8 multi-octet
+      sequence.  For this reason, implementations need to unfold lines
+      in such a way to properly restore the original sequence.
+
+   The content information associated with an iCalendar object is
+   formatted using a syntax similar to that defined by [RFC2425].  That
+   is, the content information consists of CRLF-separated content lines.
+
+   The following notation defines the lines of content in an iCalendar
+   object:
+
+     contentline   = name *(";" param ) ":" value CRLF
+     ; This ABNF is just a general definition for an initial parsing
+     ; of the content line into its property name, parameter list,
+     ; and value string
+
+     ; When parsing a content line, folded lines MUST first
+     ; be unfolded according to the unfolding procedure
+     ; described above.  When generating a content line, lines
+     ; longer than 75 octets SHOULD be folded according to
+     ; the folding procedure described above.
+
+     name          = iana-token / x-name
+
+     iana-token    = 1*(ALPHA / DIGIT / "-")
+     ; iCalendar identifier registered with IANA
+
+     x-name        = "X-" [vendorid "-"] 1*(ALPHA / DIGIT / "-")
+     ; Reserved for experimental use.
+
+     vendorid      = 3*(ALPHA / DIGIT)
+     ; Vendor identification
+
+     param         = param-name "=" param-value *("," param-value)
+     ; Each property defines the specific ABNF for the parameters
+     ; allowed on the property.  Refer to specific properties for
+     ; precise parameter ABNF.
+
+     param-name    = iana-token / x-name
+
+     param-value   = paramtext / quoted-string
+
+     paramtext     = *SAFE-CHAR
+
+
+
+
+Desruisseaux                Standards Track                    [Page 10]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+     value         = *VALUE-CHAR
+
+     quoted-string = DQUOTE *QSAFE-CHAR DQUOTE
+
+     QSAFE-CHAR    = WSP / %x21 / %x23-7E / NON-US-ASCII
+     ; Any character except CONTROL and DQUOTE
+
+     SAFE-CHAR     = WSP / %x21 / %x23-2B / %x2D-39 / %x3C-7E
+                   / NON-US-ASCII
+     ; Any character except CONTROL, DQUOTE, ";", ":", ","
+
+     VALUE-CHAR    = WSP / %x21-7E / NON-US-ASCII
+     ; Any textual character
+
+     NON-US-ASCII  = UTF8-2 / UTF8-3 / UTF8-4
+     ; UTF8-2, UTF8-3, and UTF8-4 are defined in [RFC3629]
+
+     CONTROL       = %x00-08 / %x0A-1F / %x7F
+     ; All the controls except HTAB
+
+   The property value component of a content line has a format that is
+   property specific.  Refer to the section describing each property for
+   a definition of this format.
+
+   All names of properties, property parameters, enumerated property
+   values and property parameter values are case-insensitive.  However,
+   all other property values are case-sensitive, unless otherwise
+   stated.
+
+3.1.1.  List and Field Separators
+
+   Some properties and parameters allow a list of values.  Values in a
+   list of values MUST be separated by a COMMA character.  There is no
+   significance to the order of values in a list.  For those parameter
+   values (such as those that specify URI values) that are specified in
+   quoted-strings, the individual quoted-strings are separated by a
+   COMMA character.
+
+   Some property values are defined in terms of multiple parts.  These
+   structured property values MUST have their value parts separated by a
+   SEMICOLON character.
+
+   Some properties allow a list of parameters.  Each property parameter
+   in a list of property parameters MUST be separated by a SEMICOLON
+   character.
+
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 11]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Property parameters with values containing a COLON character, a
+   SEMICOLON character or a COMMA character MUST be placed in quoted
+   text.
+
+   For example, in the following properties, a SEMICOLON is used to
+   separate property parameters from each other and a COMMA character is
+   used to separate property values in a value list.
+
+     ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT:mailto:
+      jsmith at example.com
+
+     RDATE;VALUE=DATE:19970304,19970504,19970704,19970904
+
+3.1.2.  Multiple Values
+
+   Some properties defined in the iCalendar object can have multiple
+   values.  The general rule for encoding multi-valued items is to
+   simply create a new content line for each value, including the
+   property name.  However, it should be noted that some properties
+   support encoding multiple values in a single property by separating
+   the values with a COMMA character.  Individual property definitions
+   should be consulted for determining whether a specific property
+   allows multiple values and in which of these two forms.  Multi-valued
+   properties MUST NOT be used to specify multiple language variants of
+   the same value.  Calendar applications SHOULD display all values.
+
+3.1.3.  Binary Content
+
+   Binary content information in an iCalendar object SHOULD be
+   referenced using a URI within a property value.  That is, the binary
+   content information SHOULD be placed in an external MIME entity that
+   can be referenced by a URI from within the iCalendar object.  In
+   applications where this is not feasible, binary content information
+   can be included within an iCalendar object, but only after first
+   encoding it into text using the "BASE64" encoding method defined in
+   [RFC4648].  Inline binary content SHOULD only be used in applications
+   whose special circumstances demand that an iCalendar object be
+   expressed as a single entity.  A property containing inline binary
+   content information MUST specify the "ENCODING" property parameter.
+   Binary content information placed external to the iCalendar object
+   MUST be referenced by a uniform resource identifier (URI).
+
+   The following example specifies an "ATTACH" property that references
+   an attachment external to the iCalendar object with a URI reference:
+
+     ATTACH:http://example.com/public/quarterly-report.doc
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 12]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   The following example specifies an "ATTACH" property with inline
+   binary encoded content information:
+
+     ATTACH;FMTTYPE=text/plain;ENCODING=BASE64;VALUE=BINARY:VGhlIH
+      F1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZy4
+
+3.1.4.  Character Set
+
+   There is not a property parameter to declare the charset used in a
+   property value.  The default charset for an iCalendar stream is UTF-8
+   as defined in [RFC3629].
+
+   The "charset" Content-Type parameter MUST be used in MIME transports
+   to specify the charset being used.
+
+3.2.  Property Parameters
+
+   A property can have attributes with which it is associated.  These
+   "property parameters" contain meta-information about the property or
+   the property value.  Property parameters are provided to specify such
+   information as the location of an alternate text representation for a
+   property value, the language of a text property value, the value type
+   of the property value, and other attributes.
+
+   Property parameter values that contain the COLON, SEMICOLON, or COMMA
+   character separators MUST be specified as quoted-string text values.
+   Property parameter values MUST NOT contain the DQUOTE character.  The
+   DQUOTE character is used as a delimiter for parameter values that
+   contain restricted characters or URI text.  For example:
+
+     DESCRIPTION;ALTREP="cid:part1.0001 at example.org":The Fall'98 Wild
+       Wizards Conference - - Las Vegas\, NV\, USA
+
+   Property parameter values that are not in quoted-strings are case-
+   insensitive.
+
+   The general property parameters defined by this memo are defined by
+   the following notation:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 13]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+     icalparameter = altrepparam       ; Alternate text representation
+                   / cnparam           ; Common name
+                   / cutypeparam       ; Calendar user type
+                   / delfromparam      ; Delegator
+                   / deltoparam        ; Delegatee
+                   / dirparam          ; Directory entry
+                   / encodingparam     ; Inline encoding
+                   / fmttypeparam      ; Format type
+                   / fbtypeparam       ; Free/busy time type
+                   / languageparam     ; Language for text
+                   / memberparam       ; Group or list membership
+                   / partstatparam     ; Participation status
+                   / rangeparam        ; Recurrence identifier range
+                   / trigrelparam      ; Alarm trigger relationship
+                   / reltypeparam      ; Relationship type
+                   / roleparam         ; Participation role
+                   / rsvpparam         ; RSVP expectation
+                   / sentbyparam       ; Sent by
+                   / tzidparam         ; Reference to time zone object
+                   / valuetypeparam    ; Property value data type
+                   / other-param
+
+     other-param   = (iana-param / x-param)
+
+     iana-param  = iana-token "=" param-value *("," param-value)
+     ; Some other IANA-registered iCalendar parameter.
+
+     x-param     = x-name "=" param-value *("," param-value)
+     ; A non-standard, experimental parameter.
+
+   Applications MUST ignore x-param and iana-param values they don't
+   recognize.
+
+3.2.1.  Alternate Text Representation
+
+   Parameter Name:  ALTREP
+
+   Purpose:  To specify an alternate text representation for the
+      property value.
+
+   Format Definition:  This property parameter is defined by the
+      following notation:
+
+     altrepparam = "ALTREP" "=" DQUOTE uri DQUOTE
+
+   Description:  This parameter specifies a URI that points to an
+      alternate representation for a textual property value.  A property
+      specifying this parameter MUST also include a value that reflects
+
+
+
+Desruisseaux                Standards Track                    [Page 14]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      the default representation of the text value.  The URI parameter
+      value MUST be specified in a quoted-string.
+
+         Note: While there is no restriction imposed on the URI schemes
+         allowed for this parameter, Content Identifier (CID) [RFC2392],
+         HTTP [RFC2616], and HTTPS [RFC2818] are the URI schemes most
+         commonly used by current implementations.
+
+   Example:
+
+       DESCRIPTION;ALTREP="CID:part3.msg.970415T083000 at example.com":
+        Project XYZ Review Meeting will include the following agenda
+         items: (a) Market Overview\, (b) Finances\, (c) Project Man
+        agement
+
+      The "ALTREP" property parameter value might point to a "text/html"
+      content portion.
+
+       Content-Type:text/html
+       Content-Id:<part3.msg.970415T083000 at example.com>
+
+       <html>
+         <head>
+          <title></title>
+         </head>
+         <body>
+           <p>
+             <b>Project XYZ Review Meeting</b> will include
+             the following agenda items:
+             <ol>
+               <li>Market Overview</li>
+               <li>Finances</li>
+               <li>Project Management</li>
+             </ol>
+           </p>
+         </body>
+       </html>
+
+3.2.2.  Common Name
+
+   Parameter Name:  CN
+
+   Purpose:  To specify the common name to be associated with the
+      calendar user specified by the property.
+
+   Format Definition:  This property parameter is defined by the
+      following notation:
+
+
+
+
+Desruisseaux                Standards Track                    [Page 15]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+     cnparam    = "CN" "=" param-value
+
+   Description:  This parameter can be specified on properties with a
+      CAL-ADDRESS value type.  The parameter specifies the common name
+      to be associated with the calendar user specified by the property.
+      The parameter value is text.  The parameter value can be used for
+      display text to be associated with the calendar address specified
+      by the property.
+
+   Example:
+
+       ORGANIZER;CN="John Smith":mailto:jsmith at example.com
+
+3.2.3.  Calendar User Type
+
+   Parameter Name:  CUTYPE
+
+   Purpose:  To identify the type of calendar user specified by the
+      property.
+
+   Format Definition:  This property parameter is defined by the
+      following notation:
+
+       cutypeparam        = "CUTYPE" "="
+                          ("INDIVIDUAL"   ; An individual
+                         / "GROUP"        ; A group of individuals
+                         / "RESOURCE"     ; A physical resource
+                         / "ROOM"         ; A room resource
+                         / "UNKNOWN"      ; Otherwise not known
+                         / x-name         ; Experimental type
+                         / iana-token)    ; Other IANA-registered
+                                          ; type
+       ; Default is INDIVIDUAL
+
+   Description:  This parameter can be specified on properties with a
+      CAL-ADDRESS value type.  The parameter identifies the type of
+      calendar user specified by the property.  If not specified on a
+      property that allows this parameter, the default is INDIVIDUAL.
+      Applications MUST treat x-name and iana-token values they don't
+      recognize the same way as they would the UNKNOWN value.
+
+   Example:
+
+       ATTENDEE;CUTYPE=GROUP:mailto:ietf-calsch at example.org
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 16]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+3.2.4.  Delegators
+
+   Parameter Name:  DELEGATED-FROM
+
+   Purpose:  To specify the calendar users that have delegated their
+      participation to the calendar user specified by the property.
+
+   Format Definition:  This property parameter is defined by the
+      following notation:
+
+       delfromparam       = "DELEGATED-FROM" "=" DQUOTE cal-address
+                             DQUOTE *("," DQUOTE cal-address DQUOTE)
+
+   Description:  This parameter can be specified on properties with a
+      CAL-ADDRESS value type.  This parameter specifies those calendar
+      users that have delegated their participation in a group-scheduled
+      event or to-do to the calendar user specified by the property.
+      The individual calendar address parameter values MUST each be
+      specified in a quoted-string.
+
+   Example:
+
+       ATTENDEE;DELEGATED-FROM="mailto:jsmith at example.com":mailto:
+        jdoe at example.com
+
+3.2.5.  Delegatees
+
+   Parameter Name:  DELEGATED-TO
+
+   Purpose:  To specify the calendar users to whom the calendar user
+      specified by the property has delegated participation.
+
+   Format Definition:  This property parameter is defined by the
+      following notation:
+
+       deltoparam = "DELEGATED-TO" "=" DQUOTE cal-address DQUOTE
+                    *("," DQUOTE cal-address DQUOTE)
+
+   Description:  This parameter can be specified on properties with a
+      CAL-ADDRESS value type.  This parameter specifies those calendar
+      users whom have been delegated participation in a group-scheduled
+      event or to-do by the calendar user specified by the property.
+      The individual calendar address parameter values MUST each be
+      specified in a quoted-string.
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 17]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Example:
+
+       ATTENDEE;DELEGATED-TO="mailto:jdoe at example.com","mailto:jqpublic
+        @example.com":mailto:jsmith at example.com
+
+3.2.6.  Directory Entry Reference
+
+   Parameter Name:  DIR
+
+   Purpose:  To specify reference to a directory entry associated with
+      the calendar user specified by the property.
+
+   Format Definition:  This property parameter is defined by the
+      following notation:
+
+       dirparam   = "DIR" "=" DQUOTE uri DQUOTE
+
+   Description:  This parameter can be specified on properties with a
+      CAL-ADDRESS value type.  The parameter specifies a reference to
+      the directory entry associated with the calendar user specified by
+      the property.  The parameter value is a URI.  The URI parameter
+      value MUST be specified in a quoted-string.
+
+         Note: While there is no restriction imposed on the URI schemes
+         allowed for this parameter, CID [RFC2392], DATA [RFC2397], FILE
+         [RFC1738], FTP [RFC1738], HTTP [RFC2616], HTTPS [RFC2818], LDAP
+         [RFC4516], and MID [RFC2392] are the URI schemes most commonly
+         used by current implementations.
+
+   Example:
+
+       ORGANIZER;DIR="ldap://example.com:6666/o=ABC%20Industries,
+        c=US???(cn=Jim%20Dolittle)":mailto:jimdo at example.com
+
+3.2.7.  Inline Encoding
+
+   Parameter Name:  ENCODING
+
+   Purpose:  To specify an alternate inline encoding for the property
+      value.
+
+   Format Definition:  This property parameter is defined by the
+      following notation:
+
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 18]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+       encodingparam      = "ENCODING" "="
+                          ( "8BIT"
+          ; "8bit" text encoding is defined in [RFC2045]
+                          / "BASE64"
+          ; "BASE64" binary encoding format is defined in [RFC4648]
+                          )
+
+   Description:  This property parameter identifies the inline encoding
+      used in a property value.  The default encoding is "8BIT",
+      corresponding to a property value consisting of text.  The
+      "BASE64" encoding type corresponds to a property value encoded
+      using the "BASE64" encoding defined in [RFC2045].
+
+      If the value type parameter is ";VALUE=BINARY", then the inline
+      encoding parameter MUST be specified with the value
+      ";ENCODING=BASE64".
+
+   Example:
+
+     ATTACH;FMTTYPE=text/plain;ENCODING=BASE64;VALUE=BINARY:TG9yZW
+      0gaXBzdW0gZG9sb3Igc2l0IGFtZXQsIGNvbnNlY3RldHVyIGFkaXBpc2ljaW
+      5nIGVsaXQsIHNlZCBkbyBlaXVzbW9kIHRlbXBvciBpbmNpZGlkdW50IHV0IG
+      xhYm9yZSBldCBkb2xvcmUgbWFnbmEgYWxpcXVhLiBVdCBlbmltIGFkIG1pbm
+      ltIHZlbmlhbSwgcXVpcyBub3N0cnVkIGV4ZXJjaXRhdGlvbiB1bGxhbWNvIG
+      xhYm9yaXMgbmlzaSB1dCBhbGlxdWlwIGV4IGVhIGNvbW1vZG8gY29uc2VxdW
+      F0LiBEdWlzIGF1dGUgaXJ1cmUgZG9sb3IgaW4gcmVwcmVoZW5kZXJpdCBpbi
+      B2b2x1cHRhdGUgdmVsaXQgZXNzZSBjaWxsdW0gZG9sb3JlIGV1IGZ1Z2lhdC
+      BudWxsYSBwYXJpYXR1ci4gRXhjZXB0ZXVyIHNpbnQgb2NjYWVjYXQgY3VwaW
+      RhdGF0IG5vbiBwcm9pZGVudCwgc3VudCBpbiBjdWxwYSBxdWkgb2ZmaWNpYS
+      BkZXNlcnVudCBtb2xsaXQgYW5pbSBpZCBlc3QgbGFib3J1bS4=
+
+3.2.8.  Format Type
+
+   Parameter Name:  FMTTYPE
+
+   Purpose:  To specify the content type of a referenced object.
+
+   Format Definition:  This property parameter is defined by the
+      following notation:
+
+       fmttypeparam = "FMTTYPE" "=" type-name "/" subtype-name
+                      ; Where "type-name" and "subtype-name" are
+                      ; defined in Section 4.2 of [RFC4288].
+
+   Description:  This parameter can be specified on properties that are
+      used to reference an object.  The parameter specifies the media
+      type [RFC4288] of the referenced object.  For example, on the
+      "ATTACH" property, an FTP type URI value does not, by itself,
+
+
+
+Desruisseaux                Standards Track                    [Page 19]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      necessarily convey the type of content associated with the
+      resource.  The parameter value MUST be the text for either an
+      IANA-registered media type or a non-standard media type.
+
+   Example:
+
+       ATTACH;FMTTYPE=application/msword:ftp://example.com/pub/docs/
+        agenda.doc
+
+3.2.9.  Free/Busy Time Type
+
+   Parameter Name:  FBTYPE
+
+   Purpose:  To specify the free or busy time type.
+
+   Format Definition:  This property parameter is defined by the
+      following notation:
+
+       fbtypeparam        = "FBTYPE" "=" ("FREE" / "BUSY"
+                          / "BUSY-UNAVAILABLE" / "BUSY-TENTATIVE"
+                          / x-name
+                ; Some experimental iCalendar free/busy type.
+                          / iana-token)
+                ; Some other IANA-registered iCalendar free/busy type.
+
+   Description:  This parameter specifies the free or busy time type.
+      The value FREE indicates that the time interval is free for
+      scheduling.  The value BUSY indicates that the time interval is
+      busy because one or more events have been scheduled for that
+      interval.  The value BUSY-UNAVAILABLE indicates that the time
+      interval is busy and that the interval can not be scheduled.  The
+      value BUSY-TENTATIVE indicates that the time interval is busy
+      because one or more events have been tentatively scheduled for
+      that interval.  If not specified on a property that allows this
+      parameter, the default is BUSY.  Applications MUST treat x-name
+      and iana-token values they don't recognize the same way as they
+      would the BUSY value.
+
+   Example:  The following is an example of this parameter on a
+      "FREEBUSY" property.
+
+       FREEBUSY;FBTYPE=BUSY:19980415T133000Z/19980415T170000Z
+
+
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 20]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+3.2.10.  Language
+
+   Parameter Name:  LANGUAGE
+
+   Purpose:  To specify the language for text values in a property or
+      property parameter.
+
+   Format Definition:  This property parameter is defined by the
+      following notation:
+
+       languageparam = "LANGUAGE" "=" language
+
+       language = Language-Tag
+                  ; As defined in [RFC5646].
+
+   Description:  This parameter identifies the language of the text in
+      the property value and of all property parameter values of the
+      property.  The value of the "LANGUAGE" property parameter is that
+      defined in [RFC5646].
+
+      For transport in a MIME entity, the Content-Language header field
+      can be used to set the default language for the entire body part.
+      Otherwise, no default language is assumed.
+
+   Example:  The following are examples of this parameter on the
+      "SUMMARY" and "LOCATION" properties:
+
+       SUMMARY;LANGUAGE=en-US:Company Holiday Party
+
+       LOCATION;LANGUAGE=en:Germany
+
+       LOCATION;LANGUAGE=no:Tyskland
+
+3.2.11.  Group or List Membership
+
+   Parameter Name:  MEMBER
+
+   Purpose:  To specify the group or list membership of the calendar
+      user specified by the property.
+
+   Format Definition:  This property parameter is defined by the
+      following notation:
+
+       memberparam        = "MEMBER" "=" DQUOTE cal-address DQUOTE
+                            *("," DQUOTE cal-address DQUOTE)
+
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 21]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Description:  This parameter can be specified on properties with a
+      CAL-ADDRESS value type.  The parameter identifies the groups or
+      list membership for the calendar user specified by the property.
+      The parameter value is either a single calendar address in a
+      quoted-string or a COMMA-separated list of calendar addresses,
+      each in a quoted-string.  The individual calendar address
+      parameter values MUST each be specified in a quoted-string.
+
+   Example:
+
+       ATTENDEE;MEMBER="mailto:ietf-calsch at example.org":mailto:
+        jsmith at example.com
+
+       ATTENDEE;MEMBER="mailto:projectA at example.com","mailto:pr
+        ojectB at example.com":mailto:janedoe at example.com
+
+3.2.12.  Participation Status
+
+   Parameter Name:  PARTSTAT
+
+   Purpose:  To specify the participation status for the calendar user
+      specified by the property.
+
+   Format Definition:  This property parameter is defined by the
+      following notation:
+
+       partstatparam    = "PARTSTAT" "="
+                         (partstat-event
+                        / partstat-todo
+                        / partstat-jour)
+
+       partstat-event   = ("NEEDS-ACTION"    ; Event needs action
+                        / "ACCEPTED"         ; Event accepted
+                        / "DECLINED"         ; Event declined
+                        / "TENTATIVE"        ; Event tentatively
+                                             ; accepted
+                        / "DELEGATED"        ; Event delegated
+                        / x-name             ; Experimental status
+                        / iana-token)        ; Other IANA-registered
+                                             ; status
+       ; These are the participation statuses for a "VEVENT".
+       ; Default is NEEDS-ACTION.
+
+       partstat-todo    = ("NEEDS-ACTION"    ; To-do needs action
+                        / "ACCEPTED"         ; To-do accepted
+                        / "DECLINED"         ; To-do declined
+                        / "TENTATIVE"        ; To-do tentatively
+                                             ; accepted
+
+
+
+Desruisseaux                Standards Track                    [Page 22]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+                        / "DELEGATED"        ; To-do delegated
+                        / "COMPLETED"        ; To-do completed
+                                             ; COMPLETED property has
+                                             ; DATE-TIME completed
+                        / "IN-PROCESS"       ; To-do in process of
+                                             ; being completed
+                        / x-name             ; Experimental status
+                        / iana-token)        ; Other IANA-registered
+                                             ; status
+       ; These are the participation statuses for a "VTODO".
+       ; Default is NEEDS-ACTION.
+
+
+
+       partstat-jour    = ("NEEDS-ACTION"    ; Journal needs action
+                        / "ACCEPTED"         ; Journal accepted
+                        / "DECLINED"         ; Journal declined
+                        / x-name             ; Experimental status
+                        / iana-token)        ; Other IANA-registered
+                                             ; status
+       ; These are the participation statuses for a "VJOURNAL".
+       ; Default is NEEDS-ACTION.
+
+   Description:  This parameter can be specified on properties with a
+      CAL-ADDRESS value type.  The parameter identifies the
+      participation status for the calendar user specified by the
+      property value.  The parameter values differ depending on whether
+      they are associated with a group-scheduled "VEVENT", "VTODO", or
+      "VJOURNAL".  The values MUST match one of the values allowed for
+      the given calendar component.  If not specified on a property that
+      allows this parameter, the default value is NEEDS-ACTION.
+      Applications MUST treat x-name and iana-token values they don't
+      recognize the same way as they would the NEEDS-ACTION value.
+
+   Example:
+
+       ATTENDEE;PARTSTAT=DECLINED:mailto:jsmith at example.com
+
+3.2.13.  Recurrence Identifier Range
+
+   Parameter Name:  RANGE
+
+   Purpose:  To specify the effective range of recurrence instances from
+      the instance specified by the recurrence identifier specified by
+      the property.
+
+   Format Definition:  This property parameter is defined by the
+      following notation:
+
+
+
+Desruisseaux                Standards Track                    [Page 23]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+       rangeparam = "RANGE" "=" "THISANDFUTURE"
+       ; To specify the instance specified by the recurrence identifier
+       ; and all subsequent recurrence instances.
+
+   Description:  This parameter can be specified on a property that
+      specifies a recurrence identifier.  The parameter specifies the
+      effective range of recurrence instances that is specified by the
+      property.  The effective range is from the recurrence identifier
+      specified by the property.  If this parameter is not specified on
+      an allowed property, then the default range is the single instance
+      specified by the recurrence identifier value of the property.  The
+      parameter value can only be "THISANDFUTURE" to indicate a range
+      defined by the recurrence identifier and all subsequent instances.
+      The value "THISANDPRIOR" is deprecated by this revision of
+      iCalendar and MUST NOT be generated by applications.
+
+   Example:
+
+       RECURRENCE-ID;RANGE=THISANDFUTURE:19980401T133000Z
+
+3.2.14.  Alarm Trigger Relationship
+
+   Parameter Name:  RELATED
+
+   Purpose:  To specify the relationship of the alarm trigger with
+      respect to the start or end of the calendar component.
+
+   Format Definition:  This property parameter is defined by the
+      following notation:
+
+       trigrelparam       = "RELATED" "="
+                           ("START"       ; Trigger off of start
+                          / "END")        ; Trigger off of end
+
+   Description:  This parameter can be specified on properties that
+      specify an alarm trigger with a "DURATION" value type.  The
+      parameter specifies whether the alarm will trigger relative to the
+      start or end of the calendar component.  The parameter value START
+      will set the alarm to trigger off the start of the calendar
+      component; the parameter value END will set the alarm to trigger
+      off the end of the calendar component.  If the parameter is not
+      specified on an allowable property, then the default is START.
+
+   Example:
+
+       TRIGGER;RELATED=END:PT5M
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 24]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+3.2.15.  Relationship Type
+
+   Parameter Name:  RELTYPE
+
+   Purpose:  To specify the type of hierarchical relationship associated
+      with the calendar component specified by the property.
+
+   Format Definition:  This property parameter is defined by the
+      following notation:
+
+       reltypeparam       = "RELTYPE" "="
+                           ("PARENT"    ; Parent relationship - Default
+                          / "CHILD"     ; Child relationship
+                          / "SIBLING"   ; Sibling relationship
+                          / iana-token  ; Some other IANA-registered
+                                        ; iCalendar relationship type
+                          / x-name)     ; A non-standard, experimental
+                                        ; relationship type
+
+   Description:  This parameter can be specified on a property that
+      references another related calendar.  The parameter specifies the
+      hierarchical relationship type of the calendar component
+      referenced by the property.  The parameter value can be PARENT, to
+      indicate that the referenced calendar component is a superior of
+      calendar component; CHILD to indicate that the referenced calendar
+      component is a subordinate of the calendar component; or SIBLING
+      to indicate that the referenced calendar component is a peer of
+      the calendar component.  If this parameter is not specified on an
+      allowable property, the default relationship type is PARENT.
+      Applications MUST treat x-name and iana-token values they don't
+      recognize the same way as they would the PARENT value.
+
+   Example:
+
+       RELATED-TO;RELTYPE=SIBLING:19960401-080045-4000F192713@
+        example.com
+
+3.2.16.  Participation Role
+
+   Parameter Name:  ROLE
+
+   Purpose:  To specify the participation role for the calendar user
+      specified by the property.
+
+   Format Definition:  This property parameter is defined by the
+      following notation:
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 25]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+       roleparam  = "ROLE" "="
+                   ("CHAIR"             ; Indicates chair of the
+                                        ; calendar entity
+                  / "REQ-PARTICIPANT"   ; Indicates a participant whose
+                                        ; participation is required
+                  / "OPT-PARTICIPANT"   ; Indicates a participant whose
+                                        ; participation is optional
+                  / "NON-PARTICIPANT"   ; Indicates a participant who
+                                        ; is copied for information
+                                        ; purposes only
+                  / x-name              ; Experimental role
+                  / iana-token)         ; Other IANA role
+       ; Default is REQ-PARTICIPANT
+
+   Description:  This parameter can be specified on properties with a
+      CAL-ADDRESS value type.  The parameter specifies the participation
+      role for the calendar user specified by the property in the group
+      schedule calendar component.  If not specified on a property that
+      allows this parameter, the default value is REQ-PARTICIPANT.
+      Applications MUST treat x-name and iana-token values they don't
+      recognize the same way as they would the REQ-PARTICIPANT value.
+
+   Example:
+
+       ATTENDEE;ROLE=CHAIR:mailto:mrbig at example.com
+
+3.2.17.  RSVP Expectation
+
+   Parameter Name:  RSVP
+
+   Purpose:  To specify whether there is an expectation of a favor of a
+      reply from the calendar user specified by the property value.
+
+   Format Definition:  This property parameter is defined by the
+      following notation:
+
+       rsvpparam = "RSVP" "=" ("TRUE" / "FALSE")
+       ; Default is FALSE
+
+   Description:  This parameter can be specified on properties with a
+      CAL-ADDRESS value type.  The parameter identifies the expectation
+      of a reply from the calendar user specified by the property value.
+      This parameter is used by the "Organizer" to request a
+      participation status reply from an "Attendee" of a group-scheduled
+      event or to-do.  If not specified on a property that allows this
+      parameter, the default value is FALSE.
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 26]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Example:
+
+       ATTENDEE;RSVP=TRUE:mailto:jsmith at example.com
+
+3.2.18.  Sent By
+
+   Parameter Name:  SENT-BY
+
+   Purpose:  To specify the calendar user that is acting on behalf of
+      the calendar user specified by the property.
+
+   Format Definition:  This property parameter is defined by the
+      following notation:
+
+       sentbyparam        = "SENT-BY" "=" DQUOTE cal-address DQUOTE
+
+   Description:  This parameter can be specified on properties with a
+      CAL-ADDRESS value type.  The parameter specifies the calendar user
+      that is acting on behalf of the calendar user specified by the
+      property.  The parameter value MUST be a mailto URI as defined in
+      [RFC2368].  The individual calendar address parameter values MUST
+      each be specified in a quoted-string.
+
+   Example:
+
+       ORGANIZER;SENT-BY="mailto:sray at example.com":mailto:
+        jsmith at example.com
+
+3.2.19.  Time Zone Identifier
+
+   Parameter Name:  TZID
+
+   Purpose:  To specify the identifier for the time zone definition for
+      a time component in the property value.
+
+   Format Definition:  This property parameter is defined by the
+      following notation:
+
+       tzidparam  = "TZID" "=" [tzidprefix] paramtext
+
+       tzidprefix = "/"
+
+   Description:  This parameter MUST be specified on the "DTSTART",
+      "DTEND", "DUE", "EXDATE", and "RDATE" properties when either a
+      DATE-TIME or TIME value type is specified and when the value is
+      neither a UTC or a "floating" time.  Refer to the DATE-TIME or
+      TIME value type definition for a description of UTC and "floating
+      time" formats.  This property parameter specifies a text value
+
+
+
+Desruisseaux                Standards Track                    [Page 27]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      that uniquely identifies the "VTIMEZONE" calendar component to be
+      used when evaluating the time portion of the property.  The value
+      of the "TZID" property parameter will be equal to the value of the
+      "TZID" property for the matching time zone definition.  An
+      individual "VTIMEZONE" calendar component MUST be specified for
+      each unique "TZID" parameter value specified in the iCalendar
+      object.
+
+      The parameter MUST be specified on properties with a DATE-TIME
+      value if the DATE-TIME is not either a UTC or a "floating" time.
+      Failure to include and follow VTIMEZONE definitions in iCalendar
+      objects may lead to inconsistent understanding of the local time
+      at any given location.
+
+      The presence of the SOLIDUS character as a prefix, indicates that
+      this "TZID" represents a unique ID in a globally defined time zone
+      registry (when such registry is defined).
+
+         Note: This document does not define a naming convention for
+         time zone identifiers.  Implementers may want to use the naming
+         conventions defined in existing time zone specifications such
+         as the public-domain TZ database [TZDB].  The specification of
+         globally unique time zone identifiers is not addressed by this
+         document and is left for future study.
+
+      The following are examples of this property parameter:
+
+       DTSTART;TZID=America/New_York:19980119T020000
+
+       DTEND;TZID=America/New_York:19980119T030000
+
+      The "TZID" property parameter MUST NOT be applied to DATE
+      properties and DATE-TIME or TIME properties whose time values are
+      specified in UTC.
+
+      The use of local time in a DATE-TIME or TIME value without the
+      "TZID" property parameter is to be interpreted as floating time,
+      regardless of the existence of "VTIMEZONE" calendar components in
+      the iCalendar object.
+
+      For more information, see the sections on the value types DATE-
+      TIME and TIME.
+
+
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 28]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+3.2.20.  Value Data Types
+
+   Parameter Name:  VALUE
+
+   Purpose:  To explicitly specify the value type format for a property
+      value.
+
+   Format Definition:  This property parameter is defined by the
+      following notation:
+
+       valuetypeparam = "VALUE" "=" valuetype
+
+       valuetype  = ("BINARY"
+                  / "BOOLEAN"
+                  / "CAL-ADDRESS"
+                  / "DATE"
+                  / "DATE-TIME"
+                  / "DURATION"
+                  / "FLOAT"
+                  / "INTEGER"
+                  / "PERIOD"
+                  / "RECUR"
+                  / "TEXT"
+                  / "TIME"
+                  / "URI"
+                  / "UTC-OFFSET"
+                  / x-name
+                  ; Some experimental iCalendar value type.
+                  / iana-token)
+                  ; Some other IANA-registered iCalendar value type.
+
+   Description:  This parameter specifies the value type and format of
+      the property value.  The property values MUST be of a single value
+      type.  For example, a "RDATE" property cannot have a combination
+      of DATE-TIME and TIME value types.
+
+      If the property's value is the default value type, then this
+      parameter need not be specified.  However, if the property's
+      default value type is overridden by some other allowable value
+      type, then this parameter MUST be specified.
+
+      Applications MUST preserve the value data for x-name and iana-
+      token values that they don't recognize without attempting to
+      interpret or parse the value data.
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 29]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+3.3.  Property Value Data Types
+
+   The properties in an iCalendar object are strongly typed.  The
+   definition of each property restricts the value to be one of the
+   value data types, or simply value types, defined in this section.
+   The value type for a property will either be specified implicitly as
+   the default value type or will be explicitly specified with the
+   "VALUE" parameter.  If the value type of a property is one of the
+   alternate valid types, then it MUST be explicitly specified with the
+   "VALUE" parameter.
+
+3.3.1.  Binary
+
+   Value Name:  BINARY
+
+   Purpose:  This value type is used to identify properties that contain
+      a character encoding of inline binary data.  For example, an
+      inline attachment of a document might be included in an iCalendar
+      object.
+
+   Format Definition:  This value type is defined by the following
+      notation:
+
+       binary     = *(4b-char) [b-end]
+       ; A "BASE64" encoded character string, as defined by [RFC4648].
+
+       b-end      = (2b-char "==") / (3b-char "=")
+
+       b-char = ALPHA / DIGIT / "+" / "/"
+
+   Description:  Property values with this value type MUST also include
+      the inline encoding parameter sequence of ";ENCODING=BASE64".
+      That is, all inline binary data MUST first be character encoded
+      using the "BASE64" encoding method defined in [RFC2045].  No
+      additional content value encoding (i.e., BACKSLASH character
+      encoding, see Section 3.3.11) is defined for this value type.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 30]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Example:  The following is an example of a "BASE64" encoded binary
+      value data:
+
+     ATTACH;FMTTYPE=image/vnd.microsoft.icon;ENCODING=BASE64;VALUE
+      =BINARY:AAABAAEAEBAQAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAA
+      AAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAgIAAAICAgADAwMAA////AAAA
+      AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+      AAAAAAAAAAAAAAAAAAAAAAMwAAAAAAABNEMQAAAAAAAkQgAAAAAAJEREQgAA
+      ACECQ0QgEgAAQxQzM0E0AABERCRCREQAADRDJEJEQwAAAhA0QwEQAAAAAERE
+      AAAAAAAAREQAAAAAAAAkQgAAAAAAAAMgAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+      AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+      AAAAAAAAAAAA
+
+3.3.2.  Boolean
+
+   Value Name:  BOOLEAN
+
+   Purpose:  This value type is used to identify properties that contain
+      either a "TRUE" or "FALSE" Boolean value.
+
+   Format Definition:  This value type is defined by the following
+      notation:
+
+       boolean    = "TRUE" / "FALSE"
+
+   Description:  These values are case-insensitive text.  No additional
+      content value encoding (i.e., BACKSLASH character encoding, see
+      Section 3.3.11) is defined for this value type.
+
+   Example:  The following is an example of a hypothetical property that
+      has a BOOLEAN value type:
+
+       TRUE
+
+3.3.3.  Calendar User Address
+
+   Value Name:  CAL-ADDRESS
+
+   Purpose:  This value type is used to identify properties that contain
+      a calendar user address.
+
+   Format Definition:  This value type is defined by the following
+      notation:
+
+       cal-address        = uri
+
+   Description:  The value is a URI as defined by [RFC3986] or any other
+      IANA-registered form for a URI.  When used to address an Internet
+
+
+
+Desruisseaux                Standards Track                    [Page 31]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      email transport address for a calendar user, the value MUST be a
+      mailto URI, as defined by [RFC2368].  No additional content value
+      encoding (i.e., BACKSLASH character encoding, see Section 3.3.11)
+      is defined for this value type.
+
+   Example:
+
+    mailto:jane_doe at example.com
+
+3.3.4.  Date
+
+   Value Name:  DATE
+
+   Purpose:  This value type is used to identify values that contain a
+      calendar date.
+
+   Format Definition:  This value type is defined by the following
+      notation:
+
+       date               = date-value
+
+       date-value         = date-fullyear date-month date-mday
+       date-fullyear      = 4DIGIT
+       date-month         = 2DIGIT        ;01-12
+       date-mday          = 2DIGIT        ;01-28, 01-29, 01-30, 01-31
+                                          ;based on month/year
+
+   Description:  If the property permits, multiple "date" values are
+      specified as a COMMA-separated list of values.  The format for the
+      value type is based on the [ISO.8601.2004] complete
+      representation, basic format for a calendar date.  The textual
+      format specifies a four-digit year, two-digit month, and two-digit
+      day of the month.  There are no separator characters between the
+      year, month, and day component text.
+
+      No additional content value encoding (i.e., BACKSLASH character
+      encoding, see Section 3.3.11) is defined for this value type.
+
+   Example:  The following represents July 14, 1997:
+
+       19970714
+
+3.3.5.  Date-Time
+
+   Value Name:  DATE-TIME
+
+   Purpose:  This value type is used to identify values that specify a
+      precise calendar date and time of day.
+
+
+
+Desruisseaux                Standards Track                    [Page 32]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Format Definition:  This value type is defined by the following
+      notation:
+
+       date-time  = date "T" time ;As specified in the DATE and TIME
+                                  ;value definitions
+
+   Description:  If the property permits, multiple "DATE-TIME" values
+      are specified as a COMMA-separated list of values.  No additional
+      content value encoding (i.e., BACKSLASH character encoding, see
+      Section 3.3.11) is defined for this value type.
+
+      The "DATE-TIME" value type is used to identify values that contain
+      a precise calendar date and time of day.  The format is based on
+      the [ISO.8601.2004] complete representation, basic format for a
+      calendar date and time of day.  The text format is a concatenation
+      of the "date", followed by the LATIN CAPITAL LETTER T character,
+      the time designator, followed by the "time" format.
+
+      The "DATE-TIME" value type expresses time values in three forms:
+
+      The form of date and time with UTC offset MUST NOT be used.  For
+      example, the following is not valid for a DATE-TIME value:
+
+       19980119T230000-0800       ;Invalid time format
+
+      FORM #1: DATE WITH LOCAL TIME
+
+      The date with local time form is simply a DATE-TIME value that
+      does not contain the UTC designator nor does it reference a time
+      zone.  For example, the following represents January 18, 1998, at
+      11 PM:
+
+       19980118T230000
+
+      DATE-TIME values of this type are said to be "floating" and are
+      not bound to any time zone in particular.  They are used to
+      represent the same hour, minute, and second value regardless of
+      which time zone is currently being observed.  For example, an
+      event can be defined that indicates that an individual will be
+      busy from 11:00 AM to 1:00 PM every day, no matter which time zone
+      the person is in.  In these cases, a local time can be specified.
+      The recipient of an iCalendar object with a property value
+      consisting of a local time, without any relative time zone
+      information, SHOULD interpret the value as being fixed to whatever
+      time zone the "ATTENDEE" is in at any given moment.  This means
+      that two "Attendees", in different time zones, receiving the same
+      event definition as a floating time, may be participating in the
+
+
+
+
+Desruisseaux                Standards Track                    [Page 33]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      event at different actual times.  Floating time SHOULD only be
+      used where that is the reasonable behavior.
+
+      In most cases, a fixed time is desired.  To properly communicate a
+      fixed time in a property value, either UTC time or local time with
+      time zone reference MUST be specified.
+
+      The use of local time in a DATE-TIME value without the "TZID"
+      property parameter is to be interpreted as floating time,
+      regardless of the existence of "VTIMEZONE" calendar components in
+      the iCalendar object.
+
+      FORM #2: DATE WITH UTC TIME
+
+      The date with UTC time, or absolute time, is identified by a LATIN
+      CAPITAL LETTER Z suffix character, the UTC designator, appended to
+      the time value.  For example, the following represents January 19,
+      1998, at 0700 UTC:
+
+       19980119T070000Z
+
+      The "TZID" property parameter MUST NOT be applied to DATE-TIME
+      properties whose time values are specified in UTC.
+
+      FORM #3: DATE WITH LOCAL TIME AND TIME ZONE REFERENCE
+
+      The date and local time with reference to time zone information is
+      identified by the use the "TZID" property parameter to reference
+      the appropriate time zone definition.  "TZID" is discussed in
+      detail in Section 3.2.19.  For example, the following represents
+      2:00 A.M. in New York on January 19, 1998:
+
+       TZID=America/New_York:19980119T020000
+
+      If, based on the definition of the referenced time zone, the local
+      time described occurs more than once (when changing from daylight
+      to standard time), the DATE-TIME value refers to the first
+      occurrence of the referenced time.  Thus, TZID=America/
+      New_York:20071104T013000 indicates November 4, 2007 at 1:30 A.M.
+      EDT (UTC-04:00).  If the local time described does not occur (when
+      changing from standard to daylight time), the DATE-TIME value is
+      interpreted using the UTC offset before the gap in local times.
+      Thus, TZID=America/New_York:20070311T023000 indicates March 11,
+      2007 at 3:30 A.M. EDT (UTC-04:00), one hour after 1:30 A.M. EST
+      (UTC-05:00).
+
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 34]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      A time value MUST only specify the second 60 when specifying a
+      positive leap second.  For example:
+
+       19970630T235960Z
+
+      Implementations that do not support leap seconds SHOULD interpret
+      the second 60 as equivalent to the second 59.
+
+   Example:  The following represents July 14, 1997, at 1:30 PM in New
+      York City in each of the three time formats, using the "DTSTART"
+      property.
+
+       DTSTART:19970714T133000                   ; Local time
+       DTSTART:19970714T173000Z                  ; UTC time
+       DTSTART;TZID=America/New_York:19970714T133000
+                                                 ; Local time and time
+                                                 ; zone reference
+
+3.3.6.  Duration
+
+   Value Name:  DURATION
+
+   Purpose:  This value type is used to identify properties that contain
+      a duration of time.
+
+   Format Definition:  This value type is defined by the following
+      notation:
+
+       dur-value  = (["+"] / "-") "P" (dur-date / dur-time / dur-week)
+
+       dur-date   = dur-day [dur-time]
+       dur-time   = "T" (dur-hour / dur-minute / dur-second)
+       dur-week   = 1*DIGIT "W"
+       dur-hour   = 1*DIGIT "H" [dur-minute]
+       dur-minute = 1*DIGIT "M" [dur-second]
+       dur-second = 1*DIGIT "S"
+       dur-day    = 1*DIGIT "D"
+
+   Description:  If the property permits, multiple "duration" values are
+      specified by a COMMA-separated list of values.  The format is
+      based on the [ISO.8601.2004] complete representation basic format
+      with designators for the duration of time.  The format can
+      represent nominal durations (weeks and days) and accurate
+      durations (hours, minutes, and seconds).  Note that unlike
+      [ISO.8601.2004], this value type doesn't support the "Y" and "M"
+      designators to specify durations in terms of years and months.
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 35]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      The duration of a week or a day depends on its position in the
+      calendar.  In the case of discontinuities in the time scale, such
+      as the change from standard time to daylight time and back, the
+      computation of the exact duration requires the subtraction or
+      addition of the change of duration of the discontinuity.  Leap
+      seconds MUST NOT be considered when computing an exact duration.
+      When computing an exact duration, the greatest order time
+      components MUST be added first, that is, the number of days MUST
+      be added first, followed by the number of hours, number of
+      minutes, and number of seconds.
+
+      Negative durations are typically used to schedule an alarm to
+      trigger before an associated time (see Section 3.8.6.3).
+
+      No additional content value encoding (i.e., BACKSLASH character
+      encoding, see Section 3.3.11) are defined for this value type.
+
+   Example:  A duration of 15 days, 5 hours, and 20 seconds would be:
+
+       P15DT5H0M20S
+
+      A duration of 7 weeks would be:
+
+       P7W
+
+3.3.7.  Float
+
+   Value Name:  FLOAT
+
+   Purpose:  This value type is used to identify properties that contain
+      a real-number value.
+
+   Format Definition:  This value type is defined by the following
+      notation:
+
+       float      = (["+"] / "-") 1*DIGIT ["." 1*DIGIT]
+
+   Description:  If the property permits, multiple "float" values are
+      specified by a COMMA-separated list of values.
+
+      No additional content value encoding (i.e., BACKSLASH character
+      encoding, see Section 3.3.11) is defined for this value type.
+
+   Example:
+
+       1000000.0000001
+       1.333
+       -3.14
+
+
+
+Desruisseaux                Standards Track                    [Page 36]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+3.3.8.  Integer
+
+   Value Name:  INTEGER
+
+   Purpose:  This value type is used to identify properties that contain
+      a signed integer value.
+
+   Format Definition:  This value type is defined by the following
+      notation:
+
+       integer    = (["+"] / "-") 1*DIGIT
+
+   Description:  If the property permits, multiple "integer" values are
+      specified by a COMMA-separated list of values.  The valid range
+      for "integer" is -2147483648 to 2147483647.  If the sign is not
+      specified, then the value is assumed to be positive.
+
+      No additional content value encoding (i.e., BACKSLASH character
+      encoding, see Section 3.3.11) is defined for this value type.
+
+   Example:
+
+       1234567890
+       -1234567890
+       +1234567890
+       432109876
+
+3.3.9.  Period of Time
+
+   Value Name:  PERIOD
+
+   Purpose:  This value type is used to identify values that contain a
+      precise period of time.
+
+   Format Definition:  This value type is defined by the following
+      notation:
+
+       period     = period-explicit / period-start
+
+       period-explicit = date-time "/" date-time
+       ; [ISO.8601.2004] complete representation basic format for a
+       ; period of time consisting of a start and end.  The start MUST
+       ; be before the end.
+
+       period-start = date-time "/" dur-value
+       ; [ISO.8601.2004] complete representation basic format for a
+       ; period of time consisting of a start and positive duration
+       ; of time.
+
+
+
+Desruisseaux                Standards Track                    [Page 37]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Description:  If the property permits, multiple "period" values are
+      specified by a COMMA-separated list of values.  There are two
+      forms of a period of time.  First, a period of time is identified
+      by its start and its end.  This format is based on the
+      [ISO.8601.2004] complete representation, basic format for "DATE-
+      TIME" start of the period, followed by a SOLIDUS character
+      followed by the "DATE-TIME" of the end of the period.  The start
+      of the period MUST be before the end of the period.  Second, a
+      period of time can also be defined by a start and a positive
+      duration of time.  The format is based on the [ISO.8601.2004]
+      complete representation, basic format for the "DATE-TIME" start of
+      the period, followed by a SOLIDUS character, followed by the
+      [ISO.8601.2004] basic format for "DURATION" of the period.
+
+   Example:  The period starting at 18:00:00 UTC, on January 1, 1997 and
+      ending at 07:00:00 UTC on January 2, 1997 would be:
+
+       19970101T180000Z/19970102T070000Z
+
+      The period start at 18:00:00 on January 1, 1997 and lasting 5
+      hours and 30 minutes would be:
+
+       19970101T180000Z/PT5H30M
+
+      No additional content value encoding (i.e., BACKSLASH character
+      encoding, see Section 3.3.11) is defined for this value type.
+
+3.3.10.  Recurrence Rule
+
+   Value Name:  RECUR
+
+   Purpose:  This value type is used to identify properties that contain
+      a recurrence rule specification.
+
+   Format Definition:  This value type is defined by the following
+      notation:
+
+       recur           = recur-rule-part *( ";" recur-rule-part )
+                       ;
+                       ; The rule parts are not ordered in any
+                       ; particular sequence.
+                       ;
+                       ; The FREQ rule part is REQUIRED,
+                       ; but MUST NOT occur more than once.
+                       ;
+                       ; The UNTIL or COUNT rule parts are OPTIONAL,
+                       ; but they MUST NOT occur in the same 'recur'.
+                       ;
+
+
+
+Desruisseaux                Standards Track                    [Page 38]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+                       ; The other rule parts are OPTIONAL,
+                       ; but MUST NOT occur more than once.
+
+       recur-rule-part = ( "FREQ" "=" freq )
+                       / ( "UNTIL" "=" enddate )
+                       / ( "COUNT" "=" 1*DIGIT )
+                       / ( "INTERVAL" "=" 1*DIGIT )
+                       / ( "BYSECOND" "=" byseclist )
+                       / ( "BYMINUTE" "=" byminlist )
+                       / ( "BYHOUR" "=" byhrlist )
+                       / ( "BYDAY" "=" bywdaylist )
+                       / ( "BYMONTHDAY" "=" bymodaylist )
+                       / ( "BYYEARDAY" "=" byyrdaylist )
+                       / ( "BYWEEKNO" "=" bywknolist )
+                       / ( "BYMONTH" "=" bymolist )
+                       / ( "BYSETPOS" "=" bysplist )
+                       / ( "WKST" "=" weekday )
+
+       freq        = "SECONDLY" / "MINUTELY" / "HOURLY" / "DAILY"
+                   / "WEEKLY" / "MONTHLY" / "YEARLY"
+
+       enddate     = date / date-time
+
+       byseclist   = ( seconds *("," seconds) )
+
+       seconds     = 1*2DIGIT       ;0 to 60
+
+       byminlist   = ( minutes *("," minutes) )
+
+       minutes     = 1*2DIGIT       ;0 to 59
+
+       byhrlist    = ( hour *("," hour) )
+
+       hour        = 1*2DIGIT       ;0 to 23
+
+       bywdaylist  = ( weekdaynum *("," weekdaynum) )
+
+       weekdaynum  = [[plus / minus] ordwk] weekday
+
+       plus        = "+"
+
+       minus       = "-"
+
+       ordwk       = 1*2DIGIT       ;1 to 53
+
+       weekday     = "SU" / "MO" / "TU" / "WE" / "TH" / "FR" / "SA"
+       ;Corresponding to SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY,
+       ;FRIDAY, and SATURDAY days of the week.
+
+
+
+Desruisseaux                Standards Track                    [Page 39]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+       bymodaylist = ( monthdaynum *("," monthdaynum) )
+
+       monthdaynum = [plus / minus] ordmoday
+
+       ordmoday    = 1*2DIGIT       ;1 to 31
+
+       byyrdaylist = ( yeardaynum *("," yeardaynum) )
+
+       yeardaynum  = [plus / minus] ordyrday
+
+       ordyrday    = 1*3DIGIT      ;1 to 366
+
+       bywknolist  = ( weeknum *("," weeknum) )
+
+       weeknum     = [plus / minus] ordwk
+
+       bymolist    = ( monthnum *("," monthnum) )
+
+       monthnum    = 1*2DIGIT       ;1 to 12
+
+       bysplist    = ( setposday *("," setposday) )
+
+       setposday   = yeardaynum
+
+   Description:  This value type is a structured value consisting of a
+      list of one or more recurrence grammar parts.  Each rule part is
+      defined by a NAME=VALUE pair.  The rule parts are separated from
+      each other by the SEMICOLON character.  The rule parts are not
+      ordered in any particular sequence.  Individual rule parts MUST
+      only be specified once.  Compliant applications MUST accept rule
+      parts ordered in any sequence, but to ensure backward
+      compatibility with applications that pre-date this revision of
+      iCalendar the FREQ rule part MUST be the first rule part specified
+      in a RECUR value.
+
+      The FREQ rule part identifies the type of recurrence rule.  This
+      rule part MUST be specified in the recurrence rule.  Valid values
+      include SECONDLY, to specify repeating events based on an interval
+      of a second or more; MINUTELY, to specify repeating events based
+      on an interval of a minute or more; HOURLY, to specify repeating
+      events based on an interval of an hour or more; DAILY, to specify
+      repeating events based on an interval of a day or more; WEEKLY, to
+      specify repeating events based on an interval of a week or more;
+      MONTHLY, to specify repeating events based on an interval of a
+      month or more; and YEARLY, to specify repeating events based on an
+      interval of a year or more.
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 40]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      The INTERVAL rule part contains a positive integer representing at
+      which intervals the recurrence rule repeats.  The default value is
+      "1", meaning every second for a SECONDLY rule, every minute for a
+      MINUTELY rule, every hour for an HOURLY rule, every day for a
+      DAILY rule, every week for a WEEKLY rule, every month for a
+      MONTHLY rule, and every year for a YEARLY rule.  For example,
+      within a DAILY rule, a value of "8" means every eight days.
+
+      The UNTIL rule part defines a DATE or DATE-TIME value that bounds
+      the recurrence rule in an inclusive manner.  If the value
+      specified by UNTIL is synchronized with the specified recurrence,
+      this DATE or DATE-TIME becomes the last instance of the
+      recurrence.  The value of the UNTIL rule part MUST have the same
+      value type as the "DTSTART" property.  Furthermore, if the
+      "DTSTART" property is specified as a date with local time, then
+      the UNTIL rule part MUST also be specified as a date with local
+      time.  If the "DTSTART" property is specified as a date with UTC
+      time or a date with local time and time zone reference, then the
+      UNTIL rule part MUST be specified as a date with UTC time.  In the
+      case of the "STANDARD" and "DAYLIGHT" sub-components the UNTIL
+      rule part MUST always be specified as a date with UTC time.  If
+      specified as a DATE-TIME value, then it MUST be specified in a UTC
+      time format.  If not present, and the COUNT rule part is also not
+      present, the "RRULE" is considered to repeat forever.
+
+      The COUNT rule part defines the number of occurrences at which to
+      range-bound the recurrence.  The "DTSTART" property value always
+      counts as the first occurrence.
+
+      The BYSECOND rule part specifies a COMMA-separated list of seconds
+      within a minute.  Valid values are 0 to 60.  The BYMINUTE rule
+      part specifies a COMMA-separated list of minutes within an hour.
+      Valid values are 0 to 59.  The BYHOUR rule part specifies a COMMA-
+      separated list of hours of the day.  Valid values are 0 to 23.
+      The BYSECOND, BYMINUTE and BYHOUR rule parts MUST NOT be specified
+      when the associated "DTSTART" property has a DATE value type.
+      These rule parts MUST be ignored in RECUR value that violate the
+      above requirement (e.g., generated by applications that pre-date
+      this revision of iCalendar).
+
+      The BYDAY rule part specifies a COMMA-separated list of days of
+      the week; SU indicates Sunday; MO indicates Monday; TU indicates
+      Tuesday; WE indicates Wednesday; TH indicates Thursday; FR
+      indicates Friday; and SA indicates Saturday.
+
+      Each BYDAY value can also be preceded by a positive (+n) or
+      negative (-n) integer.  If present, this indicates the nth
+      occurrence of a specific day within the MONTHLY or YEARLY "RRULE".
+
+
+
+Desruisseaux                Standards Track                    [Page 41]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      For example, within a MONTHLY rule, +1MO (or simply 1MO)
+      represents the first Monday within the month, whereas -1MO
+      represents the last Monday of the month.  The numeric value in a
+      BYDAY rule part with the FREQ rule part set to YEARLY corresponds
+      to an offset within the month when the BYMONTH rule part is
+      present, and corresponds to an offset within the year when the
+      BYWEEKNO or BYMONTH rule parts are present.  If an integer
+      modifier is not present, it means all days of this type within the
+      specified frequency.  For example, within a MONTHLY rule, MO
+      represents all Mondays within the month.  The BYDAY rule part MUST
+      NOT be specified with a numeric value when the FREQ rule part is
+      not set to MONTHLY or YEARLY.  Furthermore, the BYDAY rule part
+      MUST NOT be specified with a numeric value with the FREQ rule part
+      set to YEARLY when the BYWEEKNO rule part is specified.
+
+      The BYMONTHDAY rule part specifies a COMMA-separated list of days
+      of the month.  Valid values are 1 to 31 or -31 to -1.  For
+      example, -10 represents the tenth to the last day of the month.
+      The BYMONTHDAY rule part MUST NOT be specified when the FREQ rule
+      part is set to WEEKLY.
+
+      The BYYEARDAY rule part specifies a COMMA-separated list of days
+      of the year.  Valid values are 1 to 366 or -366 to -1.  For
+      example, -1 represents the last day of the year (December 31st)
+      and -306 represents the 306th to the last day of the year (March
+      1st).  The BYYEARDAY rule part MUST NOT be specified when the FREQ
+      rule part is set to DAILY, WEEKLY, or MONTHLY.
+
+      The BYWEEKNO rule part specifies a COMMA-separated list of
+      ordinals specifying weeks of the year.  Valid values are 1 to 53
+      or -53 to -1.  This corresponds to weeks according to week
+      numbering as defined in [ISO.8601.2004].  A week is defined as a
+      seven day period, starting on the day of the week defined to be
+      the week start (see WKST).  Week number one of the calendar year
+      is the first week that contains at least four (4) days in that
+      calendar year.  This rule part MUST NOT be used when the FREQ rule
+      part is set to anything other than YEARLY.  For example, 3
+      represents the third week of the year.
+
+         Note: Assuming a Monday week start, week 53 can only occur when
+         Thursday is January 1 or if it is a leap year and Wednesday is
+         January 1.
+
+      The BYMONTH rule part specifies a COMMA-separated list of months
+      of the year.  Valid values are 1 to 12.
+
+      The WKST rule part specifies the day on which the workweek starts.
+      Valid values are MO, TU, WE, TH, FR, SA, and SU.  This is
+
+
+
+Desruisseaux                Standards Track                    [Page 42]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      significant when a WEEKLY "RRULE" has an interval greater than 1,
+      and a BYDAY rule part is specified.  This is also significant when
+      in a YEARLY "RRULE" when a BYWEEKNO rule part is specified.  The
+      default value is MO.
+
+      The BYSETPOS rule part specifies a COMMA-separated list of values
+      that corresponds to the nth occurrence within the set of
+      recurrence instances specified by the rule.  BYSETPOS operates on
+      a set of recurrence instances in one interval of the recurrence
+      rule.  For example, in a WEEKLY rule, the interval would be one
+      week A set of recurrence instances starts at the beginning of the
+      interval defined by the FREQ rule part.  Valid values are 1 to 366
+      or -366 to -1.  It MUST only be used in conjunction with another
+      BYxxx rule part.  For example "the last work day of the month"
+      could be represented as:
+
+       FREQ=MONTHLY;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-1
+
+      Each BYSETPOS value can include a positive (+n) or negative (-n)
+      integer.  If present, this indicates the nth occurrence of the
+      specific occurrence within the set of occurrences specified by the
+      rule.
+
+      Recurrence rules may generate recurrence instances with an invalid
+      date (e.g., February 30) or nonexistent local time (e.g., 1:30 AM
+      on a day where the local time is moved forward by an hour at 1:00
+      AM).  Such recurrence instances MUST be ignored and MUST NOT be
+      counted as part of the recurrence set.
+
+      Information, not contained in the rule, necessary to determine the
+      various recurrence instance start time and dates are derived from
+      the Start Time ("DTSTART") component attribute.  For example,
+      "FREQ=YEARLY;BYMONTH=1" doesn't specify a specific day within the
+      month or a time.  This information would be the same as what is
+      specified for "DTSTART".
+
+      BYxxx rule parts modify the recurrence in some manner.  BYxxx rule
+      parts for a period of time that is the same or greater than the
+      frequency generally reduce or limit the number of occurrences of
+      the recurrence generated.  For example, "FREQ=DAILY;BYMONTH=1"
+      reduces the number of recurrence instances from all days (if
+      BYMONTH rule part is not present) to all days in January.  BYxxx
+      rule parts for a period of time less than the frequency generally
+      increase or expand the number of occurrences of the recurrence.
+      For example, "FREQ=YEARLY;BYMONTH=1,2" increases the number of
+      days within the yearly recurrence set from 1 (if BYMONTH rule part
+      is not present) to 2.
+
+
+
+
+Desruisseaux                Standards Track                    [Page 43]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      If multiple BYxxx rule parts are specified, then after evaluating
+      the specified FREQ and INTERVAL rule parts, the BYxxx rule parts
+      are applied to the current set of evaluated occurrences in the
+      following order: BYMONTH, BYWEEKNO, BYYEARDAY, BYMONTHDAY, BYDAY,
+      BYHOUR, BYMINUTE, BYSECOND and BYSETPOS; then COUNT and UNTIL are
+      evaluated.
+
+      The table below summarizes the dependency of BYxxx rule part
+      expand or limit behavior on the FREQ rule part value.
+
+      The term "N/A" means that the corresponding BYxxx rule part MUST
+      NOT be used with the corresponding FREQ value.
+
+      BYDAY has some special behavior depending on the FREQ value and
+      this is described in separate notes below the table.
+
+   +----------+--------+--------+-------+-------+------+-------+------+
+   |          |SECONDLY|MINUTELY|HOURLY |DAILY  |WEEKLY|MONTHLY|YEARLY|
+   +----------+--------+--------+-------+-------+------+-------+------+
+   |BYMONTH   |Limit   |Limit   |Limit  |Limit  |Limit |Limit  |Expand|
+   +----------+--------+--------+-------+-------+------+-------+------+
+   |BYWEEKNO  |N/A     |N/A     |N/A    |N/A    |N/A   |N/A    |Expand|
+   +----------+--------+--------+-------+-------+------+-------+------+
+   |BYYEARDAY |Limit   |Limit   |Limit  |N/A    |N/A   |N/A    |Expand|
+   +----------+--------+--------+-------+-------+------+-------+------+
+   |BYMONTHDAY|Limit   |Limit   |Limit  |Limit  |N/A   |Expand |Expand|
+   +----------+--------+--------+-------+-------+------+-------+------+
+   |BYDAY     |Limit   |Limit   |Limit  |Limit  |Expand|Note 1 |Note 2|
+   +----------+--------+--------+-------+-------+------+-------+------+
+   |BYHOUR    |Limit   |Limit   |Limit  |Expand |Expand|Expand |Expand|
+   +----------+--------+--------+-------+-------+------+-------+------+
+   |BYMINUTE  |Limit   |Limit   |Expand |Expand |Expand|Expand |Expand|
+   +----------+--------+--------+-------+-------+------+-------+------+
+   |BYSECOND  |Limit   |Expand  |Expand |Expand |Expand|Expand |Expand|
+   +----------+--------+--------+-------+-------+------+-------+------+
+   |BYSETPOS  |Limit   |Limit   |Limit  |Limit  |Limit |Limit  |Limit |
+   +----------+--------+--------+-------+-------+------+-------+------+
+
+      Note 1:  Limit if BYMONTHDAY is present; otherwise, special expand
+               for MONTHLY.
+
+      Note 2:  Limit if BYYEARDAY or BYMONTHDAY is present; otherwise,
+               special expand for WEEKLY if BYWEEKNO present; otherwise,
+               special expand for MONTHLY if BYMONTH present; otherwise,
+               special expand for YEARLY.
+
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 44]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      Here is an example of evaluating multiple BYxxx rule parts.
+
+       DTSTART;TZID=America/New_York:19970105T083000
+       RRULE:FREQ=YEARLY;INTERVAL=2;BYMONTH=1;BYDAY=SU;BYHOUR=8,9;
+        BYMINUTE=30
+
+      First, the "INTERVAL=2" would be applied to "FREQ=YEARLY" to
+      arrive at "every other year".  Then, "BYMONTH=1" would be applied
+      to arrive at "every January, every other year".  Then, "BYDAY=SU"
+      would be applied to arrive at "every Sunday in January, every
+      other year".  Then, "BYHOUR=8,9" would be applied to arrive at
+      "every Sunday in January at 8 AM and 9 AM, every other year".
+      Then, "BYMINUTE=30" would be applied to arrive at "every Sunday in
+      January at 8:30 AM and 9:30 AM, every other year".  Then, lacking
+      information from "RRULE", the second is derived from "DTSTART", to
+      end up in "every Sunday in January at 8:30:00 AM and 9:30:00 AM,
+      every other year".  Similarly, if the BYMINUTE, BYHOUR, BYDAY,
+      BYMONTHDAY, or BYMONTH rule part were missing, the appropriate
+      minute, hour, day, or month would have been retrieved from the
+      "DTSTART" property.
+
+      If the computed local start time of a recurrence instance does not
+      exist, or occurs more than once, for the specified time zone, the
+      time of the recurrence instance is interpreted in the same manner
+      as an explicit DATE-TIME value describing that date and time, as
+      specified in Section 3.3.5.
+
+      No additional content value encoding (i.e., BACKSLASH character
+      encoding, see Section 3.3.11) is defined for this value type.
+
+   Example:  The following is a rule that specifies 10 occurrences that
+      occur every other day:
+
+       FREQ=DAILY;COUNT=10;INTERVAL=2
+
+      There are other examples specified in Section 3.8.5.3.
+
+3.3.11.  Text
+
+   Value Name:  TEXT
+
+   Purpose:  This value type is used to identify values that contain
+      human-readable text.
+
+   Format Definition:  This value type is defined by the following
+      notation:
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 45]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+       text       = *(TSAFE-CHAR / ":" / DQUOTE / ESCAPED-CHAR)
+          ; Folded according to description above
+
+       ESCAPED-CHAR = ("\\" / "\;" / "\," / "\N" / "\n")
+          ; \\ encodes \, \N or \n encodes newline
+          ; \; encodes ;, \, encodes ,
+
+       TSAFE-CHAR = WSP / %x21 / %x23-2B / %x2D-39 / %x3C-5B /
+                    %x5D-7E / NON-US-ASCII
+          ; Any character except CONTROLs not needed by the current
+          ; character set, DQUOTE, ";", ":", "\", ","
+
+   Description:  If the property permits, multiple TEXT values are
+      specified by a COMMA-separated list of values.
+
+      The language in which the text is represented can be controlled by
+      the "LANGUAGE" property parameter.
+
+      An intentional formatted text line break MUST only be included in
+      a "TEXT" property value by representing the line break with the
+      character sequence of BACKSLASH, followed by a LATIN SMALL LETTER
+      N or a LATIN CAPITAL LETTER N, that is "\n" or "\N".
+
+      The "TEXT" property values may also contain special characters
+      that are used to signify delimiters, such as a COMMA character for
+      lists of values or a SEMICOLON character for structured values.
+      In order to support the inclusion of these special characters in
+      "TEXT" property values, they MUST be escaped with a BACKSLASH
+      character.  A BACKSLASH character in a "TEXT" property value MUST
+      be escaped with another BACKSLASH character.  A COMMA character in
+      a "TEXT" property value MUST be escaped with a BACKSLASH
+      character.  A SEMICOLON character in a "TEXT" property value MUST
+      be escaped with a BACKSLASH character.  However, a COLON character
+      in a "TEXT" property value SHALL NOT be escaped with a BACKSLASH
+      character.
+
+   Example:  A multiple line value of:
+
+       Project XYZ Final Review
+       Conference Room - 3B
+       Come Prepared.
+
+      would be represented as:
+
+       Project XYZ Final Review\nConference Room - 3B\nCome Prepared.
+
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 46]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+3.3.12.  Time
+
+   Value Name:  TIME
+
+   Purpose:  This value type is used to identify values that contain a
+      time of day.
+
+   Format Definition:  This value type is defined by the following
+      notation:
+
+       time         = time-hour time-minute time-second [time-utc]
+
+       time-hour    = 2DIGIT        ;00-23
+       time-minute  = 2DIGIT        ;00-59
+       time-second  = 2DIGIT        ;00-60
+       ;The "60" value is used to account for positive "leap" seconds.
+
+       time-utc     = "Z"
+
+   Description:  If the property permits, multiple "time" values are
+      specified by a COMMA-separated list of values.  No additional
+      content value encoding (i.e., BACKSLASH character encoding, see
+      Section 3.3.11) is defined for this value type.
+
+      The "TIME" value type is used to identify values that contain a
+      time of day.  The format is based on the [ISO.8601.2004] complete
+      representation, basic format for a time of day.  The text format
+      consists of a two-digit, 24-hour of the day (i.e., values 00-23),
+      two-digit minute in the hour (i.e., values 00-59), and two-digit
+      seconds in the minute (i.e., values 00-60).  The seconds value of
+      60 MUST only be used to account for positive "leap" seconds.
+      Fractions of a second are not supported by this format.
+
+      In parallel to the "DATE-TIME" definition above, the "TIME" value
+      type expresses time values in three forms:
+
+      The form of time with UTC offset MUST NOT be used.  For example,
+      the following is not valid for a time value:
+
+       230000-0800        ;Invalid time format
+
+      FORM #1 LOCAL TIME
+
+      The local time form is simply a time value that does not contain
+      the UTC designator nor does it reference a time zone.  For
+      example, 11:00 PM:
+
+       230000
+
+
+
+Desruisseaux                Standards Track                    [Page 47]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      Time values of this type are said to be "floating" and are not
+      bound to any time zone in particular.  They are used to represent
+      the same hour, minute, and second value regardless of which time
+      zone is currently being observed.  For example, an event can be
+      defined that indicates that an individual will be busy from 11:00
+      AM to 1:00 PM every day, no matter which time zone the person is
+      in.  In these cases, a local time can be specified.  The recipient
+      of an iCalendar object with a property value consisting of a local
+      time, without any relative time zone information, SHOULD interpret
+      the value as being fixed to whatever time zone the "ATTENDEE" is
+      in at any given moment.  This means that two "Attendees", may
+      participate in the same event at different UTC times; floating
+      time SHOULD only be used where that is reasonable behavior.
+
+      In most cases, a fixed time is desired.  To properly communicate a
+      fixed time in a property value, either UTC time or local time with
+      time zone reference MUST be specified.
+
+      The use of local time in a TIME value without the "TZID" property
+      parameter is to be interpreted as floating time, regardless of the
+      existence of "VTIMEZONE" calendar components in the iCalendar
+      object.
+
+      FORM #2: UTC TIME
+
+      UTC time, or absolute time, is identified by a LATIN CAPITAL
+      LETTER Z suffix character, the UTC designator, appended to the
+      time value.  For example, the following represents 07:00 AM UTC:
+
+       070000Z
+
+      The "TZID" property parameter MUST NOT be applied to TIME
+      properties whose time values are specified in UTC.
+
+      FORM #3: LOCAL TIME AND TIME ZONE REFERENCE
+
+      The local time with reference to time zone information form is
+      identified by the use the "TZID" property parameter to reference
+      the appropriate time zone definition.  "TZID" is discussed in
+      detail in Section 3.2.19.
+
+   Example:  The following represents 8:30 AM in New York in winter,
+      five hours behind UTC, in each of the three formats:
+
+       083000
+       133000Z
+       TZID=America/New_York:083000
+
+
+
+
+Desruisseaux                Standards Track                    [Page 48]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+3.3.13.  URI
+
+   Value Name:  URI
+
+   Purpose:  This value type is used to identify values that contain a
+      uniform resource identifier (URI) type of reference to the
+      property value.
+
+   Format Definition:  This value type is defined by the following
+      notation:
+
+       uri = <As defined in Section 3 of [RFC3986]>
+
+   Description:  This value type might be used to reference binary
+      information, for values that are large, or otherwise undesirable
+      to include directly in the iCalendar object.
+
+      Property values with this value type MUST follow the generic URI
+      syntax defined in [RFC3986].
+
+      When a property parameter value is a URI value type, the URI MUST
+      be specified as a quoted-string value.
+
+      No additional content value encoding (i.e., BACKSLASH character
+      encoding, see Section 3.3.11) is defined for this value type.
+
+   Example:  The following is a URI for a network file:
+
+       http://example.com/my-report.txt
+
+3.3.14.  UTC Offset
+
+   Value Name:  UTC-OFFSET
+
+   Purpose:  This value type is used to identify properties that contain
+      an offset from UTC to local time.
+
+   Format Definition:  This value type is defined by the following
+      notation:
+
+       utc-offset = time-numzone
+
+       time-numzone = ("+" / "-") time-hour time-minute [time-second]
+
+   Description:  The PLUS SIGN character MUST be specified for positive
+      UTC offsets (i.e., ahead of UTC).  The HYPHEN-MINUS character MUST
+      be specified for negative UTC offsets (i.e., behind of UTC).  The
+
+
+
+
+Desruisseaux                Standards Track                    [Page 49]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      value of "-0000" and "-000000" are not allowed.  The time-second,
+      if present, MUST NOT be 60; if absent, it defaults to zero.
+
+      No additional content value encoding (i.e., BACKSLASH character
+      encoding, see Section 3.3.11) is defined for this value type.
+
+   Example:  The following UTC offsets are given for standard time for
+      New York (five hours behind UTC) and Geneva (one hour ahead of
+      UTC):
+
+       -0500
+
+       +0100
+
+3.4.  iCalendar Object
+
+   The Calendaring and Scheduling Core Object is a collection of
+   calendaring and scheduling information.  Typically, this information
+   will consist of an iCalendar stream with a single iCalendar object.
+   However, multiple iCalendar objects can be sequentially grouped
+   together in an iCalendar stream.  The first line and last line of the
+   iCalendar object MUST contain a pair of iCalendar object delimiter
+   strings.  The syntax for an iCalendar stream is as follows:
+
+       icalstream = 1*icalobject
+
+       icalobject = "BEGIN" ":" "VCALENDAR" CRLF
+                    icalbody
+                    "END" ":" "VCALENDAR" CRLF
+
+   The following is a simple example of an iCalendar object:
+
+       BEGIN:VCALENDAR
+       VERSION:2.0
+       PRODID:-//hacksw/handcal//NONSGML v1.0//EN
+       BEGIN:VEVENT
+       UID:19970610T172345Z-AF23B2 at example.com
+       DTSTAMP:19970610T172345Z
+       DTSTART:19970714T170000Z
+       DTEND:19970715T040000Z
+       SUMMARY:Bastille Day Party
+       END:VEVENT
+       END:VCALENDAR
+
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 50]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+3.5.  Property
+
+   A property is the definition of an individual attribute describing a
+   calendar object or a calendar component.  A property takes the form
+   defined by the "contentline" notation defined in Section 3.1.
+
+   The following is an example of a property:
+
+       DTSTART:19960415T133000Z
+
+   This memo imposes no ordering of properties within an iCalendar
+   object.
+
+   Property names, parameter names, and enumerated parameter values are
+   case-insensitive.  For example, the property name "DUE" is the same
+   as "due" and "Due", DTSTART;TZID=America/New_York:19980714T120000 is
+   the same as DtStart;TzID=America/New_York:19980714T120000.
+
+3.6.  Calendar Components
+
+   The body of the iCalendar object consists of a sequence of calendar
+   properties and one or more calendar components.  The calendar
+   properties are attributes that apply to the calendar object as a
+   whole.  The calendar components are collections of properties that
+   express a particular calendar semantic.  For example, the calendar
+   component can specify an event, a to-do, a journal entry, time zone
+   information, free/busy time information, or an alarm.
+
+   The body of the iCalendar object is defined by the following
+   notation:
+
+       icalbody   = calprops component
+
+       calprops   = *(
+                  ;
+                  ; The following are REQUIRED,
+                  ; but MUST NOT occur more than once.
+                  ;
+                  prodid / version /
+                  ;
+                  ; The following are OPTIONAL,
+                  ; but MUST NOT occur more than once.
+                  ;
+                  calscale / method /
+                  ;
+                  ; The following are OPTIONAL,
+                  ; and MAY occur more than once.
+                  ;
+
+
+
+Desruisseaux                Standards Track                    [Page 51]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+                  x-prop / iana-prop
+                  ;
+                  )
+
+       component  = 1*(eventc / todoc / journalc / freebusyc /
+                    timezonec / iana-comp / x-comp)
+
+       iana-comp  = "BEGIN" ":" iana-token CRLF
+                    1*contentline
+                    "END" ":" iana-token CRLF
+
+       x-comp     = "BEGIN" ":" x-name CRLF
+                    1*contentline
+                    "END" ":" x-name CRLF
+
+   An iCalendar object MUST include the "PRODID" and "VERSION" calendar
+   properties.  In addition, it MUST include at least one calendar
+   component.  Special forms of iCalendar objects are possible to
+   publish just busy time (i.e., only a "VFREEBUSY" calendar component)
+   or time zone (i.e., only a "VTIMEZONE" calendar component)
+   information.  In addition, a complex iCalendar object that is used to
+   capture a complete snapshot of the contents of a calendar is possible
+   (e.g., composite of many different calendar components).  More
+   commonly, an iCalendar object will consist of just a single "VEVENT",
+   "VTODO", or "VJOURNAL" calendar component.  Applications MUST ignore
+   x-comp and iana-comp values they don't recognize.  Applications that
+   support importing iCalendar objects SHOULD support all of the
+   component types defined in this document, and SHOULD NOT silently
+   drop any components as that can lead to user data loss.
+
+3.6.1.  Event Component
+
+   Component Name:  VEVENT
+
+   Purpose:  Provide a grouping of component properties that describe an
+      event.
+
+   Format Definition:  A "VEVENT" calendar component is defined by the
+      following notation:
+
+       eventc     = "BEGIN" ":" "VEVENT" CRLF
+                    eventprop *alarmc
+                    "END" ":" "VEVENT" CRLF
+
+       eventprop  = *(
+                  ;
+                  ; The following are REQUIRED,
+                  ; but MUST NOT occur more than once.
+
+
+
+Desruisseaux                Standards Track                    [Page 52]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+                  ;
+                  dtstamp / uid /
+                  ;
+                  ; The following is REQUIRED if the component
+                  ; appears in an iCalendar object that doesn't
+                  ; specify the "METHOD" property; otherwise, it
+                  ; is OPTIONAL; in any case, it MUST NOT occur
+                  ; more than once.
+                  ;
+                  dtstart /
+                  ;
+                  ; The following are OPTIONAL,
+                  ; but MUST NOT occur more than once.
+                  ;
+                  class / created / description / geo /
+                  last-mod / location / organizer / priority /
+                  seq / status / summary / transp /
+                  url / recurid /
+                  ;
+                  ; The following is OPTIONAL,
+                  ; but SHOULD NOT occur more than once.
+                  ;
+                  rrule /
+                  ;
+                  ; Either 'dtend' or 'duration' MAY appear in
+                  ; a 'eventprop', but 'dtend' and 'duration'
+                  ; MUST NOT occur in the same 'eventprop'.
+                  ;
+                  dtend / duration /
+                  ;
+                  ; The following are OPTIONAL,
+                  ; and MAY occur more than once.
+                  ;
+                  attach / attendee / categories / comment /
+                  contact / exdate / rstatus / related /
+                  resources / rdate / x-prop / iana-prop
+                  ;
+                  )
+
+   Description:  A "VEVENT" calendar component is a grouping of
+      component properties, possibly including "VALARM" calendar
+      components, that represents a scheduled amount of time on a
+      calendar.  For example, it can be an activity; such as a one-hour
+      long, department meeting from 8:00 AM to 9:00 AM, tomorrow.
+      Generally, an event will take up time on an individual calendar.
+      Hence, the event will appear as an opaque interval in a search for
+      busy time.  Alternately, the event can have its Time Transparency
+
+
+
+
+Desruisseaux                Standards Track                    [Page 53]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      set to "TRANSPARENT" in order to prevent blocking of the event in
+      searches for busy time.
+
+      The "VEVENT" is also the calendar component used to specify an
+      anniversary or daily reminder within a calendar.  These events
+      have a DATE value type for the "DTSTART" property instead of the
+      default value type of DATE-TIME.  If such a "VEVENT" has a "DTEND"
+      property, it MUST be specified as a DATE value also.  The
+      anniversary type of "VEVENT" can span more than one date (i.e.,
+      "DTEND" property value is set to a calendar date after the
+      "DTSTART" property value).  If such a "VEVENT" has a "DURATION"
+      property, it MUST be specified as a "dur-day" or "dur-week" value.
+
+      The "DTSTART" property for a "VEVENT" specifies the inclusive
+      start of the event.  For recurring events, it also specifies the
+      very first instance in the recurrence set.  The "DTEND" property
+      for a "VEVENT" calendar component specifies the non-inclusive end
+      of the event.  For cases where a "VEVENT" calendar component
+      specifies a "DTSTART" property with a DATE value type but no
+      "DTEND" nor "DURATION" property, the event's duration is taken to
+      be one day.  For cases where a "VEVENT" calendar component
+      specifies a "DTSTART" property with a DATE-TIME value type but no
+      "DTEND" property, the event ends on the same calendar date and
+      time of day specified by the "DTSTART" property.
+
+      The "VEVENT" calendar component cannot be nested within another
+      calendar component.  However, "VEVENT" calendar components can be
+      related to each other or to a "VTODO" or to a "VJOURNAL" calendar
+      component with the "RELATED-TO" property.
+
+   Example:  The following is an example of the "VEVENT" calendar
+      component used to represent a meeting that will also be opaque to
+      searches for busy time:
+
+       BEGIN:VEVENT
+       UID:19970901T130000Z-123401 at example.com
+       DTSTAMP:19970901T130000Z
+       DTSTART:19970903T163000Z
+       DTEND:19970903T190000Z
+       SUMMARY:Annual Employee Review
+       CLASS:PRIVATE
+       CATEGORIES:BUSINESS,HUMAN RESOURCES
+       END:VEVENT
+
+      The following is an example of the "VEVENT" calendar component
+      used to represent a reminder that will not be opaque, but rather
+      transparent, to searches for busy time:
+
+
+
+
+Desruisseaux                Standards Track                    [Page 54]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+       BEGIN:VEVENT
+       UID:19970901T130000Z-123402 at example.com
+       DTSTAMP:19970901T130000Z
+       DTSTART:19970401T163000Z
+       DTEND:19970402T010000Z
+       SUMMARY:Laurel is in sensitivity awareness class.
+       CLASS:PUBLIC
+       CATEGORIES:BUSINESS,HUMAN RESOURCES
+       TRANSP:TRANSPARENT
+       END:VEVENT
+
+      The following is an example of the "VEVENT" calendar component
+      used to represent an anniversary that will occur annually:
+
+       BEGIN:VEVENT
+       UID:19970901T130000Z-123403 at example.com
+       DTSTAMP:19970901T130000Z
+       DTSTART;VALUE=DATE:19971102
+       SUMMARY:Our Blissful Anniversary
+       TRANSP:TRANSPARENT
+       CLASS:CONFIDENTIAL
+       CATEGORIES:ANNIVERSARY,PERSONAL,SPECIAL OCCASION
+       RRULE:FREQ=YEARLY
+       END:VEVENT
+
+      The following is an example of the "VEVENT" calendar component
+      used to represent a multi-day event scheduled from June 28th, 2007
+      to July 8th, 2007 inclusively.  Note that the "DTEND" property is
+      set to July 9th, 2007, since the "DTEND" property specifies the
+      non-inclusive end of the event.
+
+       BEGIN:VEVENT
+       UID:20070423T123432Z-541111 at example.com
+       DTSTAMP:20070423T123432Z
+       DTSTART;VALUE=DATE:20070628
+       DTEND;VALUE=DATE:20070709
+       SUMMARY:Festival International de Jazz de Montreal
+       TRANSP:TRANSPARENT
+       END:VEVENT
+
+3.6.2.  To-Do Component
+
+   Component Name:  VTODO
+
+   Purpose:  Provide a grouping of calendar properties that describe a
+      to-do.
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 55]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Format Definition:  A "VTODO" calendar component is defined by the
+      following notation:
+
+       todoc      = "BEGIN" ":" "VTODO" CRLF
+                    todoprop *alarmc
+                    "END" ":" "VTODO" CRLF
+
+       todoprop   = *(
+                  ;
+                  ; The following are REQUIRED,
+                  ; but MUST NOT occur more than once.
+                  ;
+                  dtstamp / uid /
+                  ;
+                  ; The following are OPTIONAL,
+                  ; but MUST NOT occur more than once.
+                  ;
+                  class / completed / created / description /
+                  dtstart / geo / last-mod / location / organizer /
+                  percent / priority / recurid / seq / status /
+                  summary / url /
+                  ;
+                  ; The following is OPTIONAL,
+                  ; but SHOULD NOT occur more than once.
+                  ;
+                  rrule /
+                  ;
+                  ; Either 'due' or 'duration' MAY appear in
+                  ; a 'todoprop', but 'due' and 'duration'
+                  ; MUST NOT occur in the same 'todoprop'.
+                  ; If 'duration' appear in a 'todoprop',
+                  ; then 'dtstart' MUST also appear in
+                  ; the same 'todoprop'.
+                  ;
+                  due / duration /
+                  ;
+                  ; The following are OPTIONAL,
+                  ; and MAY occur more than once.
+                  ;
+                  attach / attendee / categories / comment / contact /
+                  exdate / rstatus / related / resources /
+                  rdate / x-prop / iana-prop
+                  ;
+                  )
+
+   Description:  A "VTODO" calendar component is a grouping of component
+      properties and possibly "VALARM" calendar components that
+      represent an action-item or assignment.  For example, it can be
+
+
+
+Desruisseaux                Standards Track                    [Page 56]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      used to represent an item of work assigned to an individual; such
+      as "turn in travel expense today".
+
+      The "VTODO" calendar component cannot be nested within another
+      calendar component.  However, "VTODO" calendar components can be
+      related to each other or to a "VEVENT" or to a "VJOURNAL" calendar
+      component with the "RELATED-TO" property.
+
+      A "VTODO" calendar component without the "DTSTART" and "DUE" (or
+      "DURATION") properties specifies a to-do that will be associated
+      with each successive calendar date, until it is completed.
+
+   Examples:  The following is an example of a "VTODO" calendar
+      component that needs to be completed before May 1st, 2007.  On
+      midnight May 1st, 2007 this to-do would be considered overdue.
+
+       BEGIN:VTODO
+       UID:20070313T123432Z-456553 at example.com
+       DTSTAMP:20070313T123432Z
+       DUE;VALUE=DATE:20070501
+       SUMMARY:Submit Quebec Income Tax Return for 2006
+       CLASS:CONFIDENTIAL
+       CATEGORIES:FAMILY,FINANCE
+       STATUS:NEEDS-ACTION
+       END:VTODO
+
+      The following is an example of a "VTODO" calendar component that
+      was due before 1:00 P.M. UTC on July 9th, 2007 and was completed
+      on July 7th, 2007 at 10:00 A.M. UTC.
+
+       BEGIN:VTODO
+       UID:20070514T103211Z-123404 at example.com
+       DTSTAMP:20070514T103211Z
+       DTSTART:20070514T110000Z
+       DUE:20070709T130000Z
+       COMPLETED:20070707T100000Z
+       SUMMARY:Submit Revised Internet-Draft
+       PRIORITY:1
+       STATUS:NEEDS-ACTION
+       END:VTODO
+
+3.6.3.  Journal Component
+
+   Component Name:  VJOURNAL
+
+   Purpose:  Provide a grouping of component properties that describe a
+      journal entry.
+
+
+
+
+Desruisseaux                Standards Track                    [Page 57]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Format Definition:  A "VJOURNAL" calendar component is defined by the
+      following notation:
+
+       journalc   = "BEGIN" ":" "VJOURNAL" CRLF
+                    jourprop
+                    "END" ":" "VJOURNAL" CRLF
+
+       jourprop   = *(
+                  ;
+                  ; The following are REQUIRED,
+                  ; but MUST NOT occur more than once.
+                  ;
+                  dtstamp / uid /
+                  ;
+                  ; The following are OPTIONAL,
+                  ; but MUST NOT occur more than once.
+                  ;
+                  class / created / dtstart /
+                  last-mod / organizer / recurid / seq /
+                  status / summary / url /
+                  ;
+                  ; The following is OPTIONAL,
+                  ; but SHOULD NOT occur more than once.
+                  ;
+                  rrule /
+                  ;
+                  ; The following are OPTIONAL,
+                  ; and MAY occur more than once.
+                  ;
+                  attach / attendee / categories / comment /
+                  contact / description / exdate / related / rdate /
+                  rstatus / x-prop / iana-prop
+                  ;
+                  )
+
+   Description:  A "VJOURNAL" calendar component is a grouping of
+      component properties that represent one or more descriptive text
+      notes associated with a particular calendar date.  The "DTSTART"
+      property is used to specify the calendar date with which the
+      journal entry is associated.  Generally, it will have a DATE value
+      data type, but it can also be used to specify a DATE-TIME value
+      data type.  Examples of a journal entry include a daily record of
+      a legislative body or a journal entry of individual telephone
+      contacts for the day or an ordered list of accomplishments for the
+      day.  The "VJOURNAL" calendar component can also be used to
+      associate a document with a calendar date.
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 58]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      The "VJOURNAL" calendar component does not take up time on a
+      calendar.  Hence, it does not play a role in free or busy time
+      searches -- it is as though it has a time transparency value of
+      TRANSPARENT.  It is transparent to any such searches.
+
+      The "VJOURNAL" calendar component cannot be nested within another
+      calendar component.  However, "VJOURNAL" calendar components can
+      be related to each other or to a "VEVENT" or to a "VTODO" calendar
+      component, with the "RELATED-TO" property.
+
+   Example:  The following is an example of the "VJOURNAL" calendar
+      component:
+
+       BEGIN:VJOURNAL
+       UID:19970901T130000Z-123405 at example.com
+       DTSTAMP:19970901T130000Z
+       DTSTART;VALUE=DATE:19970317
+       SUMMARY:Staff meeting minutes
+       DESCRIPTION:1. Staff meeting: Participants include Joe\,
+         Lisa\, and Bob. Aurora project plans were reviewed.
+         There is currently no budget reserves for this project.
+         Lisa will escalate to management. Next meeting on Tuesday.\n
+        2. Telephone Conference: ABC Corp. sales representative
+         called to discuss new printer. Promised to get us a demo by
+         Friday.\n3. Henry Miller (Handsoff Insurance): Car was
+         totaled by tree. Is looking into a loaner car. 555-2323
+         (tel).
+       END:VJOURNAL
+
+3.6.4.  Free/Busy Component
+
+   Component Name:  VFREEBUSY
+
+   Purpose:  Provide a grouping of component properties that describe
+      either a request for free/busy time, describe a response to a
+      request for free/busy time, or describe a published set of busy
+      time.
+
+   Format Definition:  A "VFREEBUSY" calendar component is defined by
+      the following notation:
+
+       freebusyc  = "BEGIN" ":" "VFREEBUSY" CRLF
+                    fbprop
+                    "END" ":" "VFREEBUSY" CRLF
+
+       fbprop     = *(
+                  ;
+                  ; The following are REQUIRED,
+
+
+
+Desruisseaux                Standards Track                    [Page 59]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+                  ; but MUST NOT occur more than once.
+                  ;
+                  dtstamp / uid /
+                  ;
+                  ; The following are OPTIONAL,
+                  ; but MUST NOT occur more than once.
+                  ;
+                  contact / dtstart / dtend /
+                  organizer / url /
+                  ;
+                  ; The following are OPTIONAL,
+                  ; and MAY occur more than once.
+                  ;
+                  attendee / comment / freebusy / rstatus / x-prop /
+                  iana-prop
+                  ;
+                  )
+
+   Description:  A "VFREEBUSY" calendar component is a grouping of
+      component properties that represents either a request for free or
+      busy time information, a reply to a request for free or busy time
+      information, or a published set of busy time information.
+
+      When used to request free/busy time information, the "ATTENDEE"
+      property specifies the calendar users whose free/busy time is
+      being requested; the "ORGANIZER" property specifies the calendar
+      user who is requesting the free/busy time; the "DTSTART" and
+      "DTEND" properties specify the window of time for which the free/
+      busy time is being requested; the "UID" and "DTSTAMP" properties
+      are specified to assist in proper sequencing of multiple free/busy
+      time requests.
+
+      When used to reply to a request for free/busy time, the "ATTENDEE"
+      property specifies the calendar user responding to the free/busy
+      time request; the "ORGANIZER" property specifies the calendar user
+      that originally requested the free/busy time; the "FREEBUSY"
+      property specifies the free/busy time information (if it exists);
+      and the "UID" and "DTSTAMP" properties are specified to assist in
+      proper sequencing of multiple free/busy time replies.
+
+      When used to publish busy time, the "ORGANIZER" property specifies
+      the calendar user associated with the published busy time; the
+      "DTSTART" and "DTEND" properties specify an inclusive time window
+      that surrounds the busy time information; the "FREEBUSY" property
+      specifies the published busy time information; and the "DTSTAMP"
+      property specifies the DATE-TIME that iCalendar object was
+      created.
+
+
+
+
+Desruisseaux                Standards Track                    [Page 60]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      The "VFREEBUSY" calendar component cannot be nested within another
+      calendar component.  Multiple "VFREEBUSY" calendar components can
+      be specified within an iCalendar object.  This permits the
+      grouping of free/busy information into logical collections, such
+      as monthly groups of busy time information.
+
+      The "VFREEBUSY" calendar component is intended for use in
+      iCalendar object methods involving requests for free time,
+      requests for busy time, requests for both free and busy, and the
+      associated replies.
+
+      Free/Busy information is represented with the "FREEBUSY" property.
+      This property provides a terse representation of time periods.
+      One or more "FREEBUSY" properties can be specified in the
+      "VFREEBUSY" calendar component.
+
+      When present in a "VFREEBUSY" calendar component, the "DTSTART"
+      and "DTEND" properties SHOULD be specified prior to any "FREEBUSY"
+      properties.
+
+      The recurrence properties ("RRULE", "RDATE", "EXDATE") are not
+      permitted within a "VFREEBUSY" calendar component.  Any recurring
+      events are resolved into their individual busy time periods using
+      the "FREEBUSY" property.
+
+   Example:  The following is an example of a "VFREEBUSY" calendar
+      component used to request free or busy time information:
+
+       BEGIN:VFREEBUSY
+       UID:19970901T082949Z-FA43EF at example.com
+       ORGANIZER:mailto:jane_doe at example.com
+       ATTENDEE:mailto:john_public at example.com
+       DTSTART:19971015T050000Z
+       DTEND:19971016T050000Z
+       DTSTAMP:19970901T083000Z
+       END:VFREEBUSY
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 61]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      The following is an example of a "VFREEBUSY" calendar component
+      used to reply to the request with busy time information:
+
+       BEGIN:VFREEBUSY
+       UID:19970901T095957Z-76A912 at example.com
+       ORGANIZER:mailto:jane_doe at example.com
+       ATTENDEE:mailto:john_public at example.com
+       DTSTAMP:19970901T100000Z
+       FREEBUSY:19971015T050000Z/PT8H30M,
+        19971015T160000Z/PT5H30M,19971015T223000Z/PT6H30M
+       URL:http://example.com/pub/busy/jpublic-01.ifb
+       COMMENT:This iCalendar file contains busy time information for
+         the next three months.
+       END:VFREEBUSY
+
+      The following is an example of a "VFREEBUSY" calendar component
+      used to publish busy time information:
+
+       BEGIN:VFREEBUSY
+       UID:19970901T115957Z-76A912 at example.com
+       DTSTAMP:19970901T120000Z
+       ORGANIZER:jsmith at example.com
+       DTSTART:19980313T141711Z
+       DTEND:19980410T141711Z
+       FREEBUSY:19980314T233000Z/19980315T003000Z
+       FREEBUSY:19980316T153000Z/19980316T163000Z
+       FREEBUSY:19980318T030000Z/19980318T040000Z
+       URL:http://www.example.com/calendar/busytime/jsmith.ifb
+       END:VFREEBUSY
+
+3.6.5.  Time Zone Component
+
+   Component Name:  VTIMEZONE
+
+   Purpose:  Provide a grouping of component properties that defines a
+      time zone.
+
+   Format Definition:  A "VTIMEZONE" calendar component is defined by
+      the following notation:
+
+       timezonec  = "BEGIN" ":" "VTIMEZONE" CRLF
+                    *(
+                    ;
+                    ; 'tzid' is REQUIRED, but MUST NOT occur more
+                    ; than once.
+                    ;
+                    tzid /
+                    ;
+
+
+
+Desruisseaux                Standards Track                    [Page 62]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+                    ; 'last-mod' and 'tzurl' are OPTIONAL,
+                    ; but MUST NOT occur more than once.
+                    ;
+                    last-mod / tzurl /
+                    ;
+                    ; One of 'standardc' or 'daylightc' MUST occur
+                    ; and each MAY occur more than once.
+                    ;
+                    standardc / daylightc /
+                    ;
+                    ; The following are OPTIONAL,
+                    ; and MAY occur more than once.
+                    ;
+                    x-prop / iana-prop
+                    ;
+                    )
+                    "END" ":" "VTIMEZONE" CRLF
+
+       standardc  = "BEGIN" ":" "STANDARD" CRLF
+                    tzprop
+                    "END" ":" "STANDARD" CRLF
+
+       daylightc  = "BEGIN" ":" "DAYLIGHT" CRLF
+                    tzprop
+                    "END" ":" "DAYLIGHT" CRLF
+
+       tzprop     = *(
+                    ;
+                    ; The following are REQUIRED,
+                    ; but MUST NOT occur more than once.
+                    ;
+                    dtstart / tzoffsetto / tzoffsetfrom /
+                    ;
+                    ; The following is OPTIONAL,
+                    ; but SHOULD NOT occur more than once.
+                    ;
+                    rrule /
+                    ;
+                    ; The following are OPTIONAL,
+                    ; and MAY occur more than once.
+                    ;
+                    comment / rdate / tzname / x-prop / iana-prop
+                    ;
+                    )
+
+   Description:  A time zone is unambiguously defined by the set of time
+      measurement rules determined by the governing body for a given
+      geographic area.  These rules describe, at a minimum, the base
+
+
+
+Desruisseaux                Standards Track                    [Page 63]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      offset from UTC for the time zone, often referred to as the
+      Standard Time offset.  Many locations adjust their Standard Time
+      forward or backward by one hour, in order to accommodate seasonal
+      changes in number of daylight hours, often referred to as Daylight
+      Saving Time.  Some locations adjust their time by a fraction of an
+      hour.  Standard Time is also known as Winter Time.  Daylight
+      Saving Time is also known as Advanced Time, Summer Time, or Legal
+      Time in certain countries.  The following table shows the changes
+      in time zone rules in effect for New York City starting from 1967.
+      Each line represents a description or rule for a particular
+      observance.
+
+                         Effective Observance Rule
+
+     +-----------+--------------------------+--------+--------------+
+     | Date      | (Date-Time)              | Offset | Abbreviation |
+     +-----------+--------------------------+--------+--------------+
+     | 1967-1973 | last Sun in Apr, 02:00   | -0400  | EDT          |
+     |           |                          |        |              |
+     | 1967-2006 | last Sun in Oct, 02:00   | -0500  | EST          |
+     |           |                          |        |              |
+     | 1974-1974 | Jan 6, 02:00             | -0400  | EDT          |
+     |           |                          |        |              |
+     | 1975-1975 | Feb 23, 02:00            | -0400  | EDT          |
+     |           |                          |        |              |
+     | 1976-1986 | last Sun in Apr, 02:00   | -0400  | EDT          |
+     |           |                          |        |              |
+     | 1987-2006 | first Sun in Apr, 02:00  | -0400  | EDT          |
+     |           |                          |        |              |
+     | 2007-*    | second Sun in Mar, 02:00 | -0400  | EDT          |
+     |           |                          |        |              |
+     | 2007-*    | first Sun in Nov, 02:00  | -0500  | EST          |
+     +-----------+--------------------------+--------+--------------+
+
+   Note: The specification of a global time zone registry is not
+         addressed by this document and is left for future study.
+         However, implementers may find the TZ database [TZDB] a useful
+         reference.  It is an informal, public-domain collection of time
+         zone information, which is currently being maintained by
+         volunteer Internet participants, and is used in several
+         operating systems.  This database contains current and
+         historical time zone information for a wide variety of
+         locations around the globe; it provides a time zone identifier
+         for every unique time zone rule set in actual use since 1970,
+         with historical data going back to the introduction of standard
+         time.
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 64]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      Interoperability between two calendaring and scheduling
+      applications, especially for recurring events, to-dos or journal
+      entries, is dependent on the ability to capture and convey date
+      and time information in an unambiguous format.  The specification
+      of current time zone information is integral to this behavior.
+
+      If present, the "VTIMEZONE" calendar component defines the set of
+      Standard Time and Daylight Saving Time observances (or rules) for
+      a particular time zone for a given interval of time.  The
+      "VTIMEZONE" calendar component cannot be nested within other
+      calendar components.  Multiple "VTIMEZONE" calendar components can
+      exist in an iCalendar object.  In this situation, each "VTIMEZONE"
+      MUST represent a unique time zone definition.  This is necessary
+      for some classes of events, such as airline flights, that start in
+      one time zone and end in another.
+
+      The "VTIMEZONE" calendar component MUST include the "TZID"
+      property and at least one definition of a "STANDARD" or "DAYLIGHT"
+      sub-component.  The "STANDARD" or "DAYLIGHT" sub-component MUST
+      include the "DTSTART", "TZOFFSETFROM", and "TZOFFSETTO"
+      properties.
+
+      An individual "VTIMEZONE" calendar component MUST be specified for
+      each unique "TZID" parameter value specified in the iCalendar
+      object.  In addition, a "VTIMEZONE" calendar component, referred
+      to by a recurring calendar component, MUST provide valid time zone
+      information for all recurrence instances.
+
+      Each "VTIMEZONE" calendar component consists of a collection of
+      one or more sub-components that describe the rule for a particular
+      observance (either a Standard Time or a Daylight Saving Time
+      observance).  The "STANDARD" sub-component consists of a
+      collection of properties that describe Standard Time.  The
+      "DAYLIGHT" sub-component consists of a collection of properties
+      that describe Daylight Saving Time.  In general, this collection
+      of properties consists of:
+
+      *  the first onset DATE-TIME for the observance;
+
+      *  the last onset DATE-TIME for the observance, if a last onset is
+         known;
+
+      *  the offset to be applied for the observance;
+
+      *  a rule that describes the day and time when the observance
+         takes effect;
+
+      *  an optional name for the observance.
+
+
+
+Desruisseaux                Standards Track                    [Page 65]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      For a given time zone, there may be multiple unique definitions of
+      the observances over a period of time.  Each observance is
+      described using either a "STANDARD" or "DAYLIGHT" sub-component.
+      The collection of these sub-components is used to describe the
+      time zone for a given period of time.  The offset to apply at any
+      given time is found by locating the observance that has the last
+      onset date and time before the time in question, and using the
+      offset value from that observance.
+
+      The top-level properties in a "VTIMEZONE" calendar component are:
+
+      The mandatory "TZID" property is a text value that uniquely
+      identifies the "VTIMEZONE" calendar component within the scope of
+      an iCalendar object.
+
+      The optional "LAST-MODIFIED" property is a UTC value that
+      specifies the date and time that this time zone definition was
+      last updated.
+
+      The optional "TZURL" property is a url value that points to a
+      published "VTIMEZONE" definition.  "TZURL" SHOULD refer to a
+      resource that is accessible by anyone who might need to interpret
+      the object.  This SHOULD NOT normally be a "file" URL or other URL
+      that is not widely accessible.
+
+      The collection of properties that are used to define the
+      "STANDARD" and "DAYLIGHT" sub-components include:
+
+      The mandatory "DTSTART" property gives the effective onset date
+      and local time for the time zone sub-component definition.
+      "DTSTART" in this usage MUST be specified as a date with a local
+      time value.
+
+      The mandatory "TZOFFSETFROM" property gives the UTC offset that is
+      in use when the onset of this time zone observance begins.
+      "TZOFFSETFROM" is combined with "DTSTART" to define the effective
+      onset for the time zone sub-component definition.  For example,
+      the following represents the time at which the observance of
+      Standard Time took effect in Fall 1967 for New York City:
+
+       DTSTART:19671029T020000
+
+       TZOFFSETFROM:-0400
+
+      The mandatory "TZOFFSETTO" property gives the UTC offset for the
+      time zone sub-component (Standard Time or Daylight Saving Time)
+      when this observance is in use.
+
+
+
+
+Desruisseaux                Standards Track                    [Page 66]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      The optional "TZNAME" property is the customary name for the time
+      zone.  This could be used for displaying dates.
+
+      The onset DATE-TIME values for the observance defined by the time
+      zone sub-component is defined by the "DTSTART", "RRULE", and
+      "RDATE" properties.
+
+      The "RRULE" property defines the recurrence rule for the onset of
+      the observance defined by this time zone sub-component.  Some
+      specific requirements for the usage of "RRULE" for this purpose
+      include:
+
+      *  If observance is known to have an effective end date, the
+         "UNTIL" recurrence rule parameter MUST be used to specify the
+         last valid onset of this observance (i.e., the UNTIL DATE-TIME
+         will be equal to the last instance generated by the recurrence
+         pattern).  It MUST be specified in UTC time.
+
+      *  The "DTSTART" and the "TZOFFSETFROM" properties MUST be used
+         when generating the onset DATE-TIME values (instances) from the
+         "RRULE".
+
+      The "RDATE" property can also be used to define the onset of the
+      observance by giving the individual onset date and times.  "RDATE"
+      in this usage MUST be specified as a date with local time value,
+      relative to the UTC offset specified in the "TZOFFSETFROM"
+      property.
+
+      The optional "COMMENT" property is also allowed for descriptive
+      explanatory text.
+
+   Example:  The following are examples of the "VTIMEZONE" calendar
+      component:
+
+      This is an example showing all the time zone rules for New York
+      City since April 30, 1967 at 03:00:00 EDT.
+
+       BEGIN:VTIMEZONE
+       TZID:America/New_York
+       LAST-MODIFIED:20050809T050000Z
+       BEGIN:DAYLIGHT
+       DTSTART:19670430T020000
+       RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=-1SU;UNTIL=19730429T070000Z
+       TZOFFSETFROM:-0500
+       TZOFFSETTO:-0400
+       TZNAME:EDT
+       END:DAYLIGHT
+       BEGIN:STANDARD
+
+
+
+Desruisseaux                Standards Track                    [Page 67]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+       DTSTART:19671029T020000
+       RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU;UNTIL=20061029T060000Z
+       TZOFFSETFROM:-0400
+       TZOFFSETTO:-0500
+       TZNAME:EST
+       END:STANDARD
+       BEGIN:DAYLIGHT
+       DTSTART:19740106T020000
+       RDATE:19750223T020000
+       TZOFFSETFROM:-0500
+       TZOFFSETTO:-0400
+       TZNAME:EDT
+       END:DAYLIGHT
+       BEGIN:DAYLIGHT
+       DTSTART:19760425T020000
+       RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=-1SU;UNTIL=19860427T070000Z
+       TZOFFSETFROM:-0500
+       TZOFFSETTO:-0400
+       TZNAME:EDT
+       END:DAYLIGHT
+       BEGIN:DAYLIGHT
+       DTSTART:19870405T020000
+       RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU;UNTIL=20060402T070000Z
+       TZOFFSETFROM:-0500
+       TZOFFSETTO:-0400
+       TZNAME:EDT
+       END:DAYLIGHT
+       BEGIN:DAYLIGHT
+       DTSTART:20070311T020000
+       RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
+       TZOFFSETFROM:-0500
+       TZOFFSETTO:-0400
+       TZNAME:EDT
+       END:DAYLIGHT
+       BEGIN:STANDARD
+       DTSTART:20071104T020000
+       RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
+       TZOFFSETFROM:-0400
+       TZOFFSETTO:-0500
+       TZNAME:EST
+       END:STANDARD
+       END:VTIMEZONE
+
+      This is an example showing time zone information for New York City
+      using only the "DTSTART" property.  Note that this is only
+      suitable for a recurring event that starts on or later than March
+      11, 2007 at 03:00:00 EDT (i.e., the earliest effective transition
+      date and time) and ends no later than March 9, 2008 at 01:59:59
+
+
+
+Desruisseaux                Standards Track                    [Page 68]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      EST (i.e., latest valid date and time for EST in this scenario).
+      For example, this can be used for a recurring event that occurs
+      every Friday, 8:00 A.M.-9:00 A.M., starting June 1, 2007, ending
+      December 31, 2007,
+
+       BEGIN:VTIMEZONE
+       TZID:America/New_York
+       LAST-MODIFIED:20050809T050000Z
+       BEGIN:STANDARD
+       DTSTART:20071104T020000
+       TZOFFSETFROM:-0400
+       TZOFFSETTO:-0500
+       TZNAME:EST
+       END:STANDARD
+       BEGIN:DAYLIGHT
+       DTSTART:20070311T020000
+       TZOFFSETFROM:-0500
+       TZOFFSETTO:-0400
+       TZNAME:EDT
+       END:DAYLIGHT
+       END:VTIMEZONE
+
+      This is a simple example showing the current time zone rules for
+      New York City using a "RRULE" recurrence pattern.  Note that there
+      is no effective end date to either of the Standard Time or
+      Daylight Time rules.  This information would be valid for a
+      recurring event starting today and continuing indefinitely.
+
+       BEGIN:VTIMEZONE
+       TZID:America/New_York
+       LAST-MODIFIED:20050809T050000Z
+       TZURL:http://zones.example.com/tz/America-New_York.ics
+       BEGIN:STANDARD
+       DTSTART:20071104T020000
+       RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
+       TZOFFSETFROM:-0400
+       TZOFFSETTO:-0500
+       TZNAME:EST
+       END:STANDARD
+       BEGIN:DAYLIGHT
+       DTSTART:20070311T020000
+       RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
+       TZOFFSETFROM:-0500
+       TZOFFSETTO:-0400
+       TZNAME:EDT
+       END:DAYLIGHT
+       END:VTIMEZONE
+
+
+
+
+Desruisseaux                Standards Track                    [Page 69]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      This is an example showing a set of rules for a fictitious time
+      zone where the Daylight Time rule has an effective end date (i.e.,
+      after that date, Daylight Time is no longer observed).
+
+       BEGIN:VTIMEZONE
+       TZID:Fictitious
+       LAST-MODIFIED:19870101T000000Z
+       BEGIN:STANDARD
+       DTSTART:19671029T020000
+       RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+       TZOFFSETFROM:-0400
+       TZOFFSETTO:-0500
+       TZNAME:EST
+       END:STANDARD
+       BEGIN:DAYLIGHT
+       DTSTART:19870405T020000
+       RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4;UNTIL=19980404T070000Z
+       TZOFFSETFROM:-0500
+       TZOFFSETTO:-0400
+       TZNAME:EDT
+       END:DAYLIGHT
+       END:VTIMEZONE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 70]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      This is an example showing a set of rules for a fictitious time
+      zone where the first Daylight Time rule has an effective end date.
+      There is a second Daylight Time rule that picks up where the other
+      left off.
+
+       BEGIN:VTIMEZONE
+       TZID:Fictitious
+       LAST-MODIFIED:19870101T000000Z
+       BEGIN:STANDARD
+       DTSTART:19671029T020000
+       RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+       TZOFFSETFROM:-0400
+       TZOFFSETTO:-0500
+       TZNAME:EST
+       END:STANDARD
+       BEGIN:DAYLIGHT
+       DTSTART:19870405T020000
+       RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4;UNTIL=19980404T070000Z
+       TZOFFSETFROM:-0500
+       TZOFFSETTO:-0400
+       TZNAME:EDT
+       END:DAYLIGHT
+       BEGIN:DAYLIGHT
+       DTSTART:19990424T020000
+       RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=4
+       TZOFFSETFROM:-0500
+       TZOFFSETTO:-0400
+       TZNAME:EDT
+       END:DAYLIGHT
+       END:VTIMEZONE
+
+3.6.6.  Alarm Component
+
+   Component Name:  VALARM
+
+   Purpose:  Provide a grouping of component properties that define an
+      alarm.
+
+   Format Definition:  A "VALARM" calendar component is defined by the
+      following notation:
+
+       alarmc     = "BEGIN" ":" "VALARM" CRLF
+                    (audioprop / dispprop / emailprop)
+                    "END" ":" "VALARM" CRLF
+
+       audioprop  = *(
+                  ;
+                  ; 'action' and 'trigger' are both REQUIRED,
+
+
+
+Desruisseaux                Standards Track                    [Page 71]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+                  ; but MUST NOT occur more than once.
+                  ;
+                  action / trigger /
+                  ;
+                  ; 'duration' and 'repeat' are both OPTIONAL,
+                  ; and MUST NOT occur more than once each;
+                  ; but if one occurs, so MUST the other.
+                  ;
+                  duration / repeat /
+                  ;
+                  ; The following is OPTIONAL,
+                  ; but MUST NOT occur more than once.
+                  ;
+                  attach /
+                  ;
+                  ; The following is OPTIONAL,
+                  ; and MAY occur more than once.
+                  ;
+                  x-prop / iana-prop
+                  ;
+                  )
+
+       dispprop   = *(
+                  ;
+                  ; The following are REQUIRED,
+                  ; but MUST NOT occur more than once.
+                  ;
+                  action / description / trigger /
+                  ;
+                  ; 'duration' and 'repeat' are both OPTIONAL,
+                  ; and MUST NOT occur more than once each;
+                  ; but if one occurs, so MUST the other.
+                  ;
+                  duration / repeat /
+                  ;
+                  ; The following is OPTIONAL,
+                  ; and MAY occur more than once.
+                  ;
+                  x-prop / iana-prop
+                  ;
+                  )
+
+       emailprop  = *(
+                  ;
+                  ; The following are all REQUIRED,
+                  ; but MUST NOT occur more than once.
+                  ;
+                  action / description / trigger / summary /
+
+
+
+Desruisseaux                Standards Track                    [Page 72]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+                  ;
+                  ; The following is REQUIRED,
+                  ; and MAY occur more than once.
+                  ;
+                  attendee /
+                  ;
+                  ; 'duration' and 'repeat' are both OPTIONAL,
+                  ; and MUST NOT occur more than once each;
+                  ; but if one occurs, so MUST the other.
+                  ;
+                  duration / repeat /
+                  ;
+                  ; The following are OPTIONAL,
+                  ; and MAY occur more than once.
+                  ;
+                  attach / x-prop / iana-prop
+                  ;
+                  )
+
+   Description:  A "VALARM" calendar component is a grouping of
+      component properties that is a reminder or alarm for an event or a
+      to-do.  For example, it may be used to define a reminder for a
+      pending event or an overdue to-do.
+
+      The "VALARM" calendar component MUST include the "ACTION" and
+      "TRIGGER" properties.  The "ACTION" property further constrains
+      the "VALARM" calendar component in the following ways:
+
+      When the action is "AUDIO", the alarm can also include one and
+      only one "ATTACH" property, which MUST point to a sound resource,
+      which is rendered when the alarm is triggered.
+
+      When the action is "DISPLAY", the alarm MUST also include a
+      "DESCRIPTION" property, which contains the text to be displayed
+      when the alarm is triggered.
+
+      When the action is "EMAIL", the alarm MUST include a "DESCRIPTION"
+      property, which contains the text to be used as the message body,
+      a "SUMMARY" property, which contains the text to be used as the
+      message subject, and one or more "ATTENDEE" properties, which
+      contain the email address of attendees to receive the message.  It
+      can also include one or more "ATTACH" properties, which are
+      intended to be sent as message attachments.  When the alarm is
+      triggered, the email message is sent.
+
+      The "VALARM" calendar component MUST only appear within either a
+      "VEVENT" or "VTODO" calendar component.  "VALARM" calendar
+      components cannot be nested.  Multiple mutually independent
+
+
+
+Desruisseaux                Standards Track                    [Page 73]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      "VALARM" calendar components can be specified for a single
+      "VEVENT" or "VTODO" calendar component.
+
+      The "TRIGGER" property specifies when the alarm will be triggered.
+      The "TRIGGER" property specifies a duration prior to the start of
+      an event or a to-do.  The "TRIGGER" edge may be explicitly set to
+      be relative to the "START" or "END" of the event or to-do with the
+      "RELATED" parameter of the "TRIGGER" property.  The "TRIGGER"
+      property value type can alternatively be set to an absolute
+      calendar date with UTC time.
+
+      In an alarm set to trigger on the "START" of an event or to-do,
+      the "DTSTART" property MUST be present in the associated event or
+      to-do.  In an alarm in a "VEVENT" calendar component set to
+      trigger on the "END" of the event, either the "DTEND" property
+      MUST be present, or the "DTSTART" and "DURATION" properties MUST
+      both be present.  In an alarm in a "VTODO" calendar component set
+      to trigger on the "END" of the to-do, either the "DUE" property
+      MUST be present, or the "DTSTART" and "DURATION" properties MUST
+      both be present.
+
+      The alarm can be defined such that it triggers repeatedly.  A
+      definition of an alarm with a repeating trigger MUST include both
+      the "DURATION" and "REPEAT" properties.  The "DURATION" property
+      specifies the delay period, after which the alarm will repeat.
+      The "REPEAT" property specifies the number of additional
+      repetitions that the alarm will be triggered.  This repetition
+      count is in addition to the initial triggering of the alarm.  Both
+      of these properties MUST be present in order to specify a
+      repeating alarm.  If one of these two properties is absent, then
+      the alarm will not repeat beyond the initial trigger.
+
+      The "ACTION" property is used within the "VALARM" calendar
+      component to specify the type of action invoked when the alarm is
+      triggered.  The "VALARM" properties provide enough information for
+      a specific action to be invoked.  It is typically the
+      responsibility of a "Calendar User Agent" (CUA) to deliver the
+      alarm in the specified fashion.  An "ACTION" property value of
+      AUDIO specifies an alarm that causes a sound to be played to alert
+      the user; DISPLAY specifies an alarm that causes a text message to
+      be displayed to the user; and EMAIL specifies an alarm that causes
+      an electronic email message to be delivered to one or more email
+      addresses.
+
+      In an AUDIO alarm, if the optional "ATTACH" property is included,
+      it MUST specify an audio sound resource.  The intention is that
+      the sound will be played as the alarm effect.  If an "ATTACH"
+      property is specified that does not refer to a sound resource, or
+
+
+
+Desruisseaux                Standards Track                    [Page 74]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      if the specified sound resource cannot be rendered (because its
+      format is unsupported, or because it cannot be retrieved), then
+      the CUA or other entity responsible for playing the sound may
+      choose a fallback action, such as playing a built-in default
+      sound, or playing no sound at all.
+
+      In a DISPLAY alarm, the intended alarm effect is for the text
+      value of the "DESCRIPTION" property to be displayed to the user.
+
+      In an EMAIL alarm, the intended alarm effect is for an email
+      message to be composed and delivered to all the addresses
+      specified by the "ATTENDEE" properties in the "VALARM" calendar
+      component.  The "DESCRIPTION" property of the "VALARM" calendar
+      component MUST be used as the body text of the message, and the
+      "SUMMARY" property MUST be used as the subject text.  Any "ATTACH"
+      properties in the "VALARM" calendar component SHOULD be sent as
+      attachments to the message.
+
+         Note: Implementations should carefully consider whether they
+         accept alarm components from untrusted sources, e.g., when
+         importing calendar objects from external sources.  One
+         reasonable policy is to always ignore alarm components that the
+         calendar user has not set herself, or at least ask for
+         confirmation in such a case.
+
+   Example:  The following example is for a "VALARM" calendar component
+      that specifies an audio alarm that will sound at a precise time
+      and repeat 4 more times at 15-minute intervals:
+
+       BEGIN:VALARM
+       TRIGGER;VALUE=DATE-TIME:19970317T133000Z
+       REPEAT:4
+       DURATION:PT15M
+       ACTION:AUDIO
+       ATTACH;FMTTYPE=audio/basic:ftp://example.com/pub/
+        sounds/bell-01.aud
+       END:VALARM
+
+      The following example is for a "VALARM" calendar component that
+      specifies a display alarm that will trigger 30 minutes before the
+      scheduled start of the event or of the to-do it is associated with
+      and will repeat 2 more times at 15-minute intervals:
+
+
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 75]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+       BEGIN:VALARM
+       TRIGGER:-PT30M
+       REPEAT:2
+       DURATION:PT15M
+       ACTION:DISPLAY
+       DESCRIPTION:Breakfast meeting with executive\n
+        team at 8:30 AM EST.
+       END:VALARM
+
+      The following example is for a "VALARM" calendar component that
+      specifies an email alarm that will trigger 2 days before the
+      scheduled due DATE-TIME of a to-do with which it is associated.
+      It does not repeat.  The email has a subject, body, and attachment
+      link.
+
+       BEGIN:VALARM
+       TRIGGER;RELATED=END:-P2D
+       ACTION:EMAIL
+       ATTENDEE:mailto:john_doe at example.com
+       SUMMARY:*** REMINDER: SEND AGENDA FOR WEEKLY STAFF MEETING ***
+       DESCRIPTION:A draft agenda needs to be sent out to the attendees
+         to the weekly managers meeting (MGR-LIST). Attached is a
+         pointer the document template for the agenda file.
+       ATTACH;FMTTYPE=application/msword:http://example.com/
+        templates/agenda.doc
+       END:VALARM
+
+3.7.  Calendar Properties
+
+   The Calendar Properties are attributes that apply to the iCalendar
+   object, as a whole.  These properties do not appear within a calendar
+   component.  They SHOULD be specified after the "BEGIN:VCALENDAR"
+   delimiter string and prior to any calendar component.
+
+3.7.1.  Calendar Scale
+
+   Property Name:  CALSCALE
+
+   Purpose:  This property defines the calendar scale used for the
+      calendar information specified in the iCalendar object.
+
+   Value Type:  TEXT
+
+   Property Parameters:  IANA and non-standard property parameters can
+      be specified on this property.
+
+   Conformance:  This property can be specified once in an iCalendar
+      object.  The default value is "GREGORIAN".
+
+
+
+Desruisseaux                Standards Track                    [Page 76]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Description:  This memo is based on the Gregorian calendar scale.
+      The Gregorian calendar scale is assumed if this property is not
+      specified in the iCalendar object.  It is expected that other
+      calendar scales will be defined in other specifications or by
+      future versions of this memo.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       calscale   = "CALSCALE" calparam ":" calvalue CRLF
+
+       calparam   = *(";" other-param)
+
+       calvalue   = "GREGORIAN"
+
+   Example:  The following is an example of this property:
+
+       CALSCALE:GREGORIAN
+
+3.7.2.  Method
+
+   Property Name:  METHOD
+
+   Purpose:  This property defines the iCalendar object method
+      associated with the calendar object.
+
+   Value Type:  TEXT
+
+   Property Parameters:  IANA and non-standard property parameters can
+      be specified on this property.
+
+   Conformance:  This property can be specified once in an iCalendar
+      object.
+
+   Description:  When used in a MIME message entity, the value of this
+      property MUST be the same as the Content-Type "method" parameter
+      value.  If either the "METHOD" property or the Content-Type
+      "method" parameter is specified, then the other MUST also be
+      specified.
+
+      No methods are defined by this specification.  This is the subject
+      of other specifications, such as the iCalendar Transport-
+      independent Interoperability Protocol (iTIP) defined by [2446bis].
+
+      If this property is not present in the iCalendar object, then a
+      scheduling transaction MUST NOT be assumed.  In such cases, the
+      iCalendar object is merely being used to transport a snapshot of
+
+
+
+
+Desruisseaux                Standards Track                    [Page 77]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      some calendar information; without the intention of conveying a
+      scheduling semantic.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       method     = "METHOD" metparam ":" metvalue CRLF
+
+       metparam   = *(";" other-param)
+
+       metvalue   = iana-token
+
+   Example:  The following is a hypothetical example of this property to
+      convey that the iCalendar object is a scheduling request:
+
+       METHOD:REQUEST
+
+3.7.3.  Product Identifier
+
+   Property Name:  PRODID
+
+   Purpose:  This property specifies the identifier for the product that
+      created the iCalendar object.
+
+   Value Type:  TEXT
+
+   Property Parameters:  IANA and non-standard property parameters can
+      be specified on this property.
+
+   Conformance:  The property MUST be specified once in an iCalendar
+      object.
+
+   Description:  The vendor of the implementation SHOULD assure that
+      this is a globally unique identifier; using some technique such as
+      an FPI value, as defined in [ISO.9070.1991].
+
+      This property SHOULD NOT be used to alter the interpretation of an
+      iCalendar object beyond the semantics specified in this memo.  For
+      example, it is not to be used to further the understanding of non-
+      standard properties.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       prodid     = "PRODID" pidparam ":" pidvalue CRLF
+
+       pidparam   = *(";" other-param)
+
+
+
+
+Desruisseaux                Standards Track                    [Page 78]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+       pidvalue   = text
+       ;Any text that describes the product and version
+       ;and that is generally assured of being unique.
+
+   Example:  The following is an example of this property.  It does not
+      imply that English is the default language.
+
+       PRODID:-//ABC Corporation//NONSGML My Product//EN
+
+3.7.4.  Version
+
+   Property Name:  VERSION
+
+   Purpose:  This property specifies the identifier corresponding to the
+      highest version number or the minimum and maximum range of the
+      iCalendar specification that is required in order to interpret the
+      iCalendar object.
+
+   Value Type:  TEXT
+
+   Property Parameters:  IANA and non-standard property parameters can
+      be specified on this property.
+
+   Conformance:  This property MUST be specified once in an iCalendar
+      object.
+
+   Description:  A value of "2.0" corresponds to this memo.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       version    = "VERSION" verparam ":" vervalue CRLF
+
+       verparam   = *(";" other-param)
+
+       vervalue   = "2.0"         ;This memo
+                  / maxver
+                  / (minver ";" maxver)
+
+       minver     = <A IANA-registered iCalendar version identifier>
+       ;Minimum iCalendar version needed to parse the iCalendar object.
+
+       maxver     = <A IANA-registered iCalendar version identifier>
+       ;Maximum iCalendar version needed to parse the iCalendar object.
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 79]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Example:  The following is an example of this property:
+
+       VERSION:2.0
+
+3.8.  Component Properties
+
+   The following properties can appear within calendar components, as
+   specified by each component property definition.
+
+3.8.1.  Descriptive Component Properties
+
+   The following properties specify descriptive information about
+   calendar components.
+
+3.8.1.1.  Attachment
+
+   Property Name:  ATTACH
+
+   Purpose:  This property provides the capability to associate a
+      document object with a calendar component.
+
+   Value Type:  The default value type for this property is URI.  The
+      value type can also be set to BINARY to indicate inline binary
+      encoded content information.
+
+   Property Parameters:  IANA, non-standard, inline encoding, and value
+      data type property parameters can be specified on this property.
+      The format type parameter can be specified on this property and is
+      RECOMMENDED for inline binary encoded content information.
+
+   Conformance:  This property can be specified multiple times in a
+      "VEVENT", "VTODO", "VJOURNAL", or "VALARM" calendar component with
+      the exception of AUDIO alarm that only allows this property to
+      occur once.
+
+   Description:  This property is used in "VEVENT", "VTODO", and
+      "VJOURNAL" calendar components to associate a resource (e.g.,
+      document) with the calendar component.  This property is used in
+      "VALARM" calendar components to specify an audio sound resource or
+      an email message attachment.  This property can be specified as a
+      URI pointing to a resource or as inline binary encoded content.
+
+      When this property is specified as inline binary encoded content,
+      calendar applications MAY attempt to guess the media type of the
+      resource via inspection of its content if and only if the media
+      type of the resource is not given by the "FMTTYPE" parameter.  If
+      the media type remains unknown, calendar applications SHOULD treat
+      it as type "application/octet-stream".
+
+
+
+Desruisseaux                Standards Track                    [Page 80]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       attach     = "ATTACH" attachparam ( ":" uri ) /
+                    (
+                      ";" "ENCODING" "=" "BASE64"
+                      ";" "VALUE" "=" "BINARY"
+                      ":" binary
+                    )
+                    CRLF
+
+       attachparam = *(
+                   ;
+                   ; The following is OPTIONAL for a URI value,
+                   ; RECOMMENDED for a BINARY value,
+                   ; and MUST NOT occur more than once.
+                   ;
+                   (";" fmttypeparam) /
+                   ;
+                   ; The following is OPTIONAL,
+                   ; and MAY occur more than once.
+                   ;
+                   (";" other-param)
+                   ;
+                   )
+
+   Example:  The following are examples of this property:
+
+       ATTACH:CID:jsmith.part3.960817T083000.xyzMail at example.com
+
+       ATTACH;FMTTYPE=application/postscript:ftp://example.com/pub/
+        reports/r-960812.ps
+
+3.8.1.2.  Categories
+
+   Property Name:  CATEGORIES
+
+   Purpose:  This property defines the categories for a calendar
+      component.
+
+   Value Type:  TEXT
+
+   Property Parameters:  IANA, non-standard, and language property
+      parameters can be specified on this property.
+
+   Conformance:  The property can be specified within "VEVENT", "VTODO",
+      or "VJOURNAL" calendar components.
+
+
+
+
+Desruisseaux                Standards Track                    [Page 81]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Description:  This property is used to specify categories or subtypes
+      of the calendar component.  The categories are useful in searching
+      for a calendar component of a particular type and category.
+      Within the "VEVENT", "VTODO", or "VJOURNAL" calendar components,
+      more than one category can be specified as a COMMA-separated list
+      of categories.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       categories = "CATEGORIES" catparam ":" text *("," text)
+                    CRLF
+
+       catparam   = *(
+                  ;
+                  ; The following is OPTIONAL,
+                  ; but MUST NOT occur more than once.
+                  ;
+                  (";" languageparam ) /
+                  ;
+                  ; The following is OPTIONAL,
+                  ; and MAY occur more than once.
+                  ;
+                  (";" other-param)
+                  ;
+                  )
+
+   Example:  The following are examples of this property:
+
+       CATEGORIES:APPOINTMENT,EDUCATION
+
+       CATEGORIES:MEETING
+
+3.8.1.3.  Classification
+
+   Property Name:  CLASS
+
+   Purpose:  This property defines the access classification for a
+      calendar component.
+
+   Value Type:  TEXT
+
+   Property Parameters:  IANA and non-standard property parameters can
+      be specified on this property.
+
+   Conformance:  The property can be specified once in a "VEVENT",
+      "VTODO", or "VJOURNAL" calendar components.
+
+
+
+
+Desruisseaux                Standards Track                    [Page 82]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Description:  An access classification is only one component of the
+      general security system within a calendar application.  It
+      provides a method of capturing the scope of the access the
+      calendar owner intends for information within an individual
+      calendar entry.  The access classification of an individual
+      iCalendar component is useful when measured along with the other
+      security components of a calendar system (e.g., calendar user
+      authentication, authorization, access rights, access role, etc.).
+      Hence, the semantics of the individual access classifications
+      cannot be completely defined by this memo alone.  Additionally,
+      due to the "blind" nature of most exchange processes using this
+      memo, these access classifications cannot serve as an enforcement
+      statement for a system receiving an iCalendar object.  Rather,
+      they provide a method for capturing the intention of the calendar
+      owner for the access to the calendar component.  If not specified
+      in a component that allows this property, the default value is
+      PUBLIC.  Applications MUST treat x-name and iana-token values they
+      don't recognize the same way as they would the PRIVATE value.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       class      = "CLASS" classparam ":" classvalue CRLF
+
+       classparam = *(";" other-param)
+
+       classvalue = "PUBLIC" / "PRIVATE" / "CONFIDENTIAL" / iana-token
+                  / x-name
+       ;Default is PUBLIC
+
+   Example:  The following is an example of this property:
+
+       CLASS:PUBLIC
+
+3.8.1.4.  Comment
+
+   Property Name:  COMMENT
+
+   Purpose:  This property specifies non-processing information intended
+      to provide a comment to the calendar user.
+
+   Value Type:  TEXT
+
+   Property Parameters:  IANA, non-standard, alternate text
+      representation, and language property parameters can be specified
+      on this property.
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 83]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Conformance:  This property can be specified multiple times in
+      "VEVENT", "VTODO", "VJOURNAL", and "VFREEBUSY" calendar components
+      as well as in the "STANDARD" and "DAYLIGHT" sub-components.
+
+   Description:  This property is used to specify a comment to the
+      calendar user.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       comment    = "COMMENT" commparam ":" text CRLF
+
+       commparam  = *(
+                  ;
+                  ; The following are OPTIONAL,
+                  ; but MUST NOT occur more than once.
+                  ;
+                  (";" altrepparam) / (";" languageparam) /
+                  ;
+                  ; The following is OPTIONAL,
+                  ; and MAY occur more than once.
+                  ;
+                  (";" other-param)
+                  ;
+                  )
+
+   Example:  The following is an example of this property:
+
+       COMMENT:The meeting really needs to include both ourselves
+         and the customer. We can't hold this meeting without them.
+         As a matter of fact\, the venue for the meeting ought to be at
+         their site. - - John
+
+3.8.1.5.  Description
+
+   Property Name:  DESCRIPTION
+
+   Purpose:  This property provides a more complete description of the
+      calendar component than that provided by the "SUMMARY" property.
+
+   Value Type:  TEXT
+
+   Property Parameters:  IANA, non-standard, alternate text
+      representation, and language property parameters can be specified
+      on this property.
+
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 84]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Conformance:  The property can be specified in the "VEVENT", "VTODO",
+      "VJOURNAL", or "VALARM" calendar components.  The property can be
+      specified multiple times only within a "VJOURNAL" calendar
+      component.
+
+   Description:  This property is used in the "VEVENT" and "VTODO" to
+      capture lengthy textual descriptions associated with the activity.
+
+      This property is used in the "VJOURNAL" calendar component to
+      capture one or more textual journal entries.
+
+      This property is used in the "VALARM" calendar component to
+      capture the display text for a DISPLAY category of alarm, and to
+      capture the body text for an EMAIL category of alarm.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       description = "DESCRIPTION" descparam ":" text CRLF
+
+       descparam   = *(
+                   ;
+                   ; The following are OPTIONAL,
+                   ; but MUST NOT occur more than once.
+                   ;
+                   (";" altrepparam) / (";" languageparam) /
+                   ;
+                   ; The following is OPTIONAL,
+                   ; and MAY occur more than once.
+                   ;
+                   (";" other-param)
+                   ;
+                   )
+
+   Example:  The following is an example of this property with formatted
+      line breaks in the property value:
+
+       DESCRIPTION:Meeting to provide technical review for "Phoenix"
+         design.\nHappy Face Conference Room. Phoenix design team
+         MUST attend this meeting.\nRSVP to team leader.
+
+3.8.1.6.  Geographic Position
+
+   Property Name:  GEO
+
+   Purpose:  This property specifies information related to the global
+      position for the activity specified by a calendar component.
+
+
+
+
+Desruisseaux                Standards Track                    [Page 85]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Value Type:  FLOAT.  The value MUST be two SEMICOLON-separated FLOAT
+      values.
+
+   Property Parameters:  IANA and non-standard property parameters can
+      be specified on this property.
+
+   Conformance:  This property can be specified in "VEVENT" or "VTODO"
+      calendar components.
+
+   Description:  This property value specifies latitude and longitude,
+      in that order (i.e., "LAT LON" ordering).  The longitude
+      represents the location east or west of the prime meridian as a
+      positive or negative real number, respectively.  The longitude and
+      latitude values MAY be specified up to six decimal places, which
+      will allow for accuracy to within one meter of geographical
+      position.  Receiving applications MUST accept values of this
+      precision and MAY truncate values of greater precision.
+
+      Values for latitude and longitude shall be expressed as decimal
+      fractions of degrees.  Whole degrees of latitude shall be
+      represented by a two-digit decimal number ranging from 0 through
+      90.  Whole degrees of longitude shall be represented by a decimal
+      number ranging from 0 through 180.  When a decimal fraction of a
+      degree is specified, it shall be separated from the whole number
+      of degrees by a decimal point.
+
+      Latitudes north of the equator shall be specified by a plus sign
+      (+), or by the absence of a minus sign (-), preceding the digits
+      designating degrees.  Latitudes south of the Equator shall be
+      designated by a minus sign (-) preceding the digits designating
+      degrees.  A point on the Equator shall be assigned to the Northern
+      Hemisphere.
+
+      Longitudes east of the prime meridian shall be specified by a plus
+      sign (+), or by the absence of a minus sign (-), preceding the
+      digits designating degrees.  Longitudes west of the meridian shall
+      be designated by minus sign (-) preceding the digits designating
+      degrees.  A point on the prime meridian shall be assigned to the
+      Eastern Hemisphere.  A point on the 180th meridian shall be
+      assigned to the Western Hemisphere.  One exception to this last
+      convention is permitted.  For the special condition of describing
+      a band of latitude around the earth, the East Bounding Coordinate
+      data element shall be assigned the value +180 (180) degrees.
+
+      Any spatial address with a latitude of +90 (90) or -90 degrees
+      will specify the position at the North or South Pole,
+      respectively.  The component for longitude may have any legal
+      value.
+
+
+
+Desruisseaux                Standards Track                    [Page 86]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      With the exception of the special condition described above, this
+      form is specified in [ANSI INCITS 61-1986].
+
+      The simple formula for converting degrees-minutes-seconds into
+      decimal degrees is:
+
+      decimal = degrees + minutes/60 + seconds/3600.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       geo        = "GEO" geoparam ":" geovalue CRLF
+
+       geoparam   = *(";" other-param)
+
+       geovalue   = float ";" float
+       ;Latitude and Longitude components
+
+   Example:  The following is an example of this property:
+
+       GEO:37.386013;-122.082932
+
+3.8.1.7.  Location
+
+   Property Name:  LOCATION
+
+   Purpose:  This property defines the intended venue for the activity
+      defined by a calendar component.
+
+   Value Type:  TEXT
+
+   Property Parameters:  IANA, non-standard, alternate text
+      representation, and language property parameters can be specified
+      on this property.
+
+   Conformance:  This property can be specified in "VEVENT" or "VTODO"
+      calendar component.
+
+   Description:  Specific venues such as conference or meeting rooms may
+      be explicitly specified using this property.  An alternate
+      representation may be specified that is a URI that points to
+      directory information with more structured specification of the
+      location.  For example, the alternate representation may specify
+      either an LDAP URL [RFC4516] pointing to an LDAP server entry or a
+      CID URL [RFC2392] pointing to a MIME body part containing a
+      Virtual-Information Card (vCard) [RFC2426] for the location.
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 87]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       location   = "LOCATION"  locparam ":" text CRLF
+
+       locparam   = *(
+                  ;
+                  ; The following are OPTIONAL,
+                  ; but MUST NOT occur more than once.
+                  ;
+                  (";" altrepparam) / (";" languageparam) /
+                  ;
+                  ; The following is OPTIONAL,
+                  ; and MAY occur more than once.
+                  ;
+                  (";" other-param)
+                  ;
+                  )
+
+   Example:  The following are some examples of this property:
+
+       LOCATION:Conference Room - F123\, Bldg. 002
+
+       LOCATION;ALTREP="http://xyzcorp.com/conf-rooms/f123.vcf":
+        Conference Room - F123\, Bldg. 002
+
+3.8.1.8.  Percent Complete
+
+   Property Name:  PERCENT-COMPLETE
+
+   Purpose:  This property is used by an assignee or delegatee of a
+      to-do to convey the percent completion of a to-do to the
+      "Organizer".
+
+   Value Type:  INTEGER
+
+   Property Parameters:  IANA and non-standard property parameters can
+      be specified on this property.
+
+   Conformance:  This property can be specified once in a "VTODO"
+      calendar component.
+
+   Description:  The property value is a positive integer between 0 and
+      100.  A value of "0" indicates the to-do has not yet been started.
+      A value of "100" indicates that the to-do has been completed.
+      Integer values in between indicate the percent partially complete.
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 88]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      When a to-do is assigned to multiple individuals, the property
+      value indicates the percent complete for that portion of the to-do
+      assigned to the assignee or delegatee.  For example, if a to-do is
+      assigned to both individuals "A" and "B".  A reply from "A" with a
+      percent complete of "70" indicates that "A" has completed 70% of
+      the to-do assigned to them.  A reply from "B" with a percent
+      complete of "50" indicates "B" has completed 50% of the to-do
+      assigned to them.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       percent = "PERCENT-COMPLETE" pctparam ":" integer CRLF
+
+       pctparam   = *(";" other-param)
+
+   Example:  The following is an example of this property to show 39%
+      completion:
+
+       PERCENT-COMPLETE:39
+
+3.8.1.9.  Priority
+
+   Property Name:  PRIORITY
+
+   Purpose:  This property defines the relative priority for a calendar
+      component.
+
+   Value Type:  INTEGER
+
+   Property Parameters:  IANA and non-standard property parameters can
+      be specified on this property.
+
+   Conformance:  This property can be specified in "VEVENT" and "VTODO"
+      calendar components.
+
+   Description:  This priority is specified as an integer in the range 0
+      to 9.  A value of 0 specifies an undefined priority.  A value of 1
+      is the highest priority.  A value of 2 is the second highest
+      priority.  Subsequent numbers specify a decreasing ordinal
+      priority.  A value of 9 is the lowest priority.
+
+      A CUA with a three-level priority scheme of "HIGH", "MEDIUM", and
+      "LOW" is mapped into this property such that a property value in
+      the range of 1 to 4 specifies "HIGH" priority.  A value of 5 is
+      the normal or "MEDIUM" priority.  A value in the range of 6 to 9
+      is "LOW" priority.
+
+
+
+
+Desruisseaux                Standards Track                    [Page 89]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      A CUA with a priority schema of "A1", "A2", "A3", "B1", "B2", ...,
+      "C3" is mapped into this property such that a property value of 1
+      specifies "A1", a property value of 2 specifies "A2", a property
+      value of 3 specifies "A3", and so forth up to a property value of
+      9 specifies "C3".
+
+      Other integer values are reserved for future use.
+
+      Within a "VEVENT" calendar component, this property specifies a
+      priority for the event.  This property may be useful when more
+      than one event is scheduled for a given time period.
+
+      Within a "VTODO" calendar component, this property specified a
+      priority for the to-do.  This property is useful in prioritizing
+      multiple action items for a given time period.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       priority   = "PRIORITY" prioparam ":" priovalue CRLF
+       ;Default is zero (i.e., undefined).
+
+       prioparam  = *(";" other-param)
+
+       priovalue   = integer       ;Must be in the range [0..9]
+          ; All other values are reserved for future use.
+
+   Example:  The following is an example of a property with the highest
+      priority:
+
+       PRIORITY:1
+
+      The following is an example of a property with a next highest
+      priority:
+
+       PRIORITY:2
+
+      The following is an example of a property with no priority.  This
+      is equivalent to not specifying the "PRIORITY" property:
+
+       PRIORITY:0
+
+
+
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 90]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+3.8.1.10.  Resources
+
+   Property Name:  RESOURCES
+
+   Purpose:  This property defines the equipment or resources
+      anticipated for an activity specified by a calendar component.
+
+   Value Type:  TEXT
+
+   Property Parameters:  IANA, non-standard, alternate text
+      representation, and language property parameters can be specified
+      on this property.
+
+   Conformance:  This property can be specified once in "VEVENT" or
+      "VTODO" calendar component.
+
+   Description:  The property value is an arbitrary text.  More than one
+      resource can be specified as a COMMA-separated list of resources.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       resources  = "RESOURCES" resrcparam ":" text *("," text) CRLF
+
+       resrcparam = *(
+                  ;
+                  ; The following are OPTIONAL,
+                  ; but MUST NOT occur more than once.
+                  ;
+                  (";" altrepparam) / (";" languageparam) /
+                  ;
+                  ; The following is OPTIONAL,
+                  ; and MAY occur more than once.
+                  ;
+                  (";" other-param)
+                  ;
+                  )
+
+   Example:  The following is an example of this property:
+
+       RESOURCES:EASEL,PROJECTOR,VCR
+
+       RESOURCES;LANGUAGE=fr:Nettoyeur haute pression
+
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 91]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+3.8.1.11.  Status
+
+   Property Name:  STATUS
+
+   Purpose:  This property defines the overall status or confirmation
+      for the calendar component.
+
+   Value Type:  TEXT
+
+   Property Parameters:  IANA and non-standard property parameters can
+      be specified on this property.
+
+   Conformance:  This property can be specified once in "VEVENT",
+      "VTODO", or "VJOURNAL" calendar components.
+
+   Description:  In a group-scheduled calendar component, the property
+      is used by the "Organizer" to provide a confirmation of the event
+      to the "Attendees".  For example in a "VEVENT" calendar component,
+      the "Organizer" can indicate that a meeting is tentative,
+      confirmed, or cancelled.  In a "VTODO" calendar component, the
+      "Organizer" can indicate that an action item needs action, is
+      completed, is in process or being worked on, or has been
+      cancelled.  In a "VJOURNAL" calendar component, the "Organizer"
+      can indicate that a journal entry is draft, final, or has been
+      cancelled or removed.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       status          = "STATUS" statparam ":" statvalue CRLF
+
+       statparam       = *(";" other-param)
+
+       statvalue       = (statvalue-event
+                       /  statvalue-todo
+                       /  statvalue-jour)
+
+       statvalue-event = "TENTATIVE"    ;Indicates event is tentative.
+                       / "CONFIRMED"    ;Indicates event is definite.
+                       / "CANCELLED"    ;Indicates event was cancelled.
+       ;Status values for a "VEVENT"
+
+       statvalue-todo  = "NEEDS-ACTION" ;Indicates to-do needs action.
+                       / "COMPLETED"    ;Indicates to-do completed.
+                       / "IN-PROCESS"   ;Indicates to-do in process of.
+                       / "CANCELLED"    ;Indicates to-do was cancelled.
+       ;Status values for "VTODO".
+
+
+
+
+Desruisseaux                Standards Track                    [Page 92]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+       statvalue-jour  = "DRAFT"        ;Indicates journal is draft.
+                       / "FINAL"        ;Indicates journal is final.
+                       / "CANCELLED"    ;Indicates journal is removed.
+      ;Status values for "VJOURNAL".
+
+   Example:  The following is an example of this property for a "VEVENT"
+      calendar component:
+
+       STATUS:TENTATIVE
+
+      The following is an example of this property for a "VTODO"
+      calendar component:
+
+       STATUS:NEEDS-ACTION
+
+      The following is an example of this property for a "VJOURNAL"
+      calendar component:
+
+       STATUS:DRAFT
+
+3.8.1.12.  Summary
+
+   Property Name:  SUMMARY
+
+   Purpose:  This property defines a short summary or subject for the
+      calendar component.
+
+   Value Type:  TEXT
+
+   Property Parameters:  IANA, non-standard, alternate text
+      representation, and language property parameters can be specified
+      on this property.
+
+   Conformance:  The property can be specified in "VEVENT", "VTODO",
+      "VJOURNAL", or "VALARM" calendar components.
+
+   Description:  This property is used in the "VEVENT", "VTODO", and
+      "VJOURNAL" calendar components to capture a short, one-line
+      summary about the activity or journal entry.
+
+      This property is used in the "VALARM" calendar component to
+      capture the subject of an EMAIL category of alarm.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 93]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+       summary    = "SUMMARY" summparam ":" text CRLF
+
+       summparam  = *(
+                  ;
+                  ; The following are OPTIONAL,
+                  ; but MUST NOT occur more than once.
+                  ;
+                  (";" altrepparam) / (";" languageparam) /
+                  ;
+                  ; The following is OPTIONAL,
+                  ; and MAY occur more than once.
+                  ;
+                  (";" other-param)
+                  ;
+                  )
+
+   Example:  The following is an example of this property:
+
+       SUMMARY:Department Party
+
+3.8.2.  Date and Time Component Properties
+
+   The following properties specify date and time related information in
+   calendar components.
+
+3.8.2.1.  Date-Time Completed
+
+   Property Name:  COMPLETED
+
+   Purpose:  This property defines the date and time that a to-do was
+      actually completed.
+
+   Value Type:  DATE-TIME
+
+   Property Parameters:  IANA and non-standard property parameters can
+      be specified on this property.
+
+   Conformance:  The property can be specified in a "VTODO" calendar
+      component.  The value MUST be specified as a date with UTC time.
+
+   Description:  This property defines the date and time that a to-do
+      was actually completed.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 94]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+       completed  = "COMPLETED" compparam ":" date-time CRLF
+
+       compparam  = *(";" other-param)
+
+   Example:  The following is an example of this property:
+
+    COMPLETED:19960401T150000Z
+
+3.8.2.2.  Date-Time End
+
+   Property Name:  DTEND
+
+   Purpose:  This property specifies the date and time that a calendar
+      component ends.
+
+   Value Type:  The default value type is DATE-TIME.  The value type can
+      be set to a DATE value type.
+
+   Property Parameters:  IANA, non-standard, value data type, and time
+      zone identifier property parameters can be specified on this
+      property.
+
+   Conformance:  This property can be specified in "VEVENT" or
+      "VFREEBUSY" calendar components.
+
+   Description:  Within the "VEVENT" calendar component, this property
+      defines the date and time by which the event ends.  The value type
+      of this property MUST be the same as the "DTSTART" property, and
+      its value MUST be later in time than the value of the "DTSTART"
+      property.  Furthermore, this property MUST be specified as a date
+      with local time if and only if the "DTSTART" property is also
+      specified as a date with local time.
+
+      Within the "VFREEBUSY" calendar component, this property defines
+      the end date and time for the free or busy time information.  The
+      time MUST be specified in the UTC time format.  The value MUST be
+      later in time than the value of the "DTSTART" property.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+
+
+
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 95]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+       dtend      = "DTEND" dtendparam ":" dtendval CRLF
+
+       dtendparam = *(
+                  ;
+                  ; The following are OPTIONAL,
+                  ; but MUST NOT occur more than once.
+                  ;
+                  (";" "VALUE" "=" ("DATE-TIME" / "DATE")) /
+                  (";" tzidparam) /
+                  ;
+                  ; The following is OPTIONAL,
+                  ; and MAY occur more than once.
+                  ;
+                  (";" other-param)
+                  ;
+                  )
+
+       dtendval   = date-time / date
+       ;Value MUST match value type
+
+   Example:  The following is an example of this property:
+
+       DTEND:19960401T150000Z
+
+       DTEND;VALUE=DATE:19980704
+
+3.8.2.3.  Date-Time Due
+
+   Property Name:  DUE
+
+   Purpose:  This property defines the date and time that a to-do is
+      expected to be completed.
+
+   Value Type:  The default value type is DATE-TIME.  The value type can
+      be set to a DATE value type.
+
+   Property Parameters:  IANA, non-standard, value data type, and time
+      zone identifier property parameters can be specified on this
+      property.
+
+   Conformance:  The property can be specified once in a "VTODO"
+      calendar component.
+
+   Description:  This property defines the date and time before which a
+      to-do is expected to be completed.  For cases where this property
+      is specified in a "VTODO" calendar component that also specifies a
+      "DTSTART" property, the value type of this property MUST be the
+      same as the "DTSTART" property, and the value of this property
+
+
+
+Desruisseaux                Standards Track                    [Page 96]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      MUST be later in time than the value of the "DTSTART" property.
+      Furthermore, this property MUST be specified as a date with local
+      time if and only if the "DTSTART" property is also specified as a
+      date with local time.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       due        = "DUE" dueparam ":" dueval CRLF
+
+       dueparam   = *(
+                  ;
+                  ; The following are OPTIONAL,
+                  ; but MUST NOT occur more than once.
+                  ;
+                  (";" "VALUE" "=" ("DATE-TIME" / "DATE")) /
+                  (";" tzidparam) /
+                  ;
+                  ; The following is OPTIONAL,
+                  ; and MAY occur more than once.
+                  ;
+                  (";" other-param)
+                  ;
+                  )
+
+       dueval     = date-time / date
+       ;Value MUST match value type
+
+   Example:  The following is an example of this property:
+
+       DUE:19980430T000000Z
+
+3.8.2.4.  Date-Time Start
+
+   Property Name:  DTSTART
+
+   Purpose:  This property specifies when the calendar component begins.
+
+   Value Type:  The default value type is DATE-TIME.  The time value
+      MUST be one of the forms defined for the DATE-TIME value type.
+      The value type can be set to a DATE value type.
+
+   Property Parameters:  IANA, non-standard, value data type, and time
+      zone identifier property parameters can be specified on this
+      property.
+
+   Conformance:  This property can be specified once in the "VEVENT",
+      "VTODO", or "VFREEBUSY" calendar components as well as in the
+
+
+
+Desruisseaux                Standards Track                    [Page 97]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      "STANDARD" and "DAYLIGHT" sub-components.  This property is
+      REQUIRED in all types of recurring calendar components that
+      specify the "RRULE" property.  This property is also REQUIRED in
+      "VEVENT" calendar components contained in iCalendar objects that
+      don't specify the "METHOD" property.
+
+   Description:  Within the "VEVENT" calendar component, this property
+      defines the start date and time for the event.
+
+      Within the "VFREEBUSY" calendar component, this property defines
+      the start date and time for the free or busy time information.
+      The time MUST be specified in UTC time.
+
+      Within the "STANDARD" and "DAYLIGHT" sub-components, this property
+      defines the effective start date and time for a time zone
+      specification.  This property is REQUIRED within each "STANDARD"
+      and "DAYLIGHT" sub-components included in "VTIMEZONE" calendar
+      components and MUST be specified as a date with local time without
+      the "TZID" property parameter.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       dtstart    = "DTSTART" dtstparam ":" dtstval CRLF
+
+       dtstparam  = *(
+                  ;
+                  ; The following are OPTIONAL,
+                  ; but MUST NOT occur more than once.
+                  ;
+                  (";" "VALUE" "=" ("DATE-TIME" / "DATE")) /
+                  (";" tzidparam) /
+                  ;
+                  ; The following is OPTIONAL,
+                  ; and MAY occur more than once.
+                  ;
+                  (";" other-param)
+                  ;
+                  )
+
+       dtstval    = date-time / date
+       ;Value MUST match value type
+
+   Example:  The following is an example of this property:
+
+       DTSTART:19980118T073000Z
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 98]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+3.8.2.5.  Duration
+
+   Property Name:  DURATION
+
+   Purpose:  This property specifies a positive duration of time.
+
+   Value Type:  DURATION
+
+   Property Parameters:  IANA and non-standard property parameters can
+      be specified on this property.
+
+   Conformance:  This property can be specified in "VEVENT", "VTODO", or
+      "VALARM" calendar components.
+
+   Description:  In a "VEVENT" calendar component the property may be
+      used to specify a duration of the event, instead of an explicit
+      end DATE-TIME.  In a "VTODO" calendar component the property may
+      be used to specify a duration for the to-do, instead of an
+      explicit due DATE-TIME.  In a "VALARM" calendar component the
+      property may be used to specify the delay period prior to
+      repeating an alarm.  When the "DURATION" property relates to a
+      "DTSTART" property that is specified as a DATE value, then the
+      "DURATION" property MUST be specified as a "dur-day" or "dur-week"
+      value.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       duration   = "DURATION" durparam ":" dur-value CRLF
+                    ;consisting of a positive duration of time.
+
+       durparam   = *(";" other-param)
+
+   Example:  The following is an example of this property that specifies
+      an interval of time of one hour and zero minutes and zero seconds:
+
+       DURATION:PT1H0M0S
+
+      The following is an example of this property that specifies an
+      interval of time of 15 minutes.
+
+       DURATION:PT15M
+
+
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                    [Page 99]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+3.8.2.6.  Free/Busy Time
+
+   Property Name:  FREEBUSY
+
+   Purpose:  This property defines one or more free or busy time
+      intervals.
+
+   Value Type:  PERIOD
+
+   Property Parameters:  IANA, non-standard, and free/busy time type
+      property parameters can be specified on this property.
+
+   Conformance:  The property can be specified in a "VFREEBUSY" calendar
+      component.
+
+   Description:  These time periods can be specified as either a start
+      and end DATE-TIME or a start DATE-TIME and DURATION.  The date and
+      time MUST be a UTC time format.
+
+      "FREEBUSY" properties within the "VFREEBUSY" calendar component
+      SHOULD be sorted in ascending order, based on start time and then
+      end time, with the earliest periods first.
+
+      The "FREEBUSY" property can specify more than one value, separated
+      by the COMMA character.  In such cases, the "FREEBUSY" property
+      values MUST all be of the same "FBTYPE" property parameter type
+      (e.g., all values of a particular "FBTYPE" listed together in a
+      single property).
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       freebusy   = "FREEBUSY" fbparam ":" fbvalue CRLF
+
+       fbparam    = *(
+                  ;
+                  ; The following is OPTIONAL,
+                  ; but MUST NOT occur more than once.
+                  ;
+                  (";" fbtypeparam) /
+                  ;
+                  ; The following is OPTIONAL,
+                  ; and MAY occur more than once.
+                  ;
+                  (";" other-param)
+                  ;
+                  )
+
+
+
+
+Desruisseaux                Standards Track                   [Page 100]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+       fbvalue    = period *("," period)
+       ;Time value MUST be in the UTC time format.
+
+   Example:  The following are some examples of this property:
+
+       FREEBUSY;FBTYPE=BUSY-UNAVAILABLE:19970308T160000Z/PT8H30M
+
+       FREEBUSY;FBTYPE=FREE:19970308T160000Z/PT3H,19970308T200000Z/PT1H
+
+       FREEBUSY;FBTYPE=FREE:19970308T160000Z/PT3H,19970308T200000Z/PT1H
+        ,19970308T230000Z/19970309T000000Z
+
+3.8.2.7.  Time Transparency
+
+   Property Name:  TRANSP
+
+   Purpose:  This property defines whether or not an event is
+      transparent to busy time searches.
+
+   Value Type:  TEXT
+
+   Property Parameters:  IANA and non-standard property parameters can
+      be specified on this property.
+
+   Conformance:  This property can be specified once in a "VEVENT"
+      calendar component.
+
+   Description:  Time Transparency is the characteristic of an event
+      that determines whether it appears to consume time on a calendar.
+      Events that consume actual time for the individual or resource
+      associated with the calendar SHOULD be recorded as OPAQUE,
+      allowing them to be detected by free/busy time searches.  Other
+      events, which do not take up the individual's (or resource's) time
+      SHOULD be recorded as TRANSPARENT, making them invisible to free/
+      busy time searches.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       transp     = "TRANSP" transparam ":" transvalue CRLF
+
+       transparam = *(";" other-param)
+
+       transvalue = "OPAQUE"
+                   ;Blocks or opaque on busy time searches.
+                   / "TRANSPARENT"
+                   ;Transparent on busy time searches.
+       ;Default value is OPAQUE
+
+
+
+Desruisseaux                Standards Track                   [Page 101]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Example:  The following is an example of this property for an event
+      that is transparent or does not block on free/busy time searches:
+
+       TRANSP:TRANSPARENT
+
+      The following is an example of this property for an event that is
+      opaque or blocks on free/busy time searches:
+
+       TRANSP:OPAQUE
+
+3.8.3.  Time Zone Component Properties
+
+   The following properties specify time zone information in calendar
+   components.
+
+3.8.3.1.  Time Zone Identifier
+
+   Property Name:  TZID
+
+   Purpose:  This property specifies the text value that uniquely
+      identifies the "VTIMEZONE" calendar component in the scope of an
+      iCalendar object.
+
+   Value Type:  TEXT
+
+   Property Parameters:  IANA and non-standard property parameters can
+      be specified on this property.
+
+   Conformance:  This property MUST be specified in a "VTIMEZONE"
+      calendar component.
+
+   Description:  This is the label by which a time zone calendar
+      component is referenced by any iCalendar properties whose value
+      type is either DATE-TIME or TIME and not intended to specify a UTC
+      or a "floating" time.  The presence of the SOLIDUS character as a
+      prefix, indicates that this "TZID" represents an unique ID in a
+      globally defined time zone registry (when such registry is
+      defined).
+
+         Note: This document does not define a naming convention for
+         time zone identifiers.  Implementers may want to use the naming
+         conventions defined in existing time zone specifications such
+         as the public-domain TZ database [TZDB].  The specification of
+         globally unique time zone identifiers is not addressed by this
+         document and is left for future study.
+
+
+
+
+
+
+Desruisseaux                Standards Track                   [Page 102]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       tzid       = "TZID" tzidpropparam ":" [tzidprefix] text CRLF
+
+       tzidpropparam      = *(";" other-param)
+
+       ;tzidprefix        = "/"
+       ; Defined previously. Just listed here for reader convenience.
+
+   Example:  The following are examples of non-globally unique time zone
+      identifiers:
+
+       TZID:America/New_York
+
+       TZID:America/Los_Angeles
+
+      The following is an example of a fictitious globally unique time
+      zone identifier:
+
+       TZID:/example.org/America/New_York
+
+3.8.3.2.  Time Zone Name
+
+   Property Name:  TZNAME
+
+   Purpose:  This property specifies the customary designation for a
+      time zone description.
+
+   Value Type:  TEXT
+
+   Property Parameters:  IANA, non-standard, and language property
+      parameters can be specified on this property.
+
+   Conformance:  This property can be specified in "STANDARD" and
+      "DAYLIGHT" sub-components.
+
+   Description:  This property specifies a customary name that can be
+      used when displaying dates that occur during the observance
+      defined by the time zone sub-component.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                   [Page 103]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+       tzname     = "TZNAME" tznparam ":" text CRLF
+
+       tznparam   = *(
+                  ;
+                  ; The following is OPTIONAL,
+                  ; but MUST NOT occur more than once.
+                  ;
+                  (";" languageparam) /
+                  ;
+                  ; The following is OPTIONAL,
+                  ; and MAY occur more than once.
+                  ;
+                  (";" other-param)
+                  ;
+                  )
+
+   Example:  The following are examples of this property:
+
+       TZNAME:EST
+
+       TZNAME;LANGUAGE=fr-CA:HNE
+
+3.8.3.3.  Time Zone Offset From
+
+   Property Name:  TZOFFSETFROM
+
+   Purpose:  This property specifies the offset that is in use prior to
+      this time zone observance.
+
+   Value Type:  UTC-OFFSET
+
+   Property Parameters:  IANA and non-standard property parameters can
+      be specified on this property.
+
+   Conformance:  This property MUST be specified in "STANDARD" and
+      "DAYLIGHT" sub-components.
+
+   Description:  This property specifies the offset that is in use prior
+      to this time observance.  It is used to calculate the absolute
+      time at which the transition to a given observance takes place.
+      This property MUST only be specified in a "VTIMEZONE" calendar
+      component.  A "VTIMEZONE" calendar component MUST include this
+      property.  The property value is a signed numeric indicating the
+      number of hours and possibly minutes from UTC.  Positive numbers
+      represent time zones east of the prime meridian, or ahead of UTC.
+      Negative numbers represent time zones west of the prime meridian,
+      or behind UTC.
+
+
+
+
+Desruisseaux                Standards Track                   [Page 104]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       tzoffsetfrom       = "TZOFFSETFROM" frmparam ":" utc-offset
+                            CRLF
+
+       frmparam   = *(";" other-param)
+
+   Example:  The following are examples of this property:
+
+       TZOFFSETFROM:-0500
+
+       TZOFFSETFROM:+1345
+
+3.8.3.4.  Time Zone Offset To
+
+   Property Name:  TZOFFSETTO
+
+   Purpose:  This property specifies the offset that is in use in this
+      time zone observance.
+
+   Value Type:  UTC-OFFSET
+
+   Property Parameters:  IANA and non-standard property parameters can
+      be specified on this property.
+
+   Conformance:  This property MUST be specified in "STANDARD" and
+      "DAYLIGHT" sub-components.
+
+   Description:  This property specifies the offset that is in use in
+      this time zone observance.  It is used to calculate the absolute
+      time for the new observance.  The property value is a signed
+      numeric indicating the number of hours and possibly minutes from
+      UTC.  Positive numbers represent time zones east of the prime
+      meridian, or ahead of UTC.  Negative numbers represent time zones
+      west of the prime meridian, or behind UTC.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       tzoffsetto = "TZOFFSETTO" toparam ":" utc-offset CRLF
+
+       toparam    = *(";" other-param)
+
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                   [Page 105]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Example:  The following are examples of this property:
+
+       TZOFFSETTO:-0400
+
+       TZOFFSETTO:+1245
+
+3.8.3.5.  Time Zone URL
+
+   Property Name:  TZURL
+
+   Purpose:  This property provides a means for a "VTIMEZONE" component
+      to point to a network location that can be used to retrieve an up-
+      to-date version of itself.
+
+   Value Type:  URI
+
+   Property Parameters:  IANA and non-standard property parameters can
+      be specified on this property.
+
+   Conformance:  This property can be specified in a "VTIMEZONE"
+      calendar component.
+
+   Description:  This property provides a means for a "VTIMEZONE"
+      component to point to a network location that can be used to
+      retrieve an up-to-date version of itself.  This provides a hook to
+      handle changes government bodies impose upon time zone
+      definitions.  Retrieval of this resource results in an iCalendar
+      object containing a single "VTIMEZONE" component and a "METHOD"
+      property set to PUBLISH.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       tzurl      = "TZURL" tzurlparam ":" uri CRLF
+
+       tzurlparam = *(";" other-param)
+
+   Example:  The following is an example of this property:
+
+    TZURL:http://timezones.example.org/tz/America-Los_Angeles.ics
+
+3.8.4.  Relationship Component Properties
+
+   The following properties specify relationship information in calendar
+   components.
+
+
+
+
+
+
+Desruisseaux                Standards Track                   [Page 106]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+3.8.4.1.  Attendee
+
+   Property Name:  ATTENDEE
+
+   Purpose:  This property defines an "Attendee" within a calendar
+      component.
+
+   Value Type:  CAL-ADDRESS
+
+   Property Parameters:  IANA, non-standard, language, calendar user
+      type, group or list membership, participation role, participation
+      status, RSVP expectation, delegatee, delegator, sent by, common
+      name, or directory entry reference property parameters can be
+      specified on this property.
+
+   Conformance:  This property MUST be specified in an iCalendar object
+      that specifies a group-scheduled calendar entity.  This property
+      MUST NOT be specified in an iCalendar object when publishing the
+      calendar information (e.g., NOT in an iCalendar object that
+      specifies the publication of a calendar user's busy time, event,
+      to-do, or journal).  This property is not specified in an
+      iCalendar object that specifies only a time zone definition or
+      that defines calendar components that are not group-scheduled
+      components, but are components only on a single user's calendar.
+
+   Description:  This property MUST only be specified within calendar
+      components to specify participants, non-participants, and the
+      chair of a group-scheduled calendar entity.  The property is
+      specified within an "EMAIL" category of the "VALARM" calendar
+      component to specify an email address that is to receive the email
+      type of iCalendar alarm.
+
+      The property parameter "CN" is for the common or displayable name
+      associated with the calendar address; "ROLE", for the intended
+      role that the attendee will have in the calendar component;
+      "PARTSTAT", for the status of the attendee's participation;
+      "RSVP", for indicating whether the favor of a reply is requested;
+      "CUTYPE", to indicate the type of calendar user; "MEMBER", to
+      indicate the groups that the attendee belongs to; "DELEGATED-TO",
+      to indicate the calendar users that the original request was
+      delegated to; and "DELEGATED-FROM", to indicate whom the request
+      was delegated from; "SENT-BY", to indicate whom is acting on
+      behalf of the "ATTENDEE"; and "DIR", to indicate the URI that
+      points to the directory information corresponding to the attendee.
+      These property parameters can be specified on an "ATTENDEE"
+      property in either a "VEVENT", "VTODO", or "VJOURNAL" calendar
+      component.  They MUST NOT be specified in an "ATTENDEE" property
+      in a "VFREEBUSY" or "VALARM" calendar component.  If the
+
+
+
+Desruisseaux                Standards Track                   [Page 107]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      "LANGUAGE" property parameter is specified, the identified
+      language applies to the "CN" parameter.
+
+      A recipient delegated a request MUST inherit the "RSVP" and "ROLE"
+      values from the attendee that delegated the request to them.
+
+      Multiple attendees can be specified by including multiple
+      "ATTENDEE" properties within the calendar component.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       attendee   = "ATTENDEE" attparam ":" cal-address CRLF
+
+       attparam   = *(
+                  ;
+                  ; The following are OPTIONAL,
+                  ; but MUST NOT occur more than once.
+                  ;
+                  (";" cutypeparam) / (";" memberparam) /
+                  (";" roleparam) / (";" partstatparam) /
+                  (";" rsvpparam) / (";" deltoparam) /
+                  (";" delfromparam) / (";" sentbyparam) /
+                  (";" cnparam) / (";" dirparam) /
+                  (";" languageparam) /
+                  ;
+                  ; The following is OPTIONAL,
+                  ; and MAY occur more than once.
+                  ;
+                  (";" other-param)
+                  ;
+                  )
+
+   Example:  The following are examples of this property's use for a
+      to-do:
+
+       ATTENDEE;MEMBER="mailto:DEV-GROUP at example.com":
+        mailto:joecool at example.com
+       ATTENDEE;DELEGATED-FROM="mailto:immud at example.com":
+        mailto:ildoit at example.com
+
+
+
+
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                   [Page 108]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      The following is an example of this property used for specifying
+      multiple attendees to an event:
+
+       ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=TENTATIVE;CN=Henry
+        Cabot:mailto:hcabot at example.com
+       ATTENDEE;ROLE=REQ-PARTICIPANT;DELEGATED-FROM="mailto:bob@
+        example.com";PARTSTAT=ACCEPTED;CN=Jane Doe:mailto:jdoe@
+        example.com
+
+      The following is an example of this property with a URI to the
+      directory information associated with the attendee:
+
+       ATTENDEE;CN=John Smith;DIR="ldap://example.com:6666/o=ABC%
+        20Industries,c=US???(cn=Jim%20Dolittle)":mailto:jimdo@
+        example.com
+
+      The following is an example of this property with "delegatee" and
+      "delegator" information for an event:
+
+       ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=TENTATIVE;DELEGATED-FROM=
+        "mailto:iamboss at example.com";CN=Henry Cabot:mailto:hcabot@
+        example.com
+       ATTENDEE;ROLE=NON-PARTICIPANT;PARTSTAT=DELEGATED;DELEGATED-TO=
+        "mailto:hcabot at example.com";CN=The Big Cheese:mailto:iamboss
+        @example.com
+       ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;CN=Jane Doe
+        :mailto:jdoe at example.com
+
+   Example:  The following is an example of this property's use when
+      another calendar user is acting on behalf of the "Attendee":
+
+       ATTENDEE;SENT-BY=mailto:jan_doe at example.com;CN=John Smith:
+        mailto:jsmith at example.com
+
+3.8.4.2.  Contact
+
+   Property Name:  CONTACT
+
+   Purpose:  This property is used to represent contact information or
+      alternately a reference to contact information associated with the
+      calendar component.
+
+   Value Type:  TEXT
+
+   Property Parameters:  IANA, non-standard, alternate text
+      representation, and language property parameters can be specified
+      on this property.
+
+
+
+
+Desruisseaux                Standards Track                   [Page 109]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Conformance:  This property can be specified in a "VEVENT", "VTODO",
+      "VJOURNAL", or "VFREEBUSY" calendar component.
+
+   Description:  The property value consists of textual contact
+      information.  An alternative representation for the property value
+      can also be specified that refers to a URI pointing to an
+      alternate form, such as a vCard [RFC2426], for the contact
+      information.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       contact    = "CONTACT" contparam ":" text CRLF
+
+       contparam  = *(
+                  ;
+                  ; The following are OPTIONAL,
+                  ; but MUST NOT occur more than once.
+                  ;
+                  (";" altrepparam) / (";" languageparam) /
+                  ;
+                  ; The following is OPTIONAL,
+                  ; and MAY occur more than once.
+                  ;
+                  (";" other-param)
+                  ;
+                  )
+
+   Example:  The following is an example of this property referencing
+      textual contact information:
+
+       CONTACT:Jim Dolittle\, ABC Industries\, +1-919-555-1234
+
+      The following is an example of this property with an alternate
+      representation of an LDAP URI to a directory entry containing the
+      contact information:
+
+       CONTACT;ALTREP="ldap://example.com:6666/o=ABC%20Industries\,
+        c=US???(cn=Jim%20Dolittle)":Jim Dolittle\, ABC Industries\,
+        +1-919-555-1234
+
+      The following is an example of this property with an alternate
+      representation of a MIME body part containing the contact
+      information, such as a vCard [RFC2426] embedded in a text/
+      directory media type [RFC2425]:
+
+       CONTACT;ALTREP="CID:part3.msg970930T083000SILVER at example.com":
+        Jim Dolittle\, ABC Industries\, +1-919-555-1234
+
+
+
+Desruisseaux                Standards Track                   [Page 110]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      The following is an example of this property referencing a network
+      resource, such as a vCard [RFC2426] object containing the contact
+      information:
+
+       CONTACT;ALTREP="http://example.com/pdi/jdoe.vcf":Jim
+         Dolittle\, ABC Industries\, +1-919-555-1234
+
+3.8.4.3.  Organizer
+
+   Property Name:  ORGANIZER
+
+   Purpose:  This property defines the organizer for a calendar
+      component.
+
+   Value Type:  CAL-ADDRESS
+
+   Property Parameters:  IANA, non-standard, language, common name,
+      directory entry reference, and sent-by property parameters can be
+      specified on this property.
+
+   Conformance:  This property MUST be specified in an iCalendar object
+      that specifies a group-scheduled calendar entity.  This property
+      MUST be specified in an iCalendar object that specifies the
+      publication of a calendar user's busy time.  This property MUST
+      NOT be specified in an iCalendar object that specifies only a time
+      zone definition or that defines calendar components that are not
+      group-scheduled components, but are components only on a single
+      user's calendar.
+
+   Description:  This property is specified within the "VEVENT",
+      "VTODO", and "VJOURNAL" calendar components to specify the
+      organizer of a group-scheduled calendar entity.  The property is
+      specified within the "VFREEBUSY" calendar component to specify the
+      calendar user requesting the free or busy time.  When publishing a
+      "VFREEBUSY" calendar component, the property is used to specify
+      the calendar that the published busy time came from.
+
+      The property has the property parameters "CN", for specifying the
+      common or display name associated with the "Organizer", "DIR", for
+      specifying a pointer to the directory information associated with
+      the "Organizer", "SENT-BY", for specifying another calendar user
+      that is acting on behalf of the "Organizer".  The non-standard
+      parameters may also be specified on this property.  If the
+      "LANGUAGE" property parameter is specified, the identified
+      language applies to the "CN" parameter value.
+
+
+
+
+
+
+Desruisseaux                Standards Track                   [Page 111]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       organizer  = "ORGANIZER" orgparam ":"
+                    cal-address CRLF
+
+       orgparam   = *(
+                  ;
+                  ; The following are OPTIONAL,
+                  ; but MUST NOT occur more than once.
+                  ;
+                  (";" cnparam) / (";" dirparam) / (";" sentbyparam) /
+                  (";" languageparam) /
+                  ;
+                  ; The following is OPTIONAL,
+                  ; and MAY occur more than once.
+                  ;
+                  (";" other-param)
+                  ;
+                  )
+
+   Example:  The following is an example of this property:
+
+       ORGANIZER;CN=John Smith:mailto:jsmith at example.com
+
+      The following is an example of this property with a pointer to the
+      directory information associated with the organizer:
+
+       ORGANIZER;CN=JohnSmith;DIR="ldap://example.com:6666/o=DC%20Ass
+        ociates,c=US???(cn=John%20Smith)":mailto:jsmith at example.com
+
+      The following is an example of this property used by another
+      calendar user who is acting on behalf of the organizer, with
+      responses intended to be sent back to the organizer, not the other
+      calendar user:
+
+       ORGANIZER;SENT-BY="mailto:jane_doe at example.com":
+        mailto:jsmith at example.com
+
+3.8.4.4.  Recurrence ID
+
+   Property Name:  RECURRENCE-ID
+
+   Purpose:  This property is used in conjunction with the "UID" and
+      "SEQUENCE" properties to identify a specific instance of a
+      recurring "VEVENT", "VTODO", or "VJOURNAL" calendar component.
+      The property value is the original value of the "DTSTART" property
+      of the recurrence instance.
+
+
+
+Desruisseaux                Standards Track                   [Page 112]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Value Type:  The default value type is DATE-TIME.  The value type can
+      be set to a DATE value type.  This property MUST have the same
+      value type as the "DTSTART" property contained within the
+      recurring component.  Furthermore, this property MUST be specified
+      as a date with local time if and only if the "DTSTART" property
+      contained within the recurring component is specified as a date
+      with local time.
+
+   Property Parameters:  IANA, non-standard, value data type, time zone
+      identifier, and recurrence identifier range parameters can be
+      specified on this property.
+
+   Conformance:  This property can be specified in an iCalendar object
+      containing a recurring calendar component.
+
+   Description:  The full range of calendar components specified by a
+      recurrence set is referenced by referring to just the "UID"
+      property value corresponding to the calendar component.  The
+      "RECURRENCE-ID" property allows the reference to an individual
+      instance within the recurrence set.
+
+      If the value of the "DTSTART" property is a DATE type value, then
+      the value MUST be the calendar date for the recurrence instance.
+
+      The DATE-TIME value is set to the time when the original
+      recurrence instance would occur; meaning that if the intent is to
+      change a Friday meeting to Thursday, the DATE-TIME is still set to
+      the original Friday meeting.
+
+      The "RECURRENCE-ID" property is used in conjunction with the "UID"
+      and "SEQUENCE" properties to identify a particular instance of a
+      recurring event, to-do, or journal.  For a given pair of "UID" and
+      "SEQUENCE" property values, the "RECURRENCE-ID" value for a
+      recurrence instance is fixed.
+
+      The "RANGE" parameter is used to specify the effective range of
+      recurrence instances from the instance specified by the
+      "RECURRENCE-ID" property value.  The value for the range parameter
+      can only be "THISANDFUTURE" to indicate a range defined by the
+      given recurrence instance and all subsequent instances.
+      Subsequent instances are determined by their "RECURRENCE-ID" value
+      and not their current scheduled start time.  Subsequent instances
+      defined in separate components are not impacted by the given
+      recurrence instance.  When the given recurrence instance is
+      rescheduled, all subsequent instances are also rescheduled by the
+      same time difference.  For instance, if the given recurrence
+      instance is rescheduled to start 2 hours later, then all
+      subsequent instances are also rescheduled 2 hours later.
+
+
+
+Desruisseaux                Standards Track                   [Page 113]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      Similarly, if the duration of the given recurrence instance is
+      modified, then all subsequence instances are also modified to have
+      this same duration.
+
+         Note: The "RANGE" parameter may not be appropriate to
+         reschedule specific subsequent instances of complex recurring
+         calendar component.  Assuming an unbounded recurring calendar
+         component scheduled to occur on Mondays and Wednesdays, the
+         "RANGE" parameter could not be used to reschedule only the
+         future Monday instances to occur on Tuesday instead.  In such
+         cases, the calendar application could simply truncate the
+         unbounded recurring calendar component (i.e., with the "COUNT"
+         or "UNTIL" rule parts), and create two new unbounded recurring
+         calendar components for the future instances.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       recurid    = "RECURRENCE-ID" ridparam ":" ridval CRLF
+
+       ridparam   = *(
+                  ;
+                  ; The following are OPTIONAL,
+                  ; but MUST NOT occur more than once.
+                  ;
+                  (";" "VALUE" "=" ("DATE-TIME" / "DATE")) /
+                  (";" tzidparam) / (";" rangeparam) /
+                  ;
+                  ; The following is OPTIONAL,
+                  ; and MAY occur more than once.
+                  ;
+                  (";" other-param)
+                  ;
+                  )
+
+       ridval     = date-time / date
+       ;Value MUST match value type
+
+   Example:  The following are examples of this property:
+
+       RECURRENCE-ID;VALUE=DATE:19960401
+
+       RECURRENCE-ID;RANGE=THISANDFUTURE:19960120T120000Z
+
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                   [Page 114]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+3.8.4.5.  Related To
+
+   Property Name:  RELATED-TO
+
+   Purpose:  This property is used to represent a relationship or
+      reference between one calendar component and another.
+
+   Value Type:  TEXT
+
+   Property Parameters:  IANA, non-standard, and relationship type
+      property parameters can be specified on this property.
+
+   Conformance:  This property can be specified in the "VEVENT",
+      "VTODO", and "VJOURNAL" calendar components.
+
+   Description:  The property value consists of the persistent, globally
+      unique identifier of another calendar component.  This value would
+      be represented in a calendar component by the "UID" property.
+
+      By default, the property value points to another calendar
+      component that has a PARENT relationship to the referencing
+      object.  The "RELTYPE" property parameter is used to either
+      explicitly state the default PARENT relationship type to the
+      referenced calendar component or to override the default PARENT
+      relationship type and specify either a CHILD or SIBLING
+      relationship.  The PARENT relationship indicates that the calendar
+      component is a subordinate of the referenced calendar component.
+      The CHILD relationship indicates that the calendar component is a
+      superior of the referenced calendar component.  The SIBLING
+      relationship indicates that the calendar component is a peer of
+      the referenced calendar component.
+
+      Changes to a calendar component referenced by this property can
+      have an implicit impact on the related calendar component.  For
+      example, if a group event changes its start or end date or time,
+      then the related, dependent events will need to have their start
+      and end dates changed in a corresponding way.  Similarly, if a
+      PARENT calendar component is cancelled or deleted, then there is
+      an implied impact to the related CHILD calendar components.  This
+      property is intended only to provide information on the
+      relationship of calendar components.  It is up to the target
+      calendar system to maintain any property implications of this
+      relationship.
+
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                   [Page 115]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       related    = "RELATED-TO" relparam ":" text CRLF
+
+       relparam   = *(
+                  ;
+                  ; The following is OPTIONAL,
+                  ; but MUST NOT occur more than once.
+                  ;
+                  (";" reltypeparam) /
+                  ;
+                  ; The following is OPTIONAL,
+                  ; and MAY occur more than once.
+                  ;
+                  (";" other-param)
+                  ;
+                  )
+
+      The following is an example of this property:
+
+       RELATED-TO:jsmith.part7.19960817T083000.xyzMail at example.com
+
+       RELATED-TO:19960401-080045-4000F192713-0052 at example.com
+
+3.8.4.6.  Uniform Resource Locator
+
+   Property Name:  URL
+
+   Purpose:  This property defines a Uniform Resource Locator (URL)
+      associated with the iCalendar object.
+
+   Value Type:  URI
+
+   Property Parameters:  IANA and non-standard property parameters can
+      be specified on this property.
+
+   Conformance:  This property can be specified once in the "VEVENT",
+      "VTODO", "VJOURNAL", or "VFREEBUSY" calendar components.
+
+   Description:  This property may be used in a calendar component to
+      convey a location where a more dynamic rendition of the calendar
+      information associated with the calendar component can be found.
+      This memo does not attempt to standardize the form of the URI, nor
+      the format of the resource pointed to by the property value.  If
+      the URL property and Content-Location MIME header are both
+      specified, they MUST point to the same resource.
+
+
+
+
+Desruisseaux                Standards Track                   [Page 116]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       url        = "URL" urlparam ":" uri CRLF
+
+       urlparam   = *(";" other-param)
+
+   Example:  The following is an example of this property:
+
+       URL:http://example.com/pub/calendars/jsmith/mytime.ics
+
+3.8.4.7.  Unique Identifier
+
+   Property Name:  UID
+
+   Purpose:  This property defines the persistent, globally unique
+      identifier for the calendar component.
+
+   Value Type:  TEXT
+
+   Property Parameters:  IANA and non-standard property parameters can
+      be specified on this property.
+
+   Conformance:  The property MUST be specified in the "VEVENT",
+      "VTODO", "VJOURNAL", or "VFREEBUSY" calendar components.
+
+   Description:  The "UID" itself MUST be a globally unique identifier.
+      The generator of the identifier MUST guarantee that the identifier
+      is unique.  There are several algorithms that can be used to
+      accomplish this.  A good method to assure uniqueness is to put the
+      domain name or a domain literal IP address of the host on which
+      the identifier was created on the right-hand side of an "@", and
+      on the left-hand side, put a combination of the current calendar
+      date and time of day (i.e., formatted in as a DATE-TIME value)
+      along with some other currently unique (perhaps sequential)
+      identifier available on the system (for example, a process id
+      number).  Using a DATE-TIME value on the left-hand side and a
+      domain name or domain literal on the right-hand side makes it
+      possible to guarantee uniqueness since no two hosts should be
+      using the same domain name or IP address at the same time.  Though
+      other algorithms will work, it is RECOMMENDED that the right-hand
+      side contain some domain identifier (either of the host itself or
+      otherwise) such that the generator of the message identifier can
+      guarantee the uniqueness of the left-hand side within the scope of
+      that domain.
+
+      This is the method for correlating scheduling messages with the
+      referenced "VEVENT", "VTODO", or "VJOURNAL" calendar component.
+
+
+
+Desruisseaux                Standards Track                   [Page 117]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      The full range of calendar components specified by a recurrence
+      set is referenced by referring to just the "UID" property value
+      corresponding to the calendar component.  The "RECURRENCE-ID"
+      property allows the reference to an individual instance within the
+      recurrence set.
+
+      This property is an important method for group-scheduling
+      applications to match requests with later replies, modifications,
+      or deletion requests.  Calendaring and scheduling applications
+      MUST generate this property in "VEVENT", "VTODO", and "VJOURNAL"
+      calendar components to assure interoperability with other group-
+      scheduling applications.  This identifier is created by the
+      calendar system that generates an iCalendar object.
+
+      Implementations MUST be able to receive and persist values of at
+      least 255 octets for this property, but they MUST NOT truncate
+      values in the middle of a UTF-8 multi-octet sequence.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       uid        = "UID" uidparam ":" text CRLF
+
+       uidparam   = *(";" other-param)
+
+   Example:  The following is an example of this property:
+
+       UID:19960401T080045Z-4000F192713-0052 at example.com
+
+3.8.5.  Recurrence Component Properties
+
+   The following properties specify recurrence information in calendar
+   components.
+
+3.8.5.1.  Exception Date-Times
+
+   Property Name:  EXDATE
+
+   Purpose:  This property defines the list of DATE-TIME exceptions for
+      recurring events, to-dos, journal entries, or time zone
+      definitions.
+
+   Value Type:  The default value type for this property is DATE-TIME.
+      The value type can be set to DATE.
+
+   Property Parameters:  IANA, non-standard, value data type, and time
+      zone identifier property parameters can be specified on this
+      property.
+
+
+
+Desruisseaux                Standards Track                   [Page 118]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Conformance:  This property can be specified in recurring "VEVENT",
+      "VTODO", and "VJOURNAL" calendar components as well as in the
+      "STANDARD" and "DAYLIGHT" sub-components of the "VTIMEZONE"
+      calendar component.
+
+   Description:  The exception dates, if specified, are used in
+      computing the recurrence set.  The recurrence set is the complete
+      set of recurrence instances for a calendar component.  The
+      recurrence set is generated by considering the initial "DTSTART"
+      property along with the "RRULE", "RDATE", and "EXDATE" properties
+      contained within the recurring component.  The "DTSTART" property
+      defines the first instance in the recurrence set.  The "DTSTART"
+      property value SHOULD match the pattern of the recurrence rule, if
+      specified.  The recurrence set generated with a "DTSTART" property
+      value that doesn't match the pattern of the rule is undefined.
+      The final recurrence set is generated by gathering all of the
+      start DATE-TIME values generated by any of the specified "RRULE"
+      and "RDATE" properties, and then excluding any start DATE-TIME
+      values specified by "EXDATE" properties.  This implies that start
+      DATE-TIME values specified by "EXDATE" properties take precedence
+      over those specified by inclusion properties (i.e., "RDATE" and
+      "RRULE").  When duplicate instances are generated by the "RRULE"
+      and "RDATE" properties, only one recurrence is considered.
+      Duplicate instances are ignored.
+
+      The "EXDATE" property can be used to exclude the value specified
+      in "DTSTART".  However, in such cases, the original "DTSTART" date
+      MUST still be maintained by the calendaring and scheduling system
+      because the original "DTSTART" value has inherent usage
+      dependencies by other properties such as the "RECURRENCE-ID".
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                   [Page 119]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+       exdate     = "EXDATE" exdtparam ":" exdtval *("," exdtval) CRLF
+
+       exdtparam  = *(
+                  ;
+                  ; The following are OPTIONAL,
+                  ; but MUST NOT occur more than once.
+                  ;
+                  (";" "VALUE" "=" ("DATE-TIME" / "DATE")) /
+                  ;
+                  (";" tzidparam) /
+                  ;
+                  ; The following is OPTIONAL,
+                  ; and MAY occur more than once.
+                  ;
+                  (";" other-param)
+                  ;
+                  )
+
+       exdtval    = date-time / date
+       ;Value MUST match value type
+
+   Example:  The following is an example of this property:
+
+       EXDATE:19960402T010000Z,19960403T010000Z,19960404T010000Z
+
+3.8.5.2.  Recurrence Date-Times
+
+   Property Name:  RDATE
+
+   Purpose:  This property defines the list of DATE-TIME values for
+      recurring events, to-dos, journal entries, or time zone
+      definitions.
+
+   Value Type:  The default value type for this property is DATE-TIME.
+      The value type can be set to DATE or PERIOD.
+
+   Property Parameters:  IANA, non-standard, value data type, and time
+      zone identifier property parameters can be specified on this
+      property.
+
+   Conformance:  This property can be specified in recurring "VEVENT",
+      "VTODO", and "VJOURNAL" calendar components as well as in the
+      "STANDARD" and "DAYLIGHT" sub-components of the "VTIMEZONE"
+      calendar component.
+
+   Description:  This property can appear along with the "RRULE"
+      property to define an aggregate set of repeating occurrences.
+      When they both appear in a recurring component, the recurrence
+
+
+
+Desruisseaux                Standards Track                   [Page 120]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      instances are defined by the union of occurrences defined by both
+      the "RDATE" and "RRULE".
+
+      The recurrence dates, if specified, are used in computing the
+      recurrence set.  The recurrence set is the complete set of
+      recurrence instances for a calendar component.  The recurrence set
+      is generated by considering the initial "DTSTART" property along
+      with the "RRULE", "RDATE", and "EXDATE" properties contained
+      within the recurring component.  The "DTSTART" property defines
+      the first instance in the recurrence set.  The "DTSTART" property
+      value SHOULD match the pattern of the recurrence rule, if
+      specified.  The recurrence set generated with a "DTSTART" property
+      value that doesn't match the pattern of the rule is undefined.
+      The final recurrence set is generated by gathering all of the
+      start DATE-TIME values generated by any of the specified "RRULE"
+      and "RDATE" properties, and then excluding any start DATE-TIME
+      values specified by "EXDATE" properties.  This implies that start
+      DATE-TIME values specified by "EXDATE" properties take precedence
+      over those specified by inclusion properties (i.e., "RDATE" and
+      "RRULE").  Where duplicate instances are generated by the "RRULE"
+      and "RDATE" properties, only one recurrence is considered.
+      Duplicate instances are ignored.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       rdate      = "RDATE" rdtparam ":" rdtval *("," rdtval) CRLF
+
+       rdtparam   = *(
+                  ;
+                  ; The following are OPTIONAL,
+                  ; but MUST NOT occur more than once.
+                  ;
+                  (";" "VALUE" "=" ("DATE-TIME" / "DATE" / "PERIOD")) /
+                  (";" tzidparam) /
+                  ;
+                  ; The following is OPTIONAL,
+                  ; and MAY occur more than once.
+                  ;
+                  (";" other-param)
+                  ;
+                  )
+
+       rdtval     = date-time / date / period
+       ;Value MUST match value type
+
+
+
+
+
+
+Desruisseaux                Standards Track                   [Page 121]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Example:  The following are examples of this property:
+
+       RDATE:19970714T123000Z
+       RDATE;TZID=America/New_York:19970714T083000
+
+       RDATE;VALUE=PERIOD:19960403T020000Z/19960403T040000Z,
+        19960404T010000Z/PT3H
+
+       RDATE;VALUE=DATE:19970101,19970120,19970217,19970421
+        19970526,19970704,19970901,19971014,19971128,19971129,19971225
+
+3.8.5.3.  Recurrence Rule
+
+   Property Name:  RRULE
+
+   Purpose:  This property defines a rule or repeating pattern for
+      recurring events, to-dos, journal entries, or time zone
+      definitions.
+
+   Value Type:  RECUR
+
+   Property Parameters:  IANA and non-standard property parameters can
+      be specified on this property.
+
+   Conformance:  This property can be specified in recurring "VEVENT",
+      "VTODO", and "VJOURNAL" calendar components as well as in the
+      "STANDARD" and "DAYLIGHT" sub-components of the "VTIMEZONE"
+      calendar component, but it SHOULD NOT be specified more than once.
+      The recurrence set generated with multiple "RRULE" properties is
+      undefined.
+
+   Description:  The recurrence rule, if specified, is used in computing
+      the recurrence set.  The recurrence set is the complete set of
+      recurrence instances for a calendar component.  The recurrence set
+      is generated by considering the initial "DTSTART" property along
+      with the "RRULE", "RDATE", and "EXDATE" properties contained
+      within the recurring component.  The "DTSTART" property defines
+      the first instance in the recurrence set.  The "DTSTART" property
+      value SHOULD be synchronized with the recurrence rule, if
+      specified.  The recurrence set generated with a "DTSTART" property
+      value not synchronized with the recurrence rule is undefined.  The
+      final recurrence set is generated by gathering all of the start
+      DATE-TIME values generated by any of the specified "RRULE" and
+      "RDATE" properties, and then excluding any start DATE-TIME values
+      specified by "EXDATE" properties.  This implies that start DATE-
+      TIME values specified by "EXDATE" properties take precedence over
+      those specified by inclusion properties (i.e., "RDATE" and
+      "RRULE").  Where duplicate instances are generated by the "RRULE"
+
+
+
+Desruisseaux                Standards Track                   [Page 122]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      and "RDATE" properties, only one recurrence is considered.
+      Duplicate instances are ignored.
+
+      The "DTSTART" property specified within the iCalendar object
+      defines the first instance of the recurrence.  In most cases, a
+      "DTSTART" property of DATE-TIME value type used with a recurrence
+      rule, should be specified as a date with local time and time zone
+      reference to make sure all the recurrence instances start at the
+      same local time regardless of time zone changes.
+
+      If the duration of the recurring component is specified with the
+      "DTEND" or "DUE" property, then the same exact duration will apply
+      to all the members of the generated recurrence set.  Else, if the
+      duration of the recurring component is specified with the
+      "DURATION" property, then the same nominal duration will apply to
+      all the members of the generated recurrence set and the exact
+      duration of each recurrence instance will depend on its specific
+      start time.  For example, recurrence instances of a nominal
+      duration of one day will have an exact duration of more or less
+      than 24 hours on a day where a time zone shift occurs.  The
+      duration of a specific recurrence may be modified in an exception
+      component or simply by using an "RDATE" property of PERIOD value
+      type.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       rrule      = "RRULE" rrulparam ":" recur CRLF
+
+       rrulparam  = *(";" other-param)
+
+   Example:  All examples assume the Eastern United States time zone.
+
+      Daily for 10 occurrences:
+
+       DTSTART;TZID=America/New_York:19970902T090000
+       RRULE:FREQ=DAILY;COUNT=10
+
+       ==> (1997 9:00 AM EDT) September 2-11
+
+      Daily until December 24, 1997:
+
+       DTSTART;TZID=America/New_York:19970902T090000
+       RRULE:FREQ=DAILY;UNTIL=19971224T000000Z
+
+       ==> (1997 9:00 AM EDT) September 2-30;October 1-25
+           (1997 9:00 AM EST) October 26-31;November 1-30;December 1-23
+
+
+
+
+Desruisseaux                Standards Track                   [Page 123]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      Every other day - forever:
+
+       DTSTART;TZID=America/New_York:19970902T090000
+       RRULE:FREQ=DAILY;INTERVAL=2
+
+       ==> (1997 9:00 AM EDT) September 2,4,6,8...24,26,28,30;
+                              October 2,4,6...20,22,24
+           (1997 9:00 AM EST) October 26,28,30;
+                              November 1,3,5,7...25,27,29;
+                              December 1,3,...
+
+      Every 10 days, 5 occurrences:
+
+       DTSTART;TZID=America/New_York:19970902T090000
+       RRULE:FREQ=DAILY;INTERVAL=10;COUNT=5
+
+       ==> (1997 9:00 AM EDT) September 2,12,22;
+                              October 2,12
+
+      Every day in January, for 3 years:
+
+       DTSTART;TZID=America/New_York:19980101T090000
+
+       RRULE:FREQ=YEARLY;UNTIL=20000131T140000Z;
+        BYMONTH=1;BYDAY=SU,MO,TU,WE,TH,FR,SA
+       or
+       RRULE:FREQ=DAILY;UNTIL=20000131T140000Z;BYMONTH=1
+
+       ==> (1998 9:00 AM EST)January 1-31
+           (1999 9:00 AM EST)January 1-31
+           (2000 9:00 AM EST)January 1-31
+
+      Weekly for 10 occurrences:
+
+       DTSTART;TZID=America/New_York:19970902T090000
+       RRULE:FREQ=WEEKLY;COUNT=10
+
+       ==> (1997 9:00 AM EDT) September 2,9,16,23,30;October 7,14,21
+           (1997 9:00 AM EST) October 28;November 4
+
+
+
+
+
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                   [Page 124]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      Weekly until December 24, 1997:
+
+       DTSTART;TZID=America/New_York:19970902T090000
+       RRULE:FREQ=WEEKLY;UNTIL=19971224T000000Z
+
+       ==> (1997 9:00 AM EDT) September 2,9,16,23,30;
+                              October 7,14,21
+           (1997 9:00 AM EST) October 28;
+                              November 4,11,18,25;
+                              December 2,9,16,23
+
+      Every other week - forever:
+
+       DTSTART;TZID=America/New_York:19970902T090000
+       RRULE:FREQ=WEEKLY;INTERVAL=2;WKST=SU
+
+       ==> (1997 9:00 AM EDT) September 2,16,30;
+                              October 14
+           (1997 9:00 AM EST) October 28;
+                              November 11,25;
+                              December 9,23
+           (1998 9:00 AM EST) January 6,20;
+                              February 3, 17
+           ...
+
+      Weekly on Tuesday and Thursday for five weeks:
+
+       DTSTART;TZID=America/New_York:19970902T090000
+       RRULE:FREQ=WEEKLY;UNTIL=19971007T000000Z;WKST=SU;BYDAY=TU,TH
+
+       or
+
+       RRULE:FREQ=WEEKLY;COUNT=10;WKST=SU;BYDAY=TU,TH
+
+       ==> (1997 9:00 AM EDT) September 2,4,9,11,16,18,23,25,30;
+                              October 2
+
+      Every other week on Monday, Wednesday, and Friday until December
+      24, 1997, starting on Monday, September 1, 1997:
+
+       DTSTART;TZID=America/New_York:19970901T090000
+       RRULE:FREQ=WEEKLY;INTERVAL=2;UNTIL=19971224T000000Z;WKST=SU;
+        BYDAY=MO,WE,FR
+
+       ==> (1997 9:00 AM EDT) September 1,3,5,15,17,19,29;
+                              October 1,3,13,15,17
+           (1997 9:00 AM EST) October 27,29,31;
+                              November 10,12,14,24,26,28;
+
+
+
+Desruisseaux                Standards Track                   [Page 125]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+                              December 8,10,12,22
+
+      Every other week on Tuesday and Thursday, for 8 occurrences:
+
+       DTSTART;TZID=America/New_York:19970902T090000
+       RRULE:FREQ=WEEKLY;INTERVAL=2;COUNT=8;WKST=SU;BYDAY=TU,TH
+
+       ==> (1997 9:00 AM EDT) September 2,4,16,18,30;
+                              October 2,14,16
+
+      Monthly on the first Friday for 10 occurrences:
+
+       DTSTART;TZID=America/New_York:19970905T090000
+       RRULE:FREQ=MONTHLY;COUNT=10;BYDAY=1FR
+
+       ==> (1997 9:00 AM EDT) September 5;October 3
+           (1997 9:00 AM EST) November 7;December 5
+           (1998 9:00 AM EST) January 2;February 6;March 6;April 3
+           (1998 9:00 AM EDT) May 1;June 5
+
+      Monthly on the first Friday until December 24, 1997:
+
+       DTSTART;TZID=America/New_York:19970905T090000
+       RRULE:FREQ=MONTHLY;UNTIL=19971224T000000Z;BYDAY=1FR
+
+       ==> (1997 9:00 AM EDT) September 5; October 3
+           (1997 9:00 AM EST) November 7; December 5
+
+      Every other month on the first and last Sunday of the month for 10
+      occurrences:
+
+       DTSTART;TZID=America/New_York:19970907T090000
+       RRULE:FREQ=MONTHLY;INTERVAL=2;COUNT=10;BYDAY=1SU,-1SU
+
+       ==> (1997 9:00 AM EDT) September 7,28
+           (1997 9:00 AM EST) November 2,30
+           (1998 9:00 AM EST) January 4,25;March 1,29
+           (1998 9:00 AM EDT) May 3,31
+
+      Monthly on the second-to-last Monday of the month for 6 months:
+
+       DTSTART;TZID=America/New_York:19970922T090000
+       RRULE:FREQ=MONTHLY;COUNT=6;BYDAY=-2MO
+
+       ==> (1997 9:00 AM EDT) September 22;October 20
+           (1997 9:00 AM EST) November 17;December 22
+           (1998 9:00 AM EST) January 19;February 16
+
+
+
+
+Desruisseaux                Standards Track                   [Page 126]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      Monthly on the third-to-the-last day of the month, forever:
+
+       DTSTART;TZID=America/New_York:19970928T090000
+       RRULE:FREQ=MONTHLY;BYMONTHDAY=-3
+
+       ==> (1997 9:00 AM EDT) September 28
+           (1997 9:00 AM EST) October 29;November 28;December 29
+           (1998 9:00 AM EST) January 29;February 26
+           ...
+
+      Monthly on the 2nd and 15th of the month for 10 occurrences:
+
+       DTSTART;TZID=America/New_York:19970902T090000
+       RRULE:FREQ=MONTHLY;COUNT=10;BYMONTHDAY=2,15
+
+       ==> (1997 9:00 AM EDT) September 2,15;October 2,15
+           (1997 9:00 AM EST) November 2,15;December 2,15
+           (1998 9:00 AM EST) January 2,15
+
+      Monthly on the first and last day of the month for 10 occurrences:
+
+       DTSTART;TZID=America/New_York:19970930T090000
+       RRULE:FREQ=MONTHLY;COUNT=10;BYMONTHDAY=1,-1
+
+       ==> (1997 9:00 AM EDT) September 30;October 1
+           (1997 9:00 AM EST) October 31;November 1,30;December 1,31
+           (1998 9:00 AM EST) January 1,31;February 1
+
+      Every 18 months on the 10th thru 15th of the month for 10
+      occurrences:
+
+       DTSTART;TZID=America/New_York:19970910T090000
+       RRULE:FREQ=MONTHLY;INTERVAL=18;COUNT=10;BYMONTHDAY=10,11,12,
+        13,14,15
+
+       ==> (1997 9:00 AM EDT) September 10,11,12,13,14,15
+           (1999 9:00 AM EST) March 10,11,12,13
+
+      Every Tuesday, every other month:
+
+       DTSTART;TZID=America/New_York:19970902T090000
+       RRULE:FREQ=MONTHLY;INTERVAL=2;BYDAY=TU
+
+       ==> (1997 9:00 AM EDT) September 2,9,16,23,30
+           (1997 9:00 AM EST) November 4,11,18,25
+           (1998 9:00 AM EST) January 6,13,20,27;March 3,10,17,24,31
+           ...
+
+
+
+
+Desruisseaux                Standards Track                   [Page 127]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      Yearly in June and July for 10 occurrences:
+
+       DTSTART;TZID=America/New_York:19970610T090000
+       RRULE:FREQ=YEARLY;COUNT=10;BYMONTH=6,7
+
+       ==> (1997 9:00 AM EDT) June 10;July 10
+           (1998 9:00 AM EDT) June 10;July 10
+           (1999 9:00 AM EDT) June 10;July 10
+           (2000 9:00 AM EDT) June 10;July 10
+           (2001 9:00 AM EDT) June 10;July 10
+
+         Note: Since none of the BYDAY, BYMONTHDAY, or BYYEARDAY
+         components are specified, the day is gotten from "DTSTART".
+
+      Every other year on January, February, and March for 10
+      occurrences:
+
+       DTSTART;TZID=America/New_York:19970310T090000
+       RRULE:FREQ=YEARLY;INTERVAL=2;COUNT=10;BYMONTH=1,2,3
+
+       ==> (1997 9:00 AM EST) March 10
+           (1999 9:00 AM EST) January 10;February 10;March 10
+           (2001 9:00 AM EST) January 10;February 10;March 10
+           (2003 9:00 AM EST) January 10;February 10;March 10
+
+      Every third year on the 1st, 100th, and 200th day for 10
+      occurrences:
+
+       DTSTART;TZID=America/New_York:19970101T090000
+       RRULE:FREQ=YEARLY;INTERVAL=3;COUNT=10;BYYEARDAY=1,100,200
+
+       ==> (1997 9:00 AM EST) January 1
+           (1997 9:00 AM EDT) April 10;July 19
+           (2000 9:00 AM EST) January 1
+           (2000 9:00 AM EDT) April 9;July 18
+           (2003 9:00 AM EST) January 1
+           (2003 9:00 AM EDT) April 10;July 19
+           (2006 9:00 AM EST) January 1
+
+      Every 20th Monday of the year, forever:
+
+       DTSTART;TZID=America/New_York:19970519T090000
+       RRULE:FREQ=YEARLY;BYDAY=20MO
+
+       ==> (1997 9:00 AM EDT) May 19
+           (1998 9:00 AM EDT) May 18
+           (1999 9:00 AM EDT) May 17
+           ...
+
+
+
+Desruisseaux                Standards Track                   [Page 128]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      Monday of week number 20 (where the default start of the week is
+      Monday), forever:
+
+       DTSTART;TZID=America/New_York:19970512T090000
+       RRULE:FREQ=YEARLY;BYWEEKNO=20;BYDAY=MO
+
+       ==> (1997 9:00 AM EDT) May 12
+           (1998 9:00 AM EDT) May 11
+           (1999 9:00 AM EDT) May 17
+           ...
+
+      Every Thursday in March, forever:
+
+       DTSTART;TZID=America/New_York:19970313T090000
+       RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=TH
+
+       ==> (1997 9:00 AM EST) March 13,20,27
+           (1998 9:00 AM EST) March 5,12,19,26
+           (1999 9:00 AM EST) March 4,11,18,25
+           ...
+
+      Every Thursday, but only during June, July, and August, forever:
+
+       DTSTART;TZID=America/New_York:19970605T090000
+       RRULE:FREQ=YEARLY;BYDAY=TH;BYMONTH=6,7,8
+
+       ==> (1997 9:00 AM EDT) June 5,12,19,26;July 3,10,17,24,31;
+                              August 7,14,21,28
+           (1998 9:00 AM EDT) June 4,11,18,25;July 2,9,16,23,30;
+                              August 6,13,20,27
+           (1999 9:00 AM EDT) June 3,10,17,24;July 1,8,15,22,29;
+                              August 5,12,19,26
+           ...
+
+      Every Friday the 13th, forever:
+
+       DTSTART;TZID=America/New_York:19970902T090000
+       EXDATE;TZID=America/New_York:19970902T090000
+       RRULE:FREQ=MONTHLY;BYDAY=FR;BYMONTHDAY=13
+
+       ==> (1998 9:00 AM EST) February 13;March 13;November 13
+           (1999 9:00 AM EDT) August 13
+           (2000 9:00 AM EDT) October 13
+           ...
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                   [Page 129]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      The first Saturday that follows the first Sunday of the month,
+      forever:
+
+       DTSTART;TZID=America/New_York:19970913T090000
+       RRULE:FREQ=MONTHLY;BYDAY=SA;BYMONTHDAY=7,8,9,10,11,12,13
+
+       ==> (1997 9:00 AM EDT) September 13;October 11
+           (1997 9:00 AM EST) November 8;December 13
+           (1998 9:00 AM EST) January 10;February 7;March 7
+           (1998 9:00 AM EDT) April 11;May 9;June 13...
+           ...
+
+      Every 4 years, the first Tuesday after a Monday in November,
+      forever (U.S. Presidential Election day):
+
+       DTSTART;TZID=America/New_York:19961105T090000
+       RRULE:FREQ=YEARLY;INTERVAL=4;BYMONTH=11;BYDAY=TU;
+        BYMONTHDAY=2,3,4,5,6,7,8
+
+        ==> (1996 9:00 AM EST) November 5
+            (2000 9:00 AM EST) November 7
+            (2004 9:00 AM EST) November 2
+            ...
+
+      The third instance into the month of one of Tuesday, Wednesday, or
+      Thursday, for the next 3 months:
+
+       DTSTART;TZID=America/New_York:19970904T090000
+       RRULE:FREQ=MONTHLY;COUNT=3;BYDAY=TU,WE,TH;BYSETPOS=3
+
+       ==> (1997 9:00 AM EDT) September 4;October 7
+           (1997 9:00 AM EST) November 6
+
+      The second-to-last weekday of the month:
+
+       DTSTART;TZID=America/New_York:19970929T090000
+       RRULE:FREQ=MONTHLY;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-2
+
+       ==> (1997 9:00 AM EDT) September 29
+           (1997 9:00 AM EST) October 30;November 27;December 30
+           (1998 9:00 AM EST) January 29;February 26;March 30
+           ...
+
+
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                   [Page 130]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      Every 3 hours from 9:00 AM to 5:00 PM on a specific day:
+
+       DTSTART;TZID=America/New_York:19970902T090000
+       RRULE:FREQ=HOURLY;INTERVAL=3;UNTIL=19970902T170000Z
+
+       ==> (September 2, 1997 EDT) 09:00,12:00,15:00
+
+      Every 15 minutes for 6 occurrences:
+
+       DTSTART;TZID=America/New_York:19970902T090000
+       RRULE:FREQ=MINUTELY;INTERVAL=15;COUNT=6
+
+       ==> (September 2, 1997 EDT) 09:00,09:15,09:30,09:45,10:00,10:15
+
+      Every hour and a half for 4 occurrences:
+
+       DTSTART;TZID=America/New_York:19970902T090000
+       RRULE:FREQ=MINUTELY;INTERVAL=90;COUNT=4
+
+       ==> (September 2, 1997 EDT) 09:00,10:30;12:00;13:30
+
+      Every 20 minutes from 9:00 AM to 4:40 PM every day:
+
+       DTSTART;TZID=America/New_York:19970902T090000
+       RRULE:FREQ=DAILY;BYHOUR=9,10,11,12,13,14,15,16;BYMINUTE=0,20,40
+       or
+       RRULE:FREQ=MINUTELY;INTERVAL=20;BYHOUR=9,10,11,12,13,14,15,16
+
+       ==> (September 2, 1997 EDT) 9:00,9:20,9:40,10:00,10:20,
+                                   ... 16:00,16:20,16:40
+           (September 3, 1997 EDT) 9:00,9:20,9:40,10:00,10:20,
+                                   ...16:00,16:20,16:40
+           ...
+
+      An example where the days generated makes a difference because of
+      WKST:
+
+       DTSTART;TZID=America/New_York:19970805T090000
+       RRULE:FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=MO
+
+       ==> (1997 EDT) August 5,10,19,24
+
+      changing only WKST from MO to SU, yields different results...
+
+       DTSTART;TZID=America/New_York:19970805T090000
+       RRULE:FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU
+
+       ==> (1997 EDT) August 5,17,19,31
+
+
+
+Desruisseaux                Standards Track                   [Page 131]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      An example where an invalid date (i.e., February 30) is ignored.
+
+       DTSTART;TZID=America/New_York:20070115T090000
+       RRULE:FREQ=MONTHLY;BYMONTHDAY=15,30;COUNT=5
+
+       ==> (2007 EST) January 15,30
+           (2007 EST) February 15
+           (2007 EDT) March 15,30
+
+3.8.6.  Alarm Component Properties
+
+   The following properties specify alarm information in calendar
+   components.
+
+3.8.6.1.  Action
+
+   Property Name:  ACTION
+
+   Purpose:  This property defines the action to be invoked when an
+      alarm is triggered.
+
+   Value Type:  TEXT
+
+   Property Parameters:  IANA and non-standard property parameters can
+      be specified on this property.
+
+   Conformance:  This property MUST be specified once in a "VALARM"
+      calendar component.
+
+   Description:  Each "VALARM" calendar component has a particular type
+      of action with which it is associated.  This property specifies
+      the type of action.  Applications MUST ignore alarms with x-name
+      and iana-token values they don't recognize.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       action      = "ACTION" actionparam ":" actionvalue CRLF
+
+       actionparam = *(";" other-param)
+
+
+       actionvalue = "AUDIO" / "DISPLAY" / "EMAIL"
+                   / iana-token / x-name
+
+   Example:  The following are examples of this property in a "VALARM"
+      calendar component:
+
+
+
+
+Desruisseaux                Standards Track                   [Page 132]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+       ACTION:AUDIO
+
+       ACTION:DISPLAY
+
+3.8.6.2.  Repeat Count
+
+   Property Name:  REPEAT
+
+   Purpose:  This property defines the number of times the alarm should
+      be repeated, after the initial trigger.
+
+   Value Type:  INTEGER
+
+   Property Parameters:  IANA and non-standard property parameters can
+      be specified on this property.
+
+   Conformance:  This property can be specified in a "VALARM" calendar
+      component.
+
+   Description:  This property defines the number of times an alarm
+      should be repeated after its initial trigger.  If the alarm
+      triggers more than once, then this property MUST be specified
+      along with the "DURATION" property.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       repeat  = "REPEAT" repparam ":" integer CRLF
+       ;Default is "0", zero.
+
+       repparam   = *(";" other-param)
+
+   Example:  The following is an example of this property for an alarm
+      that repeats 4 additional times with a 5-minute delay after the
+      initial triggering of the alarm:
+
+       REPEAT:4
+       DURATION:PT5M
+
+3.8.6.3.  Trigger
+
+   Property Name:  TRIGGER
+
+   Purpose:  This property specifies when an alarm will trigger.
+
+   Value Type:  The default value type is DURATION.  The value type can
+      be set to a DATE-TIME value type, in which case the value MUST
+      specify a UTC-formatted DATE-TIME value.
+
+
+
+Desruisseaux                Standards Track                   [Page 133]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Property Parameters:  IANA, non-standard, value data type, time zone
+      identifier, or trigger relationship property parameters can be
+      specified on this property.  The trigger relationship property
+      parameter MUST only be specified when the value type is
+      "DURATION".
+
+   Conformance:  This property MUST be specified in the "VALARM"
+      calendar component.
+
+   Description:  This property defines when an alarm will trigger.  The
+      default value type is DURATION, specifying a relative time for the
+      trigger of the alarm.  The default duration is relative to the
+      start of an event or to-do with which the alarm is associated.
+      The duration can be explicitly set to trigger from either the end
+      or the start of the associated event or to-do with the "RELATED"
+      parameter.  A value of START will set the alarm to trigger off the
+      start of the associated event or to-do.  A value of END will set
+      the alarm to trigger off the end of the associated event or to-do.
+
+      Either a positive or negative duration may be specified for the
+      "TRIGGER" property.  An alarm with a positive duration is
+      triggered after the associated start or end of the event or to-do.
+      An alarm with a negative duration is triggered before the
+      associated start or end of the event or to-do.
+
+      The "RELATED" property parameter is not valid if the value type of
+      the property is set to DATE-TIME (i.e., for an absolute date and
+      time alarm trigger).  If a value type of DATE-TIME is specified,
+      then the property value MUST be specified in the UTC time format.
+      If an absolute trigger is specified on an alarm for a recurring
+      event or to-do, then the alarm will only trigger for the specified
+      absolute DATE-TIME, along with any specified repeating instances.
+
+      If the trigger is set relative to START, then the "DTSTART"
+      property MUST be present in the associated "VEVENT" or "VTODO"
+      calendar component.  If an alarm is specified for an event with
+      the trigger set relative to the END, then the "DTEND" property or
+      the "DTSTART" and "DURATION " properties MUST be present in the
+      associated "VEVENT" calendar component.  If the alarm is specified
+      for a to-do with a trigger set relative to the END, then either
+      the "DUE" property or the "DTSTART" and "DURATION " properties
+      MUST be present in the associated "VTODO" calendar component.
+
+      Alarms specified in an event or to-do that is defined in terms of
+      a DATE value type will be triggered relative to 00:00:00 of the
+      user's configured time zone on the specified date, or relative to
+      00:00:00 UTC on the specified date if no configured time zone can
+      be found for the user.  For example, if "DTSTART" is a DATE value
+
+
+
+Desruisseaux                Standards Track                   [Page 134]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      set to 19980205 then the duration trigger will be relative to
+      19980205T000000 America/New_York for a user configured with the
+      America/New_York time zone.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       trigger    = "TRIGGER" (trigrel / trigabs) CRLF
+
+       trigrel    = *(
+                  ;
+                  ; The following are OPTIONAL,
+                  ; but MUST NOT occur more than once.
+                  ;
+                  (";" "VALUE" "=" "DURATION") /
+                  (";" trigrelparam) /
+                  ;
+                  ; The following is OPTIONAL,
+                  ; and MAY occur more than once.
+                  ;
+                  (";" other-param)
+                  ;
+                  ) ":"  dur-value
+
+       trigabs    = *(
+                  ;
+                  ; The following is REQUIRED,
+                  ; but MUST NOT occur more than once.
+                  ;
+                  (";" "VALUE" "=" "DATE-TIME") /
+                  ;
+                  ; The following is OPTIONAL,
+                  ; and MAY occur more than once.
+                  ;
+                  (";" other-param)
+                  ;
+                  ) ":" date-time
+
+   Example:  A trigger set 15 minutes prior to the start of the event or
+      to-do.
+
+       TRIGGER:-PT15M
+
+      A trigger set five minutes after the end of an event or the due
+      date of a to-do.
+
+       TRIGGER;RELATED=END:PT5M
+
+
+
+
+Desruisseaux                Standards Track                   [Page 135]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      A trigger set to an absolute DATE-TIME.
+
+       TRIGGER;VALUE=DATE-TIME:19980101T050000Z
+
+3.8.7.  Change Management Component Properties
+
+   The following properties specify change management information in
+   calendar components.
+
+3.8.7.1.  Date-Time Created
+
+   Property Name:  CREATED
+
+   Purpose:  This property specifies the date and time that the calendar
+      information was created by the calendar user agent in the calendar
+      store.
+
+         Note: This is analogous to the creation date and time for a
+         file in the file system.
+
+   Value Type:  DATE-TIME
+
+   Property Parameters:  IANA and non-standard property parameters can
+      be specified on this property.
+
+   Conformance:  The property can be specified once in "VEVENT",
+      "VTODO", or "VJOURNAL" calendar components.  The value MUST be
+      specified as a date with UTC time.
+
+   Description:  This property specifies the date and time that the
+      calendar information was created by the calendar user agent in the
+      calendar store.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       created    = "CREATED" creaparam ":" date-time CRLF
+
+       creaparam  = *(";" other-param)
+
+   Example:  The following is an example of this property:
+
+       CREATED:19960329T133000Z
+
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                   [Page 136]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+3.8.7.2.  Date-Time Stamp
+
+   Property Name:  DTSTAMP
+
+   Purpose:  In the case of an iCalendar object that specifies a
+      "METHOD" property, this property specifies the date and time that
+      the instance of the iCalendar object was created.  In the case of
+      an iCalendar object that doesn't specify a "METHOD" property, this
+      property specifies the date and time that the information
+      associated with the calendar component was last revised in the
+      calendar store.
+
+   Value Type:  DATE-TIME
+
+   Property Parameters:  IANA and non-standard property parameters can
+      be specified on this property.
+
+   Conformance:  This property MUST be included in the "VEVENT",
+      "VTODO", "VJOURNAL", or "VFREEBUSY" calendar components.
+
+   Description:  The value MUST be specified in the UTC time format.
+
+      This property is also useful to protocols such as [2447bis] that
+      have inherent latency issues with the delivery of content.  This
+      property will assist in the proper sequencing of messages
+      containing iCalendar objects.
+
+      In the case of an iCalendar object that specifies a "METHOD"
+      property, this property differs from the "CREATED" and "LAST-
+      MODIFIED" properties.  These two properties are used to specify
+      when the particular calendar data in the calendar store was
+      created and last modified.  This is different than when the
+      iCalendar object representation of the calendar service
+      information was created or last modified.
+
+      In the case of an iCalendar object that doesn't specify a "METHOD"
+      property, this property is equivalent to the "LAST-MODIFIED"
+      property.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       dtstamp    = "DTSTAMP" stmparam ":" date-time CRLF
+
+       stmparam   = *(";" other-param)
+
+
+
+
+
+
+Desruisseaux                Standards Track                   [Page 137]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Example:
+
+       DTSTAMP:19971210T080000Z
+
+3.8.7.3.  Last Modified
+
+   Property Name:  LAST-MODIFIED
+
+   Purpose:  This property specifies the date and time that the
+      information associated with the calendar component was last
+      revised in the calendar store.
+
+         Note: This is analogous to the modification date and time for a
+         file in the file system.
+
+   Value Type:  DATE-TIME
+
+   Property Parameters:  IANA and non-standard property parameters can
+      be specified on this property.
+
+   Conformance:  This property can be specified in the "VEVENT",
+      "VTODO", "VJOURNAL", or "VTIMEZONE" calendar components.
+
+   Description:  The property value MUST be specified in the UTC time
+      format.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       last-mod   = "LAST-MODIFIED" lstparam ":" date-time CRLF
+
+       lstparam   = *(";" other-param)
+
+   Example:  The following is an example of this property:
+
+       LAST-MODIFIED:19960817T133000Z
+
+3.8.7.4.  Sequence Number
+
+   Property Name:  SEQUENCE
+
+   Purpose:  This property defines the revision sequence number of the
+      calendar component within a sequence of revisions.
+
+   Value Type:  INTEGER
+
+   Property Parameters:  IANA and non-standard property parameters can
+      be specified on this property.
+
+
+
+Desruisseaux                Standards Track                   [Page 138]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Conformance:  The property can be specified in "VEVENT", "VTODO", or
+      "VJOURNAL" calendar component.
+
+   Description:  When a calendar component is created, its sequence
+      number is 0.  It is monotonically incremented by the "Organizer's"
+      CUA each time the "Organizer" makes a significant revision to the
+      calendar component.
+
+      The "Organizer" includes this property in an iCalendar object that
+      it sends to an "Attendee" to specify the current version of the
+      calendar component.
+
+      The "Attendee" includes this property in an iCalendar object that
+      it sends to the "Organizer" to specify the version of the calendar
+      component to which the "Attendee" is referring.
+
+      A change to the sequence number is not the mechanism that an
+      "Organizer" uses to request a response from the "Attendees".  The
+      "RSVP" parameter on the "ATTENDEE" property is used by the
+      "Organizer" to indicate that a response from the "Attendees" is
+      requested.
+
+      Recurrence instances of a recurring component MAY have different
+      sequence numbers.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       seq = "SEQUENCE" seqparam ":" integer CRLF
+       ; Default is "0"
+
+       seqparam   = *(";" other-param)
+
+   Example:  The following is an example of this property for a calendar
+      component that was just created by the "Organizer":
+
+       SEQUENCE:0
+
+      The following is an example of this property for a calendar
+      component that has been revised two different times by the
+      "Organizer":
+
+       SEQUENCE:2
+
+3.8.8.  Miscellaneous Component Properties
+
+   The following properties specify information about a number of
+   miscellaneous features of calendar components.
+
+
+
+Desruisseaux                Standards Track                   [Page 139]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+3.8.8.1.  IANA Properties
+
+   Property Name:  An IANA-registered property name
+
+   Value Type:  The default value type is TEXT.  The value type can be
+      set to any value type.
+
+   Property Parameters:  Any parameter can be specified on this
+      property.
+
+   Description:  This specification allows other properties registered
+      with IANA to be specified in any calendar components.  Compliant
+      applications are expected to be able to parse these other IANA-
+      registered properties but can ignore them.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       iana-prop = iana-token *(";" icalparameter) ":" value CRLF
+
+   Example:  The following are examples of properties that might be
+      registered to IANA:
+
+       DRESSCODE:CASUAL
+
+       NON-SMOKING;VALUE=BOOLEAN:TRUE
+
+3.8.8.2.  Non-Standard Properties
+
+   Property Name:  Any property name with a "X-" prefix
+
+   Purpose:  This class of property provides a framework for defining
+      non-standard properties.
+
+   Value Type:  The default value type is TEXT.  The value type can be
+      set to any value type.
+
+   Property Parameters:  IANA, non-standard, and language property
+      parameters can be specified on this property.
+
+   Conformance:  This property can be specified in any calendar
+      component.
+
+   Description:  The MIME Calendaring and Scheduling Content Type
+      provides a "standard mechanism for doing non-standard things".
+      This extension support is provided for implementers to "push the
+      envelope" on the existing version of the memo.  Extension
+      properties are specified by property and/or property parameter
+
+
+
+Desruisseaux                Standards Track                   [Page 140]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      names that have the prefix text of "X-" (the two-character
+      sequence: LATIN CAPITAL LETTER X character followed by the HYPHEN-
+      MINUS character).  It is recommended that vendors concatenate onto
+      this sentinel another short prefix text to identify the vendor.
+      This will facilitate readability of the extensions and minimize
+      possible collision of names between different vendors.  User
+      agents that support this content type are expected to be able to
+      parse the extension properties and property parameters but can
+      ignore them.
+
+      At present, there is no registration authority for names of
+      extension properties and property parameters.  The value type for
+      this property is TEXT.  Optionally, the value type can be any of
+      the other valid value types.
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       x-prop = x-name *(";" icalparameter) ":" value CRLF
+
+   Example:  The following might be the ABC vendor's extension for an
+      audio-clip form of subject property:
+
+       X-ABC-MMSUBJ;VALUE=URI;FMTTYPE=audio/basic:http://www.example.
+        org/mysubj.au
+
+3.8.8.3.  Request Status
+
+   Property Name:  REQUEST-STATUS
+
+   Purpose:  This property defines the status code returned for a
+      scheduling request.
+
+   Value Type:  TEXT
+
+   Property Parameters:  IANA, non-standard, and language property
+      parameters can be specified on this property.
+
+   Conformance:  The property can be specified in the "VEVENT", "VTODO",
+      "VJOURNAL", or "VFREEBUSY" calendar component.
+
+   Description:  This property is used to return status code information
+      related to the processing of an associated iCalendar object.  The
+      value type for this property is TEXT.
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                   [Page 141]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      The value consists of a short return status component, a longer
+      return status description component, and optionally a status-
+      specific data component.  The components of the value are
+      separated by the SEMICOLON character.
+
+      The short return status is a PERIOD character separated pair or
+      3-tuple of integers.  For example, "3.1" or "3.1.1".  The
+      successive levels of integers provide for a successive level of
+      status code granularity.
+
+      The following are initial classes for the return status code.
+      Individual iCalendar object methods will define specific return
+      status codes for these classes.  In addition, other classes for
+      the return status code may be defined using the registration
+      process defined later in this memo.
+
+   +--------+----------------------------------------------------------+
+   | Short  | Longer Return Status Description                         |
+   | Return |                                                          |
+   | Status |                                                          |
+   | Code   |                                                          |
+   +--------+----------------------------------------------------------+
+   | 1.xx   | Preliminary success.  This class of status code          |
+   |        | indicates that the request has been initially processed  |
+   |        | but that completion is pending.                          |
+   |        |                                                          |
+   | 2.xx   | Successful.  This class of status code indicates that    |
+   |        | the request was completed successfully.  However, the    |
+   |        | exact status code can indicate that a fallback has been  |
+   |        | taken.                                                   |
+   |        |                                                          |
+   | 3.xx   | Client Error.  This class of status code indicates that  |
+   |        | the request was not successful.  The error is the result |
+   |        | of either a syntax or a semantic error in the client-    |
+   |        | formatted request.  Request should not be retried until  |
+   |        | the condition in the request is corrected.               |
+   |        |                                                          |
+   | 4.xx   | Scheduling Error.  This class of status code indicates   |
+   |        | that the request was not successful.  Some sort of error |
+   |        | occurred within the calendaring and scheduling service,  |
+   |        | not directly related to the request itself.              |
+   +--------+----------------------------------------------------------+
+
+
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                   [Page 142]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Format Definition:  This property is defined by the following
+      notation:
+
+       rstatus    = "REQUEST-STATUS" rstatparam ":"
+                    statcode ";" statdesc [";" extdata]
+
+       rstatparam = *(
+                  ;
+                  ; The following is OPTIONAL,
+                  ; but MUST NOT occur more than once.
+                  ;
+                  (";" languageparam) /
+                  ;
+                  ; The following is OPTIONAL,
+                  ; and MAY occur more than once.
+                  ;
+                  (";" other-param)
+                  ;
+                  )
+
+       statcode   = 1*DIGIT 1*2("." 1*DIGIT)
+       ;Hierarchical, numeric return status code
+
+       statdesc   = text
+       ;Textual status description
+
+       extdata    = text
+       ;Textual exception data.  For example, the offending property
+       ;name and value or complete property line.
+
+   Example:  The following are some possible examples of this property.
+
+      The COMMA and SEMICOLON separator characters in the property value
+      are BACKSLASH character escaped because they appear in a text
+      value.
+
+       REQUEST-STATUS:2.0;Success
+
+       REQUEST-STATUS:3.1;Invalid property value;DTSTART:96-Apr-01
+
+       REQUEST-STATUS:2.8; Success\, repeating event ignored. Scheduled
+        as a single event.;RRULE:FREQ=WEEKLY\;INTERVAL=2
+
+       REQUEST-STATUS:4.1;Event conflict.  Date-time is busy.
+
+       REQUEST-STATUS:3.7;Invalid calendar user;ATTENDEE:
+        mailto:jsmith at example.com
+
+
+
+
+Desruisseaux                Standards Track                   [Page 143]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+4.  iCalendar Object Examples
+
+   The following examples are provided as an informational source of
+   illustrative iCalendar objects consistent with this content type.
+
+   The following example specifies a three-day conference that begins at
+   2:30 P.M. UTC, September 18, 1996 and ends at 10:00 P.M. UTC,
+   September 20, 1996.
+
+       BEGIN:VCALENDAR
+       PRODID:-//xyz Corp//NONSGML PDA Calendar Version 1.0//EN
+       VERSION:2.0
+       BEGIN:VEVENT
+       DTSTAMP:19960704T120000Z
+       UID:uid1 at example.com
+       ORGANIZER:mailto:jsmith at example.com
+       DTSTART:19960918T143000Z
+       DTEND:19960920T220000Z
+       STATUS:CONFIRMED
+       CATEGORIES:CONFERENCE
+       SUMMARY:Networld+Interop Conference
+       DESCRIPTION:Networld+Interop Conference
+         and Exhibit\nAtlanta World Congress Center\n
+        Atlanta\, Georgia
+       END:VEVENT
+       END:VCALENDAR
+
+   The following example specifies a group-scheduled meeting that begins
+   at 8:30 AM EST on March 12, 1998 and ends at 9:30 AM EST on March 12,
+   1998.  The "Organizer" has scheduled the meeting with one or more
+   calendar users in a group.  A time zone specification for Eastern
+   United States has been specified.
+
+       BEGIN:VCALENDAR
+       PRODID:-//RDU Software//NONSGML HandCal//EN
+       VERSION:2.0
+       BEGIN:VTIMEZONE
+       TZID:America/New_York
+       BEGIN:STANDARD
+       DTSTART:19981025T020000
+       TZOFFSETFROM:-0400
+       TZOFFSETTO:-0500
+       TZNAME:EST
+       END:STANDARD
+       BEGIN:DAYLIGHT
+       DTSTART:19990404T020000
+       TZOFFSETFROM:-0500
+       TZOFFSETTO:-0400
+
+
+
+Desruisseaux                Standards Track                   [Page 144]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+       TZNAME:EDT
+       END:DAYLIGHT
+       END:VTIMEZONE
+       BEGIN:VEVENT
+       DTSTAMP:19980309T231000Z
+       UID:guid-1.example.com
+       ORGANIZER:mailto:mrbig at example.com
+       ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:
+        mailto:employee-A at example.com
+       DESCRIPTION:Project XYZ Review Meeting
+       CATEGORIES:MEETING
+       CLASS:PUBLIC
+       CREATED:19980309T130000Z
+       SUMMARY:XYZ Project Review
+       DTSTART;TZID=America/New_York:19980312T083000
+       DTEND;TZID=America/New_York:19980312T093000
+       LOCATION:1CP Conference Room 4350
+       END:VEVENT
+       END:VCALENDAR
+
+   The following is an example of an iCalendar object passed in a MIME
+   message with a single body part consisting of a "text/calendar"
+   Content Type.
+
+       TO:jsmith at example.com
+       FROM:jdoe at example.com
+       MIME-VERSION:1.0
+       MESSAGE-ID:<id3 at example.com>
+       CONTENT-TYPE:text/calendar; method="xyz"; component="VEVENT"
+
+       BEGIN:VCALENDAR
+       METHOD:xyz
+       VERSION:2.0
+       PRODID:-//ABC Corporation//NONSGML My Product//EN
+       BEGIN:VEVENT
+       DTSTAMP:19970324T120000Z
+       SEQUENCE:0
+       UID:uid3 at example.com
+       ORGANIZER:mailto:jdoe at example.com
+       ATTENDEE;RSVP=TRUE:mailto:jsmith at example.com
+       DTSTART:19970324T123000Z
+       DTEND:19970324T210000Z
+       CATEGORIES:MEETING,PROJECT
+       CLASS:PUBLIC
+       SUMMARY:Calendaring Interoperability Planning Meeting
+       DESCRIPTION:Discuss how we can test c&s interoperability\n
+        using iCalendar and other IETF standards.
+       LOCATION:LDB Lobby
+
+
+
+Desruisseaux                Standards Track                   [Page 145]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+       ATTACH;FMTTYPE=application/postscript:ftp://example.com/pub/
+        conf/bkgrnd.ps
+       END:VEVENT
+       END:VCALENDAR
+
+   The following is an example of a to-do due on April 15, 1998.  An
+   audio alarm has been specified to remind the calendar user at noon,
+   the day before the to-do is expected to be completed and repeat
+   hourly, four additional times.  The to-do definition has been
+   modified twice since it was initially created.
+
+       BEGIN:VCALENDAR
+       VERSION:2.0
+       PRODID:-//ABC Corporation//NONSGML My Product//EN
+       BEGIN:VTODO
+       DTSTAMP:19980130T134500Z
+       SEQUENCE:2
+       UID:uid4 at example.com
+       ORGANIZER:mailto:unclesam at example.com
+       ATTENDEE;PARTSTAT=ACCEPTED:mailto:jqpublic at example.com
+       DUE:19980415T000000
+       STATUS:NEEDS-ACTION
+       SUMMARY:Submit Income Taxes
+       BEGIN:VALARM
+       ACTION:AUDIO
+       TRIGGER:19980403T120000Z
+       ATTACH;FMTTYPE=audio/basic:http://example.com/pub/audio-
+        files/ssbanner.aud
+       REPEAT:4
+       DURATION:PT1H
+       END:VALARM
+       END:VTODO
+       END:VCALENDAR
+
+   The following is an example of a journal entry:
+
+       BEGIN:VCALENDAR
+       VERSION:2.0
+       PRODID:-//ABC Corporation//NONSGML My Product//EN
+       BEGIN:VJOURNAL
+       DTSTAMP:19970324T120000Z
+       UID:uid5 at example.com
+       ORGANIZER:mailto:jsmith at example.com
+       STATUS:DRAFT
+       CLASS:PUBLIC
+       CATEGORIES:Project Report,XYZ,Weekly Meeting
+       DESCRIPTION:Project xyz Review Meeting Minutes\n
+        Agenda\n1. Review of project version 1.0 requirements.\n2.
+
+
+
+Desruisseaux                Standards Track                   [Page 146]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+         Definition
+        of project processes.\n3. Review of project schedule.\n
+        Participants: John Smith\, Jane Doe\, Jim Dandy\n-It was
+         decided that the requirements need to be signed off by
+         product marketing.\n-Project processes were accepted.\n
+        -Project schedule needs to account for scheduled holidays
+         and employee vacation time. Check with HR for specific
+         dates.\n-New schedule will be distributed by Friday.\n-
+        Next weeks meeting is cancelled. No meeting until 3/23.
+       END:VJOURNAL
+       END:VCALENDAR
+
+   The following is an example of published busy time information.  The
+   iCalendar object might be placed in the network resource
+   http://www.example.com/calendar/busytime/jsmith.ifb.
+
+       BEGIN:VCALENDAR
+       VERSION:2.0
+       PRODID:-//RDU Software//NONSGML HandCal//EN
+       BEGIN:VFREEBUSY
+       ORGANIZER:mailto:jsmith at example.com
+       DTSTART:19980313T141711Z
+       DTEND:19980410T141711Z
+       FREEBUSY:19980314T233000Z/19980315T003000Z
+       FREEBUSY:19980316T153000Z/19980316T163000Z
+       FREEBUSY:19980318T030000Z/19980318T040000Z
+       URL:http://www.example.com/calendar/busytime/jsmith.ifb
+       END:VFREEBUSY
+       END:VCALENDAR
+
+5.  Recommended Practices
+
+   These recommended practices should be followed in order to assure
+   consistent handling of the following cases for an iCalendar object.
+
+   1.  Content lines longer than 75 octets SHOULD be folded.
+
+   2.  When the combination of the "RRULE" and "RDATE" properties in a
+       recurring component produces multiple instances having the same
+       start DATE-TIME value, they should be collapsed to, and
+       considered as, a single instance.  If the "RDATE" property is
+       specified as a PERIOD value the duration of the recurrence
+       instance will be the one specified by the "RDATE" property, and
+       not the duration of the recurrence instance defined by the
+       "DTSTART" property.
+
+   3.  When a calendar user receives multiple requests for the same
+       calendar component (e.g., REQUEST for a "VEVENT" calendar
+
+
+
+Desruisseaux                Standards Track                   [Page 147]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+       component) as a result of being on multiple mailing lists
+       specified by "ATTENDEE" properties in the request, they SHOULD
+       respond to only one of the requests.  The calendar user SHOULD
+       also specify (using the "MEMBER" parameter of the "ATTENDEE"
+       property) of which mailing list they are a member.
+
+   4.  An implementation can truncate a "SUMMARY" property value to 255
+       octets, but it MUST NOT truncate the value in the middle of a
+       UTF-8 multi-octet sequence.
+
+   5.  If seconds of the minute are not supported by an implementation,
+       then a value of "00" SHOULD be specified for the seconds
+       component in a time value.
+
+   6.  "TZURL" values SHOULD NOT be specified as a file URI type.  This
+       URI form can be useful within an organization, but is problematic
+       in the Internet.
+
+   7.  Some possible English values for "CATEGORIES" property include:
+       "ANNIVERSARY", "APPOINTMENT", "BUSINESS", "EDUCATION", "HOLIDAY",
+       "MEETING", "MISCELLANEOUS", "NON-WORKING HOURS", "NOT IN OFFICE",
+       "PERSONAL", "PHONE CALL", "SICK DAY", "SPECIAL OCCASION",
+       "TRAVEL", "VACATION".  Categories can be specified in any
+       registered language.
+
+   8.  Some possible English values for the "RESOURCES" property
+       include: "CATERING", "CHAIRS", "COMPUTER PROJECTOR", "EASEL",
+       "OVERHEAD PROJECTOR", "SPEAKER PHONE", "TABLE", "TV", "VCR",
+       "VIDEO PHONE", "VEHICLE".  Resources can be specified in any
+       registered language.
+
+6.  Internationalization Considerations
+
+   Applications MUST generate iCalendar streams in the UTF-8 charset and
+   MUST accept an iCalendar stream in the UTF-8 or US-ASCII charset.
+
+7.  Security Considerations
+
+   Because calendaring and scheduling information is very privacy-
+   sensitive, the protocol used for the transmission of calendaring and
+   scheduling information should have capabilities to protect the
+   information from possible threats, such as eavesdropping, replay,
+   message insertion, deletion, modification, and man-in-the-middle
+   attacks.
+
+   As this document only defines the data format and media type of text/
+   calendar that is independent of any calendar service or protocol, it
+   is up to the actual protocol specifications such as iTIP [2446bis],
+
+
+
+Desruisseaux                Standards Track                   [Page 148]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   iMIP [2447bis], and "Calendaring Extensions to WebDAV (CalDAV)"
+   [RFC4791] to describe the threats that the above attacks present, as
+   well as ways in which to mitigate them.
+
+8.  IANA Considerations
+
+8.1.  iCalendar Media Type Registration
+
+   The Calendaring and Scheduling Core Object Specification is intended
+   for use as a MIME content type.
+
+   To: ietf-types at iana.org
+
+   Subject: Registration of media type text/calendar
+
+   Type name:  text
+
+   Subtype name:  calendar
+
+   Required parameters:  none
+
+   Optional parameters:  charset, method, component, and optinfo
+
+      The "charset" parameter is defined in [RFC2046] for subtypes of
+      the "text" media type.  It is used to indicate the charset used in
+      the body part.  The charset supported by this revision of
+      iCalendar is UTF-8.  The use of any other charset is deprecated by
+      this revision of iCalendar; however, note that this revision
+      requires that compliant applications MUST accept iCalendar streams
+      using either the UTF-8 or US-ASCII charset.
+
+      The "method" parameter is used to convey the iCalendar object
+      method or transaction semantics for the calendaring and scheduling
+      information.  It also is an identifier for the restricted set of
+      properties and values of which the iCalendar object consists.  The
+      parameter is to be used as a guide for applications interpreting
+      the information contained within the body part.  It SHOULD NOT be
+      used to exclude or require particular pieces of information unless
+      the identified method definition specifically calls for this
+      behavior.  Unless specifically forbidden by a particular method
+      definition, a text/calendar content type can contain any set of
+      properties permitted by the Calendaring and Scheduling Core Object
+      Specification.  The "method" parameter MUST be specified and MUST
+      be set to the same value as the "METHOD" component property of the
+      iCalendar objects of the iCalendar stream if and only if the
+      iCalendar objects in the iCalendar stream all have a "METHOD"
+      component property set to the same value.
+
+
+
+
+Desruisseaux                Standards Track                   [Page 149]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      The value for the "method" parameter is defined as follows:
+
+       method  = 1*(ALPHA / DIGIT / "-")
+       ; IANA-registered iCalendar object method
+
+      The "component" parameter conveys the type of iCalendar calendar
+      component within the body part.  If the iCalendar object contains
+      more than one calendar component type, then multiple component
+      parameters MUST be specified.
+
+      The value for the "component" parameter is defined as follows:
+
+       component = "VEVENT"
+                 / "VTODO"
+                 / "VJOURNAL"
+                 / "VFREEBUSY"
+                 / "VTIMEZONE"
+                 / iana-token
+                 / x-name
+
+      The "optinfo" parameter conveys optional information about the
+      iCalendar object within the body part.  This parameter can only
+      specify semantics already specified by the iCalendar object and
+      that can be otherwise determined by parsing the body part.  In
+      addition, the optional information specified by this parameter
+      MUST be consistent with that information specified by the
+      iCalendar object.  For example, it can be used to convey the
+      "Attendee" response status to a meeting request.  The parameter
+      value consists of a string value.
+
+      The parameter can be specified multiple times.
+
+      The value for the "optinfo" parameter is defined as follows:
+
+       optinfo    = infovalue / qinfovalue
+
+       infovalue  = iana-token / x-name
+
+       qinfovalue = DQUOTE (infovalue) DQUOTE
+
+   Encoding considerations:  This media type can contain 8bit
+      characters, so the use of quoted-printable or base64 MIME Content-
+      Transfer-Encodings might be necessary when iCalendar objects are
+      transferred across protocols restricted to the 7bit repertoire.
+      Note that a text valued property in the content entity can also
+      have content encoding of special characters using a BACKSLASH
+      character escapement technique.  This means that content values
+      can end up being encoded twice.
+
+
+
+Desruisseaux                Standards Track                   [Page 150]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Security considerations:  See Section 7.
+
+   Interoperability considerations:  This media type is intended to
+      define a common format for conveying calendaring and scheduling
+      information between different systems.  It is heavily based on the
+      earlier [VCAL] industry specification.
+
+   Published specification:  This specification.
+
+   Applications that use this media type:  This media type is designed
+      for widespread use by Internet calendaring and scheduling
+      applications.  In addition, applications in the workflow and
+      document management area might find this content-type applicable.
+      The iTIP [2446bis], iMIP [2447bis], and CalDAV [RFC4791] Internet
+      protocols directly use this media type also.
+
+   Additional information:
+
+      Magic number(s):  None.
+
+      File extension(s):  The file extension of "ics" is to be used to
+         designate a file containing (an arbitrary set of) calendaring
+         and scheduling information consistent with this MIME content
+         type.
+
+         The file extension of "ifb" is to be used to designate a file
+         containing free or busy time information consistent with this
+         MIME content type.
+
+      Macintosh file type code(s):  The file type code of "iCal" is to
+         be used in Apple MacIntosh operating system environments to
+         designate a file containing calendaring and scheduling
+         information consistent with this MIME media type.
+
+         The file type code of "iFBf" is to be used in Apple MacIntosh
+         operating system environments to designate a file containing
+         free or busy time information consistent with this MIME media
+         type.
+
+   Person & email address to contact for further information:  See the
+      "Author's Address" section of this document.
+
+   Intended usage:  COMMON
+
+   Restrictions on usage:  There are no restrictions on where this media
+      type can be used.
+
+   Author:  See the "Author's Address" section of this document.
+
+
+
+Desruisseaux                Standards Track                   [Page 151]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Change controller:  IETF
+
+8.2.  New iCalendar Elements Registration
+
+   This section defines the process to register new or modified
+   iCalendar elements, that is, components, properties, parameters,
+   value data types, and values, with IANA.
+
+8.2.1.  iCalendar Elements Registration Procedure
+
+   The IETF will create a mailing list, icalendar at ietf.org, which can be
+   used for public discussion of iCalendar elements proposals prior to
+   registration.  Use of the mailing list is strongly encouraged.  The
+   IESG will appoint a designated expert who will monitor the
+   icalendar at ietf.org mailing list and review registrations.
+
+   Registration of new iCalendar elements MUST be reviewed by the
+   designated expert and published in an RFC.  A Standards Track RFC is
+   REQUIRED for the registration of new value data types that modify
+   existing properties, as well as for the registration of participation
+   status values to be used in "VEVENT" calendar components.  A
+   Standards Track RFC is also REQUIRED for registration of iCalendar
+   elements that modify iCalendar elements previously documented in a
+   Standards Track RFC.
+
+   The registration procedure begins when a completed registration
+   template, defined in the sections below, is sent to
+   icalendar at ietf.org and iana at iana.org.  The designated expert is
+   expected to tell IANA and the submitter of the registration within
+   two weeks whether the registration is approved, approved with minor
+   changes, or rejected with cause.  When a registration is rejected
+   with cause, it can be re-submitted if the concerns listed in the
+   cause are addressed.  Decisions made by the designated expert can be
+   appealed to the IESG Applications Area Director, then to the IESG.
+   They follow the normal appeals procedure for IESG decisions.
+
+8.2.2.  Registration Template for Components
+
+   A component is defined by completing the following template.
+
+   Component name:  The name of the component.
+
+   Purpose:  The purpose of the component.  Give a short but clear
+      description.
+
+   Format definition:  The ABNF for the component definition needs to be
+      specified.
+
+
+
+
+Desruisseaux                Standards Track                   [Page 152]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Description:  Any special notes about the component, how it is to be
+      used, etc.
+
+   Example(s):  One or more examples of instances of the component need
+      to be specified.
+
+8.2.3.  Registration Template for Properties
+
+   A property is defined by completing the following template.
+
+   Property name:  The name of the property.
+
+   Purpose:  The purpose of the property.  Give a short but clear
+      description.
+
+   Value type:  Any of the valid value types for the property value need
+      to be specified.  The default value type also needs to be
+      specified.
+
+   Property parameters:  Any of the valid property parameters for the
+      property MUST be specified.
+
+   Conformance:  The calendar components in which the property can
+      appear MUST be specified.
+
+   Description:  Any special notes about the property, how it is to be
+      used, etc.
+
+   Format definition:  The ABNF for the property definition needs to be
+      specified.
+
+   Example(s):  One or more examples of instances of the property need
+      to be specified.
+
+8.2.4.  Registration Template for Parameters
+
+   A parameter is defined by completing the following template.
+
+   Parameter name:  The name of the parameter.
+
+   Purpose:  The purpose of the parameter.  Give a short but clear
+      description.
+
+   Format definition:  The ABNF for the parameter definition needs to be
+      specified.
+
+   Description:  Any special notes about the parameter, how it is to be
+      used, etc.
+
+
+
+Desruisseaux                Standards Track                   [Page 153]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Example(s):  One or more examples of instances of the parameter need
+      to be specified.
+
+8.2.5.  Registration Template for Value Data Types
+
+   A value data type is defined by completing the following template.
+
+   Value name:  The name of the value type.
+
+   Purpose:  The purpose of the value type.  Give a short but clear
+      description.
+
+   Format definition:  The ABNF for the value type definition needs to
+      be specified.
+
+   Description:  Any special notes about the value type, how it is to be
+      used, etc.
+
+   Example(s):  One or more examples of instances of the value type need
+      to be specified.
+
+8.2.6.  Registration Template for Values
+
+   A value is defined by completing the following template.
+
+   Value:  The value literal.
+
+   Purpose:  The purpose of the value.  Give a short but clear
+      description.
+
+   Conformance:  The calendar properties and/or parameters that can take
+      this value need to be specified.
+
+   Example(s):  One or more examples of instances of the value need to
+      be specified.
+
+   The following is a fictitious example of a registration of an
+   iCalendar value:
+
+   Value:  TOP-SECRET
+
+   Purpose:  This value is used to specify the access classification of
+      top-secret calendar components.
+
+   Conformance:  This value can be used with the "CLASS" property.
+
+
+
+
+
+
+Desruisseaux                Standards Track                   [Page 154]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   Example(s):  The following is an example of this value used with the
+      "CLASS" property:
+
+     CLASS:TOP-SECRET
+
+8.3.  Initial iCalendar Elements Registries
+
+   The IANA created and maintains the following registries for iCalendar
+   elements with pointers to appropriate reference documents.
+
+8.3.1.  Components Registry
+
+   The following table has been used to initialize the components
+   registry.
+
+             +-----------+---------+-------------------------+
+             | Component | Status  | Reference               |
+             +-----------+---------+-------------------------+
+             | VCALENDAR | Current | RFC 5545, Section 3.4   |
+             |           |         |                         |
+             | VEVENT    | Current | RFC 5545, Section 3.6.1 |
+             |           |         |                         |
+             | VTODO     | Current | RFC 5545, Section 3.6.2 |
+             |           |         |                         |
+             | VJOURNAL  | Current | RFC 5545, Section 3.6.3 |
+             |           |         |                         |
+             | VFREEBUSY | Current | RFC 5545, Section 3.6.4 |
+             |           |         |                         |
+             | VTIMEZONE | Current | RFC 5545, Section 3.6.5 |
+             |           |         |                         |
+             | VALARM    | Current | RFC 5545, Section 3.6.6 |
+             |           |         |                         |
+             | STANDARD  | Current | RFC 5545, Section 3.6.5 |
+             |           |         |                         |
+             | DAYLIGHT  | Current | RFC 5545, Section 3.6.5 |
+             +-----------+---------+-------------------------+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                   [Page 155]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+8.3.2.  Properties Registry
+
+   The following table is has been used to initialize the properties
+   registry.
+
+      +------------------+------------+----------------------------+
+      | Property         | Status     | Reference                  |
+      +------------------+------------+----------------------------+
+      | CALSCALE         | Current    | RFC 5545, Section 3.7.1    |
+      | METHOD           | Current    | RFC 5545, Section 3.7.2    |
+      |                  |            |                            |
+      | PRODID           | Current    | RFC 5545, Section 3.7.3    |
+      |                  |            |                            |
+      | VERSION          | Current    | RFC 5545, Section 3.7.4    |
+      |                  |            |                            |
+      | ATTACH           | Current    | RFC 5545, Section 3.8.1.1  |
+      |                  |            |                            |
+      | CATEGORIES       | Current    | RFC 5545, Section 3.8.1.2  |
+      |                  |            |                            |
+      | CLASS            | Current    | RFC 5545, Section 3.8.1.3  |
+      |                  |            |                            |
+      | COMMENT          | Current    | RFC 5545, Section 3.8.1.4  |
+      |                  |            |                            |
+      | DESCRIPTION      | Current    | RFC 5545, Section 3.8.1.5  |
+      |                  |            |                            |
+      | GEO              | Current    | RFC 5545, Section 3.8.1.6  |
+      |                  |            |                            |
+      | LOCATION         | Current    | RFC 5545, Section 3.8.1.7  |
+      |                  |            |                            |
+      | PERCENT-COMPLETE | Current    | RFC 5545, Section 3.8.1.8  |
+      |                  |            |                            |
+      | PRIORITY         | Current    | RFC 5545, Section 3.8.1.9  |
+      |                  |            |                            |
+      | RESOURCES        | Current    | RFC 5545, Section 3.8.1.10 |
+      |                  |            |                            |
+      | STATUS           | Current    | RFC 5545, Section 3.8.1.11 |
+      |                  |            |                            |
+      | SUMMARY          | Current    | RFC 5545, Section 3.8.1.12 |
+      |                  |            |                            |
+      | COMPLETED        | Current    | RFC 5545, Section 3.8.2.1  |
+      |                  |            |                            |
+      | DTEND            | Current    | RFC 5545, Section 3.8.2.2  |
+      |                  |            |                            |
+      | DUE              | Current    | RFC 5545, Section 3.8.2.3  |
+      |                  |            |                            |
+      | DTSTART          | Current    | RFC 5545, Section 3.8.2.4  |
+      |                  |            |                            |
+      | DURATION         | Current    | RFC 5545, Section 3.8.2.5  |
+
+
+
+Desruisseaux                Standards Track                   [Page 156]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      |                  |            |                            |
+      | FREEBUSY         | Current    | RFC 5545, Section 3.8.2.6  |
+      |                  |            |                            |
+      | TRANSP           | Current    | RFC 5545, Section 3.8.2.7  |
+      |                  |            |                            |
+      | TZID             | Current    | RFC 5545, Section 3.8.3.1  |
+      |                  |            |                            |
+      | TZNAME           | Current    | RFC 5545, Section 3.8.3.2  |
+      |                  |            |                            |
+      | TZOFFSETFROM     | Current    | RFC 5545, Section 3.8.3.3  |
+      |                  |            |                            |
+      | TZOFFSETTO       | Current    | RFC 5545, Section 3.8.3.4  |
+      |                  |            |                            |
+      | TZURL            | Current    | RFC 5545, Section 3.8.3.5  |
+      |                  |            |                            |
+      | ATTENDEE         | Current    | RFC 5545, Section 3.8.4.1  |
+      |                  |            |                            |
+      | CONTACT          | Current    | RFC 5545, Section 3.8.4.2  |
+      |                  |            |                            |
+      | ORGANIZER        | Current    | RFC 5545, Section 3.8.4.3  |
+      |                  |            |                            |
+      | RECURRENCE-ID    | Current    | RFC 5545, Section 3.8.4.4  |
+      |                  |            |                            |
+      | RELATED-TO       | Current    | RFC 5545, Section 3.8.4.5  |
+      |                  |            |                            |
+      | URL              | Current    | RFC 5545, Section 3.8.4.6  |
+      |                  |            |                            |
+      | UID              | Current    | RFC 5545, Section 3.8.4.7  |
+      |                  |            |                            |
+      | EXDATE           | Current    | RFC 5545, Section 3.8.5.1  |
+      |                  |            |                            |
+      | EXRULE           | Deprecated | [RFC2445], Section 4.8.5.2 |
+      |                  |            |                            |
+      | RDATE            | Current    | RFC 5545, Section 3.8.5.2  |
+      |                  |            |                            |
+      | RRULE            | Current    | RFC 5545, Section 3.8.5.3  |
+      |                  |            |                            |
+      | ACTION           | Current    | RFC 5545, Section 3.8.6.1  |
+      |                  |            |                            |
+      | REPEAT           | Current    | RFC 5545, Section 3.8.6.2  |
+      |                  |            |                            |
+      | TRIGGER          | Current    | RFC 5545, Section 3.8.6.3  |
+      |                  |            |                            |
+      | CREATED          | Current    | RFC 5545, Section 3.8.7.1  |
+      |                  |            |                            |
+      | DTSTAMP          | Current    | RFC 5545, Section 3.8.7.2  |
+      |                  |            |                            |
+      | LAST-MODIFIED    | Current    | RFC 5545, Section 3.8.7.3  |
+
+
+
+Desruisseaux                Standards Track                   [Page 157]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+      |                  |            |                            |
+      | SEQUENCE         | Current    | RFC 5545, Section 3.8.7.4  |
+      |                  |            |                            |
+      | REQUEST-STATUS   | Current    | RFC 5545, Section 3.8.8.3  |
+      +------------------+------------+----------------------------+
+
+8.3.3.  Parameters Registry
+
+   The following table has been used to initialize the parameters
+   registry.
+
+          +----------------+---------+--------------------------+
+          | Parameter      | Status  | Reference                |
+          +----------------+---------+--------------------------+
+          | ALTREP         | Current | RFC 5545, Section 3.2.1  |
+          |                |         |                          |
+          | CN             | Current | RFC 5545, Section 3.2.2  |
+          |                |         |                          |
+          | CUTYPE         | Current | RFC 5545, Section 3.2.3  |
+          |                |         |                          |
+          | DELEGATED-FROM | Current | RFC 5545, Section 3.2.4  |
+          |                |         |                          |
+          | DELEGATED-TO   | Current | RFC 5545, Section 3.2.5  |
+          |                |         |                          |
+          | DIR            | Current | RFC 5545, Section 3.2.6  |
+          |                |         |                          |
+          | ENCODING       | Current | RFC 5545, Section 3.2.7  |
+          |                |         |                          |
+          | FMTTYPE        | Current | RFC 5545, Section 3.2.8  |
+          |                |         |                          |
+          | FBTYPE         | Current | RFC 5545, Section 3.2.9  |
+          |                |         |                          |
+          | LANGUAGE       | Current | RFC 5545, Section 3.2.10 |
+          |                |         |                          |
+          | MEMBER         | Current | RFC 5545, Section 3.2.11 |
+          |                |         |                          |
+          | PARTSTAT       | Current | RFC 5545, Section 3.2.12 |
+          |                |         |                          |
+          | RANGE          | Current | RFC 5545, Section 3.2.13 |
+          |                |         |                          |
+          | RELATED        | Current | RFC 5545, Section 3.2.14 |
+          |                |         |                          |
+          | RELTYPE        | Current | RFC 5545, Section 3.2.15 |
+          |                |         |                          |
+          | ROLE           | Current | RFC 5545, Section 3.2.16 |
+          |                |         |                          |
+          | RSVP           | Current | RFC 5545, Section 3.2.17 |
+          |                |         |                          |
+
+
+
+Desruisseaux                Standards Track                   [Page 158]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+          | SENT-BY        | Current | RFC 5545, Section 3.2.18 |
+          |                |         |                          |
+          | TZID           | Current | RFC 5545, Section 3.2.19 |
+          |                |         |                          |
+          | VALUE          | Current | RFC 5545, Section 3.2.20 |
+          +----------------+---------+--------------------------+
+
+8.3.4.  Value Data Types Registry
+
+   The following table has been used to initialize the value data types
+   registry.
+
+         +-----------------+---------+--------------------------+
+         | Value Data Type | Status  | Reference                |
+         +-----------------+---------+--------------------------+
+         | BINARY          | Current | RFC 5545, Section 3.3.1  |
+         |                 |         |                          |
+         | BOOLEAN         | Current | RFC 5545, Section 3.3.2  |
+         |                 |         |                          |
+         | CAL-ADDRESS     | Current | RFC 5545, Section 3.3.3  |
+         |                 |         |                          |
+         | DATE            | Current | RFC 5545, Section 3.3.4  |
+         |                 |         |                          |
+         | DATE-TIME       | Current | RFC 5545, Section 3.3.5  |
+         |                 |         |                          |
+         | DURATION        | Current | RFC 5545, Section 3.3.6  |
+         |                 |         |                          |
+         | FLOAT           | Current | RFC 5545, Section 3.3.7  |
+         |                 |         |                          |
+         | INTEGER         | Current | RFC 5545, Section 3.3.8  |
+         |                 |         |                          |
+         | PERIOD          | Current | RFC 5545, Section 3.3.9  |
+         |                 |         |                          |
+         | RECUR           | Current | RFC 5545, Section 3.3.10 |
+         |                 |         |                          |
+         | TEXT            | Current | RFC 5545, Section 3.3.11 |
+         |                 |         |                          |
+         | TIME            | Current | RFC 5545, Section 3.3.12 |
+         |                 |         |                          |
+         | URI             | Current | RFC 5545, Section 3.3.13 |
+         |                 |         |                          |
+         | UTC-OFFSET      | Current | RFC 5545, Section 3.3.14 |
+         +-----------------+---------+--------------------------+
+
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                   [Page 159]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+8.3.5.  Calendar User Types Registry
+
+   The following table has been used to initialize the calendar user
+   types registry.
+
+        +--------------------+---------+-------------------------+
+        | Calendar User Type | Status  | Reference               |
+        +--------------------+---------+-------------------------+
+        | INDIVIDUAL         | Current | RFC 5545, Section 3.2.3 |
+        |                    |         |                         |
+        | GROUP              | Current | RFC 5545, Section 3.2.3 |
+        |                    |         |                         |
+        | RESOURCE           | Current | RFC 5545, Section 3.2.3 |
+        |                    |         |                         |
+        | ROOM               | Current | RFC 5545, Section 3.2.3 |
+        |                    |         |                         |
+        | UNKNOWN            | Current | RFC 5545, Section 3.2.3 |
+        +--------------------+---------+-------------------------+
+
+8.3.6.  Free/Busy Time Types Registry
+
+   The following table has been used to initialize the free/busy time
+   types registry.
+
+        +---------------------+---------+-------------------------+
+        | Free/Busy Time Type | Status  | Reference               |
+        +---------------------+---------+-------------------------+
+        | FREE                | Current | RFC 5545, Section 3.2.9 |
+        |                     |         |                         |
+        | BUSY                | Current | RFC 5545, Section 3.2.9 |
+        |                     |         |                         |
+        | BUSY-UNAVAILABLE    | Current | RFC 5545, Section 3.2.9 |
+        |                     |         |                         |
+        | BUSY-TENTATIVE      | Current | RFC 5545, Section 3.2.9 |
+        +---------------------+---------+-------------------------+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                   [Page 160]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+8.3.7.  Participation Statuses Registry
+
+   The following table has been used to initialize the participation
+   statuses registry.
+
+        +--------------------+---------+--------------------------+
+        | Participant Status | Status  | Reference                |
+        +--------------------+---------+--------------------------+
+        | NEEDS-ACTION       | Current | RFC 5545, Section 3.2.12 |
+        |                    |         |                          |
+        | ACCEPTED           | Current | RFC 5545, Section 3.2.12 |
+        |                    |         |                          |
+        | DECLINED           | Current | RFC 5545, Section 3.2.12 |
+        |                    |         |                          |
+        | TENTATIVE          | Current | RFC 5545, Section 3.2.12 |
+        |                    |         |                          |
+        | DELEGATED          | Current | RFC 5545, Section 3.2.12 |
+        |                    |         |                          |
+        | COMPLETED          | Current | RFC 5545, Section 3.2.12 |
+        |                    |         |                          |
+        | IN-PROCESS         | Current | RFC 5545, Section 3.2.12 |
+        +--------------------+---------+--------------------------+
+
+8.3.8.  Relationship Types Registry
+
+   The following table has been used to initialize the relationship
+   types registry.
+
+        +-------------------+---------+--------------------------+
+        | Relationship Type | Status  | Reference                |
+        +-------------------+---------+--------------------------+
+        | CHILD             | Current | RFC 5545, Section 3.2.15 |
+        |                   |         |                          |
+        | PARENT            | Current | RFC 5545, Section 3.2.15 |
+        |                   |         |                          |
+        | SIBLING           | Current | RFC 5545, Section 3.2.15 |
+        +-------------------+---------+--------------------------+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                   [Page 161]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+8.3.9.  Participation Roles Registry
+
+   The following table has been used to initialize the participation
+   roles registry.
+
+         +-----------------+---------+--------------------------+
+         | Role Type       | Status  | Reference                |
+         +-----------------+---------+--------------------------+
+         | CHAIR           | Current | RFC 5545, Section 3.2.16 |
+         |                 |         |                          |
+         | REQ-PARTICIPANT | Current | RFC 5545, Section 3.2.16 |
+         |                 |         |                          |
+         | OPT-PARTICIPANT | Current | RFC 5545, Section 3.2.16 |
+         |                 |         |                          |
+         | NON-PARTICIPANT | Current | RFC 5545, Section 3.2.16 |
+         +-----------------+---------+--------------------------+
+
+8.3.10.  Actions Registry
+
+   The following table has been used to initialize the actions registry.
+
+          +-----------+------------+----------------------------+
+          | Action    | Status     | Reference                  |
+          +-----------+------------+----------------------------+
+          | AUDIO     | Current    | RFC 5545, Section 3.8.6.1  |
+          |           |            |                            |
+          | DISPLAY   | Current    | RFC 5545, Section 3.8.6.1  |
+          |           |            |                            |
+          | EMAIL     | Current    | RFC 5545, Section 3.8.6.1  |
+          |           |            |                            |
+          | PROCEDURE | Deprecated | [RFC2445], Section 4.8.6.1 |
+          +-----------+------------+----------------------------+
+
+8.3.11.  Classifications Registry
+
+   The following table has been used to initialize the classifications
+   registry.
+
+         +----------------+---------+---------------------------+
+         | Classification | Status  | Reference                 |
+         +----------------+---------+---------------------------+
+         | PUBLIC         | Current | RFC 5545, Section 3.8.1.3 |
+         |                |         |                           |
+         | PRIVATE        | Current | RFC 5545, Section 3.8.1.3 |
+         |                |         |                           |
+         | CONFIDENTIAL   | Current | RFC 5545, Section 3.8.1.3 |
+         +----------------+---------+---------------------------+
+
+
+
+
+Desruisseaux                Standards Track                   [Page 162]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+8.3.12.  Methods Registry
+
+   No values are defined in this document for the "METHOD" property.
+
+9.  Acknowledgments
+
+   The editor of this document wishes to thank Frank Dawson and Derik
+   Stenerson, the original authors of RFC 2445, as well as the following
+   individuals who have participated in the drafting, review, and
+   discussion of this memo:
+
+   Joe Abley, Hervey Allen, Steve Allen, Jay Batson, Oliver Block,
+   Stephane Bortzmeyer, Chris Bryant, Tantek Celik, Mark Crispin, Cyrus
+   Daboo, Mike Douglass, Andrew N. Dowden, Lisa Dusseault, Lars Eggert,
+   Gren Eliot, Pasi Eronen, Ben Fortuna, Ned Freed, Neal Gafter, Ted
+   Hardie, Tim Hare, Jeffrey Harris, Helge Hess, Paul B. Hill, Thomas
+   Hnetila, Russ Housley, Leif Johansson, Ciny Joy, Bruce Kahn, Reinhold
+   Kainhofer, Martin Kiff, Patrice Lapierre, Michiel van Leeuwen,
+   Jonathan Lennox, Jeff McCullough, Bill McQuillan, Alexey Melnikov,
+   John W. Noerenberg II, Chuck Norris, Mark Paterson, Simon Pilette,
+   Arnaud Quillaud, Robert Ransdell, Julian F. Reschke, Caleb
+   Richardson, Sam Roberts, Dan Romascanu, Mike Samuel, George Sexton,
+   Nigel Swinson, Clint Talbert, Simon Vaillancourt, Magnus Westerlund,
+   and Sandy Wills.
+
+   A special thanks to the working group chairs Aki Niemi and Eliot Lear
+   for their support and guidance.
+
+   The editor would also like to thank the Calendaring and Scheduling
+   Consortium for advice with this specification, and for organizing
+   interoperability testing events to help refine it.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                   [Page 163]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+10.  References
+
+10.1.  Normative References
+
+   [ISO.8601.2004]        International Organization for
+                          Standardization, "Data elements and
+                          interchange formats -- Information interchange
+                          -- Representation of dates and times", 2004.
+
+   [ISO.9070.1991]        International Organization for
+                          Standardization, "Information Technology_SGML
+                          Support Facilities -- Registration Procedures
+                          for Public Text Owner Identifiers, Second
+                          Edition", April 1991.
+
+   [RFC2045]              Freed, N. and N. Borenstein, "Multipurpose
+                          Internet Mail Extensions (MIME) Part One:
+                          Format of Internet Message Bodies", RFC 2045,
+                          November 1996.
+
+   [RFC2046]              Freed, N. and N. Borenstein, "Multipurpose
+                          Internet Mail Extensions (MIME) Part Two:
+                          Media Types", RFC 2046, November 1996.
+
+   [RFC2119]              Bradner, S., "Key words for use in RFCs to
+                          Indicate Requirement Levels", BCP 14,
+                          RFC 2119, March 1997.
+
+   [RFC2368]              Hoffman, P., Masinter, L., and J. Zawinski,
+                          "The mailto URL scheme", RFC 2368, July 1998.
+
+   [RFC3629]              Yergeau, F., "UTF-8, a transformation format
+                          of ISO 10646", STD 63, RFC 3629,
+                          November 2003.
+
+   [RFC3986]              Berners-Lee, T., Fielding, R., and L.
+                          Masinter, "Uniform Resource Identifier (URI):
+                          Generic Syntax", STD 66, RFC 3986,
+                          January 2005.
+
+   [RFC4288]              Freed, N. and J. Klensin, "Media Type
+                          Specifications and Registration Procedures",
+                          BCP 13, RFC 4288, December 2005.
+
+   [RFC4648]              Josefsson, S., "The Base16, Base32, and Base64
+                          Data Encodings", RFC 4648, October 2006.
+
+
+
+
+
+Desruisseaux                Standards Track                   [Page 164]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   [RFC5234]              Crocker, D. and P. Overell, "Augmented BNF for
+                          Syntax Specifications: ABNF", STD 68,
+                          RFC 5234, January 2008.
+
+   [RFC5646]              Phillips, A., Ed., and M. Davis, Ed., "Tags
+                          for Identifying Languages", BCP 47, RFC 5646,
+                          September 2009.
+
+   [US-ASCII]             American National Standards Institute, "Coded
+                          Character Set - 7-bit American Standard Code
+                          for Information Interchange", ANSI X3.4, 1986.
+
+10.2.  Informative References
+
+   [2446bis]              Daboo, C., "iCalendar Transport-Independent
+                          Interoperability Protocol (iTIP)", Work
+                          in Progress, April 2009.
+
+   [2447bis]              Melnikov, A., "iCalendar Message-Based
+                          Interoperability Protocol (iMIP)", Work
+                          in Progress, June 2008.
+
+   [ANSI INCITS 61-1986]  International Committee for Information
+                          Technology, "Representation of Geographic
+                          Point Locations for Information Interchange
+                          (formerly ANSI X3.61-1986 (R1997))", ANSI
+                          INCITS 61-1986 (R2007), 2007.
+
+   [RFC1738]              Berners-Lee, T., Masinter, L., and M.
+                          McCahill, "Uniform Resource Locators (URL)",
+                          RFC 1738, December 1994.
+
+   [RFC2392]              Levinson, E., "Content-ID and Message-ID
+                          Uniform Resource Locators", RFC 2392,
+                          August 1998.
+
+   [RFC2397]              Masinter, L., "The "data" URL scheme",
+                          RFC 2397, August 1998.
+
+   [RFC2425]              Howes, T., Smith, M., and F. Dawson, "A MIME
+                          Content-Type for Directory Information",
+                          RFC 2425, September 1998.
+
+   [RFC2426]              Dawson, F. and T. Howes, "vCard MIME Directory
+                          Profile", RFC 2426, September 1998.
+
+
+
+
+
+
+Desruisseaux                Standards Track                   [Page 165]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+   [RFC2445]              Dawson, F. and Stenerson, D., "Internet
+                          Calendaring and Scheduling Core Object
+                          Specification (iCalendar)", RFC 2445,
+                          November 1998.
+
+   [RFC2616]              Fielding, R., Gettys, J., Mogul, J., Frystyk,
+                          H., Masinter, L., Leach, P., and T. Berners-
+                          Lee, "Hypertext Transfer Protocol --
+                          HTTP/1.1", RFC 2616, June 1999.
+
+   [RFC2818]              Rescorla, E., "HTTP Over TLS", RFC 2818,
+                          May 2000.
+
+   [RFC4516]              Smith, M. and T. Howes, "Lightweight Directory
+                          Access Protocol (LDAP): Uniform Resource
+                          Locator", RFC 4516, June 2006.
+
+   [RFC4791]              Daboo, C., Desruisseaux, B., and L. Dusseault,
+                          "Calendaring Extensions to WebDAV (CalDAV)",
+                          RFC 4791, March 2007.
+
+   [TZDB]                 Eggert, P. and A.D. Olson, "Sources for Time
+                          Zone and Daylight Saving Time Data",
+                          July 2009,
+                          <http://www.twinsun.com/tz/tz-link.htm>.
+
+   [VCAL]                 Internet Mail Consortium, "vCalendar: The
+                          Electronic Calendaring and Scheduling Exchange
+                          Format", September 1996,
+                          <http://www.imc.org/pdi/vcal-10.txt>.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                   [Page 166]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+Appendix A.  Differences from RFC 2445
+
+   This appendix contains a list of changes that have been made in the
+   Internet Calendaring and Scheduling Core Object Specification from
+   RFC 2445.
+
+A.1.  New Restrictions
+
+   1.  The "DTSTART" property SHOULD be synchronized with the recurrence
+       rule, if specified.
+
+   2.  The "RRULE" property SHOULD NOT occur more than once in a
+       component.
+
+   3.  The BYHOUR, BYMINUTE, and BYSECOND rule parts MUST NOT be
+       specified in the "RRULE" property when the "DTSTART" property is
+       specified as a DATE value.
+
+   4.  The value type of the "DTEND" or "DUE" properties MUST match the
+       value type of "DTSTART" property.
+
+   5.  The "DURATION" property can no longer appear in "VFREEBUSY"
+       components.
+
+A.2.  Restrictions Removed
+
+   1.  The "DTSTART" and "DTEND" properties are no longer required to be
+       specified as date with local time and time zone reference when
+       used with a recurrence rule.
+
+A.3.  Deprecated Features
+
+   1.  The "EXRULE" property can no longer be specified in a component.
+
+   2.  The "THISANDPRIOR" value can no longer be used with the "RANGE"
+       parameter.
+
+   3.  The "PROCEDURE" value can no longer be used with the "ACTION"
+       property.
+
+   4.  The value type RECUR no longer allows multiple values to be
+       specified by a COMMA-separated list of values.
+
+   5.  x-name rule parts can no longer be specified in properties of
+       RECUR value type (e.g., "RRULE"). x-param can be used on RECUR
+       value type properties instead.
+
+
+
+
+
+Desruisseaux                Standards Track                   [Page 167]
+
+RFC 5545                       iCalendar                  September 2009
+
+
+Author's Address
+
+   Bernard Desruisseaux (editor)
+   Oracle Corporation
+   600 blvd. de Maisonneuve West
+   Suite 1900
+   Montreal, QC  H3A 3J2
+   CANADA
+
+   EMail: bernard.desruisseaux at oracle.com
+   URI:   http://www.oracle.com/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Desruisseaux                Standards Track                   [Page 168]
+

Copied: CalendarServer/branches/users/cdaboo/partition-4464/doc/RFC/rfc5689-Extended MKCOL.txt (from rev 4858, CalendarServer/trunk/doc/RFC/rfc5689-Extended MKCOL.txt)
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/doc/RFC/rfc5689-Extended MKCOL.txt	                        (rev 0)
+++ CalendarServer/branches/users/cdaboo/partition-4464/doc/RFC/rfc5689-Extended MKCOL.txt	2009-12-16 02:48:38 UTC (rev 4865)
@@ -0,0 +1,675 @@
+
+
+
+
+
+
+Network Working Group                                           C. Daboo
+Request for Comments: 5689                                    Apple Inc.
+Updates: 4791, 4918                                       September 2009
+Category: Standards Track
+
+
+  Extended MKCOL for Web Distributed Authoring and Versioning (WebDAV)
+
+Abstract
+
+   This specification extends the Web Distributed Authoring and
+   Versioning (WebDAV) MKCOL (Make Collection) method to allow
+   collections of arbitrary resourcetype to be created and to allow
+   properties to be set at the same time.
+
+Status of This Memo
+
+   This document specifies an Internet standards track protocol for the
+   Internet community, and requests discussion and suggestions for
+   improvements.  Please refer to the current edition of the "Internet
+   Official Protocol Standards" (STD 1) for the standardization state
+   and status of this protocol.  Distribution of this memo is unlimited.
+
+Copyright Notice
+
+   Copyright (c) 2009 IETF Trust and the persons identified as the
+   document authors.  All rights reserved.
+
+   This document is subject to BCP 78 and the IETF Trust's Legal
+   Provisions Relating to IETF Documents
+   (http://trustee.ietf.org/license-info) in effect on the date of
+   publication of this document.  Please review these documents
+   carefully, as they describe your rights and restrictions with respect
+   to this document.  Code Components extracted from this document must
+   include Simplified BSD License text as described in Section 4.e of
+   the Trust Legal Provisions and are provided without warranty as
+   described in the BSD License.
+
+   This document may contain material from IETF Documents or IETF
+   Contributions published or made publicly available before November
+   10, 2008.  The person(s) controlling the copyright in some of this
+   material may not have granted the IETF Trust the right to allow
+   modifications of such material outside the IETF Standards Process.
+   Without obtaining an adequate license from the person(s) controlling
+   the copyright in such materials, this document may not be modified
+   outside the IETF Standards Process, and derivative works of it may
+
+
+
+
+
+Daboo                       Standards Track                     [Page 1]
+
+RFC 5689               Extended MKCOL for WebDAV          September 2009
+
+
+   not be created outside the IETF Standards Process, except to format
+   it for publication as an RFC or to translate it into languages other
+   than English.
+
+Table of Contents
+
+   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  3
+   2.  Conventions Used in This Document  . . . . . . . . . . . . . .  3
+   3.  WebDAV Extended MKCOL  . . . . . . . . . . . . . . . . . . . .  4
+     3.1.  Extended MKCOL Support . . . . . . . . . . . . . . . . . .  5
+       3.1.1.  Example: Using OPTIONS for the Discovery of
+               Support for Extended MKCOL . . . . . . . . . . . . . .  5
+     3.2.  Status Codes . . . . . . . . . . . . . . . . . . . . . . .  5
+     3.3.  Additional Precondition for Extended MKCOL . . . . . . . .  5
+     3.4.  Example: Successful Extended MKCOL Request . . . . . . . .  6
+     3.5.  Example: Unsuccessful Extended MKCOL Request . . . . . . .  6
+   4.  Using Extended MKCOL as an Alternative for MKxxx Methods . . .  8
+     4.1.  MKCALENDAR Alternative . . . . . . . . . . . . . . . . . .  8
+       4.1.1.  Example: Using MKCOL Instead of MKCALENDAR . . . . . .  8
+   5.  XML Element Definitions  . . . . . . . . . . . . . . . . . . . 10
+     5.1.  mkcol XML Element  . . . . . . . . . . . . . . . . . . . . 10
+     5.2.  mkcol-response XML Element . . . . . . . . . . . . . . . . 10
+   6.  Security Considerations  . . . . . . . . . . . . . . . . . . . 11
+   7.  Acknowledgments  . . . . . . . . . . . . . . . . . . . . . . . 11
+   8.  Normative References . . . . . . . . . . . . . . . . . . . . . 11
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Daboo                       Standards Track                     [Page 2]
+
+RFC 5689               Extended MKCOL for WebDAV          September 2009
+
+
+1.  Introduction
+
+   WebDAV [RFC4918] defines the HTTP [RFC2616] method MKCOL.  This
+   method is used to create WebDAV collections on the server.  However,
+   several WebDAV-based specifications (e.g., CalDAV [RFC4791]) define
+   "special" collections -- ones that are identified by additional
+   values in the DAV:resourcetype property assigned to the collection
+   resource or by other means.  These "special" collections are created
+   by new methods (e.g., MKCALENDAR).  The addition of a new MKxxx
+   method for each new "special" collection adds to server complexity
+   and is detrimental to overall reliability due to the need to make
+   sure intermediaries are aware of these methods.
+
+   This specification defines an extension to the WebDAV MKCOL method
+   that adds a request body allowing a client to specify WebDAV
+   properties to be set on the newly created collection or resource.  In
+   particular, the DAV:resourcetype property can be used to create a
+   "special" collection; alternatively, other properties can be used to
+   create a "special" resource.  This avoids the need to invent new
+   MKxxx methods.
+
+2.  Conventions Used in This Document
+
+   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
+   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
+   document are to be interpreted as described in [RFC2119].
+
+   This document uses XML DTD fragments (Section 3.2 of
+   [W3C.REC-xml-20081126]) as a purely notational convention.  WebDAV
+   request and response bodies cannot be validated by a DTD due to the
+   specific extensibility rules defined in Section 17 of [RFC4918] and
+   due to the fact that all XML elements defined by this specification
+   use the XML namespace name "DAV:".  In particular:
+
+   1.  Element names use the "DAV:" namespace.
+
+   2.  Element ordering is irrelevant unless explicitly stated.
+
+   3.  Extension elements (elements not already defined as valid child
+       elements) may be added anywhere, except when explicitly stated
+       otherwise.
+
+   4.  Extension attributes (attributes not already defined as valid for
+       this element) may be added anywhere, except when explicitly
+       stated otherwise.
+
+
+
+
+
+
+Daboo                       Standards Track                     [Page 3]
+
+RFC 5689               Extended MKCOL for WebDAV          September 2009
+
+
+   When an XML element type in the "DAV:" namespace is referenced in
+   this document outside of the context of an XML fragment, the string
+   "DAV:" will be prefixed to the element type.
+
+   This document inherits, and sometimes extends, DTD productions from
+   Section 14 of [RFC4918].
+
+3.  WebDAV Extended MKCOL
+
+   The WebDAV MKCOL request is extended to allow the inclusion of a
+   request body.  The request body is an XML document containing a
+   single DAV:mkcol XML element as the root element.  The Content-Type
+   request header MUST be set appropriately for an XML body (e.g., set
+   to "text/xml" or "application/xml").  XML-typed bodies for an MKCOL
+   request that do not have DAV:mkcol as the root element are reserved
+   for future usage.
+
+   One or more DAV:set XML elements may be included in the DAV:mkcol XML
+   element to allow setting properties on the collection as it is
+   created.  In particular, to create a collection of a particular type,
+   the DAV:resourcetype XML element MUST be included in a DAV:set XML
+   element and MUST specify the expected resource type elements for the
+   new resource, which MUST include the DAV:collection element that
+   needs to be present for any WebDAV collection.
+
+   As per the PROPPATCH method (Section 9.2 of [RFC4918]), servers MUST
+   process any DAV:set instructions in document order (an exception to
+   the normal rule that ordering is irrelevant).  If any one instruction
+   fails to execute successfully, all instructions MUST fail (i.e.,
+   either all succeed or all fail).  Thus, if any error occurs during
+   processing, all executed instructions MUST be undone and a proper
+   error result returned.  Failure to set a property value on the
+   collection MUST result in a failure of the overall MKCOL request --
+   i.e., the collection is not created.
+
+   The response to an extended MKCOL request MUST be an XML document
+   containing a single DAV:mkcol-response XML element, which MUST
+   contain DAV:propstat XML elements with the status of each property
+   when the request fails due to a failure to set one or more of the
+   properties specified in the request body.  The server MAY return a
+   response body in the case where the request is successful, indicating
+   success for setting each property specified in the request body.
+   When an empty response body is returned with a success request status
+   code, the client can assume that all properties were set.
+
+   In all other respects, the behavior of the extended MKCOL request
+   follows that of the standard MKCOL request.
+
+
+
+
+Daboo                       Standards Track                     [Page 4]
+
+RFC 5689               Extended MKCOL for WebDAV          September 2009
+
+
+3.1.  Extended MKCOL Support
+
+   A server supporting the features described in this document MUST
+   include "extended-mkcol" as a field in the DAV response header from
+   an OPTIONS request on any URI that supports use of the extended MKCOL
+   method.
+
+3.1.1.  Example: Using OPTIONS for the Discovery of Support for Extended
+        MKCOL
+
+   >> Request <<
+
+   OPTIONS /addressbooks/users/ HTTP/1.1
+   Host: addressbook.example.com
+
+   >> Response <<
+
+   HTTP/1.1 200 OK
+   Allow: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, COPY, MOVE
+   Allow: MKCOL, PROPFIND, PROPPATCH, LOCK, UNLOCK, REPORT, ACL
+   DAV: 1, 2, 3, access-control, extended-mkcol
+   Date: Sat, 11 Nov 2006 09:32:12 GMT
+   Content-Length: 0
+
+3.2.  Status Codes
+
+   As per Section 9.3.1 of [RFC4918].
+
+3.3.  Additional Precondition for Extended MKCOL
+
+   WebDAV ([RFC4918], Section 16) defines preconditions and
+   postconditions for request behavior.  This specification adds the
+   following precondition for the extended MKCOL request.
+
+   Name:  valid-resourcetype
+
+   Namespace:  DAV:
+
+   Use with:  Typically 403 (Forbidden)
+
+   Purpose:  (precondition) -- The server MUST support the specified
+      resourcetype value for the specified collection.
+
+
+
+
+
+
+
+
+
+Daboo                       Standards Track                     [Page 5]
+
+RFC 5689               Extended MKCOL for WebDAV          September 2009
+
+
+3.4.  Example: Successful Extended MKCOL Request
+
+   This example shows how the extended MKCOL request is used to create a
+   collection of a fictitious type "special-resource".  The response
+   body is empty as the request completed successfully.
+
+   >> Request <<
+
+   MKCOL /home/special/ HTTP/1.1
+   Host: special.example.com
+   Content-Type: application/xml; charset="utf-8"
+   Content-Length: xxxx
+
+   <?xml version="1.0" encoding="utf-8" ?>
+   <D:mkcol xmlns:D="DAV:"
+                 xmlns:E="http://example.com/ns/">
+     <D:set>
+       <D:prop>
+         <D:resourcetype>
+           <D:collection/>
+           <E:special-resource/>
+         </D:resourcetype>
+         <D:displayname>Special Resource</D:displayname>
+       </D:prop>
+     </D:set>
+   </D:mkcol>
+
+   >> Response <<
+
+   HTTP/1.1 201 Created
+   Cache-Control: no-cache
+   Date: Sat, 11 Nov 2006 09:32:12 GMT
+
+3.5.  Example: Unsuccessful Extended MKCOL Request
+
+   This example shows an attempt to use the extended MKCOL request to
+   create a collection of a fictitious type "special-resource", which is
+   not actually supported by the server.  The response body shows that
+   an error occurred specifically with the DAV:resourcetype property.
+
+
+
+
+
+
+
+
+
+
+
+
+Daboo                       Standards Track                     [Page 6]
+
+RFC 5689               Extended MKCOL for WebDAV          September 2009
+
+
+   >> Request <<
+
+   MKCOL /home/special/ HTTP/1.1
+   Host: special.example.com
+   Content-Type: application/xml; charset="utf-8"
+   Content-Length: xxxx
+
+   <?xml version="1.0" encoding="utf-8" ?>
+   <D:mkcol xmlns:D="DAV:"
+                 xmlns:E="http://example.com/ns/">
+     <D:set>
+       <D:prop>
+         <D:resourcetype>
+           <D:collection/>
+           <E:special-resource/>
+         </D:resourcetype>
+         <D:displayname>Special Resource</D:displayname>
+       </D:prop>
+     </D:set>
+   </D:mkcol>
+
+   >> Response <<
+
+   HTTP/1.1 403 Forbidden
+   Cache-Control: no-cache
+   Date: Sat, 11 Nov 2006 09:32:12 GMT
+   Content-Type: application/xml; charset="utf-8"
+   Content-Length: xxxx
+
+   <?xml version="1.0" encoding="utf-8" ?>
+   <D:mkcol-response xmlns:D="DAV:">
+     <D:propstat>
+       <D:prop>
+         <D:resourcetype/>
+       </D:prop>
+       <D:status>HTTP/1.1 403 Forbidden</D:status>
+       <D:error><D:valid-resourcetype /></D:error>
+       <D:responsedescription>Resource type is not
+       supported by this server</D:responsedescription>
+     </D:propstat>
+     <D:propstat>
+       <D:prop>
+         <D:displayname/>
+       </D:prop>
+       <D:status>HTTP/1.1 424 Failed Dependency</D:status>
+     </D:propstat>
+   </D:mkcol-response>
+
+
+
+
+Daboo                       Standards Track                     [Page 7]
+
+RFC 5689               Extended MKCOL for WebDAV          September 2009
+
+
+4.  Using Extended MKCOL as an Alternative for MKxxx Methods
+
+   One of the goals of this extension is to eliminate the need for other
+   extensions to define their own variant of MKCOL to create the special
+   collections they need.  This extension can be used as an alternative
+   to existing MKxxx methods in other extensions as detailed below.  If
+   a server supports this extension and the other extension listed, then
+   the server MUST support use of the extended MKCOL method to achieve
+   the same result as the MKxxx method of the other extension.
+
+4.1.  MKCALENDAR Alternative
+
+   CalDAV defines the MKCALENDAR method to create a calendar collection
+   as well as to set properties during creation (Section 5.3.1 of
+   [RFC4791]).
+
+   The extended MKCOL method can be used instead by specifying both DAV:
+   collection and CALDAV:calendar-collection XML elements in the DAV:
+   resourcetype property, set during the extended MKCOL request.
+
+4.1.1.  Example: Using MKCOL Instead of MKCALENDAR
+
+   The first example below shows an MKCALENDAR request containing a
+   CALDAV:mkcalendar XML element in the request body and returning a
+   CALDAV:mkcalendar-response XML element in the response body.
+
+   >> MKCALENDAR Request <<
+
+   MKCALENDAR /home/lisa/calendars/events/ HTTP/1.1
+   Host: calendar.example.com
+   Content-Type: application/xml; charset="utf-8"
+   Content-Length: xxxx
+
+   <?xml version="1.0" encoding="utf-8" ?>
+   <C:mkcalendar xmlns:D="DAV:"
+                 xmlns:C="urn:ietf:params:xml:ns:caldav">
+     <D:set>
+       <D:prop>
+         <D:displayname>Lisa's Events</D:displayname>
+       </D:prop>
+     </D:set>
+   </C:mkcalendar>
+
+
+
+
+
+
+
+
+
+Daboo                       Standards Track                     [Page 8]
+
+RFC 5689               Extended MKCOL for WebDAV          September 2009
+
+
+   >> MKCALENDAR Response <<
+
+   HTTP/1.1 201 Created
+   Cache-Control: no-cache
+   Date: Sat, 11 Nov 2006 09:32:12 GMT
+   Content-Type: application/xml; charset="utf-8"
+   Content-Length: xxxx
+
+   <?xml version="1.0" encoding="utf-8" ?>
+   <C:mkcalendar-response xmlns:D="DAV:"
+                 xmlns:C="urn:ietf:params:xml:ns:caldav">
+     <D:propstat>
+       <D:prop>
+         <D:displayname/>
+       </D:prop>
+       <D:status>HTTP/1.1 200 OK</D:status>
+     </D:propstat>
+   </C:mkcalendar-response>
+
+   The second example shows the equivalent extended MKCOL request with
+   the same request and response XML elements.
+
+   >> MKCOL Request <<
+
+   MKCOL /home/lisa/calendars/events/ HTTP/1.1
+   Host: calendar.example.com
+   Content-Type: application/xml; charset="utf-8"
+   Content-Length: xxxx
+
+   <?xml version="1.0" encoding="utf-8" ?>
+   <D:mkcol xmlns:D="DAV:"
+                 xmlns:C="urn:ietf:params:xml:ns:caldav">
+     <D:set>
+       <D:prop>
+         <D:resourcetype>
+           <D:collection/>
+           <C:calendar/>
+         </D:resourcetype>
+         <D:displayname>Lisa's Events</D:displayname>
+       </D:prop>
+     </D:set>
+   </D:mkcol>
+
+
+
+
+
+
+
+
+
+Daboo                       Standards Track                     [Page 9]
+
+RFC 5689               Extended MKCOL for WebDAV          September 2009
+
+
+   >> MKCOL Response <<
+
+   HTTP/1.1 201 Created
+   Cache-Control: no-cache
+   Date: Sat, 11 Nov 2006 09:32:12 GMT
+   Content-Type: application/xml; charset="utf-8"
+   Content-Length: xxxx
+
+   <?xml version="1.0" encoding="utf-8" ?>
+   <D:mkcol-response xmlns:D="DAV:"
+                 xmlns:C="urn:ietf:params:xml:ns:caldav">
+     <D:propstat>
+       <D:prop>
+         <D:resourcetype/>
+         <D:displayname/>
+       </D:prop>
+       <D:status>HTTP/1.1 200 OK</D:status>
+     </D:propstat>
+   </D:mkcol-response>
+
+5.  XML Element Definitions
+
+5.1.  mkcol XML Element
+
+   Name:  mkcol
+
+   Namespace:  DAV:
+
+   Purpose:  Used in a request to specify properties to be set in an
+      extended MKCOL request, as well as any additional information
+      needed when creating the resource.
+
+   Description:  This XML element is a container for the information
+      required to modify the properties on a collection resource as it
+      is created in an extended MKCOL request.
+
+   Definition:
+
+       <!ELEMENT mkcol (set+)>
+
+5.2.  mkcol-response XML Element
+
+   Name:  mkcol-response
+
+   Namespace:  DAV:
+
+
+
+
+
+
+Daboo                       Standards Track                    [Page 10]
+
+RFC 5689               Extended MKCOL for WebDAV          September 2009
+
+
+   Purpose:  Used in a response to indicate the status of properties
+      that were set or failed to be set during an extended MKCOL
+      request.
+
+   Description:  This XML element is a container for the information
+      returned about a resource that has been created in an extended
+      MKCOL request.
+
+   Definition:
+
+       <!ELEMENT mkcol-response (propstat+)>
+
+6.  Security Considerations
+
+   This extension does not introduce any new security concerns beyond
+   those already described in HTTP [RFC2616] and WebDAV [RFC4918].
+
+7.  Acknowledgments
+
+   Thanks to Bernard Desruisseaux, Mike Douglass, Alexey Melnikov,
+   Julian Reschke, and Simon Vaillancourt.
+
+
+8.  Normative References
+
+   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
+              Requirement Levels", BCP 14, RFC 2119, March 1997.
+
+   [RFC2616]  Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
+              Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext
+              Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.
+
+   [RFC4791]  Daboo, C., Desruisseaux, B., and L. Dusseault,
+              "Calendaring Extensions to WebDAV (CalDAV)", RFC 4791,
+              March 2007.
+
+   [RFC4918]  Dusseault, L., "HTTP Extensions for Web Distributed
+              Authoring and Versioning (WebDAV)", RFC 4918, June 2007.
+
+   [W3C.REC-xml-20081126]
+              Maler, E., Yergeau, F., Paoli, J., Bray, T., and C.
+              Sperberg-McQueen, "Extensible Markup Language (XML) 1.0
+              (Fifth Edition)", World Wide Web Consortium
+              Recommendation REC-xml-20081126, November 2008,
+              <http://www.w3.org/TR/2008/REC-xml-20081126>.
+
+
+
+
+
+
+Daboo                       Standards Track                    [Page 11]
+
+RFC 5689               Extended MKCOL for WebDAV          September 2009
+
+
+Author's Address
+
+   Cyrus Daboo
+   Apple Inc.
+   1 Infinite Loop
+   Cupertino, CA  95014
+   USA
+
+   EMail: cyrus at daboo.name
+   URI:   http://www.apple.com/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Daboo                       Standards Track                    [Page 12]
+

Deleted: CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.application.app.patch
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.application.app.patch	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.application.app.patch	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,39 +0,0 @@
-Index: twisted/application/app.py
-===================================================================
---- twisted/application/app.py	(revision 26969)
-+++ twisted/application/app.py	(working copy)
-@@ -241,7 +241,11 @@
-         @param application: The application on which to check for an
-             L{ILogObserver}.
-         """
--        observer = application.getComponent(ILogObserver, None)
-+        
-+        if application:
-+            observer = application.getComponent(ILogObserver, None)
-+        else:
-+            observer = None
- 
-         if observer is None:
-             observer = self._getLogObserver()
-@@ -408,9 +412,7 @@
-         Run the application.
-         """
-         self.preApplication()
--        self.application = self.createOrGetApplication()
- 
--
-         getLogObserverLegacy = getattr(self, 'getLogObserver', None)
-         if getLogObserverLegacy is not None:
-             warnings.warn("Specifying a log observer with getLogObserver is "
-@@ -418,8 +420,10 @@
-                           category=DeprecationWarning)
-             self.startLogging(self.getLogObserver())
-         else:
--            self.logger.start(self.application)
-+            self.logger.start(None)
- 
-+        self.application = self.createOrGetApplication()
-+
-         self.postApplication()
-         self.logger.stop()
- 

Deleted: CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.mail.imap4.patch
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.mail.imap4.patch	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.mail.imap4.patch	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,22 +0,0 @@
-Index: twisted/mail/imap4.py
-===================================================================
---- twisted/mail/imap4.py	(revision 26969)
-+++ twisted/mail/imap4.py	(working copy)
-@@ -333,7 +333,7 @@
- 
- 
- class Command:
--    _1_RESPONSES = ('CAPABILITY', 'FLAGS', 'LIST', 'LSUB', 'STATUS', 'SEARCH', 'NAMESPACE')
-+    _1_RESPONSES = ('CAPABILITY', 'FLAGS', 'LIST', 'LSUB', 'STATUS', 'SEARCH', 'NAMESPACE', 'BYE')
-     _2_RESPONSES = ('EXISTS', 'EXPUNGE', 'FETCH', 'RECENT')
-     _OK_RESPONSES = ('UIDVALIDITY', 'UNSEEN', 'READ-WRITE', 'READ-ONLY', 'UIDNEXT', 'PERMANENTFLAGS')
-     defer = None
-@@ -4159,7 +4159,7 @@
-         return "PLAIN"
- 
-     def challengeResponse(self, secret, chal):
--        return '%s\0%s\0' % (self.user, secret)
-+        return '\0%s\0%s' % (self.user, secret)
- 
- 
- class MailboxException(IMAP4Exception): pass

Deleted: CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.python.util.patch
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.python.util.patch	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.python.util.patch	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,35 +0,0 @@
-Index: twisted/python/util.py
-===================================================================
---- twisted/python/util.py	(revision 26969)
-+++ twisted/python/util.py	(working copy)
-@@ -569,9 +569,29 @@
-     L2.sort()
-     return [e[2] for e in L2]
- 
--if pwd is None or grp is None or setgroups is None or getgroups is None:
-+
-+try:
-+    from ctypes import c_int, c_char_p, cdll
-+    from ctypes.util import find_library
-+    hasCtypes = True
-+except ImportError:
-+    hasCtypes = False
-+
-+if sys.platform == "darwin" and hasCtypes:
-+    import pwd
-+    libc = cdll.LoadLibrary(find_library("libc"))
-     def initgroups(uid, primaryGid):
-         """
-+        Call initgroups with ctypes.
-+        """
-+        c_gid = c_int(primaryGid)
-+        username = pwd.getpwuid(uid)[0]
-+        c_username = c_char_p(username)
-+        return libc.initgroups(c_username, c_gid)
-+
-+elif pwd is None or grp is None or setgroups is None or getgroups is None:
-+    def initgroups(uid, primaryGid):
-+        """
-         Do nothing.
- 
-         Underlying platform support require to manipulate groups is missing.

Deleted: CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.web2.auth.digest.patch
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.web2.auth.digest.patch	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.web2.auth.digest.patch	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,82 +0,0 @@
-Index: twisted/web2/auth/digest.py
-===================================================================
---- twisted/web2/auth/digest.py	(revision 26969)
-+++ twisted/web2/auth/digest.py	(working copy)
-@@ -138,11 +138,15 @@
-     implements(credentials.IUsernameHashedPassword,
-                IUsernameDigestHash)
- 
--    def __init__(self, username, method, realm, fields):
-+    def __init__(self, username, method, realm, fields, originalMethod=None):
-         self.username = username
-         self.method = method
-         self.realm = realm
-         self.fields = fields
-+        if originalMethod:
-+            self.originalMethod = originalMethod
-+        else:
-+            self.originalMethod = method
- 
-     def checkPassword(self, password):
-         response = self.fields.get('response')
-@@ -155,11 +159,23 @@
- 
-         expected = calcResponse(
-             calcHA1(algo, self.username, self.realm, password, nonce, cnonce),
--            algo, nonce, nc, cnonce, qop, self.method, uri, None
-+            algo, nonce, nc, cnonce, qop, self.originalMethod, uri, None
-         )
- 
--        return expected == response
-+        if expected == response:
-+            return True
- 
-+        # IE7 sends cnonce and nc values, but auth fails if they are used.
-+        # So try again without them...
-+        # They can be omitted for backwards compatibility [RFC 2069].
-+        if nc is not None or cnonce is not None:
-+            expected = calcResponse(
-+                calcHA1(algo, self.username, self.realm, password, nonce, cnonce),
-+                algo, nonce, None, None, qop, self.originalMethod, uri, None
-+            )
-+            if expected == response:
-+                return True
-+
-     def checkHash(self, digestHash):
-         response = self.fields.get('response')
-         uri = self.fields.get('uri')
-@@ -171,7 +187,7 @@
- 
-         expected = calcResponse(
-             calcHA1(algo, None, None, None, nonce, cnonce, preHA1=digestHash),
--            algo, nonce, nc, cnonce, qop, self.method, uri, None
-+            algo, nonce, nc, cnonce, qop, self.originalMethod, uri, None
-         )
- 
-         return expected == response
-@@ -234,7 +250,7 @@
-         key = "%s,%s,%s" % (nonce, clientip, str(int(self._getTime())))
-         digest = md5(key + self.privateKey).hexdigest()
-         ekey = key.encode('base64')
--        return "%s-%s" % (digest, ekey.strip('\n'))
-+        return "%s-%s" % (digest, ekey.replace('\n', ''))
- 
-     def verifyOpaque(self, opaque, nonce, clientip):
-         """
-@@ -348,7 +364,13 @@
-                              auth.get('nonce'),
-                              request.remoteAddr.host):
- 
-+            if hasattr(request, "originalMethod"):
-+                originalMethod = request.originalMethod
-+            else:
-+                originalMethod = None
-+
-             return succeed(DigestedCredentials(username,
--                                       request.method,
--                                       self.realm,
--                                       auth))
-+                                               request.method,
-+                                               self.realm,
-+                                               auth,
-+                                               originalMethod))

Deleted: CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.web2.dav.method.report.patch
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.web2.dav.method.report.patch	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.web2.dav.method.report.patch	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,34 +0,0 @@
-Index: twisted/web2/dav/method/report.py
-===================================================================
---- twisted/web2/dav/method/report.py	(revision 26969)
-+++ twisted/web2/dav/method/report.py	(working copy)
-@@ -94,8 +94,9 @@
-     namespace = doc.root_element.namespace
-     name = doc.root_element.name
- 
-+    ok = string.ascii_letters + string.digits + "_"
-+
-     def to_method(s):
--        ok = string.ascii_letters + string.digits + "_"
-         out = []
-         for c in s:
-             if c in ok:
-@@ -105,10 +106,17 @@
-         return "report_" + "".join(out)
- 
-     if namespace:
--        method_name = to_method(namespace + "_" + name)
-+        method_name = to_method("_".join((namespace, name)))
-+
-+        if namespace == davxml.dav_namespace:
-+            request.submethod = "DAV:" + name
-+        else:
-+            request.submethod = "{%s}%s" % (namespace, name)
-     else:
-         method_name = to_method(name)
- 
-+        request.submethod = name
-+
-     try:
-         method = getattr(self, method_name)
-         

Deleted: CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.web2.dav.resource.patch
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.web2.dav.resource.patch	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.web2.dav.resource.patch	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,101 +0,0 @@
-Index: twisted/web2/dav/resource.py
-===================================================================
---- twisted/web2/dav/resource.py	(revision 26969)
-+++ twisted/web2/dav/resource.py	(working copy)
-@@ -49,12 +49,14 @@
- if not hasattr(__builtin__, "frozenset"):
-     import sets.ImmutableSet as frozenset
- 
-+import urllib
-+
- from zope.interface import implements
-+from twisted.cred.error import LoginFailed, UnauthorizedLogin
- from twisted.python import log
- from twisted.python.failure import Failure
--from twisted.internet.defer import Deferred, maybeDeferred, succeed
-+from twisted.internet.defer import Deferred, maybeDeferred, succeed, inlineCallbacks
- from twisted.internet.defer import waitForDeferred, deferredGenerator
--from twisted.cred.error import LoginFailed, UnauthorizedLogin
- from twisted.internet import reactor
- from twisted.web2 import responsecode
- from twisted.web2.http import HTTPError, RedirectResponse, StatusResponse
-@@ -642,41 +644,43 @@
-     # Authentication
-     ##
- 
-+    @inlineCallbacks
-     def authorize(self, request, privileges, recurse=False):
-         """
-         See L{IDAVResource.authorize}.
-         """
--        def onAuth(result):
--            def onErrors(failure):
--                failure.trap(AccessDeniedError)
--                
--                # If we were unauthorized to start with (no Authorization header from client) then
--                # we should return an unauthorized response instead to force the client to login if it can
--                if request.authnUser == davxml.Principal(davxml.Unauthenticated()):
--                    d = UnauthorizedResponse.makeResponse(request.credentialFactories,
--                                                                 request.remoteAddr)
--                    def _fail(response):
--                        return Failure(HTTPError(response))
--                    return d.addCallback(_fail)
--                else:
--                    response = NeedPrivilegesResponse(request.uri,
--                                                      failure.value.errors)
--                #
--                # We're not adding the headers here because this response
--                # class is supposed to be a FORBIDDEN status code and
--                # "Authorization will not help" according to RFC2616
--                #
--                raise HTTPError(response)
- 
--            d = self.checkPrivileges(request, privileges, recurse)
--            d.addErrback(onErrors)
--            return d
-+        try:
-+            yield self.authenticate(request)
-+        except (UnauthorizedLogin, LoginFailed), e:
-+            log.msg("Authentication failed: %s" % (e,))
-+            response = (yield UnauthorizedResponse.makeResponse(
-+                request.credentialFactories,
-+                request.remoteAddr
-+            ))
-+            raise HTTPError(response)
- 
--        d = maybeDeferred(self.authenticate, request)
--        d.addCallback(onAuth)
--        return d
-+        try:
-+            yield self.checkPrivileges(request, privileges, recurse)
-+        except AccessDeniedError, e:
-+            # If we were unauthenticated to start with (no Authorization header from client) then
-+            # we should return an unauthorized response instead to force the client to login if it can
-+            if request.authnUser == davxml.Principal(davxml.Unauthenticated()):
-+                response = (yield UnauthorizedResponse.makeResponse(
-+                    request.credentialFactories,
-+                    request.remoteAddr
-+                ))
-+            else:
-+                response = NeedPrivilegesResponse(request.uri, e.errors)
-+            #
-+            # We're not adding the headers here because this response
-+            # class is supposed to be a FORBIDDEN status code and
-+            # "Authorization will not help" according to RFC2616
-+            #
-+            raise HTTPError(response)
- 
- 
-+
-     def authenticate(self, request):
-         if not (
-             hasattr(request, 'portal') and 
-@@ -1880,7 +1884,7 @@
-         # If this is a collection and the URI doesn't end in "/", redirect.
-         #
-         if self.isCollection() and request.path[-1:] != "/":
--            return RedirectResponse(request.unparseURL(path=request.path+'/'))
-+            return RedirectResponse(request.unparseURL(path=urllib.quote(urllib.unquote(request.path), safe=':/')+'/'))
- 
-         def setHeaders(response):
-             response = IResponse(response)

Deleted: CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.web2.error.patch
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.web2.error.patch	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.web2.error.patch	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,13 +0,0 @@
-Index: twisted/web2/error.py
-===================================================================
---- twisted/web2/error.py	(revision 26969)
-+++ twisted/web2/error.py	(working copy)
-@@ -92,7 +92,7 @@
-             "<body><h1>%s</h1>%s</body></html>") % (
-         response.code, title, title, message)
-     
--    response.headers.setHeader("content-type", http_headers.MimeType('text', 'html'))
-+    response.headers.setHeader("content-type", http_headers.MimeType('text', 'html', {'charset':'utf-8'}))
-     response.stream = stream.MemoryStream(body)
-     
-     return response

Deleted: CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.web2.server.patch
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.web2.server.patch	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/lib-patches/Twisted/twisted.web2.server.patch	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,30 +0,0 @@
-Index: twisted/web2/server.py
-===================================================================
---- twisted/web2/server.py	(revision 26969)
-+++ twisted/web2/server.py	(working copy)
-@@ -26,7 +26,7 @@
- from twisted.web2 import error
- from twisted.web2.dav.util import joinURL
- 
--from twisted.web2 import version as web2_version
-+from twisted.web2 import __version__ as web2_version
- from twisted import __version__ as twisted_version
- 
- VERSION = "Twisted/%s TwistedWeb/%s" % (twisted_version, web2_version)
-@@ -332,6 +332,16 @@
-             response = http.Response(responsecode.OK)
-             response.headers.setHeader('allow', ('GET', 'HEAD', 'OPTIONS', 'TRACE'))
-             return response
-+
-+        elif self.method == "POST":
-+            # Allow other methods to tunnel through using POST and a request header.
-+            # See http://code.google.com/apis/gdata/docs/2.0/basics.html
-+            if self.headers.hasHeader("X-HTTP-Method-Override"):
-+                intendedMethod = self.headers.getRawHeaders("X-HTTP-Method-Override")[0];
-+                if intendedMethod:
-+                    self.originalMethod = self.method
-+                    self.method = intendedMethod
-+
-         # This is where CONNECT would go if we wanted it
-         return None
- 

Modified: CalendarServer/branches/users/cdaboo/partition-4464/memcacheclient.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/memcacheclient.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/memcacheclient.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1280,6 +1280,9 @@
         Is not a string (Raises MemcachedKeyError)
         Is None (Raises MemcachedKeyError)
     """
+
+    return # Short-circuit this expensive method
+
     if type(key) == types.TupleType: key = key[1]
     if not key:
         raise Client.MemcachedKeyNoneError, ("Key is None")

Modified: CalendarServer/branches/users/cdaboo/partition-4464/run
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/run	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/run	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# -*- sh-basic-offset: 2 -*-
 
 ##
 # Copyright (c) 2005-2009 Apple Inc. All rights reserved.
@@ -29,43 +30,22 @@
 # executable to start the server.
 ##
 
-set -e
-set -u
+set -e;
+set -u;
 
 wd="$(cd "$(dirname "$0")" && pwd)";
 
-##
-# Command line
-##
+. support/build.sh;
 
-      verbose="";
-       do_get="true";
-     do_setup="true";
-       do_run="true";
-  force_setup="false";
-disable_setup="false";
-   print_path="false";
-      install="";
-    daemonize="-X";
-         kill="false";
-      restart="false";
-  plugin_name="caldav";
- service_type="Combined";
-     read_key="";
-      profile="";
-      reactor="";
 
-if [ -z "${CALENDARSERVER_CACHE_DEPS-}" ]; then
-  cache_deps="${wd}/.dependencies";
-else
-  cache_deps="${CALENDARSERVER_CACHE_DEPS}";
-fi;
-
-usage ()
-{
+# Echo the usage for the main 'run' script, then exit with an error.
+usage () {
   program="$(basename "$0")";
 
-  if [ "${1--}" != "-" ]; then echo "$@"; echo; fi;
+  if [ "${1--}" != "-" ]; then
+    echo "$@";
+    echo;
+  fi;
 
   echo "Usage: ${program} [-hvgsfnpdkrR] [-K key] [-iI dst] [-t type] [-S statsdirectory] [-P plugin]";
   echo "Options:";
@@ -76,195 +56,57 @@
   echo "	-f  Force setup to run";
   echo "	-n  Do not run setup";
   echo "	-p  Print PYTHONPATH value for server and exit";
-  echo "        -d  Run caldavd as a daemon";
-  echo "        -k  Stop caldavd";
-  echo "        -r  Restart caldavd";
-  echo "        -K  Print value of configuration key and exit";
-  echo "        -i  Perform a system install into dst; implies -s";
-  echo "        -I  Perform a home install into dst; implies -s";
-  echo "        -t  Select the server process type (Master, Slave or Combined) [${service_type}]";
-  echo "        -S  Write a pstats object for each process to the given directory when the server is stopped.";
+  echo "	-d  Run caldavd as a daemon";
+  echo "	-k  Stop caldavd";
+  echo "	-r  Restart caldavd";
+  echo "	-K  Print value of configuration key and exit";
+  echo "	-i  Perform a system install into dst; implies -s";
+  echo "	-I  Perform a home install into dst; implies -s";
+  echo "	-t  Select the server process type (Master, Slave or Combined) [${service_type}]";
+  echo "	-S  Write a pstats object for each process to the given directory when the server is stopped.";
   echo "	-P  Select the twistd plugin name [${plugin_name}]";
-  echo "        -R  Twisted Reactor plugin to execute [${reactor}]";
+  echo "	-R  Twisted Reactor plugin to execute [${reactor}]";
 
-  if [ "${1-}" == "-" ]; then return 0; fi;
+  if [ "${1-}" == "-" ]; then
+    return 0;
+  fi;
   exit 64;
 }
 
-while getopts 'hvgsfnpdkrK:i:I:t:S:P:R:' option; do
-  case "$option" in
-    '?') usage; ;;
-    'h') usage -; exit 0; ;;
-    'v')       verbose="-v"; ;;
-    'f')   force_setup="true"; ;;
-    'k')          kill="true"; ;;
-    'r')       restart="true"; ;;
-    'd')     daemonize=""; ;;
-    'P')   plugin_name="${OPTARG}"; ;;
-    'R')       reactor="-R ${OPTARG}"; ;;
-    't')  service_type="${OPTARG}"; ;;
-    'K')      read_key="${OPTARG}"; ;;
-    'S')       profile="--profiler cprofile -p ${OPTARG}"; ;;
-    'g') do_get="true" ; do_setup="false"; do_run="false"; ;;
-    's') do_get="true" ; do_setup="true" ; do_run="false"; ;;
-    'p') do_get="false"; do_setup="false"; do_run="false"; print_path="true"; ;;
-    'i') do_get="true" ; do_setup="true" ; do_run="false"; install="${OPTARG}"; install_flag="--root="; ;;
-    'I') do_get="true" ; do_setup="true" ; do_run="false"; install="${wd}/build/dst"; install_flag="--root="; install_home="${OPTARG}"; ;;
-  esac;
-done;
-shift $((${OPTIND} - 1));
-
-if [ $# != 0 ]; then usage "Unrecognized arguments:" "$@"; fi;
-
-##
-# Set up paths
-##
-
-py_version ()
-{
-  local python="$1"; shift;
-  echo "$("${python}" -c "from distutils.sysconfig import get_python_version; print get_python_version()")";
-}
-
-try_python ()
-{
-  local python="$1"; shift;
-
-  if [ -z "${python}" ]; then return 1; fi;
-
-  if ! type "${python}" > /dev/null 2>&1; then return 1; fi;
-  local py_version="$(py_version "${python}")";
-  if [ "${py_version/./}" -lt "25" ]; then return 1; fi;
-
-  return 0;
-}
-
-for v in "" "2.6" "2.5"; do
-  for p in								\
-    "${PYTHON:=}"							\
-    "python${v}"							\
-    "/usr/local/bin/python${v}"						\
-    "/usr/local/python/bin/python${v}"					\
-    "/usr/local/python${v}/bin/python${v}"				\
-    "/opt/bin/python${v}"						\
-    "/opt/python/bin/python${v}"					\
-    "/opt/python${v}/bin/python${v}"					\
-    "/Library/Frameworks/Python.framework/Versions/${v}/bin/python"	\
-    "/opt/local/bin/python${v}"						\
-    "/sw/bin/python${v}"						\
-    ;
-  do
-    if try_python "${p}"; then python="${p}"; break; fi;
+# Parse command-line options to set up state which controls the behavior of the
+# functions in build.sh.
+parse_options () {
+  while getopts 'hvgsfnpdkrK:i:I:t:S:P:R:' option; do
+    case "$option" in
+      '?') usage; ;;
+      'h') usage -; exit 0; ;;
+      'v')       verbose="-v"; ;;
+      'f')   force_setup="true"; ;;
+      'k')          kill="true"; ;;
+      'r')       restart="true"; ;;
+      'd')     daemonize=""; ;;
+      'P')   plugin_name="${OPTARG}"; ;;
+      'R')       reactor="-R ${OPTARG}"; ;;
+      't')  service_type="${OPTARG}"; ;;
+      'K')      read_key="${OPTARG}"; ;;
+      'S')       profile="--profiler cprofile -p ${OPTARG}"; ;;
+      'g') do_get="true" ; do_setup="false"; do_run="false"; ;;
+      's') do_get="true" ; do_setup="true" ; do_run="false"; ;;
+      'p') do_get="false"; do_setup="false"; do_run="false"; print_path="true"; ;;
+      'i') do_get="true" ; do_setup="true" ; do_run="false"; install="${OPTARG}"; install_flag="--root="; ;;
+      'I') do_get="true" ; do_setup="true" ; do_run="false"; install="${wd}/build/dst"; install_flag="--root="; install_home="${OPTARG}"; ;;
+    esac;
   done;
-  if [ -n "${python:-}" ]; then break; fi;
-done;
-
-if [ -z "${python:-}" ]; then
-  echo "No suitable python found. Python 2.5 is required.";
-  exit 1;
-fi;
-
-if [ -z "${caldav:-}" ]; then
-  caldav="${wd}";
-fi;
-
-if [ -z "${caldavd_wrapper_command:-}" ]; then
-  if [ "$(uname -s)" == "Darwin" ] && [ "$(uname -r | cut -d . -f 1)" -ge 9 ]; then
-      caldavd_wrapper_command="launchctl bsexec /";
-  else
-      caldavd_wrapper_command="";
+  shift $((${OPTIND} - 1));
+  if [ $# != 0 ]; then
+    usage "Unrecognized arguments:" "$@";
   fi;
-fi;
-
-    top="$(cd "${caldav}/.." && pwd -L)"
-patches="${caldav}/lib-patches";
-twisted="${top}/Twisted";
-    dav="${twisted}/twisted/web2/dav"
-
-if [ -z "${config:-}" ]; then
-  config="${wd}/conf/caldavd-dev.plist";
-fi;
-
-conf_read_key ()
-{
-  local key="$1"; shift;
-
-  # FIXME: This only works for simple values (no arrays, dicts)
-  tr '\n' ' ' < "${config}"                                                 \
-    | xpath "/plist/dict/*[preceding-sibling::key[1]='${key}'" 2> /dev/null \
-    | sed -n 's|^<[^<][^<]*>\([^<]*\)</[^<][^<]*>.*$|\1|p';
 }
 
-if [ -n "${read_key}" ]; then
-    conf_read_key "${read_key}";
-    exit $?;
-fi;
 
-if "${kill}" || "${restart}"; then
-    pidfile="$(conf_read_key "PIDFile")";
-    if [ ! -r "${pidfile}" ]; then
-        echo "Unreadable PID file: ${pidfile}";
-        exit 1;
-    fi;
-    pid="$(cat "${pidfile}" | head -1)";
-    if [ -z "${pid}" ]; then
-        echo "No PID in PID file: ${pidfile}";
-        exit 1;
-    fi;
-    echo "Killing process ${pid}";
-    kill -TERM "${pid}";
-    if ! "${restart}"; then
-        exit 0;
-    fi;
-fi;
-
-if [ -z "${PYTHONPATH:-}" ]; then
-  user_python_path="";
-else
-  user_python_path=":${PYTHONPATH}";
-fi;
-
-       py_platform="$("${python}" -c "from distutils.util import get_platform; print get_platform()")";
-        py_version="$(py_version "${python}")";
-py_platform_libdir="lib.${py_platform}-${py_version}";
-
-if [ -n "${install}" ] && ! echo "${install}" | grep '^/' > /dev/null; then
-  install="$(pwd)/${install}";
-fi;
-
-svn_uri_base="$(svn info "${caldav}" --xml 2> /dev/null | sed -n 's|^.*<root>\(.*\)</root>.*$|\1|p')";
-
-if [ -z "${svn_uri_base}" ]; then
-  svn_uri_base="http://svn.calendarserver.org/repository/calendarserver";
-fi;
-
-export PYTHONPATH="${caldav}";
-
-# Find a command that can hash up a string for us
-if type -t openssl > /dev/null; then
-  hash="hash"; hash () { openssl dgst -md5; }
-elif type -t md5 > /dev/null; then
-  hash="md5";
-elif type -t md5sum > /dev/null; then
-  hash="md5sum";
-elif type -t cksum > /dev/null; then
-  hash="hash"; hash () { cksum | cut -f 1 -d " "; }
-elif type -t sum > /dev/null; then
-  hash="hash"; hash () { sum | cut -f 1 -d " "; }
-else
-  hash="";
-fi;
-
-##
-# Routines
-##
-
+# Actually run the server.  (Or, exit, if things aren't sufficiently set up in
+# order to do that.)
 run () {
-  if "${print_path}"; then
-    echo "${PYTHONPATH}";
-    exit 0;
-  fi;
-
   echo "";
   echo "Using ${python} as Python";
 
@@ -298,476 +140,71 @@
   fi;
 }
 
-apply_patches () {
-  local name="$1"; shift;
-  local path="$1"; shift;
 
-  if [ -d "${patches}/${name}" ]; then
-    echo "";
-    echo "Applying patches to ${name} in ${path}...";
+# The main-point of the 'run' script: parse all options, decide what to do,
+# then do it.
+run_main () {
+  parse_options "$@";
 
-    cd "${path}";
-    find "${patches}/${name}"                  \
-        -type f                                \
-        -name '*.patch'                        \
-        -print                                 \
-        -exec patch -p0 --forward -i '{}' ';';
-    cd /;
-
+  # If we've been asked to read a configuration key, just read it and exit.
+  if [ -n "${read_key}" ]; then
+    conf_read_key "${read_key}";
+    exit $?;
   fi;
 
-  echo ""
-  echo "Removing build directory ${path}/build..."
-  rm -rf "${path}/build";
-  echo "Removing pyc files from ${path}..."
-  find "${path}" -type f -name '*.pyc' -print0 | xargs -0 rm -f;
-}
-
-www_get () {
-  if ! "${do_get}"; then return 0; fi;
-
-  local name="$1"; shift;
-  local path="$1"; shift;
-  local  url="$1"; shift;
-
-  if "${force_setup}" || [ ! -d "${path}" ]; then
-    local ext="$(echo "${url}" | sed 's|^.*\.\([^.]*\)$|\1|')";
-
-    case "${ext}" in
-      gz|tgz) decompress="gzip -d -c"; ;;
-      bz2)    decompress="bzip2 -d -c"; ;;
-      tar)    decompress="cat"; ;;
-      *)
-        echo "Unknown extension: ${ext}";
-        exit 1;
-        ;;
-    esac;
-
-    echo "";
-
-    if [ -n "${cache_deps}" ] && [ -n "${hash}" ]; then
-      mkdir -p "${cache_deps}";
-
-      cache_file="${cache_deps}/${name}-$(echo "${url}" | "${hash}")-$(basename "${url}")";
-
-      if [ ! -f "${cache_file}" ]; then
-	echo "Downloading ${name}...";
-	curl -L "${url}" -o "${cache_file}";
-      fi;
-
-      echo "Unpacking ${name} from cache...";
-      get () { cat "${cache_file}"; }
-    else
-      echo "Downloading ${name}..."; 
-      get () { curl -L "${url}"; }
+  if "${kill}" || "${restart}"; then
+    pidfile="$(conf_read_key "PIDFile")";
+    if [ ! -r "${pidfile}" ]; then
+      echo "Unreadable PID file: ${pidfile}";
+      exit 1
     fi;
-
-    rm -rf "${path}";
-    cd "$(dirname "${path}")";
-    get | ${decompress} | tar -xvf -;
-    apply_patches "${name}" "${path}";
-    cd /;
-  fi;
-}
-
-svn_get () {
-  if ! "${do_get}"; then return 0; fi;
-
-  local     name="$1"; shift;
-  local     path="$1"; shift;
-  local      uri="$1"; shift;
-  local revision="$1"; shift;
-
-  if [ -d "${path}" ]; then
-    local wc_uri="$(svn info --xml "${path}" 2> /dev/null | sed -n 's|^.*<url>\(.*\)</url>.*$|\1|p')";
-
-    if "${force_setup}"; then
-      # Verify that we have a working copy checked out from the correct URI
-      if [ "${wc_uri}" != "${uri}" ]; then
-        echo "";
-        echo "Current working copy (${path}) is from the wrong URI: ${wc_uri} != ${uri}";
-        rm -rf "${path}";
-        svn_get "${name}" "${path}" "${uri}" "${revision}";
-        return $?;
-      fi;
-
-      echo "";
-
-      echo "Reverting ${name}...";
-      svn revert -R "${path}";
-
-      echo "Updating ${name}...";
-      svn update -r "${revision}" "${path}";
-
-      apply_patches "${name}" "${path}";
-    else
-      if ! "${print_path}"; then
-        # Verify that we have a working copy checked out from the correct URI
-        if [ "${wc_uri}" != "${uri}" ]; then
-          echo "";
-          echo "Current working copy (${path}) is from the wrong URI: ${wc_uri} != ${uri}";
-          echo "Performing repository switch for ${name}...";
-          svn switch -r "${revision}" "${uri}" "${path}";
-
-          apply_patches "${name}" "${path}";
-        else
-          local svnversion="$(svnversion "${path}")";
-          if [ "${svnversion%%[M:]*}" != "${revision}" ]; then
-            echo "";
-            echo "Updating ${name}...";
-            svn update -r "${revision}" "${path}";
-
-            apply_patches "${name}" "${path}";
-          fi;
-        fi;
-      fi;
+    pid="$(cat "${pidfile}" | head -1)";
+    if [ -z "${pid}" ]; then
+      echo "No PID in PID file: ${pidfile}";
+      exit 1;
     fi;
-  else
-    echo "";
-
-    checkout () {
-      echo "Checking out ${name}...";
-      svn checkout -r "${revision}" "${uri}@${revision}" "${path}";
-    }
-
-    if [ "${revision}" != "HEAD" ] && [ -n "${cache_deps}" ] && [ -n "${hash}" ]; then
-      local cache_file="${cache_deps}/${name}-$(echo "${uri}" | "${hash}")@r${revision}.tgz";
-
-      mkdir -p "${cache_deps}";
-
-      if [ -f "${cache_file}" ]; then
-	echo "Unpacking ${name} from cache...";
-	mkdir -p "${path}";
-	tar -C "${path}" -xvzf "${cache_file}";
-      else
-	checkout;
-	echo "Caching ${name}...";
-	tar -C "${path}" -cvzf "${cache_file}" .;
-      fi;
-    else
-      checkout;
+    echo "Killing process ${pid}";
+    kill -TERM "${pid}";
+    if ! "${restart}"; then
+      exit 0;
     fi;
-
-    apply_patches "${name}" "${path}";
   fi;
-}
 
-py_build () {
-    local     name="$1"; shift;
-    local     path="$1"; shift;
-    local optional="$1"; shift;
-
-    if "${do_setup}"; then
-      echo "";
-      echo "Building ${name}...";
-      cd "${path}";
-      if ! "${python}" ./setup.py -q build --build-lib "build/${py_platform_libdir}" "$@"; then
-          if "${optional}"; then
-              echo "WARNING: ${name} failed to build.";
-              echo "WARNING: ${name} is not required to run the server; continuing without it.";
-          else
-              return $?;
-          fi;
-      fi;
-      cd /;
-    fi;
-}
-
-py_install () {
-  local name="$1"; shift;
-  local path="$1"; shift;
-
-  if [ -n "${install}" ]; then
-    echo "";
-    echo "Installing ${name}...";
-    cd "${path}";
-    "${python}" ./setup.py install "${install_flag}${install}";
-    cd /;
+  # Prepare to set up PYTHONPATH et. al.
+  if [ -z "${PYTHONPATH:-}" ]; then
+    user_python_path="";
+  else
+    user_python_path=":${PYTHONPATH}";
   fi;
-}
 
-py_have_module () {
-    local module="$1"; shift;
+  export PYTHONPATH="${caldav}";
 
-    PYTHONPATH="" "${python}" -c "import ${module}" > /dev/null 2>&1;
-}
+  # About to do something for real; let's enumerate (and depending on options,
+  # possibly download and/or install) the dependencies.
+  dependencies;
 
-##
-# Download and set up dependancies
-##
-
-#
-# Zope Interface
-#
-
-if ! py_have_module zope.interface; then
-  zope="${top}/zope.interface-3.3.0";
-
-  www_get "Zope Interface" "${zope}" http://www.zope.org/Products/ZopeInterface/3.3.0/zope.interface-3.3.0.tar.gz;
-  py_build "Zope Interface" "${zope}" false;
-  py_install "Zope Interface" "${zope}";
-
-  export PYTHONPATH="${PYTHONPATH}:${zope}/build/${py_platform_libdir}";
-fi;
-
-#
-# PyXML
-#
-
-if ! py_have_module xml.dom.ext; then
-  xml="${top}/PyXML-0.8.4";
-
-  www_get "PyXML" "${xml}" http://internap.dl.sourceforge.net/sourceforge/pyxml/PyXML-0.8.4.tar.gz;
-  py_build "PyXML" "${xml}" false;
-  py_install "PyXML" "${xml}";
-
-  export PYTHONPATH="${PYTHONPATH}:${xml}/build/${py_platform_libdir}";
-fi;
-
-#
-# PyOpenSSL
-#
-
-if ! py_have_module OpenSSL; then
-  ssl="${top}/pyOpenSSL-0.7";
-
-  www_get "PyOpenSSL" "${ssl}" http://pypi.python.org/packages/source/p/pyOpenSSL/pyOpenSSL-0.7.tar.gz;
-  py_build "PyOpenSSL" "${ssl}" false;
-  py_install "PyOpenSSL" "${ssl}";
-
-  export PYTHONPATH="${PYTHONPATH}:${ssl}/build/${py_platform_libdir}";
-fi;
-
-#
-# PyKerberos
-#
-
-if type krb5-config > /dev/null; then
-  if ! py_have_module kerberos; then
-    kerberos="${top}/PyKerberos";
-
-    svn_get "PyKerberos" "${kerberos}" "${svn_uri_base}/PyKerberos/trunk" 4241;
-    py_build "PyKerberos" "${kerberos}" false; # FIXME: make optional
-    py_install "PyKerberos" "${kerberos}";
-
-    export PYTHONPATH="${PYTHONPATH}:${kerberos}/build/${py_platform_libdir}";
+  # Now that all the dependencies are set up, let's see if we're just being
+  # asked to print the path.
+  if "${print_path}"; then
+    echo "${PYTHONPATH}";
+    exit 0;
   fi;
-fi;
 
-#
-# PyOpenDirectory
-#
+  # If we're installing, install the calendar server itself.
+  py_install "Calendar Server" "${caldav}";
 
-if [ "$(uname -s)" == "Darwin" ]; then
-  if ! py_have_module opendirectory; then
-    opendirectory="${top}/PyOpenDirectory";
-
-    svn_get "PyOpenDirectory" "${opendirectory}" "${svn_uri_base}/PyOpenDirectory/trunk" 4106;
-    py_build "PyOpenDirectory" "${opendirectory}" false;
-    py_install "PyOpenDirectory" "${opendirectory}";
-
-    export PYTHONPATH="${PYTHONPATH}:${opendirectory}/build/${py_platform_libdir}";
+  if [ -n "${install_home:-}" ]; then
+    do_home_install;
   fi;
-fi;
 
-#
-# xattr
-#
+  # Finish setting up PYTHONPATH (put the user's original path at the *end* so
+  # that CalendarServer takes precedence).
 
-if ! py_have_module xattr; then
-  xattr="${top}/xattr";
+  export PYTHONPATH="${PYTHONPATH}${user_python_path}";
 
-  svn_get "xattr" "${xattr}" http://svn.red-bean.com/bob/xattr/releases/xattr-0.5 1013;
-  py_build "xattr" "${xattr}" false;
-  py_install "xattr" "${xattr}";
+  # Finally, run the server.
+  run;
+}
 
-  export PYTHONPATH="${PYTHONPATH}:${xattr}/build/${py_platform_libdir}";
-fi;
 
-#
-# select26
-#
-
-if [ "${py_version}" != "${py_version##2.5}" ] && ! py_have_module select26; then
-  select26="${top}/select26-0.1a3"
-
-  www_get "select26" "${select26}" http://pypi.python.org/packages/source/s/select26/select26-0.1a3.tar.gz;
-  py_build "select26" "${select26}" true;
-  py_install "select26" "${select26}";
-
-  export PYTHONPATH="${PYTHONPATH}:${select26}/build/${py_platform_libdir}";
-fi;
-
-if ! type memcached >& /dev/null; then
-  #
-  # libevent
-  #
-  libevent="${top}/libevent-1.4.8-stable"
-
-  www_get "libevent" "${libevent}" http://monkey.org/~provos/libevent-1.4.8-stable.tar.gz
-
-  if "${do_setup}" && (
-    "${force_setup}" || [ ! -d "${libevent}/_root" ]
-  ); then
-    echo "";
-    echo "Building libevent...";
-    cd "${libevent}";
-    ./configure --prefix="${libevent}/_root";
-    make;
-    make install;
-  fi;
-
-  export LD_LIBRARY_PATH="${LD_LIBRARY_PATH:-}:${libevent}/_root/lib";
-  export DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH:-}:${libevent}/_root/lib";
-
-  #
-  # memcached
-  #
-  memcached="${top}/memcached-1.2.6"
-
-  www_get "memcached" "${memcached}" http://www.danga.com/memcached/dist/memcached-1.2.6.tar.gz;
-
-  if "${do_setup}" && (
-    "${force_setup}" || [ ! -d "${memcached}/_root" ]
-  ); then
-    echo "";
-    echo "Building memcached...";
-    cd "${memcached}";
-    ./configure --prefix="${memcached}/_root" \
-                --with-libevent="${libevent}/_root" \
-                --enable-threads;
-    make;
-    make install;
-  fi;
-
-  export PATH="${PATH}:${top}/memcached-1.2.6/_root/bin";
-fi;
-
-#
-# Twisted
-#
-
-case "${USER}" in
-  wsanchez)
-    proto="svn+ssh";
-    ;;
-  *)
-    proto="svn";
-    ;;
-esac;
-svn_uri="${proto}://svn.twistedmatrix.com/svn/Twisted/branches/dav-take-two-3081-4";
-svn_get "Twisted" "${twisted}" "${svn_uri}" 26969;
-
-# No py_build step, since we tend to do edit Twisted, we want the sources in
-# PYTHONPATH, not a build directory.
-
-py_install "Twisted" "${twisted}";
-
-export PYTHONPATH="${PYTHONPATH}:${twisted}";
-
-# twisted.web2 doesn't get installed by default
-if [ -n "${install}" ]; then
-  echo "";
-  echo "Installing Twisted.web2...";
-  cd "${twisted}";
-  "${python}" ./twisted/web2/topfiles/setup.py install "${install_flag}${install}";
-  cd /;
-fi;
-
-#
-# dateutil
-#
-
-if ! py_have_module dateutil; then
-    dateutil="${top}/python-dateutil-1.4.1";
-
-    www_get "dateutil" "${dateutil}" http://www.labix.org/download/python-dateutil/python-dateutil-1.4.1.tar.gz;
-    py_install "dateutil" "${dateutil}";
-
-    export PYTHONPATH="${PYTHONPATH}:${dateutil}";
-fi;
-
-#
-# vobject
-#
-
-vobject="${top}/vobject";
-
-case "${USER}" in
-  cyrusdaboo)
-    base="svn+ssh://cdaboo@svn.osafoundation.org/svn";
-    ;;
-  *)
-    base="http://svn.osafoundation.org";
-    ;;
-esac;
-svn_uri="${base}/vobject/trunk";
-svn_get "vObject" "${vobject}" "${svn_uri}" 212;
-
-py_install "vObject" "${vobject}";
-
-export PYTHONPATH="${PYTHONPATH}:${vobject}";
-
-#
-# PyDirector
-#
-
-if ! py_have_module pydirector; then
-  pydirector="${top}/pydirector-1.0.0";
-  www_get "PyDirector" "${pydirector}" http://internap.dl.sourceforge.net/sourceforge/pythondirector/pydirector-1.0.0.tar.gz;
-  py_build "PyDirector" "${pydirector}" false;
-  py_install "PyDirector" "${pydirector}";
-
-  export PYTHONPATH="${PYTHONPATH}:${pydirector}/build/${py_platform_libdir}";
-fi;
-
-#
-# CalDAVTester
-#
-
-caldavtester="${top}/CalDAVTester";
-
-svn_get "CalDAVTester" "${caldavtester}" "${svn_uri_base}/CalDAVTester/trunk" 4449;
-
-#
-# PyFlakes
-#
-
-pyflakes="${top}/Pyflakes";
-
-svn_get "Pyflakes" "${pyflakes}" http://divmod.org/svn/Divmod/trunk/Pyflakes 17198;
-
-#
-# Calendar Server
-#
-
-py_install "Calendar Server" "${caldav}";
-
-##
-# Do home install
-# This is a hack, but it's needed because installing with --home doesn't work for python-dateutil.
-##
-
-if [ -n "${install_home:-}" ]; then
-  py_prefix="$("${python}" -c "import sys; print sys.prefix;")";
-  py_libdir="$("${python}" -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1);")";
-
-  install -d "${install_home}";
-  install -d "${install_home}/bin";
-  install -d "${install_home}/conf";
-  install -d "${install_home}/lib/python";
-
-  rsync -av "${install}${py_prefix}/bin/" "${install_home}/bin/";
-  rsync -av "${install}${py_libdir}/" "${install_home}/lib/python/";
-  rsync -av "${install}${py_prefix}/caldavd/" "${install_home}/caldavd/";
-
-  rm -rf "${install}";
-fi;
-
-##
-# Run the server
-##
-
-export PYTHONPATH="${PYTHONPATH}${user_python_path}";
-
-run;
+run_main "$@";

Modified: CalendarServer/branches/users/cdaboo/partition-4464/support/Makefile.Apple
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/support/Makefile.Apple	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/support/Makefile.Apple	2009-12-16 02:48:38 UTC (rev 4865)
@@ -47,17 +47,16 @@
 PyXML-0.8.4::           $(BuildDirectory)/PyXML-0.8.4
 vobject::               $(BuildDirectory)/vobject
 Twisted::               $(BuildDirectory)/Twisted
-pydirector-1.0.0::      $(BuildDirectory)/pydirector-1.0.0
 $(Project)::            $(BuildDirectory)/$(Project)
 
-build:: PyKerberos PyOpenDirectory PyXML-0.8.4 pydirector-1.0.0 vobject Twisted $(Project)
+build:: PyKerberos PyOpenDirectory PyXML-0.8.4 vobject Twisted $(Project)
 
 setup:
 	$(_v) ./run -g
 
-prep:: setup CalDAVTester.tgz PyKerberos.tgz PyOpenDirectory.tgz PyXML-0.8.4.tgz pydirector-1.0.0.tgz vobject.tgz Twisted.tgz
+prep:: setup CalDAVTester.tgz PyKerberos.tgz PyOpenDirectory.tgz PyXML-0.8.4.tgz vobject.tgz Twisted.tgz
 
-PyKerberos PyOpenDirectory PyXML-0.8.4 pydirector-1.0.0 vobject $(Project)::
+PyKerberos PyOpenDirectory PyXML-0.8.4 vobject $(Project)::
 	@echo "Building $@..."
 	$(_v) cd $(BuildDirectory)/$@ && $(Environment) $(PYTHON) setup.py build
 
@@ -79,7 +78,6 @@
 	          --install-data="$(ETCDIR)"
 	$(_v) cd $(BuildDirectory)/PyKerberos       && $(Environment) $(PYTHON) setup.py install $(PY_INSTALL_FLAGS)
 	$(_v) cd $(BuildDirectory)/PyOpenDirectory  && $(Environment) $(PYTHON) setup.py install $(PY_INSTALL_FLAGS)
-	$(_v) cd $(BuildDirectory)/pydirector-1.0.0 && $(Environment) $(PYTHON) setup.py install $(PY_INSTALL_FLAGS)
 	$(_v) cd $(BuildDirectory)/PyXML-0.8.4      && $(Environment) $(PYTHON) setup.py install $(PY_INSTALL_FLAGS)
 	$(_v) cd $(BuildDirectory)/vobject          && $(Environment) $(PYTHON) setup.py install $(PY_INSTALL_FLAGS)
 	$(_v) cd $(BuildDirectory)/Twisted && $(TwistedSubEnvironment) $(PYTHON) twisted/runner/topfiles/setup.py install $(PY_INSTALL_FLAGS)

Copied: CalendarServer/branches/users/cdaboo/partition-4464/support/build.sh (from rev 4858, CalendarServer/trunk/support/build.sh)
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/support/build.sh	                        (rev 0)
+++ CalendarServer/branches/users/cdaboo/partition-4464/support/build.sh	2009-12-16 02:48:38 UTC (rev 4865)
@@ -0,0 +1,505 @@
+#! /bin/bash
+# -*- sh-basic-offset: 2 -*-
+
+##
+# Copyright (c) 2005-2009 Apple Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##
+
+. support/py.sh;
+
+# Provide a default value: if the variable named by the first argument is
+# empty, set it to the default in the second argument.
+conditional_set () {
+  local var="$1"; shift;
+  local default="$1"; shift;
+  if [ -z "$(eval echo "\${${var}:-}")" ]; then
+    eval "${var}=\${default:-}";
+  fi;
+}
+
+# Read a configuration key from the configuration plist file and print it to
+# stdout.
+conf_read_key ()
+{
+  local key="$1"; shift;
+
+  # FIXME: This only works for simple values (no arrays, dicts)
+  tr '\n' ' ' < "${config}"                                                 \
+    | xpath "/plist/dict/*[preceding-sibling::key[1]='${key}'" 2> /dev/null \
+    | sed -n 's|^<[^<][^<]*>\([^<]*\)</[^<][^<]*>.*$|\1|p';
+}
+
+# Initialize all the global state required to use this library.
+init_build () {
+
+        verbose="";
+         do_get="true";
+       do_setup="true";
+         do_run="true";
+    force_setup="false";
+  disable_setup="false";
+     print_path="false";
+        install="";
+      daemonize="-X";
+           kill="false";
+        restart="false";
+    plugin_name="caldav";
+   service_type="Combined";
+       read_key="";
+        profile="";
+        reactor="";
+
+  # These variables are defaults for things which might be configured by
+  # environment; only set them if they're un-set.
+  conditional_set wd "$(pwd)";
+  conditional_set config "${wd}/conf/caldavd-dev.plist";
+  conditional_set caldav "${wd}";
+
+  if [ -z "${CALENDARSERVER_CACHE_DEPS-}" ]; then
+    cache_deps="${wd}/.dependencies";
+  else
+    cache_deps="${CALENDARSERVER_CACHE_DEPS}";
+  fi;
+
+  if [ -z "${caldavd_wrapper_command:-}" ]; then
+    if [ "$(uname -s)" == "Darwin" ] && [ "$(uname -r | cut -d . -f 1)" -ge 9 ]; then
+      caldavd_wrapper_command="launchctl bsexec /";
+    else
+      caldavd_wrapper_command="";
+    fi;
+  fi;
+
+      top="$(cd "${caldav}/.." && pwd -L)";
+  patches="${caldav}/lib-patches";
+  twisted="${top}/Twisted";
+      dav="${twisted}/twisted/web2/dav";
+
+  # Find a command that can hash up a string for us
+  if type -t openssl > /dev/null; then
+    hash="hash";
+    hash () { openssl dgst -md5; }
+  elif type -t md5 > /dev/null; then
+    hash="md5";
+  elif type -t md5sum > /dev/null; then
+    hash="md5sum";
+  elif type -t cksum > /dev/null; then
+    hash="hash";
+    hash () { cksum | cut -f 1 -d " "; }
+  elif type -t sum > /dev/null; then
+    hash="hash";
+    hash () { sum | cut -f 1 -d " "; }
+  else
+    hash="";
+  fi;
+
+  if [ -n "${install}" ] && ! echo "${install}" | grep '^/' > /dev/null; then
+    install="$(pwd)/${install}";
+  fi;
+
+  svn_uri_base="$(svn info "${caldav}" --xml 2> /dev/null | sed -n 's|^.*<root>\(.*\)</root>.*$|\1|p')";
+
+  conditional_set svn_uri_base "http://svn.calendarserver.org/repository/calendarserver";
+}
+
+
+# This is a hack, but it's needed because installing with --home doesn't work
+# for python-dateutil.
+do_home_install () {
+  install -d "${install_home}";
+  install -d "${install_home}/bin";
+  install -d "${install_home}/conf";
+  install -d "${install_home}/lib/python";
+
+  rsync -av "${install}${py_prefix}/bin/" "${install_home}/bin/";
+  rsync -av "${install}${py_libdir}/" "${install_home}/lib/python/";
+  rsync -av "${install}${py_prefix}/caldavd/" "${install_home}/caldavd/";
+
+  rm -rf "${install}";
+}
+
+
+# Apply patches from lib-patches to the given dependency codebase.
+apply_patches () {
+  local name="$1"; shift;
+  local path="$1"; shift;
+
+  if [ -d "${patches}/${name}" ]; then
+    echo "";
+    echo "Applying patches to ${name} in ${path}...";
+
+    cd "${path}";
+    find "${patches}/${name}"                  \
+        -type f                                \
+        -name '*.patch'                        \
+        -print                                 \
+        -exec patch -p0 --forward -i '{}' ';';
+    cd /;
+
+  fi;
+
+  echo "";
+  echo "Removing build directory ${path}/build...";
+  rm -rf "${path}/build";
+  echo "Removing pyc files from ${path}...";
+  find "${path}" -type f -name '*.pyc' -print0 | xargs -0 rm -f;
+}
+
+
+# If do_get is turned on, get an archive file containing a dependency via HTTP.
+www_get () {
+  if ! "${do_get}"; then return 0; fi;
+
+  local name="$1"; shift;
+  local path="$1"; shift;
+  local  url="$1"; shift;
+
+  if "${force_setup}" || [ ! -d "${path}" ]; then
+    local ext="$(echo "${url}" | sed 's|^.*\.\([^.]*\)$|\1|')";
+
+    case "${ext}" in
+      gz|tgz) decompress="gzip -d -c"; ;;
+      bz2)    decompress="bzip2 -d -c"; ;;
+      tar)    decompress="cat"; ;;
+      *)
+        echo "Unknown extension: ${ext}";
+        exit 1;
+        ;;
+    esac;
+
+    echo "";
+
+    if [ -n "${cache_deps}" ] && [ -n "${hash}" ]; then
+      mkdir -p "${cache_deps}";
+
+      cache_file="${cache_deps}/${name}-$(echo "${url}" | "${hash}")-$(basename "${url}")";
+
+      if [ ! -f "${cache_file}" ]; then
+	echo "Downloading ${name}...";
+	curl -L "${url}" -o "${cache_file}";
+      fi;
+
+      echo "Unpacking ${name} from cache...";
+      get () { cat "${cache_file}"; }
+    else
+      echo "Downloading ${name}...";
+      get () { curl -L "${url}"; }
+    fi;
+
+    rm -rf "${path}";
+    cd "$(dirname "${path}")";
+    get | ${decompress} | tar -xvf -;
+    apply_patches "${name}" "${path}";
+    cd /;
+  fi;
+}
+
+
+# If do_get is turned on, check a name out from SVN.
+svn_get () {
+  if ! "${do_get}"; then
+    return 0;
+  fi;
+
+  local     name="$1"; shift;
+  local     path="$1"; shift;
+  local      uri="$1"; shift;
+  local revision="$1"; shift;
+
+  if [ -d "${path}" ]; then
+    local wc_uri="$(svn info --xml "${path}" 2> /dev/null | sed -n 's|^.*<url>\(.*\)</url>.*$|\1|p')";
+
+    if "${force_setup}"; then
+      # Verify that we have a working copy checked out from the correct URI
+      if [ "${wc_uri}" != "${uri}" ]; then
+        echo "";
+        echo "Current working copy (${path}) is from the wrong URI: ${wc_uri} != ${uri}";
+        rm -rf "${path}";
+        svn_get "${name}" "${path}" "${uri}" "${revision}";
+        return $?;
+      fi;
+
+      echo "";
+
+      echo "Reverting ${name}...";
+      svn revert -R "${path}";
+
+      echo "Updating ${name}...";
+      svn update -r "${revision}" "${path}";
+
+      apply_patches "${name}" "${path}";
+    else
+      if ! "${print_path}"; then
+        # Verify that we have a working copy checked out from the correct URI
+        if [ "${wc_uri}" != "${uri}" ]; then
+          echo "";
+          echo "Current working copy (${path}) is from the wrong URI: ${wc_uri} != ${uri}";
+          echo "Performing repository switch for ${name}...";
+          svn switch -r "${revision}" "${uri}" "${path}";
+
+          apply_patches "${name}" "${path}";
+        else
+          local svnversion="$(svnversion "${path}")";
+          if [ "${svnversion%%[M:]*}" != "${revision}" ]; then
+            echo "";
+            echo "Updating ${name}...";
+            svn update -r "${revision}" "${path}";
+
+            apply_patches "${name}" "${path}";
+          fi;
+        fi;
+      fi;
+    fi;
+  else
+    echo "";
+
+    checkout () {
+      echo "Checking out ${name}...";
+      svn checkout -r "${revision}" "${uri}@${revision}" "${path}";
+    }
+
+    if [ "${revision}" != "HEAD" ] && [ -n "${cache_deps}" ] && [ -n "${hash}" ]; then
+      local cache_file="${cache_deps}/${name}-$(echo "${uri}" | "${hash}")@r${revision}.tgz";
+
+      mkdir -p "${cache_deps}";
+
+      if [ -f "${cache_file}" ]; then
+	echo "Unpacking ${name} from cache...";
+	mkdir -p "${path}";
+	tar -C "${path}" -xvzf "${cache_file}";
+      else
+	checkout;
+	echo "Caching ${name}...";
+	tar -C "${path}" -cvzf "${cache_file}" .;
+      fi;
+    else
+      checkout;
+    fi;
+
+    apply_patches "${name}" "${path}";
+  fi;
+}
+
+
+# (optionally) Invoke 'python setup.py build' on the given python project.
+py_build () {
+  local     name="$1"; shift;
+  local     path="$1"; shift;
+  local optional="$1"; shift;
+
+  if "${do_setup}"; then
+    echo "";
+    echo "Building ${name}...";
+    cd "${path}";
+    if ! "${python}" ./setup.py -q build --build-lib "build/${py_platform_libdir}" "$@"; then
+      if "${optional}"; then
+        echo "WARNING: ${name} failed to build.";
+        echo "WARNING: ${name} is not required to run the server; continuing without it.";
+      else
+        return $?;
+      fi;
+    fi;
+    cd /;
+  fi;
+}
+
+# If in install mode, install the given package from the given path.
+# (Otherwise do nothing.)
+py_install () {
+  local name="$1"; shift;
+  local path="$1"; shift;
+
+  if [ -n "${install}" ]; then
+    echo "";
+    echo "Installing ${name}...";
+    cd "${path}";
+    "${python}" ./setup.py install "${install_flag}${install}";
+    cd /;
+  fi;
+}
+
+
+# Declare a dependency on a Python project.
+py_dependency () {
+
+  # args
+  local            name="$1"; shift; # the name of the package (for display)
+  local          module="$1"; shift; # the name of the python module.
+  local    distribution="$1"; shift; # the name of the directory to put the distribution into.
+  local        get_type="$1"; shift; # what protocol should be used?
+  local         get_uri="$1"; shift; # what URL should be fetched?
+  local        optional="$1"; shift; # is this dependency optional?
+  local override_system="$1"; shift; # do I need to get this dependency even if
+                                     # the system already has it?
+  local         inplace="$1"; shift; # do development in-place; don't run setup.py to
+                                     # build, and instead add the source directory
+                                     # directly to sys.path.  twisted and vobject are
+                                     # developed often enough that this is convenient.
+  local        skip_egg="$1"; shift; # skip even the 'egg_info' step, because nothing
+                                     # needs to be built.
+  local        revision="$1"; shift; # what revision to check out (for SVN dependencies)
+  # end args
+  local          srcdir="${top}/${distribution}"
+
+  if "${override_system}" || ! py_have_module "${module}"; then
+    "${get_type}_get" "${name}" "${srcdir}" "${get_uri}" "${revision}"
+    if "${inplace}"; then
+      if "${do_setup}" && "${override_system}" && ! "${skip_egg}"; then
+        echo;
+        if py_have_module setuptools; then
+          echo "Building ${name}... [overrides system, building egg-info metadata only]";
+          cd "${srcdir}";
+          "${python}" ./setup.py -q egg_info 2>&1 | (
+            grep -i -v 'Unrecognized .svn/entries' || true);
+          cd /;
+        fi;
+      fi;
+    else
+      py_build "${name}" "${srcdir}" "${optional}";
+    fi;
+    py_install "${name}" "${srcdir}";
+  fi;
+
+  if "$inplace"; then
+    local  add_path="${srcdir}";
+  else
+    local  add_path="${srcdir}/build/${py_platform_libdir}";
+  fi;
+  export PYTHONPATH="${PYTHONPATH}:${add_path}";
+}
+
+
+# Declare a dependency on a C project built with autotools.
+c_dependency () {
+  local name="$1"; shift;
+  local path="$1"; shift;
+  local  uri="$1"; shift;
+
+  # Extra arguments are processed below, as arguments to './configure'.
+
+  srcdir="${top}/${path}";
+
+  www_get "${name}" "${srcdir}" "${uri}";
+
+  if "${do_setup}" && (
+      "${force_setup}" || [ ! -d "${srcdir}/_root" ]); then
+    echo "";
+    echo "Building ${name}...";
+    cd "${srcdir}";
+    ./configure --prefix="${srcdir}/_root" "$@";
+    make;
+    make install;
+  fi;
+
+  export              PATH="${PATH}:${srcdir}/_root/bin";
+  export    C_INCLUDE_PATH="${C_INCLUDE_PATH:-}:${srcdir}/_root/include";
+  export   LD_LIBRARY_PATH="${LD_LIBRARY_PATH:-}:${srcdir}/_root/lib";
+  export DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH:-}:${srcdir}/_root/lib";
+}
+
+
+# Enumerate all the dependencies with c_dependency and py_dependency; depending
+# on options parsed by ../run:parse_options and on-disk state, this may do as
+# little as update the PATH, DYLD_LIBRARY_PATH, LD_LIBRARY_PATH and PYTHONPATH,
+# or, it may do as much as download and install all dependencies.
+dependencies () {
+
+  if ! type memcached >& /dev/null; then
+    # Dependencies compiled from C source code
+    local le="libevent-1.4.8-stable";
+    c_dependency "libevent" "${le}" \
+      "http://monkey.org/~provos/libevent-1.4.8-stable.tar.gz";
+    c_dependency "memcached" "memcached-1.2.6" \
+      "http://www.danga.com/memcached/dist/memcached-1.2.6.tar.gz" \
+      --enable-threads --with-libevent="${top}/${le}/_root";
+  fi;
+
+  # Python dependencies
+  py_dependency "Zope Interface" "zope.interface" "zope.interface-3.3.0" \
+    "www" "http://www.zope.org/Products/ZopeInterface/3.3.0/zope.interface-3.3.0.tar.gz" \
+    false false false false 0;
+  py_dependency "PyXML" "xml.dom.ext" "PyXML-0.8.4" \
+    "www" "http://internap.dl.sourceforge.net/sourceforge/pyxml/PyXML-0.8.4.tar.gz" \
+    false false false false 0;
+  py_dependency "PyOpenSSL" "OpenSSL" "pyOpenSSL-0.9" \
+    "www" "http://pypi.python.org/packages/source/p/pyOpenSSL/pyOpenSSL-0.9.tar.gz" \
+    false false false false 0;
+  if type krb5-config > /dev/null; then
+    py_dependency "PyKerberos" "kerberos" "PyKerberos" \
+      "svn" "${svn_uri_base}/PyKerberos/trunk" \
+      false false false false 4241;
+  fi;
+  if [ "$(uname -s)" == "Darwin" ]; then
+    py_dependency "PyOpenDirectory" "opendirectory" "PyOpenDirectory" \
+      "svn" "${svn_uri_base}/PyOpenDirectory/trunk" \
+      false false false false 4827;
+  fi;
+  py_dependency "xattr" "xattr" "xattr" \
+    "svn" "http://svn.red-bean.com/bob/xattr/releases/xattr-0.5" \
+    false false false false 1013;
+  if [ "${py_version}" != "${py_version##2.5}" ] && ! py_have_module select26; then
+    py_dependency "select26" "select26" "select26-0.1a3" \
+      "www" "http://pypi.python.org/packages/source/s/select26/select26-0.1a3.tar.gz" \
+      true false false false 0;
+  fi;
+
+  case "${USER}" in
+    wsanchez)
+      proto="svn+ssh";
+      ;;
+    *)
+      proto="svn";
+      ;;
+  esac;
+
+  py_dependency "Twisted" "twisted" "Twisted" \
+    "svn" "${proto}://svn.twistedmatrix.com/svn/Twisted/branches/dav-take-two-3081-4" \
+    false true true false 27622;
+
+  # twisted.web2 doesn't get installed by default, so in the install phase
+  # let's make sure it does.
+  if [ -n "${install}" ]; then
+    echo "";
+    echo "Installing Twisted.web2...";
+    cd "${twisted}";
+    "${python}" ./twisted/web2/topfiles/setup.py install "${install_flag}${install}";
+    cd /;
+  fi;
+
+  py_dependency "dateutil" "dateutil" "python-dateutil-1.4.1" \
+    "www" "http://www.labix.org/download/python-dateutil/python-dateutil-1.4.1.tar.gz" \
+    false false false false 0;
+
+  case "${USER}" in
+    cyrusdaboo)
+      base="svn+ssh://cdaboo@svn.osafoundation.org/svn";
+      ;;
+    *)
+      base="http://svn.osafoundation.org";
+      ;;
+  esac;
+
+  # XXX actually vObject should be imported in-place.
+  py_dependency "vObject" "vobject" "vobject" \
+    "svn" "${base}/vobject/trunk" \
+    false true true true 212;
+
+  # Tool dependencies.  The code itself doesn't depend on these, but you probably want them.
+  svn_get "CalDAVTester" "${top}/CalDAVTester" "${svn_uri_base}/CalDAVTester/trunk" 4853;
+  svn_get "Pyflakes" "${top}/Pyflakes" http://divmod.org/svn/Divmod/trunk/Pyflakes 17198;
+}
+
+
+# Actually do the initialization, once all functions are defined.
+init_build;

Copied: CalendarServer/branches/users/cdaboo/partition-4464/support/diffbranch (from rev 4858, CalendarServer/trunk/support/diffbranch)
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/support/diffbranch	                        (rev 0)
+++ CalendarServer/branches/users/cdaboo/partition-4464/support/diffbranch	2009-12-16 02:48:38 UTC (rev 4865)
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+branch_base_revision="$(
+  svn log --stop-on-copy "$1"									\
+    | grep -e '------------------------------------------------------------------------' -A 1	\
+    | egrep '^r'										\
+    | cut -d ' ' -f 1										\
+    | tail -1
+)";
+
+svn diff "-${branch_base_revision}" "$@";

Copied: CalendarServer/branches/users/cdaboo/partition-4464/support/mergebranch (from rev 4858, CalendarServer/trunk/support/mergebranch)
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/support/mergebranch	                        (rev 0)
+++ CalendarServer/branches/users/cdaboo/partition-4464/support/mergebranch	2009-12-16 02:48:38 UTC (rev 4865)
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+uri="$1"; shift;
+
+if [ -e "${uri}" ]; then
+   # URI is a file.  Get the URI.
+   uri="$(svn info --xml "${uri}" | sed -n 's|<url>\(.*\)</url>|\1|p')";
+fi;
+
+branch_base_revision="$(
+  svn log --stop-on-copy "${uri}"								\
+    | grep -e '------------------------------------------------------------------------' -A 1	\
+    | egrep '^r'										\
+    | cut -d ' ' -f 1										\
+    | tail -1
+)";
+
+svn merge "-${branch_base_revision}:HEAD" "${uri}" "$@";

Copied: CalendarServer/branches/users/cdaboo/partition-4464/support/py.sh (from rev 4858, CalendarServer/trunk/support/py.sh)
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/support/py.sh	                        (rev 0)
+++ CalendarServer/branches/users/cdaboo/partition-4464/support/py.sh	2009-12-16 02:48:38 UTC (rev 4865)
@@ -0,0 +1,101 @@
+#! /bin/bash
+# -*- sh-basic-offset: 2 -*-
+
+##
+# Copyright (c) 2005-2009 Apple Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##
+
+# Echo the major.minor version of the given Python interpreter.
+
+py_version () {
+  local python="$1"; shift;
+  echo "$("${python}" -c "from distutils.sysconfig import get_python_version; print get_python_version()")";
+}
+
+# Test if a particular python interpreter is available, given the full path to
+# that interpreter.
+
+try_python () {
+  local python="$1"; shift;
+
+  if [ -z "${python}" ]; then
+    return 1;
+  fi
+  if ! type "${python}" > /dev/null 2>&1; then
+    return 1;
+  fi
+
+  local py_version="$(py_version "${python}")";
+  if [ "${py_version/./}" -lt "25" ]; then
+    return 1;
+  fi
+  return 0;
+}
+
+
+# Detect which version of Python to use, then print out which one was detected.
+
+detect_python_version () {
+  for v in "" "2.6" "2.5"
+  do
+    for p in								\
+      "${PYTHON:=}"							\
+      "python${v}"							\
+      "/usr/local/bin/python${v}"					\
+      "/usr/local/python/bin/python${v}"				\
+      "/usr/local/python${v}/bin/python${v}"				\
+      "/opt/bin/python${v}"						\
+      "/opt/python/bin/python${v}"					\
+      "/opt/python${v}/bin/python${v}"					\
+      "/Library/Frameworks/Python.framework/Versions/${v}/bin/python"	\
+      "/opt/local/bin/python${v}"					\
+      "/sw/bin/python${v}"						\
+      ;
+    do
+      if try_python "${p}"; then
+        echo "${p}";
+        return 0;
+      fi
+    done
+  done
+  return 1;
+}
+
+# Detect if the given Python module is installed in the system Python configuration.
+py_have_module () {
+  local module="$1"; shift;
+
+  PYTHONPATH="" "${python}" -c "import ${module}" > /dev/null 2>&1;
+}
+
+# Detect which python to use, and store it in the 'python' variable, as well as
+# setting up variables related to version and build configuration.
+
+init_py () {
+  python="$(detect_python_version)";
+
+  if [ -z "${python:-}" ]; then
+    echo "No suitable python found. Python 2.5 is required.";
+    exit 1;
+  fi
+
+         py_platform="$("${python}" -c "from distutils.util import get_platform; print get_platform()")";
+          py_version="$(py_version "${python}")";
+  py_platform_libdir="lib.${py_platform}-${py_version}";
+           py_prefix="$("${python}" -c "import sys; print sys.prefix;")";
+           py_libdir="$("${python}" -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1);")";
+}
+
+init_py;

Modified: CalendarServer/branches/users/cdaboo/partition-4464/support/submit
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/support/submit	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/support/submit	2009-12-16 02:48:38 UTC (rev 4865)
@@ -164,7 +164,7 @@
   if "${package}"; then
     package_tmp="${tmp}/pkg";
     install -d "${package_tmp}";
-    merge_flags="-merge \"${package_tmp}\"";
+    merge_flags="-merge ${package_tmp}";
   elif "${install}"; then
     merge_flags="-merge /";
   else

Modified: CalendarServer/branches/users/cdaboo/partition-4464/support/version.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/support/version.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/support/version.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -24,7 +24,7 @@
     # Compute the version number.
     #
 
-    base_version = "2.4"
+    base_version = "3.0"
 
     branches = (
         "tags/release/CalendarServer-" + base_version,

Modified: CalendarServer/branches/users/cdaboo/partition-4464/test
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/test	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/test	2009-12-16 02:48:38 UTC (rev 4865)
@@ -16,13 +16,17 @@
 # limitations under the License.
 ##
 
-set -e
-set -u
+set -e;
+set -u;
 
-    random="--random=$(date "+%s")";
- no_colour="";
+wd="$(cd "$(dirname "$0")" && pwd -L)";
+
+. support/py.sh;
+
+random="--random=$(date "+%s")";
+no_colour="";
 until_fail="";
-  coverage="";
+coverage="";
 
 usage ()
 {
@@ -56,7 +60,6 @@
 done;
 shift $((${OPTIND} - 1));
 
-     wd="$(cd "$(dirname "$0")" && pwd -L)";
 twisted="$(cd "${wd}/.." && pwd -L)/Twisted";
 
 export PYTHONPATH="$("${wd}/run" -p)";
@@ -67,4 +70,4 @@
     test_modules="calendarserver twistedcaldav twext twisted";
 fi;
 
-cd "${wd}" && "${twisted}/bin/trial" ${random} ${until_fail} ${no_colour} ${coverage} ${test_modules};
+cd "${wd}" && "${python}" "${twisted}/bin/trial" --rterrors ${random} ${until_fail} ${no_colour} ${coverage} ${test_modules};

Copied: CalendarServer/branches/users/cdaboo/partition-4464/twext/internet/tcp.py (from rev 4858, CalendarServer/trunk/twext/internet/tcp.py)
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twext/internet/tcp.py	                        (rev 0)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twext/internet/tcp.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -0,0 +1,137 @@
+##
+# Copyright (c) 2005-2009 Apple Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##
+
+"""
+Extentions to twisted.internet.tcp.
+"""
+
+__all__ = [
+    "InheritedPort",
+    "InheritedSSLPort",
+    "InheritTCPServer",
+    "InheritSSLServer",
+]
+
+from OpenSSL import SSL
+from twisted.application import internet
+from twisted.internet import tcp, ssl
+from twistedcaldav.log import Logger, logLevelForNamespace, setLogLevelForNamespace
+import socket
+
+log = Logger()
+
+
+class MaxAcceptPortMixin(object):
+    """ Mixin for resetting maxAccepts """
+
+    def doRead(self):
+        self.numberAccepts = min(self.factory.maxRequests - self.factory.outstandingRequests, self.factory.maxAccepts)
+        tcp.Port.doRead(self)
+
+class MaxAcceptTCPPort(tcp.Port, MaxAcceptPortMixin):
+    """ Use for non-inheriting tcp ports """
+    pass
+
+class MaxAcceptSSLPort(ssl.Port, MaxAcceptPortMixin):
+    """ Use for non-inheriting SSL ports """
+    pass
+
+class InheritedTCPPort(MaxAcceptTCPPort):
+    """ A tcp port which uses an inherited file descriptor """
+
+    def __init__(self, fd, factory, reactor):
+        tcp.Port.__init__(self, 0, factory, reactor=reactor)
+        # MOR: careful because fromfd dup()'s the socket, so we need to
+        # make sure we don't leak file descriptors
+        self.socket = socket.fromfd(fd, socket.AF_INET, socket.SOCK_STREAM)
+        self._realPortNumber = self.port = self.socket.getsockname()[1]
+
+    def createInternetSocket(self):
+        return self.socket
+
+    def startListening(self):
+        log.msg("%s starting on %s" % (self.factory.__class__, self._realPortNumber))
+        self.factory.doStart()
+        self.connected = 1
+        self.fileno = self.socket.fileno
+        self.numberAccepts = self.factory.maxRequests
+        self.startReading()
+
+
+class InheritedSSLPort(InheritedTCPPort):
+    """ An SSL port which uses an inherited file descriptor """
+
+    _socketShutdownMethod = 'sock_shutdown'
+
+    transport = ssl.Server
+
+    def __init__(self, fd, factory, ctxFactory, reactor):
+        InheritedTCPPort.__init__(self, fd, factory, reactor)
+        self.ctxFactory = ctxFactory
+        self.socket = SSL.Connection(self.ctxFactory.getContext(), self.socket)
+
+    def _preMakeConnection(self, transport):
+        transport._startTLS()
+        return tcp.Port._preMakeConnection(self, transport)
+
+class MaxAcceptTCPServer(internet.TCPServer):
+    """ TCP server which will uses MaxAcceptTCPPorts (and optionally,
+        inherited ports)
+    """
+
+    def __init__(self, *args, **kwargs):
+        internet.TCPServer.__init__(self, *args, **kwargs)
+        self.args[1].myServer = self
+        self.inherit = self.kwargs.get("inherit", False)
+        self.backlog = self.kwargs.get("backlog", None)
+        self.interface = self.kwargs.get("interface", None)
+
+    def _getPort(self):
+        from twisted.internet import reactor
+
+        if self.inherit:
+            port = InheritedTCPPort(self.args[0], self.args[1], reactor)
+        else:
+            port = MaxAcceptTCPPort(self.args[0], self.args[1], self.backlog, self.interface, reactor)
+
+        port.startListening()
+        self.myPort = port
+        return port
+
+class MaxAcceptSSLServer(internet.SSLServer):
+    """ SSL server which will uses MaxAcceptSSLPorts (and optionally,
+        inherited ports)
+    """
+
+    def __init__(self, *args, **kwargs):
+        internet.SSLServer.__init__(self, *args, **kwargs)
+        self.args[1].myServer = self
+        self.inherit = self.kwargs.get("inherit", False)
+        self.backlog = self.kwargs.get("backlog", None)
+        self.interface = self.kwargs.get("interface", None)
+
+    def _getPort(self):
+        from twisted.internet import reactor
+
+        if self.inherit:
+            port = InheritedSSLPort(self.args[0], self.args[1], self.args[2], reactor)
+        else:
+            port = MaxAcceptSSLPort(self.args[0], self.args[1], self.args[2], self.backlog, self.interface, self.reactor)
+
+        port.startListening()
+        self.myPort = port
+        return port
+

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twext/python/plistlib.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twext/python/plistlib.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twext/python/plistlib.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -16,15 +16,8 @@
 
 try:
     _plistlib = __import__("plistlib")
-
 except ImportError:
-    from twext.python._plistlib import *
+    from twext.python import _plistlib
 
-    import twext.python._plistlib
-    __all__ = twext.python._plistlib.__all__
-    del twext
-
-else:
-    for symbol in _plistlib.__all__:
-        globals()[symbol] = getattr(_plistlib, symbol)
-    del _plistlib
+import sys
+sys.modules[__name__] = _plistlib

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twext/web2/channel/http.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twext/web2/channel/http.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twext/web2/channel/http.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -20,11 +20,16 @@
 from twisted.python import log
 from twisted.web2.channel.http import HTTPFactory, HTTPChannelRequest,\
     HTTPChannel
+from twisted.web2.http import Request, RedirectResponse
+from twistedcaldav.config import config
+
 from twistedcaldav import accounting
 import time
 
 __all__ = [
     "HTTP503LoggingFactory",
+    "LimitingHTTPFactory",
+    "SSLRedirectRequest",
 ]
 
 class OverloadedLoggingServerProtocol (protocol.Protocol):
@@ -160,6 +165,61 @@
         if self.logData is not None:
             doneTime = time.time()
             self.logData.response.append("\r\n\r\n<<<< Response complete at: %.3f (elapsed: %.1f ms)\r\n" % (doneTime, 1000 * (doneTime - self.startTime),))
-            accounting.emitAccounting("HTTP", "all", "".join(self.logData.request) + "".join(self.logData.response))
+            accounting.emitAccounting("HTTP", "", "".join(self.logData.request) + "".join(self.logData.response))
 
 HTTPChannel.chanRequestFactory = HTTPLoggingChannelRequest
+
+
+
+class LimitingHTTPChannel(HTTPChannel):
+    """ HTTPChannel that takes itself out of the reactor once it has enough
+        requests in flight.
+    """
+
+    def connectionMade(self):
+        HTTPChannel.connectionMade(self)
+        if self.factory.outstandingRequests >= self.factory.maxRequests:
+            self.factory.myServer.myPort.stopReading()
+
+    def connectionLost(self, reason):
+        HTTPChannel.connectionLost(self, reason)
+        if self.factory.outstandingRequests < self.factory.maxRequests:
+            self.factory.myServer.myPort.startReading()
+
+class LimitingHTTPFactory(HTTPFactory):
+    """ HTTPFactory which stores maxAccepts on behalf of the MaxAcceptPortMixin
+    """
+
+    protocol = LimitingHTTPChannel
+
+    def __init__(self, requestFactory, maxRequests=600, maxAccepts=100,
+        **kwargs):
+        HTTPFactory.__init__(self, requestFactory, maxRequests, **kwargs)
+        self.maxAccepts = maxAccepts
+
+    def buildProtocol(self, addr):
+
+        p = protocol.ServerFactory.buildProtocol(self, addr)
+        for arg, value in self.protocolArgs.iteritems():
+            setattr(p, arg, value)
+        return p
+
+
+
+class SSLRedirectRequest(Request):
+    """ For redirecting HTTP to HTTPS port """
+
+    def process(self):
+        if config.SSLPort == 443:
+            location = (
+                "https://%s%s"
+                % (config.ServerHostName, self.uri)
+            )
+        else:
+            location = (
+                "https://%s:%d%s"
+                % (config.ServerHostName, config.SSLPort, self.uri)
+            )
+        self.writeResponse(RedirectResponse(location))
+
+

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/accesslog.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/accesslog.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/accesslog.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -128,6 +128,7 @@
                 ]
                 if hasattr(request, "extendedLogItems"):
                     for k, v in request.extendedLogItems.iteritems():
+                        k = str(k).replace('"', "%22")
                         v = str(v).replace('"', "%22")
                         if " " in v:
                             v = '"%s"' % (v,)
@@ -145,7 +146,7 @@
                 "bytesSent"           : loginfo.bytesSent,
                 "referer"             : request.headers.getHeader("referer", "-"),
                 "userAgent"           : request.headers.getHeader("user-agent", "-"),
-                "serverInstance"      : request.serverInstance,
+                "serverInstance"      : config.LogID,
                 "timeSpent"           : (time.time() - request.initTime) * 1000,
                 "outstandingRequests" : request.chanRequest.channel.factory.outstandingRequests,
             }

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/accounting.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/accounting.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/accounting.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,5 +1,5 @@
 ##
-# Copyright (c) 2006-2007 Apple Inc. All rights reserved.
+# Copyright (c) 2006-2009 Apple Inc. All rights reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -86,42 +86,51 @@
             principal.record.guid
         )
     else:
-        return
+        return None
 
     try:
         #
         # Obtain the accounting log file name
         #
         logRoot = config.AccountingLogRoot
-        logDirectory = os.path.join(
-            logRoot,
-            principalLogPath,
-            category
+        logDirectory = category
+        if principalLogPath:
+            logDirectory = os.path.join(
+                logDirectory,
+                principalLogPath,
+            )
+        logFilename = os.path.join(
+            logDirectory,
+            datetime.datetime.now().isoformat()
         )
-        logFilename = os.path.join(logDirectory, datetime.datetime.now().isoformat())
     
-        if not os.path.isdir(logDirectory):
-            os.makedirs(logDirectory)
+        if not os.path.isdir(os.path.join(logRoot, logDirectory)):
+            os.makedirs(os.path.join(logRoot, logDirectory))
             logFilename = "%s-01" % (logFilename,)
         else:
             index = 1
             while True:
                 path = "%s-%02d" % (logFilename, index)
-                if not os.path.isfile(path):
+                if not os.path.isfile(os.path.join(logRoot, path)):
                     logFilename = path
                     break
                 if index == 1000:
                     log.error("Too many %s accounting files for %s" % (category, principal))
-                    return
+                    return None
+                index += 1
     
         #
         # Now write out the data to the log file
         #
-        logFile = open(logFilename, "a")
+        logFile = open(os.path.join(logRoot, logFilename), "a")
         try:
             logFile.write(data)
         finally:
             logFile.close()
+            
+        return logFilename
+
     except OSError, e:
         # No failures in accounting should propagate out
         log.error("Failed to write accounting data due to: %s" % (str(e),))
+        return None

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/cache.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/cache.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/cache.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -323,6 +323,9 @@
         self._response = response
 
     def renderHTTP(self, request):
+        if not hasattr(request, "extendedLogItems"):
+            request.extendedLogItems = {}
+        request.extendedLogItems["cached"] = "1"
         return self._response
 
     def locateChild(self, request, segments):

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/appleopendirectory.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/appleopendirectory.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/appleopendirectory.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -33,6 +33,7 @@
 from twisted.cred.credentials import UsernamePassword
 from twisted.web2.auth.digest import DigestedCredentials
 
+from twistedcaldav.config import config
 from twistedcaldav.directory import augment
 from twistedcaldav.directory.cachingdirectory import CachingDirectoryService,\
     CachingDirectoryRecord
@@ -330,7 +331,7 @@
 
         def collectResults(results):
             self.log_info("Got back %d records from OD" % (len(results),))
-            for key, val in results.iteritems():
+            for key, val in results:
                 self.log_debug("OD result: %s %s" % (key, val))
                 try:
                     guid = val[dsattributes.kDS1AttrGeneratedUID]
@@ -341,7 +342,7 @@
                     pass
 
         def multiQuery(directory, queries, attrs, operand):
-            results = {}
+            results = []
 
             for query, recordTypes in queries.iteritems():
                 if not query:
@@ -362,8 +363,8 @@
                 self.log_info("Calling OD: Types %s, Operand %s, Caseless %s, %s" %
                     (recordTypes, operand, caseless, complexExpression))
 
-                results.update(
-                    opendirectory.queryRecordsWithAttributes(
+                results.extend(
+                    opendirectory.queryRecordsWithAttributes_list(
                         directory,
                         complexExpression,
                         caseless,
@@ -440,9 +441,10 @@
                 listRecordTypes.append(dsattributes.kDSStdRecordTypeUsers)
     
             elif recordType == DirectoryService.recordType_groups:
-                listRecordTypes.append(dsattributes.kDSStdRecordTypeGroups)
-                attrs.append(dsattributes.kDSNAttrGroupMembers)
-                attrs.append(dsattributes.kDSNAttrNestedGroups)
+                if queryattr != dsattributes.kDSNAttrEMailAddress:
+                    listRecordTypes.append(dsattributes.kDSStdRecordTypeGroups)
+                    attrs.append(dsattributes.kDSNAttrGroupMembers)
+                    attrs.append(dsattributes.kDSNAttrNestedGroups)
     
             elif recordType == DirectoryService.recordType_locations:
                 if queryattr != dsattributes.kDSNAttrEMailAddress:
@@ -526,9 +528,14 @@
             recordEmailAddresses = _setFromAttribute(value.get(dsattributes.kDSNAttrEMailAddress), lower=True)
             recordNodeName       = value.get(dsattributes.kDSNAttrMetaNodeLocation)
 
+            if recordNodeName == "/Local/Default" and not (config.Scheduling.iMIP.Username in recordShortNames):
+                self.log_info("Local record (%s)%s is not eligible for calendaring."
+                              % (recordType, recordShortName))
+                continue
+
             if not recordType:
                 self.log_debug("Record (unknown)%s in node %s has no recordType; ignoring."
-                    % (recordShortName, recordNodeName))
+                               % (recordShortName, recordNodeName))
                 continue
 
             recordType = self._fromODRecordTypes[recordType]
@@ -611,7 +618,9 @@
         """
 
         if self.node == "/Search":
-            nodes = opendirectory.listNodes(self.directory)
+            result = opendirectory.getNodeAttributes(self.directory, "/Search",
+                (dsattributes.kDS1AttrSearchPath,))
+            nodes = result[dsattributes.kDS1AttrSearchPath]
         else:
             nodes = [self.node]
 
@@ -655,8 +664,7 @@
     """
     def __init__(
         self, service, recordType, guid, nodeName, shortNames, authIDs,
-        fullName, firstName, lastName, emailAddresses,
-        memberGUIDs,
+        fullName, firstName, lastName, emailAddresses, memberGUIDs,
     ):
         super(OpenDirectoryRecord, self).__init__(
             service               = service,

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/augment.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/augment.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/augment.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -38,14 +38,12 @@
         hostedAt="",
         enabledForCalendaring=False,
         autoSchedule=False,
-        calendarUserAddresses=None,  
     ):
         self.guid = guid
         self.enabled = enabled
         self.hostedAt = hostedAt
         self.enabledForCalendaring = enabledForCalendaring
         self.autoSchedule = autoSchedule
-        self.calendarUserAddresses = calendarUserAddresses if calendarUserAddresses else set()
 
 class AugmentDB(object):
     """
@@ -180,11 +178,11 @@
         """
         
         # Query for the record information
-        results = (yield self.query("select GUID, ENABLED, PARTITIONID, CALENDARING, AUTOSCHEDULE, CUADDRS from AUGMENTS where GUID = :1", (guid,)))
+        results = (yield self.query("select GUID, ENABLED, PARTITIONID, CALENDARING, AUTOSCHEDULE from AUGMENTS where GUID = :1", (guid,)))
         if not results:
             returnValue(None)
         else:
-            guid, enabled, partitionid, enabdledForCalendaring, autoSchedule, cuaddrs = results[0]
+            guid, enabled, partitionid, enabdledForCalendaring, autoSchedule = results[0]
             
             record = AugmentRecord(
                 guid = guid,
@@ -192,7 +190,6 @@
                 hostedAt = (yield self._getPartition(partitionid)),
                 enabledForCalendaring = enabdledForCalendaring == "T",
                 autoSchedule = autoSchedule == "T",
-                calendarUserAddresses = set(cuaddrs.split("\t")) if cuaddrs else set(),
             )
             
             returnValue(record)
@@ -201,19 +198,18 @@
     def addAugmentRecord(self, record):
 
         partitionid = (yield self._getPartitionID(record.hostedAt))
-        cuaddrs = "\t".join(record.calendarUserAddresses)
         
         yield self.execute(
             """insert into AUGMENTS
-            (GUID, ENABLED, PARTITIONID, CALENDARING, AUTOSCHEDULE, CUADDRS)
-            values (:1, :2, :3, :4, :5, :6)""",
+            (GUID, ENABLED, PARTITIONID, CALENDARING, AUTOSCHEDULE)
+            values (:1, :2, :3, :4, :5)""",
             (
                 record.guid,
                 "T" if record.enabled else "F",
                 partitionid,
                 "T" if record.enabledForCalendaring else "F",
                 "T" if record.autoSchedule else "F",
-                cuaddrs,)
+            )
         )
 
     @inlineCallbacks
@@ -245,11 +241,6 @@
         self.cachedPartitions[partitionid] = partition
         returnValue(partition)
 
-    @inlineCallbacks
-    def _getCUAddrs(self, augmentid):
-        
-        return self.queryList("select CUADDR from CUADDRS where AUGMENTID = :1", (augmentid,))
-
     def _db_version(self):
         """
         @return: the schema version assigned to this index.
@@ -277,7 +268,6 @@
             ("PARTITIONID",  "text"),
             ("CALENDARING",  "text(1)"),
             ("AUTOSCHEDULE", "text(1)"),
-            ("CUADDRS",      "text"),
         ))
 
         yield self._create_table("PARTITIONS", (

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/cachingdirectory.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/cachingdirectory.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/cachingdirectory.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,3 +1,4 @@
+# -*- test-case-name: twistedcaldav.directory.test.test_cachedirectory -*-
 ##
 # Copyright (c) 2009 Apple Inc. All rights reserved.
 #
@@ -26,12 +27,12 @@
 
 
 import time
-import types
+
 import memcacheclient
 import base64
 
 from twistedcaldav.config import config
-from twistedcaldav.directory.directory import DirectoryService, DirectoryRecord, DirectoryError
+from twistedcaldav.directory.directory import DirectoryService, DirectoryRecord, DirectoryError, UnknownRecordTypeError
 from twistedcaldav.log import LoggingMixIn
 from twistedcaldav.scheduling.cuaddress import normalizeCUAddr
 
@@ -92,7 +93,11 @@
             if useMemcache:
                 key = "dir|%s|%s" % (indexType, indexKey)
                 self.log_debug("Memcache: storing %s" % (key,))
-                self.directoryService.memcacheSet(key, record)
+                try:
+                    self.directoryService.memcacheSet(key, record)
+                except DirectoryMemcacheError:
+                    self.log_error("Memcache: failed to store %s" % (key,))
+                    pass
 
 
     def removeRecord(self, record):
@@ -103,16 +108,13 @@
                     indexData = getattr(record, CachingDirectoryService.indexTypeToRecordAttribute[indexType])
                 except AttributeError:
                     continue
-                if isinstance(indexData, str):
-                    indexData = (indexData,)
-                if type(indexData) in (types.ListType, types.TupleType, set):
-                    for item in indexData:
-                        try:
-                            del self.recordsIndexedBy[indexType][item]
-                        except KeyError:
-                            self.log_debug("Missing record index item; type: %s, item: %s" % (indexType, item))
-                else:
-                    raise AssertionError("Data from record attribute must be str, list or tuple")
+                if isinstance(indexData, basestring):
+                    indexData = [indexData]
+                for item in indexData:
+                    try:
+                        del self.recordsIndexedBy[indexType][item]
+                    except KeyError:
+                        self.log_debug("Missing record index item; type: %s, item: %s" % (indexType, item))
         
     def findRecord(self, indexType, indexKey):
         return self.recordsIndexedBy[indexType].get(indexKey)
@@ -215,7 +217,10 @@
         )
 
     def recordCacheForType(self, recordType):
-        return self._recordCaches[recordType]
+        try:
+            return self._recordCaches[recordType]
+        except KeyError:
+            raise UnknownRecordTypeError(recordType)
 
     def listRecords(self, recordType):
         return self.recordCacheForType(recordType).records
@@ -290,8 +295,14 @@
             # Check memcache
             if config.Memcached.Pools.Default.ClientEnabled:
                 key = "dir|%s|%s" % (indexType, indexKey)
-                record = self.memcacheGet(key)
                 self.log_debug("Memcache: checking %s" % (key,))
+
+                try:
+                    record = self.memcacheGet(key)
+                except DirectoryMemcacheError:
+                    self.log_error("Memcache: failed to get %s" % (key,))
+                    record = None
+
                 if record is None:
                     self.log_debug("Memcache: miss %s" % (key,))
                 else:
@@ -300,7 +311,11 @@
                     return record
 
                 # Check negative memcache
-                val = self.memcacheGet("-%s" % (key,))
+                try:
+                    val = self.memcacheGet("-%s" % (key,))
+                except DirectoryMemcacheError:
+                    self.log_error("Memcache: failed to get -%s" % (key,))
+                    val = None
                 if val == 1:
                     self.log_debug("Memcache: negative %s" % (key,))
                     self._disabledKeys[indexType][indexKey] = time.time()
@@ -323,8 +338,13 @@
 
             if config.Memcached.Pools.Default.ClientEnabled:
                 self.log_debug("Memcache: storing (negative) %s" % (key,))
-                self.memcacheSet("-%s" % (key,), 1)
+                try:
+                    self.memcacheSet("-%s" % (key,), 1)
+                except DirectoryMemcacheError:
+                    self.log_error("Memcache: failed to set -%s" % (key,))
+                    pass
 
+
         return None
 
     def queryDirectory(self, recordTypes, indexType, indexKey):

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/calendar.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/calendar.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/calendar.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -27,7 +27,7 @@
     "DirectoryCalendarHomeResource",
 ]
 
-from twisted.internet.defer import succeed, inlineCallbacks, returnValue
+from twisted.internet.defer import succeed
 from twisted.web2 import responsecode
 from twisted.web2.dav import davxml
 from twisted.web2.http import HTTPError
@@ -334,7 +334,7 @@
         raise NotImplementedError("Subclass must implement provisionChild()")
 
     def url(self):
-        return joinURL(self.parent.url(), self.record.uid)
+        return joinURL(self.parent.url(), self.record.uid, "/")
 
     def canonicalURL(self, request):
         return succeed(self.url())
@@ -411,18 +411,20 @@
 
         return davxml.ACL(*aces)
 
-    @inlineCallbacks
     def accessControlList(self, request, inheritance=True, expanding=False, inherited_aces=None):
+        def gotACL(wikiACL):
+            if wikiACL is not None:
+                # ACL depends on wiki server...
+                log.debug("Wiki ACL: %s" % (wikiACL.toxml(),))
+                return succeed(wikiACL)
+            else:
+                # ...otherwise permissions are fixed, and are not subject to
+                # inheritance rules, etc.
+                return succeed(self.defaultAccessControlList())
 
-        wikiACL = (yield getWikiACL(self, request))
-        if wikiACL is not None:
-            # ACL depends on wiki server...
-            log.debug("Wiki ACL: %s" % (wikiACL.toxml(),))
-            returnValue(wikiACL)
-        else:
-            # ...otherwise permissions are fixed, and are not subject to
-            # inheritance rules, etc.
-            returnValue(self.defaultAccessControlList())
+        d = getWikiACL(self, request)
+        d.addCallback(gotACL)
+        return d
 
     def principalCollections(self):
         return self.parent.principalCollections()

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/calendaruserproxy.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/calendaruserproxy.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/calendaruserproxy.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -26,8 +26,7 @@
     "ProxyPostgreSQLDB",
 ]
 
-from twisted.internet.defer import returnValue
-from twisted.internet.defer import succeed, inlineCallbacks
+from twisted.internet.defer import succeed, inlineCallbacks, returnValue
 from twisted.web2 import responsecode
 from twisted.web2.http import HTTPError, StatusResponse
 from twisted.web2.dav import davxml
@@ -210,11 +209,12 @@
             
         returnValue(True)
 
-    @inlineCallbacks
     def setGroupMemberSetPrincipals(self, principals):
         # Map the principals to UIDs.
-        uids = [p.principalUID() for p in principals]
-        yield self._index().setGroupMembers(self.uid, uids)
+        return self._index().setGroupMembers(
+            self.uid,
+            [p.principalUID() for p in principals],
+        )
 
     ##
     # HTTP
@@ -353,11 +353,15 @@
     def expandedGroupMembers(self):
         return self._expandMemberUIDs(infinity=True)
 
-    @inlineCallbacks
     def groupMemberships(self):
         # Get membership UIDs and map to principal resources
-        memberships = yield self._index().getMemberships(self.uid)
-        returnValue([p for p in [self.pcollection.principalForUID(uid) for uid in memberships] if p])
+        d = self._index().getMemberships(self.uid)
+        d.addCallback(lambda memberships: [
+            p for p
+            in [self.pcollection.principalForUID(uid) for uid in memberships]
+            if p
+        ])
+        return d
 
 class ProxyDB(AbstractADBAPIDatabase, LoggingMixIn):
     """
@@ -468,8 +472,8 @@
 
         # Update cache
         for member in itertools.chain(remove_members, add_members,):
-            _ignore = yield self._memcacher.deleteMembership(member)
-        _ignore = yield self._memcacher.deleteMember(principalUID)
+            yield self._memcacher.deleteMembership(member)
+        yield self._memcacher.deleteMember(principalUID)
 
     @inlineCallbacks
     def setGroupMembersInDatabase(self, principalUID, members):
@@ -541,13 +545,13 @@
 
             elif overdue is None:
                 # No timer was previously set
-                self.log_debug("Delaying removal of missing proxy principal '%s'" %
-                    (principalUID,))
+                self.log_debug("Delaying removal of missing proxy principal '%s'"
+                               % (principalUID,))
                 yield self._memcacher.setDeletionTimer(principalUID, delay=delay)
                 returnValue(None)
 
-        self.log_warn("Removing missing proxy principal for '%s'" %
-            (principalUID,))
+        self.log_warn("Removing missing proxy principal for '%s'"
+                      % (principalUID,))
 
         for suffix in ("calendar-proxy-read", "calendar-proxy-write",):
             groupUID = "%s#%s" % (principalUID, suffix,)
@@ -578,46 +582,56 @@
         
         return self._memcacher.clearDeletionTimer(principalUID)
 
-    @inlineCallbacks
     def getMembers(self, principalUID):
         """
         Return the list of group member UIDs for the specified principal.
 
         @return: a deferred returning a C{set} of members.
         """
+        def gotCachedMembers(members):
+            if members is not None:
+                return members
 
-        @inlineCallbacks
-        def _members():
-            result = set([row[0] for row in (yield self.query("select MEMBER from GROUPS where GROUPNAME = :1", (principalUID,)))])
-            returnValue(result)
+            # Cache miss; compute members and update cache
+            def gotMembersFromDB(dbmembers):
+                members = set([row[0] for row in dbmembers])
+                d = self._memcacher.setMembers(principalUID, members)
+                d.addCallback(lambda _: members)
+                return d
 
-        # Pull from cache
-        result = yield self._memcacher.getMembers(principalUID)
-        if result is None:
-            result = (yield _members())
-            yield self._memcacher.setMembers(principalUID, result)
-        returnValue(result)
+            d =  self.query("select MEMBER from GROUPS where GROUPNAME = :1", (principalUID,))
+            d.addCallback(gotMembersFromDB)
+            return d
 
-    @inlineCallbacks
+        d = self._memcacher.getMembers(principalUID)
+        d.addCallback(gotCachedMembers)
+        return d
+
     def getMemberships(self, principalUID):
         """
         Return the list of group principal UIDs the specified principal is a member of.
         
         @return: a deferred returning a C{set} of memberships.
         """
+        def gotCachedMemberships(memberships):
+            if memberships is not None:
+                return memberships
 
-        @inlineCallbacks
-        def _members():
-            result = set([row[0] for row in (yield self.query("select GROUPNAME from GROUPS where MEMBER = :1", (principalUID,)))])
-            returnValue(result)
+            # Cache miss; compute memberships and update cache
+            def gotMembershipsFromDB(dbmemberships):
+                memberships = set([row[0] for row in dbmemberships])
+                d = self._memcacher.setMemberships(principalUID, memberships)
+                d.addCallback(lambda _: memberships)
+                return d
 
-        # Pull from cache
-        result = yield self._memcacher.getMemberships(principalUID)
-        if result is None:
-            result = (yield _members())
-            yield self._memcacher.setMemberships(principalUID, result)
-        returnValue(result)
+            d =  self.query("select GROUPNAME from GROUPS where MEMBER = :1", (principalUID,))
+            d.addCallback(gotMembershipsFromDB)
+            return d
 
+        d = self._memcacher.getMemberships(principalUID)
+        d.addCallback(gotCachedMemberships)
+        return d
+
     @inlineCallbacks
     def _add_to_db(self, principalUID, members):
         """

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/directory.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/directory.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/directory.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,3 +1,4 @@
+# -*- test-case-name: twistedcaldav.directory.test -*-
 ##
 # Copyright (c) 2006-2009 Apple Inc. All rights reserved.
 #
@@ -24,7 +25,6 @@
     "DirectoryRecord",
     "DirectoryError",
     "DirectoryConfigurationError",
-    "UnknownRecordError",
     "UnknownRecordTypeError",
 ]
 
@@ -153,7 +153,7 @@
             record = self.recordWithGUID(guid)
         elif address.startswith("mailto:"):
             for record in self.allRecords():
-                if address in record.calendarUserAddresses:
+                if address[7:] in record.emailAddresses:
                     break
             else:
                 return None
@@ -196,7 +196,7 @@
                         return True
                 elif matchType == 'contains':
                     try:
-                        _ignore_discard = testValue.index(value)
+                        testValue.index(value)
                         return True
                     except ValueError:
                         pass
@@ -312,6 +312,9 @@
         if uid is None:
             uid = guid
 
+        if fullName is None:
+            fullName = ""
+
         self.service               = service
         self.recordType            = recordType
         self.guid                  = guid
@@ -326,8 +329,24 @@
         self.emailAddresses        = emailAddresses
         self.enabledForCalendaring = False
         self.autoSchedule          = False
-        self.calendarUserAddresses = set()
 
+    def get_calendarUserAddresses(self):
+        """
+        Dynamically construct a calendarUserAddresses attribute which describes
+        this L{DirectoryRecord}.
+
+        @see: L{IDirectoryRecord.calendarUserAddresses}.
+        """
+        if not self.enabledForCalendaring:
+            return frozenset()
+        return frozenset(
+            ["urn:uuid:%s" % (self.guid,)] +
+            ["mailto:%s" % (emailAddress,)
+             for emailAddress in self.emailAddresses]
+        )
+
+    calendarUserAddresses = property(get_calendarUserAddresses)
+
     def __cmp__(self, other):
         if not isinstance(other, DirectoryRecord):
             return NotImplemented
@@ -353,24 +372,15 @@
             self.hostedAt = augment.hostedAt
             self.enabledForCalendaring = augment.enabledForCalendaring
             self.autoSchedule = augment.autoSchedule
-            self.calendarUserAddresses = set(augment.calendarUserAddresses)
 
             if self.enabledForCalendaring and self.recordType == self.service.recordType_groups:
                 self.log_error("Group '%s(%s)' cannot be enabled for calendaring" % (self.guid, self.shortName,))
                 self.enabledForCalendaring = False
-    
-            if self.enabledForCalendaring:
-                for email in self.emailAddresses:
-                    self.calendarUserAddresses.add("mailto:%s" % (email.lower(),))
-                self.calendarUserAddresses.add("urn:uuid:%s" % (self.guid,))
-            else:
-                assert len(self.calendarUserAddresses) == 0
 
         else:
             self.enabled = False
             self.hostedAt = ""
             self.enabledForCalendaring = False
-            self.calendarUserAddresses = set()
 
     def members(self):
         return ()
@@ -419,3 +429,6 @@
     """
     Unknown directory record type.
     """
+    def __init__(self, recordType):
+        DirectoryError.__init__(self, "Invalid record type: %s" % (recordType,))
+        self.recordType = recordType

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/idirectory.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/idirectory.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/idirectory.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -70,6 +70,8 @@
     def recordWithCalendarUserAddress(address):
         """
         @param address: the calendar user address of the record to look up.
+        @type address: C{str}
+
         @return: an L{IDirectoryRecord} with the given calendar user
             address, or C{None} if no such record is found.  Note that
             some directory services may not be able to locate records
@@ -103,8 +105,19 @@
     lastName              = Attribute("The last name of this record.")
     emailAddress          = Attribute("The email address of this record.")
     enabledForCalendaring = Attribute("Determines whether this record should be provisioned with a calendar home.")
-    calendarUserAddresses = Attribute("A set of calendar user addresses for this record.")
+    calendarUserAddresses = Attribute(
+        """
+        An iterable of C{str}s representing calendar user addresses for this
+        L{IDirectoryRecord}.
 
+        A "calendar user address", as defined by U{RFC 2445 section
+        4.3.3<http://xml.resource.org/public/rfc/html/rfc2445.html#anchor50>},
+        is simply an URI which identifies this user.  Some of these URIs are
+        relative references to URLs from the root of the calendar server's HTTP
+        hierarchy.
+        """
+    )
+
     def members():
         """
         @return: an iterable of L{IDirectoryRecord}s for the members of this

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/principal.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/principal.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/principal.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,3 +1,4 @@
+# -*- test-case-name: twistedcaldav.directory.test.test_principal -*-
 ##
 # Copyright (c) 2006-2009 Apple Inc. All rights reserved.
 #
@@ -681,6 +682,13 @@
 
             proxyFors.update(proxies)
 
+        uids = set()
+        for principal in tuple(proxyFors):
+            if principal.principalUID() in uids:
+                proxyFors.remove(principal)
+            else:
+                uids.add(principal.principalUID())
+
         returnValue(proxyFors)
 
     def _getRelatives(self, method, record=None, relatives=None, records=None, proxy=None, infinity=False):
@@ -831,9 +839,6 @@
             if config.SSLPort:
                 addresses.add("https://%s:%s%s" % (config.ServerHostName, config.SSLPort, uri))
 
-        # Add a UUID URI based on the record's GUID to the list.
-        addresses.add("urn:uuid:%s" % (self.record.guid,))
-
         return addresses
 
     def enabledAsOrganizer(self):
@@ -876,15 +881,19 @@
             return None
 
     def _homeChildURL(self, name):
-        home = self.calendarHome()
-        if home is None:
+        if not hasattr(self, "calendarHomeURL"):
+            home = self.calendarHome()
+            if home is None:
+                self.calendarHomeURL = None
+                return None
+            else:
+                self.calendarHomeURL = home.url()
+            
+        url = self.calendarHomeURL
+        if url is None:
             return None
         else:
-            url = home.url()
-            if name:
-                url = joinURL(url, name)
-                
-            return url
+            return joinURL(url, name) if name else url
 
     def calendarHome(self):
         # FIXME: self.record.service.calendarHomesCollection smells like a hack

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/resource.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/resource.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/resource.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -20,7 +20,7 @@
 
 __all__ = ["AutoProvisioningResourceMixIn"]
 
-from twisted.internet.defer import maybeDeferred
+from twisted.internet.defer import maybeDeferred, inlineCallbacks, returnValue
 
 class AutoProvisioningResourceMixIn (object):
     """
@@ -50,16 +50,19 @@
         """
         return None
 
+    @inlineCallbacks
     def locateChild(self, request, segments):
         """
         This implementation calls L{provision}, then super's L{locateChild}, thereby
         ensuring that looked-up resources are provisioned.
         """
-        d = maybeDeferred(self.provision)
+        yield maybeDeferred(self.provision)
 
         name = segments[0]
         if name != "":
-            d.addCallback(lambda _: self.provisionChild(name))
-
-        d.addCallback(lambda _: super(AutoProvisioningResourceMixIn, self).locateChild(request, segments))
-        return d
+            child = self.provisionChild(name)
+            if child:
+                returnValue((child, segments[1:],))
+        
+        result = (yield super(AutoProvisioningResourceMixIn, self).locateChild(request, segments))
+        returnValue(result)

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/test/accounts.xml
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/test/accounts.xml	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/test/accounts.xml	2009-12-16 02:48:38 UTC (rev 4865)
@@ -54,6 +54,13 @@
     <email-address>dreid at example.com</email-address>
   </user>
   <user>
+    <uid>sagen</uid>
+    <guid>34360DAD-9BDE-4508-3C34-250394720345</guid>
+    <password>negas</password>
+    <name>Morgen Sagen</name>
+    <email-address>sagen at example.com</email-address>
+  </user>
+  <user>
     <uid>nocalendar</uid>
     <guid>543D28BA-F74F-4D5F-9243-B3E3A61171E5</guid>
     <password>radnelacon</password>

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/test/augments-test-default.xml
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/test/augments-test-default.xml	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/test/augments-test-default.xml	2009-12-16 02:48:38 UTC (rev 4865)
@@ -33,7 +33,6 @@
     <guid>6423F94A-6B76-4A3A-815B-D52CFD77935D</guid>
     <enable>true</enable>
     <enable-calendar>true</enable-calendar>
-    <cuaddr>mailto:wsanchez at example.com</cuaddr>
   </record>
   <record>
     <guid>5A985493-EE2C-4665-94CF-4DFEA3A89500</guid>
@@ -61,8 +60,5 @@
     <enable>true</enable>
     <enable-calendar>true</enable-calendar>
     <auto-schedule>true</auto-schedule>
-    <cuaddr>mailto:usera at example.com</cuaddr>
-    <cuaddr>mailto:user.a at example.com</cuaddr>
-    <cuaddr>mailto:user_a at example.com</cuaddr>
   </record>
 </augments>

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/test/augments-test.xml
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/test/augments-test.xml	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/test/augments-test.xml	2009-12-16 02:48:38 UTC (rev 4865)
@@ -27,7 +27,6 @@
     <guid>6423F94A-6B76-4A3A-815B-D52CFD77935D</guid>
     <enable>true</enable>
     <enable-calendar>true</enable-calendar>
-    <cuaddr>mailto:wsanchez at example.com</cuaddr>
   </record>
   <record>
     <guid>5A985493-EE2C-4665-94CF-4DFEA3A89500</guid>
@@ -55,8 +54,5 @@
     <enable>true</enable>
     <enable-calendar>true</enable-calendar>
     <auto-schedule>true</auto-schedule>
-    <cuaddr>mailto:usera at example.com</cuaddr>
-    <cuaddr>mailto:user.a at example.com</cuaddr>
-    <cuaddr>mailto:user_a at example.com</cuaddr>
   </record>
 </augments>

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/test/test_augment.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/test/test_augment.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/test/test_augment.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -26,16 +26,16 @@
 xmlFileDefault = os.path.join(os.path.dirname(__file__), "augments-test-default.xml")
 
 testRecords = (
-    {"guid":"D11F03A0-97EA-48AF-9A6C-FAC7F3975766", "enabled":True,  "hostedAt":"", "enabledForCalendaring":False, "autoSchedule":False, "calendarUserAddresses":set()},
-    {"guid":"6423F94A-6B76-4A3A-815B-D52CFD77935D", "enabled":True,  "hostedAt":"", "enabledForCalendaring":True, "autoSchedule":False, "calendarUserAddresses":set(("mailto:wsanchez at example.com",))},
-    {"guid":"5A985493-EE2C-4665-94CF-4DFEA3A89500", "enabled":False, "hostedAt":"", "enabledForCalendaring":False, "autoSchedule":False, "calendarUserAddresses":set()},
-    {"guid":"8B4288F6-CC82-491D-8EF9-642EF4F3E7D0", "enabled":True,  "hostedAt":"", "enabledForCalendaring":False, "autoSchedule":False, "calendarUserAddresses":set()},
-    {"guid":"5FF60DAD-0BDE-4508-8C77-15F0CA5C8DD1", "enabled":True,  "hostedAt":"00001", "enabledForCalendaring":False, "autoSchedule":False, "calendarUserAddresses":set()},
-    {"guid":"543D28BA-F74F-4D5F-9243-B3E3A61171E5", "enabled":True,  "hostedAt":"00002", "enabledForCalendaring":False, "autoSchedule":False, "calendarUserAddresses":set()},
-    {"guid":"6A73326A-F781-47E7-A9F8-AF47364D4152", "enabled":True,  "hostedAt":"00002", "enabledForCalendaring":True, "autoSchedule":True, "calendarUserAddresses":set(("mailto:usera at example.com", "mailto:user.a at example.com", "mailto:user_a at example.com",))},
+    {"guid":"D11F03A0-97EA-48AF-9A6C-FAC7F3975766", "enabled":True,  "hostedAt":"", "enabledForCalendaring":False, "autoSchedule":False},
+    {"guid":"6423F94A-6B76-4A3A-815B-D52CFD77935D", "enabled":True,  "hostedAt":"", "enabledForCalendaring":True, "autoSchedule":False},
+    {"guid":"5A985493-EE2C-4665-94CF-4DFEA3A89500", "enabled":False, "hostedAt":"", "enabledForCalendaring":False, "autoSchedule":False},
+    {"guid":"8B4288F6-CC82-491D-8EF9-642EF4F3E7D0", "enabled":True,  "hostedAt":"", "enabledForCalendaring":False, "autoSchedule":False},
+    {"guid":"5FF60DAD-0BDE-4508-8C77-15F0CA5C8DD1", "enabled":True,  "hostedAt":"00001", "enabledForCalendaring":False, "autoSchedule":False},
+    {"guid":"543D28BA-F74F-4D5F-9243-B3E3A61171E5", "enabled":True,  "hostedAt":"00002", "enabledForCalendaring":False, "autoSchedule":False},
+    {"guid":"6A73326A-F781-47E7-A9F8-AF47364D4152", "enabled":True,  "hostedAt":"00002", "enabledForCalendaring":True, "autoSchedule":True},
 )
 
-testRecordDefault = {"guid":"A4318887-F2C7-4A70-9056-B88CC8DB26F1", "enabled":True,  "hostedAt":"00001", "enabledForCalendaring":True, "autoSchedule":False, "calendarUserAddresses":set()}
+testRecordDefault = {"guid":"A4318887-F2C7-4A70-9056-B88CC8DB26F1", "enabled":True,  "hostedAt":"00001", "enabledForCalendaring":True, "autoSchedule":False}
 
 class AugmentTests(TestCase):
 

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/test/test_cachedirectory.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/test/test_cachedirectory.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/test/test_cachedirectory.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -69,7 +69,6 @@
                         guid = cacheRecord.guid,
                         enabled=True,
                         enabledForCalendaring = True,
-                        calendarUserAddresses = set(record.get("cua")),
                     )
                     
                     cacheRecord.addAugmentInformation(augmentRecord)

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/test/test_opendirectory.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/test/test_opendirectory.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/test/test_opendirectory.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -62,6 +62,22 @@
         def service(self):
             return self._service
 
+        def test_fullNameNone(self):
+            record = OpenDirectoryRecord(
+                service               = self.service(),
+                recordType            = DirectoryService.recordType_users,
+                guid                  = "B1F93EB1-DA93-4772-9141-81C250DA36C2",
+                nodeName              = "/LDAPv2/127.0.0.1",
+                shortNames            = ("user",),
+                authIDs               = set(),
+                fullName              = None,
+                firstName             = "Some",
+                lastName              = "User",
+                emailAddresses        = set(("someuser at example.com",)),
+                memberGUIDs           = [],
+            )
+            self.assertEquals(record.fullName, "")
+
         def test_invalidODDigest(self):
             record = OpenDirectoryRecord(
                 service               = self.service(),
@@ -177,3 +193,49 @@
             recordTypes = [DirectoryService.recordType_users, DirectoryService.recordType_groups, DirectoryService.recordType_locations, DirectoryService.recordType_resources]
             self.service().queryDirectory(recordTypes, self.service().INDEX_TYPE_GUID, "1234567890", lookupMethod=lookupMethod)
             self.assertFalse(self.service().recordWithGUID("1234567890"))
+
+        def test_queryDirectoryLocalUsers(self):
+            """ Test for lookup on local users, ensuring they don't get
+                faulted in """
+
+            def lookupMethod(obj, attr, value, matchType, casei, recordType, attributes, count=0):
+
+                data = [
+                    {
+                        dsattributes.kDS1AttrGeneratedUID : "1234567890",
+                        dsattributes.kDSNAttrRecordName : ["user1", "User 1"],
+                        dsattributes.kDSNAttrRecordType : dsattributes.kDSStdRecordTypeUsers,
+                        dsattributes.kDSNAttrMetaNodeLocation : "/Local/Default",
+                    },
+                    {
+                        dsattributes.kDS1AttrGeneratedUID : "987654321",
+                        dsattributes.kDSNAttrRecordName : ["user2", "User 2"],
+                        dsattributes.kDSNAttrRecordType : dsattributes.kDSStdRecordTypeUsers,
+                        dsattributes.kDSNAttrMetaNodeLocation : "/LDAPv3/127.0.0.1",
+                    },
+                ]
+                results = []
+                for entry in data:
+                    if entry[attr] == value:
+                        results.append(("", entry))
+                return results
+
+            recordTypes = [DirectoryService.recordType_users, DirectoryService.recordType_groups, DirectoryService.recordType_locations, DirectoryService.recordType_resources]
+            self.service().queryDirectory(recordTypes, self.service().INDEX_TYPE_GUID, "1234567890", lookupMethod=lookupMethod)
+            self.service().queryDirectory(recordTypes, self.service().INDEX_TYPE_GUID, "987654321", lookupMethod=lookupMethod)
+            self.assertFalse(self.service().recordWithGUID("1234567890"))
+            self.assertTrue(self.service().recordWithGUID("987654321"))
+
+        def test_queryDirectoryEmailAddresses(self):
+            """ Test to ensure we only ask for users when email address is
+                part of the query """
+
+            def lookupMethod(obj, attr, value, matchType, casei, recordType, attributes, count=0):
+
+                if recordType != ['dsRecTypeStandard:Users']:
+                    raise ValueError
+
+                return []
+
+            recordTypes = [DirectoryService.recordType_users, DirectoryService.recordType_groups, DirectoryService.recordType_locations, DirectoryService.recordType_resources]
+            self.service().queryDirectory(recordTypes, self.service().INDEX_TYPE_CUA, "mailto:user1 at example.com", lookupMethod=lookupMethod)

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/test/test_proxyprincipalmembers.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/test/test_proxyprincipalmembers.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/test/test_proxyprincipalmembers.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -14,7 +14,8 @@
 # limitations under the License.
 ##
 
-from twisted.internet.defer import DeferredList, inlineCallbacks, returnValue
+from twisted.internet.defer import DeferredList, inlineCallbacks, returnValue,\
+    succeed
 from twisted.web2.dav import davxml
 
 from twistedcaldav.directory.directory import DirectoryService
@@ -130,8 +131,8 @@
     def _proxyForTest(self, recordType, recordName, expectedProxies, read_write):
         principal = self._getPrincipalByShortName(recordType, recordName)
         proxies = (yield principal.proxyFor(read_write))
-        proxies = set([principal.displayName() for principal in proxies])
-        self.assertEquals(proxies, set(expectedProxies))
+        proxies = sorted([principal.displayName() for principal in proxies])
+        self.assertEquals(proxies, sorted(expectedProxies))
 
     def test_groupMembersRegular(self):
         """
@@ -260,9 +261,10 @@
 
             def setGroupMembers(self, uid, members):
                 self.members = members
+                return succeed(None)
 
             def getMembers(self, uid):
-                return self.members
+                return succeed(self.members)
 
 
         user = self._getPrincipalByShortName(self.directoryService.recordType_users,
@@ -325,6 +327,21 @@
             True
         )
 
+    @inlineCallbacks
+    def test_proxyForDuplicates(self):
+
+        yield self._addProxy(
+            (DirectoryService.recordType_locations, "gemini",),
+            "calendar-proxy-write",
+            (DirectoryService.recordType_groups, "grunts",),
+        )
+
+        yield self._proxyForTest(
+            DirectoryService.recordType_users, "wsanchez", 
+            ("Mecury Seven", "Gemini Twelve", "Apollo Eleven", "Orion", ),
+            True
+        )
+
     def test_readOnlyProxyFor(self):
 
         return self._proxyForTest(

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/util.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/util.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/util.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -104,6 +104,9 @@
     def dirname(self):
         return ""
 
+    def changed(self):
+        pass
+
     def restat(self, reraise=True):
         pass
 

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/xmlaugmentsparser.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/xmlaugmentsparser.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/xmlaugmentsparser.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -38,7 +38,6 @@
 ELEMENT_HOSTEDAT          = "hosted-at"
 ELEMENT_ENABLECALENDAR    = "enable-calendar"
 ELEMENT_AUTOSCHEDULE      = "auto-schedule"
-ELEMENT_CUADDR            = "cuaddr"
 
 ATTRIBUTE_REPEAT          = "repeat"
 
@@ -51,7 +50,6 @@
     ELEMENT_HOSTEDAT:       "hostedAt",
     ELEMENT_ENABLECALENDAR: "enabledForCalendaring",
     ELEMENT_AUTOSCHEDULE:   "autoSchedule",
-    ELEMENT_CUADDR:         "calendarUserAddresses",
 }
 
 class XMLAugmentsParser(object):
@@ -105,8 +103,6 @@
                     ELEMENT_AUTOSCHEDULE,
                 ):
                     fields[node.tag] = node.text == VALUE_TRUE
-                elif node.tag == ELEMENT_CUADDR:
-                    fields.setdefault(node.tag, set()).add(node.text)
                 else:
                     log.error("Invalid element '%s' in augment file: '%s'" % (node.tag, self.xmlFile,), raiseException=RuntimeError)
                     

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/xmlfile.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/xmlfile.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/directory/xmlfile.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -79,13 +79,19 @@
         
         for recordType in recordTypes:
             for xmlPrincipal in self._accounts()[recordType].itervalues():
-                
                 record = XMLDirectoryRecord(
                     service       = self,
                     recordType    = recordType,
                     shortNames    = tuple(xmlPrincipal.shortNames),
                     xmlPrincipal  = xmlPrincipal,
                 )
+
+                record = XMLDirectoryRecord(
+                    service       = self,
+                    recordType    = recordType,
+                    shortNames    = tuple(xmlPrincipal.shortNames),
+                    xmlPrincipal  = xmlPrincipal,
+                )
                 
                 # Look up augment information
                 # TODO: this needs to be deferred but for now we hard code the deferred result because

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/extensions.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/extensions.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/extensions.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,3 +1,4 @@
+# -*- test-case-name: twistedcaldav.test.test_extensions -*-
 ##
 # Copyright (c) 2005-2009 Apple Inc. All rights reserved.
 #
@@ -970,15 +971,16 @@
                         value = cgi.escape(value)
 
                     output.append(
-                        """<tr class="%(even)s">"""
-                        """<td valign="top">%(name)s</td>"""
-                        """<td><pre>%(value)s</pre></td>"""
-                        """</tr>"""
-                        % {
-                            "even": even.state() and "even" or "odd",
-                            "name": name,
-                            "value": value,
-                        }
+                        str("""<tr class="%(even)s">"""
+                            """<td valign="top">%(name)s</td>"""
+                            """<td><pre>%(value)s</pre></td>"""
+                            """</tr>"""
+                            % {
+                                "even": even.state() and "even" or "odd",
+                                "name": name,
+                                "value": value,
+                            }
+                        )
                     )
 
                 output.append("</div>")

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/index.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/index.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/index.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -57,7 +57,7 @@
 log = Logger()
 
 db_basename = db_prefix + "sqlite"
-schema_version = "7"
+schema_version = "8"
 collection_types = {"Calendar": "Regular Calendar Collection", "iTIP": "iTIP Calendar Collection"}
 
 icalfbtype_to_indexfbtype = {
@@ -439,6 +439,11 @@
             )
             """
         )
+        q.execute(
+            """
+            create index STARTENDFLOAT on TIMESPAN (START, END, FLOAT)
+            """
+        )
 
         if uidunique:
             #
@@ -455,22 +460,27 @@
                 """
             )
 
-    def _db_upgrade(self, old_version):
+    def _db_can_upgrade(self, old_version):
         """
-        Upgrade the database tables.
+        Can we do an in-place upgrade
         """
         
-        # When going to version 7 all we need to do is add a column to the time-range
+        # Previous versions can be upgraded as per _db_upgrade_data_tables
+        return True
+
+    def _db_upgrade_data_tables(self, q, old_version):
+        """
+        Upgrade the data from an older version of the DB.
+        """
+
+        # When going to version 8 all we need to do is add an index
+        if old_version < "8":
+            q.execute("create index STARTENDFLOAT on TIMESPAN (START, END, FLOAT)")
+
+        # When going to version 7,8 all we need to do is add a column to the resource and timespan
         if old_version < "7":
-            self._db_connection = sqlite.connect(self.dbpath, isolation_level=None)
-            q = self._db_connection.cursor()
             q.execute("alter table RESOURCE add column ORGANIZER text default '?'")
             q.execute("alter table TIMESPAN add column FBTYPE text(1) default '?'")
-            self._db_upgrade_schema(q)
-            self._db_close()
-            return self._db()
-        else:
-            return super(AbstractCalendarIndex, self)._db_upgrade(old_version)
 
     def notExpandedBeyond(self, minDate):
         """

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/instance.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/instance.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/instance.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -324,7 +324,7 @@
 
         # Make sure override RECURRENCE-ID is a valid instance of the master
         if got_master:
-            if str(rid) not in self.instances:
+            if str(rid) not in self.instances and compareDateTime(rid, limit) <= 0:
                 if self.ignoreInvalidInstances:
                     return
                 else:

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/localization.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/localization.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/localization.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -360,7 +360,12 @@
 
         # Make sure the gnutext translations directory exists
         if not os.path.exists(gnuRoot):
-            os.mkdir(gnuRoot)
+            try:
+                os.mkdir(gnuRoot)
+            except OSError:
+                log.warn("Could not create gnuttext translation directory: %s"
+                    % (gnuRoot,))
+                return
 
         # Scan for Apple translations (directories ending in .lproj)
         for item in os.listdir(lprojRoot):

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/method/propfind.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/method/propfind.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/method/propfind.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -158,8 +158,6 @@
                         except:
                             f = Failure()
     
-                            log.err("Error reading property %r for resource %s: %s" % (property, uri, f.value))
-    
                             status = statusForFailure(f, "getting property: %s" % (property,))
                             if status not in properties_by_status:
                                 properties_by_status[status] = []

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/method/put.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/method/put.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/method/put.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -40,7 +40,6 @@
     parent = (yield request.locateResource(parentURL))
 
     if isPseudoCalendarCollectionResource(parent):
-        self.fp.restat(False)
 
         # Content-type check
         content_type = request.headers.getHeader("content-type")
@@ -51,6 +50,9 @@
         # Read the calendar component from the stream
         try:
             calendardata = (yield allDataFromStream(request.stream))
+            if not hasattr(request, "extendedLogItems"):
+                request.extendedLogItems = {}
+            request.extendedLogItems["cl"] = str(len(calendardata)) if calendardata else "0"
 
             # We must have some data at this point
             if calendardata is None:
@@ -74,4 +76,12 @@
 
     else:
         result = (yield super(CalDAVFile, self).http_PUT(request))
+
+        if not hasattr(request, "extendedLogItems"):
+            request.extendedLogItems = {}
+        clength = request.headers.getHeader("content-length", 0)
+        if clength == 0:
+            clength = self.fp.getsize()
+        request.extendedLogItems["cl"] = str(clength)
+        
         returnValue(result)

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/method/put_common.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/method/put_common.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/method/put_common.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,3 +1,4 @@
+# -*- test-case-name: twistedcaldav.test.test_validation -*-
 ##
 # Copyright (c) 2005-2009 Apple Inc. All rights reserved.
 #
@@ -48,7 +49,7 @@
 from twistedcaldav.config import config
 from twistedcaldav.caldavxml import NoUIDConflict, ScheduleTag
 from twistedcaldav.caldavxml import NumberOfRecurrencesWithinLimits
-from twistedcaldav.caldavxml import caldav_namespace
+from twistedcaldav.caldavxml import caldav_namespace, MaxAttendeesPerInstance
 from twistedcaldav.customxml import calendarserver_namespace ,\
     TwistedCalendarHasPrivateCommentsProperty, TwistedSchedulingObjectResource,\
     TwistedScheduleMatchETags
@@ -339,7 +340,12 @@
                 result, message = self.validAttendeeListSizeCheck()
                 if not result:
                     log.err(message)
-                    raise HTTPError(ErrorResponse(responsecode.FORBIDDEN, (caldav_namespace, "max-attendees-per-instance")))
+                    raise HTTPError(
+                        ErrorResponse(
+                            responsecode.FORBIDDEN,
+                            MaxAttendeesPerInstance.fromString(str(config.MaxAttendeesPerInstance))
+                        )
+                    )
 
                 # Normalize the calendar user addresses once we know we have valid
                 # calendar data

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/notify.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/notify.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/notify.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -333,8 +333,14 @@
     """
 
     delaySeconds = 5
-    sendAnywayAfterCount = 5
 
+    # sendAnywayAfterCount can be used to control how many times a notification
+    # countdown timer is reset because of new changes.  Once a notification
+    # has been delayed 'sendAnywayAfterCount' times, it is sent anyway,
+    # otherwise a busy calendar might never have a notification sent out.
+    # Set this to 0 to disable the timer reset feature.
+    sendAnywayAfterCount = 0
+
     def __init__(self, notifiers, reactor=None, delaySeconds=None,
         sendAnywayAfterCount=None):
 

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/caldav.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/caldav.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/caldav.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -72,9 +72,10 @@
 
         # Check for local address matches first
         if cuaddr.startswith("mailto:") and config.Scheduling[cls.serviceType()]["EmailDomain"]:
-            splits = cuaddr[7:].split("?")
+            addr = cuaddr[7:].split("?")[0]
             domain = config.Scheduling[cls.serviceType()]["EmailDomain"]
-            if splits[0].endswith(domain):
+            account, addrDomain = addr.split("@")
+            if addrDomain == domain:
                 return True
 
         elif (cuaddr.startswith("http://") or cuaddr.startswith("https://")) and config.Scheduling[cls.serviceType()]["HTTPDomain"]:
@@ -132,8 +133,7 @@
     @inlineCallbacks
     def generateResponse(self, recipient, responses):
         # Hash the iCalendar data for use as the last path element of the URI path
-        calendar_str = str(self.scheduler.calendar)
-        name = md5(calendar_str + str(time.time()) + recipient.inbox.fp.path).hexdigest() + ".ics"
+        name = md5(self.scheduler.calendardata + str(time.time()) + recipient.inbox.fp.path).hexdigest() + ".ics"
     
         # Get a resource for the new item
         childURL = joinURL(recipient.inboxURL, name)
@@ -157,6 +157,9 @@
         if autoprocessed:
             # No need to write the inbox item as it has already been auto-processed
             responses.add(recipient.cuaddr, responsecode.OK, reqstatus=iTIPRequestStatus.MESSAGE_DELIVERED)
+            if not hasattr(self.scheduler.request, "extendedLogItems"):
+                self.scheduler.request.extendedLogItems = {}
+            self.scheduler.request.extendedLogItems["itip.auto"] = self.scheduler.request.extendedLogItems.get("itip.auto", 0) + 1
             returnValue(True)
         else:
             # Copy calendar to inbox 

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/icaldiff.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/icaldiff.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/icaldiff.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -21,6 +21,7 @@
 from twistedcaldav.log import Logger
 from twistedcaldav.scheduling.cuaddress import normalizeCUAddr
 from twistedcaldav.scheduling.itip import iTipGenerator
+from twistedcaldav import accounting
 
 from difflib import unified_diff
 
@@ -36,17 +37,17 @@
 
 class iCalDiff(object):
     
-    def __init__(self, calendar1, calendar2, smart_merge):
+    def __init__(self, oldcalendar, newcalendar, smart_merge):
         """
         
-        @param calendar1:
-        @type calendar1:
-        @param calendar2:
-        @type calendar2:
+        @param oldcalendar:
+        @type oldcalendar:
+        @param newcalendar:
+        @type newcalendar:
         """
         
-        self.calendar1 = calendar1
-        self.calendar2 = calendar2
+        self.oldcalendar = oldcalendar
+        self.newcalendar = newcalendar
         self.smart_merge = smart_merge
     
     def organizerDiff(self):
@@ -75,34 +76,32 @@
             return calendar
         
         # Normalize components for comparison
-        self.calendar1 = duplicateAndNormalize(self.calendar1)
-        self.calendar2 = duplicateAndNormalize(self.calendar2)
+        oldcalendar_norm = duplicateAndNormalize(self.oldcalendar)
+        newcalendar_norm = duplicateAndNormalize(self.newcalendar)
 
-        result = self.calendar1 == self.calendar2
-        if not result:
-            self._logDiffError("organizerDiff: Mismatched calendar objects")
+        result = oldcalendar_norm == newcalendar_norm
         return result
 
     def _organizerMerge(self):
         """
-        Merge changes to ATTENDEE properties in calendar1 into calendar2.
+        Merge changes to ATTENDEE properties in oldcalendar into newcalendar.
         """
-        organizer = normalizeCUAddr(self.calendar2.masterComponent().propertyValue("ORGANIZER"))
+        organizer = normalizeCUAddr(self.newcalendar.masterComponent().propertyValue("ORGANIZER"))
         self._doSmartMerge(organizer, True)
 
     def _doSmartMerge(self, ignore_attendee, is_organizer):
         """
-        Merge changes to ATTENDEE properties in calendar1 into calendar2.
+        Merge changes to ATTENDEE properties in oldcalendar into newcalendar.
         """
         
-        old_master = self.calendar1.masterComponent()
-        new_master = self.calendar2.masterComponent()
+        old_master = self.oldcalendar.masterComponent()
+        new_master = self.newcalendar.masterComponent()
         
         # Do master merge first
         self._tryComponentMerge(old_master, new_master, ignore_attendee, is_organizer)
 
         # New check the matching components
-        for old_component in self.calendar1.subcomponents():
+        for old_component in self.oldcalendar.subcomponents():
             
             # Make sure we have an appropriate component
             if old_component.name() == "VTIMEZONE":
@@ -112,17 +111,17 @@
                 continue
 
             # Find matching component in new calendar
-            new_component = self.calendar2.overriddenComponent(rid)
+            new_component = self.newcalendar.overriddenComponent(rid)
             if new_component is None:
                 # If the old component was cancelled ignore when an attendee
                 if not is_organizer and old_component.propertyValue("STATUS") == "CANCELLED":
                     continue
                 
                 # Determine whether the instance is still valid in the new calendar
-                new_component = self.calendar2.deriveInstance(rid)
+                new_component = self.newcalendar.deriveInstance(rid)
                 if new_component:
                     # Derive a new instance from the new calendar and transfer attendee status
-                    self.calendar2.addComponent(new_component)
+                    self.newcalendar.addComponent(new_component)
                     self._tryComponentMerge(old_component, new_component, ignore_attendee, is_organizer)
                 else:
                     # Ignore the old instance as it no longer exists
@@ -131,7 +130,7 @@
                 self._tryComponentMerge(old_component, new_component, ignore_attendee, is_organizer)
 
         # Check the new instances not in the old calendar
-        for new_component in self.calendar2.subcomponents():
+        for new_component in self.newcalendar.subcomponents():
             
             # Make sure we have an appropriate component
             if new_component.name() == "VTIMEZONE":
@@ -141,16 +140,16 @@
                 continue
 
             # Find matching component in old calendar
-            old_component = self.calendar1.overriddenComponent(rid)
+            old_component = self.oldcalendar.overriddenComponent(rid)
             if old_component is None:
                 # If the new component is cancelled ignore when an attendee
                 if not is_organizer and new_component.propertyValue("STATUS") == "CANCELLED":
                     continue
                 
                 # Try to derive a new instance in the client and transfer attendee status
-                old_component = self.calendar1.deriveInstance(rid)
+                old_component = self.oldcalendar.deriveInstance(rid)
                 if old_component:
-                    self.calendar1.addComponent(old_component)
+                    self.oldcalendar.addComponent(old_component)
                     self._tryComponentMerge(old_component, new_component, ignore_attendee, is_organizer)
                 else:
                     # Ignore as we have no state for the new instance
@@ -248,11 +247,11 @@
 
         if config.MaxInstancesForRRULE != 0:
             try:
-                self.calendar1.truncateRecurrence(config.MaxInstancesForRRULE)
+                self.oldcalendar.truncateRecurrence(config.MaxInstancesForRRULE)
             except (ValueError, TypeError), ex:
                 log.err("Cannot truncate calendar resource: %s" % (ex,))
 
-        self.newCalendar = self.calendar1.duplicate()
+        self.newCalendar = self.oldcalendar.duplicate()
         self.newMaster = self.newCalendar.masterComponent()
 
         changeCausesReply = False
@@ -285,60 +284,61 @@
                
             return exdates, map, master
         
-        exdates1, map1, master1 = mapComponents(self.calendar1)
-        set1 = set(map1.keys())
-        exdates2, map2, master2 = mapComponents(self.calendar2)
-        set2 = set(map2.keys())
+        exdatesold, mapold, masterold = mapComponents(self.oldcalendar)
+        setold = set(mapold.keys())
+        exdatesnew, mapnew, masternew = mapComponents(self.newcalendar)
+        setnew = set(mapnew.keys())
 
         # Handle case where iCal breaks events without a master component
-        if master2 is not None and master1 is None:
-            master2Start = master2.getStartDateUTC()
-            key2 = (master2.name(), master2.propertyValue("UID"), master2Start)
-            if key2 not in set1:
+        if masternew is not None and masterold is None:
+            masternewStart = masternew.getStartDateUTC()
+            keynew = (masternew.name(), masternew.propertyValue("UID"), masternewStart)
+            if keynew not in setold:
                 # The DTSTART in the fake master does not match a RECURRENCE-ID in the real data.
                 # We have to do a brute force search for the component that matches based on DTSTART
-                for component1 in self.calendar1.subcomponents():
-                    if component1.name() == "VTIMEZONE":
+                for componentold in self.oldcalendar.subcomponents():
+                    if componentold.name() == "VTIMEZONE":
                         continue
-                    if master2Start == component1.getStartDateUTC():
+                    if masternewStart == componentold.getStartDateUTC():
                         break
                 else:
                     # Nothing matches - this has to be treated as an error
-                    log.debug("attendeeMerge: Unable to match fake master component: %s" % (key2,))
+                    self._logDiffError("attendeeMerge: Unable to match fake master component: %s" % (keynew,))
                     return False, False, (), None
             else:
-                component1 = self.calendar1.overriddenComponent(master2Start)
+                componentold = self.oldcalendar.overriddenComponent(masternewStart)
             
             # Take the recurrence ID from component1 and fix map2/set2
-            key2 = (master2.name(), master2.propertyValue("UID"), None)
-            component2 = map2[key2]
-            del map2[key2]
+            keynew = (masternew.name(), masternew.propertyValue("UID"), None)
+            componentnew = mapnew[keynew]
+            del mapnew[keynew]
             
-            rid1 = component1.getRecurrenceIDUTC()
-            newkey2 = (master2.name(), master2.propertyValue("UID"), rid1)
-            map2[newkey2] = component2
-            set2.remove(key2)
-            set2.add(newkey2)
+            ridold = componentold.getRecurrenceIDUTC()
+            newkeynew = (masternew.name(), masternew.propertyValue("UID"), ridold)
+            mapnew[newkeynew] = componentnew
+            setnew.remove(keynew)
+            setnew.add(newkeynew)
     
-        # All the components in calendar1 must be in calendar2 unless they are CANCELLED
-        result = set1 - set2
-        for key in result:
+        # All the components in oldcalendar must be in newcalendar unless they are CANCELLED
+        for key in setold - setnew:
             _ignore_name, _ignore_uid, rid = key
-            component = map1[key]
+            component = mapold[key]
             if component.propertyValue("STATUS") != "CANCELLED":
                 # Attendee may decline by EXDATE'ing an instance - we need to handle that
-                if exdates2 is None or rid in exdates2:
+                if exdatesnew is None or rid in exdatesnew:
                     # Mark Attendee as DECLINED in the server instance
                     if self._attendeeDecline(self.newCalendar.overriddenComponent(rid)):
                         changeCausesReply = True
                         changedRids.append(toString(rid) if rid else "")
                 else:
-                    log.debug("attendeeMerge: Missing uncancelled component from first calendar: %s" % (key,))
-                    return False, False, (), None
+                    # We used to generate a 403 here - but instead we now ignore this error and let the server data
+                    # override the client
+                    self._logDiffError("attendeeMerge: Missing uncancelled component from first calendar: %s" % (key,))
             else: 
-                if exdates2 is not None and rid not in exdates2:
-                    log.debug("attendeeMerge: Missing EXDATE for cancelled components from first calendar: %s" % (key,))
-                    return False, False, (), None
+                if exdatesnew is not None and rid not in exdatesnew:
+                    # We used to generate a 403 here - but instead we now ignore this error and let the server data
+                    # override the client
+                    self._logDiffError("attendeeMerge: Missing EXDATE for cancelled components from first calendar: %s" % (key,))
                 else:
                     # Remove the CANCELLED component from the new calendar and add an EXDATE
                     overridden = self.newCalendar.overriddenComponent(rid)
@@ -346,52 +346,63 @@
                     if self.newMaster:
                         self.newMaster.addProperty(Property("EXDATE", [rid,]))
         
-        # Derive a new component in the new calendar for each new one in set2
-        for key in set2 - set1:
+        # Derive a new component in the new calendar for each new one in setnew
+        for key in setnew - setold:
             
             # First check if the attendee's copy is cancelled and properly EXDATE'd
             # and skip it if so.
             _ignore_name, _ignore_uid, rid = key
-            component2 = map2[key]
-            if component2.propertyValue("STATUS") == "CANCELLED":
-                if exdates1 is None or rid not in exdates1:
-                    log.debug("attendeeMerge: Cancelled component not found in first calendar (or no EXDATE): %s" % (key,))
-                    return False, False, (), None
+            componentnew = mapnew[key]
+            if componentnew.propertyValue("STATUS") == "CANCELLED":
+                if exdatesold is None or rid not in exdatesold:
+                    # We used to generate a 403 here - but instead we now ignore this error and let the server data
+                    # override the client
+                    self._logDiffError("attendeeMerge: Cancelled component not found in first calendar (or no EXDATE): %s" % (key,))
+                    setnew.remove(key)
                 else:
                     # Derive new component with STATUS:CANCELLED and remove EXDATE
                     newOverride = self.newCalendar.deriveInstance(rid, allowCancelled=True)
                     if newOverride is None:
-                        log.debug("attendeeMerge: Could not derive instance for cancelled component: %s" % (key,))
-                        return False, False, (), None
-                    self.newCalendar.addComponent(newOverride)
+                        # We used to generate a 403 here - but instead we now ignore this error and let the server data
+                        # override the client
+                        self._logDiffError("attendeeMerge: Could not derive instance for cancelled component: %s" % (key,))
+                        setnew.remove(key)
+                    else:
+                        self.newCalendar.addComponent(newOverride)
             else:
                 # Derive new component
                 newOverride = self.newCalendar.deriveInstance(rid)
                 if newOverride is None:
-                    log.debug("attendeeMerge: Could not derive instance for uncancelled component: %s" % (key,))
-                    return False, False, (), None
-                self.newCalendar.addComponent(newOverride)
+                    # We used to generate a 403 here - but instead we now ignore this error and let the server data
+                    # override the client
+                    self._logDiffError("attendeeMerge: Could not derive instance for uncancelled component: %s" % (key,))
+                    setnew.remove(key)
+                else:
+                    self.newCalendar.addComponent(newOverride)
 
         # So now newCalendar has all the same components as set2. Check changes and do transfers.
         
         # Make sure the same VCALENDAR properties match
-        if not self._checkVCALENDARProperties(self.newCalendar, self.calendar2):
+        if not self._checkVCALENDARProperties(self.newCalendar, self.newcalendar):
+            # We used to generate a 403 here - but instead we now ignore this error and let the server data
+            # override the client
             self._logDiffError("attendeeMerge: VCALENDAR properties do not match")
-            return False, False, (), None
 
         # Now we transfer per-Attendee
-        # data from calendar2 into newCalendar to sync up changes, whilst verifying that other
+        # data from newcalendar into newCalendar to sync up changes, whilst verifying that other
         # key properties are unchanged
         declines = []
-        for key in set2:
+        for key in setnew:
             _ignore_name, _ignore_uid, rid = key
             serverData = self.newCalendar.overriddenComponent(rid)
-            clientData = map2[key]
+            clientData = mapnew[key]
             
             allowed, reply = self._transferAttendeeData(serverData, clientData, declines)
             if not allowed:
+                # We used to generate a 403 here - but instead we now ignore this error and let the server data
+                # override the client
                 self._logDiffError("attendeeMerge: Mismatched calendar objects")
-                return False, False, (), None
+                #return False, False, (), None
             changeCausesReply |= reply
             if reply:
                 changedRids.append(toString(rid) if rid else "")
@@ -407,7 +418,7 @@
                         changeCausesReply = True
                         changedRids.append(toString(decline) if decline else "")
                 else:
-                    log.debug("Unable to override and instance to mark as DECLINED: %s" % (decline,))
+                    self._logDiffError("attendeeMerge: Unable to override an instance to mark as DECLINED: %s" % (decline,))
                     return False, False, (), None
 
         return True, changeCausesReply, changedRids, self.newCalendar
@@ -430,9 +441,9 @@
 
     def _transferAttendeeData(self, serverComponent, clientComponent, declines):
         
-        # First check validity of date-time related properties
-        if not self._checkInvalidChanges(serverComponent, clientComponent, declines):
-            return False, False
+        # We are skipping this check now - instead we let the server data override the broken client data
+        # First check validity of date-time related properties and get removed components which are declines
+        self._checkInvalidChanges(serverComponent, clientComponent, declines)
         
         # Now look for items to transfer from one to the other.
         # We care about the ATTENDEE's PARTSTAT, TRANSP, VALARMS, X-APPLE-NEEDS-REPLY,
@@ -462,9 +473,8 @@
         self._transferProperty("LAST-MODIFIED", serverComponent, clientComponent)
         self._transferProperty("X-APPLE-NEEDS-REPLY", serverComponent, clientComponent)
         
-        # Dropbox
-        if not self._transferDropBoxData(serverComponent, clientComponent):
-            return False, False
+        # Dropbox - this now never returns false
+        self._transferDropBoxData(serverComponent, clientComponent)
 
         # Handle VALARMs
         serverComponent.removeAlarms()
@@ -483,14 +493,14 @@
         if not clientDropbox:
             return True
         elif not serverDropbox:
-            # Attendee not allowed to add a dropbox
-            log.debug("Attendee not allowed to add dropbox: %s" % (clientDropbox,))
-            return False
+            # Attendee not allowed to add a dropbox - ignore this
+            self._logDiffError("Attendee not allowed to add dropbox: %s" % (clientDropbox,))
+            return True
         else:
-            # Values must be the same
+            # Values must be the same - ignore this
             if serverDropbox != clientDropbox:
-                log.debug("Attendee not allowed to change dropbox from: %s to: %s" % (serverDropbox, clientDropbox,))
-                return False
+                self._logDiffError("Attendee not allowed to change dropbox from: %s to: %s" % (serverDropbox, clientDropbox,))
+                return True
 
             # Remove existing ATTACH's from server
             for attachment in tuple(serverComponent.properties("ATTACH")):
@@ -622,39 +632,41 @@
         
         rids = {}
 
-        map1 = mapComponents(self.calendar1)
-        set1 = set(map1.keys())
-        map2 = mapComponents(self.calendar2)
-        set2 = set(map2.keys())
+        oldmap = mapComponents(self.oldcalendar)
+        oldset = set(oldmap.keys())
+        newmap = mapComponents(self.newcalendar)
+        newset = set(newmap.keys())
 
-        # Now verify that each component in set1 matches what is in set2
-        for key in (set1 & set2):
-            component1 = map1[key]
-            component2 = map2[key]
+        # Now verify that each component in oldset matches what is in newset
+        for key in (oldset & newset):
+            component1 = oldmap[key]
+            component2 = newmap[key]
             self._diffComponents(component1, component2, rids)
         
-        # Now verify that each additional component in set1 matches a derived component in set2
-        for key in set1 - set2:
-            component1 = map1[key]
-            component2 = self.calendar2.deriveInstance(key[2])
-            if component2 is None:
+        # Now verify that each additional component in oldset matches a derived component in newset
+        for key in oldset - newset:
+            oldcomponent = oldmap[key]
+            newcomponent = self.newcalendar.deriveInstance(key[2])
+            if newcomponent is None:
                 continue
-            self._diffComponents(component1, component2, rids)
+            self._diffComponents(oldcomponent, newcomponent, rids)
         
-        # Now verify that each additional component in set1 matches a derived component in set2
-        for key in set2 - set1:
-            component1 = self.calendar1.deriveInstance(key[2])
-            if component1 is None:
+        # Now verify that each additional component in oldset matches a derived component in newset
+        for key in newset - oldset:
+            oldcomponent = self.oldcalendar.deriveInstance(key[2])
+            if oldcomponent is None:
                 continue
-            component2 = map2[key]
-            self._diffComponents(component1, component2, rids)
+            newcomponent = newmap[key]
+            self._diffComponents(oldcomponent, newcomponent, rids)
         
         return rids
 
-    def _attendeeDuplicateAndNormalize(self, comp):
+    def _componentDuplicateAndNormalize(self, comp):
         comp = comp.duplicate()
         comp.normalizePropertyValueLists("EXDATE")
         comp.removePropertyParameters("ORGANIZER", ("SCHEDULE-STATUS",))
+        comp.removePropertyParameters("ATTENDEE", ("SCHEDULE-STATUS", "SCHEDULE-FORCE-SEND",))
+        comp.removeAlarms()
         comp.normalizeAll()
         comp.normalizeAttachments()
         iTipGenerator.prepareSchedulingMessage(comp, reply=True)
@@ -669,8 +681,8 @@
             return
         
         # Duplicate then normalize for comparison
-        comp1 = self._attendeeDuplicateAndNormalize(comp1)
-        comp2 = self._attendeeDuplicateAndNormalize(comp2)
+        comp1 = self._componentDuplicateAndNormalize(comp1)
+        comp2 = self._componentDuplicateAndNormalize(comp2)
 
         # Diff all the properties
         comp1.transformAllFromNative()
@@ -710,10 +722,30 @@
 
     def _logDiffError(self, title):
 
-        diff = "\n".join(unified_diff(
-            str(self.calendar1).split("\n"),
-            str(self.calendar2).split("\n"),
+        strcal1 = str(self.oldcalendar)
+        strcal2 = str(self.newcalendar)
+        strdiff = "\n".join(unified_diff(
+            strcal1.split("\n"),
+            strcal2.split("\n"),
             fromfile='Existing Calendar Object',
             tofile='New Calendar Object',
         ))
-        log.debug("%s:\n%s" % (title, diff,))
+        
+        logstr = """%s
+
+------ Existing Calendar Data ------
+%s
+------ New Calendar Data ------
+%s
+------ Diff ------
+%s
+""" % (title, strcal1, strcal2, strdiff,)
+
+        loggedUID = self.oldcalendar.resourceUID()
+        if loggedUID:
+            loggedUID = loggedUID.encode("base64")[:-1]
+        else:
+            loggedUID = "Unknown"
+        loggedName = accounting.emitAccounting("Implicit Errors", loggedUID, logstr)
+        if loggedName:
+            log.err("Generating Implicit Error accounting at path: %s" % (loggedName,))

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/imip.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/imip.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/imip.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -14,7 +14,7 @@
 # limitations under the License.
 ##
 
-from twisted.internet.defer import inlineCallbacks
+from twisted.internet.defer import inlineCallbacks, returnValue
 
 from twisted.python.failure import Failure
 
@@ -56,6 +56,20 @@
             if self.freebusy:
                 raise ValueError("iMIP VFREEBUSY REQUESTs not supported.")
 
+            method = self.scheduler.calendar.propertyValue("METHOD") 
+            if method not in (
+                "PUBLISH",
+                "REQUEST",
+                "ADD",
+                "CANCEL",
+                "DECLINE_COUNTER",
+            ):
+                log.info("Could not do server-to-imip method: %s" % (method,))
+                for recipient in self.recipients:
+                    err = HTTPError(ErrorResponse(responsecode.FORBIDDEN, (caldav_namespace, "recipient-failed")))
+                    self.responses.add(recipient.cuaddr, Failure(exc_value=err), reqstatus=iTIPRequestStatus.NO_USER_SUPPORT)
+                returnValue(None)
+
             caldata = str(self.scheduler.calendar)
 
             for recipient in self.recipients:

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/implicit.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/implicit.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/implicit.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -34,9 +34,10 @@
 from twistedcaldav.scheduling.cuaddress import InvalidCalendarUser,\
     LocalCalendarUser
 from twistedcaldav.scheduling.icaldiff import iCalDiff
-from twistedcaldav.scheduling.itip import iTipGenerator
+from twistedcaldav.scheduling.itip import iTipGenerator, iTIPRequestStatus
 from twistedcaldav.scheduling.scheduler import CalDAVScheduler
 from twistedcaldav.scheduling.utils import getCalendarObjectForPrincipals
+from twistedcaldav.directory.principal import DirectoryCalendarPrincipalResource
 
 __all__ = [
     "ImplicitScheduler",
@@ -284,16 +285,21 @@
             if attendee.params().get("PARTSTAT", ["NEEDS-ACTION"])[0] == "NEEDS-ACTION":
                 self.request.suppressRefresh = True
         
-        self.request.doing_attendee_refresh = True
+        if hasattr(self.request, "doing_attendee_refresh"):
+            self.request.doing_attendee_refresh += 1
+        else:
+            self.request.doing_attendee_refresh = 1
         try:
-            result = (yield self.processRequests())
+            refreshCount = (yield self.processRequests())
         finally:
-            delattr(self.request, "doing_attendee_refresh")
+            self.request.doing_attendee_refresh -= 1
+            if self.request.doing_attendee_refresh == 0:
+                delattr(self.request, "doing_attendee_refresh")
 
-        if result:
+        if refreshCount:
             if not hasattr(self.request, "extendedLogItems"):
                 self.request.extendedLogItems = {}
-            self.request.extendedLogItems["itip.refreshes"] = result
+            self.request.extendedLogItems["itip.refreshes"] = refreshCount
 
     @inlineCallbacks
     def sendAttendeeReply(self, request, resource, calendar, attendee):
@@ -798,6 +804,8 @@
                 if not doITipReply:
                     log.debug("Implicit - attendee '%s' is updating UID: '%s' but change is not significant" % (self.attendee, self.uid))
                     returnValue(None)
+                log.debug("Attendee '%s' is allowed to update UID: '%s' with local organizer '%s'" % (self.attendee, self.uid, self.organizer))
+
             elif isinstance(self.organizerAddress, LocalCalendarUser):
                 # Check to see whether all instances are CANCELLED
                 if self.calendar.hasPropertyValueInAllComponents(Property("STATUS", "CANCELLED")):
@@ -808,14 +816,24 @@
                     log.debug("Attendee '%s' is not allowed to update UID: '%s' - missing organizer copy - removing entire event" % (self.attendee, self.uid,))
                     self.return_status = ImplicitScheduler.STATUS_ORPHANED_EVENT
                     returnValue(None)
+
             elif isinstance(self.organizerAddress, InvalidCalendarUser):
-                log.debug("Attendee '%s' is not allowed to update UID: '%s' with invalid organizer '%s'" % (self.attendee, self.uid, self.organizer))
-                raise HTTPError(ErrorResponse(responsecode.FORBIDDEN, (caldav_namespace, "valid-attendee-change")))
+                # We will allow the attendee to do anything in this case, but we will mark the organizer
+                # with an schedule-status error
+                log.debug("Attendee '%s' is allowed to update UID: '%s' with invalid organizer '%s'" % (self.attendee, self.uid, self.organizer))
+                self.calendar.setParameterToValueForPropertyWithValue(
+                    "SCHEDULE-STATUS",
+                    iTIPRequestStatus.NO_USER_SUPPORT_CODE,
+                    "ORGANIZER",
+                    self.organizer)
+                returnValue(None)
+
             else:
                 # We have a remote Organizer of some kind. For now we will allow the Attendee
                 # to make any change they like as we cannot verify what is reasonable. In reality
                 # we ought to be comparing the Attendee changes against the attendee's own copy
                 # and restrict changes based on that when the organizer's copy is not available.
+                log.debug("Attendee '%s' is allowed to update UID: '%s' with remote organizer '%s'" % (self.attendee, self.uid, self.organizer))
                 changedRids = None
 
             log.debug("Implicit - attendee '%s' is updating UID: '%s'" % (self.attendee, self.uid))

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/itip.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/itip.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/itip.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -99,10 +99,13 @@
             master_valarms = [comp for comp in current_master.subcomponents() if comp.name() == "VALARM"]
             private_comments = current_master.properties("X-CALENDARSERVER-PRIVATE-COMMENT")
             transps = current_master.properties("TRANSP")
+            organizer = current_master.getProperty("ORGANIZER")
+            organizer_schedule_status = organizer.params().get("SCHEDULE-STATUS", None) if organizer else None
         else:
             master_valarms = ()
             private_comments = ()
             transps = ()
+            organizer_schedule_status = None
 
         if itip_message.masterComponent() is not None:
             
@@ -117,11 +120,15 @@
                 master_component.addProperty(comment)
             for transp in transps:
                 master_component.replaceProperty(transp)
+            if organizer_schedule_status: 
+                organizer = master_component.getProperty("ORGANIZER")
+                if organizer:
+                    organizer.params()["SCHEDULE-STATUS"] = organizer_schedule_status
                 
             # Now try to match recurrences
             for component in new_calendar.subcomponents():
                 if component.name() != "VTIMEZONE" and component.getRecurrenceIDUTC() is not None:
-                    iTipProcessing.transferItems(calendar, master_valarms, private_comments, transps, component)
+                    iTipProcessing.transferItems(calendar, master_valarms, private_comments, transps, organizer_schedule_status, component)
             
             # Now try to match recurrences
             for component in calendar.subcomponents():
@@ -132,7 +139,7 @@
                         new_component = new_calendar.deriveInstance(rid, allowCancelled=allowCancelled)
                         if new_component:
                             new_calendar.addComponent(new_component)
-                            iTipProcessing.transferItems(calendar, master_valarms, private_comments, transps, new_component)
+                            iTipProcessing.transferItems(calendar, master_valarms, private_comments, transps, organizer_schedule_status, new_component)
             
             # Replace the entire object
             return new_calendar, rids
@@ -149,7 +156,7 @@
                         calendar.addComponent(component)
                 else:
                     component = component.duplicate()
-                    iTipProcessing.transferItems(calendar, master_valarms, private_comments, transps, component, remove_matched=True)
+                    iTipProcessing.transferItems(calendar, master_valarms, private_comments, transps, organizer_schedule_status, component, remove_matched=True)
                     calendar.addComponent(component)
                     if recipient and not autoprocessing:
                         iTipProcessing.fixForiCal3((component,), recipient, config.Scheduling.CalDAV.OldDraftCompatibility)
@@ -446,7 +453,7 @@
         return attendee.value(), partstat_changed, private_comment_changed
 
     @staticmethod
-    def transferItems(from_calendar, master_valarms, private_comments, transps, to_component, remove_matched=False):
+    def transferItems(from_calendar, master_valarms, private_comments, transps, organizer_schedule_status, to_component, remove_matched=False):
 
         rid = to_component.getRecurrenceIDUTC()
 
@@ -458,6 +465,13 @@
             [to_component.addProperty(prop) for prop in matched.properties("X-CALENDARSERVER-ATTENDEE-COMMENT")]
             [to_component.replaceProperty(prop) for prop in matched.properties("TRANSP")]
 
+            organizer = matched.getProperty("ORGANIZER")
+            organizer_schedule_status = organizer.params().get("SCHEDULE-STATUS", None) if organizer else None
+            if organizer_schedule_status: 
+                organizer = to_component.getProperty("ORGANIZER")
+                if organizer:
+                    organizer.params()["SCHEDULE-STATUS"] = organizer_schedule_status
+
             # Remove the old one
             if remove_matched:
                 from_calendar.removeComponent(matched)
@@ -468,6 +482,10 @@
             [to_component.addComponent(alarm) for alarm in master_valarms]
             [to_component.addProperty(comment) for comment in private_comments]
             [to_component.replaceProperty(transp) for transp in transps]
+            if organizer_schedule_status: 
+                organizer = to_component.getProperty("ORGANIZER")
+                if organizer:
+                    organizer.params()["SCHEDULE-STATUS"] = organizer_schedule_status
     
     @staticmethod
     def fixForiCal3(components, recipient, compatibilityMode):
@@ -668,20 +686,30 @@
     String constants for various iTIP status codes we use.
     """
     
-    MESSAGE_PENDING_CODE    = "1.0"
-    MESSAGE_SENT_CODE       = "1.1"
-    MESSAGE_DELIVERED_CODE  = "1.2"
+    MESSAGE_PENDING_CODE        = "1.0"
+    MESSAGE_SENT_CODE           = "1.1"
+    MESSAGE_DELIVERED_CODE      = "1.2"
 
+    SUCCESS_CODE                = "2.0"
+
+    INVALID_CALENDAR_USER_CODE  = "3.7"
+    NO_AUTHORITY_CODE           = "3.8"
+
+    BAD_REQUEST_CODE            = "5.0"
+    SERVICE_UNAVAILABLE_CODE    = "5.1"
+    INVALID_SERVICE_CODE        = "5.2"
+    NO_USER_SUPPORT_CODE        = "5.3"
+
     MESSAGE_PENDING         = MESSAGE_PENDING_CODE + ";Scheduling message send is pending"
     MESSAGE_SENT            = MESSAGE_SENT_CODE + ";Scheduling message has been sent"
     MESSAGE_DELIVERED       = MESSAGE_DELIVERED_CODE + ";Scheduling message has been delivered"
     
-    SUCCESS                 = "2.0;Success"
+    SUCCESS                 = SUCCESS_CODE + ";Success"
 
-    INVALID_CALENDAR_USER   = "3.7;Invalid Calendar User"
-    NO_AUTHORITY            = "3.8;No authority"
+    INVALID_CALENDAR_USER   = INVALID_CALENDAR_USER_CODE + ";Invalid Calendar User"
+    NO_AUTHORITY            = NO_AUTHORITY_CODE + ";No authority"
 
-    BAD_REQUEST             = "5.0;Service cannot handle request"
-    SERVICE_UNAVAILABLE     = "5.1;Service unavailable"
-    INVALID_SERVICE         = "5.2;Invalid calendar service"
-    NO_USER_SUPPORT         = "5.3;No scheduling support for user"
+    BAD_REQUEST             = BAD_REQUEST_CODE + ";Service cannot handle request"
+    SERVICE_UNAVAILABLE     = SERVICE_UNAVAILABLE_CODE + ";Service unavailable"
+    INVALID_SERVICE         = INVALID_SERVICE_CODE + ";Invalid calendar service"
+    NO_USER_SUPPORT         = NO_USER_SUPPORT_CODE + ";No scheduling support for user"

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/scheduler.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/scheduler.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/scheduler.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -26,7 +26,7 @@
 from twisted.web2.http import HTTPError, Response, StatusResponse
 from twisted.web2.http_headers import MimeType
 
-from twistedcaldav import caldavxml
+from twistedcaldav import caldavxml, dateops
 from twistedcaldav.accounting import accountingEnabled, emitAccounting
 from twistedcaldav.caldavxml import caldav_namespace, TimeRange
 from twistedcaldav.config import config
@@ -99,6 +99,7 @@
         if not hasattr(self.request, "extendedLogItems"):
             self.request.extendedLogItems = {}
         self.request.extendedLogItems["recipients"] = len(self.recipients)
+        self.request.extendedLogItems["cl"] = str(len(self.calendardata))
     
         # Do some extra authorization checks
         self.checkAuthorization()
@@ -117,6 +118,7 @@
         self.originator = originator
         self.recipients = recipients
         self.calendar = calendar
+        self.calendardata = str(self.calendar)
         self.internal_request = internal_request
 
         # Do some extra authorization checks
@@ -237,6 +239,7 @@
         # Parse the calendar object from the HTTP request stream
         try:
             self.calendar = (yield Component.fromIStream(self.request.stream))
+            self.calendardata = str(self.calendar)
         except:
             # FIXME: Bare except
             log.err("Error while handling %s: %s" % (self.method, Failure(),))
@@ -317,7 +320,13 @@
                 if dtstart is None or dtend is None:
                     log.err("VFREEBUSY start/end not valid: %s" % (self.calendar,))
                     raise HTTPError(ErrorResponse(responsecode.FORBIDDEN, (caldav_namespace, "valid-calendar-data"), description="VFREEBUSY start/end not valid"))
-                self.timeRange = TimeRange(start="20000101T000000Z", end="20070102T000000Z")
+
+                # Some clients send floating instead of UTC - coerce to UTC
+                if dtstart.tzinfo is None or dtend.tzinfo is None:
+                    log.err("VFREEBUSY start or end not UTC: %s" % (self.calendar,))
+                    raise HTTPError(ErrorResponse(responsecode.FORBIDDEN, (caldav_namespace, "valid-calendar-data"), description="VFREEBUSY start or end not UTC"))
+
+                self.timeRange = TimeRange(start=dateops.toString(dtstart), end=dateops.toString(dtend))
                 self.timeRange.start = dtstart
                 self.timeRange.end = dtend
         
@@ -355,7 +364,7 @@
                         str("".join(["    %s\n" % (recipient,) for recipient in self.recipients])),
                         str(self.request.serverInstance),
                         str(self.method),
-                        str(self.calendar)
+                        self.calendardata,
                     )
                 )
 

Copied: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/test/test_caldav.py (from rev 4858, CalendarServer/trunk/twistedcaldav/scheduling/test/test_caldav.py)
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/test/test_caldav.py	                        (rev 0)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/test/test_caldav.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -0,0 +1,33 @@
+##
+# Copyright (c) 2005-2009 Apple Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##
+
+import twistedcaldav.test.util
+from twistedcaldav.scheduling.caldav import ScheduleViaCalDAV
+from twistedcaldav.config import config
+
+class CalDAV (twistedcaldav.test.util.TestCase):
+    """
+    twistedcaldav.scheduling.caldav tests
+    """
+
+    def test_matchCalendarUserAddress(self):
+        """
+        Make sure we do an exact comparison on EmailDomain
+        """
+        config.Scheduling[ScheduleViaCalDAV.serviceType()]["EmailDomain"] = "example.com"
+        self.assertTrue(ScheduleViaCalDAV.matchCalendarUserAddress("mailto:user at example.com"))
+        self.assertFalse(ScheduleViaCalDAV.matchCalendarUserAddress("mailto:user at foo.example.com"))
+        self.assertFalse(ScheduleViaCalDAV.matchCalendarUserAddress("mailto:user at xyzexample.com"))

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/test/test_icaldiff.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/test/test_icaldiff.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/test/test_icaldiff.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -594,7 +594,19 @@
 END:VCALENDAR
 """,
                 "mailto:user2 at example.com",
-                (False, False, (), None)
+                (True, False, (), """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DTEND:20080601T130000Z
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE;PARTSTAT=NEEDS-ACTION;RSVP=TRUE:mailto:user2 at example.com
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+END:VEVENT
+END:VCALENDAR
+""")
             ),
             (
                 "#1.4 Simple component, valarm change",
@@ -753,7 +765,24 @@
 END:VCALENDAR
 """,
                 "mailto:user2 at example.com",
-                (False, False, (), None)
+                (True, False, (), """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DTEND:20080601T130000Z
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE;PARTSTAT=NEEDS-ACTION;RSVP=TRUE:mailto:user2 at example.com
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+BEGIN:VALARM
+ACTION:DISPLAY
+DESCRIPTION:Test for Attendee
+TRIGGER;RELATED=START:-PT10M
+END:VALARM
+END:VEVENT
+END:VCALENDAR
+""")
             ),
             (
                 "#1.7 Simple component, vtimezone no change",
@@ -917,7 +946,37 @@
 END:VCALENDAR
 """,
                 "mailto:user2 at example.com",
-                (False, False, (), None)
+                (True, False, (), """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VTIMEZONE
+TZID:US-Eastern
+LAST-MODIFIED:20040110T032845Z
+BEGIN:STANDARD
+DTSTART:19901026T060000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART:19900404T010000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;TZID=US-Eastern:20080601T120000
+DTEND;TZID=US-Eastern:20080601T130000
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE;PARTSTAT=NEEDS-ACTION;RSVP=TRUE:mailto:user2 at example.com
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+END:VEVENT
+END:VCALENDAR
+""")
             ),
             (
                 "#1.9 Simple component, vtimezone substitute",
@@ -1323,7 +1382,28 @@
 END:VCALENDAR
 """,
                 "mailto:user2 at example.com",
-                (False, False, (), None)
+                (True, False, (), """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DTEND:20080601T130000Z
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE;PARTSTAT=NEEDS-ACTION;RSVP=TRUE:mailto:user2 at example.com
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:COUNT=400;FREQ=DAILY
+END:VEVENT
+BEGIN:VEVENT
+UID:12345-67890
+RECURRENCE-ID:20080602T120000Z
+DTSTART:20080602T123000Z
+DTEND:20080602T130000Z
+ATTENDEE;PARTSTAT=NEEDS-ACTION;RSVP=TRUE:mailto:user2 at example.com
+ORGANIZER:mailto:user1 at example.com
+END:VEVENT
+END:VCALENDAR
+""")
             ),
             (
                 "#1.4 Complex component, additional override no change ok",
@@ -1557,7 +1637,37 @@
 END:VCALENDAR
 """,
                 "mailto:user2 at example.com",
-                (False, False, (), None)
+                (True, False, (), """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DTEND:20080601T130000Z
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE;PARTSTAT=NEEDS-ACTION;RSVP=TRUE:mailto:user2 at example.com
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:COUNT=400;FREQ=DAILY
+END:VEVENT
+BEGIN:VEVENT
+UID:12345-67890
+RECURRENCE-ID:20080602T120000Z
+DTSTART:20080602T123000Z
+DTEND:20080602T130000Z
+ATTENDEE;PARTSTAT=NEEDS-ACTION;RSVP=TRUE:mailto:user2 at example.com
+ORGANIZER:mailto:user1 at example.com
+END:VEVENT
+BEGIN:VEVENT
+UID:12345-67890
+RECURRENCE-ID:20080604T120000Z
+DTSTART:20080604T120000Z
+DTEND:20080604T130000Z
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE;PARTSTAT=NEEDS-ACTION;RSVP=TRUE:mailto:user2 at example.com
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+END:VEVENT
+END:VCALENDAR
+""")
             ),
         )
 
@@ -2195,7 +2305,20 @@
 END:VCALENDAR
 """,
                 "mailto:user2 at example.com",
-                (False, False, (), None,)
+                (True, False, (), """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+RECURRENCE-ID:20080604T120000Z
+DTSTART:20080604T130000Z
+DTEND:20080604T140000Z
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE;PARTSTAT=NEEDS-ACTION;RSVP=TRUE:mailto:user2 at example.com
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+END:VEVENT
+END:VCALENDAR
+""",)
             ),
             (
                 "#1.6 Add uncancelled component, no master",
@@ -2237,7 +2360,20 @@
 END:VCALENDAR
 """,
                 "mailto:user2 at example.com",
-                (False, False, (), None,)
+                (True, False, (), """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+RECURRENCE-ID:20080604T120000Z
+DTSTART:20080604T130000Z
+DTEND:20080604T140000Z
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE;PARTSTAT=NEEDS-ACTION;RSVP=TRUE:mailto:user2 at example.com
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+END:VEVENT
+END:VCALENDAR
+""",)
             ),
         )
 
@@ -2339,7 +2475,19 @@
 END:VCALENDAR
 """,
                 "mailto:user2 at example.com",
-                (False, False, (), None,)
+                (True, False, (), """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DTEND:20080601T130000Z
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE;PARTSTAT=ACCEPTED:mailto:user2 at example.com
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+END:VEVENT
+END:VCALENDAR
+""",)
             ),
             (
                 "#1.3 Different dropbox",
@@ -2378,7 +2526,23 @@
 END:VCALENDAR
 """,
                 "mailto:user2 at example.com",
-                (False, False, (), None,)
+                (True, False, (), """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DTEND:20080601T130000Z
+ATTACH;VALUE=URI:http://localhost/calendars/users/dropbox/6073432E-644B-49
+ 65-B6F7-C3F08E70BBF9.dropbox/caldavd.plist
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE;PARTSTAT=ACCEPTED:mailto:user2 at example.com
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+X-APPLE-DROPBOX:/calendars/users/dropbox/6073432E-644B-4965-B6F7-C3F08E70B
+ BF9.dropbox
+END:VEVENT
+END:VCALENDAR
+""",)
             ),
             (
                 "#1.4 Change dropbox - remove ATTACH",
@@ -2627,7 +2791,20 @@
 END:VCALENDAR
 """,
                 "mailto:user2 at example.com",
-                (False, False, (), None,)
+                (True, True, ('20080601T120000Z',), """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+RECURRENCE-ID:20080601T120000Z
+DTSTART:20080601T130000Z
+DTEND:20080601T140000Z
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE;PARTSTAT=ACCEPTED:mailto:user2 at example.com
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+END:VEVENT
+END:VCALENDAR
+""",)
             ),
             (
                 "#2.1 Two overridden components, partstat change - ok",

Copied: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/test/test_imip.py (from rev 4858, CalendarServer/trunk/twistedcaldav/scheduling/test/test_imip.py)
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/test/test_imip.py	                        (rev 0)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/scheduling/test/test_imip.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -0,0 +1,90 @@
+##
+# Copyright (c) 2005-2007 Apple Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##
+
+from twisted.internet.defer import inlineCallbacks
+from twisted.web2 import responsecode
+from twistedcaldav.ical import Component
+from twistedcaldav.scheduling.cuaddress import RemoteCalendarUser
+from twistedcaldav.scheduling.imip import ScheduleViaIMip
+from twistedcaldav.scheduling.itip import iTIPRequestStatus
+from twistedcaldav.scheduling.scheduler import ScheduleResponseQueue
+import twistedcaldav.test.util
+
+class iMIPProcessing (twistedcaldav.test.util.TestCase):
+    """
+    iCalendar support tests
+    """
+
+    class FakeSchedule(object):
+        
+        def __init__(self, calendar):
+            self.calendar = calendar
+
+    @inlineCallbacks
+    def test_no_reply(self):
+        
+        data = """BEGIN:VCALENDAR
+VERSION:2.0
+METHOD:REPLY
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DTEND:20080601T130000Z
+ORGANIZER;CN="User 01":mailto:user1 at example.com
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+END:VEVENT
+END:VCALENDAR
+"""
+
+        scheduler = iMIPProcessing.FakeSchedule(Component.fromString(data))
+        recipients = (RemoteCalendarUser("mailto:user1 at example.com"),)
+        responses = ScheduleResponseQueue("REPLY", responsecode.OK)
+
+        delivery = ScheduleViaIMip(scheduler, recipients, responses, False)
+        yield delivery.generateSchedulingResponses()
+        
+        self.assertEqual(len(responses.responses), 1)
+        self.assertEqual(str(responses.responses[0].children[1]), iTIPRequestStatus.NO_USER_SUPPORT)
+
+    @inlineCallbacks
+    def test_no_freebusy(self):
+        
+        data = """BEGIN:VCALENDAR
+VERSION:2.0
+METHOD:REQUEST
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VFREEBUSY
+UID:12345-67890
+DTSTART:20080601T120000Z
+DTEND:20080601T130000Z
+ORGANIZER;CN="User 01":mailto:user1 at example.com
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+END:VFREEBUSY
+END:VCALENDAR
+"""
+
+        scheduler = iMIPProcessing.FakeSchedule(Component.fromString(data))
+        recipients = (RemoteCalendarUser("mailto:user1 at example.com"),)
+        responses = ScheduleResponseQueue("REQUEST", responsecode.OK)
+
+        delivery = ScheduleViaIMip(scheduler, recipients, responses, True)
+        yield delivery.generateSchedulingResponses()
+        
+        self.assertEqual(len(responses.responses), 1)
+        self.assertEqual(str(responses.responses[0].children[1]), iTIPRequestStatus.SERVICE_UNAVAILABLE)

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/sql.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/sql.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/sql.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,5 +1,5 @@
 ##
-# Copyright (c) 2005-2007 Apple Inc. All rights reserved.
+# Copyright (c) 2005-2009 Apple Inc. All rights reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,9 +18,10 @@
 Generic SQL database access object.
 """
 
-__all__ = [
+__all__ = [ 
+    "db_prefix",
+    "DatabaseError",
     "AbstractSQLDatabase",
-    "db_prefix"
 ]
 
 import os
@@ -36,7 +37,11 @@
 
 db_prefix = ".db."
 
-class AbstractSQLDatabase(object):
+
+DatabaseError = sqlite.DatabaseError
+
+
+class AbstractSQLDatabase (object):
     """
     A generic SQL database.
     """
@@ -83,9 +88,8 @@
                     self._db_connection = sqlite.connect(db_filename, isolation_level=None)
                 else:
                     self._db_connection = sqlite.connect(db_filename)
-            except:
-                log.err("Unable to open database: %s" % (self,))
-                raise
+            except DatabaseError:
+                raise DatabaseError("Unable to open database %s" % (self.dbpath,))
 
             #
             # Set up the schema
@@ -95,24 +99,9 @@
                 # Create CALDAV table if needed
 
                 if self._test_schema_table(q):
-                    q.execute(
-                        """
-                        select VALUE from CALDAV
-                         where KEY = 'SCHEMA_VERSION'
-                        """)
-                    version = q.fetchone()
+                    
+                    version, dbtype = self._get_schema_version(q)
 
-                    if version is not None: version = version[0]
-
-                    q.execute(
-                        """
-                        select VALUE from CALDAV
-                         where KEY = 'TYPE'
-                        """)
-                    dbtype = q.fetchone()
-
-                    if dbtype is not None: dbtype = dbtype[0]
-
                     if (version != self._db_version()) or (dbtype != self._db_type()):
 
                         # Clean-up first
@@ -121,13 +110,6 @@
                         self._db_connection.close()
                         del(self._db_connection)
 
-                        if version != self._db_version():
-                            log.err("Database %s has different schema (v.%s vs. v.%s)"
-                                    % (db_filename, version, self._db_version()))
-                            
-                            # Upgrade the DB
-                            return self._db_upgrade(version)
-
                         if dbtype != self._db_type():
                             log.err("Database %s has different type (%s vs. %s)"
                                     % (db_filename, dbtype, self._db_type()))
@@ -136,6 +118,13 @@
                             os.remove(db_filename)
                             return self._db()
 
+                        if version != self._db_version():
+                            log.err("Database %s has different schema (v.%s vs. v.%s)"
+                                    % (db_filename, version, self._db_version()))
+                            
+                            # Upgrade the DB
+                            return self._db_upgrade(version)
+
                 else:
                     self._db_init(db_filename, q)
 
@@ -151,6 +140,27 @@
         """)
         return q.fetchone()
 
+    def _get_schema_version(self, q):
+        q.execute(
+            """
+            select VALUE from CALDAV
+             where KEY = 'SCHEMA_VERSION'
+            """)
+        version = q.fetchone()
+
+        if version is not None: version = version[0]
+
+        q.execute(
+            """
+            select VALUE from CALDAV
+             where KEY = 'TYPE'
+            """)
+        dbtype = q.fetchone()
+
+        if dbtype is not None: dbtype = dbtype[0]
+
+        return version, dbtype
+
     def _db_init(self, db_filename, q):
         """
         Initialise the underlying database tables.
@@ -224,24 +234,38 @@
         if do_commit:
             self._db_commit()
 
+    def _db_can_upgrade(self, old_version):
+        
+        return self.persistent
+
     def _db_upgrade(self, old_version):
         """
         Upgrade the database tables.
         """
         
-        if self.persistent:
+        if self._db_can_upgrade(old_version):
             self._db_connection = sqlite.connect(self.dbpath, isolation_level=None)
             q = self._db_connection.cursor()
-            self._db_upgrade_data_tables(q, old_version)
-            self._db_upgrade_schema(q)
+            q.execute("begin exclusive transaction")
+
+            # We re-check whether the schema version again AFTER we've got an exclusive
+            # lock as some other server process may have snuck in and already upgraded it
+            # before we got the lock, or whilst we were waiting for it.
+            version, _ignore_dbtype = self._get_schema_version(q)
+
+            if version != self._db_version():
+                self._db_upgrade_data_tables(q, old_version)
+                self._db_upgrade_schema(q)
+
+            q.execute("commit")
             self._db_close()
-            return self._db()
         else:
             # Non-persistent DB's by default can be removed and re-created. However, for simple
             # DB upgrades they SHOULD override this method and handle those for better performance.
             os.remove(self.dbpath)
-            return self._db()
-    
+
+        return self._db()
+
     def _db_upgrade_data_tables(self, q, old_version):
         """
         Upgrade the data from an older version of the DB.
@@ -304,7 +328,7 @@
         try:
             q.execute(sql, query_params)
             return q.fetchall()
-        except:
+        except DatabaseError:
             log.err("Exception while executing SQL on DB %s: %r %r" % (self, sql, query_params))
             raise
         finally:

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/static.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/static.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/static.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -43,6 +43,7 @@
 
 from twisted.internet.defer import fail, succeed, inlineCallbacks, returnValue, maybeDeferred
 from twisted.python.failure import Failure
+from twisted.python.filepath import FilePath
 from twisted.web2 import responsecode, http, http_headers
 from twisted.web2.http import HTTPError, StatusResponse
 from twisted.web2.dav import davxml
@@ -389,12 +390,19 @@
         return self._propertyCollection
 
     def createSimilarFile(self, path):
-        if path == self.fp.path:
+        if self.comparePath(path):
             return self
 
         similar = super(CalDAVFile, self).createSimilarFile(path)
 
         if isCalendarCollectionResource(self):
+
+            # Short-circuit stat with information we know to be true at this point
+            if isinstance(path, FilePath) and hasattr(self, "knownChildren"):
+                if os.path.basename(path.path) in self.knownChildren:
+                    path.existsCached = True
+                    path.isDirCached = False
+
             #
             # Override the dead property store
             #
@@ -565,6 +573,13 @@
         else:
             self._provisioned_file = True
 
+        # If the file already exists we can just exit here - there is no need to go further
+        if self.fp.exists():
+            return False
+
+        # At this point the original FilePath did not indicate an existing file, but we should
+        # recheck it to see if some other request sneaked in and already created/provisioned it
+
         fp = self.fp
 
         fp.restat(False)
@@ -589,10 +604,10 @@
                 # Check our status again, and re-raise if we're not a collection.
                 if not self.isCollection():
                     raise
-            fp.restat(False)
+            fp.changed()
         else:
             fp.open("w").close()
-            fp.restat(False)
+            fp.changed()
 
         return True
 
@@ -680,7 +695,7 @@
                                 responsecode.INTERNAL_SERVER_ERROR,
                                 "Unable to move calendar home."
                             ))
-                        child.fp.restat(False)
+                        child.fp.changed()
                         break
                 else:
                     #
@@ -772,7 +787,7 @@
         return self.createSimilarFile(self.fp.child(name).path)
 
     def createSimilarFile(self, path):
-        if path == self.fp.path:
+        if self.comparePath(path):
             return self
         else:
             similar = CalDAVFile(path, principalCollections=self.principalCollections())
@@ -849,7 +864,7 @@
         return True
 
     def createSimilarFile(self, path):
-        if path == self.fp.path:
+        if self.comparePath(path):
             return self
         else:
             return CalDAVFile(path, principalCollections=self.principalCollections())
@@ -945,7 +960,7 @@
         return False
 
     def createSimilarFile(self, path):
-        if path == self.fp.path:
+        if self.comparePath(path):
             return self
         else:
             return responsecode.NOT_FOUND
@@ -997,7 +1012,7 @@
         return False
 
     def createSimilarFile(self, path):
-        if path == self.fp.path:
+        if self.comparePath(path):
             return self
         else:
             return responsecode.NOT_FOUND
@@ -1028,7 +1043,7 @@
         self.parent = parent
 
     def createSimilarFile(self, path):
-        if path == self.fp.path:
+        if self.comparePath(path):
             return self
         else:
             return DropBoxCollectionFile(path, self)
@@ -1042,7 +1057,7 @@
         CalDAVFile.__init__(self, path, principalCollections=parent.principalCollections())
 
     def createSimilarFile(self, path):
-        if path == self.fp.path:
+        if self.comparePath(path):
             return self
         else:
             return DropBoxChildFile(path, self)
@@ -1057,7 +1072,7 @@
         assert self.fp.isfile() or not self.fp.exists()
 
     def createSimilarFile(self, path):
-        if path == self.fp.path:
+        if self.comparePath(path):
             return self
         else:
             return responsecode.NOT_FOUND
@@ -1070,7 +1085,7 @@
         assert self.fp.isfile() or not self.fp.exists()
 
     def createSimilarFile(self, path):
-        if path == self.fp.path:
+        if self.comparePath(path):
             return self
         else:
             return responsecode.NOT_FOUND

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/stdconfig.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/stdconfig.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/stdconfig.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,3 +1,4 @@
+# -*- test-case-name: twistedcaldav.test.test_stdconfig -*-
 ##
 # Copyright (c) 2005-2009 Apple Inc. All rights reserved.
 #
@@ -21,7 +22,7 @@
 from twisted.web2.dav import davxml
 from twisted.web2.dav.resource import TwistedACLInheritable
 
-from twext.python.plistlib import readPlist
+from twext.python.plistlib import PlistParser
 
 from twistedcaldav.config import (
     ConfigProvider, ConfigurationError, config, _mergeData, )
@@ -98,6 +99,8 @@
     "BindAddresses": [],   # List of IP addresses to bind to [empty = all]
     "BindHTTPPorts": [],   # List of port numbers to bind to for HTTP [empty = same as "Port"]
     "BindSSLPorts" : [],   # List of port numbers to bind to for SSL [empty = same as "SSLPort"]
+    "InheritFDs": [],   # File descriptors to inherit for HTTP requests (empty = don't inherit)
+    "InheritSSLFDs": [],   # File descriptors to inherit for HTTPS requests (empty = don't inherit)
 
     #
     # Data store
@@ -197,6 +200,7 @@
     "EnableExtendedAccessLog": True,
     "DefaultLogLevel"   : "",
     "LogLevels"         : {},
+    "LogID"             : "",
 
     "AccountingCategories": {
         "iTIP": False,
@@ -230,10 +234,6 @@
     "MultiProcess": {
         "ProcessCount": 0,
         "MinProcessCount": 4,
-        "LoadBalancer": {
-            "Enabled": True,
-            "Scheduler": "LeastConnections",
-        },
         "StaggeredStartup": {
             "Enabled": False,
             "Interval": 15,
@@ -370,9 +370,10 @@
     #
 
     # Set the maximum number of outstanding requests to this server.
-    "MaxRequests": 600,
+    "MaxRequests": 80,
+    "MaxAccepts": 1,
 
-    "ListenBacklog": 50,
+    "ListenBacklog": 2024,
     "IdleConnectionTimeOut": 15,
     "UIDReservationTimeOut": 30 * 60,
 
@@ -400,13 +401,6 @@
         "reactor": "select",
     },
 
-    # Python Director
-    "PythonDirector": {
-        "pydir": "/usr/share/caldavd/bin/pydir.py",
-        "ConfigFile": "/etc/caldavd/pydir.xml",
-        "ControlSocket": "/var/run/caldavd-pydir.sock",
-    },
-
     # Umask
     "umask": 0027,
 
@@ -463,15 +457,36 @@
     "ResponseCacheTimeout": 30, # Minutes
 }
 
+
+
+class NoUnicodePlistParser(PlistParser):
+    """
+    A variant of L{PlistParser} which avoids exposing the 'unicode' data-type
+    to application code when non-ASCII characters are found, instead
+    consistently exposing UTF-8 encoded 'str' objects.
+    """
+
+    def getData(self):
+        """
+        Get the currently-parsed data as a 'str' object.
+        """
+        data = "".join(self.data).encode("utf-8")
+        self.data = []
+        return data
+
+
+
 class PListConfigProvider(ConfigProvider):
     
     def loadConfig(self):
         configDict = {}
         if self._configFileName:
+            parser = NoUnicodePlistParser()
             try:
-                configDict = readPlist(self._configFileName)
+                configDict = parser.parse(open(self._configFileName))
             except (IOError, OSError):                                    
-                log.error("Configuration file does not exist or is inaccessible: %s" % (self._configFileName,))
+                log.error("Configuration file does not exist or is inaccessible: %s" %
+                          (self._configFileName,))
             else:
                 configDict = _cleanup(configDict, self._defaults)
         return configDict
@@ -781,13 +796,6 @@
         elif key in renamedOptions:
             renamed(key, renamedOptions[key])
 
-#       elif key == "pydirConfig":
-#           deprecated(key, "PythonDirector -> pydir")
-#           if "PythonDirector" not in cleanDict:
-#               cleanDict["PythonDirector"] = {}
-#           cleanDict["PythonDirector"]["ConfigFile"] = cleanDict["pydirConfig"]
-#           del cleanDict["pydirConfig"]
-
         else:
             unknown(key,)
 

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/test/test_config.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/test/test_config.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/test/test_config.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -59,6 +59,7 @@
     def tearDown(self):
         config.setDefaults(DEFAULT_CONFIG)
         config.reset()
+        config.update(None) # Make sure the update hooks get called
 
     def testDefaults(self):
         for key, value in DEFAULT_CONFIG.iteritems():
@@ -125,11 +126,11 @@
         self.assertEquals(config.SSLPort, 8443)
 
     def testMerge(self):
-        self.assertEquals(config.MultiProcess.LoadBalancer.Enabled, True)
+        self.assertEquals(config.MultiProcess.StaggeredStartup.Enabled, False)
 
         config.update({"MultiProcess": {}})
 
-        self.assertEquals(config.MultiProcess.LoadBalancer.Enabled, True)
+        self.assertEquals(config.MultiProcess.StaggeredStartup.Enabled, False)
 
     def testDirectoryService_noChange(self):
         self.assertEquals(config.DirectoryService.type, "twistedcaldav.directory.xmlfile.XMLDirectoryService")
@@ -199,7 +200,7 @@
     def testMergeDefaults(self):
         config.updateDefaults({"MultiProcess": {}})
 
-        self.assertEquals(config._provider.getDefaults().MultiProcess.LoadBalancer.Enabled, True)
+        self.assertEquals(config._provider.getDefaults().MultiProcess.StaggeredStartup.Enabled, False)
 
     def testSetDefaults(self):
         config.updateDefaults({"SSLPort": 8443})

Copied: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/test/test_extensions.py (from rev 4858, CalendarServer/trunk/twistedcaldav/test/test_extensions.py)
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/test/test_extensions.py	                        (rev 0)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/test/test_extensions.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -0,0 +1,184 @@
+# -*- coding: utf-8 -*-
+##
+# Copyright (c) 2009 Apple Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##
+
+from xml.etree.cElementTree import XML# , tostring
+
+from twisted.trial.unittest import TestCase
+
+from twisted.internet.defer import inlineCallbacks
+from twisted.python.filepath import FilePath
+
+from twisted.web.microdom import parseString
+from twisted.web2.static import MetaDataMixin
+
+from twistedcaldav.extensions import DAVFile
+
+from twisted.web2.dav.element.base import WebDAVElement
+
+class UnicodeProperty(WebDAVElement):
+    """
+    An element with a unicode name.
+    """
+
+    name = u'unicode'
+
+    allowed_children = {}
+
+
+class StrProperty(WebDAVElement):
+    """
+    An element with a unicode name.
+    """
+
+    name = 'str'
+
+    allowed_children = {}
+
+
+
+class SimpleFakeRequest(object):
+    """
+    Emulate a very small portion of the web2 'Request' API, just enough to
+    render a L{DAVFile}.
+
+    @ivar path: the path portion of the URL being rendered.
+    """
+
+    def __init__(self, path):
+        self.path = path
+
+
+    def urlForResource(self, resource):
+        """
+        @return: this L{SimpleFakeRequest}'s 'path' attribute, since this
+            request can render only one thing.
+        """
+        return self.path
+
+
+
+def browserHTML2ETree(htmlString):
+    """
+    Loosely interpret an HTML string as XML and return an ElementTree object for it.
+    
+    We're not promising strict XML (in fact, we're specifically saying HTML) in
+    the content-type of certain responses, but it's much easier to work with
+    the ElementTree data structures present in Python 2.5+ for testing; so
+    we'll use Twisted's built-in facilities to sanitize the inputs before
+    making any structured assertions about them.
+
+    A more precise implementation would use
+    U{HTML5Lib<http://code.google.com/p/html5lib/wiki/UserDocumentation>}'s
+    etree bindings to do the parsing, as that is more directly 'what a browser
+    would do', but Twisted's built-in stuff is a good approximation and doesn't
+    drag in another dependency.
+
+    @param htmlString: a L{str}, encoded in UTF-8, representing a pile of
+        browser-friendly HTML tag soup.
+
+    @return: an object implementing the standard library ElementTree interface.
+    """
+    return XML(parseString(htmlString, beExtremelyLenient=True).toxml())
+
+
+
+nonASCIIFilename = u"アニメ.txt"
+
+
+class DirectoryListingTest(TestCase):
+    """
+    Test cases for HTML directory listing.
+    """
+
+    @inlineCallbacks
+    def doDirectoryTest(self, addedNames, modify=lambda x: None, expectedNames=None):
+        """
+        Do a test of a L{DAVFile} pointed at a directory, verifying that files
+        existing with the given names will be faithfully 'played back' via HTML
+        rendering.
+        """
+        if expectedNames is None:
+            expectedNames = addedNames
+        fp = FilePath(self.mktemp())
+        fp.createDirectory()
+        for sampleName in expectedNames:
+            fp.child(sampleName).touch()
+        df = DAVFile(fp)
+        modify(df)
+        responseXML = browserHTML2ETree(
+            (yield df.render(SimpleFakeRequest('/'))).stream.read()
+        )
+        names = set([element.text.encode("utf-8")
+                     for element in responseXML.findall(".//a")])
+        self.assertEquals(set(expectedNames), names)
+
+
+    def test_simpleList(self):
+        """
+        Rendering a L{DAVFile} that is backed by a directory will produce an
+        HTML document including links to its contents.
+        """
+        return self.doDirectoryTest([u'gamma.txt', u'beta.html', u'alpha.xml'])
+
+
+    def test_emptyList(self):
+        """
+        Listing a directory with no files in it will produce an index with no
+        links.
+        """
+        return self.doDirectoryTest([])
+
+
+    def test_nonASCIIList(self):
+        """
+        Listing a directory with a file in it that includes characters that
+        fall outside of the 'Basic Latin' and 'Latin-1 Supplement' unicode
+        blocks should result in those characters being rendered as links in the
+        index.
+        """
+        return self.doDirectoryTest([nonASCIIFilename.encode("utf-8")])
+
+
+    @inlineCallbacks
+    def test_nonASCIIListMixedChildren(self):
+        """
+        Listing a directory that contains unicode content-type metadata and
+        non-ASCII characters in a filename should result in a listing that
+        contains the names of both entities.
+        """
+        unicodeChildName = "test"
+        def addUnicodeChild(davFile):
+            m = MetaDataMixin()
+            m.contentType = lambda: u'text/plain'
+            davFile.putChild(unicodeChildName, m)
+        yield self.doDirectoryTest([nonASCIIFilename], addUnicodeChild,
+                                   [nonASCIIFilename.encode("utf-8"), unicodeChildName])
+
+
+    @inlineCallbacks
+    def test_nonASCIIListMixedProperties(self):
+        """
+        Listing a directory that contains unicode DAV properties and non-ASCII
+        characters in a filename should result in a listing that contains the
+        names of both entities.
+        """
+        def addUnicodeChild(davFile):
+            davFile.writeProperty(UnicodeProperty(), None)
+            davFile.writeProperty(StrProperty(), None)
+        yield self.doDirectoryTest([nonASCIIFilename], addUnicodeChild,
+                                   [nonASCIIFilename.encode("utf-8")])
+

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/test/test_index.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/test/test_index.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/test/test_index.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -590,57 +590,152 @@
                 """, name, uid, calendar.resourceType(), instances.limit
             )
 
+    class OldIndexv7(Index):
+
+        def _db_version(self):
+            """
+            @return: the schema version assigned to this index.
+            """
+            return "7"
+
+        def _db_init_data_tables_base(self, q, uidunique):
+            """
+            Initialise the underlying database tables.
+            @param q:           a database cursor to use.
+            """
+            #
+            # RESOURCE table is the primary index table
+            #   NAME: Last URI component (eg. <uid>.ics, RESOURCE primary key)
+            #   UID: iCalendar UID (may or may not be unique)
+            #   TYPE: iCalendar component type
+            #   RECURRANCE_MAX: Highest date of recurrence expansion
+            #   ORGANIZER: cu-address of the Organizer of the event
+            #
+            if uidunique:
+                q.execute(
+                    """
+                    create table RESOURCE (
+                        NAME           text unique,
+                        UID            text unique,
+                        TYPE           text,
+                        RECURRANCE_MAX date,
+                        ORGANIZER      text
+                    )
+                    """
+                )
+            else:
+                q.execute(
+                    """
+                    create table RESOURCE (
+                        NAME           text unique,
+                        UID            text,
+                        TYPE           text,
+                        RECURRANCE_MAX date
+                    )
+                    """
+                )
+    
+            #
+            # TIMESPAN table tracks (expanded) time spans for resources
+            #   NAME: Related resource (RESOURCE foreign key)
+            #   FLOAT: 'Y' if start/end are floating, 'N' otherwise
+            #   START: Start date
+            #   END: End date
+            #   FBTYPE: FBTYPE value:
+            #     '?' - unknown
+            #     'F' - free
+            #     'B' - busy
+            #     'U' - busy-unavailable
+            #     'T' - busy-tentative
+            #
+            q.execute(
+                """
+                create table TIMESPAN (
+                    NAME  text,
+                    FLOAT text(1),
+                    START date,
+                    END   date,
+                    FBTYPE text(1)
+                )
+                """
+            )
+    
+            if uidunique:
+                #
+                # RESERVED table tracks reserved UIDs
+                #   UID: The UID being reserved
+                #   TIME: When the reservation was made
+                #
+                q.execute(
+                    """
+                    create table RESERVED (
+                        UID  text unique,
+                        TIME date
+                    )
+                    """
+                )
+
     def setUp(self):
         super(SQLIndexUpgradeTests, self).setUp()
         self.site.resource.isCalendarCollection = lambda: True
         self.db = Index(self.site.resource)
-        self.olddb = SQLIndexUpgradeTests.OldIndexv6(self.site.resource)
+        self.olddbv6 = SQLIndexUpgradeTests.OldIndexv6(self.site.resource)
+        self.olddbv7 = SQLIndexUpgradeTests.OldIndexv7(self.site.resource)
 
     def prepareOldDB(self):
-        if os.path.exists(self.olddb.dbpath):
-            os.remove(self.olddb.dbpath)
+        if os.path.exists(self.olddbv6.dbpath):
+            os.remove(self.olddbv6.dbpath)
 
     def test_old_schema(self):
         
-        self.prepareOldDB()
+        for olddb in (self.olddbv6, self.olddbv7):
+            self.prepareOldDB()
+    
+            schema = olddb._db_value_for_sql(
+                """
+                select VALUE from CALDAV
+                 where KEY = 'SCHEMA_VERSION'
+                """)
+            self.assertEqual(schema, olddb._db_version())
 
-        schema = self.olddb._db_value_for_sql(
-            """
-            select VALUE from CALDAV
-             where KEY = 'SCHEMA_VERSION'
-            """)
-        self.assertEqual(schema, self.olddb._db_version())
-
     def test_empty_upgrade(self):
         
-        self.prepareOldDB()
+        for olddb in (self.olddbv6, self.olddbv7):
+            self.prepareOldDB()
+    
+            schema = olddb._db_value_for_sql(
+                """
+                select VALUE from CALDAV
+                 where KEY = 'SCHEMA_VERSION'
+                """)
+            self.assertEqual(schema, olddb._db_version())
+    
+            if olddb._db_version() == "6":
+                self.assertRaises(sqlite3.OperationalError, olddb._db_value_for_sql, "select ORGANIZER from RESOURCE")
+                self.assertRaises(sqlite3.OperationalError, olddb._db_value_for_sql, "select FBTYPE from TIMESPAN")
+            elif olddb._db_version() == "7":
+                olddb._db_value_for_sql("select ORGANIZER from RESOURCE")
+                olddb._db_value_for_sql("select FBTYPE from TIMESPAN")
+            self.assertEqual(set([row[1] for row in olddb._db_execute("PRAGMA index_list(TIMESPAN)")]), set())
+    
+            schema = self.db._db_value_for_sql(
+                """
+                select VALUE from CALDAV
+                 where KEY = 'SCHEMA_VERSION'
+                """)
+            self.assertEqual(schema, self.db._db_version())
+    
+            value = self.db._db_value_for_sql("select ORGANIZER from RESOURCE")
+            self.assertEqual(value, None)
+            self.assertEqual(set([row[1] for row in self.db._db_execute("PRAGMA index_list(TIMESPAN)")]), set(("STARTENDFLOAT",)))
 
-        schema = self.olddb._db_value_for_sql(
-            """
-            select VALUE from CALDAV
-             where KEY = 'SCHEMA_VERSION'
-            """)
-        self.assertEqual(schema, self.olddb._db_version())
-
-        self.assertRaises(sqlite3.OperationalError, self.olddb._db_value_for_sql, "select ORGANIZER from RESOURCE")
-        self.assertRaises(sqlite3.OperationalError, self.olddb._db_value_for_sql, "select FBTYPE from TIMESPAN")
-
-        schema = self.db._db_value_for_sql(
-            """
-            select VALUE from CALDAV
-             where KEY = 'SCHEMA_VERSION'
-            """)
-        self.assertEqual(schema, self.db._db_version())
-
-        value = self.db._db_value_for_sql("select ORGANIZER from RESOURCE")
-        self.assertEqual(value, None)
-
     def test_basic_upgrade(self):
         
-        self.prepareOldDB()
-
-        calendar_name = "1.ics"
-        calendar_data = """BEGIN:VCALENDAR
+        for olddb in (self.olddbv6, self.olddbv7):
+            self.prepareOldDB()
+    
+            calendar_name = "1.ics"
+            calendar_data = """BEGIN:VCALENDAR
 VERSION:2.0
 PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
 BEGIN:VEVENT
@@ -653,28 +748,39 @@
 END:VEVENT
 END:VCALENDAR
 """
+    
+            olddb.addResource(calendar_name, Component.fromString(calendar_data))
+            self.assertTrue(olddb.resourceExists(calendar_name))
+    
+            if olddb._db_version() == "6":
+                self.assertRaises(sqlite3.OperationalError, olddb._db_value_for_sql, "select ORGANIZER from RESOURCE")
+                self.assertRaises(sqlite3.OperationalError, olddb._db_value_for_sql, "select FBTYPE from TIMESPAN")
+            elif olddb._db_version() == "7":
+                olddb._db_value_for_sql("select ORGANIZER from RESOURCE")
+                olddb._db_value_for_sql("select FBTYPE from TIMESPAN")
+            self.assertEqual(set([row[1] for row in olddb._db_execute("PRAGMA index_list(TIMESPAN)")]), set())
+    
+            value = self.db._db_value_for_sql("select ORGANIZER from RESOURCE where NAME = :1", calendar_name)
+            if olddb._db_version() == "6":
+                self.assertEqual(value, "?")
+            else:
+                self.assertEqual(value, "mailto:user1 at example.com")
+    
+            value = self.db._db_value_for_sql("select FBTYPE from TIMESPAN where NAME = :1", calendar_name)
+            if olddb._db_version() == "6":
+                self.assertEqual(value, "?")
+            else:
+                self.assertEqual(value, "B")
+    
+            self.db.addResource(calendar_name, Component.fromString(calendar_data))
+            self.assertTrue(olddb.resourceExists(calendar_name))
+    
+            value = self.db._db_value_for_sql("select ORGANIZER from RESOURCE where NAME = :1", calendar_name)
+            self.assertEqual(value, "mailto:user1 at example.com")
+    
+            value = self.db._db_value_for_sql("select FBTYPE from TIMESPAN where NAME = :1", calendar_name)
+            self.assertEqual(value, "B")
 
-        self.olddb.addResource(calendar_name, Component.fromString(calendar_data))
-        self.assertTrue(self.olddb.resourceExists(calendar_name))
-
-        self.assertRaises(sqlite3.OperationalError, self.olddb._db_value_for_sql, "select ORGANIZER from RESOURCE")
-        self.assertRaises(sqlite3.OperationalError, self.olddb._db_value_for_sql, "select FBTYPE from TIMESPAN")
-
-        value = self.db._db_value_for_sql("select ORGANIZER from RESOURCE where NAME = :1", calendar_name)
-        self.assertEqual(value, "?")
-
-        value = self.db._db_value_for_sql("select FBTYPE from TIMESPAN where NAME = :1", calendar_name)
-        self.assertEqual(value, "?")
-
-        self.db.addResource(calendar_name, Component.fromString(calendar_data))
-        self.assertTrue(self.olddb.resourceExists(calendar_name))
-
-        value = self.db._db_value_for_sql("select ORGANIZER from RESOURCE where NAME = :1", calendar_name)
-        self.assertEqual(value, "mailto:user1 at example.com")
-
-        value = self.db._db_value_for_sql("select FBTYPE from TIMESPAN where NAME = :1", calendar_name)
-        self.assertEqual(value, "B")
-
 class MemcacheTests(SQLIndexTests):
     def setUp(self):
         super(MemcacheTests, self).setUp()

Copied: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/test/test_stdconfig.py (from rev 4858, CalendarServer/trunk/twistedcaldav/test/test_stdconfig.py)
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/test/test_stdconfig.py	                        (rev 0)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/test/test_stdconfig.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -0,0 +1,69 @@
+# -*- coding: utf-8 -*-
+##
+# Copyright (c) 2005-2009 Apple Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##
+
+from cStringIO import StringIO
+
+from twisted.python.filepath import FilePath
+from twisted.trial.unittest import TestCase
+
+from twistedcaldav.config import Config
+from twistedcaldav.stdconfig import NoUnicodePlistParser, PListConfigProvider
+
+nonASCIIValue = "→←"
+nonASCIIPlist = "<plist version='1.0'><string>%s</string></plist>" % (
+    nonASCIIValue,
+)
+
+nonASCIIConfigPList = """
+<plist version="1.0">
+  <dict>
+    <key>DataRoot</key>
+    <string>%s</string>
+  </dict>
+</plist>
+""" % (nonASCIIValue,)
+
+class ConfigParsingTests(TestCase):
+    """
+    Tests to verify the behavior of the configuration parser.
+    """
+
+    def test_noUnicodePListParser(self):
+        """
+        L{NoUnicodePlistParser.parse} retrieves non-ASCII property list values
+        as (UTF-8 encoded) 'str' objects, so that a single type is consistently
+        used regardless of the input data.
+        """
+        parser = NoUnicodePlistParser()
+        self.assertEquals(parser.parse(StringIO(nonASCIIPlist)),
+                          nonASCIIValue)
+
+
+    def test_parseNonASCIIConfig(self):
+        """
+        Non-ASCII <string>s found as part of a configuration file will be
+        retrieved as UTF-8 encoded 'str' objects, as parsed by
+        L{NoUnicodePlistParser}.
+        """
+        cfg = Config(PListConfigProvider({"DataRoot": ""}))
+        tempfile = FilePath(self.mktemp())
+        tempfile.setContent(nonASCIIConfigPList)
+        cfg.load(tempfile.path)
+        self.assertEquals(cfg.DataRoot, nonASCIIValue)
+
+
+

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/test/test_upgrade.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/test/test_upgrade.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/test/test_upgrade.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -14,6 +14,9 @@
 # limitations under the License.
 ##
 
+
+from twisted.web2.dav import davxml
+
 from twistedcaldav.config import config
 from twistedcaldav.directory.calendaruserproxy import CalendarUserProxyDatabase
 from twistedcaldav.directory.xmlfile import XMLDirectoryService
@@ -22,7 +25,6 @@
 from twistedcaldav.upgrade import UpgradeError, upgradeData, updateFreeBusySet
 from twistedcaldav.test.util import TestCase
 from calendarserver.tools.util import getDirectory
-from twisted.web2.dav import davxml
 
 import hashlib
 import os, zlib, cPickle
@@ -218,13 +220,92 @@
 
 
         #
-        # Shortname not in directory, raise an UpgradeError
+        # Shortname not in directory, return empty string
         #
 
+        expected = "<?xml version='1.0' encoding='UTF-8'?><calendar-free-busy-set xmlns='urn:ietf:params:xml:ns:caldav'/>"
         value = "<?xml version='1.0' encoding='UTF-8'?>\r\n<calendar-free-busy-set xmlns='urn:ietf:params:xml:ns:caldav'>\r\n  <href xmlns='DAV:'>/calendars/users/nonexistent/calendar</href>\r\n</calendar-free-busy-set>\r\n"
-        self.assertRaises(UpgradeError, updateFreeBusySet, value, directory)
+        newValue = updateFreeBusySet(value, directory)
+        newValue = zlib.decompress(newValue)
+        self.assertEquals(newValue, expected)
 
 
+    def verifyDirectoryComparison(self, before, after, reverify=False):
+        """
+        Verify that the hierarchy described by "before", when upgraded, matches
+        the hierarchy described by "after".
+
+        @param before: a dictionary of the format accepted by L{TestCase.createHierarchy}
+
+        @param after: a dictionary of the format accepted by L{TestCase.createHierarchy}
+
+        @param reverify: if C{True}, re-verify the hierarchy by upgrading a
+            second time and re-verifying the root again.
+
+        @raise twisted.trial.unittest.FailTest: if the test fails.
+
+        @return: C{None}
+        """
+        root = self.createHierarchy(before)
+
+        config.DocumentRoot = root
+        config.DataRoot = root
+
+        upgradeData(config)
+        self.assertTrue(self.verifyHierarchy(root, after))
+
+        if reverify:
+            # Ensure that repeating the process doesn't change anything
+            upgradeData(config)
+            self.assertTrue(self.verifyHierarchy(root, after))
+
+
+    def test_removeNotificationDirectories(self):
+        """
+        The upgrade process should remove unused notification directories in
+        users' calendar homes, as well as the XML files found therein.
+        """
+        self.setUpXMLDirectory()
+
+        before = {
+            "calendars": {
+                "users": {
+                    "wsanchez": {
+                        "calendar" : {},
+                        "notifications": {
+                            "sample-notification.xml": {
+                                "@contents":  "<?xml version='1.0'>\n<should-be-ignored />"
+                            }
+                        }
+                    }
+                }
+            }
+        }
+
+        after = {
+            "calendars" : {
+                "__uids__" : {
+                    "64" : {
+                        "23" : {
+                            "6423F94A-6B76-4A3A-815B-D52CFD77935D" : {
+                                "calendar": {},
+                            }
+                        }
+                    }
+                }
+            },
+            ".calendarserver_version" : {
+                "@contents" : "1",
+            },
+            CalendarUserProxyDatabase.dbFilename : { "@contents" : None },
+            MailGatewayTokensDatabase.dbFilename : { "@contents" : None },
+            ResourceInfoDatabase.dbFilename : { "@contents" : None },
+            "tasks" : {"incoming" : {}}
+        }
+
+        self.verifyDirectoryComparison(before, after)
+
+
     def test_calendarsUpgradeWithTypes(self):
         """
         Verify that calendar homes in the /calendars/<type>/<shortname>/ form
@@ -232,7 +313,6 @@
         """
 
         self.setUpXMLDirectory()
-        directory = getDirectory()
 
         before = {
             "calendars" :
@@ -359,18 +439,271 @@
 #            }
         }
 
-        root = self.createHierarchy(before)
+        self.verifyDirectoryComparison(before, after, reverify=True)
 
-        config.DocumentRoot = root
-        config.DataRoot = root
 
-        upgradeData(config)
-        self.assertTrue(self.verifyHierarchy(root, after))
+    def test_calendarsUpgradeWithOrphans(self):
+        """
+        Verify that calendar homes in the /calendars/<type>/<shortname>/ form
+        whose records don't exist are moved into dataroot/archived/
+        """
 
-        # Ensure that repeating the process doesn't change anything
-        upgradeData(config)
-        self.assertTrue(self.verifyHierarchy(root, after))
+        self.setUpXMLDirectory()
 
+        before = {
+            "calendars" :
+            {
+                "users" :
+                {
+                    "unknownuser" :
+                    {
+                    },
+                },
+                "groups" :
+                {
+                    "unknowngroup" :
+                    {
+                    },
+                },
+            },
+            "principals" :
+            {
+                CalendarUserProxyDatabase.dbOldFilename :
+                {
+                    "@contents" : "",
+                }
+            }
+        }
+
+        after = {
+            "archived" :
+            {
+                "unknownuser" :
+                {
+                },
+                "unknowngroup" :
+                {
+                },
+            },
+            "tasks" :
+            {
+                "incoming" :
+                {
+                },
+            },
+            ".calendarserver_version" :
+            {
+                "@contents" : "1",
+            },
+            "calendars" :
+            {
+                "__uids__" :
+                {
+                },
+            },
+            CalendarUserProxyDatabase.dbFilename :
+            {
+                "@contents" : None,
+            },
+            MailGatewayTokensDatabase.dbFilename :
+            {
+                "@contents" : None,
+            },
+            ResourceInfoDatabase.dbFilename :
+            {
+                "@contents" : None,
+            }
+        }
+
+        self.verifyDirectoryComparison(before, after, reverify=True)
+
+
+    def test_calendarsUpgradeWithDuplicateOrphans(self):
+        """
+        Verify that calendar homes in the /calendars/<type>/<shortname>/ form
+        whose records don't exist are moved into dataroot/archived/
+        """
+
+        self.setUpXMLDirectory()
+
+        before = {
+            "archived" :
+            {
+                "unknownuser" :
+                {
+                },
+                "unknowngroup" :
+                {
+                },
+            },
+            "calendars" :
+            {
+                "users" :
+                {
+                    "unknownuser" :
+                    {
+                    },
+                },
+                "groups" :
+                {
+                    "unknowngroup" :
+                    {
+                    },
+                },
+            },
+            "principals" :
+            {
+                CalendarUserProxyDatabase.dbOldFilename :
+                {
+                    "@contents" : "",
+                }
+            }
+        }
+
+        after = {
+            "archived" :
+            {
+                "unknownuser" :
+                {
+                },
+                "unknowngroup" :
+                {
+                },
+                "unknownuser.1" :
+                {
+                },
+                "unknowngroup.1" :
+                {
+                },
+            },
+            "tasks" :
+            {
+                "incoming" :
+                {
+                },
+            },
+            ".calendarserver_version" :
+            {
+                "@contents" : "1",
+            },
+            "calendars" :
+            {
+                "__uids__" :
+                {
+                },
+            },
+            CalendarUserProxyDatabase.dbFilename :
+            {
+                "@contents" : None,
+            },
+            MailGatewayTokensDatabase.dbFilename :
+            {
+                "@contents" : None,
+            },
+            ResourceInfoDatabase.dbFilename :
+            {
+                "@contents" : None,
+            }
+        }
+
+        self.verifyDirectoryComparison(before, after, reverify=True)
+
+
+    def test_calendarsUpgradeWithUnknownFiles(self):
+        """
+        Unknown files, including .DS_Store files at any point in the hierarchy,
+        as well as non-directory in a user's calendar home, will be ignored and not
+        interrupt an upgrade.
+        """
+
+        self.setUpXMLDirectory()
+
+        ignoredUIDContents = {
+            "64" : {
+                "23" : {
+                    "6423F94A-6B76-4A3A-815B-D52CFD77935D" : {
+                        "calendar" : {
+                        },
+                        "garbage.ics" : {
+                            "@contents": "Oops, not actually an ICS file.",
+                        },
+                        "other-file.txt": {
+                            "@contents": "Also not a calendar collection."
+                        }
+                    }
+                }
+            },
+            ".DS_Store" : {
+                "@contents" : "",
+            }
+        }
+
+        before = {
+            ".DS_Store" :
+            {
+                "@contents" : "",
+            },
+            "calendars" :
+            {
+                ".DS_Store" :
+                {
+                    "@contents" : "",
+                },
+                "__uids__" :ignoredUIDContents,
+            },
+            "principals" :
+            {
+                ".DS_Store" :
+                {
+                    "@contents" : "",
+                },
+                CalendarUserProxyDatabase.dbOldFilename :
+                {
+                    "@contents" : "",
+                }
+            }
+        }
+
+        after = {
+            ".DS_Store" :
+            {
+                "@contents" : "",
+            },
+            "tasks" :
+            {
+                "incoming" :
+                {
+                },
+            },
+            ".calendarserver_version" :
+            {
+                "@contents" : "1",
+            },
+            "calendars" :
+            {
+                ".DS_Store" :
+                {
+                    "@contents" : "",
+                },
+                "__uids__" : ignoredUIDContents,
+            },
+            CalendarUserProxyDatabase.dbFilename :
+            {
+                "@contents" : None,
+            },
+            MailGatewayTokensDatabase.dbFilename :
+            {
+                "@contents" : None,
+            },
+            ResourceInfoDatabase.dbFilename :
+            {
+                "@contents" : None,
+            }
+        }
+
+        self.verifyDirectoryComparison(before, after, reverify=True)
+
+
     def test_calendarsUpgradeWithUIDs(self):
         """
         Verify that calendar homes in the /calendars/__uids__/<guid>/ form
@@ -378,9 +711,7 @@
         """
 
         self.setUpXMLDirectory()
-        directory = getDirectory()
 
-
         before = {
             "calendars" :
             {
@@ -473,18 +804,9 @@
 #            }
         }
 
-        root = self.createHierarchy(before)
+        self.verifyDirectoryComparison(before, after, reverify=True)
 
-        config.DocumentRoot = root
-        config.DataRoot = root
 
-        upgradeData(config)
-        self.assertTrue(self.verifyHierarchy(root, after))
-
-        # Ensure that repeating the process doesn't change anything
-        upgradeData(config)
-        self.assertTrue(self.verifyHierarchy(root, after))
-
     def test_calendarsUpgradeWithUIDsMultilevel(self):
         """
         Verify that calendar homes in the /calendars/__uids__/XX/YY/<guid>/
@@ -492,7 +814,6 @@
         """
 
         self.setUpXMLDirectory()
-        directory = getDirectory()
 
         before = {
             "calendars" :
@@ -603,19 +924,8 @@
 #            }
         }
 
-        root = self.createHierarchy(before)
+        self.verifyDirectoryComparison(before, after, reverify=True)
 
-        config.DocumentRoot = root
-        config.DataRoot = root
-
-        upgradeData(config)
-        self.assertTrue(self.verifyHierarchy(root, after))
-
-        # Ensure that repeating the process doesn't change anything
-        upgradeData(config)
-        self.assertTrue(self.verifyHierarchy(root, after))
-
-
     def test_calendarsUpgradeWithNoChange(self):
         """
         Verify that calendar homes in the /calendars/__uids__/XX/YY/<guid>/
@@ -623,7 +933,6 @@
         """
 
         self.setUpXMLDirectory()
-        directory = getDirectory()
 
         before = {
             "calendars" :
@@ -734,17 +1043,9 @@
 #            }
         }
 
-        root = self.createHierarchy(before)
+        self.verifyDirectoryComparison(before, after)
 
-        config.DocumentRoot = root
-        config.DataRoot = root
 
-        upgradeData(config)
-        self.assertTrue(self.verifyHierarchy(root, after))
-
-
-
-
     def test_calendarsUpgradeWithError(self):
         """
         Verify that a problem with one resource doesn't stop the process, but
@@ -752,7 +1053,6 @@
         """
 
         self.setUpXMLDirectory()
-        directory = getDirectory()
 
         before = {
             "calendars" :
@@ -1011,7 +1311,7 @@
     except zlib.error:
         return False
     try:
-        doc = davxml.WebDAVDocument.fromString(value)
+        davxml.WebDAVDocument.fromString(value)
         return True
     except ValueError:
         return False

Copied: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/test/test_validation.py (from rev 4858, CalendarServer/trunk/twistedcaldav/test/test_validation.py)
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/test/test_validation.py	                        (rev 0)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/test/test_validation.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -0,0 +1,105 @@
+##
+# Copyright (c) 2009 Apple Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##
+
+from xml.etree.cElementTree import XML
+
+from twisted.internet.defer import inlineCallbacks
+from twisted.trial.unittest import TestCase
+
+# XXX this should be public, but it isn't, since it's in a test_* module.  Need
+# to address this to use system twisted.
+from twisted.web2.test.test_server import SimpleRequest
+from twisted.web2.http import HTTPError
+
+from twistedcaldav.static import CalDAVFile
+from twistedcaldav.config import config
+from twistedcaldav.ical import Component, Property
+from twistedcaldav.method.put_common import StoreCalendarObjectResource
+from twistedcaldav.caldavxml import MaxAttendeesPerInstance
+
+class TestCopyMoveValidation(TestCase):
+    """
+    Tests for the validation code in L{twistedcaldav.method.put_common}.
+    """
+
+    def setUp(self):
+        """
+        Set up some CalDAV stuff.
+        """
+        self.destination = CalDAVFile(self.mktemp())
+        self.destinationParent = CalDAVFile(self.mktemp())
+        self.sampleCalendar = Component.fromString("""
+BEGIN:VCALENDAR
+VERSION:2.0
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20071114T000000Z
+ORGANIZER:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+RRULE:FREQ=YEARLY
+END:VEVENT
+END:VCALENDAR
+""")
+        req = SimpleRequest(None, "COPY", "http://example.com/foo/bar")
+        self.storer = StoreCalendarObjectResource(
+            req,
+            destination=self.destination,
+            destinationparent=self.destinationParent,
+            destination_uri="http://example.com/foo/baz",
+            calendar=self.sampleCalendar
+        )
+
+
+    @inlineCallbacks
+    def test_simpleValidRequest(self):
+        """
+        For a simple valid request,
+        L{StoreCalendarObjectResource.fullValidation} results in a L{Deferred}
+        which fires with C{None} (and raises no exception).
+        """
+        self.assertEquals((yield self.storer.fullValidation()), None)
+
+
+    @inlineCallbacks
+    def test_exceedMaximumAttendees(self):
+        """
+        If too many attendees are specified (more than the configured maximum
+        for the server), the storer raises an exception containing a
+        L{MaxAttendeesPerInstance} element that reports the maximum value, as
+        per U{RFC4791 section 5.2.9
+        <http://www.webdav.org/specs/rfc4791.html#max-attendees-per-instance>}.
+        """
+
+        # Get the event, and add too many attendees to it.
+        eventComponent = list(self.sampleCalendar.subcomponents())[0]
+        for x in xrange(config.MaxAttendeesPerInstance):
+            eventComponent.addProperty(
+                Property(u"ATTENDEE", u"mailto:user%d at example.com" % (x+3,)))
+
+        try:
+            yield self.storer.fullValidation()
+        except HTTPError, err:
+            element = XML(err.response.stream.mem)[0]
+            self.assertEquals(
+                element.tag,
+                "{%s}%s" % (
+                    MaxAttendeesPerInstance.namespace,
+                    MaxAttendeesPerInstance.name
+                )
+            )
+            self.assertEquals(int(element.text), config.MaxAttendeesPerInstance)
+        else:
+            self.fail("No error; validation should have failed!")

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/test/util.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/test/util.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/test/util.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -45,9 +45,10 @@
         config.Memcached.Pools.Default.ServerEnabled = False
         memcacheclient.ClientFactory.allowTestCache = True
 
-    def createHierarchy(self, structure):
-        root = self.mktemp()
-        os.mkdir(root)
+    def createHierarchy(self, structure, root=None):
+        if root is None:
+            root = self.mktemp()
+            os.mkdir(root)
 
         def createChildren(parent, subStructure):
             for childName, childStructure in subStructure.iteritems():
@@ -88,6 +89,18 @@
                 if childName in actual:
                     actual.remove(childName)
 
+                if childName.startswith("*"):
+                    ext = childName.split(".")[1]
+                    found = False
+                    for actualFile in actual:
+                        if actualFile.endswith(ext):
+                            actual.remove(actualFile)
+                            found = True
+                            break
+                    if found:
+                        continue
+                    
+
                 childPath = os.path.join(parent, childName)
 
                 if not os.path.exists(childPath):
@@ -133,7 +146,7 @@
 
             if actual:
                 # There are unexpected children
-                print "Unexpected:", actual
+                print "Unexpected:", actual, 'in', parent
                 return False
 
             return True

Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/upgrade.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/upgrade.py	2009-12-16 02:33:27 UTC (rev 4864)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/upgrade.py	2009-12-16 02:48:38 UTC (rev 4865)
@@ -1,3 +1,4 @@
+# -*- test-case-name: twistedcaldav.test.test_upgrade -*-
 ##
 # Copyright (c) 2008-2009 Apple Inc. All rights reserved.
 #
@@ -176,6 +177,14 @@
         try:
             for cal in os.listdir(homePath):
                 calPath = os.path.join(homePath, cal)
+                if not os.path.isdir(calPath):
+                    # Skip non-directories; these might have been uploaded by a
+                    # random DAV client, they can't be calendar collections.
+                    continue
+                if cal == 'notifications':
+                    # Delete the old, now obsolete, notifications directory.
+                    rmdir(calPath)
+                    continue
                 log.debug("Upgrading calendar: %s" % (calPath,))
                 if not upgradeCalendarCollection(calPath, directory):
                     errorOccurred = True
@@ -346,6 +355,10 @@
                         continue
 
                     oldHome = os.path.join(uidHomes, home)
+                    if not os.path.isdir(oldHome):
+                        # Skip non-directories
+                        continue
+
                     newHome = os.path.join(uidHomes, home[0:2], home[2:4], home)
                     moveCalendarHome(oldHome, newHome, uid=uid, gid=gid)
 
@@ -364,11 +377,16 @@
                     for shortName in os.listdir(dirPath):
                         record = directory.recordWithShortName(recordType,
                             shortName)
+                        oldHome = os.path.join(dirPath, shortName)
                         if record is not None:
-                            oldHome = os.path.join(dirPath, shortName)
                             newHome = os.path.join(uidHomes, record.uid[0:2],
                                 record.uid[2:4], record.uid)
                             moveCalendarHome(oldHome, newHome, uid=uid, gid=gid)
+                        else:
+                            # an orphaned calendar home (principal no longer
+                            # exists in the directory)
+                            archive(config, oldHome, uid, gid)
+
                     os.rmdir(dirPath)
 
 
@@ -451,10 +469,10 @@
         try:
             with open(versionFilePath) as versionFile:
                 onDiskVersion = int(versionFile.read().strip())
-        except IOError, e:
+        except IOError:
             log.error("Cannot open %s; skipping migration" %
                 (versionFilePath,))
-        except ValueError, e:
+        except ValueError:
             log.error("Invalid version number in %s; skipping migration" %
                 (versionFilePath,))
 
@@ -489,8 +507,9 @@
     shortName = pieces[3]
     record = directory.recordWithShortName(recordType, shortName)
     if record is None:
-        msg = "Can't update free-busy href; %s is not in the directory" % shortName
-        raise UpgradeError(msg)
+        # We will simply ignore this and not write out an fb-set entry
+        log.error("Can't update free-busy href; %s is not in the directory" % shortName)
+        return ""
 
     uid = record.uid
     newHref = "/calendars/__uids__/%s/%s/" % (uid, pieces[4])
@@ -525,7 +544,8 @@
             fbset.add(href)
         else:
             didUpdate = True
-            fbset.add(newHref)
+            if newHref != "":
+                fbset.add(newHref)
 
     if didUpdate:
         property = caldavxml.CalendarFreeBusySet(*[davxml.HRef(href)
@@ -550,3 +570,31 @@
             os.mkdir(path)
             os.chown(path, uid, gid)
 
+
+def archive(config, srcPath, uid, gid):
+    """
+    Move srcPath into dataroot/archived, giving the destination a unique
+    (sequentially numbered) name in the case of duplicates.
+    """
+
+    archiveDir = os.path.join(config.DataRoot, "archived")
+
+    if not os.path.exists(archiveDir):
+        os.mkdir(archiveDir)
+    os.chown(archiveDir, uid, gid)
+
+    baseName = os.path.basename(srcPath)
+    newName = baseName
+    count = 0
+    destPath = os.path.join(archiveDir, newName)
+    while os.path.exists(destPath):
+        count += 1
+        newName = "%s.%d" % (baseName, count)
+        destPath = os.path.join(archiveDir, newName)
+
+    try:
+        os.rename(srcPath, destPath)
+    except OSError:
+        # Can't rename, must copy/delete
+        shutil.copy2(srcPath, destPath)
+        os.remove(srcPath)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20091215/583af8a0/attachment-0001.html>


More information about the calendarserver-changes mailing list