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-0224.xml 8.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  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>Attention</title>
  10. <abstract>This document defines an XMPP protocol extension for getting the attention of another user.</abstract>
  11. &LEGALNOTICE;
  12. <number>0224</number>
  13. <status>Draft</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <approver>Council</approver>
  17. <dependencies>
  18. <spec>XMPP Core</spec>
  19. <spec>XMPP IM</spec>
  20. <spec>XEP-0030</spec>
  21. </dependencies>
  22. <supersedes/>
  23. <supersededby/>
  24. <shortname>attention</shortname>
  25. <schemaloc>
  26. <url>http://xmpp.org/schemas/attention.xsd</url>
  27. </schemaloc>
  28. <author>
  29. <firstname>Andreas</firstname>
  30. <surname>Monitzer</surname>
  31. <email>andy@monitzer.com</email>
  32. <jid>andy@monitzer.com</jid>
  33. </author>
  34. <revision>
  35. <version>1.0</version>
  36. <date>2008-11-13</date>
  37. <initials>psa</initials>
  38. <remark><p>Per a vote of the XMPP Council, advanced specification to Draft.</p></remark>
  39. </revision>
  40. <revision>
  41. <version>0.2</version>
  42. <date>2008-10-01</date>
  43. <initials>psa</initials>
  44. <remark><p>Modified namespace to incorporate namespace versioning.</p></remark>
  45. </revision>
  46. <revision>
  47. <version>0.1</version>
  48. <date>2007-08-08</date>
  49. <initials>psa</initials>
  50. <remark><p>Initial published version.</p></remark>
  51. </revision>
  52. <revision>
  53. <version>0.0.1</version>
  54. <date>2007-07-03</date>
  55. <initials>am</initials>
  56. <remark><p>Initial version.</p></remark>
  57. </revision>
  58. </header>
  59. <section1 topic='Introduction' anchor='intro'>
  60. <p>Even though a client might be available (as stated in the most recent presence stanza), the user this client belongs to might not be focused on the client currently. &xep0132; defines a method for a physical test of user presence. Since this requires special hardware that cannot be assumed to be available, this XEP defines a software-only implementation where no direct feedback is expected. This feature is known as 'nudge' or 'buzz' in some non-XMPP IM protocols.</p>
  61. <p>It was discussed whether this feature belongs in &xep0085;. However, the semantics are inherently different, since Chat State Notifications describe the sender's state, not a request to change the receiver's. Thus, a separate extension is desirable.</p>
  62. </section1>
  63. <section1 topic='Requirements' anchor='reqs'>
  64. <p>The specification addresses remotely getting the user's attention in a more assertive way than simple text messages.</p>
  65. </section1>
  66. <section1 topic='Protocol' anchor='protocol'>
  67. <p>In the following conversation, a user talks to somebody, but this user doesn't respond. The second inquiry includes an attention extension.</p>
  68. <example caption="User sends a regular message"><![CDATA[
  69. <message from='calvin@usrobots.lit/lab'
  70. to='herbie@usrobots.lit/home'
  71. type='chat'>
  72. <body>All right, then, Herbie, give! We're waiting.</body>
  73. </message>
  74. ]]></example>
  75. <p>When no reply is received, the sending user might want to grab the other's attention. This is done by sending a message that includes an &lt;attention/&gt; element qualified by the 'urn:xmpp:attention:0' namespace &VNOTE;. Note: The message MAY include a &BODY; element.</p>
  76. <example caption="User tries to capture the other's attention"><![CDATA[
  77. <message from='calvin@usrobots.lit/lab'
  78. to='herbie@usrobots.lit/home'
  79. type='headline'>
  80. <attention xmlns='urn:xmpp:attention:0'/>
  81. <body>Why don't you answer, Herbie?</body>
  82. </message>
  83. ]]></example>
  84. <p>Finally, the receiving user notices the urgency of the message and responds.</p>
  85. <example caption="The user whose attention has been captured responds."><![CDATA[
  86. <message from='herbie@usrobots.lit/home'
  87. to='calvin@usrobots.lit/lab'
  88. type='chat'>
  89. <body>I cannot. You know I cannot! Dr. Bogert and Dr. Lanning don't want me to.</body>
  90. </message>
  91. ]]></example>
  92. </section1>
  93. <section1 topic='Business Rules' anchor='rules'>
  94. <p>The following rules apply to generating and processing of the attention extension.</p>
  95. <ol>
  96. <li>Before sending an attention message stanza, the client SHOULD confirm support for it in the other client as described under <link url='#disco'>Determining Support</link>.</li>
  97. <li>The message stanza containing the attention extension MAY contain a body and/or other extensions, which is to be displayed along with executing the attention event.</li>
  98. <li>In message stanzas containing either &xep0203; data, attention extensions MUST be ignored, since the attention request is an instant event which SHOULD NOT be replayed after a delay.</li>
  99. <li>Messages containing an attention extension SHOULD use the headline message type to avoid offline storage.</li>
  100. <li>The attention extension MUST NOT be sent in &IQ; stanzas, since use of this feature is part of a messaging conversation.</li>
  101. </ol>
  102. </section1>
  103. <section1 topic='Determining Support' anchor='disco'>
  104. <p>If an entity wishes to receive the attention extension, it MUST advertise that fact in its responses to &xep0030; information ("disco#info") requests by returning a feature of "urn:xmpp:attention:0":</p>
  105. <example caption='A disco#info query'><![CDATA[
  106. <iq type='get'
  107. from='calvin@usrobots.lit/lab'
  108. to='herbie@usrobots.lit/home'
  109. id='disco1'>
  110. <query xmlns='http://jabber.org/protocol/disco#info'/>
  111. </iq>
  112. ]]></example>
  113. <example caption='A disco#info response'><![CDATA[
  114. <iq type='result'
  115. from='herbie@usrobots.lit/home'
  116. to='calvin@usrobots.lit/lab'
  117. id='disco1'>
  118. <query xmlns='http://jabber.org/protocol/disco#info'>
  119. <feature var='urn:xmpp:attention:0'/>
  120. </query>
  121. </iq>
  122. ]]></example>
  123. <p>In order for an application to determine whether an entity supports this protocol, where possible it SHOULD use the dynamic, presence-based profile of service discovery defined in &xep0115;. However, if an application has not received entity capabilities information from an entity, it SHOULD use explicit service discovery instead.</p>
  124. </section1>
  125. <section1 topic='Implementation Notes' anchor='impl'>
  126. <p>The implementation of the alert is up to the developer. Possible behavior includes:</p>
  127. <ul>
  128. <li>Shaking the window.</li>
  129. <li>Playing a specific sound not used for any other event.</li>
  130. <li>Flashing the screen.</li>
  131. <li>Enabling external hardware such as flashing lights.</li>
  132. <li>Let it be user customizable.</li>
  133. </ul>
  134. <p>Because some users might not want this feature to disturb them, a client MUST either (1) allow the user to disable support or (2) disable the feature by default and process attention requests only if the user has explicitly enabled support. When the feature is disabled, it MUST NOT be advertised in disco#info.</p>
  135. <p>Rate-limiting might be desirable in some implementations.</p>
  136. <p>Formal feedback in response to the attention request to the requesting user is not specified, and so the request might be silently dropped.</p>
  137. </section1>
  138. <section1 topic='Security Considerations' anchor='security'>
  139. <p>It is RECOMMENDED that a client accept message stanzas containing the attention extension only contacts that are in the user's roster or with whom the user's client is currently sharing directed presence, mainly to prevent the user from being annoyed by attention requests from random entities on the network. A client could implement finer-grained control if desired (e.g., allow attention requests only from entities in a particular roster group).</p>
  140. </section1>
  141. <section1 topic='IANA Considerations' anchor='iana'>
  142. <p>This document requires no interaction with &IANA;.</p>
  143. </section1>
  144. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  145. <section2 topic='Protocol Namespaces' anchor='registrar-ns'>
  146. <p>This specification defines the following XML namespace:</p>
  147. <ul>
  148. <li>urn:xmpp:attention:0</li>
  149. </ul>
  150. <p>The &REGISTRAR; includes this namespace in the registry located at &NAMESPACES;, as described in Section 4 of &xep0053;.</p>
  151. </section2>
  152. <section2 topic='Protocol Versioning' anchor='registrar-versioning'>
  153. &NSVER;
  154. </section2>
  155. </section1>
  156. <section1 topic='XML Schema' anchor='schema'>
  157. <code><![CDATA[
  158. <?xml version='1.0' encoding='UTF-8'?>
  159. <xs:schema
  160. xmlns:xs='http://www.w3.org/2001/XMLSchema'
  161. targetNamespace='urn:xmpp:attention:0'
  162. xmlns='urn:xmpp:attention:0'
  163. elementFormDefault='qualified'>
  164. <xs:annotation>
  165. <xs:documentation>
  166. The protocol documented by this schema is defined in
  167. XEP-0224: http://www.xmpp.org/extensions/xep-0224.html
  168. </xs:documentation>
  169. </xs:annotation>
  170. <xs:element name='attention' type='empty'/>
  171. <xs:simpleType name='empty'>
  172. <xs:restriction base='xs:string'>
  173. <xs:enumeration value=''/>
  174. </xs:restriction>
  175. </xs:simpleType>
  176. </xs:schema>
  177. ]]></code>
  178. </section1>
  179. <section1 topic='Acknowledgements' anchor='ack'>
  180. <p>The quotes have been taken from Isaac Asimov's short story "Liar!" as published in the book <cite>The Complete Robot</cite>.</p>
  181. </section1>
  182. </xep>