1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-21 08:45:04 -05:00

0.11 published

git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@3949 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Peter Saint-Andre 2010-02-19 21:41:12 +00:00
parent 8268ba6595
commit d98c56e93c

View File

@ -24,6 +24,12 @@
<supersededby/>
<shortname>NOT_YET_ASSIGNED</shortname>
&stpeter;
<revision>
<version>0.11</version>
<date>2010-02-19</date>
<initials>psa</initials>
<remark><p>Added session-info message and namespace for communicating the file hash.</p></remark>
</revision>
<revision>
<version>0.10</version>
<date>2010-02-11</date>
@ -207,6 +213,7 @@ Initiator Responder
</jingle>
</iq>
]]></example>
<p class='box'>Note: Computing the hash of the file before sending it can slow down the process of file transfer, since the sending application needs to process the file twice. The sender might prefer to send the hash after the file transfer has begun, using a transport-info message as described under <link url='#hash'>Communicating the Hash</link>.</p>
<p>The responder immediately acknowledges receipt of the Jingle session-initiate.</p>
<example caption="Responder acknowledges session-initiate"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
@ -251,7 +258,7 @@ Initiator Responder
to='juliet@capulet.lit/balcony'
type='result'/>
]]></example>
<p>Now the parties exchange the file using SOCKS5 Bytestreams.</p>
<p>Now the parties exchange the file using the negotiated transport (here, SOCKS5 Bytestreams).</p>
<p>Once the transfer is completed, either party can terminate the Jingle session; preferably this is done by the entity that receives the file to ensure that the complete file (up to the advertised size) has been received.</p>
<example caption="Receiver sends session-terminate"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
@ -270,6 +277,23 @@ Initiator Responder
<p>For a description of the transport fallback scenario (from SOCK5 Bytestreams to In-Band Bytestreams), refer to <cite>XEP-0260</cite>.</p>
</section1>
<section1 topic='Communicating the Hash' anchor='hash'>
<p>At any time, the hosting entity can communicate the hash of the file to the receiving entity. This is done by sending a session-info message containing a &lt;hash/&gt; element qualified by the 'urn:xmpp:jingle:apps:file-transfer:info:1' namespace.</p>
<example caption="Receiver sends session-terminate"><![CDATA[
<iq from='romeo@montague.lit/orchard'
id='kqh401b5'
to='juliet@capulet.lit/balcony'
type='set'>
<jingle xmlns='urn:xmpp:jingle:1'
action='session-info'
initiator='romeo@montague.lit/orchard'
sid='a73sjjvkla37jfea'>
<hash xmlns='urn:xmpp:jingle:apps:file-transfer:info:1'>552da749930852c69ae5d2141d3766b1</hash>
</jingle>
</iq>
]]></example>
</section1>
<section1 topic='Requesting a File' anchor='request'>
<p>If the entity that hosts a file has advertised its existence (or if a previous file transfer attempt has failed and the receiver would like to initiate another attempt), the entity that wishes to receive the file can "pull" the file from the hosting entity. This is done by sending a Jingle session-initiate to the hosting entity, including a &DESCRIPTION; element qualified by the 'urn:xmpp:jingle:apps:file-transfer:1' namespace and containing a &lt;request/&gt; element that defines the requested file.</p>
<example caption="Receiver requests hosted file"><![CDATA[
@ -349,7 +373,8 @@ Initiator Responder
</section1>
<section1 topic='XML Schema' anchor='schema'>
<code><![CDATA[
<section2 topic='File Transfer' anchor='schema-ft'>
<code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
@ -378,7 +403,27 @@ Initiator Responder
</xs:complexType>
</xs:schema>
]]></code>
]]></code>
</section2>
<section2 topic='File Transfer Info' anchor='schema-info'>
<code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='urn:xmpp:jingle:apps:file-transfer:info:1'
xmlns='urn:xmpp:jingle:apps:file-transfer:info:1'
elementFormDefault='qualified'>
<xs:element name='hash' type='xs:string'/>
</xs:schema>
]]></code>
</section2>
</section1>
<section1 topic='Acknowledgements' anchor='ack'>
<p>Thanks to Marcus Lundblad and Jiří Zárevúcky for their feedback.</p>
</section1>
</xep>