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-0214.xml 28KB

  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>File Repository and Sharing</title>
  10. <abstract>While a protocol has been described for initiating a file transfer from one user to another, there is not yet a defined way for users to designate a set of files as available for retrieval by other users of their choosing. This extension defines a common syntax for this purpose which is based on PubSub Collections.</abstract>
  12. <number>0214</number>
  13. <status>Deferred</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <approver>Council</approver>
  17. <dependencies>
  18. <spec>XMPP Core</spec>
  19. <spec>XEP-0001</spec>
  20. <spec>XEP-0060</spec>
  21. <spec>XEP-0082</spec>
  22. <spec>XEP-0137</spec>
  23. <spec>XEP-0248</spec>
  24. </dependencies>
  25. <supersedes/>
  26. <supersededby/>
  27. <shortname>NOT_YET_ASSIGNED</shortname>
  28. <author>
  29. <firstname>Nicholas</firstname>
  30. <surname>Parker</surname>
  31. <email></email>
  32. <jid></jid>
  33. </author>
  34. <revision>
  35. <version>0.2</version>
  36. <date>2009-01-05</date>
  37. <initials>nbp</initials>
  38. <remark><p>Non-functional rewording and refactoring. Now reflects the move of PubSub Collections into a separate extension.</p></remark>
  39. </revision>
  40. <revision>
  41. <version>0.1</version>
  42. <date>2007-04-20</date>
  43. <initials>psa</initials>
  44. <remark><p>Initial published version.</p></remark>
  45. </revision>
  46. <revision>
  47. <version>0.0.3</version>
  48. <date>2007-03-18</date>
  49. <initials>nbp</initials>
  50. <remark><p>Added support for Stream Initiation Requests. Clarified purpose of additional mirror types.</p></remark>
  51. </revision>
  52. <revision>
  53. <version>0.0.2</version>
  54. <date>2007-01-26</date>
  55. <initials>nbp</initials>
  56. <remark><p>Rewritten to use Pubsub.</p></remark>
  57. </revision>
  58. <revision>
  59. <version>0.0.1</version>
  60. <date>2006-09-01</date>
  61. <initials>nbp</initials>
  62. <remark><p>First draft.</p></remark>
  63. </revision>
  64. </header>
  65. <section1 topic='Introduction' anchor='intro'>
  66. <p>This document defines a common format which allows a Jabber user to submit, find, and retrieve files within XMPP. The file listing itself is stored on a &xep0060; server, allowing multiple users to manage the same listing. Other features specified by this extension include file metadata, revisions, and download mirrors.</p>
  67. <p>Retrieval of files provided in a listing MAY be performed through any relevant protocol for transferring data (http, ftp, etc). This protocol standardizes the use of &xep0137; to establish the file transfer, but also allows for usage of outside protocols such as http or ftp.</p>
  68. </section1>
  69. <section1 topic='Requirements' anchor='reqs'>
  70. <p>The protocol defined herein provides the following functionality:</p>
  71. <ol>
  72. <li>Publication of a list of available files to a PubSub server, with support for hierarchical listings, file metadata, user privileges, and file versioning.</li>
  73. <li>Request that a file be sent from a Jabber contact directly to oneself using Stream Initiation.</li>
  74. </ol>
  75. </section1>
  76. <section1 topic='Glossary' anchor='glossary'>
  77. <table caption="File Sharing Terms">
  78. <tr>
  79. <th>File Listing</th>
  80. <td>A Root-level Pubsub Collection Node, containing information about files and/or subsections which a user or group of users have published.</td>
  81. </tr>
  82. <tr>
  83. <th>Subsection</th>
  84. <td>A Non-Root Collection Node which contains files and/or other subsections.</td>
  85. </tr>
  86. <tr>
  87. <th>File</th>
  88. <td>A Pubsub Node, stored within a File Listing, which describes all revisions of a given file. The filename and (optional) description are provided here.</td>
  89. </tr>
  90. <tr>
  91. <th>Revision</th>
  92. <td>A Pubsub Item which describes a given file revision. Other metadata which can vary between revisions, such as filesize, checksum, or available mirrors, is provided here.</td>
  93. </tr>
  94. <tr>
  95. <th>Mirror</th>
  96. <td>A location which has a given Revision available for download. Additional information about a Mirror MAY be specified in instances where the protocol requires it. A list of example file transfer protocols is provided below, but others may also be deployed.</td>
  97. </tr>
  98. </table>
  99. </section1>
  100. <section1 topic='Use Cases' anchor='usecases'>
  101. <p>The following use cases describe tasks which are already covered by &xep0060; in a more generic context. These tasks are again being provided here in order to demonstrate the functionality provided by this protocol and convey the structure and syntax of the file listing. As a result of this close relationship, many details of PubSub are omitted here for brevity. Consult &xep0060; and &xep0248; for the full specification of node and user management commands as well as their server responses.</p>
  102. <section2 topic='File Listing' anchor='list'>
  103. <section3 topic='Publication' anchor='list-publication'>
  104. <p>Juliet wishes to make her sonnets available for retrieval by the public. She creates a Root Pubsub Collection Node which will contain her file listing:</p>
  105. <example caption='Creating a New File Listing'><![CDATA[<iq type='set'
  106. from=''
  107. to='pubsub.shakespeare.lit'
  108. id='create3'>
  109. <pubsub xmlns=''>
  110. <create node='juliets_sonnets'/>
  111. <configure>
  112. <x xmlns='jabber:x:data' type='submit'>
  113. <field var='FORM_TYPE' type='hidden'>
  114. <value></value>
  115. </field>
  116. <field var='pubsub#node_type'><value>collection</value></field>
  117. </x>
  118. </configure>
  119. </pubsub>
  120. </iq>
  121. <iq type='set'
  122. from=''
  123. to='pubsub.shakespeare.lit'
  124. id='config2'>
  125. <pubsub xmlns=''>
  126. <configure node='juliets_sonnets'/>
  127. <x xmlns='jabber:x:data' type='submit'>
  128. <field var='FORM_TYPE' type='hidden'>
  129. <value></value>
  130. </field>
  131. <field var='pubsub#title'><value>Juliet's Sonnets</value></field>
  132. <field var='pubsub#description'><value>Optional Description</value></field>
  133. </x>
  134. </configure>
  135. </pubsub>
  136. </iq>
  137. ]]></example>
  138. <p>Juliet also wishes to add a subsection for her sonnets about Romeo. She creates another PubSub Collection Node under the Root Node:</p>
  139. <example caption='Adding a Subsection to the Listing'><![CDATA[<iq type='set'
  140. from=''
  141. to='pubsub.shakespeare.lit'
  142. id='create3'>
  143. <pubsub xmlns=''>
  144. <create node='35227eec194a4f3971a5f3771e9c2271'/>
  145. <configure>
  146. <x xmlns='jabber:x:data' type='submit'>
  147. <field var='FORM_TYPE' type='hidden'>
  148. <value></value>
  149. </field>
  150. <field var='pubsub#collection'><value>juliets_sonnets</value></field>
  151. <field var='pubsub#node_type'><value>collection</value></field>
  152. </x>
  153. </configure>
  154. </pubsub>
  155. </iq>
  156. <iq type='set'
  157. from=''
  158. to='pubsub.shakespeare.lit'
  159. id='config2'>
  160. <pubsub xmlns=''>
  161. <configure node='35227eec194a4f3971a5f3771e9c2271'/>
  162. <x xmlns='jabber:x:data' type='submit'>
  163. <field var='FORM_TYPE' type='hidden'>
  164. <value></value>
  165. </field>
  166. <field var='pubsub#title'><value>Sonnets About Romeo</value></field>
  167. <field var='pubsub#description'><value>Optional Description</value></field>
  168. </x>
  169. </configure>
  170. </pubsub>
  171. </iq>
  172. ]]></example>
  173. </section3>
  174. <section3 topic='Subscription' anchor='list-subscription'>
  175. <p>Romeo wishes to view all of Juliet's shared sonnets. To do this, Romeo subscribes to the Root Collection Node:</p>
  176. <example caption='Subscription to entire File Listing'><![CDATA[<iq type='set'
  177. from=''
  178. to='pubsub.shakespeare.lit'
  179. id='collsub2'>
  180. <pubsub xmlns=''>
  181. <subscribe jid='' node='juliets_sonnets'/>
  182. <options>
  183. <x xmlns='jabber:x:data'>
  184. <field var='FORM_TYPE' type='hidden'>
  185. <value></value>
  186. </field>
  187. <field var='pubsub#subscription_type'><value>items</value></field>
  188. <field var='pubsub#subscription_depth'><value>all</value></field>
  189. </x>
  190. </options>
  191. </pubsub>
  192. </iq>
  193. ]]></example>
  194. </section3>
  195. <section3 topic='Addition' anchor='list-addition'>
  196. <p>Juliet has just finished a new sonnet and wishes to announce its availability on her File Listing. She adds the sonnet as a new PubSub Node stored in her Collection Node, then inserts a first revision of her sonnet as an Item within that Node:</p>
  197. <example caption='Adding a new File'><![CDATA[<iq type='set'
  198. from=''
  199. to='pubsub.shakespeare.lit'
  200. id='create4'>
  201. <pubsub xmlns=''>
  202. <create node='a6190c5d38e22452041d1c5798eff3f5'/>
  203. <configure>
  204. <x xmlns='jabber:x:data' type='submit'>
  205. <field var='pubsub#collection'><value>juliets_sonnets</value></field>
  206. </x>
  207. </configure>
  208. </pubsub>
  209. </iq>
  210. <iq type='set'
  211. from=''
  212. to='pubsub.shakespeare.lit'
  213. id='config2'>
  214. <pubsub xmlns=''>
  215. <configure node='a6190c5d38e22452041d1c5798eff3f5'>
  216. <x xmlns='jabber:x:data' type='submit'>
  217. <field var='FORM_TYPE' type='hidden'>
  218. <value></value>
  219. </field>
  220. <field var='pubsub#title'><value>sonnet.txt</value></field>
  221. <field var='pubsub#description'><value>Sonnet 42</value></field>
  222. </x>
  223. </configure>
  224. </pubsub>
  225. </iq>
  226. <iq type='set'
  227. from=''
  228. to='pubsub.shakespeare.lit'
  229. id='publish1'>
  230. <pubsub xmlns=''>
  231. <publish node='a6190c5d38e22452041d1c5798eff3f5'>
  232. <item id='1'>
  233. <entry xmlns=''>
  234. <size>5623</size>
  235. <modified>2006-12-13T18:30:02Z</modified>
  236. <checksum type="sha1">59282c5db190bdc3b152c5b38363442bfda8ebdd</checksum>
  237. <mime>text/plain</mime>
  238. <description>My Latest Sonnet!</description>
  239. <mirrors>
  240. <mirror type='sipub' description='File Transfer via fileserver'>
  241. <sipub xmlns=''
  242. from=''
  243. id='publish-sonnet.txt'
  244. mime-type='text/plain'
  245. profile=''>
  246. <file xmlns=''
  247. name='sonnet.txt'
  248. size='5623'/>
  249. </sipub>
  250. </mirror>
  251. <mirror type='sipub' description='Jingle HTTP File Transfer via fileserver'>
  252. <sipub xmlns=''
  253. from=''
  254. id='publish-sonnet.txt'
  255. mime-type='text/plain'
  256. profile=''>
  257. <description xmlns=''>
  258. <manifest>
  259. <file>
  260. <name>sonnet.txt</name>
  261. </file>
  262. </manifest>
  263. <http>
  264. <url name='source-path'>/source/23A53F01/</url>
  265. <url name='preview-path'>/preview/90266EA1/</url>
  266. </http>
  267. </description>
  268. </sipub>
  269. </mirror>
  270. <mirror type='http' description='Shakespeare.lit Torrent'
  271. address='www.shakespeare.lit'
  272. ref='torrents/sonnet.torrent'/>
  273. <mirror type='http' description='Shakespeare.lit Website'
  274. address='www.shakespeare.lit'
  275. ref='~juliet/sonnet.txt'/>
  276. <mirror type='https' description='Shakespeare.lit Website (SSL)'
  277. address='ssl.shakespeare.lit'
  278. ref='~juliet/sonnet.txt'/>
  279. <mirror type='ftp' description='Shakespeare.lit FTP'
  280. user='guest' pass='guest'
  281. address='files.shakespeare.lit' port='21'
  282. ref='public/sonnet.txt'/>
  283. <mirror type='sftp' description='Shakespeare.lit SFTP'
  284. user='guest' pass='guest'
  285. address='ssh.shakespeare.lit' port='22'
  286. ref='public/sonnet.txt'/>
  287. <mirror type='smb' description='Capulet Intranet SMB Share'
  288. user='guest' pass='guest'
  289. address=''
  290. ref='juliet/mysonnets/sonnet.txt'/>
  291. </mirrors>
  292. </entry>
  293. </item>
  294. </publish>
  295. </pubsub>
  296. </iq>
  297. ]]></example>
  298. <p>The Item ID is set to 1, signifying the first revision for this file. Subsequent revisions/items will have incremented ID values, like one would see in a versioning system such as CVS or SVN. Implementations MAY follow this convention, but are not required to do so. For example, a given implementation may instead mark revisions using version numbers ("Beta 1", "6.2", etc) or use other arbitrary strings. However, no two revisions of a given file may share the same ID.</p>
  299. <p>Node IDs MAY take the form of "path/to/file.ext", rather than the randomized string "a6190c5d38e22452041d1c5798eff3f5" provided in the above use case. For example, Juliet's sonnet MAY instead use a Node ID of "juliets_sonnets/sonnet.txt", as long as this ID is unique within the PubSub server. Randomized strings are used in this document to illustrate that Node IDs SHOULD NOT be used for providing information about files.</p>
  300. <p>Here is a listing of the possible metadata in a file revision (Item), each field is OPTIONAL:</p>
  301. <table caption="Revision Metadata">
  302. <tr><th>Size</th><td>The size, in bytes, of the file.</td></tr>
  303. <tr><th>Modified</th><td>The last modified time of the revision. Follows the format described in &xep0082;. If a publisher prefers to only make a single revision available to clients, the publisher MAY instead update this value (and others, such as size and/or checksum) to announce that a new version of the file is available.</td></tr>
  304. <tr><th>Checksum</th><td>A checksum of the revision, using the specified hash algorithm. Acceptable types are "sha512", "sha1", "md5", and "crc32".</td></tr>
  305. <tr><th>Mime</th><td>The file's MIME type.</td></tr>
  306. <tr><th>Description</th><td>Description text for the revision. As an example, could contain release notes.</td></tr>
  307. <tr><th>Mirrors</th><td>A list of mirrors; their properties are defined below. If no downloads are available, MAY be left empty or removed entirely.</td></tr>
  308. </table>
  309. <p>Because Romeo is now subscribed, he receives notice of Juliet's addition:</p>
  310. <example caption='Notification of Addition'><![CDATA[<message from='pubsub.shakespeare.lit' to='' id='create4'>
  311. <event xmlns=''>
  312. <collection>
  313. <node id='a6190c5d38e22452041d1c5798eff3f5'>
  314. <x xmlns='jabber:x:data' type='result'>
  315. <field var='FORM_TYPE' type='hidden'>
  316. <value></value>
  317. </field>
  318. <field var='pubsub#collection'><value>juliets_sonnets</value></field>
  319. </x>
  320. </node>
  321. </collection>
  322. </event>
  323. </message>
  324. <message from='pubsub.shakespeare.lit' to='' id='config2'>
  325. <event xmlns=''>
  326. <configuration node='a6190c5d38e22452041d1c5798eff3f5'>
  327. <x xmlns='jabber:x:data' type='result'>
  328. <field var='FORM_TYPE' type='hidden'>
  329. <value></value>
  330. </field>
  331. <field var='pubsub#description'><var>Sonnet 42</var></field>
  332. <field var='pubsub#title'><var>sonnet.txt</var></field>
  333. </x>
  334. </configuration>
  335. </event>
  336. </message>
  337. <message from='pubsub.shakespeare.lit' to='' id='foo'>
  338. <event xmlns=''>
  339. <items node='a6190c5d38e22452041d1c5798eff3f5'>
  340. <item id='1'>
  341. <entry xmlns=''>
  342. <size>5623</size>
  343. <modified>2006-12-13T18:30:02Z</modified>
  344. <checksum type="sha1">59282c5db190bdc3b152c5b38363442bfda8ebdd</checksum>
  345. <mime>text/plain</mime>
  346. <description>My Latest Sonnet!</description>
  347. <mirrors>
  348. ... MIRRORS ...
  349. </mirrors>
  350. </entry>
  351. </item>
  352. </items>
  353. </event>
  354. </message>
  355. ]]></example>
  356. <p>The above examples give a listing of several possible file transfer protocols in example configurations. Only the sipub mirror type is REQUIRED; the other types are OPTIONAL. Here is a full listing of those protocols and their available settings:</p>
  357. <table caption="Mirror Types And Their Settings">
  358. <tr><th>Protocol</th>
  359. <th>Description</th><th>Ref</th>
  360. <th>Address</th><th>Port (default)</th>
  361. <th>User</th><th>Pass</th></tr>
  362. <tr><th>sipub (REQUIRED)</th>
  363. <td>OPTIONAL</td><td>N/A</td>
  364. <td>N/A</td><td>N/A</td>
  365. <td>N/A</td><td>N/A</td></tr>
  366. <tr><th>http (OPTIONAL)</th>
  367. <td>OPTIONAL</td><td>REQUIRED</td>
  368. <td>REQUIRED</td><td>OPTIONAL (80)</td>
  369. <td>OPTIONAL</td><td>OPTIONAL</td></tr>
  370. <tr><th>https (OPTIONAL)</th>
  371. <td>OPTIONAL</td><td>REQUIRED</td>
  372. <td>REQUIRED</td><td>OPTIONAL (443)</td>
  373. <td>OPTIONAL</td><td>OPTIONAL</td></tr>
  374. <tr><th>ftp (OPTIONAL)</th>
  375. <td>OPTIONAL</td><td>REQUIRED</td>
  376. <td>REQUIRED</td><td>OPTIONAL (21)</td>
  377. <td>OPTIONAL</td><td>OPTIONAL</td></tr>
  378. <tr><th>sftp (OPTIONAL)</th>
  379. <td>OPTIONAL</td><td>REQUIRED</td>
  380. <td>REQUIRED</td><td>OPTIONAL (22)</td>
  381. <td>OPTIONAL</td><td>OPTIONAL</td></tr>
  382. <tr><th>smb (OPTIONAL)</th>
  383. <td>OPTIONAL</td><td>REQUIRED</td>
  384. <td>REQUIRED</td><td>OPTIONAL (445)</td>
  385. <td>OPTIONAL</td><td>OPTIONAL</td></tr>
  386. </table>
  387. <p>The Description field is where an arbitrary description of the mirror MAY be placed. For example, if a File Listing is advertising mirrors which are located in different geographic locations, then this field may be used to specify those locations.</p>
  388. <p>The Ref field is a unique address or identifier for retrieving the file from the mirror server. In the above examples, it is used as a path to the file.</p>
  389. <p>The address and port fields describe the server where the file may be retrieved using the specified protocol. If a port is not provided, the default value (specified in parentheses) MAY be assumed.</p>
  390. <p>The User and Pass fields are for providing credentials which, if given by the File Listing, SHOULD be used when requesting the file. For example, an sftp mirror MAY require that the user log in using specified credentials before the file may be retrieved.</p>
  391. </section3>
  392. <section3 topic='New Revisions' anchor='list-newrevisions'>
  393. <p>Juliet has revised her sonnet and wishes to publish the new version, while still leaving the original copy available for retrieval. To do this, she inserts a new Item, representing her new revision, into the file's Node:</p>
  394. <example caption='Adding a new Revision'><![CDATA[<iq type='set'
  395. from=''
  396. to='pubsub.shakespeare.lit'
  397. id='publish1'>
  398. <pubsub xmlns=''>
  399. <publish node='a6190c5d38e22452041d1c5798eff3f5'>
  400. <item id='2'>
  401. <entry xmlns=''>
  402. <size>6102</size>
  403. <modified>2007-01-13T18:30:02Z</modified>
  404. <checksum type="md5">6aaa20212a99548765b3b15f24f19aaa</checksum>
  405. <checksum type="sha1">97cbc0e445435af94db5cc2133b94ab5faf1399a</checksum>
  406. <mime>text/plain</mime>
  407. <description>A revised copy, fixed some spelling errors.</description>
  408. <mirrors>
  409. <mirror type='ftp' description='Shakespeare.lit FTP'
  410. user='guest' pass='guest'
  411. address='files.shakespeare.lit' port='21'
  412. ref='public/juliet/sonnet2.txt'/>
  413. <mirror type='http' description='Shakespeare.lit Website'
  414. address='www.shakespeare.lit'
  415. ref='~juliet/sonnet2.txt'/>
  416. <mirror type='sipub' description='File Transfer via fileserver'>
  417. <sipub xmlns=''
  418. from=''
  419. id='publish-sonnet2.txt'
  420. mime-type='text/plain'
  421. profile=''>
  422. <file xmlns=''
  423. name='sonnet2.txt'
  424. size='6102'/>
  425. </sipub>
  426. </mirror>
  427. </mirrors>
  428. </entry>
  429. </item>
  430. </publish>
  431. </pubsub>
  432. </iq>
  433. ]]></example>
  434. </section3>
  435. <section3 topic='Modification/Deletion' anchor='list-deletion'>
  436. <p>Juliet has uploaded a copy of her revised sonnet to a new mirror, and wishes to let her subscribers know about this secondary source. She is able to do this by modifying the revision in question to include a reference to her website, overwriting the existing mirrors in the Item with an updated list:</p>
  437. <example caption='Modifying a Revision'><![CDATA[<iq type='set'
  438. from=''
  439. to='pubsub.shakespeare.lit'
  440. id='publish1'>
  441. <pubsub xmlns=''>
  442. <publish node='a6190c5d38e22452041d1c5798eff3f5'>
  443. <item id='2'>
  444. <entry xmlns=''>
  445. <mirrors>
  446. <mirror type='ftp' description='Shakespeare.lit FTP'
  447. user='guest' pass='guest'
  448. address='files.shakespeare.lit' port='21'
  449. ref='public/juliet/sonnet2.txt'/>
  450. <mirror type='http' description='Shakespeare.lit Website'
  451. address='www.shakespeare.lit'
  452. ref='~juliet/sonnet2.txt'/>
  453. <mirror type='sipub' description='File Transfer via fileserver'>
  454. <sipub xmlns=''
  455. from=''
  456. id='publish-sonnet2.txt'
  457. mime-type='text/plain'
  458. profile=''>
  459. <file xmlns=''
  460. name='sonnet2.txt'
  461. size='6102'/>
  462. </sipub>
  463. </mirror>
  464. <mirror type='http' description='Shakespeare.lit Boston Mirror'
  465. address=''
  466. ref='~juliet/sonnet2.txt'/>
  467. </mirrors>
  468. </entry>
  469. </item>
  470. </publish>
  471. </pubsub>
  472. </iq>
  473. ]]></example>
  474. <p>Juliet now wishes to allow others to contribute to her sonnet collection. She gives owner access for the entire Listing to Romeo, and publisher access to her nurse:</p>
  475. <example caption='Modifying Users'><![CDATA[<iq type='set'
  476. from=''
  477. to='pubsub.shakespeare.lit'
  478. id='ent3'>
  479. <pubsub xmlns=''>
  480. <affiliations node='juliets_sonnets'>
  481. <affiliation jid='' affiliation='publisher'/>
  482. <affiliation jid='' affiliation='owner'/>
  483. </affiliations>
  484. </pubsub>
  485. </iq>
  486. ]]></example>
  487. <p>Romeo uses his owner access to remove the older revision of Juliet's sonnet:</p>
  488. <example caption='Deleting a Revision'><![CDATA[<iq type='set'
  489. from=''
  490. to='pubsub.shakespeare.lit'
  491. id='retract1'>
  492. <pubsub xmlns=''>
  493. <retract node='a6190c5d38e22452041d1c5798eff3f5'>
  494. <item id='1'/>
  495. </retract>
  496. </pubsub>
  497. </iq>
  498. ]]></example>
  499. <p>Other deletion, modification, and user management operations are available as described in &xep0060; and &xep0248;.</p>
  500. </section3>
  501. </section2>
  502. <section2 topic='File Requests' anchor='file-requests'>
  503. <p>Romeo is interested in seeing what files Juliet has made available. To do this, Romeo sends a request to Juliet for repositories which she is associated with:</p>
  504. <example caption='Request for File Repository listing'><![CDATA[<iq type='get'
  505. from=''
  506. to=''
  507. id='repolistreq'>
  508. <fileshare xmlns=''>
  509. <list/>
  510. </fileshare>
  511. </iq>
  512. ]]></example>
  513. <p>Juliet responds with a list of PubSub nodes where she has published files or which she believes would be interesting to Romeo. If no such locations exist, Juliet SHOULD respond with an empty list.</p>
  514. <example caption='File Repository listing'><![CDATA[<iq type='get'
  515. from=''
  516. to=''
  517. id='repolist'>
  518. <fileshare xmlns=''>
  519. <list>
  520. <repo address='pubsub.shakespeare.lit'
  521. node='juliets_sonnets' description='My Sonnets'/>
  522. </list>
  523. </fileshare>
  524. </iq>
  525. ]]></example>
  526. <p>After browsing Juliet's repository, Romeo has chosen to download her sonnet. The most recent revision of this file contains a listing of available mirrors, and Romeo sees that one of them is an SI stream. Romeo sends an SI request to that mirror:</p>
  527. <example caption='Request that a file be sent'><![CDATA[<iq type='get'
  528. id='sipub-request-0'
  529. from=''
  530. to=''>
  531. <start xmlns=''
  532. id='publish-sonnet2.txt'/>
  533. </iq>
  534. ]]></example>
  535. <p>The rest of the negotiation and file transfer occurs as described in &xep0137;.</p>
  536. </section2>
  537. </section1>
  538. <section1 topic='Implementation Notes' anchor='impl'>
  539. <p>Since PubSub is used for the File Listing, the access models described in &xep0060; and &xep0248; MUST be followed. Users MUST NOT be able to view or control information in the File Listing to which they do not have access.</p>
  540. <p>If user access to files is restricted, the Mirror servers and the PubSub server MUST be able to synchronize these restrictions between them. See <link url='#security'>Security Considerations</link>.</p>
  541. </section1>
  542. <section1 topic='Security Considerations' anchor='security'>
  543. <p>When restricted files are being distributed, mirrors need to know which users have sufficient privileges to access which files. If mirrors are not kept up to date on user privileges, unauthorized users could access files directly from those mirrors, thus bypassing any restrictions being set on the PubSub server.</p>
  544. </section1>
  545. <section1 topic='IANA Considerations' anchor='iana'>
  546. <p>No interaction with the Internet Assigned Numbers Authority (IANA) is required as a result of this XEP.</p>
  547. </section1>
  548. <section1 topic='Jabber Registrar Considerations' anchor='registrar'>
  549. <p>TODO</p>
  550. </section1>
  551. <section1 topic='XML Schema' anchor='schema'>
  552. <p>TODO</p>
  553. </section1>
  554. </xep>