﻿<?xml version="1.0" encoding="UTF-8"?>

<!--

   XML data type definitions for the RESTful Network API for FileTransfer 
   Version: 1.0 (1.0)
   Date: 01 Dec 2015 
   
   FILE INFORMATION 
   
      OMA Permanent Document 
         File: OMA-SUP-XSD_rest_netapi_filetransfer-V1_0-20151201-C
         Type: Text - Schema Description
   
   Public Reachable Information 
      Path: http://www.openmobilealliance.org/tech/profiles 
      Name: rest_netapi_filetransfer-v1_0.xsd 
   
   NORMATIVE INFORMATION
   
   Information about this file can be found in the latest revision of the specification
 
       OMA-TS-REST_NetAPI_FileTransfer-V1_0 
       
       This is available at http://www.openmobilealliance.org/
   
      Send comments to technical-comments@mail.openmobilealliance.org
   
   CHANGE HISTORY 
   09062011 File created, considering OMA-ARC-REST-NetAPI-2011-0022-INP_XSD_Template_application 
   19092011 OMA-ARC-REST-NetAPI-2011-0260-CR_XSD_for_FileTransfer implemented
   15112011 OMA-ARC-REST-NetAPI-2011-0343R01-CR_FileTransfer_XSD_update
   29112011 OMA-ARC-REST-NetAPI-2011-0396R01-CR_FileTransfer_XSD_update
   20022012 OMA-ARC-REST-NetAPI-2012-0050-CR_Filetransfer_XSD_CONRR_comments_resolution
   27032012 OMA-ARC-REST-NetAPI-2012-0120-CR_FileTransfer_XSD_resolution 
   03042012 Changed "Schema Descriptionh" to "Schema Description". Editorial changes
   17042012 Status changed to Candidate by TP, TP Ref # OMA-TP-2012-0171-INP_REST_NetAPI_FileTransfer_1_0_ERP_and_ETR_for_Candidate_Approval
   12032013 Changed according to OMA-ARC-REST-NetAPI-2013-0008R01-CR_Addressing_RCSe_Problem_Report_XSD_FT
   08052013 Incorporated OMA-ARC-REST-NetAPI-2013-0034R01-CR_FT_XSD_updates_INP0028r01
   12062013 Status changed to Candidate by TP, TP Ref # OMA-TP-2013-0203-INP_REST_NetAPI_FileTransfer_V1_0_ERP_for_Notification
   18022014 Incorporated OMA-ARC-REST-NetAPI-2014-0027-CR_FT_XSD_resolving_IssueList_dateTimeStamp
   10092014 Incorporated CR OMA-ARC-REST-NetAPI-2014-0062-CR_FTAPI_InChatFT
   01122015 Status changed to Candidate by TP, TP Ref # OMA-TP-2015-0197-INP_REST_NetAPI_FileTransfer_V1_0_ERP_for_Candidate_re_approval

   LEGAL DISCLAIMER
   
   Use of this document is subject to all of the terms and conditions
   of the Use Agreement located at
   http://www.openmobilealliance.org/UseAgreement.html,
   provided, however, that section (d) under "Documents - Terms 
   of Use" which states, "no modifications are made to such 
   Documents" does not apply to your use.

   The Open Mobile Alliance authorizes you to copy this document, 
   provided that you retain all copyright and other proprietary  
   notices contained in the original materials on any copies of the 
   materials and  that you comply strictly with these terms. This 
   copyright permission does not constitute an endorsement of the 
   products or services. The Open Mobile Alliance assumes no 
   responsibility for errors or omissions in this document.


   Each Open Mobile Alliance member has agreed to use reasonable
   endeavors to inform the Open Mobile Alliance in a timely manner of
   Essential IPR as it becomes aware that the Essential IPR is related
   to the prepared or published specification.  However, the members
   do not have an obligation to conduct IPR searches.  The declared
   Essential IPR is publicly available to members and non-members of
   the Open Mobile Alliance and may be found on the "OMA IPR
   Declarations" list at http://www.openmobilealliance.org/ipr.html.
   The Open Mobile Alliance has not conducted an independent IPR review
   of this document and the information contained herein, and makes no
   representations or warranties regarding third party IPR, including
   without limitation patents, copyrights or trade secret rights.  This
   document may contain inventions for which you must obtain licenses
   from third parties before making, using or selling the inventions.
   Defined terms above are set forth in the schedule to the Open Mobile
   Alliance Application Form.

   NO REPRESENTATIONS OR WARRANTIES (WHETHER EXPRESS OR IMPLIED) ARE
   MADE BY THE OPEN MOBILE ALLIANCE OR ANY OPEN MOBILE ALLIANCE MEMBER
   OR ITS AFFILIATES REGARDING ANY OF THE IPR'S REPRESENTED ON THE "OMA
   IPR DECLARATIONS" LIST, INCLUDING, BUT NOT LIMITED TO THE ACCURACY,
   COMPLETENESS, VALIDITY OR RELEVANCE OF THE INFORMATION OR WHETHER OR
   NOT SUCH RIGHTS ARE ESSENTIAL OR NON-ESSENTIAL.

   THE OPEN MOBILE ALLIANCE IS NOT LIABLE FOR AND HEREBY DISCLAIMS ANY
   DIRECT, INDIRECT, PUNITIVE, SPECIAL, INCIDENTAL, CONSEQUENTIAL, OR
   EXEMPLARY DAMAGES ARISING OUT OF OR IN CONNECTION WITH THE USE OF
   DOCUMENTS AND THE INFORMATION CONTAINED IN THE DOCUMENTS.

   Copyright 2015 Open Mobile Alliance Ltd.  All Rights Reserved.
   Used with the permission of the Open Mobile Alliance Ltd. under the
   terms set forth above.

-->

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:common="urn:oma:xml:rest:netapi:common:1" xmlns="urn:oma:xml:rest:netapi:filetransfer:1" targetNamespace="urn:oma:xml:rest:netapi:filetransfer:1" version="1.0">
	<xsd:annotation>
		<xsd:documentation>This schema defines the XML data types for the RESTful Network API for FileTransfer.</xsd:documentation>
	</xsd:annotation>
	<xsd:import namespace="urn:oma:xml:rest:netapi:common:1" schemaLocation="http://www.openmobilealliance.org/tech/profiles/rest_netapi_common-v1_0.xsd"/>

	<!-- ==================================== -->
	<!-- Subscriptions -->
	<!-- ==================================== -->
	<xsd:element name="fileTransferSubscriptionList" type="FileTransferSubscriptionList"/>
	<xsd:complexType name="FileTransferSubscriptionList">
		<xsd:sequence>
			<xsd:element name="fileTransferNotificationSubscription" type="FileTransferNotificationSubscription" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="resourceURL" type="xsd:anyURI"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:element name="fileTransferNotificationSubscription" type="FileTransferNotificationSubscription"/>
	<xsd:complexType name="FileTransferNotificationSubscription">
		<xsd:sequence>
			<xsd:element name="callbackReference" type="common:CallbackReference"/>
			<xsd:element name="duration" type="xsd:int" minOccurs="0"/>
			<xsd:element name="clientCorrelator" type="xsd:string" minOccurs="0"/>
			<xsd:element name="resourceURL" type="xsd:anyURI" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<!-- ======================================== -->
	<!-- Notifications, their referenced types and responses -->
	<!-- ======================================== -->
	<xsd:element name="fileTransferEventNotification" type="FileTransferEventNotification"/>
	<xsd:complexType name="FileTransferEventNotification">
		<xsd:sequence>
			<xsd:element name="callbackData" type="xsd:string" minOccurs="0"/>
			<xsd:element name="link" type="common:Link" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="eventType" type="EventType"/>
			<xsd:element name="eventDescription" type="xsd:string" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:element name="fileTransferSessionInvitationNotification" type="FileTransferSessionInvitationNotification"/>
	<xsd:complexType name="FileTransferSessionInvitationNotification">
		<xsd:sequence>
			<xsd:element name="callbackData" type="xsd:string" minOccurs="0"/>
			<xsd:element name="link" type="common:Link" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="originatorAddress" type="xsd:anyURI"/>
			<xsd:element name="originatorName" type="xsd:string" minOccurs="0"/>
			<xsd:element name="receiverAddress" type="xsd:anyURI"/>
			<xsd:element name="receiverName" type="xsd:string" minOccurs="0"/>
			<xsd:element name="fileInformation" type="FileInformation"/>
			<xsd:element name="associatedGroupChat" type="xsd:anyURI" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:element name="fileTransferFileNotification" type="FileTransferFileNotification"/>
	<xsd:complexType name="FileTransferFileNotification">
		<xsd:sequence>
			<xsd:element name="callbackData" type="xsd:string" minOccurs="0"/>
			<xsd:element name="link" type="common:Link" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="fileInformation" type="FileInformation"/>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:element name="fileTransferAcceptanceNotification" type="FileTransferAcceptanceNotification"/>
	<xsd:complexType name="FileTransferAcceptanceNotification">
		<xsd:sequence>
			<xsd:element name="callbackData" type="xsd:string" minOccurs="0"/>
			<xsd:element name="link" type="common:Link" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="receiverAddress" type="xsd:anyURI"/>
			<xsd:element name="receiverName" type="xsd:string" minOccurs="0"/>
			<xsd:element name="receiverSessionStatus" type="ReceiverSessionStatus"/>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:element name="receiverSessionStatus" type="ReceiverSessionStatus"/>
	<xsd:complexType name="ReceiverSessionStatus">
		<xsd:sequence>
			<xsd:element name="status" type="ReceiverStatus"/>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:element name="fileTransferSubscriptionCancellationNotification" type="FileTransferSubscriptionCancellationNotification"/>
	<xsd:complexType name="FileTransferSubscriptionCancellationNotification">
		<xsd:sequence>
			<xsd:element name="callbackData" type="xsd:string" minOccurs="0"/>
			<xsd:element name="reason" type="common:ServiceError" minOccurs="0"/>
			<xsd:element name="link" type="common:Link" maxOccurs="unbounded"/>
		</xsd:sequence>
	</xsd:complexType>

	<!-- ==================================== -->
	<!-- 1-1 sessions & file information-->
	<!-- ==================================== -->
	<xsd:element name="fileTransferSessionInformation" type="FileTransferSessionInformation"/>
	<xsd:complexType name="FileTransferSessionInformation">
		<xsd:sequence>
			<xsd:element name="originatorAddress" type="xsd:anyURI"/>
			<xsd:element name="originatorName" type="xsd:string" minOccurs="0"/>
			<xsd:element name="receiverAddress" type="xsd:anyURI"/>
			<xsd:element name="receiverName" type="xsd:string" minOccurs="0"/>
			<xsd:element name="status" type="ReceiverStatus" minOccurs="0"/>
			<xsd:element name="fileInformation" type="FileInformation"/>
			<xsd:element name="clientCorrelator" type="xsd:string" minOccurs="0"/>
			<xsd:element name="resourceURL" type="xsd:anyURI" minOccurs="0"/>
			<xsd:element name="associatedGroupChat" type="xsd:anyURI" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:complexType name="FileInformation">
		<xsd:sequence>
			<xsd:element name="fileSelector" type="FileSelector"/>
			<xsd:element name="fileDisposition" type="FileDisposition" minOccurs="0"/>
			<xsd:element name="fileDescription" type="xsd:string" minOccurs="0"/>
			<xsd:element name="fileDate" type="FileDate" minOccurs="0"/>
			<xsd:element name="fileIcon" type="xsd:anyURI" minOccurs="0"/>
			<xsd:element name="fileURL" type="xsd:anyURI" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:complexType name="FileSelector">
		<xsd:sequence>
			<xsd:element name="name" type="xsd:string"/>
			<xsd:element name="type" type="xsd:string"/>
			<xsd:element name="size" type="xsd:unsignedLong" minOccurs="0"/>
			<xsd:element name="hash" type="HashInformation" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:complexType name="FileDate">
		<xsd:sequence>
			<xsd:element name="cDate" type="xsd:dateTimeStamp" minOccurs="0"/>
			<xsd:element name="mDate" type="xsd:dateTimeStamp" minOccurs="0"/>
			<xsd:element name="rDate" type="xsd:dateTimeStamp" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:complexType name="HashInformation">
		<xsd:sequence>
			<xsd:element name="algorithm" type="xsd:string"/>
			<xsd:element name="value" type="xsd:hexBinary"/>
		</xsd:sequence>
	</xsd:complexType>
	<!-- ==================================== -->
	<!-- Enumerations -->
	<!-- ==================================== -->
	<xsd:simpleType name="FileDisposition">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="Render"/>
			<xsd:enumeration value="Attachment"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="ReceiverStatus">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="Invited"/>
			<xsd:enumeration value="Connected"/>
			<xsd:enumeration value="Disconnected"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="EventType">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="SessionCancelled"/>
			<xsd:enumeration value="SessionEnded"/>
			<xsd:enumeration value="Declined"/>
			<xsd:enumeration value="Successful"/>
			<xsd:enumeration value="Failed"/>
			<xsd:enumeration value="Aborted"/>
		</xsd:restriction>
	</xsd:simpleType>
</xsd:schema>
