XEP-xxxx: Jingle File Transfer Description Format

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 <standards@xmpp.org> mailing list.

Document Information

Series: XEP
Number: xxxx
Publisher: XMPP Standards Foundation
Status: ProtoXEP
Type: Standards Track
Version: 0.0.1
Last Updated: 2007-02-06
Approving Body: XMPP Council
Dependencies: XMPP Core, XEP-0166
Supersedes: None
Superseded By: None

Author Information

Peter Saint-Andre

Email: stpeter@jabber.org
JID: stpeter@jabber.org

Legal Notice

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/>).

Discussion Venue

The preferred venue for discussion of this document is the Standards discussion list: <http://mail.jabber.org/mailman/listinfo/standards>.

Relation to XMPP

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.

Conformance Terms

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".

Table of Contents

1. Introduction
2. Content Description Format
3. Service Discovery
4. Informational Messages
5. Security Considerations
6. IANA Considerations
7. XMPP Registrar Considerations
7.1. Protocol Namespaces
7.2. Jingle Content Description Formats
8. XML Schemas
Revision History

1. Introduction

Jingle [1] 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.

2. Content Description Format

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 [2], 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:

Table 1: Defined Attributes

Attribute Description Inclusion
date The last modification time of the file (MUST match the DateTime profile from XMPP Date and Time Profiles [3]). 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:

Table 2: Allowable Child Elements

Element Description
<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).

Example 1. File Transfer Content Description Format

    <file xmlns='http://jabber.org/protocol/si/profile/file-transfer'
          title='This Is A Test'
      <desc>This is a test. If this were a real file...</desc>

3. Service Discovery

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 [4] information requests.

Example 2. Service Discovery Information Request

<iq from='romeo@montague.net/orchard'
  <query xmlns='http://jabber.org/protocol/disco#info'/>

Example 3. Service Discovery Information Response

<iq from='juliet@capulet.com/balcony'
  <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'/>

4. Informational Messages

No informational messages are defined for file transfer.

5. Security Considerations

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.

6. IANA Considerations

This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [5].

7. XMPP Registrar Considerations

7.1 Protocol Namespaces

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 [6] shall issue a permanent namespace in accordance with the process defined in Section 4 of XMPP Registrar Function [7].

7.2 Jingle Content Description Formats

The XMPP Registrar shall include "file" in its registry of Jingle content description formats. The registry submission is as follows:

  <desc>Jingle sessions that support file transfers</desc>

8. XML Schemas

<?xml version='1.0' encoding='UTF-8'?>


  <xs:element name='description'>
      <xs:sequence minOccurs='0' maxOccurs='unbounded'/>
        <xs:element ref='file'/>

  <xs:element name='file'>
      <xs:sequence minOccurs='0'>
        <xs:element name='desc' type='xs:string'/>
        <xs:element ref='range'/>
      <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:element name='range'>
        <xs:extension base='empty'>
          <xs:attribute name='length' type='xs:integer' use='optional'/>
          <xs:attribute name='offset' type='xs:integer' use='optional'/>

  <xs:simpleType name='empty'>
    <xs:restriction base='xs:string'>
      <xs:enumeration value=''/>



1. XEP-0166: Jingle <http://www.xmpp.org/extensions/xep-0166.html>.

2. XEP-0096: File Transfer <http://www.xmpp.org/extensions/xep-0096.html>.

3. XEP-0082: XMPP Date and Time Profiles <http://www.xmpp.org/extensions/xep-0082.html>.

4. XEP-0030: Service Discovery <http://www.xmpp.org/extensions/xep-0030.html>.

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/>.

7. XEP-0053: XMPP Registrar Function <http://www.xmpp.org/extensions/xep-0053.html>.

Revision History

Version 0.0.1 (2007-02-06)

First draft.