mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-22 01:02:17 -05:00
corrected example
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@1805 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
parent
91c3e4e328
commit
ebf4cabbff
49
xep-0115.xml
49
xep-0115.xml
@ -146,18 +146,18 @@
|
|||||||
<c xmlns='http://jabber.org/protocol/caps'
|
<c xmlns='http://jabber.org/protocol/caps'
|
||||||
hash='sha-1'
|
hash='sha-1'
|
||||||
node='http://code.google.com/p/exodus'
|
node='http://code.google.com/p/exodus'
|
||||||
ver='SrFo9ar2CCk2EnOH4q4QANeuxLQ='/>
|
ver='QgayPKawpkPSDYmwT/WM94uAlu0='/>
|
||||||
</presence>
|
</presence>
|
||||||
]]></code>
|
]]></code>
|
||||||
<p>The 'node' attribute represents the client software Romeo is using. The 'ver' attribute is a specially-constructed string (called a "verification string") that represents the entity's service discovery identity (category and type as registered at &DISCOCATEGORIES;, as well as, optionally, xml:lang and name) and supported features (as registered at &DISCOFEATURES; as well as, optionally, extended service discovery information data registered at &FORMTYPES;).</p>
|
<p>The 'node' attribute represents the client software Romeo is using. The 'ver' attribute is a specially-constructed string (called a "verification string") that represents the entity's service discovery identity (category and type as registered at &DISCOCATEGORIES;, as well as, optionally, xml:lang and name) and supported features (as registered at &DISCOFEATURES; as well as, optionally, extended service discovery information data registered at &FORMTYPES;).</p>
|
||||||
<p>At this point, your client has no idea what the capabilities are of someone with a version string 'SrFo9ar2CCk2EnOH4q4QANeuxLQ='. Your client therefore sends a service discovery query to Romeo, asking what his client can do.</p>
|
<p>At this point, your client has no idea what the capabilities are of someone with a version string 'QgayPKawpkPSDYmwT/WM94uAlu0='. Your client therefore sends a service discovery query to Romeo, asking what his client can do.</p>
|
||||||
<code><![CDATA[
|
<code><![CDATA[
|
||||||
<iq from='juliet@capulet.lit/chamber'
|
<iq from='juliet@capulet.lit/chamber'
|
||||||
id='disco1'
|
id='disco1'
|
||||||
to='romeo@montague.lit/orchard'
|
to='romeo@montague.lit/orchard'
|
||||||
type='get'>
|
type='get'>
|
||||||
<query xmlns='http://jabber.org/protocol/disco#info'
|
<query xmlns='http://jabber.org/protocol/disco#info'
|
||||||
node='http://code.google.com/p/exodus#SrFo9ar2CCk2EnOH4q4QANeuxLQ='/>
|
node='http://code.google.com/p/exodus#QgayPKawpkPSDYmwT/WM94uAlu0='/>
|
||||||
</iq>
|
</iq>
|
||||||
]]></code>
|
]]></code>
|
||||||
<p>The response is:</p>
|
<p>The response is:</p>
|
||||||
@ -167,21 +167,22 @@
|
|||||||
to='juliet@capulet.lit/chamber'
|
to='juliet@capulet.lit/chamber'
|
||||||
type='result'>
|
type='result'>
|
||||||
<query xmlns='http://jabber.org/protocol/disco#info'
|
<query xmlns='http://jabber.org/protocol/disco#info'
|
||||||
node='http://code.google.com/p/exodus#SrFo9ar2CCk2EnOH4q4QANeuxLQ='>
|
node='http://code.google.com/p/exodus#QgayPKawpkPSDYmwT/WM94uAlu0='>
|
||||||
<identity category='client' name='Exodus 0.9.1' type='pc'/>
|
<identity category='client' name='Exodus 0.9.1' type='pc'/>
|
||||||
|
<feature var='http://jabber.org/protocol/caps'/>
|
||||||
<feature var='http://jabber.org/protocol/disco#info'/>
|
<feature var='http://jabber.org/protocol/disco#info'/>
|
||||||
<feature var='http://jabber.org/protocol/disco#items'/>
|
<feature var='http://jabber.org/protocol/disco#items'/>
|
||||||
<feature var='http://jabber.org/protocol/muc'/>
|
<feature var='http://jabber.org/protocol/muc'/>
|
||||||
</query>
|
</query>
|
||||||
</iq>
|
</iq>
|
||||||
]]></code>
|
]]></code>
|
||||||
<p>At this point, your client knows that anyone advertising a version string of 'SrFo9ar2CCk2EnOH4q4QANeuxLQ=' has a client that can do &xep0045; and the other features returned by Romeo's client (the string can be relied upon because of how it is generated and checked, as explained later in this document). Your client remembers this information, so that it does not need to explicitly query the capabilities of a contact with the same version string. For example, your Nurse may use the same client that Romeo does:</p>
|
<p>At this point, your client knows that anyone advertising a version string of 'QgayPKawpkPSDYmwT/WM94uAlu0=' has a client that can do &xep0045; and the other features returned by Romeo's client (the string can be relied upon because of how it is generated and checked, as explained later in this document). Your client remembers this information, so that it does not need to explicitly query the capabilities of a contact with the same version string. For example, your Nurse may use the same client that Romeo does:</p>
|
||||||
<code><![CDATA[
|
<code><![CDATA[
|
||||||
<presence from='nurse@capulet.lit/chamber'>
|
<presence from='nurse@capulet.lit/chamber'>
|
||||||
<c xmlns='http://jabber.org/protocol/caps'
|
<c xmlns='http://jabber.org/protocol/caps'
|
||||||
hash='sha-1'
|
hash='sha-1'
|
||||||
node='http://code.google.com/p/exodus'
|
node='http://code.google.com/p/exodus'
|
||||||
ver='SrFo9ar2CCk2EnOH4q4QANeuxLQ='/>
|
ver='QgayPKawpkPSDYmwT/WM94uAlu0='/>
|
||||||
</presence>
|
</presence>
|
||||||
]]></code>
|
]]></code>
|
||||||
<p>Therefore you know that she also supports the same features that Romeo does.</p>
|
<p>Therefore you know that she also supports the same features that Romeo does.</p>
|
||||||
@ -191,7 +192,7 @@
|
|||||||
<c xmlns='http://jabber.org/protocol/caps'
|
<c xmlns='http://jabber.org/protocol/caps'
|
||||||
hash='sha-1'
|
hash='sha-1'
|
||||||
node='http://psi-im.org'
|
node='http://psi-im.org'
|
||||||
ver='8lu+88MRxmKM7yO3MEzY7YmTsWs='/>
|
ver='q07IKJEyjvHSyhy//CH0CxmKi8w='/>
|
||||||
</presence>
|
</presence>
|
||||||
]]></code>
|
]]></code>
|
||||||
<p>... or the following presence ...</p>
|
<p>... or the following presence ...</p>
|
||||||
@ -299,9 +300,9 @@
|
|||||||
<li>S = ''</li>
|
<li>S = ''</li>
|
||||||
<li>Only one identity: "client/pc"</li>
|
<li>Only one identity: "client/pc"</li>
|
||||||
<li>S = 'client/pc//Exodus 0.9.1<'</li>
|
<li>S = 'client/pc//Exodus 0.9.1<'</li>
|
||||||
<li>Sort the features: "http://jabber.org/protocol/disco#info", "http://jabber.org/protocol/disco#items", "http://jabber.org/protocol/muc".</li>
|
<li>Sort the features: "http://jabber.org/protocol/caps", "http://jabber.org/protocol/disco#info", "http://jabber.org/protocol/disco#items", "http://jabber.org/protocol/muc".</li>
|
||||||
<li>S = 'client/pc//Exodus 0.9.1<http://jabber.org/protocol/disco#info<http://jabber.org/protocol/disco#items<http://jabber.org/protocol/muc<'</li>
|
<li>S = 'client/pc//Exodus 0.9.1<http://jabber.org/protocol/caps<http://jabber.org/protocol/disco#info<http://jabber.org/protocol/disco#items<http://jabber.org/protocol/muc<'</li>
|
||||||
<li>ver = SrFo9ar2CCk2EnOH4q4QANeuxLQ=</li>
|
<li>ver = QgayPKawpkPSDYmwT/WM94uAlu0=</li>
|
||||||
</ol>
|
</ol>
|
||||||
</section2>
|
</section2>
|
||||||
<section2 topic='Complex Generation Example' anchor='ver-gen-complex'>
|
<section2 topic='Complex Generation Example' anchor='ver-gen-complex'>
|
||||||
@ -312,9 +313,10 @@
|
|||||||
to='juliet@capulet.lit/chamber'
|
to='juliet@capulet.lit/chamber'
|
||||||
type='result'>
|
type='result'>
|
||||||
<query xmlns='http://jabber.org/protocol/disco#info'
|
<query xmlns='http://jabber.org/protocol/disco#info'
|
||||||
node='http://psi-im.org#8lu+88MRxmKM7yO3MEzY7YmTsWs='>
|
node='http://psi-im.org#q07IKJEyjvHSyhy//CH0CxmKi8w='>
|
||||||
<identity xml:lang='en' category='client' name='Psi 0.9.1' type='pc'/>
|
<identity xml:lang='en' category='client' name='Psi 0.11' type='pc'/>
|
||||||
<identity xml:lang='el' category='client' name='Ψ 0.9.1' type='pc'/>
|
<identity xml:lang='el' category='client' name='Ψ 0.11' type='pc'/>
|
||||||
|
<feature var='http://jabber.org/protocol/caps'/>
|
||||||
<feature var='http://jabber.org/protocol/disco#info'/>
|
<feature var='http://jabber.org/protocol/disco#info'/>
|
||||||
<feature var='http://jabber.org/protocol/disco#items'/>
|
<feature var='http://jabber.org/protocol/disco#items'/>
|
||||||
<feature var='http://jabber.org/protocol/muc'/>
|
<feature var='http://jabber.org/protocol/muc'/>
|
||||||
@ -346,18 +348,15 @@
|
|||||||
<ol>
|
<ol>
|
||||||
<li>S = ''</li>
|
<li>S = ''</li>
|
||||||
<li>Two identities: "client/pc/Psi" and "client/pc/Ψ"</li>
|
<li>Two identities: "client/pc/Psi" and "client/pc/Ψ"</li>
|
||||||
<li>S = 'client/pc/el/Ψ 0.9.1<client/pc/en/Psi 0.9.1<'</li>
|
<li>S = 'client/pc/el/Ψ 0.11<client/pc/en/Psi 0.11<'</li>
|
||||||
<li>Sort the features: "http://jabber.org/protocol/caps", http://jabber.org/protocol/disco#info", "http://jabber.org/protocol/disco#items", "http://jabber.org/protocol/muc".</li>
|
<li>Sort the features: "http://jabber.org/protocol/caps", http://jabber.org/protocol/disco#info", "http://jabber.org/protocol/disco#items", "http://jabber.org/protocol/muc".</li>
|
||||||
<li>S = 'client/pc/el/Ψ 0.9.1<client/pc/en/Psi 0.9.1<http://jabber.org/protocol/caps<http://jabber.org/protocol/disco#info
|
<li>S = 'client/pc/el/Ψ 0.11<client/pc/en/Psi 0.11<http://jabber.org/protocol/caps<http://jabber.org/protocol/disco#info
|
||||||
<br /><http://jabber.org/protocol/disco#items<http://jabber.org/protocol/muc'.</li>
|
<br /><http://jabber.org/protocol/disco#items<http://jabber.org/protocol/muc'.</li>
|
||||||
<li>Sort the extended service discovery forms by FORM_TYPE (there is only one: "urn:xmpp:dataforms:softwareinfo").</li>
|
<li>Sort the extended service discovery forms by FORM_TYPE (there is only one: "urn:xmpp:dataforms:softwareinfo").</li>
|
||||||
<li>S = 'client/pc/el/Ψ 0.9.1<client/pc/en/Psi 0.9.1<http://jabber.org/protocol/caps<http://jabber.org/protocol/disco#info
|
<li>S = 'client/pc/el/Ψ 0.11<client/pc/en/Psi 0.11<http://jabber.org/protocol/caps<http://jabber.org/protocol/disco#info<http://jabber.org/protocol/disco#items<http://jabber.org/protocol/muc<urn:xmpp:dataforms:softwareinfo<'</li>
|
||||||
<br /><http://jabber.org/protocol/disco#items<http://jabber.org/protocol/muc<urn:xmpp:dataforms:softwareinfo<'</li>
|
|
||||||
<li>Sort the fields by var and append the value(s): "ip_version<ipv4<ipv6", "os<Mac", "os_version<10.5.1", "software<Psi", "software_version<0.11".</li>
|
<li>Sort the fields by var and append the value(s): "ip_version<ipv4<ipv6", "os<Mac", "os_version<10.5.1", "software<Psi", "software_version<0.11".</li>
|
||||||
<li>S = 'client/pc/el/Ψ 0.9.1<client/pc/en/Psi 0.9.1<http://jabber.org/protocol/caps
|
<li>S = 'client/pc/el/Ψ 0.11<client/pc/en/Psi 0.11<http://jabber.org/protocol/caps<http://jabber.org/protocol/disco#info<http://jabber.org/protocol/disco#items<http://jabber.org/protocol/muc<urn:xmpp:dataforms:softwareinfo<ip_version<ipv4<ipv6<os<Mac<os_version<10.5.1<software<Psi<software_version<0.11<'</li>
|
||||||
<br/><http://jabber.org/protocol/disco#info<http://jabber.org/protocol/disco#items<http://jabber.org/protocol/muc
|
<li>ver = q07IKJEyjvHSyhy//CH0CxmKi8w=</li>
|
||||||
<br/><urn:xmpp:dataforms:softwareinfo<ip_version<ipv4<ipv6<os<Mac<os_version<10.5.1<software<Psi<software_version<0.11<'</li>
|
|
||||||
<li>ver = 8lu+88MRxmKM7yO3MEzY7YmTsWs=</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</section2>
|
</section2>
|
||||||
<section2 topic='Processing Method' anchor='ver-proc'>
|
<section2 topic='Processing Method' anchor='ver-proc'>
|
||||||
@ -396,7 +395,7 @@
|
|||||||
<c xmlns='http://jabber.org/protocol/caps'
|
<c xmlns='http://jabber.org/protocol/caps'
|
||||||
hash='sha-1'
|
hash='sha-1'
|
||||||
node='http://code.google.com/p/exodus'
|
node='http://code.google.com/p/exodus'
|
||||||
ver='SrFo9ar2CCk2EnOH4q4QANeuxLQ='/>
|
ver='QgayPKawpkPSDYmwT/WM94uAlu0='/>
|
||||||
</presence>
|
</presence>
|
||||||
]]></example>
|
]]></example>
|
||||||
<p>If the supported features change during a generating entity's presence session (e.g., a user installs an updated version of a client plugin), the application MUST recompute the verification string and SHOULD send a new presence broadcast.</p>
|
<p>If the supported features change during a generating entity's presence session (e.g., a user installs an updated version of a client plugin), the application MUST recompute the verification string and SHOULD send a new presence broadcast.</p>
|
||||||
@ -419,13 +418,13 @@
|
|||||||
to='romeo@montague.lit/orchard'
|
to='romeo@montague.lit/orchard'
|
||||||
type='get'>
|
type='get'>
|
||||||
<query xmlns='http://jabber.org/protocol/disco#info'
|
<query xmlns='http://jabber.org/protocol/disco#info'
|
||||||
node='http://code.google.com/p/exodus#SrFo9ar2CCk2EnOH4q4QANeuxLQ='/>
|
node='http://code.google.com/p/exodus#QgayPKawpkPSDYmwT/WM94uAlu0='/>
|
||||||
</iq>
|
</iq>
|
||||||
]]></example>
|
]]></example>
|
||||||
|
|
||||||
<p>The disco#info request is sent by the requesting entity to the generating entity. The value of the 'to' attribute MUST be the exact JID of the generating entity, which in the case of a client will be the full JID &LOCALFULL;.</p>
|
<p>The disco#info request is sent by the requesting entity to the generating entity. The value of the 'to' attribute MUST be the exact JID of the generating entity, which in the case of a client will be the full JID &LOCALFULL;.</p>
|
||||||
|
|
||||||
<p>The disco 'node' attribute MUST be included for backwards-compatibility. The value of the 'node' attribute SHOULD be generated by concatenating the value of the caps 'node' attribute (e.g., "http://code.google.com/p/exodus") as provided by the generating entity, the "#" character, and the value of the caps 'ver' attribute (e.g., "SrFo9ar2CCk2EnOH4q4QANeuxLQ=") as provided by the generating entity.</p>
|
<p>The disco 'node' attribute MUST be included for backwards-compatibility. The value of the 'node' attribute SHOULD be generated by concatenating the value of the caps 'node' attribute (e.g., "http://code.google.com/p/exodus") as provided by the generating entity, the "#" character, and the value of the caps 'ver' attribute (e.g., "QgayPKawpkPSDYmwT/WM94uAlu0=") as provided by the generating entity.</p>
|
||||||
|
|
||||||
<p>The generating entity then returns all of the capabilities it supports.</p>
|
<p>The generating entity then returns all of the capabilities it supports.</p>
|
||||||
|
|
||||||
@ -435,7 +434,7 @@
|
|||||||
to='juliet@capulet.lit/balcony'
|
to='juliet@capulet.lit/balcony'
|
||||||
type='result'>
|
type='result'>
|
||||||
<query xmlns='http://jabber.org/protocol/disco#info'/>
|
<query xmlns='http://jabber.org/protocol/disco#info'/>
|
||||||
node='http://code.google.com/p/exodus#SrFo9ar2CCk2EnOH4q4QANeuxLQ='>
|
node='http://code.google.com/p/exodus#QgayPKawpkPSDYmwT/WM94uAlu0='>
|
||||||
<identity category='client' type='pc'/>
|
<identity category='client' type='pc'/>
|
||||||
<feature var='http://jabber.org/protocol/disco#info'/>
|
<feature var='http://jabber.org/protocol/disco#info'/>
|
||||||
<feature var='http://jabber.org/protocol/disco#items'/>
|
<feature var='http://jabber.org/protocol/disco#items'/>
|
||||||
|
Loading…
Reference in New Issue
Block a user