home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_n_r / draft-oleary-icap-01.txt < prev    next >
Text File  |  1996-10-17  |  102KB  |  3,083 lines

  1.  
  2.  
  3. 10/16/96                                               Expires 04/11/97
  4. Internet-Draft                                 draft-oleary-icap-01.txt
  5. -----------------------------------------------------------------------
  6. Internet Calendar Access 
  7. Protocol (ICAP)
  8.  
  9. Status of this Memo
  10.  
  11. This document is an Internet-Draft. Internet-Drafts are working 
  12. documents of the Internet Engineering Task Force (IETF) , its areas, 
  13. and its working groups. Note that other groups may also distribute 
  14. working documents as Internet-Drafts.
  15.  
  16. Internet-Drafts are draft documents valid for a maximum of six 
  17. months and may be updated, replaced, or obsoleted by other 
  18. documents at any time. It is inappropriate to use Internet-Drafts as 
  19. reference material or to cite them other than as "work in progress."
  20.  
  21. To learn the current status of any Internet-Draft, please check the 
  22. "lid-abstracts.txt" listing contained in the Internet-Drafts Shadow 
  23. Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe) , 
  24. munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or 
  25. ftp.isi.edu (US West Coast).
  26.  
  27. Abstract
  28.  
  29. This Internet Calendar Access Protocol  (ICAP) allows a client to 
  30. access, manipulate and store Calendar information on a server. ICAP 
  31. employs the vCalendar format [2] for interchange of calendaring 
  32. information.
  33.  
  34. ICAP includes operations for creating Calendar stores on a server, 
  35. opening them and retrieving information about them. When a 
  36. Calendar store has been opened, it can be bounded by start and end 
  37. times so that the client can act on a smaller subset of Calendar 
  38. information for more efficient operation. ICAP allows users to store 
  39. new Calendar entries into their own Calendar store and Calendar 
  40. stores owned by other users with a single operation.
  41.  
  42. Table of Contents
  43.  
  44. TABLE OF CONTENTS       1
  45. 1. PROTOCOL OVERVIEW    4
  46. 1.1. CONVENTIONS USED IN THIS DOCUMENT  4
  47. 1.2. LINK LEVEL 4
  48. 1.3. COMMANDS AND RESPONSES     5
  49. 1.3.1.  Client Protocol Sender and Server Protocol Receiver     5
  50. -----------------------------------------------------------------------
  51.                            Page:     1
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58. Internet-Draft                                 draft-oleary-icap-01.txt
  59. -----------------------------------------------------------------------
  60. 1.3.2.  Server Protocol Sender and Client Protocol Receiver     6
  61. 1.4. DATA FORMATS       7
  62. 1.4.1.  Atom    7
  63. 1.4.2.  Number  7
  64. 1.4.3.  String  7
  65. 1.4.4. Parenthesized Lists      8
  66. 1.4.5. NIL      8
  67. 1.4.6. Dates    8
  68. 1.5.  RESPONSE WHEN NO COMMAND IN PROGRESS      9
  69. 1.6.  AUTOLOGOUT TIMER  9
  70. 1.7.  MULTIPLE COMMANDS IN PROGRESS     9
  71. 1.8. CALENDAR STORE     10
  72. 1.9. UNIQUE IDENTIFIERS 10
  73. 1.10. CALENDAR STORE NAMING     10
  74. 1.11. DEFAULT CALENDAR  12
  75. 1.12. ACCESS CONTROL    12
  76. 1.13. SERVER STATES     13
  77. 1.13.1.  Non-Authenticated State        13
  78. 1.13.2.  Authenticated State    13
  79. 1.13.3. Selected State  13
  80. 1.13.4.  Logout State   13
  81. 2. SCHEDULING OPERATIONS        14
  82. 2.1 OPERATIONS SUPPORTED BY ICAP        14
  83. 2.1.1. Calendar Browsing        14
  84. 2.1.2. Freetime Search  14
  85. 2.1.3.  Creating, Deleting and Modifying Calendar Entries       14
  86. 2.1.4. Group Scheduling 14
  87. 2.2. OPERATIONS NOT SUPPORTED BY ICAP   15
  88. 2.2.1. Meeting Invitations      15
  89. 2.2.2. Directory Services       15
  90. 3. ICAP COMMANDS - ANY STATE    15
  91. 3.1. CAPABILITY COMMAND 15
  92. 3.2. NOOP COMMAND       16
  93. 3.4. LOGOUT COMMAND     17
  94. 3.5. SETTINGS COMMAND   18
  95. 3.6. X-(ATOM) EXPERIMENTAL COMMANDS     19
  96. 4. ICAP COMMANDS - NON-AUTHENTICATED STATE      20
  97. 4.1. AUTHENTICATE COMMAND       20
  98. 4.2. LOGIN COMMAND      22
  99. 5. ICAP COMMANDS - AUTHENTICATED STATE  22
  100. 5.1. SELECT COMMAND     22
  101. 5.2. EXAMINE COMMAND    26
  102. 5.3. CREATE COMMAND     26
  103. 5.4. DELETE COMMAND     27
  104. -----------------------------------------------------------------------
  105.                            Page:     2
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112. Internet-Draft                                 draft-oleary-icap-01.txt
  113. -----------------------------------------------------------------------
  114. 5.5. RENAME COMMAND     27
  115. 5.6. LIST COMMAND       28
  116. 5.7. LSUB COMMAND       29
  117. 5.8. SUBSCRIBE COMMAND  30
  118. 5.9. UNSUBSCRIBE COMMAND        30
  119. 5.10. APPEND COMMAND    31
  120. 5.11. ATTRIBUTES COMMAND        33
  121. 5.12. FREETIME COMMAND  33
  122. 6. ICAP COMMANDS - SELECTED STATE       35
  123. 6.1. CLOSE COMMAND      35
  124. 6.2. RANGE COMMAND      35
  125. 6.3. CHECK COMMAND      36
  126. 6.4. EXPUNGE COMMAND    37
  127. 6.5. FETCH COMMAND      38
  128. 6.6. STORE COMMAND      39
  129. 6.7. COPY COMMAND       42
  130. 6.8. MOVE COMMAND       42
  131. 6.9. UID COMMAND        42
  132. 6.10. SEARCH COMMAND    43
  133. 7. SERVER RESPONSES     45
  134. 7.1.    SERVER RESPONSES - STATUS RESPONSES     46
  135. 7.1.1. OK Response      47
  136. 7.1.2. NO Response      47
  137. 7.1.3. BAD Response     47
  138. 7.1.4. PREAUTH Response 47
  139. 7.1.5.  BYE Response    48
  140. 7.2. SERVER RESPONSES - DATA RESPONSES  49
  141. 7.2.1.  CAPABILITY Response     49
  142. 7.2.2. LIST Response    49
  143. 7.2.3. LSUB Response    50
  144. 7.2.4. EXISTS Response  51
  145. 7.2.5. RECENT Response  51
  146. 7.2.6. EXPUNGE Response 51
  147. 7.2.7. FETCH Response   52
  148. 7.2.8. FLAGS Response   53
  149. 7.2.9.  SEARCH Response 53
  150. 7.3.    SERVER RESPONSES - COMMAND CONTINUATION REQUEST 53
  151. 8. FORMAL SYNTAX        54
  152. 9. EXAMPLE SESSIONS     54
  153. 10. OPEN ISSUES/WORK IN PROGRESS        55
  154. 11. CHANGES FROM PREVIOUS DRAFT VERSION 55
  155. 12. REFERENCES  56
  156. 13. SECURITY CONSIDERATIONS     56
  157. 14. AUTHOR'S NOTES      57
  158. -----------------------------------------------------------------------
  159.                            Page:     3
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166. Internet-Draft                                 draft-oleary-icap-01.txt
  167. -----------------------------------------------------------------------
  168.  
  169. 1. Protocol Overview
  170.  
  171. 1.1. Conventions Used in this Document
  172.  
  173. In examples, "C:" and "S:" indicate lines sent by the client and 
  174. server respectively.
  175.  
  176. The following terms are used in this document to signify the 
  177. requirements of this specification.
  178.  
  179. 1) MUST, or the adjective REQUIRED, means that the definition is 
  180. an absolute requirement of the specification.
  181.  
  182. 2) MUST NOT that the definition is an absolute prohibition of the 
  183. specification.
  184.  
  185. 3) SHOULD means that there may exist valid reasons in particular 
  186. circumstances to ignore a particular item, but the full implications 
  187. MUST be understood and carefully weighed before choosing a 
  188. different course.
  189.  
  190. 4) SHOULD NOT means that there may exist valid reasons in 
  191. particular circumstances when the particular behavior is acceptable 
  192. or even useful, but the full implications SHOULD be understood and 
  193. the case carefully weighed before implementing any behavior 
  194. described with this label.
  195.  
  196. 5) MAY, or the adjective OPTIONAL, means that an item is truly 
  197. optional.  One vendor may choose to include the item because a 
  198. particular marketplace requires it or because the vendor feels
  199. that it enhances the product while another vendor may omit the same 
  200. item.  An implementation which does not include a particular option 
  201. MUST be prepared to interoperate with another implementation 
  202. which does include the option.
  203.  
  204. "Can" is used instead of "may" when referring to a possible 
  205. circumstance or situation, as opposed to an optional facility of the 
  206. protocol.
  207.  
  208. "User" is used to refer to a human user, whereas "client" refers to the 
  209. software being run by the user.
  210.  
  211. 1.2. Link Level
  212. -----------------------------------------------------------------------
  213.                            Page:     4
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220. Internet-Draft                                 draft-oleary-icap-01.txt
  221. -----------------------------------------------------------------------
  222.  
  223. The ICAP server assumes a reliable, stream oriented transport such 
  224. as that provided by TCP/IP. When ICAP is used with TCP the server 
  225. listens on TCP port 7668 (subject to change).
  226.  
  227. 1.3. Commands and Responses
  228.  
  229. An ICAP session consists of the establishment of a client/server 
  230. connection, an initial greeting from the server, and client/server 
  231. interactions.  These client/server interactions consist of a client 
  232. command, server data, and a server completion result response.
  233.  
  234. All interactions transmitted by client and server are in the form of 
  235. lines; that is, strings that end with a CRLF.  The protocol receiver of 
  236. an ICAP client or server is either reading a line, or is reading a 
  237. sequence of octets with a known count followed by a line.
  238.  
  239. The ICAP server states a greeting similar to the following:
  240.  
  241. S: * OK ICAP Server ready.
  242.  
  243. The greeting is an untagged response from the server which includes 
  244. a list of the server's capabilities followed by an optional human-
  245. readable message. See below for the description of untagged 
  246. responses. If the ICAP server supports multiple capabilities (see 
  247. below) they must be presented using a parenthesized list. It is 
  248. mandatory that the capability ICAP be presented and that it be first 
  249. in the list of capabilities. If the capability ICAP is not presented, the 
  250. client cannot proceed and must close the connection immediately.
  251.  
  252. The server must present an OK response if it is ready to accept a 
  253. client connection. If the server is not ready to accept such a connect, 
  254. it must present a BYE response.
  255.  
  256. More examples of valid connection responses:
  257.  
  258. S: * OK (ICAP X-PigLatin) Server ready.
  259. S: * OK ICAP It's a wonderful day today!
  260. S: * BYE Connection refused. Please try again later.
  261.  
  262. 1.3.1.  Client Protocol Sender and Server Protocol Receiver
  263.  
  264. The client command begins an operation.  Each client command is 
  265. prefixed with a identifier (typically a short alphanumeric string, e.g. 
  266. -----------------------------------------------------------------------
  267.                            Page:     5
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274. Internet-Draft                                 draft-oleary-icap-01.txt
  275. -----------------------------------------------------------------------
  276. A0001, A0002, etc.) called a "tag".  A different tag is generated by 
  277. the client for each command.
  278.  
  279. There are two cases in which a line from the client does not 
  280. represent a complete command.  In one case, a command argument 
  281. is quoted with an octet count (see the description of literal in String 
  282. under Data Formats); in the other case, the command arguments 
  283. require server feedback (see the AUTHENTICATE command).  In 
  284. some of these cases, the server sends a command continuation 
  285. request response if it is ready for the octets (if appropriate) and the 
  286. remainder of the command.  This response is prefixed with the token 
  287. "+".
  288.  
  289. Note: If, instead, the server detected an error in the command, it 
  290. sends a BAD completion response with tag matching the command 
  291. (as described below) to reject the command and prevent the client 
  292. from sending any more of the command.
  293.  
  294. It is also possible for the server to send a completion or intermediate 
  295. response for some other command (if multiple commands are in 
  296. progress), or untagged data.  In either case, the command 
  297. continuation request is still pending; the client takes the appropriate 
  298. action for the response, and reads another response from the server.
  299.  
  300. The protocol receiver of an ICAP server reads a command line from 
  301. the client, parses the command and its arguments, and transmits 
  302. server data and a server command completion result response.
  303.  
  304. 1.3.2.  Server Protocol Sender and Client Protocol Receiver
  305.  
  306. Data transmitted by the server to the client come in four forms: 
  307. command continuation requests, command completion results, 
  308. intermediate responses, and untagged responses.
  309.  
  310. A command completion request is prefixed with the token "+".
  311.  
  312. A command completion result response indicates the success or 
  313. failure of the operation.  It is tagged with the same tag as the client 
  314. command which began the operation.  Thus, if more than one 
  315. command is in progress, the tag in a server completion response 
  316. identifies the command to which the response applies.  There are 
  317. three possible server completion responses: OK (indicating success), 
  318. NO (indicating failure), or BAD (indicating protocol error such as 
  319. unrecognized command or command syntax error).
  320. -----------------------------------------------------------------------
  321.                            Page:     6
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328. Internet-Draft                                 draft-oleary-icap-01.txt
  329. -----------------------------------------------------------------------
  330.  
  331. An intermediate response returns data which can only be interpreted 
  332. within the context of a command in progress.  It is tagged with the 
  333. same tag as the client command which began the operation.  Thus, if 
  334. more than one command is in progress, the tag in an intermediate 
  335. response identifies the command to which the response applies.  A 
  336. tagged response other than "OK", "NO", or "BAD" is an 
  337. intermediate response.
  338.  
  339. An untagged response returns data or status messages which may be 
  340. interpreted outside the context of a command in progress.  It is 
  341. prefixed with the token "*".  Untagged data may be sent as a result 
  342. of a client command, or may be sent unilaterally by the server. There 
  343. is no syntactic difference between untagged data that resulted from a 
  344. specific command and untagged data that were sent unilaterally.
  345.  
  346. The protocol receiver of an ICAP client reads a response line from 
  347. the server.  It then takes action on the response based upon the first 
  348. token of the response, which may be a tag, a "*", or a "+" as 
  349. described above.
  350.  
  351. A client MUST be prepared to accept any server response at all 
  352. times. This includes untagged data that it may not have requested.
  353.  
  354. This topic is discussed in greater detail in the Server Responses 
  355. section.
  356.  
  357. 1.4. Data Formats
  358.  
  359. ICAP uses textual commands and responses.  Data in ICAP can be in 
  360. one of several forms: atom, number, string, parenthesized list, dates 
  361. or NIL.
  362.  
  363. 1.4.1.  Atom
  364.  
  365. An atom consists of one or more non-special characters.
  366.  
  367. 1.4.2.  Number
  368.  
  369. A number consists of one or more digit characters, and represents a 
  370. numeric value.
  371.  
  372. 1.4.3.  String
  373.  
  374. -----------------------------------------------------------------------
  375.                            Page:     7
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382. Internet-Draft                                 draft-oleary-icap-01.txt
  383. -----------------------------------------------------------------------
  384. A string is in one of two forms: literal and quoted string.  The literal 
  385. form is the general form of string.  The quoted string form is an 
  386. alternative that avoids the overhead of processing a literal at the cost 
  387. of restrictions of what may be in a quoted string.
  388.  
  389. A literal is a sequence of zero or more octets (including CR and LF), 
  390. prefix-quoted with an octet count in the form of an open brace ("{"), 
  391. the number of octets, close brace ("}"), and CRLF.  In the case of 
  392. literals transmitted from server to client, the CRLF is immediately 
  393. followed by the octet data.  In the case of literals transmitted from 
  394. client to server, the client must wait to receive a command 
  395. continuation request (described later in this document) before 
  396. sending the octet data (and the remainder of the command).
  397.  
  398. A quoted string is a sequence of zero to 1024 7-bit characters, 
  399. excluding CR and LF, with double quote (<">) characters at each 
  400. end.
  401.  
  402. The empty string is respresented as either "" (a quoted string with 
  403. zero characters between double quotes), as {0} followed by CRLF (a 
  404. synchronizing literal with an octet count of 0), or as {0+} followed 
  405. by a CRLF (a non-synchronizing literal with an octet count of 0).
  406.  
  407. Note: Even if the octet count is 0, a client transmitting a literal must 
  408. wait to receive a command continuation request.
  409.  
  410. 1.4.4. Parenthesized Lists
  411.  
  412. Data structures are represented as a "parenthesized list"; a sequence 
  413. of data items, delimited by space, and bounded at each end by 
  414. parentheses.  A parenthesized list can contain other parenthesized
  415. lists, using multiple levels of parentheses to indicate nesting.
  416.  
  417. The empty list is represented as () -- a parenthesized list with no 
  418. members.
  419.  
  420. 1.4.5. NIL
  421.  
  422. The special atom "NIL" represents the non-existence of a particular 
  423. data item that is represented as a string or parenthesized list, as  
  424. distinct from the empty string "" or the empty parenthesized list ().
  425.  
  426. 1.4.6. Dates
  427.  
  428. -----------------------------------------------------------------------
  429.                            Page:     8
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436. Internet-Draft                                 draft-oleary-icap-01.txt
  437. -----------------------------------------------------------------------
  438. All dates given in this document are in a compact form of the ISO 
  439. 8601 date and time format [6]: YYYYMMDD 'T' HHMMSS. Hours 
  440. are always given using the 24 hour clock. A "Z" may be appended to 
  441. indicate UTC or "Zulu" time (that's GMT to most people). Any date 
  442. not given in UTC is assumed to be in the time zone of the server. 
  443. Explicit time zones can indicated using ISO 8601's time zone 
  444. convention of concatenating the number of hours (optionally 
  445. minutes) from UTC to the end of the given time. Clients can test and 
  446. set the time zone of the server they are connected to by using the 
  447. SETTINGS command (see below).
  448.  
  449. Note: ICAP servers do not support ISO 8601's week of the year 
  450. notation. Before storing in an ICAP server, these dates must be 
  451. converted to the above format.
  452.  
  453. Examples of valid dates:
  454.  
  455. 19960927T1530-08        'Sept. 27, 1996 in California
  456. 19960928T0030+01        'The same time as above in Central 
  457. Europe
  458. 20000101T0000-05        'New Year's Eve in New York City
  459.  
  460. 1.5.  Response when no Command in Progress
  461.  
  462. Server implementations are permitted to send an untagged response 
  463. while there is no command in progress.  Server implementations that 
  464. send such responses MUST deal with flow control considerations. 
  465. Specifically, they must either (1) verify that the size of the data does 
  466. not exceed the underlying transport's available window size, or (2) 
  467. use non-blocking writes.
  468.  
  469. 1.6.  Autologout Timer
  470.  
  471. If a server has an inactivity autologout timer, that timer MUST be of 
  472. at least 10 minutes' duration.  The receipt of ANY command from 
  473. the client during that interval should suffice to reset the autologout 
  474. timer.
  475.  
  476. 1.7.  Multiple Commands in Progress
  477.  
  478. The client is not required to wait for the completion result response 
  479. of a command before sending another command, subject to flow 
  480. control constraints on the underlying data stream.  Similarly, a 
  481. server is not required to process a command to completion before 
  482. -----------------------------------------------------------------------
  483.                            Page:     9
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490. Internet-Draft                                 draft-oleary-icap-01.txt
  491. -----------------------------------------------------------------------
  492. beginning processing of the next command, unless an ambiguity 
  493. would result because of a command that would affect the results of 
  494. other commands. If there is such an ambiguity, the server executes 
  495. commands to completion in the order given by the client.
  496.  
  497. 1.8. Calendar Store
  498.  
  499. The primary purpose of the ICAP protocol is to allow access to, and 
  500. the modification of, Calendar Stores. A Calendar Store is defined as 
  501. one set of Calendar Entries that are organized chronologically and 
  502. given a name. A Calendar Entry is one discrete item that may be 
  503. posted to a calendar. In ICAP, Calendar Entries are represented in 
  504. vCalendar Simplegram format.
  505.  
  506. 1.9. Unique Identifiers
  507.  
  508. Each ICAP server, Calendar store and Calendar entry must have a 
  509. unique identifier ("unique ID" or "UID") associated with it. This 
  510. unique ID must persist across sessions. Unique ID's in ICAP consist 
  511. of alphanumeric characters only, are exactly 16 characters in length 
  512. and are case sensitive. Nothing about the structure of the unique ID 
  513. must be assumed: they are not guaranteed to represent numeric 
  514. values, ascending in value, etc.
  515.  
  516. A Calendar store UID need only be unique within the current server 
  517. and is referred to hereafter as the Calendar Store ID (CSID). A 
  518. Calendar entry UID need only be unique within its Calendar store 
  519. and is referred to as the Calendar Entry ID (CEID).
  520.  
  521. The exact method for ensuring that UID's are unique is 
  522. implementation dependent.
  523.  
  524. Note that the vCalendar specification [2] defines an attribute called 
  525. "UID" for calendar entries which must be globally unique. This 
  526. value can be created by concatenating the server's host name then 
  527. the CSID and CEID.
  528.  
  529. 1.10. Calendar Store Naming
  530.  
  531. Calendar names can be any string of alphanumeric characters and 
  532. the characters "_" (underscore), "." (period), "-" (hyphen) and "'" 
  533. (apostrophe). Calendar names can contain spaces, in which case the 
  534. whole name must be delimited by double quote characters (see 
  535. below). Calendar names are case sensitive and must be distinct from 
  536. -----------------------------------------------------------------------
  537.                            Page:    10
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544. Internet-Draft                                 draft-oleary-icap-01.txt
  545. -----------------------------------------------------------------------
  546. all other Calendar stores.
  547.  
  548. Calendar names can be hierarchical: the hierarchy is read from left 
  549. (highest level in the hierarchy) to right and delimited by the "/" 
  550. (forward slash) character. If a hierarchical name is quoted, the entire 
  551. name must be quoted.
  552.  
  553. Examples of valid names:
  554.  
  555. "Pete's Calendar"
  556. Product_Calendar
  557. Project1
  558. SpinalTapPerformanceSchedule
  559. Projects/Pete/ICAP
  560. "Projects/Pete O'Leary/ICAP Specification Schedule"
  561.  
  562. Calendar names can contain a user's name delimited by angle braces 
  563. "<" and ">". Empty angle braces "<>" are meant to refer to the 
  564. currently authenticated user. This specification refers to "users" and 
  565. "user names", although these concepts can apply to things other than 
  566. human beings. For instance, a "user" with their own Calendar store 
  567. may actually be a resource such as a conference room which exists 
  568. outside of the Calendar server itself.
  569.  
  570. The important distinction between user names and store names is 
  571. that user names very often have meaning outside the implementation 
  572. of the current server. For instance, a user name may be an SMTP 
  573. mail address or a string that may be looked up using a directory 
  574. service like LDAP. An ICAP implementation must not assume 
  575. anything about the structure of a user name.
  576.  
  577. A user's name by itself, used as a Calendar Store name, must 
  578. represent the default Calendar Store (see below) for that user. The 
  579. user's name must also be the root by which other Calendar Stores the 
  580. user has created can be found (see the LIST command below). A user 
  581. name must always be at the leftmost position in the hierarchy of a 
  582. Calendar Store name. It is invalid to have a Calendar name with 
  583. more than one user name in it.
  584.  
  585. See the description of the SELECT and LIST commands below for 
  586. more discussion about user names and their use.
  587.  
  588. Valid names with user/resource names:
  589.  
  590. -----------------------------------------------------------------------
  591.                            Page:    11
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598. Internet-Draft                                 draft-oleary-icap-01.txt
  599. -----------------------------------------------------------------------
  600. <Pete>
  601. <Pete>/Project_Schedule
  602. <Large_Conference_Room>
  603. "<Palo Alto/Research Building/Large Conference Room>"
  604.  
  605. Invalid names:
  606.  
  607. Users/<Pete>
  608. <Pete>/<Paul>
  609. "Palo Alto/Research Building/<Large Conference Room>"
  610.  
  611. 1.11. Default Calendar
  612.  
  613. Every user local to a calendar server should have a "default 
  614. calendar". This is the Calendar store that is most likely to contain 
  615. up-to-the-minute information about a person's calendar. The exact 
  616. definition of this concept is implementation-dependent. The default 
  617. calendar, which can be selected using only the user's name, can be 
  618. used by clients to look up free and busy time information for that 
  619. user.
  620.  
  621. 1.12. Access Control
  622.  
  623. ICAP servers should allow for different levels of access control on 
  624. user's Calendar stores. The exact definition of this access control is 
  625. implementation dependent. A good default choice would be to allow 
  626. read-only access to a user's default calendar store via the EXAMINE 
  627. command to allow for free and busy time searches.
  628.  
  629. The server should give a NO response any time a client requests an 
  630. operation which is not permitted by access control.
  631.  
  632. For example, a server that allows anonymous read-only browsing of 
  633. Calendar stores may enforce the following rules:
  634.  
  635. 1. The client is only shown user's default Calendars when 
  636. performing a LIST command.
  637. 2. The client is only allowed to select Calendar stores via the 
  638. EXAMINE command.
  639. 3. The STORE command always returns a NO response and allows 
  640. no updates of the Calendar store. In this case, the server could 
  641. return a response to the client indicating where to send a 
  642. meeting invitation via e-mail to request a meeting with the 
  643. desired user.
  644. -----------------------------------------------------------------------
  645.                            Page:    12
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652. Internet-Draft                                 draft-oleary-icap-01.txt
  653. -----------------------------------------------------------------------
  654. 4. The FETCH command will return a NO response if the user 
  655. requests anything more than the flags and summary information 
  656. of a Calendar entry. This would allow the anonymous user to 
  657. browse the Calendar of another user in a company which had an 
  658. "open calendar" policy for all users.
  659. 5. Optionally, for a higher level of security, the server may return a 
  660. NO response for an attempted FETCH and allow only the use of 
  661. the FREETIME command. The FREETIME command does not 
  662. return any specific information about a user's calendar.
  663.  
  664. 1.13. Server States
  665.  
  666. An ICAP server is in one of four states.  Most commands are valid in 
  667. only certain states.  It is a protocol error for the client to attempt a 
  668. command while the command is in an inappropriate state.  In this 
  669. case, a server will respond with a BAD or NO (depending upon 
  670. server implementation) command completion result.
  671.  
  672. When a command is valid in more than one server state, the 
  673. description below will list the "Valid States" for that command.
  674.  
  675. 1.13.1.  Non-Authenticated State
  676.  
  677. In non-authenticated state, the user must supply authentication 
  678. credentials before most commands will be permitted.  This state is 
  679. entered when a connection starts.
  680.  
  681. 1.13.2.  Authenticated State
  682.  
  683. In authenticated state, the user is authenticated and most commands 
  684. will be permitted.  This state is entered when acceptable 
  685. authentication credentials have been provided.
  686.  
  687. 1.13.3. Selected State
  688.  
  689. In selected state, the user has chosen a particular calendar store (or 
  690. calendar stores) and can perform operations on them.
  691.  
  692. 1.13.4.  Logout State
  693.  
  694. In logout state, the session is being terminated, and the server will 
  695. close the connection.  This state can be entered as a result of a client 
  696. request or by unilateral server decision.
  697.  
  698. -----------------------------------------------------------------------
  699.                            Page:    13
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706. Internet-Draft                                 draft-oleary-icap-01.txt
  707. -----------------------------------------------------------------------
  708. 2. Scheduling Operations
  709.  
  710. This section discusses different scheduling operations and how ICAP 
  711. enables those operations. This section also presents scheduling 
  712. operations which ICAP does not enable and gives a short discussion 
  713. of why.
  714.  
  715. 2.1 Operations Supported by ICAP
  716.  
  717. For illustration purposes, the following is an incomplete list of the 
  718. scheduling operations that ICAP is intended to support:
  719.  
  720. 2.1.1. Calendar Browsing
  721.  
  722. ICAP supports the ability to open and browse Calendar Stores via the 
  723. SELECT and FETCH commands. A client may obtain a list of 
  724. Calendar Stores available using the LIST command. A user can 
  725. browse a Calendar that belongs the them or to another user, subject 
  726. to access control restrictions. The SELECT command actually allows 
  727. multiple users' Calendars to be viewed simultaneously.
  728.  
  729. 2.1.2. Freetime Search
  730.  
  731. ICAP supports the ability to obtain free and busy information about a 
  732. user in two ways:
  733.  
  734. 1. The user's default Calendar Store can be browsed as described 
  735. above. 
  736. 2. The FREETIME command can be used to obtain a "snapshot" of 
  737. users' availability during a given period of time.
  738.  
  739. 2.1.3.  Creating, Deleting and Modifying Calendar Entries
  740.  
  741. A user can create, delete and modify entries either in their own 
  742. Calendar Stores or, subject to access control restrictions, in another 
  743. user's Calendar store.
  744.  
  745. The APPEND command is used to create new Calendar Entries in 
  746. any accessible Calendar Store. The STORE command is used to 
  747. modify or mark for deletion Calendar entries in the currently 
  748. selected Calendar store.
  749.  
  750. 2.1.4. Group Scheduling
  751.  
  752. -----------------------------------------------------------------------
  753.                            Page:    14
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760. Internet-Draft                                 draft-oleary-icap-01.txt
  761. -----------------------------------------------------------------------
  762. ICAP supports the so-called "direct-book" mechanism of creating 
  763. group meetings by allowing a user to actually place a shared 
  764. Calendar entry into the Calendar Stores of multiple users. This is not 
  765. the only way that group scheduling can be performed (see below 
  766. under "Meeting Invitations"). 
  767.  
  768. An ICAP implementation may choose not to support direct-book 
  769. group scheduling by enforcing access control on users' Calendar 
  770. Stores.
  771.  
  772. 2.2. Operations Not Supported By ICAP
  773.  
  774. The following is partially complete list of the scheduling operations 
  775. that ICAP is NOT intended to support:
  776.  
  777. 2.2.1. Meeting Invitations
  778.  
  779. ICAP contains no mechanisms for sending so-called "meeting 
  780. invitations" to Calendar users. Meeting invitations are one means by 
  781. which group scheduling can be accomplished. This operations may 
  782. be accomplished by sending vCalendar simplegrams encapsulated as 
  783. MIME [3] content in an SMTP [4] mail message.
  784.  
  785. ICAP contains no mechanisms for allowing access to meeting 
  786. invitations that have been received by a user. This should be 
  787. accomplished via message access protocols like IMAP4 [1].
  788.  
  789. 2.2.2. Directory Services
  790.  
  791. ICAP contains no mechanisms for locating a user or obtaining 
  792. personal information about a user. This operation should be 
  793. accomplished via LDAP [5].
  794.  
  795. 3. ICAP Commands - Any State
  796.  
  797. 3.1. CAPABILITY Command
  798.  
  799. Arguments:      None.
  800.  
  801. Data:           Mandatory untagged response: CAPABILITY
  802.  
  803. Result:         OK - Command completed
  804.                 NO - Command failed
  805.                 BAD - Improperly formed command, invalid 
  806. -----------------------------------------------------------------------
  807.                            Page:    15
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814. Internet-Draft                                 draft-oleary-icap-01.txt
  815. -----------------------------------------------------------------------
  816. arguments
  817.  
  818. The CAPABILITY command requests a listing of capabilities that 
  819. the server supports.  The server MUST send a single untagged 
  820. CAPABILITY response with "IMAP4rev1" as one of the listed 
  821. capabilities before the (tagged) OK response.  This listing of 
  822. capabilities is not dependent upon connection state or user.  It
  823. is therefore not necessary to issue a CAPABILITY command more 
  824. than once in a session.
  825.  
  826. A capability name which begins with "AUTH=" indicates that the 
  827. server supports that particular authentication mechanism.  See [5] 
  828. for a discussion of authentication mechanisms that can be used with 
  829. ICAP. All authentication names are, by definition, part of this 
  830. specification.  For example, the authorization capability for an 
  831. experimental "blurdybloop" authenticator would be "AUTH=X-
  832. BLURDYBLOOP" and not "X-AUTH=BLURDYBLOOP" or "X-
  833. AUTH=X-BLURDYBLOOP".  Other capability names refer to 
  834. extensions, revisions, or amendments to this specification.  See the 
  835. documentation of the CAPABILITY response additional 
  836. information.  No capabilities are enabled without explicit client 
  837. action to invoke the capability.  See the section entitled "X-(Atom) 
  838. Experimental Commands" for information about the form of site or 
  839. implementation-specific capabilities.
  840.  
  841. Examples:
  842.  
  843. C: a001 CAPABILITY
  844. S: * CAPABILITY ICAP
  845. S: a001 OK CAPABILITY completed
  846.  
  847. C: a001 CAPABILITY
  848. S: * CAPABILITY ICAP X-Vegomatic AUTH=X-Secret-Decoder-
  849. Rings
  850. S: a001 OK CAPABILITY completed
  851.  
  852. C: a001 CAPABILITY
  853. S: * CAPABILITY ICAP AUTH=KERBEROS_V4
  854. S: a001 OK CAPABILITY completed
  855.  
  856.  
  857. 3.2. NOOP Command
  858.  
  859. Arguments:      None
  860.  
  861. -----------------------------------------------------------------------
  862.                            Page:    16
  863.  
  864.  
  865.  
  866.  
  867.  
  868.  
  869. Internet-Draft                                 draft-oleary-icap-01.txt
  870. -----------------------------------------------------------------------
  871. Data:           Optional untagged responses.
  872.  
  873. Result:         OK - Command completed
  874.                 BAD - Improperly formed command, arguments 
  875. supplied which are not allowed
  876.  
  877. An ICAP server must support this command. The NOOP command 
  878. always succeeds.  It does nothing.
  879.  
  880. Since any command can return a status update as untagged data, the 
  881. NOOP command can be used as a periodic poll during a period of 
  882. inactivity.  The NOOP command can also be used to reset any 
  883. inactivity autologout timer on the server.
  884.  
  885. Examples:
  886.  
  887. C: A001 NOOP
  888. S: A001 OK NOOP Completed.
  889.  
  890. C: A002 NOOP
  891. S: * 42 EXISTS
  892. S: * 1 RECENT
  893. S: A002 OK NOOP Completed.
  894.  
  895. 3.4. LOGOUT Command
  896.  
  897. Arguments:      None
  898.  
  899. Data:           None
  900.  
  901. Result:         OK - Command completed.
  902.                 NO - Command failed, this would indicate that 
  903. something is seriously wrong.
  904.                 BAD - Improperly formed command, arguments 
  905. supplied which are not allowed
  906.  
  907. An ICAP server must support this command, closing all open 
  908. selected Calendars and disconnecting. If a NO response is returned 
  909. by this command, the server should return some human-readable 
  910. information describing why the Logout cannot occur and what the 
  911. user can do to correct the situation. The server must send an 
  912. untagged BYE response before the connection is closed and the 
  913. command completes.
  914.  
  915. -----------------------------------------------------------------------
  916.                            Page:    17
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923. Internet-Draft                                 draft-oleary-icap-01.txt
  924. -----------------------------------------------------------------------
  925. Example:
  926.  
  927. C: A001 LOGOUT
  928. S: * BYE ICAP Server logging out.
  929. S: A001 OK LOGOUT Completed.
  930.  
  931. 3.5. SETTINGS Command
  932.  
  933. Arguments:      Optional keyword "QUERY"
  934.  
  935. Data:           Optional untagged response: SETTING
  936.  
  937. Result:         OK - Command completed, at least one setting was 
  938. successfully updated
  939.                 NO - Command failed, no updates made
  940.                 BAD - Improperly formed command, invalid 
  941. arguments, no updates made
  942.  
  943. Allows the client to set session-level options that apply to all 
  944. subsequent Calendar operations. Options are given in the form:
  945.  
  946. option_name [';' option_parameters] ':' option_setting [CRLF]
  947.  
  948. Options are supplied either as a quoted string, in which case only 
  949. one option can be changed, or as a literal.
  950.  
  951. After all new options have been given, the server must send 
  952. untagged status responses back to the client corresponding to the 
  953. options given. These responses can specify whether or not the given 
  954. option was set correctly. The status responses must contain the 
  955. response code SETTINGS. OK responses should also include the 
  956. option name and option setting. NO responses must contain the 
  957. option name not set.
  958.  
  959. Mandatory options and their defaults are as follows. Implementation 
  960. specific extensions to these options may be added. Any option 
  961. extension which is not part of this standard or is not intended to be 
  962. part of this standard must be prefixed with an "X-".
  963.  
  964. The current options correspond to vCalendar properties, see [2]:
  965.  
  966. LANGUAGE                "en-US" (US English)
  967. CHARSET         "ASCII"
  968. ENCODING                "7BIT"
  969. -----------------------------------------------------------------------
  970.                            Page:    18
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977. Internet-Draft                                 draft-oleary-icap-01.txt
  978. -----------------------------------------------------------------------
  979. TZ                      "00" (GMT)
  980. ISID                    The unique ID of this server. This value 
  981. cannot be changed.
  982.  
  983. In this example, the client attempts to set 3 options the standard 
  984. "ENCODING" and "TZ" the implementation specific options "X-
  985. FOO" and "X-BRUCE". The server accepts the first two options and 
  986. "X-BRUCE" but rejects "X-FOO":
  987.  
  988. C: A001 SETTINGS {50}
  989. C: ENCODING: BASE64
  990. C: TZ: -06
  991. C: X-FOO: BAR
  992. C: X-BRUCE: K
  993. S: * OK [SETTING ENCODING BASE64]
  994. S: * OK [SETTING TZ -06]
  995. S: * NO [SETTING X-FOO]
  996. S: * OK [SETTING X-BRUCE K]
  997. S: A001 OK SETTINGS
  998.  
  999. The keyword "QUERY" can be given on the same line as the 
  1000. SETTINGS command to query all existing settings. In this case, no 
  1001. additional lines must be sent by the client. The server must reply 
  1002. with an untagged response for each setting that it supports.
  1003.  
  1004. Example:
  1005.  
  1006. C: A001 SETTINGS QUERY
  1007. S: * OK [SETTING ENCODING 7BIT]
  1008. S: * OK [SETTING TZ -09]
  1009. S: * OK [SETTING CHARSET ASCII]
  1010. S: * OK [SETTING LANGUAGE en-US]
  1011. S: A001 OK SETTINGS
  1012.  
  1013. 3.6. X-(Atom) Experimental Commands
  1014.  
  1015. Arguments:      implementation defined
  1016.  
  1017. Data:           implementation defined
  1018.  
  1019. Result:         OK - command completed
  1020. NO - failure
  1021. BAD - command unknown or arguments invalid
  1022.  
  1023. -----------------------------------------------------------------------
  1024.                            Page:    19
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031. Internet-Draft                                 draft-oleary-icap-01.txt
  1032. -----------------------------------------------------------------------
  1033. Any command prefixed with an "X-" is an experimental command. 
  1034. Commands which are not part of this specification MUST use the 
  1035. "X-" prefix.
  1036.  
  1037. Any added untagged responses issued by an experimental command 
  1038. MUST also be prefixed with an X.  Server implementations MUST 
  1039. NOT send any such untagged responses, unless the client requested 
  1040. it by issuing the associated experimental command.
  1041.  
  1042. Example:
  1043.  
  1044. C: a441 CAPABILITY
  1045. S: * CAPABILITY ICAP AUTH=KERBEROS_V4 X-PIG-LATIN
  1046. S: a441 OK CAPABILITY completed
  1047. C: A442 X-PIG-LATIN
  1048. S: * XPIG-LATIN ow-nay eaking-spay ig-pay atin-lay
  1049. S: A442 OK X-PIG-LATIN ompleted-cay
  1050.  
  1051. 4. ICAP Commands - Non-Authenticated 
  1052. State
  1053.  
  1054. 4.1. AUTHENTICATE Command
  1055.  
  1056. Arguments:      Authentication mechanism name
  1057.  
  1058. Data:           None.
  1059.  
  1060. Result:         OK - Command completed, in Authenticated state
  1061.                 NO - Command failed, still in Non-Authenticated 
  1062. state
  1063.                 BAD - Improperly formed command, invalid 
  1064. arguments, still Non-Authenticated.
  1065.  
  1066. The AUTHENTICATE command indicates an authentication 
  1067. mechanism, such as described in [5], to the server.  If the server 
  1068. supports the requested authentication mechanism, it performs an 
  1069. authentication protocol exchange to authenticate and identify the 
  1070. client.  It MAY also negotiate an OPTIONAL protection mechanism 
  1071. for subsequent protocol interactions.  If the requested authentication 
  1072. mechanism is not supported, the server SHOULD reject the 
  1073. AUTHENTICATE command by sending a tagged NO response.
  1074.  
  1075. The authentication protocol exchange consists of a series of server 
  1076. challenges and client answers that are specific to the authentication 
  1077. -----------------------------------------------------------------------
  1078.                            Page:    20
  1079.  
  1080.  
  1081.  
  1082.  
  1083.  
  1084.  
  1085. Internet-Draft                                 draft-oleary-icap-01.txt
  1086. -----------------------------------------------------------------------
  1087. mechanism.  A server challenge consists of a command continuation 
  1088. request response with the "+" token followed by a BASE64 encoded 
  1089. string.  The client answer consists of a line consisting of a BASE64 
  1090. encoded string.  If the client wishes to cancel an authentication 
  1091. exchange, it issues a line with a single "*".  If the server receives 
  1092. such an answer, it MUST reject the AUTHENTICATE command by 
  1093. sending a tagged BAD response.
  1094.  
  1095. A protection mechanism provides integrity and privacy protection to 
  1096. the protocol session.  If a protection mechanism is negotiated, it is 
  1097. applied to all subsequent data sent over the connection. The 
  1098. protection mechanism takes effect immediately following the CRLF 
  1099. that concludes the authentication exchange for the client, and the 
  1100. CRLF of the tagged OK response for the server.  Once the protection 
  1101. mechanism is in effect, the stream of command and response octets 
  1102. is processed into buffers of ciphertext.  Each buffer is transferred 
  1103. over the connection as a stream of octets prepended with a four octet 
  1104. field in network byte order that represents the length of the following 
  1105. data.  The maximum ciphertext buffer length is defined by the 
  1106. protection mechanism.
  1107.  
  1108. Authentication mechanisms are OPTIONAL.  Protection 
  1109. mechanisms are also OPTIONAL; an authentication mechanism 
  1110. MAY be implemented without any protection mechanism.  If an 
  1111. AUTHENTICATE command fails with a NO response, the client 
  1112. MAY try another authentication mechanism by issuing another 
  1113. AUTHENTICATE command, or MAY attempt to authenticate by 
  1114. using the LOGIN command.  In other words, the client MAY request 
  1115. authentication types in decreasing order of preference, with the 
  1116. LOGIN command as a last resort.
  1117.  
  1118. Example:
  1119.  
  1120. S: * OK ICAP KerberosV4 Server
  1121. C: A001 AUTHENTICATE KERBEROS_V4
  1122. S: + AmFYig==
  1123. C: 
  1124. BAcAQU5EUkVXLkNNVS5FRFUAOCAsho84kLN3/IJmrMG+25a
  1125. 4DT
  1126. +nZImJjnTNHJUtxAA+o0KPKfHEcAFs9a3CL5Oebe/ydHJUwYFd
  1127. WwuQ1MWiy6IesKvjL5rL9WjXUb9MwT9bpObYLGOKi1Qh
  1128. S: + or//EoAADZI=
  1129. C: DiAF5A4gA+oOIALuBkAAmw==
  1130. S: A001 OK Kerberos V4 authentication successful
  1131. -----------------------------------------------------------------------
  1132.                            Page:    21
  1133.  
  1134.  
  1135.  
  1136.  
  1137.  
  1138.  
  1139. Internet-Draft                                 draft-oleary-icap-01.txt
  1140. -----------------------------------------------------------------------
  1141.  
  1142. Note: the line breaks in the first client answer are for editorial clarity 
  1143. and are not in real authenticators.
  1144.  
  1145. 4.2. LOGIN Command
  1146.  
  1147. Arguments:      User name for login.
  1148. Optional password.
  1149.  
  1150. Data:           None.
  1151.  
  1152. Result:         OK - Command completed, in Authenticated state
  1153.                 NO - Command failed, still in Non-Authenticated 
  1154. state
  1155.                 BAD - Improperly formed command, invalid 
  1156. arguments, still in Non-Authenticated state.
  1157.  
  1158. The LOGIN command identifies the client to the server and carries 
  1159. the plaintext password authenticating this user.
  1160.  
  1161. This is accomplished by allowing a LOGIN command specifying a 
  1162. user name of "Anonymous" and any password. The anonymous user 
  1163. should be allowed to enter the Authenticated state, with access 
  1164. control restrictions. It is recommended that anonymous users be 
  1165. given read-only permission to users' default Calendar stores to allow 
  1166. free busy time searches.
  1167.  
  1168. Example:
  1169.  
  1170. C: a001 LOGIN Pete Mumblefrtoz
  1171. S: a001 OK LOGIN completed
  1172.  
  1173. 5. ICAP Commands - Authenticated State
  1174.  
  1175. 5.1. SELECT Command
  1176.  
  1177. Arguments:      Name of the Calendar store to select.
  1178.  
  1179. Data:           Mandatory untagged response: FLAGS, EXISTS
  1180. Optional untagged responses: RECENT
  1181.  
  1182. Result:         OK - now in Selected state
  1183. NO - no such Calendar store, can't access 
  1184. Calendar store
  1185. -----------------------------------------------------------------------
  1186.                            Page:    22
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193. Internet-Draft                                 draft-oleary-icap-01.txt
  1194. -----------------------------------------------------------------------
  1195.                 BAD - Invalid arguments
  1196.  
  1197. Valid states:   Authenticated, Selected
  1198.  
  1199. The SELECT command selects the Calendar store for the current 
  1200. user so that Calendar entries can be queried and retrieved. Multiple 
  1201. Calendar stores can be selected by reissuing the SELECT command. 
  1202. In this way, a composite view of the Calendar stores can be created. 
  1203. This composite calendar can then be used to allow browsing of group 
  1204. calendars and creating of group meetings (see below). It is invalid to 
  1205. select the same Calendar store more than once.
  1206.  
  1207. The name parameter can be the name of a Calendar and optionally a 
  1208. user name. If a user name is given, then it is bracketed with angle 
  1209. braces "<" and ">" and added before the Calendar store name. The 
  1210. default Calendar store of a user can be selected by using only the 
  1211. user's name bracketed by angles. The default calendar store of the 
  1212. current user can be selected by using angles"<>". All commands 
  1213. which take a Calendar store name as a parameter can accept a user 
  1214. name in this manner. Which Calendar store is selected as a default is 
  1215. implementation dependent. It is recommended that the default store 
  1216. be whichever Calendar store most accurately represents the user's 
  1217. actual schedule, so that it can be queried to find freetime (see the 
  1218. FREETIME command below). Any Calendar store name given that 
  1219. does not include an explicit username must be assumed to belong to 
  1220. the current user. In other words, a prefix of "<>/" can be implicitly 
  1221. added before any Calendar store name that does not give an explicit 
  1222. user name.
  1223.  
  1224. The user name may be specified as <"username"@"hostname">. If 
  1225. "hostname" is the name of the current host machine, then 
  1226. "hostname" may be omitted and the form is: <"username">. If 
  1227. "hostname" is included, and it is different from the current host 
  1228. machine name, the server can either reject the name with a NO 
  1229. response or attempt to connect to the specified host machine on 
  1230. behalf of the user and issue an OK response if successful. If a NO 
  1231. response is given by the server because the given user's calendar 
  1232. information is not located on the host but the server knows where, a 
  1233. reference name in angle brackets may be included as part of the 
  1234. response.
  1235.  
  1236. The EXISTS response should return the total number of entries 
  1237. currently selected. When multiple Calendar stores are selected, this 
  1238. is the combined total of all entries selected in all the Calendar stores.
  1239. -----------------------------------------------------------------------
  1240.                            Page:    23
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247. Internet-Draft                                 draft-oleary-icap-01.txt
  1248. -----------------------------------------------------------------------
  1249.  
  1250. All entries in the selected Calendar stores must be presented by the 
  1251. server in chronological order from 1 to the number of entries 
  1252. returned by the EXISTS response. If multiple Calendar stores are 
  1253. selected by reissuing the SELECT command and the server cannot 
  1254. support presenting multiple Calendars in chronological order the 
  1255. server must issue a NO response for additional Calendars as they are 
  1256. selected.
  1257.  
  1258. Note for readers familiar with IMAP4: The ICAP protocol does not 
  1259. require any correlation between entry numbers and unique ID's as 
  1260. IMAP4 does. UID's are not required to be strictly ascending. 
  1261. Furthermore, UID's in ICAP cannot change between sessions as in 
  1262. IMAP4 (per the UIDVALIDITY response).
  1263.  
  1264. The RECENT response should be given if new Calendar entries have 
  1265. appear in the selected Calendar since it was last selected. This may 
  1266. occur when someone else's Calendar store is selected or possibly 
  1267. when someone else - an assistant perhaps - modifies the user's 
  1268. Calendar
  1269.  
  1270. The FLAGS response should list the flags supported by this Calendar 
  1271. store. Note that when multiple Calendar stores are selected, the 
  1272. FLAGS supported should be the intersection of those supported by 
  1273. all the Calendars.
  1274.  
  1275. Flags current supported are:
  1276.  
  1277. \Deleted - Entry is marked for deletion.
  1278. \Recent - Entry has been added since the last time that this Calendar 
  1279. store was selected.
  1280. \Repeating - Entry is one of a repeating set of entries.
  1281. \Tentative - The entry is marked as being "tentative" - not yet 
  1282. confirmed - by the Calendar's owner.
  1283. \Seen - The user has already seen this entry. Set by default when the 
  1284. user creates an entry in their own store.
  1285.  
  1286. Example interactions:
  1287.  
  1288. C: A001 SELECT
  1289. S: * 123 EXISTS
  1290. S: * FLAGS (\Deleted \Recent \Repeating)
  1291. S: A001 OK SELECT Completed
  1292. C: A002 RANGE 19960101T000000 19960130T235959
  1293. -----------------------------------------------------------------------
  1294.                            Page:    24
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301. Internet-Draft                                 draft-oleary-icap-01.txt
  1302. -----------------------------------------------------------------------
  1303.  
  1304. The  sequence above selects the current user's default Calendar store. 
  1305. It then sends a Selected state command called RANGE (see below).
  1306.  
  1307. C: A001 SELECT <>/Section1
  1308. S: * 45 EXISTS
  1309. S: * FLAGS (\Deleted \Recent \Repeating)
  1310. S: A001 OK SELECT completed
  1311. C: A002 RANGE 19960101T000000 19960130T235959
  1312.  
  1313. The sequence above selects the current user's Calendar store called 
  1314. "Section1". It then sends a Selected state command called RANGE.
  1315.  
  1316. C: A001 SELECT <>
  1317. S: * 23 EXISTS
  1318. S: * FLAGS (\Deleted \Recent \Repeating)
  1319. S: A001 OK SELECT completed
  1320. C: A002 SELECT <Bob>
  1321. S: * 56 EXISTS
  1322. S: * FLAGS (\Deleted \Recent \Repeating)
  1323. S: A002 OK SELECT completed
  1324. C: A003 SELECT <Sally>
  1325. S: * 123 EXISTS
  1326. S: * FLAGS (\Deleted \Recent \Repeating)
  1327. S: A003 OK SELECT completed
  1328.  
  1329. This sequence uses multiple SELECT commands to open the current 
  1330. user's default Calendar store plus the default Calendar stores of Bob 
  1331. and Sally. Note that the EXISTS response from the command 
  1332. contains the number of Calendar entries in all of the Calendars 
  1333. currently selected.
  1334.  
  1335. C: A001 SELECT <jyip@clearblue.com>
  1336. S: A001 NO SELECT No such user.
  1337.  
  1338. C: A001 SELECT <paul@broadbase.com>
  1339. S: * 27 EXISTS
  1340. S: * FLAGS (\Deleted \Recent \Repeating)
  1341. S: A001 OK SELECT completed.
  1342.  
  1343. C: A001 SELECT <poleary@clearblue.com>
  1344. S: A001 NO SELECT Try <poleary@yosemite.clearblue.com>
  1345.  
  1346. These sequences demonstrate how a server might handle a SELECT 
  1347. -----------------------------------------------------------------------
  1348.                            Page:    25
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355. Internet-Draft                                 draft-oleary-icap-01.txt
  1356. -----------------------------------------------------------------------
  1357. command where the given user's Calendar store is not on the current 
  1358. host. In the second example, the server knows the location of the 
  1359. user's Calendar host and supplies that information to the client.
  1360.  
  1361. 5.2. EXAMINE Command
  1362.  
  1363. Data:           None.
  1364. Result:         OK - Command completed
  1365.                 NO - Command failed
  1366.                 BAD - Improperly formed command, invalid 
  1367. arguments
  1368.  
  1369. Valid states:   Authenticated, Selected
  1370.  
  1371. This command is identical to SELECT except that the selected 
  1372. Calendar store is returned read only. EXAMINE and SELECT 
  1373. command can be given in combination to select multiple calendars 
  1374. for browsing. The operation is identical in all respects, regardless of 
  1375. which command is used, except that a Calendar store selected via 
  1376. EXAMINE cannot be modified or updated in any way.
  1377.  
  1378. 5.3. CREATE Command
  1379.  
  1380. Arguments:      Name of Calendar store to create.
  1381.  
  1382. Data:           None.
  1383.  
  1384. Result:         OK - Calendar store created.
  1385.                 NO - Calendar store not created.
  1386.                 BAD - Invalid arguments.
  1387.  
  1388. Valid states:   Authenticated, Selected
  1389.  
  1390. Creates a new Calendar store with the given name. Calendar store 
  1391. names must begin with an alphabetic character and consist of 
  1392. alphanumeric characters. Calendar names are not case sensitive. It is 
  1393. illegal to create more than one Calendar store with the same name. 
  1394. CREATE does not automatically select the Calendar store created.
  1395.  
  1396. If the Calendar name is suffixed with the hierarchy separator "/", 
  1397. this is a declaration that the client intends to create Calendar names 
  1398. under this name in the hierarchy.  Server implementations that do 
  1399. not require this declaration MUST ignore it.
  1400.  
  1401. -----------------------------------------------------------------------
  1402.                            Page:    26
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409. Internet-Draft                                 draft-oleary-icap-01.txt
  1410. -----------------------------------------------------------------------
  1411. If the hierarchy separator character appears elsewhere in the name, 
  1412. the server SHOULD create any superior hierarchical names that are 
  1413. needed for the CREATE command to complete successfully. In other 
  1414. words, an attempt to create "foo/bar/zap" on a server SHOULD 
  1415. create foo/ and foo/bar/ if they do not already exist.
  1416.  
  1417. Example:
  1418.  
  1419. C: A001 CREATE Projects/
  1420. S: A001 OK CREATE Completed
  1421. C: A001 CREATE Projects/Purple
  1422. S: A001 OK CREATE Completed
  1423. C: A001 CREATE Projects/Green
  1424. S: A001 OK CREATE Completed
  1425.  
  1426. The above example creates two Calendar stores for the default user 
  1427. below the hierarchical name "Projects".
  1428.  
  1429. 5.4. DELETE Command
  1430.  
  1431. Arguments:      Name of Calendar store to delete.
  1432.  
  1433. Data:           None.
  1434.  
  1435. Result:         OK - Calendar store deleted.
  1436.                 NO - Calendar store not deleted.
  1437.                 BAD - Invalid arguments.
  1438.  
  1439. Valid states:   Authenticated, Selected
  1440.  
  1441. Deletes the Calendar store with the given name. If this command is 
  1442. given from the Selected state, a currently selected Calendar cannot 
  1443. be deleted.
  1444.  
  1445. Example:
  1446.  
  1447. C: A001 DELETE Projects/Purple
  1448. S: A001 OK DELETE Completed.
  1449.  
  1450. 5.5. RENAME Command
  1451.  
  1452. Arguments:      Name of Calendar store to rename.
  1453.                 New Calendar store name.
  1454.  
  1455. -----------------------------------------------------------------------
  1456.                            Page:    27
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463. Internet-Draft                                 draft-oleary-icap-01.txt
  1464. -----------------------------------------------------------------------
  1465. Data:           None.
  1466.  
  1467. Result:         OK - Calendar store renamed
  1468.                 NO - Calendar store not renamed.
  1469.                 BAD - Invalid arguments
  1470.  
  1471. Valid states:   Authenticated, Selected
  1472.  
  1473. The RENAME command changes the name of a Calendar store.  A 
  1474. tagged OK response is returned only if the Calendar has been 
  1475. renamed.  It is an error to attempt to rename from a Calendar name 
  1476. that does not exist or to a Calendar name that already exists.  Any 
  1477. error in renaming will return a tagged NO response. 
  1478.  
  1479. If the hierarchy separator character appears in the new Calendar 
  1480. store name, the server SHOULD create any superior hierarchical 
  1481. names that are needed for the RENAME command to complete 
  1482. successfully. In other words, an attempt to rename a Calendar to 
  1483. "foo/bar/zap" on a server SHOULD create foo/ and foo/bar/ if they do 
  1484. not already exist.
  1485.  
  1486. Example:
  1487.  
  1488. C: A001 RENAME Projects/Purple Projects/Orange
  1489. S: A001 OK RENAME Completed.
  1490. C: A001 RENAME Projects/Green Completed/Green
  1491. S: A001 OK RENAME Completed.
  1492.  
  1493. 5.6. LIST Command
  1494.  
  1495. Arguments:      Store name with optional wildcard
  1496.  
  1497. Data:           Untagged responses: LIST
  1498.  
  1499. Result:         OK - List complete.
  1500.                 NO - List failed, no stores found that match the 
  1501. given pattern.
  1502.                 BAD - What did that pattern mean anyway?
  1503.  
  1504. Valid states:   Authenticated, Selected
  1505.  
  1506. The LIST command returns an untagged LIST response for each 
  1507. Calendar store that matches the given reference and store name. The 
  1508. "*" character is a wildcard and can be used only in the right-most 
  1509. -----------------------------------------------------------------------
  1510.                            Page:    28
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517. Internet-Draft                                 draft-oleary-icap-01.txt
  1518. -----------------------------------------------------------------------
  1519. position in the given store name.
  1520.  
  1521. ICAP uses the "/" character to delimit levels of hierarchy: if the 
  1522. Calendar store name returned by the LIST command ends with a "/" 
  1523. character, then a level of hierarchy exists below that store name. If 
  1524. that store name cannot be selected, the LIST response must include 
  1525. the \Noselect flag, as described below in the LIST response.
  1526.  
  1527. The server must hide all Calendar stores that the current user does 
  1528. not have access to. 
  1529.  
  1530. These reference names should be interpreted in the following 
  1531. manner:
  1532.  
  1533. * - all top-level Calendar store of the current user
  1534. <*> - all users accessible by the server
  1535. <> - the currently authenticated user
  1536.  
  1537. Examples:
  1538.  
  1539. C: A001 LIST <*>
  1540. S: * LIST () <Ann>
  1541. S: * LIST () <Bob>
  1542. S: * LIST () <Pete>
  1543. S: * LIST () <Pete>
  1544. C: A002 LIST <Ann>/*
  1545. S: * LIST () <Ann>/Project_1
  1546. S: * LIST () <Ann>/Project_2
  1547. S: A001 OK LIST Completed.
  1548.  
  1549. C: A001 LIST *
  1550. S: * LIST () Business
  1551. S: * LIST () Private
  1552. S: * LIST () CorporateEvents
  1553. S: * LIST (\Noselect) Projects/
  1554. S: A001 OK LIST Completed.
  1555. C: A002 LIST Projects/*
  1556. S: * LIST () Projects/ICAP_Spec
  1557. S: * LIST () "Projects/Vacation Plans"
  1558. S: A002 OK LIST Completed.
  1559.  
  1560. 5.7. LSUB Command
  1561.  
  1562. Arguments:      Store name with optional wildcard
  1563. -----------------------------------------------------------------------
  1564.                            Page:    29
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571. Internet-Draft                                 draft-oleary-icap-01.txt
  1572. -----------------------------------------------------------------------
  1573.  
  1574. Data:           Untagged responses: LIST
  1575.  
  1576. Result:         OK - List complete.
  1577.                 NO - List failed, no stores found that match the 
  1578. given pattern.
  1579.                 BAD - What did that pattern mean anyway?
  1580.  
  1581. Valid states:   Authenticated, Selected
  1582.  
  1583. The LSUB command is identical to the LIST command except that it 
  1584. returns Calendar names from those that the current user has 
  1585. subscribed to.
  1586.  
  1587. 5.8. SUBSCRIBE Command
  1588.  
  1589. Arguments:      Calendar name
  1590.  
  1591. Data:           None
  1592.  
  1593. Result:         OK - Subscribe complete.
  1594.                 NO - Subscribe failed, no stores found that match 
  1595. name.
  1596.                 BAD - Invalid arguments
  1597.  
  1598. Valid states:   Authenticated, Selected
  1599.  
  1600. The SUBSCRIBE command adds the given Calendar store name to 
  1601. the list of subscribed stores that will be returned by the LSUB 
  1602. command.
  1603.  
  1604. Example:
  1605.  
  1606. C: A001 SUBSCRIBE <Corporate_Calendar>/Barbecues
  1607. S: A001 OK SUBSCRIBE Completed.
  1608.  
  1609. 5.9. UNSUBSCRIBE Command
  1610.  
  1611. Arguments:      Calendar name
  1612.  
  1613. Data:           None
  1614.  
  1615. Result:         OK - Unsubscribe complete.
  1616.                 NO - Unsubscribe failed, no stores found that 
  1617. -----------------------------------------------------------------------
  1618.                            Page:    30
  1619.  
  1620.  
  1621.  
  1622.  
  1623.  
  1624.  
  1625. Internet-Draft                                 draft-oleary-icap-01.txt
  1626. -----------------------------------------------------------------------
  1627. match name.
  1628.                 BAD - Invalid arguments
  1629.  
  1630. Valid states:   Authenticated, Selected
  1631.  
  1632. The UNSUBSCRIBE command removes the given Calendar store 
  1633. name from the list of subscribed stores that will be returned by the 
  1634. LSUB command.
  1635.  
  1636. Example:
  1637.  
  1638. C: A001 UNSUBSCRIBE <Corporate_Calendar>/Barbecues
  1639. S: A001 OK UNSUBSCRIBE Completed.
  1640.  
  1641. 5.10. APPEND Command
  1642.  
  1643. Arguments:      Calendar store name list or NIL for currently 
  1644. selected stores
  1645.                 Flags list
  1646.                 Calendar entry literal
  1647.  
  1648. Data:           None.
  1649.  
  1650. Result:         OK - Command completed
  1651.                 NO - Command failed, no entries were added to 
  1652. any calendar store
  1653.                 BAD - Improperly formed command, invalid 
  1654. arguments, no entries added
  1655.  
  1656. Valid states:   Authenticated, Selected
  1657.  
  1658. The APPEND command creates a new Calendar entry in the given 
  1659. Calendar stores. If the destination Calendar store does not exist, the 
  1660. server must return a NO response.
  1661.  
  1662. In the Selected state, a NIL atom may be given for the list of 
  1663. Calendar store names to operate on.
  1664.  
  1665. The server can send an optional untagged response for each user or 
  1666. calendar that is specified. The NO response can be used to indicate 
  1667. that the store failed in a certain user's calendar with a response code 
  1668. of "REFUSED" followed by the name of the calendar refusing. The 
  1669. server can optionally return a response code of "MAILTO" followed 
  1670. by the calendar name and a mail address that can accept an 
  1671. -----------------------------------------------------------------------
  1672.                            Page:    31
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679. Internet-Draft                                 draft-oleary-icap-01.txt
  1680. -----------------------------------------------------------------------
  1681. invitation request for the given calendar. The server may return OK 
  1682. responses for selected Calendars to indicate that the STORE 
  1683. completed successfully in that Calendar but that some special 
  1684. condition exists. The server may send a response code of 
  1685. "TENTATIVE" to indicate that a new Calendar entry was created 
  1686. marked as \Tentative. The server may send a response code of 
  1687. "SENT" to indicate that a meeting invitation was sent to the owner 
  1688. of the Calendar store.
  1689.  
  1690. The \StoreAll flag should be given when the client is creating a new 
  1691. Calendar entry and wants to guarantee that the entry will be created 
  1692. in all of the selected Calendar stores simultaneously. If the server 
  1693. cannot store to at least one of the selected Calendars, it must not 
  1694. store to any of them and must return a NO response indicating that 
  1695. the command failed. The server may still return untagged responses 
  1696. indicating which Calendar stores failed.
  1697.  
  1698. New Calendar entries added to a Calendar store with the APPEND 
  1699. command MUST contain all required vCalendar attributes. If a 
  1700. required attribute is missing the server MUST return a NO response 
  1701. and MUST not modify any of the specified Calendar stores.
  1702.  
  1703. Examples:
  1704.  
  1705. C: A001 APPEND Personal_Calendar () {88}
  1706. C: BEGIN: vCalendar
  1707. C: BEGIN: vEvent
  1708. C: DTSTART: 19960606T140000
  1709. C: DTEND: 19960606T150000
  1710. C: DESCRIPTION: Meeting with Pete.
  1711. C: END: vEvent
  1712. C: END: vCalendar
  1713. C:
  1714. S: A001 OK APPEND completed
  1715.  
  1716. C: A001 APPEND (<Ann> <Bob> <Fred>) (\Tentative) {88}
  1717. C: BEGIN: vCalendar
  1718. C: BEGIN: vEvent
  1719. C: DTSTART: 19960606T140000
  1720. C: DTEND: 19960606T150000
  1721. C: DESCRIPTION: Meeting with Pete.
  1722. C: END: vEvent
  1723. C: END: vCalendar
  1724. C:
  1725. -----------------------------------------------------------------------
  1726.                            Page:    32
  1727.  
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733. Internet-Draft                                 draft-oleary-icap-01.txt
  1734. -----------------------------------------------------------------------
  1735. S: A001 OK APPEND completed
  1736.  
  1737. 5.11. ATTRIBUTES Command
  1738.  
  1739. Arguments:      Calendar store name
  1740.                 Name of attributes to fetch
  1741.  
  1742. Data:           Untagged FETCH response.
  1743.  
  1744. Result:         OK - ATTRIBUTES completed
  1745.                 NO - ATTRIBUTES failed, no attributes were 
  1746. returned
  1747.                 BAD - Improperly formed command, invalid 
  1748. arguments
  1749.  
  1750. Valid states:   Authenticated, Selected
  1751.  
  1752. The ATTRIBUTES command returns information about the 
  1753. specified Calendar store. This command is similar in operation to 
  1754. the FETCH command (see below) except that it acts on Calendar 
  1755. stores instead of the entries in them.
  1756.  
  1757. The ATTRIBUTES command currently supports fetching the 
  1758. following attributes:
  1759.  
  1760. FLAGS           Returns the flags supported by this Calendar store, 
  1761. as when the store is selected
  1762. TYPE            Flags which represents this Calendar store's type. 
  1763. See below.
  1764. CSID            The unique identifier of this Calendar store.
  1765.  
  1766. The TYPE's flags currently supported are:
  1767.  
  1768. \Default                This container is a user's default Calendar store
  1769. \Resource       This container is actually owned by a resource.
  1770.  
  1771. Examples:
  1772.  
  1773. C: A001 ATTRIBUTES <Pete> (FLAGS TYPE CSID)
  1774. S: * FETCH (FLAGS (\Deleted \Seen \Recent) TYPE \Default CSID 
  1775. 1234123412341234)
  1776. S: A001 OK ATTRIBUTES Completed.
  1777.  
  1778. 5.12. FREETIME Command
  1779. -----------------------------------------------------------------------
  1780.                            Page:    33
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787. Internet-Draft                                 draft-oleary-icap-01.txt
  1788. -----------------------------------------------------------------------
  1789.  
  1790. Arguments:      Calendar store name list or NIL for currently 
  1791. selected stores
  1792. Start of search range in ISO8601 format
  1793.                 End of search range in ISO8601 format
  1794. Length of time, in minutes
  1795.  
  1796. Data:           Mandatory untagged response: FETCH
  1797.  
  1798. Result:         OK - Command completed
  1799.                 NO - Command failed, no freetime found
  1800.                 BAD - Improperly formed command, invalid 
  1801. arguments
  1802.  
  1803. Valid states:   Authenticated, Selected
  1804.  
  1805. The FREETIME command searches the currently selected 
  1806. Calendars, bounded by a start and end time, and returns a list of 
  1807. intervals during which an event of the given length of time can be 
  1808. scheduled. See below under "Example Sessions" for and example of 
  1809. the use of the FREETIME command.
  1810.  
  1811. As is the case in the RANGE command, the start time given is 
  1812. included in the search range of the FREETIME command and the 
  1813. end time is excluded.
  1814.  
  1815. In the Selected state, a NIL atom may be given for the list of 
  1816. Calendar store names to operate on.
  1817.  
  1818. The freetime data is returned in an untagged FETCH response as 
  1819. VCAL.BRIEF.
  1820.  
  1821. Example:
  1822.  
  1823. C: A001 FREETIME (<Ann> <Bob>) 19960930T0900 
  1824. 19960930T1700 120
  1825. S: * 1 FETCH VCAL.BRIEF {88}
  1826. C: BEGIN: vCalendar
  1827. C: BEGIN: vEvent
  1828. C: DTSTART: 19960930T1000
  1829. C: DTEND: 19960930T1200
  1830. C: END: vEvent
  1831. C: END: vCalendar
  1832. C:
  1833. -----------------------------------------------------------------------
  1834.                            Page:    34
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841. Internet-Draft                                 draft-oleary-icap-01.txt
  1842. -----------------------------------------------------------------------
  1843. S: A001 OK FREETIME
  1844.  
  1845. In the example above, only one free period was found for the given 
  1846. time range.
  1847.  
  1848. 6. ICAP Commands - Selected State
  1849.  
  1850. 6.1. CLOSE Command
  1851.  
  1852. Arguments:      Optional name of user and or Calendar store.
  1853.  
  1854. Data:           Optional untagged EXISTS response.
  1855.  
  1856. Result:         OK - Command completed successfully
  1857.                 NO - Calendar name or user is not selected.
  1858.                 BAD - Invalid argument, calendar name is invalid
  1859.  
  1860. The CLOSE closes the currently selected Calendar store or one of 
  1861. the Calendar stores currently selected. When no parameter is 
  1862. supplied, all currently selected Calendars are closed. When a 
  1863. parameter is supplied, it should be of the same form for Calendar 
  1864. names given in the SELECT command. If the user has not 
  1865. previously issued a SELECT command with the exact name given in 
  1866. the CLOSE command, a NO response is returned.
  1867.  
  1868. Examples:
  1869.  
  1870. C: A001 CLOSE
  1871. S: A001 OK CLOSE Completed.
  1872.  
  1873. C: A001 CLOSE <Bob>
  1874. S: * 11 EXISTS
  1875. S: A001 CLOSE Completed.
  1876.  
  1877. 6.2. RANGE Command
  1878.  
  1879. Arguments:      Start date/time in ISO8601 format or wildcard 
  1880. character.
  1881.                 End date/time in ISO8601 format or wildcard 
  1882. character.
  1883.  
  1884. Data:           Mandatory untagged responses: EXISTS
  1885.  
  1886. Result:         OK - Command completed successfully, date range 
  1887. -----------------------------------------------------------------------
  1888.                            Page:    35
  1889.  
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895. Internet-Draft                                 draft-oleary-icap-01.txt
  1896. -----------------------------------------------------------------------
  1897. has been set
  1898.                 NO - An error occurred while setting the date 
  1899. range
  1900.                 BAD -  Bad date format
  1901.  
  1902. The RANGE command sets a date/time range for the currently 
  1903. selected Calendars and returns a EXISTS response with the number 
  1904. of items in the range.
  1905.  
  1906. Either the start time or end time can be replaced with the wildcard 
  1907. character "*" in which case lower or upper bound, respectively, is 
  1908. placed on the current date range.
  1909.  
  1910. The start time given must be included in the range. The end time 
  1911. given must be excluded from the range.
  1912.  
  1913. Example:
  1914.  
  1915. C: A001 RANGE 19960930T0900 19960930T1700
  1916. S: * 9 EXISTS
  1917. S: A001 OK RANGE
  1918.  
  1919. The above example selects all Calendar entries from 0900 to 1700 on 
  1920. 1996 September 30.
  1921.  
  1922. C: A001 RANGE 19960930 19961001
  1923. S: * 12 EXISTS
  1924. S: A001 OK RANGE
  1925.  
  1926. The above example selects all Calendar entries on 1996 September 
  1927. 30. Note that the end date 1996 October 1 is excluded from the 
  1928. selected date range.
  1929.  
  1930. C: A001 RANGE 19960101 19970101
  1931. S: * 56 EXISTS
  1932. S: A001 OK RANGE
  1933.  
  1934. The above example selects all Calendar entries in 1996.
  1935.  
  1936. 6.3. CHECK Command
  1937.  
  1938. Arguments:      None 
  1939.  
  1940. Data:           None.
  1941. -----------------------------------------------------------------------
  1942.                            Page:    36
  1943.  
  1944.  
  1945.  
  1946.  
  1947.  
  1948.  
  1949. Internet-Draft                                 draft-oleary-icap-01.txt
  1950. -----------------------------------------------------------------------
  1951.  
  1952. Result:         OK - Command completed
  1953.                 NO - Command failed
  1954.                 BAD - Improperly formed command, invalid 
  1955. arguments
  1956.  
  1957. An ICAP server given the CHECK command should perform any 
  1958. housekeeping operations that ensure the integrity of the currently 
  1959. selected Calendar stores.
  1960.  
  1961. Example:
  1962.  
  1963. C: A001 CHECK
  1964. S: A001 OK CHECK
  1965.  
  1966. 6.4. EXPUNGE Command
  1967.  
  1968. Arguments:      None
  1969.  
  1970. Data:           Mandatory untagged response: EXPUNGE
  1971.  
  1972. Result:         OK - Command completed
  1973.                 NO - Command failed, no items were removed
  1974.                 BAD - Improperly formed command, no items 
  1975. were removed
  1976.  
  1977. The EXPUNGE command permanently removes from the currently 
  1978. selected Calendar stores all entries that have the \Deleted flag set. 
  1979. Before returning an OK to the client, an untagged EXPUNGE 
  1980. response is sent for each entry that is removed.
  1981.  
  1982. Example:
  1983.  
  1984. C: A001 EXPUNGE
  1985. S: * 3 EXPUNGE
  1986. S: * 3 EXPUNGE
  1987. S: * 5 EXPUNGE
  1988. S: * 8 EXPUNGE
  1989. S: A001 OK EXPUNGE completed
  1990.  
  1991. Note: in this example, entries 3, 4, 7, and 11 had the \Deleted flag 
  1992. set.  See the description of the EXPUNGE response for further 
  1993. explanation.
  1994.  
  1995. -----------------------------------------------------------------------
  1996.                            Page:    37
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003. Internet-Draft                                 draft-oleary-icap-01.txt
  2004. -----------------------------------------------------------------------
  2005. 6.5. FETCH Command
  2006.  
  2007. Arguments:      Set of calendar entries to fetch.
  2008.                 Item names.
  2009.  
  2010. Data:           Untagged responses: FETCH
  2011.  
  2012. Result:         OK - fetch completed
  2013.                 NO - fetch error, no items were fetched
  2014.                 BAD - command unknown or invalid arguments
  2015.  
  2016. Fetches for all the specified calendar entries the data specified using 
  2017. the following item names:
  2018.  
  2019. FLAGS                   The flags associated with this calendar 
  2020. entry
  2021. VCAL                    vCalendar Simplegram format.
  2022. VCAL.SIZE               The size of the vCalendar Simplegram, in 
  2023. octets.
  2024. VCAL.REQUIRED   Only required vCalendar attribute 
  2025. information in Simplegram format.
  2026. VCAL.BRIEF              Only DTSTART and DTEND attributes 
  2027. in Simplegram format.
  2028. UID                     The unique ID of the calendar entry (the 
  2029. CEID).  
  2030.  
  2031. Note that items returned by FETCH should always be returned in 
  2032. ascending chronological order, even when multiple Calendar stores 
  2033. are selected.
  2034.  
  2035. Example:
  2036.  
  2037. C: A001 FETCH 1 FLAGS
  2038. S: * 1 FETCH FLAGS  (\Deleted \Seen)
  2039. S: A001 OK FETCH
  2040.  
  2041. C: A001 FETCH 1 (FLAGS VCAL.REQUIRED)
  2042. S: * 1 FETCH (FLAGS  (\Deleted \Seen) VCAL.REQUIRED {96}
  2043. S: BEGIN: vCalendar
  2044. S: BEGIN: vEvent
  2045. S: DTBEGIN: 19960701T0300Z
  2046. S: DTEND: 19960701T0400Z
  2047. S: DESCRIPTION: Test meeting
  2048. S: END: vEvent
  2049. -----------------------------------------------------------------------
  2050.                            Page:    38
  2051.  
  2052.  
  2053.  
  2054.  
  2055.  
  2056.  
  2057. Internet-Draft                                 draft-oleary-icap-01.txt
  2058. -----------------------------------------------------------------------
  2059. S: END: vCalendar
  2060. S: )
  2061. S: A001 OK FETCH
  2062.  
  2063. C: A001 FETCH 1:4 UID
  2064. S: * 1 FETCH UID 1234123412341234
  2065. S: * 2 FETCH UID 5678567856785678
  2066. S: * 3 FETCH UID 2345234523452345
  2067. S: * 4 FETCH UID abcdabcdabcdabcd
  2068. S: A001 OK FETCH
  2069.  
  2070. 6.6. STORE Command
  2071.  
  2072. Arguments:      Calendar entry set
  2073.                 Calendar entry data item name
  2074.                 Calendar entry data item value
  2075.  
  2076. Data:           None.
  2077.  
  2078. Result:         OK - Command completed
  2079.                 NO - Command failed, no entries were added to 
  2080. any calendar store
  2081.                 BAD - Improperly formed command, invalid 
  2082. arguments, no entries added
  2083.  
  2084. Calendar data items:
  2085.  
  2086. +FLAGS
  2087.  
  2088. Set the flag list of the given Calendar entries. In the STORE 
  2089. command, one additional flag can be given: \StoreAll. See below for 
  2090. the use of this flag.
  2091.  
  2092. -FLAGS
  2093.  
  2094. Remove the flag argument from the flags of the given Calendar 
  2095. entries.
  2096.  
  2097. VCAL
  2098.  
  2099. Updates the vCalendar data associated with this Calendar entry. 
  2100. When this form of the STORE command is used, the Calendar data 
  2101. item must be supplied as a literal. The data must be a vCalendar 
  2102. Simplegram.
  2103. -----------------------------------------------------------------------
  2104.                            Page:    39
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111. Internet-Draft                                 draft-oleary-icap-01.txt
  2112. -----------------------------------------------------------------------
  2113.  
  2114. If a value of "0" is given for the Calendar entry set, then a new entry 
  2115. is created. This functionality is similar to performing an APPEND 
  2116. command except that it allows the client to check the availability of 
  2117. the Calendar stores before attempting to create new entries. If there 
  2118. is more than one Calendar store selected in the given Selected object, 
  2119. then the STORE command will add the new entry to all of the 
  2120. Calendar stores. This will cause the EXISTS count for the current 
  2121. selection to increase by 1 for each currently selected Calendar store.
  2122.  
  2123. The server can send an optional untagged response for each user or 
  2124. calendar that is currently selected. The NO response can be used to 
  2125. indicate that the store failed in a certain user's calendar with a 
  2126. response code of "REFUSED" followed by the name of the calendar 
  2127. refusing. The server can optionally return a response code of 
  2128. "MAILTO" followed by the calendar name and a mail address that 
  2129. can accept an invitation request for the given calendar. See the 
  2130. example below. The server may return OK responses for selected 
  2131. Calendars to indicate that the STORE completed successfully in that 
  2132. Calendar but that some special condition exists. The server may send 
  2133. a response code of "TENTATIVE" to indicate that a new Calendar 
  2134. entry was created marked as \Tentative. The server may send a 
  2135. response code of "SENT" to indicate that a meeting invitation was 
  2136. sent to the owner of the Calendar store. In the case of a 
  2137. "TENTATIVE" response from the server, the EXISTS count for the 
  2138. selected Calendars MUST be increased. When a SENT response is 
  2139. given, the EXISTS count MUST NOT be increased.
  2140.  
  2141. The \StoreAll flag should be given when the client is creating a new 
  2142. Calendar entry and wants to guarantee that the entry will be created 
  2143. in all of the selected Calendar stores simultaneously. If the server 
  2144. cannot store to at least one of the selected Calendars, it must not 
  2145. store to any of them and must return a NO response indicating that 
  2146. the command failed. The server may still return untagged responses 
  2147. indicating which Calendar stores failed.
  2148.  
  2149. New Calendar entries added to a Calendar store must contain all 
  2150. required vCalendar attributes. Updates to existing Calendar entries 
  2151. need only contain the actual data to be updated. Duplicate attributes 
  2152. names are not allowed, whenever a value is given for a attribute 
  2153. name that already exists, the new value replaces the old value. If the 
  2154. new value is a null string (""), {0} or a CRLF immediately following 
  2155. the ":") then the old attribute is deleted.
  2156.  
  2157. -----------------------------------------------------------------------
  2158.                            Page:    40
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165. Internet-Draft                                 draft-oleary-icap-01.txt
  2166. -----------------------------------------------------------------------
  2167. In this first example, the users is creating a new entry in their own 
  2168. calendar. The operation succeeds:
  2169.  
  2170. C: A001 STORE 0 (+FLAGS \Repeating VCAL {102}
  2171. C: BEGIN: vCalendar
  2172. C: BEGIN: vEvent
  2173. C: DTSTART: 19960606T140000
  2174. C: DTEND: 19960606T150000
  2175. C: DESCRIPTION: Meeting with Pete.
  2176. C: END: vEvent
  2177. C: END: vCalendar
  2178. C: )
  2179. S: A001 OK STORE completed
  2180.  
  2181. In the following example, the user has two default Calendar stores 
  2182. selected, one for <Alice>, one for <Bruce> and one for <Cindy>. 
  2183. The client attempts to schedule a meeting in all Calendars by using 
  2184. the STORE command. <Alice> refuses, <Bruce> requests a meeting 
  2185. invitation be sent and <Cindy> accepts. Note that the terms "accept" 
  2186. and "refuse" to not imply an intervention on the part of a real 
  2187. person: whether the server accepts or refuses a STORE request 
  2188. should be based on access control.
  2189.  
  2190. C: A001 STORE 0 VCAL {102}
  2191. C: BEGIN: vCalendar
  2192. C: BEGIN: vEvent
  2193. C: DTSTART: 19960606T140000
  2194. C: DTEND: 19960606T150000
  2195. C: DESCRIPTION: Meeting with Pete.
  2196. C: END: vEvent
  2197. C: END: vCalendar
  2198. C:
  2199. S: * NO [REFUSED <Alice>] Alice doesn't like you.
  2200. S: * NO [MAILTO <Bruce> <Bruce@Iris.com>] Please send me a 
  2201. meeting invitation.
  2202. S: A001 OK STORE completed
  2203.  
  2204. The following sequence modifies Calendar entry number 23 with a 
  2205. new start and end date/time.
  2206.  
  2207. C: A001 STORE 23 VCAL {102}
  2208. C: BEGIN: vCalendar
  2209. C: BEGIN: vEvent
  2210. C: DTSTART: 19960606T140000
  2211. -----------------------------------------------------------------------
  2212.                            Page:    41
  2213.  
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219. Internet-Draft                                 draft-oleary-icap-01.txt
  2220. -----------------------------------------------------------------------
  2221. C: DTEND: 19960606T150000 
  2222. C: END: vEvent
  2223. C: END: vCalendar
  2224. C:
  2225. S: A001 OK STORE completed
  2226.  
  2227. 6.7. COPY Command
  2228. 6.8. MOVE Command
  2229.  
  2230. Arguments:      Calendar entry set
  2231.                 Name of Calendar to move or copy to
  2232.  
  2233. Data:           None.
  2234.  
  2235. Result:         OK - Calendar entries moved.
  2236.                 NO - Calendar entries not moved.
  2237.                 BAD - Bad date format given.
  2238.  
  2239. COPY and MOVE transfer a given set of entries to a different 
  2240. Calendar store. In the case of the MOVE command, the entries are 
  2241. removed from the current Calendar. MOVE must fail if the user does 
  2242. not have permission to remove an entry from the selected Calendar.
  2243.  
  2244. The Calendar store to move or copy to MUST exist before the 
  2245. operation is initiated.
  2246.  
  2247. Example:
  2248.  
  2249. C: A001 COPY 1 Section1
  2250. S: A001 OK COPY Completed.
  2251.  
  2252. 6.9. UID Command
  2253.  
  2254. Arguments:      Command
  2255.  
  2256. Data:           Untagged responses: FETCH, SEARCH.
  2257.  
  2258. Result:         OK - UID command completed.
  2259.                 NO - UID command failed.
  2260.                 BAD - Invalid command or UID given.
  2261.  
  2262. In its first form the UID command takes a COPY, MOVE, FETCH 
  2263. or STORE command as its arguments. These commands are 
  2264. processed as usual, except that unique ID's must be given instead of 
  2265. -----------------------------------------------------------------------
  2266.                            Page:    42
  2267.  
  2268.  
  2269.  
  2270.  
  2271.  
  2272.  
  2273. Internet-Draft                                 draft-oleary-icap-01.txt
  2274. -----------------------------------------------------------------------
  2275. entry numbers.
  2276.  
  2277. In the second form, the UID command takes a SEARCH command 
  2278. with SEARCH command arguments. The interpretation of the 
  2279. arguments is the same as with SEARCH; however, the numbers 
  2280. returned in a SEARCH response for a UID SEARCH command are 
  2281. unique identifiers instead of sequence numbers.
  2282.  
  2283. The number after the "*" in an untagged FETCH response is always 
  2284. a sequence number, not a unique identifier, even for a UID command 
  2285. response.  However, server implementations MUST implicitly 
  2286. include the UID data item as part of any FETCH response caused by 
  2287. a UID command, regardless of whether UID was specified as a data 
  2288. item to the FETCH.
  2289.  
  2290. Example:
  2291.  
  2292. C: A001 UID FETCH 1234123412341234 (FLAGS 
  2293. VCAL.REQUIRED)
  2294. S: * 12 FETCH (UID 1234123412341234 FLAGS  (\Deleted \Seen) 
  2295. VCAL.REQUIRED {96}
  2296. S: BEGIN: vCalendar
  2297. S: BEGIN: vEvent
  2298. S: DTBEGIN: 19960701T0300Z
  2299. S: DTEND: 19960701T0400Z
  2300. S: DESCRIPTION: Test meeting
  2301. S: END: vEvent
  2302. S: END: vCalendar
  2303. S: )
  2304. S: A001 OK UID FETCH
  2305.  
  2306. 6.10. SEARCH Command
  2307.  
  2308. Arguments:      One or more search criteria
  2309.  
  2310. Data:           Untagged responses: SEARCH.
  2311.  
  2312. Result:         OK - search completed.
  2313.                 NO - search error: can't search that criteria.
  2314.                 BAD - command unknown or invalid arguments.
  2315.  
  2316. The SEARCH command searches the Calendar store for entries that 
  2317. match the given searching criteria.  Searching criteria consist of one 
  2318. or more search keys.  The untagged SEARCH response from the 
  2319. -----------------------------------------------------------------------
  2320.                            Page:    43
  2321.  
  2322.  
  2323.  
  2324.  
  2325.  
  2326.  
  2327. Internet-Draft                                 draft-oleary-icap-01.txt
  2328. -----------------------------------------------------------------------
  2329. server contains a listing of entry numbers corresponding to those 
  2330. entries that match the searching criteria.
  2331.  
  2332. When multiple keys are specified, the result is the intersection (AND 
  2333. function) of all the messages that match those keys. A search key can 
  2334. also be a parenthesized list of one or more search keys (e.g. for use 
  2335. with the OR and NO keys).
  2336.  
  2337. In all search keys that use strings, a message matches the key if the 
  2338. string is a substring of the field.  The matching is case-insensitive.
  2339.  
  2340. <entry set>  Entries with sequence numbers corresponding to the 
  2341. specified message sequence number set
  2342.  
  2343. ALL
  2344. All entries in the mailbox; the default initial key for ANDing.
  2345.  
  2346. DELETED
  2347. Entries with the \Deleted flag set.
  2348.  
  2349. NEW
  2350. Entries that have the \Recent flag set but not the \Seen flag.  This is 
  2351. functionally equivalent to "(RECENT UNSEEN)".
  2352.  
  2353. NOT <search-key>
  2354. Entries that do not match the specified search key.
  2355.  
  2356. OR <search-key1> <search-key2>
  2357. Entries that match either search key.
  2358.  
  2359. RECENT
  2360. Entries that have the \Recent flag set.
  2361.  
  2362. SEEN
  2363. Entries that have the \Seen flag set.
  2364.  
  2365. TENTATIVE
  2366. Entries that have the \Tentative flag set.
  2367.  
  2368. UID <message set>
  2369. Entries with unique identifiers corresponding to the specified unique 
  2370. identifier set.
  2371.  
  2372. UNDELETED
  2373. -----------------------------------------------------------------------
  2374.                            Page:    44
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381. Internet-Draft                                 draft-oleary-icap-01.txt
  2382. -----------------------------------------------------------------------
  2383. Entries that do not have the \Deleted flag set.
  2384.  
  2385. UNSEEN
  2386. Entries that do not have the \Seen flag set.
  2387.  
  2388. VCAL <attribute name> <attribute value>
  2389. Entries that contain a vCalendar attribute with the given attribute 
  2390. value.
  2391.  
  2392. Examples:
  2393.  
  2394. C: A001 SEARCH 1:20 VCAL DUE 19961001
  2395. S: * SEARCH 4 9 12 19
  2396. S: A001 OK SEARCH Completed.
  2397.  
  2398. C: A001 SEARCH UNSEEN VCAL PRIORITY 1
  2399. S: * SEARCH 3 12 45
  2400. S: A001 OK SEARCH Competed.
  2401.  
  2402. 7. Server Responses
  2403.  
  2404. Server responses are in three forms: status responses, server data, 
  2405. and command continuation request.
  2406.  
  2407. The client MUST be prepared to accept any response at all times.
  2408.  
  2409. Status responses that are tagged indicate the completion result of a 
  2410. client command, and have a tag matching the command.
  2411.  
  2412. Some status responses, and all server data, are untagged.  An 
  2413. untagged response is indicated by the token "*" instead of a tag. 
  2414. Untagged status responses indicate server greeting, or server status 
  2415. that does not indicate the completion of a command.  For historical 
  2416. reasons, untagged server data responses are also called "unsolicited 
  2417. data", although strictly speaking only unilateral server data is truly 
  2418. "unsolicited".
  2419.  
  2420. Certain server data MUST be recorded by the client when it is 
  2421. received; this is noted in the description of that data.  Such data 
  2422. conveys critical information which affects the interpretation of all 
  2423. subsequent commands and responses (e.g. updates reflecting the 
  2424. creation or destruction of Calendar entries).
  2425.  
  2426. Other server data SHOULD be recorded for later reference; if the 
  2427. -----------------------------------------------------------------------
  2428.                            Page:    45
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435. Internet-Draft                                 draft-oleary-icap-01.txt
  2436. -----------------------------------------------------------------------
  2437. client does not need to record the data, or if recording the data has 
  2438. no obvious purpose (e.g. a SEARCH response when no SEARCH 
  2439. command is in progress), the data SHOULD be ignored.
  2440.  
  2441. Command continuation request responses use the token "+" instead 
  2442. of a tag.  These responses are sent by the server to indicate 
  2443. acceptance of an incomplete client command and readiness for the 
  2444. remainder of the command.
  2445.  
  2446. 7.1.    Server Responses - Status Responses
  2447.  
  2448. Status responses MAY include an OPTIONAL response code.  A 
  2449. response  code consists of data inside square brackets in the form of 
  2450. an atom, possibly followed by a space and arguments.  The response 
  2451. code contains additional information or status codes for client 
  2452. software beyond the OK/NO/BAD condition, and are defined when 
  2453. there is a specific action that a client can take based upon the 
  2454. additional information.
  2455.  
  2456. The currently defined response codes are:
  2457.  
  2458. ALERT   - The human-readable text contains a special alert that 
  2459. MUST be presented to the user in a fashion that calls the user's 
  2460. attention to the message.
  2461.  
  2462. PERMANENTFLAGS - Followed by a parenthesized list of flags, 
  2463. indicates which of the known flags that the client can change 
  2464. permanently.  Any flags that are in the FLAGS untagged response, 
  2465. but not the PERMANENTFLAGS list, can not be set permanently.  
  2466. If the client attempts to STORE a flag that is not in the 
  2467.  
  2468. PERMANENTFLAGS list, the server will either reject it with a NO 
  2469. reply or store the state for the remainder of the current session only.
  2470.  
  2471. MAILTO - Returned from a STORE or APPEND command to 
  2472. indicate that an specific user requests Meeting Invitations to be sent 
  2473. to them via SMTP mail. Returned with NO response only.
  2474.  
  2475. READ-ONLY - The Calendar is selected read-only, or its access 
  2476. while selected has changed from read-write to read-only.
  2477.  
  2478. READ-WRITE - The Calendar is selected read-write, or its access 
  2479. while selected has changed from read-only to read-write.
  2480.  
  2481. REFUSED - Returned from a STORE or APPEND command to 
  2482. -----------------------------------------------------------------------
  2483.                            Page:    46
  2484.  
  2485.  
  2486.  
  2487.  
  2488.  
  2489.  
  2490. Internet-Draft                                 draft-oleary-icap-01.txt
  2491. -----------------------------------------------------------------------
  2492. indicate that an specific user does not allow scheduling requests from 
  2493. other users. Returned with NO response only.
  2494.  
  2495. SENT - Returned from a STORE or APPEND command to indicate 
  2496. that a meeting invitation was sent by the server via e-mail rather 
  2497. than creating an entry in a user's Calendar.
  2498.  
  2499. TENTATIVE - Returned from a STORE or APPEND command to 
  2500. indicate that a Calendar entry marked as \Tentative was created in 
  2501. the specified users Calendar.
  2502.  
  2503. Additional response codes defined by particular client or server 
  2504. implementations SHOULD be prefixed with an "X-" until they are 
  2505. added to a revision of this protocol.  Client implementations 
  2506. SHOULD ignore response codes that they do not recognize.
  2507.  
  2508. 7.1.1. OK Response
  2509. 7.1.2. NO Response
  2510. 7.1.3. BAD Response
  2511.  
  2512. Data:   Optional response code
  2513. Optional human-readable text.
  2514.  
  2515. The OK, NO and BAD responses are intended to give the client 
  2516. information about a command's completion status or information 
  2517. about the operation of the server. When given in a tagged response, 
  2518. these responses indicates completion of the command with the 
  2519. associated tag. Untagged responses of this kind are always 
  2520. informational messages. In both cases, a message based on the 
  2521. response code and text MAY be presented to the user.
  2522.  
  2523. The untagged form is also used as one of three possible greetings 
  2524. (along with PREAUTH and BYE) at session startup.  It indicates 
  2525. that the session is not yet authenticated and that a LOGIN command 
  2526. is needed.
  2527.  
  2528. Examples of the OK, NO and BAD response can be found within 
  2529. many of the examples given above.
  2530.  
  2531. 7.1.4. PREAUTH Response
  2532.  
  2533. Data:   Optional response code
  2534. Human-readable text.
  2535.  
  2536. -----------------------------------------------------------------------
  2537.                            Page:    47
  2538.  
  2539.  
  2540.  
  2541.  
  2542.  
  2543.  
  2544. Internet-Draft                                 draft-oleary-icap-01.txt
  2545. -----------------------------------------------------------------------
  2546. The PREAUTH response is always untagged, and is one of three 
  2547. possible greetings (along with OK and BYE) at session startup.  It 
  2548. indicates that the session has already been authenticated by external 
  2549. means and thus no LOGIN command is needed.
  2550.  
  2551. Example:
  2552.  
  2553. S: * PREAUTH ICAP server logged in as Smith
  2554.  
  2555. 7.1.5.  BYE Response
  2556.  
  2557.  Data:  Optional response code
  2558. Human-readable text.
  2559.  
  2560.  
  2561. The BYE response is always untagged, and indicates that the server 
  2562. is about to close the connection.  The human-readable text MAY be 
  2563. displayed to the user in a status report by the client.  The BYE 
  2564. response is sent under one of four conditions:
  2565.  
  2566. 1) as part of a normal logout sequence.  The server will close the 
  2567. connection after sending the tagged OK response to the LOGOUT 
  2568. command.
  2569.  
  2570. 2) as a panic shutdown announcement.  The server closes the 
  2571. connection immediately.
  2572.  
  2573. 3) as an announcement of an inactivity autologout.  The server closes 
  2574. the connection immediately.
  2575.  
  2576. 4) as one of three possible greetings at session startup (along with 
  2577. OK and PREAUTH), indicating that the server is not willing to 
  2578. accept a session from this client.  The server closes the connection 
  2579. immediately.
  2580.  
  2581. The difference between a BYE that occurs as part of a normal 
  2582. LOGOUT sequence (the first case) and a BYE that occurs because of 
  2583. a failure (the other three cases) is that the connection closes 
  2584. immediately in the failure case.
  2585.  
  2586. Example:
  2587.  
  2588. S: * BYE Autologout; idle for too long
  2589.  
  2590. -----------------------------------------------------------------------
  2591.                            Page:    48
  2592.  
  2593.  
  2594.  
  2595.  
  2596.  
  2597.  
  2598. Internet-Draft                                 draft-oleary-icap-01.txt
  2599. -----------------------------------------------------------------------
  2600. 7.2. Server Responses - Data Responses
  2601.  
  2602. These responses are always untagged.  This is how server data are 
  2603. transmitted from the server to the client, often as a result of a 
  2604. command with the same name.
  2605.  
  2606. 7.2.1.  CAPABILITY Response
  2607.  
  2608. Data:       capability listing
  2609.  
  2610. The CAPABILITY response occurs as a result of a CAPABILITY 
  2611. command.  The capability listing contains a space-separated listing 
  2612. of capability names that the server supports.  The capability listing 
  2613. MUST include the atom "ICAP".
  2614.  
  2615. A capability name which begins with "AUTH=" indicates that the 
  2616. server supports that particular authentication mechanism.
  2617.  
  2618. Other capability names indicate that the server supports an 
  2619. extension, revision, or amendment to the ICAP protocol. Server 
  2620. responses MUST conform to this document until the client issues a 
  2621. command that uses the associated capability.
  2622.  
  2623. Capabilities not defined in this document MUST be prefixed with 
  2624. "X-".
  2625.  
  2626. Client implementations SHOULD NOT require any capability name 
  2627. other than "ICAP", and MUST ignore any unknown capability 
  2628. names.
  2629.  
  2630. Example:
  2631.  
  2632. S: * CAPABILITY ICAP AUTH=KERBEROS_V4 X-PocketToaster
  2633.  
  2634. 7.2.2. LIST Response
  2635.  
  2636. Data:   Name attributes list
  2637. Calendar name or hierarchical name, possible prefixed by 
  2638. an owner name
  2639.  
  2640. The LIST response is given in response to a LIST command.
  2641.  
  2642. Four name attributes are defined:
  2643.  
  2644. -----------------------------------------------------------------------
  2645.                            Page:    49
  2646.  
  2647.  
  2648.  
  2649.  
  2650.  
  2651.  
  2652. Internet-Draft                                 draft-oleary-icap-01.txt
  2653. -----------------------------------------------------------------------
  2654. \Noinferiors   It is not possible for any child levels of hierarchy to 
  2655. exist under this name; no child levels
  2656. exist now and none can be created in the future.
  2657.  
  2658. \Noselect      It is not possible to use this name as a selectable 
  2659. Calendar.
  2660.  
  2661. \Marked        The Calendar has been marked "interesting" by the 
  2662. server; the Calendar probably contains entries that have been added 
  2663. since the last time the Calendar was selected.
  2664.  
  2665. \Unmarked      The Calendar does not contain any additional entries 
  2666. since the last time the Calendar was selected.
  2667.  
  2668. If it is not feasible for the server to determine whether the Calendar 
  2669. is "interesting" or not, or if the name is a \Noselect name, the server 
  2670. SHOULD NOT send either \Marked or \Unmarked.
  2671.  
  2672. The hierarchy delimiter "/" is used to delimit levels of hierarchy in a 
  2673. Calendar name.  A client can use it to create child Calendars, and to 
  2674. search higher or lower levels of naming hierarchy. 
  2675.  
  2676. The name represents an unambiguous left-to-right hierarchy, and 
  2677. MUST be valid for use as a reference in LIST and LSUB commands. 
  2678. Unless \Noselect is indicated, the name MUST also be valid as an 
  2679. argument for commands, such as SELECT, that accept Calendar 
  2680. names.
  2681.  
  2682. Example:
  2683.  
  2684. S: * LIST () Section1
  2685. S: * LIST () <Ann>
  2686. S: * LIST () <Bob>
  2687. S: * LIST (\Noselect) Projects/
  2688. S: * LIST () Projects/Project_Purple
  2689. S: * LIST () "Project 1/From Bill"
  2690.  
  2691. 7.2.3. LSUB Response
  2692.  
  2693. The LSUB command is identical to the LIST command except that it 
  2694. is given in response to the LSUB command.
  2695.  
  2696. Example:
  2697.  
  2698. -----------------------------------------------------------------------
  2699.                            Page:    50
  2700.  
  2701.  
  2702.  
  2703.  
  2704.  
  2705.  
  2706. Internet-Draft                                 draft-oleary-icap-01.txt
  2707. -----------------------------------------------------------------------
  2708. S: * LSUB () Section1
  2709. S: * LSUB() Projects/Project_Purple
  2710. S: * LSUB() "Project 1/From Bill"
  2711.  
  2712.  
  2713. 7.2.4. EXISTS Response
  2714.  
  2715. Data:           None.
  2716.  
  2717. The EXISTS response reports the number of entries in the Calendar. 
  2718. This response occurs as a result of a SELECT, EXAMINE or 
  2719. RANGE command, and if the size of the Calendar changes (e.g. new 
  2720. Calendar entries).
  2721.  
  2722. The update from the EXISTS response MUST be recorded by the 
  2723. client.
  2724.  
  2725. Example:
  2726.  
  2727. S: * 23 EXISTS
  2728.  
  2729. 7.2.5. RECENT Response
  2730.  
  2731. Data:           None.
  2732.  
  2733. The RECENT response reports the number of Calendar entries that 
  2734. have been posted since the previous time a SELECT command was 
  2735. done on this Calendar.  This response occurs as a result of a 
  2736. SELECT or EXAMINE command, and if the size of the Calendar 
  2737. changes (e.g. new Calendar entries).
  2738.  
  2739. The update from the RECENT response MUST be recorded by the 
  2740. client.
  2741.  
  2742. Example:
  2743.  
  2744. S: * 1 RECENT
  2745.  
  2746. 7.2.6. EXPUNGE Response
  2747.  
  2748. Data:           None.
  2749.  
  2750. The EXPUNGE response reports that the specified Calendar entry 
  2751. sequence number has been permanently removed from the Calendar.  
  2752. The sequence number for each successive entry in the Calendar is 
  2753. -----------------------------------------------------------------------
  2754.                            Page:    51
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761. Internet-Draft                                 draft-oleary-icap-01.txt
  2762. -----------------------------------------------------------------------
  2763. immediately decremented by 1, and this decrement is reflected in 
  2764. sequence numbers in subsequent responses (including other 
  2765. untagged EXPUNGE responses).
  2766.  
  2767. As a result of the immediate decrement rule, sequence numbers that 
  2768. appear in a set of successive EXPUNGE responses depend upon 
  2769. whether the entries are removed starting from lower numbers to 
  2770. higher numbers, or from higher numbers to lower numbers.  For 
  2771. example, if the last 5 entries in a 9-entry Calendar are expunged; a 
  2772. "lower to higher" server will send five untagged EXPUNGE 
  2773. responses for sequence number 5, whereas a "higher to lower server" 
  2774. will send successive untagged EXPUNGE responses for sequence 
  2775. numbers 9, 8, 7, 6, and 5.
  2776.  
  2777. An EXPUNGE response MUST NOT be sent when no command is 
  2778. in progress; nor while responding to a FETCH, STORE, or 
  2779. SEARCH command.  This rule is necessary to prevent a loss of 
  2780. synchronization of sequence numbers between client and server.
  2781.  
  2782. The update from the EXPUNGE response MUST be recorded by the 
  2783. client.
  2784.  
  2785. Example:
  2786.  
  2787. S: * 1 EXPUNGE
  2788.  
  2789. 7.2.7. FETCH Response
  2790.  
  2791. Data:           Calendar entry data.
  2792.  
  2793. The FETCH response returns data about a Calendar entry to the 
  2794. client. The data are pairs of data item names and their values in 
  2795. parentheses.  This response occurs as the result of a FETCH, 
  2796. STORE, ATTRIBUTES and FREETIME commands, as well as by 
  2797. unilateral server decision (e.g. flag updates). See the description of 
  2798. the commands for a list of data items.
  2799.  
  2800. S: * 1 FETCH VCAL.REQUIRED {96}
  2801. S: BEGIN: vCalendar
  2802. S: BEGIN: vEvent
  2803. S: DTBEGIN: 19960701T0300Z
  2804. S: DTEND: 19960701T0400Z
  2805. S: DESCRIPTION: Test meeting
  2806. S: END: vEvent
  2807. -----------------------------------------------------------------------
  2808.                            Page:    52
  2809.  
  2810.  
  2811.  
  2812.  
  2813.  
  2814.  
  2815. Internet-Draft                                 draft-oleary-icap-01.txt
  2816. -----------------------------------------------------------------------
  2817. S: END: vCalendar
  2818. S: )
  2819.  
  2820. 7.2.8. FLAGS Response
  2821.  
  2822. Data:           Calendar entry flags.
  2823.  
  2824. The FLAGS response occurs as a result of a SELECT or EXAMINE 
  2825. command.  The flag parenthesized list identifies the flags (at a 
  2826. minimum, the system-defined flags) that are applicable for this 
  2827. Calendar.  Flags other than the system flags can also exist, 
  2828. depending on server implementation.
  2829.  
  2830. The update from the FLAGS response MUST be recorded by the 
  2831. client.
  2832.  
  2833. Example:
  2834.  
  2835. S: * 1 FLAGS (\Deleted)
  2836.  
  2837. 7.2.9.  SEARCH Response
  2838.  
  2839. Data:       zero or more numbers
  2840.  
  2841. The SEARCH response occurs as a result of a SEARCH or UID 
  2842. SEARCH command.  The number(s) refer to those entries that match 
  2843. the search criteria.  For SEARCH, these are sequence numbers; for 
  2844. UID SEARCH, these are unique identifiers.  Each number is 
  2845. delimited by a space.
  2846.  
  2847. Example:
  2848.  
  2849. S: * SEARCH 2 3 6
  2850.  
  2851. 7.3.    Server Responses - Command Continuation 
  2852. Request
  2853.  
  2854. The command completion request response is indicated by a "+" 
  2855. token instead of a tag.  This form of response indicates that the 
  2856. server is ready to accept the continuation of a command from the 
  2857. client.  The remainder of this response is a line of text.
  2858.  
  2859. This response is used in the AUTHORIZATION command to 
  2860. transmit server data to the client, and request additional client data.  
  2861. -----------------------------------------------------------------------
  2862.                            Page:    53
  2863.  
  2864.  
  2865.  
  2866.  
  2867.  
  2868.  
  2869. Internet-Draft                                 draft-oleary-icap-01.txt
  2870. -----------------------------------------------------------------------
  2871. This response is also used if an argument to any command is a 
  2872. literal.
  2873.  
  2874. The client is not permitted to send the octets of the literal unless the 
  2875. server indicates that it expects it.  This permits the server to process 
  2876. commands and reject errors on a line-by-line basis.  The remainder 
  2877. of the command, including the CRLF that terminates a command, 
  2878. follows the octets of the literal.  If there are any additional command 
  2879. arguments the literal octets are followed by a space and those 
  2880. arguments.
  2881.  
  2882. Example:
  2883.  
  2884. C: A001 LOGIN {11}
  2885. S: + Ready for additional command text
  2886. C: FRED FOOBAR {7}
  2887. S: + Ready for additional command text
  2888. C: fat man
  2889. S: A001 OK LOGIN completed
  2890.  
  2891. 8. Formal Syntax
  2892.  
  2893. This will be included in a later draft of this specification.
  2894.  
  2895. 9. Example Sessions
  2896.  
  2897. Here is an example of a client using guest access to query the 
  2898. freetime of three individuals:
  2899.  
  2900. S: * OK ICAP Server ready.
  2901. C: A001 LOGIN anonymous pete@clearblue.com
  2902. S: A001 OK LOGIN Anonymous access granted.
  2903. C: A002 EXAMINE <Alice>
  2904. S: * 12 EXISTS
  2905. S: A002 OK EXAMINE
  2906. C: A003 EXAMINE <bob>
  2907. S: * 22 EXISTS
  2908. S: A003 OK EXAMINE
  2909. C: A004 EXAMINE <carol>
  2910. S: * 36 EXISTS
  2911. S: A004 OK EXAMINE
  2912. C: A005 FREETIME "" 19960701T0300Z 19960701T1200Z 60
  2913. S: * 1 FETCH VCAL.BRIEF {200}
  2914. S: BEGIN: vCalendar
  2915. -----------------------------------------------------------------------
  2916.                            Page:    54
  2917.  
  2918.  
  2919.  
  2920.  
  2921.  
  2922.  
  2923. Internet-Draft                                 draft-oleary-icap-01.txt
  2924. -----------------------------------------------------------------------
  2925. S: BEGIN: vEvent
  2926. S: DTBEGIN: 19960701T0300Z
  2927. S: DTEND: 19960701T0400Z
  2928. S: END: vEvent
  2929. S: BEGIN: vEvent
  2930. S: DTBEGIN: 19960701T1000Z
  2931. S: DTEND: 19960701T1100Z
  2932. S: END: vEvent
  2933. S: END: vCalendar
  2934. S: A005 OK FREETIME
  2935. C: A006 LOGOUT
  2936. S: * BYE ICAP Server terminating connection.
  2937. S: A006 OK LOGOUT
  2938.  
  2939. 10. Open Issues/Work in Progress
  2940.  
  2941. How should a user's Calendar server be located? For example, given 
  2942. a mail address like <poleary@clearblue.com> how should a client 
  2943. locate the Calendar server.
  2944.  
  2945. Repeating events are not defined in this specification except for the 
  2946. \Repeating flag. Do we need special treatment of repeating events 
  2947. here?
  2948.  
  2949. Do we need more search options? How about comparison operators?
  2950.  
  2951. 11. Changes From Previous Draft Version
  2952.  
  2953. 1. Added more extensive discussion of "Data Formats".
  2954. 2. Added language to fix the implication that ICAP was a TCP-
  2955. based protocol only.
  2956. 3. Added complete "Arguments, Data, Response" information to 
  2957. all commands. Added "Data" information to all responses.
  2958. 4. Discussion of access control was added.
  2959. 5. Added clarification to discussion of replacing attribute values in 
  2960. STORE.
  2961. 6. Changed SETTINGS command to take new options as a quoted 
  2962. string or literal; this makes the grammar more consistent with 
  2963. other commands.
  2964. 7. Added UID command and discussion.
  2965. 8. Added ATTRIBUTES command which allows the client to 
  2966. query properties of a Calendar store. This can be used to find 
  2967. information about the person or resource associated with the 
  2968. store.
  2969. -----------------------------------------------------------------------
  2970.                            Page:    55
  2971.  
  2972.  
  2973.  
  2974.  
  2975.  
  2976.  
  2977. Internet-Draft                                 draft-oleary-icap-01.txt
  2978. -----------------------------------------------------------------------
  2979. 9. Removed the idea of using ICAP as a set of protocol extensions 
  2980. to IMAP.
  2981. 10. Added conventions, commands and responses discussion, data 
  2982. formats and other information from [1].
  2983. 11. Changed discussion of Calendar Names and user names to 
  2984. simplify parsing and to make it easier to use these names in 
  2985. LIST and SELECT.
  2986. 12. Adding Scheduling Operations section to help better define what 
  2987. ICAP is and is not used for.
  2988. 13. SEARCH command added
  2989.  
  2990. 12. References
  2991.  
  2992. [1]     Crispin, M. "INTERNET MESSAGE ACCESS PROTOCOL - 
  2993. VERSION 4", RFC 1730, Dec 1994, 
  2994.  
  2995.  
  2996. [2]     versit Consortium, "Electronic Calendaring and Scheduling 
  2997. (vCalendar) Specification", 03/29/1996, http://www.versit.com/
  2998.  
  2999. [3]     Borenstein, N., and Freed, N., "MIME (Multipurpose Internet 
  3000. Mail Extensions) Part One: Mechanisms for Specifying and 
  3001. Describing the Format of Internet Message Bodies", RFC 1521, 
  3002. Bellcore, Innosoft, September 1993.
  3003.  
  3004. [4]     Postel, Jonathan B. "Simple Mail Transfer Protocol", STD 10, 
  3005. RFC 821, USC/Information Sciences Institute, August 1982.
  3006.  
  3007. [5]     Myers, J., "IMAP4 Authentication Mechanism", RFC 1731. 
  3008. Carnegie-Mellon University, December 1994.
  3009.  
  3010. [6]     Kuhn, M., "A Summary of the International Standard Date and 
  3011. Time Notation",  
  3012. http://www.ft.uni-erlangen.de/~mskuhn/iso-time.html
  3013.  
  3014. 13. Security Considerations
  3015.  
  3016. The user name and password arguments of the LOGIN command are 
  3017. sent in clear text over most transport protocols. Consult [5] for a 
  3018. discussion of authentication mechanisms used by IMAP4 and by 
  3019. ICAP.
  3020.  
  3021. Servers should implement and enforce access control mechanisms 
  3022. for Calendar stores. This specification contains no provisions for 
  3023. -----------------------------------------------------------------------
  3024.                            Page:    56
  3025.  
  3026.  
  3027.  
  3028.  
  3029.  
  3030. 10/16/96                                               Expires 04/11/97
  3031. Internet-Draft                                 draft-oleary-icap-01.txt
  3032. -----------------------------------------------------------------------
  3033. defining and maintaining access control.
  3034.  
  3035. 14. Author's Notes
  3036.  
  3037. This spec is based in very large part on the operation, commands and 
  3038. concepts of IMAP4 [1]. In the spirit of "not reinventing the wheel" I 
  3039. have incorporated parts of the IMAP4 specification into this work. 
  3040. My thanks to the authors of the IMAP4 specification for their 
  3041. excellent work.
  3042.  
  3043. Author's Address:
  3044.  
  3045. Peter O'Leary
  3046. Clear Blue Network Systems, Inc.
  3047. 1028 Cowper St.
  3048. Palo Alto, CA 94301
  3049. http://www.clearblue.com
  3050. (415) 323-3380
  3051. E-mail: poleary@clearblue.com
  3052.  
  3053.  
  3054.  
  3055.  
  3056.  
  3057.  
  3058.  
  3059.  
  3060.  
  3061.  
  3062.  
  3063.  
  3064.  
  3065.  
  3066.  
  3067.  
  3068.  
  3069.  
  3070.  
  3071.  
  3072.  
  3073.  
  3074.  
  3075.  
  3076.  
  3077. -----------------------------------------------------------------------
  3078.                            Page:    57
  3079.  
  3080.  
  3081.  
  3082.  
  3083.