mirror of
https://github.com/moparisthebest/xeps
synced 2024-12-21 15:18:51 -05:00
0.10
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@966 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
parent
4a27c15489
commit
54ad7a7bf9
50
xep-0084.xml
50
xep-0084.xml
@ -28,6 +28,12 @@
|
||||
&pgmillard;
|
||||
&temas;
|
||||
&xvirge;
|
||||
<revision>
|
||||
<version>0.10</version>
|
||||
<date>2007-06-18</date>
|
||||
<initials>psa</initials>
|
||||
<remark><p>Changed height and width attributes from required to recommended; updated security considerations to reflect problems with SHA-1; further specified datatypes.</p></remark>
|
||||
</revision>
|
||||
<revision>
|
||||
<version>0.9</version>
|
||||
<date>2007-02-01</date>
|
||||
@ -178,7 +184,7 @@
|
||||
</addresses>
|
||||
</message>
|
||||
]]></example>
|
||||
<p>Note the inclusion of &xep0033; information about the publishing resource (see <cite>XEP-0163</cite> and <cite>XEP-0060</cite> for details).</p>
|
||||
<p>Depending on node configuration, the item may include &xep0033; information about the publishing resource (see <cite>XEP-0163</cite> and <cite>XEP-0060</cite> for details).</p>
|
||||
</section2>
|
||||
<section2 topic='Subscribers Retrieve Data' anchor='process-subretrieve'>
|
||||
<p>Upon receiving the notification, each subscriber SHOULD determine if it has a locally cached copy of that avatar (which it can determine by searching for an image identified by the ItemID). If the subscriber already has a locally cached copy of the avatar image, it MUST NOT retrieve the image data.</p>
|
||||
@ -277,11 +283,11 @@
|
||||
<p>The <info/> child element is used to communicate avatar metadata:</p>
|
||||
<code><![CDATA[
|
||||
<metadata xmlns='http://www.xmpp.org/extensions/xep-0084.html#ns-metadata'>
|
||||
<info id='SHA1-hash-of-image-data'
|
||||
url='HTTP-URL-for-image-data'
|
||||
type='content-type-of-image-data'
|
||||
bytes='size-of-image-data-in-bytes'
|
||||
<info bytes='size-of-image-data-in-bytes'
|
||||
height='image-height-in-pixels'
|
||||
id='SHA1-hash-of-image-data'
|
||||
type='content-type-of-image-data'
|
||||
url='HTTP-URL-for-image-data'
|
||||
width='image-width-in-pixels'/>
|
||||
</metadata>
|
||||
]]></code>
|
||||
@ -289,9 +295,12 @@
|
||||
<p>The <info/> child element MUST possess the following attributes:</p>
|
||||
<ul>
|
||||
<li><em>bytes</em> -- The size of the image data in bytes.</li>
|
||||
<li><em>height</em> -- The height of the image in pixels.</li>
|
||||
<li><em>id</em> -- The SHA1 hash of the image data for the specified content-type.</li>
|
||||
<li><em>type</em> -- The IANA-registered content type of the image data.</li>
|
||||
</ul>
|
||||
<p>The <info/> child element SHOULD possess the following attributes:</p>
|
||||
<ul>
|
||||
<li><em>height</em> -- The height of the image in pixels.</li>
|
||||
<li><em>width</em> -- The width of the image in pixels.</li>
|
||||
</ul>
|
||||
<p>The <info/> element MAY possess the following attribute:</p>
|
||||
@ -398,7 +407,7 @@
|
||||
</section1>
|
||||
<section1 topic='Service Discovery' anchor='disco'>
|
||||
<section2 topic='Discovering Avatar Availability' anchor='disco-sub'>
|
||||
<p>A contact can 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>
|
||||
<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'
|
||||
@ -424,15 +433,21 @@
|
||||
</section1>
|
||||
<section1 topic='Business Rules' anchor='bizrules'>
|
||||
<section2 topic='Image Requirements' anchor='bizrules-images'>
|
||||
<p>Certain restrictions are placed upon the image. First, the image height and width SHOULD be between thirty-two (32) and ninety-six (96) pixels. The suggested size is sixty-four (64) pixels high and sixty-four (64) pixels wide. Images SHOULD be square, but this is not required. Finally, images SHOULD use less than eight (8) kilobytes of data.</p>
|
||||
<p>The following restrictions apply to the image:</p>
|
||||
<ol>
|
||||
<li>The image height and width SHOULD be between thirty-two (32) and ninety-six (96) pixels.</li>
|
||||
<li>The suggested size is sixty-four (64) pixels high and sixty-four (64) pixels wide.</li>
|
||||
<li>The image SHOULD be square.</li>
|
||||
<li>The image SHOULD use less than eight (8) kilobytes of data.</li>
|
||||
</ol>
|
||||
</section2>
|
||||
</section1>
|
||||
<section1 topic='Implementation Notes' anchor='impl'>
|
||||
<section2 topic='Multiple Resources' anchor='impl-resources'>
|
||||
<p>If a user has multiple online resources at the same time, each resource MAY publish a different avatar. A user SHOULD subscribe to his or her own metadata in order to know the avatars that are being published to all resources. The PEP service SHOULD include the replyto address of the publishing resource as shown above in order to facilitate differentiation between per-resource avatars.</p>
|
||||
<p>If a user has multiple online resources at the same time, each resource MAY publish a different avatar. The PEP service SHOULD include the replyto address of the publishing resource as shown above in order to facilitate differentiation between per-resource avatars.</p>
|
||||
</section2>
|
||||
<section2 topic='Avatar Synchronization' anchor='impl-sync'>
|
||||
<p>When a user logs in with a new resource and before publishing an avatar, its client SHOULD retrieve its last published avatar using the "get-items" method described in <cite>XEP-0060</cite>.</p>
|
||||
<p>When a user logs in with a new resource and before publishing an avatar, its client SHOULD retrieve its last published avatar, either automatically by sending presence with the appropriate &xep0115; information or using the "get-items" method described in <cite>XEP-0060</cite>.</p>
|
||||
</section2>
|
||||
<section2 topic='Image Handling' anchor='impl-images'>
|
||||
<p>It is the responsibility of the receiving application to determine which avatar format to retrieve (e.g., "image/gif" rather than "image/png") and to determine the appropriate method for retrieval (e.g., HTTP rather than pubsub).</p>
|
||||
@ -441,7 +456,8 @@
|
||||
</section2>
|
||||
</section1>
|
||||
<section1 topic='Security Considerations' anchor='security'>
|
||||
<p>There are no security features or concerns related to this proposal.</p>
|
||||
<p>See <cite>XEP-0060</cite> and <cite>XEP-0163</cite> regarding security considerations related to the underlying transport protocol.</p>
|
||||
<p>It is possible that output of the SHA-1 hashing algorithm can result in collisions; however, the use of SHA-1 in producing a hash of the avatar data is not security-critical.</p>
|
||||
</section1>
|
||||
<section1 topic='IANA Considerations' anchor='iana'>
|
||||
<p>This document makes use of IANA-registered content types, but requires no interaction with &IANA;.</p>
|
||||
@ -480,8 +496,8 @@
|
||||
<xs:element name='metadata'>
|
||||
<xs:complexType>
|
||||
<xs:choice>
|
||||
<xs:sequence>
|
||||
<xs:element ref='info' maxOccurs='unbounded'/>
|
||||
<xs:sequence minOccurs='0' maxOccurs='1'>
|
||||
<xs:element ref='info' minOccurs='1' maxOccurs='unbounded'/>
|
||||
<xs:element ref='pointer' minOccurs='0' maxOccurs='unbounded'/>
|
||||
</xs:sequence>
|
||||
<xs:element name='stop' type='empty'/>
|
||||
@ -493,12 +509,12 @@
|
||||
<xs:complexType>
|
||||
<xs:simpleContent>
|
||||
<xs:extension base='empty'>
|
||||
<xs:attribute name='bytes' type='xs:string' use='required'/>
|
||||
<xs:attribute name='bytes' type='xs:unsignedShort' use='required'/>
|
||||
<xs:attribute name='type' type='xs:string' use='required'/>
|
||||
<xs:attribute name='height' 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='url' type='xs:string' use='optional'/>
|
||||
<xs:attribute name='width' 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>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
|
Loading…
Reference in New Issue
Block a user