mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-24 18:22:24 -05:00
proofread
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@1318 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
parent
9c31f12471
commit
21b8ad2ae7
52
xep-0084.xml
52
xep-0084.xml
@ -103,7 +103,7 @@
|
||||
</revision>
|
||||
</header>
|
||||
<section1 topic='Introduction' anchor='intro'>
|
||||
<p>Many communication applications allow for the association of a small image or icon with a user of that application. Usually, such an "avatar" is not intended to be an accurate picture of the user's actual physical appearance, but rather a representation (often fanciful) of the user's desired self-image or a transient state of the user (such as a mood or activity). This document outlines a way to incorporate avatars into current Jabber/XMPP systems by layering this functionality on top of the XMPP &xep0060; extension ("pubsub"), specifically the &xep0163; subset ("PEP"), which is designed for use in the context of XMPP instant messaging and presence systems that conform to &rfc3921;.</p>
|
||||
<p>Many communication applications allow for the association of a small image or icon with a user of that application. Usually, such an "avatar" is not intended to be an accurate picture of the user's actual physical appearance, but rather a representation (often fanciful) of the user's desired self-image or a transient state of the user (such as a mood or activity). This document defines a way to incorporate avatars into current Jabber/XMPP systems by layering this functionality on top of the XMPP &xep0060; extension ("pubsub"), specifically the &xep0163; subset ("PEP"), which is designed for use in the context of XMPP instant messaging and presence systems that conform to &rfc3921;.</p>
|
||||
<p>The protocol defined herein uses two pubsub nodes: one node for "metadata" about the avatar state (called the "metadata node") and one for the avatar data itself (called the "data node"). This separation of metadata from data conserves bandwidth and enables both the publisher and the subscriber to cache the avatar data. (For example, a user might toggle between two or three avatars, in which case the user's contacts can display a locally cached version of the images without having to retrieve or receive the full image each time.)</p>
|
||||
<p>This protocol also allows storage of avatar data at a URL accessible via HTTP (see &rfc2616;). <note>By "accessible via HTTP" is meant that the data is available at an http: or https: URI.</note> This can be helpful as a fallback mechanism if a pubsub-aware data repository is not available. It also makes it possible for avatar images to be hosted on public websites (e.g., an end-user-oriented community site) and retrieved from that site rather than handled directly by the publishing client in any fashion.</p>
|
||||
<p>Finally, this protocol also enables XMPP applications to optionally integrate with third-party services that host user avatars (e.g., online gaming systems and virtual worlds).</p>
|
||||
@ -139,7 +139,7 @@
|
||||
<p>Before updating the avatar metadata node, the publisher MUST make sure that the avatar data is available at the data node or URL. When publishing the avatar data to the data node, the publisher MUST ensure that the value of the pubsub ItemID is a SHA-1 hash of the data for the "image/png" content-type (this is used by the subscriber to determine if a locally cached copy can be displayed).</p>
|
||||
<p>The following example illustrates the XML structure to be sent when publishing avatar data to the data node.</p>
|
||||
<example caption='Publishing avatar data to data node'><![CDATA[
|
||||
<iq type='set' from='juliet@capulet.com/chamber' id='publish1'>
|
||||
<iq type='set' from='juliet@capulet.lit/chamber' id='publish1'>
|
||||
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
|
||||
<publish node='http://www.xmpp.org/extensions/xep-0084.html#ns-data'>
|
||||
<item id='111f4b3c50d7b0df729d299bc6f8e9ef9066971f'>
|
||||
@ -152,7 +152,7 @@
|
||||
</iq>
|
||||
]]></example>
|
||||
<example caption='Pubsub service replies with success'><![CDATA[
|
||||
<iq type='result' to='juliet@capulet.com/chamber' id='publish1'/>
|
||||
<iq type='result' to='juliet@capulet.lit/chamber' id='publish1'/>
|
||||
]]></example>
|
||||
<p>If the avatar will be made available via HTTP instead of a pubsub data node, the publisher MUST either verify that the avatar exists at the HTTP URL or publish it via standard HTTP methods (such methods are out of scope for this specification; refer to <cite>RFC 2616</cite>).</p>
|
||||
</section2>
|
||||
@ -160,7 +160,7 @@
|
||||
<p>Whenever the publisher wishes to change its current avatar, it MUST update the metadata node.</p>
|
||||
<p>The following example shows metadata specifying avatar data that is available in only one format ("image/png") and accessible only at the data node.</p>
|
||||
<example caption='Publishing avatar metadata'><![CDATA[
|
||||
<iq type='set' from='juliet@capulet.com/chamber' id='publish2'>
|
||||
<iq type='set' from='juliet@capulet.lit/chamber' id='publish2'>
|
||||
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
|
||||
<publish node='http://www.xmpp.org/extensions/xep-0084.html#ns-metadata'>
|
||||
<item id='111f4b3c50d7b0df729d299bc6f8e9ef9066971f'>
|
||||
@ -178,7 +178,7 @@
|
||||
]]></example>
|
||||
<p>The following example shows metadata specifying avatar data that is available at an HTTP URL.</p>
|
||||
<example caption='Publishing avatar metadata'><![CDATA[
|
||||
<iq type='set' from='juliet@capulet.com/chamber' id='publish2'>
|
||||
<iq type='set' from='juliet@capulet.lit/chamber' id='publish2'>
|
||||
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
|
||||
<publish node='http://www.xmpp.org/extensions/xep-0084.html#ns-metadata'>
|
||||
<item id='111f4b3c50d7b0df729d299bc6f8e9ef9066971f'>
|
||||
@ -199,7 +199,7 @@
|
||||
<section2 topic='Subscribers Receive Metadata Notification' anchor='process-subnotify'>
|
||||
<p>The user's virtual pubsub service would then send the metadata notification to entities that have subscribed to the user's metadata node or contacts who have advertised an interest in receiving avatar metadata by including a &xep0115; feature of "http://www.xmpp.org/extensions/xep-0084.html#ns-metadata+notify" &NSNOTE;.</p>
|
||||
<example caption='Subscribers receive avatar metadata notification'><![CDATA[
|
||||
<message to='romeo@montague.net' from='juliet@capulet.com'>
|
||||
<message to='romeo@montague.lit' from='juliet@capulet.lit'>
|
||||
<event xmlns='http://jabber.org/protocol/pubsub#event'>
|
||||
<items node='http://www.xmpp.org/extensions/xep-0084.html#ns-metadata'>
|
||||
<item id='111f4b3c50d7b0df729d299bc6f8e9ef9066971f'>
|
||||
@ -214,7 +214,7 @@
|
||||
</items>
|
||||
</event>
|
||||
<addresses xmlns='http://jabber.org/protocol/address'>
|
||||
<address type='replyto' jid='juliet@capulet.com/chamber'/>
|
||||
<address type='replyto' jid='juliet@capulet.lit/chamber'/>
|
||||
</addresses>
|
||||
</message>
|
||||
]]></example>
|
||||
@ -225,8 +225,8 @@
|
||||
<p>If the subscriber does not have a locally cached copy of the avatar image, it SHOULD retrieve the data. It can do this by sending a pubsub retrieve-items request to the data node, specifying the appropriate ItemID.</p>
|
||||
<example caption='Subscriber requests last item by ItemID'><![CDATA[
|
||||
<iq type='get'
|
||||
from='romeo@montague.net/home'
|
||||
to='juliet@capulet.com'
|
||||
from='romeo@montague.lit/home'
|
||||
to='juliet@capulet.lit'
|
||||
id='retrieve1'>
|
||||
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
|
||||
<items node='http://www.xmpp.org/extensions/xep-0084.html#ns-data'>
|
||||
@ -238,8 +238,8 @@
|
||||
<p>The PEP service running at the user's server then SHOULD return the avatar data.</p>
|
||||
<example caption='Publishing avatar data to data node'><![CDATA[
|
||||
<iq type='result'
|
||||
from='juliet@capulet.com'
|
||||
to='romeo@montague.net/home'
|
||||
from='juliet@capulet.lit'
|
||||
to='romeo@montague.lit/home'
|
||||
id='retrieve1'>
|
||||
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
|
||||
<items node='http://www.xmpp.org/extensions/xep-0084.html#ns-data'>
|
||||
@ -254,12 +254,12 @@
|
||||
]]></example>
|
||||
<p>If the <info/> element sent to the metadata node possesses a 'url' attribute, the avatar data is hosted at a URL. Therefore, in order to retrieve the avatar image data for that content-type, the requesting entity MUST send an HTTP request to the specified URL. Methods for doing so are out of scope for this specification (see <cite>RFC 2616</cite>).</p>
|
||||
</section2>
|
||||
<section2 topic='Publisher Disables Avatars' anchor='pub-stop'>
|
||||
<p>In order to temporarily disable any avatar, the user publishes an empty <stop/> element to the metadata node (this item SHOULD NOT possess an ItemID).</p>
|
||||
<section2 topic='Publisher Disables Avatar Publishing' anchor='pub-stop'>
|
||||
<p>In order to temporarily disable avatar publishing, the user publishes an empty <stop/> element to the metadata node (this item SHOULD NOT possess an ItemID).</p>
|
||||
<example caption='Temporarily disabling an avatar'><![CDATA[
|
||||
<iq type='set' from='juliet@capulet.com/chamber' id='publish3'>
|
||||
<iq type='set' from='juliet@capulet.lit/chamber' id='publish3'>
|
||||
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
|
||||
<publish node='avatar/info/juliet@capulet.com'>
|
||||
<publish node='avatar/info/juliet@capulet.lit'>
|
||||
<item>
|
||||
<metadata xmlns='http://www.xmpp.org/extensions/xep-0084.html#ns-metadata'>
|
||||
<stop/>
|
||||
@ -271,7 +271,7 @@
|
||||
]]></example>
|
||||
<p>As before, subscribers to the metadata node would then receive the notification.</p>
|
||||
<example caption='Subscribers receive avatar metadata notification'><![CDATA[
|
||||
<message to='romeo@montague.net' from='juliet@capulet.com'>
|
||||
<message to='romeo@montague.lit' from='juliet@capulet.lit'>
|
||||
<event xmlns='http://jabber.org/protocol/pubsub#event'>
|
||||
<items node='http://www.xmpp.org/extensions/xep-0084.html#ns-metadata'>
|
||||
<item>
|
||||
@ -282,7 +282,7 @@
|
||||
</items>
|
||||
</event>
|
||||
<addresses xmlns='http://jabber.org/protocol/address'>
|
||||
<address type='replyto' jid='juliet@capulet.com/chamber'/>
|
||||
<address type='replyto' jid='juliet@capulet.lit/chamber'/>
|
||||
</addresses>
|
||||
</message>
|
||||
]]></example>
|
||||
@ -404,7 +404,7 @@
|
||||
<section2 topic='Metadata With Multiple Content-Types' anchor='examples-multiple'>
|
||||
<p>The following example shows metadata specifying avatar data that is available in multiple formats ("image/png", "image/gif", and "image/mng"), where the "image/png" content-type is available only at the data node and the other content-types are available HTTP URLs.</p>
|
||||
<example caption='Publishing avatar metadata (multiple formats)'><![CDATA[
|
||||
<iq type='set' from='juliet@capulet.com/chamber' id='publish3'>
|
||||
<iq type='set' from='juliet@capulet.lit/chamber' id='publish3'>
|
||||
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
|
||||
<publish node='http://www.xmpp.org/extensions/xep-0084.html#ns-metadata'>
|
||||
<item id='111f4b3c50d7b0df729d299bc6f8e9ef9066971f'>
|
||||
@ -443,7 +443,7 @@
|
||||
<section2 topic='Metadata With Pointer' anchor='examples-pointer'>
|
||||
<p>The following example shows metadata specifying avatar data that is available in "image/png" at the data node and also with a pointer to an external service.</p>
|
||||
<example caption='Publishing avatar metadata (with pointer)'><![CDATA[
|
||||
<iq type='set' from='juliet@capulet.com/chamber' id='publish4'>
|
||||
<iq type='set' from='juliet@capulet.lit/chamber' id='publish4'>
|
||||
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
|
||||
<publish node='http://www.xmpp.org/extensions/xep-0084.html#ns-metadata'>
|
||||
<item id='111f4b3c50d7b0df729d299bc6f8e9ef9066971f'>
|
||||
@ -472,8 +472,8 @@
|
||||
<p>The pubsub "auto-subscribe" and "filtered-notifications" features enable a contact to automatically subscribe to a user's avatar. However, a contact can also explicitly determine if another user publishes avatars using this protocol by sending a &xep0030; items ("disco#items") request to the user's bare JID (&BAREJID;).</p>
|
||||
<example caption='Disco items request'><![CDATA[
|
||||
<iq type='get'
|
||||
from='romeo@montague.net/orchard'
|
||||
to='juliet@capulet.com'
|
||||
from='romeo@montague.lit/orchard'
|
||||
to='juliet@capulet.lit'
|
||||
id='items1'>
|
||||
<query xmlns='http://jabber.org/protocol/disco#items'/>
|
||||
</iq>
|
||||
@ -481,12 +481,12 @@
|
||||
<p>If the user publishes avatar data to an PEP node, the result MUST contain the appropriate items.</p>
|
||||
<example caption='Disco items result'><![CDATA[
|
||||
<iq type='result'
|
||||
from='juliet@capulet.com'
|
||||
to='romeo@montague.net/orchard'
|
||||
from='juliet@capulet.lit'
|
||||
to='romeo@montague.lit/orchard'
|
||||
id='items1'>
|
||||
<query xmlns='http://jabber.org/protocol/disco#items'>
|
||||
<item jid='juliet@capulet.com' node='http://www.xmpp.org/extensions/xep-0084.html#ns-data'/>
|
||||
<item jid='juliet@capulet.com' node='http://www.xmpp.org/extensions/xep-0084.html#ns-metadata'/>
|
||||
<item jid='juliet@capulet.lit' node='http://www.xmpp.org/extensions/xep-0084.html#ns-data'/>
|
||||
<item jid='juliet@capulet.lit' node='http://www.xmpp.org/extensions/xep-0084.html#ns-metadata'/>
|
||||
</query>
|
||||
</iq>
|
||||
]]></example>
|
||||
@ -561,9 +561,9 @@
|
||||
<xs:simpleContent>
|
||||
<xs:extension base='empty'>
|
||||
<xs:attribute name='bytes' type='xs:unsignedShort' use='required'/>
|
||||
<xs:attribute name='type' type='xs:string' use='required'/>
|
||||
<xs:attribute name='height' type='xs:unsignedByte' use='optional'/>
|
||||
<xs:attribute name='id' type='xs:string' use='required'/>
|
||||
<xs:attribute name='type' type='xs:string' use='required'/>
|
||||
<xs:attribute name='url' type='xs:anyURI' use='optional'/>
|
||||
<xs:attribute name='width' type='xs:unsignedByte' use='optional'/>
|
||||
</xs:extension>
|
||||
|
Loading…
Reference in New Issue
Block a user