No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xep-0149.xml 8.1KB

  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  3. <!ENTITY % ents SYSTEM 'xep.ent'>
  4. %ents;
  5. ]>
  6. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  7. <xep>
  8. <header>
  9. <title>Time Periods</title>
  10. <abstract>This document defines a method to specify the valid time periods for states, events, and activities communicated via Jabber/XMPP protocols.</abstract>
  12. <number>0149</number>
  13. <status>Active</status>
  14. <type>Informational</type>
  15. <sig>Standards</sig>
  16. <approver>Council</approver>
  17. <dependencies>
  18. <spec>XMPP Core</spec>
  19. <spec>XEP-0082</spec>
  20. </dependencies>
  21. <supersedes/>
  22. <supersededby/>
  23. <shortname>N/A</shortname>
  24. &stpeter;
  25. <revision>
  26. <version>1.0</version>
  27. <date>2006-01-24</date>
  28. <initials>psa</initials>
  29. <remark>Per a vote of the Jabber Council, advanced status to Active.</remark>
  30. </revision>
  31. <revision>
  32. <version>0.2</version>
  33. <date>2005-12-21</date>
  34. <initials>psa</initials>
  35. <remark>Updated to reflect draft-ietf-simple-rpid-10.</remark>
  36. </revision>
  37. <revision>
  38. <version>0.1</version>
  39. <date>2005-04-21</date>
  40. <initials>psa</initials>
  41. <remark>Initial version.</remark>
  42. </revision>
  43. <revision>
  44. <version>0.0.2</version>
  45. <date>2005-04-07</date>
  46. <initials>psa</initials>
  47. <remark>Modified to use SHIM headers rather than a structured data format qualified by a dedicated namespace.</remark>
  48. </revision>
  49. <revision>
  50. <version>0.0.1</version>
  51. <date>2005-03-17</date>
  52. <initials>psa</initials>
  53. <remark>First draft.</remark>
  54. </revision>
  55. </header>
  56. <section1 topic='Introduction' anchor='intro'>
  57. <p>Certain events and states may last for only a limited period of time. For example, when a person changes his availability to "dnd" and his status to "In a Meeting", the person (or his calendaring application) may know that the meeting is expected to last for 90 minutes; because those who subscribe to the person's presence may find it helpful to know how long the person will be in the meeting, it might be desirable to include that time period information in the presence stanza sent when the person's availability changes. Similar considerations apply to other states, events, and activities, such as various forms of "extended presence" (see &xep0119;).</p>
  58. <p>This document defines a straightforward XMPP extension for encapsulating information about time periods, using new headers that adhere to the format specified in &xep0131;.</p>
  59. </section1>
  60. <section1 topic='Requirements' anchor='reqs'>
  61. <p>This document addresses the following requirements:</p>
  62. <ol>
  63. <li>Provide the ability to specify time periods for states, events, and activities communicated via Jabber/XMPP protocols.</li>
  64. <li>Conform to &xep0082;.</li>
  65. </ol>
  66. </section1>
  67. <section1 topic='Protocol' anchor='protocol'>
  68. <p>In order to specify the time period for a state, event, or activity, the generating entity SHOULD include both "Start" and "Stop" SHIM headers that specify the dateTimes at which the time period starts and stops. The following rules apply:</p>
  69. <ol>
  70. <li>All start and stop dates MUST conform to the dateTime profile specified in <cite>XEP-0082</cite>.</li>
  71. <li>All dateTime information MUST be expressed in UTC (i.e., with no timezone offsets).</li>
  72. <li>Start and stop times SHOULD be understood by the recipient as estimates or approximations.</li>
  73. <li>If both a start time and a stop time are specified, the stop time MUST be later than the start time.</li>
  74. </ol>
  75. <p>These SHIM headers MAY be included wherever appropriate; however, it is expected that they will be included mainly to further specify basic presence states (see &rfc3921;) and various "extended presence" states, events, and activities (see, for example, &xep0107; and &xep0108;).</p>
  76. <p>There is no requirement that the start time needs to be the time when the stanza is generated; for example, the start time may be retroactive to a dateTime in the past or may be an estimated dateTime in the future.</p>
  77. </section1>
  78. <section1 topic='Examples' anchor='examples'>
  79. <section2 topic='Basic Presence' anchor='presence'>
  80. <p>In order to specify that a basic presence state will last for a specific time period, the entity that generates the presence stanza SHOULD include the desired SHIM headers.</p>
  81. <example caption='Basic Presence With Time Period'><![CDATA[
  82. <presence>
  83. <show>dnd</show>
  84. <status>In a Meeting</status>
  85. <headers xmlns=''>
  86. <header name='Stop'>2005-03-17T11:30:00Z</header>
  87. </headers>
  88. </presence>
  89. ]]></example>
  90. </section2>
  91. <section2 topic='User Activity' anchor='activity'>
  92. <p>An XMPP extension for user activity is specified in <cite>XEP-0108</cite>. It may be desirable to include time period information when publishing one's activity.</p>
  93. <example caption='User Activity With Time Period'><![CDATA[
  94. <iq type='set'
  95. from=''
  96. to='pubsub.shakespeare.lit'
  97. id='activity1'>
  98. <pubsub xmlns=''>
  99. <publish node='generic/juliet-activity'>
  100. <item id='current'>
  101. <activity xmlns=''>
  102. <relaxing>
  103. <partying/>
  104. </relaxing>
  105. <text xml:lang='en'>My best friend&apos;s birthday!</text>
  106. </activity>
  107. <headers xmlns=''>
  108. <header name='Start'>2005-03-17T19:00:00Z</header>
  109. <header name='Stop'>2005-03-17T23:00:00Z</header>
  110. </headers>
  111. </item>
  112. </publish>
  113. </pubsub>
  114. </iq>
  115. ]]></example>
  116. </section2>
  117. <section2 topic='User Mood' anchor='mood'>
  118. <p>An XMPP extension for user mood is specified in <cite>XEP-0107</cite>. It may be desirable to include time period information when publishing one's mood.</p>
  119. <example caption='User Mood With Time Period'><![CDATA[
  120. <iq type='set'
  121. from=''
  122. to='pubsub.shakespeare.lit'
  123. id='mood1'>
  124. <pubsub xmlns=''>
  125. <publish node='generic/juliet-mood'>
  126. <item id='current'>
  127. <mood xmlns=''>
  128. <annoyed/>
  129. <text>She has been bothering me *all day*!</text>
  130. </mood>
  131. <headers xmlns=''>
  132. <header name='Start'>2005-03-17T07:00:00Z</header>
  133. </headers>
  134. </item>
  135. </publish>
  136. </pubsub>
  137. </iq>
  138. ]]></example>
  139. <p>Note that the start time is (intended to be) retroactive.</p>
  140. </section2>
  141. </section1>
  142. <section1 topic='Implementation Notes' anchor='impl'>
  143. <p>For the sake of interoperability, it may be desirable for certain kinds of implementations (e.g., gateways) to transform XMPP start and stop times into the formats used by other protocols (e.g., the 'from' and 'until' attributes specified in &rfc4480;, see also &rfc4481;).</p>
  144. </section1>
  145. <section1 topic='Security Considerations' anchor='security'>
  146. <p>It is possible that inclusion of time periods for particular states, events, or activities may reveal information that would enable a recipient to launch an attack while the sender is unavailable or away (e.g., if the sender specifies that he will be on vacation for the next three weeks, a recipient might therefore learn that this is a good time to break into the sender's house). Therefore, senders of time period information should balance the desire to share helpful information against the need for appropriate control over security-critical availability information.</p>
  147. </section1>
  148. <section1 topic='IANA Considerations' anchor='iana'>
  149. <p>This document requires no interaction with &IANA;.</p>
  150. </section1>
  151. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  152. <section2 topic='SHIM Headers' anchor='registrar-shim'>
  153. <p>The &REGISTRAR; includes the following entries in its registry of SHIM headers (see &SHIMHEADERS;).</p>
  154. <code><![CDATA[
  155. <header>
  156. <name>Start</name>
  157. <desc>The dateTime at which a state, event, or activity starts</desc>
  158. <doc>XEP-0149</doc>
  159. </header>
  160. <header>
  161. <name>Stop</name>
  162. <desc>The dateTime at which a state, event, or activity stops</desc>
  163. <doc>XEP-0149</doc>
  164. </header>
  165. ]]></code>
  166. </section2>
  167. </section1>
  168. </xep>