<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt"?>
<!DOCTYPE rfc SYSTEM 'rfc2629.dtd'
[
<!ENTITY rfc2119 PUBLIC ''
'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml'>
<!ENTITY rfc3261 PUBLIC ''
'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3261.xml'>
<!ENTITY rfc3860 PUBLIC ''
'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3860.xml'>
<!ENTITY rfc3966 PUBLIC ''
'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3966.xml'>
<!ENTITY rfc4791 PUBLIC ''
'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4791.xml'>
<!ENTITY rfc5545 PUBLIC ''
'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5545.xml'>
<!ENTITY rfc5546 PUBLIC ''
'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5546.xml'>
<!ENTITY rfc5724 PUBLIC ''
'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5724.xml'>
<!ENTITY rfc5870 PUBLIC ''
'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5870.xml'>
<!ENTITY rfc7986 PUBLIC ''
'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7986.xml'>
<!ENTITY rfc8174 PUBLIC ''
 'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml'>
<!ENTITY idEventPub PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-calext-eventpub-extensions.xml'>
]>

<?rfc toc="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc tocdepth="2"?>
<?rfc strict="yes"?>
<rfc category="std" updates='5545'
     ipr='trust200902' docName='draft-ietf-calext-valarm-extensions-03'>
  <front>
    <title abbrev="VALARM Extensions">VALARM Extensions for iCalendar</title>
    <author initials="C." surname="Daboo" fullname="Cyrus Daboo">
      <organization abbrev="Apple">Apple Inc.</organization>
      <address>
        <postal>
          <street>1 Infinite Loop</street>
          <city>Cupertino</city>
          <region>CA</region>
          <code>95014</code>
          <country>USA</country>
        </postal>
        <email>cyrus@daboo.name</email>
        <uri>http://www.apple.com/</uri>
      </address>
    </author>
    <author role="editor" initials="K." surname="Murchison"
            fullname="Kenneth Murchison">
      <organization abbrev="Fastmail">Fastmail US LLC</organization>
      <address> 
        <postal>
          <street>1429 Walnut St, Suite 1201</street>
          <city>Philadephia</city>
          <region>PA</region>
          <code>19102</code>
          <country>USA</country>
        </postal>
        <email>murch@fastmailteam.com</email> 
        <uri>http://www.fastmail.com/</uri>
      </address> 
    </author>
    <date />
    <area>Applications</area>
    <keyword>alarms</keyword>
    <keyword>calendaring</keyword>
    <keyword>iCalendar</keyword>
    <keyword>CalDAV</keyword>
    <abstract>
      <t>This document defines a set of extensions to the iCalendar
      VALARM component to enhance use of alarms and improve
      interoperability between clients and servers.</t>

      <t>This document updates RFC5545.</t>
    </abstract>
  </front>

  <middle>
    <section title='Introduction'>
      <t>The <xref target="RFC5545">iCalendar</xref> specification
      defines a set of components used to describe calendar data. One
      of those is the "VALARM" component which appears as a
      sub-component of "VEVENT" and "VTODO" components. The "VALARM"
      component is used to specify a reminder for an event or
      task. Different alarm actions are possible, as are different
      ways to specify how the alarm is triggered.</t>

      <t>As iCalendar has become more widely used and as client-server
      protocols such as <xref target="RFC4791">CalDAV</xref> have
      become more prevalent, several issues with "VALARM" components
      have arisen. Most of these relate to the need to extend the
      existing "VALARM" component with new properties and behaviors to
      allow clients and servers to accomplish specific tasks in an
      interoperable manner. For example, clients typically need a way
      to specify that an alarm has been dismissed by a calendar user,
      or has been "snoozed" by a set amount of time. To date, this has
      been done through the use of custom "X-" properties specific to
      each client implementation, leading to poor
      interoperability.</t>

      <t>This specification defines a set of extensions to "VALARM"
      components to cover common requirements for alarms not currently
      addressed in iCalendar. Each extension is defined in a separate
      section below. For the most part, each extension can be
      supported independently of the others, though in some cases one
      extension will require another. In addition, this specification
      describes mechanisms by which clients can interoperably
      implement common features such as "snoozing".</t>
    </section>

    <section title='Conventions Used in This Document'>
      <t>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 interpreted as
      described in <eref target="https://tools.ietf.org/html/bcp14">BCP 14</eref>
      <xref target='RFC2119' /> <xref target='RFC8174' /> 
      when, and only when, they appear in all capitals, as shown here.</t>

      <t>When XML element types in the namespaces "DAV:" and
      "urn:ietf:params:xml:ns:caldav" are referenced in this document
      outside of the context of an XML fragment, the string "DAV:" and
      "CALDAV:" will be prefixed to the element type names
      respectively.</t>
    </section>

    <section title="Extensible syntax for VALARM" anchor="syntax">
      <t>Section 3.6.6 of <xref target="RFC5545" /> defines the syntax
      for "VALARM" components and properties within them. However, as
      written, it is hard to extend this by adding, e.g., a new
      property common to all types of alarm. Since many of the
      extensions defined in this document need to extend the base
      syntax, an alternative form for the base syntax is defined here,
      with the goal of simplifying specification of the
      extensions.</t>

      <t>A "VALARM" calendar component is re-defined by the following notation: 
      <figure>
        <artwork name="abnf"><![CDATA[
alarmcext  = "BEGIN" ":" "VALARM" CRLF
             alarmprop
             "END" ":" "VALARM" CRLF

alarmprop  = *(

             ; the following are REQUIRED,
             ; but MUST NOT occur more than once

             action / trigger /

             ; one set of action properties MUST be
             ; present and MUST match the action specified
             ; in the ACTION property

             actionprops /

             ; the following is OPTIONAL,
             ; and MAY occur more than once

             x-prop / iana-prop

             )
        
actionprops = audiopropext / disppropext / emailpropext

audiopropext  = *(

                ; '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
        
                )

disppropext = *(

              ; the following are REQUIRED,
              ; but MUST NOT occur more than once
       
              description /
        
              ; 'duration' and 'repeat' are both OPTIONAL,
              ; and MUST NOT occur more than once each,
              ; but if one occurs, so MUST the other
        
              duration / repeat
        
              )

emailpropext = *(

               ; the following are all REQUIRED,
               ; but MUST NOT occur more than once
        
               description / 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 is OPTIONAL,
               ; and MAY occur more than once
        
               attach
        
               )]]></artwork>
      </figure></t>
    </section>

    <section title="Alarm Unique Identifier" anchor="uid">
<!--
      <t>Several of the other extensions in this specification require
      identifying a specific instance of a "VALARM" component in an
      iCalendar stream. To aid that, this
-->
      <t>This extension adds a "UID"
      property to "VALARM" components to allow a unique identifier to
      be specified. The value of this property can then be used to refer
      uniquely to the "VALARM" component.</t> 

      <t>The "UID" property defined here follows the definition in
      Section 3.8.4.7 of <xref target="RFC5545" /> with the security
      and privacy updates in Section 5.3 of <xref target="RFC7986" />.
      In particular it MUST be a globally unique identifier that does
      not contain any security- or privacy-sensitive information.</t> 

      <t>The "VALARM" component defined in <xref target="syntax" /> is
      extended here as:
      <figure>
        <artwork name="abnf"><![CDATA[
alarmprop  /= *(

              ; the following is OPTIONAL,
              ; but MUST NOT occur more than once

              uid

              )
]]></artwork>
      </figure></t>
    </section>

    <section title="Alarm Related To">
      <t>It is often convenient to relate one or more "VALARM"
      components to other "VALARM" components (e.g., see <xref
      target="snooze"/>). This can be accomplished if the "VALARM"
      components each have their own "UID" property (as per <xref
      target="uid" />).</t>

      <t>This specification updates the usage of the "RELATED-TO"
      property defined in Section 3.8.4.5 of <xref target="RFC5545" />
      to enable its use with "VALARM" components. Specific types of
      relationships between "VALARM" components can be identified by
      registering new values for the "RELTYPE" property parameter
      defined in Section 3.2.15 of <xref target="RFC5545" />.</t>

      <t>The "VALARM" component defined in <xref target="syntax" /> is
      extended here as:
      <figure>
        <artwork name="abnf"><![CDATA[
alarmprop  /= *(

              ; the following is OPTIONAL,
              ; but MAY occur more than once

              related

              )
]]></artwork>
      </figure></t>
    </section>
<!--
    <section title="Alarm URI Action" anchor='URI-ACTION'>
      <t>Currently "VALARM" components have actions for audio, display
      and email. New types of actions are of interest, e.g., SMS,
      instant messaging, etc. Rather then specify separate actions for
      these, an alternative is to define a "URI" action that allows
      any URI scheme to be used as an action, where it makes
      sense. Thus URI schemes for SMS <xref target="RFC5724" />,
      IM <xref target="RFC3860" />, SIP <xref target="RFC3261" />,
      TEL <xref target="RFC3966" />, etc could be used.</t> 

      <t>This extension defines a new "URI" property value for use
      with the "ACTION" property in "VALARM" components. A new set of
      action properties is defined for "VALARM" components based on
      this new action as defined by the syntax below.
      <figure>
        <artwork name="abnf"><![CDATA[
actionvalue /= "URI"
               ; Adds a new action for a "VALARM"

actionprop  /= uriprop
               ; Re-defines the "VALARM" component to include
               ; "uriprop" as a new set of action properties 

uriprop     = *(

               ; the following is REQUIRED,
               ; and MUST occur only once

               uri /

               ; 'duration' and 'repeat' are both OPTIONAL,
               ; and MUST NOT occur more than once each,
               ; but if one occurs, so MUST the other

               duration / repeat

               )
]]></artwork>
      </figure></t>
    </section>

    <section title="Alarm Agent">
      <t>With the advent of a standard client/server protocol for
      calendaring and scheduling data (<xref target="RFC4791" />)
      there is a need to specify which client or server should handle
      the presentation of an alarm when it is triggered. For example,
      calendar users want to be able to receive alarms at all times,
      even when their desktop client might be unavailable. Since the
      server is "always on", a service running on the server could
      monitor alarm status and, when appropriate, trigger those
      alarms. In addition it may be important for only the server or
      the client to be set to handle an alarm - and in some cases only
      specific servers or clients.</t>

      <t>To address this need, this specification defines an
      "ALARM-AGENT" iCalendar property that can be added to any
      "VALARM" component. This property specifies whether a client or
      server or both should be responsible for processing the alarm
      when it triggers. In addition, an "AGENT-ID" property parameter
      can be added to uniquely identify the client or server that
      should process the alarm. This is defined by the syntax below.
      <figure>
        <artwork name="abnf"><![CDATA[
alarmprop  /= *(

              ; the following is OPTIONAL,
              ; and MAY occur more than once

              alarm-agent

              )
]]></artwork>
      </figure></t>

      <section title="Alarm Agent Property" anchor="ALARM-AGENT">
        <t>
          <list style="hanging">
            <t hangText="Property Name:">ALARM-AGENT</t>
            <t hangText="Purpose:">This property specifies whether a
            client, server, both or none gets to process an alarm when
            it is triggered.</t>
            <t hangText="Value Type:">TEXT</t>
            <t hangText="Property Parameters:">IANA, non-standard, and
            id property parameters can be specified on this
            property.</t>
            <t hangText="Conformance:">This property can be specified
            within "VALARM" calendar components.</t>
            <t hangText="Description:">This property is used to
            specify who is responsible for processing an alarm when it
            is triggered. When the value "SERVER" is specified, only a
            server that has a copy of the event is responsible. When
            the value "CLIENT" is specified, only a client that has a
            copy of the event is responsible. When the value "BOTH" is
            specified, either a client or server is responsible. When
            the value "NONE" is specified, neither a client nor server
            is responsible (i.e., the alarm action is never carried
            out when it triggers).
            <vspace blankLines="1" />If the "AGENT-ID" property
            parameter is specified for "SERVER" or "CLIENT" values,
            then only the client or server identified by the
            "AGENT-ID" value is responsible. Clients or servers that
            are not responsible for the alarm SHOULD NOT process the
            alarm action when it is triggered. If multiple clients or
            servers need to be specified, then the "ALARM-AGENT"
            property should be included multiple times in the "VALARM"
            component, with each one containing the appropriate
            "AGENT-ID" property parameter value to identify each
            client or server.
            <vspace blankLines="1" />In the absence of this property
            clients and servers can choose to process the alarm
            themselves as appropriate. i.e., a default value of
            "BOTH".
            <vspace blankLines="1" />This property MAY occur more than
            once to allow multiple processors of an alarm.</t>
            <t hangText="Format Definition:">This property is defined
            by the following notation:
            <figure>
              <artwork name="abnf"><![CDATA[
alarm-agent     = "ALARM-AGENT" alarmagentparam ":"
                  alarmagentvalue CRLF

alarmagentparam = *(
    
                  ; the following is OPTIONAL,
                  ; but MUST NOT occur more than once
    
                  (";" agentidparam) /
    
                  ; the following is OPTIONAL,
                  ; and MAY occur more than once
    
                  (";" other-param)
    
                  )

alarmagentvalue = "SERVER" / "CLIENT" / "BOTH" / "NONE" /
                  iana-token / x-name
]]></artwork>
            </figure></t>
            <t hangText="Example:">The following are examples of this property: 
            <figure>
              <artwork><![CDATA[
ALARM-AGENT:SERVER
ALARM-AGENT;AGENT-ID="tag:example.com,2011:cyrus-desktop":CLIENT
]]></artwork>
            </figure></t>
          </list>
        </t>
      </section>

      <section title="Agent ID Property Parameter" anchor="AGENT-ID-PARAM">
        <t>
          <list style="hanging">
            <t hangText="Parameter Name:">AGENT-ID</t>
            <t hangText="Purpose:">This property parameter specifies a
            URI identifier for the property it is applied to.</t>
            <t hangText="Format Definition:">This property parameter
            is defined by the following notation:
            <figure>
              <artwork name="abnf"><![CDATA[
agentidparam = "AGENT-ID" "=" DQUOTE uri DQUOTE
]]></artwork>
            </figure></t>
            <t hangText="Description:">This property parameter is used
            to specify a URI identifier that is associated with the
            property it is applied to. Each property that allows this
            parameter to be specified MUST indicate what the value of
            the URI represents.</t>
            <t hangText="Example:">The following is an example of this
            property parameter:
            <figure>
              <artwork><![CDATA[
ALARM-AGENT;AGENT-ID="http://calendar.example.com":SERVER
]]></artwork>
            </figure></t>
          </list>
        </t>
      </section>
    </section>
-->
    <section title="Alarm Acknowledgement">
      <t>There is currently no way for a "VALARM" component to
      indicate whether it has been triggered and acknowledged. With
      the advent of a standard client/server protocol for calendaring
      and scheduling data (<xref target="RFC4791" />) it is quite
      possible for an event with an alarm to exist on multiple clients
      in addition to the server. If each of those is responsible for
      performing the action when an alarm triggers, then multiple
      "alerts" are generated by different devices. In such a
      situation, a calendar user would like to be able to "dismiss"
      the alarm on one device and have it automatically dismissed on
      the others too.</t>
      <t>Also, with recurring events that have alarms, it is important
      to know when the last alarm in the recurring set was
      acknowledged, so that the client can determine whether past
      alarms have been missed.</t>
      <t>To address these needs, this specification adds an
      "ACKNOWLEDGED" property to "VALARM" components to indicate when
      the alarm was last sent or acknowledged. This is defined by the
      syntax below.
      <figure>
        <artwork name="abnf"><![CDATA[
alarmprop       /= *(

                   ; the following is OPTIONAL,
                   ; but MUST NOT occur more than once

                   acknowledged

                   )
]]></artwork>
      </figure></t>
      <section title="Acknowledged Property" anchor="ACKNOWLEDGED">
        <t>
          <list style="hanging">
            <t hangText="Property Name:">ACKNOWLEDGED</t>
            <t hangText="Purpose:">This property specifies the UTC
            date and time at which the corresponding alarm was last
            sent or acknowledged.</t>
            <t hangText="Value Type:">DATE-TIME</t>
            <t hangText="Property Parameters:">IANA and non-standard
            property parameters can be specified on this property.</t>
            <t hangText="Conformance:">This property can be specified
            within "VALARM" calendar components.</t>
            <t hangText="Description:">This property is used to
            specify when an alarm was last sent or acknowledged. This
            allows clients to determine when a pending alarm has been
            acknowledged by a calendar user so that any alerts can be
            dismissed across multiple devices. It also allows clients
            to track repeating alarms or alarms on recurring events or
            to-dos to ensure that the right number of missed alarms
            can be tracked.</t>
            <t>Clients SHOULD set this property to the current
            date-time value in UTC when a calendar user acknowledges a
            pending alarm. Certain kinds of alarm may not provide
            feedback as to when the calendar user sees them, for
            example email based alerts. For those kinds of alarms, the
            client SHOULD set this property when the alarm is
            triggered and the action successfully carried out.
            <vspace blankLines="1" />When an alarm is triggered on a
            client, clients can check to see if an "ACKNOWLEDGED"
            property is present. If it is, and the value of that
            property is greater than or equal to the computed trigger
            time for the alarm, then the client SHOULD NOT trigger the
            alarm. Similarly, if an alarm has been triggered and an
            "alert" presented to a calendar user, clients can monitor
            the iCalendar data to determine whether an "ACKNOWLEDGED" property
            is added or changed in the alarm component. If the value
            of any "ACKNOWLEDGED" property in the alarm changes and is greater
            than or equal to the trigger time of the alarm, then
            clients SHOULD dismiss or cancel any "alert" presented to
            the calendar user.</t>
            <t hangText="Format Definition:">This property is defined
            by the following notation:
            <figure>
              <artwork name="abnf"><![CDATA[
acknowledged = "ACKNOWLEDGED" acknowledgedparam ":" datetime CRLF
 
acknowledgedparam  = *(

                     ; the following is OPTIONAL,
                     ; and MAY occur more than once

                     (";" other-param)

                     )
]]></artwork>
            </figure></t>
            <t hangText="Example:">The following is an example of this property: 
            <figure>
              <artwork><![CDATA[
ACKNOWLEDGED:20090604T084500Z
]]></artwork>
            </figure></t>
          </list>
        </t>
      </section>
    </section>
    <section title="Snoozing Alarms" anchor="snooze">
      <t>Users often want to "snooze" an alarm, and this specification
      defines a standard approach to accomplish that.</t>
      <t>To "snooze" an alarm, clients create a new "VALARM" component
      within the parent component of the "VALARM" that was triggered
      and is being "snoozed" (i.e., as a "sibling" component of the
      "VALARM" being snoozed). The new "VALARM" MUST be set to trigger
      at the user's chosen "snooze" interval after the original alarm
      triggered. Clients SHOULD use an absolute "TRIGGER" property
      with a "DATE-TIME" value specified in UTC.</t>

      <t>Clients SHOULD add a
      "RELATED-TO" property to the new "VALARM" component with a value
      set to the "UID" property value of the "VALARM" component being
      snoozed. If the "VALARM" component being snoozed does not
      already have a "UID" property, the client SHOULD add one. The
      "RELATED-TO" property added to the new "VALARM" component SHOULD
      include a "RELTYPE" property parameter with a value set to
      "SNOOZE".</t>

      <t>When the "snooze" alarm is triggered and dismissed the client
      SHOULD remove the corresponding "VALARM" component, or set the
      "ACKNOWLEDGED" property (see <xref
      target="ACKNOWLEDGED"/>). Alternatively, if the "snooze" alarm
      is itself "snoozed", the client SHOULD remove the original
      "snooze" alarm and create a new one, with the appropriate
      trigger time and relationship set.</t>

      <section title="Relationship Type Property Parameter" anchor="SNOOZE-PARAM">
        <t>
            This specification adds the "SNOOZE" relationship type for
            use with the "RELTYPE" property defined in Section 3.2.15
            of <xref target="RFC5545" />. This is used to relate a
            "snoozed" "VALARM" component to the original alarm that
            the "snooze" was generated for.
        </t>
        </section>

    </section>

    <section title="Alarm Proximity Trigger">
      <t>VALARMs are currently triggered when a specific date-time is
      reached. It is also desirable to be able to trigger alarms based
      on location, e.g. when arriving at or departing from a
      particular location.</t>
      <t>This specification adds the following properties to "VALARM"
      components to indicate when an alarm can be triggered based on
      location.
      <list>
        <t>"PROXIMITY" - indicates that a location based trigger is to
        be used and which direction of motion is used for the
        trigger</t>
        <t><xref target="I-D.ietf-calext-eventpub-extensions">
          "STRUCTURED-LOCATION"</xref> - used to indicate the actual
        location to trigger off, specified using a <xref
        target="RFC5870">geo: URI</xref> which allows for two or three
        coordinate values with an optional uncertainty</t>
      </list>
      <figure>
        <artwork name="abnf"><![CDATA[
alarmprop       /= *(

                   ; the following is OPTIONAL,
                   ; but MUST NOT occur more than once

                   proximity /

                   ; the following is OPTIONAL,
                   ; and MAY occur more than once, but only
                   ; when a PROXIMITY property is also present

                   structured-location

                   )
]]></artwork>
      </figure></t>
      <t>
        Typically, when a "PROXIMITY" property is used there is no
        need to specify a time-based trigger using the "TRIGGER"
        property. However, since "TRIGGER" is defined as a required
        property for a "VALARM" component, for backwards compatibility
        it has to be present, but ignored. To indicate a "TRIGGER"
        that is to be ignored, clients SHOULD use a value a long time
        in the past. A value of "19760401T005545Z" has been commonly
        used for this purpose.
      </t>
      <section title="Proximity Property" anchor="PROXIMITY">
        <t>
          <list style="hanging">
            <t hangText="Property Name:">PROXIMITY</t>
            <t hangText="Purpose:">This property indicates that a
            location based trigger is applied to an alarm.</t>
            <t hangText="Value Type:">TEXT</t>
            <t hangText="Property Parameters:">IANA and non-standard
            property parameters can be specified on this property.</t>
            <t hangText="Conformance:">This property can be specified
            within "VALARM" calendar components.</t>
            <t hangText="Description:">This property is used to
            indicate that an alarm has a location-based trigger. Its
            value identifies the direction of motion used to trigger
            the alarm. One or more location values are set using
            "STRUCTURED-LOCATION" properties.</t>
            <t>When the property value is set to "ARRIVE", the alarm
            is triggered when the calendar user agent arrives in the
            vicinity of any of the specified locations. When set to
            "DEPART", the alarm is triggered when the calendar user
            agent departs from the vicinity of any specified
            locations.</t>
            <t>When the property value is set to "CONNECT", the alarm
            is triggered when the calendar user agent connects to a
            <xref target="BTcore">Bluetooth(R)</xref>-enabled
            automobile.  When set to "DISCONNECT", the alarm is
            triggered when the calendar user agent disconnects from a
            Bluetooth(R)-enabled automobile.</t>
<!--  This contradicts what we say about TRIGGER above
            <t>The time-based "TRIGGER" property MUST also be present
            in the "VALARM" calendar component and MUST be set to a
            positive duration value (or zero duration). That value
            indicates a time delay to be applied to the triggering of
            the alarm after the location trigger is triggered. e.g.,
            an alarm could be set to trigger 30 minutes after arriving
            home.</t>
-->
            <t hangText="Format Definition:">This property is defined
            by the following notation:
            <figure>
              <artwork name="abnf"><![CDATA[
proximity = "PROXIMITY" proximityparam ":" proximityvalue CRLF
 
proximityparam  = *(

                  ; the following is OPTIONAL,
                  ; and MAY occur more than once

                  (";" other-param)

                  )
                  
proximityvalue  = "ARRIVE" / "DEPART" /
                  "CONNECT" / "DISCONNECT" / iana-token / x-name
]]></artwork>
            </figure></t>
            <t hangText="Example:">The following is an example of this property: 
            <figure>
              <artwork><![CDATA[
PROXIMITY:ARRIVE
]]></artwork>
            </figure></t>
          </list>
        </t>
      </section>
      <section title="Example">
        <t>The following example shows a "VALARM" component with a
        proximity trigger set to trigger when the device running the
        calendar user agent leaves the vicinity defined by the
        structured location property. Note use of the "u=" parameter
        with the "geo" URI to define the precision of the location
        determination.
            <figure>
              <artwork name="abnf"><![CDATA[
BEGIN:VALARM
UID:77D80D14-906B-4257-963F-85B1E734DBB6
TRIGGER;VALUE=DATE-TIME:19760401T005545Z
ACTION:DISPLAY
DESCRIPTION:Remember to buy milk
TRIGGER;VALUE=DATE-TIME:19760401T005545Z
PROXIMITY:DEPART
STRUCTURED-LOCATION;VALUE=URI:geo:40.443,-79.945;u=10
END:VALARM
]]></artwork>
            </figure></t>
      </section>
    </section>
<!--
    <section title="Default Alarms in CalDAV">
      <t>Users often want to have a default alarm applied to new
      events that they create or to new invitations that arrive on a
      <xref target='RFC4791'>CalDAV</xref> server. Since this behavior
      is expected to occur no matter which client a user is using, or
      whether any client is even connected at the time, it is
      beneficial if the server itself is responsible for managing the
      creation of the default alarm.</t>
      <t>This specification defines four new WebDAV properties that
      can be used to specify different sets of default alarms. Clients
      can store "VALARM" components in these properties to setup the
      defaults. When a new event or task is created on the server, the
      server will automatically add the default, as appropriate. When
      a new event or task invitation is delivered to the calendar
      user, the server will automatically add the default alarm, as
      appropriate.</t>
      
      <section title="Server Behavior" anchor="default-server">
        <t>A server supporting the features described in this document
        MUST include "calendar-default-alarms" as a field in the DAV
        response header from an OPTIONS request on a calendar home or
        calendar collection.</t>
        <t>The four new WebDAV properties are: 
        <list style='hanging'>
          <t hangText="CALDAV:default-alarm-vevent-datetime">A default
          alarm applied to "VEVENT" components whose "DTSTART"
          property value type is "DATE-TIME"</t>
          <t hangText="CALDAV:default-alarm-vevent-date">A default
          alarm applied to "VEVENT" components whose "DTSTART"
          property value type is "DATE"</t>
          <t hangText="CALDAV:default-alarm-vtodo-datetime">A default
          alarm applied to "VTODO" components whose "DUE" or "DTSTART"
          property value type is "DATE-TIME"</t>
          <t hangText="CALDAV:default-alarm-vtodo-date">A default
          alarm applied to "VTODO" components whose "DUE" or "DTSTART"
          property value type is "DATE", or when neither of those
          properties is present</t>
        </list></t>
        <t>The WebDAV properties are defined on a calendar user's
        "calendar home" collection, or on individual calendar
        collections. When events or tasks are created in a calendar,
        the server will first inspect the WebDAV properties on the
        calendar collection to see if the appropriate property is
        present. If it is, the server will use the value of that
        property to set the default in the new component. If the
        property is not present on the calendar collection, the server
        will determine whether the property is present on the calendar
        home collection that contains the calendar collection. If
        present on the calendar home, the property value there is used
        as the default.</t>

        <t>The WebDAV property value MUST be one or more "VALARM"
        components or the empty string. If an empty string is used, no
        default alarms are applied. Note that these values contain
        just the "BEGIN:VALARM...END:VALARM" data (i.e., syntactically
        the "alarmcext" element as per <xref target="syntax"/>).</t>

        <t>When adding a default alarm to an event or task, the server
        MUST ensure that a
        <xref target="default-alarm">"DEFAULT-ALARM"</xref> property
        with a value of 
        "TRUE" is present in the "VALARM" component.</t>

        <t>If a "DESCRIPTION" property is present in the "VALARM"
        component, but its value is empty, the server SHOULD insert
        the value from any "SUMMARY" property of the component in
        which the default "VALARM" is being added.</t>

        <t>A default alarm MUST NOT be added to individual event or
        task components in a calendar object resource being created,
        if a "VALARM" component is already present in the
        component.</t>

        <t>When the client stores a new alarm in any of the WebDAV
        properties, servers MUST NOT change any existing calendar data
        within the calendar home or calendar where the WebDAV property
        is stored. This avoids the server having to rewrite
        potentially large amounts of calendar data to update the
        default alarm, and thus avoids the need for clients to
        re-download that data when they next synchronize with the
        server. The reasoning for this is described further in the
        next section.</t>
      </section>

      <section title="Client Behavior">
        <t>Clients that support default alarms SHOULD allow users to
        set the four types of default provided by the WebDAV
        properties defined in <xref target="default-server"/>. Clients
        SHOULD check for the presence of those properties on the
        calendar user's calendar home and individual calendars and use
        the values for defaults that they themselves apply.</t>
        <t>Since existing calendar data with a default alarm is not
        changed when the default alarm property changes, clients
        SHOULD do the following:
          <list>
            <t>Treat the default alarm values in the WebDAV properties
            as "overrides" for any alarms appearing in cached calendar
            data that have the "DEFAULT-ALARM" property set to a value
            of "TRUE". In effect the client ignores the default alarm
            in the calendar data and uses the current default from the
            WebDAV properties.</t>
            <t>When a client updates calendar data on the server, it
            SHOULD replace any existing default alarms in the calendar
            data with the latest defaults retrieved from the WebDAV
            properties.</t>
          </list>
        </t>
        <t>The approach of not having the server rewrite existing
        calendar data when an alarm changes, and having the client
        "override" defaults in calendar data with the current default
        values is a compromise designed to provide some backwards
        compatibility with clients not supporting default alarm
        behavior.</t>

        <section title="Disabling Default Alarms" anchor="disable-default">
        </section>
      </section>
      <section title="Action None" anchor="NONE-ACTION">
        <t>When default alarms are being used it is necessary to know
        when a calendar user has set a default alarm that does nothing
        as opposed to specifying that no alarm be used. This is
        important because clients are expected to "override" any
        default alarm present in calendar data with the current value
        retrieved from the server. However, if the calendar user
        explicitly removed the default alarm, then the "override" does
        not happen.</t>
        <t>This extension defines a new "NONE" property value for use
        with the "ACTION" property in "VALARM" components. A new set
        of action properties is defined for "VALARM" components based
        on this new action as defined by the syntax below. The "NONE"
        action is used solely to indicate a default alarm that does
        not alert the calendar user.
        <figure>
          <artwork name="abnf"><![CDATA[
actionvalue /= "NONE"
               ; Adds a new action for a "VALARM"

actionprop  /= noneprop
               ; Re-defines the "VALARM" component to include
               ; "noneprop" as a new set of action properties 

noneprop     = (

               ; No properties used

               )
]]></artwork>
        </figure></t>

        <t>For backwards compatibility with clients and servers that
        are unaware of the "NONE" property value action,
        clients SHOULD use a "TRIGGER" value occurring a long time in
        the past so that the alarm will be ignored.  A value of
        "19760401T005545Z" has been commonly used for this purpose.
        </t>
      </section>
      <section title="Default Alarm Property" anchor="default-alarm">
        <t>
          <list style="hanging">
            <t hangText="Property Name:">DEFAULT-ALARM</t>
            <t hangText="Purpose:">This property indicates that an
            alarm is a default alarm.</t>
            <t hangText="Value Type:">BOOLEAN</t>
            <t hangText="Property Parameters:">IANA, and non-standard
            property parameters can be specified on this property.</t>
            <t hangText="Conformance:">This property can be specified
            within "VALARM" calendar components.</t>
            <t hangText="Description:">This property is used to
            indicate that a "VALARM" component is a default alarm.</t>
            <t hangText="Format Definition:">This property is defined
            by the following notation:
            <figure>
              <artwork name="abnf"><![CDATA[
alarmprop       /= *(

                   ; the following is OPTIONAL,
                   ; but MUST NOT occur more than once

                   default-alarm

                   )

default-alarm     = "DEFAULT-ALARM" defaultalarmparam ":"
                  boolean CRLF

defaultalarmparam = *(
    
                  ; the following is OPTIONAL,
                  ; and MAY occur more than once
    
                  (";" other-param)
    
                  )

]]></artwork>
            </figure></t>
          </list>
        </t>
      </section>
    </section>
-->
    <section title='Security Considerations'>
      <t>VALARMs, if not monitored properly, can be used to "spam"
      users and/or leak personal information.  For instance, an
      unwanted audio or display alert could be considered spam.  Or an
      email alert could be used to leak a user&apos;s location to a third
      party or to send unsolicited email to multiple users.
      Therefore, CalDAV clients and servers that accept iCalendar data
      from a third party (e.g. via <xref target="RFC5546">iTIP</xref>,
      a subscription feed, or a shared calendar) SHOULD remove all
      VALARMs from the data prior to storing in their calendar system.</t>
    </section>

    <section title='Privacy Considerations'>
      <t>Proximity VALARMs, if not used carefully, can leak a
      user&apos;s past, present, or future location.  For instance,
      storing an iCalendar resource containing proxmity VALARMs to a
      shared calendar on CalDAV server can expose to anyone that has
      access to that calendar the user&apos;s intent to leave
      from or arrive at a particular location at some future time.
      Furthermore, if a CalDAV client updates the shared iCalendar
      resource with an ACKNOWLEDGED property when the alarm is
      triggered, will leak the exact date and time that the user left
      from or arrived at the location.
      
      Therefore, CalDAV clients that implement proximity alarms
      SHOULD give users the option of storing and/or acknowledging the
      alarms on the local device only and not storing the alarm and/or
      acknowledgment on a remote server.</t>
    </section>

    <section title='IANA Considerations'>
      <section title='Property Registrations'>
        <t>This document defines the following new iCalendar
        properties to be added to the registry defined in Section
        8.2.3 of <xref target="RFC5545" />:</t>
        <texttable>
          <ttcol>Property</ttcol>
          <ttcol>Status</ttcol>
          <ttcol>Reference</ttcol>
<!--
          <c>ALARM-AGENT</c>
          <c>Current</c>
          <c>RFCXXXX, <xref target="ALARM-AGENT" /></c>
-->
          <c>ACKNOWLEDGED</c>
          <c>Current</c>
          <c>RFCXXXX, <xref target="ACKNOWLEDGED" /></c>
          <c>PROXIMITY</c>
          <c>Current</c>
          <c>RFCXXXX, <xref target="PROXIMITY" /></c>
<!--
          <c>DEFAULT-ALARM</c>
          <c>Current</c>
          <c>RFCXXXX, <xref target="default-alarm" /></c>
-->
        </texttable>
      </section>
<!--
      <section title='Parameter Registrations'>
        <t>This document defines the following new iCalendar property
        parameters to be added to the registry defined in Section
        8.2.4 of <xref target="RFC5545" />:</t>
        <texttable>
          <ttcol>Property Parameter</ttcol>
          <ttcol>Status</ttcol>
          <ttcol>Reference</ttcol>
          <c>AGENT-ID</c>
          <c>Current</c>
          <c>RFCXXXX, <xref target="AGENT-ID-PARAM" /></c>
        </texttable>
        </section>

      <section title='Actions Registry'>
        <t>This document defines the following new iCalendar action to be added to the registry defined in Section 8.3.10 of <xref target="RFC5545" />:</t>
        <texttable>
          <ttcol>Action</ttcol>
          <ttcol>Status</ttcol>
         <ttcol>Reference</ttcol>
          <c>URI</c>
          <c>Current</c>
          <c>RFCXXXX, <xref target="URI-ACTION" /></c>
          <c>NONE</c>
          <c>Current</c>
          <c>RFCXXXX, <xref target="NONE-ACTION" /></c>
        </texttable>
      </section>
-->
      <section title='Relationship Types Registry'>
        <t>This document defines the following new iCalendar
        relationship type to be added to the registry defined in
        Section 8.3.8 of <xref target="RFC5545" />:</t>
        <texttable>
          <ttcol>Relationship Type</ttcol>
          <ttcol>Status</ttcol>
          <ttcol>Reference</ttcol>
          <c>SNOOZE</c>
          <c>Current</c>
          <c>RFCXXXX, <xref target="SNOOZE-PARAM" /></c>
        </texttable>
        </section>

      <section title="Proximity Value Registry">
          <t>This document creates a new iCalendar registry for values
          of the "PROXIMITY" property:</t>
        <texttable>
          <ttcol>Value</ttcol>
          <ttcol>Status</ttcol>
          <ttcol>Reference</ttcol>
          <c>ARRIVE</c>
          <c>Current</c>
          <c>RFCXXXX, <xref target="PROXIMITY" /></c>
          <c>DEPART</c>
          <c>Current</c>
          <c>RFCXXXX, <xref target="PROXIMITY" /></c>
          <c>CONNECT</c>
          <c>Current</c>
          <c>RFCXXXX, <xref target="PROXIMITY" /></c>
          <c>DISCONNECT</c>
          <c>Current</c>
          <c>RFCXXXX, <xref target="PROXIMITY" /></c>
        </texttable>
      </section>
    </section>
    <section title='Acknowledgments'>
      <t>This specification came about via discussions at the
      Calendaring and Scheduling Consortium. Also, thanks to the
      following for providing feedback: Bernard Desruisseaux, Mike
      Douglass, Jacob Farkas, Jeffrey Harris, and Ciny Joy.</t>
    </section>
  </middle>
  <back>

    <references title='Normative References'>
      &rfc2119;
      &rfc4791;
      &rfc5545;
      &rfc5870;
      &rfc7986;
      &rfc8174;
      &idEventPub;
    </references>

    <references title='Informative References'>
      &rfc5546;
<!--
      &rfc3261;
      &rfc3860;
      &rfc3966;
      &rfc5724;
-->
      <reference anchor="BTcore"
		 target="https://www.bluetooth.com/specifications/bluetooth-core-specification">
	<front>
	  <title>Bluetooth Core Specification Version 5.0</title>
	  <author>
	    <organization>Bluetooth Special Interest Group</organization>
	  </author>
	  <date month="December" year="2016"/>
	</front>
	<format type="HTML"
	        target="https://www.bluetooth.com/specifications/bluetooth-core-specification"/>
      </reference>
    </references>

    <section title="Change History (To be removed by RFC Editor before
                    publication)"> 
      <t>Changes in ietf-02: 
      <list style='numbers'>
        <t>Addressed some WGLC comments from Daniel Migault.</t>
      </list></t>
      <t>Changes in ietf-01: 
      <list style='numbers'>
        <t>Reintroduced the RELATED-TO property for VALARMs
        and the SNOOZE value for the RELTYPE property parameter.</t>
        <t>Add Privacy Considerations section.</t>
      </list></t>
      <t>Changes in ietf-00: 
      <list style='numbers'>
        <t>Submitted as CALEXT draft.</t>
      </list></t>
      <t>Changes in daboo-05: 
      <list style='numbers'>
        <t>Added Murchison as editor.</t>
        <t>Updated keywords boilerplate.</t>
        <t>Added reference to UID security/privacy recommendations.</t>
        <t>Removed default alarms.</t>
        <t>Removed ALARM-AGENT property.</t>
        <t>Added text about using TRIGGER value in the past in
        addition to ACTION:NONE to have a default alarm be
        ignored.</t>
        <t>Removed text about related alarms.</t>
        <t>Removed URL alarm action.</t>
        <t>Added reference to draft-ietf-calext-eventpub-extensions
        for STRUCTURED-LOCATION.</t>
        <t>Added CONNECT and DISCONNECT PROXIMITY property values.</t>
        <t>Added Security Considerations.</t>
        <t>Editorial fixes.</t>
      </list></t>
      <t>Changes in daboo-04: 
      <list style='numbers'>
        <t>Changed "ID" to "AGENT-ID".</t>
        <t>Add more text on using "ACKNOWLEDGED" property.</t>
        <t>Add "RELATED-TO" as a valid property for VALARMs.</t>
        <t>Add "SNOOZE" relationship type for use with VALARMs.</t>
        <t>State that "TRIGGER" is typically ignored in proximity alarms.</t>
        <t>Added "PROXIMITY" value registry.</t>
        <t>Added a lot more detail on default alarms including new
        action and property.</t>
      </list></t>
      <t>Changes in daboo-03: none - resubmission of -02</t>
      <t>Changes in daboo-02: 
      <list style='numbers'>
        <t>Updated to 5545 reference.</t>
        <t>Clarified use of absolute trigger in UTC in snooze alarms</t>
        <t>Snooze alarms should be removed when completed</t>
        <t>Removed status and replaced last-triggered by acknowledged
        property</t>
        <t>Added location-based trigger</t>
        <t>IANA registry tables added</t>
      </list></t>
      <t>Changes in daboo-01: 
      <list style='numbers'>
        <t>Removed DESCRIPTION as an allowed property in the URI alarm.</t>
        <t>Added statement about what to do when ALARM-AGENT is not present.</t>
        <t>Allow multiple ALARM-AGENT properties to be present.</t>
        <t>Removed SNOOZE-UNTIL - snoozing now accomplished by
        creating a new VALARM.</t>
        <t>Remove VALARM by reference section.</t>
        <t>Added more detail to CalDAV default alarms.</t>
      </list></t>
    </section>
  </back>
</rfc>
