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-0196.xml 8.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  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>User Gaming</title>
  10. <abstract>This document defines an XMPP protocol extension for communicating information about the games a user plays.</abstract>
  11. &LEGALNOTICE;
  12. <number>0196</number>
  13. <status>Deferred</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <dependencies>
  17. <spec>XMPP Core</spec>
  18. <spec>XMPP IM</spec>
  19. <spec>XEP-0060</spec>
  20. <spec>XEP-0163</spec>
  21. </dependencies>
  22. <supersedes/>
  23. <supersededby/>
  24. <shortname>NOT_YET_ASSIGNED</shortname>
  25. &stpeter;
  26. <revision>
  27. <version>0.3</version>
  28. <date>2008-09-25</date>
  29. <initials>psa</initials>
  30. <remark><p>Modified namespace in accordance with protocol versioning policies.</p></remark>
  31. </revision>
  32. <revision>
  33. <version>0.2</version>
  34. <date>2007-10-03</date>
  35. <initials>psa</initials>
  36. <remark><p>Updated in accordance with XEP-0163.</p></remark>
  37. </revision>
  38. <revision>
  39. <version>0.1</version>
  40. <date>2006-08-30</date>
  41. <initials>psa</initials>
  42. <remark><p>Initial version; added several more fields.</p></remark>
  43. </revision>
  44. <revision>
  45. <version>0.0.1</version>
  46. <date>2006-08-28</date>
  47. <initials>psa</initials>
  48. <remark><p>First draft.</p></remark>
  49. </revision>
  50. </header>
  51. <section1 topic='Introduction' anchor='intro'>
  52. <p>&xep0060; and &xep0163; can be used to publish a wide variety of "extended presence" information about users. This document specifies an extended presence payload format that communicates information about the games a user plays. This information may be of interest to a user's contacts and can also be used in social networking applications.</p>
  53. </section1>
  54. <section1 topic='Protocol' anchor='protocol'>
  55. <section2 topic='Container Element and Child Elements' anchor='protocol-elements'>
  56. <p>Information about games is provided by the user (or automated integration with gaming systems) and is propagated on the network by the user's client. The information container for gaming data is a &lt;game/&gt; element that is qualified by the 'urn:xmpp:gaming:0' namespace. The game information itself is provided as the XML character data of the following children of the &lt;game/&gt; element:</p>
  57. <table caption='Child Elements'>
  58. <tr>
  59. <th>Element</th>
  60. <th>Description</th>
  61. <th>Example</th>
  62. <th>Datatype</th>
  63. <th>Inclusion</th>
  64. </tr>
  65. <tr>
  66. <td>character_name</td>
  67. <td>The name of the user's character in the game</td>
  68. <td>Stentor</td>
  69. <td>xs:string</td>
  70. <td>OPTIONAL</td>
  71. </tr>
  72. <tr>
  73. <td>character_profile</td>
  74. <td>A URI for a profile of the user's character</td>
  75. <td>http://wow.example.com/profile.html?12345</td>
  76. <td>xs:anyURI</td>
  77. <td>OPTIONAL</td>
  78. </tr>
  79. <tr>
  80. <td>name</td>
  81. <td>The name of the game</td>
  82. <td>Worlds of Warfare</td>
  83. <td>xs:string</td>
  84. <td>REQUIRED</td>
  85. </tr>
  86. <tr>
  87. <td>level</td>
  88. <td>The user's level in the game</td>
  89. <td>66</td>
  90. <td>xs:string</td>
  91. <td>OPTIONAL</td>
  92. </tr>
  93. <tr>
  94. <td>server_address</td>
  95. <td>The hostname or IP address of the server where the user is playing</td>
  96. <td>wow6.example.com</td>
  97. <td>xs:string</td>
  98. <td>OPTIONAL</td>
  99. </tr>
  100. <tr>
  101. <td>server_name</td>
  102. <td>The name of the server where the user is playing</td>
  103. <td>WOW Example</td>
  104. <td>xs:string</td>
  105. <td>OPTIONAL</td>
  106. </tr>
  107. <tr>
  108. <td>uri</td>
  109. <td>A URI for the game or relevant gaming service</td>
  110. <td>http://wow.example.com/</td>
  111. <td>xs:anyURI</td>
  112. <td>OPTIONAL</td>
  113. </tr>
  114. </table>
  115. <p>NOTE: The datatypes specified above are defined in &w3xmlschema2;.</p>
  116. </section2>
  117. <section2 topic='Transport Mechanism' anchor='protocol-transport'>
  118. <p>When a user starts playing a game, its client may publish that fact to PEP node whose NodeID is "urn:xmpp:gaming:0" &NSNOTE; or to a generic pubsub node. Because gaming information is not pure presence information and can change independently of the user's availability, it SHOULD NOT be provided as an extension to the &PRESENCE; stanza type.</p>
  119. <example caption='User Publishes Gaming Information'><![CDATA[
  120. <iq type='set' from='stpeter@jabber.org/work' id='gaming1'>
  121. <pubsub xmlns='http://jabber.org/protocol/pubsub'>
  122. <publish node='urn:xmpp:gaming:0'>
  123. <item id='1feea9cceec2537e1b561e66d45bc566e276f22f'>
  124. <game xmlns='urn:xmpp:gaming:0'>
  125. <name>chess</name>
  126. <uri>http://www.chesspark.com/</uri>
  127. </game>
  128. </item>
  129. </publish>
  130. </pubsub>
  131. </iq>
  132. ]]></example>
  133. <p>The gaming information is then delivered to all subscribers:</p>
  134. <example caption='Gaming Information is Delivered to All Subscribers'><![CDATA[
  135. <message from='stpeter@jabber.org' to='maineboy@jabber.org'>
  136. <event xmlns='http://jabber.org/protocol/pubsub#event'>
  137. <items node='urn:xmpp:gaming:0'>
  138. <item id='1feea9cceec2537e1b561e66d45bc566e276f22f'>
  139. <game xmlns='urn:xmpp:gaming:0'>
  140. <name>chess</name>
  141. <uri>http://www.chesspark.com/</uri>
  142. </game>
  143. </item>
  144. </items>
  145. </event>
  146. </message>
  147. ]]></example>
  148. <p>When the user stops playing the game, the user's client SHOULD send an empty &lt;game/&gt; element with the same ItemID:</p>
  149. <example caption='User Publishes Stop Information'><![CDATA[
  150. <iq type='set' from='stpeter@jabber.org/work' id='gaming2'>
  151. <pubsub xmlns='http://jabber.org/protocol/pubsub'>
  152. <publish node='urn:xmpp:gaming:0'>
  153. <item id='1feea9cceec2537e1b561e66d45bc566e276f22f'>
  154. <game xmlns='urn:xmpp:gaming:0'/>
  155. </item>
  156. </publish>
  157. </pubsub>
  158. </iq>
  159. ]]></example>
  160. <example caption='Stop Information is Delivered to All Subscribers'><![CDATA[
  161. <message from='stpeter@jabber.org' to='maineboy@jabber.org'>
  162. <event xmlns='http://jabber.org/protocol/pubsub#event'>
  163. <items node='urn:xmpp:gaming:0'>
  164. <item id='1feea9cceec2537e1b561e66d45bc566e276f22f'>
  165. <game xmlns='urn:xmpp:gaming:0'/>
  166. </item>
  167. </items>
  168. </event>
  169. </message>
  170. ]]></example>
  171. </section2>
  172. </section1>
  173. <section1 topic='Security Considerations' anchor='security'>
  174. <p>The games that a user plays may be sensitive. A client MUST provide a way for a user to configure which games or types of games will not be published (e.g., via user preferences).</p>
  175. </section1>
  176. <section1 topic='IANA Considerations' anchor='iana'>
  177. <p>This document requires no interaction with &IANA;.</p>
  178. </section1>
  179. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  180. <section2 topic='Protocol Namespaces' anchor='registrar-ns'>
  181. <p>This specification defines the following XML namespace:</p>
  182. <ul>
  183. <li>urn:xmpp:gaming:0</li>
  184. </ul>
  185. <p>Upon advancement of this specification from a status of Experimental to a status of Draft, the &REGISTRAR; shall add the foregoing namespace to the registry located at &NAMESPACES;, as described in Section 4 of &xep0053;.</p>
  186. </section2>
  187. <section2 topic='Namespace Versioning' anchor='registrar-versioning'>
  188. &NSVER;
  189. </section2>
  190. </section1>
  191. <section1 topic='XML Schema' anchor='schema'>
  192. <code><![CDATA[
  193. <?xml version='1.0' encoding='UTF-8'?>
  194. <xs:schema
  195. xmlns:xs='http://www.w3.org/2001/XMLSchema'
  196. targetNamespace='urn:xmpp:gaming:0'
  197. xmlns='urn:xmpp:gaming:0'
  198. elementFormDefault='qualified'>
  199. <xs:element name='game'>
  200. <xs:complexType>
  201. <xs:sequence minOccurs='0'>
  202. <xs:element name='character_name' type='xs:string' minOccurs='0'/>
  203. <xs:element name='character_profile' type='xs:anyURI' minOccurs='0'/>
  204. <xs:element name='level' type='xs:string' minOccurs='0'/>
  205. <xs:element name='name' type='xs:string'/>
  206. <xs:element name='server_address' type='xs:string' minOccurs='0'/>
  207. <xs:element name='server_name' type='xs:string' minOccurs='0'/>
  208. <xs:element name='uri' type='xs:anyURI' minOccurs='0'/>
  209. </xs:sequence>
  210. </xs:complexType>
  211. </xs:element>
  212. </xs:schema>
  213. ]]></code>
  214. </section1>
  215. </xep>