This document defines a content description format for Jingle file transfers.
WARNING: This document has not yet been accepted for consideration or approved in any official manner by the XMPP Standards Foundation, and this document must not be referred to as an XMPP Extension Protocol (XEP). If this document is accepted as a XEP by the XMPP Council, it will be published at <http://www.xmpp.org/extensions/> and announced on the <firstname.lastname@example.org> mailing list.
Publisher: XMPP Standards Foundation
Type: Standards Track
Last Updated: 2007-02-06
Approving Body: XMPP Council
Dependencies: XMPP Core, XEP-0166
Superseded By: None
Short Name: TO BE ASSIGNED
This XMPP Extension Protocol is copyright 1999 - 2007 by the XMPP Standards Foundation (XSF) and is in full conformance with the XSF's Intellectual Property Rights Policy <http://www.xmpp.org/extensions/ipr-policy.shtml>. This material may be distributed only subject to the terms and conditions set forth in the Creative Commons Attribution License (<http://creativecommons.org/licenses/by/2.5/>).
The preferred venue for discussion of this document is the Standards discussion list: <http://mail.jabber.org/mailman/listinfo/standards>.
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 3920) and XMPP IM (RFC 3921) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.
The following keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".
Jingle  can be used to initiate and negotiate a wide range of peer-to-peer sessions. One session type of interest is file transfer. This document specifies a format for describing Jingle file transfer sessions.
A Jingle file transfer session is described by one or more <file/> elements contained within a wrapper <description/> element, which is intended to be a child of a <jingle/> element as specified in XEP-0166. (See Protocol Namespaces regarding issuance of a permanent namespace.)
The syntax and semantics of the <file/> element match those of the <file/> element as defined in File Transfer , with the exception of the optional 'title' attribute (which may be added to XEP-0096 in the future).
The allowable attributes of the <file/> element are as follows:
|date||The last modification time of the file (MUST match the DateTime profile from XMPP Date and Time Profiles ).||OPTIONAL|
|hash||The MD5 checksum of the file contents.||RECOMMENDED|
|name||The file name (e.g., system name, not title).||REQUIRED|
|size||The size of the file in bytes.||REQUIRED|
|title||The user-friendly title of the file (different from system name).||RECOMMENDED|
The <file/> element MAY contain either or both of the following child elements:
|<desc/>||Sender-generated description of the file contents.|
|<range/>||When empty in offer, signifies that the sender can do ranged transfers. When possessing attributes during a negotiation, the 'offset' attribute specifies the position in bytes from which to start transferring the file data (defaults to zero) and the 'length' attribute specifies the number of bytes to retrieve starting at offset (defaults to the length of the file from offset to end).|
<file xmlns='http://jabber.org/protocol/si/profile/file-transfer' date='1969-07-21T02:56:15Z'> hash='552da749930852c69ae5d2141d3766b1' name='test.txt' title='This Is A Test' size='1022' <desc>This is a test. If this were a real file...</desc> </file>
If an entity supports the Jingle file transfer content description format, it MUST advertise that fact by returning a feature of "http://www.xmpp.org/extensions/xep-xxxx.html#ns" (see Protocol Namespaces) in response to Service Discovery  information requests.
<iq email@example.com/orchard' id='disco1' firstname.lastname@example.org/balcony' type='get'> <query xmlns='http://jabber.org/protocol/disco#info'/> </iq>
<iq email@example.com/balcony' id='disco1' firstname.lastname@example.org/orchard' type='result'> <query xmlns='http://jabber.org/protocol/disco#info'> ... <feature var='http://www.xmpp.org/extensions/xep-0166.html#ns'/> <feature var='http://www.xmpp.org/extensions/xep-xxxx.html#ns'/> ... </query> </iq>
No informational messages are defined for file transfer.
Transferred files can contain malicious or unwanted data, including viruses, worms, and other malware. Clients MUST seek explicit authorization for each file transfer instance from a human user, if any. Clients SHOULD check a file for malware (or deliver the file to a helper application that performs such checking) before informing the user that the file transfer is complete.
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) .
Until this specification advances to a status of Draft, its associated namespace shall be "http://www.xmpp.org/extensions/xep-xxxx.html#ns"; upon advancement of this specification, the XMPP Registrar  shall issue a permanent namespace in accordance with the process defined in Section 4 of XMPP Registrar Function .
The XMPP Registrar shall include "file" in its registry of Jingle content description formats. The registry submission is as follows:
<content> <name>file</name> <desc>Jingle sessions that support file transfers</desc> <doc>XEP-xxxx</doc> </content>
<?xml version='1.0' encoding='UTF-8'?> <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' targetNamespace='http://www.xmpp.org/extensions/xep-xxxx.html#ns' xmlns='http://www.xmpp.org/extensions/xep-xxxx.html#ns' elementFormDefault='qualified'> <xs:element name='description'> <xs:complexType> <xs:sequence minOccurs='0' maxOccurs='unbounded'/> <xs:element ref='file'/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name='file'> <xs:complexType> <xs:sequence minOccurs='0'> <xs:element name='desc' type='xs:string'/> <xs:element ref='range'/> </xs:sequence> <xs:attribute name='date' type='xs:dateTime' use='optional'/> <xs:attribute name='hash' type='xs:string' use='optional'/> <xs:attribute name='name' type='xs:string' use='required'/> <xs:attribute name='size' type='xs:integer' use='required'/> <xs:attribute name='title' type='xs:string' use='optional'/> </xs:complexType> </xs:element> <xs:element name='range'> <xs:complexType> <xs:simpleContent> <xs:extension base='empty'> <xs:attribute name='length' type='xs:integer' use='optional'/> <xs:attribute name='offset' type='xs:integer' use='optional'/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> <xs:simpleType name='empty'> <xs:restriction base='xs:string'> <xs:enumeration value=''/> </xs:restriction> </xs:simpleType> </xs:schema>
5. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.
6. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <http://www.xmpp.org/registrar/>.