Subject: New: 6.2.4.2 "delete" Command

From: Doug Royer <[email-masked]>
Date: Sat, 16 Feb 2002 19:35:19 -0700

-----------------------------------------------------------------------
6.2.4.2 "delete" Command

   Attributes:

         "id" (see Section 6.2.2.1).

         "target"

         "cmdid" (optional - see Section xxxx)

         "latency" and "action" (optional see Section xxxx)

   Response:

         One of the following "request-status" codes MUST be returned
         for each target supplied and for each object deleted
         as in that target that is effected.

               2.0 - successfully deleted the component or calendar

               6.1 - Container not found

               6.3 - Bad args

   The "delete" command is used to delete calendars or components.
   The "select" element specifies the container(s) to delete.

   Restriction Table for the "delete>" element of the "result"
response(s).

       Component/Property    Presence Comment
       -------------------   -------- -----------------------------

       VCALENDAR             1+

       . VERSION             1        MUST be at least 2.0

       . VAGENDA                      Only if VAGENDAS were
                                      deleted

       . CMDID               0+       MUST BE supplied if it was
                                      supplied in the delete command.

       . TARGET              1+

       . REQUEST-STATUS      1

       . VCAR                0+       Only if VCAR components were
                                      deleted
       . . CARID             1
       . . REQUEST-STATUS    1

       . VEVENT              0+       Only if VEVENT components
                                      were targets of deletion.
       . . UID               1
       . . REQUEST-STATUS    0 or 1   Omitted if an embedded VALARM was
                                      the target of the deletion.
       . . VALARM             0+      Only if VALARM components
                                      were targets of deletion.
       . . . SEQUENCE        1
       . . . REQUEST-STATUS  1

       . VFREEBUSY           0+       Only if VFREEBUSY was the target
                                      of deletion.
       . . UID               1
       . . DTSTAMP           1
       . . REQUEST-STATUS    1

       . VJOURNAL            0+       Only if VJOURNAL components
                                      were targets of deletion.
       . . UID               1
       . . REQUEST-STATUS    1

       . VQUERY              0+       Only if VQUERY components
                                      were targets of deletion.
       . UID                 1
       . REQUEST-STATUS      1

       . VTIMEZONE           0+       Only if VTIMEZONE components
       . . TZID                       were targets of deletion.
       . . REQUEST-STATUS    1

       . VTODO               0+       Only if VTODO components were
                                      targets of deletion.
       . . UID               1
       . . REQUEST-STATUS    0 or 1   Omitted if an embedded VALARM was
                                      the target of the deletion.

       . . VALARM            0+       Only if VALARM components
                                      were targets of deletion.
       . . . ALARMID         1
       . . . REQUEST-STATUS  1

       ----------------------------------------------------------

   Note: If a VAGENDA is deleted then NONE of its contained
   components will return any REQUEST-STATUS responses.

   Example to delete a VEVENT with VEVENT UID 'abcd12345' from
   the calendar "[email-masked]" from the current CS:

   C: MSG 1 10 . 7016 235
   C: Content-Type: application/cap+xml
   C:
   C: <delete cmdid="delete01" target="[email-masked]">
   C: <![CDATA[
   C: BEGIN:VQUERY
   C: CMDID:delete01
   C: TARGET:[email-masked]
   C: QUERY:SELECT * FROM VEVENT WHERE UID = 'abcd12345'
   C: END:VQUERY
   C: />]]>
   C: </delete>
   C: END

   S: RPY 1 10 . 7574 260
   S: Content-Type: application/cap+xml
   S:
   S: <result cmdid="delete01" target="[email-masked]">
   S: <![CDATA[
   S: BEGIN:VCALENDAR
   S: VERSION:2.0
   S: CMDID:delete01
   S: TARGET:[email-masked]
   S: BEGIN:VEVENT
   S: UID:abcd12345
   S: REQUEST-STATUS: 2.0
   S: END:VEVENT
   S: END:VCALENDAR
   S: />]]>
   S: </result>
   S: END

---

From: Bernard Desruisseaux <[email-masked]>
Date: Thu, 21 Feb 2002 17:09:46 -0500

>    C: QUERY:SELECT * FROM VEVENT WHERE UID = 'abcd12345'

This one needs to be rewritten:

     C: BEGIN:VCALENDAR
     C: VERSION:2.0
     C: END:VCALENDAR
     C: ]]>
     C: </delete>
     C: END

Regards,
Bernard
-- 
Bernard Desruisseaux                    mailto:[email-masked]
Research & Development                  Tel.  : +1 514 733-8500 x4213
Steltor                                 Fax   : +1 514 733-8878